"Fossies" - the Fresh Open Source Software Archive

Member "libmcrypt-2.5.8/libltdl/aclocal.m4" (8 Mar 2003, 135852 Bytes) of package /linux/privat/old/libmcrypt-2.5.8.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 dnl aclocal.m4 generated automatically by aclocal 1.4-p5
    2 
    3 dnl Copyright (C) 1994, 1995-8, 1999, 2001 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 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
   14 
   15 # serial 46 AC_PROG_LIBTOOL
   16 
   17 AC_DEFUN([AC_PROG_LIBTOOL],
   18 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
   19 
   20 # This can be used to rebuild libtool when needed
   21 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
   22 
   23 # Always use our own libtool.
   24 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
   25 AC_SUBST(LIBTOOL)dnl
   26 
   27 # Prevent multiple expansion
   28 define([AC_PROG_LIBTOOL], [])
   29 ])
   30 
   31 AC_DEFUN([AC_LIBTOOL_SETUP],
   32 [AC_PREREQ(2.13)dnl
   33 AC_REQUIRE([AC_ENABLE_SHARED])dnl
   34 AC_REQUIRE([AC_ENABLE_STATIC])dnl
   35 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
   36 AC_REQUIRE([AC_CANONICAL_HOST])dnl
   37 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
   38 AC_REQUIRE([AC_PROG_CC])dnl
   39 AC_REQUIRE([AC_PROG_LD])dnl
   40 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
   41 AC_REQUIRE([AC_PROG_NM])dnl
   42 AC_REQUIRE([LT_AC_PROG_SED])dnl
   43 
   44 AC_REQUIRE([AC_PROG_LN_S])dnl
   45 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
   46 AC_REQUIRE([AC_OBJEXT])dnl
   47 AC_REQUIRE([AC_EXEEXT])dnl
   48 dnl
   49 
   50 _LT_AC_PROG_ECHO_BACKSLASH
   51 # Only perform the check for file, if the check method requires it
   52 case $deplibs_check_method in
   53 file_magic*)
   54   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
   55     AC_PATH_MAGIC
   56   fi
   57   ;;
   58 esac
   59 
   60 AC_CHECK_TOOL(RANLIB, ranlib, :)
   61 AC_CHECK_TOOL(STRIP, strip, :)
   62 
   63 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
   64 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
   65 enable_win32_dll=yes, enable_win32_dll=no)
   66 
   67 AC_ARG_ENABLE(libtool-lock,
   68   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
   69 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
   70 
   71 # Some flags need to be propagated to the compiler or linker for good
   72 # libtool support.
   73 case $host in
   74 *-*-irix6*)
   75   # Find out which ABI we are using.
   76   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
   77   if AC_TRY_EVAL(ac_compile); then
   78     case `/usr/bin/file conftest.$ac_objext` in
   79     *32-bit*)
   80       LD="${LD-ld} -32"
   81       ;;
   82     *N32*)
   83       LD="${LD-ld} -n32"
   84       ;;
   85     *64-bit*)
   86       LD="${LD-ld} -64"
   87       ;;
   88     esac
   89   fi
   90   rm -rf conftest*
   91   ;;
   92 
   93 *-*-sco3.2v5*)
   94   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
   95   SAVE_CFLAGS="$CFLAGS"
   96   CFLAGS="$CFLAGS -belf"
   97   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
   98     [AC_LANG_SAVE
   99      AC_LANG_C
  100      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  101      AC_LANG_RESTORE])
  102   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  103     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  104     CFLAGS="$SAVE_CFLAGS"
  105   fi
  106   ;;
  107 
  108 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  109 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  110   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  111   AC_CHECK_TOOL(AS, as, false)
  112   AC_CHECK_TOOL(OBJDUMP, objdump, false)
  113 
  114   # recent cygwin and mingw systems supply a stub DllMain which the user
  115   # can override, but on older systems we have to supply one
  116   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  117     [AC_TRY_LINK([],
  118       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
  119       DllMain (0, 0, 0);],
  120       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
  121 
  122   case $host/$CC in
  123   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
  124     # old mingw systems require "-dll" to link a DLL, while more recent ones
  125     # require "-mdll"
  126     SAVE_CFLAGS="$CFLAGS"
  127     CFLAGS="$CFLAGS -mdll"
  128     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  129       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  130     CFLAGS="$SAVE_CFLAGS" ;;
  131   *-*-cygwin* | *-*-pw32*)
  132     # cygwin systems need to pass --dll to the linker, and not link
  133     # crt.o which will require a WinMain@16 definition.
  134     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  135   esac
  136   ;;
  137   ])
  138 esac
  139 
  140 _LT_AC_LTCONFIG_HACK
  141 
  142 ])
  143 
  144 # AC_LIBTOOL_HEADER_ASSERT
  145 # ------------------------
  146 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
  147 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
  148     [lt_cv_func_assert_works],
  149     [case $host in
  150     *-*-solaris*)
  151       if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
  152         case `$CC --version 2>/dev/null` in
  153         [[12]].*) lt_cv_func_assert_works=no ;;
  154         *)        lt_cv_func_assert_works=yes ;;
  155         esac
  156       fi
  157       ;;
  158     esac])
  159 
  160 if test "x$lt_cv_func_assert_works" = xyes; then
  161   AC_CHECK_HEADERS(assert.h)
  162 fi
  163 ])# AC_LIBTOOL_HEADER_ASSERT
  164 
  165 # _LT_AC_CHECK_DLFCN
  166 # --------------------
  167 AC_DEFUN([_LT_AC_CHECK_DLFCN],
  168 [AC_CHECK_HEADERS(dlfcn.h)
  169 ])# _LT_AC_CHECK_DLFCN
  170 
  171 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  172 # ---------------------------------
  173 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  174 [AC_REQUIRE([AC_CANONICAL_HOST])
  175 AC_REQUIRE([AC_PROG_NM])
  176 AC_REQUIRE([AC_OBJEXT])
  177 # Check for command to grab the raw symbol name followed by C symbol from nm.
  178 AC_MSG_CHECKING([command to parse $NM output])
  179 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
  180 
  181 # These are sane defaults that work on at least a few old systems.
  182 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  183 
  184 # Character class describing NM global symbol codes.
  185 symcode='[[BCDEGRST]]'
  186 
  187 # Regexp to match symbols that can be accessed directly from C.
  188 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  189 
  190 # Transform the above into a raw symbol and a C symbol.
  191 symxfrm='\1 \2\3 \3'
  192 
  193 # Transform an extracted symbol line into a proper C declaration
  194 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  195 
  196 # Transform an extracted symbol line into symbol name and symbol address
  197 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'"
  198 
  199 # Define system-specific variables.
  200 case $host_os in
  201 aix*)
  202   symcode='[[BCDT]]'
  203   ;;
  204 cygwin* | mingw* | pw32*)
  205   symcode='[[ABCDGISTW]]'
  206   ;;
  207 hpux*) # Its linker distinguishes data from code symbols
  208   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  209   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'"
  210   ;;
  211 irix* | nonstopux*)
  212   symcode='[[BCDEGRST]]'
  213   ;;
  214 osf*)
  215   symcode='[[BCDEGQRST]]'
  216   ;;
  217 solaris* | sysv5*)
  218   symcode='[[BDT]]'
  219   ;;
  220 sysv4)
  221   symcode='[[DFNSTU]]'
  222   ;;
  223 esac
  224 
  225 # Handle CRLF in mingw tool chain
  226 opt_cr=
  227 case $host_os in
  228 mingw*)
  229   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  230   ;;
  231 esac
  232 
  233 # If we're using GNU nm, then use its standard symbol codes.
  234 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  235   symcode='[[ABCDGISTW]]'
  236 fi
  237 
  238 # Try without a prefix undercore, then with it.
  239 for ac_symprfx in "" "_"; do
  240 
  241   # Write the raw and C identifiers.
  242 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  243 
  244   # Check to see that the pipe works correctly.
  245   pipe_works=no
  246   rm -f conftest*
  247   cat > conftest.$ac_ext <<EOF
  248 #ifdef __cplusplus
  249 extern "C" {
  250 #endif
  251 char nm_test_var;
  252 void nm_test_func(){}
  253 #ifdef __cplusplus
  254 }
  255 #endif
  256 int main(){nm_test_var='a';nm_test_func();return(0);}
  257 EOF
  258 
  259   if AC_TRY_EVAL(ac_compile); then
  260     # Now try to grab the symbols.
  261     nlist=conftest.nm
  262     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  263       # Try sorting and uniquifying the output.
  264       if sort "$nlist" | uniq > "$nlist"T; then
  265 	mv -f "$nlist"T "$nlist"
  266       else
  267 	rm -f "$nlist"T
  268       fi
  269 
  270       # Make sure that we snagged all the symbols we need.
  271       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  272 	if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  273 	  cat <<EOF > conftest.$ac_ext
  274 #ifdef __cplusplus
  275 extern "C" {
  276 #endif
  277 
  278 EOF
  279 	  # Now generate the symbol file.
  280 	  eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  281 
  282 	  cat <<EOF >> conftest.$ac_ext
  283 #if defined (__STDC__) && __STDC__
  284 # define lt_ptr void *
  285 #else
  286 # define lt_ptr char *
  287 # define const
  288 #endif
  289 
  290 /* The mapping between symbol names and symbols. */
  291 const struct {
  292   const char *name;
  293   lt_ptr address;
  294 }
  295 lt_preloaded_symbols[[]] =
  296 {
  297 EOF
  298 	  sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
  299 	  cat <<\EOF >> conftest.$ac_ext
  300   {0, (lt_ptr) 0}
  301 };
  302 
  303 #ifdef __cplusplus
  304 }
  305 #endif
  306 EOF
  307 	  # Now try linking the two files.
  308 	  mv conftest.$ac_objext conftstm.$ac_objext
  309 	  save_LIBS="$LIBS"
  310 	  save_CFLAGS="$CFLAGS"
  311 	  LIBS="conftstm.$ac_objext"
  312 	  CFLAGS="$CFLAGS$no_builtin_flag"
  313 	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
  314 	    pipe_works=yes
  315 	  fi
  316 	  LIBS="$save_LIBS"
  317 	  CFLAGS="$save_CFLAGS"
  318 	else
  319 	  echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
  320 	fi
  321       else
  322 	echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
  323       fi
  324     else
  325       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
  326     fi
  327   else
  328     echo "$progname: failed program was:" >&AC_FD_CC
  329     cat conftest.$ac_ext >&5
  330   fi
  331   rm -f conftest* conftst*
  332 
  333   # Do not use the global_symbol_pipe unless it works.
  334   if test "$pipe_works" = yes; then
  335     break
  336   else
  337     lt_cv_sys_global_symbol_pipe=
  338   fi
  339 done
  340 ])
  341 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
  342 if test -z "$lt_cv_sys_global_symbol_pipe"; then
  343   global_symbol_to_cdecl=
  344   global_symbol_to_c_name_address=
  345 else
  346   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
  347   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
  348 fi
  349 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
  350 then
  351   AC_MSG_RESULT(failed)
  352 else
  353   AC_MSG_RESULT(ok)
  354 fi
  355 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  356 
  357 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  358 # ---------------------------------
  359 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  360 [# Find the correct PATH separator.  Usually this is `:', but
  361 # DJGPP uses `;' like DOS.
  362 if test "X${PATH_SEPARATOR+set}" != Xset; then
  363   UNAME=${UNAME-`uname 2>/dev/null`}
  364   case X$UNAME in
  365     *-DOS) lt_cv_sys_path_separator=';' ;;
  366     *)     lt_cv_sys_path_separator=':' ;;
  367   esac
  368   PATH_SEPARATOR=$lt_cv_sys_path_separator
  369 fi
  370 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  371 
  372 # _LT_AC_PROG_ECHO_BACKSLASH
  373 # --------------------------
  374 # Add some code to the start of the generated configure script which
  375 # will find an echo command which doesn't interpret backslashes.
  376 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  377 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  378 			      [AC_DIVERT_PUSH(NOTICE)])
  379 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  380 
  381 # Check that we are running under the correct shell.
  382 SHELL=${CONFIG_SHELL-/bin/sh}
  383 
  384 case X$ECHO in
  385 X*--fallback-echo)
  386   # Remove one level of quotation (which was required for Make).
  387   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  388   ;;
  389 esac
  390 
  391 echo=${ECHO-echo}
  392 if test "X[$]1" = X--no-reexec; then
  393   # Discard the --no-reexec flag, and continue.
  394   shift
  395 elif test "X[$]1" = X--fallback-echo; then
  396   # Avoid inline document here, it may be left over
  397   :
  398 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  399   # Yippee, $echo works!
  400   :
  401 else
  402   # Restart under the correct shell.
  403   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  404 fi
  405 
  406 if test "X[$]1" = X--fallback-echo; then
  407   # used as fallback echo
  408   shift
  409   cat <<EOF
  410 $*
  411 EOF
  412   exit 0
  413 fi
  414 
  415 # The HP-UX ksh and POSIX shell print the target directory to stdout
  416 # if CDPATH is set.
  417 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  418 
  419 if test -z "$ECHO"; then
  420 if test "X${echo_test_string+set}" != Xset; then
  421 # find a string as large as possible, as long as the shell can cope with it
  422   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  423     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  424     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  425        echo_test_string="`eval $cmd`" &&
  426        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  427     then
  428       break
  429     fi
  430   done
  431 fi
  432 
  433 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  434    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  435    test "X$echo_testing_string" = "X$echo_test_string"; then
  436   :
  437 else
  438   # The Solaris, AIX, and Digital Unix default echo programs unquote
  439   # backslashes.  This makes it impossible to quote backslashes using
  440   #   echo "$something" | sed 's/\\/\\\\/g'
  441   #
  442   # So, first we look for a working echo in the user's PATH.
  443 
  444   IFS="${IFS= 	}"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  445   for dir in $PATH /usr/ucb; do
  446     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  447        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  448        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  449        test "X$echo_testing_string" = "X$echo_test_string"; then
  450       echo="$dir/echo"
  451       break
  452     fi
  453   done
  454   IFS="$save_ifs"
  455 
  456   if test "X$echo" = Xecho; then
  457     # We didn't find a better echo, so look for alternatives.
  458     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  459        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  460        test "X$echo_testing_string" = "X$echo_test_string"; then
  461       # This shell has a builtin print -r that does the trick.
  462       echo='print -r'
  463     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  464 	 test "X$CONFIG_SHELL" != X/bin/ksh; then
  465       # If we have ksh, try running configure again with it.
  466       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  467       export ORIGINAL_CONFIG_SHELL
  468       CONFIG_SHELL=/bin/ksh
  469       export CONFIG_SHELL
  470       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  471     else
  472       # Try using printf.
  473       echo='printf %s\n'
  474       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  475 	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  476 	 test "X$echo_testing_string" = "X$echo_test_string"; then
  477 	# Cool, printf works
  478 	:
  479       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  480 	   test "X$echo_testing_string" = 'X\t' &&
  481 	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  482 	   test "X$echo_testing_string" = "X$echo_test_string"; then
  483 	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  484 	export CONFIG_SHELL
  485 	SHELL="$CONFIG_SHELL"
  486 	export SHELL
  487 	echo="$CONFIG_SHELL [$]0 --fallback-echo"
  488       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  489 	   test "X$echo_testing_string" = 'X\t' &&
  490 	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  491 	   test "X$echo_testing_string" = "X$echo_test_string"; then
  492 	echo="$CONFIG_SHELL [$]0 --fallback-echo"
  493       else
  494 	# maybe with a smaller string...
  495 	prev=:
  496 
  497 	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  498 	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  499 	  then
  500 	    break
  501 	  fi
  502 	  prev="$cmd"
  503 	done
  504 
  505 	if test "$prev" != 'sed 50q "[$]0"'; then
  506 	  echo_test_string=`eval $prev`
  507 	  export echo_test_string
  508 	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  509 	else
  510 	  # Oops.  We lost completely, so just stick with echo.
  511 	  echo=echo
  512 	fi
  513       fi
  514     fi
  515   fi
  516 fi
  517 fi
  518 
  519 # Copy echo and quote the copy suitably for passing to libtool from
  520 # the Makefile, instead of quoting the original, which is used later.
  521 ECHO=$echo
  522 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  523    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  524 fi
  525 
  526 AC_SUBST(ECHO)
  527 AC_DIVERT_POP
  528 ])# _LT_AC_PROG_ECHO_BACKSLASH
  529 
  530 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  531 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  532 # ------------------------------------------------------------------
  533 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  534 [if test "$cross_compiling" = yes; then :
  535   [$4]
  536 else
  537   AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  538   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  539   lt_status=$lt_dlunknown
  540   cat > conftest.$ac_ext <<EOF
  541 [#line __oline__ "configure"
  542 #include "confdefs.h"
  543 
  544 #if HAVE_DLFCN_H
  545 #include <dlfcn.h>
  546 #endif
  547 
  548 #include <stdio.h>
  549 
  550 #ifdef RTLD_GLOBAL
  551 #  define LT_DLGLOBAL		RTLD_GLOBAL
  552 #else
  553 #  ifdef DL_GLOBAL
  554 #    define LT_DLGLOBAL		DL_GLOBAL
  555 #  else
  556 #    define LT_DLGLOBAL		0
  557 #  endif
  558 #endif
  559 
  560 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  561    find out it does not work in some platform. */
  562 #ifndef LT_DLLAZY_OR_NOW
  563 #  ifdef RTLD_LAZY
  564 #    define LT_DLLAZY_OR_NOW		RTLD_LAZY
  565 #  else
  566 #    ifdef DL_LAZY
  567 #      define LT_DLLAZY_OR_NOW		DL_LAZY
  568 #    else
  569 #      ifdef RTLD_NOW
  570 #        define LT_DLLAZY_OR_NOW	RTLD_NOW
  571 #      else
  572 #        ifdef DL_NOW
  573 #          define LT_DLLAZY_OR_NOW	DL_NOW
  574 #        else
  575 #          define LT_DLLAZY_OR_NOW	0
  576 #        endif
  577 #      endif
  578 #    endif
  579 #  endif
  580 #endif
  581 
  582 #ifdef __cplusplus
  583 extern "C" void exit (int);
  584 #endif
  585 
  586 void fnord() { int i=42;}
  587 int main ()
  588 {
  589   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  590   int status = $lt_dlunknown;
  591 
  592   if (self)
  593     {
  594       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
  595       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  596       /* dlclose (self); */
  597     }
  598 
  599     exit (status);
  600 }]
  601 EOF
  602   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  603     (./conftest; exit; ) 2>/dev/null
  604     lt_status=$?
  605     case x$lt_status in
  606       x$lt_dlno_uscore) $1 ;;
  607       x$lt_dlneed_uscore) $2 ;;
  608       x$lt_unknown|x*) $3 ;;
  609     esac
  610   else :
  611     # compilation failed
  612     $3
  613   fi
  614 fi
  615 rm -fr conftest*
  616 ])# _LT_AC_TRY_DLOPEN_SELF
  617 
  618 # AC_LIBTOOL_DLOPEN_SELF
  619 # -------------------
  620 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  621 [if test "x$enable_dlopen" != xyes; then
  622   enable_dlopen=unknown
  623   enable_dlopen_self=unknown
  624   enable_dlopen_self_static=unknown
  625 else
  626   lt_cv_dlopen=no
  627   lt_cv_dlopen_libs=
  628 
  629   case $host_os in
  630   beos*)
  631     lt_cv_dlopen="load_add_on"
  632     lt_cv_dlopen_libs=
  633     lt_cv_dlopen_self=yes
  634     ;;
  635 
  636   cygwin* | mingw* | pw32*)
  637     lt_cv_dlopen="LoadLibrary"
  638     lt_cv_dlopen_libs=
  639    ;;
  640 
  641   *)
  642     AC_CHECK_FUNC([shl_load],
  643           [lt_cv_dlopen="shl_load"],
  644       [AC_CHECK_LIB([dld], [shl_load],
  645             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  646 	[AC_CHECK_FUNC([dlopen],
  647 	      [lt_cv_dlopen="dlopen"],
  648 	  [AC_CHECK_LIB([dl], [dlopen],
  649 	        [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  650 	    [AC_CHECK_LIB([svld], [dlopen],
  651 	          [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  652 	      [AC_CHECK_LIB([dld], [dld_link],
  653 	            [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  654 	      ])
  655 	    ])
  656 	  ])
  657 	])
  658       ])
  659     ;;
  660   esac
  661 
  662   if test "x$lt_cv_dlopen" != xno; then
  663     enable_dlopen=yes
  664   else
  665     enable_dlopen=no
  666   fi
  667 
  668   case $lt_cv_dlopen in
  669   dlopen)
  670     save_CPPFLAGS="$CPPFLAGS"
  671     AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  672     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  673 
  674     save_LDFLAGS="$LDFLAGS"
  675     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  676 
  677     save_LIBS="$LIBS"
  678     LIBS="$lt_cv_dlopen_libs $LIBS"
  679 
  680     AC_CACHE_CHECK([whether a program can dlopen itself],
  681 	  lt_cv_dlopen_self, [dnl
  682 	  _LT_AC_TRY_DLOPEN_SELF(
  683 	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  684 	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  685     ])
  686 
  687     if test "x$lt_cv_dlopen_self" = xyes; then
  688       LDFLAGS="$LDFLAGS $link_static_flag"
  689       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  690     	  lt_cv_dlopen_self_static, [dnl
  691 	  _LT_AC_TRY_DLOPEN_SELF(
  692 	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  693 	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
  694       ])
  695     fi
  696 
  697     CPPFLAGS="$save_CPPFLAGS"
  698     LDFLAGS="$save_LDFLAGS"
  699     LIBS="$save_LIBS"
  700     ;;
  701   esac
  702 
  703   case $lt_cv_dlopen_self in
  704   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  705   *) enable_dlopen_self=unknown ;;
  706   esac
  707 
  708   case $lt_cv_dlopen_self_static in
  709   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  710   *) enable_dlopen_self_static=unknown ;;
  711   esac
  712 fi
  713 ])# AC_LIBTOOL_DLOPEN_SELF
  714 
  715 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
  716 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
  717 # Sed substitution that helps us do robust quoting.  It backslashifies
  718 # metacharacters that are still active within double-quoted strings.
  719 Xsed='sed -e s/^X//'
  720 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
  721 
  722 # Same as above, but do not quote variable references.
  723 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
  724 
  725 # Sed substitution to delay expansion of an escaped shell variable in a
  726 # double_quote_subst'ed string.
  727 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  728 
  729 # Constants:
  730 rm="rm -f"
  731 
  732 # Global variables:
  733 default_ofile=libtool
  734 can_build_shared=yes
  735 
  736 # All known linkers require a `.a' archive for static linking (except M$VC,
  737 # which needs '.lib').
  738 libext=a
  739 ltmain="$ac_aux_dir/ltmain.sh"
  740 ofile="$default_ofile"
  741 with_gnu_ld="$lt_cv_prog_gnu_ld"
  742 need_locks="$enable_libtool_lock"
  743 
  744 old_CC="$CC"
  745 old_CFLAGS="$CFLAGS"
  746 
  747 # Set sane defaults for various variables
  748 test -z "$AR" && AR=ar
  749 test -z "$AR_FLAGS" && AR_FLAGS=cru
  750 test -z "$AS" && AS=as
  751 test -z "$CC" && CC=cc
  752 test -z "$DLLTOOL" && DLLTOOL=dlltool
  753 test -z "$LD" && LD=ld
  754 test -z "$LN_S" && LN_S="ln -s"
  755 test -z "$MAGIC_CMD" && MAGIC_CMD=file
  756 test -z "$NM" && NM=nm
  757 test -z "$OBJDUMP" && OBJDUMP=objdump
  758 test -z "$RANLIB" && RANLIB=:
  759 test -z "$STRIP" && STRIP=:
  760 test -z "$ac_objext" && ac_objext=o
  761 
  762 if test x"$host" != x"$build"; then
  763   ac_tool_prefix=${host_alias}-
  764 else
  765   ac_tool_prefix=
  766 fi
  767 
  768 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  769 case $host_os in
  770 linux-gnu*) ;;
  771 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  772 esac
  773 
  774 case $host_os in
  775 aix3*)
  776   # AIX sometimes has problems with the GCC collect2 program.  For some
  777   # reason, if we set the COLLECT_NAMES environment variable, the problems
  778   # vanish in a puff of smoke.
  779   if test "X${COLLECT_NAMES+set}" != Xset; then
  780     COLLECT_NAMES=
  781     export COLLECT_NAMES
  782   fi
  783   ;;
  784 esac
  785 
  786 # Determine commands to create old-style static archives.
  787 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  788 old_postinstall_cmds='chmod 644 $oldlib'
  789 old_postuninstall_cmds=
  790 
  791 if test -n "$RANLIB"; then
  792   case $host_os in
  793   openbsd*)
  794     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  795     ;;
  796   *)
  797     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  798     ;;
  799   esac
  800   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  801 fi
  802 
  803 # Allow CC to be a program name with arguments.
  804 set dummy $CC
  805 compiler="[$]2"
  806 
  807 AC_MSG_CHECKING([for objdir])
  808 rm -f .libs 2>/dev/null
  809 mkdir .libs 2>/dev/null
  810 if test -d .libs; then
  811   objdir=.libs
  812 else
  813   # MS-DOS does not allow filenames that begin with a dot.
  814   objdir=_libs
  815 fi
  816 rmdir .libs 2>/dev/null
  817 AC_MSG_RESULT($objdir)
  818 
  819 
  820 AC_ARG_WITH(pic,
  821 [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
  822 pic_mode="$withval", pic_mode=default)
  823 test -z "$pic_mode" && pic_mode=default
  824 
  825 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
  826 # in isolation, and that seeing it set (from the cache) indicates that
  827 # the associated values are set (in the cache) correctly too.
  828 AC_MSG_CHECKING([for $compiler option to produce PIC])
  829 AC_CACHE_VAL(lt_cv_prog_cc_pic,
  830 [ lt_cv_prog_cc_pic=
  831   lt_cv_prog_cc_shlib=
  832   lt_cv_prog_cc_wl=
  833   lt_cv_prog_cc_static=
  834   lt_cv_prog_cc_no_builtin=
  835   lt_cv_prog_cc_can_build_shared=$can_build_shared
  836 
  837   if test "$GCC" = yes; then
  838     lt_cv_prog_cc_wl='-Wl,'
  839     lt_cv_prog_cc_static='-static'
  840 
  841     case $host_os in
  842     aix*)
  843       # Below there is a dirty hack to force normal static linking with -ldl
  844       # The problem is because libdl dynamically linked with both libc and
  845       # libC (AIX C++ library), which obviously doesn't included in libraries
  846       # list by gcc. This cause undefined symbols with -static flags.
  847       # This hack allows C programs to be linked with "-static -ldl", but
  848       # not sure about C++ programs.
  849       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
  850       ;;
  851     amigaos*)
  852       # FIXME: we need at least 68020 code to build shared libraries, but
  853       # adding the `-m68020' flag to GCC prevents building anything better,
  854       # like `-m68040'.
  855       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
  856       ;;
  857     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  858       # PIC is the default for these OSes.
  859       ;;
  860     darwin* | rhapsody*)
  861       # PIC is the default on this platform
  862       # Common symbols not allowed in MH_DYLIB files
  863       lt_cv_prog_cc_pic='-fno-common'
  864       ;;
  865     cygwin* | mingw* | pw32* | os2*)
  866       # This hack is so that the source file can tell whether it is being
  867       # built for inclusion in a dll (and should export symbols for example).
  868       lt_cv_prog_cc_pic='-DDLL_EXPORT'
  869       ;;
  870     sysv4*MP*)
  871       if test -d /usr/nec; then
  872 	 lt_cv_prog_cc_pic=-Kconform_pic
  873       fi
  874       ;;
  875     *)
  876       lt_cv_prog_cc_pic='-fPIC'
  877       ;;
  878     esac
  879   else
  880     # PORTME Check for PIC flags for the system compiler.
  881     case $host_os in
  882     aix3* | aix4* | aix5*)
  883       lt_cv_prog_cc_wl='-Wl,'
  884       # All AIX code is PIC.
  885       if test "$host_cpu" = ia64; then
  886 	# AIX 5 now supports IA64 processor
  887 	lt_cv_prog_cc_static='-Bstatic'
  888       else
  889 	lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
  890       fi
  891       ;;
  892 
  893     hpux9* | hpux10* | hpux11*)
  894       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
  895       lt_cv_prog_cc_wl='-Wl,'
  896       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
  897       lt_cv_prog_cc_pic='+Z'
  898       ;;
  899 
  900     irix5* | irix6* | nonstopux*)
  901       lt_cv_prog_cc_wl='-Wl,'
  902       lt_cv_prog_cc_static='-non_shared'
  903       # PIC (with -KPIC) is the default.
  904       ;;
  905 
  906     cygwin* | mingw* | pw32* | os2*)
  907       # This hack is so that the source file can tell whether it is being
  908       # built for inclusion in a dll (and should export symbols for example).
  909       lt_cv_prog_cc_pic='-DDLL_EXPORT'
  910       ;;
  911 
  912     newsos6)
  913       lt_cv_prog_cc_pic='-KPIC'
  914       lt_cv_prog_cc_static='-Bstatic'
  915       ;;
  916 
  917     osf3* | osf4* | osf5*)
  918       # All OSF/1 code is PIC.
  919       lt_cv_prog_cc_wl='-Wl,'
  920       lt_cv_prog_cc_static='-non_shared'
  921       ;;
  922 
  923     sco3.2v5*)
  924       lt_cv_prog_cc_pic='-Kpic'
  925       lt_cv_prog_cc_static='-dn'
  926       lt_cv_prog_cc_shlib='-belf'
  927       ;;
  928 
  929     solaris*)
  930       lt_cv_prog_cc_pic='-KPIC'
  931       lt_cv_prog_cc_static='-Bstatic'
  932       lt_cv_prog_cc_wl='-Wl,'
  933       ;;
  934 
  935     sunos4*)
  936       lt_cv_prog_cc_pic='-PIC'
  937       lt_cv_prog_cc_static='-Bstatic'
  938       lt_cv_prog_cc_wl='-Qoption ld '
  939       ;;
  940 
  941     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  942       lt_cv_prog_cc_pic='-KPIC'
  943       lt_cv_prog_cc_static='-Bstatic'
  944       lt_cv_prog_cc_wl='-Wl,'
  945       ;;
  946 
  947     uts4*)
  948       lt_cv_prog_cc_pic='-pic'
  949       lt_cv_prog_cc_static='-Bstatic'
  950       ;;
  951 
  952     sysv4*MP*)
  953       if test -d /usr/nec ;then
  954 	lt_cv_prog_cc_pic='-Kconform_pic'
  955 	lt_cv_prog_cc_static='-Bstatic'
  956       fi
  957       ;;
  958 
  959     *)
  960       lt_cv_prog_cc_can_build_shared=no
  961       ;;
  962     esac
  963   fi
  964 ])
  965 if test -z "$lt_cv_prog_cc_pic"; then
  966   AC_MSG_RESULT([none])
  967 else
  968   AC_MSG_RESULT([$lt_cv_prog_cc_pic])
  969 
  970   # Check to make sure the pic_flag actually works.
  971   AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
  972   AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
  973     save_CFLAGS="$CFLAGS"
  974     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
  975     AC_TRY_COMPILE([], [], [dnl
  976       case $host_os in
  977       hpux9* | hpux10* | hpux11*)
  978 	# On HP-UX, both CC and GCC only warn that PIC is supported... then
  979 	# they create non-PIC objects.  So, if there were any warnings, we
  980 	# assume that PIC is not supported.
  981 	if test -s conftest.err; then
  982 	  lt_cv_prog_cc_pic_works=no
  983 	else
  984 	  lt_cv_prog_cc_pic_works=yes
  985 	fi
  986 	;;
  987       *)
  988 	lt_cv_prog_cc_pic_works=yes
  989 	;;
  990       esac
  991     ], [dnl
  992       lt_cv_prog_cc_pic_works=no
  993     ])
  994     CFLAGS="$save_CFLAGS"
  995   ])
  996 
  997   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
  998     lt_cv_prog_cc_pic=
  999     lt_cv_prog_cc_can_build_shared=no
 1000   else
 1001     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
 1002   fi
 1003 
 1004   AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
 1005 fi
 1006 
 1007 # Check for any special shared library compilation flags.
 1008 if test -n "$lt_cv_prog_cc_shlib"; then
 1009   AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
 1010   if echo "$old_CC $old_CFLAGS " | egrep -e "[[ 	]]$lt_cv_prog_cc_shlib[[ 	]]" >/dev/null; then :
 1011   else
 1012    AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
 1013     lt_cv_prog_cc_can_build_shared=no
 1014   fi
 1015 fi
 1016 
 1017 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
 1018 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
 1019   lt_cv_prog_cc_static_works=no
 1020   save_LDFLAGS="$LDFLAGS"
 1021   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
 1022   AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
 1023   LDFLAGS="$save_LDFLAGS"
 1024 ])
 1025 
 1026 # Belt *and* braces to stop my trousers falling down:
 1027 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
 1028 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
 1029 
 1030 pic_flag="$lt_cv_prog_cc_pic"
 1031 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
 1032 wl="$lt_cv_prog_cc_wl"
 1033 link_static_flag="$lt_cv_prog_cc_static"
 1034 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
 1035 can_build_shared="$lt_cv_prog_cc_can_build_shared"
 1036 
 1037 
 1038 # Check to see if options -o and -c are simultaneously supported by compiler
 1039 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
 1040 AC_CACHE_VAL([lt_cv_compiler_c_o], [
 1041 $rm -r conftest 2>/dev/null
 1042 mkdir conftest
 1043 cd conftest
 1044 echo "int some_variable = 0;" > conftest.$ac_ext
 1045 mkdir out
 1046 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
 1047 # that will create temporary files in the current directory regardless of
 1048 # the output directory.  Thus, making CWD read-only will cause this test
 1049 # to fail, enabling locking or at least warning the user not to do parallel
 1050 # builds.
 1051 chmod -w .
 1052 save_CFLAGS="$CFLAGS"
 1053 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
 1054 compiler_c_o=no
 1055 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
 1056   # The compiler can only warn and ignore the option if not recognized
 1057   # So say no if there are warnings
 1058   if test -s out/conftest.err; then
 1059     lt_cv_compiler_c_o=no
 1060   else
 1061     lt_cv_compiler_c_o=yes
 1062   fi
 1063 else
 1064   # Append any errors to the config.log.
 1065   cat out/conftest.err 1>&AC_FD_CC
 1066   lt_cv_compiler_c_o=no
 1067 fi
 1068 CFLAGS="$save_CFLAGS"
 1069 chmod u+w .
 1070 $rm conftest* out/*
 1071 rmdir out
 1072 cd ..
 1073 rmdir conftest
 1074 $rm -r conftest 2>/dev/null
 1075 ])
 1076 compiler_c_o=$lt_cv_compiler_c_o
 1077 AC_MSG_RESULT([$compiler_c_o])
 1078 
 1079 if test x"$compiler_c_o" = x"yes"; then
 1080   # Check to see if we can write to a .lo
 1081   AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
 1082   AC_CACHE_VAL([lt_cv_compiler_o_lo], [
 1083   lt_cv_compiler_o_lo=no
 1084   save_CFLAGS="$CFLAGS"
 1085   CFLAGS="$CFLAGS -c -o conftest.lo"
 1086   save_objext="$ac_objext"
 1087   ac_objext=lo
 1088   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
 1089     # The compiler can only warn and ignore the option if not recognized
 1090     # So say no if there are warnings
 1091     if test -s conftest.err; then
 1092       lt_cv_compiler_o_lo=no
 1093     else
 1094       lt_cv_compiler_o_lo=yes
 1095     fi
 1096   ])
 1097   ac_objext="$save_objext"
 1098   CFLAGS="$save_CFLAGS"
 1099   ])
 1100   compiler_o_lo=$lt_cv_compiler_o_lo
 1101   AC_MSG_RESULT([$compiler_o_lo])
 1102 else
 1103   compiler_o_lo=no
 1104 fi
 1105 
 1106 # Check to see if we can do hard links to lock some files if needed
 1107 hard_links="nottested"
 1108 if test "$compiler_c_o" = no && test "$need_locks" != no; then
 1109   # do not overwrite the value of need_locks provided by the user
 1110   AC_MSG_CHECKING([if we can lock with hard links])
 1111   hard_links=yes
 1112   $rm conftest*
 1113   ln conftest.a conftest.b 2>/dev/null && hard_links=no
 1114   touch conftest.a
 1115   ln conftest.a conftest.b 2>&5 || hard_links=no
 1116   ln conftest.a conftest.b 2>/dev/null && hard_links=no
 1117   AC_MSG_RESULT([$hard_links])
 1118   if test "$hard_links" = no; then
 1119     AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
 1120     need_locks=warn
 1121   fi
 1122 else
 1123   need_locks=no
 1124 fi
 1125 
 1126 if test "$GCC" = yes; then
 1127   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
 1128   AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
 1129   echo "int some_variable = 0;" > conftest.$ac_ext
 1130   save_CFLAGS="$CFLAGS"
 1131   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
 1132   compiler_rtti_exceptions=no
 1133   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
 1134     # The compiler can only warn and ignore the option if not recognized
 1135     # So say no if there are warnings
 1136     if test -s conftest.err; then
 1137       compiler_rtti_exceptions=no
 1138     else
 1139       compiler_rtti_exceptions=yes
 1140     fi
 1141   ])
 1142   CFLAGS="$save_CFLAGS"
 1143   AC_MSG_RESULT([$compiler_rtti_exceptions])
 1144 
 1145   if test "$compiler_rtti_exceptions" = "yes"; then
 1146     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
 1147   else
 1148     no_builtin_flag=' -fno-builtin'
 1149   fi
 1150 fi
 1151 
 1152 # See if the linker supports building shared libraries.
 1153 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
 1154 
 1155 allow_undefined_flag=
 1156 no_undefined_flag=
 1157 need_lib_prefix=unknown
 1158 need_version=unknown
 1159 # when you set need_version to no, make sure it does not cause -set_version
 1160 # flags to be left without arguments
 1161 archive_cmds=
 1162 archive_expsym_cmds=
 1163 old_archive_from_new_cmds=
 1164 old_archive_from_expsyms_cmds=
 1165 export_dynamic_flag_spec=
 1166 whole_archive_flag_spec=
 1167 thread_safe_flag_spec=
 1168 hardcode_into_libs=no
 1169 hardcode_libdir_flag_spec=
 1170 hardcode_libdir_separator=
 1171 hardcode_direct=no
 1172 hardcode_minus_L=no
 1173 hardcode_shlibpath_var=unsupported
 1174 runpath_var=
 1175 link_all_deplibs=unknown
 1176 always_export_symbols=no
 1177 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
 1178 # include_expsyms should be a list of space-separated symbols to be *always*
 1179 # included in the symbol list
 1180 include_expsyms=
 1181 # exclude_expsyms can be an egrep regular expression of symbols to exclude
 1182 # it will be wrapped by ` (' and `)$', so one must not match beginning or
 1183 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
 1184 # as well as any symbol that contains `d'.
 1185 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
 1186 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
 1187 # platforms (ab)use it in PIC code, but their linkers get confused if
 1188 # the symbol is explicitly referenced.  Since portable code cannot
 1189 # rely on this symbol name, it's probably fine to never include it in
 1190 # preloaded symbol tables.
 1191 extract_expsyms_cmds=
 1192 
 1193 case $host_os in
 1194 cygwin* | mingw* | pw32*)
 1195   # FIXME: the MSVC++ port hasn't been tested in a loooong time
 1196   # When not using gcc, we currently assume that we are using
 1197   # Microsoft Visual C++.
 1198   if test "$GCC" != yes; then
 1199     with_gnu_ld=no
 1200   fi
 1201   ;;
 1202 openbsd*)
 1203   with_gnu_ld=no
 1204   ;;
 1205 esac
 1206 
 1207 ld_shlibs=yes
 1208 if test "$with_gnu_ld" = yes; then
 1209   # If archive_cmds runs LD, not CC, wlarc should be empty
 1210   wlarc='${wl}'
 1211 
 1212   # See if GNU ld supports shared libraries.
 1213   case $host_os in
 1214   aix3* | aix4* | aix5*)
 1215     # On AIX, the GNU linker is very broken
 1216     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
 1217     ld_shlibs=no
 1218     cat <<EOF 1>&2
 1219 
 1220 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
 1221 *** to be unable to reliably create shared libraries on AIX.
 1222 *** Therefore, libtool is disabling shared libraries support.  If you
 1223 *** really care for shared libraries, you may want to modify your PATH
 1224 *** so that a non-GNU linker is found, and then restart.
 1225 
 1226 EOF
 1227     ;;
 1228 
 1229   amigaos*)
 1230     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)'
 1231     hardcode_libdir_flag_spec='-L$libdir'
 1232     hardcode_minus_L=yes
 1233 
 1234     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
 1235     # that the semantics of dynamic libraries on AmigaOS, at least up
 1236     # to version 4, is to share data among multiple programs linked
 1237     # with the same dynamic library.  Since this doesn't match the
 1238     # behavior of shared libraries on other platforms, we can use
 1239     # them.
 1240     ld_shlibs=no
 1241     ;;
 1242 
 1243   beos*)
 1244     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 1245       allow_undefined_flag=unsupported
 1246       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
 1247       # support --undefined.  This deserves some investigation.  FIXME
 1248       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 1249     else
 1250       ld_shlibs=no
 1251     fi
 1252     ;;
 1253 
 1254   cygwin* | mingw* | pw32*)
 1255     # hardcode_libdir_flag_spec is actually meaningless, as there is
 1256     # no search path for DLLs.
 1257     hardcode_libdir_flag_spec='-L$libdir'
 1258     allow_undefined_flag=unsupported
 1259     always_export_symbols=yes
 1260 
 1261     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
 1262       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
 1263       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
 1264       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
 1265       else $CC -o impgen impgen.c ; fi)~
 1266       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
 1267 
 1268     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
 1269 
 1270     # cygwin and mingw dlls have different entry points and sets of symbols
 1271     # to exclude.
 1272     # FIXME: what about values for MSVC?
 1273     dll_entry=__cygwin_dll_entry@12
 1274     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
 1275     case $host_os in
 1276     mingw*)
 1277       # mingw values
 1278       dll_entry=_DllMainCRTStartup@12
 1279       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
 1280       ;;
 1281     esac
 1282 
 1283     # mingw and cygwin differ, and it's simplest to just exclude the union
 1284     # of the two symbol sets.
 1285     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
 1286 
 1287     # recent cygwin and mingw systems supply a stub DllMain which the user
 1288     # can override, but on older systems we have to supply one (in ltdll.c)
 1289     if test "x$lt_cv_need_dllmain" = "xyes"; then
 1290       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
 1291       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~
 1292 	test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
 1293     else
 1294       ltdll_obj=
 1295       ltdll_cmds=
 1296     fi
 1297 
 1298     # Extract the symbol export list from an `--export-all' def file,
 1299     # then regenerate the def file from the symbol export list, so that
 1300     # the compiled dll only exports the symbol export list.
 1301     # Be careful not to strip the DATA tag left be newer dlltools.
 1302     export_symbols_cmds="$ltdll_cmds"'
 1303       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
 1304       sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
 1305 
 1306     # If the export-symbols file already is a .def file (1st line
 1307     # is EXPORTS), use it as is.
 1308     # If DATA tags from a recent dlltool are present, honour them!
 1309     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
 1310 	cp $export_symbols $output_objdir/$soname-def;
 1311       else
 1312 	echo EXPORTS > $output_objdir/$soname-def;
 1313 	_lt_hint=1;
 1314 	cat $export_symbols | while read symbol; do
 1315 	 set dummy \$symbol;
 1316 	 case \[$]# in
 1317 	   2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
 1318 	   4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
 1319 	   *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
 1320 	 esac;
 1321 	 _lt_hint=`expr 1 + \$_lt_hint`;
 1322 	done;
 1323       fi~
 1324       '"$ltdll_cmds"'
 1325       $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~
 1326       $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~
 1327       $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~
 1328       $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~
 1329       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
 1330     ;;
 1331 
 1332   netbsd*)
 1333     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 1334       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
 1335       wlarc=
 1336     else
 1337       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 1338       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 1339     fi
 1340     ;;
 1341 
 1342   solaris* | sysv5*)
 1343     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
 1344       ld_shlibs=no
 1345       cat <<EOF 1>&2
 1346 
 1347 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
 1348 *** create shared libraries on Solaris systems.  Therefore, libtool
 1349 *** is disabling shared libraries support.  We urge you to upgrade GNU
 1350 *** binutils to release 2.9.1 or newer.  Another option is to modify
 1351 *** your PATH or compiler configuration so that the native linker is
 1352 *** used, and then restart.
 1353 
 1354 EOF
 1355     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 1356       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 1357       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 1358     else
 1359       ld_shlibs=no
 1360     fi
 1361     ;;
 1362 
 1363   sunos4*)
 1364     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 1365     wlarc=
 1366     hardcode_direct=yes
 1367     hardcode_shlibpath_var=no
 1368     ;;
 1369 
 1370   *)
 1371     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
 1372       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
 1373       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
 1374     else
 1375       ld_shlibs=no
 1376     fi
 1377     ;;
 1378   esac
 1379 
 1380   if test "$ld_shlibs" = yes; then
 1381     runpath_var=LD_RUN_PATH
 1382     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
 1383     export_dynamic_flag_spec='${wl}--export-dynamic'
 1384     case $host_os in
 1385     cygwin* | mingw* | pw32*)
 1386       # dlltool doesn't understand --whole-archive et. al.
 1387       whole_archive_flag_spec=
 1388       ;;
 1389     *)
 1390       # ancient GNU ld didn't support --whole-archive et. al.
 1391       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
 1392 	whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
 1393       else
 1394 	whole_archive_flag_spec=
 1395       fi
 1396       ;;
 1397     esac
 1398   fi
 1399 else
 1400   # PORTME fill in a description of your system's linker (not GNU ld)
 1401   case $host_os in
 1402   aix3*)
 1403     allow_undefined_flag=unsupported
 1404     always_export_symbols=yes
 1405     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
 1406     # Note: this linker hardcodes the directories in LIBPATH if there
 1407     # are no directories specified by -L.
 1408     hardcode_minus_L=yes
 1409     if test "$GCC" = yes && test -z "$link_static_flag"; then
 1410       # Neither direct hardcoding nor static linking is supported with a
 1411       # broken collect2.
 1412       hardcode_direct=unsupported
 1413     fi
 1414     ;;
 1415 
 1416   aix4* | aix5*)
 1417     if test "$host_cpu" = ia64; then
 1418       # On IA64, the linker does run time linking by default, so we don't
 1419       # have to do anything special.
 1420       aix_use_runtimelinking=no
 1421       exp_sym_flag='-Bexport'
 1422       no_entry_flag=""
 1423     else
 1424       aix_use_runtimelinking=no
 1425 
 1426       # Test if we are trying to use run time linking or normal
 1427       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
 1428       # need to do runtime linking.
 1429       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
 1430 	for ld_flag in $LDFLAGS; do
 1431 	  case $ld_flag in
 1432 	  *-brtl*)
 1433 	    aix_use_runtimelinking=yes
 1434 	    break
 1435 	  ;;
 1436 	  esac
 1437 	done
 1438       esac
 1439 
 1440       exp_sym_flag='-bexport'
 1441       no_entry_flag='-bnoentry'
 1442     fi
 1443 
 1444     # When large executables or shared objects are built, AIX ld can
 1445     # have problems creating the table of contents.  If linking a library
 1446     # or program results in "error TOC overflow" add -mminimal-toc to
 1447     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
 1448     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
 1449 
 1450     hardcode_direct=yes
 1451     archive_cmds=''
 1452     hardcode_libdir_separator=':'
 1453     if test "$GCC" = yes; then
 1454       case $host_os in aix4.[[012]]|aix4.[[012]].*)
 1455 	collect2name=`${CC} -print-prog-name=collect2`
 1456 	if test -f "$collect2name" && \
 1457 	  strings "$collect2name" | grep resolve_lib_name >/dev/null
 1458 	then
 1459 	  # We have reworked collect2
 1460 	  hardcode_direct=yes
 1461 	else
 1462 	  # We have old collect2
 1463 	  hardcode_direct=unsupported
 1464 	  # It fails to find uninstalled libraries when the uninstalled
 1465 	  # path is not listed in the libpath.  Setting hardcode_minus_L
 1466 	  # to unsupported forces relinking
 1467 	  hardcode_minus_L=yes
 1468 	  hardcode_libdir_flag_spec='-L$libdir'
 1469 	  hardcode_libdir_separator=
 1470 	fi
 1471       esac
 1472 
 1473       shared_flag='-shared'
 1474     else
 1475       # not using gcc
 1476       if test "$host_cpu" = ia64; then
 1477 	shared_flag='${wl}-G'
 1478       else
 1479 	if test "$aix_use_runtimelinking" = yes; then
 1480 	  shared_flag='${wl}-G'
 1481 	else
 1482 	  shared_flag='${wl}-bM:SRE'
 1483 	fi
 1484       fi
 1485     fi
 1486 
 1487     # It seems that -bexpall can do strange things, so it is better to
 1488     # generate a list of symbols to export.
 1489     always_export_symbols=yes
 1490     if test "$aix_use_runtimelinking" = yes; then
 1491       # Warning - without using the other runtime loading flags (-brtl),
 1492       # -berok will link without error, but may produce a broken library.
 1493       allow_undefined_flag='-berok'
 1494       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
 1495       archive_expsym_cmds="\$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"
 1496     else
 1497       if test "$host_cpu" = ia64; then
 1498 	hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
 1499 	allow_undefined_flag="-z nodefs"
 1500 	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
 1501       else
 1502 	hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
 1503 	# Warning - without using the other run time loading flags,
 1504 	# -berok will link without error, but may produce a broken library.
 1505 	allow_undefined_flag='${wl}-berok'
 1506 	# This is a bit strange, but is similar to how AIX traditionally builds
 1507 	# it's shared libraries.
 1508 	archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
 1509       fi
 1510     fi
 1511     ;;
 1512 
 1513   amigaos*)
 1514     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)'
 1515     hardcode_libdir_flag_spec='-L$libdir'
 1516     hardcode_minus_L=yes
 1517     # see comment about different semantics on the GNU ld section
 1518     ld_shlibs=no
 1519     ;;
 1520 
 1521   cygwin* | mingw* | pw32*)
 1522     # When not using gcc, we currently assume that we are using
 1523     # Microsoft Visual C++.
 1524     # hardcode_libdir_flag_spec is actually meaningless, as there is
 1525     # no search path for DLLs.
 1526     hardcode_libdir_flag_spec=' '
 1527     allow_undefined_flag=unsupported
 1528     # Tell ltmain to make .lib files, not .a files.
 1529     libext=lib
 1530     # FIXME: Setting linknames here is a bad hack.
 1531     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
 1532     # The linker will automatically build a .lib file if we build a DLL.
 1533     old_archive_from_new_cmds='true'
 1534     # FIXME: Should let the user specify the lib program.
 1535     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
 1536     fix_srcfile_path='`cygpath -w "$srcfile"`'
 1537     ;;
 1538 
 1539   darwin* | rhapsody*)
 1540     case "$host_os" in
 1541     rhapsody* | darwin1.[[012]])
 1542       allow_undefined_flag='-undefined suppress'
 1543       ;;
 1544     *) # Darwin 1.3 on
 1545       allow_undefined_flag='-flat_namespace -undefined suppress'
 1546       ;;
 1547     esac
 1548     # FIXME: Relying on posixy $() will cause problems for
 1549     #        cross-compilation, but unfortunately the echo tests do not
 1550     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
 1551     #	     `"' quotes if we put them in here... so don't!
 1552     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
 1553     # We need to add '_' to the symbols in $export_symbols first
 1554     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
 1555     hardcode_direct=yes
 1556     hardcode_shlibpath_var=no
 1557     whole_archive_flag_spec='-all_load $convenience'
 1558     ;;
 1559 
 1560   freebsd1*)
 1561     ld_shlibs=no
 1562     ;;
 1563 
 1564   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
 1565   # support.  Future versions do this automatically, but an explicit c++rt0.o
 1566   # does not break anything, and helps significantly (at the cost of a little
 1567   # extra space).
 1568   freebsd2.2*)
 1569     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
 1570     hardcode_libdir_flag_spec='-R$libdir'
 1571     hardcode_direct=yes
 1572     hardcode_shlibpath_var=no
 1573     ;;
 1574 
 1575   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
 1576   freebsd2*)
 1577     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 1578     hardcode_direct=yes
 1579     hardcode_minus_L=yes
 1580     hardcode_shlibpath_var=no
 1581     ;;
 1582 
 1583   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
 1584   freebsd*)
 1585     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
 1586     hardcode_libdir_flag_spec='-R$libdir'
 1587     hardcode_direct=yes
 1588     hardcode_shlibpath_var=no
 1589     ;;
 1590 
 1591   hpux9* | hpux10* | hpux11*)
 1592     case $host_os in
 1593     hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
 1594     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
 1595     esac
 1596     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
 1597     hardcode_libdir_separator=:
 1598     hardcode_direct=yes
 1599     hardcode_minus_L=yes # Not in the search PATH, but as the default
 1600 			 # location of the library.
 1601     export_dynamic_flag_spec='${wl}-E'
 1602     ;;
 1603 
 1604   irix5* | irix6* | nonstopux*)
 1605     if test "$GCC" = yes; then
 1606       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 1607       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 1608     else
 1609       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 1610       hardcode_libdir_flag_spec='-rpath $libdir'
 1611     fi
 1612     hardcode_libdir_separator=:
 1613     link_all_deplibs=yes
 1614     ;;
 1615 
 1616   netbsd*)
 1617     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 1618       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
 1619     else
 1620       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
 1621     fi
 1622     hardcode_libdir_flag_spec='-R$libdir'
 1623     hardcode_direct=yes
 1624     hardcode_shlibpath_var=no
 1625     ;;
 1626 
 1627   newsos6)
 1628     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1629     hardcode_direct=yes
 1630     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 1631     hardcode_libdir_separator=:
 1632     hardcode_shlibpath_var=no
 1633     ;;
 1634 
 1635   openbsd*)
 1636     hardcode_direct=yes
 1637     hardcode_shlibpath_var=no
 1638     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 1639       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 1640       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 1641       export_dynamic_flag_spec='${wl}-E'
 1642     else
 1643       case "$host_os" in
 1644       openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
 1645 	archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
 1646 	hardcode_libdir_flag_spec='-R$libdir'
 1647         ;;
 1648       *)
 1649         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
 1650         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
 1651         ;;
 1652       esac
 1653     fi
 1654     ;;
 1655 
 1656   os2*)
 1657     hardcode_libdir_flag_spec='-L$libdir'
 1658     hardcode_minus_L=yes
 1659     allow_undefined_flag=unsupported
 1660     archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
 1661     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
 1662     ;;
 1663 
 1664   osf3*)
 1665     if test "$GCC" = yes; then
 1666       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 1667       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 1668     else
 1669       allow_undefined_flag=' -expect_unresolved \*'
 1670       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 1671     fi
 1672     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 1673     hardcode_libdir_separator=:
 1674     ;;
 1675 
 1676   osf4* | osf5*)	# as osf3* with the addition of -msym flag
 1677     if test "$GCC" = yes; then
 1678       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
 1679       archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
 1680       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
 1681     else
 1682       allow_undefined_flag=' -expect_unresolved \*'
 1683       archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
 1684       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
 1685       $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
 1686 
 1687       #Both c and cxx compiler support -rpath directly
 1688       hardcode_libdir_flag_spec='-rpath $libdir'
 1689     fi
 1690     hardcode_libdir_separator=:
 1691     ;;
 1692 
 1693   sco3.2v5*)
 1694     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1695     hardcode_shlibpath_var=no
 1696     runpath_var=LD_RUN_PATH
 1697     hardcode_runpath_var=yes
 1698     export_dynamic_flag_spec='${wl}-Bexport'
 1699     ;;
 1700 
 1701   solaris*)
 1702     # gcc --version < 3.0 without binutils cannot create self contained
 1703     # shared libraries reliably, requiring libgcc.a to resolve some of
 1704     # the object symbols generated in some cases.  Libraries that use
 1705     # assert need libgcc.a to resolve __eprintf, for example.  Linking
 1706     # a copy of libgcc.a into every shared library to guarantee resolving
 1707     # such symbols causes other problems:  According to Tim Van Holder
 1708     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
 1709     # (to the application) exception stack for one thing.
 1710     no_undefined_flag=' -z defs'
 1711     if test "$GCC" = yes; then
 1712       case `$CC --version 2>/dev/null` in
 1713       [[12]].*)
 1714 	cat <<EOF 1>&2
 1715 
 1716 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
 1717 *** create self contained shared libraries on Solaris systems, without
 1718 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
 1719 *** -no-undefined support, which will at least allow you to build shared
 1720 *** libraries.  However, you may find that when you link such libraries
 1721 *** into an application without using GCC, you have to manually add
 1722 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
 1723 *** upgrade to a newer version of GCC.  Another option is to rebuild your
 1724 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
 1725 
 1726 EOF
 1727         no_undefined_flag=
 1728 	;;
 1729       esac
 1730     fi
 1731     # $CC -shared without GNU ld will not create a library from C++
 1732     # object files and a static libstdc++, better avoid it by now
 1733     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1734     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 1735 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 1736     hardcode_libdir_flag_spec='-R$libdir'
 1737     hardcode_shlibpath_var=no
 1738     case $host_os in
 1739     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
 1740     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
 1741       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
 1742     esac
 1743     link_all_deplibs=yes
 1744     ;;
 1745 
 1746   sunos4*)
 1747     if test "x$host_vendor" = xsequent; then
 1748       # Use $CC to link under sequent, because it throws in some extra .o
 1749       # files that make .init and .fini sections work.
 1750       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
 1751     else
 1752       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
 1753     fi
 1754     hardcode_libdir_flag_spec='-L$libdir'
 1755     hardcode_direct=yes
 1756     hardcode_minus_L=yes
 1757     hardcode_shlibpath_var=no
 1758     ;;
 1759 
 1760   sysv4)
 1761     case $host_vendor in
 1762       sni)
 1763         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1764         hardcode_direct=yes # is this really true???
 1765         ;;
 1766       siemens)
 1767         ## LD is ld it makes a PLAMLIB
 1768         ## CC just makes a GrossModule.
 1769         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 1770         reload_cmds='$CC -r -o $output$reload_objs'
 1771         hardcode_direct=no
 1772         ;;
 1773       motorola)
 1774         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1775         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
 1776         ;;
 1777     esac
 1778     runpath_var='LD_RUN_PATH'
 1779     hardcode_shlibpath_var=no
 1780     ;;
 1781 
 1782   sysv4.3*)
 1783     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1784     hardcode_shlibpath_var=no
 1785     export_dynamic_flag_spec='-Bexport'
 1786     ;;
 1787 
 1788   sysv5*)
 1789     no_undefined_flag=' -z text'
 1790     # $CC -shared without GNU ld will not create a library from C++
 1791     # object files and a static libstdc++, better avoid it by now
 1792     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1793     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
 1794 		$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
 1795     hardcode_libdir_flag_spec=
 1796     hardcode_shlibpath_var=no
 1797     runpath_var='LD_RUN_PATH'
 1798     ;;
 1799 
 1800   uts4*)
 1801     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1802     hardcode_libdir_flag_spec='-L$libdir'
 1803     hardcode_shlibpath_var=no
 1804     ;;
 1805 
 1806   dgux*)
 1807     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1808     hardcode_libdir_flag_spec='-L$libdir'
 1809     hardcode_shlibpath_var=no
 1810     ;;
 1811 
 1812   sysv4*MP*)
 1813     if test -d /usr/nec; then
 1814       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
 1815       hardcode_shlibpath_var=no
 1816       runpath_var=LD_RUN_PATH
 1817       hardcode_runpath_var=yes
 1818       ld_shlibs=yes
 1819     fi
 1820     ;;
 1821 
 1822   sysv4.2uw2*)
 1823     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
 1824     hardcode_direct=yes
 1825     hardcode_minus_L=no
 1826     hardcode_shlibpath_var=no
 1827     hardcode_runpath_var=yes
 1828     runpath_var=LD_RUN_PATH
 1829     ;;
 1830 
 1831   sysv5uw7* | unixware7*)
 1832     no_undefined_flag='${wl}-z ${wl}text'
 1833     if test "$GCC" = yes; then
 1834       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 1835     else
 1836       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
 1837     fi
 1838     runpath_var='LD_RUN_PATH'
 1839     hardcode_shlibpath_var=no
 1840     ;;
 1841 
 1842   *)
 1843     ld_shlibs=no
 1844     ;;
 1845   esac
 1846 fi
 1847 AC_MSG_RESULT([$ld_shlibs])
 1848 test "$ld_shlibs" = no && can_build_shared=no
 1849 
 1850 # Check hardcoding attributes.
 1851 AC_MSG_CHECKING([how to hardcode library paths into programs])
 1852 hardcode_action=
 1853 if test -n "$hardcode_libdir_flag_spec" || \
 1854    test -n "$runpath_var"; then
 1855 
 1856   # We can hardcode non-existant directories.
 1857   if test "$hardcode_direct" != no &&
 1858      # If the only mechanism to avoid hardcoding is shlibpath_var, we
 1859      # have to relink, otherwise we might link with an installed library
 1860      # when we should be linking with a yet-to-be-installed one
 1861      ## test "$hardcode_shlibpath_var" != no &&
 1862      test "$hardcode_minus_L" != no; then
 1863     # Linking always hardcodes the temporary library directory.
 1864     hardcode_action=relink
 1865   else
 1866     # We can link without hardcoding, and we can hardcode nonexisting dirs.
 1867     hardcode_action=immediate
 1868   fi
 1869 else
 1870   # We cannot hardcode anything, or else we can only hardcode existing
 1871   # directories.
 1872   hardcode_action=unsupported
 1873 fi
 1874 AC_MSG_RESULT([$hardcode_action])
 1875 
 1876 striplib=
 1877 old_striplib=
 1878 AC_MSG_CHECKING([whether stripping libraries is possible])
 1879 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
 1880   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
 1881   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
 1882   AC_MSG_RESULT([yes])
 1883 else
 1884   AC_MSG_RESULT([no])
 1885 fi
 1886 
 1887 reload_cmds='$LD$reload_flag -o $output$reload_objs'
 1888 test -z "$deplibs_check_method" && deplibs_check_method=unknown
 1889 
 1890 # PORTME Fill in your ld.so characteristics
 1891 AC_MSG_CHECKING([dynamic linker characteristics])
 1892 library_names_spec=
 1893 libname_spec='lib$name'
 1894 soname_spec=
 1895 postinstall_cmds=
 1896 postuninstall_cmds=
 1897 finish_cmds=
 1898 finish_eval=
 1899 shlibpath_var=
 1900 shlibpath_overrides_runpath=unknown
 1901 version_type=none
 1902 dynamic_linker="$host_os ld.so"
 1903 sys_lib_dlsearch_path_spec="/lib /usr/lib"
 1904 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
 1905 
 1906 case $host_os in
 1907 aix3*)
 1908   version_type=linux
 1909   library_names_spec='${libname}${release}.so$versuffix $libname.a'
 1910   shlibpath_var=LIBPATH
 1911 
 1912   # AIX has no versioning support, so we append a major version to the name.
 1913   soname_spec='${libname}${release}.so$major'
 1914   ;;
 1915 
 1916 aix4* | aix5*)
 1917   version_type=linux
 1918   need_lib_prefix=no
 1919   need_version=no
 1920   hardcode_into_libs=yes
 1921   if test "$host_cpu" = ia64; then
 1922     # AIX 5 supports IA64
 1923     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
 1924     shlibpath_var=LD_LIBRARY_PATH
 1925   else
 1926     # With GCC up to 2.95.x, collect2 would create an import file
 1927     # for dependence libraries.  The import file would start with
 1928     # the line `#! .'.  This would cause the generated library to
 1929     # depend on `.', always an invalid library.  This was fixed in
 1930     # development snapshots of GCC prior to 3.0.
 1931     case $host_os in
 1932       aix4 | aix4.[[01]] | aix4.[[01]].*)
 1933 	if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
 1934 	     echo ' yes '
 1935 	     echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
 1936 	  :
 1937 	else
 1938 	  can_build_shared=no
 1939 	fi
 1940 	;;
 1941     esac
 1942     # AIX (on Power*) has no versioning support, so currently we can
 1943     # not hardcode correct soname into executable. Probably we can
 1944     # add versioning support to collect2, so additional links can
 1945     # be useful in future.
 1946     if test "$aix_use_runtimelinking" = yes; then
 1947       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
 1948       # instead of lib<name>.a to let people know that these are not
 1949       # typical AIX shared libraries.
 1950       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 1951     else
 1952       # We preserve .a as extension for shared libraries through AIX4.2
 1953       # and later when we are not doing run time linking.
 1954       library_names_spec='${libname}${release}.a $libname.a'
 1955       soname_spec='${libname}${release}.so$major'
 1956     fi
 1957     shlibpath_var=LIBPATH
 1958   fi
 1959   hardcode_into_libs=yes
 1960   ;;
 1961 
 1962 amigaos*)
 1963   library_names_spec='$libname.ixlibrary $libname.a'
 1964   # Create ${libname}_ixlibrary.a entries in /sys/libs.
 1965   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'
 1966   ;;
 1967 
 1968 beos*)
 1969   library_names_spec='${libname}.so'
 1970   dynamic_linker="$host_os ld.so"
 1971   shlibpath_var=LIBRARY_PATH
 1972   ;;
 1973 
 1974 bsdi4*)
 1975   version_type=linux
 1976   need_version=no
 1977   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 1978   soname_spec='${libname}${release}.so$major'
 1979   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
 1980   shlibpath_var=LD_LIBRARY_PATH
 1981   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
 1982   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
 1983   export_dynamic_flag_spec=-rdynamic
 1984   # the default ld.so.conf also contains /usr/contrib/lib and
 1985   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
 1986   # libtool to hard-code these into programs
 1987   ;;
 1988 
 1989 cygwin* | mingw* | pw32*)
 1990   version_type=windows
 1991   need_version=no
 1992   need_lib_prefix=no
 1993   case $GCC,$host_os in
 1994   yes,cygwin*)
 1995     library_names_spec='$libname.dll.a'
 1996     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 1997     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
 1998       dldir=$destdir/`dirname \$dlpath`~
 1999       test -d \$dldir || mkdir -p \$dldir~
 2000       $install_prog .libs/$dlname \$dldir/$dlname'
 2001     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
 2002       dlpath=$dir/\$dldll~
 2003        $rm \$dlpath'
 2004     ;;
 2005   yes,mingw*)
 2006     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
 2007     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
 2008     ;;
 2009   yes,pw32*)
 2010     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
 2011     ;;
 2012   *)
 2013     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
 2014     ;;
 2015   esac
 2016   dynamic_linker='Win32 ld.exe'
 2017   # FIXME: first we should search . and the directory the executable is in
 2018   shlibpath_var=PATH
 2019   ;;
 2020 
 2021 darwin* | rhapsody*)
 2022   dynamic_linker="$host_os dyld"
 2023   version_type=darwin
 2024   need_lib_prefix=no
 2025   need_version=no
 2026   # FIXME: Relying on posixy $() will cause problems for
 2027   #        cross-compilation, but unfortunately the echo tests do not
 2028   #        yet detect zsh echo's removal of \ escapes.
 2029   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
 2030   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
 2031   shlibpath_overrides_runpath=yes
 2032   shlibpath_var=DYLD_LIBRARY_PATH
 2033   ;;
 2034 
 2035 freebsd1*)
 2036   dynamic_linker=no
 2037   ;;
 2038 
 2039 freebsd*)
 2040   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
 2041   version_type=freebsd-$objformat
 2042   case $version_type in
 2043     freebsd-elf*)
 2044       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
 2045       need_version=no
 2046       need_lib_prefix=no
 2047       ;;
 2048     freebsd-*)
 2049       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
 2050       need_version=yes
 2051       ;;
 2052   esac
 2053   shlibpath_var=LD_LIBRARY_PATH
 2054   case $host_os in
 2055   freebsd2*)
 2056     shlibpath_overrides_runpath=yes
 2057     ;;
 2058   *)
 2059     shlibpath_overrides_runpath=no
 2060     hardcode_into_libs=yes
 2061     ;;
 2062   esac
 2063   ;;
 2064 
 2065 gnu*)
 2066   version_type=linux
 2067   need_lib_prefix=no
 2068   need_version=no
 2069   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
 2070   soname_spec='${libname}${release}.so$major'
 2071   shlibpath_var=LD_LIBRARY_PATH
 2072   hardcode_into_libs=yes
 2073   ;;
 2074 
 2075 hpux9* | hpux10* | hpux11*)
 2076   # Give a soname corresponding to the major version so that dld.sl refuses to
 2077   # link against other versions.
 2078   dynamic_linker="$host_os dld.sl"
 2079   version_type=sunos
 2080   need_lib_prefix=no
 2081   need_version=no
 2082   shlibpath_var=SHLIB_PATH
 2083   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
 2084   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
 2085   soname_spec='${libname}${release}.sl$major'
 2086   # HP-UX runs *really* slowly unless shared libraries are mode 555.
 2087   postinstall_cmds='chmod 555 $lib'
 2088   ;;
 2089 
 2090 irix5* | irix6* | nonstopux*)
 2091   case $host_os in
 2092     nonstopux*) version_type=nonstopux ;;
 2093     *)          version_type=irix ;;
 2094   esac
 2095   need_lib_prefix=no
 2096   need_version=no
 2097   soname_spec='${libname}${release}.so$major'
 2098   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
 2099   case $host_os in
 2100   irix5* | nonstopux*)
 2101     libsuff= shlibsuff=
 2102     ;;
 2103   *)
 2104     case $LD in # libtool.m4 will add one of these switches to LD
 2105     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
 2106     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
 2107     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
 2108     *) libsuff= shlibsuff= libmagic=never-match;;
 2109     esac
 2110     ;;
 2111   esac
 2112   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
 2113   shlibpath_overrides_runpath=no
 2114   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
 2115   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
 2116   ;;
 2117 
 2118 # No shared lib support for Linux oldld, aout, or coff.
 2119 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
 2120   dynamic_linker=no
 2121   ;;
 2122 
 2123 # This must be Linux ELF.
 2124 linux-gnu*)
 2125   version_type=linux
 2126   need_lib_prefix=no
 2127   need_version=no
 2128   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2129   soname_spec='${libname}${release}.so$major'
 2130   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
 2131   shlibpath_var=LD_LIBRARY_PATH
 2132   shlibpath_overrides_runpath=no
 2133   # This implies no fast_install, which is unacceptable.
 2134   # Some rework will be needed to allow for fast_install
 2135   # before this can be enabled.
 2136   hardcode_into_libs=yes
 2137 
 2138   # We used to test for /lib/ld.so.1 and disable shared libraries on
 2139   # powerpc, because MkLinux only supported shared libraries with the
 2140   # GNU dynamic linker.  Since this was broken with cross compilers,
 2141   # most powerpc-linux boxes support dynamic linking these days and
 2142   # people can always --disable-shared, the test was removed, and we
 2143   # assume the GNU/Linux dynamic linker is in use.
 2144   dynamic_linker='GNU/Linux ld.so'
 2145   ;;
 2146 
 2147 netbsd*)
 2148   version_type=sunos
 2149   need_lib_prefix=no
 2150   need_version=no
 2151   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
 2152     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 2153     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 2154     dynamic_linker='NetBSD (a.out) ld.so'
 2155   else
 2156     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
 2157     soname_spec='${libname}${release}.so$major'
 2158     dynamic_linker='NetBSD ld.elf_so'
 2159   fi
 2160   shlibpath_var=LD_LIBRARY_PATH
 2161   shlibpath_overrides_runpath=yes
 2162   hardcode_into_libs=yes
 2163   ;;
 2164 
 2165 newsos6)
 2166   version_type=linux
 2167   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2168   shlibpath_var=LD_LIBRARY_PATH
 2169   shlibpath_overrides_runpath=yes
 2170   ;;
 2171 
 2172 openbsd*)
 2173   version_type=sunos
 2174   need_lib_prefix=no
 2175   need_version=no
 2176   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 2177     case "$host_os" in
 2178     openbsd2.[[89]] | openbsd2.[[89]].*)
 2179       shlibpath_overrides_runpath=no
 2180       ;;
 2181     *)
 2182       shlibpath_overrides_runpath=yes
 2183       ;;
 2184     esac
 2185   else
 2186     shlibpath_overrides_runpath=yes
 2187   fi
 2188   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 2189   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
 2190   shlibpath_var=LD_LIBRARY_PATH
 2191   ;;
 2192 
 2193 os2*)
 2194   libname_spec='$name'
 2195   need_lib_prefix=no
 2196   library_names_spec='$libname.dll $libname.a'
 2197   dynamic_linker='OS/2 ld.exe'
 2198   shlibpath_var=LIBPATH
 2199   ;;
 2200 
 2201 osf3* | osf4* | osf5*)
 2202   version_type=osf
 2203   need_version=no
 2204   soname_spec='${libname}${release}.so$major'
 2205   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2206   shlibpath_var=LD_LIBRARY_PATH
 2207   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
 2208   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
 2209   hardcode_into_libs=yes
 2210   ;;
 2211 
 2212 sco3.2v5*)
 2213   version_type=osf
 2214   soname_spec='${libname}${release}.so$major'
 2215   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2216   shlibpath_var=LD_LIBRARY_PATH
 2217   ;;
 2218 
 2219 solaris*)
 2220   version_type=linux
 2221   need_lib_prefix=no
 2222   need_version=no
 2223   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2224   soname_spec='${libname}${release}.so$major'
 2225   shlibpath_var=LD_LIBRARY_PATH
 2226   shlibpath_overrides_runpath=yes
 2227   hardcode_into_libs=yes
 2228   # ldd complains unless libraries are executable
 2229   postinstall_cmds='chmod +x $lib'
 2230   ;;
 2231 
 2232 sunos4*)
 2233   version_type=sunos
 2234   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
 2235   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
 2236   shlibpath_var=LD_LIBRARY_PATH
 2237   shlibpath_overrides_runpath=yes
 2238   if test "$with_gnu_ld" = yes; then
 2239     need_lib_prefix=no
 2240   fi
 2241   need_version=yes
 2242   ;;
 2243 
 2244 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 2245   version_type=linux
 2246   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2247   soname_spec='${libname}${release}.so$major'
 2248   shlibpath_var=LD_LIBRARY_PATH
 2249   case $host_vendor in
 2250     sni)
 2251       shlibpath_overrides_runpath=no
 2252       need_lib_prefix=no
 2253       export_dynamic_flag_spec='${wl}-Blargedynsym'
 2254       runpath_var=LD_RUN_PATH
 2255       ;;
 2256     siemens)
 2257       need_lib_prefix=no
 2258       ;;
 2259     motorola)
 2260       need_lib_prefix=no
 2261       need_version=no
 2262       shlibpath_overrides_runpath=no
 2263       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
 2264       ;;
 2265   esac
 2266   ;;
 2267 
 2268 uts4*)
 2269   version_type=linux
 2270   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2271   soname_spec='${libname}${release}.so$major'
 2272   shlibpath_var=LD_LIBRARY_PATH
 2273   ;;
 2274 
 2275 dgux*)
 2276   version_type=linux
 2277   need_lib_prefix=no
 2278   need_version=no
 2279   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
 2280   soname_spec='${libname}${release}.so$major'
 2281   shlibpath_var=LD_LIBRARY_PATH
 2282   ;;
 2283 
 2284 sysv4*MP*)
 2285   if test -d /usr/nec ;then
 2286     version_type=linux
 2287     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
 2288     soname_spec='$libname.so.$major'
 2289     shlibpath_var=LD_LIBRARY_PATH
 2290   fi
 2291   ;;
 2292 
 2293 *)
 2294   dynamic_linker=no
 2295   ;;
 2296 esac
 2297 AC_MSG_RESULT([$dynamic_linker])
 2298 test "$dynamic_linker" = no && can_build_shared=no
 2299 
 2300 # Report the final consequences.
 2301 AC_MSG_CHECKING([if libtool supports shared libraries])
 2302 AC_MSG_RESULT([$can_build_shared])
 2303 
 2304 AC_MSG_CHECKING([whether to build shared libraries])
 2305 test "$can_build_shared" = "no" && enable_shared=no
 2306 
 2307 # On AIX, shared libraries and static libraries use the same namespace, and
 2308 # are all built from PIC.
 2309 case "$host_os" in
 2310 aix3*)
 2311   test "$enable_shared" = yes && enable_static=no
 2312   if test -n "$RANLIB"; then
 2313     archive_cmds="$archive_cmds~\$RANLIB \$lib"
 2314     postinstall_cmds='$RANLIB $lib'
 2315   fi
 2316   ;;
 2317 
 2318 aix4*)
 2319   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
 2320     test "$enable_shared" = yes && enable_static=no
 2321   fi
 2322   ;;
 2323 esac
 2324 AC_MSG_RESULT([$enable_shared])
 2325 
 2326 AC_MSG_CHECKING([whether to build static libraries])
 2327 # Make sure either enable_shared or enable_static is yes.
 2328 test "$enable_shared" = yes || enable_static=yes
 2329 AC_MSG_RESULT([$enable_static])
 2330 
 2331 if test "$hardcode_action" = relink; then
 2332   # Fast installation is not supported
 2333   enable_fast_install=no
 2334 elif test "$shlibpath_overrides_runpath" = yes ||
 2335      test "$enable_shared" = no; then
 2336   # Fast installation is not necessary
 2337   enable_fast_install=needless
 2338 fi
 2339 
 2340 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
 2341 if test "$GCC" = yes; then
 2342   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
 2343 fi
 2344 
 2345 AC_LIBTOOL_DLOPEN_SELF
 2346 
 2347 if test "$enable_shared" = yes && test "$GCC" = yes; then
 2348   case $archive_cmds in
 2349   *'~'*)
 2350     # FIXME: we may have to deal with multi-command sequences.
 2351     ;;
 2352   '$CC '*)
 2353     # Test whether the compiler implicitly links with -lc since on some
 2354     # systems, -lgcc has to come before -lc. If gcc already passes -lc
 2355     # to ld, don't add -lc before -lgcc.
 2356     AC_MSG_CHECKING([whether -lc should be explicitly linked in])
 2357     AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
 2358     [$rm conftest*
 2359     echo 'static int dummy;' > conftest.$ac_ext
 2360 
 2361     if AC_TRY_EVAL(ac_compile); then
 2362       soname=conftest
 2363       lib=conftest
 2364       libobjs=conftest.$ac_objext
 2365       deplibs=
 2366       wl=$lt_cv_prog_cc_wl
 2367       compiler_flags=-v
 2368       linker_flags=-v
 2369       verstring=
 2370       output_objdir=.
 2371       libname=conftest
 2372       save_allow_undefined_flag=$allow_undefined_flag
 2373       allow_undefined_flag=
 2374       if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
 2375       then
 2376 	lt_cv_archive_cmds_need_lc=no
 2377       else
 2378 	lt_cv_archive_cmds_need_lc=yes
 2379       fi
 2380       allow_undefined_flag=$save_allow_undefined_flag
 2381     else
 2382       cat conftest.err 1>&5
 2383     fi])
 2384     AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
 2385     ;;
 2386   esac
 2387 fi
 2388 need_lc=${lt_cv_archive_cmds_need_lc-yes}
 2389 
 2390 # The second clause should only fire when bootstrapping the
 2391 # libtool distribution, otherwise you forgot to ship ltmain.sh
 2392 # with your package, and you will get complaints that there are
 2393 # no rules to generate ltmain.sh.
 2394 if test -f "$ltmain"; then
 2395   :
 2396 else
 2397   # If there is no Makefile yet, we rely on a make rule to execute
 2398   # `config.status --recheck' to rerun these tests and create the
 2399   # libtool script then.
 2400   test -f Makefile && make "$ltmain"
 2401 fi
 2402 
 2403 if test -f "$ltmain"; then
 2404   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
 2405   $rm -f "${ofile}T"
 2406 
 2407   echo creating $ofile
 2408 
 2409   # Now quote all the things that may contain metacharacters while being
 2410   # careful not to overquote the AC_SUBSTed values.  We take copies of the
 2411   # variables and quote the copies for generation of the libtool script.
 2412   for var in echo old_CC old_CFLAGS SED \
 2413     AR AR_FLAGS CC LD LN_S NM SHELL \
 2414     reload_flag reload_cmds wl \
 2415     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
 2416     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
 2417     library_names_spec soname_spec \
 2418     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
 2419     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
 2420     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
 2421     old_striplib striplib file_magic_cmd export_symbols_cmds \
 2422     deplibs_check_method allow_undefined_flag no_undefined_flag \
 2423     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
 2424     global_symbol_to_c_name_address \
 2425     hardcode_libdir_flag_spec hardcode_libdir_separator  \
 2426     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
 2427     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
 2428 
 2429     case $var in
 2430     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
 2431     old_postinstall_cmds | old_postuninstall_cmds | \
 2432     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
 2433     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
 2434     postinstall_cmds | postuninstall_cmds | \
 2435     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
 2436       # Double-quote double-evaled strings.
 2437       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
 2438       ;;
 2439     *)
 2440       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
 2441       ;;
 2442     esac
 2443   done
 2444 
 2445   cat <<__EOF__ > "${ofile}T"
 2446 #! $SHELL
 2447 
 2448 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
 2449 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
 2450 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
 2451 #
 2452 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
 2453 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
 2454 #
 2455 # This program is free software; you can redistribute it and/or modify
 2456 # it under the terms of the GNU General Public License as published by
 2457 # the Free Software Foundation; either version 2 of the License, or
 2458 # (at your option) any later version.
 2459 #
 2460 # This program is distributed in the hope that it will be useful, but
 2461 # WITHOUT ANY WARRANTY; without even the implied warranty of
 2462 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 2463 # General Public License for more details.
 2464 #
 2465 # You should have received a copy of the GNU General Public License
 2466 # along with this program; if not, write to the Free Software
 2467 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 2468 #
 2469 # As a special exception to the GNU General Public License, if you
 2470 # distribute this file as part of a program that contains a
 2471 # configuration script generated by Autoconf, you may include it under
 2472 # the same distribution terms that you use for the rest of that program.
 2473 
 2474 # A sed that does not truncate output.
 2475 SED=$lt_SED
 2476 
 2477 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
 2478 Xsed="${SED} -e s/^X//"
 2479 
 2480 # The HP-UX ksh and POSIX shell print the target directory to stdout
 2481 # if CDPATH is set.
 2482 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
 2483 
 2484 # ### BEGIN LIBTOOL CONFIG
 2485 
 2486 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
 2487 
 2488 # Shell to use when invoking shell scripts.
 2489 SHELL=$lt_SHELL
 2490 
 2491 # Whether or not to build shared libraries.
 2492 build_libtool_libs=$enable_shared
 2493 
 2494 # Whether or not to build static libraries.
 2495 build_old_libs=$enable_static
 2496 
 2497 # Whether or not to add -lc for building shared libraries.
 2498 build_libtool_need_lc=$need_lc
 2499 
 2500 # Whether or not to optimize for fast installation.
 2501 fast_install=$enable_fast_install
 2502 
 2503 # The host system.
 2504 host_alias=$host_alias
 2505 host=$host
 2506 
 2507 # An echo program that does not interpret backslashes.
 2508 echo=$lt_echo
 2509 
 2510 # The archiver.
 2511 AR=$lt_AR
 2512 AR_FLAGS=$lt_AR_FLAGS
 2513 
 2514 # The default C compiler.
 2515 CC=$lt_CC
 2516 
 2517 # Is the compiler the GNU C compiler?
 2518 with_gcc=$GCC
 2519 
 2520 # The linker used to build libraries.
 2521 LD=$lt_LD
 2522 
 2523 # Whether we need hard or soft links.
 2524 LN_S=$lt_LN_S
 2525 
 2526 # A BSD-compatible nm program.
 2527 NM=$lt_NM
 2528 
 2529 # A symbol stripping program
 2530 STRIP=$STRIP
 2531 
 2532 # Used to examine libraries when file_magic_cmd begins "file"
 2533 MAGIC_CMD=$MAGIC_CMD
 2534 
 2535 # Used on cygwin: DLL creation program.
 2536 DLLTOOL="$DLLTOOL"
 2537 
 2538 # Used on cygwin: object dumper.
 2539 OBJDUMP="$OBJDUMP"
 2540 
 2541 # Used on cygwin: assembler.
 2542 AS="$AS"
 2543 
 2544 # The name of the directory that contains temporary libtool files.
 2545 objdir=$objdir
 2546 
 2547 # How to create reloadable object files.
 2548 reload_flag=$lt_reload_flag
 2549 reload_cmds=$lt_reload_cmds
 2550 
 2551 # How to pass a linker flag through the compiler.
 2552 wl=$lt_wl
 2553 
 2554 # Object file suffix (normally "o").
 2555 objext="$ac_objext"
 2556 
 2557 # Old archive suffix (normally "a").
 2558 libext="$libext"
 2559 
 2560 # Executable file suffix (normally "").
 2561 exeext="$exeext"
 2562 
 2563 # Additional compiler flags for building library objects.
 2564 pic_flag=$lt_pic_flag
 2565 pic_mode=$pic_mode
 2566 
 2567 # Does compiler simultaneously support -c and -o options?
 2568 compiler_c_o=$lt_compiler_c_o
 2569 
 2570 # Can we write directly to a .lo ?
 2571 compiler_o_lo=$lt_compiler_o_lo
 2572 
 2573 # Must we lock files when doing compilation ?
 2574 need_locks=$lt_need_locks
 2575 
 2576 # Do we need the lib prefix for modules?
 2577 need_lib_prefix=$need_lib_prefix
 2578 
 2579 # Do we need a version for libraries?
 2580 need_version=$need_version
 2581 
 2582 # Whether dlopen is supported.
 2583 dlopen_support=$enable_dlopen
 2584 
 2585 # Whether dlopen of programs is supported.
 2586 dlopen_self=$enable_dlopen_self
 2587 
 2588 # Whether dlopen of statically linked programs is supported.
 2589 dlopen_self_static=$enable_dlopen_self_static
 2590 
 2591 # Compiler flag to prevent dynamic linking.
 2592 link_static_flag=$lt_link_static_flag
 2593 
 2594 # Compiler flag to turn off builtin functions.
 2595 no_builtin_flag=$lt_no_builtin_flag
 2596 
 2597 # Compiler flag to allow reflexive dlopens.
 2598 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
 2599 
 2600 # Compiler flag to generate shared objects directly from archives.
 2601 whole_archive_flag_spec=$lt_whole_archive_flag_spec
 2602 
 2603 # Compiler flag to generate thread-safe objects.
 2604 thread_safe_flag_spec=$lt_thread_safe_flag_spec
 2605 
 2606 # Library versioning type.
 2607 version_type=$version_type
 2608 
 2609 # Format of library name prefix.
 2610 libname_spec=$lt_libname_spec
 2611 
 2612 # List of archive names.  First name is the real one, the rest are links.
 2613 # The last name is the one that the linker finds with -lNAME.
 2614 library_names_spec=$lt_library_names_spec
 2615 
 2616 # The coded name of the library, if different from the real name.
 2617 soname_spec=$lt_soname_spec
 2618 
 2619 # Commands used to build and install an old-style archive.
 2620 RANLIB=$lt_RANLIB
 2621 old_archive_cmds=$lt_old_archive_cmds
 2622 old_postinstall_cmds=$lt_old_postinstall_cmds
 2623 old_postuninstall_cmds=$lt_old_postuninstall_cmds
 2624 
 2625 # Create an old-style archive from a shared archive.
 2626 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
 2627 
 2628 # Create a temporary old-style archive to link instead of a shared archive.
 2629 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
 2630 
 2631 # Commands used to build and install a shared archive.
 2632 archive_cmds=$lt_archive_cmds
 2633 archive_expsym_cmds=$lt_archive_expsym_cmds
 2634 postinstall_cmds=$lt_postinstall_cmds
 2635 postuninstall_cmds=$lt_postuninstall_cmds
 2636 
 2637 # Commands to strip libraries.
 2638 old_striplib=$lt_old_striplib
 2639 striplib=$lt_striplib
 2640 
 2641 # Method to check whether dependent libraries are shared objects.
 2642 deplibs_check_method=$lt_deplibs_check_method
 2643 
 2644 # Command to use when deplibs_check_method == file_magic.
 2645 file_magic_cmd=$lt_file_magic_cmd
 2646 
 2647 # Flag that allows shared libraries with undefined symbols to be built.
 2648 allow_undefined_flag=$lt_allow_undefined_flag
 2649 
 2650 # Flag that forces no undefined symbols.
 2651 no_undefined_flag=$lt_no_undefined_flag
 2652 
 2653 # Commands used to finish a libtool library installation in a directory.
 2654 finish_cmds=$lt_finish_cmds
 2655 
 2656 # Same as above, but a single script fragment to be evaled but not shown.
 2657 finish_eval=$lt_finish_eval
 2658 
 2659 # Take the output of nm and produce a listing of raw symbols and C names.
 2660 global_symbol_pipe=$lt_global_symbol_pipe
 2661 
 2662 # Transform the output of nm in a proper C declaration
 2663 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
 2664 
 2665 # Transform the output of nm in a C name address pair
 2666 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
 2667 
 2668 # This is the shared library runtime path variable.
 2669 runpath_var=$runpath_var
 2670 
 2671 # This is the shared library path variable.
 2672 shlibpath_var=$shlibpath_var
 2673 
 2674 # Is shlibpath searched before the hard-coded library search path?
 2675 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
 2676 
 2677 # How to hardcode a shared library path into an executable.
 2678 hardcode_action=$hardcode_action
 2679 
 2680 # Whether we should hardcode library paths into libraries.
 2681 hardcode_into_libs=$hardcode_into_libs
 2682 
 2683 # Flag to hardcode \$libdir into a binary during linking.
 2684 # This must work even if \$libdir does not exist.
 2685 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
 2686 
 2687 # Whether we need a single -rpath flag with a separated argument.
 2688 hardcode_libdir_separator=$lt_hardcode_libdir_separator
 2689 
 2690 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
 2691 # resulting binary.
 2692 hardcode_direct=$hardcode_direct
 2693 
 2694 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
 2695 # resulting binary.
 2696 hardcode_minus_L=$hardcode_minus_L
 2697 
 2698 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
 2699 # the resulting binary.
 2700 hardcode_shlibpath_var=$hardcode_shlibpath_var
 2701 
 2702 # Variables whose values should be saved in libtool wrapper scripts and
 2703 # restored at relink time.
 2704 variables_saved_for_relink="$variables_saved_for_relink"
 2705 
 2706 # Whether libtool must link a program against all its dependency libraries.
 2707 link_all_deplibs=$link_all_deplibs
 2708 
 2709 # Compile-time system search path for libraries
 2710 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
 2711 
 2712 # Run-time system search path for libraries
 2713 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
 2714 
 2715 # Fix the shell variable \$srcfile for the compiler.
 2716 fix_srcfile_path="$fix_srcfile_path"
 2717 
 2718 # Set to yes if exported symbols are required.
 2719 always_export_symbols=$always_export_symbols
 2720 
 2721 # The commands to list exported symbols.
 2722 export_symbols_cmds=$lt_export_symbols_cmds
 2723 
 2724 # The commands to extract the exported symbol list from a shared archive.
 2725 extract_expsyms_cmds=$lt_extract_expsyms_cmds
 2726 
 2727 # Symbols that should not be listed in the preloaded symbols.
 2728 exclude_expsyms=$lt_exclude_expsyms
 2729 
 2730 # Symbols that must always be exported.
 2731 include_expsyms=$lt_include_expsyms
 2732 
 2733 # ### END LIBTOOL CONFIG
 2734 
 2735 __EOF__
 2736 
 2737   case $host_os in
 2738   aix3*)
 2739     cat <<\EOF >> "${ofile}T"
 2740 
 2741 # AIX sometimes has problems with the GCC collect2 program.  For some
 2742 # reason, if we set the COLLECT_NAMES environment variable, the problems
 2743 # vanish in a puff of smoke.
 2744 if test "X${COLLECT_NAMES+set}" != Xset; then
 2745   COLLECT_NAMES=
 2746   export COLLECT_NAMES
 2747 fi
 2748 EOF
 2749     ;;
 2750   esac
 2751 
 2752   case $host_os in
 2753   cygwin* | mingw* | pw32* | os2*)
 2754     cat <<'EOF' >> "${ofile}T"
 2755       # This is a source program that is used to create dlls on Windows
 2756       # Don't remove nor modify the starting and closing comments
 2757 # /* ltdll.c starts here */
 2758 # #define WIN32_LEAN_AND_MEAN
 2759 # #include <windows.h>
 2760 # #undef WIN32_LEAN_AND_MEAN
 2761 # #include <stdio.h>
 2762 #
 2763 # #ifndef __CYGWIN__
 2764 # #  ifdef __CYGWIN32__
 2765 # #    define __CYGWIN__ __CYGWIN32__
 2766 # #  endif
 2767 # #endif
 2768 #
 2769 # #ifdef __cplusplus
 2770 # extern "C" {
 2771 # #endif
 2772 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
 2773 # #ifdef __cplusplus
 2774 # }
 2775 # #endif
 2776 #
 2777 # #ifdef __CYGWIN__
 2778 # #include <cygwin/cygwin_dll.h>
 2779 # DECLARE_CYGWIN_DLL( DllMain );
 2780 # #endif
 2781 # HINSTANCE __hDllInstance_base;
 2782 #
 2783 # BOOL APIENTRY
 2784 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
 2785 # {
 2786 #   __hDllInstance_base = hInst;
 2787 #   return TRUE;
 2788 # }
 2789 # /* ltdll.c ends here */
 2790 	# This is a source program that is used to create import libraries
 2791 	# on Windows for dlls which lack them. Don't remove nor modify the
 2792 	# starting and closing comments
 2793 # /* impgen.c starts here */
 2794 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
 2795 #
 2796 #  This file is part of GNU libtool.
 2797 #
 2798 #  This program is free software; you can redistribute it and/or modify
 2799 #  it under the terms of the GNU General Public License as published by
 2800 #  the Free Software Foundation; either version 2 of the License, or
 2801 #  (at your option) any later version.
 2802 #
 2803 #  This program is distributed in the hope that it will be useful,
 2804 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
 2805 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 2806 #  GNU General Public License for more details.
 2807 #
 2808 #  You should have received a copy of the GNU General Public License
 2809 #  along with this program; if not, write to the Free Software
 2810 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 2811 #  */
 2812 #
 2813 # #include <stdio.h>		/* for printf() */
 2814 # #include <unistd.h>		/* for open(), lseek(), read() */
 2815 # #include <fcntl.h>		/* for O_RDONLY, O_BINARY */
 2816 # #include <string.h>		/* for strdup() */
 2817 #
 2818 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
 2819 # #ifndef O_BINARY
 2820 # #define O_BINARY 0
 2821 # #endif
 2822 #
 2823 # static unsigned int
 2824 # pe_get16 (fd, offset)
 2825 #      int fd;
 2826 #      int offset;
 2827 # {
 2828 #   unsigned char b[2];
 2829 #   lseek (fd, offset, SEEK_SET);
 2830 #   read (fd, b, 2);
 2831 #   return b[0] + (b[1]<<8);
 2832 # }
 2833 #
 2834 # static unsigned int
 2835 # pe_get32 (fd, offset)
 2836 #     int fd;
 2837 #     int offset;
 2838 # {
 2839 #   unsigned char b[4];
 2840 #   lseek (fd, offset, SEEK_SET);
 2841 #   read (fd, b, 4);
 2842 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 2843 # }
 2844 #
 2845 # static unsigned int
 2846 # pe_as32 (ptr)
 2847 #      void *ptr;
 2848 # {
 2849 #   unsigned char *b = ptr;
 2850 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
 2851 # }
 2852 #
 2853 # int
 2854 # main (argc, argv)
 2855 #     int argc;
 2856 #     char *argv[];
 2857 # {
 2858 #     int dll;
 2859 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
 2860 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
 2861 #     unsigned long name_rvas, nexp;
 2862 #     unsigned char *expdata, *erva;
 2863 #     char *filename, *dll_name;
 2864 #
 2865 #     filename = argv[1];
 2866 #
 2867 #     dll = open(filename, O_RDONLY|O_BINARY);
 2868 #     if (dll < 1)
 2869 # 	return 1;
 2870 #
 2871 #     dll_name = filename;
 2872 #
 2873 #     for (i=0; filename[i]; i++)
 2874 # 	if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
 2875 # 	    dll_name = filename + i +1;
 2876 #
 2877 #     pe_header_offset = pe_get32 (dll, 0x3c);
 2878 #     opthdr_ofs = pe_header_offset + 4 + 20;
 2879 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
 2880 #
 2881 #     if (num_entries < 1) /* no exports */
 2882 # 	return 1;
 2883 #
 2884 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
 2885 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
 2886 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
 2887 #     secptr = (pe_header_offset + 4 + 20 +
 2888 # 	      pe_get16 (dll, pe_header_offset + 4 + 16));
 2889 #
 2890 #     expptr = 0;
 2891 #     for (i = 0; i < nsections; i++)
 2892 #     {
 2893 # 	char sname[8];
 2894 # 	unsigned long secptr1 = secptr + 40 * i;
 2895 # 	unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
 2896 # 	unsigned long vsize = pe_get32 (dll, secptr1 + 16);
 2897 # 	unsigned long fptr = pe_get32 (dll, secptr1 + 20);
 2898 # 	lseek(dll, secptr1, SEEK_SET);
 2899 # 	read(dll, sname, 8);
 2900 # 	if (vaddr <= export_rva && vaddr+vsize > export_rva)
 2901 # 	{
 2902 # 	    expptr = fptr + (export_rva - vaddr);
 2903 # 	    if (export_rva + export_size > vaddr + vsize)
 2904 # 		export_size = vsize - (export_rva - vaddr);
 2905 # 	    break;
 2906 # 	}
 2907 #     }
 2908 #
 2909 #     expdata = (unsigned char*)malloc(export_size);
 2910 #     lseek (dll, expptr, SEEK_SET);
 2911 #     read (dll, expdata, export_size);
 2912 #     erva = expdata - export_rva;
 2913 #
 2914 #     nexp = pe_as32 (expdata+24);
 2915 #     name_rvas = pe_as32 (expdata+32);
 2916 #
 2917 #     printf ("EXPORTS\n");
 2918 #     for (i = 0; i<nexp; i++)
 2919 #     {
 2920 # 	unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
 2921 # 	printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
 2922 #     }
 2923 #
 2924 #     return 0;
 2925 # }
 2926 # /* impgen.c ends here */
 2927 
 2928 EOF
 2929     ;;
 2930   esac
 2931 
 2932   # We use sed instead of cat because bash on DJGPP gets confused if
 2933   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
 2934   # text mode, it properly converts lines to CR/LF.  This bash problem
 2935   # is reportedly fixed, but why not run on old versions too?
 2936   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
 2937 
 2938   mv -f "${ofile}T" "$ofile" || \
 2939     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
 2940   chmod +x "$ofile"
 2941 fi
 2942 
 2943 ])# _LT_AC_LTCONFIG_HACK
 2944 
 2945 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
 2946 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
 2947 
 2948 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
 2949 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
 2950 
 2951 # AC_ENABLE_SHARED - implement the --enable-shared flag
 2952 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
 2953 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 2954 #   `yes'.
 2955 AC_DEFUN([AC_ENABLE_SHARED],
 2956 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
 2957 AC_ARG_ENABLE(shared,
 2958 changequote(<<, >>)dnl
 2959 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
 2960 changequote([, ])dnl
 2961 [p=${PACKAGE-default}
 2962 case $enableval in
 2963 yes) enable_shared=yes ;;
 2964 no) enable_shared=no ;;
 2965 *)
 2966   enable_shared=no
 2967   # Look at the argument we got.  We use all the common list separators.
 2968   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 2969   for pkg in $enableval; do
 2970     if test "X$pkg" = "X$p"; then
 2971       enable_shared=yes
 2972     fi
 2973   done
 2974   IFS="$ac_save_ifs"
 2975   ;;
 2976 esac],
 2977 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
 2978 ])
 2979 
 2980 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
 2981 AC_DEFUN([AC_DISABLE_SHARED],
 2982 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 2983 AC_ENABLE_SHARED(no)])
 2984 
 2985 # AC_ENABLE_STATIC - implement the --enable-static flag
 2986 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
 2987 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 2988 #   `yes'.
 2989 AC_DEFUN([AC_ENABLE_STATIC],
 2990 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
 2991 AC_ARG_ENABLE(static,
 2992 changequote(<<, >>)dnl
 2993 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
 2994 changequote([, ])dnl
 2995 [p=${PACKAGE-default}
 2996 case $enableval in
 2997 yes) enable_static=yes ;;
 2998 no) enable_static=no ;;
 2999 *)
 3000   enable_static=no
 3001   # Look at the argument we got.  We use all the common list separators.
 3002   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 3003   for pkg in $enableval; do
 3004     if test "X$pkg" = "X$p"; then
 3005       enable_static=yes
 3006     fi
 3007   done
 3008   IFS="$ac_save_ifs"
 3009   ;;
 3010 esac],
 3011 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
 3012 ])
 3013 
 3014 # AC_DISABLE_STATIC - set the default static flag to --disable-static
 3015 AC_DEFUN([AC_DISABLE_STATIC],
 3016 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 3017 AC_ENABLE_STATIC(no)])
 3018 
 3019 
 3020 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
 3021 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
 3022 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
 3023 #   `yes'.
 3024 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
 3025 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
 3026 AC_ARG_ENABLE(fast-install,
 3027 changequote(<<, >>)dnl
 3028 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
 3029 changequote([, ])dnl
 3030 [p=${PACKAGE-default}
 3031 case $enableval in
 3032 yes) enable_fast_install=yes ;;
 3033 no) enable_fast_install=no ;;
 3034 *)
 3035   enable_fast_install=no
 3036   # Look at the argument we got.  We use all the common list separators.
 3037   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
 3038   for pkg in $enableval; do
 3039     if test "X$pkg" = "X$p"; then
 3040       enable_fast_install=yes
 3041     fi
 3042   done
 3043   IFS="$ac_save_ifs"
 3044   ;;
 3045 esac],
 3046 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
 3047 ])
 3048 
 3049 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
 3050 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
 3051 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 3052 AC_ENABLE_FAST_INSTALL(no)])
 3053 
 3054 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
 3055 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
 3056 #   Where MODE is either `yes' or `no'.  If omitted, it defaults to
 3057 #   `both'.
 3058 AC_DEFUN([AC_LIBTOOL_PICMODE],
 3059 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 3060 pic_mode=ifelse($#,1,$1,default)])
 3061 
 3062 
 3063 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
 3064 AC_DEFUN([AC_PATH_TOOL_PREFIX],
 3065 [AC_MSG_CHECKING([for $1])
 3066 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
 3067 [case $MAGIC_CMD in
 3068   /*)
 3069   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
 3070   ;;
 3071   ?:/*)
 3072   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
 3073   ;;
 3074   *)
 3075   ac_save_MAGIC_CMD="$MAGIC_CMD"
 3076   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
 3077 dnl $ac_dummy forces splitting on constant user-supplied paths.
 3078 dnl POSIX.2 word splitting is done only on the output of word expansions,
 3079 dnl not every word.  This closes a longstanding sh security hole.
 3080   ac_dummy="ifelse([$2], , $PATH, [$2])"
 3081   for ac_dir in $ac_dummy; do
 3082     test -z "$ac_dir" && ac_dir=.
 3083     if test -f $ac_dir/$1; then
 3084       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
 3085       if test -n "$file_magic_test_file"; then
 3086 	case $deplibs_check_method in
 3087 	"file_magic "*)
 3088 	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
 3089 	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 3090 	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
 3091 	    egrep "$file_magic_regex" > /dev/null; then
 3092 	    :
 3093 	  else
 3094 	    cat <<EOF 1>&2
 3095 
 3096 *** Warning: the command libtool uses to detect shared libraries,
 3097 *** $file_magic_cmd, produces output that libtool cannot recognize.
 3098 *** The result is that libtool may fail to recognize shared libraries
 3099 *** as such.  This will affect the creation of libtool libraries that
 3100 *** depend on shared libraries, but programs linked with such libtool
 3101 *** libraries will work regardless of this problem.  Nevertheless, you
 3102 *** may want to report the problem to your system manager and/or to
 3103 *** bug-libtool@gnu.org
 3104 
 3105 EOF
 3106 	  fi ;;
 3107 	esac
 3108       fi
 3109       break
 3110     fi
 3111   done
 3112   IFS="$ac_save_ifs"
 3113   MAGIC_CMD="$ac_save_MAGIC_CMD"
 3114   ;;
 3115 esac])
 3116 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
 3117 if test -n "$MAGIC_CMD"; then
 3118   AC_MSG_RESULT($MAGIC_CMD)
 3119 else
 3120   AC_MSG_RESULT(no)
 3121 fi
 3122 ])
 3123 
 3124 
 3125 # AC_PATH_MAGIC - find a file program which can recognise a shared library
 3126 AC_DEFUN([AC_PATH_MAGIC],
 3127 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
 3128 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
 3129 if test -z "$lt_cv_path_MAGIC_CMD"; then
 3130   if test -n "$ac_tool_prefix"; then
 3131     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
 3132   else
 3133     MAGIC_CMD=:
 3134   fi
 3135 fi
 3136 ])
 3137 
 3138 
 3139 # AC_PROG_LD - find the path to the GNU or non-GNU linker
 3140 AC_DEFUN([AC_PROG_LD],
 3141 [AC_ARG_WITH(gnu-ld,
 3142 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
 3143 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
 3144 AC_REQUIRE([AC_PROG_CC])dnl
 3145 AC_REQUIRE([AC_CANONICAL_HOST])dnl
 3146 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
 3147 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
 3148 ac_prog=ld
 3149 if test "$GCC" = yes; then
 3150   # Check if gcc -print-prog-name=ld gives a path.
 3151   AC_MSG_CHECKING([for ld used by GCC])
 3152   case $host in
 3153   *-*-mingw*)
 3154     # gcc leaves a trailing carriage return which upsets mingw
 3155     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
 3156   *)
 3157     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
 3158   esac
 3159   case $ac_prog in
 3160     # Accept absolute paths.
 3161     [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
 3162       re_direlt='/[[^/]][[^/]]*/\.\./'
 3163       # Canonicalize the path of ld
 3164       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
 3165       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
 3166 	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
 3167       done
 3168       test -z "$LD" && LD="$ac_prog"
 3169       ;;
 3170   "")
 3171     # If it fails, then pretend we aren't using GCC.
 3172     ac_prog=ld
 3173     ;;
 3174   *)
 3175     # If it is relative, then search for the first ld in PATH.
 3176     with_gnu_ld=unknown
 3177     ;;
 3178   esac
 3179 elif test "$with_gnu_ld" = yes; then
 3180   AC_MSG_CHECKING([for GNU ld])
 3181 else
 3182   AC_MSG_CHECKING([for non-GNU ld])
 3183 fi
 3184 AC_CACHE_VAL(lt_cv_path_LD,
 3185 [if test -z "$LD"; then
 3186   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 3187   for ac_dir in $PATH; do
 3188     test -z "$ac_dir" && ac_dir=.
 3189     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
 3190       lt_cv_path_LD="$ac_dir/$ac_prog"
 3191       # Check to see if the program is GNU ld.  I'd rather use --version,
 3192       # but apparently some GNU ld's only accept -v.
 3193       # Break only if it was the GNU/non-GNU ld that we prefer.
 3194       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
 3195 	test "$with_gnu_ld" != no && break
 3196       else
 3197 	test "$with_gnu_ld" != yes && break
 3198       fi
 3199     fi
 3200   done
 3201   IFS="$ac_save_ifs"
 3202 else
 3203   lt_cv_path_LD="$LD" # Let the user override the test with a path.
 3204 fi])
 3205 LD="$lt_cv_path_LD"
 3206 if test -n "$LD"; then
 3207   AC_MSG_RESULT($LD)
 3208 else
 3209   AC_MSG_RESULT(no)
 3210 fi
 3211 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
 3212 AC_PROG_LD_GNU
 3213 ])
 3214 
 3215 # AC_PROG_LD_GNU -
 3216 AC_DEFUN([AC_PROG_LD_GNU],
 3217 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
 3218 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
 3219 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
 3220   lt_cv_prog_gnu_ld=yes
 3221 else
 3222   lt_cv_prog_gnu_ld=no
 3223 fi])
 3224 with_gnu_ld=$lt_cv_prog_gnu_ld
 3225 ])
 3226 
 3227 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
 3228 #   -- PORTME Some linkers may need a different reload flag.
 3229 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
 3230 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
 3231 [lt_cv_ld_reload_flag='-r'])
 3232 reload_flag=$lt_cv_ld_reload_flag
 3233 test -n "$reload_flag" && reload_flag=" $reload_flag"
 3234 ])
 3235 
 3236 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
 3237 #  -- PORTME fill in with the dynamic library characteristics
 3238 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
 3239 [AC_CACHE_CHECK([how to recognise dependent libraries],
 3240 lt_cv_deplibs_check_method,
 3241 [lt_cv_file_magic_cmd='$MAGIC_CMD'
 3242 lt_cv_file_magic_test_file=
 3243 lt_cv_deplibs_check_method='unknown'
 3244 # Need to set the preceding variable on all platforms that support
 3245 # interlibrary dependencies.
 3246 # 'none' -- dependencies not supported.
 3247 # `unknown' -- same as none, but documents that we really don't know.
 3248 # 'pass_all' -- all dependencies passed with no checks.
 3249 # 'test_compile' -- check by making test program.
 3250 # 'file_magic [[regex]]' -- check by looking for files in library path
 3251 # which responds to the $file_magic_cmd with a given egrep regex.
 3252 # If you have `file' or equivalent on your system and you're not sure
 3253 # whether `pass_all' will *always* work, you probably want this one.
 3254 
 3255 case $host_os in
 3256 aix4* | aix5*)
 3257   lt_cv_deplibs_check_method=pass_all
 3258   ;;
 3259 
 3260 beos*)
 3261   lt_cv_deplibs_check_method=pass_all
 3262   ;;
 3263 
 3264 bsdi4*)
 3265   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
 3266   lt_cv_file_magic_cmd='/usr/bin/file -L'
 3267   lt_cv_file_magic_test_file=/shlib/libc.so
 3268   ;;
 3269 
 3270 cygwin* | mingw* | pw32*)
 3271   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
 3272   lt_cv_file_magic_cmd='$OBJDUMP -f'
 3273   ;;
 3274 
 3275 darwin* | rhapsody*)
 3276   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
 3277   lt_cv_file_magic_cmd='/usr/bin/file -L'
 3278   case "$host_os" in
 3279   rhapsody* | darwin1.[[012]])
 3280     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
 3281     ;;
 3282   *) # Darwin 1.3 on
 3283     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
 3284     ;;
 3285   esac
 3286   ;;
 3287 
 3288 freebsd*)
 3289   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 3290     case $host_cpu in
 3291     i*86 )
 3292       # Not sure whether the presence of OpenBSD here was a mistake.
 3293       # Let's accept both of them until this is cleared up.
 3294       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
 3295       lt_cv_file_magic_cmd=/usr/bin/file
 3296       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 3297       ;;
 3298     esac
 3299   else
 3300     lt_cv_deplibs_check_method=pass_all
 3301   fi
 3302   ;;
 3303 
 3304 gnu*)
 3305   lt_cv_deplibs_check_method=pass_all
 3306   ;;
 3307 
 3308 hpux10.20*|hpux11*)
 3309   lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
 3310   lt_cv_file_magic_cmd=/usr/bin/file
 3311   lt_cv_file_magic_test_file=/usr/lib/libc.sl
 3312   ;;
 3313 
 3314 irix5* | irix6* | nonstopux*)
 3315   case $host_os in
 3316   irix5* | nonstopux*)
 3317     # this will be overridden with pass_all, but let us keep it just in case
 3318     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
 3319     ;;
 3320   *)
 3321     case $LD in
 3322     *-32|*"-32 ") libmagic=32-bit;;
 3323     *-n32|*"-n32 ") libmagic=N32;;
 3324     *-64|*"-64 ") libmagic=64-bit;;
 3325     *) libmagic=never-match;;
 3326     esac
 3327     # this will be overridden with pass_all, but let us keep it just in case
 3328     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
 3329     ;;
 3330   esac
 3331   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
 3332   lt_cv_deplibs_check_method=pass_all
 3333   ;;
 3334 
 3335 # This must be Linux ELF.
 3336 linux-gnu*)
 3337   case $host_cpu in
 3338   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
 3339     lt_cv_deplibs_check_method=pass_all ;;
 3340   *)
 3341     # glibc up to 2.1.1 does not perform some relocations on ARM
 3342     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
 3343   esac
 3344   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
 3345   ;;
 3346 
 3347 netbsd*)
 3348   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
 3349     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
 3350   else
 3351     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
 3352   fi
 3353   ;;
 3354 
 3355 newos6*)
 3356   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
 3357   lt_cv_file_magic_cmd=/usr/bin/file
 3358   lt_cv_file_magic_test_file=/usr/lib/libnls.so
 3359   ;;
 3360 
 3361 openbsd*)
 3362   lt_cv_file_magic_cmd=/usr/bin/file
 3363   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
 3364   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
 3365     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
 3366   else
 3367     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
 3368   fi
 3369   ;;
 3370 
 3371 osf3* | osf4* | osf5*)
 3372   # this will be overridden with pass_all, but let us keep it just in case
 3373   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
 3374   lt_cv_file_magic_test_file=/shlib/libc.so
 3375   lt_cv_deplibs_check_method=pass_all
 3376   ;;
 3377 
 3378 sco3.2v5*)
 3379   lt_cv_deplibs_check_method=pass_all
 3380   ;;
 3381 
 3382 solaris*)
 3383   lt_cv_deplibs_check_method=pass_all
 3384   lt_cv_file_magic_test_file=/lib/libc.so
 3385   ;;
 3386 
 3387 sysv5uw[[78]]* | sysv4*uw2*)
 3388   lt_cv_deplibs_check_method=pass_all
 3389   ;;
 3390 
 3391 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
 3392   case $host_vendor in
 3393   motorola)
 3394     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]]'
 3395     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
 3396     ;;
 3397   ncr)
 3398     lt_cv_deplibs_check_method=pass_all
 3399     ;;
 3400   sequent)
 3401     lt_cv_file_magic_cmd='/bin/file'
 3402     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
 3403     ;;
 3404   sni)
 3405     lt_cv_file_magic_cmd='/bin/file'
 3406     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
 3407     lt_cv_file_magic_test_file=/lib/libc.so
 3408     ;;
 3409   siemens)
 3410     lt_cv_deplibs_check_method=pass_all
 3411     ;;
 3412   esac
 3413   ;;
 3414 esac
 3415 ])
 3416 file_magic_cmd=$lt_cv_file_magic_cmd
 3417 deplibs_check_method=$lt_cv_deplibs_check_method
 3418 ])
 3419 
 3420 
 3421 # AC_PROG_NM - find the path to a BSD-compatible name lister
 3422 AC_DEFUN([AC_PROG_NM],
 3423 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
 3424 AC_MSG_CHECKING([for BSD-compatible nm])
 3425 AC_CACHE_VAL(lt_cv_path_NM,
 3426 [if test -n "$NM"; then
 3427   # Let the user override the test.
 3428   lt_cv_path_NM="$NM"
 3429 else
 3430   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
 3431   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
 3432     test -z "$ac_dir" && ac_dir=.
 3433     tmp_nm=$ac_dir/${ac_tool_prefix}nm
 3434     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
 3435       # Check to see if the nm accepts a BSD-compat flag.
 3436       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
 3437       #   nm: unknown option "B" ignored
 3438       # Tru64's nm complains that /dev/null is an invalid object file
 3439       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
 3440 	lt_cv_path_NM="$tmp_nm -B"
 3441 	break
 3442       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
 3443 	lt_cv_path_NM="$tmp_nm -p"
 3444 	break
 3445       else
 3446 	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
 3447 	continue # so that we can try to find one that supports BSD flags
 3448       fi
 3449     fi
 3450   done
 3451   IFS="$ac_save_ifs"
 3452   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
 3453 fi])
 3454 NM="$lt_cv_path_NM"
 3455 AC_MSG_RESULT([$NM])
 3456 ])
 3457 
 3458 # AC_CHECK_LIBM - check for math library
 3459 AC_DEFUN([AC_CHECK_LIBM],
 3460 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
 3461 LIBM=
 3462 case $host in
 3463 *-*-beos* | *-*-cygwin* | *-*-pw32*)
 3464   # These system don't have libm
 3465   ;;
 3466 *-ncr-sysv4.3*)
 3467   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
 3468   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
 3469   ;;
 3470 *)
 3471   AC_CHECK_LIB(m, main, LIBM="-lm")
 3472   ;;
 3473 esac
 3474 ])
 3475 
 3476 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
 3477 # the libltdl convenience library and LTDLINCL to the include flags for
 3478 # the libltdl header and adds --enable-ltdl-convenience to the
 3479 # configure arguments.  Note that LIBLTDL and LTDLINCL are not
 3480 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
 3481 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
 3482 # with '${top_builddir}/' and LTDLINCL will be prefixed with
 3483 # '${top_srcdir}/' (note the single quotes!).  If your package is not
 3484 # flat and you're not using automake, define top_builddir and
 3485 # top_srcdir appropriately in the Makefiles.
 3486 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
 3487 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 3488   case $enable_ltdl_convenience in
 3489   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
 3490   "") enable_ltdl_convenience=yes
 3491       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
 3492   esac
 3493   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
 3494   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 3495   # For backwards non-gettext consistent compatibility...
 3496   INCLTDL="$LTDLINCL"
 3497 ])
 3498 
 3499 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
 3500 # the libltdl installable library and LTDLINCL to the include flags for
 3501 # the libltdl header and adds --enable-ltdl-install to the configure
 3502 # arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
 3503 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
 3504 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
 3505 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
 3506 # with '${top_srcdir}/' (note the single quotes!).  If your package is
 3507 # not flat and you're not using automake, define top_builddir and
 3508 # top_srcdir appropriately in the Makefiles.
 3509 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
 3510 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
 3511 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
 3512   AC_CHECK_LIB(ltdl, main,
 3513   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
 3514   [if test x"$enable_ltdl_install" = xno; then
 3515      AC_MSG_WARN([libltdl not installed, but installation disabled])
 3516    else
 3517      enable_ltdl_install=yes
 3518    fi
 3519   ])
 3520   if test x"$enable_ltdl_install" = x"yes"; then
 3521     ac_configure_args="$ac_configure_args --enable-ltdl-install"
 3522     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
 3523     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
 3524   else
 3525     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
 3526     LIBLTDL="-lltdl"
 3527     LTDLINCL=
 3528   fi
 3529   # For backwards non-gettext consistent compatibility...
 3530   INCLTDL="$LTDLINCL"
 3531 ])
 3532 
 3533 # old names
 3534 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
 3535 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
 3536 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
 3537 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
 3538 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
 3539 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
 3540 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
 3541 
 3542 # This is just to silence aclocal about the macro not being used
 3543 ifelse([AC_DISABLE_FAST_INSTALL])
 3544 
 3545 # NOTE: This macro has been submitted for inclusion into   #
 3546 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
 3547 #  a released version of Autoconf we should remove this    #
 3548 #  macro and use it instead.                               #
 3549 # LT_AC_PROG_SED
 3550 # --------------
 3551 # Check for a fully-functional sed program, that truncates
 3552 # as few characters as possible.  Prefer GNU sed if found.
 3553 AC_DEFUN([LT_AC_PROG_SED],
 3554 [AC_MSG_CHECKING([for a sed that does not truncate output])
 3555 AC_CACHE_VAL(lt_cv_path_SED,
 3556 [# Loop through the user's path and test for sed and gsed.
 3557 # Then use that list of sed's as ones to test for truncation.
 3558 as_executable_p="test -f"
 3559 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
 3560 for as_dir in $PATH
 3561 do
 3562   IFS=$as_save_IFS
 3563   test -z "$as_dir" && as_dir=.
 3564   for ac_prog in sed gsed; do
 3565     for ac_exec_ext in '' $ac_executable_extensions; do
 3566       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
 3567         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
 3568       fi
 3569     done
 3570   done
 3571 done
 3572 
 3573   # Create a temporary directory, and hook for its removal unless debugging.
 3574 $debug ||
 3575 {
 3576   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
 3577   trap '{ (exit 1); exit 1; }' 1 2 13 15
 3578 }
 3579 
 3580 # Create a (secure) tmp directory for tmp files.
 3581 : ${TMPDIR=/tmp}
 3582 {
 3583   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
 3584   test -n "$tmp" && test -d "$tmp"
 3585 }  ||
 3586 {
 3587   tmp=$TMPDIR/sed$$-$RANDOM
 3588   (umask 077 && mkdir $tmp)
 3589 } ||
 3590 {
 3591    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
 3592    { (exit 1); exit 1; }
 3593 }
 3594   _max=0
 3595   _count=0
 3596   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
 3597   # along with /bin/sed that truncates output.
 3598   for _sed in $_sed_list /usr/xpg4/bin/sed; do
 3599     test ! -f ${_sed} && break
 3600     cat /dev/null > "$tmp/sed.in"
 3601     _count=0
 3602     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
 3603     # Check for GNU sed and select it if it is found.
 3604     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
 3605       lt_cv_path_SED=${_sed}
 3606       break
 3607     fi
 3608     while true; do
 3609       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
 3610       mv "$tmp/sed.tmp" "$tmp/sed.in"
 3611       cp "$tmp/sed.in" "$tmp/sed.nl"
 3612       echo >>"$tmp/sed.nl"
 3613       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
 3614       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
 3615       # 40000 chars as input seems more than enough
 3616       test $_count -gt 10 && break
 3617       _count=`expr $_count + 1`
 3618       if test $_count -gt $_max; then
 3619         _max=$_count
 3620         lt_cv_path_SED=$_sed
 3621       fi
 3622     done
 3623   done
 3624   rm -rf "$tmp"
 3625 ])
 3626 if test "X$SED" != "X"; then
 3627   lt_cv_path_SED=$SED
 3628 else
 3629   SED=$lt_cv_path_SED
 3630 fi
 3631 AC_MSG_RESULT([$SED])
 3632 ])
 3633 
 3634 # serial 5 AC_LIB_LTDL
 3635 
 3636 # AC_WITH_LTDL
 3637 # ------------
 3638 # Clients of libltdl can use this macro to allow the installer to
 3639 # choose between a shipped copy of the ltdl sources or a preinstalled
 3640 # version of the library.
 3641 AC_DEFUN([AC_WITH_LTDL],
 3642 [AC_REQUIRE([AC_LIB_LTDL])
 3643 AC_SUBST([LIBLTDL])
 3644 AC_SUBST([INCLTDL])
 3645 
 3646 # Unless the user asks us to check, assume no installed ltdl exists.
 3647 use_installed_libltdl=no
 3648 
 3649 AC_ARG_WITH([included_ltdl],
 3650     [  --with-included-ltdl    use the GNU ltdl sources included here])
 3651 
 3652 if test "x$with_included_ltdl" != xyes; then
 3653   # We are not being forced to use the included libltdl sources, so
 3654   # decide whether there is a useful installed version we can use.
 3655   AC_CHECK_HEADER([ltdl.h],
 3656       [AC_CHECK_LIB([ltdl], [lt_dlcaller_register],
 3657           [with_included_ltdl=no],
 3658           [with_included_ltdl=yes])
 3659   ])
 3660 fi
 3661 
 3662 if test "x$enable_ltdl_install" != xyes; then
 3663   # If the user did not specify an installable libltdl, then default
 3664   # to a convenience lib.
 3665   AC_LIBLTDL_CONVENIENCE
 3666 fi
 3667 
 3668 if test "x$with_included_ltdl" = xno; then
 3669   # If the included ltdl is not to be used. then Use the
 3670   # preinstalled libltdl we found.
 3671   AC_DEFINE([HAVE_LTDL], 1,
 3672     [Define this if a modern libltdl is already installed])
 3673   LIBLTDL=-lltdl
 3674 fi
 3675 
 3676 # Report our decision...
 3677 AC_MSG_CHECKING([whether to use included libltdl])
 3678 AC_MSG_RESULT([$with_included_ltdl])
 3679 
 3680 AC_CONFIG_SUBDIRS([libltdl])
 3681 ])# AC_WITH_LTDL
 3682 
 3683 
 3684 # AC_LIB_LTDL
 3685 # -----------
 3686 # Perform all the checks necessary for compilation of the ltdl objects
 3687 #  -- including compiler checks and header checks.
 3688 AC_DEFUN([AC_LIB_LTDL],
 3689 [AC_PREREQ(2.13)
 3690 AC_REQUIRE([AC_PROG_CC])
 3691 AC_REQUIRE([AC_C_CONST])
 3692 AC_REQUIRE([AC_HEADER_STDC])
 3693 AC_REQUIRE([AC_HEADER_DIRENT])
 3694 AC_REQUIRE([AC_LIBTOOL_HEADER_ASSERT])
 3695 AC_REQUIRE([_LT_AC_CHECK_DLFCN])
 3696 AC_REQUIRE([AC_LTDL_ENABLE_INSTALL])
 3697 AC_REQUIRE([AC_LTDL_SHLIBEXT])
 3698 AC_REQUIRE([AC_LTDL_SHLIBPATH])
 3699 AC_REQUIRE([AC_LTDL_SYSSEARCHPATH])
 3700 AC_REQUIRE([AC_LTDL_OBJDIR])
 3701 AC_REQUIRE([AC_LTDL_DLPREOPEN])
 3702 AC_REQUIRE([AC_LTDL_DLLIB])
 3703 AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])
 3704 AC_REQUIRE([AC_LTDL_DLSYM_USCORE])
 3705 AC_REQUIRE([AC_LTDL_SYS_DLOPEN_DEPLIBS])
 3706 AC_REQUIRE([AC_LTDL_FUNC_ARGZ])
 3707 
 3708 AC_CHECK_HEADERS([errno.h malloc.h memory.h stdlib.h stdio.h ctype.h unistd.h])
 3709 AC_CHECK_HEADERS([dl.h sys/dl.h dld.h])
 3710 AC_CHECK_HEADERS([string.h strings.h], break)
 3711 
 3712 AC_CHECK_FUNCS([strchr index], break)
 3713 AC_CHECK_FUNCS([strrchr rindex], break)
 3714 AC_CHECK_FUNCS([memcpy bcopy], break)
 3715 AC_CHECK_FUNCS([memmove strcmp])
 3716 
 3717 ])# AC_LIB_LTDL
 3718 
 3719 # AC_LTDL_ENABLE_INSTALL
 3720 # ----------------------
 3721 AC_DEFUN([AC_LTDL_ENABLE_INSTALL],
 3722 [AC_ARG_ENABLE(ltdl-install,
 3723 [  --enable-ltdl-install   install libltdl])
 3724 
 3725 AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
 3726 AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)
 3727 ])])# AC_LTDL_ENABLE_INSTALL
 3728 
 3729 # AC_LTDL_SYS_DLOPEN_DEPLIBS
 3730 # --------------------------
 3731 AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS],
 3732 [AC_REQUIRE([AC_CANONICAL_HOST])
 3733 AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
 3734 	libltdl_cv_sys_dlopen_deplibs, [dnl
 3735 	# PORTME does your system automatically load deplibs for dlopen()?
 3736 	libltdl_cv_sys_dlopen_deplibs=unknown
 3737 	case "$host_os" in
 3738         hpux10*|hpux11*)
 3739           libltdl_cv_sys_dlopen_deplibs=yes
 3740           ;;
 3741 	linux*)
 3742 	  libltdl_cv_sys_dlopen_deplibs=yes
 3743 	  ;;
 3744 	netbsd*)
 3745 	  libltdl_cv_sys_dlopen_deplibs=yes
 3746 	  ;;
 3747 	openbsd*)
 3748 	  libltdl_cv_sys_dlopen_deplibs=yes
 3749 	  ;;
 3750 	solaris*)
 3751 	  libltdl_cv_sys_dlopen_deplibs=yes
 3752 	  ;;
 3753 	esac
 3754 ])
 3755 if test "$libltdl_cv_sys_dlopen_deplibs" != yes; then
 3756  AC_DEFINE(LTDL_DLOPEN_DEPLIBS, 1,
 3757     [Define if the OS needs help to load dependent libraries for dlopen(). ])
 3758 fi
 3759 ])# AC_LTDL_SYS_DLOPEN_DEPLIBS
 3760 
 3761 # AC_LTDL_SHLIBEXT
 3762 # ----------------
 3763 AC_DEFUN([AC_LTDL_SHLIBEXT],
 3764 [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
 3765 AC_CACHE_CHECK([which extension is used for shared libraries],
 3766   libltdl_cv_shlibext,
 3767 [ac_last=
 3768   for ac_spec in $library_names_spec; do
 3769     ac_last="$ac_spec"
 3770   done
 3771   echo "$ac_last" | [sed 's/\[.*\]//;s/^[^.]*//;s/\$.*$//;s/\.$//'] > conftest
 3772 libltdl_cv_shlibext=`cat conftest`
 3773 rm -f conftest
 3774 ])
 3775 if test -n "$libltdl_cv_shlibext"; then
 3776   AC_DEFINE_UNQUOTED(LTDL_SHLIB_EXT, "$libltdl_cv_shlibext",
 3777     [Define to the extension used for shared libraries, say, ".so". ])
 3778 fi
 3779 ])# AC_LTDL_SHLIBEXT
 3780 
 3781 # AC_LTDL_SHLIBPATH
 3782 # -----------------
 3783 AC_DEFUN([AC_LTDL_SHLIBPATH],
 3784 [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
 3785 AC_CACHE_CHECK([which variable specifies run-time library path],
 3786   libltdl_cv_shlibpath_var, [libltdl_cv_shlibpath_var="$shlibpath_var"])
 3787 if test -n "$libltdl_cv_shlibpath_var"; then
 3788   AC_DEFINE_UNQUOTED(LTDL_SHLIBPATH_VAR, "$libltdl_cv_shlibpath_var",
 3789     [Define to the name of the environment variable that determines the dynamic library search path. ])
 3790 fi
 3791 ])# AC_LTDL_SHLIBPATH
 3792 
 3793 # AC_LTDL_SYSSEARCHPATH
 3794 # ---------------------
 3795 AC_DEFUN([AC_LTDL_SYSSEARCHPATH],
 3796 [AC_REQUIRE([_LT_AC_LTCONFIG_HACK])
 3797 AC_CACHE_CHECK([for the default library search path],
 3798   libltdl_cv_sys_search_path, [libltdl_cv_sys_search_path="$sys_lib_dlsearch_path_spec"])
 3799 if test -n "$libltdl_cv_sys_search_path"; then
 3800   case "$host" in
 3801   *-*-mingw*) pathsep=";" ;;
 3802   *) pathsep=":" ;;
 3803   esac
 3804   sys_search_path=
 3805   for dir in $libltdl_cv_sys_search_path; do
 3806     if test -z "$sys_search_path"; then
 3807       sys_search_path="$dir"
 3808     else
 3809       sys_search_path="$sys_search_path$pathsep$dir"
 3810     fi
 3811   done
 3812   AC_DEFINE_UNQUOTED(LTDL_SYSSEARCHPATH, "$sys_search_path",
 3813     [Define to the system default library search path. ])
 3814 fi
 3815 ])# AC_LTDL_SYSSEARCHPATH
 3816 
 3817 # AC_LTDL_OBJDIR
 3818 # --------------
 3819 AC_DEFUN([AC_LTDL_OBJDIR],
 3820 [AC_CACHE_CHECK([for objdir],
 3821   libltdl_cv_objdir, [libltdl_cv_objdir="$objdir"
 3822 if test -n "$objdir"; then
 3823   :
 3824 else
 3825   rm -f .libs 2>/dev/null
 3826   mkdir .libs 2>/dev/null
 3827   if test -d .libs; then
 3828     libltdl_cv_objdir=.libs
 3829   else
 3830     # MS-DOS does not allow filenames that begin with a dot.
 3831     libltdl_cv_objdir=_libs
 3832   fi
 3833 rmdir .libs 2>/dev/null
 3834 fi])
 3835 AC_DEFINE_UNQUOTED(LTDL_OBJDIR, "$libltdl_cv_objdir/",
 3836   [Define to the sub-directory in which libtool stores uninstalled libraries. ])
 3837 ])# AC_LTDL_OBJDIR
 3838 
 3839 # AC_LTDL_DLPREOPEN
 3840 # -----------------
 3841 AC_DEFUN([AC_LTDL_DLPREOPEN],
 3842 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
 3843 AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
 3844        libltdl_cv_preloaded_symbols, [dnl
 3845   if test -n "$global_symbol_pipe"; then
 3846     libltdl_cv_preloaded_symbols=yes
 3847   else
 3848     libltdl_cv_preloaded_symbols=no
 3849   fi
 3850 ])
 3851 if test x"$libltdl_cv_preloaded_symbols" = x"yes"; then
 3852   AC_DEFINE(HAVE_PRELOADED_SYMBOLS, 1,
 3853     [Define if libtool can extract symbol lists from object files. ])
 3854 fi
 3855 ])# AC_LTDL_DLPREOPEN
 3856 
 3857 # AC_LTDL_DLLIB
 3858 # -------------
 3859 AC_DEFUN([AC_LTDL_DLLIB],
 3860 [LIBADD_DL=
 3861 AC_SUBST(LIBADD_DL)
 3862 
 3863 AC_CHECK_FUNC([shl_load],
 3864       [AC_DEFINE([HAVE_SHL_LOAD], [1],
 3865 		 [Define if you have the shl_load function.])],
 3866   [AC_CHECK_LIB([dld], [shl_load],
 3867 	[AC_DEFINE([HAVE_SHL_LOAD], [1],
 3868 		   [Define if you have the shl_load function.])
 3869 	LIBADD_DL="$LIBADD_DL -ldld"],
 3870     [AC_CHECK_LIB([dl], [dlopen],
 3871 	  [AC_DEFINE([HAVE_LIBDL], [1],
 3872 		     [Define if you have the libdl library or equivalent.])
 3873 	  LIBADD_DL="-ldl"],
 3874       [AC_TRY_LINK([#if HAVE_DLFCN_H
 3875 #  include <dlfcn.h>
 3876 #endif
 3877       ],
 3878 	[dlopen(0, 0);],
 3879 	    [AC_DEFINE([HAVE_LIBDL], [1],
 3880 		       [Define if you have the libdl library or equivalent.])],
 3881 	[AC_CHECK_LIB([svld], [dlopen],
 3882 	      [AC_DEFINE([HAVE_LIBDL], [1],
 3883 			 [Define if you have the libdl library or equivalent.])
 3884 	      LIBADD_DL="-lsvld"],
 3885 	  [AC_CHECK_LIB([dld], [dld_link],
 3886 	        [AC_DEFINE([HAVE_DLD], [1],
 3887 			   [Define if you have the GNU dld library.])
 3888 	 	LIBADD_DL="$LIBADD_DL -ldld"
 3889           ])
 3890         ])
 3891       ])
 3892     ])
 3893   ])
 3894 ])
 3895 
 3896 if test "x$ac_cv_func_dlopen" = xyes || test "x$ac_cv_lib_dl_dlopen" = xyes; then
 3897  LIBS_SAVE="$LIBS"
 3898  LIBS="$LIBS $LIBADD_DL"
 3899  AC_CHECK_FUNCS(dlerror)
 3900  LIBS="$LIBS_SAVE"
 3901 fi
 3902 ])# AC_LTDL_DLLIB
 3903 
 3904 # AC_LTDL_SYMBOL_USCORE
 3905 # ---------------------
 3906 AC_DEFUN([AC_LTDL_SYMBOL_USCORE],
 3907 [dnl does the compiler prefix global symbols with an underscore?
 3908 AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
 3909 AC_MSG_CHECKING([for _ prefix in compiled symbols])
 3910 AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
 3911 [ac_cv_sys_symbol_underscore=no
 3912 cat > conftest.$ac_ext <<EOF
 3913 void nm_test_func(){}
 3914 int main(){nm_test_func;return 0;}
 3915 EOF
 3916 if AC_TRY_EVAL(ac_compile); then
 3917   # Now try to grab the symbols.
 3918   ac_nlist=conftest.nm
 3919   if AC_TRY_EVAL(NM conftest.$ac_objext \| $global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
 3920     # See whether the symbols have a leading underscore.
 3921     if egrep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
 3922       ac_cv_sys_symbol_underscore=yes
 3923     else
 3924       if egrep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
 3925 	:
 3926       else
 3927 	echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
 3928       fi
 3929     fi
 3930   else
 3931     echo "configure: cannot run $global_symbol_pipe" >&AC_FD_CC
 3932   fi
 3933 else
 3934   echo "configure: failed program was:" >&AC_FD_CC
 3935   cat conftest.c >&AC_FD_CC
 3936 fi
 3937 rm -rf conftest*
 3938 ])
 3939 AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
 3940 ])# AC_LTDL_SYMBOL_USCORE
 3941 
 3942 
 3943 # AC_LTDL_DLSYM_USCORE
 3944 # --------------------
 3945 AC_DEFUN([AC_LTDL_DLSYM_USCORE],
 3946 [AC_REQUIRE([AC_LTDL_SYMBOL_USCORE])dnl
 3947 if test x"$ac_cv_sys_symbol_underscore" = xyes; then
 3948   if test x"$ac_cv_func_dlopen" = xyes ||
 3949      test x"$ac_cv_lib_dl_dlopen" = xyes ; then
 3950 	AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
 3951 		libltdl_cv_need_uscore, [dnl
 3952 		libltdl_cv_need_uscore=unknown
 3953                 save_LIBS="$LIBS"
 3954                 LIBS="$LIBS $LIBADD_DL"
 3955 		_LT_AC_TRY_DLOPEN_SELF(
 3956 		  libltdl_cv_need_uscore=no, libltdl_cv_need_uscore=yes,
 3957 		  [],			     libltdl_cv_need_uscore=cross)
 3958 		LIBS="$save_LIBS"
 3959 	])
 3960   fi
 3961 fi
 3962 
 3963 if test x"$libltdl_cv_need_uscore" = xyes; then
 3964   AC_DEFINE(NEED_USCORE, 1,
 3965     [Define if dlsym() requires a leading underscore in symbol names. ])
 3966 fi
 3967 ])# AC_LTDL_DLSYM_USCORE
 3968 
 3969 
 3970 # AC_CHECK_TYPES(TYPES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
 3971 #                [INCLUDES])
 3972 # ---------------------------------------------------------------
 3973 # This macro did not exist in Autoconf 2.13, which we do still support
 3974 ifdef([AC_CHECK_TYPES], [],
 3975 [define([AC_CHECK_TYPES],
 3976   [AC_CACHE_CHECK([for $1], ac_Type,
 3977     [AC_TRY_LINK([$4],
 3978 	[if (($1 *) 0)
 3979 	  return 0;
 3980 	if (sizeof ($1))
 3981 	  return 0;],
 3982 	[ac_Type=yes],
 3983 	[ac_Type=no])])
 3984   if test "x$ac_Type" = xyes; then
 3985     ifelse([$2], [], [:], [$2])
 3986   else
 3987     ifelse([$3], [], [:], [$3])
 3988   fi])
 3989 ])# AC_CHECK_TYPES
 3990 
 3991 
 3992 # AC_LTDL_FUNC_ARGZ
 3993 # -----------------
 3994 AC_DEFUN([AC_LTDL_FUNC_ARGZ],
 3995 [AC_CHECK_HEADERS([argz.h])
 3996 
 3997 AC_CHECK_TYPES([error_t],
 3998   [],
 3999   [AC_DEFINE([error_t], [int],
 4000     [Define to a type to use for \`error_t' if it is not otherwise available.])],
 4001   [#if HAVE_ARGZ_H
 4002 #  include <argz.h>
 4003 #endif])
 4004 
 4005 AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next argz_stringify])
 4006 ])# AC_LTDL_FUNC_ARGZ
 4007 
 4008 # Define a conditional.
 4009 
 4010 AC_DEFUN([AM_CONDITIONAL],
 4011 [AC_SUBST($1_TRUE)
 4012 AC_SUBST($1_FALSE)
 4013 if $2; then
 4014   $1_TRUE=
 4015   $1_FALSE='#'
 4016 else
 4017   $1_TRUE='#'
 4018   $1_FALSE=
 4019 fi])
 4020 
 4021 # Do all the work for Automake.  This macro actually does too much --
 4022 # some checks are only needed if your package does certain things.
 4023 # But this isn't really a big deal.
 4024 
 4025 # serial 1
 4026 
 4027 dnl Usage:
 4028 dnl AM_INIT_AUTOMAKE(package,version, [no-define])
 4029 
 4030 AC_DEFUN([AM_INIT_AUTOMAKE],
 4031 [AC_REQUIRE([AC_PROG_INSTALL])
 4032 PACKAGE=[$1]
 4033 AC_SUBST(PACKAGE)
 4034 VERSION=[$2]
 4035 AC_SUBST(VERSION)
 4036 dnl test to see if srcdir already configured
 4037 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
 4038   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
 4039 fi
 4040 ifelse([$3],,
 4041 AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
 4042 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
 4043 AC_REQUIRE([AM_SANITY_CHECK])
 4044 AC_REQUIRE([AC_ARG_PROGRAM])
 4045 dnl FIXME This is truly gross.
 4046 missing_dir=`cd $ac_aux_dir && pwd`
 4047 AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
 4048 AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
 4049 AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
 4050 AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
 4051 AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
 4052 AC_REQUIRE([AC_PROG_MAKE_SET])])
 4053 
 4054 #
 4055 # Check to make sure that the build environment is sane.
 4056 #
 4057 
 4058 AC_DEFUN([AM_SANITY_CHECK],
 4059 [AC_MSG_CHECKING([whether build environment is sane])
 4060 # Just in case
 4061 sleep 1
 4062 echo timestamp > conftestfile
 4063 # Do `set' in a subshell so we don't clobber the current shell's
 4064 # arguments.  Must try -L first in case configure is actually a
 4065 # symlink; some systems play weird games with the mod time of symlinks
 4066 # (eg FreeBSD returns the mod time of the symlink's containing
 4067 # directory).
 4068 if (
 4069    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
 4070    if test "[$]*" = "X"; then
 4071       # -L didn't work.
 4072       set X `ls -t $srcdir/configure conftestfile`
 4073    fi
 4074    if test "[$]*" != "X $srcdir/configure conftestfile" \
 4075       && test "[$]*" != "X conftestfile $srcdir/configure"; then
 4076 
 4077       # If neither matched, then we have a broken ls.  This can happen
 4078       # if, for instance, CONFIG_SHELL is bash and it inherits a
 4079       # broken ls alias from the environment.  This has actually
 4080       # happened.  Such a system could not be considered "sane".
 4081       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
 4082 alias in your environment])
 4083    fi
 4084 
 4085    test "[$]2" = conftestfile
 4086    )
 4087 then
 4088    # Ok.
 4089    :
 4090 else
 4091    AC_MSG_ERROR([newly created file is older than distributed files!
 4092 Check your system clock])
 4093 fi
 4094 rm -f conftest*
 4095 AC_MSG_RESULT(yes)])
 4096 
 4097 dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
 4098 dnl The program must properly implement --version.
 4099 AC_DEFUN([AM_MISSING_PROG],
 4100 [AC_MSG_CHECKING(for working $2)
 4101 # Run test in a subshell; some versions of sh will print an error if
 4102 # an executable is not found, even if stderr is redirected.
 4103 # Redirect stdin to placate older versions of autoconf.  Sigh.
 4104 if ($2 --version) < /dev/null > /dev/null 2>&1; then
 4105    $1=$2
 4106    AC_MSG_RESULT(found)
 4107 else
 4108    $1="$3/missing $2"
 4109    AC_MSG_RESULT(missing)
 4110 fi
 4111 AC_SUBST($1)])
 4112 
 4113 # Like AC_CONFIG_HEADER, but automatically create stamp file.
 4114 
 4115 AC_DEFUN([AM_CONFIG_HEADER],
 4116 [AC_PREREQ([2.12])
 4117 AC_CONFIG_HEADER([$1])
 4118 dnl When config.status generates a header, we must update the stamp-h file.
 4119 dnl This file resides in the same directory as the config header
 4120 dnl that is generated.  We must strip everything past the first ":",
 4121 dnl and everything past the last "/".
 4122 AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
 4123 ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
 4124 <<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
 4125 <<am_indx=1
 4126 for am_file in <<$1>>; do
 4127   case " <<$>>CONFIG_HEADERS " in
 4128   *" <<$>>am_file "*<<)>>
 4129     echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
 4130     ;;
 4131   esac
 4132   am_indx=`expr "<<$>>am_indx" + 1`
 4133 done<<>>dnl>>)
 4134 changequote([,]))])
 4135 
 4136 # Add --enable-maintainer-mode option to configure.
 4137 # From Jim Meyering
 4138 
 4139 # serial 1
 4140 
 4141 AC_DEFUN([AM_MAINTAINER_MODE],
 4142 [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
 4143   dnl maintainer-mode is disabled by default
 4144   AC_ARG_ENABLE(maintainer-mode,
 4145 [  --enable-maintainer-mode enable make rules and dependencies not useful
 4146                           (and sometimes confusing) to the casual installer],
 4147       USE_MAINTAINER_MODE=$enableval,
 4148       USE_MAINTAINER_MODE=no)
 4149   AC_MSG_RESULT($USE_MAINTAINER_MODE)
 4150   AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
 4151   MAINT=$MAINTAINER_MODE_TRUE
 4152   AC_SUBST(MAINT)dnl
 4153 ]
 4154 )
 4155