diff options
author | Sami Kerola <kerolasa@iki.fi> | 2013-02-15 23:12:13 (GMT) |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2013-05-26 09:38:11 (GMT) |
commit | bc205a9b323ed7211dbc158429abaa32a821a794 (patch) | |
tree | f6d93a76170747570b19f7e294e797f07c234d5b /configure.ac | |
parent | 74c414a89f0b32f177b2d05443e5e218a04c9459 (diff) | |
download | fluxbox-bc205a9b323ed7211dbc158429abaa32a821a794.zip fluxbox-bc205a9b323ed7211dbc158429abaa32a821a794.tar.bz2 |
build-sys: unify configure.ac syntax
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 548 |
1 files changed, 318 insertions, 230 deletions
diff --git a/configure.ac b/configure.ac index c21aa77..f1bc6e9 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,8 +1,8 @@ | |||
1 | dnl Initialize autoconf and automake | 1 | dnl Initialize autoconf and automake |
2 | AC_PREREQ(2.52) | 2 | AC_PREREQ([2.52]) |
3 | AC_INIT([fluxbox], | 3 | AC_INIT([fluxbox], |
4 | [1.3.5], | 4 | [1.3.5], |
5 | [fluxbox-devel@lists.sourceforge.net],, | 5 | [fluxbox-devel@lists.sourceforge.net], [], |
6 | [http://fluxbox.org/]) | 6 | [http://fluxbox.org/]) |
7 | AC_CONFIG_SRCDIR([src/fluxbox.cc]) | 7 | AC_CONFIG_SRCDIR([src/fluxbox.cc]) |
8 | AC_CONFIG_AUX_DIR([build-aux]) | 8 | AC_CONFIG_AUX_DIR([build-aux]) |
@@ -11,11 +11,7 @@ AC_USE_SYSTEM_EXTENSIONS | |||
11 | AM_INIT_AUTOMAKE([foreign 1.10 tar-pax dist-bzip2 subdir-objects]) | 11 | AM_INIT_AUTOMAKE([foreign 1.10 tar-pax dist-bzip2 subdir-objects]) |
12 | 12 | ||
13 | dnl Determine default prefix | 13 | dnl Determine default prefix |
14 | AS_IF(test "x$prefix" = "xNONE",[prefix="$ac_default_prefix"]) | 14 | AS_IF([test "x$prefix" = "xNONE"], [prefix="$ac_default_prefix"]) |
15 | |||
16 | dnl Check for various flavors of UNIX(r) | ||
17 | dnl AC_AIX | ||
18 | dnl AC_ISC_POSIX | ||
19 | 15 | ||
20 | AC_LANG_CPLUSPLUS | 16 | AC_LANG_CPLUSPLUS |
21 | 17 | ||
@@ -30,38 +26,70 @@ AC_C_INLINE | |||
30 | 26 | ||
31 | AC_TYPE_PID_T | 27 | AC_TYPE_PID_T |
32 | AC_TYPE_SIZE_T | 28 | AC_TYPE_SIZE_T |
29 | AC_STRUCT_TM | ||
33 | 30 | ||
31 | dnl Require pkg-config | ||
34 | m4_ifndef([PKG_PROG_PKG_CONFIG], | 32 | m4_ifndef([PKG_PROG_PKG_CONFIG], |
35 | [m4_fatal([Could not locate the pkg-config autoconf macros. These are usually | 33 | [m4_fatal([Could not locate the pkg-config autoconf macros. These are usually |
36 | located in /usr/share/aclocal/pkg.m4. If your macros are in a different | 34 | located in /usr/share/aclocal/pkg.m4. If your macros are in a different |
37 | location, try setting the environment variable | 35 | location, try setting the environment variable |
38 | export ACLOCAL_FLAGS="-I/other/macro/dir" | 36 | export ACLOCAL_FLAGS="-I/other/macro/dir" |
39 | before running ./autogen.sh or autoreconf again.])]) | 37 | before running ./autogen.sh or autoreconf again.]) |
38 | ]) | ||
40 | PKG_PROG_PKG_CONFIG | 39 | PKG_PROG_PKG_CONFIG |
41 | 40 | ||
42 | AC_CHECK_PROGS(regex_cmd, sed) | 41 | dnl Check for sed |
43 | AS_IF(test "x$regex_cmd" = "x",[AC_MSG_ERROR([error. sed is required to build the data files.])]) | 42 | AC_CHECK_PROGS([regex_cmd], [sed]) |
43 | AS_IF([test "x$regex_cmd" = "x"], [ | ||
44 | AC_MSG_ERROR([error. sed is required to build the data files.]) | ||
45 | ]) | ||
44 | 46 | ||
45 | dnl Check for system header files | 47 | dnl Check for system header files |
46 | AC_HEADER_STDC | 48 | AC_HEADER_STDC |
47 | AC_HEADER_STDBOOL | 49 | AC_HEADER_STDBOOL |
48 | AC_CHECK_HEADERS(errno.h ctype.h dirent.h fcntl.h libgen.h \ | 50 | AC_CHECK_HEADERS([ \ |
49 | locale.h math.h nl_types.h process.h signal.h stdarg.h \ | 51 | ctype.h \ |
50 | stdint.h stdio.h time.h unistd.h \ | 52 | dirent.h \ |
51 | sys/param.h sys/select.h sys/signal.h sys/stat.h \ | 53 | errno.h \ |
52 | sys/time.h sys/types.h sys/wait.h \ | 54 | fcntl.h \ |
53 | langinfo.h iconv.h) | 55 | iconv.h \ |
54 | 56 | langinfo.h \ | |
55 | 57 | libgen.h \ | |
56 | 58 | locale.h \ | |
57 | AC_CHECK_HEADERS(sstream,,[ | 59 | math.h \ |
58 | AC_CHECK_HEADERS(strstream,,[ | 60 | nl_types.h \ |
59 | AC_MSG_ERROR([Your libstdc++ doesn't have the sstream or strstream classes])] | 61 | process.h \ |
60 | )] | 62 | signal.h \ |
61 | ) | 63 | stdarg.h \ |
62 | 64 | stdint.h \ | |
63 | AC_CHECK_HEADERS(cassert cctype cerrno cmath cstdarg cstdint cstdio cstdlib cstring ctime) | 65 | stdio.h \ |
64 | 66 | sys/param.h \ | |
67 | sys/select.h \ | ||
68 | sys/signal.h \ | ||
69 | sys/stat.h \ | ||
70 | sys/time.h \ | ||
71 | sys/types.h \ | ||
72 | sys/wait.h \ | ||
73 | time.h \ | ||
74 | unistd.h \ | ||
75 | ]) | ||
76 | AC_CHECK_HEADERS([ \ | ||
77 | cassert \ | ||
78 | cctype \ | ||
79 | cerrno \ | ||
80 | cmath \ | ||
81 | cstdarg \ | ||
82 | cstdint \ | ||
83 | cstdio \ | ||
84 | cstdlib \ | ||
85 | cstring \ | ||
86 | ctime \ | ||
87 | ]) | ||
88 | AC_CHECK_HEADERS([sstream], [], [ | ||
89 | AC_CHECK_HEADERS([strstream], [], [ | ||
90 | AC_MSG_ERROR([Your libstdc++ doesn't have the sstream or strstream classes]) | ||
91 | ]) | ||
92 | ]) | ||
65 | 93 | ||
66 | dnl Check for existance of basename(), setlocale() and strftime() | 94 | dnl Check for existance of basename(), setlocale() and strftime() |
67 | AC_FUNC_CLOSEDIR_VOID | 95 | AC_FUNC_CLOSEDIR_VOID |
@@ -72,10 +100,34 @@ AC_FUNC_REALLOC | |||
72 | AC_FUNC_SELECT_ARGTYPES | 100 | AC_FUNC_SELECT_ARGTYPES |
73 | AC_FUNC_STAT | 101 | AC_FUNC_STAT |
74 | 102 | ||
75 | AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="-lgen $LIBS")) | 103 | AC_CHECK_FUNCS([basename], [], [ |
76 | AC_CHECK_FUNCS(catclose catgets catopen getpid memset mkdir \ | 104 | AC_CHECK_LIB([gen], [basename], [LIBS="-lgen $LIBS"]) |
77 | nl_langinfo putenv regcomp select setenv setlocale sigaction snprintf \ | 105 | ]) |
78 | sqrt strcasecmp strcasestr strchr strstr strtol strtoul sync vsnprintf) | 106 | AC_CHECK_FUNCS([ \ |
107 | catclose \ | ||
108 | catgets \ | ||
109 | catopen \ | ||
110 | getpid \ | ||
111 | memset \ | ||
112 | mkdir \ | ||
113 | nl_langinfo \ | ||
114 | putenv \ | ||
115 | regcomp \ | ||
116 | select \ | ||
117 | setenv \ | ||
118 | setlocale \ | ||
119 | sigaction \ | ||
120 | snprintf \ | ||
121 | sqrt \ | ||
122 | strcasecmp \ | ||
123 | strcasestr \ | ||
124 | strchr \ | ||
125 | strstr \ | ||
126 | strtol \ | ||
127 | strtoul \ | ||
128 | sync \ | ||
129 | vsnprintf \ | ||
130 | ]) | ||
79 | 131 | ||
80 | 132 | ||
81 | dnl Windows requires the mingw-catgets library for the catgets function. | 133 | dnl Windows requires the mingw-catgets library for the catgets function. |
@@ -86,68 +138,50 @@ dnl Gcc 3.3 testprog = ``extern "C" char strftime;'', build with g++ test.cc | |||
86 | dnl breaks with: | 138 | dnl breaks with: |
87 | dnl test.cc:1: error: nonnull argument with out-of-range operand number | 139 | dnl test.cc:1: error: nonnull argument with out-of-range operand number |
88 | dnl (arg 1, operand 3) | 140 | dnl (arg 1, operand 3) |
141 | AC_MSG_CHECKING([for strftime]) | ||
142 | |||
143 | AC_COMPILE_IFELSE([ | ||
144 | AC_LANG_PROGRAM([#include <time.h>], [[ | ||
145 | char * s; | ||
146 | time_t t = time(NULL); | ||
147 | size_t x = strftime(s, 5, "%a", localtime(&t)); | ||
148 | ]]) | ||
149 | ], [ | ||
150 | AC_DEFINE([HAVE_STRFTIME], [1], [Define to 1 if you have the 'strftime' function.]) | ||
151 | AC_MSG_RESULT([yes]) | ||
152 | ], [ | ||
153 | AC_MSG_RESULT([no]) | ||
154 | ]) | ||
89 | 155 | ||
90 | 156 | AC_MSG_CHECKING([for clock_gettime]) | |
91 | AC_MSG_CHECKING(for strftime) | 157 | AC_COMPILE_IFELSE([ |
92 | 158 | AC_LANG_PROGRAM([#include <time.h>], [[ | |
93 | AC_COMPILE_IFELSE( | 159 | clock_gettime(CLOCK_MONOTONIC, 0); |
94 | [AC_LANG_PROGRAM([#include <time.h>], | 160 | return 0; |
95 | [[ | 161 | ]]) |
96 | char * s; | 162 | ], [ |
97 | time_t t = time(NULL); | 163 | AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define to 1 if you have the 'clock_gettime' function.]) |
98 | size_t x = strftime(s, 5, "%a", localtime(&t)); | 164 | AC_MSG_RESULT([yes]) |
99 | ]] | ||
100 | )], | ||
101 | [ | ||
102 | AC_DEFINE(HAVE_STRFTIME, 1, [Define to 1 if you have the 'strftime' function.]) | ||
103 | AC_MSG_RESULT(yes) | ||
104 | ], | ||
105 | [AC_MSG_RESULT(no)]) | ||
106 | |||
107 | |||
108 | AC_MSG_CHECKING(for clock_gettime) | ||
109 | AC_COMPILE_IFELSE( | ||
110 | [AC_LANG_PROGRAM( | ||
111 | [#include <time.h>], | ||
112 | [[ | ||
113 | clock_gettime(CLOCK_MONOTONIC, 0); | ||
114 | return 0; | ||
115 | ]] | ||
116 | )], | ||
117 | [ | ||
118 | AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define to 1 if you have the 'clock_gettime' function.]) | ||
119 | AC_MSG_RESULT(yes) | ||
120 | # *bsd has clock_gettime() in libc | 165 | # *bsd has clock_gettime() in libc |
121 | AC_CHECK_LIB(rt, clock_gettime, LIBS="-lrt $LIBS") | 166 | AC_CHECK_LIB([rt], [clock_gettime], [LIBS="-lrt $LIBS"]) |
122 | ], | 167 | ], [ |
123 | [ | 168 | AC_MSG_RESULT([no]) |
124 | AC_MSG_RESULT(no) | 169 | ]) |
125 | ] | ||
126 | ) | ||
127 | |||
128 | AC_MSG_CHECKING(for mach_absolute_time) | ||
129 | AC_COMPILE_IFELSE( | ||
130 | [AC_LANG_PROGRAM( | ||
131 | [#include <mach/mach_time.h>], | ||
132 | [[ | ||
133 | mach_absolute_time(); | ||
134 | return 0; | ||
135 | ]] | ||
136 | )], | ||
137 | [ | ||
138 | AC_DEFINE(HAVE_MACH_ABSOLUTE_TIME, 1, [Define to 1 if you have the 'mach_absolute_time' function.]) | ||
139 | AC_MSG_RESULT(yes) | ||
140 | #AC_CHECK_LIB(, clock_gettime, LIBS="-lrt $LIBS") | ||
141 | ], | ||
142 | [ | ||
143 | AC_MSG_RESULT(no) | ||
144 | ] | ||
145 | ) | ||
146 | |||
147 | |||
148 | 170 | ||
171 | AC_MSG_CHECKING([for mach_absolute_time]) | ||
172 | AC_COMPILE_IFELSE([ | ||
173 | AC_LANG_PROGRAM([#include <mach/mach_time.h>], [[ | ||
174 | mach_absolute_time(); | ||
175 | return 0; | ||
176 | ]]) | ||
177 | ], [ | ||
178 | AC_DEFINE([HAVE_MACH_ABSOLUTE_TIME], [1], [Define to 1 if you have the 'mach_absolute_time' function.]) | ||
179 | AC_MSG_RESULT([yes]) | ||
180 | #AC_CHECK_LIB([], [clock_gettime], [LIBS="-lrt $LIBS"]) | ||
181 | ], [ | ||
182 | AC_MSG_RESULT([no]) | ||
183 | ]) | ||
149 | 184 | ||
150 | AC_STRUCT_TM | ||
151 | 185 | ||
152 | dnl --------------- | 186 | dnl --------------- |
153 | dnl CHECK FOR ICONV | 187 | dnl CHECK FOR ICONV |
@@ -211,125 +245,174 @@ dnl Check if iconv uses const in prototype declaration | |||
211 | fi | 245 | fi |
212 | fi | 246 | fi |
213 | 247 | ||
214 | AC_CHECK_LIB(nsl, t_open, LIBS="-lnsl $LIBS") | 248 | dnl Check for networking libraries |
215 | AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS") | 249 | AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"]) |
250 | AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"]) | ||
216 | 251 | ||
217 | dnl Check for X headers and libraries | 252 | dnl Check for X headers and libraries |
218 | AC_PATH_X | 253 | AC_PATH_X |
219 | AC_PATH_XTRA | 254 | AC_PATH_XTRA |
255 | AS_IF([test x$no_x = "xyes"], [ | ||
256 | AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.]) | ||
257 | ]) | ||
220 | 258 | ||
221 | test x$no_x = "xyes" && AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.]) | ||
222 | |||
223 | AS_IF(test "x$x_includes" = "x",[x_includes="/usr/include"]) | ||
224 | AS_IF(test "x$x_libraries" = "x",[x_libraries="/usr/lib"]) | ||
225 | |||
226 | CFLAGS="$CFLAGS $X_CFLAGS" | ||
227 | CXXFLAGS="$CXXFLAGS $X_CFLAGS" | ||
228 | LIBS="$X_LIBS $LIBS" | 259 | LIBS="$X_LIBS $LIBS" |
229 | LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS" | ||
230 | 260 | ||
231 | dnl Check for xpg4 | 261 | dnl Check for xpg4 |
232 | AC_CHECK_LIB(xpg4, setlocale, LIBS="-lxpg4 $LIBS") | 262 | AC_CHECK_LIB([xpg4], [setlocale], [LIBS="-lxpg4 $LIBS"]) |
233 | AC_CHECK_PROGS(gencat_cmd, gencat) | 263 | AC_CHECK_PROGS([gencat_cmd], [gencat]) |
234 | AS_IF(test "x$gencat_cmd" = "x",[NLS=""],[]) | 264 | AS_IF([test "x$gencat_cmd" = "x"], [NLS=""], []) |
235 | |||
236 | Xext_lib="" | ||
237 | 265 | ||
238 | dnl Check for Remember options | 266 | dnl Check for Remember options |
239 | AC_MSG_CHECKING([whether to include remember functionality]) | 267 | AC_MSG_CHECKING([whether to include remember functionality]) |
240 | AC_ARG_ENABLE(remember, | 268 | AC_ARG_ENABLE([remember], |
241 | AS_HELP_STRING([--enable-remember],[include Remembering attributes (default=yes)]),,[enable_remember=yes]) | 269 | AS_HELP_STRING([--enable-remember], |
270 | [include Remembering attributes (default=yes)]), | ||
271 | [], [enable_remember=yes] | ||
272 | ) | ||
242 | AC_MSG_RESULT([$enable_remember]) | 273 | AC_MSG_RESULT([$enable_remember]) |
243 | AS_IF(test "x$enable_remember" = "xyes",[AC_DEFINE(REMEMBER, 1, " compile with remember")],[]) | 274 | AS_IF([test "x$enable_remember" = "xyes"], [ |
244 | AM_CONDITIONAL(REMEMBER_SRC, test "x$enable_remember" = "xyes") | 275 | AC_DEFINE([REMEMBER], [1], [compile with remember]) |
276 | ]) | ||
277 | AM_CONDITIONAL([REMEMBER_SRC], [test "x$enable_remember" = "xyes"]) | ||
245 | 278 | ||
279 | dnl Check for regular expressions | ||
246 | AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) | 280 | AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) |
247 | AC_ARG_ENABLE(regexp, | 281 | AC_ARG_ENABLE([regexp], |
248 | AS_HELP_STRING([--enable-regexp],[regular expression support (default=yes)]),,[enable_regexp=yes]) | 282 | AS_HELP_STRING([--enable-regexp], |
249 | AS_IF(test "x$enable_regexp" = "xyes",[ | 283 | [regular expression support (default=yes)]), |
250 | AC_EGREP_HEADER([regex_t],regex.h, | 284 | [], [enable_regexp=yes] |
251 | AC_DEFINE(USE_REGEXP, 1, "Regular Expression support") | 285 | ) |
252 | AC_MSG_RESULT([yes]) | 286 | AS_IF([test "x$enable_regexp" = "xyes"], [ |
253 | REGEXP_SRC=true, | 287 | AC_EGREP_HEADER([regex_t], [regex.h], [ |
254 | AC_MSG_RESULT([no]) | 288 | AC_DEFINE([USE_REGEXP], [1], [Regular Expression support]) |
255 | REGEXP_SRC=false | 289 | AC_MSG_RESULT([yes]) |
256 | )],[]) | 290 | REGEXP_SRC=true |
257 | AM_CONDITIONAL(REGEXP_SRC, test x$REGEXP_SRC = xtrue) | 291 | ], [ |
292 | AC_MSG_RESULT([no]) | ||
293 | REGEXP_SRC=false | ||
294 | ]) | ||
295 | ]) | ||
296 | AM_CONDITIONAL([REGEXP_SRC], [test x$REGEXP_SRC = xtrue]) | ||
258 | 297 | ||
259 | dnl Check for the Slit | 298 | dnl Check for the Slit |
260 | AC_MSG_CHECKING([whether to include the Slit]) | 299 | AC_MSG_CHECKING([whether to include the Slit]) |
261 | AC_ARG_ENABLE(slit, | 300 | AC_ARG_ENABLE([slit], |
262 | AS_HELP_STRING([--enable-slit],[include code for the Slit (default=yes)]),,[enable_slit=yes]) | 301 | AS_HELP_STRING([--enable-slit], |
302 | [include code for the Slit (default=yes)]), | ||
303 | [], [enable_slit=yes] | ||
304 | ) | ||
263 | AC_MSG_RESULT([$enable_slit]) | 305 | AC_MSG_RESULT([$enable_slit]) |
264 | AS_IF(test "x$enable_slit" = "xyes",[AC_DEFINE(USE_SLIT, 1, " compile with slit")],[]) | 306 | AS_IF([test "x$enable_slit" = "xyes"], [ |
265 | AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") | 307 | AC_DEFINE([USE_SLIT], [1], [compile with slit]) |
308 | ]) | ||
309 | AM_CONDITIONAL([SLIT_SRC], [test "x$enable_slit" = "xyes"]) | ||
266 | 310 | ||
267 | dnl Check for Systemtray options | 311 | dnl Check for Systemtray options |
268 | AC_MSG_CHECKING([whether to include SystemTray]) | 312 | AC_MSG_CHECKING([whether to include SystemTray]) |
269 | AC_ARG_ENABLE(systray, | 313 | AC_ARG_ENABLE([systray], |
270 | AS_HELP_STRING([--enable-systray],[include SystemTray (default=yes)]),,[enable_systray=yes]) | 314 | AS_HELP_STRING([--enable-systray], |
315 | [include SystemTray (default=yes)]), | ||
316 | [], [enable_systray=yes] | ||
317 | ) | ||
271 | AC_MSG_RESULT([$enable_systray]) | 318 | AC_MSG_RESULT([$enable_systray]) |
272 | AS_IF(test "x$enable_systray" = "xyes",[AC_DEFINE(USE_SYSTRAY, 1, " compile with systemtray")],[]) | 319 | AS_IF([test "x$enable_systray" = "xyes"], [ |
273 | AM_CONDITIONAL(SYSTRAY_SRC, test "x$enable_systray" = "xyes") | 320 | AC_DEFINE([USE_SYSTRAY], [1], [compile with systemtray]) |
321 | ]) | ||
322 | AM_CONDITIONAL([SYSTRAY_SRC], [test "x$enable_systray" = "xyes"]) | ||
274 | 323 | ||
275 | dnl Check for Toolbar options | 324 | dnl Check for Toolbar options |
276 | AC_MSG_CHECKING([whether to include Toolbaddr]) | 325 | AC_MSG_CHECKING([whether to include Toolbaddr]) |
277 | AC_ARG_ENABLE(toolbar, | 326 | AC_ARG_ENABLE([toolbar], |
278 | AS_HELP_STRING([--enable-toolbar],[include Toolbar (default=yes)]),,[enable_toolbar=yes]) | 327 | AS_HELP_STRING([--enable-toolbar], |
328 | [include Toolbar (default=yes)]), | ||
329 | [], [enable_toolbar=yes] | ||
330 | ) | ||
279 | AC_MSG_RESULT([$enable_toolbar]) | 331 | AC_MSG_RESULT([$enable_toolbar]) |
280 | AS_IF(test "x$enable_systray" = "xyes" -a "x$enable_toolbar" != "xyes",[ | ||
281 | AC_MSG_RESULT([disabled toolbar, but enabled systray => reenable toolbar]) | ||
282 | AS_VAR_SET(enable_toolbar, "yes")],[]) | ||
283 | AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[]) | ||
284 | AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes") | ||
285 | 332 | ||
333 | AS_IF([test "x$enable_systray" = "xyes" -a "x$enable_toolbar" != "xyes"], [ | ||
334 | AC_MSG_RESULT([disabled toolbar, but enabled systray => reenable toolbar]) | ||
335 | AS_VAR_SET([enable_toolbar], [yes]) | ||
336 | ]) | ||
337 | AS_IF([test "x$enable_toolbar" = "xyes"], [ | ||
338 | AC_DEFINE([USE_TOOLBAR], [1], [compile with toolbar]) | ||
339 | ]) | ||
340 | AM_CONDITIONAL([TOOLBAR_SRC], [test "x$enable_toolbar" = "xyes"]) | ||
341 | |||
342 | dnl Extended Window Manager Hints | ||
286 | AC_MSG_CHECKING([whether to support Extended Window Manager Hints]) | 343 | AC_MSG_CHECKING([whether to support Extended Window Manager Hints]) |
287 | AC_ARG_ENABLE(ewmh, | 344 | AC_ARG_ENABLE([ewmh], |
288 | AS_HELP_STRING([--enable-ewmh],[enable support for Extended Window Manager Hints (default=yes)]),,[enable_ewmh=yes]) | 345 | AS_HELP_STRING([--enable-ewmh], |
346 | [enable support for Extended Window Manager Hints (default=yes)]), | ||
347 | [], [enable_ewmh=yes] | ||
348 | ) | ||
289 | AC_MSG_RESULT([$enable_ewmh]) | 349 | AC_MSG_RESULT([$enable_ewmh]) |
290 | AS_IF(test "x$enable_ewmh" = "xyes",[AC_DEFINE(USE_EWMH, 1, "use extened window manager hints")],[]) | 350 | AS_IF([test "x$enable_ewmh" = "xyes"], [ |
291 | AM_CONDITIONAL(EWMH, test "x$enable_ewmh" = "xyes") | 351 | AC_DEFINE([USE_EWMH], [1], [use extened window manager hints]) |
352 | ]) | ||
353 | AM_CONDITIONAL([EWMH], [test "x$enable_ewmh" = "xyes"]) | ||
292 | 354 | ||
293 | dnl Check whether to include debugging code | 355 | dnl Check whether to include debugging code |
294 | DEBUG="" | 356 | DEBUG="" |
295 | AC_MSG_CHECKING([whether to include verbose debugging code]) | 357 | AC_MSG_CHECKING([whether to include verbose debugging code]) |
296 | AC_ARG_ENABLE(debug, | 358 | AC_ARG_ENABLE([debug], |
297 | AS_HELP_STRING([--enable-debug],[include verbose debugging code (default=no)]),,[enable_debug=no]) | 359 | AS_HELP_STRING([--enable-debug], |
360 | [include verbose debugging code (default=no)]), | ||
361 | [], [enable_debug=no] | ||
362 | ) | ||
298 | AC_MSG_RESULT([$enable_debug]) | 363 | AC_MSG_RESULT([$enable_debug]) |
299 | AS_IF(test "x$enable_debug" = "xyes",[ DEBUG="-DDEBUG -Wall" ],[]) | 364 | AS_IF([test "x$enable_debug" = "xyes"], [DEBUG="-DDEBUG -Wall"]) |
300 | AC_SUBST(DEBUG) | 365 | AC_SUBST([DEBUG]) |
301 | CXXFLAGS="$CXXFLAGS $DEBUG" | 366 | CXXFLAGS="$CXXFLAGS $DEBUG" |
302 | 367 | ||
303 | dnl Check whether to build test programs | 368 | dnl Check whether to build test programs |
304 | AC_MSG_CHECKING([whether to build test programs]) | 369 | AC_MSG_CHECKING([whether to build test programs]) |
305 | AC_ARG_ENABLE(test, | 370 | AC_ARG_ENABLE([test], |
306 | AS_HELP_STRING([--enable-test],[build programs used in testing fluxbox (default=no)]),,[enable_test=no]) | 371 | AS_HELP_STRING([--enable-test], |
372 | [build programs used in testing fluxbox (default=no)]), | ||
373 | [], [enable_test=no] | ||
374 | ) | ||
307 | AC_MSG_RESULT([$enable_test]) | 375 | AC_MSG_RESULT([$enable_test]) |
308 | AM_CONDITIONAL(TEST, test "x$enable_test" = "xyes") | 376 | AM_CONDITIONAL([TEST], [test "x$enable_test" = "xyes"]) |
309 | 377 | ||
310 | dnl Check whether to include native language support (i18n) | 378 | dnl Check whether to include native language support (i18n) |
311 | AC_MSG_CHECKING([whether to include NLS support]) | 379 | AC_MSG_CHECKING([whether to include NLS support]) |
312 | AC_ARG_ENABLE(nls, | 380 | AC_ARG_ENABLE([nls], |
313 | AS_HELP_STRING([--enable-nls],[include native language support (default=no)]),,[enable_nls=yes]) | 381 | AS_HELP_STRING([--enable-nls], |
382 | [include native language support (default=no)]), | ||
383 | [], [enable_nls=yes] | ||
384 | ) | ||
314 | AC_MSG_RESULT([$enable_nls]) | 385 | AC_MSG_RESULT([$enable_nls]) |
315 | AS_IF(test "x$enable_nls" = "xyes",[ | 386 | AS_IF([test "x$enable_nls" = "xyes"], [ |
316 | AC_DEFINE(NLS, 1, "Native language support") | 387 | AC_DEFINE([NLS], [1], [Native language support]) |
317 | NLS="-DNLS"],[]) | 388 | NLS="-DNLS" |
318 | AC_SUBST(NLS) | 389 | ], []) |
390 | AC_SUBST([NLS]) | ||
319 | 391 | ||
320 | dnl Check for new timed pixmap cache | 392 | dnl Check for new timed pixmap cache |
321 | AC_MSG_CHECKING([whether to use a timed pixmap cache]) | 393 | AC_MSG_CHECKING([whether to use a timed pixmap cache]) |
322 | AC_ARG_ENABLE(timedcache, | 394 | AC_ARG_ENABLE([timedcache], |
323 | AS_HELP_STRING([--enable-timedcache],[use new timed pixmap cache (default=yes)]),,[enable_timedcache=yes]) | 395 | AS_HELP_STRING([--enable-timedcache], |
396 | [use new timed pixmap cache (default=yes)]), | ||
397 | [], [enable_timedcache=yes] | ||
398 | ) | ||
324 | AC_MSG_RESULT([$enable_timedcache]) | 399 | AC_MSG_RESULT([$enable_timedcache]) |
325 | AS_IF(test "x$enable_timedcached" = "xyes",[ | 400 | AS_IF([test "x$enable_timedcached" = "xyes"], [ |
326 | AC_DEFINE(TIMEDCACHE, 1, "timed cache")],[]) | 401 | AC_DEFINE([TIMEDCACHE], [1], [timed cache]) |
402 | ]) | ||
327 | 403 | ||
404 | dnl Check for UTF-8 support | ||
328 | AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support]) | 405 | AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support]) |
329 | AC_ARG_ENABLE(xmb, AS_HELP_STRING([--enable-xmb],[XMB (multibyte font, utf-8) support (default=yes)]),,[enable_xmb=yes]) | 406 | AC_ARG_ENABLE([xmb], |
407 | AS_HELP_STRING([--enable-xmb], | ||
408 | [XMB (multibyte font, utf-8) support (default=yes)]), | ||
409 | [], [enable_xmb=yes] | ||
410 | ) | ||
330 | AC_MSG_RESULT([$enable_xmb]) | 411 | AC_MSG_RESULT([$enable_xmb]) |
331 | AS_IF([test "x$enable_xmb" = "xyes"],[ AC_DEFINE(USE_XMB, 1, "multibyte support")], []) | 412 | AS_IF([test "x$enable_xmb" = "xyes"], [ |
332 | AM_CONDITIONAL(MULTIBYTE, test "x$enable_xmb" = "xyes") | 413 | AC_DEFINE([USE_XMB], [1], [multibyte support]) |
414 | ]) | ||
415 | AM_CONDITIONAL([MULTIBYTE], [test "x$enable_xmb" = "xyes"]) | ||
333 | 416 | ||
334 | dnl Check for imlib2 | 417 | dnl Check for imlib2 |
335 | have_imlib2=no | 418 | have_imlib2=no |
@@ -349,6 +432,7 @@ PKG_CHECK_MODULES([X11], [ x11 ], | |||
349 | [have_x11=no]) | 432 | [have_x11=no]) |
350 | AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])) | 433 | AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])) |
351 | 434 | ||
435 | dnl Check for X fonts | ||
352 | have_xft=no | 436 | have_xft=no |
353 | AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support])) | 437 | AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support])) |
354 | AS_IF([test "x$enable_xft" != "xno"], [ | 438 | AS_IF([test "x$enable_xft" != "xno"], [ |
@@ -367,6 +451,19 @@ AS_IF([test "$have_xft" = "yes"], [ | |||
367 | PKG_CHECK_MODULES([FONTCONFIG], [ fontconfig ], [], AC_MSG_ERROR([Could not find -lfontconfig.])) | 451 | PKG_CHECK_MODULES([FONTCONFIG], [ fontconfig ], [], AC_MSG_ERROR([Could not find -lfontconfig.])) |
368 | ]) | 452 | ]) |
369 | 453 | ||
454 | dnl Check for freetype | ||
455 | have_freetype2=no | ||
456 | AC_ARG_ENABLE([freetype2], AS_HELP_STRING([--disable-freetype2], [disable freetype2 support])) | ||
457 | AS_IF([test "x$enable_freetype2" != "xno"], [ | ||
458 | PKG_CHECK_MODULES([FREETYPE2], [ freetype2 ], | ||
459 | [AC_DEFINE([HAVE_FREETYPE2], [1], [Define if freetype2 is available]) have_freetype2=yes], [have_freetype2=no]) | ||
460 | AS_IF([test "x$have_freetype2" = xno -a "x$enable_freetype2" = xyes], [ | ||
461 | AC_MSG_ERROR([*** freetype2 support requested but libraries not found]) | ||
462 | ]) | ||
463 | ]) | ||
464 | AM_CONDITIONAL([FREETYPE2], [test "$have_freetype2" = "yes"]) | ||
465 | |||
466 | dnl Check for xrender | ||
370 | have_xrender=no | 467 | have_xrender=no |
371 | AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [disable xrender support])) | 468 | AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [disable xrender support])) |
372 | AS_IF([test "x$enable_xrender" != "xno"], [ | 469 | AS_IF([test "x$enable_xrender" != "xno"], [ |
@@ -378,6 +475,7 @@ AS_IF([test "x$enable_xrender" != "xno"], [ | |||
378 | ]) | 475 | ]) |
379 | AM_CONDITIONAL([XRENDER], [test "$have_xrender" = "yes"]) | 476 | AM_CONDITIONAL([XRENDER], [test "$have_xrender" = "yes"]) |
380 | 477 | ||
478 | dnl Check for xpm | ||
381 | have_xpm=no | 479 | have_xpm=no |
382 | AC_ARG_ENABLE([xpm], AS_HELP_STRING([--disable-xpm], [disable xpm support])) | 480 | AC_ARG_ENABLE([xpm], AS_HELP_STRING([--disable-xpm], [disable xpm support])) |
383 | AS_IF([test "x$enable_xpm" != "xno"], [ | 481 | AS_IF([test "x$enable_xpm" != "xno"], [ |
@@ -425,6 +523,7 @@ AS_IF([test "x$enable_xrandr" != "xno"], [ | |||
425 | ]) | 523 | ]) |
426 | AM_CONDITIONAL([RANDR], [test "$have_xrandr" = "yes"]) | 524 | AM_CONDITIONAL([RANDR], [test "$have_xrandr" = "yes"]) |
427 | 525 | ||
526 | dnl Check for fribidi | ||
428 | have_fribidi=no | 527 | have_fribidi=no |
429 | AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], [disable fribidi support])) | 528 | AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], [disable fribidi support])) |
430 | AS_IF([test "x$enable_fribidi" != "xno"], [ | 529 | AS_IF([test "x$enable_fribidi" != "xno"], [ |
@@ -436,91 +535,79 @@ AS_IF([test "x$enable_fribidi" != "xno"], [ | |||
436 | ]) | 535 | ]) |
437 | AM_CONDITIONAL([FRIBIDI], [test "$have_fribidi" = "yes"]) | 536 | AM_CONDITIONAL([FRIBIDI], [test "$have_fribidi" = "yes"]) |
438 | 537 | ||
439 | have_freetype2=no | 538 | dnl Various resource paths |
440 | AC_ARG_ENABLE([freetype2], AS_HELP_STRING([--disable-freetype2], [disable freetype2 support])) | 539 | AC_ARG_WITH([menu], |
441 | AS_IF([test "x$enable_freetype2" != "xno"], [ | 540 | AS_HELP_STRING([--with-menu=path], [location menu file (PREFIX/share/fluxbox/menu)]), |
442 | PKG_CHECK_MODULES([FREETYPE2], [ freetype2 ], | 541 | [default_menu="$withval"], |
443 | [AC_DEFINE([HAVE_FREETYPE2], [1], [Define if freetype2 is available]) have_freetype2=yes], [have_freetype2=no]) | 542 | [default_menu="$prefix/share/fluxbox/menu"] |
444 | AS_IF([test "x$have_freetype2" = xno -a "x$enable_freetype2" = xyes], [ | ||
445 | AC_MSG_ERROR([*** freetype2 support requested but libraries not found]) | ||
446 | ]) | ||
447 | ]) | ||
448 | AM_CONDITIONAL([FREETYPE2], [test "$have_freetype2" = "yes"]) | ||
449 | |||
450 | |||
451 | AC_ARG_WITH(menu, | ||
452 | AS_HELP_STRING([--with-menu=path],[location menu file (PREFIX/share/fluxbox/menu)]), | ||
453 | DEFAULT_MENU=$with_menu, | ||
454 | DEFAULT_MENU=\$\(prefix\)/share/fluxbox/menu | ||
455 | ) | 543 | ) |
456 | AC_SUBST(DEFAULT_MENU) | 544 | AC_SUBST([DEFAULT_MENU], [$default_menu]) |
457 | 545 | ||
458 | AC_ARG_WITH(windowmenu, | 546 | AC_ARG_WITH([windowmenu], |
459 | AS_HELP_STRING([--with-windowmenu=path],[location windowmenu file (PREFIX/share/fluxbox/windowmenu)]), | 547 | AS_HELP_STRING([--with-windowmenu=path], [location windowmenu file (PREFIX/share/fluxbox/windowmenu)]), |
460 | DEFAULT_WINDOWMENU=$with_windowmenu, | 548 | [default_windowmenu="$withval"], |
461 | DEFAULT_WINDOWMENU=\$\(prefix\)/share/fluxbox/windowmenu | 549 | [default_windowmenu="$prefix/share/fluxbox/windowmenu"] |
462 | ) | 550 | ) |
463 | AC_SUBST(DEFAULT_WINDOWMENU) | 551 | AC_SUBST([DEFAULT_WINDOWMENU], [$default_windowmenu]) |
464 | 552 | ||
465 | AC_ARG_WITH(style, | 553 | AC_ARG_WITH([style], |
466 | AS_HELP_STRING([--with-style=path],[style by default (PREFIX/share/fluxbox/styles/bloe)]), | 554 | AS_HELP_STRING([--with-style=path], [style by default (PREFIX/share/fluxbox/styles/bloe)]), |
467 | DEFAULT_STYLE=$with_style, | 555 | [default_style="$withval"], |
468 | DEFAULT_STYLE=\$\(prefix\)/share/fluxbox/styles/bloe | 556 | [default_style="$prefix/share/fluxbox/styles/bloe"] |
469 | ) | 557 | ) |
470 | AC_SUBST(DEFAULT_STYLE) | 558 | AC_SUBST([DEFAULT_STYLE], [$default_style]) |
471 | 559 | ||
472 | AC_ARG_WITH(keys, | 560 | AC_ARG_WITH([keys], |
473 | AS_HELP_STRING([--with-keys=path],[location keys file (PREFIX/share/fluxbox/keys)]), | 561 | AS_HELP_STRING([--with-keys=path], [location keys file (PREFIX/share/fluxbox/keys)]), |
474 | DEFAULT_KEYS=$with_keys, | 562 | [default_keys="$withval"], |
475 | DEFAULT_KEYS=\$\(prefix\)/share/fluxbox/keys | 563 | [default_keys="$prefix/share/fluxbox/keys"] |
476 | ) | 564 | ) |
477 | AC_SUBST(DEFAULT_KEYS) | 565 | AC_SUBST([DEFAULT_KEYS], [$default_keys]) |
478 | 566 | ||
479 | AC_ARG_WITH(apps, | 567 | AC_ARG_WITH([apps], |
480 | AS_HELP_STRING([--with-apps=path],[location apps file (PREFIX/share/fluxbox/apps)]), | 568 | AS_HELP_STRING([--with-apps=path], [location apps file (PREFIX/share/fluxbox/apps)]), |
481 | DEFAULT_APPS=$with_apps, | 569 | [default_apps="$withval"], |
482 | DEFAULT_APPS=\$\(prefix\)/share/fluxbox/apps | 570 | [default_apps="$prefix/share/fluxbox/apps"] |
483 | ) | 571 | ) |
484 | AC_SUBST(DEFAULT_APPS) | 572 | AC_SUBST([DEFAULT_APPS], [$default_apps]) |
485 | 573 | ||
486 | AC_ARG_WITH(overlay, | 574 | AC_ARG_WITH([overlay], |
487 | AS_HELP_STRING([--with-overlay=path],[location overlay file (PREFIX/share/fluxbox/overlay)]), | 575 | AS_HELP_STRING([--with-overlay=path], [location overlay file (PREFIX/share/fluxbox/overlay)]), |
488 | DEFAULT_OVERLAY=$with_overlay, | 576 | [default_overlay="$withval"], |
489 | DEFAULT_OVERLAY=\$\(prefix\)/share/fluxbox/overlay | 577 | [default_overlay="$prefix/share/fluxbox/overlay"] |
490 | ) | 578 | ) |
491 | AC_SUBST(DEFAULT_OVERLAY) | 579 | AC_SUBST([DEFAULT_OVERLAY], [$default_overlay]) |
492 | 580 | ||
493 | AC_ARG_WITH(init, | 581 | AC_ARG_WITH([init], |
494 | AS_HELP_STRING([--with-init=path],[location init file (PREFIX/share/fluxbox/init)]), | 582 | AS_HELP_STRING([--with-init=path], [location init file (PREFIX/share/fluxbox/init)]), |
495 | DEFAULT_INIT=$with_init, | 583 | [default_init="$withval"], |
496 | DEFAULT_INIT=\$\(prefix\)/share/fluxbox/init | 584 | [default_init="$prefix/share/fluxbox/init"] |
497 | ) | 585 | ) |
498 | AC_SUBST(DEFAULT_INIT) | 586 | AC_SUBST([DEFAULT_INIT], [$default_init]) |
499 | 587 | ||
500 | # we have to expand locale_path in the config.h file, but NOT in the makefiles! | 588 | dnl we have to expand locale_path in the config.h file, but NOT in the |
501 | AC_ARG_WITH(locale, | 589 | dnl makefiles! |
502 | AS_HELP_STRING([--with-locale=path],[location for nls files (PREFIX/share/fluxbox/nls)]), | 590 | AC_ARG_WITH([locale], |
503 | LOCALE_PATH=$with_locale | 591 | AS_HELP_STRING([--with-locale=path], [location for nls files (PREFIX/share/fluxbox/nls)]), [ |
504 | AC_DEFINE_UNQUOTED(LOCALEPATH, "$LOCALE_PATH", "location for nls files") | 592 | locale_path="$withval" |
505 | , | 593 | AC_DEFINE_UNQUOTED([LOCALEPATH], ["$locale_path"], [location for nls files]) |
506 | LOCALE_PATH=\$\(prefix\)/share/fluxbox/nls | 594 | ], [ |
507 | AC_DEFINE_UNQUOTED(LOCALEPATH, "$prefix/share/fluxbox/nls", "location for nls files") | 595 | locale_path="$prefix/share/fluxbox/nls" |
508 | ) | 596 | AC_DEFINE_UNQUOTED([LOCALEPATH], ["$prefix/share/fluxbox/nls"], [location for nls files]) |
509 | AC_SUBST(LOCALE_PATH) | 597 | ]) |
598 | AC_SUBST([LOCALE_PATH], [$locale_path]) | ||
510 | 599 | ||
511 | AC_SUBST(program_prefix) | 600 | AC_SUBST([program_prefix]) |
512 | AC_SUBST(program_suffix) | 601 | AC_SUBST([program_suffix]) |
513 | 602 | ||
514 | dnl Determine the return type of signal handlers | 603 | dnl Determine the return type of signal handlers |
515 | AC_TYPE_SIGNAL | 604 | AC_TYPE_SIGNAL |
516 | 605 | ||
517 | dnl Determine if maintainer portions of the Makefiles should be included. | ||
518 | dnl AM_MAINTAINER_MODE | ||
519 | |||
520 | dnl Output files | 606 | dnl Output files |
521 | AC_CONFIG_HEADER(config.h) | 607 | AC_CONFIG_HEADER([config.h]) |
522 | 608 | ||
523 | AC_OUTPUT(Makefile | 609 | AC_OUTPUT([ |
610 | Makefile | ||
524 | version.h | 611 | version.h |
525 | src/Makefile | 612 | src/Makefile |
526 | src/FbTk/Makefile | 613 | src/FbTk/Makefile |
@@ -586,7 +673,7 @@ nls/uk_UA/Makefile | |||
586 | nls/vi_VN/Makefile | 673 | nls/vi_VN/Makefile |
587 | nls/zh_CN/Makefile | 674 | nls/zh_CN/Makefile |
588 | nls/zh_TW/Makefile | 675 | nls/zh_TW/Makefile |
589 | ) | 676 | ]) |
590 | 677 | ||
591 | dnl Print results | 678 | dnl Print results |
592 | AC_MSG_RESULT([]) | 679 | AC_MSG_RESULT([]) |
@@ -594,11 +681,12 @@ AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) | |||
594 | AC_MSG_RESULT([]) | 681 | AC_MSG_RESULT([]) |
595 | AC_MSG_RESULT([Using:]) | 682 | AC_MSG_RESULT([Using:]) |
596 | AC_MSG_RESULT([ '$prefix' for installation.]) | 683 | AC_MSG_RESULT([ '$prefix' for installation.]) |
597 | AC_MSG_RESULT([ '$DEFAULT_MENU' for location menu file.]) | 684 | AC_MSG_RESULT([ '$default_menu' for location menu file.]) |
598 | AC_MSG_RESULT([ '$DEFAULT_STYLE' by default style.]) | 685 | AC_MSG_RESULT([ '$default_windowmenu' for location window menu file.]) |
599 | AC_MSG_RESULT([ '$DEFAULT_KEYS' for location keys file.]) | 686 | AC_MSG_RESULT([ '$default_style' by default style.]) |
600 | AC_MSG_RESULT([ '$DEFAULT_INIT' for location init file.]) | 687 | AC_MSG_RESULT([ '$default_keys' for location keys file.]) |
601 | AC_MSG_RESULT([ '$LOCALE_PATH' for nls files.]) | 688 | AC_MSG_RESULT([ '$default_init' for location init file.]) |
689 | AC_MSG_RESULT([ '$locale_path' for nls files.]) | ||
602 | AC_MSG_RESULT([ '$CXX' for C++ compiler.]) | 690 | AC_MSG_RESULT([ '$CXX' for C++ compiler.]) |
603 | AC_MSG_RESULT([]) | 691 | AC_MSG_RESULT([]) |
604 | AC_MSG_RESULT([Building with:]) | 692 | AC_MSG_RESULT([Building with:]) |