OSDN Git Service

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