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 See whether we need to use fopen-bin.h rather than fopen-same.h.
14 AC_DEFUN(BFD_BINARY_FOPEN,
15 [AC_REQUIRE([AC_CANONICAL_SYSTEM])
18 *-*-msdos* | *-*-go32* | *-*-mingw32* | *-*-cygwin* | *-*-windows*)
20 AC_DEFINE(USE_BINARY_FOPEN, 1, [Use b modifier when opening binary files?]) ;;
23 dnl Get a default for CC_FOR_BUILD to put into Makefile.
24 AC_DEFUN(BFD_CC_FOR_BUILD,
25 [# Put a plausible default for CC_FOR_BUILD in Makefile.
26 if test -z "$CC_FOR_BUILD"; then
27 if test "x$cross_compiling" = "xno"; then
33 AC_SUBST(CC_FOR_BUILD)
34 # Also set EXEEXT_FOR_BUILD.
35 if test "x$cross_compiling" = "xno"; then
36 EXEEXT_FOR_BUILD='$(EXEEXT)'
38 AC_CACHE_CHECK([for build system executable suffix], bfd_cv_build_exeext,
40 echo 'int main () { return 0; }' > conftest.c
42 ${CC_FOR_BUILD} -o conftest conftest.c 1>&5 2>&5
43 for file in conftest.*; do
45 *.c | *.o | *.obj | *.ilk | *.pdb) ;;
46 *) bfd_cv_build_exeext=`echo $file | sed -e s/conftest//` ;;
50 test x"${bfd_cv_build_exeext}" = x && bfd_cv_build_exeext=no])
52 test x"${bfd_cv_build_exeext}" != xno && EXEEXT_FOR_BUILD=${bfd_cv_build_exeext}
54 AC_SUBST(EXEEXT_FOR_BUILD)])dnl
56 dnl See whether we need a declaration for a function.
57 AC_DEFUN(BFD_NEED_DECLARATION,
58 [AC_MSG_CHECKING([whether $1 must be declared])
59 AC_CACHE_VAL(bfd_cv_decl_needed_$1,
75 [char *(*pfn) = (char *(*)) $1],
76 bfd_cv_decl_needed_$1=no, bfd_cv_decl_needed_$1=yes)])
77 AC_MSG_RESULT($bfd_cv_decl_needed_$1)
78 if test $bfd_cv_decl_needed_$1 = yes; then
79 AC_DEFINE([NEED_DECLARATION_]translit($1, [a-z], [A-Z]), 1,
80 [Define if $1 is not declared in system header files.])
84 dnl Check for existence of a type $1 in sys/procfs.h
86 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE,
87 [AC_MSG_CHECKING([for $1 in sys/procfs.h])
88 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1,
89 [AC_TRY_COMPILE([#include <sys/procfs.h>],
91 bfd_cv_have_sys_procfs_type_$1=yes,
92 bfd_cv_have_sys_procfs_type_$1=no
94 if test $bfd_cv_have_sys_procfs_type_$1 = yes; then
95 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z]), 1,
96 [Define if <sys/procfs.h> has $1.])
98 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_$1)
102 dnl Check for existence of member $2 in type $1 in sys/procfs.h
104 AC_DEFUN(BFD_HAVE_SYS_PROCFS_TYPE_MEMBER,
105 [AC_MSG_CHECKING([for $1.$2 in sys/procfs.h])
106 AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2,
107 [AC_TRY_COMPILE([#include <sys/procfs.h>],
108 [$1 avar; void* aref = (void*) &avar.$2],
109 bfd_cv_have_sys_procfs_type_member_$1_$2=yes,
110 bfd_cv_have_sys_procfs_type_member_$1_$2=no
112 if test $bfd_cv_have_sys_procfs_type_member_$1_$2 = yes; then
113 AC_DEFINE([HAVE_]translit($1, [a-z], [A-Z])[_]translit($2, [a-z], [A-Z]), 1,
114 [Define if <sys/procfs.h> has $1.$2.])
116 AC_MSG_RESULT($bfd_cv_have_sys_procfs_type_member_$1_$2)
121 # Do all the work for Automake. This macro actually does too much --
122 # some checks are only needed if your package does certain things.
123 # But this isn't really a big deal.
128 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
130 AC_DEFUN(AM_INIT_AUTOMAKE,
131 [AC_REQUIRE([AC_PROG_INSTALL])
136 dnl test to see if srcdir already configured
137 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
138 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
141 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
142 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
143 AC_REQUIRE([AM_SANITY_CHECK])
144 AC_REQUIRE([AC_ARG_PROGRAM])
145 dnl FIXME This is truly gross.
146 missing_dir=`cd $ac_aux_dir && pwd`
147 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
148 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
149 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
150 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
151 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
152 AC_REQUIRE([AC_PROG_MAKE_SET])])
155 # Check to make sure that the build environment is sane.
158 AC_DEFUN(AM_SANITY_CHECK,
159 [AC_MSG_CHECKING([whether build environment is sane])
162 echo timestamp > conftestfile
163 # Do `set' in a subshell so we don't clobber the current shell's
164 # arguments. Must try -L first in case configure is actually a
165 # symlink; some systems play weird games with the mod time of symlinks
166 # (eg FreeBSD returns the mod time of the symlink's containing
169 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
170 if test "[$]*" = "X"; then
172 set X `ls -t $srcdir/configure conftestfile`
174 if test "[$]*" != "X $srcdir/configure conftestfile" \
175 && test "[$]*" != "X conftestfile $srcdir/configure"; then
177 # If neither matched, then we have a broken ls. This can happen
178 # if, for instance, CONFIG_SHELL is bash and it inherits a
179 # broken ls alias from the environment. This has actually
180 # happened. Such a system could not be considered "sane".
181 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
182 alias in your environment])
185 test "[$]2" = conftestfile
191 AC_MSG_ERROR([newly created file is older than distributed files!
192 Check your system clock])
197 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
198 dnl The program must properly implement --version.
199 AC_DEFUN(AM_MISSING_PROG,
200 [AC_MSG_CHECKING(for working $2)
201 # Run test in a subshell; some versions of sh will print an error if
202 # an executable is not found, even if stderr is redirected.
203 # Redirect stdin to placate older versions of autoconf. Sigh.
204 if ($2 --version) < /dev/null > /dev/null 2>&1; then
209 AC_MSG_RESULT(missing)
214 # serial 40 AC_PROG_LIBTOOL
215 AC_DEFUN(AC_PROG_LIBTOOL,
216 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
218 # Save cache, so that ltconfig can load it
221 # Actually configure libtool. ac_aux_dir is where install-sh is found.
222 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
223 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
224 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
225 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
226 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
227 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
228 || AC_MSG_ERROR([libtool configure failed])
230 # Reload cache, that may have been modified by ltconfig
233 # This can be used to rebuild libtool when needed
234 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
236 # Always use our own libtool.
237 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
240 # Redirect the config.log output again, so that the ltconfig log is not
241 # clobbered by the next message.
245 AC_DEFUN(AC_LIBTOOL_SETUP,
247 AC_REQUIRE([AC_ENABLE_SHARED])dnl
248 AC_REQUIRE([AC_ENABLE_STATIC])dnl
249 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
250 AC_REQUIRE([AC_CANONICAL_HOST])dnl
251 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
252 AC_REQUIRE([AC_PROG_RANLIB])dnl
253 AC_REQUIRE([AC_PROG_CC])dnl
254 AC_REQUIRE([AC_PROG_LD])dnl
255 AC_REQUIRE([AC_PROG_NM])dnl
256 AC_REQUIRE([AC_PROG_LN_S])dnl
259 # Check for any special flags to pass to ltconfig.
260 libtool_flags="--cache-file=$cache_file"
261 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
262 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
263 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
264 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
265 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
266 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
267 [libtool_flags="$libtool_flags --enable-dlopen"])
268 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
269 [libtool_flags="$libtool_flags --enable-win32-dll"])
270 AC_ARG_ENABLE(libtool-lock,
271 [ --disable-libtool-lock avoid locking (might break parallel builds)])
272 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
273 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
275 # Some flags need to be propagated to the compiler or linker for good
279 # Find out which ABI we are using.
280 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
281 if AC_TRY_EVAL(ac_compile); then
282 case "`/usr/bin/file conftest.o`" in
298 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
299 SAVE_CFLAGS="$CFLAGS"
300 CFLAGS="$CFLAGS -belf"
301 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
302 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
303 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
304 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
305 CFLAGS="$SAVE_CFLAGS"
309 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
310 [*-*-cygwin* | *-*-mingw*)
311 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
312 AC_CHECK_TOOL(AS, as, false)
313 AC_CHECK_TOOL(OBJDUMP, objdump, false)
319 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
320 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
322 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
323 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
325 # AC_ENABLE_SHARED - implement the --enable-shared flag
326 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
327 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
329 AC_DEFUN(AC_ENABLE_SHARED, [dnl
330 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
331 AC_ARG_ENABLE(shared,
332 changequote(<<, >>)dnl
333 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
335 [p=${PACKAGE-default}
337 yes) enable_shared=yes ;;
338 no) enable_shared=no ;;
341 # Look at the argument we got. We use all the common list separators.
342 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
343 for pkg in $enableval; do
344 if test "X$pkg" = "X$p"; then
351 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
354 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
355 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
356 AC_ENABLE_SHARED(no)])
358 # AC_ENABLE_STATIC - implement the --enable-static flag
359 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
360 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
362 AC_DEFUN(AC_ENABLE_STATIC, [dnl
363 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
364 AC_ARG_ENABLE(static,
365 changequote(<<, >>)dnl
366 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
368 [p=${PACKAGE-default}
370 yes) enable_static=yes ;;
371 no) enable_static=no ;;
374 # Look at the argument we got. We use all the common list separators.
375 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
376 for pkg in $enableval; do
377 if test "X$pkg" = "X$p"; then
384 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
387 # AC_DISABLE_STATIC - set the default static flag to --disable-static
388 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
389 AC_ENABLE_STATIC(no)])
392 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
393 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
394 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
396 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
397 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
398 AC_ARG_ENABLE(fast-install,
399 changequote(<<, >>)dnl
400 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
402 [p=${PACKAGE-default}
404 yes) enable_fast_install=yes ;;
405 no) enable_fast_install=no ;;
407 enable_fast_install=no
408 # Look at the argument we got. We use all the common list separators.
409 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
410 for pkg in $enableval; do
411 if test "X$pkg" = "X$p"; then
412 enable_fast_install=yes
418 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
421 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
422 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
423 AC_ENABLE_FAST_INSTALL(no)])
425 # AC_PROG_LD - find the path to the GNU or non-GNU linker
428 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
429 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
430 AC_REQUIRE([AC_PROG_CC])dnl
431 AC_REQUIRE([AC_CANONICAL_HOST])dnl
432 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
434 if test "$ac_cv_prog_gcc" = yes; then
435 # Check if gcc -print-prog-name=ld gives a path.
436 AC_MSG_CHECKING([for ld used by GCC])
437 ac_prog=`($CC -print-prog-name=ld) 2>&5`
439 # Accept absolute paths.
441 [\\/]* | [A-Za-z]:[\\/]*)
442 re_direlt='/[^/][^/]*/\.\./'
444 # Canonicalize the path of ld
445 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
446 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
447 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
449 test -z "$LD" && LD="$ac_prog"
452 # If it fails, then pretend we aren't using GCC.
456 # If it is relative, then search for the first ld in PATH.
460 elif test "$with_gnu_ld" = yes; then
461 AC_MSG_CHECKING([for GNU ld])
463 AC_MSG_CHECKING([for non-GNU ld])
465 AC_CACHE_VAL(ac_cv_path_LD,
466 [if test -z "$LD"; then
467 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
468 for ac_dir in $PATH; do
469 test -z "$ac_dir" && ac_dir=.
470 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
471 ac_cv_path_LD="$ac_dir/$ac_prog"
472 # Check to see if the program is GNU ld. I'd rather use --version,
473 # but apparently some GNU ld's only accept -v.
474 # Break only if it was the GNU/non-GNU ld that we prefer.
475 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
476 test "$with_gnu_ld" != no && break
478 test "$with_gnu_ld" != yes && break
484 ac_cv_path_LD="$LD" # Let the user override the test with a path.
487 if test -n "$LD"; then
492 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
496 AC_DEFUN(AC_PROG_LD_GNU,
497 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
498 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
499 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
500 ac_cv_prog_gnu_ld=yes
506 # AC_PROG_NM - find the path to a BSD-compatible name lister
508 [AC_MSG_CHECKING([for BSD-compatible nm])
509 AC_CACHE_VAL(ac_cv_path_NM,
510 [if test -n "$NM"; then
511 # Let the user override the test.
514 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
515 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
516 test -z "$ac_dir" && ac_dir=.
517 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
518 # Check to see if the nm accepts a BSD-compat flag.
519 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
520 # nm: unknown option "B" ignored
521 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
522 ac_cv_path_NM="$ac_dir/nm -B"
524 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
525 ac_cv_path_NM="$ac_dir/nm -p"
528 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
529 continue # so that we can try to find one that supports BSD flags
534 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
540 # AC_CHECK_LIBM - check for math library
541 AC_DEFUN(AC_CHECK_LIBM,
542 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
545 *-*-beos* | *-*-cygwin*)
546 # These system don't have libm
549 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
550 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
553 AC_CHECK_LIB(m, main, LIBM="-lm")
558 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
559 # the libltdl convenience library, adds --enable-ltdl-convenience to
560 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
561 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
562 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
563 # '${top_builddir}/' (note the single quotes!) if your package is not
564 # flat, and, if you're not using automake, define top_builddir as
565 # appropriate in the Makefiles.
566 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
567 case "$enable_ltdl_convenience" in
568 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
569 "") enable_ltdl_convenience=yes
570 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
572 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
573 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
576 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
577 # the libltdl installable library, and adds --enable-ltdl-install to
578 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
579 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
580 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
581 # '${top_builddir}/' (note the single quotes!) if your package is not
582 # flat, and, if you're not using automake, define top_builddir as
583 # appropriate in the Makefiles.
584 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
585 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
586 AC_CHECK_LIB(ltdl, main,
587 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
588 [if test x"$enable_ltdl_install" = xno; then
589 AC_MSG_WARN([libltdl not installed, but installation disabled])
591 enable_ltdl_install=yes
594 if test x"$enable_ltdl_install" = x"yes"; then
595 ac_configure_args="$ac_configure_args --enable-ltdl-install"
596 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
597 INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
599 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
606 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
607 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
608 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
609 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
610 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
611 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
612 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
614 dnl This is just to silence aclocal about the macro not being used
615 ifelse([AC_DISABLE_FAST_INSTALL])dnl
617 # Like AC_CONFIG_HEADER, but automatically create stamp file.
619 AC_DEFUN(AM_CONFIG_HEADER,
621 AC_CONFIG_HEADER([$1])
622 dnl When config.status generates a header, we must update the stamp-h file.
623 dnl This file resides in the same directory as the config header
624 dnl that is generated. We must strip everything past the first ":",
625 dnl and everything past the last "/".
626 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
627 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
628 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
630 for am_file in <<$1>>; do
631 case " <<$>>CONFIG_HEADERS " in
632 *" <<$>>am_file "*<<)>>
633 echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
636 am_indx=`expr "<<$>>am_indx" + 1`
640 # Add --enable-maintainer-mode option to configure.
645 AC_DEFUN(AM_MAINTAINER_MODE,
646 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
647 dnl maintainer-mode is disabled by default
648 AC_ARG_ENABLE(maintainer-mode,
649 [ --enable-maintainer-mode enable make rules and dependencies not useful
650 (and sometimes confusing) to the casual installer],
651 USE_MAINTAINER_MODE=$enableval,
652 USE_MAINTAINER_MODE=no)
653 AC_MSG_RESULT($USE_MAINTAINER_MODE)
654 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
655 MAINT=$MAINTAINER_MODE_TRUE
660 # Define a conditional.
662 AC_DEFUN(AM_CONDITIONAL,
673 # This file is derived from `gettext.m4'. The difference is that the
674 # included macros assume Cygnus-style source and build trees.
676 # Macro to add for using GNU gettext.
677 # Ulrich Drepper <drepper@cygnus.com>, 1995.
679 # This file file be copied and used freely without restrictions. It can
680 # be used in projects which are not available under the GNU Public License
681 # but which still want to provide support for the GNU gettext functionality.
682 # Please note that the actual code is *not* freely available.
686 AC_DEFUN(CY_WITH_NLS,
687 [AC_MSG_CHECKING([whether NLS is requested])
688 dnl Default is enabled NLS
690 [ --disable-nls do not use Native Language Support],
691 USE_NLS=$enableval, USE_NLS=yes)
692 AC_MSG_RESULT($USE_NLS)
695 USE_INCLUDED_LIBINTL=no
697 dnl If we use NLS figure out what method
698 if test "$USE_NLS" = "yes"; then
699 AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested])
700 AC_MSG_CHECKING([whether included gettext is requested])
701 AC_ARG_WITH(included-gettext,
702 [ --with-included-gettext use the GNU gettext library included here],
703 nls_cv_force_use_gnu_gettext=$withval,
704 nls_cv_force_use_gnu_gettext=no)
705 AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
707 nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
708 if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
709 dnl User does not insist on using GNU NLS library. Figure out what
710 dnl to use. If gettext or catgets are available (in this order) we
711 dnl use this. Else we have to fall back to GNU NLS library.
712 dnl catgets is only used if permitted by option --with-catgets.
717 AC_CHECK_HEADER(libintl.h,
718 [AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
719 [AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
720 gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
722 if test "$gt_cv_func_gettext_libc" != "yes"; then
723 AC_CHECK_LIB(intl, bindtextdomain,
724 [AC_CACHE_CHECK([for gettext in libintl],
725 gt_cv_func_gettext_libintl,
726 [AC_TRY_LINK([], [return (int) gettext ("")],
727 gt_cv_func_gettext_libintl=yes,
728 gt_cv_func_gettext_libintl=no)])])
731 if test "$gt_cv_func_gettext_libc" = "yes" \
732 || test "$gt_cv_func_gettext_libintl" = "yes"; then
733 AC_DEFINE(HAVE_GETTEXT, 1,
734 [Define as 1 if you have gettext and don't want to use GNU gettext.])
735 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
736 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
737 if test "$MSGFMT" != "no"; then
738 AC_CHECK_FUNCS(dcgettext)
739 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
740 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
741 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
742 AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
743 return _nl_msg_cat_cntr],
753 dnl In the standard gettext, we would now check for catgets.
754 dnl However, we never want to use catgets for our releases.
756 if test "$CATOBJEXT" = "NONE"; then
757 dnl Neither gettext nor catgets in included in the C library.
758 dnl Fall back on GNU gettext library.
759 nls_cv_use_gnu_gettext=yes
763 if test "$nls_cv_use_gnu_gettext" = "yes"; then
764 dnl Mark actions used to generate GNU NLS library.
765 INTLOBJS="\$(GETTOBJS)"
766 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
767 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
768 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
769 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
770 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
772 USE_INCLUDED_LIBINTL=yes
776 INTLDEPS='$(top_builddir)/../intl/libintl.a'
778 LIBS=`echo $LIBS | sed -e 's/-lintl//'`
779 nls_cv_header_intl=libintl.h
780 nls_cv_header_libgt=libgettext.h
783 dnl Test whether we really found GNU xgettext.
784 if test "$XGETTEXT" != ":"; then
785 dnl If it is no GNU xgettext we define it as : so that the
786 dnl Makefiles still can work.
787 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
791 [found xgettext programs is not GNU xgettext; ignore it])
796 # We need to process the po/ directory.
800 nls_cv_header_intl=libintl.h
801 nls_cv_header_libgt=libgettext.h
804 # If this is used in GNU gettext we have to set USE_NLS to `yes'
805 # because some of the sources are only built for this goal.
806 if test "$PACKAGE" = gettext; then
808 USE_INCLUDED_LIBINTL=yes
811 dnl These rules are solely for the distribution goal. While doing this
812 dnl we only have to keep exactly one list of the available catalogs
814 for lang in $ALL_LINGUAS; do
815 GMOFILES="$GMOFILES $lang.gmo"
816 POFILES="$POFILES $lang.po"
819 dnl Make all variables we use known to autoconf.
820 AC_SUBST(USE_INCLUDED_LIBINTL)
823 AC_SUBST(DATADIRNAME)
833 AC_DEFUN(CY_GNU_GETTEXT,
834 [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
835 AC_REQUIRE([AC_PROG_CC])dnl
836 AC_REQUIRE([AC_PROG_RANLIB])dnl
837 AC_REQUIRE([AC_ISC_POSIX])dnl
838 AC_REQUIRE([AC_HEADER_STDC])dnl
839 AC_REQUIRE([AC_C_CONST])dnl
840 AC_REQUIRE([AC_C_INLINE])dnl
841 AC_REQUIRE([AC_TYPE_OFF_T])dnl
842 AC_REQUIRE([AC_TYPE_SIZE_T])dnl
843 AC_REQUIRE([AC_FUNC_ALLOCA])dnl
844 AC_REQUIRE([AC_FUNC_MMAP])dnl
846 AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
847 unistd.h values.h sys/param.h])
848 AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
849 __argz_count __argz_stringify __argz_next])
851 if test "${ac_cv_func_stpcpy+set}" != "set"; then
852 AC_CHECK_FUNCS(stpcpy)
854 if test "${ac_cv_func_stpcpy}" = "yes"; then
855 AC_DEFINE(HAVE_STPCPY, 1, [Define if you have the stpcpy function])
861 if test "x$CATOBJEXT" != "x"; then
862 if test "x$ALL_LINGUAS" = "x"; then
865 AC_MSG_CHECKING(for catalogs to be installed)
867 for lang in ${LINGUAS=$ALL_LINGUAS}; do
868 case "$ALL_LINGUAS" in
869 *$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
873 AC_MSG_RESULT($LINGUAS)
876 dnl Construct list of names of catalog files to be constructed.
877 if test -n "$LINGUAS"; then
878 for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
882 dnl The reference to <locale.h> in the installed <libintl.h> file
883 dnl must be resolved because we cannot expect the users of this
884 dnl to define HAVE_LOCALE_H.
885 if test $ac_cv_header_locale_h = yes; then
886 INCLUDE_LOCALE_H="#include <locale.h>"
889 /* The system does not provide the header <locale.h>. Take care yourself. */"
891 AC_SUBST(INCLUDE_LOCALE_H)
893 dnl Determine which catalog format we have (if any is needed)
894 dnl For now we know about two different formats:
895 dnl Linux libc-5 and the normal X/Open format
896 if test -f $srcdir/po2tbl.sed.in; then
897 if test "$CATOBJEXT" = ".cat"; then
898 AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
900 dnl Transform the SED scripts while copying because some dumb SEDs
901 dnl cannot handle comments.
902 sed -e '/^#/d' $srcdir/$msgformat-msg.sed > po2msg.sed
904 dnl po2tbl.sed is always needed.
905 sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
906 $srcdir/po2tbl.sed.in > po2tbl.sed
909 dnl In the intl/Makefile.in we have a special dependency which makes
910 dnl only sense for gettext. We comment this out for non-gettext
912 if test "$PACKAGE" = "gettext"; then
922 MKINSTALLDIRS="\$(srcdir)/../../mkinstalldirs"
923 AC_SUBST(MKINSTALLDIRS)
925 dnl *** For now the libtool support in intl/Makefile is not for real.
929 dnl Generate list of files to be processed by xgettext which will
930 dnl be included in po/Makefile. But only do this if the po directory
931 dnl exists in srcdir.
932 if test -d $srcdir/po; then
933 test -d po || mkdir po
934 if test "x$srcdir" != "x."; then
935 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
936 posrcprefix="$srcdir/"
938 posrcprefix="../$srcdir/"
944 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
945 < $srcdir/po/POTFILES.in > po/POTFILES
949 # Search path for a program which passes the given test.
950 # Ulrich Drepper <drepper@cygnus.com>, 1996.
952 # This file file be copied and used freely without restrictions. It can
953 # be used in projects which are not available under the GNU Public License
954 # but which still want to provide support for the GNU gettext functionality.
955 # Please note that the actual code is *not* freely available.
959 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
960 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
961 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
962 [# Extract the first word of "$2", so it can be a program name with args.
963 set dummy $2; ac_word=[$]2
964 AC_MSG_CHECKING([for $ac_word])
965 AC_CACHE_VAL(ac_cv_path_$1,
968 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
971 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
972 for ac_dir in ifelse([$5], , $PATH, [$5]); do
973 test -z "$ac_dir" && ac_dir=.
974 if test -f $ac_dir/$ac_word; then
976 ac_cv_path_$1="$ac_dir/$ac_word"
982 dnl If no 4th arg is given, leave the cache variable unset,
983 dnl so AC_PATH_PROGS will keep looking.
984 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
989 if test -n "[$]$1"; then
997 # Check whether LC_MESSAGES is available in <locale.h>.
998 # Ulrich Drepper <drepper@cygnus.com>, 1995.
1000 # This file file be copied and used freely without restrictions. It can
1001 # be used in projects which are not available under the GNU Public License
1002 # but which still want to provide support for the GNU gettext functionality.
1003 # Please note that the actual code is *not* freely available.
1007 AC_DEFUN(AM_LC_MESSAGES,
1008 [if test $ac_cv_header_locale_h = yes; then
1009 AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
1010 [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
1011 am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
1012 if test $am_cv_val_LC_MESSAGES = yes; then
1013 AC_DEFINE(HAVE_LC_MESSAGES, 1,
1014 [Define if your locale.h file contains LC_MESSAGES.])