acinclude.m4
author Sam Lantinga <slouken@libsdl.org>
Thu, 06 May 2004 15:55:06 +0000
changeset 886 05c551e5bc64
parent 794 a5defa3b93e1
child 939 c7c04f811994
permissions -rw-r--r--
Date: Sat, 24 Apr 2004 15:13:32 +0300
From: "Mike Gorchak"
Subject: SDL updates for the QNX6

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