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