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