aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2013-02-15 23:12:13 (GMT)
committerSami Kerola <kerolasa@iki.fi>2013-05-26 09:38:11 (GMT)
commitbc205a9b323ed7211dbc158429abaa32a821a794 (patch)
treef6d93a76170747570b19f7e294e797f07c234d5b /configure.ac
parent74c414a89f0b32f177b2d05443e5e218a04c9459 (diff)
downloadfluxbox-bc205a9b323ed7211dbc158429abaa32a821a794.zip
fluxbox-bc205a9b323ed7211dbc158429abaa32a821a794.tar.bz2
build-sys: unify configure.ac syntax
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac548
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 @@
1dnl Initialize autoconf and automake 1dnl Initialize autoconf and automake
2AC_PREREQ(2.52) 2AC_PREREQ([2.52])
3AC_INIT([fluxbox], 3AC_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/])
7AC_CONFIG_SRCDIR([src/fluxbox.cc]) 7AC_CONFIG_SRCDIR([src/fluxbox.cc])
8AC_CONFIG_AUX_DIR([build-aux]) 8AC_CONFIG_AUX_DIR([build-aux])
@@ -11,11 +11,7 @@ AC_USE_SYSTEM_EXTENSIONS
11AM_INIT_AUTOMAKE([foreign 1.10 tar-pax dist-bzip2 subdir-objects]) 11AM_INIT_AUTOMAKE([foreign 1.10 tar-pax dist-bzip2 subdir-objects])
12 12
13dnl Determine default prefix 13dnl Determine default prefix
14AS_IF(test "x$prefix" = "xNONE",[prefix="$ac_default_prefix"]) 14AS_IF([test "x$prefix" = "xNONE"], [prefix="$ac_default_prefix"])
15
16dnl Check for various flavors of UNIX(r)
17dnl AC_AIX
18dnl AC_ISC_POSIX
19 15
20AC_LANG_CPLUSPLUS 16AC_LANG_CPLUSPLUS
21 17
@@ -30,38 +26,70 @@ AC_C_INLINE
30 26
31AC_TYPE_PID_T 27AC_TYPE_PID_T
32AC_TYPE_SIZE_T 28AC_TYPE_SIZE_T
29AC_STRUCT_TM
33 30
31dnl Require pkg-config
34m4_ifndef([PKG_PROG_PKG_CONFIG], 32m4_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
36located in /usr/share/aclocal/pkg.m4. If your macros are in a different 34located in /usr/share/aclocal/pkg.m4. If your macros are in a different
37location, try setting the environment variable 35location, try setting the environment variable
38export ACLOCAL_FLAGS="-I/other/macro/dir" 36export ACLOCAL_FLAGS="-I/other/macro/dir"
39before running ./autogen.sh or autoreconf again.])]) 37before running ./autogen.sh or autoreconf again.])
38])
40PKG_PROG_PKG_CONFIG 39PKG_PROG_PKG_CONFIG
41 40
42AC_CHECK_PROGS(regex_cmd, sed) 41dnl Check for sed
43AS_IF(test "x$regex_cmd" = "x",[AC_MSG_ERROR([error. sed is required to build the data files.])]) 42AC_CHECK_PROGS([regex_cmd], [sed])
43AS_IF([test "x$regex_cmd" = "x"], [
44 AC_MSG_ERROR([error. sed is required to build the data files.])
45])
44 46
45dnl Check for system header files 47dnl Check for system header files
46AC_HEADER_STDC 48AC_HEADER_STDC
47AC_HEADER_STDBOOL 49AC_HEADER_STDBOOL
48AC_CHECK_HEADERS(errno.h ctype.h dirent.h fcntl.h libgen.h \ 50AC_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 \
57AC_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 \
63AC_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])
76AC_CHECK_HEADERS([ \
77 cassert \
78 cctype \
79 cerrno \
80 cmath \
81 cstdarg \
82 cstdint \
83 cstdio \
84 cstdlib \
85 cstring \
86 ctime \
87])
88AC_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
66dnl Check for existance of basename(), setlocale() and strftime() 94dnl Check for existance of basename(), setlocale() and strftime()
67AC_FUNC_CLOSEDIR_VOID 95AC_FUNC_CLOSEDIR_VOID
@@ -72,10 +100,34 @@ AC_FUNC_REALLOC
72AC_FUNC_SELECT_ARGTYPES 100AC_FUNC_SELECT_ARGTYPES
73AC_FUNC_STAT 101AC_FUNC_STAT
74 102
75AC_CHECK_FUNCS(basename, , AC_CHECK_LIB(gen, basename, LIBS="-lgen $LIBS")) 103AC_CHECK_FUNCS([basename], [], [
76AC_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) 106AC_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
81dnl Windows requires the mingw-catgets library for the catgets function. 133dnl 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
86dnl breaks with: 138dnl breaks with:
87dnl test.cc:1: error: nonnull argument with out-of-range operand number 139dnl test.cc:1: error: nonnull argument with out-of-range operand number
88dnl (arg 1, operand 3) 140dnl (arg 1, operand 3)
141AC_MSG_CHECKING([for strftime])
142
143AC_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 156AC_MSG_CHECKING([for clock_gettime])
91AC_MSG_CHECKING(for strftime) 157AC_COMPILE_IFELSE([
92 158 AC_LANG_PROGRAM([#include <time.h>], [[
93AC_COMPILE_IFELSE( 159 clock_gettime(CLOCK_MONOTONIC, 0);
94[AC_LANG_PROGRAM([#include <time.h>], 160 return 0;
95[[ 161 ]])
96char * s; 162], [
97time_t t = time(NULL); 163 AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define to 1 if you have the 'clock_gettime' function.])
98size_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
108AC_MSG_CHECKING(for clock_gettime)
109AC_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
128AC_MSG_CHECKING(for mach_absolute_time)
129AC_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
171AC_MSG_CHECKING([for mach_absolute_time])
172AC_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
150AC_STRUCT_TM
151 185
152dnl --------------- 186dnl ---------------
153dnl CHECK FOR ICONV 187dnl CHECK FOR ICONV
@@ -211,125 +245,174 @@ dnl Check if iconv uses const in prototype declaration
211 fi 245 fi
212fi 246fi
213 247
214AC_CHECK_LIB(nsl, t_open, LIBS="-lnsl $LIBS") 248dnl Check for networking libraries
215AC_CHECK_LIB(socket, socket, LIBS="-lsocket $LIBS") 249AC_CHECK_LIB([nsl], [t_open], [LIBS="-lnsl $LIBS"])
250AC_CHECK_LIB([socket], [socket], [LIBS="-lsocket $LIBS"])
216 251
217dnl Check for X headers and libraries 252dnl Check for X headers and libraries
218AC_PATH_X 253AC_PATH_X
219AC_PATH_XTRA 254AC_PATH_XTRA
255AS_IF([test x$no_x = "xyes"], [
256 AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.])
257])
220 258
221test x$no_x = "xyes" && AC_MSG_ERROR([Fluxbox requires the X Window System libraries and headers.])
222
223AS_IF(test "x$x_includes" = "x",[x_includes="/usr/include"])
224AS_IF(test "x$x_libraries" = "x",[x_libraries="/usr/lib"])
225
226CFLAGS="$CFLAGS $X_CFLAGS"
227CXXFLAGS="$CXXFLAGS $X_CFLAGS"
228LIBS="$X_LIBS $LIBS" 259LIBS="$X_LIBS $LIBS"
229LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
230 260
231dnl Check for xpg4 261dnl Check for xpg4
232AC_CHECK_LIB(xpg4, setlocale, LIBS="-lxpg4 $LIBS") 262AC_CHECK_LIB([xpg4], [setlocale], [LIBS="-lxpg4 $LIBS"])
233AC_CHECK_PROGS(gencat_cmd, gencat) 263AC_CHECK_PROGS([gencat_cmd], [gencat])
234AS_IF(test "x$gencat_cmd" = "x",[NLS=""],[]) 264AS_IF([test "x$gencat_cmd" = "x"], [NLS=""], [])
235
236Xext_lib=""
237 265
238dnl Check for Remember options 266dnl Check for Remember options
239AC_MSG_CHECKING([whether to include remember functionality]) 267AC_MSG_CHECKING([whether to include remember functionality])
240AC_ARG_ENABLE(remember, 268AC_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)
242AC_MSG_RESULT([$enable_remember]) 273AC_MSG_RESULT([$enable_remember])
243AS_IF(test "x$enable_remember" = "xyes",[AC_DEFINE(REMEMBER, 1, " compile with remember")],[]) 274AS_IF([test "x$enable_remember" = "xyes"], [
244AM_CONDITIONAL(REMEMBER_SRC, test "x$enable_remember" = "xyes") 275 AC_DEFINE([REMEMBER], [1], [compile with remember])
276])
277AM_CONDITIONAL([REMEMBER_SRC], [test "x$enable_remember" = "xyes"])
245 278
279dnl Check for regular expressions
246AC_MSG_CHECKING([whether to have (POSIX) regular expression support]) 280AC_MSG_CHECKING([whether to have (POSIX) regular expression support])
247AC_ARG_ENABLE(regexp, 281AC_ARG_ENABLE([regexp],
248 AS_HELP_STRING([--enable-regexp],[regular expression support (default=yes)]),,[enable_regexp=yes]) 282 AS_HELP_STRING([--enable-regexp],
249AS_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]) 286AS_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
257AM_CONDITIONAL(REGEXP_SRC, test x$REGEXP_SRC = xtrue) 291 ], [
292 AC_MSG_RESULT([no])
293 REGEXP_SRC=false
294 ])
295])
296AM_CONDITIONAL([REGEXP_SRC], [test x$REGEXP_SRC = xtrue])
258 297
259dnl Check for the Slit 298dnl Check for the Slit
260AC_MSG_CHECKING([whether to include the Slit]) 299AC_MSG_CHECKING([whether to include the Slit])
261AC_ARG_ENABLE(slit, 300AC_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)
263AC_MSG_RESULT([$enable_slit]) 305AC_MSG_RESULT([$enable_slit])
264AS_IF(test "x$enable_slit" = "xyes",[AC_DEFINE(USE_SLIT, 1, " compile with slit")],[]) 306AS_IF([test "x$enable_slit" = "xyes"], [
265AM_CONDITIONAL(SLIT_SRC, test "x$enable_slit" = "xyes") 307 AC_DEFINE([USE_SLIT], [1], [compile with slit])
308])
309AM_CONDITIONAL([SLIT_SRC], [test "x$enable_slit" = "xyes"])
266 310
267dnl Check for Systemtray options 311dnl Check for Systemtray options
268AC_MSG_CHECKING([whether to include SystemTray]) 312AC_MSG_CHECKING([whether to include SystemTray])
269AC_ARG_ENABLE(systray, 313AC_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)
271AC_MSG_RESULT([$enable_systray]) 318AC_MSG_RESULT([$enable_systray])
272AS_IF(test "x$enable_systray" = "xyes",[AC_DEFINE(USE_SYSTRAY, 1, " compile with systemtray")],[]) 319AS_IF([test "x$enable_systray" = "xyes"], [
273AM_CONDITIONAL(SYSTRAY_SRC, test "x$enable_systray" = "xyes") 320 AC_DEFINE([USE_SYSTRAY], [1], [compile with systemtray])
321])
322AM_CONDITIONAL([SYSTRAY_SRC], [test "x$enable_systray" = "xyes"])
274 323
275dnl Check for Toolbar options 324dnl Check for Toolbar options
276AC_MSG_CHECKING([whether to include Toolbaddr]) 325AC_MSG_CHECKING([whether to include Toolbaddr])
277AC_ARG_ENABLE(toolbar, 326AC_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)
279AC_MSG_RESULT([$enable_toolbar]) 331AC_MSG_RESULT([$enable_toolbar])
280AS_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")],[])
283AS_IF(test "x$enable_toolbar" = "xyes",[AC_DEFINE(USE_TOOLBAR, 1, " compile with toolbar")],[])
284AM_CONDITIONAL(TOOLBAR_SRC, test "x$enable_toolbar" = "xyes")
285 332
333AS_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])
337AS_IF([test "x$enable_toolbar" = "xyes"], [
338 AC_DEFINE([USE_TOOLBAR], [1], [compile with toolbar])
339])
340AM_CONDITIONAL([TOOLBAR_SRC], [test "x$enable_toolbar" = "xyes"])
341
342dnl Extended Window Manager Hints
286AC_MSG_CHECKING([whether to support Extended Window Manager Hints]) 343AC_MSG_CHECKING([whether to support Extended Window Manager Hints])
287AC_ARG_ENABLE(ewmh, 344AC_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)
289AC_MSG_RESULT([$enable_ewmh]) 349AC_MSG_RESULT([$enable_ewmh])
290AS_IF(test "x$enable_ewmh" = "xyes",[AC_DEFINE(USE_EWMH, 1, "use extened window manager hints")],[]) 350AS_IF([test "x$enable_ewmh" = "xyes"], [
291AM_CONDITIONAL(EWMH, test "x$enable_ewmh" = "xyes") 351 AC_DEFINE([USE_EWMH], [1], [use extened window manager hints])
352])
353AM_CONDITIONAL([EWMH], [test "x$enable_ewmh" = "xyes"])
292 354
293dnl Check whether to include debugging code 355dnl Check whether to include debugging code
294DEBUG="" 356DEBUG=""
295AC_MSG_CHECKING([whether to include verbose debugging code]) 357AC_MSG_CHECKING([whether to include verbose debugging code])
296AC_ARG_ENABLE(debug, 358AC_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)
298AC_MSG_RESULT([$enable_debug]) 363AC_MSG_RESULT([$enable_debug])
299AS_IF(test "x$enable_debug" = "xyes",[ DEBUG="-DDEBUG -Wall" ],[]) 364AS_IF([test "x$enable_debug" = "xyes"], [DEBUG="-DDEBUG -Wall"])
300AC_SUBST(DEBUG) 365AC_SUBST([DEBUG])
301CXXFLAGS="$CXXFLAGS $DEBUG" 366CXXFLAGS="$CXXFLAGS $DEBUG"
302 367
303dnl Check whether to build test programs 368dnl Check whether to build test programs
304AC_MSG_CHECKING([whether to build test programs]) 369AC_MSG_CHECKING([whether to build test programs])
305AC_ARG_ENABLE(test, 370AC_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)
307AC_MSG_RESULT([$enable_test]) 375AC_MSG_RESULT([$enable_test])
308AM_CONDITIONAL(TEST, test "x$enable_test" = "xyes") 376AM_CONDITIONAL([TEST], [test "x$enable_test" = "xyes"])
309 377
310dnl Check whether to include native language support (i18n) 378dnl Check whether to include native language support (i18n)
311AC_MSG_CHECKING([whether to include NLS support]) 379AC_MSG_CHECKING([whether to include NLS support])
312AC_ARG_ENABLE(nls, 380AC_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)
314AC_MSG_RESULT([$enable_nls]) 385AC_MSG_RESULT([$enable_nls])
315AS_IF(test "x$enable_nls" = "xyes",[ 386AS_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"
318AC_SUBST(NLS) 389], [])
390AC_SUBST([NLS])
319 391
320dnl Check for new timed pixmap cache 392dnl Check for new timed pixmap cache
321AC_MSG_CHECKING([whether to use a timed pixmap cache]) 393AC_MSG_CHECKING([whether to use a timed pixmap cache])
322AC_ARG_ENABLE(timedcache, 394AC_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)
324AC_MSG_RESULT([$enable_timedcache]) 399AC_MSG_RESULT([$enable_timedcache])
325AS_IF(test "x$enable_timedcached" = "xyes",[ 400AS_IF([test "x$enable_timedcached" = "xyes"], [
326 AC_DEFINE(TIMEDCACHE, 1, "timed cache")],[]) 401 AC_DEFINE([TIMEDCACHE], [1], [timed cache])
402])
327 403
404dnl Check for UTF-8 support
328AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support]) 405AC_MSG_CHECKING([whether to have XMB (multibyte font, utf-8) support])
329AC_ARG_ENABLE(xmb, AS_HELP_STRING([--enable-xmb],[XMB (multibyte font, utf-8) support (default=yes)]),,[enable_xmb=yes]) 406AC_ARG_ENABLE([xmb],
407 AS_HELP_STRING([--enable-xmb],
408 [XMB (multibyte font, utf-8) support (default=yes)]),
409 [], [enable_xmb=yes]
410)
330AC_MSG_RESULT([$enable_xmb]) 411AC_MSG_RESULT([$enable_xmb])
331AS_IF([test "x$enable_xmb" = "xyes"],[ AC_DEFINE(USE_XMB, 1, "multibyte support")], []) 412AS_IF([test "x$enable_xmb" = "xyes"], [
332AM_CONDITIONAL(MULTIBYTE, test "x$enable_xmb" = "xyes") 413 AC_DEFINE([USE_XMB], [1], [multibyte support])
414])
415AM_CONDITIONAL([MULTIBYTE], [test "x$enable_xmb" = "xyes"])
333 416
334dnl Check for imlib2 417dnl Check for imlib2
335have_imlib2=no 418have_imlib2=no
@@ -349,6 +432,7 @@ PKG_CHECK_MODULES([X11], [ x11 ],
349 [have_x11=no]) 432 [have_x11=no])
350AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.])) 433AM_CONDITIONAL([X11], [test "$have_x11" = "yes"], AC_MSG_ERROR([Could not find XOpenDisplay in -lX11.]))
351 434
435dnl Check for X fonts
352have_xft=no 436have_xft=no
353AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support])) 437AC_ARG_ENABLE([xft], AS_HELP_STRING([--disable-xft], [disable xft support]))
354AS_IF([test "x$enable_xft" != "xno"], [ 438AS_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
454dnl Check for freetype
455have_freetype2=no
456AC_ARG_ENABLE([freetype2], AS_HELP_STRING([--disable-freetype2], [disable freetype2 support]))
457AS_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])
464AM_CONDITIONAL([FREETYPE2], [test "$have_freetype2" = "yes"])
465
466dnl Check for xrender
370have_xrender=no 467have_xrender=no
371AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [disable xrender support])) 468AC_ARG_ENABLE([xrender], AS_HELP_STRING([--disable-xrender], [disable xrender support]))
372AS_IF([test "x$enable_xrender" != "xno"], [ 469AS_IF([test "x$enable_xrender" != "xno"], [
@@ -378,6 +475,7 @@ AS_IF([test "x$enable_xrender" != "xno"], [
378]) 475])
379AM_CONDITIONAL([XRENDER], [test "$have_xrender" = "yes"]) 476AM_CONDITIONAL([XRENDER], [test "$have_xrender" = "yes"])
380 477
478dnl Check for xpm
381have_xpm=no 479have_xpm=no
382AC_ARG_ENABLE([xpm], AS_HELP_STRING([--disable-xpm], [disable xpm support])) 480AC_ARG_ENABLE([xpm], AS_HELP_STRING([--disable-xpm], [disable xpm support]))
383AS_IF([test "x$enable_xpm" != "xno"], [ 481AS_IF([test "x$enable_xpm" != "xno"], [
@@ -425,6 +523,7 @@ AS_IF([test "x$enable_xrandr" != "xno"], [
425]) 523])
426AM_CONDITIONAL([RANDR], [test "$have_xrandr" = "yes"]) 524AM_CONDITIONAL([RANDR], [test "$have_xrandr" = "yes"])
427 525
526dnl Check for fribidi
428have_fribidi=no 527have_fribidi=no
429AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], [disable fribidi support])) 528AC_ARG_ENABLE([fribidi], AS_HELP_STRING([--disable-fribidi], [disable fribidi support]))
430AS_IF([test "x$enable_fribidi" != "xno"], [ 529AS_IF([test "x$enable_fribidi" != "xno"], [
@@ -436,91 +535,79 @@ AS_IF([test "x$enable_fribidi" != "xno"], [
436]) 535])
437AM_CONDITIONAL([FRIBIDI], [test "$have_fribidi" = "yes"]) 536AM_CONDITIONAL([FRIBIDI], [test "$have_fribidi" = "yes"])
438 537
439have_freetype2=no 538dnl Various resource paths
440AC_ARG_ENABLE([freetype2], AS_HELP_STRING([--disable-freetype2], [disable freetype2 support])) 539AC_ARG_WITH([menu],
441AS_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])
448AM_CONDITIONAL([FREETYPE2], [test "$have_freetype2" = "yes"])
449
450
451AC_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)
456AC_SUBST(DEFAULT_MENU) 544AC_SUBST([DEFAULT_MENU], [$default_menu])
457 545
458AC_ARG_WITH(windowmenu, 546AC_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)
463AC_SUBST(DEFAULT_WINDOWMENU) 551AC_SUBST([DEFAULT_WINDOWMENU], [$default_windowmenu])
464 552
465AC_ARG_WITH(style, 553AC_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)
470AC_SUBST(DEFAULT_STYLE) 558AC_SUBST([DEFAULT_STYLE], [$default_style])
471 559
472AC_ARG_WITH(keys, 560AC_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)
477AC_SUBST(DEFAULT_KEYS) 565AC_SUBST([DEFAULT_KEYS], [$default_keys])
478 566
479AC_ARG_WITH(apps, 567AC_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)
484AC_SUBST(DEFAULT_APPS) 572AC_SUBST([DEFAULT_APPS], [$default_apps])
485 573
486AC_ARG_WITH(overlay, 574AC_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)
491AC_SUBST(DEFAULT_OVERLAY) 579AC_SUBST([DEFAULT_OVERLAY], [$default_overlay])
492 580
493AC_ARG_WITH(init, 581AC_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)
498AC_SUBST(DEFAULT_INIT) 586AC_SUBST([DEFAULT_INIT], [$default_init])
499 587
500# we have to expand locale_path in the config.h file, but NOT in the makefiles! 588dnl we have to expand locale_path in the config.h file, but NOT in the
501AC_ARG_WITH(locale, 589dnl makefiles!
502 AS_HELP_STRING([--with-locale=path],[location for nls files (PREFIX/share/fluxbox/nls)]), 590AC_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])
509AC_SUBST(LOCALE_PATH) 597])
598AC_SUBST([LOCALE_PATH], [$locale_path])
510 599
511AC_SUBST(program_prefix) 600AC_SUBST([program_prefix])
512AC_SUBST(program_suffix) 601AC_SUBST([program_suffix])
513 602
514dnl Determine the return type of signal handlers 603dnl Determine the return type of signal handlers
515AC_TYPE_SIGNAL 604AC_TYPE_SIGNAL
516 605
517dnl Determine if maintainer portions of the Makefiles should be included.
518dnl AM_MAINTAINER_MODE
519
520dnl Output files 606dnl Output files
521AC_CONFIG_HEADER(config.h) 607AC_CONFIG_HEADER([config.h])
522 608
523AC_OUTPUT(Makefile 609AC_OUTPUT([
610Makefile
524version.h 611version.h
525src/Makefile 612src/Makefile
526src/FbTk/Makefile 613src/FbTk/Makefile
@@ -586,7 +673,7 @@ nls/uk_UA/Makefile
586nls/vi_VN/Makefile 673nls/vi_VN/Makefile
587nls/zh_CN/Makefile 674nls/zh_CN/Makefile
588nls/zh_TW/Makefile 675nls/zh_TW/Makefile
589) 676])
590 677
591dnl Print results 678dnl Print results
592AC_MSG_RESULT([]) 679AC_MSG_RESULT([])
@@ -594,11 +681,12 @@ AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.])
594AC_MSG_RESULT([]) 681AC_MSG_RESULT([])
595AC_MSG_RESULT([Using:]) 682AC_MSG_RESULT([Using:])
596AC_MSG_RESULT([ '$prefix' for installation.]) 683AC_MSG_RESULT([ '$prefix' for installation.])
597AC_MSG_RESULT([ '$DEFAULT_MENU' for location menu file.]) 684AC_MSG_RESULT([ '$default_menu' for location menu file.])
598AC_MSG_RESULT([ '$DEFAULT_STYLE' by default style.]) 685AC_MSG_RESULT([ '$default_windowmenu' for location window menu file.])
599AC_MSG_RESULT([ '$DEFAULT_KEYS' for location keys file.]) 686AC_MSG_RESULT([ '$default_style' by default style.])
600AC_MSG_RESULT([ '$DEFAULT_INIT' for location init file.]) 687AC_MSG_RESULT([ '$default_keys' for location keys file.])
601AC_MSG_RESULT([ '$LOCALE_PATH' for nls files.]) 688AC_MSG_RESULT([ '$default_init' for location init file.])
689AC_MSG_RESULT([ '$locale_path' for nls files.])
602AC_MSG_RESULT([ '$CXX' for C++ compiler.]) 690AC_MSG_RESULT([ '$CXX' for C++ compiler.])
603AC_MSG_RESULT([]) 691AC_MSG_RESULT([])
604AC_MSG_RESULT([Building with:]) 692AC_MSG_RESULT([Building with:])