]> Dogcows Code - chaz/openbox/blob - configure.ac
Fix for when the menu's update function returns FALSE and no menu is shown.
[chaz/openbox] / configure.ac
1 AC_PREREQ([2.54])
2 AC_INIT([openbox], [3.5.0], [http://bugzilla.icculus.org])
3 AC_CONFIG_SRCDIR([openbox/openbox.c])
4
5 AM_INIT_AUTOMAKE([foreign])
6 AM_SILENT_RULES([yes])
7
8 OB_VERSION=$PACKAGE_VERSION
9 AC_SUBST(OB_VERSION)
10
11 dnl Making releases:
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.
18 dnl
19 dnl if MAJOR or MINOR version changes, be sure to change AC_INIT above to match
20 dnl
21 RR_MAJOR_VERSION=3
22 RR_MINOR_VERSION=5
23 RR_MICRO_VERSION=28
24 RR_INTERFACE_AGE=1
25 RR_BINARY_AGE=1
26 RR_VERSION=$RR_MAJOR_VERSION.$RR_MINOR_VERSION
27
28 OBT_MAJOR_VERSION=3
29 OBT_MINOR_VERSION=5
30 OBT_MICRO_VERSION=1
31 OBT_INTERFACE_AGE=1
32 OBT_BINARY_AGE=1
33 OBT_VERSION=$OBT_MAJOR_VERSION.$OBT_MINOR_VERSION
34
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)
40 AC_SUBST(RR_VERSION)
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)
46 AC_SUBST(OBT_VERSION)
47
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`
54
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`
60
61 AC_SUBST(RR_RELEASE)
62 AC_SUBST(RR_CURRENT)
63 AC_SUBST(RR_REVISION)
64 AC_SUBST(RR_AGE)
65 AC_SUBST(RR_CURRENT_MINUS_AGE)
66 AC_SUBST(OBT_RELEASE)
67 AC_SUBST(OBT_CURRENT)
68 AC_SUBST(OBT_REVISION)
69 AC_SUBST(OBT_AGE)
70 AC_SUBST(OBT_CURRENT_MINUS_AGE)
71
72 AC_PREFIX_DEFAULT([/usr/local])
73 test "$prefix" = "NONE" && prefix=$ac_default_prefix
74
75 dnl Determine build target
76 OB_DEBUG
77 dnl Pick compiler specific/build target flags, and set $CVS
78 AM_PROG_CC_C_O
79 OB_COMPILER_FLAGS
80 AC_C_CONST
81 AC_C_INLINE
82
83 AC_PROG_LIBTOOL
84 AC_SUBST(LIBTOOL_DEPS)
85 LIBTOOL="$LIBTOOL --silent"
86
87 AC_PROG_INSTALL
88
89 AM_GNU_GETTEXT_VERSION(0.15)
90 AM_GNU_GETTEXT([external])
91
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)
95
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.])
99 fi
100
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.])
104 fi
105
106 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.14.0])
107 AC_SUBST(GLIB_CFLAGS)
108 AC_SUBST(GLIB_LIBS)
109
110 PKG_CHECK_MODULES(PANGO, [pango >= 1.8.0 pangoxft >= 1.8.0])
111 AC_SUBST(PANGO_CFLAGS)
112 AC_SUBST(PANGO_LIBS)
113
114 PKG_CHECK_MODULES(XML, [libxml-2.0 >= 2.6.0])
115 AC_SUBST(XML_CFLAGS)
116 AC_SUBST(XML_LIBS)
117
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]
125 )
126
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 ]
138 )
139 else
140 sn_found=no
141 fi
142
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]
150 )
151
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 ]
163 )
164 else
165 xcursor_found=no
166 fi
167
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=$enableval],
174 [enable_imlib2=yes]
175 )
176
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 ]
191 )
192 else
193 imlib2_found=no
194 fi
195
196 AM_CONDITIONAL(USE_IMLIB2, [test $imlib2_found = yes])
197
198 dnl Check for session management
199 X11_SM
200
201 #EFENCE_LIBS=-lefence
202 EFENCE_LIBS=""
203 AC_SUBST(EFENCE_LIBS)
204
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
211 X11_EXT_AUTH
212
213 AC_CONFIG_FILES([
214 Makefile
215 m4/Makefile
216 po/Makefile.in
217 obrender/obrender-3.5.pc
218 obt/obt-3.5.pc
219 obrender/version.h
220 obt/version.h
221 version.h
222 ])
223 AC_CONFIG_COMMANDS([doc],
224 [test -d doc || mkdir doc])
225 AC_CONFIG_COMMANDS([data],
226 [test -d data || mkdir data])
227 AC_CONFIG_COMMANDS([data/xsession],
228 [test -d data/xsession || mkdir data/xsession])
229 AC_OUTPUT
230
231 AC_MSG_RESULT
232 AC_MSG_RESULT([Compiling with these options:
233 Startup Notification... $sn_found
234 X Cursor Library... $xcursor_found
235 Session Management... $SM
236 Imlib2 library... $imlib2_found
237 ])
238 AC_MSG_RESULT([configure complete, now type "make"])
This page took 0.045928 seconds and 4 git commands to generate.