Found a bug in one of the specialized button textures.
[openbox.git] / configure.ac
blob78b5aa6776e2c91165125900dd4645352a09fdd8
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.5.0-rc1], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([openbox/openbox.c])
6 OB_VERSION=$PACKAGE_VERSION
7 AC_SUBST(OB_VERSION)
9 dnl Making releases:
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.
16 dnl
17 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
18 dnl
19 RR_MAJOR_VERSION=3
20 RR_MINOR_VERSION=5
21 RR_MICRO_VERSION=27
22 RR_INTERFACE_AGE=0
23 RR_BINARY_AGE=0
24 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
26 OBT_MAJOR_VERSION=3
27 OBT_MINOR_VERSION=5
28 OBT_MICRO_VERSION=0
29 OBT_INTERFACE_AGE=0
30 OBT_BINARY_AGE=0
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)
38 AC_SUBST(RR_VERSION)
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)
44 AC_SUBST(OBT_VERSION)
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`
59 AC_SUBST(RR_RELEASE)
60 AC_SUBST(RR_CURRENT)
61 AC_SUBST(RR_REVISION)
62 AC_SUBST(RR_AGE)
63 AC_SUBST(RR_CURRENT_MINUS_AGE)
64 AC_SUBST(OBT_RELEASE)
65 AC_SUBST(OBT_CURRENT)
66 AC_SUBST(OBT_REVISION)
67 AC_SUBST(OBT_AGE)
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
74 OB_DEBUG
75 dnl Pick compiler specific/build target flags, and set $CVS
76 AM_PROG_CC_C_O
77 OB_COMPILER_FLAGS
78 AC_C_CONST
79 AC_C_INLINE
81 AC_PROG_LIBTOOL
82 AC_SUBST(LIBTOOL_DEPS)
83 LIBTOOL="$LIBTOOL --silent"
85 AC_PROG_INSTALL
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)
93 # AC_HEADER_TIME
94 # AC_TYPE_SIGNAL
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)
108 AC_SUBST(GLIB_LIBS)
110 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
111 AC_SUBST(PANGO_CFLAGS)
112 AC_SUBST(PANGO_LIBS)
114 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
115 AC_SUBST(XML_CFLAGS)
116 AC_SUBST(XML_LIBS)
118 AC_ARG_ENABLE(startup-notification,
119   AC_HELP_STRING(
120     [--disable-startup-notification],
121     [disable the startup notification library. [[default=enabled]]]
122   ),
123   [enable_sn=$enableval],
124   [enable_sn=yes]
127 if test "$enable_sn" = yes; then
128 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0 >= 0.8],
129   [
130     AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
131     AC_SUBST(LIBSN_CFLAGS)
132     AC_SUBST(LIBSN_LIBS)
133     sn_found=yes
134   ],
135   [
136     sn_found=no
137   ]
139 else
140   sn_found=no
143 AC_ARG_ENABLE(xcursor,
144   AC_HELP_STRING(
145     [--disable-xcursor],
146     [disable use of the X Cursor library. [[default=enabled]]]
147   ),
148   [enable_xcursor=$enableval],
149   [enable_xcursor=yes]
152 if test "$enable_xcursor" = yes; then
153 PKG_CHECK_MODULES(XCURSOR, [xcursor],
154   [
155     AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
156     AC_SUBST(XCURSOR_CFLAGS)
157     AC_SUBST(XCURSOR_LIBS)
158     xcursor_found=yes
159   ],
160   [
161     xcursor_found=no
162   ]
164 else
165   xcursor_found=no
168 AC_ARG_ENABLE(imlib2,
169   AC_HELP_STRING(
170     [--disable-imlib2],
171     [disable use of Imlib2 image library for loading icons. [[default=enabled]]]
172   ),
173   [enable_imlib2=$enableeval],
174   [enable_imlib2=yes]
177 if test "$enable_imlib2" = yes; then
178 PKG_CHECK_MODULES(IMLIB2, [imlib2],
179   [
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)
186     imlib2_found=yes
187   ],
188   [
189     imlib2_found=no
190   ]
192 else
193   imlib2_found=no
196 AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
198 dnl Check for session management
199 X11_SM
201 #EFENCE_LIBS=-lefence
202 EFENCE_LIBS=""
203 AC_SUBST(EFENCE_LIBS)
205 dnl Check for X11 extensions
206 X11_EXT_XKB
207 X11_EXT_XRANDR
208 X11_EXT_SHAPE
209 X11_EXT_XINERAMA
210 X11_EXT_SYNC
212 AC_CONFIG_FILES([
213   Makefile
214   m4/Makefile
215   po/Makefile.in
216   obrender/obrender-3.5.pc
217   obt/obt-3.5.pc
218   obrender/version.h
219   obt/version.h
220   version.h
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])
228 AC_OUTPUT
230 AC_MSG_RESULT
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
236                ])
237 AC_MSG_RESULT([configure complete, now type "make"])