OSDN Git Service

* Makefile.in: Rebuilt.
[pf3gnuchains/gcc-fork.git] / zlib / aclocal.m4
1 dnl aclocal.m4 generated automatically by aclocal 1.4
2
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.
7
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.
12
13 # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
14 # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
15 # are probably using a cross compiler, which will not be able to fully
16 # link an executable.  This should really be fixed in autoconf
17 # itself.
18
19 AC_DEFUN(LIB_AC_PROG_CC,
20 [AC_BEFORE([$0], [AC_PROG_CPP])dnl
21 AC_CHECK_PROG(CC, gcc, gcc)
22 if test -z "$CC"; then
23   AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
24   test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
25 fi
26
27 AC_PROG_CC_GNU
28
29 if test $ac_cv_prog_gcc = yes; then
30   GCC=yes
31 dnl Check whether -g works, even if CFLAGS is set, in case the package
32 dnl plays around with CFLAGS (such as to build both debugging and
33 dnl normal versions of a library), tasteless as that idea is.
34   ac_test_CFLAGS="${CFLAGS+set}"
35   ac_save_CFLAGS="$CFLAGS"
36   CFLAGS=
37   AC_PROG_CC_G
38   if test "$ac_test_CFLAGS" = set; then
39     CFLAGS="$ac_save_CFLAGS"
40   elif test $ac_cv_prog_cc_g = yes; then
41     CFLAGS="-g -O2"
42   else
43     CFLAGS="-O2"
44   fi
45 else
46   GCC=
47   test "${CFLAGS+set}" = set || CFLAGS="-g"
48 fi
49 ])
50
51 # Do all the work for Automake.  This macro actually does too much --
52 # some checks are only needed if your package does certain things.
53 # But this isn't really a big deal.
54
55 # serial 1
56
57 dnl Usage:
58 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
59
60 AC_DEFUN(AM_INIT_AUTOMAKE,
61 [AC_REQUIRE([AC_PROG_INSTALL])
62 PACKAGE=[$1]
63 AC_SUBST(PACKAGE)
64 VERSION=[$2]
65 AC_SUBST(VERSION)
66 dnl test to see if srcdir already configured
67 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
68   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
69 fi
70 ifelse([$3],,
71 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
72 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
73 AC_REQUIRE([AM_SANITY_CHECK])
74 AC_REQUIRE([AC_ARG_PROGRAM])
75 dnl FIXME This is truly gross.
76 missing_dir=`cd $ac_aux_dir && pwd`
77 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
78 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
79 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
80 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
81 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
82 AC_REQUIRE([AC_PROG_MAKE_SET])])
83
84 #
85 # Check to make sure that the build environment is sane.
86 #
87
88 AC_DEFUN(AM_SANITY_CHECK,
89 [AC_MSG_CHECKING([whether build environment is sane])
90 # Just in case
91 sleep 1
92 echo timestamp > conftestfile
93 # Do `set' in a subshell so we don't clobber the current shell's
94 # arguments.  Must try -L first in case configure is actually a
95 # symlink; some systems play weird games with the mod time of symlinks
96 # (eg FreeBSD returns the mod time of the symlink's containing
97 # directory).
98 if (
99    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
100    if test "[$]*" = "X"; then
101       # -L didn't work.
102       set X `ls -t $srcdir/configure conftestfile`
103    fi
104    if test "[$]*" != "X $srcdir/configure conftestfile" \
105       && test "[$]*" != "X conftestfile $srcdir/configure"; then
106
107       # If neither matched, then we have a broken ls.  This can happen
108       # if, for instance, CONFIG_SHELL is bash and it inherits a
109       # broken ls alias from the environment.  This has actually
110       # happened.  Such a system could not be considered "sane".
111       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
112 alias in your environment])
113    fi
114
115    test "[$]2" = conftestfile
116    )
117 then
118    # Ok.
119    :
120 else
121    AC_MSG_ERROR([newly created file is older than distributed files!
122 Check your system clock])
123 fi
124 rm -f conftest*
125 AC_MSG_RESULT(yes)])
126
127 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
128 dnl The program must properly implement --version.
129 AC_DEFUN(AM_MISSING_PROG,
130 [AC_MSG_CHECKING(for working $2)
131 # Run test in a subshell; some versions of sh will print an error if
132 # an executable is not found, even if stderr is redirected.
133 # Redirect stdin to placate older versions of autoconf.  Sigh.
134 if ($2 --version) < /dev/null > /dev/null 2>&1; then
135    $1=$2
136    AC_MSG_RESULT(found)
137 else
138    $1="$3/missing $2"
139    AC_MSG_RESULT(missing)
140 fi
141 AC_SUBST($1)])
142
143 # Add --enable-maintainer-mode option to configure.
144 # From Jim Meyering
145
146 # serial 1
147
148 AC_DEFUN(AM_MAINTAINER_MODE,
149 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
150   dnl maintainer-mode is disabled by default
151   AC_ARG_ENABLE(maintainer-mode,
152 [  --enable-maintainer-mode enable make rules and dependencies not useful
153                           (and sometimes confusing) to the casual installer],
154       USE_MAINTAINER_MODE=$enableval,
155       USE_MAINTAINER_MODE=no)
156   AC_MSG_RESULT($USE_MAINTAINER_MODE)
157   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
158   MAINT=$MAINTAINER_MODE_TRUE
159   AC_SUBST(MAINT)dnl
160 ]
161 )
162
163 # Define a conditional.
164
165 AC_DEFUN(AM_CONDITIONAL,
166 [AC_SUBST($1_TRUE)
167 AC_SUBST($1_FALSE)
168 if $2; then
169   $1_TRUE=
170   $1_FALSE='#'
171 else
172   $1_TRUE='#'
173   $1_FALSE=
174 fi])
175
176
177 # serial 40 AC_PROG_LIBTOOL
178 AC_DEFUN(AC_PROG_LIBTOOL,
179 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
180
181 # Save cache, so that ltconfig can load it
182 AC_CACHE_SAVE
183
184 # Actually configure libtool.  ac_aux_dir is where install-sh is found.
185 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
186 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
187 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
188 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
189 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
190 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $host \
191 || AC_MSG_ERROR([libtool configure failed])
192
193 # Reload cache, that may have been modified by ltconfig
194 AC_CACHE_LOAD
195
196 # This can be used to rebuild libtool when needed
197 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
198
199 # Always use our own libtool.
200 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
201 AC_SUBST(LIBTOOL)dnl
202
203 # Redirect the config.log output again, so that the ltconfig log is not
204 # clobbered by the next message.
205 exec 5>>./config.log
206 ])
207
208 AC_DEFUN(AC_LIBTOOL_SETUP,
209 [AC_PREREQ(2.13)dnl
210 AC_REQUIRE([AC_ENABLE_SHARED])dnl
211 AC_REQUIRE([AC_ENABLE_STATIC])dnl
212 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
213 AC_REQUIRE([AC_CANONICAL_HOST])dnl
214 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
215 AC_REQUIRE([AC_PROG_RANLIB])dnl
216 AC_REQUIRE([AC_PROG_CC])dnl
217 AC_REQUIRE([AC_PROG_LD])dnl
218 AC_REQUIRE([AC_PROG_NM])dnl
219 AC_REQUIRE([AC_PROG_LN_S])dnl
220 dnl
221
222 # Check for any special flags to pass to ltconfig.
223 libtool_flags="--cache-file=$cache_file"
224 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
225 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
226 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
227 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
228 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
229 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
230 [libtool_flags="$libtool_flags --enable-dlopen"])
231 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
232 [libtool_flags="$libtool_flags --enable-win32-dll"])
233 AC_ARG_ENABLE(libtool-lock,
234   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
235 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
236 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
237
238 # Some flags need to be propagated to the compiler or linker for good
239 # libtool support.
240 case "$host" in
241 *-*-irix6*)
242   # Find out which ABI we are using.
243   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
244   if AC_TRY_EVAL(ac_compile); then
245     case "`/usr/bin/file conftest.o`" in
246     *32-bit*)
247       LD="${LD-ld} -32"
248       ;;
249     *N32*)
250       LD="${LD-ld} -n32"
251       ;;
252     *64-bit*)
253       LD="${LD-ld} -64"
254       ;;
255     esac
256   fi
257   rm -rf conftest*
258   ;;
259
260 *-*-sco3.2v5*)
261   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
262   SAVE_CFLAGS="$CFLAGS"
263   CFLAGS="$CFLAGS -belf"
264   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
265     [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])])
266   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
267     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
268     CFLAGS="$SAVE_CFLAGS"
269   fi
270   ;;
271
272 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
273 [*-*-cygwin* | *-*-mingw*)
274   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
275   AC_CHECK_TOOL(AS, as, false)
276   AC_CHECK_TOOL(OBJDUMP, objdump, false)
277   ;;
278 ])
279 esac
280 ])
281
282 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
283 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
284
285 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
286 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
287
288 # AC_ENABLE_SHARED - implement the --enable-shared flag
289 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
290 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
291 #   `yes'.
292 AC_DEFUN(AC_ENABLE_SHARED, [dnl
293 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
294 AC_ARG_ENABLE(shared,
295 changequote(<<, >>)dnl
296 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
297 changequote([, ])dnl
298 [p=${PACKAGE-default}
299 case "$enableval" in
300 yes) enable_shared=yes ;;
301 no) enable_shared=no ;;
302 *)
303   enable_shared=no
304   # Look at the argument we got.  We use all the common list separators.
305   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
306   for pkg in $enableval; do
307     if test "X$pkg" = "X$p"; then
308       enable_shared=yes
309     fi
310   done
311   IFS="$ac_save_ifs"
312   ;;
313 esac],
314 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
315 ])
316
317 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
318 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
319 AC_ENABLE_SHARED(no)])
320
321 # AC_ENABLE_STATIC - implement the --enable-static flag
322 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
323 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
324 #   `yes'.
325 AC_DEFUN(AC_ENABLE_STATIC, [dnl
326 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
327 AC_ARG_ENABLE(static,
328 changequote(<<, >>)dnl
329 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
330 changequote([, ])dnl
331 [p=${PACKAGE-default}
332 case "$enableval" in
333 yes) enable_static=yes ;;
334 no) enable_static=no ;;
335 *)
336   enable_static=no
337   # Look at the argument we got.  We use all the common list separators.
338   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
339   for pkg in $enableval; do
340     if test "X$pkg" = "X$p"; then
341       enable_static=yes
342     fi
343   done
344   IFS="$ac_save_ifs"
345   ;;
346 esac],
347 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
348 ])
349
350 # AC_DISABLE_STATIC - set the default static flag to --disable-static
351 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
352 AC_ENABLE_STATIC(no)])
353
354
355 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
356 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
357 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
358 #   `yes'.
359 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
360 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
361 AC_ARG_ENABLE(fast-install,
362 changequote(<<, >>)dnl
363 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
364 changequote([, ])dnl
365 [p=${PACKAGE-default}
366 case "$enableval" in
367 yes) enable_fast_install=yes ;;
368 no) enable_fast_install=no ;;
369 *)
370   enable_fast_install=no
371   # Look at the argument we got.  We use all the common list separators.
372   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
373   for pkg in $enableval; do
374     if test "X$pkg" = "X$p"; then
375       enable_fast_install=yes
376     fi
377   done
378   IFS="$ac_save_ifs"
379   ;;
380 esac],
381 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
382 ])
383
384 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
385 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
386 AC_ENABLE_FAST_INSTALL(no)])
387
388 # AC_PROG_LD - find the path to the GNU or non-GNU linker
389 AC_DEFUN(AC_PROG_LD,
390 [AC_ARG_WITH(gnu-ld,
391 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
392 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
393 AC_REQUIRE([AC_PROG_CC])dnl
394 AC_REQUIRE([AC_CANONICAL_HOST])dnl
395 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
396 ac_prog=ld
397 if test "$ac_cv_prog_gcc" = yes; then
398   # Check if gcc -print-prog-name=ld gives a path.
399   AC_MSG_CHECKING([for ld used by GCC])
400   ac_prog=`($CC -print-prog-name=ld) 2>&5`
401   case "$ac_prog" in
402     # Accept absolute paths.
403 changequote(,)dnl
404     [\\/]* | [A-Za-z]:[\\/]*)
405       re_direlt='/[^/][^/]*/\.\./'
406 changequote([,])dnl
407       # Canonicalize the path of ld
408       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
409       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
410         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
411       done
412       test -z "$LD" && LD="$ac_prog"
413       ;;
414   "")
415     # If it fails, then pretend we aren't using GCC.
416     ac_prog=ld
417     ;;
418   *)
419     # If it is relative, then search for the first ld in PATH.
420     with_gnu_ld=unknown
421     ;;
422   esac
423 elif test "$with_gnu_ld" = yes; then
424   AC_MSG_CHECKING([for GNU ld])
425 else
426   AC_MSG_CHECKING([for non-GNU ld])
427 fi
428 AC_CACHE_VAL(ac_cv_path_LD,
429 [if test -z "$LD"; then
430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
431   for ac_dir in $PATH; do
432     test -z "$ac_dir" && ac_dir=.
433     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
434       ac_cv_path_LD="$ac_dir/$ac_prog"
435       # Check to see if the program is GNU ld.  I'd rather use --version,
436       # but apparently some GNU ld's only accept -v.
437       # Break only if it was the GNU/non-GNU ld that we prefer.
438       if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
439         test "$with_gnu_ld" != no && break
440       else
441         test "$with_gnu_ld" != yes && break
442       fi
443     fi
444   done
445   IFS="$ac_save_ifs"
446 else
447   ac_cv_path_LD="$LD" # Let the user override the test with a path.
448 fi])
449 LD="$ac_cv_path_LD"
450 if test -n "$LD"; then
451   AC_MSG_RESULT($LD)
452 else
453   AC_MSG_RESULT(no)
454 fi
455 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
456 AC_SUBST(LD)
457 AC_PROG_LD_GNU
458 ])
459
460 AC_DEFUN(AC_PROG_LD_GNU,
461 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
462 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
463 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
464   ac_cv_prog_gnu_ld=yes
465 else
466   ac_cv_prog_gnu_ld=no
467 fi])
468 ])
469
470 # AC_PROG_NM - find the path to a BSD-compatible name lister
471 AC_DEFUN(AC_PROG_NM,
472 [AC_MSG_CHECKING([for BSD-compatible nm])
473 AC_CACHE_VAL(ac_cv_path_NM,
474 [if test -n "$NM"; then
475   # Let the user override the test.
476   ac_cv_path_NM="$NM"
477 else
478   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
479   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
480     test -z "$ac_dir" && ac_dir=.
481     if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
482       # Check to see if the nm accepts a BSD-compat flag.
483       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
484       #   nm: unknown option "B" ignored
485       if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
486         ac_cv_path_NM="$ac_dir/nm -B"
487         break
488       elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
489         ac_cv_path_NM="$ac_dir/nm -p"
490         break
491       else
492         ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
493         continue # so that we can try to find one that supports BSD flags
494       fi
495     fi
496   done
497   IFS="$ac_save_ifs"
498   test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
499 fi])
500 NM="$ac_cv_path_NM"
501 AC_MSG_RESULT([$NM])
502 AC_SUBST(NM)
503 ])
504
505 # AC_CHECK_LIBM - check for math library
506 AC_DEFUN(AC_CHECK_LIBM,
507 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
508 LIBM=
509 case "$host" in
510 *-*-beos* | *-*-cygwin*)
511   # These system don't have libm
512   ;;
513 *-ncr-sysv4.3*)
514   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
515   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
516   ;;
517 *)
518   AC_CHECK_LIB(m, main, LIBM="-lm")
519   ;;
520 esac
521 ])
522
523 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
524 # the libltdl convenience library, adds --enable-ltdl-convenience to
525 # the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
526 # is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
527 # to be `${top_builddir}/libltdl'.  Make sure you start DIR with
528 # '${top_builddir}/' (note the single quotes!) if your package is not
529 # flat, and, if you're not using automake, define top_builddir as
530 # appropriate in the Makefiles.
531 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
532   case "$enable_ltdl_convenience" in
533   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
534   "") enable_ltdl_convenience=yes
535       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
536   esac
537   LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
538   INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
539 ])
540
541 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
542 # the libltdl installable library, and adds --enable-ltdl-install to
543 # the configure arguments.  Note that LIBLTDL is not AC_SUBSTed, nor
544 # is AC_CONFIG_SUBDIRS called.  If DIR is not provided, it is assumed
545 # to be `${top_builddir}/libltdl'.  Make sure you start DIR with
546 # '${top_builddir}/' (note the single quotes!) if your package is not
547 # flat, and, if you're not using automake, define top_builddir as
548 # appropriate in the Makefiles.
549 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
550 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
551   AC_CHECK_LIB(ltdl, main,
552   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
553   [if test x"$enable_ltdl_install" = xno; then
554      AC_MSG_WARN([libltdl not installed, but installation disabled])
555    else
556      enable_ltdl_install=yes
557    fi
558   ])
559   if test x"$enable_ltdl_install" = x"yes"; then
560     ac_configure_args="$ac_configure_args --enable-ltdl-install"
561     LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
562     INCLTDL=ifelse($#,1,-I$1,['-I${top_builddir}/libltdl'])
563   else
564     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
565     LIBLTDL="-lltdl"
566     INCLTDL=
567   fi
568 ])
569
570 dnl old names
571 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
572 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
573 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
574 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
575 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
576 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
577 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
578
579 dnl This is just to silence aclocal about the macro not being used
580 ifelse([AC_DISABLE_FAST_INSTALL])dnl
581