]> sourceware.org Git - newlib-cygwin.git/blame - newlib/libc/sys/linux/aclocal.m4
* libm/common/s_fdim.c: New file.
[newlib-cygwin.git] / newlib / libc / sys / linux / aclocal.m4
CommitLineData
2efbc2a7
JJ
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
3ac6f3a7
JJ
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
2efbc2a7
JJ
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
0c048a9a
TF
59dnl Support --enable-newlib-multithread
60AC_ARG_ENABLE(newlib-multithread,
61[ --enable-newlib-multithread enable support for multiple threads],
62[case "${enableval}" in
63 yes) newlib_multithread=yes ;;
64 no) newlib_multithread=no ;;
65 *) AC_MSG_ERROR(bad value ${enableval} for newlib-multithread option) ;;
66 esac], [newlib_multithread=yes])dnl
67
afecf2fa
JJ
68dnl Support --disable-newlib-io-float
69AC_ARG_ENABLE(newlib-io-float,
70[ --disable-newlib-io-float disable printf/scanf family float support],
71[case "${enableval}" in
72 yes) newlib_io_float=yes ;;
73 no) newlib_io_float=no ;;
74 *) AC_MSG_ERROR(bad value ${enableval} for newlib-io-float option) ;;
75 esac], [newlib_io_float=yes])dnl
76
77
2efbc2a7
JJ
78dnl We may get other options which we don't document:
79dnl --with-target-subdir, --with-multisrctop, --with-multisubdir
80
81test -z "[$]{with_target_subdir}" && with_target_subdir=.
82
83if test "[$]{srcdir}" = "."; then
84 if test "[$]{with_target_subdir}" != "."; then
85 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}../$1"
86 else
87 newlib_basedir="[$]{srcdir}/[$]{with_multisrctop}$1"
88 fi
89else
90 newlib_basedir="[$]{srcdir}/$1"
91fi
92AC_SUBST(newlib_basedir)
93
eaa75b70 94AC_CANONICAL_SYSTEM
2efbc2a7 95
2e1a7175 96AM_INIT_AUTOMAKE(newlib, 1.10.0)
2efbc2a7
JJ
97
98# FIXME: We temporarily define our own version of AC_PROG_CC. This is
99# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
100# are probably using a cross compiler, which will not be able to fully
101# link an executable. This should really be fixed in autoconf
102# itself.
103
104AC_DEFUN(LIB_AC_PROG_CC,
105[AC_BEFORE([$0], [AC_PROG_CPP])dnl
106AC_CHECK_PROG(CC, gcc, gcc)
107if test -z "$CC"; then
108 AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
109 test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
110fi
111
112AC_PROG_CC_GNU
113
114if test $ac_cv_prog_gcc = yes; then
115 GCC=yes
116dnl Check whether -g works, even if CFLAGS is set, in case the package
117dnl plays around with CFLAGS (such as to build both debugging and
118dnl normal versions of a library), tasteless as that idea is.
119 ac_test_CFLAGS="${CFLAGS+set}"
120 ac_save_CFLAGS="$CFLAGS"
121 CFLAGS=
122 AC_PROG_CC_G
123 if test "$ac_test_CFLAGS" = set; then
124 CFLAGS="$ac_save_CFLAGS"
125 elif test $ac_cv_prog_cc_g = yes; then
126 CFLAGS="-g -O2"
127 else
128 CFLAGS="-O2"
129 fi
130else
131 GCC=
132 test "${CFLAGS+set}" = set || CFLAGS="-g"
133fi
134])
135
136LIB_AC_PROG_CC
137
2efbc2a7
JJ
138AC_CHECK_TOOL(AS, as)
139AC_CHECK_TOOL(AR, ar)
140AC_CHECK_TOOL(RANLIB, ranlib, :)
141
142AC_PROG_INSTALL
143
144AM_MAINTAINER_MODE
145
146# We need AC_EXEEXT to keep automake happy in cygnus mode. However,
147# at least currently, we never actually build a program, so we never
148# need to use $(EXEEXT). Moreover, the test for EXEEXT normally
149# fails, because we are probably configuring with a cross compiler
150# which can't create executables. So we include AC_EXEEXT to keep
151# automake happy, but we don't execute it, since we don't care about
152# the result.
153if false; then
154 AC_EXEEXT
155fi
156
157. [$]{newlib_basedir}/configure.host
158
2efbc2a7
JJ
159newlib_cflags="[$]{newlib_cflags} -fno-builtin"
160
161NEWLIB_CFLAGS=${newlib_cflags}
162AC_SUBST(NEWLIB_CFLAGS)
163
2e1a7175
TF
164LDFLAGS=${ldflags}
165AC_SUBST(LDFLAGS)
166
167AM_CONDITIONAL(USE_LIBTOOL, test x[$]{use_libtool} = xyes)
0953fe64
TF
168
169# Hard-code OBJEXT. Normally it is set by AC_OBJEXT, but we
170# use oext, which is set in configure.host based on the target platform.
171OBJEXT=${oext}
172
173AC_SUBST(OBJEXT)
2e1a7175
TF
174AC_SUBST(oext)
175AC_SUBST(aext)
176
177AC_SUBST(libm_machine_dir)
2efbc2a7
JJ
178AC_SUBST(machine_dir)
179AC_SUBST(sys_dir)
180])
181
182# Do all the work for Automake. This macro actually does too much --
183# some checks are only needed if your package does certain things.
184# But this isn't really a big deal.
185
186# serial 1
187
188dnl Usage:
189dnl AM_INIT_AUTOMAKE(package,version, [no-define])
190
191AC_DEFUN(AM_INIT_AUTOMAKE,
192[AC_REQUIRE([AC_PROG_INSTALL])
193PACKAGE=[$1]
194AC_SUBST(PACKAGE)
195VERSION=[$2]
196AC_SUBST(VERSION)
197dnl test to see if srcdir already configured
198if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
199 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
200fi
201ifelse([$3],,
202AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
203AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
204AC_REQUIRE([AM_SANITY_CHECK])
205AC_REQUIRE([AC_ARG_PROGRAM])
206dnl FIXME This is truly gross.
207missing_dir=`cd $ac_aux_dir && pwd`
208AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
209AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
210AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
211AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
212AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
213AC_REQUIRE([AC_PROG_MAKE_SET])])
214
215#
216# Check to make sure that the build environment is sane.
217#
218
219AC_DEFUN(AM_SANITY_CHECK,
220[AC_MSG_CHECKING([whether build environment is sane])
221# Just in case
222sleep 1
223echo timestamp > conftestfile
224# Do `set' in a subshell so we don't clobber the current shell's
225# arguments. Must try -L first in case configure is actually a
226# symlink; some systems play weird games with the mod time of symlinks
227# (eg FreeBSD returns the mod time of the symlink's containing
228# directory).
229if (
230 set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
231 if test "[$]*" = "X"; then
232 # -L didn't work.
233 set X `ls -t $srcdir/configure conftestfile`
234 fi
235 if test "[$]*" != "X $srcdir/configure conftestfile" \
236 && test "[$]*" != "X conftestfile $srcdir/configure"; then
237
238 # If neither matched, then we have a broken ls. This can happen
239 # if, for instance, CONFIG_SHELL is bash and it inherits a
240 # broken ls alias from the environment. This has actually
241 # happened. Such a system could not be considered "sane".
242 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
243alias in your environment])
244 fi
245
246 test "[$]2" = conftestfile
247 )
248then
249 # Ok.
250 :
251else
252 AC_MSG_ERROR([newly created file is older than distributed files!
253Check your system clock])
254fi
255rm -f conftest*
256AC_MSG_RESULT(yes)])
257
258dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
259dnl The program must properly implement --version.
260AC_DEFUN(AM_MISSING_PROG,
261[AC_MSG_CHECKING(for working $2)
262# Run test in a subshell; some versions of sh will print an error if
263# an executable is not found, even if stderr is redirected.
264# Redirect stdin to placate older versions of autoconf. Sigh.
265if ($2 --version) < /dev/null > /dev/null 2>&1; then
266 $1=$2
267 AC_MSG_RESULT(found)
268else
269 $1="$3/missing $2"
270 AC_MSG_RESULT(missing)
271fi
272AC_SUBST($1)])
273
274# Add --enable-maintainer-mode option to configure.
275# From Jim Meyering
276
277# serial 1
278
279AC_DEFUN(AM_MAINTAINER_MODE,
280[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
281 dnl maintainer-mode is disabled by default
282 AC_ARG_ENABLE(maintainer-mode,
283[ --enable-maintainer-mode enable make rules and dependencies not useful
284 (and sometimes confusing) to the casual installer],
285 USE_MAINTAINER_MODE=$enableval,
286 USE_MAINTAINER_MODE=no)
287 AC_MSG_RESULT($USE_MAINTAINER_MODE)
288 AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
289 MAINT=$MAINTAINER_MODE_TRUE
290 AC_SUBST(MAINT)dnl
291]
292)
293
294# Define a conditional.
295
296AC_DEFUN(AM_CONDITIONAL,
297[AC_SUBST($1_TRUE)
298AC_SUBST($1_FALSE)
299if $2; then
300 $1_TRUE=
301 $1_FALSE='#'
302else
303 $1_TRUE='#'
304 $1_FALSE=
305fi])
306
2e1a7175 307
0953fe64
TF
308# serial 46 AC_PROG_LIBTOOL
309AC_DEFUN([AC_PROG_LIBTOOL],
310[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
311dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
312dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
313 AC_PROVIDE_IFELSE([AC_PROG_CXX],
314 [AC_LIBTOOL_CXX],
315 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
316])])
317
318dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
319dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
320dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
321 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
322 [AC_LIBTOOL_GCJ],
323 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
324 [AC_LIBTOOL_GCJ],
325 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
326 [AC_LIBTOOL_GCJ],
327 [ifdef([AC_PROG_GCJ],
328 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ
329])])
330 ifdef([A][M_PROG_GCJ],
331 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ
332])])
333 ifdef([LT_AC_PROG_GCJ],
334 [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
335])])])])])])
336
337AC_DEFUN([_AC_PROG_LIBTOOL],
2e1a7175 338[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
0953fe64
TF
339AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
340AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
2e1a7175
TF
341
342# Save cache, so that ltconfig can load it
343AC_CACHE_SAVE
344
345# Actually configure libtool. ac_aux_dir is where install-sh is found.
0953fe64
TF
346AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
347MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
348LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
349AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
350objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
351deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
2e1a7175 352${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
0953fe64 353$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
2e1a7175
TF
354|| AC_MSG_ERROR([libtool configure failed])
355
356# Reload cache, that may have been modified by ltconfig
357AC_CACHE_LOAD
358
359# This can be used to rebuild libtool when needed
0953fe64 360LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
2e1a7175
TF
361
362# Always use our own libtool.
363LIBTOOL='$(SHELL) $(top_builddir)/libtool'
364AC_SUBST(LIBTOOL)dnl
365
366# Redirect the config.log output again, so that the ltconfig log is not
367# clobbered by the next message.
368exec 5>>./config.log
369])
370
0953fe64 371AC_DEFUN([AC_LIBTOOL_SETUP],
2e1a7175
TF
372[AC_PREREQ(2.13)dnl
373AC_REQUIRE([AC_ENABLE_SHARED])dnl
374AC_REQUIRE([AC_ENABLE_STATIC])dnl
375AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
376AC_REQUIRE([AC_CANONICAL_HOST])dnl
377AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2e1a7175
TF
378AC_REQUIRE([AC_PROG_CC])dnl
379AC_REQUIRE([AC_PROG_LD])dnl
0953fe64 380AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
2e1a7175
TF
381AC_REQUIRE([AC_PROG_NM])dnl
382AC_REQUIRE([AC_PROG_LN_S])dnl
0953fe64
TF
383AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
384# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
385AC_REQUIRE([AC_OBJEXT])dnl
386AC_REQUIRE([AC_EXEEXT])dnl
2e1a7175
TF
387dnl
388
0953fe64
TF
389# Only perform the check for file, if the check method requires it
390case $deplibs_check_method in
391file_magic*)
392 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
393 AC_PATH_MAGIC
394 fi
395 ;;
396esac
397
398AC_CHECK_TOOL(RANLIB, ranlib, :)
399AC_CHECK_TOOL(STRIP, strip, :)
400
2e1a7175
TF
401# Check for any special flags to pass to ltconfig.
402libtool_flags="--cache-file=$cache_file"
403test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
404test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
405test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
0953fe64
TF
406test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
407test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
2e1a7175
TF
408ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
409[libtool_flags="$libtool_flags --enable-dlopen"])
410ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
411[libtool_flags="$libtool_flags --enable-win32-dll"])
412AC_ARG_ENABLE(libtool-lock,
413 [ --disable-libtool-lock avoid locking (might break parallel builds)])
414test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
415test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
416
0953fe64
TF
417AC_ARG_WITH(pic,
418 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
419 pic_mode="$withval", pic_mode=default)
420test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
421test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
422
2e1a7175
TF
423# Some flags need to be propagated to the compiler or linker for good
424# libtool support.
0953fe64 425case $host in
2e1a7175
TF
426*-*-irix6*)
427 # Find out which ABI we are using.
428 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
429 if AC_TRY_EVAL(ac_compile); then
0953fe64 430 case `/usr/bin/file conftest.$ac_objext` in
2e1a7175
TF
431 *32-bit*)
432 LD="${LD-ld} -32"
433 ;;
434 *N32*)
435 LD="${LD-ld} -n32"
436 ;;
437 *64-bit*)
438 LD="${LD-ld} -64"
439 ;;
440 esac
441 fi
442 rm -rf conftest*
443 ;;
444
0953fe64
TF
445ia64-*-hpux*)
446 # Find out which ABI we are using.
447 echo 'int i;' > conftest.$ac_ext
448 if AC_TRY_EVAL(ac_compile); then
449 case "`/usr/bin/file conftest.o`" in
450 *ELF-32*)
451 HPUX_IA64_MODE="32"
452 ;;
453 *ELF-64*)
454 HPUX_IA64_MODE="64"
455 ;;
456 esac
457 fi
458 rm -rf conftest*
459 ;;
460
2e1a7175
TF
461*-*-sco3.2v5*)
462 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
463 SAVE_CFLAGS="$CFLAGS"
464 CFLAGS="$CFLAGS -belf"
465 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
0953fe64
TF
466 [AC_LANG_SAVE
467 AC_LANG_C
468 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
469 AC_LANG_RESTORE])
2e1a7175
TF
470 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
471 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
472 CFLAGS="$SAVE_CFLAGS"
473 fi
474 ;;
475
476ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
0953fe64 477[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
2e1a7175
TF
478 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
479 AC_CHECK_TOOL(AS, as, false)
480 AC_CHECK_TOOL(OBJDUMP, objdump, false)
0953fe64
TF
481
482 # recent cygwin and mingw systems supply a stub DllMain which the user
483 # can override, but on older systems we have to supply one
484 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
485 [AC_TRY_LINK([],
486 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
487 DllMain (0, 0, 0);],
488 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
489
490 case $host/$CC in
491 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
492 # old mingw systems require "-dll" to link a DLL, while more recent ones
493 # require "-mdll"
494 SAVE_CFLAGS="$CFLAGS"
495 CFLAGS="$CFLAGS -mdll"
496 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
497 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
498 CFLAGS="$SAVE_CFLAGS" ;;
499 *-*-cygwin* | *-*-pw32*)
500 # cygwin systems need to pass --dll to the linker, and not link
501 # crt.o which will require a WinMain@16 definition.
502 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
503 esac
2e1a7175 504 ;;
0953fe64 505 ])
2e1a7175
TF
506esac
507])
508
509# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
0953fe64 510AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
2e1a7175
TF
511
512# AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
0953fe64 513AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
2e1a7175
TF
514
515# AC_ENABLE_SHARED - implement the --enable-shared flag
516# Usage: AC_ENABLE_SHARED[(DEFAULT)]
517# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
518# `yes'.
0953fe64
TF
519AC_DEFUN([AC_ENABLE_SHARED],
520[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2e1a7175
TF
521AC_ARG_ENABLE(shared,
522changequote(<<, >>)dnl
523<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
524changequote([, ])dnl
525[p=${PACKAGE-default}
0953fe64 526case $enableval in
2e1a7175
TF
527yes) enable_shared=yes ;;
528no) enable_shared=no ;;
529*)
530 enable_shared=no
531 # Look at the argument we got. We use all the common list separators.
532 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
533 for pkg in $enableval; do
534 if test "X$pkg" = "X$p"; then
535 enable_shared=yes
536 fi
537 done
538 IFS="$ac_save_ifs"
539 ;;
540esac],
541enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
542])
543
544# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
0953fe64 545AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2e1a7175
TF
546AC_ENABLE_SHARED(no)])
547
548# AC_ENABLE_STATIC - implement the --enable-static flag
549# Usage: AC_ENABLE_STATIC[(DEFAULT)]
550# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
551# `yes'.
0953fe64
TF
552AC_DEFUN([AC_ENABLE_STATIC],
553[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2e1a7175
TF
554AC_ARG_ENABLE(static,
555changequote(<<, >>)dnl
556<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
557changequote([, ])dnl
558[p=${PACKAGE-default}
0953fe64 559case $enableval in
2e1a7175
TF
560yes) enable_static=yes ;;
561no) enable_static=no ;;
562*)
563 enable_static=no
564 # Look at the argument we got. We use all the common list separators.
565 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
566 for pkg in $enableval; do
567 if test "X$pkg" = "X$p"; then
568 enable_static=yes
569 fi
570 done
571 IFS="$ac_save_ifs"
572 ;;
573esac],
574enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
575])
576
577# AC_DISABLE_STATIC - set the default static flag to --disable-static
0953fe64
TF
578AC_DEFUN([AC_DISABLE_STATIC],
579[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2e1a7175
TF
580AC_ENABLE_STATIC(no)])
581
582
583# AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
584# Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
585# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
586# `yes'.
0953fe64
TF
587AC_DEFUN([AC_ENABLE_FAST_INSTALL],
588[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2e1a7175
TF
589AC_ARG_ENABLE(fast-install,
590changequote(<<, >>)dnl
591<< --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
592changequote([, ])dnl
593[p=${PACKAGE-default}
0953fe64 594case $enableval in
2e1a7175
TF
595yes) enable_fast_install=yes ;;
596no) enable_fast_install=no ;;
597*)
598 enable_fast_install=no
599 # Look at the argument we got. We use all the common list separators.
600 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
601 for pkg in $enableval; do
602 if test "X$pkg" = "X$p"; then
603 enable_fast_install=yes
604 fi
605 done
606 IFS="$ac_save_ifs"
607 ;;
608esac],
609enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
610])
611
0953fe64
TF
612# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
613AC_DEFUN([AC_DISABLE_FAST_INSTALL],
614[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2e1a7175
TF
615AC_ENABLE_FAST_INSTALL(no)])
616
0953fe64
TF
617# AC_LIBTOOL_PICMODE - implement the --with-pic flag
618# Usage: AC_LIBTOOL_PICMODE[(MODE)]
619# Where MODE is either `yes' or `no'. If omitted, it defaults to
620# `both'.
621AC_DEFUN([AC_LIBTOOL_PICMODE],
622[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
623pic_mode=ifelse($#,1,$1,default)])
624
625
626# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
627AC_DEFUN([AC_PATH_TOOL_PREFIX],
628[AC_MSG_CHECKING([for $1])
629AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
630[case $MAGIC_CMD in
631 /*)
632 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
633 ;;
634 ?:/*)
635 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
636 ;;
637 *)
638 ac_save_MAGIC_CMD="$MAGIC_CMD"
639 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
640dnl $ac_dummy forces splitting on constant user-supplied paths.
641dnl POSIX.2 word splitting is done only on the output of word expansions,
642dnl not every word. This closes a longstanding sh security hole.
643 ac_dummy="ifelse([$2], , $PATH, [$2])"
644 for ac_dir in $ac_dummy; do
645 test -z "$ac_dir" && ac_dir=.
646 if test -f $ac_dir/$1; then
647 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
648 if test -n "$file_magic_test_file"; then
649 case $deplibs_check_method in
650 "file_magic "*)
651 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
652 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
653 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
654 egrep "$file_magic_regex" > /dev/null; then
655 :
656 else
657 cat <<EOF 1>&2
658
659*** Warning: the command libtool uses to detect shared libraries,
660*** $file_magic_cmd, produces output that libtool cannot recognize.
661*** The result is that libtool may fail to recognize shared libraries
662*** as such. This will affect the creation of libtool libraries that
663*** depend on shared libraries, but programs linked with such libtool
664*** libraries will work regardless of this problem. Nevertheless, you
665*** may want to report the problem to your system manager and/or to
666*** bug-libtool@gnu.org
667
668EOF
669 fi ;;
670 esac
671 fi
672 break
673 fi
674 done
675 IFS="$ac_save_ifs"
676 MAGIC_CMD="$ac_save_MAGIC_CMD"
677 ;;
678esac])
679MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
680if test -n "$MAGIC_CMD"; then
681 AC_MSG_RESULT($MAGIC_CMD)
682else
683 AC_MSG_RESULT(no)
684fi
685])
686
687
688# AC_PATH_MAGIC - find a file program which can recognise a shared library
689AC_DEFUN([AC_PATH_MAGIC],
690[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
691AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
692if test -z "$lt_cv_path_MAGIC_CMD"; then
693 if test -n "$ac_tool_prefix"; then
694 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
695 else
696 MAGIC_CMD=:
697 fi
698fi
699])
700
701
2e1a7175 702# AC_PROG_LD - find the path to the GNU or non-GNU linker
0953fe64 703AC_DEFUN([AC_PROG_LD],
2e1a7175
TF
704[AC_ARG_WITH(gnu-ld,
705[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
706test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
707AC_REQUIRE([AC_PROG_CC])dnl
708AC_REQUIRE([AC_CANONICAL_HOST])dnl
709AC_REQUIRE([AC_CANONICAL_BUILD])dnl
710ac_prog=ld
0953fe64 711if test "$GCC" = yes; then
2e1a7175
TF
712 # Check if gcc -print-prog-name=ld gives a path.
713 AC_MSG_CHECKING([for ld used by GCC])
0953fe64
TF
714 case $host in
715 *-*-mingw*)
716 # gcc leaves a trailing carriage return which upsets mingw
717 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
718 *)
719 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
720 esac
721 case $ac_prog in
2e1a7175 722 # Accept absolute paths.
0953fe64
TF
723 [[\\/]* | [A-Za-z]:[\\/]*)]
724 re_direlt=['/[^/][^/]*/\.\./']
2e1a7175
TF
725 # Canonicalize the path of ld
726 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
727 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
728 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
729 done
730 test -z "$LD" && LD="$ac_prog"
731 ;;
732 "")
733 # If it fails, then pretend we aren't using GCC.
734 ac_prog=ld
735 ;;
736 *)
737 # If it is relative, then search for the first ld in PATH.
738 with_gnu_ld=unknown
739 ;;
740 esac
741elif test "$with_gnu_ld" = yes; then
742 AC_MSG_CHECKING([for GNU ld])
743else
744 AC_MSG_CHECKING([for non-GNU ld])
745fi
0953fe64 746AC_CACHE_VAL(lt_cv_path_LD,
2e1a7175
TF
747[if test -z "$LD"; then
748 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
749 for ac_dir in $PATH; do
750 test -z "$ac_dir" && ac_dir=.
751 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
0953fe64 752 lt_cv_path_LD="$ac_dir/$ac_prog"
2e1a7175
TF
753 # Check to see if the program is GNU ld. I'd rather use --version,
754 # but apparently some GNU ld's only accept -v.
755 # Break only if it was the GNU/non-GNU ld that we prefer.
0953fe64 756 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2e1a7175
TF
757 test "$with_gnu_ld" != no && break
758 else
759 test "$with_gnu_ld" != yes && break
760 fi
761 fi
762 done
763 IFS="$ac_save_ifs"
764else
0953fe64 765 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2e1a7175 766fi])
0953fe64 767LD="$lt_cv_path_LD"
2e1a7175
TF
768if test -n "$LD"; then
769 AC_MSG_RESULT($LD)
770else
771 AC_MSG_RESULT(no)
772fi
773test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
774AC_PROG_LD_GNU
775])
776
0953fe64
TF
777AC_DEFUN([AC_PROG_LD_GNU],
778[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2e1a7175
TF
779[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
780if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
0953fe64 781 lt_cv_prog_gnu_ld=yes
2e1a7175 782else
0953fe64 783 lt_cv_prog_gnu_ld=no
2e1a7175 784fi])
0953fe64 785with_gnu_ld=$lt_cv_prog_gnu_ld
2e1a7175
TF
786])
787
0953fe64
TF
788# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
789# -- PORTME Some linkers may need a different reload flag.
790AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
791[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
792[lt_cv_ld_reload_flag='-r'])
793reload_flag=$lt_cv_ld_reload_flag
794test -n "$reload_flag" && reload_flag=" $reload_flag"
795])
796
797# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
798# -- PORTME fill in with the dynamic library characteristics
799AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
800[AC_CACHE_CHECK([how to recognise dependant libraries],
801lt_cv_deplibs_check_method,
802[lt_cv_file_magic_cmd='$MAGIC_CMD'
803lt_cv_file_magic_test_file=
804lt_cv_deplibs_check_method='unknown'
805# Need to set the preceding variable on all platforms that support
806# interlibrary dependencies.
807# 'none' -- dependencies not supported.
808# `unknown' -- same as none, but documents that we really don't know.
809# 'pass_all' -- all dependencies passed with no checks.
810# 'test_compile' -- check by making test program.
811# 'file_magic [regex]' -- check by looking for files in library path
812# which responds to the $file_magic_cmd with a given egrep regex.
813# If you have `file' or equivalent on your system and you're not sure
814# whether `pass_all' will *always* work, you probably want this one.
815
816case $host_os in
817aix*)
818 lt_cv_deplibs_check_method=pass_all
819 ;;
820
821beos*)
822 lt_cv_deplibs_check_method=pass_all
823 ;;
824
825bsdi4*)
826 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
827 lt_cv_file_magic_cmd='/usr/bin/file -L'
828 lt_cv_file_magic_test_file=/shlib/libc.so
829 ;;
830
831cygwin* | mingw* |pw32*)
832 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
833 lt_cv_file_magic_cmd='$OBJDUMP -f'
834 ;;
835
836darwin* | rhapsody*)
837 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
838 lt_cv_file_magic_cmd='/usr/bin/file -L'
839 case "$host_os" in
840 rhapsody* | darwin1.[012])
841 lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
842 ;;
843 *) # Darwin 1.3 on
844 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
845 ;;
846 esac
847 ;;
848
849freebsd* )
850 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
851 case $host_cpu in
852 i*86 )
853 # Not sure whether the presence of OpenBSD here was a mistake.
854 # Let's accept both of them until this is cleared up.
855 lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
856 lt_cv_file_magic_cmd=/usr/bin/file
857 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
858 ;;
859 esac
860 else
861 lt_cv_deplibs_check_method=pass_all
862 fi
863 ;;
864
865gnu*)
866 lt_cv_deplibs_check_method=pass_all
867 ;;
868
869hpux10.20*|hpux11*)
870 case $host_cpu in
871 hppa*)
872 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
873 lt_cv_file_magic_cmd=/usr/bin/file
874 lt_cv_file_magic_test_file=/usr/lib/libc.sl
875 ;;
876 ia64*)
877 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64']
878 lt_cv_file_magic_cmd=/usr/bin/file
879 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
880 ;;
881 esac
882 ;;
883
884irix5* | irix6*)
885 case $host_os in
886 irix5*)
887 # this will be overridden with pass_all, but let us keep it just in case
888 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
889 ;;
890 *)
891 case $LD in
892 *-32|*"-32 ") libmagic=32-bit;;
893 *-n32|*"-n32 ") libmagic=N32;;
894 *-64|*"-64 ") libmagic=64-bit;;
895 *) libmagic=never-match;;
896 esac
897 # this will be overridden with pass_all, but let us keep it just in case
898 lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
899 ;;
900 esac
901 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
902 lt_cv_deplibs_check_method=pass_all
903 ;;
904
905# This must be Linux ELF.
906linux-gnu*)
907 case $host_cpu in
908 alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
909 lt_cv_deplibs_check_method=pass_all ;;
910 *)
911 # glibc up to 2.1.1 does not perform some relocations on ARM
912 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
913 esac
914 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
915 ;;
916
917netbsd*)
918 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
919 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
920 else
921 [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
922 fi
923 ;;
924
925newsos6)
926 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
927 lt_cv_file_magic_cmd=/usr/bin/file
928 lt_cv_file_magic_test_file=/usr/lib/libnls.so
929 ;;
930
931osf3* | osf4* | osf5*)
932 # this will be overridden with pass_all, but let us keep it just in case
933 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
934 lt_cv_file_magic_test_file=/shlib/libc.so
935 lt_cv_deplibs_check_method=pass_all
936 ;;
937
938sco3.2v5*)
939 lt_cv_deplibs_check_method=pass_all
940 ;;
941
942solaris*)
943 lt_cv_deplibs_check_method=pass_all
944 lt_cv_file_magic_test_file=/lib/libc.so
945 ;;
946
947[sysv5uw[78]* | sysv4*uw2*)]
948 lt_cv_deplibs_check_method=pass_all
949 ;;
950
951sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
952 case $host_vendor in
953 ncr)
954 lt_cv_deplibs_check_method=pass_all
955 ;;
956 motorola)
957 lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
958 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
959 ;;
960 esac
961 ;;
962esac
963])
964file_magic_cmd=$lt_cv_file_magic_cmd
965deplibs_check_method=$lt_cv_deplibs_check_method
966])
967
968
2e1a7175 969# AC_PROG_NM - find the path to a BSD-compatible name lister
0953fe64 970AC_DEFUN([AC_PROG_NM],
2e1a7175 971[AC_MSG_CHECKING([for BSD-compatible nm])
0953fe64 972AC_CACHE_VAL(lt_cv_path_NM,
2e1a7175
TF
973[if test -n "$NM"; then
974 # Let the user override the test.
0953fe64 975 lt_cv_path_NM="$NM"
2e1a7175
TF
976else
977 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
978 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
979 test -z "$ac_dir" && ac_dir=.
0953fe64
TF
980 tmp_nm=$ac_dir/${ac_tool_prefix}nm
981 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
2e1a7175
TF
982 # Check to see if the nm accepts a BSD-compat flag.
983 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
984 # nm: unknown option "B" ignored
0953fe64
TF
985 # Tru64's nm complains that /dev/null is an invalid object file
986 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
987 lt_cv_path_NM="$tmp_nm -B"
2e1a7175 988 break
0953fe64
TF
989 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
990 lt_cv_path_NM="$tmp_nm -p"
2e1a7175
TF
991 break
992 else
0953fe64 993 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2e1a7175
TF
994 continue # so that we can try to find one that supports BSD flags
995 fi
996 fi
997 done
998 IFS="$ac_save_ifs"
0953fe64 999 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2e1a7175 1000fi])
0953fe64 1001NM="$lt_cv_path_NM"
2e1a7175
TF
1002AC_MSG_RESULT([$NM])
1003])
1004
1005# AC_CHECK_LIBM - check for math library
0953fe64 1006AC_DEFUN([AC_CHECK_LIBM],
2e1a7175
TF
1007[AC_REQUIRE([AC_CANONICAL_HOST])dnl
1008LIBM=
0953fe64
TF
1009case $host in
1010*-*-beos* | *-*-cygwin* | *-*-pw32*)
2e1a7175
TF
1011 # These system don't have libm
1012 ;;
1013*-ncr-sysv4.3*)
1014 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
1015 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
1016 ;;
1017*)
1018 AC_CHECK_LIB(m, main, LIBM="-lm")
1019 ;;
1020esac
1021])
1022
1023# AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
0953fe64
TF
1024# the libltdl convenience library and INCLTDL to the include flags for
1025# the libltdl header and adds --enable-ltdl-convenience to the
1026# configure arguments. Note that LIBLTDL and INCLTDL are not
1027# AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
1028# provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
1029# with '${top_builddir}/' and INCLTDL will be prefixed with
1030# '${top_srcdir}/' (note the single quotes!). If your package is not
1031# flat and you're not using automake, define top_builddir and
1032# top_srcdir appropriately in the Makefiles.
1033AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
1034[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1035 case $enable_ltdl_convenience in
2e1a7175
TF
1036 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
1037 "") enable_ltdl_convenience=yes
1038 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
1039 esac
0953fe64
TF
1040 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
1041 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2e1a7175
TF
1042])
1043
1044# AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
0953fe64
TF
1045# the libltdl installable library and INCLTDL to the include flags for
1046# the libltdl header and adds --enable-ltdl-install to the configure
1047# arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
1048# AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
1049# libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
1050# be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
1051# with '${top_srcdir}/' (note the single quotes!). If your package is
1052# not flat and you're not using automake, define top_builddir and
1053# top_srcdir appropriately in the Makefiles.
2e1a7175 1054# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
0953fe64
TF
1055AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
1056[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2e1a7175
TF
1057 AC_CHECK_LIB(ltdl, main,
1058 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
1059 [if test x"$enable_ltdl_install" = xno; then
1060 AC_MSG_WARN([libltdl not installed, but installation disabled])
1061 else
1062 enable_ltdl_install=yes
1063 fi
1064 ])
1065 if test x"$enable_ltdl_install" = x"yes"; then
1066 ac_configure_args="$ac_configure_args --enable-ltdl-install"
0953fe64
TF
1067 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
1068 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2e1a7175
TF
1069 else
1070 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
1071 LIBLTDL="-lltdl"
1072 INCLTDL=
1073 fi
1074])
1075
0953fe64
TF
1076# If this macro is not defined by Autoconf, define it here.
1077ifdef([AC_PROVIDE_IFELSE],
1078 [],
1079 [define([AC_PROVIDE_IFELSE],
1080 [ifdef([AC_PROVIDE_$1],
1081 [$2], [$3])])])
1082
1083# AC_LIBTOOL_CXX - enable support for C++ libraries
1084AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
1085
1086AC_DEFUN([_AC_LIBTOOL_CXX],
1087[AC_REQUIRE([AC_PROG_CXX])
1088AC_REQUIRE([AC_PROG_CXXCPP])
1089LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
1090lt_save_CC="$CC"
1091lt_save_CFLAGS="$CFLAGS"
1092dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
1093dnl is set to the C++ compiler.
1094AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
1095MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1096LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1097AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1098objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1099deplibs_check_method="$deplibs_check_method" \
1100file_magic_cmd="$file_magic_cmd" \
1101${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
1102--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
1103|| AC_MSG_ERROR([libtool tag configuration failed])
1104CC="$lt_save_CC"
1105CFLAGS="$lt_save_CFLAGS"
1106
1107# Redirect the config.log output again, so that the ltconfig log is not
1108# clobbered by the next message.
1109exec 5>>./config.log
1110])
1111
1112# AC_LIBTOOL_GCJ - enable support for GCJ libraries
1113AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
1114
1115AC_DEFUN([_AC_LIBTOOL_GCJ],
1116[AC_REQUIRE([AC_PROG_LIBTOOL])
1117AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
1118 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
1119 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
1120 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
1121 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
1122 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
1123LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-gcj.sh"
1124lt_save_CC="$CC"
1125lt_save_CFLAGS="$CFLAGS"
1126dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
1127dnl is set to the C++ compiler.
1128AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
1129MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
1130LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
1131AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
1132objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
1133deplibs_check_method="$deplibs_check_method" \
1134file_magic_cmd="$file_magic_cmd" \
1135${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
1136--build="$build" --add-tag=GCJ $ac_aux_dir/ltcf-gcj.sh $host \
1137|| AC_MSG_ERROR([libtool tag configuration failed])
1138CC="$lt_save_CC"
1139CFLAGS="$lt_save_CFLAGS"
1140
1141# Redirect the config.log output again, so that the ltconfig log is not
1142# clobbered by the next message.
1143exec 5>>./config.log
1144])
1145
2e1a7175 1146dnl old names
0953fe64
TF
1147AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
1148AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
1149AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
1150AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
1151AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
1152AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
1153AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
2e1a7175
TF
1154
1155dnl This is just to silence aclocal about the macro not being used
1156ifelse([AC_DISABLE_FAST_INSTALL])dnl
1157
0953fe64
TF
1158AC_DEFUN([LT_AC_PROG_GCJ],
1159[AC_CHECK_TOOL(GCJ, gcj, no)
1160 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
1161 AC_SUBST(GCJFLAGS)
1162])
1163
This page took 0.153182 seconds and 5 git commands to generate.