]> icculus.org git repositories - dana/openbox.git/blob - configure.ac
more namespacing with Rr*
[dana/openbox.git] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [2.90.0cvs], [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 OB_COMPILER_FLAGS
16 AC_C_CONST
17 AC_C_INLINE
18
19 if test "$CVS" = "yes"; then
20     AC_PATH_PROG([FLEX], [flex])
21     test "$FLEX" || AC_MSG_ERROR([flex not found])
22
23     AC_PATH_PROG([BISON], [bison])
24     test "BISON" || AC_MSG_ERROR([bison not found])
25 fi
26
27 AC_DISABLE_STATIC
28 AC_LIBTOOL_DLOPEN
29 AC_PROG_LIBTOOL
30 AC_SUBST(LIBTOOL_DEPS)
31 LIBTOOL="$LIBTOOL --silent"
32
33 AC_PROG_INSTALL
34
35 ALL_LINGUAS=""
36 AM_GNU_GETTEXT_VERSION(0.11.5)
37 AM_GNU_GETTEXT([external])
38
39 AC_CHECK_HEADERS(ctype.h fcntl.h locale.h signal.h string.h stdio.h stdlib.h)
40 AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/time.h sys/wait.h)
41 # AC_HEADER_TIME
42 # AC_TYPE_SIGNAL
43
44 PKG_CHECK_MODULES([GLIB], [glib-2.0])
45 AC_SUBST(GLIB_CFLAGS)
46 AC_SUBST(GLIB_LIBS)
47         
48 PKG_CHECK_MODULES([GMODULE], [gmodule-2.0])
49 AC_SUBST(GMODULE_CFLAGS)
50 AC_SUBST(GMODULE_LIBS)
51
52 PKG_CHECK_MODULES(XFT, [xft])
53 AC_SUBST(XFT_CFLAGS)
54 AC_SUBST(XFT_LIBS)
55
56 PKG_CHECK_MODULES(XML, [libxml-2.0])
57 AC_SUBST(XML_CFLAGS)
58 AC_SUBST(XML_LIBS)
59
60 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0],
61   [
62     AC_DEFINE(USE_LIBSN)
63     AC_SUBST(LIBSN_CFLAGS)
64     AC_SUBST(LIBSN_LIBS)
65   ],
66   [
67     no_such_luck=yes
68   ]
69 )
70
71 PKG_CHECK_MODULES(GTK, [gtk+-2.0],
72   [
73     AC_SUBST(GTK_CFLAGS)
74     AC_SUBST(GTK_LIBS)
75     use_gtk="yes"
76
77     PKG_CHECK_MODULES(GLADE, [libglade-2.0],
78       [
79         AC_SUBST(GLADE_CFLAGS)
80         AC_SUBST(GLADE_LIBS)
81         use_glade="yes"
82       ],
83       [
84         use_glade="no"
85         AC_MSG_WARN([disabling build of the configuration tool])
86       ]
87     )
88   ],
89   [
90     use_gtk="no"
91     AC_MSG_WARN([disabling build of the configuration tool])
92   ]
93 )
94 AM_CONDITIONAL(OBCONF, [test "$use_gtk" = "yes" && test "$use_glade" = "yes"])
95
96 # Check for X11 extensions
97 X11_EXT_XKB
98 X11_EXT_XRANDR
99 X11_EXT_VIDMODE
100 X11_EXT_SHAPE
101 X11_EXT_XINERAMA
102
103 AC_CONFIG_FILES([Makefile
104                  po/Makefile.in
105                  themes/Makefile
106                  data/Makefile
107                  render/Makefile
108                  parser/Makefile
109                  kernel/Makefile
110                  plugins/Makefile
111                  plugins/resistance/Makefile
112                  plugins/placement/Makefile
113                  plugins/mouse/Makefile
114                  plugins/keyboard/Makefile
115                  plugins/menu/Makefile
116                  tools/Makefile
117                  tools/obconf/Makefile])
118 AC_OUTPUT
119
120 AC_MSG_RESULT
121 if test "$DEBUG" = "yes"; then
122   AC_MSG_RESULT([Creating a DEBUG build.])
123 else
124   AC_MSG_RESULT([Creating a RELEASE build.])
125 fi
126 AC_MSG_RESULT
127 AC_MSG_RESULT([configure complete, now type \"make\"])