2 AC_INIT([openbox], [3.5.2], [http://bugzilla.icculus.org])
3 AC_CONFIG_SRCDIR([openbox/openbox.c])
5 AM_INIT_AUTOMAKE([foreign])
8 OB_VERSION=$PACKAGE_VERSION
12 dnl RR_MICRO_VERSION += 1;
13 dnl RR_INTERFACE_AGE += 1;
14 dnl R_BINARY_AGE += 1;
15 dnl if any functions have been added, set RR_INTERFACE_AGE to 0.
16 dnl if backwards compatibility has been broken,
17 dnl set RR_BINARY_AGE and RR_INTERFACE_AGE to 0.
19 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
26 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
33 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
35 AC_SUBST(RR_MAJOR_VERSION)
36 AC_SUBST(RR_MINOR_VERSION)
37 AC_SUBST(RR_MICRO_VERSION)
38 AC_SUBST(RR_INTERFACE_AGE)
39 AC_SUBST(RR_BINARY_AGE)
41 AC_SUBST(OBT_MAJOR_VERSION)
42 AC_SUBST(OBT_MINOR_VERSION)
43 AC_SUBST(OBT_MICRO_VERSION)
44 AC_SUBST(OBT_INTERFACE_AGE)
45 AC_SUBST(OBT_BINARY_AGE)
48 dnl Libtool versioning
49 RR_RELEASE=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
50 RR_CURRENT=`expr $RR_MICRO_VERSION - $RR_INTERFACE_AGE`
51 RR_REVISION=$RR_INTERFACE_AGE
52 RR_AGE=`expr $RR_BINARY_AGE - $RR_INTERFACE_AGE`
53 RR_CURRENT_MINUS_AGE=`expr $RR_CURRENT - $RR_AGE`
55 OBT_RELEASE=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
56 OBT_CURRENT=`expr $OBT_MICRO_VERSION - $OBT_INTERFACE_AGE`
57 OBT_REVISION=$OBT_INTERFACE_AGE
58 OBT_AGE=`expr $OBT_BINARY_AGE - $OBT_INTERFACE_AGE`
59 OBT_CURRENT_MINUS_AGE=`expr $OBT_CURRENT - $OBT_AGE`
65 AC_SUBST(RR_CURRENT_MINUS_AGE)
68 AC_SUBST(OBT_REVISION)
70 AC_SUBST(OBT_CURRENT_MINUS_AGE)
72 AC_PREFIX_DEFAULT([/usr/local])
73 test "$prefix" = "NONE" && prefix=$ac_default_prefix
75 dnl Determine build target
77 dnl Pick compiler specific/build target flags, and set $CVS
84 AC_SUBST(LIBTOOL_DEPS)
85 LIBTOOL="$LIBTOOL --silent"
89 AM_GNU_GETTEXT_VERSION(0.15)
90 AM_GNU_GETTEXT([external])
92 AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h)
93 AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h)
94 AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.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=$enableval],
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 AC_ARG_ENABLE(librsvg,
201 [disable use of SVG image files for loading icons. [default=enabled]]
203 [enable_librsvg=$enableval],
207 if test "$enable_librsvg" = yes; then
208 PKG_CHECK_MODULES(LIBRSVG, [librsvg-2.0],
210 AC_DEFINE(USE_LIBRSVG, [1], [Use SVG image files])
211 AC_SUBST(LIBRSVG_CFLAGS)
212 AC_SUBST(LIBRSVG_LIBS)
213 # export it for the pkg-config file
214 PKG_CONFIG_LIBRSVG=librsvg-2.0
215 AC_SUBST(PKG_CONFIG_LIBRSVG)
226 AM_CONDITIONAL(USE_LIBRSVG, [test $librsvg_found = yes])
228 dnl Check for session management
231 #EFENCE_LIBS=-lefence
233 AC_SUBST(EFENCE_LIBS)
235 dnl Check for X11 extensions
247 obrender/obrender-3.5.pc
253 AC_CONFIG_COMMANDS([doc],
254 [test -d doc || mkdir doc])
255 AC_CONFIG_COMMANDS([data],
256 [test -d data || mkdir data])
257 AC_CONFIG_COMMANDS([data/xsession],
258 [test -d data/xsession || mkdir data/xsession])
262 AC_MSG_RESULT([Compiling with these options:
263 Startup Notification... $sn_found
264 X Cursor Library... $xcursor_found
265 Session Management... $SM
266 Imlib2 Library... $imlib2_found
267 SVG Support (librsvg)... $librsvg_found
269 AC_MSG_RESULT([configure complete, now type "make"])