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_ is for obrender, OBT_ is for obt, keep major/minor in sync,
13 dnl treat the rest separately.
15 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match.
16 dnl the other variables aren't related to the user visible versions, but are used
17 dnl to version the .so files.
18 dnl if no backward compat is broken, it's just a preference if you want to bump
19 dnl the AC_INIT micro version or minor version. if the AC_INIT micro version is
20 dnl 0, don't write it out.
22 dnl How to process .so versioning,
23 dnl RR_MICRO_VERSION += 1;
24 dnl RR_INTERFACE_AGE += 1;
25 dnl RR_BINARY_AGE += 1;
26 dnl if any functions have been added, set RR_INTERFACE_AGE to 0.
27 dnl if backwards compatibility has been broken,
28 dnl set RR_BINARY_AGE and RR_INTERFACE_AGE to 0.
29 dnl if you set anything to 0, you should also bump the MINOR version.
36 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
43 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
45 AC_SUBST(RR_MAJOR_VERSION)
46 AC_SUBST(RR_MINOR_VERSION)
47 AC_SUBST(RR_MICRO_VERSION)
48 AC_SUBST(RR_INTERFACE_AGE)
49 AC_SUBST(RR_BINARY_AGE)
51 AC_SUBST(OBT_MAJOR_VERSION)
52 AC_SUBST(OBT_MINOR_VERSION)
53 AC_SUBST(OBT_MICRO_VERSION)
54 AC_SUBST(OBT_INTERFACE_AGE)
55 AC_SUBST(OBT_BINARY_AGE)
58 dnl Libtool versioning
59 RR_RELEASE=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
60 RR_CURRENT=`expr $RR_MICRO_VERSION - $RR_INTERFACE_AGE`
61 RR_REVISION=$RR_INTERFACE_AGE
62 RR_AGE=`expr $RR_BINARY_AGE - $RR_INTERFACE_AGE`
63 RR_CURRENT_MINUS_AGE=`expr $RR_CURRENT - $RR_AGE`
65 OBT_RELEASE=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
66 OBT_CURRENT=`expr $OBT_MICRO_VERSION - $OBT_INTERFACE_AGE`
67 OBT_REVISION=$OBT_INTERFACE_AGE
68 OBT_AGE=`expr $OBT_BINARY_AGE - $OBT_INTERFACE_AGE`
69 OBT_CURRENT_MINUS_AGE=`expr $OBT_CURRENT - $OBT_AGE`
75 AC_SUBST(RR_CURRENT_MINUS_AGE)
78 AC_SUBST(OBT_REVISION)
80 AC_SUBST(OBT_CURRENT_MINUS_AGE)
82 AC_PREFIX_DEFAULT([/usr/local])
83 test "$prefix" = "NONE" && prefix=$ac_default_prefix
85 dnl Determine build target
87 dnl Pick compiler specific/build target flags, and set $CVS
94 AC_SUBST(LIBTOOL_DEPS)
95 LIBTOOL="$LIBTOOL --silent"
99 AM_GNU_GETTEXT_VERSION(0.15)
100 AM_GNU_GETTEXT([external])
102 AC_CHECK_HEADERS(ctype.h dirent.h errno.h fcntl.h grp.h locale.h pwd.h)
103 AC_CHECK_HEADERS(signal.h string.h stdio.h stdlib.h unistd.h sys/stat.h)
104 AC_CHECK_HEADERS(sys/select.h sys/socket.h sys/time.h sys/types.h sys/wait.h)
106 AC_PATH_PROG([SED], [sed], [no])
107 if test "$SED" = "no"; then
108 AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.])
111 AC_PATH_PROG([DIRNAME], [dirname], [no])
112 if test "$DIRNAME" = "no"; then
113 AC_MSG_ERROR([The program "dirname" is not available. This program is required to build Openbox.])
116 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.14.0])
117 AC_SUBST(GLIB_CFLAGS)
120 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
121 AC_SUBST(PANGO_CFLAGS)
124 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
128 AC_ARG_ENABLE(startup-notification,
130 [--disable-startup-notification],
131 [disable the startup notification library. [default=enabled]]
133 [enable_sn=$enableval],
137 if test "$enable_sn" = yes; then
138 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0 >= 0.8],
140 AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
141 AC_SUBST(LIBSN_CFLAGS)
153 AC_ARG_ENABLE(xcursor,
156 [disable use of the X Cursor library. [default=enabled]]
158 [enable_xcursor=$enableval],
162 if test "$enable_xcursor" = yes; then
163 PKG_CHECK_MODULES(XCURSOR, [xcursor],
165 AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
166 AC_SUBST(XCURSOR_CFLAGS)
167 AC_SUBST(XCURSOR_LIBS)
178 AC_ARG_ENABLE(imlib2,
181 [disable use of Imlib2 image library for loading icons. [default=enabled]]
183 [enable_imlib2=$enableval],
187 if test "$enable_imlib2" = yes; then
188 PKG_CHECK_MODULES(IMLIB2, [imlib2],
190 AC_DEFINE(USE_IMLIB2, [1], [Use Imlib2 image library])
191 AC_SUBST(IMLIB2_CFLAGS)
192 AC_SUBST(IMLIB2_LIBS)
193 # export it for the pkg-config file
194 PKG_CONFIG_IMLIB=imlib2
195 AC_SUBST(PKG_CONFIG_IMLIB)
206 AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
208 AC_ARG_ENABLE(librsvg,
211 [disable use of SVG image files for loading icons. [default=enabled]]
213 [enable_librsvg=$enableval],
217 if test "$enable_librsvg" = yes; then
218 PKG_CHECK_MODULES(LIBRSVG, [librsvg-2.0],
220 AC_DEFINE(USE_LIBRSVG, [1], [Use SVG image files])
221 AC_SUBST(LIBRSVG_CFLAGS)
222 AC_SUBST(LIBRSVG_LIBS)
223 # export it for the pkg-config file
224 PKG_CONFIG_LIBRSVG=librsvg-2.0
225 AC_SUBST(PKG_CONFIG_LIBRSVG)
236 AM_CONDITIONAL(USE_LIBRSVG, [test $librsvg_found = yes])
238 dnl Check for session management
241 #EFENCE_LIBS=-lefence
243 AC_SUBST(EFENCE_LIBS)
245 dnl Check for X11 extensions
257 obrender/obrender-3.5.pc
263 AC_CONFIG_COMMANDS([doc],
264 [test -d doc || mkdir doc])
265 AC_CONFIG_COMMANDS([data],
266 [test -d data || mkdir data])
267 AC_CONFIG_COMMANDS([data/xsession],
268 [test -d data/xsession || mkdir data/xsession])
272 AC_MSG_RESULT([Compiling with these options:
273 Startup Notification... $sn_found
274 X Cursor Library... $xcursor_found
275 Session Management... $SM
276 Imlib2 Library... $imlib2_found
277 SVG Support (librsvg)... $librsvg_found
279 AC_MSG_RESULT([configure complete, now type "make"])