1
# generated automatically by aclocal 1.7.4 -*- Autoconf -*-
3
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4
# Free Software Foundation, Inc.
5
# This file is free software; the Free Software Foundation
6
# gives unlimited permission to copy and/or distribute it,
7
# with or without modifications, as long as this notice is preserved.
9
# This program is distributed in the hope that it will be useful,
10
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14
dnl ======================================
15
dnl GGZ Gaming Zone - Configuration Macros
16
dnl ======================================
18
dnl Copyright (C) 2001, 2002 Josef Spillner, dr_maux@users.sourceforge.net
19
dnl This file has heavily been inspired by KDE's acinclude :)
20
dnl It is published under the conditions of the GNU General Public License.
22
dnl ======================================
24
dnl This file is common to most GGZ modules, and should be kept in sync
25
dnl between them all. Currently the following modules use it:
26
dnl kde-games, kde-client, gtk-games, gtk-client, utils, grubby,
27
dnl ggz-client-libs, ggzd, gnome-client, txt-client.
28
dnl See /docs/ggz-project/buildsystem for documentation.
30
dnl ======================================
33
dnl 2001-05-??: first version to find easysock and ggzcore
34
dnl 2001-09-09: include libggz[d]mod support, and rename ac_find_file
35
dnl 2001-11-05: backport from copenhagen, and more macros
36
dnl 2001-12-16: updated for new ggzmod, imported to gtk-games and gtk-client
37
dnl 2002-01-12: include libggz support; imported to ggz-client-libs and ggzd
38
dnl 2002-01-18: remove easysock functions; look in prefix dirs for
40
dnl 2002-08-20: change -I<directory> to -isystem<directory> to avoid
42
dnl 2002-09-25: added AC_GGZ_ERROR, AC_GGZ_REMOVEDUPS, AC_GGZ_INIT, allowing
43
dnl for more control over what is going to happen
44
dnl 2002-10-12: added action-if-found and action-if-not-found parameters to
45
dnl all primary macros
47
dnl ------------------------------------------------------------------------
48
dnl Content of this file:
49
dnl ------------------------------------------------------------------------
50
dnl AC_GGZ_LIBGGZ - find the libggz headers and libraries
51
dnl AC_GGZ_GGZCORE - find the ggzcore headers and libraries
52
dnl AC_GGZ_CONFIG - find the ggz-config tool and set up configuration
53
dnl AC_GGZ_GGZMOD - find the ggzmod library
54
dnl AC_GGZ_GGZDMOD - find the ggzdmod library
55
dnl AC_GGZ_SERVER - set up game and room path for ggzd game servers
56
dnl AC_GGZ_INTL - ensure proper i18n tools installation
58
dnl Each macro takes two arguments:
59
dnl 1. Action-if-found (or empty for no action).
60
dnl 2. Action-if-not-found (or empty for error, or "ignore" to ignore).
61
dnl ------------------------------------------------------------------------
62
dnl Internal functions:
63
dnl ------------------------------------------------------------------------
64
dnl AC_GGZ_INIT - initialization
65
dnl AC_GGZ_ERROR - user-friendly error messages
66
dnl AC_GGZ_FIND_FILE - macro for convenience (thanks kde)
67
dnl AC_GGZ_REMOVEDUPS - eliminate duplicate list elements
70
dnl ------------------------------------------------------------------------
71
dnl Find a directory containing a single file
72
dnl Synopsis: AC_GGZ_FIND_FILE(file, directorylist, <returnvar>)
73
dnl ------------------------------------------------------------------------
75
AC_DEFUN(AC_GGZ_FIND_FILE,
82
echo "configure: __oline__: $i/$j" >&AC_FD_CC
83
if test -r "$i/$j"; then
84
echo "taking that" >&AC_FD_CC
92
dnl ------------------------------------------------------------------------
93
dnl Remove duplicate entries in a list, and remove all NO's
94
dnl Synopsis: AC_GGZ_REMOVEDUPS(list, <returnlist>)
95
dnl ------------------------------------------------------------------------
97
AC_DEFUN(AC_GGZ_REMOVEDUPS,
103
if test "x$i" = "x$j"; then
107
if test "x$i" = "xNO"; then
110
if test "x$add" = "xyes"; then
117
dnl ------------------------------------------------------------------------
118
dnl User-friendly error messages
119
dnl Synopsis: AC_GGZ_ERROR(libraryname, headerdirlist, libdirlist)
120
dnl ------------------------------------------------------------------------
122
AC_DEFUN(AC_GGZ_ERROR,
125
The library '$1' does not seem to be installed correctly.
126
Headers searched in: $2
127
Libraries searched in: $3
128
Please read QuickStart.GGZ in order to fix this.
133
dnl ------------------------------------------------------------------------
134
dnl Initialization, common values and such
135
dnl Synopsis: AC_GGZ_INIT([export], [defaults])
136
dnl ------------------------------------------------------------------------
138
AC_DEFUN(AC_GGZ_INIT,
140
if test "x${prefix}" = "xNONE"; then
141
ac_ggz_prefix_incdir="${ac_default_prefix}/include"
142
ac_ggz_prefix_libdir="${ac_default_prefix}/lib"
143
ac_ggz_prefix_bindir="${ac_default_prefix}/bin"
144
ac_ggz_prefix_etcdir="${ac_default_prefix}/etc"
146
ac_ggz_prefix_incdir="${prefix}/include"
147
ac_ggz_prefix_libdir="${prefix}/lib"
148
ac_ggz_prefix_bindir="${prefix}/bin"
149
ac_ggz_prefix_etcdir="${prefix}/etc"
151
ac_ggz_stdinc="$ac_ggz_prefix_incdir"
152
ac_ggz_stdlib="$ac_ggz_prefix_libdir"
153
ac_ggz_stdbin="$ac_ggz_prefix_bindir"
154
ac_ggz_stdetc="$ac_ggz_prefix_etcdir"
155
if test "x$1" = "xdefaults" || test "x$2" = "xdefaults"; then
156
ac_ggz_stdinc="$ac_ggz_stdinc /usr/local/include /usr/include"
157
ac_ggz_stdlib="$ac_ggz_stdlib /usr/local/lib /usr/lib"
158
ac_ggz_stdbin="$ac_ggz_stdbin /usr/local/bin /usr/bin"
159
ac_ggz_stdetc="$ac_ggz_stdetc/ggzd /usr/local/etc/ggzd /etc/ggzd"
161
if test "x$1" = "xexport" || test "x$2" = "xexport"; then
162
CPPFLAGS="$CPPFLAGS -isystem${ac_ggz_prefix_incdir}"
163
LDFLAGS="$LDFLAGS -L${ac_ggz_prefix_libdir}"
167
save_cxxflags=$CXXFLAGS
168
CFLAGS="-Wall -Werror"
169
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
170
[[void signedness(void){char c;if(c==-1)c=0;}]])],
172
[save_cflags="$save_cflags -fsigned-char"
173
save_cxxflags="$save_cxxflags -fsigned-char"])
175
CXXFLAGS=$save_cxxflags
178
dnl ------------------------------------------------------------------------
179
dnl Try to find the libggz headers and libraries.
180
dnl $(LIBGGZ_LDFLAGS) will be -L ... (if needed)
181
dnl and $(LIBGGZ_INCLUDES) will be -I ... (if needed)
182
dnl ------------------------------------------------------------------------
184
AC_DEFUN(AC_GGZ_LIBGGZ,
186
AC_MSG_CHECKING([for GGZ library: libggz])
188
ac_libggz_includes=NO ac_libggz_libraries=NO
192
AC_ARG_WITH(libggz-dir,
193
[ --with-libggz-dir=DIR libggz installation prefix ],
194
[ ac_libggz_includes="$withval"/include
195
ac_libggz_libraries="$withval"/lib
197
AC_ARG_WITH(libggz-includes,
198
[ --with-libggz-includes=DIR where the libggz includes are. ],
199
[ ac_libggz_includes="$withval"
201
AC_ARG_WITH(libggz-libraries,
202
[ --with-libggz-libraries=DIR where the libggz libs are. ],
203
[ ac_libggz_libraries="$withval"
206
AC_CACHE_VAL(ac_cv_have_libggz,
208
libggz_incdirs="$ac_libggz_includes $ac_ggz_stdinc"
209
AC_GGZ_REMOVEDUPS($libggz_incdirs, libggz_incdirs)
212
AC_GGZ_FIND_FILE($libggz_header, $libggz_incdirs, libggz_incdir)
213
ac_libggz_includes="$libggz_incdir"
215
libggz_libdirs="$ac_libggz_libraries $ac_ggz_stdlib"
216
AC_GGZ_REMOVEDUPS($libggz_libdirs, libggz_libdirs)
220
for dir in $libggz_libdirs; do
221
try="ls -1 $dir/libggz.so"
222
if test -n "`$try 2> /dev/null`"; then libggz_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
225
ac_libggz_libraries="$libggz_libdir"
227
if test "$ac_libggz_includes" = NO || test "$ac_libggz_libraries" = NO; then
228
ac_cv_have_libggz="have_libggz=no"
229
ac_libggz_notfound=""
235
eval "$ac_cv_have_libggz"
237
if test "$have_libggz" != yes; then
238
if test "x$2" = "xignore"; then
239
AC_MSG_RESULT([$have_libggz (ignored)])
241
AC_MSG_RESULT([$have_libggz])
242
if test "x$2" = "x"; then
243
AC_GGZ_ERROR(libggz, $libggz_incdirs, $libggz_libdirs)
246
# perform actions given by argument 2.
250
ac_cv_have_libggz="have_libggz=yes \
251
ac_libggz_includes=$ac_libggz_includes ac_libggz_libraries=$ac_libggz_libraries"
252
AC_MSG_RESULT([$have_libggz (libraries $ac_libggz_libraries, headers $ac_libggz_includes)])
254
libggz_libraries="$ac_libggz_libraries"
255
libggz_includes="$ac_libggz_includes"
257
AC_SUBST(libggz_libraries)
258
AC_SUBST(libggz_includes)
260
LIBGGZ_INCLUDES="-isystem $libggz_includes"
261
LIBGGZ_LDFLAGS="-L$libggz_libraries"
263
AC_SUBST(LIBGGZ_INCLUDES)
264
AC_SUBST(LIBGGZ_LDFLAGS)
269
# perform actions given by argument 1.
276
dnl ------------------------------------------------------------------------
277
dnl Try to find the ggzcore headers and libraries.
278
dnl $(GGZCORE_LDFLAGS) will be -L ... (if needed)
279
dnl and $(GGZCORE_INCLUDES) will be -I ... (if needed)
280
dnl ------------------------------------------------------------------------
282
AC_DEFUN(AC_GGZ_GGZCORE,
284
AC_MSG_CHECKING([for GGZ library: ggzcore])
286
ac_ggzcore_includes=NO ac_ggzcore_libraries=NO
290
AC_ARG_WITH(ggzcore-dir,
291
[ --with-ggzcore-dir=DIR ggzcore installation prefix ],
292
[ ac_ggzcore_includes="$withval"/include
293
ac_ggzcore_libraries="$withval"/lib
295
AC_ARG_WITH(ggzcore-includes,
296
[ --with-ggzcore-includes=DIR where the ggzcore includes are. ],
297
[ ac_ggzcore_includes="$withval"
299
AC_ARG_WITH(ggzcore-libraries,
300
[ --with-ggzcore-libraries=DIR where the ggzcore libs are. ],
301
[ ac_ggzcore_libraries="$withval"
304
AC_CACHE_VAL(ac_cv_have_ggzcore,
306
ggzcore_incdirs="$ac_ggzcore_includes $ac_ggz_stdinc"
307
AC_GGZ_REMOVEDUPS($ggzcore_incdirs, ggzcore_incdirs)
308
ggzcore_header=ggzcore.h
310
AC_GGZ_FIND_FILE($ggzcore_header, $ggzcore_incdirs, ggzcore_incdir)
311
ac_ggzcore_includes="$ggzcore_incdir"
313
ggzcore_libdirs="$ac_ggzcore_libraries $ac_ggz_stdlib"
314
AC_GGZ_REMOVEDUPS($ggzcore_libdirs, ggzcore_libdirs)
318
for dir in $ggzcore_libdirs; do
319
try="ls -1 $dir/libggzcore.so"
320
if test -n "`$try 2> /dev/null`"; then ggzcore_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
323
ac_ggzcore_libraries="$ggzcore_libdir"
325
if test "$ac_ggzcore_includes" = NO || test "$ac_ggzcore_libraries" = NO; then
326
ac_cv_have_ggzcore="have_ggzcore=no"
327
ac_ggzcore_notfound=""
333
eval "$ac_cv_have_ggzcore"
335
if test "$have_ggzcore" != yes; then
336
if test "x$2" = "xignore"; then
337
AC_MSG_RESULT([$have_ggzcore (intentionally ignored)])
339
AC_MSG_RESULT([$have_ggzcore])
340
if test "x$2" = "x"; then
341
AC_GGZ_ERROR(ggzcore, $ggzcore_incdirs, $ggzcore_libdirs)
344
# Perform actions given by argument 2.
348
ac_cv_have_ggzcore="have_ggzcore=yes \
349
ac_ggzcore_includes=$ac_ggzcore_includes ac_ggzcore_libraries=$ac_ggzcore_libraries"
350
AC_MSG_RESULT([$have_ggzcore (libraries $ac_ggzcore_libraries, headers $ac_ggzcore_includes)])
352
ggzcore_libraries="$ac_ggzcore_libraries"
353
ggzcore_includes="$ac_ggzcore_includes"
355
AC_SUBST(ggzcore_libraries)
356
AC_SUBST(ggzcore_includes)
358
GGZCORE_INCLUDES="-isystem $ggzcore_includes"
359
GGZCORE_LDFLAGS="-L$ggzcore_libraries"
361
AC_SUBST(GGZCORE_INCLUDES)
362
AC_SUBST(GGZCORE_LDFLAGS)
364
LIB_GGZCORE='-lggzcore'
365
AC_SUBST(LIB_GGZCORE)
367
# Perform actions given by argument 1.
373
dnl ------------------------------------------------------------------------
374
dnl Try to find the ggz-config binary.
375
dnl Sets GGZ_CONFIG to the path/name of the program.
376
dnl Sets also: ggz_gamedir, ggz_datadir etc.
377
dnl ------------------------------------------------------------------------
379
AC_DEFUN(AC_GGZ_CONFIG,
381
AC_MSG_CHECKING([for GGZ configuration tool: ggz-config])
386
AC_ARG_WITH(ggzconfig,
387
[ --with-ggzconfig=DIR path to ggz-config ],
388
[ ac_ggz_config="$withval"
391
AC_CACHE_VAL(ac_cv_have_ggzconfig,
393
ggz_config_dirs="$ac_ggz_config $ac_ggz_stdbin"
395
AC_GGZ_FIND_FILE(ggz-config, $ggz_config_dirs, ggz_config_dir)
396
ac_ggz_config="$ggz_config_dir"
398
if test "$ac_ggz_config" = NO; then
399
ac_cv_have_ggzcore="have_ggz_config=no"
400
ac_ggz_config_notfound=""
403
have_ggz_config="yes"
407
eval "$ac_cv_have_ggz_config"
409
if test "$have_ggz_config" != yes; then
410
if test "x$2" = "xignore"; then
411
AC_MSG_RESULT([$have_ggz_config (intentionally ignored)])
413
AC_MSG_RESULT([$have_ggz_config])
414
if test "x$2" = "x"; then
415
AC_MSG_ERROR([ggz-config not found. Please check your installation! ])
418
# Perform actions given by argument 2.
422
ac_cv_have_ggz_config="have_ggz_config=yes \
423
ac_ggz_config=$ac_ggz_config"
424
AC_MSG_RESULT([$ac_ggz_config/ggz-config])
426
ggz_config="$ac_ggz_config"
430
GGZ_CONFIG="${ggz_config}/ggz-config"
433
ggzmoduleconfdir=`$GGZ_CONFIG --configdir`
434
AC_DEFINE_UNQUOTED(GGZMODULECONFDIR, "${ggzmoduleconfdir}", [Path where the game registry is located])
435
ggzexecmoddir=`$GGZ_CONFIG --gamedir`
436
AC_DEFINE_UNQUOTED(GAMEDIR, "${ggzexecmoddir}", [Path where to install the games])
437
ggzdatadir=`$GGZ_CONFIG --datadir`
438
AC_DEFINE_UNQUOTED(GGZDATADIR, "${ggzdatadir}", [Path where the games should look for their data files])
439
packagesrcdir=`cd $srcdir && pwd`
440
AC_DEFINE_UNQUOTED(PACKAGE_SOURCE_DIR, "${packagesrcdir}", [Path where the source is located])
442
AC_SUBST(ggzmoduleconfdir)
443
AC_SUBST(ggzexecmoddir)
445
AC_SUBST(packagesrcdir)
447
# Perform actions given by argument 1.
453
dnl ------------------------------------------------------------------------
454
dnl Try to find the ggzmod headers and libraries.
455
dnl $(GGZMOD_LDFLAGS) will be -L ... (if needed)
456
dnl and $(GGZMOD_INCLUDES) will be -I ... (if needed)
457
dnl ------------------------------------------------------------------------
459
AC_DEFUN(AC_GGZ_GGZMOD,
461
AC_MSG_CHECKING([for GGZ library: ggzmod])
463
ac_ggzmod_includes=NO ac_ggzmod_libraries=NO
467
AC_ARG_WITH(ggzmod-dir,
468
[ --with-ggzmod-dir=DIR ggzmod installation prefix ],
469
[ ac_ggzmod_includes="$withval"/include
470
ac_ggzmod_libraries="$withval"/lib
472
AC_ARG_WITH(ggzmod-includes,
473
[ --with-ggzmod-includes=DIR where the ggzmod includes are. ],
474
[ ac_ggzmod_includes="$withval"
476
AC_ARG_WITH(ggzmod-libraries,
477
[ --with-ggzmod-libraries=DIR where the ggzmod libs are. ],
478
[ ac_ggzmod_libraries="$withval"
481
AC_CACHE_VAL(ac_cv_have_ggzmod,
483
ggzmod_incdirs="$ac_ggzmod_includes $ac_ggz_stdinc"
484
AC_GGZ_REMOVEDUPS($ggzmod_incdirs, ggzmod_incdirs)
485
ggzmod_header=ggzmod.h
487
AC_GGZ_FIND_FILE($ggzmod_header, $ggzmod_incdirs, ggzmod_incdir)
488
ac_ggzmod_includes="$ggzmod_incdir"
490
ggzmod_libdirs="$ac_ggzmod_libraries $ac_ggz_stdlib"
491
AC_GGZ_REMOVEDUPS($ggzmod_libdirs, ggzmod_libdirs)
495
for dir in $ggzmod_libdirs; do
496
try="ls -1 $dir/libggzmod.so"
497
if test -n "`$try 2> /dev/null`"; then ggzmod_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
500
ac_ggzmod_libraries="$ggzmod_libdir"
502
if test "$ac_ggzmod_includes" = NO || test "$ac_ggzmod_libraries" = NO; then
503
ac_cv_have_ggzmod="have_ggzmod=no"
504
ac_ggzmod_notfound=""
510
eval "$ac_cv_have_ggzmod"
512
if test "$have_ggzmod" != yes; then
513
if test "x$2" = "xignore"; then
514
AC_MSG_RESULT([$have_ggzmod (intentionally ignored)])
516
AC_MSG_RESULT([$have_ggzmod])
517
if test "x$2" = "x"; then
518
AC_GGZ_ERROR(ggzmod, $ggzmod_incdirs, $ggzmod_libdirs)
521
# Perform actions given by argument 2.
525
ac_cv_have_ggzmod="have_ggzmod=yes \
526
ac_ggzmod_includes=$ac_ggzmod_includes ac_ggzmod_libraries=$ac_ggzmod_libraries"
527
AC_MSG_RESULT([$have_ggzmod (libraries $ac_ggzmod_libraries, headers $ac_ggzmod_includes)])
529
ggzmod_libraries="$ac_ggzmod_libraries"
530
ggzmod_includes="$ac_ggzmod_includes"
532
AC_SUBST(ggzmod_libraries)
533
AC_SUBST(ggzmod_includes)
535
GGZMOD_INCLUDES="-isystem $ggzmod_includes"
536
GGZMOD_LDFLAGS="-L$ggzmod_libraries"
538
AC_SUBST(GGZMOD_INCLUDES)
539
AC_SUBST(GGZMOD_LDFLAGS)
541
LIB_GGZMOD='-lggzmod'
544
# Perform actions given by argument 1.
550
dnl ------------------------------------------------------------------------
551
dnl Try to find the ggzdmod headers and libraries.
552
dnl $(GGZDMOD_LDFLAGS) will be -L ... (if needed)
553
dnl and $(GGZDMOD_INCLUDES) will be -I ... (if needed)
554
dnl ------------------------------------------------------------------------
556
AC_DEFUN(AC_GGZ_GGZDMOD,
558
AC_MSG_CHECKING([for GGZ library: ggzdmod])
560
ac_ggzdmod_includes=NO ac_ggzdmod_libraries=NO
564
AC_ARG_WITH(ggzdmod-dir,
565
[ --with-ggzdmod-dir=DIR ggzdmod installation prefix ],
566
[ ac_ggzdmod_includes="$withval"/include
567
ac_ggzdmod_libraries="$withval"/lib
569
AC_ARG_WITH(ggzdmod-includes,
570
[ --with-ggzdmod-includes=DIR where the ggzdmod includes are. ],
571
[ ac_ggzdmod_includes="$withval"
573
AC_ARG_WITH(ggzdmod-libraries,
574
[ --with-ggzdmod-libraries=DIR where the ggzdmod libs are. ],
575
[ ac_ggzdmod_libraries="$withval"
578
AC_CACHE_VAL(ac_cv_have_ggzdmod,
580
ggzdmod_incdirs="$ac_ggzdmod_includes $ac_ggz_stdinc"
581
AC_GGZ_REMOVEDUPS($ggzdmod_incdirs, ggzdmod_incdirs)
582
ggzdmod_header=ggzdmod.h
584
AC_GGZ_FIND_FILE($ggzdmod_header, $ggzdmod_incdirs, ggzdmod_incdir)
585
ac_ggzdmod_includes="$ggzdmod_incdir"
587
ggzdmod_libdirs="$ac_ggzdmod_libraries $ac_ggz_stdlib"
588
AC_GGZ_REMOVEDUPS($ggzdmod_libdirs, ggzdmod_libdirs)
592
for dir in $ggzdmod_libdirs; do
593
try="ls -1 $dir/libggzdmod.so"
594
if test -n "`$try 2> /dev/null`"; then ggzdmod_libdir=$dir; break; else echo "tried $dir" >&AC_FD_CC ; fi
597
ac_ggzdmod_libraries="$ggzdmod_libdir"
599
if test "$ac_ggzdmod_includes" = NO || test "$ac_ggzdmod_libraries" = NO; then
600
ac_cv_have_ggzdmod="have_ggzdmod=no"
601
ac_ggzdmod_notfound=""
607
eval "$ac_cv_have_ggzdmod"
609
if test "$have_ggzdmod" != yes; then
610
if test "x$2" = "xignore"; then
611
AC_MSG_RESULT([$have_ggzdmod (intentionally ignored)])
613
AC_MSG_RESULT([$have_ggzdmod])
614
if test "x$2" = "x"; then
615
AC_GGZ_ERROR(ggzdmod, $ggzdmod_incdirs, $ggzdmod_libdirs)
618
# Perform actions given by argument 2.
622
ac_cv_have_ggzdmod="have_ggzdmod=yes \
623
ac_ggzdmod_includes=$ac_ggzdmod_includes ac_ggzdmod_libraries=$ac_ggzdmod_libraries"
624
AC_MSG_RESULT([$have_ggzdmod (libraries $ac_ggzdmod_libraries, headers $ac_ggzdmod_includes)])
626
ggzdmod_libraries="$ac_ggzdmod_libraries"
627
ggzdmod_includes="$ac_ggzdmod_includes"
629
AC_SUBST(ggzdmod_libraries)
630
AC_SUBST(ggzdmod_includes)
632
GGZDMOD_INCLUDES="-isystem $ggzdmod_includes"
633
GGZDMOD_LDFLAGS="-L$ggzdmod_libraries"
635
AC_SUBST(GGZDMOD_INCLUDES)
636
AC_SUBST(GGZDMOD_LDFLAGS)
638
LIB_GGZDMOD='-lggzdmod'
639
AC_SUBST(LIB_GGZDMOD)
641
# Perform actions given by argument 1.
647
dnl ------------------------------------------------------------------------
648
dnl Setup the game server configuration.
649
dnl Sets ggzdconfdir (ggzd configuration).
650
dnl Sets ggzddatadir (for game server data).
651
dnl ------------------------------------------------------------------------
653
AC_DEFUN(AC_GGZ_SERVER,
655
AC_MSG_CHECKING([for GGZ server: ggzd])
656
AC_ARG_WITH(ggzd-confdir,
657
[ --with-ggzd-confdir=DIR directory for room/game data],
658
[ ac_ggzd_confdir="$withval"
661
AC_CACHE_VAL(ac_cv_have_ggzdconf,
663
if test "x$1" = "xforce"; then
664
if test "x$ac_ggzd_confdir" = "x"; then
665
ggzdconfdirs="$ac_ggz_stdetc"
667
ggzdconfdirs="$ac_ggzd_confdir"
670
ggzdconfdirs="$ac_ggzd_confdir $ac_ggz_stdetc"
674
for dir in $ggzdconfdirs; do
675
if test -n "`ls -d $dir/rooms 2> /dev/null`"; then
676
if test -n "`ls -d $dir/rooms 2> /dev/null`"; then
677
ggzdconfdir=$dir; break;
679
echo "tried $dir" >&AC_FD_CC;
682
echo "tried $dir" >&AC_FD_CC;
686
if test "x$ggzdconfdir" = "xNONE"; then
693
eval "$ac_cv_have_ggzdconf"
695
if test "$have_ggzdconf" != yes; then
696
if test "x$2" = "xignore"; then
697
AC_MSG_RESULT([$have_ggzdconf (intentionally ignored)])
698
elif test "x$2" = "xforce"; then
699
if test "x$ac_ggzd_confdir" = "x"; then
700
ggzdconfdir="\${prefix}/etc/ggzd"
702
ggzdconfdir=$ac_ggzd_confdir
704
AC_MSG_RESULT([$have_ggzdconf (but forced to ${ggzdconfdir})])
706
AC_MSG_RESULT([$have_ggzdconf])
707
if test "x$2" = "x"; then
708
AC_MSG_ERROR([GGZ server configuration not found. Please check your installation! ])
711
# Perform actions given by argument 2.
716
if test "x${prefix}" != "xNONE" && test "x${prefix}" != "x${ac_default_prefix}"; then
719
if test "x$ggzconfdir" != "x${prefix}/etc/ggzd" && test "x$prefixed" = "x1"; then
720
AC_MSG_RESULT([$have_ggzdconf ($ggzdconfdir, but using ${prefix}/etc/ggzd nevertheless)])
721
ggzdconfdir="\${prefix}/etc/ggzd"
723
AC_MSG_RESULT([$have_ggzdconf ($ggzdconfdir)])
727
if test "$have_ggzdconf" = yes || test "x$2" = "xforce"; then
728
AC_SUBST(ggzdconfdir)
730
ggzddatadir=${prefix}/share/${PACKAGE}
731
AC_DEFINE_UNQUOTED(GGZDDATADIR, "${ggzddatadir}", [Game server data directory])
732
AC_SUBST(ggzddatadir)
734
if test "x${libdir}" = 'x${exec_prefix}/lib'; then
735
if test "x${exec_prefix}" = "xNONE"; then
736
if test "x${prefix}" = "xNONE"; then
737
ggzdexecmoddir="\${ac_default_prefix}/lib/ggzd"
738
ggzdexecmodpath="${ac_default_prefix}/lib/ggzd"
740
ggzdexecmoddir="\${prefix}/lib/ggzd"
741
ggzdexecmodpath="${prefix}/lib/ggzd"
744
ggzdexecmoddir="\${exec_prefix}/lib/ggzd"
745
ggzdexecmodpath="${exec_prefix}/lib/ggzd"
748
ggzdexecmoddir="\${libdir}/ggzd"
749
ggzdexecmodpath="${libdir}/ggzd"
751
AC_SUBST(ggzdexecmoddir)
752
AC_SUBST(ggzdexecmodpath)
754
# Perform actions given by argument 1.
760
dnl ------------------------------------------------------------------------
761
dnl Find internationalization tools
762
dnl ------------------------------------------------------------------------
764
AC_DEFUN(AC_GGZ_INTL,
766
AC_PATH_PROG(GETTEXT, xgettext)
767
AC_PATH_PROG(MSGFMT, msgfmt)
768
AC_PATH_PROG(MSGMERGE, msgmerge)
771
if test "x$GETTEXT" = "x"; then intl=0; fi
772
if test "x$MSGFMT" = "x"; then intl=0; fi
773
if test "x$MSGMERGE" = "x"; then intl=0; fi
774
if test "$intl" = 0; then
775
if test "x$2" = "xignore"; then
776
AC_MSG_WARN([Internationalization tools missing. (ignored)])
778
AC_MSG_RESULT([Internationalization tools missing.])
779
if test "x$2" = "x"; then
780
AC_MSG_ERROR([Internationalization tools missing.])
783
# Perform actions given by argument 2.
787
AC_MSG_RESULT([Internationalization tools found.])
798
# Perform actions given by argument 1.
803
# Configure paths for GTK+
804
# Owen Taylor 1997-2001
806
dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
807
dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES,
808
dnl pass to pkg-config
810
AC_DEFUN(AM_PATH_GTK_2_0,
812
dnl Get the cflags and libraries from pkg-config
814
AC_ARG_ENABLE(gtktest, [ --disable-gtktest do not try to compile and run a test GTK+ program],
815
, enable_gtktest=yes)
817
pkg_config_args=gtk+-2.0
822
pkg_config_args="$pkg_config_args gthread-2.0"
829
AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
831
if test x$PKG_CONFIG != xno ; then
832
if pkg-config --atleast-pkgconfig-version 0.7 ; then
835
echo *** pkg-config too old; version 0.7 or better required.
843
min_gtk_version=ifelse([$1], ,2.0.0,$1)
844
AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
846
if test x$PKG_CONFIG != xno ; then
847
## don't try to run the test against uninstalled libtool libs
848
if $PKG_CONFIG --uninstalled $pkg_config_args; then
849
echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
853
if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
860
if test x"$no_gtk" = x ; then
861
GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
862
GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
863
gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
864
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
865
gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
866
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
867
gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
868
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
869
if test "x$enable_gtktest" = "xyes" ; then
870
ac_save_CFLAGS="$CFLAGS"
872
CFLAGS="$CFLAGS $GTK_CFLAGS"
873
LIBS="$GTK_LIBS $LIBS"
875
dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
876
dnl checks the results of pkg-config to some extent)
887
int major, minor, micro;
890
system ("touch conf.gtktest");
892
/* HP/UX 9 (%@#!) writes to sscanf strings */
893
tmp_version = g_strdup("$min_gtk_version");
894
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
895
printf("%s, bad version string\n", "$min_gtk_version");
899
if ((gtk_major_version != $gtk_config_major_version) ||
900
(gtk_minor_version != $gtk_config_minor_version) ||
901
(gtk_micro_version != $gtk_config_micro_version))
903
printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
904
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
905
gtk_major_version, gtk_minor_version, gtk_micro_version);
906
printf ("*** was found! If pkg-config was correct, then it is best\n");
907
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
908
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
909
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
910
printf("*** required on your system.\n");
911
printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
912
printf("*** to point to the correct configuration files\n");
914
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
915
(gtk_minor_version != GTK_MINOR_VERSION) ||
916
(gtk_micro_version != GTK_MICRO_VERSION))
918
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
919
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
920
printf("*** library (version %d.%d.%d)\n",
921
gtk_major_version, gtk_minor_version, gtk_micro_version);
925
if ((gtk_major_version > major) ||
926
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
927
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
933
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
934
gtk_major_version, gtk_minor_version, gtk_micro_version);
935
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
936
major, minor, micro);
937
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
939
printf("*** If you have already installed a sufficiently new version, this error\n");
940
printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
941
printf("*** being found. The easiest way to fix this is to remove the old version\n");
942
printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
943
printf("*** correct copy of pkg-config. (In this case, you will have to\n");
944
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
945
printf("*** so that the correct libraries are found at run-time))\n");
950
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
951
CFLAGS="$ac_save_CFLAGS"
955
if test "x$no_gtk" = x ; then
956
AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
957
ifelse([$2], , :, [$2])
960
if test "$PKG_CONFIG" = "no" ; then
961
echo "*** A new enough version of pkg-config was not found."
962
echo "*** See http://pkgconfig.sourceforge.net"
964
if test -f conf.gtktest ; then
967
echo "*** Could not run GTK+ test program, checking why..."
968
ac_save_CFLAGS="$CFLAGS"
970
CFLAGS="$CFLAGS $GTK_CFLAGS"
971
LIBS="$LIBS $GTK_LIBS"
975
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
976
[ echo "*** The test program compiled, but did not run. This usually means"
977
echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
978
echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
979
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
980
echo "*** to the installed location Also, make sure you have run ldconfig if that"
981
echo "*** is required on your system"
983
echo "*** If you have an old version installed, it is best to remove it, although"
984
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
985
[ echo "*** The test program failed to compile or link. See the file config.log for the"
986
echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
987
CFLAGS="$ac_save_CFLAGS"
993
ifelse([$3], , :, [$3])
999
# Configure paths for GTK+
1000
# Owen Taylor 97-11-3
1002
dnl AM_PATH_GTK([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
1003
dnl Test for GTK, and define GTK_CFLAGS and GTK_LIBS
1005
AC_DEFUN(AM_PATH_GTK,
1007
dnl Get the cflags and libraries from the gtk-config script
1009
AC_ARG_WITH(gtk-prefix,[ --with-gtk-prefix=PFX Prefix where GTK is installed (optional)],
1010
gtk_config_prefix="$withval", gtk_config_prefix="")
1011
AC_ARG_WITH(gtk-exec-prefix,[ --with-gtk-exec-prefix=PFX Exec prefix where GTK is installed (optional)],
1012
gtk_config_exec_prefix="$withval", gtk_config_exec_prefix="")
1013
AC_ARG_ENABLE(gtktest, [ --disable-gtktest Do not try to compile and run a test GTK program],
1014
, enable_gtktest=yes)
1020
gtk_config_args="$gtk_config_args gthread"
1025
if test x$gtk_config_exec_prefix != x ; then
1026
gtk_config_args="$gtk_config_args --exec-prefix=$gtk_config_exec_prefix"
1027
if test x${GTK_CONFIG+set} != xset ; then
1028
GTK_CONFIG=$gtk_config_exec_prefix/bin/gtk-config
1031
if test x$gtk_config_prefix != x ; then
1032
gtk_config_args="$gtk_config_args --prefix=$gtk_config_prefix"
1033
if test x${GTK_CONFIG+set} != xset ; then
1034
GTK_CONFIG=$gtk_config_prefix/bin/gtk-config
1038
AC_PATH_PROGS(GTK_CONFIG, gtk-config gtk12-config gtk13-config, no)
1039
min_gtk_version=ifelse([$1], ,0.99.7,$1)
1040
AC_MSG_CHECKING(for GTK - version >= $min_gtk_version)
1042
if test "$GTK_CONFIG" = "no" ; then
1045
GTK_CFLAGS=`$GTK_CONFIG $gtk_config_args --cflags`
1046
GTK_LIBS=`$GTK_CONFIG $gtk_config_args --libs`
1047
gtk_config_major_version=`$GTK_CONFIG $gtk_config_args --version | \
1048
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
1049
gtk_config_minor_version=`$GTK_CONFIG $gtk_config_args --version | \
1050
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
1051
gtk_config_micro_version=`$GTK_CONFIG $gtk_config_args --version | \
1052
sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
1053
if test "x$enable_gtktest" = "xyes" ; then
1054
ac_save_CFLAGS="$CFLAGS"
1055
ac_save_LIBS="$LIBS"
1056
CFLAGS="$CFLAGS $GTK_CFLAGS"
1057
LIBS="$GTK_LIBS $LIBS"
1059
dnl Now check if the installed GTK is sufficiently new. (Also sanity
1060
dnl checks the results of gtk-config to some extent
1064
#include <gtk/gtk.h>
1071
int major, minor, micro;
1074
system ("touch conf.gtktest");
1076
/* HP/UX 9 (%@#!) writes to sscanf strings */
1077
tmp_version = g_strdup("$min_gtk_version");
1078
if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
1079
printf("%s, bad version string\n", "$min_gtk_version");
1083
if ((gtk_major_version != $gtk_config_major_version) ||
1084
(gtk_minor_version != $gtk_config_minor_version) ||
1085
(gtk_micro_version != $gtk_config_micro_version))
1087
printf("\n*** 'gtk-config --version' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n",
1088
$gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
1089
gtk_major_version, gtk_minor_version, gtk_micro_version);
1090
printf ("*** was found! If gtk-config was correct, then it is best\n");
1091
printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
1092
printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
1093
printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
1094
printf("*** required on your system.\n");
1095
printf("*** If gtk-config was wrong, set the environment variable GTK_CONFIG\n");
1096
printf("*** to point to the correct copy of gtk-config, and remove the file config.cache\n");
1097
printf("*** before re-running configure\n");
1099
#if defined (GTK_MAJOR_VERSION) && defined (GTK_MINOR_VERSION) && defined (GTK_MICRO_VERSION)
1100
else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
1101
(gtk_minor_version != GTK_MINOR_VERSION) ||
1102
(gtk_micro_version != GTK_MICRO_VERSION))
1104
printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
1105
GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
1106
printf("*** library (version %d.%d.%d)\n",
1107
gtk_major_version, gtk_minor_version, gtk_micro_version);
1109
#endif /* defined (GTK_MAJOR_VERSION) ... */
1112
if ((gtk_major_version > major) ||
1113
((gtk_major_version == major) && (gtk_minor_version > minor)) ||
1114
((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
1120
printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
1121
gtk_major_version, gtk_minor_version, gtk_micro_version);
1122
printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
1123
major, minor, micro);
1124
printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
1126
printf("*** If you have already installed a sufficiently new version, this error\n");
1127
printf("*** probably means that the wrong copy of the gtk-config shell script is\n");
1128
printf("*** being found. The easiest way to fix this is to remove the old version\n");
1129
printf("*** of GTK+, but you can also set the GTK_CONFIG environment to point to the\n");
1130
printf("*** correct copy of gtk-config. (In this case, you will have to\n");
1131
printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
1132
printf("*** so that the correct libraries are found at run-time))\n");
1137
],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
1138
CFLAGS="$ac_save_CFLAGS"
1139
LIBS="$ac_save_LIBS"
1142
if test "x$no_gtk" = x ; then
1144
ifelse([$2], , :, [$2])
1147
if test "$GTK_CONFIG" = "no" ; then
1148
echo "*** The gtk-config script installed by GTK could not be found"
1149
echo "*** If GTK was installed in PREFIX, make sure PREFIX/bin is in"
1150
echo "*** your path, or set the GTK_CONFIG environment variable to the"
1151
echo "*** full path to gtk-config."
1153
if test -f conf.gtktest ; then
1156
echo "*** Could not run GTK test program, checking why..."
1157
CFLAGS="$CFLAGS $GTK_CFLAGS"
1158
LIBS="$LIBS $GTK_LIBS"
1160
#include <gtk/gtk.h>
1162
], [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
1163
[ echo "*** The test program compiled, but did not run. This usually means"
1164
echo "*** that the run-time linker is not finding GTK or finding the wrong"
1165
echo "*** version of GTK. If it is not finding GTK, you'll need to set your"
1166
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
1167
echo "*** to the installed location Also, make sure you have run ldconfig if that"
1168
echo "*** is required on your system"
1170
echo "*** If you have an old version installed, it is best to remove it, although"
1171
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
1173
echo "*** If you have a RedHat 5.0 system, you should remove the GTK package that"
1174
echo "*** came with the system with the command"
1176
echo "*** rpm --erase --nodeps gtk gtk-devel" ],
1177
[ echo "*** The test program failed to compile or link. See the file config.log for the"
1178
echo "*** exact error that occured. This usually means GTK was incorrectly installed"
1179
echo "*** or that you have moved GTK since it was installed. In the latter case, you"
1180
echo "*** may want to edit the gtk-config script: $GTK_CONFIG" ])
1181
CFLAGS="$ac_save_CFLAGS"
1182
LIBS="$ac_save_LIBS"
1187
ifelse([$3], , :, [$3])
1189
AC_SUBST(GTK_CFLAGS)
1194
# Do all the work for Automake. -*- Autoconf -*-
1196
# This macro actually does too much some checks are only needed if
1197
# your package does certain things. But this isn't really a big deal.
1199
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
1200
# Free Software Foundation, Inc.
1202
# This program is free software; you can redistribute it and/or modify
1203
# it under the terms of the GNU General Public License as published by
1204
# the Free Software Foundation; either version 2, or (at your option)
1205
# any later version.
1207
# This program is distributed in the hope that it will be useful,
1208
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1209
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1210
# GNU General Public License for more details.
1212
# You should have received a copy of the GNU General Public License
1213
# along with this program; if not, write to the Free Software
1214
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1221
# Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
1222
# the ones we care about.
1223
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
1225
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
1226
# AM_INIT_AUTOMAKE([OPTIONS])
1227
# -----------------------------------------------
1228
# The call with PACKAGE and VERSION arguments is the old style
1229
# call (pre autoconf-2.50), which is being phased out. PACKAGE
1230
# and VERSION should now be passed to AC_INIT and removed from
1231
# the call to AM_INIT_AUTOMAKE.
1232
# We support both call styles for the transition. After
1233
# the next Automake release, Autoconf can make the AC_INIT
1234
# arguments mandatory, and then we can depend on a new Autoconf
1235
# release and drop the old call support.
1236
AC_DEFUN([AM_INIT_AUTOMAKE],
1237
[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
1238
AC_REQUIRE([AC_PROG_INSTALL])dnl
1239
# test to see if srcdir already configured
1240
if test "`cd $srcdir && pwd`" != "`pwd`" &&
1241
test -f $srcdir/config.status; then
1242
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
1245
# test whether we have cygpath
1246
if test -z "$CYGPATH_W"; then
1247
if (cygpath --version) >/dev/null 2>/dev/null; then
1248
CYGPATH_W='cygpath -w'
1253
AC_SUBST([CYGPATH_W])
1255
# Define the identity of the package.
1256
dnl Distinguish between old-style and new-style calls.
1258
[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
1259
AC_SUBST([PACKAGE], [$1])dnl
1260
AC_SUBST([VERSION], [$2])],
1261
[_AM_SET_OPTIONS([$1])dnl
1262
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
1263
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
1265
_AM_IF_OPTION([no-define],,
1266
[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
1267
AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
1269
# Some tools Automake needs.
1270
AC_REQUIRE([AM_SANITY_CHECK])dnl
1271
AC_REQUIRE([AC_ARG_PROGRAM])dnl
1272
AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
1273
AM_MISSING_PROG(AUTOCONF, autoconf)
1274
AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
1275
AM_MISSING_PROG(AUTOHEADER, autoheader)
1276
AM_MISSING_PROG(MAKEINFO, makeinfo)
1277
AM_MISSING_PROG(AMTAR, tar)
1279
AM_PROG_INSTALL_STRIP
1280
# We need awk for the "check" target. The system "awk" is bad on
1282
AC_REQUIRE([AC_PROG_AWK])dnl
1283
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
1284
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1286
_AM_IF_OPTION([no-dependencies],,
1287
[AC_PROVIDE_IFELSE([AC_PROG_CC],
1288
[_AM_DEPENDENCIES(CC)],
1289
[define([AC_PROG_CC],
1290
defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
1291
AC_PROVIDE_IFELSE([AC_PROG_CXX],
1292
[_AM_DEPENDENCIES(CXX)],
1293
[define([AC_PROG_CXX],
1294
defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
1299
# When config.status generates a header, we must update the stamp-h file.
1300
# This file resides in the same directory as the config header
1301
# that is generated. The stamp files are numbered to have different names.
1303
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
1304
# loop where config.status creates the headers, so we can generate
1305
# our stamp files there.
1306
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
1307
[# Compute $1's index in $config_headers.
1309
for _am_header in $config_headers :; do
1314
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
1317
echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
1319
# Copyright 2002 Free Software Foundation, Inc.
1321
# This program is free software; you can redistribute it and/or modify
1322
# it under the terms of the GNU General Public License as published by
1323
# the Free Software Foundation; either version 2, or (at your option)
1324
# any later version.
1326
# This program is distributed in the hope that it will be useful,
1327
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1328
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1329
# GNU General Public License for more details.
1331
# You should have received a copy of the GNU General Public License
1332
# along with this program; if not, write to the Free Software
1333
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1335
# AM_AUTOMAKE_VERSION(VERSION)
1336
# ----------------------------
1337
# Automake X.Y traces this macro to ensure aclocal.m4 has been
1338
# generated from the m4 files accompanying Automake X.Y.
1339
AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
1341
# AM_SET_CURRENT_AUTOMAKE_VERSION
1342
# -------------------------------
1343
# Call AM_AUTOMAKE_VERSION so it can be traced.
1344
# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
1345
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
1346
[AM_AUTOMAKE_VERSION([1.7.4])])
1348
# Helper functions for option handling. -*- Autoconf -*-
1350
# Copyright 2001, 2002 Free Software Foundation, Inc.
1352
# This program is free software; you can redistribute it and/or modify
1353
# it under the terms of the GNU General Public License as published by
1354
# the Free Software Foundation; either version 2, or (at your option)
1355
# any later version.
1357
# This program is distributed in the hope that it will be useful,
1358
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1359
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1360
# GNU General Public License for more details.
1362
# You should have received a copy of the GNU General Public License
1363
# along with this program; if not, write to the Free Software
1364
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1369
# _AM_MANGLE_OPTION(NAME)
1370
# -----------------------
1371
AC_DEFUN([_AM_MANGLE_OPTION],
1372
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
1374
# _AM_SET_OPTION(NAME)
1375
# ------------------------------
1376
# Set option NAME. Presently that only means defining a flag for this option.
1377
AC_DEFUN([_AM_SET_OPTION],
1378
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
1380
# _AM_SET_OPTIONS(OPTIONS)
1381
# ----------------------------------
1382
# OPTIONS is a space-separated list of Automake options.
1383
AC_DEFUN([_AM_SET_OPTIONS],
1384
[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
1386
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
1387
# -------------------------------------------
1388
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
1389
AC_DEFUN([_AM_IF_OPTION],
1390
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
1393
# Check to make sure that the build environment is sane.
1396
# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
1398
# This program is free software; you can redistribute it and/or modify
1399
# it under the terms of the GNU General Public License as published by
1400
# the Free Software Foundation; either version 2, or (at your option)
1401
# any later version.
1403
# This program is distributed in the hope that it will be useful,
1404
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1405
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1406
# GNU General Public License for more details.
1408
# You should have received a copy of the GNU General Public License
1409
# along with this program; if not, write to the Free Software
1410
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1417
AC_DEFUN([AM_SANITY_CHECK],
1418
[AC_MSG_CHECKING([whether build environment is sane])
1421
echo timestamp > conftest.file
1422
# Do `set' in a subshell so we don't clobber the current shell's
1423
# arguments. Must try -L first in case configure is actually a
1424
# symlink; some systems play weird games with the mod time of symlinks
1425
# (eg FreeBSD returns the mod time of the symlink's containing
1428
set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
1429
if test "$[*]" = "X"; then
1431
set X `ls -t $srcdir/configure conftest.file`
1434
if test "$[*]" != "X $srcdir/configure conftest.file" \
1435
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
1437
# If neither matched, then we have a broken ls. This can happen
1438
# if, for instance, CONFIG_SHELL is bash and it inherits a
1439
# broken ls alias from the environment. This has actually
1440
# happened. Such a system could not be considered "sane".
1441
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
1442
alias in your environment])
1445
test "$[2]" = conftest.file
1451
AC_MSG_ERROR([newly created file is older than distributed files!
1452
Check your system clock])
1454
AC_MSG_RESULT(yes)])
1459
# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
1461
# This program is free software; you can redistribute it and/or modify
1462
# it under the terms of the GNU General Public License as published by
1463
# the Free Software Foundation; either version 2, or (at your option)
1464
# any later version.
1466
# This program is distributed in the hope that it will be useful,
1467
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1468
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1469
# GNU General Public License for more details.
1471
# You should have received a copy of the GNU General Public License
1472
# along with this program; if not, write to the Free Software
1473
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1478
# AM_MISSING_PROG(NAME, PROGRAM)
1479
# ------------------------------
1480
AC_DEFUN([AM_MISSING_PROG],
1481
[AC_REQUIRE([AM_MISSING_HAS_RUN])
1482
$1=${$1-"${am_missing_run}$2"}
1486
# AM_MISSING_HAS_RUN
1487
# ------------------
1488
# Define MISSING if not defined so far and test if it supports --run.
1489
# If it does, set am_missing_run to use it, otherwise, to nothing.
1490
AC_DEFUN([AM_MISSING_HAS_RUN],
1491
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1492
test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
1493
# Use eval to expand $SHELL
1494
if eval "$MISSING --run true"; then
1495
am_missing_run="$MISSING --run "
1498
AC_MSG_WARN([`missing' script is too old or missing])
1504
# Copyright 2001 Free Software Foundation, Inc.
1506
# This program is free software; you can redistribute it and/or modify
1507
# it under the terms of the GNU General Public License as published by
1508
# the Free Software Foundation; either version 2, or (at your option)
1509
# any later version.
1511
# This program is distributed in the hope that it will be useful,
1512
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1513
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1514
# GNU General Public License for more details.
1516
# You should have received a copy of the GNU General Public License
1517
# along with this program; if not, write to the Free Software
1518
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1521
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
1522
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
1523
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
1525
# Of course, Automake must honor this variable whenever it calls a
1526
# tool from the auxiliary directory. The problem is that $srcdir (and
1527
# therefore $ac_aux_dir as well) can be either absolute or relative,
1528
# depending on how configure is run. This is pretty annoying, since
1529
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
1530
# source directory, any form will work fine, but in subdirectories a
1531
# relative path needs to be adjusted first.
1533
# $ac_aux_dir/missing
1534
# fails when called from a subdirectory if $ac_aux_dir is relative
1535
# $top_srcdir/$ac_aux_dir/missing
1536
# fails if $ac_aux_dir is absolute,
1537
# fails when called from a subdirectory in a VPATH build with
1538
# a relative $ac_aux_dir
1540
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1541
# are both prefixed by $srcdir. In an in-source build this is usually
1542
# harmless because $srcdir is `.', but things will broke when you
1543
# start a VPATH build or use an absolute $srcdir.
1545
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1546
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
1547
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1548
# and then we would define $MISSING as
1549
# MISSING="\${SHELL} $am_aux_dir/missing"
1550
# This will work as long as MISSING is not called from configure, because
1551
# unfortunately $(top_srcdir) has no meaning in configure.
1552
# However there are other variables, like CC, which are often used in
1553
# configure, and could therefore not use this "fixed" $ac_aux_dir.
1555
# Another solution, used here, is to always expand $ac_aux_dir to an
1556
# absolute PATH. The drawback is that using absolute paths prevent a
1557
# configured tree to be moved without reconfiguration.
1559
# Rely on autoconf to set up CDPATH properly.
1562
AC_DEFUN([AM_AUX_DIR_EXPAND], [
1563
# expand $ac_aux_dir to an absolute path
1564
am_aux_dir=`cd $ac_aux_dir && pwd`
1567
# AM_PROG_INSTALL_SH
1568
# ------------------
1569
# Define $install_sh.
1571
# Copyright 2001 Free Software Foundation, Inc.
1573
# This program is free software; you can redistribute it and/or modify
1574
# it under the terms of the GNU General Public License as published by
1575
# the Free Software Foundation; either version 2, or (at your option)
1576
# any later version.
1578
# This program is distributed in the hope that it will be useful,
1579
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1580
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1581
# GNU General Public License for more details.
1583
# You should have received a copy of the GNU General Public License
1584
# along with this program; if not, write to the Free Software
1585
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1588
AC_DEFUN([AM_PROG_INSTALL_SH],
1589
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
1590
install_sh=${install_sh-"$am_aux_dir/install-sh"}
1591
AC_SUBST(install_sh)])
1593
# AM_PROG_INSTALL_STRIP
1595
# Copyright 2001 Free Software Foundation, Inc.
1597
# This program is free software; you can redistribute it and/or modify
1598
# it under the terms of the GNU General Public License as published by
1599
# the Free Software Foundation; either version 2, or (at your option)
1600
# any later version.
1602
# This program is distributed in the hope that it will be useful,
1603
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1604
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1605
# GNU General Public License for more details.
1607
# You should have received a copy of the GNU General Public License
1608
# along with this program; if not, write to the Free Software
1609
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1612
# One issue with vendor `install' (even GNU) is that you can't
1613
# specify the program used to strip binaries. This is especially
1614
# annoying in cross-compiling environments, where the build's strip
1615
# is unlikely to handle the host's binaries.
1616
# Fortunately install-sh will honor a STRIPPROG variable, so we
1617
# always use install-sh in `make install-strip', and initialize
1618
# STRIPPROG with the value of the STRIP variable (set by the user).
1619
AC_DEFUN([AM_PROG_INSTALL_STRIP],
1620
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
1621
# Installed binaries are usually stripped using `strip' when the user
1622
# run `make install-strip'. However `strip' might not be the right
1623
# tool to use in cross-compilation environments, therefore Automake
1624
# will honor the `STRIP' environment variable to overrule this program.
1625
dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
1626
if test "$cross_compiling" != no; then
1627
AC_CHECK_TOOL([STRIP], [strip], :)
1629
INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
1630
AC_SUBST([INSTALL_STRIP_PROGRAM])])
1633
# Copyright (C) 2003 Free Software Foundation, Inc.
1635
# This program is free software; you can redistribute it and/or modify
1636
# it under the terms of the GNU General Public License as published by
1637
# the Free Software Foundation; either version 2, or (at your option)
1638
# any later version.
1640
# This program is distributed in the hope that it will be useful,
1641
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1642
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1643
# GNU General Public License for more details.
1645
# You should have received a copy of the GNU General Public License
1646
# along with this program; if not, write to the Free Software
1647
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1652
# Check whether the underlying file-system supports filenames
1653
# with a leading dot. For instance MS-DOS doesn't.
1654
AC_DEFUN([AM_SET_LEADING_DOT],
1655
[rm -rf .tst 2>/dev/null
1656
mkdir .tst 2>/dev/null
1657
if test -d .tst; then
1662
rmdir .tst 2>/dev/null
1663
AC_SUBST([am__leading_dot])])
1665
# serial 5 -*- Autoconf -*-
1667
# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
1669
# This program is free software; you can redistribute it and/or modify
1670
# it under the terms of the GNU General Public License as published by
1671
# the Free Software Foundation; either version 2, or (at your option)
1672
# any later version.
1674
# This program is distributed in the hope that it will be useful,
1675
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1676
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1677
# GNU General Public License for more details.
1679
# You should have received a copy of the GNU General Public License
1680
# along with this program; if not, write to the Free Software
1681
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1685
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1686
# written in clear, in which case automake, when reading aclocal.m4,
1687
# will think it sees a *use*, and therefore will trigger all it's
1688
# C support machinery. Also note that it means that autoscan, seeing
1689
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1693
# _AM_DEPENDENCIES(NAME)
1694
# ----------------------
1695
# See how the compiler implements dependency checking.
1696
# NAME is "CC", "CXX", "GCJ", or "OBJC".
1697
# We try a few techniques and use that to set a single cache variable.
1699
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1700
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1701
# dependency, and given that the user is not expected to run this macro,
1702
# just rely on AC_PROG_CC.
1703
AC_DEFUN([_AM_DEPENDENCIES],
1704
[AC_REQUIRE([AM_SET_DEPDIR])dnl
1705
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1706
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
1707
AC_REQUIRE([AM_DEP_TRACK])dnl
1709
ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
1710
[$1], CXX, [depcc="$CXX" am_compiler_list=],
1711
[$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1712
[$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
1713
[depcc="$$1" am_compiler_list=])
1715
AC_CACHE_CHECK([dependency style of $depcc],
1716
[am_cv_$1_dependencies_compiler_type],
1717
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1718
# We make a subdir and do the tests there. Otherwise we can end up
1719
# making bogus files that we don't know about and never remove. For
1720
# instance it was reported that on HP-UX the gcc test will end up
1721
# making a dummy file named `D' -- because `-MD' means `put the output
1724
# Copy depcomp to subdir because otherwise we won't find it if we're
1725
# using a relative directory.
1726
cp "$am_depcomp" conftest.dir
1729
am_cv_$1_dependencies_compiler_type=none
1730
if test "$am_compiler_list" = ""; then
1731
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
1733
for depmode in $am_compiler_list; do
1734
# We need to recreate these files for each test, as the compiler may
1735
# overwrite some of them when testing with obscure command lines.
1736
# This happens at least with the AIX C compiler.
1737
echo '#include "conftest.h"' > conftest.c
1738
echo 'int i;' > conftest.h
1739
echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
1743
# after this tag, mechanisms are not by side-effect, so they'll
1744
# only be used when explicitly requested
1745
if test "x$enable_dependency_tracking" = xyes; then
1753
# We check with `-c' and `-o' for the sake of the "dashmstdout"
1754
# mode. It turns out that the SunPro C++ compiler does not properly
1755
# handle `-M -o', and we need to detect this.
1756
if depmode=$depmode \
1757
source=conftest.c object=conftest.o \
1758
depfile=conftest.Po tmpdepfile=conftest.TPo \
1759
$SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
1760
>/dev/null 2>conftest.err &&
1761
grep conftest.h conftest.Po > /dev/null 2>&1 &&
1762
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
1763
# icc doesn't choke on unknown options, it will just issue warnings
1764
# (even with -Werror). So we grep stderr for any message
1765
# that says an option was ignored.
1766
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
1767
am_cv_$1_dependencies_compiler_type=$depmode
1776
am_cv_$1_dependencies_compiler_type=none
1779
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
1780
AM_CONDITIONAL([am__fastdep$1], [
1781
test "x$enable_dependency_tracking" != xno \
1782
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
1788
# Choose a directory name for dependency files.
1789
# This macro is AC_REQUIREd in _AM_DEPENDENCIES
1790
AC_DEFUN([AM_SET_DEPDIR],
1791
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
1792
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
1798
AC_DEFUN([AM_DEP_TRACK],
1799
[AC_ARG_ENABLE(dependency-tracking,
1800
[ --disable-dependency-tracking Speeds up one-time builds
1801
--enable-dependency-tracking Do not reject slow dependency extractors])
1802
if test "x$enable_dependency_tracking" != xno; then
1803
am_depcomp="$ac_aux_dir/depcomp"
1806
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
1807
AC_SUBST([AMDEPBACKSLASH])
1810
# Generate code to set up dependency tracking. -*- Autoconf -*-
1812
# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
1814
# This program is free software; you can redistribute it and/or modify
1815
# it under the terms of the GNU General Public License as published by
1816
# the Free Software Foundation; either version 2, or (at your option)
1817
# any later version.
1819
# This program is distributed in the hope that it will be useful,
1820
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1821
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1822
# GNU General Public License for more details.
1824
# You should have received a copy of the GNU General Public License
1825
# along with this program; if not, write to the Free Software
1826
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1831
# _AM_OUTPUT_DEPENDENCY_COMMANDS
1832
# ------------------------------
1833
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
1834
[for mf in $CONFIG_FILES; do
1835
# Strip MF so we end up with the name of the file.
1836
mf=`echo "$mf" | sed -e 's/:.*$//'`
1837
# Check whether this is an Automake generated Makefile or not.
1838
# We used to match only the files named `Makefile.in', but
1839
# some people rename them; so instead we look at the file content.
1840
# Grep'ing the first line is not enough: some people post-process
1841
# each Makefile.in and add a new line on top of each file to say so.
1842
# So let's grep whole file.
1843
if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
1844
dirpart=`AS_DIRNAME("$mf")`
1848
grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
1849
# Extract the definition of DEP_FILES from the Makefile without
1851
DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
1852
test -z "$DEPDIR" && continue
1853
# When using ansi2knr, U may be empty or an underscore; expand it
1854
U=`sed -n -e '/^U = / s///p' < "$mf"`
1855
test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
1856
# We invoke sed twice because it is the simplest approach to
1857
# changing $(DEPDIR) to its actual value in the expansion.
1858
for file in `sed -n -e '
1859
/^DEP_FILES = .*\\\\$/ {
1868
/^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
1869
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
1870
# Make sure the directory exists.
1871
test -f "$dirpart/$file" && continue
1872
fdir=`AS_DIRNAME(["$file"])`
1873
AS_MKDIR_P([$dirpart/$fdir])
1874
# echo "creating $dirpart/$file"
1875
echo '# dummy' > "$dirpart/$file"
1878
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
1881
# AM_OUTPUT_DEPENDENCY_COMMANDS
1882
# -----------------------------
1883
# This macro should only be invoked once -- use via AC_REQUIRE.
1885
# This code is only required when automatic dependency tracking
1886
# is enabled. FIXME. This creates each `.P' file that we will
1887
# need in order to bootstrap the dependency handling code.
1888
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
1889
[AC_CONFIG_COMMANDS([depfiles],
1890
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
1891
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
1894
# Check to see how 'make' treats includes. -*- Autoconf -*-
1896
# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
1898
# This program is free software; you can redistribute it and/or modify
1899
# it under the terms of the GNU General Public License as published by
1900
# the Free Software Foundation; either version 2, or (at your option)
1901
# any later version.
1903
# This program is distributed in the hope that it will be useful,
1904
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1905
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1906
# GNU General Public License for more details.
1908
# You should have received a copy of the GNU General Public License
1909
# along with this program; if not, write to the Free Software
1910
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1917
# Check to see how make treats includes.
1918
AC_DEFUN([AM_MAKE_INCLUDE],
1919
[am_make=${MAKE-make}
1920
cat > confinc << 'END'
1924
# If we don't find an include directive, just comment out the code.
1925
AC_MSG_CHECKING([for style of include used by $am_make])
1929
# First try GNU make style include.
1930
echo "include confinc" > confmf
1931
# We grep out `Entering directory' and `Leaving directory'
1932
# messages which can occur if `w' ends up in MAKEFLAGS.
1933
# In particular we don't look at `^make:' because GNU make might
1934
# be invoked under some other name (usually "gmake"), in which
1935
# case it prints its new name instead of `make'.
1936
if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
1941
# Now try BSD make style include.
1942
if test "$am__include" = "#"; then
1943
echo '.include "confinc"' > confmf
1944
if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
1945
am__include=.include
1950
AC_SUBST(am__include)
1952
AC_MSG_RESULT($_am_result)
1953
rm -f confinc confmf
1956
# AM_CONDITIONAL -*- Autoconf -*-
1958
# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
1960
# This program is free software; you can redistribute it and/or modify
1961
# it under the terms of the GNU General Public License as published by
1962
# the Free Software Foundation; either version 2, or (at your option)
1963
# any later version.
1965
# This program is distributed in the hope that it will be useful,
1966
# but WITHOUT ANY WARRANTY; without even the implied warranty of
1967
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1968
# GNU General Public License for more details.
1970
# You should have received a copy of the GNU General Public License
1971
# along with this program; if not, write to the Free Software
1972
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
1979
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1980
# -------------------------------------
1981
# Define a conditional.
1982
AC_DEFUN([AM_CONDITIONAL],
1983
[ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
1984
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1986
AC_SUBST([$1_FALSE])
1994
AC_CONFIG_COMMANDS_PRE(
1995
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1996
AC_MSG_ERROR([conditional "$1" was never defined.
1997
Usually this means the macro was only invoked conditionally.])
2000
# Add --enable-maintainer-mode option to configure.
2003
# Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
2005
# This program is free software; you can redistribute it and/or modify
2006
# it under the terms of the GNU General Public License as published by
2007
# the Free Software Foundation; either version 2, or (at your option)
2008
# any later version.
2010
# This program is distributed in the hope that it will be useful,
2011
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2012
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2013
# GNU General Public License for more details.
2015
# You should have received a copy of the GNU General Public License
2016
# along with this program; if not, write to the Free Software
2017
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2022
AC_DEFUN([AM_MAINTAINER_MODE],
2023
[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
2024
dnl maintainer-mode is disabled by default
2025
AC_ARG_ENABLE(maintainer-mode,
2026
[ --enable-maintainer-mode enable make rules and dependencies not useful
2027
(and sometimes confusing) to the casual installer],
2028
USE_MAINTAINER_MODE=$enableval,
2029
USE_MAINTAINER_MODE=no)
2030
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
2031
AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
2032
MAINT=$MAINTAINER_MODE_TRUE
2037
AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
2039
# isc-posix.m4 serial 2 (gettext-0.11.2)
2040
dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
2041
dnl This file is free software, distributed under the terms of the GNU
2042
dnl General Public License. As a special exception to the GNU General
2043
dnl Public License, this file may be distributed as part of a program
2044
dnl that contains a configuration script generated by Autoconf, under
2045
dnl the same distribution terms as the rest of that program.
2047
# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
2049
# This test replaces the one in autoconf.
2050
# Currently this macro should have the same name as the autoconf macro
2051
# because gettext's gettext.m4 (distributed in the automake package)
2052
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
2053
# give these diagnostics:
2054
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
2055
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
2057
undefine([AC_ISC_POSIX])
2059
AC_DEFUN([AC_ISC_POSIX],
2061
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
2062
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
2067
# Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
2069
# This program is free software; you can redistribute it and/or modify
2070
# it under the terms of the GNU General Public License as published by
2071
# the Free Software Foundation; either version 2, or (at your option)
2072
# any later version.
2074
# This program is distributed in the hope that it will be useful,
2075
# but WITHOUT ANY WARRANTY; without even the implied warranty of
2076
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2077
# GNU General Public License for more details.
2079
# You should have received a copy of the GNU General Public License
2080
# along with this program; if not, write to the Free Software
2081
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
2086
# @defmac AC_PROG_CC_STDC
2087
# @maindex PROG_CC_STDC
2089
# If the C compiler in not in ANSI C mode by default, try to add an option
2090
# to output variable @code{CC} to make it so. This macro tries various
2091
# options that select ANSI C on some system or another. It considers the
2092
# compiler to be in ANSI C mode if it handles function prototypes correctly.
2094
# If you use this macro, you should check after calling it whether the C
2095
# compiler has been set to accept ANSI C; if not, the shell variable
2096
# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
2097
# code in ANSI C, you can make an un-ANSIfied copy of it by using the
2098
# program @code{ansi2knr}, which comes with Ghostscript.
2101
AC_DEFUN([AM_PROG_CC_STDC],
2102
[AC_REQUIRE([AC_PROG_CC])
2103
AC_BEFORE([$0], [AC_C_INLINE])
2104
AC_BEFORE([$0], [AC_C_CONST])
2105
dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require
2106
dnl a magic option to avoid problems with ANSI preprocessor commands
2108
dnl FIXME: can't do this because then AC_AIX won't work due to a
2109
dnl circular dependency.
2110
dnl AC_BEFORE([$0], [AC_PROG_CPP])
2111
AC_MSG_CHECKING([for ${CC-cc} option to accept ANSI C])
2112
AC_CACHE_VAL(am_cv_prog_cc_stdc,
2113
[am_cv_prog_cc_stdc=no
2115
# Don't try gcc -ansi; that turns off useful extensions and
2116
# breaks some systems' header files.
2117
# AIX -qlanglvl=ansi
2118
# Ultrix and OSF/1 -std1
2119
# HP-UX 10.20 and later -Ae
2120
# HP-UX older versions -Aa -D_HPUX_SOURCE
2121
# SVR4 -Xc -D__EXTENSIONS__
2122
for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2124
CC="$ac_save_CC $ac_arg"
2126
[#include <stdarg.h>
2128
#include <sys/types.h>
2129
#include <sys/stat.h>
2130
/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
2131
struct buf { int x; };
2132
FILE * (*rcsopen) (struct buf *, struct stat *, int);
2133
static char *e (p, i)
2139
static char *f (char * (*g) (char **, int), char **p, ...)
2144
s = g (p, va_arg (v,int));
2148
int test (int i, double x);
2149
struct s1 {int (*f) (int a);};
2150
struct s2 {int (*f) (double a);};
2151
int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2155
return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
2157
[am_cv_prog_cc_stdc="$ac_arg"; break])
2161
if test -z "$am_cv_prog_cc_stdc"; then
2162
AC_MSG_RESULT([none needed])
2164
AC_MSG_RESULT([$am_cv_prog_cc_stdc])
2166
case "x$am_cv_prog_cc_stdc" in
2168
*) CC="$CC $am_cv_prog_cc_stdc" ;;
2172
AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC])