make interactive actions a type and not special cases.
[mikachu/openbox.git] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.0-alpha6], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([openbox/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(XFT, [xft])
42 AC_SUBST(XFT_CFLAGS)
43 AC_SUBST(XFT_LIBS)
44
45 PKG_CHECK_MODULES(XML, [libxml-2.0])
46 AC_SUBST(XML_CFLAGS)
47 AC_SUBST(XML_LIBS)
48
49 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0],
50   [
51     AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
52     AC_SUBST(LIBSN_CFLAGS)
53     AC_SUBST(LIBSN_LIBS)
54   ],
55   [
56     no_such_luck=yes
57   ]
58 )
59
60 PKG_CHECK_MODULES(GTK, [gtk+-2.0],
61   [
62     AC_SUBST(GTK_CFLAGS)
63     AC_SUBST(GTK_LIBS)
64     use_gtk="yes"
65
66     PKG_CHECK_MODULES(GDK_PIXBUF, [gdk-pixbuf-2.0],
67       [
68         AC_SUBST(GDK_PIXBUF_CFLAGS)
69         AC_SUBST(GDK_PIXBUF_LIBS)
70         use_gdk_pixbuf="yes"
71       ],
72       [
73         use_gdk_pixbuf="no"
74         AC_MSG_WARN([disabling build of the configuration tool])
75       ]
76     )
77   ],
78   [
79     use_gtk="no"
80     AC_MSG_WARN([disabling build of the configuration tool])
81   ]
82 )
83 AM_CONDITIONAL(OBCONF,
84                [test "$use_gtk" = "yes" && test "$use_gdk_pixbuf" = "yes"])
85
86 # Check for session management
87 X11_SM
88
89 #EFENCE_LIBS=-lefence
90 EFENCE_LIBS=""
91 AC_SUBST(EFENCE_LIBS)
92
93 # Check for X11 extensions
94 X11_EXT_XKB
95 X11_EXT_XRANDR
96 X11_EXT_VIDMODE
97 X11_EXT_SHAPE
98 X11_EXT_XINERAMA
99
100 AC_CONFIG_FILES([
101   Makefile
102   m4/Makefile
103   po/Makefile.in
104 ])
105 AC_OUTPUT
106
107 AC_MSG_RESULT
108 AC_MSG_RESULT([configure complete, now type \"make\"])