1 AC_DEFUN(AM_C_PROTOTYPES,
2 [AC_REQUIRE([AM_PROG_CC_STDC])
3 AC_BEFORE([$0], [AC_C_INLINE])
4 AC_MSG_CHECKING([for function prototypes])
5 if test "$am_cv_prog_cc_stdc" != no; then
11 U=_ ANSI2KNR=./ansi2knr
12 # Ensure some checks needed by ansi2knr itself.
14 AC_CHECK_HEADERS(string.h)
23 # @defmac AC_PROG_CC_STDC
24 # @maindex PROG_CC_STDC
26 # If the C compiler in not in ANSI C mode by default, try to add an option
27 # to output variable @code{CC} to make it so. This macro tries various
28 # options that select ANSI C on some system or another. It considers the
29 # compiler to be in ANSI C mode if it defines @code{__STDC__} to 1 and
30 # handles function prototypes correctly.
32 # If you use this macro, you should check after calling it whether the C
33 # compiler has been set to accept ANSI C; if not, the shell variable
34 # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source
35 # code in ANSI C, you can make an un-ANSIfied copy of it by using the
36 # program @code{ansi2knr}, which comes with Ghostscript.
39 AC_DEFUN(AM_PROG_CC_STDC,
40 [AC_REQUIRE([AC_PROG_CC])
41 AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
42 AC_CACHE_VAL(am_cv_prog_cc_stdc,
43 [am_cv_prog_cc_stdc=no
45 # Don't try gcc -ansi; that turns off useful extensions and
46 # breaks some systems' header files.
48 # Ultrix and OSF/1 -std1
49 # HP-UX -Aa -D_HPUX_SOURCE
50 for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE"
52 CC="$ac_save_CC $ac_arg"
54 [#if !defined(__STDC__)
57 /* DYNIX/ptx V4.1.3 can't compile sys/stat.h with -Xc -D__EXTENSIONS__. */
59 # include <sys/types.h>
60 # include <sys/stat.h>
63 int test (int i, double x);
64 struct s1 {int (*f) (int a);};
65 struct s2 {int (*f) (double a);};],
66 [am_cv_prog_cc_stdc="$ac_arg"; break])
70 AC_MSG_RESULT($am_cv_prog_cc_stdc)
71 case "x$am_cv_prog_cc_stdc" in
73 *) CC="$CC $am_cv_prog_cc_stdc" ;;
77 AC_DEFUN(WGET_STRUCT_UTIMBUF,
78 [AC_MSG_CHECKING(for struct utimbuf)
79 if test x"$ac_cv_header_utime_h" = xyes; then
80 AC_EGREP_CPP([struct[ ]+utimbuf],
82 [AC_DEFINE(HAVE_STRUCT_UTIMBUF)
90 # This code originates from Ulrich Drepper's AM_WITH_NLS.
92 AC_DEFUN(WGET_WITH_NLS,
93 [AC_MSG_CHECKING([whether NLS is requested])
94 dnl Default is enabled NLS
96 [ --disable-nls do not use Native Language Support],
97 HAVE_NLS=$enableval, HAVE_NLS=yes)
98 AC_MSG_RESULT($HAVE_NLS)
100 dnl If something goes wrong, we may still decide not to use NLS.
101 dnl For this reason, defer AC_SUBST'ing HAVE_NLS until the very
104 if test x"$HAVE_NLS" = xyes; then
105 AC_MSG_RESULT("language catalogs: $ALL_LINGUAS")
106 AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
107 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
108 AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
109 [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
111 AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
116 dnl Test whether we really found GNU xgettext.
117 if test "$XGETTEXT" != ":"; then
118 dnl If it is no GNU xgettext we define it as : so that the
119 dnl Makefiles still can work.
120 if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
124 [found xgettext programs is not GNU xgettext; ignore it])
129 AC_CHECK_HEADERS(locale.h libintl.h)
131 AC_CHECK_FUNCS(gettext, [], [
132 AC_CHECK_LIB(intl, gettext, [
133 dnl gettext is in libintl; announce the fact manually.
135 AC_DEFINE(HAVE_GETTEXT)
138 [gettext not found; disabling NLS])
143 dnl These rules are solely for the distribution goal. While doing this
144 dnl we only have to keep exactly one list of the available catalogs
146 for lang in $ALL_LINGUAS; do
147 GMOFILES="$GMOFILES $lang.gmo"
148 POFILES="$POFILES $lang.po"
150 dnl Construct list of names of catalog files to be constructed.
151 for lang in $ALL_LINGUAS; do
152 CATALOGS="$CATALOGS ${lang}${CATOBJEXT}"
155 dnl Make all variables we use known to autoconf.
158 AC_SUBST(DATADIRNAME)
165 dnl Some independently maintained files, such as po/Makefile.in,
166 dnl use `USE_NLS', so support it.
169 if test "x$HAVE_NLS" = xyes; then
174 dnl Generate list of files to be processed by xgettext which will
175 dnl be included in po/Makefile.
177 dnl This is not strictly an Autoconf macro, because it is run from
178 dnl within `config.status' rather than from within configure. This
179 dnl is why special rules must be applied for it.
180 AC_DEFUN(WGET_PROCESS_PO,
181 [srcdir=$ac_given_srcdir # Advanced autoconf hackery
182 dnl I wonder what the following several lines do...
183 if test "x$srcdir" != "x."; then
184 if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
185 posrcprefix="$srcdir/"
187 posrcprefix="../$srcdir/"
193 dnl Use `echo' rather than AC_MSG_RESULT, because this is run from
195 echo "generating po/POTFILES from $srcdir/po/POTFILES.in"
196 sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," \
197 -e "\$s/\(.*\) \\\\/\1/" \
198 < $srcdir/po/POTFILES.in > po/POTFILES
199 echo "creating po/Makefile"
200 sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
203 # Search path for a program which passes the given test.
204 # Ulrich Drepper <drepper@cygnus.com>, 1996.
206 # This file may be copied and used freely without restrictions. It
207 # can be used in projects which are not available under the GNU Public
208 # License but which still want to provide support for the GNU gettext
209 # functionality. Please note that the actual code is *not* freely
214 dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
215 dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
216 AC_DEFUN(AM_PATH_PROG_WITH_TEST,
217 [# Extract the first word of "$2", so it can be a program name with args.
218 set dummy $2; ac_word=[$]2
219 AC_MSG_CHECKING([for $ac_word])
220 AC_CACHE_VAL(ac_cv_path_$1,
223 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
226 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
227 for ac_dir in ifelse([$5], , $PATH, [$5]); do
228 test -z "$ac_dir" && ac_dir=.
229 if test -f $ac_dir/$ac_word; then
231 ac_cv_path_$1="$ac_dir/$ac_word"
237 dnl If no 4th arg is given, leave the cache variable unset,
238 dnl so AC_PATH_PROGS will keep looking.
239 ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
244 if test -n "[$]$1"; then
253 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
254 ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc.
255 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
257 ## This program is free software; you can redistribute it and/or modify
258 ## it under the terms of the GNU General Public License as published by
259 ## the Free Software Foundation; either version 2 of the License, or
260 ## (at your option) any later version.
262 ## This program is distributed in the hope that it will be useful, but
263 ## WITHOUT ANY WARRANTY; without even the implied warranty of
264 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
265 ## General Public License for more details.
267 ## You should have received a copy of the GNU General Public License
268 ## along with this program; if not, write to the Free Software
269 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
271 ## As a special exception to the GNU General Public License, if you
272 ## distribute this file as part of a program that contains a
273 ## configuration script generated by Autoconf, you may include it under
274 ## the same distribution terms that you use for the rest of that program.
276 # serial 40 AC_PROG_LIBTOOL
277 AC_DEFUN(AC_PROG_LIBTOOL,
278 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
280 # Save cache, so that ltconfig can load it
283 # Actually configure libtool. ac_aux_dir is where install-sh is found.
284 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
285 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
286 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
287 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
288 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
289 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
290 || AC_MSG_ERROR([libtool configure failed])
292 # Reload cache, that may have been modified by ltconfig
295 # This can be used to rebuild libtool when needed
296 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
298 # Always use our own libtool.
299 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
302 # Redirect the config.log output again, so that the ltconfig log is not
303 # clobbered by the next message.
307 AC_DEFUN(AC_LIBTOOL_SETUP,
309 AC_REQUIRE([AC_ENABLE_SHARED])dnl
310 AC_REQUIRE([AC_ENABLE_STATIC])dnl
311 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
312 AC_REQUIRE([AC_CANONICAL_HOST])dnl
313 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
314 AC_REQUIRE([AC_PROG_RANLIB])dnl
315 AC_REQUIRE([AC_PROG_CC])dnl
316 AC_REQUIRE([AC_PROG_LD])dnl
317 AC_REQUIRE([AC_PROG_NM])dnl
318 AC_REQUIRE([AC_PROG_LN_S])dnl
322 NONE) lt_target="$host" ;;
323 *) lt_target="$target" ;;
326 # Check for any special flags to pass to ltconfig.
327 libtool_flags="--cache-file=$cache_file"
328 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
329 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
330 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
331 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
332 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
333 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
334 [libtool_flags="$libtool_flags --enable-dlopen"])
335 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
336 [libtool_flags="$libtool_flags --enable-win32-dll"])
337 AC_ARG_ENABLE(libtool-lock,
338 [ --disable-libtool-lock avoid locking (might break parallel builds)])
339 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
340 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
342 # Some flags need to be propagated to the compiler or linker for good
346 # Find out which ABI we are using.
347 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
348 if AC_TRY_EVAL(ac_compile); then
349 case "`/usr/bin/file conftest.o`" in
365 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
366 SAVE_CFLAGS="$CFLAGS"
367 CFLAGS="$CFLAGS -belf"
368 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
369 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
370 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
371 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
372 CFLAGS="$SAVE_CFLAGS"
376 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
377 [*-*-cygwin* | *-*-mingw*)
378 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
379 AC_CHECK_TOOL(AS, as, false)
380 AC_CHECK_TOOL(OBJDUMP, objdump, false)
386 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
387 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
389 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
390 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
392 # AC_ENABLE_SHARED - implement the --enable-shared flag
393 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
394 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
396 AC_DEFUN(AC_ENABLE_SHARED, [dnl
397 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
398 AC_ARG_ENABLE(shared,
399 changequote(<<, >>)dnl
400 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
402 [p=${PACKAGE-default}
404 yes) enable_shared=yes ;;
405 no) enable_shared=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
418 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
421 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
422 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
423 AC_ENABLE_SHARED(no)])
425 # AC_ENABLE_STATIC - implement the --enable-static flag
426 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
427 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
429 AC_DEFUN(AC_ENABLE_STATIC, [dnl
430 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
431 AC_ARG_ENABLE(static,
432 changequote(<<, >>)dnl
433 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
435 [p=${PACKAGE-default}
437 yes) enable_static=yes ;;
438 no) enable_static=no ;;
441 # Look at the argument we got. We use all the common list separators.
442 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
443 for pkg in $enableval; do
444 if test "X$pkg" = "X$p"; then
451 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
454 # AC_DISABLE_STATIC - set the default static flag to --disable-static
455 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
456 AC_ENABLE_STATIC(no)])
459 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
460 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
461 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
463 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
464 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
465 AC_ARG_ENABLE(fast-install,
466 changequote(<<, >>)dnl
467 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
469 [p=${PACKAGE-default}
471 yes) enable_fast_install=yes ;;
472 no) enable_fast_install=no ;;
474 enable_fast_install=no
475 # Look at the argument we got. We use all the common list separators.
476 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
477 for pkg in $enableval; do
478 if test "X$pkg" = "X$p"; then
479 enable_fast_install=yes
485 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
488 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
489 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
490 AC_ENABLE_FAST_INSTALL(no)])
492 # AC_PROG_LD - find the path to the GNU or non-GNU linker
495 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
496 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
497 AC_REQUIRE([AC_PROG_CC])dnl
498 AC_REQUIRE([AC_CANONICAL_HOST])dnl
499 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
501 if test "$ac_cv_prog_gcc" = yes; then
502 # Check if gcc -print-prog-name=ld gives a path.
503 AC_MSG_CHECKING([for ld used by GCC])
504 ac_prog=`($CC -print-prog-name=ld) 2>&5`
506 # Accept absolute paths.
508 [\\/]* | [A-Za-z]:[\\/]*)
509 re_direlt='/[^/][^/]*/\.\./'
511 # Canonicalize the path of ld
512 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
513 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
514 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
516 test -z "$LD" && LD="$ac_prog"
519 # If it fails, then pretend we aren't using GCC.
523 # If it is relative, then search for the first ld in PATH.
527 elif test "$with_gnu_ld" = yes; then
528 AC_MSG_CHECKING([for GNU ld])
530 AC_MSG_CHECKING([for non-GNU ld])
532 AC_CACHE_VAL(ac_cv_path_LD,
533 [if test -z "$LD"; then
534 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
535 for ac_dir in $PATH; do
536 test -z "$ac_dir" && ac_dir=.
537 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
538 ac_cv_path_LD="$ac_dir/$ac_prog"
539 # Check to see if the program is GNU ld. I'd rather use --version,
540 # but apparently some GNU ld's only accept -v.
541 # Break only if it was the GNU/non-GNU ld that we prefer.
542 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
543 test "$with_gnu_ld" != no && break
545 test "$with_gnu_ld" != yes && break
551 ac_cv_path_LD="$LD" # Let the user override the test with a path.
554 if test -n "$LD"; then
559 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
563 AC_DEFUN(AC_PROG_LD_GNU,
564 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
565 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
566 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
567 ac_cv_prog_gnu_ld=yes
573 # AC_PROG_NM - find the path to a BSD-compatible name lister
575 [AC_MSG_CHECKING([for BSD-compatible nm])
576 AC_CACHE_VAL(ac_cv_path_NM,
577 [if test -n "$NM"; then
578 # Let the user override the test.
581 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
582 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
583 test -z "$ac_dir" && ac_dir=.
584 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
585 # Check to see if the nm accepts a BSD-compat flag.
586 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
587 # nm: unknown option "B" ignored
588 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
589 ac_cv_path_NM="$ac_dir/nm -B"
591 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
592 ac_cv_path_NM="$ac_dir/nm -p"
595 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
596 continue # so that we can try to find one that supports BSD flags
601 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
607 # AC_CHECK_LIBM - check for math library
608 AC_DEFUN(AC_CHECK_LIBM,
609 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
612 *-*-beos* | *-*-cygwin*)
613 # These system don't have libm
616 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
617 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
620 AC_CHECK_LIB(m, main, LIBM="-lm")
625 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
626 # the libltdl convenience library and INCLTDL to the include flags for
627 # the libltdl header and adds --enable-ltdl-convenience to the
628 # configure arguments. Note that LIBLTDL and INCLTDL are not
629 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
630 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
631 # with '${top_builddir}/' and INCLTDL will be prefixed with
632 # '${top_srcdir}/' (note the single quotes!). If your package is not
633 # flat and you're not using automake, define top_builddir and
634 # top_srcdir appropriately in the Makefiles.
635 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
636 case "$enable_ltdl_convenience" in
637 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
638 "") enable_ltdl_convenience=yes
639 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
641 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
642 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
645 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
646 # the libltdl installable library and INCLTDL to the include flags for
647 # the libltdl header and adds --enable-ltdl-install to the configure
648 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
649 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
650 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
651 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
652 # with '${top_srcdir}/' (note the single quotes!). If your package is
653 # not flat and you're not using automake, define top_builddir and
654 # top_srcdir appropriately in the Makefiles.
655 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
656 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
657 AC_CHECK_LIB(ltdl, main,
658 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
659 [if test x"$enable_ltdl_install" = xno; then
660 AC_MSG_WARN([libltdl not installed, but installation disabled])
662 enable_ltdl_install=yes
665 if test x"$enable_ltdl_install" = x"yes"; then
666 ac_configure_args="$ac_configure_args --enable-ltdl-install"
667 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
668 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
670 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
677 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
678 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
679 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
680 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
681 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
682 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
683 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
685 dnl This is just to silence aclocal about the macro not being used
686 ifelse([AC_DISABLE_FAST_INSTALL])dnl