llvm.org GIT mirror llvm / 607b1ea
Adding autoconf support for the sample project. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9148 91177308-0d34-0410-b5e6-96231b3b80d8 John Criswell 15 years ago
7 changed file(s) with 15751 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
0 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
2 ## Free Software Foundation, Inc.
3 ## Originally by Gordon Matzigkeit , 1996
4 ##
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
9 ##
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
14 ##
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18 ##
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
23
24 # serial 47 AC_PROG_LIBTOOL
25
26
27 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28 # -----------------------------------------------------------
29 # If this macro is not defined by Autoconf, define it here.
30 m4_ifdef([AC_PROVIDE_IFELSE],
31 [],
32 [m4_define([AC_PROVIDE_IFELSE],
33 [m4_ifdef([AC_PROVIDE_$1],
34 [$2], [$3])])])
35
36
37 # AC_PROG_LIBTOOL
38 # ---------------
39 AC_DEFUN([AC_PROG_LIBTOOL],
40 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43 AC_PROVIDE_IFELSE([AC_PROG_CXX],
44 [AC_LIBTOOL_CXX],
45 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46 ])])
47 dnl And a similar setup for Fortran 77 support
48 AC_PROVIDE_IFELSE([AC_PROG_F77],
49 [AC_LIBTOOL_F77],
50 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51 ])])
52
53 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57 [AC_LIBTOOL_GCJ],
58 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59 [AC_LIBTOOL_GCJ],
60 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61 [AC_LIBTOOL_GCJ],
62 [ifdef([AC_PROG_GCJ],
63 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64 ifdef([A][M_PROG_GCJ],
65 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66 ifdef([LT_AC_PROG_GCJ],
67 [define([LT_AC_PROG_GCJ],
68 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69 ])])# AC_PROG_LIBTOOL
70
71
72 # _AC_PROG_LIBTOOL
73 # ----------------
74 AC_DEFUN([_AC_PROG_LIBTOOL],
75 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79
80 # This can be used to rebuild libtool when needed
81 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82
83 # Always use our own libtool.
84 LIBTOOL='$(SHELL) $(top_builddir)/mklib'
85 AC_SUBST(LIBTOOL)dnl
86
87 # Prevent multiple expansion
88 define([AC_PROG_LIBTOOL], [])
89 ])# _AC_PROG_LIBTOOL
90
91
92 # AC_LIBTOOL_SETUP
93 # ----------------
94 AC_DEFUN([AC_LIBTOOL_SETUP],
95 [AC_PREREQ(2.50)dnl
96 AC_REQUIRE([AC_ENABLE_SHARED])dnl
97 AC_REQUIRE([AC_ENABLE_STATIC])dnl
98 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99 AC_REQUIRE([AC_CANONICAL_HOST])dnl
100 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
101 AC_REQUIRE([AC_PROG_CC])dnl
102 AC_REQUIRE([AC_PROG_LD])dnl
103 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104 AC_REQUIRE([AC_PROG_NM])dnl
105
106 AC_REQUIRE([AC_PROG_LN_S])dnl
107 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109 AC_REQUIRE([AC_OBJEXT])dnl
110 AC_REQUIRE([AC_EXEEXT])dnl
111 dnl
112
113 AC_LIBTOOL_SYS_MAX_CMD_LEN
114 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
115 AC_LIBTOOL_OBJDIR
116
117 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
118 _LT_AC_PROG_ECHO_BACKSLASH
119
120 case $host_os in
121 aix3*)
122 # AIX sometimes has problems with the GCC collect2 program. For some
123 # reason, if we set the COLLECT_NAMES environment variable, the problems
124 # vanish in a puff of smoke.
125 if test "X${COLLECT_NAMES+set}" != Xset; then
126 COLLECT_NAMES=
127 export COLLECT_NAMES
128 fi
129 ;;
130 esac
131
132 # Sed substitution that helps us do robust quoting. It backslashifies
133 # metacharacters that are still active within double-quoted strings.
134 Xsed='sed -e s/^X//'
135 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
136
137 # Same as above, but do not quote variable references.
138 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
139
140 # Sed substitution to delay expansion of an escaped shell variable in a
141 # double_quote_subst'ed string.
142 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
143
144 # Sed substitution to avoid accidental globbing in evaled expressions
145 no_glob_subst='s/\*/\\\*/g'
146
147 # Constants:
148 rm="rm -f"
149
150 # Global variables:
151 default_ofile=mklib
152 can_build_shared=yes
153
154 # All known linkers require a `.a' archive for static linking (except M$VC,
155 # which needs '.lib').
156 libext=a
157 ltmain="$ac_aux_dir/ltmain.sh"
158 ofile="$default_ofile"
159 with_gnu_ld="$lt_cv_prog_gnu_ld"
160
161 AC_CHECK_TOOL(AR, ar, false)
162 AC_CHECK_TOOL(RANLIB, ranlib, :)
163 AC_CHECK_TOOL(STRIP, strip, :)
164
165 old_CC="$CC"
166 old_CFLAGS="$CFLAGS"
167
168 # Set sane defaults for various variables
169 test -z "$AR" && AR=ar
170 test -z "$AR_FLAGS" && AR_FLAGS=cru
171 test -z "$AS" && AS=as
172 test -z "$CC" && CC=cc
173 test -z "$LTCC" && LTCC=$CC
174 test -z "$DLLTOOL" && DLLTOOL=dlltool
175 test -z "$LD" && LD=ld
176 test -z "$LN_S" && LN_S="ln -s"
177 test -z "$MAGIC_CMD" && MAGIC_CMD=file
178 test -z "$NM" && NM=nm
179 test -z "$SED" && SED=sed
180 test -z "$OBJDUMP" && OBJDUMP=objdump
181 test -z "$RANLIB" && RANLIB=:
182 test -z "$STRIP" && STRIP=:
183 test -z "$ac_objext" && ac_objext=o
184
185 # Determine commands to create old-style static archives.
186 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
187 old_postinstall_cmds='chmod 644 $oldlib'
188 old_postuninstall_cmds=
189
190 if test -n "$RANLIB"; then
191 case $host_os in
192 openbsd*)
193 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
194 ;;
195 *)
196 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
197 ;;
198 esac
199 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
200 fi
201
202 # Only perform the check for file, if the check method requires it
203 case $deplibs_check_method in
204 file_magic*)
205 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
206 AC_PATH_MAGIC
207 fi
208 ;;
209 esac
210
211 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
212 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
213 enable_win32_dll=yes, enable_win32_dll=no)
214
215 AC_ARG_ENABLE([libtool-lock],
216 [AC_HELP_STRING([--disable-libtool-lock],
217 [avoid locking (might break parallel builds)])])
218 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
219
220 AC_ARG_WITH([pic],
221 [AC_HELP_STRING([--with-pic],
222 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
223 [pic_mode="$withval"],
224 [pic_mode=default])
225 test -z "$pic_mode" && pic_mode=default
226
227 # Use C for the default configuration in the libtool script
228 tagname=
229 AC_LIBTOOL_LANG_C_CONFIG
230 _LT_AC_TAGCONFIG
231 ])# AC_LIBTOOL_SETUP
232
233
234 # _LT_AC_SYS_COMPILER
235 # -------------------
236 AC_DEFUN([_LT_AC_SYS_COMPILER],
237 [AC_REQUIRE([AC_PROG_CC])dnl
238
239 # If no C compiler was specified, use CC.
240 LTCC=${LTCC-"$CC"}
241
242 # Allow CC to be a program name with arguments.
243 compiler=$CC
244 ])# _LT_AC_SYS_COMPILER
245
246
247 # _LT_AC_SYS_LIBPATH_AIX
248 # ----------------------
249 # Links a minimal program and checks the executable
250 # for the system default hardcoded library path. In most cases,
251 # this is /usr/lib:/lib, but when the MPI compilers are used
252 # the location of the communication and MPI libs are included too.
253 # If we don't find anything, use the default library path according
254 # to the aix ld manual.
255 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
256 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
257 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
258 }'`
259 # Check for a 64-bit object if we didn't find anything.
260 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; }
261 }'`; fi],[])
262 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
263 ])# _LT_AC_SYS_LIBPATH_AIX
264
265
266 # _LT_AC_SHELL_INIT(ARG)
267 # ----------------------
268 AC_DEFUN([_LT_AC_SHELL_INIT],
269 [ifdef([AC_DIVERSION_NOTICE],
270 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
271 [AC_DIVERT_PUSH(NOTICE)])
272 $1
273 AC_DIVERT_POP
274 ])# _LT_AC_SHELL_INIT
275
276
277 # _LT_AC_PROG_ECHO_BACKSLASH
278 # --------------------------
279 # Add some code to the start of the generated configure script which
280 # will find an echo command which doesn't interpret backslashes.
281 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
282 [_LT_AC_SHELL_INIT([
283 # Check that we are running under the correct shell.
284 SHELL=${CONFIG_SHELL-/bin/sh}
285
286 case X$ECHO in
287 X*--fallback-echo)
288 # Remove one level of quotation (which was required for Make).
289 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
290 ;;
291 esac
292
293 echo=${ECHO-echo}
294 if test "X[$]1" = X--no-reexec; then
295 # Discard the --no-reexec flag, and continue.
296 shift
297 elif test "X[$]1" = X--fallback-echo; then
298 # Avoid inline document here, it may be left over
299 :
300 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
301 # Yippee, $echo works!
302 :
303 else
304 # Restart under the correct shell.
305 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
306 fi
307
308 if test "X[$]1" = X--fallback-echo; then
309 # used as fallback echo
310 shift
311 cat <
312 [$]*
313 EOF
314 exit 0
315 fi
316
317 # The HP-UX ksh and POSIX shell print the target directory to stdout
318 # if CDPATH is set.
319 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
320
321 if test -z "$ECHO"; then
322 if test "X${echo_test_string+set}" != Xset; then
323 # find a string as large as possible, as long as the shell can cope with it
324 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
325 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
326 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
327 echo_test_string="`eval $cmd`" &&
328 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
329 then
330 break
331 fi
332 done
333 fi
334
335 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
336 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
337 test "X$echo_testing_string" = "X$echo_test_string"; then
338 :
339 else
340 # The Solaris, AIX, and Digital Unix default echo programs unquote
341 # backslashes. This makes it impossible to quote backslashes using
342 # echo "$something" | sed 's/\\/\\\\/g'
343 #
344 # So, first we look for a working echo in the user's PATH.
345
346 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
347 for dir in $PATH /usr/ucb; do
348 IFS="$lt_save_ifs"
349 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
350 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
351 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
352 test "X$echo_testing_string" = "X$echo_test_string"; then
353 echo="$dir/echo"
354 break
355 fi
356 done
357 IFS="$lt_save_ifs"
358
359 if test "X$echo" = Xecho; then
360 # We didn't find a better echo, so look for alternatives.
361 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
362 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
363 test "X$echo_testing_string" = "X$echo_test_string"; then
364 # This shell has a builtin print -r that does the trick.
365 echo='print -r'
366 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
367 test "X$CONFIG_SHELL" != X/bin/ksh; then
368 # If we have ksh, try running configure again with it.
369 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
370 export ORIGINAL_CONFIG_SHELL
371 CONFIG_SHELL=/bin/ksh
372 export CONFIG_SHELL
373 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
374 else
375 # Try using printf.
376 echo='printf %s\n'
377 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
378 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
379 test "X$echo_testing_string" = "X$echo_test_string"; then
380 # Cool, printf works
381 :
382 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
383 test "X$echo_testing_string" = 'X\t' &&
384 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
385 test "X$echo_testing_string" = "X$echo_test_string"; then
386 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
387 export CONFIG_SHELL
388 SHELL="$CONFIG_SHELL"
389 export SHELL
390 echo="$CONFIG_SHELL [$]0 --fallback-echo"
391 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
392 test "X$echo_testing_string" = 'X\t' &&
393 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
394 test "X$echo_testing_string" = "X$echo_test_string"; then
395 echo="$CONFIG_SHELL [$]0 --fallback-echo"
396 else
397 # maybe with a smaller string...
398 prev=:
399
400 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
401 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
402 then
403 break
404 fi
405 prev="$cmd"
406 done
407
408 if test "$prev" != 'sed 50q "[$]0"'; then
409 echo_test_string=`eval $prev`
410 export echo_test_string
411 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
412 else
413 # Oops. We lost completely, so just stick with echo.
414 echo=echo
415 fi
416 fi
417 fi
418 fi
419 fi
420 fi
421
422 # Copy echo and quote the copy suitably for passing to libtool from
423 # the Makefile, instead of quoting the original, which is used later.
424 ECHO=$echo
425 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
426 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
427 fi
428
429 AC_SUBST(ECHO)
430 ])])# _LT_AC_PROG_ECHO_BACKSLASH
431
432
433 # _LT_AC_LOCK
434 # -----------
435 AC_DEFUN([_LT_AC_LOCK],
436 [AC_ARG_ENABLE([libtool-lock],
437 [AC_HELP_STRING([--disable-libtool-lock],
438 [avoid locking (might break parallel builds)])])
439 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
440
441 # Some flags need to be propagated to the compiler or linker for good
442 # libtool support.
443 case $host in
444 ia64-*-hpux*)
445 # Find out which ABI we are using.
446 echo 'int i;' > conftest.$ac_ext
447 if AC_TRY_EVAL(ac_compile); then
448 case `/usr/bin/file conftest.$ac_objext` in
449 *ELF-32*)
450 HPUX_IA64_MODE="32"
451 ;;
452 *ELF-64*)
453 HPUX_IA64_MODE="64"
454 ;;
455 esac
456 fi
457 rm -rf conftest*
458 ;;
459 *-*-irix6*)
460 # Find out which ABI we are using.
461 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
462 if AC_TRY_EVAL(ac_compile); then
463 if test "$lt_cv_prog_gnu_ld" = yes; then
464 case `/usr/bin/file conftest.$ac_objext` in
465 *32-bit*)
466 LD="${LD-ld} -melf32bsmip"
467 ;;
468 *N32*)
469 LD="${LD-ld} -melf32bmipn32"
470 ;;
471 *64-bit*)
472 LD="${LD-ld} -melf64bmip"
473 ;;
474 esac
475 else
476 case `/usr/bin/file conftest.$ac_objext` in
477 *32-bit*)
478 LD="${LD-ld} -32"
479 ;;
480 *N32*)
481 LD="${LD-ld} -n32"
482 ;;
483 *64-bit*)
484 LD="${LD-ld} -64"
485 ;;
486 esac
487 fi
488 fi
489 rm -rf conftest*
490 ;;
491
492 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
493 # Find out which ABI we are using.
494 echo 'int i;' > conftest.$ac_ext
495 if AC_TRY_EVAL(ac_compile); then
496 case "`/usr/bin/file conftest.o`" in
497 *32-bit*)
498 case $host in
499 x86_64-*linux*)
500 LD="${LD-ld} -m elf_i386"
501 ;;
502 ppc64-*linux*)
503 LD="${LD-ld} -m elf32ppclinux"
504 ;;
505 s390x-*linux*)
506 LD="${LD-ld} -m elf_s390"
507 ;;
508 sparc64-*linux*)
509 LD="${LD-ld} -m elf32_sparc"
510 ;;
511 esac
512 ;;
513 *64-bit*)
514 case $host in
515 x86_64-*linux*)
516 LD="${LD-ld} -m elf_x86_64"
517 ;;
518 ppc*-*linux*|powerpc*-*linux*)
519 LD="${LD-ld} -m elf64ppc"
520 ;;
521 s390*-*linux*)
522 LD="${LD-ld} -m elf64_s390"
523 ;;
524 sparc*-*linux*)
525 LD="${LD-ld} -m elf64_sparc"
526 ;;
527 esac
528 ;;
529 esac
530 fi
531 rm -rf conftest*
532 ;;
533
534 *-*-sco3.2v5*)
535 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
536 SAVE_CFLAGS="$CFLAGS"
537 CFLAGS="$CFLAGS -belf"
538 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
539 [AC_LANG_PUSH(C)
540 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
541 AC_LANG_POP])
542 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
543 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
544 CFLAGS="$SAVE_CFLAGS"
545 fi
546 ;;
547 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
548 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
549 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
550 AC_CHECK_TOOL(AS, as, false)
551 AC_CHECK_TOOL(OBJDUMP, objdump, false)
552 ;;
553 ])
554 esac
555
556 need_locks="$enable_libtool_lock"
557
558 ])# _LT_AC_LOCK
559
560
561 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
562 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
563 # ----------------------------------------------------------------
564 # Check whether the given compiler option works
565 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
566 [AC_CACHE_CHECK([$1], [$2],
567 [$2=no
568 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
569 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
570 lt_compiler_flag="$3"
571 # Insert the option either (1) after the last *FLAGS variable, or
572 # (2) before a word containing "conftest.", or (3) at the end.
573 # Note that $ac_compile itself does not contain backslashes and begins
574 # with a dollar sign (not a hyphen), so the echo should work correctly.
575 # The option is referenced via a variable to avoid confusing sed.
576 lt_compile=`echo "$ac_compile" | $SED \
577 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
578 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
579 -e 's:$: $lt_compiler_flag:'`
580 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
581 (eval "$lt_compile" 2>conftest.err)
582 ac_status=$?
583 cat conftest.err >&AS_MESSAGE_LOG_FD
584 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
585 if (exit $ac_status) && test -s "$ac_outfile"; then
586 # The compiler can only warn and ignore the option if not recognized
587 # So say no if there are warnings
588 if test ! -s conftest.err; then
589 $2=yes
590 fi
591 fi
592 $rm conftest*
593 ])
594
595 if test x"[$]$2" = xyes; then
596 ifelse([$5], , :, [$5])
597 else
598 ifelse([$6], , :, [$6])
599 fi
600 ])# AC_LIBTOOL_COMPILER_OPTION
601
602
603 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
604 # [ACTION-SUCCESS], [ACTION-FAILURE])
605 # ------------------------------------------------------------
606 # Check whether the given compiler option works
607 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
608 [AC_CACHE_CHECK([$1], [$2],
609 [$2=no
610 save_LDFLAGS="$LDFLAGS"
611 LDFLAGS="$LDFLAGS $3"
612 printf "$lt_simple_link_test_code" > conftest.$ac_ext
613 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
614 # The compiler can only warn and ignore the option if not recognized
615 # So say no if there are warnings
616 if test -s conftest.err; then
617 # Append any errors to the config.log.
618 cat conftest.err 1>&AS_MESSAGE_LOG_FD
619 else
620 $2=yes
621 fi
622 fi
623 $rm conftest*
624 LDFLAGS="$save_LDFLAGS"
625 ])
626
627 if test x"[$]$2" = xyes; then
628 ifelse([$4], , :, [$4])
629 else
630 ifelse([$5], , :, [$5])
631 fi
632 ])# AC_LIBTOOL_LINKER_OPTION
633
634
635 # AC_LIBTOOL_SYS_MAX_CMD_LEN
636 # --------------------------
637 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
638 [# find the maximum length of command line arguments
639 AC_MSG_CHECKING([the maximum length of command line arguments])
640 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
641 i=0
642 testring="ABCD"
643
644 case $build_os in
645 msdosdjgpp*)
646 # On DJGPP, this test can blow up pretty badly due to problems in libc
647 # (any single argument exceeding 2000 bytes causes a buffer overrun
648 # during glob expansion). Even if it were fixed, the result of this
649 # check would be larger than it should be.
650 lt_cv_sys_max_cmd_len=12288; # 12K is about right
651 ;;
652
653 gnu*)
654 # Under GNU Hurd, this test is not required because there is
655 # no limit to the length of command line arguments.
656 # Libtool will interpret -1 as no limit whatsoever
657 lt_cv_sys_max_cmd_len=-1;
658 ;;
659
660 cygwin* | mingw*)
661 # On Win9x/ME, this test blows up -- it succeeds, but takes
662 # about 5 minutes as the teststring grows exponentially.
663 # Worse, since 9x/ME are not pre-emptively multitasking,
664 # you end up with a "frozen" computer, even though with patience
665 # the test eventually succeeds (with a max line length of 256k).
666 # Instead, let's just punt: use the minimum linelength reported by
667 # all of the supported platforms: 8192 (on NT/2K/XP).
668 lt_cv_sys_max_cmd_len=8192;
669 ;;
670
671 *)
672 # If test is not a shell built-in, we'll probably end up computing a
673 # maximum length that is only half of the actual maximum length, but
674 # we can't tell.
675 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
676 = "XX$testring") >/dev/null 2>&1 &&
677 new_result=`expr "X$testring" : ".*" 2>&1` &&
678 lt_cv_sys_max_cmd_len=$new_result &&
679 test $i != 17 # 1/2 MB should be enough
680 do
681 i=`expr $i + 1`
682 testring=$testring$testring
683 done
684 testring=
685 # Add a significant safety factor because C++ compilers can tack on massive
686 # amounts of additional arguments before passing them to the linker.
687 # It appears as though 1/2 is a usable value.
688 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
689 ;;
690 esac
691 ])
692 if test -n $lt_cv_sys_max_cmd_len ; then
693 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
694 else
695 AC_MSG_RESULT(none)
696 fi
697 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
698
699
700 # _LT_AC_CHECK_DLFCN
701 # --------------------
702 AC_DEFUN([_LT_AC_CHECK_DLFCN],
703 [AC_CHECK_HEADERS(dlfcn.h)dnl
704 ])# _LT_AC_CHECK_DLFCN
705
706
707 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
708 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
709 # ------------------------------------------------------------------
710 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
711 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
712 if test "$cross_compiling" = yes; then :
713 [$4]
714 else
715 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
716 lt_status=$lt_dlunknown
717 cat > conftest.$ac_ext <
718 [#line __oline__ "configure"
719 #include "confdefs.h"
720
721 #if HAVE_DLFCN_H
722 #include
723 #endif
724
725 #include
726
727 #ifdef RTLD_GLOBAL
728 # define LT_DLGLOBAL RTLD_GLOBAL
729 #else
730 # ifdef DL_GLOBAL
731 # define LT_DLGLOBAL DL_GLOBAL
732 # else
733 # define LT_DLGLOBAL 0
734 # endif
735 #endif
736
737 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
738 find out it does not work in some platform. */
739 #ifndef LT_DLLAZY_OR_NOW
740 # ifdef RTLD_LAZY
741 # define LT_DLLAZY_OR_NOW RTLD_LAZY
742 # else
743 # ifdef DL_LAZY
744 # define LT_DLLAZY_OR_NOW DL_LAZY
745 # else
746 # ifdef RTLD_NOW
747 # define LT_DLLAZY_OR_NOW RTLD_NOW
748 # else
749 # ifdef DL_NOW
750 # define LT_DLLAZY_OR_NOW DL_NOW
751 # else
752 # define LT_DLLAZY_OR_NOW 0
753 # endif
754 # endif
755 # endif
756 # endif
757 #endif
758
759 #ifdef __cplusplus
760 extern "C" void exit (int);
761 #endif
762
763 void fnord() { int i=42;}
764 int main ()
765 {
766 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
767 int status = $lt_dlunknown;
768
769 if (self)
770 {
771 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
772 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
773 /* dlclose (self); */
774 }
775
776 exit (status);
777 }]
778 EOF
779 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
780 (./conftest; exit; ) 2>/dev/null
781 lt_status=$?
782 case x$lt_status in
783 x$lt_dlno_uscore) $1 ;;
784 x$lt_dlneed_uscore) $2 ;;
785 x$lt_unknown|x*) $3 ;;
786 esac
787 else :
788 # compilation failed
789 $3
790 fi
791 fi
792 rm -fr conftest*
793 ])# _LT_AC_TRY_DLOPEN_SELF
794
795
796 # AC_LIBTOOL_DLOPEN_SELF
797 # -------------------
798 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
799 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
800 if test "x$enable_dlopen" != xyes; then
801 enable_dlopen=unknown
802 enable_dlopen_self=unknown
803 enable_dlopen_self_static=unknown
804 else
805 lt_cv_dlopen=no
806 lt_cv_dlopen_libs=
807
808 case $host_os in
809 beos*)
810 lt_cv_dlopen="load_add_on"
811 lt_cv_dlopen_libs=
812 lt_cv_dlopen_self=yes
813 ;;
814
815 mingw* | pw32*)
816 lt_cv_dlopen="LoadLibrary"
817 lt_cv_dlopen_libs=
818 ;;
819
820 cygwin*)
821 lt_cv_dlopen="dlopen"
822 lt_cv_dlopen_libs=
823 ;;
824
825 darwin*)
826 # if libdl is installed we need to link against it
827 AC_CHECK_LIB([dl], [dlopen],
828 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
829 lt_cv_dlopen="dyld"
830 lt_cv_dlopen_libs=
831 lt_cv_dlopen_self=yes
832 ])
833 ;;
834
835 *)
836 AC_CHECK_FUNC([shl_load],
837 [lt_cv_dlopen="shl_load"],
838 [AC_CHECK_LIB([dld], [shl_load],
839 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
840 [AC_CHECK_FUNC([dlopen],
841 [lt_cv_dlopen="dlopen"],
842 [AC_CHECK_LIB([dl], [dlopen],
843 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
844 [AC_CHECK_LIB([svld], [dlopen],
845 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
846 [AC_CHECK_LIB([dld], [dld_link],
847 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
848 ])
849 ])
850 ])
851 ])
852 ])
853 ;;
854 esac
855
856 if test "x$lt_cv_dlopen" != xno; then
857 enable_dlopen=yes
858 else
859 enable_dlopen=no
860 fi
861
862 case $lt_cv_dlopen in
863 dlopen)
864 save_CPPFLAGS="$CPPFLAGS"
865 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
866
867 save_LDFLAGS="$LDFLAGS"
868 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
869
870 save_LIBS="$LIBS"
871 LIBS="$lt_cv_dlopen_libs $LIBS"
872
873 AC_CACHE_CHECK([whether a program can dlopen itself],
874 lt_cv_dlopen_self, [dnl
875 _LT_AC_TRY_DLOPEN_SELF(
876 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
877 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
878 ])
879
880 if test "x$lt_cv_dlopen_self" = xyes; then
881 LDFLAGS="$LDFLAGS $link_static_flag"
882 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
883 lt_cv_dlopen_self_static, [dnl
884 _LT_AC_TRY_DLOPEN_SELF(
885 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
886 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
887 ])
888 fi
889
890 CPPFLAGS="$save_CPPFLAGS"
891 LDFLAGS="$save_LDFLAGS"
892 LIBS="$save_LIBS"
893 ;;
894 esac
895
896 case $lt_cv_dlopen_self in
897 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
898 *) enable_dlopen_self=unknown ;;
899 esac
900
901 case $lt_cv_dlopen_self_static in
902 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
903 *) enable_dlopen_self_static=unknown ;;
904 esac
905 fi
906 ])# AC_LIBTOOL_DLOPEN_SELF
907
908
909 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
910 # ---------------------------------
911 # Check to see if options -c and -o are simultaneously supported by compiler
912 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
913 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
914 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
915 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
916 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
917 $rm -r conftest 2>/dev/null
918 mkdir conftest
919 cd conftest
920 mkdir out
921 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
922
923 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
924 # that will create temporary files in the current directory regardless of
925 # the output directory. Thus, making CWD read-only will cause this test
926 # to fail, enabling locking or at least warning the user not to do parallel
927 # builds.
928 chmod -w .
929
930 lt_compiler_flag="-o out/conftest2.$ac_objext"
931 # Insert the option either (1) after the last *FLAGS variable, or
932 # (2) before a word containing "conftest.", or (3) at the end.
933 # Note that $ac_compile itself does not contain backslashes and begins
934 # with a dollar sign (not a hyphen), so the echo should work correctly.
935 lt_compile=`echo "$ac_compile" | $SED \
936 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
937 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
938 -e 's:$: $lt_compiler_flag:'`
939 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
940 (eval "$lt_compile" 2>out/conftest.err)
941 ac_status=$?
942 cat out/conftest.err >&AS_MESSAGE_LOG_FD
943 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
944 if (exit $ac_status) && test -s out/conftest2.$ac_objext
945 then
946 # The compiler can only warn and ignore the option if not recognized
947 # So say no if there are warnings
948 if test ! -s out/conftest.err; then
949 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
950 fi
951 fi
952 chmod u+w .
953 $rm conftest* out/*
954 rmdir out
955 cd ..
956 rmdir conftest
957 $rm conftest*
958 ])
959 ])# AC_LIBTOOL_PROG_CC_C_O
960
961
962 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
963 # -----------------------------------------
964 # Check to see if we can do hard links to lock some files if needed
965 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
966 [AC_REQUIRE([_LT_AC_LOCK])dnl
967
968 hard_links="nottested"
969 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
970 # do not overwrite the value of need_locks provided by the user
971 AC_MSG_CHECKING([if we can lock with hard links])
972 hard_links=yes
973 $rm conftest*
974 ln conftest.a conftest.b 2>/dev/null && hard_links=no
975 touch conftest.a
976 ln conftest.a conftest.b 2>&5 || hard_links=no
977 ln conftest.a conftest.b 2>/dev/null && hard_links=no
978 AC_MSG_RESULT([$hard_links])
979 if test "$hard_links" = no; then
980 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
981 need_locks=warn
982 fi
983 else
984 need_locks=no
985 fi
986 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
987
988
989 # AC_LIBTOOL_OBJDIR
990 # -----------------
991 AC_DEFUN([AC_LIBTOOL_OBJDIR],
992 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
993 [rm -f .libs 2>/dev/null
994 mkdir .libs 2>/dev/null
995 if test -d .libs; then
996 lt_cv_objdir=.libs
997 else
998 # MS-DOS does not allow filenames that begin with a dot.
999 lt_cv_objdir=_libs
1000 fi
1001 rmdir .libs 2>/dev/null])
1002 objdir=$lt_cv_objdir
1003 ])# AC_LIBTOOL_OBJDIR
1004
1005
1006 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1007 # ----------------------------------------------
1008 # Check hardcoding attributes.
1009 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1010 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1011 _LT_AC_TAGVAR(hardcode_action, $1)=
1012 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1013 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1014 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1015
1016 # We can hardcode non-existant directories.
1017 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1018 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1019 # have to relink, otherwise we might link with an installed library
1020 # when we should be linking with a yet-to-be-installed one
1021 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1022 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1023 # Linking always hardcodes the temporary library directory.
1024 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1025 else
1026 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1027 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1028 fi
1029 else
1030 # We cannot hardcode anything, or else we can only hardcode existing
1031 # directories.
1032 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1033 fi
1034 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1035
1036 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1037 # Fast installation is not supported
1038 enable_fast_install=no
1039 elif test "$shlibpath_overrides_runpath" = yes ||
1040 test "$enable_shared" = no; then
1041 # Fast installation is not necessary
1042 enable_fast_install=needless
1043 fi
1044 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1045
1046
1047 # AC_LIBTOOL_SYS_LIB_STRIP
1048 # ------------------------
1049 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1050 [striplib=
1051 old_striplib=
1052 AC_MSG_CHECKING([whether stripping libraries is possible])
1053 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1054 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1055 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1056 AC_MSG_RESULT([yes])
1057 else
1058 # FIXME - insert some real tests, host_os isn't really good enough
1059 case $host_os in
1060 darwin*)
1061 if test -n "$STRIP" ; then
1062 striplib="$STRIP -x"
1063 AC_MSG_RESULT([yes])
1064 else
1065 AC_MSG_RESULT([no])
1066 fi
1067 ;;
1068 *)
1069 AC_MSG_RESULT([no])
1070 ;;
1071 esac
1072 fi
1073 ])# AC_LIBTOOL_SYS_LIB_STRIP
1074
1075
1076 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1077 # -----------------------------
1078 # PORTME Fill in your ld.so characteristics
1079 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1080 [AC_MSG_CHECKING([dynamic linker characteristics])
1081 library_names_spec=
1082 libname_spec='lib$name'
1083 soname_spec=
1084 shrext=".so"
1085 postinstall_cmds=
1086 postuninstall_cmds=
1087 finish_cmds=
1088 finish_eval=
1089 shlibpath_var=
1090 shlibpath_overrides_runpath=unknown
1091 version_type=none
1092 dynamic_linker="$host_os ld.so"
1093 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1094 if test "$GCC" = yes; then
1095 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1096 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1097 # if the path contains ";" then we assume it to be the separator
1098 # otherwise default to the standard path separator (i.e. ":") - it is
1099 # assumed that no part of a normal pathname contains ";" but that should
1100 # okay in the real world where ";" in dirpaths is itself problematic.
1101 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1102 else
1103 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1104 fi
1105 else
1106 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1107 fi
1108 need_lib_prefix=unknown
1109 hardcode_into_libs=no
1110
1111 # when you set need_version to no, make sure it does not cause -set_version
1112 # flags to be left without arguments
1113 need_version=unknown
1114
1115 case $host_os in
1116 aix3*)
1117 version_type=linux
1118 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1119 shlibpath_var=LIBPATH
1120
1121 # AIX 3 has no versioning support, so we append a major version to the name.
1122 soname_spec='${libname}${release}${shared_ext}$major'
1123 ;;
1124
1125 aix4* | aix5*)
1126 version_type=linux
1127 need_lib_prefix=no
1128 need_version=no
1129 hardcode_into_libs=yes
1130 if test "$host_cpu" = ia64; then
1131 # AIX 5 supports IA64
1132 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1133 shlibpath_var=LD_LIBRARY_PATH
1134 else
1135 # With GCC up to 2.95.x, collect2 would create an import file
1136 # for dependence libraries. The import file would start with
1137 # the line `#! .'. This would cause the generated library to
1138 # depend on `.', always an invalid library. This was fixed in
1139 # development snapshots of GCC prior to 3.0.
1140 case $host_os in
1141 aix4 | aix4.[[01]] | aix4.[[01]].*)
1142 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1143 echo ' yes '
1144 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1145 :
1146 else
1147 can_build_shared=no
1148 fi
1149 ;;
1150 esac
1151 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1152 # soname into executable. Probably we can add versioning support to
1153 # collect2, so additional links can be useful in future.
1154 if test "$aix_use_runtimelinking" = yes; then
1155 # If using run time linking (on AIX 4.2 or later) use lib.so
1156 # instead of lib.a to let people know that these are not
1157 # typical AIX shared libraries.
1158 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1159 else
1160 # We preserve .a as extension for shared libraries through AIX4.2
1161 # and later when we are not doing run time linking.
1162 library_names_spec='${libname}${release}.a $libname.a'
1163 soname_spec='${libname}${release}${shared_ext}$major'
1164 fi
1165 shlibpath_var=LIBPATH
1166 fi
1167 ;;
1168
1169 amigaos*)
1170 library_names_spec='$libname.ixlibrary $libname.a'
1171 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1172 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'
1173 ;;
1174
1175 beos*)
1176 library_names_spec='${libname}${shared_ext}'
1177 dynamic_linker="$host_os ld.so"
1178 shlibpath_var=LIBRARY_PATH
1179 ;;
1180
1181 bsdi4*)
1182 version_type=linux
1183 need_version=no
1184 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1185 soname_spec='${libname}${release}${shared_ext}$major'
1186 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1187 shlibpath_var=LD_LIBRARY_PATH
1188 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1189 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1190 # the default ld.so.conf also contains /usr/contrib/lib and
1191 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1192 # libtool to hard-code these into programs
1193 ;;
1194
1195 cygwin* | mingw* | pw32*)
1196 version_type=windows
1197 shrext=".dll"
1198 need_version=no
1199 need_lib_prefix=no
1200
1201 case $GCC,$host_os in
1202 yes,cygwin* | yes,mingw* | yes,pw32*)
1203 library_names_spec='$libname.dll.a'
1204 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1205 postinstall_cmds='base_file=`basename \${file}`~
1206 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1207 dldir=$destdir/`dirname \$dlpath`~
1208 test -d \$dldir || mkdir -p \$dldir~
1209 $install_prog $dir/$dlname \$dldir/$dlname'
1210 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1211 dlpath=$dir/\$dldll~
1212 $rm \$dlpath'
1213 shlibpath_overrides_runpath=yes
1214
1215 case $host_os in
1216 cygwin*)
1217 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1218 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1219 sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
1220 ;;
1221 mingw*)
1222 # MinGW DLLs use traditional 'lib' prefix
1223 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1224 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1225 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1226 # It is most probably a Windows format PATH printed by
1227 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1228 # path with ; separators, and with drive letters. We can handle the
1229 # drive letters (cygwin fileutils understands them), so leave them,
1230 # especially as we might pass files found there to a mingw objdump,
1231 # which wouldn't understand a cygwinified path. Ahh.
1232 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1233 else
1234 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1235 fi
1236 ;;
1237 pw32*)
1238 # pw32 DLLs use 'pw' prefix rather than 'lib'
1239 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1240 ;;
1241 esac
1242 ;;
1243
1244 *)
1245 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1246 ;;
1247 esac
1248 dynamic_linker='Win32 ld.exe'
1249 # FIXME: first we should search . and the directory the executable is in
1250 shlibpath_var=PATH
1251 ;;
1252
1253 darwin* | rhapsody*)
1254 dynamic_linker="$host_os dyld"
1255 version_type=darwin
1256 need_lib_prefix=no
1257 need_version=no
1258 # FIXME: Relying on posixy $() will cause problems for
1259 # cross-compilation, but unfortunately the echo tests do not
1260 # yet detect zsh echo's removal of \ escapes.
1261 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1262 soname_spec='${libname}${release}${major}$shared_ext'
1263 shlibpath_overrides_runpath=yes
1264 shlibpath_var=DYLD_LIBRARY_PATH
1265 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1266 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1267 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1268 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"`
1269 fi
1270 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1271 ;;
1272
1273 dgux*)
1274 version_type=linux
1275 need_lib_prefix=no
1276 need_version=no
1277 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1278 soname_spec='${libname}${release}${shared_ext}$major'
1279 shlibpath_var=LD_LIBRARY_PATH
1280 ;;
1281
1282 freebsd1*)
1283 dynamic_linker=no
1284 ;;
1285
1286 freebsd*)
1287 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1288 version_type=freebsd-$objformat
1289 case $version_type in
1290 freebsd-elf*)
1291 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1292 need_version=no
1293 need_lib_prefix=no
1294 ;;
1295 freebsd-*)
1296 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1297 need_version=yes
1298 ;;
1299 esac
1300 shlibpath_var=LD_LIBRARY_PATH
1301 case $host_os in
1302 freebsd2*)
1303 shlibpath_overrides_runpath=yes
1304 ;;
1305 freebsd3.[01]* | freebsdelf3.[01]*)
1306 shlibpath_overrides_runpath=yes
1307 hardcode_into_libs=yes
1308 ;;
1309 *) # from 3.2 on
1310 shlibpath_overrides_runpath=no
1311 hardcode_into_libs=yes
1312 ;;
1313 esac
1314 ;;
1315
1316 gnu*)
1317 version_type=linux
1318 need_lib_prefix=no
1319 need_version=no
1320 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1321 soname_spec='${libname}${release}${shared_ext}$major'
1322 shlibpath_var=LD_LIBRARY_PATH
1323 hardcode_into_libs=yes
1324 ;;
1325
1326 hpux9* | hpux10* | hpux11*)
1327 # Give a soname corresponding to the major version so that dld.sl refuses to
1328 # link against other versions.
1329 version_type=sunos
1330 need_lib_prefix=no
1331 need_version=no
1332 case "$host_cpu" in
1333 ia64*)
1334 shrext='.so'
1335 hardcode_into_libs=yes
1336 dynamic_linker="$host_os dld.so"
1337 shlibpath_var=LD_LIBRARY_PATH
1338 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1339 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1340 soname_spec='${libname}${release}${shared_ext}$major'
1341 if test "X$HPUX_IA64_MODE" = X32; then
1342 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1343 else
1344 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1345 fi
1346 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1347 ;;
1348 hppa*64*)
1349 shrext='.sl'
1350 hardcode_into_libs=yes
1351 dynamic_linker="$host_os dld.sl"
1352 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1353 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1354 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1355 soname_spec='${libname}${release}${shared_ext}$major'
1356 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1357 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1358 ;;
1359 *)
1360 shrext='.sl'
1361 dynamic_linker="$host_os dld.sl"
1362 shlibpath_var=SHLIB_PATH
1363 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1364 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1365 soname_spec='${libname}${release}${shared_ext}$major'
1366 ;;
1367 esac
1368 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1369 postinstall_cmds='chmod 555 $lib'
1370 ;;
1371
1372 irix5* | irix6* | nonstopux*)
1373 case $host_os in
1374 nonstopux*) version_type=nonstopux ;;
1375 *)
1376 if test "$lt_cv_prog_gnu_ld" = yes; then
1377 version_type=linux
1378 else
1379 version_type=irix
1380 fi ;;
1381 esac
1382 need_lib_prefix=no
1383 need_version=no
1384 soname_spec='${libname}${release}${shared_ext}$major'
1385 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1386 case $host_os in
1387 irix5* | nonstopux*)
1388 libsuff= shlibsuff=
1389 ;;
1390 *)
1391 case $LD in # libtool.m4 will add one of these switches to LD
1392 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1393 libsuff= shlibsuff= libmagic=32-bit;;
1394 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1395 libsuff=32 shlibsuff=N32 libmagic=N32;;
1396 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1397 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1398 *) libsuff= shlibsuff= libmagic=never-match;;
1399 esac
1400 ;;
1401 esac
1402 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1403 shlibpath_overrides_runpath=no
1404 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1405 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1406 hardcode_into_libs=yes
1407 ;;
1408
1409 # No shared lib support for Linux oldld, aout, or coff.
1410 linux*oldld* | linux*aout* | linux*coff*)
1411 dynamic_linker=no
1412 ;;
1413
1414 # This must be Linux ELF.
1415 linux*)
1416 version_type=linux
1417 need_lib_prefix=no
1418 need_version=no
1419 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1420 soname_spec='${libname}${release}${shared_ext}$major'
1421 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1422 shlibpath_var=LD_LIBRARY_PATH
1423 shlibpath_overrides_runpath=no
1424 # This implies no fast_install, which is unacceptable.
1425 # Some rework will be needed to allow for fast_install
1426 # before this can be enabled.
1427 hardcode_into_libs=yes
1428
1429 # We used to test for /lib/ld.so.1 and disable shared libraries on
1430 # powerpc, because MkLinux only supported shared libraries with the
1431 # GNU dynamic linker. Since this was broken with cross compilers,
1432 # most powerpc-linux boxes support dynamic linking these days and
1433 # people can always --disable-shared, the test was removed, and we
1434 # assume the GNU/Linux dynamic linker is in use.
1435 dynamic_linker='GNU/Linux ld.so'
1436 ;;
1437
1438 netbsd*)
1439 version_type=sunos
1440 need_lib_prefix=no
1441 need_version=no
1442 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1443 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1444 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1445 dynamic_linker='NetBSD (a.out) ld.so'
1446 else
1447 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
1448 soname_spec='${libname}${release}${shared_ext}$major'
1449 dynamic_linker='NetBSD ld.elf_so'
1450 fi
1451 shlibpath_var=LD_LIBRARY_PATH
1452 shlibpath_overrides_runpath=yes
1453 hardcode_into_libs=yes
1454 ;;
1455
1456 newsos6)
1457 version_type=linux
1458 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1459 shlibpath_var=LD_LIBRARY_PATH
1460 shlibpath_overrides_runpath=yes
1461 ;;
1462
1463 nto-qnx)
1464 version_type=linux
1465 need_lib_prefix=no
1466 need_version=no
1467 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1468 soname_spec='${libname}${release}${shared_ext}$major'
1469 shlibpath_var=LD_LIBRARY_PATH
1470 shlibpath_overrides_runpath=yes
1471 ;;
1472
1473 openbsd*)
1474 version_type=sunos
1475 need_lib_prefix=no
1476 need_version=no
1477 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1478 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1479 shlibpath_var=LD_LIBRARY_PATH
1480 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1481 case $host_os in
1482 openbsd2.[[89]] | openbsd2.[[89]].*)
1483 shlibpath_overrides_runpath=no
1484 ;;
1485 *)
1486 shlibpath_overrides_runpath=yes
1487 ;;
1488 esac
1489 else
1490 shlibpath_overrides_runpath=yes
1491 fi
1492 ;;
1493
1494 os2*)
1495 libname_spec='$name'
1496 shrext=".dll"
1497 need_lib_prefix=no
1498 library_names_spec='$libname${shared_ext} $libname.a'
1499 dynamic_linker='OS/2 ld.exe'
1500 shlibpath_var=LIBPATH
1501 ;;
1502
1503 osf3* | osf4* | osf5*)
1504 version_type=osf
1505 need_lib_prefix=no
1506 need_version=no
1507 soname_spec='${libname}${release}${shared_ext}$major'
1508 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1509 shlibpath_var=LD_LIBRARY_PATH
1510 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1511 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1512 ;;
1513
1514 sco3.2v5*)
1515 version_type=osf
1516 soname_spec='${libname}${release}${shared_ext}$major'
1517 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1518 shlibpath_var=LD_LIBRARY_PATH
1519 ;;
1520
1521 solaris*)
1522 version_type=linux
1523 need_lib_prefix=no
1524 need_version=no
1525 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1526 soname_spec='${libname}${release}${shared_ext}$major'
1527 shlibpath_var=LD_LIBRARY_PATH
1528 shlibpath_overrides_runpath=yes
1529 hardcode_into_libs=yes
1530 # ldd complains unless libraries are executable
1531 postinstall_cmds='chmod +x $lib'
1532 ;;
1533
1534 sunos4*)
1535 version_type=sunos
1536 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1537 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1538 shlibpath_var=LD_LIBRARY_PATH
1539 shlibpath_overrides_runpath=yes
1540 if test "$with_gnu_ld" = yes; then
1541 need_lib_prefix=no
1542 fi
1543 need_version=yes
1544 ;;
1545
1546 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1547 version_type=linux
1548 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1549 soname_spec='${libname}${release}${shared_ext}$major'
1550 shlibpath_var=LD_LIBRARY_PATH
1551 case $host_vendor in
1552 sni)
1553 shlibpath_overrides_runpath=no
1554 need_lib_prefix=no
1555 export_dynamic_flag_spec='${wl}-Blargedynsym'
1556 runpath_var=LD_RUN_PATH
1557 ;;
1558 siemens)
1559 need_lib_prefix=no
1560 ;;
1561 motorola)
1562 need_lib_prefix=no
1563 need_version=no
1564 shlibpath_overrides_runpath=no
1565 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1566 ;;
1567 esac
1568 ;;
1569
1570 sysv4*MP*)
1571 if test -d /usr/nec ;then
1572 version_type=linux
1573 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1574 soname_spec='$libname${shared_ext}.$major'
1575 shlibpath_var=LD_LIBRARY_PATH
1576 fi
1577 ;;
1578
1579 uts4*)
1580 version_type=linux
1581 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1582 soname_spec='${libname}${release}${shared_ext}$major'
1583 shlibpath_var=LD_LIBRARY_PATH
1584 ;;
1585
1586 *)
1587 dynamic_linker=no
1588 ;;
1589 esac
1590 AC_MSG_RESULT([$dynamic_linker])
1591 test "$dynamic_linker" = no && can_build_shared=no
1592 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1593
1594
1595 # _LT_AC_TAGCONFIG
1596 # ----------------
1597 AC_DEFUN([_LT_AC_TAGCONFIG],
1598 [AC_ARG_WITH([tags],
1599 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1600 [include additional configurations @<:@automatic@:>@])],
1601 [tagnames="$withval"])
1602
1603 if test -f "$ltmain" && test -n "$tagnames"; then
1604 if test ! -f "${ofile}"; then
1605 AC_MSG_WARN([output file `$ofile' does not exist])
1606 fi
1607
1608 if test -z "$LTCC"; then
1609 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1610 if test -z "$LTCC"; then
1611 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1612 else
1613 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1614 fi
1615 fi
1616
1617 # Extract list of available tagged configurations in $ofile.
1618 # Note that this assumes the entire list is on one line.
1619 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1620
1621 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1622 for tagname in $tagnames; do
1623 IFS="$lt_save_ifs"
1624 # Check whether tagname contains only valid characters
1625 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1626 "") ;;
1627 *) AC_MSG_ERROR([invalid tag name: $tagname])
1628 ;;
1629 esac
1630
1631 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1632 then
1633 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1634 fi
1635
1636 # Update the list of available tags.
1637 if test -n "$tagname"; then
1638 echo appending configuration tag \"$tagname\" to $ofile
1639
1640 case $tagname in
1641 CXX)
1642 if test -n "$CXX" && test "X$CXX" != "Xno"; then
1643 AC_LIBTOOL_LANG_CXX_CONFIG
1644 else
1645 tagname=""
1646 fi
1647 ;;
1648
1649 F77)
1650 if test -n "$F77" && test "X$F77" != "Xno"; then
1651 AC_LIBTOOL_LANG_F77_CONFIG
1652 else
1653 tagname=""
1654 fi
1655 ;;
1656
1657 GCJ)
1658 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1659 AC_LIBTOOL_LANG_GCJ_CONFIG
1660 else
1661 tagname=""
1662 fi
1663 ;;
1664
1665 RC)
1666 AC_LIBTOOL_LANG_RC_CONFIG
1667 ;;
1668
1669 *)
1670 AC_MSG_ERROR([Unsupported tag name: $tagname])
1671 ;;
1672 esac
1673
1674 # Append the new tag name to the list of available tags.
1675 if test -n "$tagname" ; then
1676 available_tags="$available_tags $tagname"
1677 fi
1678 fi
1679 done
1680 IFS="$lt_save_ifs"
1681
1682 # Now substitute the updated list of available tags.
1683 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1684 mv "${ofile}T" "$ofile"
1685 chmod +x "$ofile"
1686 else
1687 rm -f "${ofile}T"
1688 AC_MSG_ERROR([unable to update list of available tagged configurations.])
1689 fi
1690 fi
1691 ])# _LT_AC_TAGCONFIG
1692
1693
1694 # AC_LIBTOOL_DLOPEN
1695 # -----------------
1696 # enable checks for dlopen support
1697 AC_DEFUN([AC_LIBTOOL_DLOPEN],
1698 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1699 ])# AC_LIBTOOL_DLOPEN
1700
1701
1702 # AC_LIBTOOL_WIN32_DLL
1703 # --------------------
1704 # declare package support for building win32 dll's
1705 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1706 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1707 ])# AC_LIBTOOL_WIN32_DLL
1708
1709
1710 # AC_ENABLE_SHARED([DEFAULT])
1711 # ---------------------------
1712 # implement the --enable-shared flag
1713 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1714 AC_DEFUN([AC_ENABLE_SHARED],
1715 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1716 AC_ARG_ENABLE([shared],
1717 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1718 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1719 [p=${PACKAGE-default}
1720 case $enableval in
1721 yes) enable_shared=yes ;;
1722 no) enable_shared=no ;;
1723 *)
1724 enable_shared=no
1725 # Look at the argument we got. We use all the common list separators.
1726 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1727 for pkg in $enableval; do
1728 IFS="$lt_save_ifs"
1729 if test "X$pkg" = "X$p"; then
1730 enable_shared=yes
1731 fi
1732 done
1733 IFS="$lt_save_ifs"
1734 ;;
1735 esac],
1736 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1737 ])# AC_ENABLE_SHARED
1738
1739
1740 # AC_DISABLE_SHARED
1741 # -----------------
1742 #- set the default shared flag to --disable-shared
1743 AC_DEFUN([AC_DISABLE_SHARED],
1744 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1745 AC_ENABLE_SHARED(no)
1746 ])# AC_DISABLE_SHARED
1747
1748
1749 # AC_ENABLE_STATIC([DEFAULT])
1750 # ---------------------------
1751 # implement the --enable-static flag
1752 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1753 AC_DEFUN([AC_ENABLE_STATIC],
1754 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1755 AC_ARG_ENABLE([static],
1756 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1757 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1758 [p=${PACKAGE-default}
1759 case $enableval in
1760 yes) enable_static=yes ;;
1761 no) enable_static=no ;;
1762 *)
1763 enable_static=no
1764 # Look at the argument we got. We use all the common list separators.
1765 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1766 for pkg in $enableval; do
1767 IFS="$lt_save_ifs"
1768 if test "X$pkg" = "X$p"; then
1769 enable_static=yes
1770 fi
1771 done
1772 IFS="$lt_save_ifs"
1773 ;;
1774 esac],
1775 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1776 ])# AC_ENABLE_STATIC
1777
1778
1779 # AC_DISABLE_STATIC
1780 # -----------------
1781 # set the default static flag to --disable-static
1782 AC_DEFUN([AC_DISABLE_STATIC],
1783 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1784 AC_ENABLE_STATIC(no)
1785 ])# AC_DISABLE_STATIC
1786
1787
1788 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1789 # ---------------------------------
1790 # implement the --enable-fast-install flag
1791 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1792 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1793 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1794 AC_ARG_ENABLE([fast-install],
1795 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1796 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1797 [p=${PACKAGE-default}
1798 case $enableval in
1799 yes) enable_fast_install=yes ;;
1800 no) enable_fast_install=no ;;
1801 *)
1802 enable_fast_install=no
1803 # Look at the argument we got. We use all the common list separators.
1804 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1805 for pkg in $enableval; do
1806 IFS="$lt_save_ifs"
1807 if test "X$pkg" = "X$p"; then
1808 enable_fast_install=yes
1809 fi
1810 done
1811 IFS="$lt_save_ifs"
1812 ;;
1813 esac],
1814 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
1815 ])# AC_ENABLE_FAST_INSTALL
1816
1817
1818 # AC_DISABLE_FAST_INSTALL
1819 # -----------------------
1820 # set the default to --disable-fast-install
1821 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
1822 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1823 AC_ENABLE_FAST_INSTALL(no)
1824 ])# AC_DISABLE_FAST_INSTALL
1825
1826
1827 # AC_LIBTOOL_PICMODE([MODE])
1828 # --------------------------
1829 # implement the --with-pic flag
1830 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
1831 AC_DEFUN([AC_LIBTOOL_PICMODE],
1832 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1833 pic_mode=ifelse($#,1,$1,default)
1834 ])# AC_LIBTOOL_PICMODE
1835
1836
1837 # AC_PROG_EGREP
1838 # -------------
1839 # This is predefined starting with Autoconf 2.54, so this conditional
1840 # definition can be removed once we require Autoconf 2.54 or later.
1841 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
1842 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
1843 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1844 then ac_cv_prog_egrep='grep -E'
1845 else ac_cv_prog_egrep='egrep'
1846 fi])
1847 EGREP=$ac_cv_prog_egrep
1848 AC_SUBST([EGREP])
1849 ])])
1850
1851
1852 # AC_PATH_TOOL_PREFIX
1853 # -------------------
1854 # find a file program which can recognise shared library
1855 AC_DEFUN([AC_PATH_TOOL_PREFIX],
1856 [AC_REQUIRE([AC_PROG_EGREP])dnl
1857 AC_MSG_CHECKING([for $1])
1858 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
1859 [case $MAGIC_CMD in
1860 [[\\/*] | ?:[\\/]*])
1861 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
1862 ;;
1863 *)
1864 lt_save_MAGIC_CMD="$MAGIC_CMD"
1865 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1866 dnl $ac_dummy forces splitting on constant user-supplied paths.
1867 dnl POSIX.2 word splitting is done only on the output of word expansions,
1868 dnl not every word. This closes a longstanding sh security hole.
1869 ac_dummy="ifelse([$2], , $PATH, [$2])"
1870 for ac_dir in $ac_dummy; do
1871 IFS="$lt_save_ifs"
1872 test -z "$ac_dir" && ac_dir=.
1873 if test -f $ac_dir/$1; then
1874 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
1875 if test -n "$file_magic_test_file"; then
1876 case $deplibs_check_method in
1877 "file_magic "*)
1878 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
1879 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1880 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
1881 $EGREP "$file_magic_regex" > /dev/null; then
1882 :
1883 else
1884 cat <&2
1885
1886 *** Warning: the command libtool uses to detect shared libraries,
1887 *** $file_magic_cmd, produces output that libtool cannot recognize.
1888 *** The result is that libtool may fail to recognize shared libraries
1889 *** as such. This will affect the creation of libtool libraries that
1890 *** depend on shared libraries, but programs linked with such libtool
1891 *** libraries will work regardless of this problem. Nevertheless, you
1892 *** may want to report the problem to your system manager and/or to
1893 *** bug-libtool@gnu.org
1894
1895 EOF
1896 fi ;;
1897 esac
1898 fi
1899 break
1900 fi
1901 done
1902 IFS="$lt_save_ifs"
1903 MAGIC_CMD="$lt_save_MAGIC_CMD"
1904 ;;
1905 esac])
1906 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
1907 if test -n "$MAGIC_CMD"; then
1908 AC_MSG_RESULT($MAGIC_CMD)
1909 else
1910 AC_MSG_RESULT(no)
1911 fi
1912 ])# AC_PATH_TOOL_PREFIX
1913
1914
1915 # AC_PATH_MAGIC
1916 # -------------
1917 # find a file program which can recognise a shared library
1918 AC_DEFUN([AC_PATH_MAGIC],
1919 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
1920 if test -z "$lt_cv_path_MAGIC_CMD"; then
1921 if test -n "$ac_tool_prefix"; then
1922 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
1923 else
1924 MAGIC_CMD=:
1925 fi
1926 fi
1927 ])# AC_PATH_MAGIC
1928
1929
1930 # AC_PROG_LD
1931 # ----------
1932 # find the path to the GNU or non-GNU linker
1933 AC_DEFUN([AC_PROG_LD],
1934 [AC_ARG_WITH([gnu-ld],
1935 [AC_HELP_STRING([--with-gnu-ld],
1936 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
1937 [test "$withval" = no || with_gnu_ld=yes],
1938 [with_gnu_ld=no])
1939 AC_REQUIRE([LT_AC_PROG_SED])dnl
1940 AC_REQUIRE([AC_PROG_CC])dnl
1941 AC_REQUIRE([AC_CANONICAL_HOST])dnl
1942 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
1943 ac_prog=ld
1944 if test "$GCC" = yes; then
1945 # Check if gcc -print-prog-name=ld gives a path.
1946 AC_MSG_CHECKING([for ld used by $CC])
1947 case $host in
1948 *-*-mingw*)
1949 # gcc leaves a trailing carriage return which upsets mingw
1950 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
1951 *)
1952 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
1953 esac
1954 case $ac_prog in
1955 # Accept absolute paths.
1956 [[\\/]]* | ?:[[\\/]]*)
1957 re_direlt='/[[^/]][[^/]]*/\.\./'
1958 # Canonicalize the path of ld
1959 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
1960 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
1961 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
1962 done
1963 test -z "$LD" && LD="$ac_prog"
1964 ;;
1965 "")
1966 # If it fails, then pretend we aren't using GCC.
1967 ac_prog=ld
1968 ;;
1969 *)
1970 # If it is relative, then search for the first ld in PATH.
1971 with_gnu_ld=unknown
1972 ;;
1973 esac
1974 elif test "$with_gnu_ld" = yes; then
1975 AC_MSG_CHECKING([for GNU ld])
1976 else
1977 AC_MSG_CHECKING([for non-GNU ld])
1978 fi
1979 AC_CACHE_VAL(lt_cv_path_LD,
1980 [if test -z "$LD"; then
1981 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1982 for ac_dir in $PATH; do
1983 IFS="$lt_save_ifs"
1984 test -z "$ac_dir" && ac_dir=.
1985 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
1986 lt_cv_path_LD="$ac_dir/$ac_prog"
1987 # Check to see if the program is GNU ld. I'd rather use --version,
1988 # but apparently some GNU ld's only accept -v.
1989 # Break only if it was the GNU/non-GNU ld that we prefer.
1990 case `"$lt_cv_path_LD" -v 2>&1
1991 *GNU* | *'with BFD'*)
1992 test "$with_gnu_ld" != no && break
1993 ;;
1994 *)
1995 test "$with_gnu_ld" != yes && break
1996 ;;
1997 esac
1998 fi
1999 done
2000 IFS="$lt_save_ifs"
2001 else
2002 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2003 fi])
2004 LD="$lt_cv_path_LD"
2005 if test -n "$LD"; then
2006 AC_MSG_RESULT($LD)
2007 else
2008 AC_MSG_RESULT(no)
2009 fi
2010 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2011 AC_PROG_LD_GNU
2012 ])# AC_PROG_LD
2013
2014
2015 # AC_PROG_LD_GNU
2016 # --------------
2017 AC_DEFUN([AC_PROG_LD_GNU],
2018 [AC_REQUIRE([AC_PROG_EGREP])dnl
2019 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2020 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2021 case `"$LD" -v 2>&1
2022 *GNU* | *'with BFD'*)
2023 lt_cv_prog_gnu_ld=yes
2024 ;;
2025 *)
2026 lt_cv_prog_gnu_ld=no
2027 ;;
2028 esac])
2029 with_gnu_ld=$lt_cv_prog_gnu_ld
2030 ])# AC_PROG_LD_GNU
2031
2032
2033 # AC_PROG_LD_RELOAD_FLAG
2034 # ----------------------
2035 # find reload flag for linker
2036 # -- PORTME Some linkers may need a different reload flag.
2037 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2038 [AC_CACHE_CHECK([for $LD option to reload object files],
2039 lt_cv_ld_reload_flag,
2040 [lt_cv_ld_reload_flag='-r'])
2041 reload_flag=$lt_cv_ld_reload_flag
2042 case $reload_flag in
2043 "" | " "*) ;;
2044 *) reload_flag=" $reload_flag" ;;
2045 esac
2046 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2047 ])# AC_PROG_LD_RELOAD_FLAG
2048
2049
2050 # AC_DEPLIBS_CHECK_METHOD
2051 # -----------------------
2052 # how to check for library dependencies
2053 # -- PORTME fill in with the dynamic library characteristics
2054 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2055 [AC_CACHE_CHECK([how to recognise dependent libraries],
2056 lt_cv_deplibs_check_method,
2057 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2058 lt_cv_file_magic_test_file=
2059 lt_cv_deplibs_check_method='unknown'
2060 # Need to set the preceding variable on all platforms that support
2061 # interlibrary dependencies.
2062 # 'none' -- dependencies not supported.
2063 # `unknown' -- same as none, but documents that we really don't know.
2064 # 'pass_all' -- all dependencies passed with no checks.
2065 # 'test_compile' -- check by making test program.
2066 # 'file_magic [[regex]]' -- check by looking for files in library path
2067 # which responds to the $file_magic_cmd with a given extended regex.
2068 # If you have `file' or equivalent on your system and you're not sure
2069 # whether `pass_all' will *always* work, you probably want this one.
2070
2071 case $host_os in
2072 aix4* | aix5*)
2073 lt_cv_deplibs_check_method=pass_all
2074 ;;
2075
2076 beos*)
2077 lt_cv_deplibs_check_method=pass_all
2078 ;;
2079
2080 bsdi4*)
2081 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2082 lt_cv_file_magic_cmd='/usr/bin/file -L'
2083 lt_cv_file_magic_test_file=/shlib/libc.so
2084 ;;
2085
2086 cygwin* | mingw* | pw32*)
2087 # win32_libid is a shell function defined in ltmain.sh
2088 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2089 lt_cv_file_magic_cmd='win32_libid'
2090 ;;
2091
2092 darwin* | rhapsody*)
2093 # this will be overwritten by pass_all, but leave it in just in case
2094 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2095 lt_cv_file_magic_cmd='/usr/bin/file -L'
2096 case "$host_os" in
2097 rhapsody* | darwin1.[[012]])
2098 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2099 ;;
2100 *) # Darwin 1.3 on
2101 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2102 ;;
2103 esac
2104 lt_cv_deplibs_check_method=pass_all
2105 ;;
2106
2107 freebsd*)
2108 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2109 case $host_cpu in
2110 i*86 )
2111 # Not sure whether the presence of OpenBSD here was a mistake.
2112 # Let's accept both of them until this is cleared up.
2113 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2114 lt_cv_file_magic_cmd=/usr/bin/file
2115 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2116 ;;
2117 esac
2118 else
2119 lt_cv_deplibs_check_method=pass_all
2120 fi
2121 ;;
2122
2123 gnu*)
2124 lt_cv_deplibs_check_method=pass_all
2125 ;;
2126
2127 hpux10.20* | hpux11*)
2128 lt_cv_file_magic_cmd=/usr/bin/file
2129 case "$host_cpu" in
2130 ia64*)
2131 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2132 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2133 ;;
2134 hppa*64*)
2135 [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]']
2136 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2137 ;;
2138 *)
2139 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2140 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2141 ;;
2142 esac
2143 ;;
2144
2145 irix5* | irix6* | nonstopux*)
2146 case $host_os in
2147 irix5* | nonstopux*)
2148 # this will be overridden with pass_all, but let us keep it just in case
2149 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2150 ;;
2151 *)
2152 case $LD in
2153 *-32|*"-32 ") libmagic=32-bit;;
2154 *-n32|*"-n32 ") libmagic=N32;;
2155 *-64|*"-64 ") libmagic=64-bit;;
2156 *) libmagic=never-match;;
2157 esac
2158 # this will be overridden with pass_all, but let us keep it just in case
2159 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2160 ;;
2161 esac
2162 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2163 lt_cv_deplibs_check_method=pass_all
2164 ;;
2165
2166 # This must be Linux ELF.
2167 linux*)
2168 case $host_cpu in
2169 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2170 lt_cv_deplibs_check_method=pass_all ;;
2171 *)
2172 # glibc up to 2.1.1 does not perform some relocations on ARM
2173 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2174 esac
2175 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2176 ;;
2177
2178 netbsd*)
2179 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2180 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2181 else
2182 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2183 fi
2184 ;;
2185
2186 newos6*)
2187 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2188 lt_cv_file_magic_cmd=/usr/bin/file
2189 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2190 ;;
2191
2192 nto-qnx)
2193 lt_cv_deplibs_check_method=unknown
2194 ;;
2195
2196 openbsd*)
2197 lt_cv_file_magic_cmd=/usr/bin/file
2198 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2199 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2200 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2201 else
2202 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2203 fi
2204 ;;
2205
2206 osf3* | osf4* | osf5*)
2207 # this will be overridden with pass_all, but let us keep it just in case
2208 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2209 lt_cv_file_magic_test_file=/shlib/libc.so
2210 lt_cv_deplibs_check_method=pass_all
2211 ;;
2212
2213 sco3.2v5*)
2214 lt_cv_deplibs_check_method=pass_all
2215 ;;
2216
2217 solaris*)
2218 lt_cv_deplibs_check_method=pass_all
2219 lt_cv_file_magic_test_file=/lib/libc.so
2220 ;;
2221
2222 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2223 case $host_vendor in
2224 motorola)
2225 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]]'
2226 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2227 ;;
2228 ncr)
2229 lt_cv_deplibs_check_method=pass_all
2230 ;;
2231 sequent)
2232 lt_cv_file_magic_cmd='/bin/file'
2233 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2234 ;;
2235 sni)
2236 lt_cv_file_magic_cmd='/bin/file'
2237 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2238 lt_cv_file_magic_test_file=/lib/libc.so
2239 ;;
2240 siemens)
2241 lt_cv_deplibs_check_method=pass_all
2242 ;;
2243 esac
2244 ;;
2245
2246 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2247 lt_cv_deplibs_check_method=pass_all
2248 ;;
2249 esac
2250 ])
2251 file_magic_cmd=$lt_cv_file_magic_cmd
2252 deplibs_check_method=$lt_cv_deplibs_check_method
2253 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2254 ])# AC_DEPLIBS_CHECK_METHOD
2255
2256
2257 # AC_PROG_NM
2258 # ----------
2259 # find the path to a BSD-compatible name lister
2260 AC_DEFUN([AC_PROG_NM],
2261 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2262 [if test -n "$NM"; then
2263 # Let the user override the test.
2264 lt_cv_path_NM="$NM"
2265 else
2266 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2267 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2268 IFS="$lt_save_ifs"
2269 test -z "$ac_dir" && ac_dir=.
2270 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2271 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2272 # Check to see if the nm accepts a BSD-compat flag.
2273 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
2274 # nm: unknown option "B" ignored
2275 # Tru64's nm complains that /dev/null is an invalid object file
2276 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2277 */dev/null* | *'Invalid file or object type'*)
2278 lt_cv_path_NM="$tmp_nm -B"
2279 break
2280 ;;
2281 *)
2282 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2283 */dev/null*)
2284 lt_cv_path_NM="$tmp_nm -p"
2285 break
2286 ;;
2287 *)
2288 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2289 continue # so that we can try to find one that supports BSD flags
2290 ;;
2291 esac
2292 esac
2293 fi
2294 done
2295 IFS="$lt_save_ifs"
2296 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2297 fi])
2298 NM="$lt_cv_path_NM"
2299 ])# AC_PROG_NM
2300
2301
2302 # AC_CHECK_LIBM
2303 # -------------
2304 # check for math library
2305 AC_DEFUN([AC_CHECK_LIBM],
2306 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
2307 LIBM=
2308 case $host in
2309 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2310 # These system don't have libm, or don't need it
2311 ;;
2312 *-ncr-sysv4.3*)
2313 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2314 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2315 ;;
2316 *)
2317 AC_CHECK_LIB(m, cos, LIBM="-lm")
2318 ;;
2319 esac
2320 ])# AC_CHECK_LIBM
2321
2322
2323 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2324 # -----------------------------------
2325 # sets LIBLTDL to the link flags for the libltdl convenience library and
2326 # LTDLINCL to the include flags for the libltdl header and adds
2327 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
2328 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2329 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2330 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
2331 # '${top_srcdir}/' (note the single quotes!). If your package is not
2332 # flat and you're not using automake, define top_builddir and
2333 # top_srcdir appropriately in the Makefiles.
2334 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2335 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2336 case $enable_ltdl_convenience in
2337 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2338 "") enable_ltdl_convenience=yes
2339 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2340 esac
2341 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2342 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2343 # For backwards non-gettext consistent compatibility...
2344 INCLTDL="$LTDLINCL"
2345 ])# AC_LIBLTDL_CONVENIENCE
2346
2347
2348 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2349 # -----------------------------------
2350 # sets LIBLTDL to the link flags for the libltdl installable library and
2351 # LTDLINCL to the include flags for the libltdl header and adds
2352 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
2353 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2354 # DIRECTORY is not provided and an installed libltdl is not found, it is
2355 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2356 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2357 # quotes!). If your package is not flat and you're not using automake,
2358 # define top_builddir and top_srcdir appropriately in the Makefiles.
2359 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2360 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2361 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2362 AC_CHECK_LIB(ltdl, lt_dlinit,
2363 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2364 [if test x"$enable_ltdl_install" = xno; then
2365 AC_MSG_WARN([libltdl not installed, but installation disabled])
2366 else
2367 enable_ltdl_install=yes
2368 fi
2369 ])
2370 if test x"$enable_ltdl_install" = x"yes"; then
2371 ac_configure_args="$ac_configure_args --enable-ltdl-install"
2372 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2373 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2374 else
2375 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2376 LIBLTDL="-lltdl"
2377 LTDLINCL=
2378 fi
2379 # For backwards non-gettext consistent compatibility...
2380 INCLTDL="$LTDLINCL"
2381 ])# AC_LIBLTDL_INSTALLABLE
2382
2383
2384 # AC_LIBTOOL_CXX
2385 # --------------
2386 # enable support for C++ libraries
2387 AC_DEFUN([AC_LIBTOOL_CXX],
2388 [AC_REQUIRE([_LT_AC_LANG_CXX])
2389 ])# AC_LIBTOOL_CXX
2390
2391
2392 # _LT_AC_LANG_CXX
2393 # ---------------
2394 AC_DEFUN([_LT_AC_LANG_CXX],
2395 [AC_REQUIRE([AC_PROG_CXX])
2396 AC_REQUIRE([AC_PROG_CXXCPP])
2397 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
2398 ])# _LT_AC_LANG_CXX
2399
2400
2401 # AC_LIBTOOL_F77
2402 # --------------
2403 # enable support for Fortran 77 libraries
2404 AC_DEFUN([AC_LIBTOOL_F77],
2405 [AC_REQUIRE([_LT_AC_LANG_F77])
2406 ])# AC_LIBTOOL_F77
2407
2408
2409 # _LT_AC_LANG_F77
2410 # ---------------
2411 AC_DEFUN([_LT_AC_LANG_F77],
2412 [AC_REQUIRE([AC_PROG_F77])
2413 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
2414 ])# _LT_AC_LANG_F77
2415
2416
2417 # AC_LIBTOOL_GCJ
2418 # --------------
2419 # enable support for GCJ libraries
2420 AC_DEFUN([AC_LIBTOOL_GCJ],
2421 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2422 ])# AC_LIBTOOL_GCJ
2423
2424
2425 # _LT_AC_LANG_GCJ
2426 # ---------------
2427 AC_DEFUN([_LT_AC_LANG_GCJ],
2428 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2429 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2430 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2431 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2432 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2433 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2434 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
2435 ])# _LT_AC_LANG_GCJ
2436
2437
2438 # AC_LIBTOOL_RC
2439 # --------------
2440 # enable support for Windows resource files
2441 AC_DEFUN([AC_LIBTOOL_RC],
2442 [AC_REQUIRE([LT_AC_PROG_RC])
2443 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
2444 ])# AC_LIBTOOL_RC
2445
2446
2447 # AC_LIBTOOL_LANG_C_CONFIG
2448 # ------------------------
2449 # Ensure that the configuration vars for the C compiler are
2450 # suitably defined. Those variables are subsequently used by
2451 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2452 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2453 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2454 [lt_save_CC="$CC"
2455 AC_LANG_PUSH(C)
2456
2457 # Source file extension for C test sources.
2458 ac_ext=c
2459
2460 # Object file extension for compiled C test sources.
2461 objext=o
2462 _LT_AC_TAGVAR(objext, $1)=$objext
2463
2464 # Code to be used in simple compile tests
2465 lt_simple_compile_test_code="int some_variable = 0;\n"
2466
2467 # Code to be used in simple link tests
2468 lt_simple_link_test_code='int main(){return(0);}\n'
2469
2470 _LT_AC_SYS_COMPILER
2471
2472 #
2473 # Check for any special shared library compilation flags.
2474 #
2475 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2476 if test "$GCC" = no; then
2477 case $host_os in
2478 sco3.2v5*)
2479 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2480 ;;
2481 esac
2482 fi
2483 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2484 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2485 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2486 else
2487 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2488 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2489 fi
2490 fi
2491
2492
2493 #
2494 # Check to make sure the static flag actually works.
2495 #
2496 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2497 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2498 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2499 [],
2500 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2501
2502
2503 ## CAVEAT EMPTOR:
2504 ## There is no encapsulation within the following macros, do not change
2505 ## the running order or otherwise move them around unless you know exactly
2506 ## what you are doing...
2507 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2508 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2509 AC_LIBTOOL_PROG_CC_C_O($1)
2510 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2511 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2512 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2513 AC_LIBTOOL_SYS_LIB_STRIP
2514 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2515 AC_LIBTOOL_DLOPEN_SELF($1)
2516
2517 # Report which librarie types wil actually be built
2518 AC_MSG_CHECKING([if libtool supports shared libraries])
2519 AC_MSG_RESULT([$can_build_shared])
2520
2521 AC_MSG_CHECKING([whether to build shared libraries])
2522 test "$can_build_shared" = "no" && enable_shared=no
2523
2524 # On AIX, shared libraries and static libraries use the same namespace, and
2525 # are all built from PIC.
2526 case "$host_os" in
2527 aix3*)
2528 test "$enable_shared" = yes && enable_static=no
2529 if test -n "$RANLIB"; then
2530 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2531 postinstall_cmds='$RANLIB $lib'
2532 fi
2533 ;;
2534
2535 aix4*)
2536 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2537 test "$enable_shared" = yes && enable_static=no
2538 fi
2539 ;;
2540 darwin* | rhapsody*)
2541 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2542 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2543 case "$host_os" in
2544 rhapsody* | darwin1.[[012]])
2545 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2546 ;;
2547 *) # Darwin 1.3 on
2548 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2549 ;;
2550 esac
2551 # FIXME: Relying on posixy $() will cause problems for
2552 # cross-compilation, but unfortunately the echo tests do not
2553 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2554 # `"' quotes if we put them in here... so don't!
2555 output_verbose_link_cmd='echo'
2556 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2557 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
2558 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2559 _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}'
2560 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2561 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2562 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2563 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2564 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2565 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2566 fi
2567 ;;
2568 esac
2569 AC_MSG_RESULT([$enable_shared])
2570
2571 AC_MSG_CHECKING([whether to build static libraries])
2572 # Make sure either enable_shared or enable_static is yes.
2573 test "$enable_shared" = yes || enable_static=yes
2574 AC_MSG_RESULT([$enable_static])
2575
2576 AC_LIBTOOL_CONFIG($1)
2577
2578 AC_LANG_POP
2579 CC="$lt_save_CC"
2580 ])# AC_LIBTOOL_LANG_C_CONFIG
2581
2582
2583 # AC_LIBTOOL_LANG_CXX_CONFIG
2584 # --------------------------
2585 # Ensure that the configuration vars for the C compiler are
2586 # suitably defined. Those variables are subsequently used by
2587 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2588 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2589 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2590 [AC_LANG_PUSH(C++)
2591 AC_REQUIRE([AC_PROG_CXX])
2592 AC_REQUIRE([AC_PROG_CXXCPP])
2593
2594 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2595 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2596 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2597 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2598 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2599 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2600 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2601 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2602 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2603 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2604 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2605 _LT_AC_TAGVAR(module_cmds, $1)=
2606 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2607 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2608 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2609 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2610 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2611 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2612
2613 # Dependencies to place before and after the object being linked:
2614 _LT_AC_TAGVAR(predep_objects, $1)=
2615 _LT_AC_TAGVAR(postdep_objects, $1)=
2616 _LT_AC_TAGVAR(predeps, $1)=
2617 _LT_AC_TAGVAR(postdeps, $1)=
2618 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2619
2620 # Source file extension for C++ test sources.
2621 ac_ext=cc
2622
2623 # Object file extension for compiled C++ test sources.
2624 objext=o
2625 _LT_AC_TAGVAR(objext, $1)=$objext
2626
2627 # Code to be used in simple compile tests
2628 lt_simple_compile_test_code="int some_variable = 0;\n"
2629
2630 # Code to be used in simple link tests
2631 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2632
2633 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2634 _LT_AC_SYS_COMPILER
2635
2636 # Allow CC to be a program name with arguments.
2637 lt_save_CC=$CC
2638 lt_save_LD=$LD
2639 lt_save_GCC=$GCC
2640 GCC=$GXX
2641 lt_save_with_gnu_ld=$with_gnu_ld
2642 lt_save_path_LD=$lt_cv_path_LD
2643 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2644 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2645 else
2646 unset lt_cv_prog_gnu_ld
2647 fi
2648 if test -n "${lt_cv_path_LDCXX+set}"; then
2649 lt_cv_path_LD=$lt_cv_path_LDCXX
2650 else
2651 unset lt_cv_path_LD
2652 fi
2653 test -z "${LDCXX+set}" || LD=$LDCXX
2654 CC=${CXX-"c++"}
2655 compiler=$CC
2656 _LT_AC_TAGVAR(compiler, $1)=$CC
2657 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2658
2659 # We don't want -fno-exception wen compiling C++ code, so set the
2660 # no_builtin_flag separately
2661 if test "$GXX" = yes; then
2662 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2663 else
2664 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2665 fi
2666
2667 if test "$GXX" = yes; then
2668 # Set up default GNU C++ configuration
2669
2670 AC_PROG_LD
2671
2672 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2673 # archiving commands below assume that GNU ld is being used.
2674 if test "$with_gnu_ld" = yes; then
2675 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2676 _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'
2677
2678 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2679 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2680
2681 # If archive_cmds runs LD, not CC, wlarc should be empty
2682 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2683 # investigate it a little bit more. (MM)
2684 wlarc='${wl}'
2685
2686 # ancient GNU ld didn't support --whole-archive et. al.
2687 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2688 grep 'no-whole-archive' > /dev/null; then
2689 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2690 else
2691 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2692 fi
2693 else
2694 with_gnu_ld=no
2695 wlarc=
2696
2697 # A generic and very simple default shared library creation
2698 # command for GNU C++ for the case where it uses the native
2699 # linker, instead of GNU ld. If possible, this setting should
2700 # overridden to take advantage of the native linker features on
2701 # the platform it is being used on.
2702 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2703 fi
2704
2705 # Commands to make compiler produce verbose output that lists
2706 # what "hidden" libraries, object files and flags are used when
2707 # linking a shared library.
2708 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2709
2710 else
2711 GXX=no
2712 with_gnu_ld=no
2713 wlarc=
2714 fi
2715
2716 # PORTME: fill in a description of your system's C++ link characteristics
2717 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2718 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2719 case $host_os in
2720 aix3*)
2721 # FIXME: insert proper C++ library support
2722 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2723 ;;
2724 aix4* | aix5*)
2725 if test "$host_cpu" = ia64; then
2726 # On IA64, the linker does run time linking by default, so we don't
2727 # have to do anything special.
2728 aix_use_runtimelinking=no
2729 exp_sym_flag='-Bexport'
2730 no_entry_flag=""
2731 else
2732 aix_use_runtimelinking=no
2733
2734 # Test if we are trying to use run time linking or normal
2735 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2736 # need to do runtime linking.
2737 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2738 for ld_flag in $LDFLAGS; do
2739 case $ld_flag in
2740 *-brtl*)
2741 aix_use_runtimelinking=yes
2742 break
2743 ;;
2744 esac
2745 done
2746 esac
2747
2748 exp_sym_flag='-bexport'
2749 no_entry_flag='-bnoentry'
2750 fi
2751
2752 # When large executables or shared objects are built, AIX ld can
2753 # have problems creating the table of contents. If linking a library
2754 # or program results in "error TOC overflow" add -mminimal-toc to
2755 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2756 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2757
2758 _LT_AC_TAGVAR(archive_cmds, $1)=''
2759 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2760 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2761 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2762
2763 if test "$GXX" = yes; then
2764 case $host_os in aix4.[012]|aix4.[012].*)
2765 # We only want to do this on AIX 4.2 and lower, the check
2766 # below for broken collect2 doesn't work under 4.3+
2767 collect2name=`${CC} -print-prog-name=collect2`
2768 if test -f "$collect2name" && \
2769 strings "$collect2name" | grep resolve_lib_name >/dev/null
2770 then
2771 # We have reworked collect2
2772 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2773 else
2774 # We have old collect2
2775 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2776 # It fails to find uninstalled libraries when the uninstalled
2777 # path is not listed in the libpath. Setting hardcode_minus_L
2778 # to unsupported forces relinking
2779 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2780 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2781 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2782 fi
2783 esac
2784 shared_flag='-shared'
2785 else
2786 # not using gcc
2787 if test "$host_cpu" = ia64; then
2788 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2789 # chokes on -Wl,-G. The following line is correct:
2790 shared_flag='-G'
2791 else
2792 if test "$aix_use_runtimelinking" = yes; then
2793 shared_flag='${wl}-G'
2794 else
2795 shared_flag='${wl}-bM:SRE'
2796 fi
2797 fi
2798 fi
2799
2800 # It seems that -bexpall does not export symbols beginning with
2801 # underscore (_), so it is better to generate a list of symbols to export.
2802 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2803 if test "$aix_use_runtimelinking" = yes; then
2804 # Warning - without using the other runtime loading flags (-brtl),
2805 # -berok will link without error, but may produce a broken library.
2806 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2807 # Determine the default libpath from the value encoded in an empty executable.
2808 _LT_AC_SYS_LIBPATH_AIX
2809 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2810
2811 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
2812 else
2813 if test "$host_cpu" = ia64; then
2814 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2815 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2816 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2817 else
2818 # Determine the default libpath from the value encoded in an empty executable.
2819 _LT_AC_SYS_LIBPATH_AIX
2820 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2821 # Warning - without using the other run time loading flags,
2822 # -berok will link without error, but may produce a broken library.
2823 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2824 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2825 # -bexpall does not export symbols beginning with underscore (_)
2826 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2827 # Exported symbols can be pulled into shared objects from archives
2828 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
2829 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2830 # This is similar to how AIX traditionally builds it's shared libraries.
2831 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
2832 fi
2833 fi
2834 ;;
2835 chorus*)
2836 case $cc_basename in
2837 *)
2838 # FIXME: insert proper C++ library support
2839 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2840 ;;
2841 esac
2842 ;;
2843
2844 cygwin* | mingw* | pw32*)
2845 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2846 # as there is no search path for DLLs.
2847 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2848 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2849 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2850 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
2851
2852 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
2853 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2854 # If the export-symbols file already is a .def file (1st line
2855 # is EXPORTS), use it as is; otherwise, prepend...
2856 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
2857 cp $export_symbols $output_objdir/$soname.def;
2858 else
2859 echo EXPORTS > $output_objdir/$soname.def;
2860 cat $export_symbols >> $output_objdir/$soname.def;
2861 fi~
2862 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
2863 else
2864 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2865 fi
2866 ;;
2867
2868 darwin* | rhapsody*)
2869 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2870 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2871 case "$host_os" in
2872 rhapsody* | darwin1.[[012]])
2873 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2874 ;;
2875 *) # Darwin 1.3 on
2876 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2877 ;;
2878 esac
2879 lt_int_apple_cc_single_mod=no
2880 output_verbose_link_cmd='echo'
2881 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
2882 lt_int_apple_cc_single_mod=yes
2883 fi
2884 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2885 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
2886 else
2887 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
2888 fi
2889 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
2890
2891 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2892 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
2893 _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}'
2894 else
2895 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
2896 fi
2897 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2898 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2899 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2900 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2901 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2902 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2903 fi
2904 ;;
2905
2906 dgux*)
2907 case $cc_basename in
2908 ec++)
2909 # FIXME: insert proper C++ library support
2910 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2911 ;;
2912 ghcx)
2913 # Green Hills C++ Compiler
2914 # FIXME: insert proper C++ library support
2915 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2916 ;;
2917 *)
2918 # FIXME: insert proper C++ library support
2919 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2920 ;;
2921 esac
2922 ;;
2923 freebsd[12]*)
2924 # C++ shared libraries reported to be fairly broken before switch to ELF
2925 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2926 ;;
2927 freebsd-elf*)
2928 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2929 ;;
2930 freebsd*)
2931 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
2932 # conventions
2933 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2934 ;;
2935 gnu*)
2936 ;;
2937 hpux9*)
2938 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2939 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2940 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2941 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2942 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
2943 # but as the default
2944 # location of the library.
2945
2946 case $cc_basename in
2947 CC)
2948 # FIXME: insert proper C++ library support
2949 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2950 ;;
2951 aCC)
2952 _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'
2953 # Commands to make compiler produce verbose output that lists
2954 # what "hidden" libraries, object files and flags are used when
2955 # linking a shared library.
2956 #
2957 # There doesn't appear to be a way to prevent this compiler from
2958 # explicitly linking system object files so we need to strip them
2959 # from the output so that they don't get included in the library
2960 # dependencies.
2961 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
2962 ;;
2963 *)
2964 if test "$GXX" = yes; then
2965 _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'
2966 else
2967 # FIXME: insert proper C++ library support
2968 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2969 fi
2970 ;;
2971 esac
2972 ;;
2973 hpux10*|hpux11*)
2974 if test $with_gnu_ld = no; then
2975 case "$host_cpu" in
2976 hppa*64*)
2977 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2978 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
2979 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2980 ;;
2981 ia64*)
2982 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2983 ;;
2984 *)
2985 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
2986 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
2987 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
2988 ;;
2989 esac
2990 fi
2991 case "$host_cpu" in
2992 hppa*64*)
2993 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2994 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2995 ;;
2996 ia64*)
2997 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2998 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
2999 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3000 # but as the default
3001 # location of the library.
3002 ;;
3003 *)
3004 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3005 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3006 # but as the default
3007 # location of the library.
3008 ;;
3009 esac
3010
3011 case $cc_basename in
3012 CC)
3013 # FIXME: insert proper C++ library support
3014 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3015 ;;
3016 aCC)
3017 case "$host_cpu" in
3018 hppa*64*|ia64*)
3019 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3020 ;;
3021 *)
3022 _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'
3023 ;;
3024 esac
3025 # Commands to make compiler produce verbose output that lists
3026 # what "hidden" libraries, object files and flags are used when
3027 # linking a shared library.
3028 #
3029 # There doesn't appear to be a way to prevent this compiler from
3030 # explicitly linking system object files so we need to strip them
3031 # from the output so that they don't get included in the library
3032 # dependencies.
3033 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'
3034 ;;
3035 *)
3036 if test "$GXX" = yes; then
3037 if test $with_gnu_ld = no; then
3038 case "$host_cpu" in
3039 ia64*|hppa*64*)
3040 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3041 ;;
3042 *)
3043 _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'
3044 ;;
3045 esac
3046 fi
3047 else
3048 # FIXME: insert proper C++ library support
3049 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3050 fi
3051 ;;
3052 esac
3053 ;;
3054 irix5* | irix6*)
3055 case $cc_basename in
3056 CC)
3057 # SGI C++
3058 _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 ${objdir}/so_locations -o $lib'
3059
3060 # Archives containing C++ object files must be created using
3061 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3062 # necessary to make sure instantiated templates are included
3063 # in the archive.
3064 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3065 ;;
3066 *)
3067 if test "$GXX" = yes; then
3068 if test "$with_gnu_ld" = no; then
3069 _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}${objdir}/so_locations -o $lib'
3070 else
3071 _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'
3072 fi
3073 fi
3074 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3075 ;;
3076 esac
3077 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3078 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3079 ;;
3080 linux*)
3081 case $cc_basename in
3082 KCC)
3083 # Kuck and Associates, Inc. (KAI) C++ Compiler
3084
3085 # KCC will only create a shared library if the output file
3086 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3087 # to its proper name (with version) after linking.
3088 _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'
3089 _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'
3090 # Commands to make compiler produce verbose output that lists
3091 # what "hidden" libraries, object files and flags are used when
3092 # linking a shared library.
3093 #
3094 # There doesn't appear to be a way to prevent this compiler from
3095 # explicitly linking system object files so we need to strip them
3096 # from the output so that they don't get included in the library
3097 # dependencies.
3098 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'
3099
3100 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3101 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3102
3103 # Archives containing C++ object files must be created using
3104 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3105 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3106 ;;
3107 icpc)
3108 # Intel C++
3109 with_gnu_ld=yes
3110 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3111 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3112 _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'
3113 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3114 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3115 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3116 ;;
3117 cxx)
3118 # Compaq C++
3119 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3120 _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'
3121
3122 runpath_var=LD_RUN_PATH
3123 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3124 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3125
3126 # Commands to make compiler produce verbose output that lists
3127 # what "hidden" libraries, object files and flags are used when
3128 # linking a shared library.
3129 #
3130 # There doesn't appear to be a way to prevent this compiler from
3131 # explicitly linking system object files so we need to strip them
3132 # from the output so that they don't get included in the library
3133 # dependencies.
3134 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'
3135 ;;
3136 esac
3137 ;;
3138 lynxos*)
3139 # FIXME: insert proper C++ library support
3140 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3141 ;;
3142 m88k*)
3143 # FIXME: insert proper C++ library support
3144 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3145 ;;
3146 mvs*)
3147 case $cc_basename in
3148 cxx)
3149 # FIXME: insert proper C++ library support
3150 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3151 ;;
3152 *)
3153 # FIXME: insert proper C++ library support
3154 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3155 ;;
3156 esac
3157 ;;
3158 netbsd*)
3159 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3160 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3161 wlarc=
3162 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3163 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3164 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3165 fi
3166 # Workaround some broken pre-1.5 toolchains
3167 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3168 ;;
3169 osf3*)
3170 case $cc_basename in
3171 KCC)
3172 # Kuck and Associates, Inc. (KAI) C++ Compiler
3173
3174 # KCC will only create a shared library if the output file
3175 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3176 # to its proper name (with version) after linking.
3177 _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'
3178
3179 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3180 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3181
3182 # Archives containing C++ object files must be created using
3183 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3184 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3185
3186 ;;
3187 RCC)
3188 # Rational C++ 2.4.1
3189 # FIXME: insert proper C++ library support
3190 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3191 ;;
3192 cxx)
3193 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3194 _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 ${objdir}/so_locations -o $lib'
3195
3196 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3197 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3198
3199 # Commands to make compiler produce verbose output that lists
3200 # what "hidden" libraries, object files and flags are used when
3201 # linking a shared library.
3202 #
3203 # There doesn't appear to be a way to prevent this compiler from
3204 # explicitly linking system object files so we need to strip them
3205 # from the output so that they don't get included in the library
3206 # dependencies.
3207 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'
3208 ;;
3209 *)
3210 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3211 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3212 _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}${objdir}/so_locations -o $lib'
3213
3214 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3215 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3216
3217 # Commands to make compiler produce verbose output that lists
3218 # what "hidden" libraries, object files and flags are used when
3219 # linking a shared library.
3220 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3221
3222 else
3223 # FIXME: insert proper C++ library support
3224 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3225 fi
3226 ;;
3227 esac
3228 ;;
3229 osf4* | osf5*)
3230 case $cc_basename in
3231 KCC)
3232 # Kuck and Associates, Inc. (KAI) C++ Compiler
3233
3234 # KCC will only create a shared library if the output file
3235 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3236 # to its proper name (with version) after linking.
3237 _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'
3238
3239 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3240 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3241
3242 # Archives containing C++ object files must be created using
3243 # the KAI C++ compiler.
3244 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3245 ;;
3246 RCC)
3247 # Rational C++ 2.4.1
3248 # FIXME: insert proper C++ library support
3249 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3250 ;;
3251 cxx)
3252 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3253 _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 ${objdir}/so_locations -o $lib'
3254 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3255 echo "-hidden">> $lib.exp~
3256 $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 $objdir/so_locations -o $lib~
3257 $rm $lib.exp'
3258
3259 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3260 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3261
3262 # Commands to make compiler produce verbose output that lists
3263 # what "hidden" libraries, object files and flags are used when
3264 # linking a shared library.
3265 #
3266 # There doesn't appear to be a way to prevent this compiler from
3267 # explicitly linking system object files so we need to strip them
3268 # from the output so that they don't get included in the library
3269 # dependencies.
3270 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'
3271 ;;
3272 *)
3273 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3274 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3275 _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}${objdir}/so_locations -o $lib'
3276
3277 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3278 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3279
3280 # Commands to make compiler produce verbose output that lists
3281 # what "hidden" libraries, object files and flags are used when
3282 # linking a shared library.
3283 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3284
3285 else
3286 # FIXME: insert proper C++ library support
3287 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3288 fi
3289 ;;
3290 esac
3291 ;;
3292 psos*)
3293 # FIXME: insert proper C++ library support
3294 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3295 ;;
3296 sco*)
3297 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3298 case $cc_basename in
3299 CC)
3300 # FIXME: insert proper C++ library support
3301 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3302 ;;
3303 *)
3304 # FIXME: insert proper C++ library support
3305 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3306 ;;
3307 esac
3308 ;;
3309 sunos4*)
3310 case $cc_basename in
3311 CC)
3312 # Sun C++ 4.x
3313 # FIXME: insert proper C++ library support
3314 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3315 ;;
3316 lcc)
3317 # Lucid
3318 # FIXME: insert proper C++ library support
3319 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3320 ;;
3321 *)
3322 # FIXME: insert proper C++ library support
3323 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3324 ;;
3325 esac
3326 ;;
3327 solaris*)
3328 case $cc_basename in
3329 CC)
3330 # Sun C++ 4.2, 5.x and Centerline C++
3331 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3332 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3333 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3334 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3335
3336 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3337 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3338 case $host_os in
3339 solaris2.[0-5] | solaris2.[0-5].*) ;;
3340 *)
3341 # The C++ compiler is used as linker so we must use $wl
3342 # flag to pass the commands to the underlying system
3343 # linker.
3344 # Supported since Solaris 2.6 (maybe 2.5.1?)
3345 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3346 ;;
3347 esac
3348 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3349
3350 # Commands to make compiler produce verbose output that lists
3351 # what "hidden" libraries, object files and flags are used when
3352 # linking a shared library.
3353 #
3354 # There doesn't appear to be a way to prevent this compiler from
3355 # explicitly linking system object files so we need to strip them
3356 # from the output so that they don't get included in the library
3357 # dependencies.
3358 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3359
3360 # Archives containing C++ object files must be created using
3361 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3362 # necessary to make sure instantiated templates are included
3363 # in the archive.
3364 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3365 ;;
3366 gcx)
3367 # Green Hills C++ Compiler
3368 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3369
3370 # The C++ compiler must be used to create the archive.
3371 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3372 ;;
3373 *)
3374 # GNU C++ compiler with Solaris linker
3375 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3376 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3377 if $CC --version | grep -v '^2\.7' > /dev/null; then
3378 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3379 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3380 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3381
3382 # Commands to make compiler produce verbose output that lists
3383 # what "hidden" libraries, object files and flags are used when
3384 # linking a shared library.
3385 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3386 else
3387 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3388 # platform.
3389 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3390 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3391 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3392
3393 # Commands to make compiler produce verbose output that lists
3394 # what "hidden" libraries, object files and flags are used when
3395 # linking a shared library.
3396 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3397 fi
3398
3399 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3400 fi
3401 ;;
3402 esac
3403 ;;
3404 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3405 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3406 ;;
3407 tandem*)
3408 case $cc_basename in
3409 NCC)
3410 # NonStop-UX NCC 3.20
3411 # FIXME: insert proper C++ library support
3412 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3413 ;;
3414 *)
3415 # FIXME: insert proper C++ library support
3416 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3417 ;;
3418 esac
3419 ;;
3420 vxworks*)
3421 # FIXME: insert proper C++ library support
3422 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3423 ;;
3424 *)
3425 # FIXME: insert proper C++ library support
3426 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3427 ;;
3428 esac
3429 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3430 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3431
3432 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3433 _LT_AC_TAGVAR(LD, $1)="$LD"
3434
3435 ## CAVEAT EMPTOR:
3436 ## There is no encapsulation within the following macros, do not change
3437 ## the running order or otherwise move them around unless you know exactly
3438 ## what you are doing...
3439 AC_LIBTOOL_POSTDEP_PREDEP($1)
3440 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3441 AC_LIBTOOL_PROG_CC_C_O($1)
3442 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3443 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3444 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3445 AC_LIBTOOL_SYS_LIB_STRIP
3446 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3447 AC_LIBTOOL_DLOPEN_SELF($1)
3448
3449 AC_LIBTOOL_CONFIG($1)
3450
3451 AC_LANG_POP
3452 CC=$lt_save_CC
3453 LDCXX=$LD
3454 LD=$lt_save_LD
3455 GCC=$lt_save_GCC
3456 with_gnu_ldcxx=$with_gnu_ld
3457 with_gnu_ld=$lt_save_with_gnu_ld
3458 lt_cv_path_LDCXX=$lt_cv_path_LD
3459 lt_cv_path_LD=$lt_save_path_LD
3460 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3461 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3462 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3463
3464 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3465 # ------------------------
3466 # Figure out "hidden" library dependencies from verbose
3467 # compiler output when linking a shared library.
3468 # Parse the compiler output and extract the necessary
3469 # objects, libraries and library flags.
3470 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3471 dnl we can't use the lt_simple_compile_test_code here,
3472 dnl because it contains code intended for an executable,
3473 dnl not a library. It's possible we should let each
3474 dnl tag define a new lt_????_link_test_code variable,
3475 dnl but it's only used here...
3476 ifelse([$1],[],[cat > conftest.$ac_ext <
3477 int a;
3478 void foo (void) { a = 0; }
3479 EOF
3480 ],[$1],[CXX],[cat > conftest.$ac_ext <
3481 class Foo
3482 {
3483 public:
3484 Foo (void) { a = 0; }
3485 private:
3486 int a;
3487 };
3488 EOF
3489 ],[$1],[F77],[cat > conftest.$ac_ext <
3490 subroutine foo
3491 implicit none