Develop and Download Open Source Software

Browse CVS Repository

Annotation of /freewnn/FreeWnn/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (hide annotations) (download)
Wed Jun 4 08:35:02 2003 UTC (20 years, 10 months ago) by aono
Branch: MAIN
CVS Tags: freewnn-1-1-1-a021
Changes since 1.2: +5124 -2615 lines
Update Libtool to 1.5 .... You will make shared library
for Darwin / MacOSX (and probably for some more platforms).
Main part from [freewnn:00978].

FIXME:  For now, you will see many libtool warning (require --mode=MODE)
       on build time.

Notice for developer: You need autoconf-2.50 or later to create configure.

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