update dutch translation
[openbox.git] / configure.ac
blob795b774299dc220d16bdf250789e33566278ace5
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.4.2], [http://bugzilla.icculus.org])
3 AM_INIT_AUTOMAKE
4 AC_CONFIG_SRCDIR([openbox/openbox.c])
6 dnl Making releases:
7 dnl   OB_MICRO_VERSION += 1;
8 dnl   OB_INTERFACE_AGE += 1;
9 dnl   OB_BINARY_AGE += 1;
10 dnl if any functions have been added, set OB_INTERFACE_AGE to 0.
11 dnl if backwards compatibility has been broken,
12 dnl set OB_BINARY_AGE and OB_INTERFACE_AGE to 0.
13 dnl
14 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
15 dnl
16 OB_MAJOR_VERSION=3
17 OB_MINOR_VERSION=4
18 OB_MICRO_VERSION=15
19 OB_INTERFACE_AGE=0
20 OB_BINARY_AGE=0
21 OB_VERSION=$OB_MAJOR_VERSION.$OB_MINOR_VERSION
23 AC_SUBST(OB_MAJOR_VERSION)
24 AC_SUBST(OB_MINOR_VERSION)
25 AC_SUBST(OB_MICRO_VERSION)
26 AC_SUBST(OB_INTERFACE_AGE)
27 AC_SUBST(OB_BINARY_AGE)
28 AC_SUBST(OB_VERSION)
30 dnl Libtool versioning
31 LT_RELEASE=$OB_MAJOR_VERSION.$OB_MINOR_VERSION
32 LT_CURRENT=`expr $OB_MICRO_VERSION - $OB_INTERFACE_AGE`
33 LT_REVISION=$OB_INTERFACE_AGE
34 LT_AGE=`expr $OB_BINARY_AGE - $OB_INTERFACE_AGE`
35 LT_CURRENT_MINUS_AGE=`expr $LT_CURRENT - $LT_AGE`
37 AC_SUBST(LT_RELEASE)
38 AC_SUBST(LT_CURRENT)
39 AC_SUBST(LT_REVISION)
40 AC_SUBST(LT_AGE)
41 AC_SUBST(LT_CURRENT_MINUS_AGE)
43 AC_PREFIX_DEFAULT([/usr/local])
44 test "$prefix" = "NONE" && prefix=$ac_default_prefix
46 dnl Determine build target
47 OB_DEBUG
48 dnl Pick compiler specific/build target flags, and set $CVS
49 AM_PROG_CC_C_O
50 OB_COMPILER_FLAGS
51 AC_C_CONST
52 AC_C_INLINE
54 AC_PROG_LIBTOOL
55 AC_SUBST(LIBTOOL_DEPS)
56 LIBTOOL="$LIBTOOL --silent"
58 AC_PROG_INSTALL
60 AM_GNU_GETTEXT_VERSION(0.15)
61 AM_GNU_GETTEXT([external])
63 AC_CHECK_HEADERS(ctype.h fcntl.h locale.h signal.h string.h stdio.h stdlib.h)
64 AC_CHECK_HEADERS(unistd.h sys/stat.h sys/select.h sys/time.h sys/wait.h)
65 # AC_HEADER_TIME
66 # AC_TYPE_SIGNAL
68 AC_PATH_PROG([SED], [sed], [no])
69 if test "$SED" = "no"; then
70   AC_MSG_ERROR([The program "sed" is not available. This program is required to build Openbox.])
73 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.6.0])
74 AC_SUBST(GLIB_CFLAGS)
75 AC_SUBST(GLIB_LIBS)
77 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
78 AC_SUBST(PANGO_CFLAGS)
79 AC_SUBST(PANGO_LIBS)
81 PKG_CHECK_MODULES(XFT, [xft])
82 AC_SUBST(XFT_CFLAGS)
83 AC_SUBST(XFT_LIBS)
85 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
86 AC_SUBST(XML_CFLAGS)
87 AC_SUBST(XML_LIBS)
89 AC_ARG_ENABLE(startup-notification,
90   AC_HELP_STRING(
91     [--disable-startup-notification],
92     [disable the startup notification library. [[default=enabled]]]
93   ),
94   [enable_sn=$enableval],
95   [enable_sn=yes]
98 if test "$enable_sn" = yes; then
99 PKG_CHECK_MODULES(LIBSN, [libstartup-notification-1.0],
100   [
101     AC_DEFINE(USE_LIBSN, [1], [Use startup-notification])
102     AC_SUBST(LIBSN_CFLAGS)
103     AC_SUBST(LIBSN_LIBS)
104     sn_found=yes
105   ],
106   [
107     sn_found=no
108   ]
110 else
111   sn_found=no
114 AC_ARG_ENABLE(xcursor,
115   AC_HELP_STRING(
116     [--disable-xcursor],
117     [disable use of the X Cursor library. [[default=enabled]]]
118   ),
119   [enable_xcursor=$enableval],
120   [enable_xcursor=yes]
123 if test "$enable_xcursor" = yes; then
124 PKG_CHECK_MODULES(XCURSOR, [xcursor],
125   [
126     AC_DEFINE(USE_XCURSOR, [1], [Use X Cursor library])
127     AC_SUBST(XCURSOR_CFLAGS)
128     AC_SUBST(XCURSOR_LIBS)
129     xcursor_found=yes
130   ],
131   [
132     xcursor_found=no
133   ]
135 else
136   xcursor_found=no
139 AC_ARG_ENABLE(xcomposite,
140   AC_HELP_STRING(
141     [--disable-xcomposite],
142     [disable use of the X Composite library. [[default=enabled]]]
143   ),
144   [enable_xcomposite=$enableval],
145   [enable_xcomposite=yes]
148 if test "$enable_xcomposite" = yes; then
149 PKG_CHECK_MODULES(XRENDER, [xrender],
150   [
151     AC_DEFINE(USE_XRENDER, [1], [Use X Render library])
152     AC_SUBST(XRENDER_CFLAGS)
153     AC_SUBST(XRENDER_LIBS)
154     PKG_CHECK_MODULES(XDAMAGE, [xdamage],
155       [
156         AC_DEFINE(USE_XDAMAGE, [1], [Use X Damage library])
157         AC_SUBST(XDAMAGE_CFLAGS)
158         AC_SUBST(XDAMAGE_LIBS)
159         PKG_CHECK_MODULES(XCOMPOSITE, [xcomposite],
160           [ 
161             AC_DEFINE(USE_XCOMPOSITE, [1], [Use X Composite library])   
162             AC_SUBST(XCOMPOSITE_CFLAGS)    
163             AC_SUBST(XCOMPOSITE_LIBS)
164             xcomposite_found=yes
165           ],
166           [
167             xcomposite_found=no
168           ]
169         )
170       ],
171       [
172         xcomposite_found=no
173       ]
174     )
175   ],
176   [
177     xcomposite_found=no
178   ]
180 else
181   xcomposite_found=no
184 dnl Check for session management
185 X11_SM
187 #EFENCE_LIBS=-lefence
188 EFENCE_LIBS=""
189 AC_SUBST(EFENCE_LIBS)
191 dnl Check for X11 extensions
192 X11_EXT_XKB
193 X11_EXT_XRANDR
194 X11_EXT_SHAPE
195 X11_EXT_XINERAMA
196 X11_EXT_SYNC
198 AC_CONFIG_FILES([
199   Makefile
200   m4/Makefile
201   po/Makefile.in
202   render/obrender-3.0.pc
203   parser/obparser-3.0.pc
204   version.h
206 AC_CONFIG_COMMANDS([doc],
207                    [test -d doc || mkdir doc])
208 AC_CONFIG_COMMANDS([data],
209                    [test -d data || mkdir data])
210 AC_CONFIG_COMMANDS([data/xsession],
211                    [test -d data/xsession || mkdir data/xsession])
212 AC_OUTPUT
214 AC_MSG_RESULT
215 AC_MSG_RESULT([Compiling with these options:
216                Startup Notification... $sn_found
217                X Cursor Library... $xcursor_found
218                X Composite Library... $xcomposite_found
219                Session Management... $SM
220                ])
221 AC_MSG_RESULT([configure complete, now type "make"])