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