Imported upstream version 0.59.3
[hcoop/debian/courier-authlib.git] / bdbobj / aclocal.m4
1 # generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4 # 2005 Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 # isc-posix.m4 serial 2 (gettext-0.11.2)
15 dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
16 dnl This file is free software; the Free Software Foundation
17 dnl gives unlimited permission to copy and/or distribute it,
18 dnl with or without modifications, as long as this notice is preserved.
19
20 # This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
21
22 # This test replaces the one in autoconf.
23 # Currently this macro should have the same name as the autoconf macro
24 # because gettext's gettext.m4 (distributed in the automake package)
25 # still uses it. Otherwise, the use in gettext.m4 makes autoheader
26 # give these diagnostics:
27 # configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
28 # configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
29
30 undefine([AC_ISC_POSIX])
31
32 AC_DEFUN([AC_ISC_POSIX],
33 [
34 dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
35 AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
36 ]
37 )
38
39 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
40
41 # serial 48 AC_PROG_LIBTOOL
42
43
44 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
45 # -----------------------------------------------------------
46 # If this macro is not defined by Autoconf, define it here.
47 m4_ifdef([AC_PROVIDE_IFELSE],
48 [],
49 [m4_define([AC_PROVIDE_IFELSE],
50 [m4_ifdef([AC_PROVIDE_$1],
51 [$2], [$3])])])
52
53
54 # AC_PROG_LIBTOOL
55 # ---------------
56 AC_DEFUN([AC_PROG_LIBTOOL],
57 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
58 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
59 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
60 AC_PROVIDE_IFELSE([AC_PROG_CXX],
61 [AC_LIBTOOL_CXX],
62 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
63 ])])
64 dnl And a similar setup for Fortran 77 support
65 AC_PROVIDE_IFELSE([AC_PROG_F77],
66 [AC_LIBTOOL_F77],
67 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
68 ])])
69
70 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
71 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
72 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
73 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
74 [AC_LIBTOOL_GCJ],
75 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
76 [AC_LIBTOOL_GCJ],
77 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
78 [AC_LIBTOOL_GCJ],
79 [ifdef([AC_PROG_GCJ],
80 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
81 ifdef([A][M_PROG_GCJ],
82 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
83 ifdef([LT_AC_PROG_GCJ],
84 [define([LT_AC_PROG_GCJ],
85 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
86 ])])# AC_PROG_LIBTOOL
87
88
89 # _AC_PROG_LIBTOOL
90 # ----------------
91 AC_DEFUN([_AC_PROG_LIBTOOL],
92 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
93 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
94 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
95 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
96
97 # This can be used to rebuild libtool when needed
98 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
99
100 # Always use our own libtool.
101 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
102 AC_SUBST(LIBTOOL)dnl
103
104 # Prevent multiple expansion
105 define([AC_PROG_LIBTOOL], [])
106 ])# _AC_PROG_LIBTOOL
107
108
109 # AC_LIBTOOL_SETUP
110 # ----------------
111 AC_DEFUN([AC_LIBTOOL_SETUP],
112 [AC_PREREQ(2.50)dnl
113 AC_REQUIRE([AC_ENABLE_SHARED])dnl
114 AC_REQUIRE([AC_ENABLE_STATIC])dnl
115 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
116 AC_REQUIRE([AC_CANONICAL_HOST])dnl
117 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
118 AC_REQUIRE([AC_PROG_CC])dnl
119 AC_REQUIRE([AC_PROG_LD])dnl
120 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
121 AC_REQUIRE([AC_PROG_NM])dnl
122
123 AC_REQUIRE([AC_PROG_LN_S])dnl
124 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
125 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
126 AC_REQUIRE([AC_OBJEXT])dnl
127 AC_REQUIRE([AC_EXEEXT])dnl
128 dnl
129
130 AC_LIBTOOL_SYS_MAX_CMD_LEN
131 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
132 AC_LIBTOOL_OBJDIR
133
134 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
135 _LT_AC_PROG_ECHO_BACKSLASH
136
137 case $host_os in
138 aix3*)
139 # AIX sometimes has problems with the GCC collect2 program. For some
140 # reason, if we set the COLLECT_NAMES environment variable, the problems
141 # vanish in a puff of smoke.
142 if test "X${COLLECT_NAMES+set}" != Xset; then
143 COLLECT_NAMES=
144 export COLLECT_NAMES
145 fi
146 ;;
147 esac
148
149 # Sed substitution that helps us do robust quoting. It backslashifies
150 # metacharacters that are still active within double-quoted strings.
151 Xsed='sed -e 1s/^X//'
152 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
153
154 # Same as above, but do not quote variable references.
155 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
156
157 # Sed substitution to delay expansion of an escaped shell variable in a
158 # double_quote_subst'ed string.
159 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
160
161 # Sed substitution to avoid accidental globbing in evaled expressions
162 no_glob_subst='s/\*/\\\*/g'
163
164 # Constants:
165 rm="rm -f"
166
167 # Global variables:
168 default_ofile=libtool
169 can_build_shared=yes
170
171 # All known linkers require a `.a' archive for static linking (except MSVC,
172 # which needs '.lib').
173 libext=a
174 ltmain="$ac_aux_dir/ltmain.sh"
175 ofile="$default_ofile"
176 with_gnu_ld="$lt_cv_prog_gnu_ld"
177
178 AC_CHECK_TOOL(AR, ar, false)
179 AC_CHECK_TOOL(RANLIB, ranlib, :)
180 AC_CHECK_TOOL(STRIP, strip, :)
181
182 old_CC="$CC"
183 old_CFLAGS="$CFLAGS"
184
185 # Set sane defaults for various variables
186 test -z "$AR" && AR=ar
187 test -z "$AR_FLAGS" && AR_FLAGS=cru
188 test -z "$AS" && AS=as
189 test -z "$CC" && CC=cc
190 test -z "$LTCC" && LTCC=$CC
191 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
192 test -z "$DLLTOOL" && DLLTOOL=dlltool
193 test -z "$LD" && LD=ld
194 test -z "$LN_S" && LN_S="ln -s"
195 test -z "$MAGIC_CMD" && MAGIC_CMD=file
196 test -z "$NM" && NM=nm
197 test -z "$SED" && SED=sed
198 test -z "$OBJDUMP" && OBJDUMP=objdump
199 test -z "$RANLIB" && RANLIB=:
200 test -z "$STRIP" && STRIP=:
201 test -z "$ac_objext" && ac_objext=o
202
203 # Determine commands to create old-style static archives.
204 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
205 old_postinstall_cmds='chmod 644 $oldlib'
206 old_postuninstall_cmds=
207
208 if test -n "$RANLIB"; then
209 case $host_os in
210 openbsd*)
211 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
212 ;;
213 *)
214 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
215 ;;
216 esac
217 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
218 fi
219
220 _LT_CC_BASENAME([$compiler])
221
222 # Only perform the check for file, if the check method requires it
223 case $deplibs_check_method in
224 file_magic*)
225 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
226 AC_PATH_MAGIC
227 fi
228 ;;
229 esac
230
231 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
232 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
233 enable_win32_dll=yes, enable_win32_dll=no)
234
235 AC_ARG_ENABLE([libtool-lock],
236 [AC_HELP_STRING([--disable-libtool-lock],
237 [avoid locking (might break parallel builds)])])
238 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
239
240 AC_ARG_WITH([pic],
241 [AC_HELP_STRING([--with-pic],
242 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
243 [pic_mode="$withval"],
244 [pic_mode=default])
245 test -z "$pic_mode" && pic_mode=default
246
247 # Use C for the default configuration in the libtool script
248 tagname=
249 AC_LIBTOOL_LANG_C_CONFIG
250 _LT_AC_TAGCONFIG
251 ])# AC_LIBTOOL_SETUP
252
253
254 # _LT_AC_SYS_COMPILER
255 # -------------------
256 AC_DEFUN([_LT_AC_SYS_COMPILER],
257 [AC_REQUIRE([AC_PROG_CC])dnl
258
259 # If no C compiler was specified, use CC.
260 LTCC=${LTCC-"$CC"}
261
262 # If no C compiler flags were specified, use CFLAGS.
263 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
264
265 # Allow CC to be a program name with arguments.
266 compiler=$CC
267 ])# _LT_AC_SYS_COMPILER
268
269
270 # _LT_CC_BASENAME(CC)
271 # -------------------
272 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
273 AC_DEFUN([_LT_CC_BASENAME],
274 [for cc_temp in $1""; do
275 case $cc_temp in
276 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
277 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
278 \-*) ;;
279 *) break;;
280 esac
281 done
282 cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
283 ])
284
285
286 # _LT_COMPILER_BOILERPLATE
287 # ------------------------
288 # Check for compiler boilerplate output or warnings with
289 # the simple compiler test code.
290 AC_DEFUN([_LT_COMPILER_BOILERPLATE],
291 [ac_outfile=conftest.$ac_objext
292 printf "$lt_simple_compile_test_code" >conftest.$ac_ext
293 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
294 _lt_compiler_boilerplate=`cat conftest.err`
295 $rm conftest*
296 ])# _LT_COMPILER_BOILERPLATE
297
298
299 # _LT_LINKER_BOILERPLATE
300 # ----------------------
301 # Check for linker boilerplate output or warnings with
302 # the simple link test code.
303 AC_DEFUN([_LT_LINKER_BOILERPLATE],
304 [ac_outfile=conftest.$ac_objext
305 printf "$lt_simple_link_test_code" >conftest.$ac_ext
306 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
307 _lt_linker_boilerplate=`cat conftest.err`
308 $rm conftest*
309 ])# _LT_LINKER_BOILERPLATE
310
311
312 # _LT_AC_SYS_LIBPATH_AIX
313 # ----------------------
314 # Links a minimal program and checks the executable
315 # for the system default hardcoded library path. In most cases,
316 # this is /usr/lib:/lib, but when the MPI compilers are used
317 # the location of the communication and MPI libs are included too.
318 # If we don't find anything, use the default library path according
319 # to the aix ld manual.
320 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
321 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
322 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
323 }'`
324 # Check for a 64-bit object if we didn't find anything.
325 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
326 }'`; fi],[])
327 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
328 ])# _LT_AC_SYS_LIBPATH_AIX
329
330
331 # _LT_AC_SHELL_INIT(ARG)
332 # ----------------------
333 AC_DEFUN([_LT_AC_SHELL_INIT],
334 [ifdef([AC_DIVERSION_NOTICE],
335 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
336 [AC_DIVERT_PUSH(NOTICE)])
337 $1
338 AC_DIVERT_POP
339 ])# _LT_AC_SHELL_INIT
340
341
342 # _LT_AC_PROG_ECHO_BACKSLASH
343 # --------------------------
344 # Add some code to the start of the generated configure script which
345 # will find an echo command which doesn't interpret backslashes.
346 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
347 [_LT_AC_SHELL_INIT([
348 # Check that we are running under the correct shell.
349 SHELL=${CONFIG_SHELL-/bin/sh}
350
351 case X$ECHO in
352 X*--fallback-echo)
353 # Remove one level of quotation (which was required for Make).
354 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
355 ;;
356 esac
357
358 echo=${ECHO-echo}
359 if test "X[$]1" = X--no-reexec; then
360 # Discard the --no-reexec flag, and continue.
361 shift
362 elif test "X[$]1" = X--fallback-echo; then
363 # Avoid inline document here, it may be left over
364 :
365 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
366 # Yippee, $echo works!
367 :
368 else
369 # Restart under the correct shell.
370 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
371 fi
372
373 if test "X[$]1" = X--fallback-echo; then
374 # used as fallback echo
375 shift
376 cat <<EOF
377 [$]*
378 EOF
379 exit 0
380 fi
381
382 # The HP-UX ksh and POSIX shell print the target directory to stdout
383 # if CDPATH is set.
384 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
385
386 if test -z "$ECHO"; then
387 if test "X${echo_test_string+set}" != Xset; then
388 # find a string as large as possible, as long as the shell can cope with it
389 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
390 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
391 if (echo_test_string=`eval $cmd`) 2>/dev/null &&
392 echo_test_string=`eval $cmd` &&
393 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
394 then
395 break
396 fi
397 done
398 fi
399
400 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
401 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
402 test "X$echo_testing_string" = "X$echo_test_string"; then
403 :
404 else
405 # The Solaris, AIX, and Digital Unix default echo programs unquote
406 # backslashes. This makes it impossible to quote backslashes using
407 # echo "$something" | sed 's/\\/\\\\/g'
408 #
409 # So, first we look for a working echo in the user's PATH.
410
411 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
412 for dir in $PATH /usr/ucb; do
413 IFS="$lt_save_ifs"
414 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
415 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
416 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
417 test "X$echo_testing_string" = "X$echo_test_string"; then
418 echo="$dir/echo"
419 break
420 fi
421 done
422 IFS="$lt_save_ifs"
423
424 if test "X$echo" = Xecho; then
425 # We didn't find a better echo, so look for alternatives.
426 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
427 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
428 test "X$echo_testing_string" = "X$echo_test_string"; then
429 # This shell has a builtin print -r that does the trick.
430 echo='print -r'
431 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
432 test "X$CONFIG_SHELL" != X/bin/ksh; then
433 # If we have ksh, try running configure again with it.
434 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
435 export ORIGINAL_CONFIG_SHELL
436 CONFIG_SHELL=/bin/ksh
437 export CONFIG_SHELL
438 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
439 else
440 # Try using printf.
441 echo='printf %s\n'
442 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
443 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
444 test "X$echo_testing_string" = "X$echo_test_string"; then
445 # Cool, printf works
446 :
447 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
448 test "X$echo_testing_string" = 'X\t' &&
449 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
450 test "X$echo_testing_string" = "X$echo_test_string"; then
451 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
452 export CONFIG_SHELL
453 SHELL="$CONFIG_SHELL"
454 export SHELL
455 echo="$CONFIG_SHELL [$]0 --fallback-echo"
456 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
457 test "X$echo_testing_string" = 'X\t' &&
458 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
459 test "X$echo_testing_string" = "X$echo_test_string"; then
460 echo="$CONFIG_SHELL [$]0 --fallback-echo"
461 else
462 # maybe with a smaller string...
463 prev=:
464
465 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
466 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
467 then
468 break
469 fi
470 prev="$cmd"
471 done
472
473 if test "$prev" != 'sed 50q "[$]0"'; then
474 echo_test_string=`eval $prev`
475 export echo_test_string
476 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
477 else
478 # Oops. We lost completely, so just stick with echo.
479 echo=echo
480 fi
481 fi
482 fi
483 fi
484 fi
485 fi
486
487 # Copy echo and quote the copy suitably for passing to libtool from
488 # the Makefile, instead of quoting the original, which is used later.
489 ECHO=$echo
490 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
491 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
492 fi
493
494 AC_SUBST(ECHO)
495 ])])# _LT_AC_PROG_ECHO_BACKSLASH
496
497
498 # _LT_AC_LOCK
499 # -----------
500 AC_DEFUN([_LT_AC_LOCK],
501 [AC_ARG_ENABLE([libtool-lock],
502 [AC_HELP_STRING([--disable-libtool-lock],
503 [avoid locking (might break parallel builds)])])
504 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
505
506 # Some flags need to be propagated to the compiler or linker for good
507 # libtool support.
508 case $host in
509 ia64-*-hpux*)
510 # Find out which ABI we are using.
511 echo 'int i;' > conftest.$ac_ext
512 if AC_TRY_EVAL(ac_compile); then
513 case `/usr/bin/file conftest.$ac_objext` in
514 *ELF-32*)
515 HPUX_IA64_MODE="32"
516 ;;
517 *ELF-64*)
518 HPUX_IA64_MODE="64"
519 ;;
520 esac
521 fi
522 rm -rf conftest*
523 ;;
524 *-*-irix6*)
525 # Find out which ABI we are using.
526 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
527 if AC_TRY_EVAL(ac_compile); then
528 if test "$lt_cv_prog_gnu_ld" = yes; then
529 case `/usr/bin/file conftest.$ac_objext` in
530 *32-bit*)
531 LD="${LD-ld} -melf32bsmip"
532 ;;
533 *N32*)
534 LD="${LD-ld} -melf32bmipn32"
535 ;;
536 *64-bit*)
537 LD="${LD-ld} -melf64bmip"
538 ;;
539 esac
540 else
541 case `/usr/bin/file conftest.$ac_objext` in
542 *32-bit*)
543 LD="${LD-ld} -32"
544 ;;
545 *N32*)
546 LD="${LD-ld} -n32"
547 ;;
548 *64-bit*)
549 LD="${LD-ld} -64"
550 ;;
551 esac
552 fi
553 fi
554 rm -rf conftest*
555 ;;
556
557 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
558 # Find out which ABI we are using.
559 echo 'int i;' > conftest.$ac_ext
560 if AC_TRY_EVAL(ac_compile); then
561 case `/usr/bin/file conftest.o` in
562 *32-bit*)
563 case $host in
564 x86_64-*linux*)
565 LD="${LD-ld} -m elf_i386"
566 ;;
567 ppc64-*linux*|powerpc64-*linux*)
568 LD="${LD-ld} -m elf32ppclinux"
569 ;;
570 s390x-*linux*)
571 LD="${LD-ld} -m elf_s390"
572 ;;
573 sparc64-*linux*)
574 LD="${LD-ld} -m elf32_sparc"
575 ;;
576 esac
577 ;;
578 *64-bit*)
579 case $host in
580 x86_64-*linux*)
581 LD="${LD-ld} -m elf_x86_64"
582 ;;
583 ppc*-*linux*|powerpc*-*linux*)
584 LD="${LD-ld} -m elf64ppc"
585 ;;
586 s390*-*linux*)
587 LD="${LD-ld} -m elf64_s390"
588 ;;
589 sparc*-*linux*)
590 LD="${LD-ld} -m elf64_sparc"
591 ;;
592 esac
593 ;;
594 esac
595 fi
596 rm -rf conftest*
597 ;;
598
599 *-*-sco3.2v5*)
600 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
601 SAVE_CFLAGS="$CFLAGS"
602 CFLAGS="$CFLAGS -belf"
603 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
604 [AC_LANG_PUSH(C)
605 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
606 AC_LANG_POP])
607 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
608 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
609 CFLAGS="$SAVE_CFLAGS"
610 fi
611 ;;
612 sparc*-*solaris*)
613 # Find out which ABI we are using.
614 echo 'int i;' > conftest.$ac_ext
615 if AC_TRY_EVAL(ac_compile); then
616 case `/usr/bin/file conftest.o` in
617 *64-bit*)
618 case $lt_cv_prog_gnu_ld in
619 yes*) LD="${LD-ld} -m elf64_sparc" ;;
620 *) LD="${LD-ld} -64" ;;
621 esac
622 ;;
623 esac
624 fi
625 rm -rf conftest*
626 ;;
627
628 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
629 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
630 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
631 AC_CHECK_TOOL(AS, as, false)
632 AC_CHECK_TOOL(OBJDUMP, objdump, false)
633 ;;
634 ])
635 esac
636
637 need_locks="$enable_libtool_lock"
638
639 ])# _LT_AC_LOCK
640
641
642 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
643 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
644 # ----------------------------------------------------------------
645 # Check whether the given compiler option works
646 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
647 [AC_REQUIRE([LT_AC_PROG_SED])
648 AC_CACHE_CHECK([$1], [$2],
649 [$2=no
650 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
651 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
652 lt_compiler_flag="$3"
653 # Insert the option either (1) after the last *FLAGS variable, or
654 # (2) before a word containing "conftest.", or (3) at the end.
655 # Note that $ac_compile itself does not contain backslashes and begins
656 # with a dollar sign (not a hyphen), so the echo should work correctly.
657 # The option is referenced via a variable to avoid confusing sed.
658 lt_compile=`echo "$ac_compile" | $SED \
659 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
660 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
661 -e 's:$: $lt_compiler_flag:'`
662 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
663 (eval "$lt_compile" 2>conftest.err)
664 ac_status=$?
665 cat conftest.err >&AS_MESSAGE_LOG_FD
666 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
667 if (exit $ac_status) && test -s "$ac_outfile"; then
668 # The compiler can only warn and ignore the option if not recognized
669 # So say no if there are warnings other than the usual output.
670 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
671 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
672 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
673 $2=yes
674 fi
675 fi
676 $rm conftest*
677 ])
678
679 if test x"[$]$2" = xyes; then
680 ifelse([$5], , :, [$5])
681 else
682 ifelse([$6], , :, [$6])
683 fi
684 ])# AC_LIBTOOL_COMPILER_OPTION
685
686
687 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
688 # [ACTION-SUCCESS], [ACTION-FAILURE])
689 # ------------------------------------------------------------
690 # Check whether the given compiler option works
691 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
692 [AC_CACHE_CHECK([$1], [$2],
693 [$2=no
694 save_LDFLAGS="$LDFLAGS"
695 LDFLAGS="$LDFLAGS $3"
696 printf "$lt_simple_link_test_code" > conftest.$ac_ext
697 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
698 # The linker can only warn and ignore the option if not recognized
699 # So say no if there are warnings
700 if test -s conftest.err; then
701 # Append any errors to the config.log.
702 cat conftest.err 1>&AS_MESSAGE_LOG_FD
703 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
704 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
705 if diff conftest.exp conftest.er2 >/dev/null; then
706 $2=yes
707 fi
708 else
709 $2=yes
710 fi
711 fi
712 $rm conftest*
713 LDFLAGS="$save_LDFLAGS"
714 ])
715
716 if test x"[$]$2" = xyes; then
717 ifelse([$4], , :, [$4])
718 else
719 ifelse([$5], , :, [$5])
720 fi
721 ])# AC_LIBTOOL_LINKER_OPTION
722
723
724 # AC_LIBTOOL_SYS_MAX_CMD_LEN
725 # --------------------------
726 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
727 [# find the maximum length of command line arguments
728 AC_MSG_CHECKING([the maximum length of command line arguments])
729 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
730 i=0
731 teststring="ABCD"
732
733 case $build_os in
734 msdosdjgpp*)
735 # On DJGPP, this test can blow up pretty badly due to problems in libc
736 # (any single argument exceeding 2000 bytes causes a buffer overrun
737 # during glob expansion). Even if it were fixed, the result of this
738 # check would be larger than it should be.
739 lt_cv_sys_max_cmd_len=12288; # 12K is about right
740 ;;
741
742 gnu*)
743 # Under GNU Hurd, this test is not required because there is
744 # no limit to the length of command line arguments.
745 # Libtool will interpret -1 as no limit whatsoever
746 lt_cv_sys_max_cmd_len=-1;
747 ;;
748
749 cygwin* | mingw*)
750 # On Win9x/ME, this test blows up -- it succeeds, but takes
751 # about 5 minutes as the teststring grows exponentially.
752 # Worse, since 9x/ME are not pre-emptively multitasking,
753 # you end up with a "frozen" computer, even though with patience
754 # the test eventually succeeds (with a max line length of 256k).
755 # Instead, let's just punt: use the minimum linelength reported by
756 # all of the supported platforms: 8192 (on NT/2K/XP).
757 lt_cv_sys_max_cmd_len=8192;
758 ;;
759
760 amigaos*)
761 # On AmigaOS with pdksh, this test takes hours, literally.
762 # So we just punt and use a minimum line length of 8192.
763 lt_cv_sys_max_cmd_len=8192;
764 ;;
765
766 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
767 # This has been around since 386BSD, at least. Likely further.
768 if test -x /sbin/sysctl; then
769 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
770 elif test -x /usr/sbin/sysctl; then
771 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
772 else
773 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
774 fi
775 # And add a safety zone
776 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
777 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
778 ;;
779
780 interix*)
781 # We know the value 262144 and hardcode it with a safety zone (like BSD)
782 lt_cv_sys_max_cmd_len=196608
783 ;;
784
785 osf*)
786 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
787 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
788 # nice to cause kernel panics so lets avoid the loop below.
789 # First set a reasonable default.
790 lt_cv_sys_max_cmd_len=16384
791 #
792 if test -x /sbin/sysconfig; then
793 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
794 *1*) lt_cv_sys_max_cmd_len=-1 ;;
795 esac
796 fi
797 ;;
798 sco3.2v5*)
799 lt_cv_sys_max_cmd_len=102400
800 ;;
801 sysv5* | sco5v6* | sysv4.2uw2*)
802 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
803 if test -n "$kargmax"; then
804 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
805 else
806 lt_cv_sys_max_cmd_len=32768
807 fi
808 ;;
809 *)
810 # If test is not a shell built-in, we'll probably end up computing a
811 # maximum length that is only half of the actual maximum length, but
812 # we can't tell.
813 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
814 while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
815 = "XX$teststring") >/dev/null 2>&1 &&
816 new_result=`expr "X$teststring" : ".*" 2>&1` &&
817 lt_cv_sys_max_cmd_len=$new_result &&
818 test $i != 17 # 1/2 MB should be enough
819 do
820 i=`expr $i + 1`
821 teststring=$teststring$teststring
822 done
823 teststring=
824 # Add a significant safety factor because C++ compilers can tack on massive
825 # amounts of additional arguments before passing them to the linker.
826 # It appears as though 1/2 is a usable value.
827 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
828 ;;
829 esac
830 ])
831 if test -n $lt_cv_sys_max_cmd_len ; then
832 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
833 else
834 AC_MSG_RESULT(none)
835 fi
836 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
837
838
839 # _LT_AC_CHECK_DLFCN
840 # ------------------
841 AC_DEFUN([_LT_AC_CHECK_DLFCN],
842 [AC_CHECK_HEADERS(dlfcn.h)dnl
843 ])# _LT_AC_CHECK_DLFCN
844
845
846 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
847 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
848 # ---------------------------------------------------------------------
849 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
850 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
851 if test "$cross_compiling" = yes; then :
852 [$4]
853 else
854 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
855 lt_status=$lt_dlunknown
856 cat > conftest.$ac_ext <<EOF
857 [#line __oline__ "configure"
858 #include "confdefs.h"
859
860 #if HAVE_DLFCN_H
861 #include <dlfcn.h>
862 #endif
863
864 #include <stdio.h>
865
866 #ifdef RTLD_GLOBAL
867 # define LT_DLGLOBAL RTLD_GLOBAL
868 #else
869 # ifdef DL_GLOBAL
870 # define LT_DLGLOBAL DL_GLOBAL
871 # else
872 # define LT_DLGLOBAL 0
873 # endif
874 #endif
875
876 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
877 find out it does not work in some platform. */
878 #ifndef LT_DLLAZY_OR_NOW
879 # ifdef RTLD_LAZY
880 # define LT_DLLAZY_OR_NOW RTLD_LAZY
881 # else
882 # ifdef DL_LAZY
883 # define LT_DLLAZY_OR_NOW DL_LAZY
884 # else
885 # ifdef RTLD_NOW
886 # define LT_DLLAZY_OR_NOW RTLD_NOW
887 # else
888 # ifdef DL_NOW
889 # define LT_DLLAZY_OR_NOW DL_NOW
890 # else
891 # define LT_DLLAZY_OR_NOW 0
892 # endif
893 # endif
894 # endif
895 # endif
896 #endif
897
898 #ifdef __cplusplus
899 extern "C" void exit (int);
900 #endif
901
902 void fnord() { int i=42;}
903 int main ()
904 {
905 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
906 int status = $lt_dlunknown;
907
908 if (self)
909 {
910 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
911 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
912 /* dlclose (self); */
913 }
914 else
915 puts (dlerror ());
916
917 exit (status);
918 }]
919 EOF
920 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
921 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
922 lt_status=$?
923 case x$lt_status in
924 x$lt_dlno_uscore) $1 ;;
925 x$lt_dlneed_uscore) $2 ;;
926 x$lt_dlunknown|x*) $3 ;;
927 esac
928 else :
929 # compilation failed
930 $3
931 fi
932 fi
933 rm -fr conftest*
934 ])# _LT_AC_TRY_DLOPEN_SELF
935
936
937 # AC_LIBTOOL_DLOPEN_SELF
938 # ----------------------
939 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
940 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
941 if test "x$enable_dlopen" != xyes; then
942 enable_dlopen=unknown
943 enable_dlopen_self=unknown
944 enable_dlopen_self_static=unknown
945 else
946 lt_cv_dlopen=no
947 lt_cv_dlopen_libs=
948
949 case $host_os in
950 beos*)
951 lt_cv_dlopen="load_add_on"
952 lt_cv_dlopen_libs=
953 lt_cv_dlopen_self=yes
954 ;;
955
956 mingw* | pw32*)
957 lt_cv_dlopen="LoadLibrary"
958 lt_cv_dlopen_libs=
959 ;;
960
961 cygwin*)
962 lt_cv_dlopen="dlopen"
963 lt_cv_dlopen_libs=
964 ;;
965
966 darwin*)
967 # if libdl is installed we need to link against it
968 AC_CHECK_LIB([dl], [dlopen],
969 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
970 lt_cv_dlopen="dyld"
971 lt_cv_dlopen_libs=
972 lt_cv_dlopen_self=yes
973 ])
974 ;;
975
976 *)
977 AC_CHECK_FUNC([shl_load],
978 [lt_cv_dlopen="shl_load"],
979 [AC_CHECK_LIB([dld], [shl_load],
980 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
981 [AC_CHECK_FUNC([dlopen],
982 [lt_cv_dlopen="dlopen"],
983 [AC_CHECK_LIB([dl], [dlopen],
984 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
985 [AC_CHECK_LIB([svld], [dlopen],
986 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
987 [AC_CHECK_LIB([dld], [dld_link],
988 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
989 ])
990 ])
991 ])
992 ])
993 ])
994 ;;
995 esac
996
997 if test "x$lt_cv_dlopen" != xno; then
998 enable_dlopen=yes
999 else
1000 enable_dlopen=no
1001 fi
1002
1003 case $lt_cv_dlopen in
1004 dlopen)
1005 save_CPPFLAGS="$CPPFLAGS"
1006 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1007
1008 save_LDFLAGS="$LDFLAGS"
1009 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1010
1011 save_LIBS="$LIBS"
1012 LIBS="$lt_cv_dlopen_libs $LIBS"
1013
1014 AC_CACHE_CHECK([whether a program can dlopen itself],
1015 lt_cv_dlopen_self, [dnl
1016 _LT_AC_TRY_DLOPEN_SELF(
1017 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1018 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1019 ])
1020
1021 if test "x$lt_cv_dlopen_self" = xyes; then
1022 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1023 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1024 lt_cv_dlopen_self_static, [dnl
1025 _LT_AC_TRY_DLOPEN_SELF(
1026 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1027 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1028 ])
1029 fi
1030
1031 CPPFLAGS="$save_CPPFLAGS"
1032 LDFLAGS="$save_LDFLAGS"
1033 LIBS="$save_LIBS"
1034 ;;
1035 esac
1036
1037 case $lt_cv_dlopen_self in
1038 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1039 *) enable_dlopen_self=unknown ;;
1040 esac
1041
1042 case $lt_cv_dlopen_self_static in
1043 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1044 *) enable_dlopen_self_static=unknown ;;
1045 esac
1046 fi
1047 ])# AC_LIBTOOL_DLOPEN_SELF
1048
1049
1050 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1051 # ---------------------------------
1052 # Check to see if options -c and -o are simultaneously supported by compiler
1053 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1054 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1055 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1056 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1057 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1058 $rm -r conftest 2>/dev/null
1059 mkdir conftest
1060 cd conftest
1061 mkdir out
1062 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1063
1064 lt_compiler_flag="-o out/conftest2.$ac_objext"
1065 # Insert the option either (1) after the last *FLAGS variable, or
1066 # (2) before a word containing "conftest.", or (3) at the end.
1067 # Note that $ac_compile itself does not contain backslashes and begins
1068 # with a dollar sign (not a hyphen), so the echo should work correctly.
1069 lt_compile=`echo "$ac_compile" | $SED \
1070 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1071 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1072 -e 's:$: $lt_compiler_flag:'`
1073 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1074 (eval "$lt_compile" 2>out/conftest.err)
1075 ac_status=$?
1076 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1077 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1078 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1079 then
1080 # The compiler can only warn and ignore the option if not recognized
1081 # So say no if there are warnings
1082 $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1083 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1084 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1085 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1086 fi
1087 fi
1088 chmod u+w . 2>&AS_MESSAGE_LOG_FD
1089 $rm conftest*
1090 # SGI C++ compiler will create directory out/ii_files/ for
1091 # template instantiation
1092 test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1093 $rm out/* && rmdir out
1094 cd ..
1095 rmdir conftest
1096 $rm conftest*
1097 ])
1098 ])# AC_LIBTOOL_PROG_CC_C_O
1099
1100
1101 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1102 # -----------------------------------------
1103 # Check to see if we can do hard links to lock some files if needed
1104 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1105 [AC_REQUIRE([_LT_AC_LOCK])dnl
1106
1107 hard_links="nottested"
1108 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1109 # do not overwrite the value of need_locks provided by the user
1110 AC_MSG_CHECKING([if we can lock with hard links])
1111 hard_links=yes
1112 $rm conftest*
1113 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1114 touch conftest.a
1115 ln conftest.a conftest.b 2>&5 || hard_links=no
1116 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1117 AC_MSG_RESULT([$hard_links])
1118 if test "$hard_links" = no; then
1119 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1120 need_locks=warn
1121 fi
1122 else
1123 need_locks=no
1124 fi
1125 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1126
1127
1128 # AC_LIBTOOL_OBJDIR
1129 # -----------------
1130 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1131 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1132 [rm -f .libs 2>/dev/null
1133 mkdir .libs 2>/dev/null
1134 if test -d .libs; then
1135 lt_cv_objdir=.libs
1136 else
1137 # MS-DOS does not allow filenames that begin with a dot.
1138 lt_cv_objdir=_libs
1139 fi
1140 rmdir .libs 2>/dev/null])
1141 objdir=$lt_cv_objdir
1142 ])# AC_LIBTOOL_OBJDIR
1143
1144
1145 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1146 # ----------------------------------------------
1147 # Check hardcoding attributes.
1148 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1149 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1150 _LT_AC_TAGVAR(hardcode_action, $1)=
1151 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1152 test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1153 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1154
1155 # We can hardcode non-existant directories.
1156 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1157 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1158 # have to relink, otherwise we might link with an installed library
1159 # when we should be linking with a yet-to-be-installed one
1160 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1161 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1162 # Linking always hardcodes the temporary library directory.
1163 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1164 else
1165 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1166 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1167 fi
1168 else
1169 # We cannot hardcode anything, or else we can only hardcode existing
1170 # directories.
1171 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1172 fi
1173 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1174
1175 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1176 # Fast installation is not supported
1177 enable_fast_install=no
1178 elif test "$shlibpath_overrides_runpath" = yes ||
1179 test "$enable_shared" = no; then
1180 # Fast installation is not necessary
1181 enable_fast_install=needless
1182 fi
1183 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1184
1185
1186 # AC_LIBTOOL_SYS_LIB_STRIP
1187 # ------------------------
1188 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1189 [striplib=
1190 old_striplib=
1191 AC_MSG_CHECKING([whether stripping libraries is possible])
1192 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1193 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1194 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1195 AC_MSG_RESULT([yes])
1196 else
1197 # FIXME - insert some real tests, host_os isn't really good enough
1198 case $host_os in
1199 darwin*)
1200 if test -n "$STRIP" ; then
1201 striplib="$STRIP -x"
1202 AC_MSG_RESULT([yes])
1203 else
1204 AC_MSG_RESULT([no])
1205 fi
1206 ;;
1207 *)
1208 AC_MSG_RESULT([no])
1209 ;;
1210 esac
1211 fi
1212 ])# AC_LIBTOOL_SYS_LIB_STRIP
1213
1214
1215 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1216 # -----------------------------
1217 # PORTME Fill in your ld.so characteristics
1218 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1219 [AC_MSG_CHECKING([dynamic linker characteristics])
1220 library_names_spec=
1221 libname_spec='lib$name'
1222 soname_spec=
1223 shrext_cmds=".so"
1224 postinstall_cmds=
1225 postuninstall_cmds=
1226 finish_cmds=
1227 finish_eval=
1228 shlibpath_var=
1229 shlibpath_overrides_runpath=unknown
1230 version_type=none
1231 dynamic_linker="$host_os ld.so"
1232 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1233 if test "$GCC" = yes; then
1234 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1235 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1236 # if the path contains ";" then we assume it to be the separator
1237 # otherwise default to the standard path separator (i.e. ":") - it is
1238 # assumed that no part of a normal pathname contains ";" but that should
1239 # okay in the real world where ";" in dirpaths is itself problematic.
1240 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1241 else
1242 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1243 fi
1244 else
1245 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1246 fi
1247 need_lib_prefix=unknown
1248 hardcode_into_libs=no
1249
1250 # when you set need_version to no, make sure it does not cause -set_version
1251 # flags to be left without arguments
1252 need_version=unknown
1253
1254 case $host_os in
1255 aix3*)
1256 version_type=linux
1257 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1258 shlibpath_var=LIBPATH
1259
1260 # AIX 3 has no versioning support, so we append a major version to the name.
1261 soname_spec='${libname}${release}${shared_ext}$major'
1262 ;;
1263
1264 aix4* | aix5*)
1265 version_type=linux
1266 need_lib_prefix=no
1267 need_version=no
1268 hardcode_into_libs=yes
1269 if test "$host_cpu" = ia64; then
1270 # AIX 5 supports IA64
1271 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1272 shlibpath_var=LD_LIBRARY_PATH
1273 else
1274 # With GCC up to 2.95.x, collect2 would create an import file
1275 # for dependence libraries. The import file would start with
1276 # the line `#! .'. This would cause the generated library to
1277 # depend on `.', always an invalid library. This was fixed in
1278 # development snapshots of GCC prior to 3.0.
1279 case $host_os in
1280 aix4 | aix4.[[01]] | aix4.[[01]].*)
1281 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1282 echo ' yes '
1283 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1284 :
1285 else
1286 can_build_shared=no
1287 fi
1288 ;;
1289 esac
1290 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1291 # soname into executable. Probably we can add versioning support to
1292 # collect2, so additional links can be useful in future.
1293 if test "$aix_use_runtimelinking" = yes; then
1294 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1295 # instead of lib<name>.a to let people know that these are not
1296 # typical AIX shared libraries.
1297 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1298 else
1299 # We preserve .a as extension for shared libraries through AIX4.2
1300 # and later when we are not doing run time linking.
1301 library_names_spec='${libname}${release}.a $libname.a'
1302 soname_spec='${libname}${release}${shared_ext}$major'
1303 fi
1304 shlibpath_var=LIBPATH
1305 fi
1306 ;;
1307
1308 amigaos*)
1309 library_names_spec='$libname.ixlibrary $libname.a'
1310 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1311 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
1312 ;;
1313
1314 beos*)
1315 library_names_spec='${libname}${shared_ext}'
1316 dynamic_linker="$host_os ld.so"
1317 shlibpath_var=LIBRARY_PATH
1318 ;;
1319
1320 bsdi[[45]]*)
1321 version_type=linux
1322 need_version=no
1323 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1324 soname_spec='${libname}${release}${shared_ext}$major'
1325 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1326 shlibpath_var=LD_LIBRARY_PATH
1327 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1328 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1329 # the default ld.so.conf also contains /usr/contrib/lib and
1330 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1331 # libtool to hard-code these into programs
1332 ;;
1333
1334 cygwin* | mingw* | pw32*)
1335 version_type=windows
1336 shrext_cmds=".dll"
1337 need_version=no
1338 need_lib_prefix=no
1339
1340 case $GCC,$host_os in
1341 yes,cygwin* | yes,mingw* | yes,pw32*)
1342 library_names_spec='$libname.dll.a'
1343 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1344 postinstall_cmds='base_file=`basename \${file}`~
1345 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1346 dldir=$destdir/`dirname \$dlpath`~
1347 test -d \$dldir || mkdir -p \$dldir~
1348 $install_prog $dir/$dlname \$dldir/$dlname~
1349 chmod a+x \$dldir/$dlname'
1350 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1351 dlpath=$dir/\$dldll~
1352 $rm \$dlpath'
1353 shlibpath_overrides_runpath=yes
1354
1355 case $host_os in
1356 cygwin*)
1357 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1358 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1359 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1360 ;;
1361 mingw*)
1362 # MinGW DLLs use traditional 'lib' prefix
1363 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1364 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1365 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1366 # It is most probably a Windows format PATH printed by
1367 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1368 # path with ; separators, and with drive letters. We can handle the
1369 # drive letters (cygwin fileutils understands them), so leave them,
1370 # especially as we might pass files found there to a mingw objdump,
1371 # which wouldn't understand a cygwinified path. Ahh.
1372 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1373 else
1374 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1375 fi
1376 ;;
1377 pw32*)
1378 # pw32 DLLs use 'pw' prefix rather than 'lib'
1379 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1380 ;;
1381 esac
1382 ;;
1383
1384 *)
1385 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1386 ;;
1387 esac
1388 dynamic_linker='Win32 ld.exe'
1389 # FIXME: first we should search . and the directory the executable is in
1390 shlibpath_var=PATH
1391 ;;
1392
1393 darwin* | rhapsody*)
1394 dynamic_linker="$host_os dyld"
1395 version_type=darwin
1396 need_lib_prefix=no
1397 need_version=no
1398 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1399 soname_spec='${libname}${release}${major}$shared_ext'
1400 shlibpath_overrides_runpath=yes
1401 shlibpath_var=DYLD_LIBRARY_PATH
1402 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1403 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1404 if test "$GCC" = yes; then
1405 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1406 else
1407 sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1408 fi
1409 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1410 ;;
1411
1412 dgux*)
1413 version_type=linux
1414 need_lib_prefix=no
1415 need_version=no
1416 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1417 soname_spec='${libname}${release}${shared_ext}$major'
1418 shlibpath_var=LD_LIBRARY_PATH
1419 ;;
1420
1421 freebsd1*)
1422 dynamic_linker=no
1423 ;;
1424
1425 kfreebsd*-gnu)
1426 version_type=linux
1427 need_lib_prefix=no
1428 need_version=no
1429 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1430 soname_spec='${libname}${release}${shared_ext}$major'
1431 shlibpath_var=LD_LIBRARY_PATH
1432 shlibpath_overrides_runpath=no
1433 hardcode_into_libs=yes
1434 dynamic_linker='GNU ld.so'
1435 ;;
1436
1437 freebsd* | dragonfly*)
1438 # DragonFly does not have aout. When/if they implement a new
1439 # versioning mechanism, adjust this.
1440 if test -x /usr/bin/objformat; then
1441 objformat=`/usr/bin/objformat`
1442 else
1443 case $host_os in
1444 freebsd[[123]]*) objformat=aout ;;
1445 *) objformat=elf ;;
1446 esac
1447 fi
1448 version_type=freebsd-$objformat
1449 case $version_type in
1450 freebsd-elf*)
1451 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1452 need_version=no
1453 need_lib_prefix=no
1454 ;;
1455 freebsd-*)
1456 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1457 need_version=yes
1458 ;;
1459 esac
1460 shlibpath_var=LD_LIBRARY_PATH
1461 case $host_os in
1462 freebsd2*)
1463 shlibpath_overrides_runpath=yes
1464 ;;
1465 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1466 shlibpath_overrides_runpath=yes
1467 hardcode_into_libs=yes
1468 ;;
1469 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1470 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1471 shlibpath_overrides_runpath=no
1472 hardcode_into_libs=yes
1473 ;;
1474 freebsd*) # from 4.6 on
1475 shlibpath_overrides_runpath=yes
1476 hardcode_into_libs=yes
1477 ;;
1478 esac
1479 ;;
1480
1481 gnu*)
1482 version_type=linux
1483 need_lib_prefix=no
1484 need_version=no
1485 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1486 soname_spec='${libname}${release}${shared_ext}$major'
1487 shlibpath_var=LD_LIBRARY_PATH
1488 hardcode_into_libs=yes
1489 ;;
1490
1491 hpux9* | hpux10* | hpux11*)
1492 # Give a soname corresponding to the major version so that dld.sl refuses to
1493 # link against other versions.
1494 version_type=sunos
1495 need_lib_prefix=no
1496 need_version=no
1497 case $host_cpu in
1498 ia64*)
1499 shrext_cmds='.so'
1500 hardcode_into_libs=yes
1501 dynamic_linker="$host_os dld.so"
1502 shlibpath_var=LD_LIBRARY_PATH
1503 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1504 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1505 soname_spec='${libname}${release}${shared_ext}$major'
1506 if test "X$HPUX_IA64_MODE" = X32; then
1507 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1508 else
1509 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1510 fi
1511 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1512 ;;
1513 hppa*64*)
1514 shrext_cmds='.sl'
1515 hardcode_into_libs=yes
1516 dynamic_linker="$host_os dld.sl"
1517 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1518 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1520 soname_spec='${libname}${release}${shared_ext}$major'
1521 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1522 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1523 ;;
1524 *)
1525 shrext_cmds='.sl'
1526 dynamic_linker="$host_os dld.sl"
1527 shlibpath_var=SHLIB_PATH
1528 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1529 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1530 soname_spec='${libname}${release}${shared_ext}$major'
1531 ;;
1532 esac
1533 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1534 postinstall_cmds='chmod 555 $lib'
1535 ;;
1536
1537 interix3*)
1538 version_type=linux
1539 need_lib_prefix=no
1540 need_version=no
1541 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1542 soname_spec='${libname}${release}${shared_ext}$major'
1543 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1544 shlibpath_var=LD_LIBRARY_PATH
1545 shlibpath_overrides_runpath=no
1546 hardcode_into_libs=yes
1547 ;;
1548
1549 irix5* | irix6* | nonstopux*)
1550 case $host_os in
1551 nonstopux*) version_type=nonstopux ;;
1552 *)
1553 if test "$lt_cv_prog_gnu_ld" = yes; then
1554 version_type=linux
1555 else
1556 version_type=irix
1557 fi ;;
1558 esac
1559 need_lib_prefix=no
1560 need_version=no
1561 soname_spec='${libname}${release}${shared_ext}$major'
1562 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1563 case $host_os in
1564 irix5* | nonstopux*)
1565 libsuff= shlibsuff=
1566 ;;
1567 *)
1568 case $LD in # libtool.m4 will add one of these switches to LD
1569 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1570 libsuff= shlibsuff= libmagic=32-bit;;
1571 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1572 libsuff=32 shlibsuff=N32 libmagic=N32;;
1573 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1574 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1575 *) libsuff= shlibsuff= libmagic=never-match;;
1576 esac
1577 ;;
1578 esac
1579 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1580 shlibpath_overrides_runpath=no
1581 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1582 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1583 hardcode_into_libs=yes
1584 ;;
1585
1586 # No shared lib support for Linux oldld, aout, or coff.
1587 linux*oldld* | linux*aout* | linux*coff*)
1588 dynamic_linker=no
1589 ;;
1590
1591 # This must be Linux ELF.
1592 linux*)
1593 version_type=linux
1594 need_lib_prefix=no
1595 need_version=no
1596 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1597 soname_spec='${libname}${release}${shared_ext}$major'
1598 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1599 shlibpath_var=LD_LIBRARY_PATH
1600 shlibpath_overrides_runpath=no
1601 # This implies no fast_install, which is unacceptable.
1602 # Some rework will be needed to allow for fast_install
1603 # before this can be enabled.
1604 hardcode_into_libs=yes
1605
1606 # find out which ABI we are using
1607 libsuff=
1608 case "$host_cpu" in
1609 x86_64*|s390x*|powerpc64*)
1610 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1611 if AC_TRY_EVAL(ac_compile); then
1612 case `/usr/bin/file conftest.$ac_objext` in
1613 *64-bit*)
1614 libsuff=64
1615 sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1616 ;;
1617 esac
1618 fi
1619 rm -rf conftest*
1620 ;;
1621 esac
1622
1623 # Append ld.so.conf contents to the search path
1624 if test -f /etc/ld.so.conf; then
1625 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1626 sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1627 fi
1628
1629 # We used to test for /lib/ld.so.1 and disable shared libraries on
1630 # powerpc, because MkLinux only supported shared libraries with the
1631 # GNU dynamic linker. Since this was broken with cross compilers,
1632 # most powerpc-linux boxes support dynamic linking these days and
1633 # people can always --disable-shared, the test was removed, and we
1634 # assume the GNU/Linux dynamic linker is in use.
1635 dynamic_linker='GNU/Linux ld.so'
1636 ;;
1637
1638 knetbsd*-gnu)
1639 version_type=linux
1640 need_lib_prefix=no
1641 need_version=no
1642 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1643 soname_spec='${libname}${release}${shared_ext}$major'
1644 shlibpath_var=LD_LIBRARY_PATH
1645 shlibpath_overrides_runpath=no
1646 hardcode_into_libs=yes
1647 dynamic_linker='GNU ld.so'
1648 ;;
1649
1650 netbsd*)
1651 version_type=sunos
1652 need_lib_prefix=no
1653 need_version=no
1654 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1655 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1656 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1657 dynamic_linker='NetBSD (a.out) ld.so'
1658 else
1659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1660 soname_spec='${libname}${release}${shared_ext}$major'
1661 dynamic_linker='NetBSD ld.elf_so'
1662 fi
1663 shlibpath_var=LD_LIBRARY_PATH
1664 shlibpath_overrides_runpath=yes
1665 hardcode_into_libs=yes
1666 ;;
1667
1668 newsos6)
1669 version_type=linux
1670 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1671 shlibpath_var=LD_LIBRARY_PATH
1672 shlibpath_overrides_runpath=yes
1673 ;;
1674
1675 nto-qnx*)
1676 version_type=linux
1677 need_lib_prefix=no
1678 need_version=no
1679 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1680 soname_spec='${libname}${release}${shared_ext}$major'
1681 shlibpath_var=LD_LIBRARY_PATH
1682 shlibpath_overrides_runpath=yes
1683 ;;
1684
1685 openbsd*)
1686 version_type=sunos
1687 sys_lib_dlsearch_path_spec="/usr/lib"
1688 need_lib_prefix=no
1689 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1690 case $host_os in
1691 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1692 *) need_version=no ;;
1693 esac
1694 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1695 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1696 shlibpath_var=LD_LIBRARY_PATH
1697 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1698 case $host_os in
1699 openbsd2.[[89]] | openbsd2.[[89]].*)
1700 shlibpath_overrides_runpath=no
1701 ;;
1702 *)
1703 shlibpath_overrides_runpath=yes
1704 ;;
1705 esac
1706 else
1707 shlibpath_overrides_runpath=yes
1708 fi
1709 ;;
1710
1711 os2*)
1712 libname_spec='$name'
1713 shrext_cmds=".dll"
1714 need_lib_prefix=no
1715 library_names_spec='$libname${shared_ext} $libname.a'
1716 dynamic_linker='OS/2 ld.exe'
1717 shlibpath_var=LIBPATH
1718 ;;
1719
1720 osf3* | osf4* | osf5*)
1721 version_type=osf
1722 need_lib_prefix=no
1723 need_version=no
1724 soname_spec='${libname}${release}${shared_ext}$major'
1725 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1726 shlibpath_var=LD_LIBRARY_PATH
1727 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1728 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1729 ;;
1730
1731 solaris*)
1732 version_type=linux
1733 need_lib_prefix=no
1734 need_version=no
1735 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1736 soname_spec='${libname}${release}${shared_ext}$major'
1737 shlibpath_var=LD_LIBRARY_PATH
1738 shlibpath_overrides_runpath=yes
1739 hardcode_into_libs=yes
1740 # ldd complains unless libraries are executable
1741 postinstall_cmds='chmod +x $lib'
1742 ;;
1743
1744 sunos4*)
1745 version_type=sunos
1746 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1747 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1748 shlibpath_var=LD_LIBRARY_PATH
1749 shlibpath_overrides_runpath=yes
1750 if test "$with_gnu_ld" = yes; then
1751 need_lib_prefix=no
1752 fi
1753 need_version=yes
1754 ;;
1755
1756 sysv4 | sysv4.3*)
1757 version_type=linux
1758 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1759 soname_spec='${libname}${release}${shared_ext}$major'
1760 shlibpath_var=LD_LIBRARY_PATH
1761 case $host_vendor in
1762 sni)
1763 shlibpath_overrides_runpath=no
1764 need_lib_prefix=no
1765 export_dynamic_flag_spec='${wl}-Blargedynsym'
1766 runpath_var=LD_RUN_PATH
1767 ;;
1768 siemens)
1769 need_lib_prefix=no
1770 ;;
1771 motorola)
1772 need_lib_prefix=no
1773 need_version=no
1774 shlibpath_overrides_runpath=no
1775 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1776 ;;
1777 esac
1778 ;;
1779
1780 sysv4*MP*)
1781 if test -d /usr/nec ;then
1782 version_type=linux
1783 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1784 soname_spec='$libname${shared_ext}.$major'
1785 shlibpath_var=LD_LIBRARY_PATH
1786 fi
1787 ;;
1788
1789 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1790 version_type=freebsd-elf
1791 need_lib_prefix=no
1792 need_version=no
1793 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1794 soname_spec='${libname}${release}${shared_ext}$major'
1795 shlibpath_var=LD_LIBRARY_PATH
1796 hardcode_into_libs=yes
1797 if test "$with_gnu_ld" = yes; then
1798 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1799 shlibpath_overrides_runpath=no
1800 else
1801 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1802 shlibpath_overrides_runpath=yes
1803 case $host_os in
1804 sco3.2v5*)
1805 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1806 ;;
1807 esac
1808 fi
1809 sys_lib_dlsearch_path_spec='/usr/lib'
1810 ;;
1811
1812 uts4*)
1813 version_type=linux
1814 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1815 soname_spec='${libname}${release}${shared_ext}$major'
1816 shlibpath_var=LD_LIBRARY_PATH
1817 ;;
1818
1819 *)
1820 dynamic_linker=no
1821 ;;
1822 esac
1823 AC_MSG_RESULT([$dynamic_linker])
1824 test "$dynamic_linker" = no && can_build_shared=no
1825
1826 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1827 if test "$GCC" = yes; then
1828 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1829 fi
1830 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1831
1832
1833 # _LT_AC_TAGCONFIG
1834 # ----------------
1835 AC_DEFUN([_LT_AC_TAGCONFIG],
1836 [AC_ARG_WITH([tags],
1837 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1838 [include additional configurations @<:@automatic@:>@])],
1839 [tagnames="$withval"])
1840
1841 if test -f "$ltmain" && test -n "$tagnames"; then
1842 if test ! -f "${ofile}"; then
1843 AC_MSG_WARN([output file `$ofile' does not exist])
1844 fi
1845
1846 if test -z "$LTCC"; then
1847 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1848 if test -z "$LTCC"; then
1849 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1850 else
1851 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1852 fi
1853 fi
1854 if test -z "$LTCFLAGS"; then
1855 eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1856 fi
1857
1858 # Extract list of available tagged configurations in $ofile.
1859 # Note that this assumes the entire list is on one line.
1860 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1861
1862 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1863 for tagname in $tagnames; do
1864 IFS="$lt_save_ifs"
1865 # Check whether tagname contains only valid characters
1866 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1867 "") ;;
1868 *) AC_MSG_ERROR([invalid tag name: $tagname])
1869 ;;
1870 esac
1871
1872 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1873 then
1874 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1875 fi
1876
1877 # Update the list of available tags.
1878 if test -n "$tagname"; then
1879 echo appending configuration tag \"$tagname\" to $ofile
1880
1881 case $tagname in
1882 CXX)
1883 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1884 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1885 (test "X$CXX" != "Xg++"))) ; then
1886 AC_LIBTOOL_LANG_CXX_CONFIG
1887 else
1888 tagname=""
1889 fi
1890 ;;
1891
1892 F77)
1893 if test -n "$F77" && test "X$F77" != "Xno"; then
1894 AC_LIBTOOL_LANG_F77_CONFIG
1895 else
1896 tagname=""
1897 fi
1898 ;;
1899
1900 GCJ)
1901 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1902 AC_LIBTOOL_LANG_GCJ_CONFIG
1903 else
1904 tagname=""
1905 fi
1906 ;;
1907
1908 RC)
1909 AC_LIBTOOL_LANG_RC_CONFIG
1910 ;;
1911
1912 *)
1913 AC_MSG_ERROR([Unsupported tag name: $tagname])
1914 ;;
1915 esac
1916
1917 # Append the new tag name to the list of available tags.
1918 if test -n "$tagname" ; then
1919 available_tags="$available_tags $tagname"
1920 fi
1921 fi
1922 done
1923 IFS="$lt_save_ifs"
1924
1925 # Now substitute the updated list of available tags.
1926 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1927 mv "${ofile}T" "$ofile"
1928 chmod +x "$ofile"
1929 else
1930 rm -f "${ofile}T"
1931 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1932 fi
1933 fi
1934 ])# _LT_AC_TAGCONFIG
1935
1936
1937 # AC_LIBTOOL_DLOPEN
1938 # -----------------
1939 # enable checks for dlopen support
1940 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1941 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1942 ])# AC_LIBTOOL_DLOPEN
1943
1944
1945 # AC_LIBTOOL_WIN32_DLL
1946 # --------------------
1947 # declare package support for building win32 DLLs
1948 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1949 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1950 ])# AC_LIBTOOL_WIN32_DLL
1951
1952
1953 # AC_ENABLE_SHARED([DEFAULT])
1954 # ---------------------------
1955 # implement the --enable-shared flag
1956 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1957 AC_DEFUN([AC_ENABLE_SHARED],
1958 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1959 AC_ARG_ENABLE([shared],
1960 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1961 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1962 [p=${PACKAGE-default}
1963 case $enableval in
1964 yes) enable_shared=yes ;;
1965 no) enable_shared=no ;;
1966 *)
1967 enable_shared=no
1968 # Look at the argument we got. We use all the common list separators.
1969 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1970 for pkg in $enableval; do
1971 IFS="$lt_save_ifs"
1972 if test "X$pkg" = "X$p"; then
1973 enable_shared=yes
1974 fi
1975 done
1976 IFS="$lt_save_ifs"
1977 ;;
1978 esac],
1979 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1980 ])# AC_ENABLE_SHARED
1981
1982
1983 # AC_DISABLE_SHARED
1984 # -----------------
1985 # set the default shared flag to --disable-shared
1986 AC_DEFUN([AC_DISABLE_SHARED],
1987 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1988 AC_ENABLE_SHARED(no)
1989 ])# AC_DISABLE_SHARED
1990
1991
1992 # AC_ENABLE_STATIC([DEFAULT])
1993 # ---------------------------
1994 # implement the --enable-static flag
1995 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1996 AC_DEFUN([AC_ENABLE_STATIC],
1997 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1998 AC_ARG_ENABLE([static],
1999 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2000 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2001 [p=${PACKAGE-default}
2002 case $enableval in
2003 yes) enable_static=yes ;;
2004 no) enable_static=no ;;
2005 *)
2006 enable_static=no
2007 # Look at the argument we got. We use all the common list separators.
2008 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2009 for pkg in $enableval; do
2010 IFS="$lt_save_ifs"
2011 if test "X$pkg" = "X$p"; then
2012 enable_static=yes
2013 fi
2014 done
2015 IFS="$lt_save_ifs"
2016 ;;
2017 esac],
2018 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2019 ])# AC_ENABLE_STATIC
2020
2021
2022 # AC_DISABLE_STATIC
2023 # -----------------
2024 # set the default static flag to --disable-static
2025 AC_DEFUN([AC_DISABLE_STATIC],
2026 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2027 AC_ENABLE_STATIC(no)
2028 ])# AC_DISABLE_STATIC
2029
2030
2031 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2032 # ---------------------------------
2033 # implement the --enable-fast-install flag
2034 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
2035 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2036 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2037 AC_ARG_ENABLE([fast-install],
2038 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2039 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2040 [p=${PACKAGE-default}
2041 case $enableval in
2042 yes) enable_fast_install=yes ;;
2043 no) enable_fast_install=no ;;
2044 *)
2045 enable_fast_install=no
2046 # Look at the argument we got. We use all the common list separators.
2047 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2048 for pkg in $enableval; do
2049 IFS="$lt_save_ifs"
2050 if test "X$pkg" = "X$p"; then
2051 enable_fast_install=yes
2052 fi
2053 done
2054 IFS="$lt_save_ifs"
2055 ;;
2056 esac],
2057 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2058 ])# AC_ENABLE_FAST_INSTALL
2059
2060
2061 # AC_DISABLE_FAST_INSTALL
2062 # -----------------------
2063 # set the default to --disable-fast-install
2064 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2065 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2066 AC_ENABLE_FAST_INSTALL(no)
2067 ])# AC_DISABLE_FAST_INSTALL
2068
2069
2070 # AC_LIBTOOL_PICMODE([MODE])
2071 # --------------------------
2072 # implement the --with-pic flag
2073 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2074 AC_DEFUN([AC_LIBTOOL_PICMODE],
2075 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2076 pic_mode=ifelse($#,1,$1,default)
2077 ])# AC_LIBTOOL_PICMODE
2078
2079
2080 # AC_PROG_EGREP
2081 # -------------
2082 # This is predefined starting with Autoconf 2.54, so this conditional
2083 # definition can be removed once we require Autoconf 2.54 or later.
2084 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2085 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2086 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2087 then ac_cv_prog_egrep='grep -E'
2088 else ac_cv_prog_egrep='egrep'
2089 fi])
2090 EGREP=$ac_cv_prog_egrep
2091 AC_SUBST([EGREP])
2092 ])])
2093
2094
2095 # AC_PATH_TOOL_PREFIX
2096 # -------------------
2097 # find a file program which can recognise shared library
2098 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2099 [AC_REQUIRE([AC_PROG_EGREP])dnl
2100 AC_MSG_CHECKING([for $1])
2101 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2102 [case $MAGIC_CMD in
2103 [[\\/*] | ?:[\\/]*])
2104 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2105 ;;
2106 *)
2107 lt_save_MAGIC_CMD="$MAGIC_CMD"
2108 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2109 dnl $ac_dummy forces splitting on constant user-supplied paths.
2110 dnl POSIX.2 word splitting is done only on the output of word expansions,
2111 dnl not every word. This closes a longstanding sh security hole.
2112 ac_dummy="ifelse([$2], , $PATH, [$2])"
2113 for ac_dir in $ac_dummy; do
2114 IFS="$lt_save_ifs"
2115 test -z "$ac_dir" && ac_dir=.
2116 if test -f $ac_dir/$1; then
2117 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2118 if test -n "$file_magic_test_file"; then
2119 case $deplibs_check_method in
2120 "file_magic "*)
2121 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2122 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2123 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2124 $EGREP "$file_magic_regex" > /dev/null; then
2125 :
2126 else
2127 cat <<EOF 1>&2
2128
2129 *** Warning: the command libtool uses to detect shared libraries,
2130 *** $file_magic_cmd, produces output that libtool cannot recognize.
2131 *** The result is that libtool may fail to recognize shared libraries
2132 *** as such. This will affect the creation of libtool libraries that
2133 *** depend on shared libraries, but programs linked with such libtool
2134 *** libraries will work regardless of this problem. Nevertheless, you
2135 *** may want to report the problem to your system manager and/or to
2136 *** bug-libtool@gnu.org
2137
2138 EOF
2139 fi ;;
2140 esac
2141 fi
2142 break
2143 fi
2144 done
2145 IFS="$lt_save_ifs"
2146 MAGIC_CMD="$lt_save_MAGIC_CMD"
2147 ;;
2148 esac])
2149 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2150 if test -n "$MAGIC_CMD"; then
2151 AC_MSG_RESULT($MAGIC_CMD)
2152 else
2153 AC_MSG_RESULT(no)
2154 fi
2155 ])# AC_PATH_TOOL_PREFIX
2156
2157
2158 # AC_PATH_MAGIC
2159 # -------------
2160 # find a file program which can recognise a shared library
2161 AC_DEFUN([AC_PATH_MAGIC],
2162 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2163 if test -z "$lt_cv_path_MAGIC_CMD"; then
2164 if test -n "$ac_tool_prefix"; then
2165 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2166 else
2167 MAGIC_CMD=:
2168 fi
2169 fi
2170 ])# AC_PATH_MAGIC
2171
2172
2173 # AC_PROG_LD
2174 # ----------
2175 # find the pathname to the GNU or non-GNU linker
2176 AC_DEFUN([AC_PROG_LD],
2177 [AC_ARG_WITH([gnu-ld],
2178 [AC_HELP_STRING([--with-gnu-ld],
2179 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2180 [test "$withval" = no || with_gnu_ld=yes],
2181 [with_gnu_ld=no])
2182 AC_REQUIRE([LT_AC_PROG_SED])dnl
2183 AC_REQUIRE([AC_PROG_CC])dnl
2184 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2185 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2186 ac_prog=ld
2187 if test "$GCC" = yes; then
2188 # Check if gcc -print-prog-name=ld gives a path.
2189 AC_MSG_CHECKING([for ld used by $CC])
2190 case $host in
2191 *-*-mingw*)
2192 # gcc leaves a trailing carriage return which upsets mingw
2193 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2194 *)
2195 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2196 esac
2197 case $ac_prog in
2198 # Accept absolute paths.
2199 [[\\/]]* | ?:[[\\/]]*)
2200 re_direlt='/[[^/]][[^/]]*/\.\./'
2201 # Canonicalize the pathname of ld
2202 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2203 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2204 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2205 done
2206 test -z "$LD" && LD="$ac_prog"
2207 ;;
2208 "")
2209 # If it fails, then pretend we aren't using GCC.
2210 ac_prog=ld
2211 ;;
2212 *)
2213 # If it is relative, then search for the first ld in PATH.
2214 with_gnu_ld=unknown
2215 ;;
2216 esac
2217 elif test "$with_gnu_ld" = yes; then
2218 AC_MSG_CHECKING([for GNU ld])
2219 else
2220 AC_MSG_CHECKING([for non-GNU ld])
2221 fi
2222 AC_CACHE_VAL(lt_cv_path_LD,
2223 [if test -z "$LD"; then
2224 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2225 for ac_dir in $PATH; do
2226 IFS="$lt_save_ifs"
2227 test -z "$ac_dir" && ac_dir=.
2228 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2229 lt_cv_path_LD="$ac_dir/$ac_prog"
2230 # Check to see if the program is GNU ld. I'd rather use --version,
2231 # but apparently some variants of GNU ld only accept -v.
2232 # Break only if it was the GNU/non-GNU ld that we prefer.
2233 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2234 *GNU* | *'with BFD'*)
2235 test "$with_gnu_ld" != no && break
2236 ;;
2237 *)
2238 test "$with_gnu_ld" != yes && break
2239 ;;
2240 esac
2241 fi
2242 done
2243 IFS="$lt_save_ifs"
2244 else
2245 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2246 fi])
2247 LD="$lt_cv_path_LD"
2248 if test -n "$LD"; then
2249 AC_MSG_RESULT($LD)
2250 else
2251 AC_MSG_RESULT(no)
2252 fi
2253 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2254 AC_PROG_LD_GNU
2255 ])# AC_PROG_LD
2256
2257
2258 # AC_PROG_LD_GNU
2259 # --------------
2260 AC_DEFUN([AC_PROG_LD_GNU],
2261 [AC_REQUIRE([AC_PROG_EGREP])dnl
2262 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2263 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
2264 case `$LD -v 2>&1 </dev/null` in
2265 *GNU* | *'with BFD'*)
2266 lt_cv_prog_gnu_ld=yes
2267 ;;
2268 *)
2269 lt_cv_prog_gnu_ld=no
2270 ;;
2271 esac])
2272 with_gnu_ld=$lt_cv_prog_gnu_ld
2273 ])# AC_PROG_LD_GNU
2274
2275
2276 # AC_PROG_LD_RELOAD_FLAG
2277 # ----------------------
2278 # find reload flag for linker
2279 # -- PORTME Some linkers may need a different reload flag.
2280 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2281 [AC_CACHE_CHECK([for $LD option to reload object files],
2282 lt_cv_ld_reload_flag,
2283 [lt_cv_ld_reload_flag='-r'])
2284 reload_flag=$lt_cv_ld_reload_flag
2285 case $reload_flag in
2286 "" | " "*) ;;
2287 *) reload_flag=" $reload_flag" ;;
2288 esac
2289 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2290 case $host_os in
2291 darwin*)
2292 if test "$GCC" = yes; then
2293 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2294 else
2295 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2296 fi
2297 ;;
2298 esac
2299 ])# AC_PROG_LD_RELOAD_FLAG
2300
2301
2302 # AC_DEPLIBS_CHECK_METHOD
2303 # -----------------------
2304 # how to check for library dependencies
2305 # -- PORTME fill in with the dynamic library characteristics
2306 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2307 [AC_CACHE_CHECK([how to recognise dependent libraries],
2308 lt_cv_deplibs_check_method,
2309 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2310 lt_cv_file_magic_test_file=
2311 lt_cv_deplibs_check_method='unknown'
2312 # Need to set the preceding variable on all platforms that support
2313 # interlibrary dependencies.
2314 # 'none' -- dependencies not supported.
2315 # `unknown' -- same as none, but documents that we really don't know.
2316 # 'pass_all' -- all dependencies passed with no checks.
2317 # 'test_compile' -- check by making test program.
2318 # 'file_magic [[regex]]' -- check by looking for files in library path
2319 # which responds to the $file_magic_cmd with a given extended regex.
2320 # If you have `file' or equivalent on your system and you're not sure
2321 # whether `pass_all' will *always* work, you probably want this one.
2322
2323 case $host_os in
2324 aix4* | aix5*)
2325 lt_cv_deplibs_check_method=pass_all
2326 ;;
2327
2328 beos*)
2329 lt_cv_deplibs_check_method=pass_all
2330 ;;
2331
2332 bsdi[[45]]*)
2333 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2334 lt_cv_file_magic_cmd='/usr/bin/file -L'
2335 lt_cv_file_magic_test_file=/shlib/libc.so
2336 ;;
2337
2338 cygwin*)
2339 # func_win32_libid is a shell function defined in ltmain.sh
2340 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2341 lt_cv_file_magic_cmd='func_win32_libid'
2342 ;;
2343
2344 mingw* | pw32*)
2345 # Base MSYS/MinGW do not provide the 'file' command needed by
2346 # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2347 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2348 lt_cv_file_magic_cmd='$OBJDUMP -f'
2349 ;;
2350
2351 darwin* | rhapsody*)
2352 lt_cv_deplibs_check_method=pass_all
2353 ;;
2354
2355 freebsd* | kfreebsd*-gnu | dragonfly*)
2356 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2357 case $host_cpu in
2358 i*86 )
2359 # Not sure whether the presence of OpenBSD here was a mistake.
2360 # Let's accept both of them until this is cleared up.
2361 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2362 lt_cv_file_magic_cmd=/usr/bin/file
2363 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2364 ;;
2365 esac
2366 else
2367 lt_cv_deplibs_check_method=pass_all
2368 fi
2369 ;;
2370
2371 gnu*)
2372 lt_cv_deplibs_check_method=pass_all
2373 ;;
2374
2375 hpux10.20* | hpux11*)
2376 lt_cv_file_magic_cmd=/usr/bin/file
2377 case $host_cpu in
2378 ia64*)
2379 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2380 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2381 ;;
2382 hppa*64*)
2383 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2384 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2385 ;;
2386 *)
2387 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2388 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2389 ;;
2390 esac
2391 ;;
2392
2393 interix3*)
2394 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2395 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2396 ;;
2397
2398 irix5* | irix6* | nonstopux*)
2399 case $LD in
2400 *-32|*"-32 ") libmagic=32-bit;;
2401 *-n32|*"-n32 ") libmagic=N32;;
2402 *-64|*"-64 ") libmagic=64-bit;;
2403 *) libmagic=never-match;;
2404 esac
2405 lt_cv_deplibs_check_method=pass_all
2406 ;;
2407
2408 # This must be Linux ELF.
2409 linux*)
2410 lt_cv_deplibs_check_method=pass_all
2411 ;;
2412
2413 netbsd*)
2414 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2415 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2416 else
2417 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2418 fi
2419 ;;
2420
2421 newos6*)
2422 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2423 lt_cv_file_magic_cmd=/usr/bin/file
2424 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2425 ;;
2426
2427 nto-qnx*)
2428 lt_cv_deplibs_check_method=unknown
2429 ;;
2430
2431 openbsd*)
2432 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2433 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2434 else
2435 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2436 fi
2437 ;;
2438
2439 osf3* | osf4* | osf5*)
2440 lt_cv_deplibs_check_method=pass_all
2441 ;;
2442
2443 solaris*)
2444 lt_cv_deplibs_check_method=pass_all
2445 ;;
2446
2447 sysv4 | sysv4.3*)
2448 case $host_vendor in
2449 motorola)
2450 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]]'
2451 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2452 ;;
2453 ncr)
2454 lt_cv_deplibs_check_method=pass_all
2455 ;;
2456 sequent)
2457 lt_cv_file_magic_cmd='/bin/file'
2458 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2459 ;;
2460 sni)
2461 lt_cv_file_magic_cmd='/bin/file'
2462 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2463 lt_cv_file_magic_test_file=/lib/libc.so
2464 ;;
2465 siemens)
2466 lt_cv_deplibs_check_method=pass_all
2467 ;;
2468 pc)
2469 lt_cv_deplibs_check_method=pass_all
2470 ;;
2471 esac
2472 ;;
2473
2474 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2475 lt_cv_deplibs_check_method=pass_all
2476 ;;
2477 esac
2478 ])
2479 file_magic_cmd=$lt_cv_file_magic_cmd
2480 deplibs_check_method=$lt_cv_deplibs_check_method
2481 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2482 ])# AC_DEPLIBS_CHECK_METHOD
2483
2484
2485 # AC_PROG_NM
2486 # ----------
2487 # find the pathname to a BSD-compatible name lister
2488 AC_DEFUN([AC_PROG_NM],
2489 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2490 [if test -n "$NM"; then
2491 # Let the user override the test.
2492 lt_cv_path_NM="$NM"
2493 else
2494 lt_nm_to_check="${ac_tool_prefix}nm"
2495 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2496 lt_nm_to_check="$lt_nm_to_check nm"
2497 fi
2498 for lt_tmp_nm in $lt_nm_to_check; do
2499 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2500 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2501 IFS="$lt_save_ifs"
2502 test -z "$ac_dir" && ac_dir=.
2503 tmp_nm="$ac_dir/$lt_tmp_nm"
2504 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2505 # Check to see if the nm accepts a BSD-compat flag.
2506 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2507 # nm: unknown option "B" ignored
2508 # Tru64's nm complains that /dev/null is an invalid object file
2509 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2510 */dev/null* | *'Invalid file or object type'*)
2511 lt_cv_path_NM="$tmp_nm -B"
2512 break
2513 ;;
2514 *)
2515 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2516 */dev/null*)
2517 lt_cv_path_NM="$tmp_nm -p"
2518 break
2519 ;;
2520 *)
2521 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2522 continue # so that we can try to find one that supports BSD flags
2523 ;;
2524 esac
2525 ;;
2526 esac
2527 fi
2528 done
2529 IFS="$lt_save_ifs"
2530 done
2531 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2532 fi])
2533 NM="$lt_cv_path_NM"
2534 ])# AC_PROG_NM
2535
2536
2537 # AC_CHECK_LIBM
2538 # -------------
2539 # check for math library
2540 AC_DEFUN([AC_CHECK_LIBM],
2541 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2542 LIBM=
2543 case $host in
2544 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2545 # These system don't have libm, or don't need it
2546 ;;
2547 *-ncr-sysv4.3*)
2548 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2549 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2550 ;;
2551 *)
2552 AC_CHECK_LIB(m, cos, LIBM="-lm")
2553 ;;
2554 esac
2555 ])# AC_CHECK_LIBM
2556
2557
2558 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2559 # -----------------------------------
2560 # sets LIBLTDL to the link flags for the libltdl convenience library and
2561 # LTDLINCL to the include flags for the libltdl header and adds
2562 # --enable-ltdl-convenience to the configure arguments. Note that
2563 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2564 # it is assumed to be `libltdl'. LIBLTDL will be prefixed with
2565 # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2566 # (note the single quotes!). If your package is not flat and you're not
2567 # using automake, define top_builddir and top_srcdir appropriately in
2568 # the Makefiles.
2569 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2570 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2571 case $enable_ltdl_convenience in
2572 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2573 "") enable_ltdl_convenience=yes
2574 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2575 esac
2576 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2577 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2578 # For backwards non-gettext consistent compatibility...
2579 INCLTDL="$LTDLINCL"
2580 ])# AC_LIBLTDL_CONVENIENCE
2581
2582
2583 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2584 # -----------------------------------
2585 # sets LIBLTDL to the link flags for the libltdl installable library and
2586 # LTDLINCL to the include flags for the libltdl header and adds
2587 # --enable-ltdl-install to the configure arguments. Note that
2588 # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided,
2589 # and an installed libltdl is not found, it is assumed to be `libltdl'.
2590 # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2591 # '${top_srcdir}/' (note the single quotes!). If your package is not
2592 # flat and you're not using automake, define top_builddir and top_srcdir
2593 # appropriately in the Makefiles.
2594 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2595 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2596 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2597 AC_CHECK_LIB(ltdl, lt_dlinit,
2598 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2599 [if test x"$enable_ltdl_install" = xno; then
2600 AC_MSG_WARN([libltdl not installed, but installation disabled])
2601 else
2602 enable_ltdl_install=yes
2603 fi
2604 ])
2605 if test x"$enable_ltdl_install" = x"yes"; then
2606 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2607 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2608 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2609 else
2610 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2611 LIBLTDL="-lltdl"
2612 LTDLINCL=
2613 fi
2614 # For backwards non-gettext consistent compatibility...
2615 INCLTDL="$LTDLINCL"
2616 ])# AC_LIBLTDL_INSTALLABLE
2617
2618
2619 # AC_LIBTOOL_CXX
2620 # --------------
2621 # enable support for C++ libraries
2622 AC_DEFUN([AC_LIBTOOL_CXX],
2623 [AC_REQUIRE([_LT_AC_LANG_CXX])
2624 ])# AC_LIBTOOL_CXX
2625
2626
2627 # _LT_AC_LANG_CXX
2628 # ---------------
2629 AC_DEFUN([_LT_AC_LANG_CXX],
2630 [AC_REQUIRE([AC_PROG_CXX])
2631 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2632 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2633 ])# _LT_AC_LANG_CXX
2634
2635 # _LT_AC_PROG_CXXCPP
2636 # ------------------
2637 AC_DEFUN([_LT_AC_PROG_CXXCPP],
2638 [
2639 AC_REQUIRE([AC_PROG_CXX])
2640 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2641 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2642 (test "X$CXX" != "Xg++"))) ; then
2643 AC_PROG_CXXCPP
2644 fi
2645 ])# _LT_AC_PROG_CXXCPP
2646
2647 # AC_LIBTOOL_F77
2648 # --------------
2649 # enable support for Fortran 77 libraries
2650 AC_DEFUN([AC_LIBTOOL_F77],
2651 [AC_REQUIRE([_LT_AC_LANG_F77])
2652 ])# AC_LIBTOOL_F77
2653
2654
2655 # _LT_AC_LANG_F77
2656 # ---------------
2657 AC_DEFUN([_LT_AC_LANG_F77],
2658 [AC_REQUIRE([AC_PROG_F77])
2659 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2660 ])# _LT_AC_LANG_F77
2661
2662
2663 # AC_LIBTOOL_GCJ
2664 # --------------
2665 # enable support for GCJ libraries
2666 AC_DEFUN([AC_LIBTOOL_GCJ],
2667 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2668 ])# AC_LIBTOOL_GCJ
2669
2670
2671 # _LT_AC_LANG_GCJ
2672 # ---------------
2673 AC_DEFUN([_LT_AC_LANG_GCJ],
2674 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2675 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2676 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2677 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2678 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2679 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2680 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2681 ])# _LT_AC_LANG_GCJ
2682
2683
2684 # AC_LIBTOOL_RC
2685 # -------------
2686 # enable support for Windows resource files
2687 AC_DEFUN([AC_LIBTOOL_RC],
2688 [AC_REQUIRE([LT_AC_PROG_RC])
2689 _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2690 ])# AC_LIBTOOL_RC
2691
2692
2693 # AC_LIBTOOL_LANG_C_CONFIG
2694 # ------------------------
2695 # Ensure that the configuration vars for the C compiler are
2696 # suitably defined. Those variables are subsequently used by
2697 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2698 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2699 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2700 [lt_save_CC="$CC"
2701 AC_LANG_PUSH(C)
2702
2703 # Source file extension for C test sources.
2704 ac_ext=c
2705
2706 # Object file extension for compiled C test sources.
2707 objext=o
2708 _LT_AC_TAGVAR(objext, $1)=$objext
2709
2710 # Code to be used in simple compile tests
2711 lt_simple_compile_test_code="int some_variable = 0;\n"
2712
2713 # Code to be used in simple link tests
2714 lt_simple_link_test_code='int main(){return(0);}\n'
2715
2716 _LT_AC_SYS_COMPILER
2717
2718 # save warnings/boilerplate of simple test code
2719 _LT_COMPILER_BOILERPLATE
2720 _LT_LINKER_BOILERPLATE
2721
2722 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2723 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2724 AC_LIBTOOL_PROG_CC_C_O($1)
2725 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2726 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2727 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2728 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2729 AC_LIBTOOL_SYS_LIB_STRIP
2730 AC_LIBTOOL_DLOPEN_SELF
2731
2732 # Report which library types will actually be built
2733 AC_MSG_CHECKING([if libtool supports shared libraries])
2734 AC_MSG_RESULT([$can_build_shared])
2735
2736 AC_MSG_CHECKING([whether to build shared libraries])
2737 test "$can_build_shared" = "no" && enable_shared=no
2738
2739 # On AIX, shared libraries and static libraries use the same namespace, and
2740 # are all built from PIC.
2741 case $host_os in
2742 aix3*)
2743 test "$enable_shared" = yes && enable_static=no
2744 if test -n "$RANLIB"; then
2745 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2746 postinstall_cmds='$RANLIB $lib'
2747 fi
2748 ;;
2749
2750 aix4* | aix5*)
2751 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2752 test "$enable_shared" = yes && enable_static=no
2753 fi
2754 ;;
2755 esac
2756 AC_MSG_RESULT([$enable_shared])
2757
2758 AC_MSG_CHECKING([whether to build static libraries])
2759 # Make sure either enable_shared or enable_static is yes.
2760 test "$enable_shared" = yes || enable_static=yes
2761 AC_MSG_RESULT([$enable_static])
2762
2763 AC_LIBTOOL_CONFIG($1)
2764
2765 AC_LANG_POP
2766 CC="$lt_save_CC"
2767 ])# AC_LIBTOOL_LANG_C_CONFIG
2768
2769
2770 # AC_LIBTOOL_LANG_CXX_CONFIG
2771 # --------------------------
2772 # Ensure that the configuration vars for the C compiler are
2773 # suitably defined. Those variables are subsequently used by
2774 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2775 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2776 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2777 [AC_LANG_PUSH(C++)
2778 AC_REQUIRE([AC_PROG_CXX])
2779 AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2780
2781 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2782 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2783 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2784 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2785 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2786 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2787 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2788 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2789 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2790 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2791 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2792 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2793 _LT_AC_TAGVAR(module_cmds, $1)=
2794 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2795 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2796 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2797 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2798 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2799 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2800
2801 # Dependencies to place before and after the object being linked:
2802 _LT_AC_TAGVAR(predep_objects, $1)=
2803 _LT_AC_TAGVAR(postdep_objects, $1)=
2804 _LT_AC_TAGVAR(predeps, $1)=
2805 _LT_AC_TAGVAR(postdeps, $1)=
2806 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2807
2808 # Source file extension for C++ test sources.
2809 ac_ext=cpp
2810
2811 # Object file extension for compiled C++ test sources.
2812 objext=o
2813 _LT_AC_TAGVAR(objext, $1)=$objext
2814
2815 # Code to be used in simple compile tests
2816 lt_simple_compile_test_code="int some_variable = 0;\n"
2817
2818 # Code to be used in simple link tests
2819 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2820
2821 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2822 _LT_AC_SYS_COMPILER
2823
2824 # save warnings/boilerplate of simple test code
2825 _LT_COMPILER_BOILERPLATE
2826 _LT_LINKER_BOILERPLATE
2827
2828 # Allow CC to be a program name with arguments.
2829 lt_save_CC=$CC
2830 lt_save_LD=$LD
2831 lt_save_GCC=$GCC
2832 GCC=$GXX
2833 lt_save_with_gnu_ld=$with_gnu_ld
2834 lt_save_path_LD=$lt_cv_path_LD
2835 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2836 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2837 else
2838 $as_unset lt_cv_prog_gnu_ld
2839 fi
2840 if test -n "${lt_cv_path_LDCXX+set}"; then
2841 lt_cv_path_LD=$lt_cv_path_LDCXX
2842 else
2843 $as_unset lt_cv_path_LD
2844 fi
2845 test -z "${LDCXX+set}" || LD=$LDCXX
2846 CC=${CXX-"c++"}
2847 compiler=$CC
2848 _LT_AC_TAGVAR(compiler, $1)=$CC
2849 _LT_CC_BASENAME([$compiler])
2850
2851 # We don't want -fno-exception wen compiling C++ code, so set the
2852 # no_builtin_flag separately
2853 if test "$GXX" = yes; then
2854 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2855 else
2856 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2857 fi
2858
2859 if test "$GXX" = yes; then
2860 # Set up default GNU C++ configuration
2861
2862 AC_PROG_LD
2863
2864 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2865 # archiving commands below assume that GNU ld is being used.
2866 if test "$with_gnu_ld" = yes; then
2867 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2868 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2869
2870 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2871 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2872
2873 # If archive_cmds runs LD, not CC, wlarc should be empty
2874 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2875 # investigate it a little bit more. (MM)
2876 wlarc='${wl}'
2877
2878 # ancient GNU ld didn't support --whole-archive et. al.
2879 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2880 grep 'no-whole-archive' > /dev/null; then
2881 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2882 else
2883 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2884 fi
2885 else
2886 with_gnu_ld=no
2887 wlarc=
2888
2889 # A generic and very simple default shared library creation
2890 # command for GNU C++ for the case where it uses the native
2891 # linker, instead of GNU ld. If possible, this setting should
2892 # overridden to take advantage of the native linker features on
2893 # the platform it is being used on.
2894 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2895 fi
2896
2897 # Commands to make compiler produce verbose output that lists
2898 # what "hidden" libraries, object files and flags are used when
2899 # linking a shared library.
2900 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2901
2902 else
2903 GXX=no
2904 with_gnu_ld=no
2905 wlarc=
2906 fi
2907
2908 # PORTME: fill in a description of your system's C++ link characteristics
2909 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2910 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2911 case $host_os in
2912 aix3*)
2913 # FIXME: insert proper C++ library support
2914 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2915 ;;
2916 aix4* | aix5*)
2917 if test "$host_cpu" = ia64; then
2918 # On IA64, the linker does run time linking by default, so we don't
2919 # have to do anything special.
2920 aix_use_runtimelinking=no
2921 exp_sym_flag='-Bexport'
2922 no_entry_flag=""
2923 else
2924 aix_use_runtimelinking=no
2925
2926 # Test if we are trying to use run time linking or normal
2927 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2928 # need to do runtime linking.
2929 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2930 for ld_flag in $LDFLAGS; do
2931 case $ld_flag in
2932 *-brtl*)
2933 aix_use_runtimelinking=yes
2934 break
2935 ;;
2936 esac
2937 done
2938 ;;
2939 esac
2940
2941 exp_sym_flag='-bexport'
2942 no_entry_flag='-bnoentry'
2943 fi
2944
2945 # When large executables or shared objects are built, AIX ld can
2946 # have problems creating the table of contents. If linking a library
2947 # or program results in "error TOC overflow" add -mminimal-toc to
2948 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2949 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2950
2951 _LT_AC_TAGVAR(archive_cmds, $1)=''
2952 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2953 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2954 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2955
2956 if test "$GXX" = yes; then
2957 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2958 # We only want to do this on AIX 4.2 and lower, the check
2959 # below for broken collect2 doesn't work under 4.3+
2960 collect2name=`${CC} -print-prog-name=collect2`
2961 if test -f "$collect2name" && \
2962 strings "$collect2name" | grep resolve_lib_name >/dev/null
2963 then
2964 # We have reworked collect2
2965 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2966 else
2967 # We have old collect2
2968 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2969 # It fails to find uninstalled libraries when the uninstalled
2970 # path is not listed in the libpath. Setting hardcode_minus_L
2971 # to unsupported forces relinking
2972 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2974 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2975 fi
2976 ;;
2977 esac
2978 shared_flag='-shared'
2979 if test "$aix_use_runtimelinking" = yes; then
2980 shared_flag="$shared_flag "'${wl}-G'
2981 fi
2982 else
2983 # not using gcc
2984 if test "$host_cpu" = ia64; then
2985 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2986 # chokes on -Wl,-G. The following line is correct:
2987 shared_flag='-G'
2988 else
2989 if test "$aix_use_runtimelinking" = yes; then
2990 shared_flag='${wl}-G'
2991 else
2992 shared_flag='${wl}-bM:SRE'
2993 fi
2994 fi
2995 fi
2996
2997 # It seems that -bexpall does not export symbols beginning with
2998 # underscore (_), so it is better to generate a list of symbols to export.
2999 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3000 if test "$aix_use_runtimelinking" = yes; then
3001 # Warning - without using the other runtime loading flags (-brtl),
3002 # -berok will link without error, but may produce a broken library.
3003 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3004 # Determine the default libpath from the value encoded in an empty executable.
3005 _LT_AC_SYS_LIBPATH_AIX
3006 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3007
3008 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3009 else
3010 if test "$host_cpu" = ia64; then
3011 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3012 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3013 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
3014 else
3015 # Determine the default libpath from the value encoded in an empty executable.
3016 _LT_AC_SYS_LIBPATH_AIX
3017 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3018 # Warning - without using the other run time loading flags,
3019 # -berok will link without error, but may produce a broken library.
3020 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3021 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3022 # Exported symbols can be pulled into shared objects from archives
3023 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3024 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3025 # This is similar to how AIX traditionally builds its shared libraries.
3026 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3027 fi
3028 fi
3029 ;;
3030
3031 beos*)
3032 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3033 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3034 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3035 # support --undefined. This deserves some investigation. FIXME
3036 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3037 else
3038 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3039 fi
3040 ;;
3041
3042 chorus*)
3043 case $cc_basename in
3044 *)
3045 # FIXME: insert proper C++ library support
3046 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3047 ;;
3048 esac
3049 ;;
3050
3051 cygwin* | mingw* | pw32*)
3052 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3053 # as there is no search path for DLLs.
3054 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3055 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3056 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3057 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3058
3059 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3060 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3061 # If the export-symbols file already is a .def file (1st line
3062 # is EXPORTS), use it as is; otherwise, prepend...
3063 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3064 cp $export_symbols $output_objdir/$soname.def;
3065 else
3066 echo EXPORTS > $output_objdir/$soname.def;
3067 cat $export_symbols >> $output_objdir/$soname.def;
3068 fi~
3069 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
3070 else
3071 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3072 fi
3073 ;;
3074 darwin* | rhapsody*)
3075 case $host_os in
3076 rhapsody* | darwin1.[[012]])
3077 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3078 ;;
3079 *) # Darwin 1.3 on
3080 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3081 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3082 else
3083 case ${MACOSX_DEPLOYMENT_TARGET} in
3084 10.[[012]])
3085 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3086 ;;
3087 10.*)
3088 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3089 ;;
3090 esac
3091 fi
3092 ;;
3093 esac
3094 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3095 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3096 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3097 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3098 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3099 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3100
3101 if test "$GXX" = yes ; then
3102 lt_int_apple_cc_single_mod=no
3103 output_verbose_link_cmd='echo'
3104 if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3105 lt_int_apple_cc_single_mod=yes
3106 fi
3107 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3108 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3109 else
3110 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3111 fi
3112 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3113 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3114 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3115 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3116 else
3117 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3118 fi
3119 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3120 else
3121 case $cc_basename in
3122 xlc*)
3123 output_verbose_link_cmd='echo'
3124 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3125 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3126 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3127 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3128 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3129 ;;
3130 *)
3131 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3132 ;;
3133 esac
3134 fi
3135 ;;
3136
3137 dgux*)
3138 case $cc_basename in
3139 ec++*)
3140 # FIXME: insert proper C++ library support
3141 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3142 ;;
3143 ghcx*)
3144 # Green Hills C++ Compiler
3145 # FIXME: insert proper C++ library support
3146 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3147 ;;
3148 *)
3149 # FIXME: insert proper C++ library support
3150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3151 ;;
3152 esac
3153 ;;
3154 freebsd[[12]]*)
3155 # C++ shared libraries reported to be fairly broken before switch to ELF
3156 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3157 ;;
3158 freebsd-elf*)
3159 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3160 ;;
3161 freebsd* | kfreebsd*-gnu | dragonfly*)
3162 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3163 # conventions
3164 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3165 ;;
3166 gnu*)
3167 ;;
3168 hpux9*)
3169 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3170 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3171 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3172 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3173 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3174 # but as the default
3175 # location of the library.
3176
3177 case $cc_basename in
3178 CC*)
3179 # FIXME: insert proper C++ library support
3180 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3181 ;;
3182 aCC*)
3183 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3184 # Commands to make compiler produce verbose output that lists
3185 # what "hidden" libraries, object files and flags are used when
3186 # linking a shared library.
3187 #
3188 # There doesn't appear to be a way to prevent this compiler from
3189 # explicitly linking system object files so we need to strip them
3190 # from the output so that they don't get included in the library
3191 # dependencies.
3192 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3193 ;;
3194 *)
3195 if test "$GXX" = yes; then
3196 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3197 else
3198 # FIXME: insert proper C++ library support
3199 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3200 fi
3201 ;;
3202 esac
3203 ;;
3204 hpux10*|hpux11*)
3205 if test $with_gnu_ld = no; then
3206 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3207 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3208
3209 case $host_cpu in
3210 hppa*64*|ia64*)
3211 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3212 ;;
3213 *)
3214 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3215 ;;
3216 esac
3217 fi
3218 case $host_cpu in
3219 hppa*64*|ia64*)
3220 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3221 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3222 ;;
3223 *)
3224 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3225 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3226 # but as the default
3227 # location of the library.
3228 ;;
3229 esac
3230
3231 case $cc_basename in
3232 CC*)
3233 # FIXME: insert proper C++ library support
3234 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3235 ;;
3236 aCC*)
3237 case $host_cpu in
3238 hppa*64*)
3239 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3240 ;;
3241 ia64*)
3242 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3243 ;;
3244 *)
3245 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3246 ;;
3247 esac
3248 # Commands to make compiler produce verbose output that lists
3249 # what "hidden" libraries, object files and flags are used when
3250 # linking a shared library.
3251 #
3252 # There doesn't appear to be a way to prevent this compiler from
3253 # explicitly linking system object files so we need to strip them
3254 # from the output so that they don't get included in the library
3255 # dependencies.
3256 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3257 ;;
3258 *)
3259 if test "$GXX" = yes; then
3260 if test $with_gnu_ld = no; then
3261 case $host_cpu in
3262 hppa*64*)
3263 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3264 ;;
3265 ia64*)
3266 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3267 ;;
3268 *)
3269 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3270 ;;
3271 esac
3272 fi
3273 else
3274 # FIXME: insert proper C++ library support
3275 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3276 fi
3277 ;;
3278 esac
3279 ;;
3280 interix3*)
3281 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3282 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3283 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3284 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3285 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3286 # Instead, shared libraries are loaded at an image base (0x10000000 by
3287 # default) and relocated if they conflict, which is a slow very memory
3288 # consuming and fragmenting process. To avoid this, we pick a random,
3289 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3290 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
3291 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3292 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
3293 ;;
3294 irix5* | irix6*)
3295 case $cc_basename in
3296 CC*)
3297 # SGI C++
3298 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3299
3300 # Archives containing C++ object files must be created using
3301 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3302 # necessary to make sure instantiated templates are included
3303 # in the archive.
3304 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3305 ;;
3306 *)
3307 if test "$GXX" = yes; then
3308 if test "$with_gnu_ld" = no; then
3309 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3310 else
3311 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3312 fi
3313 fi
3314 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3315 ;;
3316 esac
3317 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3318 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3319 ;;
3320 linux*)
3321 case $cc_basename in
3322 KCC*)
3323 # Kuck and Associates, Inc. (KAI) C++ Compiler
3324
3325 # KCC will only create a shared library if the output file
3326 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3327 # to its proper name (with version) after linking.
3328 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3329 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3330 # Commands to make compiler produce verbose output that lists
3331 # what "hidden" libraries, object files and flags are used when
3332 # linking a shared library.
3333 #
3334 # There doesn't appear to be a way to prevent this compiler from
3335 # explicitly linking system object files so we need to strip them
3336 # from the output so that they don't get included in the library
3337 # dependencies.
3338 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3339
3340 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3341 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3342
3343 # Archives containing C++ object files must be created using
3344 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3345 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3346 ;;
3347 icpc*)
3348 # Intel C++
3349 with_gnu_ld=yes
3350 # version 8.0 and above of icpc choke on multiply defined symbols
3351 # if we add $predep_objects and $postdep_objects, however 7.1 and
3352 # earlier do not add the objects themselves.
3353 case `$CC -V 2>&1` in
3354 *"Version 7."*)
3355 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3356 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3357 ;;
3358 *) # Version 8.0 or newer
3359 tmp_idyn=
3360 case $host_cpu in
3361 ia64*) tmp_idyn=' -i_dynamic';;
3362 esac
3363 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3364 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3365 ;;
3366 esac
3367 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3368 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3369 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3370 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3371 ;;
3372 pgCC*)
3373 # Portland Group C++ compiler
3374 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3375 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
3376
3377 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3378 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3379 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3380 ;;
3381 cxx*)
3382 # Compaq C++
3383 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3384 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3385
3386 runpath_var=LD_RUN_PATH
3387 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3388 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3389
3390 # Commands to make compiler produce verbose output that lists
3391 # what "hidden" libraries, object files and flags are used when
3392 # linking a shared library.
3393 #
3394 # There doesn't appear to be a way to prevent this compiler from
3395 # explicitly linking system object files so we need to strip them
3396 # from the output so that they don't get included in the library
3397 # dependencies.
3398 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3399 ;;
3400 esac
3401 ;;
3402 lynxos*)
3403 # FIXME: insert proper C++ library support
3404 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3405 ;;
3406 m88k*)
3407 # FIXME: insert proper C++ library support
3408 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3409 ;;
3410 mvs*)
3411 case $cc_basename in
3412 cxx*)
3413 # FIXME: insert proper C++ library support
3414 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3415 ;;
3416 *)
3417 # FIXME: insert proper C++ library support
3418 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3419 ;;
3420 esac
3421 ;;
3422 netbsd*)
3423 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3424 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3425 wlarc=
3426 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3427 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3428 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3429 fi
3430 # Workaround some broken pre-1.5 toolchains
3431 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3432 ;;
3433 openbsd2*)
3434 # C++ shared libraries are fairly broken
3435 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3436 ;;
3437 openbsd*)
3438 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3439 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3440 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3441 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3442 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3443 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
3444 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3445 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3446 fi
3447 output_verbose_link_cmd='echo'
3448 ;;
3449 osf3*)
3450 case $cc_basename in
3451 KCC*)
3452 # Kuck and Associates, Inc. (KAI) C++ Compiler
3453
3454 # KCC will only create a shared library if the output file
3455 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3456 # to its proper name (with version) after linking.
3457 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3458
3459 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3460 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3461
3462 # Archives containing C++ object files must be created using
3463 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3464 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3465
3466 ;;
3467 RCC*)
3468 # Rational C++ 2.4.1
3469 # FIXME: insert proper C++ library support
3470 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3471 ;;
3472 cxx*)
3473 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3474 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3475
3476 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3477 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3478
3479 # Commands to make compiler produce verbose output that lists
3480 # what "hidden" libraries, object files and flags are used when
3481 # linking a shared library.
3482 #
3483 # There doesn't appear to be a way to prevent this compiler from
3484 # explicitly linking system object files so we need to strip them
3485 # from the output so that they don't get included in the library
3486 # dependencies.
3487 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3488 ;;
3489 *)
3490 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3491 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3492 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3493
3494 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3495 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3496
3497 # Commands to make compiler produce verbose output that lists
3498 # what "hidden" libraries, object files and flags are used when
3499 # linking a shared library.
3500 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3501
3502 else
3503 # FIXME: insert proper C++ library support
3504 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3505 fi
3506 ;;
3507 esac
3508 ;;
3509 osf4* | osf5*)
3510 case $cc_basename in
3511 KCC*)
3512 # Kuck and Associates, Inc. (KAI) C++ Compiler
3513
3514 # KCC will only create a shared library if the output file
3515 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3516 # to its proper name (with version) after linking.
3517 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3518
3519 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3520 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3521
3522 # Archives containing C++ object files must be created using
3523 # the KAI C++ compiler.
3524 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3525 ;;
3526 RCC*)
3527 # Rational C++ 2.4.1
3528 # FIXME: insert proper C++ library support
3529 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3530 ;;
3531 cxx*)
3532 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3533 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
3534 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3535 echo "-hidden">> $lib.exp~
3536 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~
3537 $rm $lib.exp'
3538
3539 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3540 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3541
3542 # Commands to make compiler produce verbose output that lists
3543 # what "hidden" libraries, object files and flags are used when
3544 # linking a shared library.
3545 #
3546 # There doesn't appear to be a way to prevent this compiler from
3547 # explicitly linking system object files so we need to strip them
3548 # from the output so that they don't get included in the library
3549 # dependencies.
3550 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3551 ;;
3552 *)
3553 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3554 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3555 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
3556
3557 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3558 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3559
3560 # Commands to make compiler produce verbose output that lists
3561 # what "hidden" libraries, object files and flags are used when
3562 # linking a shared library.
3563 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3564
3565 else
3566 # FIXME: insert proper C++ library support
3567 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3568 fi
3569 ;;
3570 esac
3571 ;;
3572 psos*)
3573 # FIXME: insert proper C++ library support
3574 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3575 ;;
3576 sunos4*)
3577 case $cc_basename in
3578 CC*)
3579 # Sun C++ 4.x
3580 # FIXME: insert proper C++ library support
3581 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3582 ;;
3583 lcc*)
3584 # Lucid
3585 # FIXME: insert proper C++ library support
3586 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3587 ;;
3588 *)
3589 # FIXME: insert proper C++ library support
3590 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3591 ;;
3592 esac
3593 ;;
3594 solaris*)
3595 case $cc_basename in
3596 CC*)
3597 # Sun C++ 4.2, 5.x and Centerline C++
3598 _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3599 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3600 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3601 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3602 $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3603
3604 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3605 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3606 case $host_os in
3607 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3608 *)
3609 # The C++ compiler is used as linker so we must use $wl
3610 # flag to pass the commands to the underlying system
3611 # linker. We must also pass each convience library through
3612 # to the system linker between allextract/defaultextract.
3613 # The C++ compiler will combine linker options so we
3614 # cannot just pass the convience library names through
3615 # without $wl.
3616 # Supported since Solaris 2.6 (maybe 2.5.1?)
3617 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3618 ;;
3619 esac
3620 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3621
3622 output_verbose_link_cmd='echo'
3623
3624 # Archives containing C++ object files must be created using
3625 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3626 # necessary to make sure instantiated templates are included
3627 # in the archive.
3628 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3629 ;;
3630 gcx*)
3631 # Green Hills C++ Compiler
3632 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3633
3634 # The C++ compiler must be used to create the archive.
3635 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3636 ;;
3637 *)
3638 # GNU C++ compiler with Solaris linker
3639 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3640 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3641 if $CC --version | grep -v '^2\.7' > /dev/null; then
3642 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3643 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3644 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3645
3646 # Commands to make compiler produce verbose output that lists
3647 # what "hidden" libraries, object files and flags are used when
3648 # linking a shared library.
3649 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3650 else
3651 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3652 # platform.
3653 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3654 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3655 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3656
3657 # Commands to make compiler produce verbose output that lists
3658 # what "hidden" libraries, object files and flags are used when
3659 # linking a shared library.
3660 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3661 fi
3662
3663 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3664 fi
3665 ;;
3666 esac
3667 ;;
3668 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3669 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3670 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3671 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3672 runpath_var='LD_RUN_PATH'
3673
3674 case $cc_basename in
3675 CC*)
3676 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3677 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3678 ;;
3679 *)
3680 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3681 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3682 ;;
3683 esac
3684 ;;
3685 sysv5* | sco3.2v5* | sco5v6*)
3686 # Note: We can NOT use -z defs as we might desire, because we do not
3687 # link with -lc, and that would cause any symbols used from libc to
3688 # always be unresolved, which means just about no library would
3689 # ever link correctly. If we're not using GNU ld we use -z text
3690 # though, which does catch some bad symbols but isn't as heavy-handed
3691 # as -z defs.
3692 # For security reasons, it is highly recommended that you always
3693 # use absolute paths for naming shared libraries, and exclude the
3694 # DT_RUNPATH tag from executables and libraries. But doing so
3695 # requires that you compile everything twice, which is a pain.
3696 # So that behaviour is only enabled if SCOABSPATH is set to a
3697 # non-empty value in the environment. Most likely only useful for
3698 # creating official distributions of packages.
3699 # This is a hack until libtool officially supports absolute path
3700 # names for shared libraries.
3701 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3702 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3703 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3704 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3705 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3706 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3707 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3708 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3709 runpath_var='LD_RUN_PATH'
3710
3711 case $cc_basename in
3712 CC*)
3713 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3714 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3715 ;;
3716 *)
3717 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3718 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3719 ;;
3720 esac
3721 ;;
3722 tandem*)
3723 case $cc_basename in
3724 NCC*)
3725 # NonStop-UX NCC 3.20
3726 # FIXME: insert proper C++ library support
3727 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3728 ;;
3729 *)
3730 # FIXME: insert proper C++ library support
3731 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3732 ;;
3733 esac
3734 ;;
3735 vxworks*)
3736 # FIXME: insert proper C++ library support
3737 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3738 ;;
3739 *)
3740 # FIXME: insert proper C++ library support
3741 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3742 ;;
3743 esac
3744 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3745 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3746
3747 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3748 _LT_AC_TAGVAR(LD, $1)="$LD"
3749
3750 AC_LIBTOOL_POSTDEP_PREDEP($1)
3751 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3752 AC_LIBTOOL_PROG_CC_C_O($1)
3753 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3754 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3755 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3756 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3757
3758 AC_LIBTOOL_CONFIG($1)
3759
3760 AC_LANG_POP
3761 CC=$lt_save_CC
3762 LDCXX=$LD
3763 LD=$lt_save_LD
3764 GCC=$lt_save_GCC
3765 with_gnu_ldcxx=$with_gnu_ld
3766 with_gnu_ld=$lt_save_with_gnu_ld
3767 lt_cv_path_LDCXX=$lt_cv_path_LD
3768 lt_cv_path_LD=$lt_save_path_LD
3769 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3770 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3771 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3772
3773 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3774 # ------------------------------------
3775 # Figure out "hidden" library dependencies from verbose
3776 # compiler output when linking a shared library.
3777 # Parse the compiler output and extract the necessary
3778 # objects, libraries and library flags.
3779 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3780 dnl we can't use the lt_simple_compile_test_code here,
3781 dnl because it contains code intended for an executable,
3782 dnl not a library. It's possible we should let each
3783 dnl tag define a new lt_????_link_test_code variable,
3784 dnl but it's only used here...
3785 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3786 int a;
3787 void foo (void) { a = 0; }
3788 EOF
3789 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3790 class Foo
3791 {
3792 public:
3793 Foo (void) { a = 0; }
3794 private:
3795 int a;
3796 };
3797 EOF
3798 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3799 subroutine foo
3800 implicit none
3801 integer*4 a
3802 a=0
3803 return
3804 end
3805 EOF
3806 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3807 public class foo {
3808 private int a;
3809 public void bar (void) {
3810 a = 0;
3811 }
3812 };
3813 EOF
3814 ])
3815 dnl Parse the compiler output and extract the necessary
3816 dnl objects, libraries and library flags.
3817 if AC_TRY_EVAL(ac_compile); then
3818 # Parse the compiler output and extract the necessary
3819 # objects, libraries and library flags.
3820
3821 # Sentinel used to keep track of whether or not we are before
3822 # the conftest object file.
3823 pre_test_object_deps_done=no
3824
3825 # The `*' in the case matches for architectures that use `case' in
3826 # $output_verbose_cmd can trigger glob expansion during the loop
3827 # eval without this substitution.
3828 output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3829
3830 for p in `eval $output_verbose_link_cmd`; do
3831 case $p in
3832
3833 -L* | -R* | -l*)
3834 # Some compilers place space between "-{L,R}" and the path.
3835 # Remove the space.
3836 if test $p = "-L" \
3837 || test $p = "-R"; then
3838 prev=$p
3839 continue
3840 else
3841 prev=
3842 fi
3843
3844 if test "$pre_test_object_deps_done" = no; then
3845 case $p in
3846 -L* | -R*)
3847 # Internal compiler library paths should come after those
3848 # provided the user. The postdeps already come after the
3849 # user supplied libs so there is no need to process them.
3850 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3851 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3852 else
3853 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3854 fi
3855 ;;
3856 # The "-l" case would never come before the object being
3857 # linked, so don't bother handling this case.
3858 esac
3859 else
3860 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3861 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3862 else
3863 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3864 fi
3865 fi
3866 ;;
3867
3868 *.$objext)
3869 # This assumes that the test object file only shows up
3870 # once in the compiler output.
3871 if test "$p" = "conftest.$objext"; then
3872 pre_test_object_deps_done=yes
3873 continue
3874 fi
3875
3876 if test "$pre_test_object_deps_done" = no; then
3877 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3878 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3879 else
3880 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3881 fi
3882 else
3883 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3884 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3885 else
3886 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3887 fi
3888 fi
3889 ;;
3890
3891 *) ;; # Ignore the rest.
3892
3893 esac
3894 done
3895
3896 # Clean up.
3897 rm -f a.out a.exe
3898 else
3899 echo "libtool.m4: error: problem compiling $1 test program"
3900 fi
3901
3902 $rm -f confest.$objext
3903
3904 # PORTME: override above test on systems where it is broken
3905 ifelse([$1],[CXX],
3906 [case $host_os in
3907 interix3*)
3908 # Interix 3.5 installs completely hosed .la files for C++, so rather than
3909 # hack all around it, let's just trust "g++" to DTRT.
3910 _LT_AC_TAGVAR(predep_objects,$1)=
3911 _LT_AC_TAGVAR(postdep_objects,$1)=
3912 _LT_AC_TAGVAR(postdeps,$1)=
3913 ;;
3914
3915 solaris*)
3916 case $cc_basename in
3917 CC*)
3918 # Adding this requires a known-good setup of shared libraries for
3919 # Sun compiler versions before 5.6, else PIC objects from an old
3920 # archive will be linked into the output, leading to subtle bugs.
3921 _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3922 ;;
3923 esac
3924 ;;
3925 esac
3926 ])
3927
3928 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3929 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3930 esac
3931 ])# AC_LIBTOOL_POSTDEP_PREDEP
3932
3933 # AC_LIBTOOL_LANG_F77_CONFIG
3934 # --------------------------
3935 # Ensure that the configuration vars for the C compiler are
3936 # suitably defined. Those variables are subsequently used by
3937 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3938 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3939 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3940 [AC_REQUIRE([AC_PROG_F77])
3941 AC_LANG_PUSH(Fortran 77)
3942
3943 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3944 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3945 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3946 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3947 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3948 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3949 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3950 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3951 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3952 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3953 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3954 _LT_AC_TAGVAR(module_cmds, $1)=
3955 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3956 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3957 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3958 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3959 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3960 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3961
3962 # Source file extension for f77 test sources.
3963 ac_ext=f
3964
3965 # Object file extension for compiled f77 test sources.
3966 objext=o
3967 _LT_AC_TAGVAR(objext, $1)=$objext
3968
3969 # Code to be used in simple compile tests
3970 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3971
3972 # Code to be used in simple link tests
3973 lt_simple_link_test_code=" program t\n end\n"
3974
3975 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3976 _LT_AC_SYS_COMPILER
3977
3978 # save warnings/boilerplate of simple test code
3979 _LT_COMPILER_BOILERPLATE
3980 _LT_LINKER_BOILERPLATE
3981
3982 # Allow CC to be a program name with arguments.
3983 lt_save_CC="$CC"
3984 CC=${F77-"f77"}
3985 compiler=$CC
3986 _LT_AC_TAGVAR(compiler, $1)=$CC
3987 _LT_CC_BASENAME([$compiler])
3988
3989 AC_MSG_CHECKING([if libtool supports shared libraries])
3990 AC_MSG_RESULT([$can_build_shared])
3991
3992 AC_MSG_CHECKING([whether to build shared libraries])
3993 test "$can_build_shared" = "no" && enable_shared=no
3994
3995 # On AIX, shared libraries and static libraries use the same namespace, and
3996 # are all built from PIC.
3997 case $host_os in
3998 aix3*)
3999 test "$enable_shared" = yes && enable_static=no
4000 if test -n "$RANLIB"; then
4001 archive_cmds="$archive_cmds~\$RANLIB \$lib"
4002 postinstall_cmds='$RANLIB $lib'
4003 fi
4004 ;;
4005 aix4* | aix5*)
4006 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4007 test "$enable_shared" = yes && enable_static=no
4008 fi
4009 ;;
4010 esac
4011 AC_MSG_RESULT([$enable_shared])
4012
4013 AC_MSG_CHECKING([whether to build static libraries])
4014 # Make sure either enable_shared or enable_static is yes.
4015 test "$enable_shared" = yes || enable_static=yes
4016 AC_MSG_RESULT([$enable_static])
4017
4018 _LT_AC_TAGVAR(GCC, $1)="$G77"
4019 _LT_AC_TAGVAR(LD, $1)="$LD"
4020
4021 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4022 AC_LIBTOOL_PROG_CC_C_O($1)
4023 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4024 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4025 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4026 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4027
4028 AC_LIBTOOL_CONFIG($1)
4029
4030 AC_LANG_POP
4031 CC="$lt_save_CC"
4032 ])# AC_LIBTOOL_LANG_F77_CONFIG
4033
4034
4035 # AC_LIBTOOL_LANG_GCJ_CONFIG
4036 # --------------------------
4037 # Ensure that the configuration vars for the C compiler are
4038 # suitably defined. Those variables are subsequently used by
4039 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4040 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4041 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4042 [AC_LANG_SAVE
4043
4044 # Source file extension for Java test sources.
4045 ac_ext=java
4046
4047 # Object file extension for compiled Java test sources.
4048 objext=o
4049 _LT_AC_TAGVAR(objext, $1)=$objext
4050
4051 # Code to be used in simple compile tests
4052 lt_simple_compile_test_code="class foo {}\n"
4053
4054 # Code to be used in simple link tests
4055 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4056
4057 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4058 _LT_AC_SYS_COMPILER
4059
4060 # save warnings/boilerplate of simple test code
4061 _LT_COMPILER_BOILERPLATE
4062 _LT_LINKER_BOILERPLATE
4063
4064 # Allow CC to be a program name with arguments.
4065 lt_save_CC="$CC"
4066 CC=${GCJ-"gcj"}
4067 compiler=$CC
4068 _LT_AC_TAGVAR(compiler, $1)=$CC
4069 _LT_CC_BASENAME([$compiler])
4070
4071 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4072 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4073
4074 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4075
4076 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4077 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4078 AC_LIBTOOL_PROG_CC_C_O($1)
4079 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4080 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4081 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4082 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4083
4084 AC_LIBTOOL_CONFIG($1)
4085
4086 AC_LANG_RESTORE
4087 CC="$lt_save_CC"
4088 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4089
4090
4091 # AC_LIBTOOL_LANG_RC_CONFIG
4092 # -------------------------
4093 # Ensure that the configuration vars for the Windows resource compiler are
4094 # suitably defined. Those variables are subsequently used by
4095 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4096 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4097 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4098 [AC_LANG_SAVE
4099
4100 # Source file extension for RC test sources.
4101 ac_ext=rc
4102
4103 # Object file extension for compiled RC test sources.
4104 objext=o
4105 _LT_AC_TAGVAR(objext, $1)=$objext
4106
4107 # Code to be used in simple compile tests
4108 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4109
4110 # Code to be used in simple link tests
4111 lt_simple_link_test_code="$lt_simple_compile_test_code"
4112
4113 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4114 _LT_AC_SYS_COMPILER
4115
4116 # save warnings/boilerplate of simple test code
4117 _LT_COMPILER_BOILERPLATE
4118 _LT_LINKER_BOILERPLATE
4119
4120 # Allow CC to be a program name with arguments.
4121 lt_save_CC="$CC"
4122 CC=${RC-"windres"}
4123 compiler=$CC
4124 _LT_AC_TAGVAR(compiler, $1)=$CC
4125 _LT_CC_BASENAME([$compiler])
4126 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4127
4128 AC_LIBTOOL_CONFIG($1)
4129
4130 AC_LANG_RESTORE
4131 CC="$lt_save_CC"
4132 ])# AC_LIBTOOL_LANG_RC_CONFIG
4133
4134
4135 # AC_LIBTOOL_CONFIG([TAGNAME])
4136 # ----------------------------
4137 # If TAGNAME is not passed, then create an initial libtool script
4138 # with a default configuration from the untagged config vars. Otherwise
4139 # add code to config.status for appending the configuration named by
4140 # TAGNAME from the matching tagged config vars.
4141 AC_DEFUN([AC_LIBTOOL_CONFIG],
4142 [# The else clause should only fire when bootstrapping the
4143 # libtool distribution, otherwise you forgot to ship ltmain.sh
4144 # with your package, and you will get complaints that there are
4145 # no rules to generate ltmain.sh.
4146 if test -f "$ltmain"; then
4147 # See if we are running on zsh, and set the options which allow our commands through
4148 # without removal of \ escapes.
4149 if test -n "${ZSH_VERSION+set}" ; then
4150 setopt NO_GLOB_SUBST
4151 fi
4152 # Now quote all the things that may contain metacharacters while being
4153 # careful not to overquote the AC_SUBSTed values. We take copies of the
4154 # variables and quote the copies for generation of the libtool script.
4155 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4156 SED SHELL STRIP \
4157 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4158 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4159 deplibs_check_method reload_flag reload_cmds need_locks \
4160 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4161 lt_cv_sys_global_symbol_to_c_name_address \
4162 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4163 old_postinstall_cmds old_postuninstall_cmds \
4164 _LT_AC_TAGVAR(compiler, $1) \
4165 _LT_AC_TAGVAR(CC, $1) \
4166 _LT_AC_TAGVAR(LD, $1) \
4167 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4168 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4169 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4170 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4171 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4172 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4173 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4174 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4175 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4176 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4177 _LT_AC_TAGVAR(predep_objects, $1) \
4178 _LT_AC_TAGVAR(postdep_objects, $1) \
4179 _LT_AC_TAGVAR(predeps, $1) \
4180 _LT_AC_TAGVAR(postdeps, $1) \
4181 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4182 _LT_AC_TAGVAR(archive_cmds, $1) \
4183 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4184 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4185 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4186 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4187 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4188 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4189 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4190 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4191 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4192 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4193 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4194 _LT_AC_TAGVAR(module_cmds, $1) \
4195 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4196 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4197 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4198 _LT_AC_TAGVAR(include_expsyms, $1); do
4199
4200 case $var in
4201 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4202 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4203 _LT_AC_TAGVAR(archive_cmds, $1) | \
4204 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4205 _LT_AC_TAGVAR(module_cmds, $1) | \
4206 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4207 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4208 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4209 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4210 postinstall_cmds | postuninstall_cmds | \
4211 old_postinstall_cmds | old_postuninstall_cmds | \
4212 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4213 # Double-quote double-evaled strings.
4214 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4215 ;;
4216 *)
4217 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4218 ;;
4219 esac
4220 done
4221
4222 case $lt_echo in
4223 *'\[$]0 --fallback-echo"')
4224 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4225 ;;
4226 esac
4227
4228 ifelse([$1], [],
4229 [cfgfile="${ofile}T"
4230 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4231 $rm -f "$cfgfile"
4232 AC_MSG_NOTICE([creating $ofile])],
4233 [cfgfile="$ofile"])
4234
4235 cat <<__EOF__ >> "$cfgfile"
4236 ifelse([$1], [],
4237 [#! $SHELL
4238
4239 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4240 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4241 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4242 #
4243 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4244 # Free Software Foundation, Inc.
4245 #
4246 # This file is part of GNU Libtool:
4247 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4248 #
4249 # This program is free software; you can redistribute it and/or modify
4250 # it under the terms of the GNU General Public License as published by
4251 # the Free Software Foundation; either version 2 of the License, or
4252 # (at your option) any later version.
4253 #
4254 # This program is distributed in the hope that it will be useful, but
4255 # WITHOUT ANY WARRANTY; without even the implied warranty of
4256 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4257 # General Public License for more details.
4258 #
4259 # You should have received a copy of the GNU General Public License
4260 # along with this program; if not, write to the Free Software
4261 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4262 #
4263 # As a special exception to the GNU General Public License, if you
4264 # distribute this file as part of a program that contains a
4265 # configuration script generated by Autoconf, you may include it under
4266 # the same distribution terms that you use for the rest of that program.
4267
4268 # A sed program that does not truncate output.
4269 SED=$lt_SED
4270
4271 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4272 Xsed="$SED -e 1s/^X//"
4273
4274 # The HP-UX ksh and POSIX shell print the target directory to stdout
4275 # if CDPATH is set.
4276 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4277
4278 # The names of the tagged configurations supported by this script.
4279 available_tags=
4280
4281 # ### BEGIN LIBTOOL CONFIG],
4282 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4283
4284 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4285
4286 # Shell to use when invoking shell scripts.
4287 SHELL=$lt_SHELL
4288
4289 # Whether or not to build shared libraries.
4290 build_libtool_libs=$enable_shared
4291
4292 # Whether or not to build static libraries.
4293 build_old_libs=$enable_static
4294
4295 # Whether or not to add -lc for building shared libraries.
4296 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4297
4298 # Whether or not to disallow shared libs when runtime libs are static
4299 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4300
4301 # Whether or not to optimize for fast installation.
4302 fast_install=$enable_fast_install
4303
4304 # The host system.
4305 host_alias=$host_alias
4306 host=$host
4307 host_os=$host_os
4308
4309 # The build system.
4310 build_alias=$build_alias
4311 build=$build
4312 build_os=$build_os
4313
4314 # An echo program that does not interpret backslashes.
4315 echo=$lt_echo
4316
4317 # The archiver.
4318 AR=$lt_AR
4319 AR_FLAGS=$lt_AR_FLAGS
4320
4321 # A C compiler.
4322 LTCC=$lt_LTCC
4323
4324 # LTCC compiler flags.
4325 LTCFLAGS=$lt_LTCFLAGS
4326
4327 # A language-specific compiler.
4328 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4329
4330 # Is the compiler the GNU C compiler?
4331 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4332
4333 gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
4334 gcc_ver=\`gcc -dumpversion\`
4335
4336 # An ERE matcher.
4337 EGREP=$lt_EGREP
4338
4339 # The linker used to build libraries.
4340 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4341
4342 # Whether we need hard or soft links.
4343 LN_S=$lt_LN_S
4344
4345 # A BSD-compatible nm program.
4346 NM=$lt_NM
4347
4348 # A symbol stripping program
4349 STRIP=$lt_STRIP
4350
4351 # Used to examine libraries when file_magic_cmd begins "file"
4352 MAGIC_CMD=$MAGIC_CMD
4353
4354 # Used on cygwin: DLL creation program.
4355 DLLTOOL="$DLLTOOL"
4356
4357 # Used on cygwin: object dumper.
4358 OBJDUMP="$OBJDUMP"
4359
4360 # Used on cygwin: assembler.
4361 AS="$AS"
4362
4363 # The name of the directory that contains temporary libtool files.
4364 objdir=$objdir
4365
4366 # How to create reloadable object files.
4367 reload_flag=$lt_reload_flag
4368 reload_cmds=$lt_reload_cmds
4369
4370 # How to pass a linker flag through the compiler.
4371 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4372
4373 # Object file suffix (normally "o").
4374 objext="$ac_objext"
4375
4376 # Old archive suffix (normally "a").
4377 libext="$libext"
4378
4379 # Shared library suffix (normally ".so").
4380 shrext_cmds='$shrext_cmds'
4381
4382 # Executable file suffix (normally "").
4383 exeext="$exeext"
4384
4385 # Additional compiler flags for building library objects.
4386 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4387 pic_mode=$pic_mode
4388
4389 # What is the maximum length of a command?
4390 max_cmd_len=$lt_cv_sys_max_cmd_len
4391
4392 # Does compiler simultaneously support -c and -o options?
4393 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4394
4395 # Must we lock files when doing compilation?
4396 need_locks=$lt_need_locks
4397
4398 # Do we need the lib prefix for modules?
4399 need_lib_prefix=$need_lib_prefix
4400
4401 # Do we need a version for libraries?
4402 need_version=$need_version
4403
4404 # Whether dlopen is supported.
4405 dlopen_support=$enable_dlopen
4406
4407 # Whether dlopen of programs is supported.
4408 dlopen_self=$enable_dlopen_self
4409
4410 # Whether dlopen of statically linked programs is supported.
4411 dlopen_self_static=$enable_dlopen_self_static
4412
4413 # Compiler flag to prevent dynamic linking.
4414 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4415
4416 # Compiler flag to turn off builtin functions.
4417 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4418
4419 # Compiler flag to allow reflexive dlopens.
4420 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4421
4422 # Compiler flag to generate shared objects directly from archives.
4423 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4424
4425 # Compiler flag to generate thread-safe objects.
4426 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4427
4428 # Library versioning type.
4429 version_type=$version_type
4430
4431 # Format of library name prefix.
4432 libname_spec=$lt_libname_spec
4433
4434 # List of archive names. First name is the real one, the rest are links.
4435 # The last name is the one that the linker finds with -lNAME.
4436 library_names_spec=$lt_library_names_spec
4437
4438 # The coded name of the library, if different from the real name.
4439 soname_spec=$lt_soname_spec
4440
4441 # Commands used to build and install an old-style archive.
4442 RANLIB=$lt_RANLIB
4443 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4444 old_postinstall_cmds=$lt_old_postinstall_cmds
4445 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4446
4447 # Create an old-style archive from a shared archive.
4448 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4449
4450 # Create a temporary old-style archive to link instead of a shared archive.
4451 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4452
4453 # Commands used to build and install a shared archive.
4454 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4455 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4456 postinstall_cmds=$lt_postinstall_cmds
4457 postuninstall_cmds=$lt_postuninstall_cmds
4458
4459 # Commands used to build a loadable module (assumed same as above if empty)
4460 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4461 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4462
4463 # Commands to strip libraries.
4464 old_striplib=$lt_old_striplib
4465 striplib=$lt_striplib
4466
4467 # Dependencies to place before the objects being linked to create a
4468 # shared library.
4469 predep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4470
4471 # Dependencies to place after the objects being linked to create a
4472 # shared library.
4473 postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4474
4475 # Dependencies to place before the objects being linked to create a
4476 # shared library.
4477 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4478
4479 # Dependencies to place after the objects being linked to create a
4480 # shared library.
4481 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4482
4483 # The library search path used internally by the compiler when linking
4484 # a shared library.
4485 compiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4486
4487 # Method to check whether dependent libraries are shared objects.
4488 deplibs_check_method=$lt_deplibs_check_method
4489
4490 # Command to use when deplibs_check_method == file_magic.
4491 file_magic_cmd=$lt_file_magic_cmd
4492
4493 # Flag that allows shared libraries with undefined symbols to be built.
4494 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4495
4496 # Flag that forces no undefined symbols.
4497 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4498
4499 # Commands used to finish a libtool library installation in a directory.
4500 finish_cmds=$lt_finish_cmds
4501
4502 # Same as above, but a single script fragment to be evaled but not shown.
4503 finish_eval=$lt_finish_eval
4504
4505 # Take the output of nm and produce a listing of raw symbols and C names.
4506 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4507
4508 # Transform the output of nm in a proper C declaration
4509 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4510
4511 # Transform the output of nm in a C name address pair
4512 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4513
4514 # This is the shared library runtime path variable.
4515 runpath_var=$runpath_var
4516
4517 # This is the shared library path variable.
4518 shlibpath_var=$shlibpath_var
4519
4520 # Is shlibpath searched before the hard-coded library search path?
4521 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4522
4523 # How to hardcode a shared library path into an executable.
4524 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4525
4526 # Whether we should hardcode library paths into libraries.
4527 hardcode_into_libs=$hardcode_into_libs
4528
4529 # Flag to hardcode \$libdir into a binary during linking.
4530 # This must work even if \$libdir does not exist.
4531 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4532
4533 # If ld is used when linking, flag to hardcode \$libdir into
4534 # a binary during linking. This must work even if \$libdir does
4535 # not exist.
4536 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4537
4538 # Whether we need a single -rpath flag with a separated argument.
4539 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4540
4541 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4542 # resulting binary.
4543 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4544
4545 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4546 # resulting binary.
4547 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4548
4549 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4550 # the resulting binary.
4551 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4552
4553 # Set to yes if building a shared library automatically hardcodes DIR into the library
4554 # and all subsequent libraries and executables linked against it.
4555 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4556
4557 # Variables whose values should be saved in libtool wrapper scripts and
4558 # restored at relink time.
4559 variables_saved_for_relink="$variables_saved_for_relink"
4560
4561 # Whether libtool must link a program against all its dependency libraries.
4562 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4563
4564 # Compile-time system search path for libraries
4565 sys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
4566
4567 # Run-time system search path for libraries
4568 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4569
4570 # Fix the shell variable \$srcfile for the compiler.
4571 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4572
4573 # Set to yes if exported symbols are required.
4574 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4575
4576 # The commands to list exported symbols.
4577 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4578
4579 # The commands to extract the exported symbol list from a shared archive.
4580 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4581
4582 # Symbols that should not be listed in the preloaded symbols.
4583 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4584
4585 # Symbols that must always be exported.
4586 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4587
4588 ifelse([$1],[],
4589 [# ### END LIBTOOL CONFIG],
4590 [# ### END LIBTOOL TAG CONFIG: $tagname])
4591
4592 __EOF__
4593
4594 ifelse([$1],[], [
4595 case $host_os in
4596 aix3*)
4597 cat <<\EOF >> "$cfgfile"
4598
4599 # AIX sometimes has problems with the GCC collect2 program. For some
4600 # reason, if we set the COLLECT_NAMES environment variable, the problems
4601 # vanish in a puff of smoke.
4602 if test "X${COLLECT_NAMES+set}" != Xset; then
4603 COLLECT_NAMES=
4604 export COLLECT_NAMES
4605 fi
4606 EOF
4607 ;;
4608 esac
4609
4610 # We use sed instead of cat because bash on DJGPP gets confused if
4611 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4612 # text mode, it properly converts lines to CR/LF. This bash problem
4613 # is reportedly fixed, but why not run on old versions too?
4614 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4615
4616 mv -f "$cfgfile" "$ofile" || \
4617 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4618 chmod +x "$ofile"
4619 ])
4620 else
4621 # If there is no Makefile yet, we rely on a make rule to execute
4622 # `config.status --recheck' to rerun these tests and create the
4623 # libtool script then.
4624 ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4625 if test -f "$ltmain_in"; then
4626 test -f Makefile && make "$ltmain"
4627 fi
4628 fi
4629 ])# AC_LIBTOOL_CONFIG
4630
4631
4632 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4633 # -------------------------------------------
4634 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4635 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4636
4637 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4638
4639 if test "$GCC" = yes; then
4640 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4641
4642 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4643 lt_cv_prog_compiler_rtti_exceptions,
4644 [-fno-rtti -fno-exceptions], [],
4645 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4646 fi
4647 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4648
4649
4650 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4651 # ---------------------------------
4652 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4653 [AC_REQUIRE([AC_CANONICAL_HOST])
4654 AC_REQUIRE([AC_PROG_NM])
4655 AC_REQUIRE([AC_OBJEXT])
4656 # Check for command to grab the raw symbol name followed by C symbol from nm.
4657 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4658 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4659 [
4660 # These are sane defaults that work on at least a few old systems.
4661 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4662
4663 # Character class describing NM global symbol codes.
4664 symcode='[[BCDEGRST]]'
4665
4666 # Regexp to match symbols that can be accessed directly from C.
4667 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4668
4669 # Transform an extracted symbol line into a proper C declaration
4670 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4671
4672 # Transform an extracted symbol line into symbol name and symbol address
4673 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4674
4675 # Define system-specific variables.
4676 case $host_os in
4677 aix*)
4678 symcode='[[BCDT]]'
4679 ;;
4680 cygwin* | mingw* | pw32*)
4681 symcode='[[ABCDGISTW]]'
4682 ;;
4683 hpux*) # Its linker distinguishes data from code symbols
4684 if test "$host_cpu" = ia64; then
4685 symcode='[[ABCDEGRST]]'
4686 fi
4687 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4688 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4689 ;;
4690 linux*)
4691 if test "$host_cpu" = ia64; then
4692 symcode='[[ABCDGIRSTW]]'
4693 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4694 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4695 fi
4696 ;;
4697 irix* | nonstopux*)
4698 symcode='[[BCDEGRST]]'
4699 ;;
4700 osf*)
4701 symcode='[[BCDEGQRST]]'
4702 ;;
4703 solaris*)
4704 symcode='[[BDRT]]'
4705 ;;
4706 sco3.2v5*)
4707 symcode='[[DT]]'
4708 ;;
4709 sysv4.2uw2*)
4710 symcode='[[DT]]'
4711 ;;
4712 sysv5* | sco5v6* | unixware* | OpenUNIX*)
4713 symcode='[[ABDT]]'
4714 ;;
4715 sysv4)
4716 symcode='[[DFNSTU]]'
4717 ;;
4718 esac
4719
4720 # Handle CRLF in mingw tool chain
4721 opt_cr=
4722 case $build_os in
4723 mingw*)
4724 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4725 ;;
4726 esac
4727
4728 # If we're using GNU nm, then use its standard symbol codes.
4729 case `$NM -V 2>&1` in
4730 *GNU* | *'with BFD'*)
4731 symcode='[[ABCDGIRSTW]]' ;;
4732 esac
4733
4734 # Try without a prefix undercore, then with it.
4735 for ac_symprfx in "" "_"; do
4736
4737 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4738 symxfrm="\\1 $ac_symprfx\\2 \\2"
4739
4740 # Write the raw and C identifiers.
4741 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4742
4743 # Check to see that the pipe works correctly.
4744 pipe_works=no
4745
4746 rm -f conftest*
4747 cat > conftest.$ac_ext <<EOF
4748 #ifdef __cplusplus
4749 extern "C" {
4750 #endif
4751 char nm_test_var;
4752 void nm_test_func(){}
4753 #ifdef __cplusplus
4754 }
4755 #endif
4756 int main(){nm_test_var='a';nm_test_func();return(0);}
4757 EOF
4758
4759 if AC_TRY_EVAL(ac_compile); then
4760 # Now try to grab the symbols.
4761 nlist=conftest.nm
4762 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4763 # Try sorting and uniquifying the output.
4764 if sort "$nlist" | uniq > "$nlist"T; then
4765 mv -f "$nlist"T "$nlist"
4766 else
4767 rm -f "$nlist"T
4768 fi
4769
4770 # Make sure that we snagged all the symbols we need.
4771 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4772 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4773 cat <<EOF > conftest.$ac_ext
4774 #ifdef __cplusplus
4775 extern "C" {
4776 #endif
4777
4778 EOF
4779 # Now generate the symbol file.
4780 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4781
4782 cat <<EOF >> conftest.$ac_ext
4783 #if defined (__STDC__) && __STDC__
4784 # define lt_ptr_t void *
4785 #else
4786 # define lt_ptr_t char *
4787 # define const
4788 #endif
4789
4790 /* The mapping between symbol names and symbols. */
4791 const struct {
4792 const char *name;
4793 lt_ptr_t address;
4794 }
4795 lt_preloaded_symbols[[]] =
4796 {
4797 EOF
4798 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4799 cat <<\EOF >> conftest.$ac_ext
4800 {0, (lt_ptr_t) 0}
4801 };
4802
4803 #ifdef __cplusplus
4804 }
4805 #endif
4806 EOF
4807 # Now try linking the two files.
4808 mv conftest.$ac_objext conftstm.$ac_objext
4809 lt_save_LIBS="$LIBS"
4810 lt_save_CFLAGS="$CFLAGS"
4811 LIBS="conftstm.$ac_objext"
4812 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4813 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4814 pipe_works=yes
4815 fi
4816 LIBS="$lt_save_LIBS"
4817 CFLAGS="$lt_save_CFLAGS"
4818 else
4819 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4820 fi
4821 else
4822 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4823 fi
4824 else
4825 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4826 fi
4827 else
4828 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4829 cat conftest.$ac_ext >&5
4830 fi
4831 rm -f conftest* conftst*
4832
4833 # Do not use the global_symbol_pipe unless it works.
4834 if test "$pipe_works" = yes; then
4835 break
4836 else
4837 lt_cv_sys_global_symbol_pipe=
4838 fi
4839 done
4840 ])
4841 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4842 lt_cv_sys_global_symbol_to_cdecl=
4843 fi
4844 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4845 AC_MSG_RESULT(failed)
4846 else
4847 AC_MSG_RESULT(ok)
4848 fi
4849 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4850
4851
4852 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4853 # ---------------------------------------
4854 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4855 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4856 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4857 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4858
4859 AC_MSG_CHECKING([for $compiler option to produce PIC])
4860 ifelse([$1],[CXX],[
4861 # C++ specific cases for pic, static, wl, etc.
4862 if test "$GXX" = yes; then
4863 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4864 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4865
4866 case $host_os in
4867 aix*)
4868 # All AIX code is PIC.
4869 if test "$host_cpu" = ia64; then
4870 # AIX 5 now supports IA64 processor
4871 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4872 fi
4873 ;;
4874 amigaos*)
4875 # FIXME: we need at least 68020 code to build shared libraries, but
4876 # adding the `-m68020' flag to GCC prevents building anything better,
4877 # like `-m68040'.
4878 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4879 ;;
4880 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4881 # PIC is the default for these OSes.
4882 ;;
4883 mingw* | os2* | pw32*)
4884 # This hack is so that the source file can tell whether it is being
4885 # built for inclusion in a dll (and should export symbols for example).
4886 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4887 ;;
4888 darwin* | rhapsody*)
4889 # PIC is the default on this platform
4890 # Common symbols not allowed in MH_DYLIB files
4891 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4892 ;;
4893 *djgpp*)
4894 # DJGPP does not support shared libraries at all
4895 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4896 ;;
4897 interix3*)
4898 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4899 # Instead, we relocate shared libraries at runtime.
4900 ;;
4901 sysv4*MP*)
4902 if test -d /usr/nec; then
4903 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4904 fi
4905 ;;
4906 hpux*)
4907 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4908 # not for PA HP-UX.
4909 case $host_cpu in
4910 hppa*64*|ia64*)
4911 ;;
4912 *)
4913 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4914 ;;
4915 esac
4916 ;;
4917 *)
4918 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4919 ;;
4920 esac
4921 else
4922 case $host_os in
4923 aix4* | aix5*)
4924 # All AIX code is PIC.
4925 if test "$host_cpu" = ia64; then
4926 # AIX 5 now supports IA64 processor
4927 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4928 else
4929 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4930 fi
4931 ;;
4932 chorus*)
4933 case $cc_basename in
4934 cxch68*)
4935 # Green Hills C++ Compiler
4936 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4937 ;;
4938 esac
4939 ;;
4940 darwin*)
4941 # PIC is the default on this platform
4942 # Common symbols not allowed in MH_DYLIB files
4943 case $cc_basename in
4944 xlc*)
4945 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4946 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4947 ;;
4948 esac
4949 ;;
4950 dgux*)
4951 case $cc_basename in
4952 ec++*)
4953 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4954 ;;
4955 ghcx*)
4956 # Green Hills C++ Compiler
4957 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4958 ;;
4959 *)
4960 ;;
4961 esac
4962 ;;
4963 freebsd* | kfreebsd*-gnu | dragonfly*)
4964 # FreeBSD uses GNU C++
4965 ;;
4966 hpux9* | hpux10* | hpux11*)
4967 case $cc_basename in
4968 CC*)
4969 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4970 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4971 if test "$host_cpu" != ia64; then
4972 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4973 fi
4974 ;;
4975 aCC*)
4976 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4977 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4978 case $host_cpu in
4979 hppa*64*|ia64*)
4980 # +Z the default
4981 ;;
4982 *)
4983 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4984 ;;
4985 esac
4986 ;;
4987 *)
4988 ;;
4989 esac
4990 ;;
4991 interix*)
4992 # This is c89, which is MS Visual C++ (no shared libs)
4993 # Anyone wants to do a port?
4994 ;;
4995 irix5* | irix6* | nonstopux*)
4996 case $cc_basename in
4997 CC*)
4998 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4999 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5000 # CC pic flag -KPIC is the default.
5001 ;;
5002 *)
5003 ;;
5004 esac
5005 ;;
5006 linux*)
5007 case $cc_basename in
5008 KCC*)
5009 # KAI C++ Compiler
5010 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5011 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5012 ;;
5013 icpc* | ecpc*)
5014 # Intel C++
5015 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5016 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5017 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5018 ;;
5019 pgCC*)
5020 # Portland Group C++ compiler.
5021 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5022 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5023 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5024 ;;
5025 cxx*)
5026 # Compaq C++
5027 # Make sure the PIC flag is empty. It appears that all Alpha
5028 # Linux and Compaq Tru64 Unix objects are PIC.
5029 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5030 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5031 ;;
5032 *)
5033 ;;
5034 esac
5035 ;;
5036 lynxos*)
5037 ;;
5038 m88k*)
5039 ;;
5040 mvs*)
5041 case $cc_basename in
5042 cxx*)
5043 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5044 ;;
5045 *)
5046 ;;
5047 esac
5048 ;;
5049 netbsd*)
5050 ;;
5051 osf3* | osf4* | osf5*)
5052 case $cc_basename in
5053 KCC*)
5054 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5055 ;;
5056 RCC*)
5057 # Rational C++ 2.4.1
5058 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5059 ;;
5060 cxx*)
5061 # Digital/Compaq C++
5062 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5063 # Make sure the PIC flag is empty. It appears that all Alpha
5064 # Linux and Compaq Tru64 Unix objects are PIC.
5065 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5066 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5067 ;;
5068 *)
5069 ;;
5070 esac
5071 ;;
5072 psos*)
5073 ;;
5074 solaris*)
5075 case $cc_basename in
5076 CC*)
5077 # Sun C++ 4.2, 5.x and Centerline C++
5078 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5079 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5080 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5081 ;;
5082 gcx*)
5083 # Green Hills C++ Compiler
5084 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5085 ;;
5086 *)
5087 ;;
5088 esac
5089 ;;
5090 sunos4*)
5091 case $cc_basename in
5092 CC*)
5093 # Sun C++ 4.x
5094 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5095 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5096 ;;
5097 lcc*)
5098 # Lucid
5099 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5100 ;;
5101 *)
5102 ;;
5103 esac
5104 ;;
5105 tandem*)
5106 case $cc_basename in
5107 NCC*)
5108 # NonStop-UX NCC 3.20
5109 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5110 ;;
5111 *)
5112 ;;
5113 esac
5114 ;;
5115 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5116 case $cc_basename in
5117 CC*)
5118 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5120 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5121 ;;
5122 esac
5123 ;;
5124 vxworks*)
5125 ;;
5126 *)
5127 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5128 ;;
5129 esac
5130 fi
5131 ],
5132 [
5133 if test "$GCC" = yes; then
5134 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5135 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5136
5137 case $host_os in
5138 aix*)
5139 # All AIX code is PIC.
5140 if test "$host_cpu" = ia64; then
5141 # AIX 5 now supports IA64 processor
5142 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5143 fi
5144 ;;
5145
5146 amigaos*)
5147 # FIXME: we need at least 68020 code to build shared libraries, but
5148 # adding the `-m68020' flag to GCC prevents building anything better,
5149 # like `-m68040'.
5150 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5151 ;;
5152
5153 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5154 # PIC is the default for these OSes.
5155 ;;
5156
5157 mingw* | pw32* | os2*)
5158 # This hack is so that the source file can tell whether it is being
5159 # built for inclusion in a dll (and should export symbols for example).
5160 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5161 ;;
5162
5163 darwin* | rhapsody*)
5164 # PIC is the default on this platform
5165 # Common symbols not allowed in MH_DYLIB files
5166 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5167 ;;
5168
5169 interix3*)
5170 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5171 # Instead, we relocate shared libraries at runtime.
5172 ;;
5173
5174 msdosdjgpp*)
5175 # Just because we use GCC doesn't mean we suddenly get shared libraries
5176 # on systems that don't support them.
5177 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5178 enable_shared=no
5179 ;;
5180
5181 sysv4*MP*)
5182 if test -d /usr/nec; then
5183 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5184 fi
5185 ;;
5186
5187 hpux*)
5188 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5189 # not for PA HP-UX.
5190 case $host_cpu in
5191 hppa*64*|ia64*)
5192 # +Z the default
5193 ;;
5194 *)
5195 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5196 ;;
5197 esac
5198 ;;
5199
5200 *)
5201 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5202 ;;
5203 esac
5204 else
5205 # PORTME Check for flag to pass linker flags through the system compiler.
5206 case $host_os in
5207 aix*)
5208 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5209 if test "$host_cpu" = ia64; then
5210 # AIX 5 now supports IA64 processor
5211 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5212 else
5213 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5214 fi
5215 ;;
5216 darwin*)
5217 # PIC is the default on this platform
5218 # Common symbols not allowed in MH_DYLIB files
5219 case $cc_basename in
5220 xlc*)
5221 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5222 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5223 ;;
5224 esac
5225 ;;
5226
5227 mingw* | pw32* | os2*)
5228 # This hack is so that the source file can tell whether it is being
5229 # built for inclusion in a dll (and should export symbols for example).
5230 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5231 ;;
5232
5233 hpux9* | hpux10* | hpux11*)
5234 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5235 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5236 # not for PA HP-UX.
5237 case $host_cpu in
5238 hppa*64*|ia64*)
5239 # +Z the default
5240 ;;
5241 *)
5242 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5243 ;;
5244 esac
5245 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5246 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5247 ;;
5248
5249 irix5* | irix6* | nonstopux*)
5250 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5251 # PIC (with -KPIC) is the default.
5252 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5253 ;;
5254
5255 newsos6)
5256 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5257 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5258 ;;
5259
5260 linux*)
5261 case $cc_basename in
5262 icc* | ecc*)
5263 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5264 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5265 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5266 ;;
5267 pgcc* | pgf77* | pgf90* | pgf95*)
5268 # Portland Group compilers (*not* the Pentium gcc compiler,
5269 # which looks to be a dead project)
5270 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5271 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5272 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5273 ;;
5274 ccc*)
5275 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5276 # All Alpha code is PIC.
5277 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5278 ;;
5279 esac
5280 ;;
5281
5282 osf3* | osf4* | osf5*)
5283 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5284 # All OSF/1 code is PIC.
5285 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5286 ;;
5287
5288 solaris*)
5289 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5290 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5291 case $cc_basename in
5292 f77* | f90* | f95*)
5293 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5294 *)
5295 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5296 esac
5297 ;;
5298
5299 sunos4*)
5300 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5301 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5302 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5303 ;;
5304
5305 sysv4 | sysv4.2uw2* | sysv4.3*)
5306 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5307 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5308 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5309 ;;
5310
5311 sysv4*MP*)
5312 if test -d /usr/nec ;then
5313 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5314 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5315 fi
5316 ;;
5317
5318 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5319 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5320 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5321 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5322 ;;
5323
5324 unicos*)
5325 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5326 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5327 ;;
5328
5329 uts4*)
5330 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5331 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5332 ;;
5333
5334 *)
5335 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5336 ;;
5337 esac
5338 fi
5339 ])
5340 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5341
5342 #
5343 # Check to make sure the PIC flag actually works.
5344 #
5345 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5346 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5347 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5348 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5349 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5350 "" | " "*) ;;
5351 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5352 esac],
5353 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5354 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5355 fi
5356 case $host_os in
5357 # For platforms which do not support PIC, -DPIC is meaningless:
5358 *djgpp*)
5359 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5360 ;;
5361 *)
5362 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5363 ;;
5364 esac
5365
5366 #
5367 # Check to make sure the static flag actually works.
5368 #
5369 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5370 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5371 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5372 $lt_tmp_static_flag,
5373 [],
5374 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5375 ])
5376
5377
5378 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5379 # ------------------------------------
5380 # See if the linker supports building shared libraries.
5381 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5382 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5383 ifelse([$1],[CXX],[
5384 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5385 case $host_os in
5386 aix4* | aix5*)
5387 # If we're using GNU nm, then we don't want the "-C" option.
5388 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5389 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5390 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5391 else
5392 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5393 fi
5394 ;;
5395 pw32*)
5396 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5397 ;;
5398 cygwin* | mingw*)
5399 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5400 ;;
5401 *)
5402 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5403 ;;
5404 esac
5405 ],[
5406 runpath_var=
5407 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5408 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5409 _LT_AC_TAGVAR(archive_cmds, $1)=
5410 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5411 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5412 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5413 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5414 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5415 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5416 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5417 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5418 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5419 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5420 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5421 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5422 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5423 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5424 _LT_AC_TAGVAR(module_cmds, $1)=
5425 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5426 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5427 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5428 # include_expsyms should be a list of space-separated symbols to be *always*
5429 # included in the symbol list
5430 _LT_AC_TAGVAR(include_expsyms, $1)=
5431 # exclude_expsyms can be an extended regexp of symbols to exclude
5432 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5433 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5434 # as well as any symbol that contains `d'.
5435 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5436 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5437 # platforms (ab)use it in PIC code, but their linkers get confused if
5438 # the symbol is explicitly referenced. Since portable code cannot
5439 # rely on this symbol name, it's probably fine to never include it in
5440 # preloaded symbol tables.
5441 extract_expsyms_cmds=
5442 # Just being paranoid about ensuring that cc_basename is set.
5443 _LT_CC_BASENAME([$compiler])
5444 case $host_os in
5445 cygwin* | mingw* | pw32*)
5446 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5447 # When not using gcc, we currently assume that we are using
5448 # Microsoft Visual C++.
5449 if test "$GCC" != yes; then
5450 with_gnu_ld=no
5451 fi
5452 ;;
5453 interix*)
5454 # we just hope/assume this is gcc and not c89 (= MSVC++)
5455 with_gnu_ld=yes
5456 ;;
5457 openbsd*)
5458 with_gnu_ld=no
5459 ;;
5460 esac
5461
5462 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5463 if test "$with_gnu_ld" = yes; then
5464 # If archive_cmds runs LD, not CC, wlarc should be empty
5465 wlarc='${wl}'
5466
5467 # Set some defaults for GNU ld with shared library support. These
5468 # are reset later if shared libraries are not supported. Putting them
5469 # here allows them to be overridden if necessary.
5470 runpath_var=LD_RUN_PATH
5471 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5472 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5473 # ancient GNU ld didn't support --whole-archive et. al.
5474 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5475 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5476 else
5477 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5478 fi
5479 supports_anon_versioning=no
5480 case `$LD -v 2>/dev/null` in
5481 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5482 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5483 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5484 *\ 2.11.*) ;; # other 2.11 versions
5485 *) supports_anon_versioning=yes ;;
5486 esac
5487
5488 # See if GNU ld supports shared libraries.
5489 case $host_os in
5490 aix3* | aix4* | aix5*)
5491 # On AIX/PPC, the GNU linker is very broken
5492 if test "$host_cpu" != ia64; then
5493 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5494 cat <<EOF 1>&2
5495
5496 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5497 *** to be unable to reliably create shared libraries on AIX.
5498 *** Therefore, libtool is disabling shared libraries support. If you
5499 *** really care for shared libraries, you may want to modify your PATH
5500 *** so that a non-GNU linker is found, and then restart.
5501
5502 EOF
5503 fi
5504 ;;
5505
5506 amigaos*)
5507 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5508 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5509 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5510
5511 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5512 # that the semantics of dynamic libraries on AmigaOS, at least up
5513 # to version 4, is to share data among multiple programs linked
5514 # with the same dynamic library. Since this doesn't match the
5515 # behavior of shared libraries on other platforms, we can't use
5516 # them.
5517 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5518 ;;
5519
5520 beos*)
5521 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5522 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5523 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5524 # support --undefined. This deserves some investigation. FIXME
5525 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5526 else
5527 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5528 fi
5529 ;;
5530
5531 cygwin* | mingw* | pw32*)
5532 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5533 # as there is no search path for DLLs.
5534 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5535 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5536 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5537 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5538 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5539
5540 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5541 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5542 # If the export-symbols file already is a .def file (1st line
5543 # is EXPORTS), use it as is; otherwise, prepend...
5544 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5545 cp $export_symbols $output_objdir/$soname.def;
5546 else
5547 echo EXPORTS > $output_objdir/$soname.def;
5548 cat $export_symbols >> $output_objdir/$soname.def;
5549 fi~
5550 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5551 else
5552 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5553 fi
5554 ;;
5555
5556 interix3*)
5557 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5558 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5559 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5560 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5561 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5562 # Instead, shared libraries are loaded at an image base (0x10000000 by
5563 # default) and relocated if they conflict, which is a slow very memory
5564 # consuming and fragmenting process. To avoid this, we pick a random,
5565 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5566 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
5567 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5568 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
5569 ;;
5570
5571 linux*)
5572 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5573 tmp_addflag=
5574 case $cc_basename,$host_cpu in
5575 pgcc*) # Portland Group C compiler
5576 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5577 tmp_addflag=' $pic_flag'
5578 ;;
5579 pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
5580 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5581 tmp_addflag=' $pic_flag -Mnomain' ;;
5582 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
5583 tmp_addflag=' -i_dynamic' ;;
5584 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
5585 tmp_addflag=' -i_dynamic -nofor_main' ;;
5586 ifc* | ifort*) # Intel Fortran compiler
5587 tmp_addflag=' -nofor_main' ;;
5588 esac
5589 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5590
5591 if test $supports_anon_versioning = yes; then
5592 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5593 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5594 $echo "local: *; };" >> $output_objdir/$libname.ver~
5595 $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5596 fi
5597 else
5598 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5599 fi
5600 ;;
5601
5602 netbsd*)
5603 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5604 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5605 wlarc=
5606 else
5607 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5608 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5609 fi
5610 ;;
5611
5612 solaris*)
5613 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5614 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5615 cat <<EOF 1>&2
5616
5617 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5618 *** create shared libraries on Solaris systems. Therefore, libtool
5619 *** is disabling shared libraries support. We urge you to upgrade GNU
5620 *** binutils to release 2.9.1 or newer. Another option is to modify
5621 *** your PATH or compiler configuration so that the native linker is
5622 *** used, and then restart.
5623
5624 EOF
5625 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5626 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5627 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5628 else
5629 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5630 fi
5631 ;;
5632
5633 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5634 case `$LD -v 2>&1` in
5635 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5636 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5637 cat <<_LT_EOF 1>&2
5638
5639 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5640 *** reliably create shared libraries on SCO systems. Therefore, libtool
5641 *** is disabling shared libraries support. We urge you to upgrade GNU
5642 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
5643 *** your PATH or compiler configuration so that the native linker is
5644 *** used, and then restart.
5645
5646 _LT_EOF
5647 ;;
5648 *)
5649 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5650 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5651 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5652 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
5653 else
5654 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5655 fi
5656 ;;
5657 esac
5658 ;;
5659
5660 sunos4*)
5661 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5662 wlarc=
5663 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5664 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5665 ;;
5666
5667 *)
5668 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5669 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5670 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5671 else
5672 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5673 fi
5674 ;;
5675 esac
5676
5677 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5678 runpath_var=
5679 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5680 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5681 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5682 fi
5683 else
5684 # PORTME fill in a description of your system's linker (not GNU ld)
5685 case $host_os in
5686 aix3*)
5687 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5688 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5689 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5690 # Note: this linker hardcodes the directories in LIBPATH if there
5691 # are no directories specified by -L.
5692 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5693 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5694 # Neither direct hardcoding nor static linking is supported with a
5695 # broken collect2.
5696 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5697 fi
5698 ;;
5699
5700 aix4* | aix5*)
5701 if test "$host_cpu" = ia64; then
5702 # On IA64, the linker does run time linking by default, so we don't
5703 # have to do anything special.
5704 aix_use_runtimelinking=no
5705 exp_sym_flag='-Bexport'
5706 no_entry_flag=""
5707 else
5708 # If we're using GNU nm, then we don't want the "-C" option.
5709 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5710 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5711 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5712 else
5713 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5714 fi
5715 aix_use_runtimelinking=no
5716
5717 # Test if we are trying to use run time linking or normal
5718 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5719 # need to do runtime linking.
5720 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5721 for ld_flag in $LDFLAGS; do
5722 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5723 aix_use_runtimelinking=yes
5724 break
5725 fi
5726 done
5727 ;;
5728 esac
5729
5730 exp_sym_flag='-bexport'
5731 no_entry_flag='-bnoentry'
5732 fi
5733
5734 # When large executables or shared objects are built, AIX ld can
5735 # have problems creating the table of contents. If linking a library
5736 # or program results in "error TOC overflow" add -mminimal-toc to
5737 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5738 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5739
5740 _LT_AC_TAGVAR(archive_cmds, $1)=''
5741 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5742 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5743 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5744
5745 if test "$GCC" = yes; then
5746 case $host_os in aix4.[[012]]|aix4.[[012]].*)
5747 # We only want to do this on AIX 4.2 and lower, the check
5748 # below for broken collect2 doesn't work under 4.3+
5749 collect2name=`${CC} -print-prog-name=collect2`
5750 if test -f "$collect2name" && \
5751 strings "$collect2name" | grep resolve_lib_name >/dev/null
5752 then
5753 # We have reworked collect2
5754 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5755 else
5756 # We have old collect2
5757 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5758 # It fails to find uninstalled libraries when the uninstalled
5759 # path is not listed in the libpath. Setting hardcode_minus_L
5760 # to unsupported forces relinking
5761 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5762 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5763 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5764 fi
5765 ;;
5766 esac
5767 shared_flag='-shared'
5768 if test "$aix_use_runtimelinking" = yes; then
5769 shared_flag="$shared_flag "'${wl}-G'
5770 fi
5771 else
5772 # not using gcc
5773 if test "$host_cpu" = ia64; then
5774 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5775 # chokes on -Wl,-G. The following line is correct:
5776 shared_flag='-G'
5777 else
5778 if test "$aix_use_runtimelinking" = yes; then
5779 shared_flag='${wl}-G'
5780 else
5781 shared_flag='${wl}-bM:SRE'
5782 fi
5783 fi
5784 fi
5785
5786 # It seems that -bexpall does not export symbols beginning with
5787 # underscore (_), so it is better to generate a list of symbols to export.
5788 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5789 if test "$aix_use_runtimelinking" = yes; then
5790 # Warning - without using the other runtime loading flags (-brtl),
5791 # -berok will link without error, but may produce a broken library.
5792 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5793 # Determine the default libpath from the value encoded in an empty executable.
5794 _LT_AC_SYS_LIBPATH_AIX
5795 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5796 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5797 else
5798 if test "$host_cpu" = ia64; then
5799 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5800 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5801 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
5802 else
5803 # Determine the default libpath from the value encoded in an empty executable.
5804 _LT_AC_SYS_LIBPATH_AIX
5805 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5806 # Warning - without using the other run time loading flags,
5807 # -berok will link without error, but may produce a broken library.
5808 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5809 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5810 # Exported symbols can be pulled into shared objects from archives
5811 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5812 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5813 # This is similar to how AIX traditionally builds its shared libraries.
5814 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5815 fi
5816 fi
5817 ;;
5818
5819 amigaos*)
5820 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
5821 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5822 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5823 # see comment about different semantics on the GNU ld section
5824 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5825 ;;
5826
5827 bsdi[[45]]*)
5828 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5829 ;;
5830
5831 cygwin* | mingw* | pw32*)
5832 # When not using gcc, we currently assume that we are using
5833 # Microsoft Visual C++.
5834 # hardcode_libdir_flag_spec is actually meaningless, as there is
5835 # no search path for DLLs.
5836 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5837 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5838 # Tell ltmain to make .lib files, not .a files.
5839 libext=lib
5840 # Tell ltmain to make .dll files, not .so files.
5841 shrext_cmds=".dll"
5842 # FIXME: Setting linknames here is a bad hack.
5843 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5844 # The linker will automatically build a .lib file if we build a DLL.
5845 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5846 # FIXME: Should let the user specify the lib program.
5847 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5848 _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5849 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5850 ;;
5851
5852 darwin* | rhapsody*)
5853 case $host_os in
5854 rhapsody* | darwin1.[[012]])
5855 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5856 ;;
5857 *) # Darwin 1.3 on
5858 if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5859 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5860 else
5861 case ${MACOSX_DEPLOYMENT_TARGET} in
5862 10.[[012]])
5863 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5864 ;;
5865 10.*)
5866 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5867 ;;
5868 esac
5869 fi
5870 ;;
5871 esac
5872 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5873 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5874 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5875 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5876 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5877 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5878 if test "$GCC" = yes ; then
5879 output_verbose_link_cmd='echo'
5880 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5881 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5882 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5883 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5884 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5885 else
5886 case $cc_basename in
5887 xlc*)
5888 output_verbose_link_cmd='echo'
5889 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5890 _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5891 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5892 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5893 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5894 ;;
5895 *)
5896 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5897 ;;
5898 esac
5899 fi
5900 ;;
5901
5902 dgux*)
5903 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5904 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5905 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5906 ;;
5907
5908 freebsd1*)
5909 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5910 ;;
5911
5912 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5913 # support. Future versions do this automatically, but an explicit c++rt0.o
5914 # does not break anything, and helps significantly (at the cost of a little
5915 # extra space).
5916 freebsd2.2*)
5917 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5918 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5919 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5920 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5921 ;;
5922
5923 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5924 freebsd2*)
5925 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5926 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5927 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5928 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5929 ;;
5930
5931 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5932 freebsd* | kfreebsd*-gnu | dragonfly*)
5933 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5934 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5935 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5936 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5937 ;;
5938
5939 hpux9*)
5940 if test "$GCC" = yes; then
5941 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5942 else
5943 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5944 fi
5945 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5946 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5947 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5948
5949 # hardcode_minus_L: Not really in the search PATH,
5950 # but as the default location of the library.
5951 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5952 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5953 ;;
5954
5955 hpux10*)
5956 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5957 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5958 else
5959 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5960 fi
5961 if test "$with_gnu_ld" = no; then
5962 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5963 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5964
5965 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5966 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5967
5968 # hardcode_minus_L: Not really in the search PATH,
5969 # but as the default location of the library.
5970 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5971 fi
5972 ;;
5973
5974 hpux11*)
5975 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5976 case $host_cpu in
5977 hppa*64*)
5978 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5979 ;;
5980 ia64*)
5981 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5982 ;;
5983 *)
5984 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5985 ;;
5986 esac
5987 else
5988 case $host_cpu in
5989 hppa*64*)
5990 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5991 ;;
5992 ia64*)
5993 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5994 ;;
5995 *)
5996 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5997 ;;
5998 esac
5999 fi
6000 if test "$with_gnu_ld" = no; then
6001 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6002 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6003
6004 case $host_cpu in
6005 hppa*64*|ia64*)
6006 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6007 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6008 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6009 ;;
6010 *)
6011 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6012 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6013
6014 # hardcode_minus_L: Not really in the search PATH,
6015 # but as the default location of the library.
6016 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6017 ;;
6018 esac
6019 fi
6020 ;;
6021
6022 irix5* | irix6* | nonstopux*)
6023 if test "$GCC" = yes; then
6024 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6025 else
6026 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6027 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6028 fi
6029 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6030 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6031 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6032 ;;
6033
6034 netbsd*)
6035 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6036 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
6037 else
6038 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
6039 fi
6040 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6041 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6042 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6043 ;;
6044
6045 newsos6)
6046 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6047 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6048 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6049 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6050 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6051 ;;
6052
6053 openbsd*)
6054 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6055 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6056 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6057 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6058 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6059 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6060 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6061 else
6062 case $host_os in
6063 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6064 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6065 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6066 ;;
6067 *)
6068 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6069 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6070 ;;
6071 esac
6072 fi
6073 ;;
6074
6075 os2*)
6076 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6077 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6078 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6079 _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
6080 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6081 ;;
6082
6083 osf3*)
6084 if test "$GCC" = yes; then
6085 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6086 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6087 else
6088 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6089 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6090 fi
6091 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6092 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6093 ;;
6094
6095 osf4* | osf5*) # as osf3* with the addition of -msym flag
6096 if test "$GCC" = yes; then
6097 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6098 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
6099 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6100 else
6101 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6102 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
6103 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
6104 $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
6105
6106 # Both c and cxx compiler support -rpath directly
6107 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6108 fi
6109 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6110 ;;
6111
6112 solaris*)
6113 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6114 if test "$GCC" = yes; then
6115 wlarc='${wl}'
6116 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6117 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6118 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6119 else
6120 wlarc=''
6121 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6122 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6123 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6124 fi
6125 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6126 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6127 case $host_os in
6128 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6129 *)
6130 # The compiler driver will combine linker options so we
6131 # cannot just pass the convience library names through
6132 # without $wl, iff we do not link with $LD.
6133 # Luckily, gcc supports the same syntax we need for Sun Studio.
6134 # Supported since Solaris 2.6 (maybe 2.5.1?)
6135 case $wlarc in
6136 '')
6137 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6138 *)
6139 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6140 esac ;;
6141 esac
6142 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6143 ;;
6144
6145 sunos4*)
6146 if test "x$host_vendor" = xsequent; then
6147 # Use $CC to link under sequent, because it throws in some extra .o
6148 # files that make .init and .fini sections work.
6149 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6150 else
6151 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6152 fi
6153 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6154 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6155 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6156 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6157 ;;
6158
6159 sysv4)
6160 case $host_vendor in
6161 sni)
6162 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6163 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6164 ;;
6165 siemens)
6166 ## LD is ld it makes a PLAMLIB
6167 ## CC just makes a GrossModule.
6168 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6169 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6170 _LT_AC_TAGVAR(hardcode_direct, $1)=no
6171 ;;
6172 motorola)
6173 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6174 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6175 ;;
6176 esac
6177 runpath_var='LD_RUN_PATH'
6178 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6179 ;;
6180
6181 sysv4.3*)
6182 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6183 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6184 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6185 ;;
6186
6187 sysv4*MP*)
6188 if test -d /usr/nec; then
6189 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6190 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6191 runpath_var=LD_RUN_PATH
6192 hardcode_runpath_var=yes
6193 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6194 fi
6195 ;;
6196
6197 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6198 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6199 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6200 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6201 runpath_var='LD_RUN_PATH'
6202
6203 if test "$GCC" = yes; then
6204 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6205 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6206 else
6207 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6208 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6209 fi
6210 ;;
6211
6212 sysv5* | sco3.2v5* | sco5v6*)
6213 # Note: We can NOT use -z defs as we might desire, because we do not
6214 # link with -lc, and that would cause any symbols used from libc to
6215 # always be unresolved, which means just about no library would
6216 # ever link correctly. If we're not using GNU ld we use -z text
6217 # though, which does catch some bad symbols but isn't as heavy-handed
6218 # as -z defs.
6219 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6220 _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6221 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6222 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6223 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6224 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6225 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6226 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6227 runpath_var='LD_RUN_PATH'
6228
6229 if test "$GCC" = yes; then
6230 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6231 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6232 else
6233 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6234 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6235 fi
6236 ;;
6237
6238 uts4*)
6239 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6240 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6241 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6242 ;;
6243
6244 *)
6245 _LT_AC_TAGVAR(ld_shlibs, $1)=no
6246 ;;
6247 esac
6248 fi
6249 ])
6250 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6251 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6252
6253 #
6254 # Do we need to explicitly link libc?
6255 #
6256 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6257 x|xyes)
6258 # Assume -lc should be added
6259 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6260
6261 if test "$enable_shared" = yes && test "$GCC" = yes; then
6262 case $_LT_AC_TAGVAR(archive_cmds, $1) in
6263 *'~'*)
6264 # FIXME: we may have to deal with multi-command sequences.
6265 ;;
6266 '$CC '*)
6267 # Test whether the compiler implicitly links with -lc since on some
6268 # systems, -lgcc has to come before -lc. If gcc already passes -lc
6269 # to ld, don't add -lc before -lgcc.
6270 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6271 $rm conftest*
6272 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6273
6274 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6275 soname=conftest
6276 lib=conftest
6277 libobjs=conftest.$ac_objext
6278 deplibs=
6279 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6280 pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6281 compiler_flags=-v
6282 linker_flags=-v
6283 verstring=
6284 output_objdir=.
6285 libname=conftest
6286 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6287 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6288 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6289 then
6290 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6291 else
6292 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6293 fi
6294 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6295 else
6296 cat conftest.err 1>&5
6297 fi
6298 $rm conftest*
6299 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6300 ;;
6301 esac
6302 fi
6303 ;;
6304 esac
6305 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6306
6307
6308 # _LT_AC_FILE_LTDLL_C
6309 # -------------------
6310 # Be careful that the start marker always follows a newline.
6311 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6312 # /* ltdll.c starts here */
6313 # #define WIN32_LEAN_AND_MEAN
6314 # #include <windows.h>
6315 # #undef WIN32_LEAN_AND_MEAN
6316 # #include <stdio.h>
6317 #
6318 # #ifndef __CYGWIN__
6319 # # ifdef __CYGWIN32__
6320 # # define __CYGWIN__ __CYGWIN32__
6321 # # endif
6322 # #endif
6323 #
6324 # #ifdef __cplusplus
6325 # extern "C" {
6326 # #endif
6327 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6328 # #ifdef __cplusplus
6329 # }
6330 # #endif
6331 #
6332 # #ifdef __CYGWIN__
6333 # #include <cygwin/cygwin_dll.h>
6334 # DECLARE_CYGWIN_DLL( DllMain );
6335 # #endif
6336 # HINSTANCE __hDllInstance_base;
6337 #
6338 # BOOL APIENTRY
6339 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6340 # {
6341 # __hDllInstance_base = hInst;
6342 # return TRUE;
6343 # }
6344 # /* ltdll.c ends here */
6345 ])# _LT_AC_FILE_LTDLL_C
6346
6347
6348 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6349 # ---------------------------------
6350 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6351
6352
6353 # old names
6354 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
6355 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
6356 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
6357 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6358 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6359 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
6360 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
6361
6362 # This is just to silence aclocal about the macro not being used
6363 ifelse([AC_DISABLE_FAST_INSTALL])
6364
6365 AC_DEFUN([LT_AC_PROG_GCJ],
6366 [AC_CHECK_TOOL(GCJ, gcj, no)
6367 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6368 AC_SUBST(GCJFLAGS)
6369 ])
6370
6371 AC_DEFUN([LT_AC_PROG_RC],
6372 [AC_CHECK_TOOL(RC, windres, no)
6373 ])
6374
6375 # NOTE: This macro has been submitted for inclusion into #
6376 # GNU Autoconf as AC_PROG_SED. When it is available in #
6377 # a released version of Autoconf we should remove this #
6378 # macro and use it instead. #
6379 # LT_AC_PROG_SED
6380 # --------------
6381 # Check for a fully-functional sed program, that truncates
6382 # as few characters as possible. Prefer GNU sed if found.
6383 AC_DEFUN([LT_AC_PROG_SED],
6384 [AC_MSG_CHECKING([for a sed that does not truncate output])
6385 AC_CACHE_VAL(lt_cv_path_SED,
6386 [# Loop through the user's path and test for sed and gsed.
6387 # Then use that list of sed's as ones to test for truncation.
6388 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6389 for as_dir in $PATH
6390 do
6391 IFS=$as_save_IFS
6392 test -z "$as_dir" && as_dir=.
6393 for lt_ac_prog in sed gsed; do
6394 for ac_exec_ext in '' $ac_executable_extensions; do
6395 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6396 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6397 fi
6398 done
6399 done
6400 done
6401 IFS=$as_save_IFS
6402 lt_ac_max=0
6403 lt_ac_count=0
6404 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6405 # along with /bin/sed that truncates output.
6406 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6407 test ! -f $lt_ac_sed && continue
6408 cat /dev/null > conftest.in
6409 lt_ac_count=0
6410 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6411 # Check for GNU sed and select it if it is found.
6412 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6413 lt_cv_path_SED=$lt_ac_sed
6414 break
6415 fi
6416 while true; do
6417 cat conftest.in conftest.in >conftest.tmp
6418 mv conftest.tmp conftest.in
6419 cp conftest.in conftest.nl
6420 echo >>conftest.nl
6421 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6422 cmp -s conftest.out conftest.nl || break
6423 # 10000 chars as input seems more than enough
6424 test $lt_ac_count -gt 10 && break
6425 lt_ac_count=`expr $lt_ac_count + 1`
6426 if test $lt_ac_count -gt $lt_ac_max; then
6427 lt_ac_max=$lt_ac_count
6428 lt_cv_path_SED=$lt_ac_sed
6429 fi
6430 done
6431 done
6432 ])
6433 SED=$lt_cv_path_SED
6434 AC_SUBST([SED])
6435 AC_MSG_RESULT([$SED])
6436 ])
6437
6438 # Copyright (C) 2002, 2003, 2005 Free Software Foundation, Inc.
6439 #
6440 # This file is free software; the Free Software Foundation
6441 # gives unlimited permission to copy and/or distribute it,
6442 # with or without modifications, as long as this notice is preserved.
6443
6444 # AM_AUTOMAKE_VERSION(VERSION)
6445 # ----------------------------
6446 # Automake X.Y traces this macro to ensure aclocal.m4 has been
6447 # generated from the m4 files accompanying Automake X.Y.
6448 AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6449
6450 # AM_SET_CURRENT_AUTOMAKE_VERSION
6451 # -------------------------------
6452 # Call AM_AUTOMAKE_VERSION so it can be traced.
6453 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6454 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6455 [AM_AUTOMAKE_VERSION([1.9.6])])
6456
6457 # AM_AUX_DIR_EXPAND -*- Autoconf -*-
6458
6459 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6460 #
6461 # This file is free software; the Free Software Foundation
6462 # gives unlimited permission to copy and/or distribute it,
6463 # with or without modifications, as long as this notice is preserved.
6464
6465 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6466 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
6467 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6468 #
6469 # Of course, Automake must honor this variable whenever it calls a
6470 # tool from the auxiliary directory. The problem is that $srcdir (and
6471 # therefore $ac_aux_dir as well) can be either absolute or relative,
6472 # depending on how configure is run. This is pretty annoying, since
6473 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
6474 # source directory, any form will work fine, but in subdirectories a
6475 # relative path needs to be adjusted first.
6476 #
6477 # $ac_aux_dir/missing
6478 # fails when called from a subdirectory if $ac_aux_dir is relative
6479 # $top_srcdir/$ac_aux_dir/missing
6480 # fails if $ac_aux_dir is absolute,
6481 # fails when called from a subdirectory in a VPATH build with
6482 # a relative $ac_aux_dir
6483 #
6484 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6485 # are both prefixed by $srcdir. In an in-source build this is usually
6486 # harmless because $srcdir is `.', but things will broke when you
6487 # start a VPATH build or use an absolute $srcdir.
6488 #
6489 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6490 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
6491 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6492 # and then we would define $MISSING as
6493 # MISSING="\${SHELL} $am_aux_dir/missing"
6494 # This will work as long as MISSING is not called from configure, because
6495 # unfortunately $(top_srcdir) has no meaning in configure.
6496 # However there are other variables, like CC, which are often used in
6497 # configure, and could therefore not use this "fixed" $ac_aux_dir.
6498 #
6499 # Another solution, used here, is to always expand $ac_aux_dir to an
6500 # absolute PATH. The drawback is that using absolute paths prevent a
6501 # configured tree to be moved without reconfiguration.
6502
6503 AC_DEFUN([AM_AUX_DIR_EXPAND],
6504 [dnl Rely on autoconf to set up CDPATH properly.
6505 AC_PREREQ([2.50])dnl
6506 # expand $ac_aux_dir to an absolute path
6507 am_aux_dir=`cd $ac_aux_dir && pwd`
6508 ])
6509
6510 # AM_CONDITIONAL -*- Autoconf -*-
6511
6512 # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6513 # Free Software Foundation, Inc.
6514 #
6515 # This file is free software; the Free Software Foundation
6516 # gives unlimited permission to copy and/or distribute it,
6517 # with or without modifications, as long as this notice is preserved.
6518
6519 # serial 7
6520
6521 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
6522 # -------------------------------------
6523 # Define a conditional.
6524 AC_DEFUN([AM_CONDITIONAL],
6525 [AC_PREREQ(2.52)dnl
6526 ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
6527 [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6528 AC_SUBST([$1_TRUE])
6529 AC_SUBST([$1_FALSE])
6530 if $2; then
6531 $1_TRUE=
6532 $1_FALSE='#'
6533 else
6534 $1_TRUE='#'
6535 $1_FALSE=
6536 fi
6537 AC_CONFIG_COMMANDS_PRE(
6538 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6539 AC_MSG_ERROR([[conditional "$1" was never defined.
6540 Usually this means the macro was only invoked conditionally.]])
6541 fi])])
6542
6543
6544 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6545 # Free Software Foundation, Inc.
6546 #
6547 # This file is free software; the Free Software Foundation
6548 # gives unlimited permission to copy and/or distribute it,
6549 # with or without modifications, as long as this notice is preserved.
6550
6551 # serial 8
6552
6553 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6554 # written in clear, in which case automake, when reading aclocal.m4,
6555 # will think it sees a *use*, and therefore will trigger all it's
6556 # C support machinery. Also note that it means that autoscan, seeing
6557 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6558
6559
6560 # _AM_DEPENDENCIES(NAME)
6561 # ----------------------
6562 # See how the compiler implements dependency checking.
6563 # NAME is "CC", "CXX", "GCJ", or "OBJC".
6564 # We try a few techniques and use that to set a single cache variable.
6565 #
6566 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6567 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6568 # dependency, and given that the user is not expected to run this macro,
6569 # just rely on AC_PROG_CC.
6570 AC_DEFUN([_AM_DEPENDENCIES],
6571 [AC_REQUIRE([AM_SET_DEPDIR])dnl
6572 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6573 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
6574 AC_REQUIRE([AM_DEP_TRACK])dnl
6575
6576 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
6577 [$1], CXX, [depcc="$CXX" am_compiler_list=],
6578 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6579 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
6580 [depcc="$$1" am_compiler_list=])
6581
6582 AC_CACHE_CHECK([dependency style of $depcc],
6583 [am_cv_$1_dependencies_compiler_type],
6584 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6585 # We make a subdir and do the tests there. Otherwise we can end up
6586 # making bogus files that we don't know about and never remove. For
6587 # instance it was reported that on HP-UX the gcc test will end up
6588 # making a dummy file named `D' -- because `-MD' means `put the output
6589 # in D'.
6590 mkdir conftest.dir
6591 # Copy depcomp to subdir because otherwise we won't find it if we're
6592 # using a relative directory.
6593 cp "$am_depcomp" conftest.dir
6594 cd conftest.dir
6595 # We will build objects and dependencies in a subdirectory because
6596 # it helps to detect inapplicable dependency modes. For instance
6597 # both Tru64's cc and ICC support -MD to output dependencies as a
6598 # side effect of compilation, but ICC will put the dependencies in
6599 # the current directory while Tru64 will put them in the object
6600 # directory.
6601 mkdir sub
6602
6603 am_cv_$1_dependencies_compiler_type=none
6604 if test "$am_compiler_list" = ""; then
6605 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6606 fi
6607 for depmode in $am_compiler_list; do
6608 # Setup a source with many dependencies, because some compilers
6609 # like to wrap large dependency lists on column 80 (with \), and
6610 # we should not choose a depcomp mode which is confused by this.
6611 #
6612 # We need to recreate these files for each test, as the compiler may
6613 # overwrite some of them when testing with obscure command lines.
6614 # This happens at least with the AIX C compiler.
6615 : > sub/conftest.c
6616 for i in 1 2 3 4 5 6; do
6617 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6618 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6619 # Solaris 8's {/usr,}/bin/sh.
6620 touch sub/conftst$i.h
6621 done
6622 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6623
6624 case $depmode in
6625 nosideeffect)
6626 # after this tag, mechanisms are not by side-effect, so they'll
6627 # only be used when explicitly requested
6628 if test "x$enable_dependency_tracking" = xyes; then
6629 continue
6630 else
6631 break
6632 fi
6633 ;;
6634 none) break ;;
6635 esac
6636 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6637 # mode. It turns out that the SunPro C++ compiler does not properly
6638 # handle `-M -o', and we need to detect this.
6639 if depmode=$depmode \
6640 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6641 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6642 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6643 >/dev/null 2>conftest.err &&
6644 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6645 grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6646 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6647 # icc doesn't choke on unknown options, it will just issue warnings
6648 # or remarks (even with -Werror). So we grep stderr for any message
6649 # that says an option was ignored or not supported.
6650 # When given -MP, icc 7.0 and 7.1 complain thusly:
6651 # icc: Command line warning: ignoring option '-M'; no argument required
6652 # The diagnosis changed in icc 8.0:
6653 # icc: Command line remark: option '-MP' not supported
6654 if (grep 'ignoring option' conftest.err ||
6655 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6656 am_cv_$1_dependencies_compiler_type=$depmode
6657 break
6658 fi
6659 fi
6660 done
6661
6662 cd ..
6663 rm -rf conftest.dir
6664 else
6665 am_cv_$1_dependencies_compiler_type=none
6666 fi
6667 ])
6668 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6669 AM_CONDITIONAL([am__fastdep$1], [
6670 test "x$enable_dependency_tracking" != xno \
6671 && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6672 ])
6673
6674
6675 # AM_SET_DEPDIR
6676 # -------------
6677 # Choose a directory name for dependency files.
6678 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
6679 AC_DEFUN([AM_SET_DEPDIR],
6680 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6681 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6682 ])
6683
6684
6685 # AM_DEP_TRACK
6686 # ------------
6687 AC_DEFUN([AM_DEP_TRACK],
6688 [AC_ARG_ENABLE(dependency-tracking,
6689 [ --disable-dependency-tracking speeds up one-time build
6690 --enable-dependency-tracking do not reject slow dependency extractors])
6691 if test "x$enable_dependency_tracking" != xno; then
6692 am_depcomp="$ac_aux_dir/depcomp"
6693 AMDEPBACKSLASH='\'
6694 fi
6695 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6696 AC_SUBST([AMDEPBACKSLASH])
6697 ])
6698
6699 # Generate code to set up dependency tracking. -*- Autoconf -*-
6700
6701 # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6702 # Free Software Foundation, Inc.
6703 #
6704 # This file is free software; the Free Software Foundation
6705 # gives unlimited permission to copy and/or distribute it,
6706 # with or without modifications, as long as this notice is preserved.
6707
6708 #serial 3
6709
6710 # _AM_OUTPUT_DEPENDENCY_COMMANDS
6711 # ------------------------------
6712 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6713 [for mf in $CONFIG_FILES; do
6714 # Strip MF so we end up with the name of the file.
6715 mf=`echo "$mf" | sed -e 's/:.*$//'`
6716 # Check whether this is an Automake generated Makefile or not.
6717 # We used to match only the files named `Makefile.in', but
6718 # some people rename them; so instead we look at the file content.
6719 # Grep'ing the first line is not enough: some people post-process
6720 # each Makefile.in and add a new line on top of each file to say so.
6721 # So let's grep whole file.
6722 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6723 dirpart=`AS_DIRNAME("$mf")`
6724 else
6725 continue
6726 fi
6727 # Extract the definition of DEPDIR, am__include, and am__quote
6728 # from the Makefile without running `make'.
6729 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6730 test -z "$DEPDIR" && continue
6731 am__include=`sed -n 's/^am__include = //p' < "$mf"`
6732 test -z "am__include" && continue
6733 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6734 # When using ansi2knr, U may be empty or an underscore; expand it
6735 U=`sed -n 's/^U = //p' < "$mf"`
6736 # Find all dependency output files, they are included files with
6737 # $(DEPDIR) in their names. We invoke sed twice because it is the
6738 # simplest approach to changing $(DEPDIR) to its actual value in the
6739 # expansion.
6740 for file in `sed -n "
6741 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6742 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6743 # Make sure the directory exists.
6744 test -f "$dirpart/$file" && continue
6745 fdir=`AS_DIRNAME(["$file"])`
6746 AS_MKDIR_P([$dirpart/$fdir])
6747 # echo "creating $dirpart/$file"
6748 echo '# dummy' > "$dirpart/$file"
6749 done
6750 done
6751 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6752
6753
6754 # AM_OUTPUT_DEPENDENCY_COMMANDS
6755 # -----------------------------
6756 # This macro should only be invoked once -- use via AC_REQUIRE.
6757 #
6758 # This code is only required when automatic dependency tracking
6759 # is enabled. FIXME. This creates each `.P' file that we will
6760 # need in order to bootstrap the dependency handling code.
6761 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6762 [AC_CONFIG_COMMANDS([depfiles],
6763 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6764 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6765 ])
6766
6767 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6768 # Free Software Foundation, Inc.
6769 #
6770 # This file is free software; the Free Software Foundation
6771 # gives unlimited permission to copy and/or distribute it,
6772 # with or without modifications, as long as this notice is preserved.
6773
6774 # serial 8
6775
6776 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
6777 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6778
6779 # Do all the work for Automake. -*- Autoconf -*-
6780
6781 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6782 # Free Software Foundation, Inc.
6783 #
6784 # This file is free software; the Free Software Foundation
6785 # gives unlimited permission to copy and/or distribute it,
6786 # with or without modifications, as long as this notice is preserved.
6787
6788 # serial 12
6789
6790 # This macro actually does too much. Some checks are only needed if
6791 # your package does certain things. But this isn't really a big deal.
6792
6793 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6794 # AM_INIT_AUTOMAKE([OPTIONS])
6795 # -----------------------------------------------
6796 # The call with PACKAGE and VERSION arguments is the old style
6797 # call (pre autoconf-2.50), which is being phased out. PACKAGE
6798 # and VERSION should now be passed to AC_INIT and removed from
6799 # the call to AM_INIT_AUTOMAKE.
6800 # We support both call styles for the transition. After
6801 # the next Automake release, Autoconf can make the AC_INIT
6802 # arguments mandatory, and then we can depend on a new Autoconf
6803 # release and drop the old call support.
6804 AC_DEFUN([AM_INIT_AUTOMAKE],
6805 [AC_PREREQ([2.58])dnl
6806 dnl Autoconf wants to disallow AM_ names. We explicitly allow
6807 dnl the ones we care about.
6808 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6809 AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6810 AC_REQUIRE([AC_PROG_INSTALL])dnl
6811 # test to see if srcdir already configured
6812 if test "`cd $srcdir && pwd`" != "`pwd`" &&
6813 test -f $srcdir/config.status; then
6814 AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6815 fi
6816
6817 # test whether we have cygpath
6818 if test -z "$CYGPATH_W"; then
6819 if (cygpath --version) >/dev/null 2>/dev/null; then
6820 CYGPATH_W='cygpath -w'
6821 else
6822 CYGPATH_W=echo
6823 fi
6824 fi
6825 AC_SUBST([CYGPATH_W])
6826
6827 # Define the identity of the package.
6828 dnl Distinguish between old-style and new-style calls.
6829 m4_ifval([$2],
6830 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6831 AC_SUBST([PACKAGE], [$1])dnl
6832 AC_SUBST([VERSION], [$2])],
6833 [_AM_SET_OPTIONS([$1])dnl
6834 AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6835 AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6836
6837 _AM_IF_OPTION([no-define],,
6838 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6839 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6840
6841 # Some tools Automake needs.
6842 AC_REQUIRE([AM_SANITY_CHECK])dnl
6843 AC_REQUIRE([AC_ARG_PROGRAM])dnl
6844 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6845 AM_MISSING_PROG(AUTOCONF, autoconf)
6846 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6847 AM_MISSING_PROG(AUTOHEADER, autoheader)
6848 AM_MISSING_PROG(MAKEINFO, makeinfo)
6849 AM_PROG_INSTALL_SH
6850 AM_PROG_INSTALL_STRIP
6851 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
6852 # We need awk for the "check" target. The system "awk" is bad on
6853 # some platforms.
6854 AC_REQUIRE([AC_PROG_AWK])dnl
6855 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
6856 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6857 _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6858 [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6859 [_AM_PROG_TAR([v7])])])
6860 _AM_IF_OPTION([no-dependencies],,
6861 [AC_PROVIDE_IFELSE([AC_PROG_CC],
6862 [_AM_DEPENDENCIES(CC)],
6863 [define([AC_PROG_CC],
6864 defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6865 AC_PROVIDE_IFELSE([AC_PROG_CXX],
6866 [_AM_DEPENDENCIES(CXX)],
6867 [define([AC_PROG_CXX],
6868 defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6869 ])
6870 ])
6871
6872
6873 # When config.status generates a header, we must update the stamp-h file.
6874 # This file resides in the same directory as the config header
6875 # that is generated. The stamp files are numbered to have different names.
6876
6877 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6878 # loop where config.status creates the headers, so we can generate
6879 # our stamp files there.
6880 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6881 [# Compute $1's index in $config_headers.
6882 _am_stamp_count=1
6883 for _am_header in $config_headers :; do
6884 case $_am_header in
6885 $1 | $1:* )
6886 break ;;
6887 * )
6888 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6889 esac
6890 done
6891 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6892
6893 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
6894 #
6895 # This file is free software; the Free Software Foundation
6896 # gives unlimited permission to copy and/or distribute it,
6897 # with or without modifications, as long as this notice is preserved.
6898
6899 # AM_PROG_INSTALL_SH
6900 # ------------------
6901 # Define $install_sh.
6902 AC_DEFUN([AM_PROG_INSTALL_SH],
6903 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6904 install_sh=${install_sh-"$am_aux_dir/install-sh"}
6905 AC_SUBST(install_sh)])
6906
6907 # Copyright (C) 2003, 2005 Free Software Foundation, Inc.
6908 #
6909 # This file is free software; the Free Software Foundation
6910 # gives unlimited permission to copy and/or distribute it,
6911 # with or without modifications, as long as this notice is preserved.
6912
6913 # serial 2
6914
6915 # Check whether the underlying file-system supports filenames
6916 # with a leading dot. For instance MS-DOS doesn't.
6917 AC_DEFUN([AM_SET_LEADING_DOT],
6918 [rm -rf .tst 2>/dev/null
6919 mkdir .tst 2>/dev/null
6920 if test -d .tst; then
6921 am__leading_dot=.
6922 else
6923 am__leading_dot=_
6924 fi
6925 rmdir .tst 2>/dev/null
6926 AC_SUBST([am__leading_dot])])
6927
6928 # Check to see how 'make' treats includes. -*- Autoconf -*-
6929
6930 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
6931 #
6932 # This file is free software; the Free Software Foundation
6933 # gives unlimited permission to copy and/or distribute it,
6934 # with or without modifications, as long as this notice is preserved.
6935
6936 # serial 3
6937
6938 # AM_MAKE_INCLUDE()
6939 # -----------------
6940 # Check to see how make treats includes.
6941 AC_DEFUN([AM_MAKE_INCLUDE],
6942 [am_make=${MAKE-make}
6943 cat > confinc << 'END'
6944 am__doit:
6945 @echo done
6946 .PHONY: am__doit
6947 END
6948 # If we don't find an include directive, just comment out the code.
6949 AC_MSG_CHECKING([for style of include used by $am_make])
6950 am__include="#"
6951 am__quote=
6952 _am_result=none
6953 # First try GNU make style include.
6954 echo "include confinc" > confmf
6955 # We grep out `Entering directory' and `Leaving directory'
6956 # messages which can occur if `w' ends up in MAKEFLAGS.
6957 # In particular we don't look at `^make:' because GNU make might
6958 # be invoked under some other name (usually "gmake"), in which
6959 # case it prints its new name instead of `make'.
6960 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6961 am__include=include
6962 am__quote=
6963 _am_result=GNU
6964 fi
6965 # Now try BSD make style include.
6966 if test "$am__include" = "#"; then
6967 echo '.include "confinc"' > confmf
6968 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6969 am__include=.include
6970 am__quote="\""
6971 _am_result=BSD
6972 fi
6973 fi
6974 AC_SUBST([am__include])
6975 AC_SUBST([am__quote])
6976 AC_MSG_RESULT([$_am_result])
6977 rm -f confinc confmf
6978 ])
6979
6980 # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
6981
6982 # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6983 # Free Software Foundation, Inc.
6984 #
6985 # This file is free software; the Free Software Foundation
6986 # gives unlimited permission to copy and/or distribute it,
6987 # with or without modifications, as long as this notice is preserved.
6988
6989 # serial 4
6990
6991 # AM_MISSING_PROG(NAME, PROGRAM)
6992 # ------------------------------
6993 AC_DEFUN([AM_MISSING_PROG],
6994 [AC_REQUIRE([AM_MISSING_HAS_RUN])
6995 $1=${$1-"${am_missing_run}$2"}
6996 AC_SUBST($1)])
6997
6998
6999 # AM_MISSING_HAS_RUN
7000 # ------------------
7001 # Define MISSING if not defined so far and test if it supports --run.
7002 # If it does, set am_missing_run to use it, otherwise, to nothing.
7003 AC_DEFUN([AM_MISSING_HAS_RUN],
7004 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7005 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7006 # Use eval to expand $SHELL
7007 if eval "$MISSING --run true"; then
7008 am_missing_run="$MISSING --run "
7009 else
7010 am_missing_run=
7011 AC_MSG_WARN([`missing' script is too old or missing])
7012 fi
7013 ])
7014
7015 # Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
7016 #
7017 # This file is free software; the Free Software Foundation
7018 # gives unlimited permission to copy and/or distribute it,
7019 # with or without modifications, as long as this notice is preserved.
7020
7021 # AM_PROG_MKDIR_P
7022 # ---------------
7023 # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7024 #
7025 # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7026 # created by `make install' are always world readable, even if the
7027 # installer happens to have an overly restrictive umask (e.g. 077).
7028 # This was a mistake. There are at least two reasons why we must not
7029 # use `-m 0755':
7030 # - it causes special bits like SGID to be ignored,
7031 # - it may be too restrictive (some setups expect 775 directories).
7032 #
7033 # Do not use -m 0755 and let people choose whatever they expect by
7034 # setting umask.
7035 #
7036 # We cannot accept any implementation of `mkdir' that recognizes `-p'.
7037 # Some implementations (such as Solaris 8's) are not thread-safe: if a
7038 # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7039 # concurrently, both version can detect that a/ is missing, but only
7040 # one can create it and the other will error out. Consequently we
7041 # restrict ourselves to GNU make (using the --version option ensures
7042 # this.)
7043 AC_DEFUN([AM_PROG_MKDIR_P],
7044 [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7045 # We used to keeping the `.' as first argument, in order to
7046 # allow $(mkdir_p) to be used without argument. As in
7047 # $(mkdir_p) $(somedir)
7048 # where $(somedir) is conditionally defined. However this is wrong
7049 # for two reasons:
7050 # 1. if the package is installed by a user who cannot write `.'
7051 # make install will fail,
7052 # 2. the above comment should most certainly read
7053 # $(mkdir_p) $(DESTDIR)$(somedir)
7054 # so it does not work when $(somedir) is undefined and
7055 # $(DESTDIR) is not.
7056 # To support the latter case, we have to write
7057 # test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7058 # so the `.' trick is pointless.
7059 mkdir_p='mkdir -p --'
7060 else
7061 # On NextStep and OpenStep, the `mkdir' command does not
7062 # recognize any option. It will interpret all options as
7063 # directories to create, and then abort because `.' already
7064 # exists.
7065 for d in ./-p ./--version;
7066 do
7067 test -d $d && rmdir $d
7068 done
7069 # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7070 if test -f "$ac_aux_dir/mkinstalldirs"; then
7071 mkdir_p='$(mkinstalldirs)'
7072 else
7073 mkdir_p='$(install_sh) -d'
7074 fi
7075 fi
7076 AC_SUBST([mkdir_p])])
7077
7078 # Helper functions for option handling. -*- Autoconf -*-
7079
7080 # Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
7081 #
7082 # This file is free software; the Free Software Foundation
7083 # gives unlimited permission to copy and/or distribute it,
7084 # with or without modifications, as long as this notice is preserved.
7085
7086 # serial 3
7087
7088 # _AM_MANGLE_OPTION(NAME)
7089 # -----------------------
7090 AC_DEFUN([_AM_MANGLE_OPTION],
7091 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7092
7093 # _AM_SET_OPTION(NAME)
7094 # ------------------------------
7095 # Set option NAME. Presently that only means defining a flag for this option.
7096 AC_DEFUN([_AM_SET_OPTION],
7097 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7098
7099 # _AM_SET_OPTIONS(OPTIONS)
7100 # ----------------------------------
7101 # OPTIONS is a space-separated list of Automake options.
7102 AC_DEFUN([_AM_SET_OPTIONS],
7103 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7104
7105 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7106 # -------------------------------------------
7107 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7108 AC_DEFUN([_AM_IF_OPTION],
7109 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7110
7111 # Check to make sure that the build environment is sane. -*- Autoconf -*-
7112
7113 # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7114 # Free Software Foundation, Inc.
7115 #
7116 # This file is free software; the Free Software Foundation
7117 # gives unlimited permission to copy and/or distribute it,
7118 # with or without modifications, as long as this notice is preserved.
7119
7120 # serial 4
7121
7122 # AM_SANITY_CHECK
7123 # ---------------
7124 AC_DEFUN([AM_SANITY_CHECK],
7125 [AC_MSG_CHECKING([whether build environment is sane])
7126 # Just in case
7127 sleep 1
7128 echo timestamp > conftest.file
7129 # Do `set' in a subshell so we don't clobber the current shell's
7130 # arguments. Must try -L first in case configure is actually a
7131 # symlink; some systems play weird games with the mod time of symlinks
7132 # (eg FreeBSD returns the mod time of the symlink's containing
7133 # directory).
7134 if (
7135 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7136 if test "$[*]" = "X"; then
7137 # -L didn't work.
7138 set X `ls -t $srcdir/configure conftest.file`
7139 fi
7140 rm -f conftest.file
7141 if test "$[*]" != "X $srcdir/configure conftest.file" \
7142 && test "$[*]" != "X conftest.file $srcdir/configure"; then
7143
7144 # If neither matched, then we have a broken ls. This can happen
7145 # if, for instance, CONFIG_SHELL is bash and it inherits a
7146 # broken ls alias from the environment. This has actually
7147 # happened. Such a system could not be considered "sane".
7148 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
7149 alias in your environment])
7150 fi
7151
7152 test "$[2]" = conftest.file
7153 )
7154 then
7155 # Ok.
7156 :
7157 else
7158 AC_MSG_ERROR([newly created file is older than distributed files!
7159 Check your system clock])
7160 fi
7161 AC_MSG_RESULT(yes)])
7162
7163 # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
7164 #
7165 # This file is free software; the Free Software Foundation
7166 # gives unlimited permission to copy and/or distribute it,
7167 # with or without modifications, as long as this notice is preserved.
7168
7169 # AM_PROG_INSTALL_STRIP
7170 # ---------------------
7171 # One issue with vendor `install' (even GNU) is that you can't
7172 # specify the program used to strip binaries. This is especially
7173 # annoying in cross-compiling environments, where the build's strip
7174 # is unlikely to handle the host's binaries.
7175 # Fortunately install-sh will honor a STRIPPROG variable, so we
7176 # always use install-sh in `make install-strip', and initialize
7177 # STRIPPROG with the value of the STRIP variable (set by the user).
7178 AC_DEFUN([AM_PROG_INSTALL_STRIP],
7179 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7180 # Installed binaries are usually stripped using `strip' when the user
7181 # run `make install-strip'. However `strip' might not be the right
7182 # tool to use in cross-compilation environments, therefore Automake
7183 # will honor the `STRIP' environment variable to overrule this program.
7184 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7185 if test "$cross_compiling" != no; then
7186 AC_CHECK_TOOL([STRIP], [strip], :)
7187 fi
7188 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7189 AC_SUBST([INSTALL_STRIP_PROGRAM])])
7190
7191 # Check how to create a tarball. -*- Autoconf -*-
7192
7193 # Copyright (C) 2004, 2005 Free Software Foundation, Inc.
7194 #
7195 # This file is free software; the Free Software Foundation
7196 # gives unlimited permission to copy and/or distribute it,
7197 # with or without modifications, as long as this notice is preserved.
7198
7199 # serial 2
7200
7201 # _AM_PROG_TAR(FORMAT)
7202 # --------------------
7203 # Check how to create a tarball in format FORMAT.
7204 # FORMAT should be one of `v7', `ustar', or `pax'.
7205 #
7206 # Substitute a variable $(am__tar) that is a command
7207 # writing to stdout a FORMAT-tarball containing the directory
7208 # $tardir.
7209 # tardir=directory && $(am__tar) > result.tar
7210 #
7211 # Substitute a variable $(am__untar) that extract such
7212 # a tarball read from stdin.
7213 # $(am__untar) < result.tar
7214 AC_DEFUN([_AM_PROG_TAR],
7215 [# Always define AMTAR for backward compatibility.
7216 AM_MISSING_PROG([AMTAR], [tar])
7217 m4_if([$1], [v7],
7218 [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7219 [m4_case([$1], [ustar],, [pax],,
7220 [m4_fatal([Unknown tar format])])
7221 AC_MSG_CHECKING([how to create a $1 tar archive])
7222 # Loop over all known methods to create a tar archive until one works.
7223 _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7224 _am_tools=${am_cv_prog_tar_$1-$_am_tools}
7225 # Do not fold the above two line into one, because Tru64 sh and
7226 # Solaris sh will not grok spaces in the rhs of `-'.
7227 for _am_tool in $_am_tools
7228 do
7229 case $_am_tool in
7230 gnutar)
7231 for _am_tar in tar gnutar gtar;
7232 do
7233 AM_RUN_LOG([$_am_tar --version]) && break
7234 done
7235 am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7236 am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7237 am__untar="$_am_tar -xf -"
7238 ;;
7239 plaintar)
7240 # Must skip GNU tar: if it does not support --format= it doesn't create
7241 # ustar tarball either.
7242 (tar --version) >/dev/null 2>&1 && continue
7243 am__tar='tar chf - "$$tardir"'
7244 am__tar_='tar chf - "$tardir"'
7245 am__untar='tar xf -'
7246 ;;
7247 pax)
7248 am__tar='pax -L -x $1 -w "$$tardir"'
7249 am__tar_='pax -L -x $1 -w "$tardir"'
7250 am__untar='pax -r'
7251 ;;
7252 cpio)
7253 am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7254 am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7255 am__untar='cpio -i -H $1 -d'
7256 ;;
7257 none)
7258 am__tar=false
7259 am__tar_=false
7260 am__untar=false
7261 ;;
7262 esac
7263
7264 # If the value was cached, stop now. We just wanted to have am__tar
7265 # and am__untar set.
7266 test -n "${am_cv_prog_tar_$1}" && break
7267
7268 # tar/untar a dummy directory, and stop if the command works
7269 rm -rf conftest.dir
7270 mkdir conftest.dir
7271 echo GrepMe > conftest.dir/file
7272 AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7273 rm -rf conftest.dir
7274 if test -s conftest.tar; then
7275 AM_RUN_LOG([$am__untar <conftest.tar])
7276 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7277 fi
7278 done
7279 rm -rf conftest.dir
7280
7281 AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7282 AC_MSG_RESULT([$am_cv_prog_tar_$1])])
7283 AC_SUBST([am__tar])
7284 AC_SUBST([am__untar])
7285 ]) # _AM_PROG_TAR
7286