Debian Codegraph @

libtool.m4.in

raw
1 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*-
2 ## Copyright (C) 1996-2000 Free Software Foundation, Inc.
3 ## Originally by Gordon Matzigkeit <[email protected]>, 1996
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 # serial 42 AC_PROG_LIBTOOL
25 AC_DEFUN(AC_PROG_LIBTOOL,
26 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
27
28 # Save cache, so that ltconfig can load it
29 AC_CACHE_SAVE
30
31 # Actually configure libtool. ac_aux_dir is where install-sh is found.
32 AR="$AR" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
33 MAGIC="$MAGIC" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
34 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
35 AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
36 objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
37 deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
38 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
39 $libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $lt_target \
40 || AC_MSG_ERROR([libtool configure failed])
41
42 # Reload cache, that may have been modified by ltconfig
43 AC_CACHE_LOAD
44
45 # This can be used to rebuild libtool when needed
46 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh"
47
48 # Always use our own libtool.
49 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
50 AC_SUBST(LIBTOOL)dnl
51
52 # Redirect the config.log output again, so that the ltconfig log is not
53 # clobbered by the next message.
54 exec 5>>./config.log
55 ])
56
57 AC_DEFUN(AC_LIBTOOL_SETUP,
58 [AC_PREREQ(2.13)dnl
59 AC_REQUIRE([AC_ENABLE_SHARED])dnl
60 AC_REQUIRE([AC_ENABLE_STATIC])dnl
61 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
62 AC_REQUIRE([AC_CANONICAL_HOST])dnl
63 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
64 AC_REQUIRE([AC_PROG_CC])dnl
65 AC_REQUIRE([AC_PROG_LD])dnl
66 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
67 AC_REQUIRE([AC_PROG_NM])dnl
68 AC_REQUIRE([AC_PROG_LN_S])dnl
69 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
70 AC_REQUIRE([AC_OBJEXT])dnl
71 AC_REQUIRE([AC_EXEEXT])dnl
72 dnl
73
74 # Only perform the check for file, if the check method requires it
75 case "$deplibs_check_method" in
76 file_magic*)
77 if test "$file_magic_cmd" = '${MAGIC}'; then
78 AC_PATH_MAGIC
79 fi
80 ;;
81 esac
82
83 case "$target" in
84 NONE) lt_target="$host" ;;
85 *) lt_target="$target" ;;
86 esac
87
88 AC_CHECK_TOOL(RANLIB, ranlib, :)
89 AC_CHECK_TOOL(STRIP, strip, :)
90
91 # Check for any special flags to pass to ltconfig.
92 libtool_flags="--cache-file=$cache_file"
93 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
94 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
95 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
96 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
97 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
98 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN],
99 [libtool_flags="$libtool_flags --enable-dlopen"])
100 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
101 [libtool_flags="$libtool_flags --enable-win32-dll"])
102 AC_ARG_ENABLE(libtool-lock,
103 [ --disable-libtool-lock avoid locking (might break parallel builds)])
104 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
105 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
106
107 AC_ARG_WITH(pic,
108 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
109 pic_mode="$withval", pic_mode=default)
110 test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
111 test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
112
113 # Some flags need to be propagated to the compiler or linker for good
114 # libtool support.
115 case "$lt_target" in
116 *-*-irix6*)
117 # Find out which ABI we are using.
118 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
119 if AC_TRY_EVAL(ac_compile); then
120 case "`/usr/bin/file conftest.o`" in
121 *32-bit*)
122 LD="${LD-ld} -32"
123 ;;
124 *N32*)
125 LD="${LD-ld} -n32"
126 ;;
127 *64-bit*)
128 LD="${LD-ld} -64"
129 ;;
130 esac
131 fi
132 rm -rf conftest*
133 ;;
134
135 *-*-sco3.2v5*)
136 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
137 SAVE_CFLAGS="$CFLAGS"
138 CFLAGS="$CFLAGS -belf"
139 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
140 [AC_LANG_SAVE
141 AC_LANG_C
142 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
143 AC_LANG_RESTORE])
144 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
145 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
146 CFLAGS="$SAVE_CFLAGS"
147 fi
148 ;;
149
150 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
151 [*-*-cygwin* | *-*-mingw*)
152 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
153 AC_CHECK_TOOL(AS, as, false)
154 AC_CHECK_TOOL(OBJDUMP, objdump, false)
155
156 # recent cygwin and mingw systems supply a stub DllMain which the user
157 # can override, but on older systems we have to supply one
158 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
159 [AC_TRY_LINK([],
160 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
161 DllMain (0, 0, 0);],
162 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
163
164 case "$lt_target/$CC" in
165 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
166 # old mingw systems require "-dll" to link a DLL, while more recent ones
167 # require "-mdll"
168 SAVE_CFLAGS="$CFLAGS"
169 CFLAGS="$CFLAGS -mdll"
170 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
171 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
172 CFLAGS="$SAVE_CFLAGS" ;;
173 *-*-cygwin*)
174 # cygwin systems need to pass --dll to the linker, and not link
175 # crt.o which will require a WinMain@16 definition.
176 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
177 esac
178 ;;
179 ])
180 esac
181 ])
182
183 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
184 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
185
186 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
187 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
188
189 # AC_ENABLE_SHARED - implement the --enable-shared flag
190 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
191 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
192 # `yes'.
193 AC_DEFUN(AC_ENABLE_SHARED, [dnl
194 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
195 AC_ARG_ENABLE(shared,
196 changequote(<<, >>)dnl
197 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
198 changequote([, ])dnl
199 [p=${PACKAGE-default}
200 case "$enableval" in
201 yes) enable_shared=yes ;;
202 no) enable_shared=no ;;
203 *)
204 enable_shared=no
205 # Look at the argument we got. We use all the common list separators.
206 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
207 for pkg in $enableval; do
208 if test "X$pkg" = "X$p"; then
209 enable_shared=yes
210 fi
211 done
212 IFS="$ac_save_ifs"
213 ;;
214 esac],
215 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
216 ])
217
218 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
219 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
220 AC_ENABLE_SHARED(no)])
221
222 # AC_ENABLE_STATIC - implement the --enable-static flag
223 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
224 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
225 # `yes'.
226 AC_DEFUN(AC_ENABLE_STATIC, [dnl
227 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
228 AC_ARG_ENABLE(static,
229 changequote(<<, >>)dnl
230 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
231 changequote([, ])dnl
232 [p=${PACKAGE-default}
233 case "$enableval" in
234 yes) enable_static=yes ;;
235 no) enable_static=no ;;
236 *)
237 enable_static=no
238 # Look at the argument we got. We use all the common list separators.
239 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
240 for pkg in $enableval; do
241 if test "X$pkg" = "X$p"; then
242 enable_static=yes
243 fi
244 done
245 IFS="$ac_save_ifs"
246 ;;
247 esac],
248 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
249 ])
250
251 # AC_DISABLE_STATIC - set the default static flag to --disable-static
252 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
253 AC_ENABLE_STATIC(no)])
254
255
256 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
257 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
258 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
259 # `yes'.
260 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl
261 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
262 AC_ARG_ENABLE(fast-install,
263 changequote(<<, >>)dnl
264 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
265 changequote([, ])dnl
266 [p=${PACKAGE-default}
267 case "$enableval" in
268 yes) enable_fast_install=yes ;;
269 no) enable_fast_install=no ;;
270 *)
271 enable_fast_install=no
272 # Look at the argument we got. We use all the common list separators.
273 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
274 for pkg in $enableval; do
275 if test "X$pkg" = "X$p"; then
276 enable_fast_install=yes
277 fi
278 done
279 IFS="$ac_save_ifs"
280 ;;
281 esac],
282 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
283 ])
284
285 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
286 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
287 AC_ENABLE_FAST_INSTALL(no)])
288
289
290 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
291 AC_DEFUN(AC_PATH_TOOL_PREFIX,
292 [AC_MSG_CHECKING([for $1])
293 AC_CACHE_VAL(lt_cv_path_MAGIC,
294 [case "$MAGIC" in
295 /*)
296 lt_cv_path_MAGIC="$MAGIC" # Let the user override the test with a path.
297 ;;
298 ?:/*)
299 ac_cv_path_MAGIC="$MAGIC" # Let the user override the test with a dos path.
300 ;;
301 *)
302 ac_save_MAGIC="$MAGIC"
303 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
304 dnl $ac_dummy forces splitting on constant user-supplied paths.
305 dnl POSIX.2 word splitting is done only on the output of word expansions,
306 dnl not every word. This closes a longstanding sh security hole.
307 ac_dummy="ifelse([$2], , $PATH, [$2])"
308 for ac_dir in $ac_dummy; do
309 test -z "$ac_dir" && ac_dir=.
310 if test -f $ac_dir/$1; then
311 lt_cv_path_MAGIC="$ac_dir/$1"
312 if test -n "$file_magic_test_file"; then
313 case "$deplibs_check_method" in
314 "file_magic "*)
315 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
316 MAGIC="$lt_cv_path_MAGIC"
317 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
318 egrep "$file_magic_regex" > /dev/null; then
319 :
320 else
321 cat <<EOF 1>&2
322
323 *** Warning: the command libtool uses to detect shared libraries,
324 *** $file_magic_cmd, produces output that libtool cannot recognize.
325 *** The result is that libtool may fail to recognize shared libraries
326 *** as such. This will affect the creation of libtool libraries that
327 *** depend on shared libraries, but programs linked with such libtool
328 *** libraries will work regardless of this problem. Nevertheless, you
329 *** may want to report the problem to your system manager and/or to
330 *** [email protected]
331
332 EOF
333 fi ;;
334 esac
335 fi
336 break
337 fi
338 done
339 IFS="$ac_save_ifs"
340 MAGIC="$ac_save_MAGIC"
341 ;;
342 esac])
343 MAGIC="$lt_cv_path_MAGIC"
344 if test -n "$MAGIC"; then
345 AC_MSG_RESULT($MAGIC)
346 else
347 AC_MSG_RESULT(no)
348 fi
349 ])
350
351
352 # AC_PATH_MAGIC - find a file program which can recognise a shared library
353 AC_DEFUN(AC_PATH_MAGIC,
354 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
355 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
356 if test -z "$lt_cv_path_MAGIC"; then
357 if test -n "$ac_tool_prefix"; then
358 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
359 else
360 MAGIC=:
361 fi
362 fi
363 ])
364
365
366 # AC_PROG_LD - find the path to the GNU or non-GNU linker
367 AC_DEFUN(AC_PROG_LD,
368 [AC_ARG_WITH(gnu-ld,
369 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
370 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
371 AC_REQUIRE([AC_PROG_CC])dnl
372 AC_REQUIRE([AC_CANONICAL_HOST])dnl
373 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
374 ac_prog=ld
375 if test "$ac_cv_prog_gcc" = yes; then
376 # Check if gcc -print-prog-name=ld gives a path.
377 AC_MSG_CHECKING([for ld used by GCC])
378 case $lt_target in
379 *-*-mingw*)
380 # gcc leaves a trailing carriage return which upsets mingw
381 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
382 *)
383 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
384 esac
385 case "$ac_prog" in
386 # Accept absolute paths.
387 changequote(,)dnl
388 [\\/]* | [A-Za-z]:[\\/]*)
389 re_direlt='/[^/][^/]*/\.\./'
390 changequote([,])dnl
391 # Canonicalize the path of ld
392 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
393 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
394 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
395 done
396 test -z "$LD" && LD="$ac_prog"
397 ;;
398 "")
399 # If it fails, then pretend we aren't using GCC.
400 ac_prog=ld
401 ;;
402 *)
403 # If it is relative, then search for the first ld in PATH.
404 with_gnu_ld=unknown
405 ;;
406 esac
407 elif test "$with_gnu_ld" = yes; then
408 AC_MSG_CHECKING([for GNU ld])
409 else
410 AC_MSG_CHECKING([for non-GNU ld])
411 fi
412 AC_CACHE_VAL(ac_cv_path_LD,
413 [if test -z "$LD"; then
414 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
415 for ac_dir in $PATH; do
416 test -z "$ac_dir" && ac_dir=.
417 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
418 ac_cv_path_LD="$ac_dir/$ac_prog"
419 # Check to see if the program is GNU ld. I'd rather use --version,
420 # but apparently some GNU ld's only accept -v.
421 # Break only if it was the GNU/non-GNU ld that we prefer.
422 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
423 test "$with_gnu_ld" != no && break
424 else
425 test "$with_gnu_ld" != yes && break
426 fi
427 fi
428 done
429 IFS="$ac_save_ifs"
430 else
431 ac_cv_path_LD="$LD" # Let the user override the test with a path.
432 fi])
433 LD="$ac_cv_path_LD"
434 if test -n "$LD"; then
435 AC_MSG_RESULT($LD)
436 else
437 AC_MSG_RESULT(no)
438 fi
439 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
440 AC_PROG_LD_GNU
441 ])
442
443 AC_DEFUN(AC_PROG_LD_GNU,
444 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
445 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
446 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
447 ac_cv_prog_gnu_ld=yes
448 else
449 ac_cv_prog_gnu_ld=no
450 fi])
451 with_gnu_ld=$ac_cv_prog_gnu_ld
452 ])
453
454 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
455 # -- PORTME Some linkers may need a different reload flag.
456 AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
457 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
458 [lt_cv_ld_reload_flag='-r'])
459 reload_flag=$lt_cv_ld_reload_flag
460 test -n "$reload_flag" && reload_flag=" $reload_flag"
461 ])
462
463 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
464 # -- PORTME fill in with the dynamic library characteristics
465 AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
466 [AC_CACHE_CHECK([how to recognise dependant libraries],
467 lt_cv_deplibs_check_method,
468 [lt_cv_file_magic_cmd='${MAGIC}'
469 lt_cv_file_magic_test_file=
470 lt_cv_deplibs_check_method='unknown'
471 # Need to set the preceding variable on all platforms that support
472 # interlibrary dependencies.
473 # 'none' -- dependencies not supported.
474 # `unknown' -- same as none, but documents that we really don't know.
475 # 'pass_all' -- all dependencies passed with no checks.
476 # 'test_compile' -- check by making test program.
477 # 'file_magic [regex]' -- check by looking for files in library path
478 # which responds to the $file_magic_cmd with a given egrep regex.
479 # If you have `file' or equivalent on your system and you're not sure
480 # whether `pass_all' will *always* work, you probably want this one.
481
482 case "$host_os" in
483 aix4* | beos*)
484 lt_cv_deplibs_check_method=pass_all
485 ;;
486
487 bsdi4*)
488 changequote(,)dnl
489 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
490 changequote([, ])dnl
491 lt_cv_file_magic_test_file=/shlib/libc.so
492 ;;
493
494 cygwin* | mingw*)
495 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
496 lt_cv_file_magic_cmd='${OBJDUMP} -f'
497 ;;
498
499 freebsd*)
500 lt_cv_deplibs_check_method=pass_all
501 ;;
502
503 gnu*)
504 lt_cv_deplibs_check_method=pass_all
505 ;;
506
507 irix5* | irix6*)
508 case "$host_os" in
509 irix5*)
510 # this will be overridden with pass_all, but let us keep it just in case
511 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
512 ;;
513 *)
514 case "$LD" in
515 *-32|*"-32 ") libmagic=32-bit;;
516 *-n32|*"-n32 ") libmagic=N32;;
517 *-64|*"-64 ") libmagic=64-bit;;
518 *) libmagic=never-match;;
519 esac
520 # this will be overridden with pass_all, but let us keep it just in case
521 changequote(,)dnl
522 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
523 changequote([, ])dnl
524 ;;
525 esac
526 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
527 lt_cv_deplibs_check_method=pass_all
528 ;;
529
530 # This must be Linux ELF.
531 linux-gnu*)
532 case "$host_cpu" in
533 alpha* | i*86 | powerpc* | sparc* )
534 lt_cv_deplibs_check_method=pass_all ;;
535 *)
536 # glibc up to 2.1.1 does not perform some relocations on ARM
537 changequote(,)dnl
538 lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
539 changequote([, ])dnl
540 esac
541 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
542 ;;
543
544 osf3* | osf4* | osf5*)
545 # this will be overridden with pass_all, but let us keep it just in case
546 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
547 lt_cv_file_magic_test_file=/shlib/libc.so
548 lt_cv_deplibs_check_method=pass_all
549 ;;
550
551 sco3.2v5*)
552 lt_cv_deplibs_check_method=pass_all
553 ;;
554
555 solaris*)
556 lt_cv_deplibs_check_method=pass_all
557 lt_cv_file_magic_test_file=/lib/libc.so
558 ;;
559
560 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
561 case "$host_vendor" in
562 ncr)
563 lt_cv_deplibs_check_method=pass_all
564 ;;
565 motorola)
566 changequote(,)dnl
567 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]'
568 changequote([, ])dnl
569 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
570 ;;
571 esac
572 ;;
573 esac
574 ])
575 file_magic_cmd=$lt_cv_file_magic_cmd
576 deplibs_check_method=$lt_cv_deplibs_check_method
577 ])
578
579
580 # AC_PROG_NM - find the path to a BSD-compatible name lister
581 AC_DEFUN(AC_PROG_NM,
582 [AC_MSG_CHECKING([for BSD-compatible nm])
583 AC_CACHE_VAL(ac_cv_path_NM,
584 [if test -n "$NM"; then
585 # Let the user override the test.
586 ac_cv_path_NM="$NM"
587 else
588 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
589 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
590 test -z "$ac_dir" && ac_dir=.
591 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then
592 # Check to see if the nm accepts a BSD-compat flag.
593 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
594 # nm: unknown option "B" ignored
595 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
596 ac_cv_path_NM="$ac_dir/nm -B"
597 break
598 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
599 ac_cv_path_NM="$ac_dir/nm -p"
600 break
601 else
602 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but
603 continue # so that we can try to find one that supports BSD flags
604 fi
605 fi
606 done
607 IFS="$ac_save_ifs"
608 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
609 fi])
610 NM="$ac_cv_path_NM"
611 AC_MSG_RESULT([$NM])
612 ])
613
614 # AC_CHECK_LIBM - check for math library
615 AC_DEFUN(AC_CHECK_LIBM,
616 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
617 LIBM=
618 case "$lt_target" in
619 *-*-beos* | *-*-cygwin*)
620 # These system don't have libm
621 ;;
622 *-ncr-sysv4.3*)
623 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
624 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
625 ;;
626 *)
627 AC_CHECK_LIB(m, main, LIBM="-lm")
628 ;;
629 esac
630 ])
631
632 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
633 # the libltdl convenience library, adds --enable-ltdl-convenience to
634 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
635 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
636 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
637 # '${top_builddir}/' (note the single quotes!) if your package is not
638 # flat, and, if you're not using automake, define top_builddir as
639 # appropriate in the Makefiles.
640 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
641 case "$enable_ltdl_convenience" in
642 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
643 "") enable_ltdl_convenience=yes
644 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
645 esac
646 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdlc.la
647 INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
648 ])
649
650 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
651 # the libltdl installable library, and adds --enable-ltdl-install to
652 # the configure arguments. Note that LIBLTDL is not AC_SUBSTed, nor
653 # is AC_CONFIG_SUBDIRS called. If DIR is not provided, it is assumed
654 # to be `${top_builddir}/libltdl'. Make sure you start DIR with
655 # '${top_builddir}/' (note the single quotes!) if your package is not
656 # flat, and, if you're not using automake, define top_builddir as
657 # appropriate in the Makefiles.
658 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
659 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
660 AC_CHECK_LIB(ltdl, main,
661 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
662 [if test x"$enable_ltdl_install" = xno; then
663 AC_MSG_WARN([libltdl not installed, but installation disabled])
664 else
665 enable_ltdl_install=yes
666 fi
667 ])
668 if test x"$enable_ltdl_install" = x"yes"; then
669 ac_configure_args="$ac_configure_args --enable-ltdl-install"
670 LIBLTDL=ifelse($#,1,$1,['${top_builddir}/libltdl'])/libltdl.la
671 INCLTDL=ifelse($#,1,-I$1,['-I${top_srcdir}/libltdl'])
672 else
673 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
674 LIBLTDL="-lltdl"
675 INCLTDL=
676 fi
677 ])
678
679 dnl old names
680 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl
681 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl
682 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl
683 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl
684 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl
685 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl
686 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl
687
688 dnl This is just to silence aclocal about the macro not being used
689 ifelse([AC_DISABLE_FAST_INSTALL])dnl