1
dnl aclocal.m4 generated automatically by aclocal 1.3
3
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
4
dnl This Makefile.in is free software; the Free Software Foundation
5
dnl gives unlimited permission to copy and/or distribute it,
6
dnl with or without modifications, as long as this notice is preserved.
8
dnl This program is distributed in the hope that it will be useful,
9
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
10
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11
dnl PARTICULAR PURPOSE.
13
dnl aclocal.m4 generated automatically by aclocal 1.3
15
dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
16
dnl This Makefile.in is free software; the Free Software Foundation
17
dnl gives unlimited permission to copy and/or distribute it,
18
dnl with or without modifications, as long as this notice is preserved.
20
dnl This program is distributed in the hope that it will be useful,
21
dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
22
dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
23
dnl PARTICULAR PURPOSE.
25
# Macro to add for using GNU gettext.
26
# Ulrich Drepper <drepper@cygnus.com>, 1995.
28
# This file can be copied and used freely without restrictions. It can
29
# be used in projects which are not available under the GNU Public License
30
# but which still want to provide support for the GNU gettext functionality.
31
# Please note that the actual code is *not* freely available.
36
[AC_MSG_CHECKING([whether NLS is requested])
37
dnl Default is enabled NLS
39
[ --disable-nls do not use Native Language Support],
40
USE_NLS=$enableval, USE_NLS=yes)
41
AC_MSG_RESULT($USE_NLS)
44
USE_INCLUDED_LIBINTL=no
46
dnl If we use NLS figure out what method
47
if test "$USE_NLS" = "yes"; then
49
AC_MSG_CHECKING([whether included gettext is requested])
50
AC_ARG_WITH(included-gettext,
51
[ --with-included-gettext use the GNU gettext library included here],
52
nls_cv_force_use_gnu_gettext=$withval,
53
nls_cv_force_use_gnu_gettext=no)
54
AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
56
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
57
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
58
dnl User does not insist on using GNU NLS library. Figure out what
59
dnl to use. If gettext or catgets are available (in this order) we
60
dnl use this. Else we have to fall back to GNU NLS library.
61
dnl catgets is only used if permitted by option --with-catgets.
66
AC_CHECK_HEADER(libintl.h,
67
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
68
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
69
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
71
if test "$gt_cv_func_gettext_libc" != "yes"; then
72
AC_CHECK_LIB(intl, bindtextdomain,
73
[AC_CACHE_CHECK([for gettext in libintl],
74
gt_cv_func_gettext_libintl,
75
[AC_CHECK_LIB(intl, gettext,
76
gt_cv_func_gettext_libintl=yes,
77
gt_cv_func_gettext_libintl=no)],
78
gt_cv_func_gettext_libintl=no)])
81
if test "$gt_cv_func_gettext_libc" = "yes" \
82
|| test "$gt_cv_func_gettext_libintl" = "yes"; then
83
AC_DEFINE(HAVE_GETTEXT)
84
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
85
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
86
if test "$MSGFMT" != "no"; then
87
AC_CHECK_FUNCS(dcgettext)
88
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
89
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
90
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
91
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
92
return _nl_msg_cat_cntr],
102
if test "$CATOBJEXT" = "NONE"; then
103
AC_MSG_CHECKING([whether catgets can be used])
105
[ --with-catgets use catgets functions if available],
106
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
107
AC_MSG_RESULT($nls_cv_use_catgets)
109
if test "$nls_cv_use_catgets" = "yes"; then
110
dnl No gettext in C library. Try catgets next.
111
AC_CHECK_LIB(i, main)
112
AC_CHECK_FUNC(catgets,
113
[AC_DEFINE(HAVE_CATGETS)
114
INTLOBJS="\$(CATOBJS)"
115
AC_PATH_PROG(GENCAT, gencat, no)dnl
116
if test "$GENCAT" != "no"; then
117
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
118
if test "$GMSGFMT" = "no"; then
119
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
120
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
122
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
123
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
124
USE_INCLUDED_LIBINTL=yes
128
INTLDEPS='$(top_builddir)/intl/libintl.a'
130
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
131
nls_cv_header_intl=intl/libintl.h
132
nls_cv_header_libgt=intl/libgettext.h
137
if test "$CATOBJEXT" = "NONE"; then
138
dnl Neither gettext nor catgets in included in the C library.
139
dnl Fall back on GNU gettext library.
140
nls_cv_use_gnu_gettext=yes
144
if test "$nls_cv_use_gnu_gettext" = "yes"; then
145
dnl Mark actions used to generate GNU NLS library.
146
INTLOBJS="\$(GETTOBJS)"
147
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
148
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
149
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
150
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
151
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
153
USE_INCLUDED_LIBINTL=yes
157
INTLDEPS='$(top_builddir)/intl/libintl.a'
159
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
160
nls_cv_header_intl=intl/libintl.h
161
nls_cv_header_libgt=intl/libgettext.h
164
dnl Test whether we really found GNU xgettext.
165
if test "$XGETTEXT" != ":"; then
166
dnl If it is no GNU xgettext we define it as : so that the
167
dnl Makefiles still can work.
168
if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
172
[found xgettext program is not GNU xgettext; ignore it])
177
# We need to process the po/ directory.
181
nls_cv_header_intl=intl/libintl.h
182
nls_cv_header_libgt=intl/libgettext.h
184
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
186
[case "$CONFIG_FILES" in *po/Makefile.in*)
187
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
191
# If this is used in GNU gettext we have to set USE_NLS to `yes'
192
# because some of the sources are only built for this goal.
193
if test "$PACKAGE" = gettext; then
195
USE_INCLUDED_LIBINTL=yes
198
dnl These rules are solely for the distribution goal. While doing this
199
dnl we only have to keep exactly one list of the available catalogs
201
for lang in $ALL_LINGUAS; do
202
GMOFILES="$GMOFILES $lang.gmo"
203
POFILES="$POFILES $lang.po"
206
dnl Make all variables we use known to autoconf.
207
AC_SUBST(USE_INCLUDED_LIBINTL)
210
AC_SUBST(DATADIRNAME)
220
AC_DEFUN(AM_GNU_GETTEXT,
221
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
222
AC_REQUIRE([AC_PROG_CC])dnl
223
AC_REQUIRE([AC_PROG_RANLIB])dnl
224
AC_REQUIRE([AC_ISC_POSIX])dnl
225
AC_REQUIRE([AC_HEADER_STDC])dnl
226
AC_REQUIRE([AC_C_CONST])dnl
227
AC_REQUIRE([AC_C_INLINE])dnl
228
AC_REQUIRE([AC_TYPE_OFF_T])dnl
229
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
230
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
231
AC_REQUIRE([AC_FUNC_MMAP])dnl
233
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
234
unistd.h sys/param.h])
235
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
236
strdup __argz_count __argz_stringify __argz_next])
238
if test "${ac_cv_func_stpcpy+set}" != "set"; then
239
AC_CHECK_FUNCS(stpcpy)
241
if test "${ac_cv_func_stpcpy}" = "yes"; then
242
AC_DEFINE(HAVE_STPCPY)
248
if test "x$CATOBJEXT" != "x"; then
249
if test "x$ALL_LINGUAS" = "x"; then
252
AC_MSG_CHECKING(for catalogs to be installed)
254
for lang in ${LINGUAS=$ALL_LINGUAS}; do
255
case "$ALL_LINGUAS" in
256
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
260
AC_MSG_RESULT($LINGUAS)
263
dnl Construct list of names of catalog files to be constructed.
264
if test -n "$LINGUAS"; then
265
for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
269
dnl The reference to <locale.h> in the installed <libintl.h> file
270
dnl must be resolved because we cannot expect the users of this
271
dnl to define HAVE_LOCALE_H.
272
if test $ac_cv_header_locale_h = yes; then
273
INCLUDE_LOCALE_H="#include <locale.h>"
276
/* The system does not provide the header <locale.h>. Take care yourself. */"
278
AC_SUBST(INCLUDE_LOCALE_H)
280
dnl Determine which catalog format we have (if any is needed)
281
dnl For now we know about two different formats:
282
dnl Linux libc-5 and the normal X/Open format
283
test -d intl || mkdir intl
284
if test "$CATOBJEXT" = ".cat"; then
285
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
287
dnl Transform the SED scripts while copying because some dumb SEDs
288
dnl cannot handle comments.
289
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
291
dnl po2tbl.sed is always needed.
292
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
293
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
295
dnl In the intl/Makefile.in we have a special dependency which makes
296
dnl only sense for gettext. We comment this out for non-gettext
298
if test "$PACKAGE" = "gettext"; then
308
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
309
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
310
dnl Try to locate is.
312
if test -n "$ac_aux_dir"; then
313
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
315
if test -z "$MKINSTALLDIRS"; then
316
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
318
AC_SUBST(MKINSTALLDIRS)
320
dnl *** For now the libtool support in intl/Makefile is not for real.
324
dnl Generate list of files to be processed by xgettext which will
325
dnl be included in po/Makefile.
326
test -d po || mkdir po
327
if test "x$srcdir" != "x."; then
328
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
329
posrcprefix="$srcdir/"
331
posrcprefix="../$srcdir/"
337
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
338
< $srcdir/po/POTFILES.in > po/POTFILES
341
# Search path for a program which passes the given test.
342
# Ulrich Drepper <drepper@cygnus.com>, 1996.
344
# This file can be copied and used freely without restrictions. It can
345
# be used in projects which are not available under the GNU Public License
346
# but which still want to provide support for the GNU gettext functionality.
347
# Please note that the actual code is *not* freely available.
351
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
352
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
353
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
354
[# Extract the first word of "$2", so it can be a program name with args.
355
set dummy $2; ac_word=[$]2
356
AC_MSG_CHECKING([for $ac_word])
357
AC_CACHE_VAL(ac_cv_path_$1,
360
ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
363
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
364
for ac_dir in ifelse([$5], , $PATH, [$5]); do
365
test -z "$ac_dir" && ac_dir=.
366
if test -f $ac_dir/$ac_word; then
368
ac_cv_path_$1="$ac_dir/$ac_word"
374
dnl If no 4th arg is given, leave the cache variable unset,
375
dnl so AC_PATH_PROGS will keep looking.
376
ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
381
if test -n "[$]$1"; then
389
# Check whether LC_MESSAGES is available in <locale.h>.
390
# Ulrich Drepper <drepper@cygnus.com>, 1995.
392
# This file can be copied and used freely without restrictions. It can
393
# be used in projects which are not available under the GNU Public License
394
# but which still want to provide support for the GNU gettext functionality.
395
# Please note that the actual code is *not* freely available.
399
AC_DEFUN(AM_LC_MESSAGES,
400
[if test $ac_cv_header_locale_h = yes; then
401
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
402
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
403
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
404
if test $am_cv_val_LC_MESSAGES = yes; then
405
AC_DEFINE(HAVE_LC_MESSAGES)
409
# Like AC_CONFIG_HEADER, but automatically create stamp file.
411
AC_DEFUN(AM_CONFIG_HEADER,
413
AC_CONFIG_HEADER([$1])
414
dnl When config.status generates a header, we must update the stamp-h file.
415
dnl This file resides in the same directory as the config header
416
dnl that is generated. We must strip everything past the first ":",
417
dnl and everything past the last "/".
418
AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
419
ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
420
<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
422
for am_file in <<$1>>; do
423
case " <<$>>CONFIG_HEADERS " in
424
*" <<$>>am_file "*<<)>>
425
echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
428
am_indx=`expr "<<$>>am_indx" + 1`
432
# Do all the work for Automake. This macro actually does too much --
433
# some checks are only needed if your package does certain things.
434
# But this isn't really a big deal.
439
dnl AM_INIT_AUTOMAKE(package,version, [no-define])
441
AC_DEFUN(AM_INIT_AUTOMAKE,
442
[AC_REQUIRE([AC_PROG_INSTALL])
447
dnl test to see if srcdir already configured
448
if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
449
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
452
AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
453
AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
454
AC_REQUIRE([AM_SANITY_CHECK])
455
AC_REQUIRE([AC_ARG_PROGRAM])
456
dnl FIXME This is truly gross.
457
missing_dir=`cd $ac_aux_dir && pwd`
458
AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
459
AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
460
AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
461
AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
462
AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
463
AC_REQUIRE([AC_PROG_MAKE_SET])])
468
AC_DEFUN(AM_PROG_INSTALL,
469
[AC_REQUIRE([AC_PROG_INSTALL])
470
test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
471
AC_SUBST(INSTALL_SCRIPT)dnl
475
# Check to make sure that the build environment is sane.
478
AC_DEFUN(AM_SANITY_CHECK,
479
[AC_MSG_CHECKING([whether build environment is sane])
482
echo timestamp > conftestfile
483
# Do `set' in a subshell so we don't clobber the current shell's
484
# arguments. Must try -L first in case configure is actually a
485
# symlink; some systems play weird games with the mod time of symlinks
486
# (eg FreeBSD returns the mod time of the symlink's containing
489
set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
490
if test "[$]*" = "X"; then
492
set X `ls -t $srcdir/configure conftestfile`
494
if test "[$]*" != "X $srcdir/configure conftestfile" \
495
&& test "[$]*" != "X conftestfile $srcdir/configure"; then
497
# If neither matched, then we have a broken ls. This can happen
498
# if, for instance, CONFIG_SHELL is bash and it inherits a
499
# broken ls alias from the environment. This has actually
500
# happened. Such a system could not be considered "sane".
501
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
502
alias in your environment])
505
test "[$]2" = conftestfile
511
AC_MSG_ERROR([newly created file is older than distributed files!
512
Check your system clock])
517
dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
518
dnl The program must properly implement --version.
519
AC_DEFUN(AM_MISSING_PROG,
520
[AC_MSG_CHECKING(for working $2)
521
# Run test in a subshell; some versions of sh will print an error if
522
# an executable is not found, even if stderr is redirected.
523
# Redirect stdin to placate older versions of autoconf. Sigh.
524
if ($2 --version) < /dev/null > /dev/null 2>&1; then
529
AC_MSG_RESULT(missing)
534
# serial 25 AM_PROG_LIBTOOL
535
AC_DEFUN(AM_PROG_LIBTOOL,
536
[AC_REQUIRE([AM_ENABLE_SHARED])dnl
537
AC_REQUIRE([AM_ENABLE_STATIC])dnl
538
AC_REQUIRE([AC_CANONICAL_HOST])dnl
539
AC_REQUIRE([AC_PROG_RANLIB])dnl
540
AC_REQUIRE([AC_PROG_CC])dnl
541
AC_REQUIRE([AM_PROG_LD])dnl
542
AC_REQUIRE([AM_PROG_NM])dnl
543
AC_REQUIRE([AC_PROG_LN_S])dnl
545
# Always use our own libtool.
546
LIBTOOL='$(SHELL) $(top_builddir)/libtool'
549
# Check for any special flags to pass to ltconfig.
551
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
552
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
553
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
554
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
555
test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
557
# Some flags need to be propagated to the compiler or linker for good
561
# Find out which ABI we are using.
562
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
563
if AC_TRY_EVAL(ac_compile); then
564
case "`/usr/bin/file conftest.o`" in
580
# On SCO OpenServer 5, we need -belf to get full-featured binaries.
581
CFLAGS="$CFLAGS -belf"
585
# Actually configure libtool. ac_aux_dir is where install-sh is found.
586
CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
587
LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
588
${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
589
$libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
590
|| AC_MSG_ERROR([libtool configure failed])
592
# Redirect the config.log output again, so that the ltconfig log is not
593
# clobbered by the next message.
597
# AM_ENABLE_SHARED - implement the --enable-shared flag
598
# Usage: AM_ENABLE_SHARED[(DEFAULT)]
599
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
601
AC_DEFUN(AM_ENABLE_SHARED,
602
[define([AM_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
603
AC_ARG_ENABLE(shared,
604
changequote(<<, >>)dnl
605
<< --enable-shared[=PKGS] build shared libraries [default=>>AM_ENABLE_SHARED_DEFAULT],
607
[p=${PACKAGE-default}
609
yes) enable_shared=yes ;;
610
no) enable_shared=no ;;
613
# Look at the argument we got. We use all the common list separators.
614
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
615
for pkg in $enableval; do
616
if test "X$pkg" = "X$p"; then
623
enable_shared=AM_ENABLE_SHARED_DEFAULT)dnl
626
# AM_DISABLE_SHARED - set the default shared flag to --disable-shared
627
AC_DEFUN(AM_DISABLE_SHARED,
628
[AM_ENABLE_SHARED(no)])
630
# AM_DISABLE_STATIC - set the default static flag to --disable-static
631
AC_DEFUN(AM_DISABLE_STATIC,
632
[AM_ENABLE_STATIC(no)])
634
# AM_ENABLE_STATIC - implement the --enable-static flag
635
# Usage: AM_ENABLE_STATIC[(DEFAULT)]
636
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
638
AC_DEFUN(AM_ENABLE_STATIC,
639
[define([AM_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
640
AC_ARG_ENABLE(static,
641
changequote(<<, >>)dnl
642
<< --enable-static[=PKGS] build static libraries [default=>>AM_ENABLE_STATIC_DEFAULT],
644
[p=${PACKAGE-default}
646
yes) enable_static=yes ;;
647
no) enable_static=no ;;
650
# Look at the argument we got. We use all the common list separators.
651
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
652
for pkg in $enableval; do
653
if test "X$pkg" = "X$p"; then
660
enable_static=AM_ENABLE_STATIC_DEFAULT)dnl
664
# AM_PROG_LD - find the path to the GNU or non-GNU linker
667
[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
668
test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
669
AC_REQUIRE([AC_PROG_CC])
671
if test "$ac_cv_prog_gcc" = yes; then
672
# Check if gcc -print-prog-name=ld gives a path.
673
AC_MSG_CHECKING([for ld used by GCC])
674
ac_prog=`($CC -print-prog-name=ld) 2>&5`
676
# Accept absolute paths.
678
/* | [A-Za-z]:[\\/]*)
680
test -z "$LD" && LD="$ac_prog"
683
# If it fails, then pretend we aren't using GCC.
687
# If it is relative, then search for the first ld in PATH.
691
elif test "$with_gnu_ld" = yes; then
692
AC_MSG_CHECKING([for GNU ld])
694
AC_MSG_CHECKING([for non-GNU ld])
696
AC_CACHE_VAL(ac_cv_path_LD,
697
[if test -z "$LD"; then
698
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
699
for ac_dir in $PATH; do
700
test -z "$ac_dir" && ac_dir=.
701
if test -f "$ac_dir/$ac_prog"; then
702
ac_cv_path_LD="$ac_dir/$ac_prog"
703
# Check to see if the program is GNU ld. I'd rather use --version,
704
# but apparently some GNU ld's only accept -v.
705
# Break only if it was the GNU/non-GNU ld that we prefer.
706
if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
707
test "$with_gnu_ld" != no && break
709
test "$with_gnu_ld" != yes && break
715
ac_cv_path_LD="$LD" # Let the user override the test with a path.
718
if test -n "$LD"; then
723
test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
728
AC_DEFUN(AM_PROG_LD_GNU,
729
[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
730
[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
731
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
732
ac_cv_prog_gnu_ld=yes
738
# AM_PROG_NM - find the path to a BSD-compatible name lister
740
[AC_MSG_CHECKING([for BSD-compatible nm])
741
AC_CACHE_VAL(ac_cv_path_NM,
742
[if test -n "$NM"; then
743
# Let the user override the test.
746
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
747
for ac_dir in /usr/ucb /usr/ccs/bin $PATH /bin; do
748
test -z "$ac_dir" && ac_dir=.
749
if test -f $ac_dir/nm; then
750
# Check to see if the nm accepts a BSD-compat flag.
751
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
752
# nm: unknown option "B" ignored
753
if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
754
ac_cv_path_NM="$ac_dir/nm -B"
755
elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
756
ac_cv_path_NM="$ac_dir/nm -p"
758
ac_cv_path_NM="$ac_dir/nm"
764
test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
772
# Define a conditional.
774
AC_DEFUN(AM_CONDITIONAL,