Source code reorganization:
[disorder] / configure.ac
1 # Process this file with autoconf to produce a configure script.
2 #
3 # This file is part of DisOrder.
4 # Copyright (C) 2004-2008 Richard Kettlewell
5 # Portions copyright (C) 2007 Ross Younger
6 #
7 # This program is free software; you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # This program is distributed in the hope that it will be useful, but
13 # WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 # General Public License for more details.
16 #
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 # USA
21 #
22
23 AC_INIT([disorder], [3.0+], [richard+disorder@sfere.greenend.org.uk])
24 AC_CONFIG_AUX_DIR([config.aux])
25 AM_INIT_AUTOMAKE(disorder, [3.0+])
26 AC_CONFIG_SRCDIR([server/disorderd.c])
27 AM_CONFIG_HEADER([config.h])
28
29 # Find host type
30 AC_CANONICAL_HOST
31
32 # What we want to build
33 want_gtk=yes
34 want_python=yes
35 want_tests=yes
36
37 # APIs we want
38 want_alsa=yes
39 want_oss=yes
40 want_coreaudio=yes
41
42 # Checks for programs.
43 AC_PROG_CC
44 AC_SET_MAKE
45 if test "x$GCC" = xyes; then
46 gcc_werror=-Werror
47 else
48 AC_MSG_ERROR([GNU C is required to build this program])
49 gcc_werror=""
50 fi
51
52 AC_ARG_WITH([alsa],
53 [AS_HELP_STRING([--without-alsa],
54 [do not build with ALSA support])],
55 [want_alsa=$withval])
56 AC_ARG_WITH([oss],
57 [AS_HELP_STRING([--without-oss],
58 [do not build with OSS support])],
59 [want_oss=$withval])
60 AC_ARG_WITH([coreaudio],
61 [AS_HELP_STRING([--without-coreaudio],
62 [do not build with Core Audio support])],
63 [want_coreaudio=$withval])
64 AC_ARG_WITH([tests],
65 [AS_HELP_STRING([--without-tests],
66 [do not build test suit])],
67 [want_tests=$withval])
68
69 AC_MSG_CHECKING([for a known target platform])
70 case "$host" in
71 *empeg* )
72 AC_MSG_RESULT([empeg car stereo])
73 AC_DEFINE([EMPEG_HOST],[1],[define if host is an empeg car stereo])
74 # work around broken toolchain
75 AC_CHECK_LIB([gpg-error], [gpg_strerror])
76 AC_CHECK_LIB([pthread], [pthread_create])
77 want_server=no
78 ;;
79 *linux* | *Linux* )
80 AC_MSG_RESULT([Linux])
81 want_server=yes
82 ;;
83 *-apple-darwin* )
84 AC_MSG_RESULT([Mac OS X])
85 want_server=yes
86 if test $want_coreaudio = yes; then
87 COREAUDIO="-framework CoreAudio"
88 fi
89 browser=open
90 AC_MSG_CHECKING([Mac OS X target version])
91 # We honor MACOSX_DEPLOYMENT_TARGET in the environment, emulating gcc's
92 # behaviour. But we provide a command line option to override it and
93 # we default to wide support instead of supporting only the build platform.
94 #
95 # Currently if you ask for 10.5 you will get a deprecation warning
96 # when building the CoreAudio support code. For the time being the
97 # answer to this is "don't do that then". If a good reason to ask
98 # for a 10.5 deployment target emerges then this will be fixed.
99 if test -z "$MACOSX_DEPLOYMENT_TARGET"; then
100 MACOSX_DEPLOYMENT_TARGET=10.0
101 fi
102 AC_ARG_WITH([deployment-target],
103 [AS_HELP_STRING([--with-deployment-target=TARGET],
104 [set target OS X version])],
105 [MACOSX_DEPLOYMENT_TARGET=$withval])
106 # Convert to desired format
107 underscored=`echo $MACOSX_DEPLOYMENT_TARGET|sed 's/\./_/'`
108 minver="MAC_OS_X_VERSION_$underscored"
109 AC_MSG_RESULT([$minver])
110 AC_DEFINE_UNQUOTED([MAC_OS_X_VERSION_MIN_REQUIRED], [$minver],
111 [define to minimum version of Mac OS X to support])
112 ;;
113 *-freebsd* )
114 AC_MSG_RESULT([FreeBSD])
115 want_server=yes
116 # Ports install to /usr/local but the compiler stupidly doesn't look
117 # there by default
118 LDFLAGS="${LDFLAGS} -L/usr/local/lib"
119 CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include"
120 # Look for a suitable version of libdb among the versions found in FreeBSD 7.0
121 AC_CACHE_CHECK([looking for a libdb install],[rjk_cv_libdb],[
122 rjk_cv_libdb="none"
123 for db in db43 db44 db45 db46; do
124 if test -e /usr/local/lib/$db; then
125 rjk_cv_libdb=$db
126 break
127 fi
128 done
129 ])
130 if test $rjk_cv_libdb != none; then
131 LDFLAGS="${LDFLAGS} -L/usr/local/lib/$rjk_cv_libdb"
132 CPPFLAGS="${CPPFLAGS} -isystem /usr/local/include/$rjk_cv_libdb"
133 fi
134 ;;
135 * )
136 AC_MSG_RESULT([unknown, winging it])
137 want_server=no
138 ;;
139 esac
140 AC_SUBST([COREAUDIO])
141
142 AC_ARG_WITH([browser],
143 [AS_HELP_STRING([--with-browser=BROWSER],
144 [use BROWSER to display HTML])],
145 [browser=$withval])
146
147 AC_CACHE_CHECK([default HTML viewer],[rjk_cv_browser],[
148 rjk_cv_browser=UNKNOWN
149 for candidate in x-www-browser sensible-browser firefox mozilla konqueror netscape; do
150 if type $candidate >/dev/null 2>&1; then
151 rjk_cv_browser="$candidate"
152 break
153 fi
154 done
155 ])
156 if test -z "$browser"; then
157 browser="$rjk_cv_browser"
158 fi
159 AC_DEFINE_UNQUOTED([BROWSER],["$browser"],[HTML viewer])
160
161 AC_ARG_WITH([server],
162 [AS_HELP_STRING([--without-server],
163 [do not build server])],
164 [want_server=$withval])
165 AC_ARG_WITH([gtk],
166 [AS_HELP_STRING([--without-gtk],
167 [do not build GTK+ client])],
168 [want_gtk=$withval])
169 AC_ARG_WITH([python],
170 [AS_HELP_STRING([--without-python],
171 [do not build Python support])],
172 [want_python=$withval])
173
174 subdirs="scripts lib"
175 if test $want_tests = yes; then
176 subdirs="${subdirs} libtests"
177 fi
178 subdirs="${subdirs} clients doc examples debian"
179
180 if test $want_server = yes; then
181 subdirs="${subdirs} server cgi plugins driver templates sounds images"
182 fi
183 if test $want_gtk = yes; then
184 subdirs="${subdirs} disobedience"
185 if test $want_server = no; then
186 subdirs="${subdirs} images"
187 fi
188 fi
189 if test $want_tests = yes && test $want_python = yes; then
190 AM_PATH_PYTHON([2.4])
191 subdirs="${subdirs} python tests"
192 fi
193 AC_SUBST([subdirs])
194
195 # libtool config
196 AC_LIBTOOL_DLOPEN
197 AC_DISABLE_STATIC
198
199 AC_PROG_LIBTOOL
200
201 AC_CACHE_CHECK([for GNU sed],[rjk_cv_gnused],[
202 rjk_cv_gnused="not found"
203 for candidate in sed gsed; do
204 if $candidate --version >/dev/null 2>&1; then
205 rjk_cv_gnused=$candidate
206 fi
207 done
208 ])
209 GNUSED="${GNUSED:-$rjk_cv_gnused}"
210 if test "$GNUSED" = "not found"; then
211 AC_MSG_ERROR([GNU sed is required to build this program])
212 fi
213 AC_SUBST([GNUSED])
214
215 missing_libraries=""
216 missing_headers=""
217 missing_functions=""
218
219 AC_DEFINE(_GNU_SOURCE, 1, [required for e.g. strsignal])
220
221 # Macs might have libraries under fink's root
222 AC_PATH_PROG([FINK],[fink],[none],[$PATH:/sw/bin])
223 if test "x$FINK" != xnone; then
224 AC_CACHE_CHECK([fink install directory],[rjk_cv_finkprefix],[
225 rjk_cv_finkprefix="`echo "$FINK" | sed 's,/bin/fink$,,'`"
226 ])
227 finkdir="${rjk_cv_finkprefix}"
228 finkbindir="${rjk_cv_finkprefix}/bin"
229 CPPFLAGS="${CPPFLAGS} -I${rjk_cv_finkprefix}/include/gc -I${rjk_cv_finkprefix}/include"
230 if test $want_server = yes; then
231 CPPFLAGS="${CPPFLAGS} -I${rjk_cv_finkprefix}/include/db4"
232 fi
233 LDFLAGS="${LDFLAGS} -L${rjk_cv_finkprefix}/lib"
234 else
235 finkbindir=""
236 fi
237 AC_SUBST([finkdir])
238 AC_SUBST([finkbindir])
239
240 # Checks for libraries.
241 # We save up a list of missing libraries that we can't do without
242 # and report them all at once.
243 AC_CHECK_LIB(gc, GC_malloc, [AC_SUBST(LIBGC,[-lgc])],
244 [missing_libraries="$missing_libraries libgc"])
245 AC_CHECK_LIB(gcrypt, gcry_md_open,
246 [AC_SUBST(LIBGCRYPT,[-lgcrypt])],
247 [missing_libraries="$missing_libraries libgcrypt"])
248 AC_CHECK_LIB(pcre, pcre_compile,
249 [AC_SUBST(LIBPCRE,[-lpcre])],
250 [missing_libraries="$missing_libraries libpcre"])
251 if test $want_alsa = yes; then
252 AC_CHECK_LIB([asound], [snd_pcm_open],
253 [AC_SUBST(LIBASOUND,[-lasound])])
254 fi
255 if test $want_server = yes; then
256 RJK_CHECK_LIB(db, db_create, [#include <db.h>],
257 [AC_SUBST(LIBDB,[-ldb])],
258 [missing_libraries="$missing_libraries libdb"])
259 AC_CHECK_LIB(vorbis, vorbis_info_clear,
260 [:],
261 [missing_libraries="$missing_libraries libvorbis"])
262 AC_CHECK_LIB(vorbisfile, ov_open,
263 [AC_SUBST(LIBVORBISFILE,["-lvorbisfile -lvorbis"])],
264 [missing_libraries="$missing_libraries libvorbisfile"],
265 [-lvorbis])
266 AC_CHECK_LIB(mad, mad_stream_init,
267 [AC_SUBST(LIBMAD,[-lmad])],
268 [missing_libraries="$missing_libraries libmad"])
269 AC_CHECK_LIB([ao], [ao_initialize],
270 [AC_SUBST(LIBAO,[-lao])],
271 [missing_libraries="$missing_libraries libao"])
272 AC_CHECK_LIB([FLAC], [FLAC__stream_decoder_new],
273 [AC_SUBST(LIBFLAC,[-lFLAC])],
274 [missing_libraries="$missing_libraries libFLAC"])
275 fi
276 AC_CHECK_LIB([pthread], [pthread_create],
277 [AC_SUBST(LIBPTHREAD,[-lpthread])],
278 [missing_libraries="$missing_libraries libpthread"])
279
280 if test $want_gtk = yes; then
281 AM_PATH_GLIB_2_0([],[],[missing_libraries="$missing_libraries libglib"])
282 AM_PATH_GTK_2_0([],[],[missing_libraries="$missing_libraries libgtk"])
283 fi
284
285 # Some platforms have iconv already
286 AC_CHECK_FUNC(iconv_open, [:],
287 [RJK_CHECK_LIB(iconv, iconv_open, [#include <iconv.h>],
288 [AC_SUBST(LIBICONV,[-liconv])],
289 [missing_functions="$missing_functions iconv_open"])])
290 AC_CHECK_FUNC([gethostbyname],[:],[
291 AC_CHECK_LIB(nsl,gethostbyname,
292 [AC_SUBST(LIBNSL,[-lnsl])],
293 [missing_functions="$missing_functions gethostbyname"])])
294 AC_CHECK_FUNC([socket],[:],[
295 AC_CHECK_LIB(socket,socket,
296 [AC_SUBST(LIBSOCKET,[-lsocket])],
297 [missing_functions="$missing_functions socket"])])
298 AC_CHECK_FUNC([dlopen],[:],[
299 AC_CHECK_LIB(dl,dlopen,
300 [AC_SUBST(LIBDL,[-ldl])],
301 [missing_functions="$missing_functions dlopen"])])
302
303 if test ! -z "$missing_libraries"; then
304 AC_MSG_ERROR([missing libraries:$missing_libraries])
305 fi
306
307 # Checks for header files.
308 RJK_FIND_GC_H
309 if test $want_oss = yes; then
310 AC_CHECK_HEADERS([sys/soundcard.h])
311 fi
312 if test $want_alsa = yes; then
313 AC_CHECK_HEADERS([alsa/asoundlib.h])
314 fi
315 if test $want_coreaudio = yes; then
316 AC_CHECK_HEADERS([CoreAudio/AudioHardware.h])
317 fi
318 AC_CHECK_HEADERS([inttypes.h])
319 # We don't bother checking very standard stuff
320 # Compilation will fail if any of these headers are missing, so we
321 # check for them here and fail early.
322 if test $want_server = yes; then
323 AC_CHECK_HEADERS([db.h],[:],[
324 missing_headers="$missing_headers $ac_header"
325 ])
326 AC_CHECK_HEADERS([FLAC/file_decoder.h])
327 fi
328 AC_CHECK_HEADERS([dlfcn.h gcrypt.h \
329 getopt.h iconv.h langinfo.h \
330 pcre.h sys/ioctl.h \
331 syslog.h unistd.h],[:],[
332 missing_headers="$missing_headers $ac_header"
333 ])
334
335 if test ! -z "$missing_headers"; then
336 AC_MSG_ERROR([missing headers:$missing_headers])
337 fi
338
339 # We require that libpcre support UTF-8
340 RJK_REQUIRE_PCRE_UTF8([-lpcre])
341
342 # Checks for typedefs, structures, and compiler characteristics.
343 AC_C_CONST
344 AC_TYPE_SIZE_T
345 AC_C_INLINE
346 AC_C_BIGENDIAN
347 AC_CHECK_TYPES([struct sockaddr_in6],,,[AC_INCLUDES_DEFAULT
348 #include <netinet/in.h>])
349
350 # enable -Werror when we check for certain characteristics:
351
352 old_CFLAGS="${CFLAGS}"
353 CFLAGS="${CFLAGS} $gcc_werror"
354 AC_CHECK_TYPES([long long,uint32_t,uint8_t,intmax_t,uintmax_t])
355
356 # Some GCC invocations warn for converting function pointers to void *.
357 # This is fair enough, as it's technically forbidden, but we use dlsym()
358 # which can pretty much only exist if object and function pointers are
359 # interconvertable. So we disable -Werror if need be.
360 if test ! -z "$gcc_werror"; then
361 AC_CACHE_CHECK([whether function pointers can be converted to void * without a warning],
362 [rjk_cv_function_pointer_cast],[
363 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
364 void somefunction(void);],
365 [(void *)somefunction])],
366 [rjk_cv_function_pointer_cast=yes],
367 [rjk_cv_function_pointer_cast=no])])
368 if test $rjk_cv_function_pointer_cast = no; then
369 gcc_werror=""
370 fi
371 fi
372
373 CFLAGS="${old_CFLAGS}"
374
375 # gcrypt maintainers keep changing everything. Design your interface
376 # first, then implement it once, rather than getting it wrong three or
377 # four times and shipping between each attempt.
378 AC_CACHE_CHECK([for hash handle type in <grypt.h>],
379 [rjk_cv_gcrypt_hash_handle],[
380 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
381 #include <gcrypt.h>
382 ],
383 [gcry_md_hd_t h;])],
384 [rjk_cv_gcrypt_hash_handle=gcry_md_hd_t],[
385 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
386 #include <gcrypt.h>
387 ],
388 [GcryMDHd h;])],
389 [rjk_cv_gcrypt_hash_handle=GcryMDHd],
390 [rjk_cv_gcrypt_hash_handle=GCRY_MD_HD])])])
391 AC_DEFINE_UNQUOTED([gcrypt_hash_handle],[$rjk_cv_gcrypt_hash_handle],
392 [libgcrypt hash handle type])
393
394 AC_CACHE_CHECK([for gcry_error_t in <grypt.h>],
395 [rjk_cv_have_gcry_error_t],[
396 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
397 #include <gcrypt.h>
398 ],
399 [gcry_error_t e;])],
400 [rjk_cv_have_gcry_error_t=yes],
401 [rjk_cv_have_gcry_error_t=no])])
402 if test $rjk_cv_have_gcry_error_t = yes; then
403 AC_DEFINE([HAVE_GCRY_ERROR_T],1,[define if <gcrypt.h> defines gcry_error_t])
404 fi
405
406 # Checks for functions
407 if test $ac_cv_type_long_long = yes; then
408 AC_CHECK_FUNCS([atoll strtoll],[:],[
409 missing_functions="$missing_functions $ac_func"
410 ])
411 # Darwin sometimes fails to declare strtoll (e.g. if you ask for -std=c99)
412 AC_CACHE_CHECK([whether strtoll is declared in <stdlib.h>],
413 [rjk_cv_strtoll_declared],[
414 AC_EGREP_HEADER([strtoll], [stdlib.h],
415 [rjk_cv_strtoll_declared=yes],
416 [rjk_cv_strtoll_declared=no])])
417 if test $rjk_cv_strtoll_declared = yes; then
418 AC_DEFINE([DECLARES_STRTOLL],[1],[define if <stdlib.h> declares strtoll])
419 fi
420 AC_CACHE_CHECK([whether atoll is declared in <stdlib.h>],
421 [rjk_cv_atoll_declared],[
422 AC_EGREP_HEADER([atoll], [stdlib.h],
423 [rjk_cv_atoll_declared=yes],
424 [rjk_cv_atoll_declared=no])])
425 if test $rjk_cv_atoll_declared = yes; then
426 AC_DEFINE([DECLARES_ATOLL],[1],[define if <stdlib.h> declares atoll])
427 fi
428 fi
429 AC_CHECK_FUNCS([ioctl nl_langinfo strsignal setenv unsetenv],[:],[
430 missing_functions="$missing_functions $ac_func"
431 ])
432 # fsync will do if fdatasync not available
433 AC_CHECK_FUNCS([fdatasync],[:],[
434 AC_CHECK_FUNCS([fsync],
435 [AC_DEFINE([fdatasync],[fsync],[define fdatasync to fsync if not available])],
436 [missing_functions="$missing_functions fdatasync"])])
437 if test ! -z "$missing_functions"; then
438 AC_MSG_ERROR([missing functions:$missing_functions])
439 fi
440
441 # Functions we can take or leave
442 AC_CHECK_FUNCS([fls])
443
444 if test $want_server = yes; then
445 # <db.h> had better be version 3 or later
446 AC_CACHE_CHECK([db.h version],[rjk_cv_db_version],[
447 AC_PREPROC_IFELSE([
448 #include <db.h>
449 #ifndef DB_VERSION_MAJOR
450 # error cannot determine db version
451 #endif
452 #if DB_VERSION_MAJOR < 4
453 # error inadequate db version
454 #endif
455 #if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 2
456 # error inadequate db version
457 #endif
458 ],
459 [rjk_cv_db_version=ok],
460 [rjk_cv_db_version=inadequate])
461 ])
462 if test $rjk_cv_db_version != ok; then
463 AC_MSG_ERROR([need db.h version at least 4.2])
464 fi
465 fi
466
467 AM_CONDITIONAL([SERVER], [test x$want_server = xyes])
468 if test $want_gtk = yes; then
469 AC_DEFINE([WITH_GTK], [1], [define if using GTK+])
470 fi
471
472 if test "x$GCC" = xyes; then
473 # We need LLONG_MAX and annoyingly GCC doesn't always give it to us
474 # by default.
475 AC_CACHE_CHECK([what C version to ask for],[rjk_cv_cstd],[
476 AC_TRY_COMPILE([#include <limits.h>],[
477 long long n = LLONG_MAX;
478 ],[rjk_cv_cstd=default],[
479 old_CC="$CC"
480 CC="${CC} -std=gnu99"
481 AC_TRY_COMPILE([#include <limits.h>],[
482 long long n = LLONG_MAX;
483 ],[rjk_cv_cstd=gnu99],[rjk_cv_cstd=unknown])
484 CC="$old_CC"
485 ])
486 ])
487 case $rjk_cv_cstd in
488 default | unknown )
489 ;;
490 * )
491 CC="${CC} -std=${rjk_cv_cstd}"
492 ;;
493 esac
494
495 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478
496 AC_CACHE_CHECK([checking for GCC bug 29478],[rjk_cv_pr29478],[
497 old_CC="$CC"
498 if test $GCC = yes; then
499 CC="$CC -Wall -Werror"
500 fi
501 AC_COMPILE_IFELSE([
502 static int x(char *f) {
503 return *f;
504 }
505 int z(const char *g) {
506 return x((char *)g);
507 }],
508 [rjk_cv_pr29478=no],
509 [rjk_cv_pr29478=yes]
510 )
511 CC="$old_CC"
512 ])
513 if test $rjk_cv_pr29478 = yes; then
514 gcc_werror=''
515 fi
516
517 # a reasonable default set of warnings
518 CC="${CC} -Wall -W -Wpointer-arith -Wbad-function-cast \
519 -Wwrite-strings -Wmissing-prototypes \
520 -Wmissing-declarations -Wnested-externs"
521
522 # Fix up GTK+ and GLib compiler flags
523 GTK_CFLAGS="`echo \"$GTK_CFLAGS\"|sed 's/-I/-isystem /g'`"
524 GLIB_CFLAGS="`echo \"$GLIB_CFLAGS\"|sed 's/-I/-isystem /g'`"
525
526 if test "$gcc_werror" != ''; then
527 # GCC 2.95 doesn't know to ignore warnings from system headers
528 AC_CACHE_CHECK([whether -Werror is usable],
529 rjk_cv_werror, [
530 save_CFLAGS="${CFLAGS}"
531 CFLAGS="${CFLAGS} ${GTK_CFLAGS} -Werror"
532 AC_TRY_COMPILE([#if WITH_GTK
533 #include <gtk/gtk.h>
534 #endif
535
536 struct s { int a, b; };
537 const struct s sv = { .a = 1 };],
538 [],
539 [rjk_cv_werror=yes],
540 [rjk_cv_werror=no])
541 CFLAGS="${save_CFLAGS}"
542 ])
543 if test $rjk_cv_werror = no; then
544 gcc_werror=''
545 fi
546 fi
547 CC="${CC} $gcc_werror"
548
549 # for older GCCs that don't know %ju (etc)
550 AC_CACHE_CHECK([whether -Wno-format is required],
551 rjk_cv_noformat,
552 AC_TRY_COMPILE([#include <stdio.h>
553 #include <stdint.h>
554 ],
555 [printf("%ju", (uintmax_t)0);],
556 [rjk_cv_noformat=no],
557 [rjk_cv_noformat=yes]))
558 if test $rjk_cv_noformat = yes; then
559 CC="${CC} -Wno-format"
560 fi
561
562 AC_CACHE_CHECK([whether -Wshadow is OK],
563 rjk_cv_shadow,
564 oldCC="${CC}"
565 CC="${CC} -Wshadow"
566 [AC_TRY_COMPILE([
567 #include <unistd.h>
568 #include <vorbis/vorbisfile.h>
569 ],
570 [],
571 [rjk_cv_shadow=yes],
572 [rjk_cv_shadow=no])
573 CC="${oldCC}"])
574 if test $rjk_cv_shadow = yes; then
575 CC="${CC} -Wshadow"
576 fi
577 fi
578
579 RJK_GCOV
580
581 AH_BOTTOM([#ifdef __GNUC__
582 # define attribute(x) __attribute__(x)
583 #else
584 # define attribute(x)
585 #endif])
586
587 AC_CONFIG_FILES([Makefile
588 images/Makefile
589 scripts/Makefile
590 lib/Makefile
591 server/Makefile
592 cgi/Makefile
593 clients/Makefile
594 disobedience/Makefile
595 doc/Makefile
596 templates/Makefile
597 plugins/Makefile
598 driver/Makefile
599 debian/Makefile
600 sounds/Makefile
601 python/Makefile
602 examples/Makefile
603 libtests/Makefile
604 tests/Makefile])
605 AC_OUTPUT
606
607 if test $GCC = yes && test "$gcc_werror" = ''; then
608 AC_MSG_WARN([building without -Werror])
609 fi
610 if test $want_python = no; then
611 AC_MSG_WARN([cannot run the test suit without Python])
612 fi