1 dnl aclocal.m4 generated automatically by aclocal 1.4
3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
4 dnl This file 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 GAS_CHECK_DECL_NEEDED(name, typedefname, typedef, headers)
14 AC_DEFUN(GAS_CHECK_DECL_NEEDED,[
15 AC_MSG_CHECKING(whether declaration is required for $1)
16 AC_CACHE_VAL(gas_cv_decl_needed_$1,
22 ], gas_cv_decl_needed_$1=no, gas_cv_decl_needed_$1=yes))dnl
23 AC_MSG_RESULT($gas_cv_decl_needed_$1)
24 if test $gas_cv_decl_needed_$1 = yes; then
25 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
26 [Define if $1 is not declared in system header files.])
30 dnl Some non-ANSI preprocessors botch requoting inside strings. That's bad
31 dnl enough, but on some of those systems, the assert macro relies on requoting
33 dnl GAS_WORKING_ASSERT
34 AC_DEFUN(GAS_WORKING_ASSERT,
35 [AC_MSG_CHECKING([for working assert macro])
36 AC_CACHE_VAL(gas_cv_assert_ok,
37 AC_TRY_LINK([#include <assert.h>
38 #include <stdio.h>], [
39 /* check for requoting problems */
40 static int a, b, c, d;
42 assert (!strcmp(s, "foo bar baz quux"));
43 /* check for newline handling */
46 ], gas_cv_assert_ok=yes, gas_cv_assert_ok=no))dnl
47 AC_MSG_RESULT($gas_cv_assert_ok)
48 test $gas_cv_assert_ok = yes || AC_DEFINE(BROKEN_ASSERT, 1, [assert broken?])
51 dnl Since many Bourne shell implementations lack subroutines, use this
52 dnl hack to simplify the code in configure.in.
55 [_gas_uniq_list="[$]$1"
57 dnl Protect against empty input list.
58 for _gas_uniq_i in _gas_uniq_dummy [$]_gas_uniq_list ; do
59 case [$]_gas_uniq_i in
61 *) case " [$]_gas_uniq_newlist " in
62 *" [$]_gas_uniq_i "*) ;;
63 *) _gas_uniq_newlist="[$]_gas_uniq_newlist [$]_gas_uniq_i" ;;
67 $1=[$]_gas_uniq_newlist
70 # Do all the work for Automake. This macro actually does too much --
71 # some checks are only needed if your package does certain things.
72 # But this isn't really a big deal.
77 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
79 AC_DEFUN(AM_INIT_AUTOMAKE,
80 [AC_REQUIRE([AC_PROG_INSTALL])
85 dnl test to see if srcdir already configured
86 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
87 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
90 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
91 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
92 AC_REQUIRE([AM_SANITY_CHECK])
93 AC_REQUIRE([AC_ARG_PROGRAM])
94 dnl FIXME This is truly gross.
95 missing_dir=`cd $ac_aux_dir && pwd`
96 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
97 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
98 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
99 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
100 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
101 AC_REQUIRE([AC_PROG_MAKE_SET])])
104 # Check to make sure that the build environment is sane.
107 AC_DEFUN(AM_SANITY_CHECK,
108 [AC_MSG_CHECKING([whether build environment is sane])
111 echo timestamp > conftestfile
112 # Do `set' in a subshell so we don't clobber the current shell's
113 # arguments. Must try -L first in case configure is actually a
114 # symlink; some systems play weird games with the mod time of symlinks
115 # (eg FreeBSD returns the mod time of the symlink's containing
118 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
119 if test "[$]*" = "X"; then
121 set X `ls -t $srcdir/configure conftestfile`
123 if test "[$]*" != "X $srcdir/configure conftestfile" \
124 && test "[$]*" != "X conftestfile $srcdir/configure"; then
126 # If neither matched, then we have a broken ls. This can happen
127 # if, for instance, CONFIG_SHELL is bash and it inherits a
128 # broken ls alias from the environment. This has actually
129 # happened. Such a system could not be considered "sane".
130 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
131 alias in your environment])
134 test "[$]2" = conftestfile
140 AC_MSG_ERROR([newly created file is older than distributed files!
141 Check your system clock])
146 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
147 dnl The program must properly implement --version.
148 AC_DEFUN(AM_MISSING_PROG,
149 [AC_MSG_CHECKING(for working $2)
150 # Run test in a subshell; some versions of sh will print an error if
151 # an executable is not found, even if stderr is redirected.
152 # Redirect stdin to placate older versions of autoconf. Sigh.
153 if ($2 --version) < /dev/null > /dev/null 2>&1; then
158 AC_MSG_RESULT(missing)
163 # serial 35 AC_PROG_LIBTOOL
164 AC_DEFUN(AC_PROG_LIBTOOL,
165 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
167 # Save cache, so that ltconfig can load it
170 # Actually configure libtool. ac_aux_dir is where install-sh is found.
171 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
172 LD="$LD" NM="$NM" RANLIB="$RANLIB" LN_S="$LN_S" \
173 DLLTOOL="$DLLTOOL" AS="$AS" \
174 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
175 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
176 || AC_MSG_ERROR([libtool configure failed])
178 # Reload cache, that may have been modified by ltconfig
181 # This can be used to rebuild libtool when needed
182 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
184 # Always use our own libtool.
185 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
188 # Redirect the config.log output again, so that the ltconfig log is not
189 # clobbered by the next message.
193 AC_DEFUN(AC_LIBTOOL_SETUP,
195 AC_REQUIRE([AC_ENABLE_SHARED])dnl
196 AC_REQUIRE([AC_ENABLE_STATIC])dnl
197 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
198 AC_REQUIRE([AC_CANONICAL_HOST])dnl
199 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
200 AC_REQUIRE([AC_PROG_RANLIB])dnl
201 AC_REQUIRE([AC_PROG_CC])dnl
202 AC_REQUIRE([AC_PROG_LD])dnl
203 AC_REQUIRE([AC_PROG_NM])dnl
204 AC_REQUIRE([AC_SYS_NM_PARSE])dnl
205 AC_REQUIRE([AC_SYS_SYMBOL_UNDERSCORE])dnl
206 AC_REQUIRE([AC_PROG_LN_S])dnl
209 # Check for any special flags to pass to ltconfig.
210 libtool_flags="--cache-file=$cache_file"
211 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
212 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
213 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
214 test "$lt_dlopen" = yes && libtool_flags="$libtool_flags --enable-dlopen"
215 test "$silent" = yes && libtool_flags="$libtool_flags --silent"
216 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
217 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
219 # Some flags need to be propagated to the compiler or linker for good
223 # Find out which ABI we are using.
224 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
225 if AC_TRY_EVAL(ac_compile); then
226 case "`/usr/bin/file conftest.o`" in
242 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
243 SAVE_CFLAGS="$CFLAGS"
244 CFLAGS="$CFLAGS -belf"
245 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
246 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
247 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
248 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
249 CFLAGS="$SAVE_CFLAGS"
254 AC_SYS_LIBTOOL_CYGWIN
259 # enable the --disable-libtool-lock switch
261 AC_ARG_ENABLE(libtool-lock,
262 [ --disable-libtool-lock force libtool not to do file locking],
263 need_locks=$enableval,
266 if test x"$need_locks" = xno; then
267 libtool_flags="$libtool_flags --disable-lock"
271 # AC_LIBTOOL_DLOPEN - check for dlopen support
272 AC_DEFUN(AC_LIBTOOL_DLOPEN, [lt_dlopen=yes])
274 # AC_ENABLE_SHARED - implement the --enable-shared flag
275 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
276 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
278 AC_DEFUN(AC_ENABLE_SHARED,
279 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
280 AC_ARG_ENABLE(shared,
281 changequote(<<, >>)dnl
282 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
284 [p=${PACKAGE-default}
286 yes) enable_shared=yes ;;
287 no) enable_shared=no ;;
290 # Look at the argument we got. We use all the common list separators.
291 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
292 for pkg in $enableval; do
293 if test "X$pkg" = "X$p"; then
300 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
303 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
304 AC_DEFUN(AC_DISABLE_SHARED,
305 [AC_ENABLE_SHARED(no)])
307 # AC_ENABLE_STATIC - implement the --enable-static flag
308 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
309 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
311 AC_DEFUN(AC_ENABLE_STATIC,
312 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
313 AC_ARG_ENABLE(static,
314 changequote(<<, >>)dnl
315 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
317 [p=${PACKAGE-default}
319 yes) enable_static=yes ;;
320 no) enable_static=no ;;
323 # Look at the argument we got. We use all the common list separators.
324 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
325 for pkg in $enableval; do
326 if test "X$pkg" = "X$p"; then
333 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
336 # AC_DISABLE_STATIC - set the default static flag to --disable-static
337 AC_DEFUN(AC_DISABLE_STATIC,
338 [AC_ENABLE_STATIC(no)])
341 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
342 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
343 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
345 AC_DEFUN(AC_ENABLE_FAST_INSTALL,
346 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
347 AC_ARG_ENABLE(fast-install,
348 changequote(<<, >>)dnl
349 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
351 [p=${PACKAGE-default}
353 yes) enable_fast_install=yes ;;
354 no) enable_fast_install=no ;;
356 enable_fast_install=no
357 # Look at the argument we got. We use all the common list separators.
358 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
359 for pkg in $enableval; do
360 if test "X$pkg" = "X$p"; then
361 enable_fast_install=yes
367 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
370 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
371 AC_DEFUN(AC_DISABLE_FAST_INSTALL,
372 [AC_ENABLE_FAST_INSTALL(no)])
375 # AC_PROG_LD - find the path to the GNU or non-GNU linker
378 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
379 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
380 AC_REQUIRE([AC_PROG_CC])dnl
381 AC_REQUIRE([AC_CANONICAL_HOST])dnl
382 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
384 if test "$ac_cv_prog_gcc" = yes; then
385 # Check if gcc -print-prog-name=ld gives a path.
386 AC_MSG_CHECKING([for ld used by GCC])
387 ac_prog=`($CC -print-prog-name=ld) 2>&5`
389 # Accept absolute paths.
391 /* | [A-Za-z]:[\\/]*)
392 re_direlt='/[^/][^/]*/\.\./'
394 # Canonicalize the path of ld
395 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
396 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
397 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
399 test -z "$LD" && LD="$ac_prog"
402 # If it fails, then pretend we aren't using GCC.
406 # If it is relative, then search for the first ld in PATH.
410 elif test "$with_gnu_ld" = yes; then
411 AC_MSG_CHECKING([for GNU ld])
413 AC_MSG_CHECKING([for non-GNU ld])
415 AC_CACHE_VAL(ac_cv_path_LD,
416 [if test -z "$LD"; then
417 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
418 for ac_dir in $PATH; do
419 test -z "$ac_dir" && ac_dir=.
420 if test -f "$ac_dir/$ac_prog"; then
421 ac_cv_path_LD="$ac_dir/$ac_prog"
422 # Check to see if the program is GNU ld. I'd rather use --version,
423 # but apparently some GNU ld's only accept -v.
424 # Break only if it was the GNU/non-GNU ld that we prefer.
425 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
426 test "$with_gnu_ld" != no && break
428 test "$with_gnu_ld" != yes && break
434 ac_cv_path_LD="$LD" # Let the user override the test with a path.
437 if test -n "$LD"; then
442 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
447 AC_DEFUN(AC_PROG_LD_GNU,
448 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
449 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
450 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
451 ac_cv_prog_gnu_ld=yes
457 # AC_PROG_NM - find the path to a BSD-compatible name lister
459 [AC_MSG_CHECKING([for BSD-compatible nm])
460 AC_CACHE_VAL(ac_cv_path_NM,
461 [if test -n "$NM"; then
462 # Let the user override the test.
465 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
466 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
467 test -z "$ac_dir" && ac_dir=.
468 if test -f $ac_dir/nm; then
469 # Check to see if the nm accepts a BSD-compat flag.
470 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
471 # nm: unknown option "B" ignored
472 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
473 ac_cv_path_NM="$ac_dir/nm -B"
475 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
476 ac_cv_path_NM="$ac_dir/nm -p"
479 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
480 continue # so that we can try to find one that supports BSD flags
485 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
492 # AC_SYS_NM_PARSE - Check for command to grab the raw symbol name followed
493 # by C symbol name from nm.
494 AC_DEFUN(AC_SYS_NM_PARSE,
495 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
496 AC_REQUIRE([AC_PROG_NM])dnl
497 # Check for command to grab the raw symbol name followed by C symbol from nm.
498 AC_MSG_CHECKING([command to parse $NM output])
499 AC_CACHE_VAL(ac_cv_sys_global_symbol_pipe,
500 [# These are sane defaults that work on at least a few old systems.
501 # {They come from Ultrix. What could be older than Ultrix?!! ;)}
504 # Character class describing NM global symbol codes.
505 ac_symcode='[BCDEGRST]'
507 # Regexp to match symbols that can be accessed directly from C.
508 ac_sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
510 # Transform the above into a raw symbol and a C symbol.
511 ac_symxfrm='\1 \2\3 \3'
513 # Transform an extracted symbol line into a proper C declaration
514 ac_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
516 # Define system-specific variables.
522 ac_symcode='[ABCDGISTW]'
525 ac_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
528 ac_symcode='[BCDEGRST]'
535 # If we're using GNU nm, then use its standard symbol codes.
536 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
537 ac_symcode='[ABCDGISTW]'
541 # Try without a prefix undercore, then with it.
542 for ac_symprfx in "" "_"; do
544 ac_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($ac_symcode\)[ ][ ]*\($ac_symprfx\)$ac_sympat$/$ac_symxfrm/p'"
546 # Check to see that the pipe works correctly.
548 rm -f conftest.$ac_ext
549 cat > conftest.$ac_ext <<EOF
554 void nm_test_func(){}
558 int main(){nm_test_var='a';nm_test_func;return 0;}
561 if AC_TRY_EVAL(ac_compile); then
562 # Now try to grab the symbols.
565 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
567 # Try sorting and uniquifying the output.
568 if sort "$ac_nlist" | uniq > "$ac_nlist"T; then
569 mv -f "$ac_nlist"T "$ac_nlist"
574 # Make sure that we snagged all the symbols we need.
575 if egrep ' nm_test_var$' "$ac_nlist" >/dev/null; then
576 if egrep ' nm_test_func$' "$ac_nlist" >/dev/null; then
577 cat <<EOF > conftest.c
583 # Now generate the symbol file.
584 eval "$ac_global_symbol_to_cdecl"' < "$ac_nlist" >> conftest.c'
586 cat <<EOF >> conftest.c
587 #if defined (__STDC__) && __STDC__
588 # define lt_ptr_t void *
590 # define lt_ptr_t char *
594 /* The mapping between symbol names and symbols. */
600 lt_preloaded_symbols[] =
604 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$ac_nlist" >> conftest.c
605 cat <<\EOF >> conftest.c
613 # Now try linking the two files.
614 mv conftest.$ac_objext conftestm.$ac_objext
616 ac_save_CFLAGS="$CFLAGS"
617 LIBS="conftestm.$ac_objext"
618 CFLAGS="$CFLAGS$no_builtin_flag"
619 if AC_TRY_EVAL(ac_link) && test -s conftest; then
622 echo "configure: failed program was:" >&AC_FD_CC
623 cat conftest.c >&AC_FD_CC
626 CFLAGS="$ac_save_CFLAGS"
628 echo "cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
631 echo "cannot find nm_test_var in $ac_nlist" >&AC_FD_CC
634 echo "cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
637 echo "$progname: failed program was:" >&AC_FD_CC
638 cat conftest.c >&AC_FD_CC
642 # Do not use the global_symbol_pipe unless it works.
643 if test "$ac_pipe_works" = yes; then
644 if test x"$ac_symprfx" = x"_"; then
645 ac_cv_sys_symbol_underscore=yes
647 ac_cv_sys_symbol_underscore=no
651 ac_cv_sys_global_symbol_pipe=
657 if test -z "$ac_cv_sys_global_symbol_pipe"; then
660 AC_MSG_RESULT($ac_result)
663 # AC_SYS_LIBTOOL_CYGWIN - find tools needed on cygwin
664 AC_DEFUN(AC_SYS_LIBTOOL_CYGWIN,
665 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
666 AC_CHECK_TOOL(AS, as, false)
669 # AC_SYS_SYMBOL_UNDERSCORE - does the compiler prefix global symbols
670 # with an underscore?
671 AC_DEFUN(AC_SYS_SYMBOL_UNDERSCORE,
672 [AC_REQUIRE([AC_PROG_NM])dnl
673 AC_REQUIRE([AC_SYS_NM_PARSE])dnl
674 AC_MSG_CHECKING([for _ prefix in compiled symbols])
675 AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
676 [ac_cv_sys_symbol_underscore=no
677 cat > conftest.$ac_ext <<EOF
678 void nm_test_func(){}
679 int main(){nm_test_func;return 0;}
681 if AC_TRY_EVAL(ac_compile); then
682 # Now try to grab the symbols.
684 if AC_TRY_EVAL(NM conftest.$ac_objext \| $ac_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
685 # See whether the symbols have a leading underscore.
686 if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
687 ac_cv_sys_symbol_underscore=yes
689 if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
692 echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
696 echo "configure: cannot run $ac_cv_sys_global_symbol_pipe" >&AC_FD_CC
699 echo "configure: failed program was:" >&AC_FD_CC
700 cat conftest.c >&AC_FD_CC
704 AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
705 USE_SYMBOL_UNDERSCORE=${ac_cv_sys_symbol_underscore=no}
706 AC_SUBST(USE_SYMBOL_UNDERSCORE)dnl
709 # AC_CHECK_LIBM - check for math library
710 AC_DEFUN(AC_CHECK_LIBM, [
711 AC_CHECK_LIB(mw, _mwvalidcheckl)
715 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
716 # the libltdl convenience library, adds --enable-ltdl-convenience to
717 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
718 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
719 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
720 # '${top_builddir}/' (note the single quotes!) if your package is not
721 # flat, and, if you're not using automake, define top_builddir as
722 # appropriate in the Makefiles.
723 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [
724 case "$enable_ltdl_convenience" in
725 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
726 "") enable_ltdl_convenience=yes
727 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
729 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
732 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
733 # the libltdl installable library, and adds --enable-ltdl-install to
734 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
735 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
736 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
737 # '${top_builddir}/' (note the single quotes!) if your package is not
738 # flat, and, if you're not using automake, define top_builddir as
739 # appropriate in the Makefiles.
740 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
741 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [
742 AC_CHECK_LIB(ltdl, main, LIBLTDL="-lltdl", [
743 case "$enable_ltdl_install" in
744 no) AC_MSG_WARN([libltdl not installed, but installation disabled]) ;;
745 "") enable_ltdl_install=yes
746 ac_configure_args="$ac_configure_args --enable-ltdl-install" ;;
749 if test x"$enable_ltdl_install" != x"no"; then
750 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
755 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
756 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
757 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
758 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
759 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
760 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
761 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
762 AC_DEFUN(AM_SYS_NM_PARSE, [indir([AC_SYS_NM_PARSE])])dnl
763 AC_DEFUN(AM_SYS_SYMBOL_UNDERSCORE, [indir([AC_SYS_SYMBOL_UNDERSCORE])])dnl
764 AC_DEFUN(AM_SYS_LIBTOOL_CYGWIN, [indir([AC_SYS_LIBTOOL_CYGWIN])])dnl
766 # Like AC_CONFIG_HEADER, but automatically create stamp file.
768 AC_DEFUN(AM_CONFIG_HEADER,
770 AC_CONFIG_HEADER([$1])
771 dnl When config.status generates a header, we must update the stamp-h file.
772 dnl This file resides in the same directory as the config header
773 dnl that is generated. We must strip everything past the first ":",
774 dnl and everything past the last "/".
775 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
776 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
777 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
779 for am_file in <<$1>>; do
780 case " <<$>>CONFIG_HEADERS " in
781 *" <<$>>am_file "*<<)>>
782 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
785 am_indx=`expr "<<$>>am_indx" + 1`
791 dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
792 AC_DEFUN(AM_PROG_LEX,
793 [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1)
794 AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex")
798 # This file is derived from `gettext.m4'. The difference is that the
799 # included macros assume Cygnus-style source and build trees.
801 # Macro to add for using GNU gettext.
802 # Ulrich Drepper <drepper@cygnus.com>, 1995.
804 # This file file be copied and used freely without restrictions. It can
805 # be used in projects which are not available under the GNU Public License
806 # but which still want to provide support for the GNU gettext functionality.
807 # Please note that the actual code is *not* freely available.
811 AC_DEFUN(CY_WITH_NLS,
812 [AC_MSG_CHECKING([whether NLS is requested])
813 dnl Default is enabled NLS
815 [ --disable-nls do not use Native Language Support],
816 USE_NLS=$enableval, USE_NLS=yes)
817 AC_MSG_RESULT($USE_NLS)
820 USE_INCLUDED_LIBINTL=no
822 dnl If we use NLS figure out what method
823 if test "$USE_NLS" = "yes"; then
824 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
825 AC_MSG_CHECKING([whether included gettext is requested])
826 AC_ARG_WITH(included-gettext,
827 [ --with-included-gettext use the GNU gettext library included here],
828 nls_cv_force_use_gnu_gettext=$withval,
829 nls_cv_force_use_gnu_gettext=no)
830 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
832 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
833 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
834 dnl User does not insist on using GNU NLS library. Figure out what
835 dnl to use. If gettext or catgets are available (in this order) we
836 dnl use this. Else we have to fall back to GNU NLS library.
837 dnl catgets is only used if permitted by option --with-catgets.
842 AC_CHECK_HEADER(libintl.h,
843 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
844 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
845 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
847 if test "$gt_cv_func_gettext_libc" != "yes"; then
848 AC_CHECK_LIB(intl, bindtextdomain,
849 [AC_CACHE_CHECK([for gettext in libintl],
850 gt_cv_func_gettext_libintl,
851 [AC_TRY_LINK([], [return (int) gettext ("")],
852 gt_cv_func_gettext_libintl=yes,
853 gt_cv_func_gettext_libintl=no)])])
856 if test "$gt_cv_func_gettext_libc" = "yes" \
857 || test "$gt_cv_func_gettext_libintl" = "yes"; then
858 AC_DEFINE(HAVE_GETTEXT, 1,
859 [Define as 1 if you have gettext and don't want to use GNU gettext.])
860 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
861 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
862 if test "$MSGFMT" != "no"; then
863 AC_CHECK_FUNCS(dcgettext)
864 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
865 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
866 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
867 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
868 return _nl_msg_cat_cntr],
878 dnl In the standard gettext, we would now check for catgets.
879 dnl However, we never want to use catgets for our releases.
881 if test "$CATOBJEXT" = "NONE"; then
882 dnl Neither gettext nor catgets in included in the C library.
883 dnl Fall back on GNU gettext library.
884 nls_cv_use_gnu_gettext=yes
888 if test "$nls_cv_use_gnu_gettext" = "yes"; then
889 dnl Mark actions used to generate GNU NLS library.
890 INTLOBJS="\$(GETTOBJS)"
891 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
892 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
893 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
894 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
895 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
897 USE_INCLUDED_LIBINTL=yes
901 INTLDEPS='$(top_builddir)/../intl/libintl.a'
903 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
904 nls_cv_header_intl=libintl.h
905 nls_cv_header_libgt=libgettext.h
908 dnl Test whether we really found GNU xgettext.
909 if test "$XGETTEXT" != ":"; then
910 dnl If it is no GNU xgettext we define it as : so that the
911 dnl Makefiles still can work.
912 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
916 [found xgettext programs is not GNU xgettext; ignore it])
921 # We need to process the po/ directory.
925 nls_cv_header_intl=libintl.h
926 nls_cv_header_libgt=libgettext.h
929 # If this is used in GNU gettext we have to set USE_NLS to `yes'
930 # because some of the sources are only built for this goal.
931 if test "$PACKAGE" = gettext; then
933 USE_INCLUDED_LIBINTL=yes
936 dnl These rules are solely for the distribution goal. While doing this
937 dnl we only have to keep exactly one list of the available catalogs
939 for lang in $ALL_LINGUAS; do
940 GMOFILES="$GMOFILES $lang.gmo"
941 POFILES="$POFILES $lang.po"
944 dnl Make all variables we use known to autoconf.
945 AC_SUBST(USE_INCLUDED_LIBINTL)
948 AC_SUBST(DATADIRNAME)
958 AC_DEFUN(CY_GNU_GETTEXT,
959 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
960 AC_REQUIRE([AC_PROG_CC])dnl
961 AC_REQUIRE([AC_PROG_RANLIB])dnl
962 AC_REQUIRE([AC_ISC_POSIX])dnl
963 AC_REQUIRE([AC_HEADER_STDC])dnl
964 AC_REQUIRE([AC_C_CONST])dnl
965 AC_REQUIRE([AC_C_INLINE])dnl
966 AC_REQUIRE([AC_TYPE_OFF_T])dnl
967 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
968 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
969 AC_REQUIRE([AC_FUNC_MMAP])dnl
971 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
972 unistd.h values.h sys/param.h])
973 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
974 __argz_count __argz_stringify __argz_next])
976 if test "${ac_cv_func_stpcpy+set}" != "set"; then
977 AC_CHECK_FUNCS(stpcpy)
979 if test "${ac_cv_func_stpcpy}" = "yes"; then
980 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
986 if test "x$CATOBJEXT" != "x"; then
987 if test "x$ALL_LINGUAS" = "x"; then
990 AC_MSG_CHECKING(for catalogs to be installed)
992 for lang in ${LINGUAS=$ALL_LINGUAS}; do
993 case "$ALL_LINGUAS" in
994 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
998 AC_MSG_RESULT($LINGUAS)
1001 dnl Construct list of names of catalog files to be constructed.
1002 if test -n "$LINGUAS"; then
1003 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
1007 dnl The reference to <locale.h> in the installed <libintl.h> file
1008 dnl must be resolved because we cannot expect the users of this
1009 dnl to define HAVE_LOCALE_H.
1010 if test $ac_cv_header_locale_h = yes; then
1011 INCLUDE_LOCALE_H="#include <locale.h>"
1014 /* The system does not provide the header <locale.h>. Take care yourself. */"
1016 AC_SUBST(INCLUDE_LOCALE_H)
1018 dnl Determine which catalog format we have (if any is needed)
1019 dnl For now we know about two different formats:
1020 dnl Linux libc-5 and the normal X/Open format
1021 if test -f $srcdir/po2tbl.sed.in; then
1022 if test "$CATOBJEXT" = ".cat"; then
1023 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
1025 dnl Transform the SED scripts while copying because some dumb SEDs
1026 dnl cannot handle comments.
1027 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
1029 dnl po2tbl.sed is always needed.
1030 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
1031 $srcdir/po2tbl.sed.in > po2tbl.sed
1034 dnl In the intl/Makefile.in we have a special dependency which makes
1035 dnl only sense for gettext. We comment this out for non-gettext
1037 if test "$PACKAGE" = "gettext"; then
1047 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
1048 AC_SUBST(MKINSTALLDIRS)
1050 dnl *** For now the libtool support in intl/Makefile is not for real.
1054 dnl Generate list of files to be processed by xgettext which will
1055 dnl be included in po/Makefile. But only do this if the po directory
1056 dnl exists in srcdir.
1057 if test -d $srcdir/po; then
1058 test -d po || mkdir po
1059 if test "x$srcdir" != "x."; then
1060 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
1061 posrcprefix="$srcdir/"
1063 posrcprefix="../$srcdir/"
1069 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
1070 < $srcdir/po/POTFILES.in > po/POTFILES
1074 # Search path for a program which passes the given test.
1075 # Ulrich Drepper <drepper@cygnus.com>, 1996.
1077 # This file file be copied and used freely without restrictions. It can
1078 # be used in projects which are not available under the GNU Public License
1079 # but which still want to provide support for the GNU gettext functionality.
1080 # Please note that the actual code is *not* freely available.
1084 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
1085 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
1086 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
1087 [# Extract the first word of "$2", so it can be a program name with args.
1088 set dummy $2; ac_word=[$]2
1089 AC_MSG_CHECKING([for $ac_word])
1090 AC_CACHE_VAL(ac_cv_path_$1,
1093 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
1096 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
1097 for ac_dir in ifelse([$5], , $PATH, [$5]); do
1098 test -z "$ac_dir" && ac_dir=.
1099 if test -f $ac_dir/$ac_word; then
1101 ac_cv_path_$1="$ac_dir/$ac_word"
1107 dnl If no 4th arg is given, leave the cache variable unset,
1108 dnl so AC_PATH_PROGS will keep looking.
1109 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
1114 if test -n "[$]$1"; then
1115 AC_MSG_RESULT([$]$1)
1122 # Check whether LC_MESSAGES is available in <locale.h>.
1123 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1125 # This file file be copied and used freely without restrictions. It can
1126 # be used in projects which are not available under the GNU Public License
1127 # but which still want to provide support for the GNU gettext functionality.
1128 # Please note that the actual code is *not* freely available.
1132 AC_DEFUN(AM_LC_MESSAGES,
1133 [if test $ac_cv_header_locale_h = yes; then
1134 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1135 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1136 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1137 if test $am_cv_val_LC_MESSAGES = yes; then
1138 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1139 [Define if your locale.h file contains LC_MESSAGES.])
1143 # Add --enable-maintainer-mode option to configure.
1148 AC_DEFUN(AM_MAINTAINER_MODE,
1149 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
1150 dnl maintainer-mode is disabled by default
1151 AC_ARG_ENABLE(maintainer-mode,
1152 [ --enable-maintainer-mode enable make rules and dependencies not useful
1153 (and sometimes confusing) to the casual installer],
1154 USE_MAINTAINER_MODE=$enableval,
1155 USE_MAINTAINER_MODE=no)
1156 AC_MSG_RESULT($USE_MAINTAINER_MODE)
1157 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
1158 MAINT=$MAINTAINER_MODE_TRUE
1163 # Define a conditional.
1165 AC_DEFUN(AM_CONDITIONAL,