2 AC_INIT([openbox], [3.5.0-rc1], [http://bugzilla.icculus.org])
4 AC_CONFIG_SRCDIR([openbox/openbox.c])
6 OB_VERSION=$PACKAGE_VERSION
10 dnl RR_MICRO_VERSION += 1;
11 dnl RR_INTERFACE_AGE += 1;
12 dnl R_BINARY_AGE += 1;
13 dnl if any functions have been added, set RR_INTERFACE_AGE to 0.
14 dnl if backwards compatibility has been broken,
15 dnl set RR_BINARY_AGE and RR_INTERFACE_AGE to 0.
17 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
24 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
31 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
33 AC_SUBST(RR_MAJOR_VERSION)
34 AC_SUBST(RR_MINOR_VERSION)
35 AC_SUBST(RR_MICRO_VERSION)
36 AC_SUBST(RR_INTERFACE_AGE)
37 AC_SUBST(RR_BINARY_AGE)
39 AC_SUBST(OBT_MAJOR_VERSION)
40 AC_SUBST(OBT_MINOR_VERSION)
41 AC_SUBST(OBT_MICRO_VERSION)
42 AC_SUBST(OBT_INTERFACE_AGE)
43 AC_SUBST(OBT_BINARY_AGE)
46 dnl Libtool versioning
47 RR_RELEASE=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
48 RR_CURRENT=`expr $RR_MICRO_VERSION - $RR_INTERFACE_AGE`
49 RR_REVISION=$RR_INTERFACE_AGE
50 RR_AGE=`expr $RR_BINARY_AGE - $RR_INTERFACE_AGE`
51 RR_CURRENT_MINUS_AGE=`expr $RR_CURRENT - $RR_AGE`
53 OBT_RELEASE=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
54 OBT_CURRENT=`expr $OBT_MICRO_VERSION - $OBT_INTERFACE_AGE`
55 OBT_REVISION=$OBT_INTERFACE_AGE
56 OBT_AGE=`expr $OBT_BINARY_AGE - $OBT_INTERFACE_AGE`
57 OBT_CURRENT_MINUS_AGE=`expr $OBT_CURRENT - $OBT_AGE`
63 AC_SUBST(RR_CURRENT_MINUS_AGE)
66 AC_SUBST(OBT_REVISION)
68 AC_SUBST(OBT_CURRENT_MINUS_AGE)
70 AC_PREFIX_DEFAULT([/usr/local])
71 test "$prefix" = "NONE" && prefix=$ac_default_prefix
73 dnl Determine build target
75 dnl Pick compiler specific/build target flags, and set $CVS
82 AC_SUBST(LIBTOOL_DEPS)
83 LIBTOOL="$LIBTOOL --silent"
87 AM_GNU_GETTEXT_VERSION(0.15)
88 AM_GNU_GETTEXT([external])
90 AC_CHECK_HEADERS(ctype.h fcntl.h grp.h locale.h pwd.h signal.h string.h)
91 AC_CHECK_HEADERS(stdio.h stdlib.h unistd.h sys/stat.h sys/select.h)
92 AC_CHECK_HEADERS(sys/socket.h sys/time.h sys/wait.h sys/inotify.h)
96 AC_PATH_PROG([SED], [sed], [no])
97 if test "$SED" = "no"; then
98 AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.])
101 AC_PATH_PROG([DIRNAME], [dirname], [no])
102 if test "$DIRNAME" = "no"; then
103 AC_MSG_ERROR([The program "dirname" is not available. This program is required to build Openbox.])
106 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.14.0])
107 AC_SUBST(GLIB_CFLAGS)
110 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
111 AC_SUBST(PANGO_CFLAGS)
114 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
118 AC_ARG_ENABLE(startup-notification,
120 [--disable-startup-notification],
121 [disable the startup notification library. [[default=enabled]]]
123 [enable_sn=$enableval],
127 if test "$enable_sn" = yes; then
128 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0 >= 0.8],
130 AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
131 AC_SUBST(LIBSN_CFLAGS)
143 AC_ARG_ENABLE(xcursor,
146 [disable use of the X Cursor library. [[default=enabled]]]
148 [enable_xcursor=$enableval],
152 if test "$enable_xcursor" = yes; then
153 PKG_CHECK_MODULES(XCURSOR, [xcursor],
155 AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
156 AC_SUBST(XCURSOR_CFLAGS)
157 AC_SUBST(XCURSOR_LIBS)
168 AC_ARG_ENABLE(imlib2,
171 [disable use of Imlib2 image library for loading icons. [[default=enabled]]]
173 [enable_imlib2=$enableeval],
177 if test "$enable_imlib2" = yes; then
178 PKG_CHECK_MODULES(IMLIB2, [imlib2],
180 AC_DEFINE(USE_IMLIB2, [1], [Use Imlib2 image library])
181 AC_SUBST(IMLIB2_CFLAGS)
182 AC_SUBST(IMLIB2_LIBS)
183 # export it for the pkg-config file
184 PKG_CONFIG_IMLIB=imlib2
185 AC_SUBST(PKG_CONFIG_IMLIB)
196 AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
198 dnl Check for session management
201 #EFENCE_LIBS=-lefence
203 AC_SUBST(EFENCE_LIBS)
205 dnl Check for X11 extensions
216 obrender/obrender-3.5.pc
222 AC_CONFIG_COMMANDS([doc],
223 [test -d doc || mkdir doc])
224 AC_CONFIG_COMMANDS([data],
225 [test -d data || mkdir data])
226 AC_CONFIG_COMMANDS([data/xsession],
227 [test -d data/xsession || mkdir data/xsession])
231 AC_MSG_RESULT([Compiling with these options:
232 Startup Notification... $sn_found
233 X Cursor Library... $xcursor_found
234 Session Management... $SM
235 Imlib2 library... $imlib2_found
237 AC_MSG_RESULT([configure complete, now type "make"])