OSDN Git Service

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