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