:: VPN_Solutions/aclocal.m4 ::
HOME

Interested in finding out how I created this web page? Click here.

VPN_Solutions/aclocal.m4


 [ stunnel-4.04 ]  [ freeswan-2.01 ]  [ cipe-1.5.4 ]  [ pptp-linux-1.2.0 ]  [ poptop-1.1.4 ]  [ vtun-2.6 ]  [ openvpn-1.4.2 ]  [ amvpn-0.96 ]  [ vpnd-1.1 ]  [ tinc-CABAL ]  [ htun-0.9.5 ]  [ linvpn-2.6-pre1 ]  [ yavipin-0.9.5 ]  [ openssl-0.9.7a ]  [ l2tpd-0.69 ]  [ tun-1.1 ]  [ tcpdump-3.7.2 ]  [ ppp-2.4.2_cvs_20030610 ]  [ openssh-3.5p1 ]  [ zebra-0.93b ]  [ simplesim-3.0 ]  [ tinyOS ]  [ ipband-0.7.2 ]  [ libvorbis-1.0.1 ]  [ gzip-1.2.4 ]  [ lame-3.96.1 ]  [ SignalHandling ]  [ ShadowPaging ]  [ ConcurrentQuickSort ]  [ linkSateRouting ]  [ RemoteNFS ]   

  [ source navigation ]   [ diff markup ]   [ identifier search ]   [ freetext search ]   [ file search ]  

  1 dnl aclocal.m4 generated automatically by aclocal 1.4-p4
  2 
  3 dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
  4 dnl This file is free software; the Free Software Foundation
  5 dnl gives unlimited permission to copy and/or distribute it,
  6 dnl with or without modifications, as long as this notice is preserved.
  7 
  8 dnl This program is distributed in the hope that it will be useful,
  9 dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
 10 dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 11 dnl PARTICULAR PURPOSE.
 12 
 13 # Do all the work for Automake.  This macro actually does too much --
 14 # some checks are only needed if your package does certain things.
 15 # But this isn't really a big deal.
 16 
 17 # serial 1
 18 
 19 dnl Usage:
 20 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 21 
 22 AC_DEFUN(AM_INIT_AUTOMAKE,
 23 [AC_REQUIRE([AC_PROG_INSTALL])
 24 PACKAGE=[$1]
 25 AC_SUBST(PACKAGE)
 26 VERSION=[$2]
 27 AC_SUBST(VERSION)
 28 dnl test to see if srcdir already configured
 29 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 30   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 31 fi
 32 ifelse([$3],,
 33 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 34 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 35 AC_REQUIRE([AM_SANITY_CHECK])
 36 AC_REQUIRE([AC_ARG_PROGRAM])
 37 dnl FIXME This is truly gross.
 38 missing_dir=`cd $ac_aux_dir && pwd`
 39 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
 40 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 41 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
 42 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 43 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 44 AC_REQUIRE([AC_PROG_MAKE_SET])])
 45 
 46 #
 47 # Check to make sure that the build environment is sane.
 48 #
 49 
 50 AC_DEFUN(AM_SANITY_CHECK,
 51 [AC_MSG_CHECKING([whether build environment is sane])
 52 # Just in case
 53 sleep 1
 54 echo timestamp > conftestfile
 55 # Do `set' in a subshell so we don't clobber the current shell's
 56 # arguments.  Must try -L first in case configure is actually a
 57 # symlink; some systems play weird games with the mod time of symlinks
 58 # (eg FreeBSD returns the mod time of the symlink's containing
 59 # directory).
 60 if (
 61    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
 62    if test "[$]*" = "X"; then
 63       # -L didn't work.
 64       set X `ls -t $srcdir/configure conftestfile`
 65    fi
 66    if test "[$]*" != "X $srcdir/configure conftestfile" \
 67       && test "[$]*" != "X conftestfile $srcdir/configure"; then
 68 
 69       # If neither matched, then we have a broken ls.  This can happen
 70       # if, for instance, CONFIG_SHELL is bash and it inherits a
 71       # broken ls alias from the environment.  This has actually
 72       # happened.  Such a system could not be considered "sane".
 73       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 74 alias in your environment])
 75    fi
 76 
 77    test "[$]2" = conftestfile
 78    )
 79 then
 80    # Ok.
 81    :
 82 else
 83    AC_MSG_ERROR([newly created file is older than distributed files!
 84 Check your system clock])
 85 fi
 86 rm -f conftest*
 87 AC_MSG_RESULT(yes)])
 88 
 89 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 90 dnl The program must properly implement --version.
 91 AC_DEFUN(AM_MISSING_PROG,
 92 [AC_MSG_CHECKING(for working $2)
 93 # Run test in a subshell; some versions of sh will print an error if
 94 # an executable is not found, even if stderr is redirected.
 95 # Redirect stdin to placate older versions of autoconf.  Sigh.
 96 if ($2 --version) < /dev/null > /dev/null 2>&1; then
 97    $1=$2
 98    AC_MSG_RESULT(found)
 99 else
100    $1="$3/missing $2"
101    AC_MSG_RESULT(missing)
102 fi
103 AC_SUBST($1)])
104 
105 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
106 
107 # serial 46 AC_PROG_LIBTOOL
108 
109 AC_DEFUN([AC_PROG_LIBTOOL],
110 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
111 
112 # This can be used to rebuild libtool when needed
113 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
114 
115 # Always use our own libtool.
116 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
117 AC_SUBST(LIBTOOL)dnl
118 
119 # Prevent multiple expansion
120 define([AC_PROG_LIBTOOL], [])
121 ])
122 
123 AC_DEFUN([AC_LIBTOOL_SETUP],
124 [AC_PREREQ(2.13)dnl
125 AC_REQUIRE([AC_ENABLE_SHARED])dnl
126 AC_REQUIRE([AC_ENABLE_STATIC])dnl
127 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
128 AC_REQUIRE([AC_CANONICAL_HOST])dnl
129 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
130 AC_REQUIRE([AC_PROG_CC])dnl
131 AC_REQUIRE([AC_PROG_LD])dnl
132 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
133 AC_REQUIRE([AC_PROG_NM])dnl
134 AC_REQUIRE([AC_PROG_LN_S])dnl
135 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
136 AC_REQUIRE([AC_OBJEXT])dnl
137 AC_REQUIRE([AC_EXEEXT])dnl
138 dnl
139 
140 _LT_AC_PROG_ECHO_BACKSLASH
141 # Only perform the check for file, if the check method requires it
142 case $deplibs_check_method in
143 file_magic*)
144   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
145     AC_PATH_MAGIC
146   fi
147   ;;
148 esac
149 
150 AC_CHECK_TOOL(RANLIB, ranlib, :)
151 AC_CHECK_TOOL(STRIP, strip, :)
152 
153 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
154 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
155 enable_win32_dll=yes, enable_win32_dll=no)
156 
157 AC_ARG_ENABLE(libtool-lock,
158   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
159 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
160 
161 # Some flags need to be propagated to the compiler or linker for good
162 # libtool support.
163 case $host in
164 *-*-irix6*)
165   # Find out which ABI we are using.
166   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
167   if AC_TRY_EVAL(ac_compile); then
168     case `/usr/bin/file conftest.$ac_objext` in
169     *32-bit*)
170       LD="${LD-ld} -32"
171       ;;
172     *N32*)
173       LD="${LD-ld} -n32"
174       ;;
175     *64-bit*)
176       LD="${LD-ld} -64"
177       ;;
178     esac
179   fi
180   rm -rf conftest*
181   ;;
182 
183 *-*-sco3.2v5*)
184   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
185   SAVE_CFLAGS="$CFLAGS"
186   CFLAGS="$CFLAGS -belf"
187   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
188     [AC_LANG_SAVE
189      AC_LANG_C
190      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
191      AC_LANG_RESTORE])
192   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
193     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
194     CFLAGS="$SAVE_CFLAGS"
195   fi
196   ;;
197 
198 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
199 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
200   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
201   AC_CHECK_TOOL(AS, as, false)
202   AC_CHECK_TOOL(OBJDUMP, objdump, false)
203 
204   # recent cygwin and mingw systems supply a stub DllMain which the user
205   # can override, but on older systems we have to supply one
206   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
207     [AC_TRY_LINK([],
208       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
209       DllMain (0, 0, 0);],
210       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
211 
212   case $host/$CC in
213   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
214     # old mingw systems require "-dll" to link a DLL, while more recent ones
215     # require "-mdll"
216     SAVE_CFLAGS="$CFLAGS"
217     CFLAGS="$CFLAGS -mdll"
218     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
219       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
220     CFLAGS="$SAVE_CFLAGS" ;;
221   *-*-cygwin* | *-*-pw32*)
222     # cygwin systems need to pass --dll to the linker, and not link
223     # crt.o which will require a WinMain@16 definition.
224     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
225   esac
226   ;;
227   ])
228 esac
229 
230 _LT_AC_LTCONFIG_HACK
231 
232 ])
233 
234 # AC_LIBTOOL_HEADER_ASSERT
235 # ------------------------
236 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
237 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
238     [lt_cv_func_assert_works],
239     [case $host in
240     *-*-solaris*)
241       if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
242         case `$CC --version 2>/dev/null` in
243         [[12]].*) lt_cv_func_assert_works=no ;;
244         *)        lt_cv_func_assert_works=yes ;;
245         esac
246       fi
247       ;;
248     esac])
249 
250 if test "x$lt_cv_func_assert_works" = xyes; then
251   AC_CHECK_HEADERS(assert.h)
252 fi
253 ])# AC_LIBTOOL_HEADER_ASSERT
254 
255 # _LT_AC_CHECK_DLFCN
256 # --------------------
257 AC_DEFUN([_LT_AC_CHECK_DLFCN],
258 [AC_CHECK_HEADERS(dlfcn.h)
259 ])# _LT_AC_CHECK_DLFCN
260 
261 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
262 # ---------------------------------
263 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
264 [AC_REQUIRE([AC_CANONICAL_HOST])
265 AC_REQUIRE([AC_PROG_NM])
266 AC_REQUIRE([AC_OBJEXT])
267 # Check for command to grab the raw symbol name followed by C symbol from nm.
268 AC_MSG_CHECKING([command to parse $NM output])
269 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
270 
271 # These are sane defaults that work on at least a few old systems.
272 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
273 
274 # Character class describing NM global symbol codes.
275 symcode='[[BCDEGRST]]'
276 
277 # Regexp to match symbols that can be accessed directly from C.
278 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
279 
280 # Transform the above into a raw symbol and a C symbol.
281 symxfrm='\1 \2\3 \3'
282 
283 # Transform an extracted symbol line into a proper C declaration
284 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
285 
286 # Transform an extracted symbol line into symbol name and symbol address
287 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
288 
289 # Define system-specific variables.
290 case $host_os in
291 aix*)
292   symcode='[[BCDT]]'
293   ;;
294 cygwin* | mingw* | pw32*)
295   symcode='[[ABCDGISTW]]'
296   ;;
297 hpux*) # Its linker distinguishes data from code symbols
298   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
299   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
300   ;;
301 irix* | nonstopux*)
302   symcode='[[BCDEGRST]]'
303   ;;
304 solaris* | sysv5*)
305   symcode='[[BDT]]'
306   ;;
307 sysv4)
308   symcode='[[DFNSTU]]'
309   ;;
310 esac
311 
312 # Handle CRLF in mingw tool chain
313 opt_cr=
314 case $host_os in
315 mingw*)
316   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
317   ;;
318 esac
319 
320 # If we're using GNU nm, then use its standard symbol codes.
321 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
322   symcode='[[ABCDGISTW]]'
323 fi
324 
325 # Try without a prefix undercore, then with it.
326 for ac_symprfx in "" "_"; do
327 
328   # Write the raw and C identifiers.
329 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
330 
331   # Check to see that the pipe works correctly.
332   pipe_works=no
333   rm -f conftest*
334   cat > conftest.$ac_ext <<EOF
335 #ifdef __cplusplus
336 extern "C" {
337 #endif
338 char nm_test_var;
339 void nm_test_func(){}
340 #ifdef __cplusplus
341 }
342 #endif
343 int main(){nm_test_var='a';nm_test_func();return(0);}
344 EOF
345 
346   if AC_TRY_EVAL(ac_compile); then
347     # Now try to grab the symbols.
348     nlist=conftest.nm
349     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
350       # Try sorting and uniquifying the output.
351       if sort "$nlist" | uniq > "$nlist"T; then
352         mv -f "$nlist"T "$nlist"
353       else
354         rm -f "$nlist"T
355       fi
356 
357       # Make sure that we snagged all the symbols we need.
358       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
359         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
360           cat <<EOF > conftest.$ac_ext
361 #ifdef __cplusplus
362 extern "C" {
363 #endif
364 
365 EOF
366           # Now generate the symbol file.
367           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
368 
369           cat <<EOF >> conftest.$ac_ext
370 #if defined (__STDC__) && __STDC__
371 # define lt_ptr void *
372 #else
373 # define lt_ptr char *
374 # define const
375 #endif
376 
377 /* The mapping between symbol names and symbols. */
378 const struct {
379   const char *name;
380   lt_ptr address;
381 }
382 lt_preloaded_symbols[[]] =
383 {
384 EOF
385           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
386           cat <<\EOF >> conftest.$ac_ext
387   {0, (lt_ptr) 0}
388 };
389 
390 #ifdef __cplusplus
391 }
392 #endif
393 EOF
394           # Now try linking the two files.
395           mv conftest.$ac_objext conftstm.$ac_objext
396           save_LIBS="$LIBS"
397           save_CFLAGS="$CFLAGS"
398           LIBS="conftstm.$ac_objext"
399           CFLAGS="$CFLAGS$no_builtin_flag"
400           if AC_TRY_EVAL(ac_link) && test -s conftest; then
401             pipe_works=yes
402           fi
403           LIBS="$save_LIBS"
404           CFLAGS="$save_CFLAGS"
405         else
406           echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
407         fi
408       else
409         echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
410       fi
411     else
412       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
413     fi
414   else
415     echo "$progname: failed program was:" >&AC_FD_CC
416     cat conftest.$ac_ext >&5
417   fi
418   rm -f conftest* conftst*
419 
420   # Do not use the global_symbol_pipe unless it works.
421   if test "$pipe_works" = yes; then
422     break
423   else
424     lt_cv_sys_global_symbol_pipe=
425   fi
426 done
427 ])
428 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
429 if test -z "$lt_cv_sys_global_symbol_pipe"; then
430   global_symbol_to_cdecl=
431   global_symbol_to_c_name_address=
432 else
433   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
434   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
435 fi
436 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
437 then
438   AC_MSG_RESULT(failed)
439 else
440   AC_MSG_RESULT(ok)
441 fi
442 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
443 
444 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
445 # ---------------------------------
446 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
447 [# Find the correct PATH separator.  Usually this is `:', but
448 # DJGPP uses `;' like DOS.
449 if test "X${PATH_SEPARATOR+set}" != Xset; then
450   UNAME=${UNAME-`uname 2>/dev/null`}
451   case X$UNAME in
452     *-DOS) lt_cv_sys_path_separator=';' ;;
453     *)     lt_cv_sys_path_separator=':' ;;
454   esac
455   PATH_SEPARATOR=$lt_cv_sys_path_separator
456 fi
457 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
458 
459 # _LT_AC_PROG_ECHO_BACKSLASH
460 # --------------------------
461 # Add some code to the start of the generated configure script which
462 # will find an echo command which doesn't interpret backslashes.
463 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
464 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
465                               [AC_DIVERT_PUSH(NOTICE)])
466 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
467 
468 # Check that we are running under the correct shell.
469 SHELL=${CONFIG_SHELL-/bin/sh}
470 
471 case X$ECHO in
472 X*--fallback-echo)
473   # Remove one level of quotation (which was required for Make).
474   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
475   ;;
476 esac
477 
478 echo=${ECHO-echo}
479 if test "X[$]1" = X--no-reexec; then
480   # Discard the --no-reexec flag, and continue.
481   shift
482 elif test "X[$]1" = X--fallback-echo; then
483   # Avoid inline document here, it may be left over
484   :
485 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
486   # Yippee, $echo works!
487   :
488 else
489   # Restart under the correct shell.
490   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
491 fi
492 
493 if test "X[$]1" = X--fallback-echo; then
494   # used as fallback echo
495   shift
496   cat <<EOF
497 $*
498 EOF
499   exit 0
500 fi
501 
502 # The HP-UX ksh and POSIX shell print the target directory to stdout
503 # if CDPATH is set.
504 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
505 
506 if test -z "$ECHO"; then
507 if test "X${echo_test_string+set}" != Xset; then
508 # find a string as large as possible, as long as the shell can cope with it
509   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
510     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
511     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
512        echo_test_string="`eval $cmd`" &&
513        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
514     then
515       break
516     fi
517   done
518 fi
519 
520 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
521    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
522    test "X$echo_testing_string" = "X$echo_test_string"; then
523   :
524 else
525   # The Solaris, AIX, and Digital Unix default echo programs unquote
526   # backslashes.  This makes it impossible to quote backslashes using
527   #   echo "$something" | sed 's/\\/\\\\/g'
528   #
529   # So, first we look for a working echo in the user's PATH.
530 
531   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
532   for dir in $PATH /usr/ucb; do
533     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
534        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
535        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
536        test "X$echo_testing_string" = "X$echo_test_string"; then
537       echo="$dir/echo"
538       break
539     fi
540   done
541   IFS="$save_ifs"
542 
543   if test "X$echo" = Xecho; then
544     # We didn't find a better echo, so look for alternatives.
545     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
546        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
547        test "X$echo_testing_string" = "X$echo_test_string"; then
548       # This shell has a builtin print -r that does the trick.
549       echo='print -r'
550     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
551          test "X$CONFIG_SHELL" != X/bin/ksh; then
552       # If we have ksh, try running configure again with it.
553       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
554       export ORIGINAL_CONFIG_SHELL
555       CONFIG_SHELL=/bin/ksh
556       export CONFIG_SHELL
557       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
558     else
559       # Try using printf.
560       echo='printf %s\n'
561       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
562          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
563          test "X$echo_testing_string" = "X$echo_test_string"; then
564         # Cool, printf works
565         :
566       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
567            test "X$echo_testing_string" = 'X\t' &&
568            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
569            test "X$echo_testing_string" = "X$echo_test_string"; then
570         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
571         export CONFIG_SHELL
572         SHELL="$CONFIG_SHELL"
573         export SHELL
574         echo="$CONFIG_SHELL [$]0 --fallback-echo"
575       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
576            test "X$echo_testing_string" = 'X\t' &&
577            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
578            test "X$echo_testing_string" = "X$echo_test_string"; then
579         echo="$CONFIG_SHELL [$]0 --fallback-echo"
580       else
581         # maybe with a smaller string...
582         prev=:
583 
584         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
585           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
586           then
587             break
588           fi
589           prev="$cmd"
590         done
591 
592         if test "$prev" != 'sed 50q "[$]0"'; then
593           echo_test_string=`eval $prev`
594           export echo_test_string
595           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
596         else
597           # Oops.  We lost completely, so just stick with echo.
598           echo=echo
599         fi
600       fi
601     fi
602   fi
603 fi
604 fi
605 
606 # Copy echo and quote the copy suitably for passing to libtool from
607 # the Makefile, instead of quoting the original, which is used later.
608 ECHO=$echo
609 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
610    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
611 fi
612 
613 AC_SUBST(ECHO)
614 AC_DIVERT_POP
615 ])# _LT_AC_PROG_ECHO_BACKSLASH
616 
617 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
618 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
619 # ------------------------------------------------------------------
620 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
621 [if test "$cross_compiling" = yes; then :
622   [$4]
623 else
624   AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
625   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
626   lt_status=$lt_dlunknown
627   cat > conftest.$ac_ext <<EOF
628 [#line __oline__ "configure"
629 #include "confdefs.h"
630 
631 #if HAVE_DLFCN_H
632 #include <dlfcn.h>
633 #endif
634 
635 #include <stdio.h>
636 
637 #ifdef RTLD_GLOBAL
638 #  define LT_DLGLOBAL           RTLD_GLOBAL
639 #else
640 #  ifdef DL_GLOBAL
641 #    define LT_DLGLOBAL         DL_GLOBAL
642 #  else
643 #    define LT_DLGLOBAL         0
644 #  endif
645 #endif
646 
647 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
648    find out it does not work in some platform. */
649 #ifndef LT_DLLAZY_OR_NOW
650 #  ifdef RTLD_LAZY
651 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
652 #  else
653 #    ifdef DL_LAZY
654 #      define LT_DLLAZY_OR_NOW          DL_LAZY
655 #    else
656 #      ifdef RTLD_NOW
657 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
658 #      else
659 #        ifdef DL_NOW
660 #          define LT_DLLAZY_OR_NOW      DL_NOW
661 #        else
662 #          define LT_DLLAZY_OR_NOW      0
663 #        endif
664 #      endif
665 #    endif
666 #  endif
667 #endif
668 
669 #ifdef __cplusplus
670 extern "C" void exit (int);
671 #endif
672 
673 void fnord() { int i=42;}
674 int main ()
675 {
676   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
677   int status = $lt_dlunknown;
678 
679   if (self)
680     {
681       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
682       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
683       /* dlclose (self); */
684     }
685 
686     exit (status);
687 }]
688 EOF
689   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
690     (./conftest; exit; ) 2>/dev/null
691     lt_status=$?
692     case x$lt_status in
693       x$lt_dlno_uscore) $1 ;;
694       x$lt_dlneed_uscore) $2 ;;
695       x$lt_unknown|x*) $3 ;;
696     esac
697   else :
698     # compilation failed
699     $3
700   fi
701 fi
702 rm -fr conftest*
703 ])# _LT_AC_TRY_DLOPEN_SELF
704 
705 # AC_LIBTOOL_DLOPEN_SELF
706 # -------------------
707 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
708 [if test "x$enable_dlopen" != xyes; then
709   enable_dlopen=unknown
710   enable_dlopen_self=unknown
711   enable_dlopen_self_static=unknown
712 else
713   lt_cv_dlopen=no
714   lt_cv_dlopen_libs=
715 
716   case $host_os in
717   beos*)
718     lt_cv_dlopen="load_add_on"
719     lt_cv_dlopen_libs=
720     lt_cv_dlopen_self=yes
721     ;;
722 
723   cygwin* | mingw* | pw32*)
724     lt_cv_dlopen="LoadLibrary"
725     lt_cv_dlopen_libs=
726    ;;
727 
728   *)
729     AC_CHECK_FUNC([shl_load],
730           [lt_cv_dlopen="shl_load"],
731       [AC_CHECK_LIB([dld], [shl_load],
732             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
733         [AC_CHECK_FUNC([dlopen],
734               [lt_cv_dlopen="dlopen"],
735           [AC_CHECK_LIB([dl], [dlopen],
736                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
737             [AC_CHECK_LIB([svld], [dlopen],
738                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
739               [AC_CHECK_LIB([dld], [dld_link],
740                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
741               ])
742             ])
743           ])
744         ])
745       ])
746     ;;
747   esac
748 
749   if test "x$lt_cv_dlopen" != xno; then
750     enable_dlopen=yes
751   else
752     enable_dlopen=no
753   fi
754 
755   case $lt_cv_dlopen in
756   dlopen)
757     save_CPPFLAGS="$CPPFLAGS"
758     AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
759     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
760 
761     save_LDFLAGS="$LDFLAGS"
762     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
763 
764     save_LIBS="$LIBS"
765     LIBS="$lt_cv_dlopen_libs $LIBS"
766 
767     AC_CACHE_CHECK([whether a program can dlopen itself],
768           lt_cv_dlopen_self, [dnl
769           _LT_AC_TRY_DLOPEN_SELF(
770             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
771             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
772     ])
773 
774     if test "x$lt_cv_dlopen_self" = xyes; then
775       LDFLAGS="$LDFLAGS $link_static_flag"
776       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
777           lt_cv_dlopen_self_static, [dnl
778           _LT_AC_TRY_DLOPEN_SELF(
779             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
780             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
781       ])
782     fi
783 
784     CPPFLAGS="$save_CPPFLAGS"
785     LDFLAGS="$save_LDFLAGS"
786     LIBS="$save_LIBS"
787     ;;
788   esac
789 
790   case $lt_cv_dlopen_self in
791   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
792   *) enable_dlopen_self=unknown ;;
793   esac
794 
795   case $lt_cv_dlopen_self_static in
796   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
797   *) enable_dlopen_self_static=unknown ;;
798   esac
799 fi
800 ])# AC_LIBTOOL_DLOPEN_SELF
801 
802 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
803 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
804 # Sed substitution that helps us do robust quoting.  It backslashifies
805 # metacharacters that are still active within double-quoted strings.
806 Xsed='sed -e s/^X//'
807 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
808 
809 # Same as above, but do not quote variable references.
810 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
811 
812 # Sed substitution to delay expansion of an escaped shell variable in a
813 # double_quote_subst'ed string.
814 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
815 
816 # Constants:
817 rm="rm -f"
818 
819 # Global variables:
820 default_ofile=libtool
821 can_build_shared=yes
822 
823 # All known linkers require a `.a' archive for static linking (except M$VC,
824 # which needs '.lib').
825 libext=a
826 ltmain="$ac_aux_dir/ltmain.sh"
827 ofile="$default_ofile"
828 with_gnu_ld="$lt_cv_prog_gnu_ld"
829 need_locks="$enable_libtool_lock"
830 
831 old_CC="$CC"
832 old_CFLAGS="$CFLAGS"
833 
834 # Set sane defaults for various variables
835 test -z "$AR" && AR=ar
836 test -z "$AR_FLAGS" && AR_FLAGS=cru
837 test -z "$AS" && AS=as
838 test -z "$CC" && CC=cc
839 test -z "$DLLTOOL" && DLLTOOL=dlltool
840 test -z "$LD" && LD=ld
841 test -z "$LN_S" && LN_S="ln -s"
842 test -z "$MAGIC_CMD" && MAGIC_CMD=file
843 test -z "$NM" && NM=nm
844 test -z "$OBJDUMP" && OBJDUMP=objdump
845 test -z "$RANLIB" && RANLIB=:
846 test -z "$STRIP" && STRIP=:
847 test -z "$ac_objext" && ac_objext=o
848 
849 if test x"$host" != x"$build"; then
850   ac_tool_prefix=${host_alias}-
851 else
852   ac_tool_prefix=
853 fi
854 
855 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
856 case $host_os in
857 linux-gnu*) ;;
858 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
859 esac
860 
861 case $host_os in
862 aix3*)
863   # AIX sometimes has problems with the GCC collect2 program.  For some
864   # reason, if we set the COLLECT_NAMES environment variable, the problems
865   # vanish in a puff of smoke.
866   if test "X${COLLECT_NAMES+set}" != Xset; then
867     COLLECT_NAMES=
868     export COLLECT_NAMES
869   fi
870   ;;
871 esac
872 
873 # Determine commands to create old-style static archives.
874 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
875 old_postinstall_cmds='chmod 644 $oldlib'
876 old_postuninstall_cmds=
877 
878 if test -n "$RANLIB"; then
879   case $host_os in
880   openbsd*)
881     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
882     ;;
883   *)
884     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
885     ;;
886   esac
887   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
888 fi
889 
890 # Allow CC to be a program name with arguments.
891 set dummy $CC
892 compiler="[$]2"
893 
894 AC_MSG_CHECKING([for objdir])
895 rm -f .libs 2>/dev/null
896 mkdir .libs 2>/dev/null
897 if test -d .libs; then
898   objdir=.libs
899 else
900   # MS-DOS does not allow filenames that begin with a dot.
901   objdir=_libs
902 fi
903 rmdir .libs 2>/dev/null
904 AC_MSG_RESULT($objdir)
905 
906 
907 AC_ARG_WITH(pic,
908 [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
909 pic_mode="$withval", pic_mode=default)
910 test -z "$pic_mode" && pic_mode=default
911 
912 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
913 # in isolation, and that seeing it set (from the cache) indicates that
914 # the associated values are set (in the cache) correctly too.
915 AC_MSG_CHECKING([for $compiler option to produce PIC])
916 AC_CACHE_VAL(lt_cv_prog_cc_pic,
917 [ lt_cv_prog_cc_pic=
918   lt_cv_prog_cc_shlib=
919   lt_cv_prog_cc_wl=
920   lt_cv_prog_cc_static=
921   lt_cv_prog_cc_no_builtin=
922   lt_cv_prog_cc_can_build_shared=$can_build_shared
923 
924   if test "$GCC" = yes; then
925     lt_cv_prog_cc_wl='-Wl,'
926     lt_cv_prog_cc_static='-static'
927 
928     case $host_os in
929     aix*)
930       # Below there is a dirty hack to force normal static linking with -ldl
931       # The problem is because libdl dynamically linked with both libc and
932       # libC (AIX C++ library), which obviously doesn't included in libraries
933       # list by gcc. This cause undefined symbols with -static flags.
934       # This hack allows C programs to be linked with "-static -ldl", but
935       # not sure about C++ programs.
936       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
937       ;;
938     amigaos*)
939       # FIXME: we need at least 68020 code to build shared libraries, but
940       # adding the `-m68020' flag to GCC prevents building anything better,
941       # like `-m68040'.
942       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
943       ;;
944     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
945       # PIC is the default for these OSes.
946       ;;
947     darwin* | rhapsody*)
948       # PIC is the default on this platform
949       # Common symbols not allowed in MH_DYLIB files
950       lt_cv_prog_cc_pic='-fno-common'
951       ;;
952     cygwin* | mingw* | pw32* | os2*)
953       # This hack is so that the source file can tell whether it is being
954       # built for inclusion in a dll (and should export symbols for example).
955       lt_cv_prog_cc_pic='-DDLL_EXPORT'
956       ;;
957     sysv4*MP*)
958       if test -d /usr/nec; then
959          lt_cv_prog_cc_pic=-Kconform_pic
960       fi
961       ;;
962     *)
963       lt_cv_prog_cc_pic='-fPIC'
964       ;;
965     esac
966   else
967     # PORTME Check for PIC flags for the system compiler.
968     case $host_os in
969     aix3* | aix4* | aix5*)
970       lt_cv_prog_cc_wl='-Wl,'
971       # All AIX code is PIC.
972       if test "$host_cpu" = ia64; then
973         # AIX 5 now supports IA64 processor
974         lt_cv_prog_cc_static='-Bstatic'
975       else
976         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
977       fi
978       ;;
979 
980     hpux9* | hpux10* | hpux11*)
981       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
982       lt_cv_prog_cc_wl='-Wl,'
983       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
984       lt_cv_prog_cc_pic='+Z'
985       ;;
986 
987     irix5* | irix6* | nonstopux*)
988       lt_cv_prog_cc_wl='-Wl,'
989       lt_cv_prog_cc_static='-non_shared'
990       # PIC (with -KPIC) is the default.
991       ;;
992 
993     cygwin* | mingw* | pw32* | os2*)
994       # This hack is so that the source file can tell whether it is being
995       # built for inclusion in a dll (and should export symbols for example).
996       lt_cv_prog_cc_pic='-DDLL_EXPORT'
997       ;;
998 
999     newsos6)
1000       lt_cv_prog_cc_pic='-KPIC'
1001       lt_cv_prog_cc_static='-Bstatic'
1002       ;;
1003 
1004     osf3* | osf4* | osf5*)
1005       # All OSF/1 code is PIC.
1006       lt_cv_prog_cc_wl='-Wl,'
1007       lt_cv_prog_cc_static='-non_shared'
1008       ;;
1009 
1010     sco3.2v5*)
1011       lt_cv_prog_cc_pic='-Kpic'
1012       lt_cv_prog_cc_static='-dn'
1013       lt_cv_prog_cc_shlib='-belf'
1014       ;;
1015 
1016     solaris*)
1017       lt_cv_prog_cc_pic='-KPIC'
1018       lt_cv_prog_cc_static='-Bstatic'
1019       lt_cv_prog_cc_wl='-Wl,'
1020       ;;
1021 
1022     sunos4*)
1023       lt_cv_prog_cc_pic='-PIC'
1024       lt_cv_prog_cc_static='-Bstatic'
1025       lt_cv_prog_cc_wl='-Qoption ld '
1026       ;;
1027 
1028     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1029       lt_cv_prog_cc_pic='-KPIC'
1030       lt_cv_prog_cc_static='-Bstatic'
1031       if test "x$host_vendor" = xsni; then
1032         lt_cv_prog_cc_wl='-LD'
1033       else
1034         lt_cv_prog_cc_wl='-Wl,'
1035       fi
1036       ;;
1037 
1038     uts4*)
1039       lt_cv_prog_cc_pic='-pic'
1040       lt_cv_prog_cc_static='-Bstatic'
1041       ;;
1042 
1043     sysv4*MP*)
1044       if test -d /usr/nec ;then
1045         lt_cv_prog_cc_pic='-Kconform_pic'
1046         lt_cv_prog_cc_static='-Bstatic'
1047       fi
1048       ;;
1049 
1050     *)
1051       lt_cv_prog_cc_can_build_shared=no
1052       ;;
1053     esac
1054   fi
1055 ])
1056 if test -z "$lt_cv_prog_cc_pic"; then
1057   AC_MSG_RESULT([none])
1058 else
1059   AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1060 
1061   # Check to make sure the pic_flag actually works.
1062   AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1063   AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1064     save_CFLAGS="$CFLAGS"
1065     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1066     AC_TRY_COMPILE([], [], [dnl
1067       case $host_os in
1068       hpux9* | hpux10* | hpux11*)
1069         # On HP-UX, both CC and GCC only warn that PIC is supported... then
1070         # they create non-PIC objects.  So, if there were any warnings, we
1071         # assume that PIC is not supported.
1072         if test -s conftest.err; then
1073           lt_cv_prog_cc_pic_works=no
1074         else
1075           lt_cv_prog_cc_pic_works=yes
1076         fi
1077         ;;
1078       *)
1079         lt_cv_prog_cc_pic_works=yes
1080         ;;
1081       esac
1082     ], [dnl
1083       lt_cv_prog_cc_pic_works=no
1084     ])
1085     CFLAGS="$save_CFLAGS"
1086   ])
1087 
1088   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1089     lt_cv_prog_cc_pic=
1090     lt_cv_prog_cc_can_build_shared=no
1091   else
1092     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1093   fi
1094 
1095   AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1096 fi
1097 
1098 # Check for any special shared library compilation flags.
1099 if test -n "$lt_cv_prog_cc_shlib"; then
1100   AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1101   if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1102   else
1103    AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1104     lt_cv_prog_cc_can_build_shared=no
1105   fi
1106 fi
1107 
1108 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1109 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1110   lt_cv_prog_cc_static_works=no
1111   save_LDFLAGS="$LDFLAGS"
1112   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1113   AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1114   LDFLAGS="$save_LDFLAGS"
1115 ])
1116 
1117 # Belt *and* braces to stop my trousers falling down:
1118 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1119 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1120 
1121 pic_flag="$lt_cv_prog_cc_pic"
1122 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1123 wl="$lt_cv_prog_cc_wl"
1124 link_static_flag="$lt_cv_prog_cc_static"
1125 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1126 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1127 
1128 
1129 # Check to see if options -o and -c are simultaneously supported by compiler
1130 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1131 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1132 $rm -r conftest 2>/dev/null
1133 mkdir conftest
1134 cd conftest
1135 echo "int some_variable = 0;" > conftest.$ac_ext
1136 mkdir out
1137 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1138 # that will create temporary files in the current directory regardless of
1139 # the output directory.  Thus, making CWD read-only will cause this test
1140 # to fail, enabling locking or at least warning the user not to do parallel
1141 # builds.
1142 chmod -w .
1143 save_CFLAGS="$CFLAGS"
1144 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1145 compiler_c_o=no
1146 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1147   # The compiler can only warn and ignore the option if not recognized
1148   # So say no if there are warnings
1149   if test -s out/conftest.err; then
1150     lt_cv_compiler_c_o=no
1151   else
1152     lt_cv_compiler_c_o=yes
1153   fi
1154 else
1155   # Append any errors to the config.log.
1156   cat out/conftest.err 1>&AC_FD_CC
1157   lt_cv_compiler_c_o=no
1158 fi
1159 CFLAGS="$save_CFLAGS"
1160 chmod u+w .
1161 $rm conftest* out/*
1162 rmdir out
1163 cd ..
1164 rmdir conftest
1165 $rm -r conftest 2>/dev/null
1166 ])
1167 compiler_c_o=$lt_cv_compiler_c_o
1168 AC_MSG_RESULT([$compiler_c_o])
1169 
1170 if test x"$compiler_c_o" = x"yes"; then
1171   # Check to see if we can write to a .lo
1172   AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1173   AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1174   lt_cv_compiler_o_lo=no
1175   save_CFLAGS="$CFLAGS"
1176   CFLAGS="$CFLAGS -c -o conftest.lo"
1177   save_objext="$ac_objext"
1178   ac_objext=lo
1179   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1180     # The compiler can only warn and ignore the option if not recognized
1181     # So say no if there are warnings
1182     if test -s conftest.err; then
1183       lt_cv_compiler_o_lo=no
1184     else
1185       lt_cv_compiler_o_lo=yes
1186     fi
1187   ])
1188   ac_objext="$save_objext"
1189   CFLAGS="$save_CFLAGS"
1190   ])
1191   compiler_o_lo=$lt_cv_compiler_o_lo
1192   AC_MSG_RESULT([$compiler_o_lo])
1193 else
1194   compiler_o_lo=no
1195 fi
1196 
1197 # Check to see if we can do hard links to lock some files if needed
1198 hard_links="nottested"
1199 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1200   # do not overwrite the value of need_locks provided by the user
1201   AC_MSG_CHECKING([if we can lock with hard links])
1202   hard_links=yes
1203   $rm conftest*
1204   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1205   touch conftest.a
1206   ln conftest.a conftest.b 2>&5 || hard_links=no
1207   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1208   AC_MSG_RESULT([$hard_links])
1209   if test "$hard_links" = no; then
1210     AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1211     need_locks=warn
1212   fi
1213 else
1214   need_locks=no
1215 fi
1216 
1217 if test "$GCC" = yes; then
1218   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1219   AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1220   echo "int some_variable = 0;" > conftest.$ac_ext
1221   save_CFLAGS="$CFLAGS"
1222   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1223   compiler_rtti_exceptions=no
1224   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1225     # The compiler can only warn and ignore the option if not recognized
1226     # So say no if there are warnings
1227     if test -s conftest.err; then
1228       compiler_rtti_exceptions=no
1229     else
1230       compiler_rtti_exceptions=yes
1231     fi
1232   ])
1233   CFLAGS="$save_CFLAGS"
1234   AC_MSG_RESULT([$compiler_rtti_exceptions])
1235 
1236   if test "$compiler_rtti_exceptions" = "yes"; then
1237     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1238   else
1239     no_builtin_flag=' -fno-builtin'
1240   fi
1241 fi
1242 
1243 # See if the linker supports building shared libraries.
1244 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1245 
1246 allow_undefined_flag=
1247 no_undefined_flag=
1248 need_lib_prefix=unknown
1249 need_version=unknown
1250 # when you set need_version to no, make sure it does not cause -set_version
1251 # flags to be left without arguments
1252 archive_cmds=
1253 archive_expsym_cmds=
1254 old_archive_from_new_cmds=
1255 old_archive_from_expsyms_cmds=
1256 export_dynamic_flag_spec=
1257 whole_archive_flag_spec=
1258 thread_safe_flag_spec=
1259 hardcode_into_libs=no
1260 hardcode_libdir_flag_spec=
1261 hardcode_libdir_separator=
1262 hardcode_direct=no
1263 hardcode_minus_L=no
1264 hardcode_shlibpath_var=unsupported
1265 runpath_var=
1266 link_all_deplibs=unknown
1267 always_export_symbols=no
1268 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1269 # include_expsyms should be a list of space-separated symbols to be *always*
1270 # included in the symbol list
1271 include_expsyms=
1272 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1273 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1274 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1275 # as well as any symbol that contains `d'.
1276 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1277 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1278 # platforms (ab)use it in PIC code, but their linkers get confused if
1279 # the symbol is explicitly referenced.  Since portable code cannot
1280 # rely on this symbol name, it's probably fine to never include it in
1281 # preloaded symbol tables.
1282 extract_expsyms_cmds=
1283 
1284 case $host_os in
1285 cygwin* | mingw* | pw32*)
1286   # FIXME: the MSVC++ port hasn't been tested in a loooong time
1287   # When not using gcc, we currently assume that we are using
1288   # Microsoft Visual C++.
1289   if test "$GCC" != yes; then
1290     with_gnu_ld=no
1291   fi
1292   ;;
1293 openbsd*)
1294   with_gnu_ld=no
1295   ;;
1296 esac
1297 
1298 ld_shlibs=yes
1299 if test "$with_gnu_ld" = yes; then
1300   # If archive_cmds runs LD, not CC, wlarc should be empty
1301   wlarc='${wl}'
1302 
1303   # See if GNU ld supports shared libraries.
1304   case $host_os in
1305   aix3* | aix4* | aix5*)
1306     # On AIX, the GNU linker is very broken
1307     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1308     ld_shlibs=no
1309     cat <<EOF 1>&2
1310 
1311 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1312 *** to be unable to reliably create shared libraries on AIX.
1313 *** Therefore, libtool is disabling shared libraries support.  If you
1314 *** really care for shared libraries, you may want to modify your PATH
1315 *** so that a non-GNU linker is found, and then restart.
1316 
1317 EOF
1318     ;;
1319 
1320   amigaos*)
1321     archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
1322     hardcode_libdir_flag_spec='-L$libdir'
1323     hardcode_minus_L=yes
1324 
1325     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1326     # that the semantics of dynamic libraries on AmigaOS, at least up
1327     # to version 4, is to share data among multiple programs linked
1328     # with the same dynamic library.  Since this doesn't match the
1329     # behavior of shared libraries on other platforms, we can use
1330     # them.
1331     ld_shlibs=no
1332     ;;
1333 
1334   beos*)
1335     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1336       allow_undefined_flag=unsupported
1337       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1338       # support --undefined.  This deserves some investigation.  FIXME
1339       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1340     else
1341       ld_shlibs=no
1342     fi
1343     ;;
1344 
1345   cygwin* | mingw* | pw32*)
1346     # hardcode_libdir_flag_spec is actually meaningless, as there is
1347     # no search path for DLLs.
1348     hardcode_libdir_flag_spec='-L$libdir'
1349     allow_undefined_flag=unsupported
1350     always_export_symbols=yes
1351 
1352     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1353       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1354       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1355       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1356       else $CC -o impgen impgen.c ; fi)~
1357       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1358 
1359     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1360 
1361     # cygwin and mingw dlls have different entry points and sets of symbols
1362     # to exclude.
1363     # FIXME: what about values for MSVC?
1364     dll_entry=__cygwin_dll_entry@12
1365     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1366     case $host_os in
1367     mingw*)
1368       # mingw values
1369       dll_entry=_DllMainCRTStartup@12
1370       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1371       ;;
1372     esac
1373 
1374     # mingw and cygwin differ, and it's simplest to just exclude the union
1375     # of the two symbol sets.
1376     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1377 
1378     # recent cygwin and mingw systems supply a stub DllMain which the user
1379     # can override, but on older systems we have to supply one (in ltdll.c)
1380     if test "x$lt_cv_need_dllmain" = "xyes"; then
1381       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1382       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
1383         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1384     else
1385       ltdll_obj=
1386       ltdll_cmds=
1387     fi
1388 
1389     # Extract the symbol export list from an `--export-all' def file,
1390     # then regenerate the def file from the symbol export list, so that
1391     # the compiled dll only exports the symbol export list.
1392     # Be careful not to strip the DATA tag left be newer dlltools.
1393     export_symbols_cmds="$ltdll_cmds"'
1394       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1395       sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1396 
1397     # If the export-symbols file already is a .def file (1st line
1398     # is EXPORTS), use it as is.
1399     # If DATA tags from a recent dlltool are present, honour them!
1400     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1401         cp $export_symbols $output_objdir/$soname-def;
1402       else
1403         echo EXPORTS > $output_objdir/$soname-def;
1404         _lt_hint=1;
1405         cat $export_symbols | while read symbol; do
1406          set dummy \$symbol;
1407          case \[$]# in
1408            2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1409            *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1410          esac;
1411          _lt_hint=`expr 1 + \$_lt_hint`;
1412         done;
1413       fi~
1414       '"$ltdll_cmds"'
1415       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1416       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
1417       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1418       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
1419       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1420     ;;
1421 
1422   netbsd*)
1423     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1424       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1425       wlarc=
1426     else
1427       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1428       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1429     fi
1430     ;;
1431 
1432   solaris* | sysv5*)
1433     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1434       ld_shlibs=no
1435       cat <<EOF 1>&2
1436 
1437 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1438 *** create shared libraries on Solaris systems.  Therefore, libtool
1439 *** is disabling shared libraries support.  We urge you to upgrade GNU
1440 *** binutils to release 2.9.1 or newer.  Another option is to modify
1441 *** your PATH or compiler configuration so that the native linker is
1442 *** used, and then restart.
1443 
1444 EOF
1445     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1446       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1447       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1448     else
1449       ld_shlibs=no
1450     fi
1451     ;;
1452 
1453   sunos4*)
1454     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1455     wlarc=
1456     hardcode_direct=yes
1457     hardcode_shlibpath_var=no
1458     ;;
1459 
1460   *)
1461     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1462       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1463       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1464     else
1465       ld_shlibs=no
1466     fi
1467     ;;
1468   esac
1469 
1470   if test "$ld_shlibs" = yes; then
1471     runpath_var=LD_RUN_PATH
1472     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1473     export_dynamic_flag_spec='${wl}--export-dynamic'
1474     case $host_os in
1475     cygwin* | mingw* | pw32*)
1476       # dlltool doesn't understand --whole-archive et. al.
1477       whole_archive_flag_spec=
1478       ;;
1479     *)
1480       # ancient GNU ld didn't support --whole-archive et. al.
1481       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1482         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1483       else
1484         whole_archive_flag_spec=
1485       fi
1486