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