OSDN Git Service

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