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