make putting plugin menus in a menu closer to working..
[mikachu/openbox.git] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.0-alpha5], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([kernel/openbox.c])
5
6 AC_PREFIX_DEFAULT([/usr/local])
7 test "$prefix" = "NONE" && prefix=$ac_default_prefix
8
9 AC_PATH_PROG([SED], [sed])
10 test "$SED" || AC_MSG_ERROR([sed not found])
11
12 # Determine build target
13 OB_DEBUG
14 # Pick compiler specific/build target flags, and set $CVS
15 AM_PROG_CC_C_O
16 OB_COMPILER_FLAGS
17 AC_C_CONST
18 AC_C_INLINE
19
20 AC_DISABLE_STATIC
21 AC_LIBTOOL_DLOPEN
22 AC_PROG_LIBTOOL
23 AC_SUBST(LIBTOOL_DEPS)
24 LIBTOOL="$LIBTOOL --silent"
25
26 AC_PROG_INSTALL
27
28 ALL_LINGUAS=""
29 AM_GNU_GETTEXT_VERSION(0.12.1)
30 AM_GNU_GETTEXT([external])
31
32 AC_CHECK_HEADERS(ctype.h fcntl.h locale.h signal.h string.h stdio.h stdlib.h)
33 AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/time.h sys/wait.h)
34 # AC_HEADER_TIME
35 # AC_TYPE_SIGNAL
36
37 PKG_CHECK_MODULES([GLIB], [glib-2.0])
38 AC_SUBST(GLIB_CFLAGS)
39 AC_SUBST(GLIB_LIBS)
40         
41 PKG_CHECK_MODULES([GMODULE], [gmodule-2.0])
42 AC_SUBST(GMODULE_CFLAGS)
43 AC_SUBST(GMODULE_LIBS)
44
45 PKG_CHECK_MODULES(XFT, [xft])
46 AC_SUBST(XFT_CFLAGS)
47 AC_SUBST(XFT_LIBS)
48
49 PKG_CHECK_MODULES(XML, [libxml-2.0])
50 AC_SUBST(XML_CFLAGS)
51 AC_SUBST(XML_LIBS)
52
53 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0],
54   [
55     AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
56     AC_SUBST(LIBSN_CFLAGS)
57     AC_SUBST(LIBSN_LIBS)
58   ],
59   [
60     no_such_luck=yes
61   ]
62 )
63
64 PKG_CHECK_MODULES(GTK, [gtk+-2.0],
65   [
66     AC_SUBST(GTK_CFLAGS)
67     AC_SUBST(GTK_LIBS)
68     use_gtk="yes"
69
70     PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0],
71       [
72         AC_SUBST(GDK_PIXBUF_CFLAGS)
73         AC_SUBST(GDK_PIXBUF_LIBS)
74         use_gdk_pixbuf="yes"
75       ],
76       [
77         use_gdk_pixbuf="no"
78         AC_MSG_WARN([disabling build of the configuration tool])
79       ]
80     )
81   ],
82   [
83     use_gtk="no"
84     AC_MSG_WARN([disabling build of the configuration tool])
85   ]
86 )
87 AM_CONDITIONAL(OBCONF,
88                [test "$use_gtk" = "yes" && test "$use_gdk_pixbuf" = "yes"])
89
90 # Check for session management
91 X11_SM
92
93 #EFENCE_LIBS=-lefence
94 EFENCE_LIBS=""
95 AC_SUBST(EFENCE_LIBS)
96
97 # Check for X11 extensions
98 X11_EXT_XKB
99 X11_EXT_XRANDR
100 X11_EXT_VIDMODE
101 X11_EXT_SHAPE
102 X11_EXT_XINERAMA
103
104 AC_CONFIG_FILES([
105   Makefile
106   m4/Makefile
107   po/Makefile.in
108 ])
109 AC_OUTPUT
110
111 AC_MSG_RESULT
112 AC_MSG_RESULT([configure complete, now type \"make\"])