Error Buddy

Do you have an error message from your application? Then find the answer with Error Buddy. You can search over 40000 source code files and troubleshooting documents using our beta lucene/nutch search interface or if you prefer, search as normal using google. With LXR technology you can drill right down into the line of source code where it came from with full cross-referencing.

If after searching you didn't get your ideal answer, or you are still unclear what the error means, you can choose to post that question to the community forums following the link included in the search results.

corestack/ libtool-1.5.14/ libtool.m4 [1.6]
001 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
002 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005
003 ## Free Software Foundation, Inc.
004 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
005 ##
006 ## This file is free software; the Free Software Foundation gives
007 ## unlimited permission to copy and/or distribute it, with or without
008 ## modifications, as long as this notice is preserved.
009 
010 # serial 47 AC_PROG_LIBTOOL
011 
012 
013 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
014 # -----------------------------------------------------------
015 # If this macro is not defined by Autoconf, define it here.
016 m4_ifdef([AC_PROVIDE_IFELSE],
017          [],
018          [m4_define([AC_PROVIDE_IFELSE],
019                  [m4_ifdef([AC_PROVIDE_$1],
020                            [$2], [$3])])])
021 
022 
023 # AC_PROG_LIBTOOL
024 # ---------------
025 AC_DEFUN([AC_PROG_LIBTOOL],
026 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
027 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
028 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
029   AC_PROVIDE_IFELSE([AC_PROG_CXX],
030     [AC_LIBTOOL_CXX],
031     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
032   ])])
033 dnl And a similar setup for Fortran 77 support
034   AC_PROVIDE_IFELSE([AC_PROG_F77],
035     [AC_LIBTOOL_F77],
036     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
037 ])])
038 
039 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
040 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
041 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
042   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
043     [AC_LIBTOOL_GCJ],
044     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
045       [AC_LIBTOOL_GCJ],
046       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
047         [AC_LIBTOOL_GCJ],
048       [ifdef([AC_PROG_GCJ],
049              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
050        ifdef([A][M_PROG_GCJ],
051              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
052        ifdef([LT_AC_PROG_GCJ],
053              [define([LT_AC_PROG_GCJ],
054                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
055 ])])# AC_PROG_LIBTOOL
056 
057 
058 # _AC_PROG_LIBTOOL
059 # ----------------
060 AC_DEFUN([_AC_PROG_LIBTOOL],
061 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
062 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
063 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
064 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
065 
066 # This can be used to rebuild libtool when needed
067 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
068 
069 # Always use our own libtool.
070 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
071 AC_SUBST(LIBTOOL)dnl
072 
073 # Prevent multiple expansion
074 define([AC_PROG_LIBTOOL], [])
075 ])# _AC_PROG_LIBTOOL
076 
077 
078 # AC_LIBTOOL_SETUP
079 # ----------------
080 AC_DEFUN([AC_LIBTOOL_SETUP],
081 [AC_PREREQ(2.50)dnl
082 AC_REQUIRE([AC_ENABLE_SHARED])dnl
083 AC_REQUIRE([AC_ENABLE_STATIC])dnl
084 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
085 AC_REQUIRE([AC_CANONICAL_HOST])dnl
086 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
087 AC_REQUIRE([AC_PROG_CC])dnl
088 AC_REQUIRE([AC_PROG_LD])dnl
089 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
090 AC_REQUIRE([AC_PROG_NM])dnl
091 
092 AC_REQUIRE([AC_PROG_LN_S])dnl
093 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
094 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
095 AC_REQUIRE([AC_OBJEXT])dnl
096 AC_REQUIRE([AC_EXEEXT])dnl
097 dnl
098 
099 AC_LIBTOOL_SYS_MAX_CMD_LEN
100 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
101 AC_LIBTOOL_OBJDIR
102 
103 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
104 _LT_AC_PROG_ECHO_BACKSLASH
105 
106 case $host_os in
107 aix3*)
108   # AIX sometimes has problems with the GCC collect2 program.  For some
109   # reason, if we set the COLLECT_NAMES environment variable, the problems
110   # vanish in a puff of smoke.
111   if test "X${COLLECT_NAMES+set}" != Xset; then
112     COLLECT_NAMES=
113     export COLLECT_NAMES
114   fi
115   ;;
116 esac
117 
118 # Sed substitution that helps us do robust quoting.  It backslashifies
119 # metacharacters that are still active within double-quoted strings.
120 Xsed='sed -e s/^X//'
121 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
122 
123 # Same as above, but do not quote variable references.
124 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
125 
126 # Sed substitution to delay expansion of an escaped shell variable in a
127 # double_quote_subst'ed string.
128 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
129 
130 # Sed substitution to avoid accidental globbing in evaled expressions
131 no_glob_subst='s/\*/\\\*/g'
132 
133 # Constants:
134 rm="rm -f"
135 
136 # Global variables:
137 default_ofile=libtool
138 can_build_shared=yes
139 
140 # All known linkers require a `.a' archive for static linking (except M$VC,
141 # which needs '.lib').
142 libext=a
143 ltmain="$ac_aux_dir/ltmain.sh"
144 ofile="$default_ofile"
145 with_gnu_ld="$lt_cv_prog_gnu_ld"
146 
147 AC_CHECK_TOOL(AR, ar, false)
148 AC_CHECK_TOOL(RANLIB, ranlib, :)
149 AC_CHECK_TOOL(STRIP, strip, :)
150 
151 old_CC="$CC"
152 old_CFLAGS="$CFLAGS"
153 
154 # Set sane defaults for various variables
155 test -z "$AR" && AR=ar
156 test -z "$AR_FLAGS" && AR_FLAGS=cru
157 test -z "$AS" && AS=as
158 test -z "$CC" && CC=cc
159 test -z "$LTCC" && LTCC=$CC
160 test -z "$DLLTOOL" && DLLTOOL=dlltool
161 test -z "$LD" && LD=ld
162 test -z "$LN_S" && LN_S="ln -s"
163 test -z "$MAGIC_CMD" && MAGIC_CMD=file
164 test -z "$NM" && NM=nm
165 test -z "$SED" && SED=sed
166 test -z "$OBJDUMP" && OBJDUMP=objdump
167 test -z "$RANLIB" && RANLIB=:
168 test -z "$STRIP" && STRIP=:
169 test -z "$ac_objext" && ac_objext=o
170 
171 # Determine commands to create old-style static archives.
172 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
173 old_postinstall_cmds='chmod 644 $oldlib'
174 old_postuninstall_cmds=
175 
176 if test -n "$RANLIB"; then
177   case $host_os in
178   openbsd*)
179     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
180     ;;
181   *)
182     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
183     ;;
184   esac
185   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
186 fi
187 
188 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
189 
190 # Only perform the check for file, if the check method requires it
191 case $deplibs_check_method in
192 file_magic*)
193   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
194     AC_PATH_MAGIC
195   fi
196   ;;
197 esac
198 
199 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
200 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
201 enable_win32_dll=yes, enable_win32_dll=no)
202 
203 AC_ARG_ENABLE([libtool-lock],
204     [AC_HELP_STRING([--disable-libtool-lock],
205         [avoid locking (might break parallel builds)])])
206 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
207 
208 AC_ARG_WITH([pic],
209     [AC_HELP_STRING([--with-pic],
210         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
211     [pic_mode="$withval"],
212     [pic_mode=default])
213 test -z "$pic_mode" && pic_mode=default
214 
215 # Use C for the default configuration in the libtool script
216 tagname=
217 AC_LIBTOOL_LANG_C_CONFIG
218 _LT_AC_TAGCONFIG
219 ])# AC_LIBTOOL_SETUP
220 
221 
222 # _LT_AC_SYS_COMPILER
223 # -------------------
224 AC_DEFUN([_LT_AC_SYS_COMPILER],
225 [AC_REQUIRE([AC_PROG_CC])dnl
226 
227 # If no C compiler was specified, use CC.
228 LTCC=${LTCC-"$CC"}
229 
230 # Allow CC to be a program name with arguments.
231 compiler=$CC
232 ])# _LT_AC_SYS_COMPILER
233 
234 
235 # _LT_AC_SYS_LIBPATH_AIX
236 # ----------------------
237 # Links a minimal program and checks the executable
238 # for the system default hardcoded library path. In most cases,
239 # this is /usr/lib:/lib, but when the MPI compilers are used
240 # the location of the communication and MPI libs are included too.
241 # If we don't find anything, use the default library path according
242 # to the aix ld manual.
243 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
244 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
245 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
246 }'`
247 # Check for a 64-bit object if we didn't find anything.
248 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; }
249 }'`; fi],[])
250 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
251 ])# _LT_AC_SYS_LIBPATH_AIX
252 
253 
254 # _LT_AC_SHELL_INIT(ARG)
255 # ----------------------
256 AC_DEFUN([_LT_AC_SHELL_INIT],
257 [ifdef([AC_DIVERSION_NOTICE],
258              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
259          [AC_DIVERT_PUSH(NOTICE)])
260 $1
261 AC_DIVERT_POP
262 ])# _LT_AC_SHELL_INIT
263 
264 
265 # _LT_AC_PROG_ECHO_BACKSLASH
266 # --------------------------
267 # Add some code to the start of the generated configure script which
268 # will find an echo command which doesn't interpret backslashes.
269 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
270 [_LT_AC_SHELL_INIT([
271 # Check that we are running under the correct shell.
272 SHELL=${CONFIG_SHELL-/bin/sh}
273 
274 case X$ECHO in
275 X*--fallback-echo)
276   # Remove one level of quotation (which was required for Make).
277   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
278   ;;
279 esac
280 
281 echo=${ECHO-echo}
282 if test "X[$]1" = X--no-reexec; then
283   # Discard the --no-reexec flag, and continue.
284   shift
285 elif test "X[$]1" = X--fallback-echo; then
286   # Avoid inline document here, it may be left over
287   :
288 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
289   # Yippee, $echo works!
290   :
291 else
292   # Restart under the correct shell.
293   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
294 fi
295 
296 if test "X[$]1" = X--fallback-echo; then
297   # used as fallback echo
298   shift
299   cat <<EOF
300 [$]*
301 EOF
302   exit 0
303 fi
304 
305 # The HP-UX ksh and POSIX shell print the target directory to stdout
306 # if CDPATH is set.
307 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
308 
309 if test -z "$ECHO"; then
310 if test "X${echo_test_string+set}" != Xset; then
311 # find a string as large as possible, as long as the shell can cope with it
312   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
313     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
314     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
315        echo_test_string="`eval $cmd`" &&
316        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
317     then
318       break
319     fi
320   done
321 fi
322 
323 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
324    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
325    test "X$echo_testing_string" = "X$echo_test_string"; then
326   :
327 else
328   # The Solaris, AIX, and Digital Unix default echo programs unquote
329   # backslashes.  This makes it impossible to quote backslashes using
330   #   echo "$something" | sed 's/\\/\\\\/g'
331   #
332   # So, first we look for a working echo in the user's PATH.
333 
334   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
335   for dir in $PATH /usr/ucb; do
336     IFS="$lt_save_ifs"
337     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
338        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
339        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
340        test "X$echo_testing_string" = "X$echo_test_string"; then
341       echo="$dir/echo"
342       break
343     fi
344   done
345   IFS="$lt_save_ifs"
346 
347   if test "X$echo" = Xecho; then
348     # We didn't find a better echo, so look for alternatives.
349     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
350        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
351        test "X$echo_testing_string" = "X$echo_test_string"; then
352       # This shell has a builtin print -r that does the trick.
353       echo='print -r'
354     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
355          test "X$CONFIG_SHELL" != X/bin/ksh; then
356       # If we have ksh, try running configure again with it.
357       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
358       export ORIGINAL_CONFIG_SHELL
359       CONFIG_SHELL=/bin/ksh
360       export CONFIG_SHELL
361       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
362     else
363       # Try using printf.
364       echo='printf %s\n'
365       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
366          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
367          test "X$echo_testing_string" = "X$echo_test_string"; then
368         # Cool, printf works
369         :
370       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
371            test "X$echo_testing_string" = 'X\t' &&
372            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
373            test "X$echo_testing_string" = "X$echo_test_string"; then
374         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
375         export CONFIG_SHELL
376         SHELL="$CONFIG_SHELL"
377         export SHELL
378         echo="$CONFIG_SHELL [$]0 --fallback-echo"
379       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
380            test "X$echo_testing_string" = 'X\t' &&
381            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
382            test "X$echo_testing_string" = "X$echo_test_string"; then
383         echo="$CONFIG_SHELL [$]0 --fallback-echo"
384       else
385         # maybe with a smaller string...
386         prev=:
387 
388         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
389           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
390           then
391             break
392           fi
393           prev="$cmd"
394         done
395 
396         if test "$prev" != 'sed 50q "[$]0"'; then
397           echo_test_string=`eval $prev`
398           export echo_test_string
399           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
400         else
401           # Oops.  We lost completely, so just stick with echo.
402           echo=echo
403         fi
404       fi
405     fi
406   fi
407 fi
408 fi
409 
410 # Copy echo and quote the copy suitably for passing to libtool from
411 # the Makefile, instead of quoting the original, which is used later.
412 ECHO=$echo
413 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
414    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
415 fi
416 
417 AC_SUBST(ECHO)
418 ])])# _LT_AC_PROG_ECHO_BACKSLASH
419 
420 
421 # _LT_AC_LOCK
422 # -----------
423 AC_DEFUN([_LT_AC_LOCK],
424 [AC_ARG_ENABLE([libtool-lock],
425     [AC_HELP_STRING([--disable-libtool-lock],
426         [avoid locking (might break parallel builds)])])
427 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
428 
429 # Some flags need to be propagated to the compiler or linker for good
430 # libtool support.
431 case $host in
432 ia64-*-hpux*)
433   # Find out which ABI we are using.
434   echo 'int i;' > conftest.$ac_ext
435   if AC_TRY_EVAL(ac_compile); then
436     case `/usr/bin/file conftest.$ac_objext` in
437     *ELF-32*)
438       HPUX_IA64_MODE="32"
439       ;;
440     *ELF-64*)
441       HPUX_IA64_MODE="64"
442       ;;
443     esac
444   fi
445   rm -rf conftest*
446   ;;
447 *-*-irix6*)
448   # Find out which ABI we are using.
449   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
450   if AC_TRY_EVAL(ac_compile); then
451    if test "$lt_cv_prog_gnu_ld" = yes; then
452     case `/usr/bin/file conftest.$ac_objext` in
453     *32-bit*)
454       LD="${LD-ld} -melf32bsmip"
455       ;;
456     *N32*)
457       LD="${LD-ld} -melf32bmipn32"
458       ;;
459     *64-bit*)
460       LD="${LD-ld} -melf64bmip"
461       ;;
462     esac
463    else
464     case `/usr/bin/file conftest.$ac_objext` in
465     *32-bit*)
466       LD="${LD-ld} -32"
467       ;;
468     *N32*)
469       LD="${LD-ld} -n32"
470       ;;
471     *64-bit*)
472       LD="${LD-ld} -64"
473       ;;
474     esac
475    fi
476   fi
477   rm -rf conftest*
478   ;;
479 
480 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
481   # Find out which ABI we are using.
482   echo 'int i;' > conftest.$ac_ext
483   if AC_TRY_EVAL(ac_compile); then
484     case "`/usr/bin/file conftest.o`" in
485     *32-bit*)
486       case $host in
487         x86_64-*linux*)
488           LD="${LD-ld} -m elf_i386"
489           ;;
490         ppc64-*linux*|powerpc64-*linux*)
491           LD="${LD-ld} -m elf32ppclinux"
492           ;;
493         s390x-*linux*)
494           LD="${LD-ld} -m elf_s390"
495           ;;
496         sparc64-*linux*)
497           LD="${LD-ld} -m elf32_sparc"
498           ;;
499       esac
500       ;;
501     *64-bit*)
502       case $host in
503         x86_64-*linux*)
504           LD="${LD-ld} -m elf_x86_64"
505           ;;
506         ppc*-*linux*|powerpc*-*linux*)
507           LD="${LD-ld} -m elf64ppc"
508           ;;
509         s390*-*linux*)
510           LD="${LD-ld} -m elf64_s390"
511           ;;
512         sparc*-*linux*)
513           LD="${LD-ld} -m elf64_sparc"
514           ;;
515       esac
516       ;;
517     esac
518   fi
519   rm -rf conftest*
520   ;;
521 
522 *-*-sco3.2v5*)
523   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
524   SAVE_CFLAGS="$CFLAGS"
525   CFLAGS="$CFLAGS -belf"
526   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
527     [AC_LANG_PUSH(C)
528      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
529      AC_LANG_POP])
530   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
531     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
532     CFLAGS="$SAVE_CFLAGS"
533   fi
534   ;;
535 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
536 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
537   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
538   AC_CHECK_TOOL(AS, as, false)
539   AC_CHECK_TOOL(OBJDUMP, objdump, false)
540   ;;
541   ])
542 esac
543 
544 need_locks="$enable_libtool_lock"
545 
546 ])# _LT_AC_LOCK
547 
548 
549 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
550 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
551 # ----------------------------------------------------------------
552 # Check whether the given compiler option works
553 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
554 [AC_REQUIRE([LT_AC_PROG_SED])
555 AC_CACHE_CHECK([$1], [$2],
556   [$2=no
557   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
558    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
559    lt_compiler_flag="$3"
560    # Insert the option either (1) after the last *FLAGS variable, or
561    # (2) before a word containing "conftest.", or (3) at the end.
562    # Note that $ac_compile itself does not contain backslashes and begins
563    # with a dollar sign (not a hyphen), so the echo should work correctly.
564    # The option is referenced via a variable to avoid confusing sed.
565    lt_compile=`echo "$ac_compile" | $SED \
566    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
567    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
568    -e 's:$: $lt_compiler_flag:'`
569    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
570    (eval "$lt_compile" 2>conftest.err)
571    ac_status=$?
572    cat conftest.err >&AS_MESSAGE_LOG_FD
573    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
574    if (exit $ac_status) && test -s "$ac_outfile"; then
575      # The compiler can only warn and ignore the option if not recognized
576      # So say no if there are warnings
577      if test ! -s conftest.err; then
578        $2=yes
579      fi
580    fi
581    $rm conftest*
582 ])
583 
584 if test x"[$]$2" = xyes; then
585     ifelse([$5], , :, [$5])
586 else
587     ifelse([$6], , :, [$6])
588 fi
589 ])# AC_LIBTOOL_COMPILER_OPTION
590 
591 
592 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
593 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
594 # ------------------------------------------------------------
595 # Check whether the given compiler option works
596 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
597 [AC_CACHE_CHECK([$1], [$2],
598   [$2=no
599    save_LDFLAGS="$LDFLAGS"
600    LDFLAGS="$LDFLAGS $3"
601    printf "$lt_simple_link_test_code" > conftest.$ac_ext
602    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
603      # The compiler can only warn and ignore the option if not recognized
604      # So say no if there are warnings
605      if test -s conftest.err; then
606        # Append any errors to the config.log.
607        cat conftest.err 1>&AS_MESSAGE_LOG_FD
608      else
609        $2=yes
610      fi
611    fi
612    $rm conftest*
613    LDFLAGS="$save_LDFLAGS"
614 ])
615 
616 if test x"[$]$2" = xyes; then
617     ifelse([$4], , :, [$4])
618 else
619     ifelse([$5], , :, [$5])
620 fi
621 ])# AC_LIBTOOL_LINKER_OPTION
622 
623 
624 # AC_LIBTOOL_SYS_MAX_CMD_LEN
625 # --------------------------
626 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
627 [# find the maximum length of command line arguments
628 AC_MSG_CHECKING([the maximum length of command line arguments])
629 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
630   i=0
631   teststring="ABCD"
632 
633   case $build_os in
634   msdosdjgpp*)
635     # On DJGPP, this test can blow up pretty badly due to problems in libc
636     # (any single argument exceeding 2000 bytes causes a buffer overrun
637     # during glob expansion).  Even if it were fixed, the result of this
638     # check would be larger than it should be.
639     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
640     ;;
641 
642   gnu*)
643     # Under GNU Hurd, this test is not required because there is
644     # no limit to the length of command line arguments.
645     # Libtool will interpret -1 as no limit whatsoever
646     lt_cv_sys_max_cmd_len=-1;
647     ;;
648 
649   cygwin* | mingw*)
650     # On Win9x/ME, this test blows up -- it succeeds, but takes
651     # about 5 minutes as the teststring grows exponentially.
652     # Worse, since 9x/ME are not pre-emptively multitasking,
653     # you end up with a "frozen" computer, even though with patience
654     # the test eventually succeeds (with a max line length of 256k).
655     # Instead, let's just punt: use the minimum linelength reported by
656     # all of the supported platforms: 8192 (on NT/2K/XP).
657     lt_cv_sys_max_cmd_len=8192;
658     ;;
659 
660   amigaos*)
661     # On AmigaOS with pdksh, this test takes hours, literally.
662     # So we just punt and use a minimum line length of 8192.
663     lt_cv_sys_max_cmd_len=8192;
664     ;;
665 
666   netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
667     # This has been around since 386BSD, at least.  Likely further.
668     if test -x /sbin/sysctl; then
669       lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
670     elif test -x /usr/sbin/sysctl; then
671       lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
672     else
673       lt_cv_sys_max_cmd_len=65536 # usable default for *BSD
674     fi
675     # And add a safety zone
676     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
677     ;;
678   osf*)
679     # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
680     # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
681     # nice to cause kernel panics so lets avoid the loop below.
682     # First set a reasonable default.
683     lt_cv_sys_max_cmd_len=16384
684     # 
685     if test -x /sbin/sysconfig; then
686       case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
687         *1*) lt_cv_sys_max_cmd_len=-1 ;;
688       esac
689     fi
690     ;;
691   *)
692     # If test is not a shell built-in, we'll probably end up computing a
693     # maximum length that is only half of the actual maximum length, but
694     # we can't tell.
695     SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
696     while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
697                = "XX$teststring") >/dev/null 2>&1 &&
698             new_result=`expr "X$teststring" : ".*" 2>&1` &&
699             lt_cv_sys_max_cmd_len=$new_result &&
700             test $i != 17 # 1/2 MB should be enough
701     do
702       i=`expr $i + 1`
703       teststring=$teststring$teststring
704     done
705     teststring=
706     # Add a significant safety factor because C++ compilers can tack on massive
707     # amounts of additional arguments before passing them to the linker.
708     # It appears as though 1/2 is a usable value.
709     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
710     ;;
711   esac
712 ])
713 if test -n $lt_cv_sys_max_cmd_len ; then
714   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
715 else
716   AC_MSG_RESULT(none)
717 fi
718 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
719 
720 
721 # _LT_AC_CHECK_DLFCN
722 # --------------------
723 AC_DEFUN([_LT_AC_CHECK_DLFCN],
724 [AC_CHECK_HEADERS(dlfcn.h)dnl
725 ])# _LT_AC_CHECK_DLFCN
726 
727 
728 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
729 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
730 # ------------------------------------------------------------------
731 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
732 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
733 if test "$cross_compiling" = yes; then :
734   [$4]
735 else
736   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
737   lt_status=$lt_dlunknown
738   cat > conftest.$ac_ext <<EOF
739 [#line __oline__ "configure"
740 #include "confdefs.h"
741 
742 #if HAVE_DLFCN_H
743 #include <dlfcn.h>
744 #endif
745 
746 #include <stdio.h>
747 
748 #ifdef RTLD_GLOBAL
749 #  define LT_DLGLOBAL           RTLD_GLOBAL
750 #else
751 #  ifdef DL_GLOBAL
752 #    define LT_DLGLOBAL         DL_GLOBAL
753 #  else
754 #    define LT_DLGLOBAL         0
755 #  endif
756 #endif
757 
758 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
759    find out it does not work in some platform. */
760 #ifndef LT_DLLAZY_OR_NOW
761 #  ifdef RTLD_LAZY
762 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
763 #  else
764 #    ifdef DL_LAZY
765 #      define LT_DLLAZY_OR_NOW          DL_LAZY
766 #    else
767 #      ifdef RTLD_NOW
768 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
769 #      else
770 #        ifdef DL_NOW
771 #          define LT_DLLAZY_OR_NOW      DL_NOW
772 #        else
773 #          define LT_DLLAZY_OR_NOW      0
774 #        endif
775 #      endif
776 #    endif
777 #  endif
778 #endif
779 
780 #ifdef __cplusplus
781 extern "C" void exit (int);
782 #endif
783 
784 void fnord() { int i=42;}
785 int main ()
786 {
787   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
788   int status = $lt_dlunknown;
789 
790   if (self)
791     {
792       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
793       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
794       /* dlclose (self); */
795     }
796 
797     exit (status);
798 }]
799 EOF
800   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
801     (./conftest; exit; ) 2>/dev/null
802     lt_status=$?
803     case x$lt_status in
804       x$lt_dlno_uscore) $1 ;;
805       x$lt_dlneed_uscore) $2 ;;
806       x$lt_unknown|x*) $3 ;;
807     esac
808   else :
809     # compilation failed
810     $3
811   fi
812 fi
813 rm -fr conftest*
814 ])# _LT_AC_TRY_DLOPEN_SELF
815 
816 
817 # AC_LIBTOOL_DLOPEN_SELF
818 # -------------------
819 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
820 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
821 if test "x$enable_dlopen" != xyes; then
822   enable_dlopen=unknown
823   enable_dlopen_self=unknown
824   enable_dlopen_self_static=unknown
825 else
826   lt_cv_dlopen=no
827   lt_cv_dlopen_libs=
828 
829   case $host_os in
830   beos*)
831     lt_cv_dlopen="load_add_on"
832     lt_cv_dlopen_libs=
833     lt_cv_dlopen_self=yes
834     ;;
835 
836   mingw* | pw32*)
837     lt_cv_dlopen="LoadLibrary"
838     lt_cv_dlopen_libs=
839    ;;
840 
841   cygwin*)
842     lt_cv_dlopen="dlopen"
843     lt_cv_dlopen_libs=
844    ;;
845 
846   darwin*)
847   # if libdl is installed we need to link against it
848     AC_CHECK_LIB([dl], [dlopen],
849                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
850     lt_cv_dlopen="dyld"
851     lt_cv_dlopen_libs=
852     lt_cv_dlopen_self=yes
853     ])
854    ;;
855 
856   *)
857     AC_CHECK_FUNC([shl_load],
858           [lt_cv_dlopen="shl_load"],
859       [AC_CHECK_LIB([dld], [shl_load],
860             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
861         [AC_CHECK_FUNC([dlopen],
862               [lt_cv_dlopen="dlopen"],
863           [AC_CHECK_LIB([dl], [dlopen],
864                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
865             [AC_CHECK_LIB([svld], [dlopen],
866                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
867               [AC_CHECK_LIB([dld], [dld_link],
868                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
869               ])
870             ])
871           ])
872         ])
873       ])
874     ;;
875   esac
876 
877   if test "x$lt_cv_dlopen" != xno; then
878     enable_dlopen=yes
879   else
880     enable_dlopen=no
881   fi
882 
883   case $lt_cv_dlopen in
884   dlopen)
885     save_CPPFLAGS="$CPPFLAGS"
886     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
887 
888     save_LDFLAGS="$LDFLAGS"
889     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
890 
891     save_LIBS="$LIBS"
892     LIBS="$lt_cv_dlopen_libs $LIBS"
893 
894     AC_CACHE_CHECK([whether a program can dlopen itself],
895           lt_cv_dlopen_self, [dnl
896           _LT_AC_TRY_DLOPEN_SELF(
897             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
898             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
899     ])
900 
901     if test "x$lt_cv_dlopen_self" = xyes; then
902       LDFLAGS="$LDFLAGS $link_static_flag"
903       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
904           lt_cv_dlopen_self_static, [dnl
905           _LT_AC_TRY_DLOPEN_SELF(
906             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
907             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
908       ])
909     fi
910 
911     CPPFLAGS="$save_CPPFLAGS"
912     LDFLAGS="$save_LDFLAGS"
913     LIBS="$save_LIBS"
914     ;;
915   esac
916 
917   case $lt_cv_dlopen_self in
918   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
919   *) enable_dlopen_self=unknown ;;
920   esac
921 
922   case $lt_cv_dlopen_self_static in
923   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
924   *) enable_dlopen_self_static=unknown ;;
925   esac
926 fi
927 ])# AC_LIBTOOL_DLOPEN_SELF
928 
929 
930 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
931 # ---------------------------------
932 # Check to see if options -c and -o are simultaneously supported by compiler
933 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
934 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
935 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
936   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
937   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
938    $rm -r conftest 2>/dev/null
939    mkdir conftest
940    cd conftest
941    mkdir out
942    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
943 
944    lt_compiler_flag="-o out/conftest2.$ac_objext"
945    # Insert the option either (1) after the last *FLAGS variable, or
946    # (2) before a word containing "conftest.", or (3) at the end.
947    # Note that $ac_compile itself does not contain backslashes and begins
948    # with a dollar sign (not a hyphen), so the echo should work correctly.
949    lt_compile=`echo "$ac_compile" | $SED \
950    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
951    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
952    -e 's:$: $lt_compiler_flag:'`
953    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
954    (eval "$lt_compile" 2>out/conftest.err)
955    ac_status=$?
956    cat out/conftest.err >&AS_MESSAGE_LOG_FD
957    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
958    if (exit $ac_status) && test -s out/conftest2.$ac_objext
959    then
960      # The compiler can only warn and ignore the option if not recognized
961      # So say no if there are warnings
962      if test ! -s out/conftest.err; then
963        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
964      fi
965    fi
966    chmod u+w .
967    $rm conftest*
968    # SGI C++ compiler will create directory out/ii_files/ for
969    # template instantiation
970    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
971    $rm out/* && rmdir out
972    cd ..
973    rmdir conftest
974    $rm conftest*
975 ])
976 ])# AC_LIBTOOL_PROG_CC_C_O
977 
978 
979 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
980 # -----------------------------------------
981 # Check to see if we can do hard links to lock some files if needed
982 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
983 [AC_REQUIRE([_LT_AC_LOCK])dnl
984 
985 hard_links="nottested"
986 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
987   # do not overwrite the value of need_locks provided by the user
988   AC_MSG_CHECKING([if we can lock with hard links])
989   hard_links=yes
990   $rm conftest*
991   ln conftest.a conftest.b 2>/dev/null && hard_links=no
992   touch conftest.a
993   ln conftest.a conftest.b 2>&5 || hard_links=no
994   ln conftest.a conftest.b 2>/dev/null && hard_links=no
995   AC_MSG_RESULT([$hard_links])
996   if test "$hard_links" = no; then
997     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
998     need_locks=warn
999   fi
1000 else
1001   need_locks=no
1002 fi
1003 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1004 
1005 
1006 # AC_LIBTOOL_OBJDIR
1007 # -----------------
1008 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1009 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1010 [rm -f .libs 2>/dev/null
1011 mkdir .libs 2>/dev/null
1012 if test -d .libs; then
1013   lt_cv_objdir=.libs
1014 else
1015   # MS-DOS does not allow filenames that begin with a dot.
1016   lt_cv_objdir=_libs
1017 fi
1018 rmdir .libs 2>/dev/null])
1019 objdir=$lt_cv_objdir
1020 ])# AC_LIBTOOL_OBJDIR
1021 
1022 
1023 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1024 # ----------------------------------------------
1025 # Check hardcoding attributes.
1026 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1027 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1028 _LT_AC_TAGVAR(hardcode_action, $1)=
1029 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1030    test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1031    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1032 
1033   # We can hardcode non-existant directories.
1034   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1035      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1036      # have to relink, otherwise we might link with an installed library
1037      # when we should be linking with a yet-to-be-installed one
1038      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1039      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
104