home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 June / ccd0605.iso / LINUX / gopchop-1.1.7.tar.tar / gopchop-1.1.7.tar / gopchop-1.1.7 / aclocal.m4 < prev    next >
Text File  |  2005-05-01  |  280KB  |  7,817 lines

  1. # generated automatically by aclocal 1.8.5 -*- Autoconf -*-
  2.  
  3. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
  4. # Free Software Foundation, Inc.
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8.  
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  11. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  12. # PARTICULAR PURPOSE.
  13.  
  14. # Copyright (C) 1995-2002 Free Software Foundation, Inc.
  15. # Copyright (C) 2001-2003,2004 Red Hat, Inc.
  16. #
  17. # This file is free software, distributed under the terms of the GNU
  18. # General Public License.  As a special exception to the GNU General
  19. # Public License, this file may be distributed as part of a program
  20. # that contains a configuration script generated by Autoconf, under
  21. # the same distribution terms as the rest of that program.
  22. #
  23. # This file can be copied and used freely without restrictions.  It can
  24. # be used in projects which are not available under the GNU Public License
  25. # but which still want to provide support for the GNU gettext functionality.
  26. #
  27. # Macro to add for using GNU gettext.
  28. # Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
  29. #
  30. # Modified to never use included libintl. 
  31. # Owen Taylor <otaylor@redhat.com>, 12/15/1998
  32. #
  33. # Major rework to remove unused code
  34. # Owen Taylor <otaylor@redhat.com>, 12/11/2002
  35. #
  36. # Added better handling of ALL_LINGUAS from GNU gettext version 
  37. # written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
  38. #
  39. # Modified to require ngettext
  40. # Matthias Clasen <mclasen@redhat.com> 08/06/2004
  41. #
  42. # We need this here as well, since someone might use autoconf-2.5x
  43. # to configure GLib then an older version to configure a package
  44. # using AM_GLIB_GNU_GETTEXT
  45. AC_PREREQ(2.53)
  46.  
  47. dnl
  48. dnl We go to great lengths to make sure that aclocal won't 
  49. dnl try to pull in the installed version of these macros
  50. dnl when running aclocal in the glib directory.
  51. dnl
  52. m4_copy([AC_DEFUN],[glib_DEFUN])
  53. m4_copy([AC_REQUIRE],[glib_REQUIRE])
  54. dnl
  55. dnl At the end, if we're not within glib, we'll define the public
  56. dnl definitions in terms of our private definitions.
  57. dnl
  58.  
  59. # GLIB_LC_MESSAGES
  60. #--------------------
  61. glib_DEFUN([GLIB_LC_MESSAGES],
  62.   [AC_CHECK_HEADERS([locale.h])
  63.     if test $ac_cv_header_locale_h = yes; then
  64.     AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
  65.       [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
  66.        am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
  67.     if test $am_cv_val_LC_MESSAGES = yes; then
  68.       AC_DEFINE(HAVE_LC_MESSAGES, 1,
  69.         [Define if your <locale.h> file defines LC_MESSAGES.])
  70.     fi
  71.   fi])
  72.  
  73. # GLIB_PATH_PROG_WITH_TEST
  74. #----------------------------
  75. dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
  76. dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
  77. glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
  78. [# Extract the first word of "$2", so it can be a program name with args.
  79. set dummy $2; ac_word=[$]2
  80. AC_MSG_CHECKING([for $ac_word])
  81. AC_CACHE_VAL(ac_cv_path_$1,
  82. [case "[$]$1" in
  83.   /*)
  84.   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  85.   ;;
  86.   *)
  87.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  88.   for ac_dir in ifelse([$5], , $PATH, [$5]); do
  89.     test -z "$ac_dir" && ac_dir=.
  90.     if test -f $ac_dir/$ac_word; then
  91.       if [$3]; then
  92.     ac_cv_path_$1="$ac_dir/$ac_word"
  93.     break
  94.       fi
  95.     fi
  96.   done
  97.   IFS="$ac_save_ifs"
  98. dnl If no 4th arg is given, leave the cache variable unset,
  99. dnl so AC_PATH_PROGS will keep looking.
  100. ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
  101. ])dnl
  102.   ;;
  103. esac])dnl
  104. $1="$ac_cv_path_$1"
  105. if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
  106.   AC_MSG_RESULT([$]$1)
  107. else
  108.   AC_MSG_RESULT(no)
  109. fi
  110. AC_SUBST($1)dnl
  111. ])
  112.  
  113. # GLIB_WITH_NLS
  114. #-----------------
  115. glib_DEFUN([GLIB_WITH_NLS],
  116.   dnl NLS is obligatory
  117.   [USE_NLS=yes
  118.     AC_SUBST(USE_NLS)
  119.  
  120.     gt_cv_have_gettext=no
  121.  
  122.     CATOBJEXT=NONE
  123.     XGETTEXT=:
  124.     INTLLIBS=
  125.  
  126.     AC_CHECK_HEADER(libintl.h,
  127.      [gt_cv_func_dgettext_libintl="no"
  128.       libintl_extra_libs=""
  129.  
  130.       #
  131.       # First check in libc
  132.       #
  133.       AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
  134.         [AC_TRY_LINK([
  135. #include <libintl.h>
  136. ],
  137.          [return !ngettext ("","", 1)],
  138.       gt_cv_func_ngettext_libc=yes,
  139.           gt_cv_func_ngettext_libc=no)
  140.         ])
  141.   
  142.       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  143.           AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
  144.             [AC_TRY_LINK([
  145. #include <libintl.h>
  146. ],
  147.               [return !dgettext ("","")],
  148.           gt_cv_func_dgettext_libc=yes,
  149.               gt_cv_func_dgettext_libc=no)
  150.             ])
  151.       fi
  152.   
  153.       if test "$gt_cv_func_ngettext_libc" = "yes" ; then
  154.         AC_CHECK_FUNCS(bind_textdomain_codeset)
  155.       fi
  156.  
  157.       #
  158.       # If we don't have everything we want, check in libintl
  159.       #
  160.       if test "$gt_cv_func_dgettext_libc" != "yes" \
  161.      || test "$gt_cv_func_ngettext_libc" != "yes" \
  162.          || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
  163.         
  164.         AC_CHECK_LIB(intl, bindtextdomain,
  165.         [AC_CHECK_LIB(intl, ngettext,
  166.             [AC_CHECK_LIB(intl, dgettext,
  167.                       gt_cv_func_dgettext_libintl=yes)])])
  168.  
  169.     if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
  170.       AC_MSG_CHECKING([if -liconv is needed to use gettext])
  171.       AC_MSG_RESULT([])
  172.         AC_CHECK_LIB(intl, ngettext,
  173.               [AC_CHECK_LIB(intl, dcgettext,
  174.                [gt_cv_func_dgettext_libintl=yes
  175.             libintl_extra_libs=-liconv],
  176.             :,-liconv)],
  177.         :,-liconv)
  178.         fi
  179.  
  180.         #
  181.         # If we found libintl, then check in it for bind_textdomain_codeset();
  182.         # we'll prefer libc if neither have bind_textdomain_codeset(),
  183.         # and both have dgettext and ngettext
  184.         #
  185.         if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
  186.           glib_save_LIBS="$LIBS"
  187.           LIBS="$LIBS -lintl $libintl_extra_libs"
  188.           unset ac_cv_func_bind_textdomain_codeset
  189.           AC_CHECK_FUNCS(bind_textdomain_codeset)
  190.           LIBS="$glib_save_LIBS"
  191.  
  192.           if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
  193.             gt_cv_func_dgettext_libc=no
  194.           else
  195.             if test "$gt_cv_func_dgettext_libc" = "yes" \
  196.         && test "$gt_cv_func_ngettext_libc" = "yes"; then
  197.               gt_cv_func_dgettext_libintl=no
  198.             fi
  199.           fi
  200.         fi
  201.       fi
  202.  
  203.       if test "$gt_cv_func_dgettext_libc" = "yes" \
  204.     || test "$gt_cv_func_dgettext_libintl" = "yes"; then
  205.         gt_cv_have_gettext=yes
  206.       fi
  207.   
  208.       if test "$gt_cv_func_dgettext_libintl" = "yes"; then
  209.         INTLLIBS="-lintl $libintl_extra_libs"
  210.       fi
  211.   
  212.       if test "$gt_cv_have_gettext" = "yes"; then
  213.     AC_DEFINE(HAVE_GETTEXT,1,
  214.       [Define if the GNU gettext() function is already present or preinstalled.])
  215.     GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
  216.       [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
  217.     if test "$MSGFMT" != "no"; then
  218.           glib_save_LIBS="$LIBS"
  219.           LIBS="$LIBS $INTLLIBS"
  220.       AC_CHECK_FUNCS(dcgettext)
  221.       AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
  222.       GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
  223.         [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
  224.       AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
  225.              return _nl_msg_cat_cntr],
  226.         [CATOBJEXT=.gmo 
  227.              DATADIRNAME=share],
  228.         [case $host in
  229.         *-*-solaris*)
  230.         dnl On Solaris, if bind_textdomain_codeset is in libc,
  231.         dnl GNU format message catalog is always supported,
  232.             dnl since both are added to the libc all together.
  233.         dnl Hence, we'd like to go with DATADIRNAME=share and
  234.         dnl and CATOBJEXT=.gmo in this case.
  235.             AC_CHECK_FUNC(bind_textdomain_codeset,
  236.           [CATOBJEXT=.gmo 
  237.                DATADIRNAME=share],
  238.           [CATOBJEXT=.mo
  239.                DATADIRNAME=lib])
  240.         ;;
  241.         *)
  242.         CATOBJEXT=.mo
  243.             DATADIRNAME=lib
  244.         ;;
  245.         esac])
  246.           LIBS="$glib_save_LIBS"
  247.       INSTOBJEXT=.mo
  248.     else
  249.       gt_cv_have_gettext=no
  250.     fi
  251.       fi
  252.     ])
  253.  
  254.     if test "$gt_cv_have_gettext" = "yes" ; then
  255.       AC_DEFINE(ENABLE_NLS, 1,
  256.         [always defined to indicate that i18n is enabled])
  257.     fi
  258.  
  259.     dnl Test whether we really found GNU xgettext.
  260.     if test "$XGETTEXT" != ":"; then
  261.       dnl If it is not GNU xgettext we define it as : so that the
  262.       dnl Makefiles still can work.
  263.       if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
  264.         : ;
  265.       else
  266.         AC_MSG_RESULT(
  267.       [found xgettext program is not GNU xgettext; ignore it])
  268.         XGETTEXT=":"
  269.       fi
  270.     fi
  271.  
  272.     # We need to process the po/ directory.
  273.     POSUB=po
  274.  
  275.     AC_OUTPUT_COMMANDS(
  276.       [case "$CONFIG_FILES" in *po/Makefile.in*)
  277.         sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
  278.       esac])
  279.  
  280.     dnl These rules are solely for the distribution goal.  While doing this
  281.     dnl we only have to keep exactly one list of the available catalogs
  282.     dnl in configure.in.
  283.     for lang in $ALL_LINGUAS; do
  284.       GMOFILES="$GMOFILES $lang.gmo"
  285.       POFILES="$POFILES $lang.po"
  286.     done
  287.  
  288.     dnl Make all variables we use known to autoconf.
  289.     AC_SUBST(CATALOGS)
  290.     AC_SUBST(CATOBJEXT)
  291.     AC_SUBST(DATADIRNAME)
  292.     AC_SUBST(GMOFILES)
  293.     AC_SUBST(INSTOBJEXT)
  294.     AC_SUBST(INTLLIBS)
  295.     AC_SUBST(PO_IN_DATADIR_TRUE)
  296.     AC_SUBST(PO_IN_DATADIR_FALSE)
  297.     AC_SUBST(POFILES)
  298.     AC_SUBST(POSUB)
  299.   ])
  300.  
  301. # AM_GLIB_GNU_GETTEXT
  302. # -------------------
  303. # Do checks necessary for use of gettext. If a suitable implementation 
  304. # of gettext is found in either in libintl or in the C library,
  305. # it will set INTLLIBS to the libraries needed for use of gettext
  306. # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
  307. # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
  308. # on various variables needed by the Makefile.in.in installed by 
  309. # glib-gettextize.
  310. dnl
  311. glib_DEFUN([GLIB_GNU_GETTEXT],
  312.   [AC_REQUIRE([AC_PROG_CC])dnl
  313.    AC_REQUIRE([AC_HEADER_STDC])dnl
  314.    
  315.    GLIB_LC_MESSAGES
  316.    GLIB_WITH_NLS
  317.  
  318.    if test "$gt_cv_have_gettext" = "yes"; then
  319.      if test "x$ALL_LINGUAS" = "x"; then
  320.        LINGUAS=
  321.      else
  322.        AC_MSG_CHECKING(for catalogs to be installed)
  323.        NEW_LINGUAS=
  324.        for presentlang in $ALL_LINGUAS; do
  325.          useit=no
  326.          if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
  327.            desiredlanguages="$LINGUAS"
  328.          else
  329.            desiredlanguages="$ALL_LINGUAS"
  330.          fi
  331.          for desiredlang in $desiredlanguages; do
  332.         # Use the presentlang catalog if desiredlang is
  333.            #   a. equal to presentlang, or
  334.            #   b. a variant of presentlang (because in this case,
  335.            #      presentlang can be used as a fallback for messages
  336.            #      which are not translated in the desiredlang catalog).
  337.            case "$desiredlang" in
  338.              "$presentlang"*) useit=yes;;
  339.            esac
  340.          done
  341.          if test $useit = yes; then
  342.            NEW_LINGUAS="$NEW_LINGUAS $presentlang"
  343.          fi
  344.        done
  345.        LINGUAS=$NEW_LINGUAS
  346.        AC_MSG_RESULT($LINGUAS)
  347.      fi
  348.  
  349.      dnl Construct list of names of catalog files to be constructed.
  350.      if test -n "$LINGUAS"; then
  351.        for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
  352.      fi
  353.    fi
  354.  
  355.    dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
  356.    dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
  357.    dnl Try to locate is.
  358.    MKINSTALLDIRS=
  359.    if test -n "$ac_aux_dir"; then
  360.      MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
  361.    fi
  362.    if test -z "$MKINSTALLDIRS"; then
  363.      MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
  364.    fi
  365.    AC_SUBST(MKINSTALLDIRS)
  366.  
  367.    dnl Generate list of files to be processed by xgettext which will
  368.    dnl be included in po/Makefile.
  369.    test -d po || mkdir po
  370.    if test "x$srcdir" != "x."; then
  371.      if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
  372.        posrcprefix="$srcdir/"
  373.      else
  374.        posrcprefix="../$srcdir/"
  375.      fi
  376.    else
  377.      posrcprefix="../"
  378.    fi
  379.    rm -f po/POTFILES
  380.    sed -e "/^#/d" -e "/^\$/d" -e "s,.*,    $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
  381.     < $srcdir/po/POTFILES.in > po/POTFILES
  382.   ])
  383.  
  384. # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
  385. # -------------------------------
  386. # Define VARIABLE to the location where catalog files will
  387. # be installed by po/Makefile.
  388. glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
  389. [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
  390. glib_save_prefix="$prefix"
  391. glib_save_exec_prefix="$exec_prefix"
  392. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  393. test "x$exec_prefix" = xNONE && exec_prefix=$prefix
  394. if test "x$CATOBJEXT" = "x.mo" ; then
  395.   localedir=`eval echo "${libdir}/locale"`
  396. else
  397.   localedir=`eval echo "${datadir}/locale"`
  398. fi
  399. prefix="$glib_save_prefix"
  400. exec_prefix="$glib_save_exec_prefix"
  401. AC_DEFINE_UNQUOTED($1, "$localedir",
  402.   [Define the location where the catalogs will be installed])
  403. ])
  404.  
  405. dnl
  406. dnl Now the definitions that aclocal will find
  407. dnl
  408. ifdef(glib_configure_in,[],[
  409. AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
  410. AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
  411. ])dnl
  412.  
  413.  
  414. dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
  415. # serial 2 IT_PROG_INTLTOOL
  416. AC_DEFUN([IT_PROG_INTLTOOL],
  417. [
  418.  
  419. if test -n "$1"; then
  420.     AC_MSG_CHECKING(for intltool >= $1)
  421.  
  422.     INTLTOOL_REQUIRED_VERSION_AS_INT=`echo $1 | awk -F. '{ printf "%d", $[1] * 100 + $[2]; }'`
  423.     INTLTOOL_APPLIED_VERSION=`awk -F\" '/\\$VERSION / { printf $[2]; }'  < ${ac_aux_dir}/intltool-update.in`
  424.     changequote({{,}})
  425.     INTLTOOL_APPLIED_VERSION_AS_INT=`awk -F\" '/\\$VERSION / { split(${{2}}, VERSION, "."); printf "%d\n", VERSION[1] * 100 + VERSION[2];}' < ${ac_aux_dir}/intltool-update.in`
  426.     changequote([,])
  427.  
  428.     if test "$INTLTOOL_APPLIED_VERSION_AS_INT" -ge "$INTLTOOL_REQUIRED_VERSION_AS_INT"; then
  429.     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found])
  430.     else
  431.     AC_MSG_RESULT([$INTLTOOL_APPLIED_VERSION found. Your intltool is too old.  You need intltool $1 or later.])
  432.     exit 1
  433.     fi
  434. fi
  435.  
  436.   INTLTOOL_DESKTOP_RULE='%.desktop:   %.desktop.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  437. INTLTOOL_DIRECTORY_RULE='%.directory: %.directory.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  438.      INTLTOOL_KEYS_RULE='%.keys:      %.keys.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -k -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  439.      INTLTOOL_PROP_RULE='%.prop:      %.prop.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  440.       INTLTOOL_OAF_RULE='%.oaf:       %.oaf.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -p $(top_srcdir)/po $< [$]@'
  441.      INTLTOOL_PONG_RULE='%.pong:      %.pong.in      $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  442.    INTLTOOL_SERVER_RULE='%.server:    %.server.in    $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -o -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  443.     INTLTOOL_SHEET_RULE='%.sheet:     %.sheet.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  444. INTLTOOL_SOUNDLIST_RULE='%.soundlist: %.soundlist.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  445.        INTLTOOL_UI_RULE='%.ui:        %.ui.in        $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  446.       INTLTOOL_XML_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  447.       INTLTOOL_XML_NOMERGE_RULE='%.xml:       %.xml.in       $(INTLTOOL_MERGE) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u /tmp $< [$]@' 
  448.       INTLTOOL_XAM_RULE='%.xam:       %.xml.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  449.       INTLTOOL_KBD_RULE='%.kbd:       %.kbd.in       $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -x -u -m -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  450.     INTLTOOL_CAVES_RULE='%.caves:     %.caves.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  451.   INTLTOOL_SCHEMAS_RULE='%.schemas:   %.schemas.in   $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -s -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  452.     INTLTOOL_THEME_RULE='%.theme:     %.theme.in     $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' 
  453.  
  454. AC_SUBST(INTLTOOL_DESKTOP_RULE)
  455. AC_SUBST(INTLTOOL_DIRECTORY_RULE)
  456. AC_SUBST(INTLTOOL_KEYS_RULE)
  457. AC_SUBST(INTLTOOL_PROP_RULE)
  458. AC_SUBST(INTLTOOL_OAF_RULE)
  459. AC_SUBST(INTLTOOL_PONG_RULE)
  460. AC_SUBST(INTLTOOL_SERVER_RULE)
  461. AC_SUBST(INTLTOOL_SHEET_RULE)
  462. AC_SUBST(INTLTOOL_SOUNDLIST_RULE)
  463. AC_SUBST(INTLTOOL_UI_RULE)
  464. AC_SUBST(INTLTOOL_XAM_RULE)
  465. AC_SUBST(INTLTOOL_KBD_RULE)
  466. AC_SUBST(INTLTOOL_XML_RULE)
  467. AC_SUBST(INTLTOOL_XML_NOMERGE_RULE)
  468. AC_SUBST(INTLTOOL_CAVES_RULE)
  469. AC_SUBST(INTLTOOL_SCHEMAS_RULE)
  470. AC_SUBST(INTLTOOL_THEME_RULE)
  471.  
  472. # Use the tools built into the package, not the ones that are installed.
  473.  
  474. INTLTOOL_EXTRACT='$(top_builddir)/intltool-extract'
  475. INTLTOOL_MERGE='$(top_builddir)/intltool-merge'
  476. INTLTOOL_UPDATE='$(top_builddir)/intltool-update'
  477.  
  478. AC_SUBST(INTLTOOL_EXTRACT)
  479. AC_SUBST(INTLTOOL_MERGE)
  480. AC_SUBST(INTLTOOL_UPDATE)
  481.  
  482. AC_PATH_PROG(INTLTOOL_PERL, perl)
  483. if test -z "$INTLTOOL_PERL"; then
  484.    AC_MSG_ERROR([perl not found; required for intltool])
  485. fi
  486. if test -z "`$INTLTOOL_PERL -v | fgrep '5.' 2> /dev/null`"; then
  487.    AC_MSG_ERROR([perl 5.x required for intltool])
  488. fi
  489. if test "x$2" != "xno-xml"; then
  490.    AC_MSG_CHECKING([for XML::Parser])
  491.    if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
  492.        AC_MSG_RESULT([ok])
  493.    else
  494.        AC_MSG_ERROR([XML::Parser perl module is required for intltool])
  495.    fi
  496. fi
  497.  
  498. AC_PATH_PROG(INTLTOOL_ICONV, iconv, iconv)
  499. AC_PATH_PROG(INTLTOOL_MSGFMT, msgfmt, msgfmt)
  500. AC_PATH_PROG(INTLTOOL_MSGMERGE, msgmerge, msgmerge)
  501. AC_PATH_PROG(INTLTOOL_XGETTEXT, xgettext, xgettext)
  502.  
  503. # Remove file type tags (using []) from po/POTFILES.
  504.  
  505. ifdef([AC_DIVERSION_ICMDS],[
  506.   AC_DIVERT_PUSH(AC_DIVERSION_ICMDS)
  507.       changequote(,)
  508.       mv -f po/POTFILES po/POTFILES.tmp
  509.       sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
  510.       rm -f po/POTFILES.tmp
  511.       changequote([,])
  512.   AC_DIVERT_POP()
  513. ],[
  514.   ifdef([AC_CONFIG_COMMANDS_PRE],[
  515.     AC_CONFIG_COMMANDS_PRE([
  516.         changequote(,)
  517.         mv -f po/POTFILES po/POTFILES.tmp
  518.         sed -e '/\[encoding.*\]/d' -e 's/\[.*\] *//' < po/POTFILES.tmp > po/POTFILES
  519.         rm -f po/POTFILES.tmp
  520.         changequote([,])
  521.     ])
  522.   ])
  523.  
  524. if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  525.   # Keeping the `.' argument allows $(mkdir_p) to be used without
  526.   # argument.  Indeed, we sometimes output rules like
  527.   #   $(mkdir_p) $(somedir)
  528.   # where $(somedir) is conditionally defined.
  529.   # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
  530.   # expensive solution, as it forces Make to start a sub-shell.)
  531.   mkdir_p='mkdir -p -- .'
  532. else
  533.   # On NextStep and OpenStep, the `mkdir' command does not
  534.   # recognize any option.  It will interpret all options as
  535.   # directories to create, and then abort because `.' already
  536.   # exists.
  537.   for d in ./-p ./--version;
  538.   do
  539.     test -d $d && rmdir $d
  540.   done
  541.   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  542.   if test -f "$ac_aux_dir/mkinstalldirs"; then
  543.     mkdir_p='$(mkinstalldirs)'
  544.   else
  545.     mkdir_p='$(install_sh) -d'
  546.   fi
  547. fi
  548. AC_SUBST([mkdir_p])
  549. ])
  550.  
  551. # Manually sed perl in so people don't have to put the intltool scripts in AC_OUTPUT.
  552.  
  553. AC_CONFIG_COMMANDS([intltool], [
  554.  
  555. intltool_edit="-e 's#@INTLTOOL_EXTRACT@#`pwd`/intltool-extract#g' \
  556.                -e 's#@INTLTOOL_ICONV@#${INTLTOOL_ICONV}#g' \
  557.                -e 's#@INTLTOOL_MSGFMT@#${INTLTOOL_MSGFMT}#g' \
  558.                -e 's#@INTLTOOL_MSGMERGE@#${INTLTOOL_MSGMERGE}#g' \
  559.                -e 's#@INTLTOOL_XGETTEXT@#${INTLTOOL_XGETTEXT}#g' \
  560.                -e 's#@INTLTOOL_PERL@#${INTLTOOL_PERL}#g'"
  561.  
  562. eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-extract.in \
  563.   > intltool-extract.out
  564. if cmp -s intltool-extract intltool-extract.out 2>/dev/null; then
  565.   rm -f intltool-extract.out
  566. else
  567.   mv -f intltool-extract.out intltool-extract
  568. fi
  569. chmod ugo+x intltool-extract
  570. chmod u+w intltool-extract
  571.  
  572. eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-merge.in \
  573.   > intltool-merge.out
  574. if cmp -s intltool-merge intltool-merge.out 2>/dev/null; then
  575.   rm -f intltool-merge.out
  576. else
  577.   mv -f intltool-merge.out intltool-merge
  578. fi
  579. chmod ugo+x intltool-merge
  580. chmod u+w intltool-merge
  581.  
  582. eval sed ${intltool_edit} < ${ac_aux_dir}/intltool-update.in \
  583.   > intltool-update.out
  584. if cmp -s intltool-update intltool-update.out 2>/dev/null; then
  585.   rm -f intltool-update.out
  586. else
  587.   mv -f intltool-update.out intltool-update
  588. fi
  589. chmod ugo+x intltool-update
  590. chmod u+w intltool-update
  591.  
  592. ], INTLTOOL_PERL='${INTLTOOL_PERL}' ac_aux_dir=${ac_aux_dir}
  593. INTLTOOL_EXTRACT='${INTLTOOL_EXTRACT}' ICONV='${INTLTOOL_ICONV}'
  594. MSGFMT='${INTLTOOL_MSGFMT}' MSGMERGE='${INTLTOOL_MSGMERGE}'
  595. XGETTEXT='${INTLTOOL_XGETTEXT}')
  596.  
  597. ])
  598.  
  599. # deprecated macros
  600. AC_DEFUN([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL($@)])
  601.  
  602.  
  603. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
  604.  
  605. # serial 47 AC_PROG_LIBTOOL
  606. # Debian $Rev: 214 $
  607.  
  608.  
  609. # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
  610. # -----------------------------------------------------------
  611. # If this macro is not defined by Autoconf, define it here.
  612. m4_ifdef([AC_PROVIDE_IFELSE],
  613.          [],
  614.          [m4_define([AC_PROVIDE_IFELSE],
  615.              [m4_ifdef([AC_PROVIDE_$1],
  616.                    [$2], [$3])])])
  617.  
  618.  
  619. # AC_PROG_LIBTOOL
  620. # ---------------
  621. AC_DEFUN([AC_PROG_LIBTOOL],
  622. [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
  623. dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
  624. dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
  625.   AC_PROVIDE_IFELSE([AC_PROG_CXX],
  626.     [AC_LIBTOOL_CXX],
  627.     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
  628.   ])])
  629. dnl And a similar setup for Fortran 77 support
  630.   AC_PROVIDE_IFELSE([AC_PROG_F77],
  631.     [AC_LIBTOOL_F77],
  632.     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
  633. ])])
  634.  
  635. dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
  636. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
  637. dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
  638.   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
  639.     [AC_LIBTOOL_GCJ],
  640.     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
  641.       [AC_LIBTOOL_GCJ],
  642.       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
  643.     [AC_LIBTOOL_GCJ],
  644.       [ifdef([AC_PROG_GCJ],
  645.          [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  646.        ifdef([A][M_PROG_GCJ],
  647.          [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
  648.        ifdef([LT_AC_PROG_GCJ],
  649.          [define([LT_AC_PROG_GCJ],
  650.         defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
  651. ])])# AC_PROG_LIBTOOL
  652.  
  653.  
  654. # _AC_PROG_LIBTOOL
  655. # ----------------
  656. AC_DEFUN([_AC_PROG_LIBTOOL],
  657. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  658. AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
  659. AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
  660. AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
  661.  
  662. # This can be used to rebuild libtool when needed
  663. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  664.  
  665. # Always use our own libtool.
  666. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  667. AC_SUBST(LIBTOOL)dnl
  668.  
  669. # Prevent multiple expansion
  670. define([AC_PROG_LIBTOOL], [])
  671. ])# _AC_PROG_LIBTOOL
  672.  
  673.  
  674. # AC_LIBTOOL_SETUP
  675. # ----------------
  676. AC_DEFUN([AC_LIBTOOL_SETUP],
  677. [AC_PREREQ(2.50)dnl
  678. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  679. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  680. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  681. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  682. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  683. AC_REQUIRE([AC_PROG_CC])dnl
  684. AC_REQUIRE([AC_PROG_LD])dnl
  685. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  686. AC_REQUIRE([AC_PROG_NM])dnl
  687.  
  688. AC_REQUIRE([AC_PROG_LN_S])dnl
  689. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  690. # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
  691. AC_REQUIRE([AC_OBJEXT])dnl
  692. AC_REQUIRE([AC_EXEEXT])dnl
  693. dnl
  694.  
  695. AC_LIBTOOL_SYS_MAX_CMD_LEN
  696. AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  697. AC_LIBTOOL_OBJDIR
  698.  
  699. AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  700. _LT_AC_PROG_ECHO_BACKSLASH
  701.  
  702. case $host_os in
  703. aix3*)
  704.   # AIX sometimes has problems with the GCC collect2 program.  For some
  705.   # reason, if we set the COLLECT_NAMES environment variable, the problems
  706.   # vanish in a puff of smoke.
  707.   if test "X${COLLECT_NAMES+set}" != Xset; then
  708.     COLLECT_NAMES=
  709.     export COLLECT_NAMES
  710.   fi
  711.   ;;
  712. esac
  713.  
  714. # Sed substitution that helps us do robust quoting.  It backslashifies
  715. # metacharacters that are still active within double-quoted strings.
  716. Xsed='sed -e s/^X//'
  717. [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
  718.  
  719. # Same as above, but do not quote variable references.
  720. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
  721.  
  722. # Sed substitution to delay expansion of an escaped shell variable in a
  723. # double_quote_subst'ed string.
  724. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  725.  
  726. # Sed substitution to avoid accidental globbing in evaled expressions
  727. no_glob_subst='s/\*/\\\*/g'
  728.  
  729. # Constants:
  730. rm="rm -f"
  731.  
  732. # Global variables:
  733. default_ofile=libtool
  734. can_build_shared=yes
  735.  
  736. # All known linkers require a `.a' archive for static linking (except M$VC,
  737. # which needs '.lib').
  738. libext=a
  739. ltmain="$ac_aux_dir/ltmain.sh"
  740. ofile="$default_ofile"
  741. with_gnu_ld="$lt_cv_prog_gnu_ld"
  742.  
  743. AC_CHECK_TOOL(AR, ar, false)
  744. AC_CHECK_TOOL(RANLIB, ranlib, :)
  745. AC_CHECK_TOOL(STRIP, strip, :)
  746.  
  747. old_CC="$CC"
  748. old_CFLAGS="$CFLAGS"
  749.  
  750. # Set sane defaults for various variables
  751. test -z "$AR" && AR=ar
  752. test -z "$AR_FLAGS" && AR_FLAGS=cru
  753. test -z "$AS" && AS=as
  754. test -z "$CC" && CC=cc
  755. test -z "$LTCC" && LTCC=$CC
  756. test -z "$DLLTOOL" && DLLTOOL=dlltool
  757. test -z "$LD" && LD=ld
  758. test -z "$LN_S" && LN_S="ln -s"
  759. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  760. test -z "$NM" && NM=nm
  761. test -z "$SED" && SED=sed
  762. test -z "$OBJDUMP" && OBJDUMP=objdump
  763. test -z "$RANLIB" && RANLIB=:
  764. test -z "$STRIP" && STRIP=:
  765. test -z "$ac_objext" && ac_objext=o
  766.  
  767. # Determine commands to create old-style static archives.
  768. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  769. old_postinstall_cmds='chmod 644 $oldlib'
  770. old_postuninstall_cmds=
  771.  
  772. if test -n "$RANLIB"; then
  773.   case $host_os in
  774.   openbsd*)
  775.     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  776.     ;;
  777.   *)
  778.     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  779.     ;;
  780.   esac
  781.   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  782. fi
  783.  
  784. # Only perform the check for file, if the check method requires it
  785. case $deplibs_check_method in
  786. file_magic*)
  787.   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  788.     AC_PATH_MAGIC
  789.   fi
  790.   ;;
  791. esac
  792.  
  793. AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  794. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  795. enable_win32_dll=yes, enable_win32_dll=no)
  796.  
  797. AC_ARG_ENABLE([libtool-lock],
  798.     [AC_HELP_STRING([--disable-libtool-lock],
  799.     [avoid locking (might break parallel builds)])])
  800. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  801.  
  802. AC_ARG_WITH([pic],
  803.     [AC_HELP_STRING([--with-pic],
  804.     [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
  805.     [pic_mode="$withval"],
  806.     [pic_mode=default])
  807. test -z "$pic_mode" && pic_mode=default
  808.  
  809. # Use C for the default configuration in the libtool script
  810. tagname=
  811. AC_LIBTOOL_LANG_C_CONFIG
  812. _LT_AC_TAGCONFIG
  813. ])# AC_LIBTOOL_SETUP
  814.  
  815.  
  816. # _LT_AC_SYS_COMPILER
  817. # -------------------
  818. AC_DEFUN([_LT_AC_SYS_COMPILER],
  819. [AC_REQUIRE([AC_PROG_CC])dnl
  820.  
  821. # If no C compiler was specified, use CC.
  822. LTCC=${LTCC-"$CC"}
  823.  
  824. # Allow CC to be a program name with arguments.
  825. compiler=$CC
  826. ])# _LT_AC_SYS_COMPILER
  827.  
  828.  
  829. # _LT_AC_SYS_LIBPATH_AIX
  830. # ----------------------
  831. # Links a minimal program and checks the executable
  832. # for the system default hardcoded library path. In most cases,
  833. # this is /usr/lib:/lib, but when the MPI compilers are used
  834. # the location of the communication and MPI libs are included too.
  835. # If we don't find anything, use the default library path according
  836. # to the aix ld manual.
  837. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
  838. [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
  839. aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
  840. }'`
  841. # Check for a 64-bit object if we didn't find anything.
  842. 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; }
  843. }'`; fi],[])
  844. if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
  845. ])# _LT_AC_SYS_LIBPATH_AIX
  846.  
  847.  
  848. # _LT_AC_SHELL_INIT(ARG)
  849. # ----------------------
  850. AC_DEFUN([_LT_AC_SHELL_INIT],
  851. [ifdef([AC_DIVERSION_NOTICE],
  852.          [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  853.      [AC_DIVERT_PUSH(NOTICE)])
  854. $1
  855. AC_DIVERT_POP
  856. ])# _LT_AC_SHELL_INIT
  857.  
  858.  
  859. # _LT_AC_PROG_ECHO_BACKSLASH
  860. # --------------------------
  861. # Add some code to the start of the generated configure script which
  862. # will find an echo command which doesn't interpret backslashes.
  863. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  864. [_LT_AC_SHELL_INIT([
  865. # Check that we are running under the correct shell.
  866. SHELL=${CONFIG_SHELL-/bin/sh}
  867.  
  868. case X$ECHO in
  869. X*--fallback-echo)
  870.   # Remove one level of quotation (which was required for Make).
  871.   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  872.   ;;
  873. esac
  874.  
  875. echo=${ECHO-echo}
  876. if test "X[$]1" = X--no-reexec; then
  877.   # Discard the --no-reexec flag, and continue.
  878.   shift
  879. elif test "X[$]1" = X--fallback-echo; then
  880.   # Avoid inline document here, it may be left over
  881.   :
  882. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
  883.   # Yippee, $echo works!
  884.   :
  885. else
  886.   # Restart under the correct shell.
  887.   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  888. fi
  889.  
  890. if test "X[$]1" = X--fallback-echo; then
  891.   # used as fallback echo
  892.   shift
  893.   cat <<EOF
  894. [$]*
  895. EOF
  896.   exit 0
  897. fi
  898.  
  899. # The HP-UX ksh and POSIX shell print the target directory to stdout
  900. # if CDPATH is set.
  901. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  902.  
  903. if test -z "$ECHO"; then
  904. if test "X${echo_test_string+set}" != Xset; then
  905. # find a string as large as possible, as long as the shell can cope with it
  906.   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  907.     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  908.     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  909.        echo_test_string="`eval $cmd`" &&
  910.        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  911.     then
  912.       break
  913.     fi
  914.   done
  915. fi
  916.  
  917. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  918.    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  919.    test "X$echo_testing_string" = "X$echo_test_string"; then
  920.   :
  921. else
  922.   # The Solaris, AIX, and Digital Unix default echo programs unquote
  923.   # backslashes.  This makes it impossible to quote backslashes using
  924.   #   echo "$something" | sed 's/\\/\\\\/g'
  925.   #
  926.   # So, first we look for a working echo in the user's PATH.
  927.  
  928.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  929.   for dir in $PATH /usr/ucb; do
  930.     IFS="$lt_save_ifs"
  931.     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  932.        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  933.        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  934.        test "X$echo_testing_string" = "X$echo_test_string"; then
  935.       echo="$dir/echo"
  936.       break
  937.     fi
  938.   done
  939.   IFS="$lt_save_ifs"
  940.  
  941.   if test "X$echo" = Xecho; then
  942.     # We didn't find a better echo, so look for alternatives.
  943.     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  944.        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  945.        test "X$echo_testing_string" = "X$echo_test_string"; then
  946.       # This shell has a builtin print -r that does the trick.
  947.       echo='print -r'
  948.     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  949.      test "X$CONFIG_SHELL" != X/bin/ksh; then
  950.       # If we have ksh, try running configure again with it.
  951.       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  952.       export ORIGINAL_CONFIG_SHELL
  953.       CONFIG_SHELL=/bin/ksh
  954.       export CONFIG_SHELL
  955.       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  956.     else
  957.       # Try using printf.
  958.       echo='printf %s\n'
  959.       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  960.      echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  961.      test "X$echo_testing_string" = "X$echo_test_string"; then
  962.     # Cool, printf works
  963.     :
  964.       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  965.        test "X$echo_testing_string" = 'X\t' &&
  966.        echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  967.        test "X$echo_testing_string" = "X$echo_test_string"; then
  968.     CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  969.     export CONFIG_SHELL
  970.     SHELL="$CONFIG_SHELL"
  971.     export SHELL
  972.     echo="$CONFIG_SHELL [$]0 --fallback-echo"
  973.       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  974.        test "X$echo_testing_string" = 'X\t' &&
  975.        echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  976.        test "X$echo_testing_string" = "X$echo_test_string"; then
  977.     echo="$CONFIG_SHELL [$]0 --fallback-echo"
  978.       else
  979.     # maybe with a smaller string...
  980.     prev=:
  981.  
  982.     for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  983.       if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  984.       then
  985.         break
  986.       fi
  987.       prev="$cmd"
  988.     done
  989.  
  990.     if test "$prev" != 'sed 50q "[$]0"'; then
  991.       echo_test_string=`eval $prev`
  992.       export echo_test_string
  993.       exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  994.     else
  995.       # Oops.  We lost completely, so just stick with echo.
  996.       echo=echo
  997.     fi
  998.       fi
  999.     fi
  1000.   fi
  1001. fi
  1002. fi
  1003.  
  1004. # Copy echo and quote the copy suitably for passing to libtool from
  1005. # the Makefile, instead of quoting the original, which is used later.
  1006. ECHO=$echo
  1007. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  1008.    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  1009. fi
  1010.  
  1011. AC_SUBST(ECHO)
  1012. ])])# _LT_AC_PROG_ECHO_BACKSLASH
  1013.  
  1014.  
  1015. # _LT_AC_LOCK
  1016. # -----------
  1017. AC_DEFUN([_LT_AC_LOCK],
  1018. [AC_ARG_ENABLE([libtool-lock],
  1019.     [AC_HELP_STRING([--disable-libtool-lock],
  1020.     [avoid locking (might break parallel builds)])])
  1021. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1022.  
  1023. # Some flags need to be propagated to the compiler or linker for good
  1024. # libtool support.
  1025. case $host in
  1026. ia64-*-hpux*)
  1027.   # Find out which ABI we are using.
  1028.   echo 'int i;' > conftest.$ac_ext
  1029.   if AC_TRY_EVAL(ac_compile); then
  1030.     case `/usr/bin/file conftest.$ac_objext` in
  1031.     *ELF-32*)
  1032.       HPUX_IA64_MODE="32"
  1033.       ;;
  1034.     *ELF-64*)
  1035.       HPUX_IA64_MODE="64"
  1036.       ;;
  1037.     esac
  1038.   fi
  1039.   rm -rf conftest*
  1040.   ;;
  1041. *-*-irix6*)
  1042.   # Find out which ABI we are using.
  1043.   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  1044.   if AC_TRY_EVAL(ac_compile); then
  1045.    if test "$lt_cv_prog_gnu_ld" = yes; then
  1046.     case `/usr/bin/file conftest.$ac_objext` in
  1047.     *32-bit*)
  1048.       LD="${LD-ld} -melf32bsmip"
  1049.       ;;
  1050.     *N32*)
  1051.       LD="${LD-ld} -melf32bmipn32"
  1052.       ;;
  1053.     *64-bit*)
  1054.       LD="${LD-ld} -melf64bmip"
  1055.       ;;
  1056.     esac
  1057.    else
  1058.     case `/usr/bin/file conftest.$ac_objext` in
  1059.     *32-bit*)
  1060.       LD="${LD-ld} -32"
  1061.       ;;
  1062.     *N32*)
  1063.       LD="${LD-ld} -n32"
  1064.       ;;
  1065.     *64-bit*)
  1066.       LD="${LD-ld} -64"
  1067.       ;;
  1068.     esac
  1069.    fi
  1070.   fi
  1071.   rm -rf conftest*
  1072.   ;;
  1073.  
  1074. x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
  1075.   # Find out which ABI we are using.
  1076.   echo 'int i;' > conftest.$ac_ext
  1077.   if AC_TRY_EVAL(ac_compile); then
  1078.     case "`/usr/bin/file conftest.o`" in
  1079.     *32-bit*)
  1080.       case $host in
  1081.         x86_64-*linux*)
  1082.           LD="${LD-ld} -m elf_i386"
  1083.           ;;
  1084.         ppc64-*linux*|powerpc64-*linux*)
  1085.           LD="${LD-ld} -m elf32ppclinux"
  1086.           ;;
  1087.         s390x-*linux*)
  1088.           LD="${LD-ld} -m elf_s390"
  1089.           ;;
  1090.         sparc64-*linux*)
  1091.           LD="${LD-ld} -m elf32_sparc"
  1092.           ;;
  1093.       esac
  1094.       ;;
  1095.     *64-bit*)
  1096.       case $host in
  1097.         x86_64-*linux*)
  1098.           LD="${LD-ld} -m elf_x86_64"
  1099.           ;;
  1100.         ppc*-*linux*|powerpc*-*linux*)
  1101.           LD="${LD-ld} -m elf64ppc"
  1102.           ;;
  1103.         s390*-*linux*)
  1104.           LD="${LD-ld} -m elf64_s390"
  1105.           ;;
  1106.         sparc*-*linux*)
  1107.           LD="${LD-ld} -m elf64_sparc"
  1108.           ;;
  1109.       esac
  1110.       ;;
  1111.     esac
  1112.   fi
  1113.   rm -rf conftest*
  1114.   ;;
  1115.  
  1116. *-*-sco3.2v5*)
  1117.   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1118.   SAVE_CFLAGS="$CFLAGS"
  1119.   CFLAGS="$CFLAGS -belf"
  1120.   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1121.     [AC_LANG_PUSH(C)
  1122.      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1123.      AC_LANG_POP])
  1124.   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1125.     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1126.     CFLAGS="$SAVE_CFLAGS"
  1127.   fi
  1128.   ;;
  1129. AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
  1130. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  1131.   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  1132.   AC_CHECK_TOOL(AS, as, false)
  1133.   AC_CHECK_TOOL(OBJDUMP, objdump, false)
  1134.   ;;
  1135.   ])
  1136. esac
  1137.  
  1138. need_locks="$enable_libtool_lock"
  1139.  
  1140. ])# _LT_AC_LOCK
  1141.  
  1142.  
  1143. # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1144. #        [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
  1145. # ----------------------------------------------------------------
  1146. # Check whether the given compiler option works
  1147. AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
  1148. [AC_REQUIRE([LT_AC_PROG_SED])
  1149. AC_CACHE_CHECK([$1], [$2],
  1150.   [$2=no
  1151.   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
  1152.    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  1153.    lt_compiler_flag="$3"
  1154.    # Insert the option either (1) after the last *FLAGS variable, or
  1155.    # (2) before a word containing "conftest.", or (3) at the end.
  1156.    # Note that $ac_compile itself does not contain backslashes and begins
  1157.    # with a dollar sign (not a hyphen), so the echo should work correctly.
  1158.    # The option is referenced via a variable to avoid confusing sed.
  1159.    lt_compile=`echo "$ac_compile" | $SED \
  1160.    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  1161.    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1162.    -e 's:$: $lt_compiler_flag:'`
  1163.    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1164.    (eval "$lt_compile" 2>conftest.err)
  1165.    ac_status=$?
  1166.    cat conftest.err >&AS_MESSAGE_LOG_FD
  1167.    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1168.    if (exit $ac_status) && test -s "$ac_outfile"; then
  1169.      # The compiler can only warn and ignore the option if not recognized
  1170.      # So say no if there are warnings
  1171.      if test ! -s conftest.err; then
  1172.        $2=yes
  1173.      fi
  1174.    fi
  1175.    $rm conftest*
  1176. ])
  1177.  
  1178. if test x"[$]$2" = xyes; then
  1179.     ifelse([$5], , :, [$5])
  1180. else
  1181.     ifelse([$6], , :, [$6])
  1182. fi
  1183. ])# AC_LIBTOOL_COMPILER_OPTION
  1184.  
  1185.  
  1186. # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
  1187. #                          [ACTION-SUCCESS], [ACTION-FAILURE])
  1188. # ------------------------------------------------------------
  1189. # Check whether the given compiler option works
  1190. AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
  1191. [AC_CACHE_CHECK([$1], [$2],
  1192.   [$2=no
  1193.    save_LDFLAGS="$LDFLAGS"
  1194.    LDFLAGS="$LDFLAGS $3"
  1195.    printf "$lt_simple_link_test_code" > conftest.$ac_ext
  1196.    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
  1197.      # The compiler can only warn and ignore the option if not recognized
  1198.      # So say no if there are warnings
  1199.      if test -s conftest.err; then
  1200.        # Append any errors to the config.log.
  1201.        cat conftest.err 1>&AS_MESSAGE_LOG_FD
  1202.      else
  1203.        $2=yes
  1204.      fi
  1205.    fi
  1206.    $rm conftest*
  1207.    LDFLAGS="$save_LDFLAGS"
  1208. ])
  1209.  
  1210. if test x"[$]$2" = xyes; then
  1211.     ifelse([$4], , :, [$4])
  1212. else
  1213.     ifelse([$5], , :, [$5])
  1214. fi
  1215. ])# AC_LIBTOOL_LINKER_OPTION
  1216.  
  1217.  
  1218. # AC_LIBTOOL_SYS_MAX_CMD_LEN
  1219. # --------------------------
  1220. AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
  1221. [# find the maximum length of command line arguments
  1222. AC_MSG_CHECKING([the maximum length of command line arguments])
  1223. AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
  1224.   i=0
  1225.   teststring="ABCD"
  1226.  
  1227.   case $build_os in
  1228.   msdosdjgpp*)
  1229.     # On DJGPP, this test can blow up pretty badly due to problems in libc
  1230.     # (any single argument exceeding 2000 bytes causes a buffer overrun
  1231.     # during glob expansion).  Even if it were fixed, the result of this
  1232.     # check would be larger than it should be.
  1233.     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
  1234.     ;;
  1235.  
  1236.   gnu*)
  1237.     # Under GNU Hurd, this test is not required because there is
  1238.     # no limit to the length of command line arguments.
  1239.     # Libtool will interpret -1 as no limit whatsoever
  1240.     lt_cv_sys_max_cmd_len=-1;
  1241.     ;;
  1242.  
  1243.   cygwin* | mingw*)
  1244.     # On Win9x/ME, this test blows up -- it succeeds, but takes
  1245.     # about 5 minutes as the teststring grows exponentially.
  1246.     # Worse, since 9x/ME are not pre-emptively multitasking,
  1247.     # you end up with a "frozen" computer, even though with patience
  1248.     # the test eventually succeeds (with a max line length of 256k).
  1249.     # Instead, let's just punt: use the minimum linelength reported by
  1250.     # all of the supported platforms: 8192 (on NT/2K/XP).
  1251.     lt_cv_sys_max_cmd_len=8192;
  1252.     ;;
  1253.  
  1254.   amigaos*)
  1255.     # On AmigaOS with pdksh, this test takes hours, literally.
  1256.     # So we just punt and use a minimum line length of 8192.
  1257.     lt_cv_sys_max_cmd_len=8192;
  1258.     ;;
  1259.  
  1260.  *)
  1261.     # If test is not a shell built-in, we'll probably end up computing a
  1262.     # maximum length that is only half of the actual maximum length, but
  1263.     # we can't tell.
  1264.     while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
  1265.            = "XX$teststring") >/dev/null 2>&1 &&
  1266.         new_result=`expr "X$teststring" : ".*" 2>&1` &&
  1267.         lt_cv_sys_max_cmd_len=$new_result &&
  1268.         test $i != 17 # 1/2 MB should be enough
  1269.     do
  1270.       i=`expr $i + 1`
  1271.       teststring=$teststring$teststring
  1272.     done
  1273.     teststring=
  1274.     # Add a significant safety factor because C++ compilers can tack on massive
  1275.     # amounts of additional arguments before passing them to the linker.
  1276.     # It appears as though 1/2 is a usable value.
  1277.     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
  1278.     ;;
  1279.   esac
  1280. ])
  1281. if test -n $lt_cv_sys_max_cmd_len ; then
  1282.   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
  1283. else
  1284.   AC_MSG_RESULT(none)
  1285. fi
  1286. ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
  1287.  
  1288.  
  1289. # _LT_AC_CHECK_DLFCN
  1290. # --------------------
  1291. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  1292. [AC_CHECK_HEADERS(dlfcn.h)dnl
  1293. ])# _LT_AC_CHECK_DLFCN
  1294.  
  1295.  
  1296. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1297. #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1298. # ------------------------------------------------------------------
  1299. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  1300. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  1301. if test "$cross_compiling" = yes; then :
  1302.   [$4]
  1303. else
  1304.   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1305.   lt_status=$lt_dlunknown
  1306.   cat > conftest.$ac_ext <<EOF
  1307. [#line __oline__ "configure"
  1308. #include "confdefs.h"
  1309.  
  1310. #if HAVE_DLFCN_H
  1311. #include <dlfcn.h>
  1312. #endif
  1313.  
  1314. #include <stdio.h>
  1315.  
  1316. #ifdef RTLD_GLOBAL
  1317. #  define LT_DLGLOBAL        RTLD_GLOBAL
  1318. #else
  1319. #  ifdef DL_GLOBAL
  1320. #    define LT_DLGLOBAL        DL_GLOBAL
  1321. #  else
  1322. #    define LT_DLGLOBAL        0
  1323. #  endif
  1324. #endif
  1325.  
  1326. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1327.    find out it does not work in some platform. */
  1328. #ifndef LT_DLLAZY_OR_NOW
  1329. #  ifdef RTLD_LAZY
  1330. #    define LT_DLLAZY_OR_NOW        RTLD_LAZY
  1331. #  else
  1332. #    ifdef DL_LAZY
  1333. #      define LT_DLLAZY_OR_NOW        DL_LAZY
  1334. #    else
  1335. #      ifdef RTLD_NOW
  1336. #        define LT_DLLAZY_OR_NOW    RTLD_NOW
  1337. #      else
  1338. #        ifdef DL_NOW
  1339. #          define LT_DLLAZY_OR_NOW    DL_NOW
  1340. #        else
  1341. #          define LT_DLLAZY_OR_NOW    0
  1342. #        endif
  1343. #      endif
  1344. #    endif
  1345. #  endif
  1346. #endif
  1347.  
  1348. #ifdef __cplusplus
  1349. extern "C" void exit (int);
  1350. #endif
  1351.  
  1352. void fnord() { int i=42;}
  1353. int main ()
  1354. {
  1355.   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1356.   int status = $lt_dlunknown;
  1357.  
  1358.   if (self)
  1359.     {
  1360.       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
  1361.       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1362.       /* dlclose (self); */
  1363.     }
  1364.  
  1365.     exit (status);
  1366. }]
  1367. EOF
  1368.   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1369.     (./conftest; exit; ) 2>/dev/null
  1370.     lt_status=$?
  1371.     case x$lt_status in
  1372.       x$lt_dlno_uscore) $1 ;;
  1373.       x$lt_dlneed_uscore) $2 ;;
  1374.       x$lt_unknown|x*) $3 ;;
  1375.     esac
  1376.   else :
  1377.     # compilation failed
  1378.     $3
  1379.   fi
  1380. fi
  1381. rm -fr conftest*
  1382. ])# _LT_AC_TRY_DLOPEN_SELF
  1383.  
  1384.  
  1385. # AC_LIBTOOL_DLOPEN_SELF
  1386. # -------------------
  1387. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  1388. [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  1389. if test "x$enable_dlopen" != xyes; then
  1390.   enable_dlopen=unknown
  1391.   enable_dlopen_self=unknown
  1392.   enable_dlopen_self_static=unknown
  1393. else
  1394.   lt_cv_dlopen=no
  1395.   lt_cv_dlopen_libs=
  1396.  
  1397.   case $host_os in
  1398.   beos*)
  1399.     lt_cv_dlopen="load_add_on"
  1400.     lt_cv_dlopen_libs=
  1401.     lt_cv_dlopen_self=yes
  1402.     ;;
  1403.  
  1404.   mingw* | pw32*)
  1405.     lt_cv_dlopen="LoadLibrary"
  1406.     lt_cv_dlopen_libs=
  1407.    ;;
  1408.  
  1409.   cygwin*)
  1410.     lt_cv_dlopen="dlopen"
  1411.     lt_cv_dlopen_libs=
  1412.    ;;
  1413.  
  1414.   darwin*)
  1415.   # if libdl is installed we need to link against it
  1416.     AC_CHECK_LIB([dl], [dlopen],
  1417.         [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
  1418.     lt_cv_dlopen="dyld"
  1419.     lt_cv_dlopen_libs=
  1420.     lt_cv_dlopen_self=yes
  1421.     ])
  1422.    ;;
  1423.  
  1424.   *)
  1425.     AC_CHECK_FUNC([shl_load],
  1426.       [lt_cv_dlopen="shl_load"],
  1427.       [AC_CHECK_LIB([dld], [shl_load],
  1428.         [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  1429.     [AC_CHECK_FUNC([dlopen],
  1430.           [lt_cv_dlopen="dlopen"],
  1431.       [AC_CHECK_LIB([dl], [dlopen],
  1432.         [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1433.         [AC_CHECK_LIB([svld], [dlopen],
  1434.           [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1435.           [AC_CHECK_LIB([dld], [dld_link],
  1436.             [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  1437.           ])
  1438.         ])
  1439.       ])
  1440.     ])
  1441.       ])
  1442.     ;;
  1443.   esac
  1444.  
  1445.   if test "x$lt_cv_dlopen" != xno; then
  1446.     enable_dlopen=yes
  1447.   else
  1448.     enable_dlopen=no
  1449.   fi
  1450.  
  1451.   case $lt_cv_dlopen in
  1452.   dlopen)
  1453.     save_CPPFLAGS="$CPPFLAGS"
  1454.     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1455.  
  1456.     save_LDFLAGS="$LDFLAGS"
  1457.     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1458.  
  1459.     save_LIBS="$LIBS"
  1460.     LIBS="$lt_cv_dlopen_libs $LIBS"
  1461.  
  1462.     AC_CACHE_CHECK([whether a program can dlopen itself],
  1463.       lt_cv_dlopen_self, [dnl
  1464.       _LT_AC_TRY_DLOPEN_SELF(
  1465.         lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1466.         lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1467.     ])
  1468.  
  1469.     if test "x$lt_cv_dlopen_self" = xyes; then
  1470.       LDFLAGS="$LDFLAGS $link_static_flag"
  1471.       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1472.           lt_cv_dlopen_self_static, [dnl
  1473.       _LT_AC_TRY_DLOPEN_SELF(
  1474.         lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1475.         lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
  1476.       ])
  1477.     fi
  1478.  
  1479.     CPPFLAGS="$save_CPPFLAGS"
  1480.     LDFLAGS="$save_LDFLAGS"
  1481.     LIBS="$save_LIBS"
  1482.     ;;
  1483.   esac
  1484.  
  1485.   case $lt_cv_dlopen_self in
  1486.   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1487.   *) enable_dlopen_self=unknown ;;
  1488.   esac
  1489.  
  1490.   case $lt_cv_dlopen_self_static in
  1491.   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1492.   *) enable_dlopen_self_static=unknown ;;
  1493.   esac
  1494. fi
  1495. ])# AC_LIBTOOL_DLOPEN_SELF
  1496.  
  1497.  
  1498. # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
  1499. # ---------------------------------
  1500. # Check to see if options -c and -o are simultaneously supported by compiler
  1501. AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
  1502. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  1503. AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
  1504.   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
  1505.   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
  1506.    $rm -r conftest 2>/dev/null
  1507.    mkdir conftest
  1508.    cd conftest
  1509.    mkdir out
  1510.    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  1511.  
  1512.    lt_compiler_flag="-o out/conftest2.$ac_objext"
  1513.    # Insert the option either (1) after the last *FLAGS variable, or
  1514.    # (2) before a word containing "conftest.", or (3) at the end.
  1515.    # Note that $ac_compile itself does not contain backslashes and begins
  1516.    # with a dollar sign (not a hyphen), so the echo should work correctly.
  1517.    lt_compile=`echo "$ac_compile" | $SED \
  1518.    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
  1519.    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
  1520.    -e 's:$: $lt_compiler_flag:'`
  1521.    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
  1522.    (eval "$lt_compile" 2>out/conftest.err)
  1523.    ac_status=$?
  1524.    cat out/conftest.err >&AS_MESSAGE_LOG_FD
  1525.    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
  1526.    if (exit $ac_status) && test -s out/conftest2.$ac_objext
  1527.    then
  1528.      # The compiler can only warn and ignore the option if not recognized
  1529.      # So say no if there are warnings
  1530.      if test ! -s out/conftest.err; then
  1531.        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  1532.      fi
  1533.    fi
  1534.    chmod u+w .
  1535.    $rm conftest*
  1536.    # SGI C++ compiler will create directory out/ii_files/ for
  1537.    # template instantiation
  1538.    test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
  1539.    $rm out/* && rmdir out
  1540.    cd ..
  1541.    rmdir conftest
  1542.    $rm conftest*
  1543. ])
  1544. ])# AC_LIBTOOL_PROG_CC_C_O
  1545.  
  1546.  
  1547. # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
  1548. # -----------------------------------------
  1549. # Check to see if we can do hard links to lock some files if needed
  1550. AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
  1551. [AC_REQUIRE([_LT_AC_LOCK])dnl
  1552.  
  1553. hard_links="nottested"
  1554. if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
  1555.   # do not overwrite the value of need_locks provided by the user
  1556.   AC_MSG_CHECKING([if we can lock with hard links])
  1557.   hard_links=yes
  1558.   $rm conftest*
  1559.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1560.   touch conftest.a
  1561.   ln conftest.a conftest.b 2>&5 || hard_links=no
  1562.   ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1563.   AC_MSG_RESULT([$hard_links])
  1564.   if test "$hard_links" = no; then
  1565.     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
  1566.     need_locks=warn
  1567.   fi
  1568. else
  1569.   need_locks=no
  1570. fi
  1571. ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
  1572.  
  1573.  
  1574. # AC_LIBTOOL_OBJDIR
  1575. # -----------------
  1576. AC_DEFUN([AC_LIBTOOL_OBJDIR],
  1577. [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
  1578. [rm -f .libs 2>/dev/null
  1579. mkdir .libs 2>/dev/null
  1580. if test -d .libs; then
  1581.   lt_cv_objdir=.libs
  1582. else
  1583.   # MS-DOS does not allow filenames that begin with a dot.
  1584.   lt_cv_objdir=_libs
  1585. fi
  1586. rmdir .libs 2>/dev/null])
  1587. objdir=$lt_cv_objdir
  1588. ])# AC_LIBTOOL_OBJDIR
  1589.  
  1590.  
  1591. # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
  1592. # ----------------------------------------------
  1593. # Check hardcoding attributes.
  1594. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
  1595. [AC_MSG_CHECKING([how to hardcode library paths into programs])
  1596. _LT_AC_TAGVAR(hardcode_action, $1)=
  1597. if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
  1598.    test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
  1599.    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
  1600.  
  1601.   # We can hardcode non-existant directories.
  1602.   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
  1603.      # If the only mechanism to avoid hardcoding is shlibpath_var, we
  1604.      # have to relink, otherwise we might link with an installed library
  1605.      # when we should be linking with a yet-to-be-installed one
  1606.      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
  1607.      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
  1608.     # Linking always hardcodes the temporary library directory.
  1609.     _LT_AC_TAGVAR(hardcode_action, $1)=relink
  1610.   else
  1611.     # We can link without hardcoding, and we can hardcode nonexisting dirs.
  1612.     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
  1613.   fi
  1614. else
  1615.   # We cannot hardcode anything, or else we can only hardcode existing
  1616.   # directories.
  1617.   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
  1618. fi
  1619. AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
  1620.  
  1621. if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
  1622.   # Fast installation is not supported
  1623.   enable_fast_install=no
  1624. elif test "$shlibpath_overrides_runpath" = yes ||
  1625.      test "$enable_shared" = no; then
  1626.   # Fast installation is not necessary
  1627.   enable_fast_install=needless
  1628. fi
  1629. ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
  1630.  
  1631.  
  1632. # AC_LIBTOOL_SYS_LIB_STRIP
  1633. # ------------------------
  1634. AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
  1635. [striplib=
  1636. old_striplib=
  1637. AC_MSG_CHECKING([whether stripping libraries is possible])
  1638. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  1639.   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  1640.   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  1641.   AC_MSG_RESULT([yes])
  1642. else
  1643. # FIXME - insert some real tests, host_os isn't really good enough
  1644.   case $host_os in
  1645.    darwin*)
  1646.        if test -n "$STRIP" ; then
  1647.          striplib="$STRIP -x"
  1648.          AC_MSG_RESULT([yes])
  1649.        else
  1650.   AC_MSG_RESULT([no])
  1651. fi
  1652.        ;;
  1653.    *)
  1654.   AC_MSG_RESULT([no])
  1655.     ;;
  1656.   esac
  1657. fi
  1658. ])# AC_LIBTOOL_SYS_LIB_STRIP
  1659.  
  1660.  
  1661. # AC_LIBTOOL_SYS_DYNAMIC_LINKER
  1662. # -----------------------------
  1663. # PORTME Fill in your ld.so characteristics
  1664. AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
  1665. [AC_MSG_CHECKING([dynamic linker characteristics])
  1666. library_names_spec=
  1667. libname_spec='lib$name'
  1668. soname_spec=
  1669. shrext_cmds=".so"
  1670. postinstall_cmds=
  1671. postuninstall_cmds=
  1672. finish_cmds=
  1673. finish_eval=
  1674. shlibpath_var=
  1675. shlibpath_overrides_runpath=unknown
  1676. version_type=none
  1677. dynamic_linker="$host_os ld.so"
  1678. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  1679. if test "$GCC" = yes; then
  1680.   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1681.   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
  1682.     # if the path contains ";" then we assume it to be the separator
  1683.     # otherwise default to the standard path separator (i.e. ":") - it is
  1684.     # assumed that no part of a normal pathname contains ";" but that should
  1685.     # okay in the real world where ";" in dirpaths is itself problematic.
  1686.     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1687.   else
  1688.     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  1689.   fi
  1690. else
  1691.   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  1692. fi
  1693. need_lib_prefix=unknown
  1694. hardcode_into_libs=no
  1695.  
  1696. # when you set need_version to no, make sure it does not cause -set_version
  1697. # flags to be left without arguments
  1698. need_version=unknown
  1699.  
  1700. case $host_os in
  1701. aix3*)
  1702.   version_type=linux
  1703.   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
  1704.   shlibpath_var=LIBPATH
  1705.  
  1706.   # AIX 3 has no versioning support, so we append a major version to the name.
  1707.   soname_spec='${libname}${release}${shared_ext}$major'
  1708.   ;;
  1709.  
  1710. aix4* | aix5*)
  1711.   version_type=linux
  1712.   need_lib_prefix=no
  1713.   need_version=no
  1714.   hardcode_into_libs=yes
  1715.   if test "$host_cpu" = ia64; then
  1716.     # AIX 5 supports IA64
  1717.     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
  1718.     shlibpath_var=LD_LIBRARY_PATH
  1719.   else
  1720.     # With GCC up to 2.95.x, collect2 would create an import file
  1721.     # for dependence libraries.  The import file would start with
  1722.     # the line `#! .'.  This would cause the generated library to
  1723.     # depend on `.', always an invalid library.  This was fixed in
  1724.     # development snapshots of GCC prior to 3.0.
  1725.     case $host_os in
  1726.       aix4 | aix4.[[01]] | aix4.[[01]].*)
  1727.       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  1728.        echo ' yes '
  1729.        echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  1730.     :
  1731.       else
  1732.     can_build_shared=no
  1733.       fi
  1734.       ;;
  1735.     esac
  1736.     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
  1737.     # soname into executable. Probably we can add versioning support to
  1738.     # collect2, so additional links can be useful in future.
  1739.     if test "$aix_use_runtimelinking" = yes; then
  1740.       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  1741.       # instead of lib<name>.a to let people know that these are not
  1742.       # typical AIX shared libraries.
  1743.       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1744.     else
  1745.       # We preserve .a as extension for shared libraries through AIX4.2
  1746.       # and later when we are not doing run time linking.
  1747.       library_names_spec='${libname}${release}.a $libname.a'
  1748.       soname_spec='${libname}${release}${shared_ext}$major'
  1749.     fi
  1750.     shlibpath_var=LIBPATH
  1751.   fi
  1752.   ;;
  1753.  
  1754. amigaos*)
  1755.   library_names_spec='$libname.ixlibrary $libname.a'
  1756.   # Create ${libname}_ixlibrary.a entries in /sys/libs.
  1757.   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'
  1758.   ;;
  1759.  
  1760. beos*)
  1761.   library_names_spec='${libname}${shared_ext}'
  1762.   dynamic_linker="$host_os ld.so"
  1763.   shlibpath_var=LIBRARY_PATH
  1764.   ;;
  1765.  
  1766. bsdi4*)
  1767.   version_type=linux
  1768.   need_version=no
  1769.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1770.   soname_spec='${libname}${release}${shared_ext}$major'
  1771.   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  1772.   shlibpath_var=LD_LIBRARY_PATH
  1773.   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  1774.   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  1775.   # the default ld.so.conf also contains /usr/contrib/lib and
  1776.   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  1777.   # libtool to hard-code these into programs
  1778.   ;;
  1779.  
  1780. cygwin* | mingw* | pw32*)
  1781.   version_type=windows
  1782.   shrext_cmds=".dll"
  1783.   need_version=no
  1784.   need_lib_prefix=no
  1785.  
  1786.   case $GCC,$host_os in
  1787.   yes,cygwin* | yes,mingw* | yes,pw32*)
  1788.     library_names_spec='$libname.dll.a'
  1789.     # DLL is installed to $(libdir)/../bin by postinstall_cmds
  1790.     postinstall_cmds='base_file=`basename \${file}`~
  1791.       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
  1792.       dldir=$destdir/`dirname \$dlpath`~
  1793.       test -d \$dldir || mkdir -p \$dldir~
  1794.       $install_prog $dir/$dlname \$dldir/$dlname'
  1795.     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
  1796.       dlpath=$dir/\$dldll~
  1797.        $rm \$dlpath'
  1798.     shlibpath_overrides_runpath=yes
  1799.  
  1800.     case $host_os in
  1801.     cygwin*)
  1802.       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
  1803.       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1804.       sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
  1805.       ;;
  1806.     mingw*)
  1807.       # MinGW DLLs use traditional 'lib' prefix
  1808.       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
  1809.       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
  1810.       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
  1811.         # It is most probably a Windows format PATH printed by
  1812.         # mingw gcc, but we are running on Cygwin. Gcc prints its search
  1813.         # path with ; separators, and with drive letters. We can handle the
  1814.         # drive letters (cygwin fileutils understands them), so leave them,
  1815.         # especially as we might pass files found there to a mingw objdump,
  1816.         # which wouldn't understand a cygwinified path. Ahh.
  1817.         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
  1818.       else
  1819.         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
  1820.       fi
  1821.       ;;
  1822.     pw32*)
  1823.       # pw32 DLLs use 'pw' prefix rather than 'lib'
  1824.       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
  1825.       ;;
  1826.     esac
  1827.     ;;
  1828.  
  1829.   *)
  1830.     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
  1831.     ;;
  1832.   esac
  1833.   dynamic_linker='Win32 ld.exe'
  1834.   # FIXME: first we should search . and the directory the executable is in
  1835.   shlibpath_var=PATH
  1836.   ;;
  1837.  
  1838. darwin* | rhapsody*)
  1839.   dynamic_linker="$host_os dyld"
  1840.   version_type=darwin
  1841.   need_lib_prefix=no
  1842.   need_version=no
  1843.   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
  1844.   soname_spec='${libname}${release}${major}$shared_ext'
  1845.   shlibpath_overrides_runpath=yes
  1846.   shlibpath_var=DYLD_LIBRARY_PATH
  1847.   shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
  1848.   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
  1849.   if test "$GCC" = yes; then
  1850.     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"`
  1851.   else
  1852.     sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
  1853.   fi
  1854.   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
  1855.   ;;
  1856.  
  1857. dgux*)
  1858.   version_type=linux
  1859.   need_lib_prefix=no
  1860.   need_version=no
  1861.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
  1862.   soname_spec='${libname}${release}${shared_ext}$major'
  1863.   shlibpath_var=LD_LIBRARY_PATH
  1864.   ;;
  1865.  
  1866. freebsd1*)
  1867.   dynamic_linker=no
  1868.   ;;
  1869.  
  1870. kfreebsd*-gnu)
  1871.   version_type=linux
  1872.   need_lib_prefix=no
  1873.   need_version=no
  1874.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  1875.   soname_spec='${libname}${release}${shared_ext}$major'
  1876.   shlibpath_var=LD_LIBRARY_PATH
  1877.   shlibpath_overrides_runpath=no
  1878.   hardcode_into_libs=yes
  1879.   dynamic_linker='GNU ld.so'
  1880.   ;;
  1881.  
  1882. freebsd*)
  1883.   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  1884.   version_type=freebsd-$objformat
  1885.   case $version_type in
  1886.     freebsd-elf*)
  1887.       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
  1888.       need_version=no
  1889.       need_lib_prefix=no
  1890.       ;;
  1891.     freebsd-*)
  1892.       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
  1893.       need_version=yes
  1894.       ;;
  1895.   esac
  1896.   shlibpath_var=LD_LIBRARY_PATH
  1897.   case $host_os in
  1898.   freebsd2*)
  1899.     shlibpath_overrides_runpath=yes
  1900.     ;;
  1901.   freebsd3.[01]* | freebsdelf3.[01]*)
  1902.     shlibpath_overrides_runpath=yes
  1903.     hardcode_into_libs=yes
  1904.     ;;
  1905.   *) # from 3.2 on
  1906.     shlibpath_overrides_runpath=no
  1907.     hardcode_into_libs=yes
  1908.     ;;
  1909.   esac
  1910.   ;;
  1911.  
  1912. gnu*)
  1913.   version_type=linux
  1914.   need_lib_prefix=no
  1915.   need_version=no
  1916.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
  1917.   soname_spec='${libname}${release}${shared_ext}$major'
  1918.   shlibpath_var=LD_LIBRARY_PATH
  1919.   hardcode_into_libs=yes
  1920.   ;;
  1921.  
  1922. hpux9* | hpux10* | hpux11*)
  1923.   # Give a soname corresponding to the major version so that dld.sl refuses to
  1924.   # link against other versions.
  1925.   version_type=sunos
  1926.   need_lib_prefix=no
  1927.   need_version=no
  1928.   case "$host_cpu" in
  1929.   ia64*)
  1930.     shrext_cmds='.so'
  1931.     hardcode_into_libs=yes
  1932.     dynamic_linker="$host_os dld.so"
  1933.     shlibpath_var=LD_LIBRARY_PATH
  1934.     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1935.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1936.     soname_spec='${libname}${release}${shared_ext}$major'
  1937.     if test "X$HPUX_IA64_MODE" = X32; then
  1938.       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
  1939.     else
  1940.       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
  1941.     fi
  1942.     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1943.     ;;
  1944.    hppa*64*)
  1945.      shrext_cmds='.sl'
  1946.      hardcode_into_libs=yes
  1947.      dynamic_linker="$host_os dld.sl"
  1948.      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
  1949.      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
  1950.      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1951.      soname_spec='${libname}${release}${shared_ext}$major'
  1952.      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
  1953.      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
  1954.      ;;
  1955.    *)
  1956.     shrext_cmds='.sl'
  1957.     dynamic_linker="$host_os dld.sl"
  1958.     shlibpath_var=SHLIB_PATH
  1959.     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  1960.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  1961.     soname_spec='${libname}${release}${shared_ext}$major'
  1962.     ;;
  1963.   esac
  1964.   # HP-UX runs *really* slowly unless shared libraries are mode 555.
  1965.   postinstall_cmds='chmod 555 $lib'
  1966.   ;;
  1967.  
  1968. irix5* | irix6* | nonstopux*)
  1969.   case $host_os in
  1970.     nonstopux*) version_type=nonstopux ;;
  1971.     *)
  1972.     if test "$lt_cv_prog_gnu_ld" = yes; then
  1973.         version_type=linux
  1974.     else
  1975.         version_type=irix
  1976.     fi ;;
  1977.   esac
  1978.   need_lib_prefix=no
  1979.   need_version=no
  1980.   soname_spec='${libname}${release}${shared_ext}$major'
  1981.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
  1982.   case $host_os in
  1983.   irix5* | nonstopux*)
  1984.     libsuff= shlibsuff=
  1985.     ;;
  1986.   *)
  1987.     case $LD in # libtool.m4 will add one of these switches to LD
  1988.     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
  1989.       libsuff= shlibsuff= libmagic=32-bit;;
  1990.     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
  1991.       libsuff=32 shlibsuff=N32 libmagic=N32;;
  1992.     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
  1993.       libsuff=64 shlibsuff=64 libmagic=64-bit;;
  1994.     *) libsuff= shlibsuff= libmagic=never-match;;
  1995.     esac
  1996.     ;;
  1997.   esac
  1998.   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  1999.   shlibpath_overrides_runpath=no
  2000.   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2001.   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2002.   hardcode_into_libs=yes
  2003.   ;;
  2004.  
  2005. # No shared lib support for Linux oldld, aout, or coff.
  2006. linux*oldld* | linux*aout* | linux*coff*)
  2007.   dynamic_linker=no
  2008.   ;;
  2009.  
  2010. # This must be Linux ELF.
  2011. linux*)
  2012.   version_type=linux
  2013.   need_lib_prefix=no
  2014.   need_version=no
  2015.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2016.   soname_spec='${libname}${release}${shared_ext}$major'
  2017.   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2018.   shlibpath_var=LD_LIBRARY_PATH
  2019.   shlibpath_overrides_runpath=no
  2020.   # This implies no fast_install, which is unacceptable.
  2021.   # Some rework will be needed to allow for fast_install
  2022.   # before this can be enabled.
  2023.   hardcode_into_libs=yes
  2024.  
  2025.   # Append ld.so.conf contents to the search path
  2026.   if test -f /etc/ld.so.conf; then
  2027.     lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
  2028.     sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
  2029.   fi
  2030.  
  2031.   # We used to test for /lib/ld.so.1 and disable shared libraries on
  2032.   # powerpc, because MkLinux only supported shared libraries with the
  2033.   # GNU dynamic linker.  Since this was broken with cross compilers,
  2034.   # most powerpc-linux boxes support dynamic linking these days and
  2035.   # people can always --disable-shared, the test was removed, and we
  2036.   # assume the GNU/Linux dynamic linker is in use.
  2037.   dynamic_linker='GNU/Linux ld.so'
  2038.   ;;
  2039.  
  2040. netbsdelf*-gnu)
  2041.   version_type=linux
  2042.   need_lib_prefix=no
  2043.   need_version=no
  2044.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2045.   soname_spec='${libname}${release}${shared_ext}$major'
  2046.   shlibpath_var=LD_LIBRARY_PATH
  2047.   shlibpath_overrides_runpath=no
  2048.   hardcode_into_libs=yes
  2049.   dynamic_linker='NetBSD ld.elf_so'
  2050.   ;;
  2051.  
  2052. knetbsd*-gnu)
  2053.   version_type=linux
  2054.   need_lib_prefix=no
  2055.   need_version=no
  2056.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2057.   soname_spec='${libname}${release}${shared_ext}$major'
  2058.   shlibpath_var=LD_LIBRARY_PATH
  2059.   shlibpath_overrides_runpath=no
  2060.   hardcode_into_libs=yes
  2061.   dynamic_linker='GNU ld.so'
  2062.   ;;
  2063.  
  2064. netbsd*)
  2065.   version_type=sunos
  2066.   need_lib_prefix=no
  2067.   need_version=no
  2068.   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2069.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2070.     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2071.     dynamic_linker='NetBSD (a.out) ld.so'
  2072.   else
  2073.     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
  2074.     soname_spec='${libname}${release}${shared_ext}$major'
  2075.     dynamic_linker='NetBSD ld.elf_so'
  2076.   fi
  2077.   shlibpath_var=LD_LIBRARY_PATH
  2078.   shlibpath_overrides_runpath=yes
  2079.   hardcode_into_libs=yes
  2080.   ;;
  2081.  
  2082. newsos6)
  2083.   version_type=linux
  2084.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2085.   shlibpath_var=LD_LIBRARY_PATH
  2086.   shlibpath_overrides_runpath=yes
  2087.   ;;
  2088.  
  2089. nto-qnx*)
  2090.   version_type=linux
  2091.   need_lib_prefix=no
  2092.   need_version=no
  2093.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2094.   soname_spec='${libname}${release}${shared_ext}$major'
  2095.   shlibpath_var=LD_LIBRARY_PATH
  2096.   shlibpath_overrides_runpath=yes
  2097.   ;;
  2098.  
  2099. openbsd*)
  2100.   version_type=sunos
  2101.   need_lib_prefix=no
  2102.   need_version=yes
  2103.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2104.   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2105.   shlibpath_var=LD_LIBRARY_PATH
  2106.   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2107.     case $host_os in
  2108.       openbsd2.[[89]] | openbsd2.[[89]].*)
  2109.     shlibpath_overrides_runpath=no
  2110.     ;;
  2111.       *)
  2112.     shlibpath_overrides_runpath=yes
  2113.     ;;
  2114.       esac
  2115.   else
  2116.     shlibpath_overrides_runpath=yes
  2117.   fi
  2118.   ;;
  2119.  
  2120. os2*)
  2121.   libname_spec='$name'
  2122.   shrext_cmds=".dll"
  2123.   need_lib_prefix=no
  2124.   library_names_spec='$libname${shared_ext} $libname.a'
  2125.   dynamic_linker='OS/2 ld.exe'
  2126.   shlibpath_var=LIBPATH
  2127.   ;;
  2128.  
  2129. osf3* | osf4* | osf5*)
  2130.   version_type=osf
  2131.   need_lib_prefix=no
  2132.   need_version=no
  2133.   soname_spec='${libname}${release}${shared_ext}$major'
  2134.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2135.   shlibpath_var=LD_LIBRARY_PATH
  2136.   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2137.   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2138.   ;;
  2139.  
  2140. sco3.2v5*)
  2141.   version_type=osf
  2142.   soname_spec='${libname}${release}${shared_ext}$major'
  2143.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2144.   shlibpath_var=LD_LIBRARY_PATH
  2145.   ;;
  2146.  
  2147. solaris*)
  2148.   version_type=linux
  2149.   need_lib_prefix=no
  2150.   need_version=no
  2151.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2152.   soname_spec='${libname}${release}${shared_ext}$major'
  2153.   shlibpath_var=LD_LIBRARY_PATH
  2154.   shlibpath_overrides_runpath=yes
  2155.   hardcode_into_libs=yes
  2156.   # ldd complains unless libraries are executable
  2157.   postinstall_cmds='chmod +x $lib'
  2158.   ;;
  2159.  
  2160. sunos4*)
  2161.   version_type=sunos
  2162.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
  2163.   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2164.   shlibpath_var=LD_LIBRARY_PATH
  2165.   shlibpath_overrides_runpath=yes
  2166.   if test "$with_gnu_ld" = yes; then
  2167.     need_lib_prefix=no
  2168.   fi
  2169.   need_version=yes
  2170.   ;;
  2171.  
  2172. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2173.   version_type=linux
  2174.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2175.   soname_spec='${libname}${release}${shared_ext}$major'
  2176.   shlibpath_var=LD_LIBRARY_PATH
  2177.   case $host_vendor in
  2178.     sni)
  2179.       shlibpath_overrides_runpath=no
  2180.       need_lib_prefix=no
  2181.       export_dynamic_flag_spec='${wl}-Blargedynsym'
  2182.       runpath_var=LD_RUN_PATH
  2183.       ;;
  2184.     siemens)
  2185.       need_lib_prefix=no
  2186.       ;;
  2187.     motorola)
  2188.       need_lib_prefix=no
  2189.       need_version=no
  2190.       shlibpath_overrides_runpath=no
  2191.       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2192.       ;;
  2193.   esac
  2194.   ;;
  2195.  
  2196. sysv4*MP*)
  2197.   if test -d /usr/nec ;then
  2198.     version_type=linux
  2199.     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
  2200.     soname_spec='$libname${shared_ext}.$major'
  2201.     shlibpath_var=LD_LIBRARY_PATH
  2202.   fi
  2203.   ;;
  2204.  
  2205. uts4*)
  2206.   version_type=linux
  2207.   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
  2208.   soname_spec='${libname}${release}${shared_ext}$major'
  2209.   shlibpath_var=LD_LIBRARY_PATH
  2210.   ;;
  2211.  
  2212. *)
  2213.   dynamic_linker=no
  2214.   ;;
  2215. esac
  2216. AC_MSG_RESULT([$dynamic_linker])
  2217. test "$dynamic_linker" = no && can_build_shared=no
  2218. ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
  2219.  
  2220.  
  2221. # _LT_AC_TAGCONFIG
  2222. # ----------------
  2223. AC_DEFUN([_LT_AC_TAGCONFIG],
  2224. [AC_ARG_WITH([tags],
  2225.     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
  2226.         [include additional configurations @<:@automatic@:>@])],
  2227.     [tagnames="$withval"])
  2228.  
  2229. if test -f "$ltmain" && test -n "$tagnames"; then
  2230.   if test ! -f "${ofile}"; then
  2231.     AC_MSG_WARN([output file `$ofile' does not exist])
  2232.   fi
  2233.  
  2234.   if test -z "$LTCC"; then
  2235.     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
  2236.     if test -z "$LTCC"; then
  2237.       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
  2238.     else
  2239.       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
  2240.     fi
  2241.   fi
  2242.  
  2243.   # Extract list of available tagged configurations in $ofile.
  2244.   # Note that this assumes the entire list is on one line.
  2245.   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
  2246.  
  2247.   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  2248.   for tagname in $tagnames; do
  2249.     IFS="$lt_save_ifs"
  2250.     # Check whether tagname contains only valid characters
  2251.     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
  2252.     "") ;;
  2253.     *)  AC_MSG_ERROR([invalid tag name: $tagname])
  2254.     ;;
  2255.     esac
  2256.  
  2257.     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
  2258.     then
  2259.       AC_MSG_ERROR([tag name \"$tagname\" already exists])
  2260.     fi
  2261.  
  2262.     # Update the list of available tags.
  2263.     if test -n "$tagname"; then
  2264.       echo appending configuration tag \"$tagname\" to $ofile
  2265.  
  2266.       case $tagname in
  2267.       CXX)
  2268.     if test -n "$CXX" && test "X$CXX" != "Xno"; then
  2269.       AC_LIBTOOL_LANG_CXX_CONFIG
  2270.     else
  2271.       tagname=""
  2272.     fi
  2273.     ;;
  2274.  
  2275.       F77)
  2276.     if test -n "$F77" && test "X$F77" != "Xno"; then
  2277.       AC_LIBTOOL_LANG_F77_CONFIG
  2278.     else
  2279.       tagname=""
  2280.     fi
  2281.     ;;
  2282.  
  2283.       GCJ)
  2284.     if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
  2285.       AC_LIBTOOL_LANG_GCJ_CONFIG
  2286.     else
  2287.       tagname=""
  2288.     fi
  2289.     ;;
  2290.  
  2291.       RC)
  2292.     AC_LIBTOOL_LANG_RC_CONFIG
  2293.     ;;
  2294.  
  2295.       *)
  2296.     AC_MSG_ERROR([Unsupported tag name: $tagname])
  2297.     ;;
  2298.       esac
  2299.  
  2300.       # Append the new tag name to the list of available tags.
  2301.       if test -n "$tagname" ; then
  2302.       available_tags="$available_tags $tagname"
  2303.     fi
  2304.     fi
  2305.   done
  2306.   IFS="$lt_save_ifs"
  2307.  
  2308.   # Now substitute the updated list of available tags.
  2309.   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
  2310.     mv "${ofile}T" "$ofile"
  2311.     chmod +x "$ofile"
  2312.   else
  2313.     rm -f "${ofile}T"
  2314.     AC_MSG_ERROR([unable to update list of available tagged configurations.])
  2315.   fi
  2316. fi
  2317. ])# _LT_AC_TAGCONFIG
  2318.  
  2319.  
  2320. # AC_LIBTOOL_DLOPEN
  2321. # -----------------
  2322. # enable checks for dlopen support
  2323. AC_DEFUN([AC_LIBTOOL_DLOPEN],
  2324.  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
  2325. ])# AC_LIBTOOL_DLOPEN
  2326.  
  2327.  
  2328. # AC_LIBTOOL_WIN32_DLL
  2329. # --------------------
  2330. # declare package support for building win32 dll's
  2331. AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
  2332. [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
  2333. ])# AC_LIBTOOL_WIN32_DLL
  2334.  
  2335.  
  2336. # AC_ENABLE_SHARED([DEFAULT])
  2337. # ---------------------------
  2338. # implement the --enable-shared flag
  2339. # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
  2340. AC_DEFUN([AC_ENABLE_SHARED],
  2341. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  2342. AC_ARG_ENABLE([shared],
  2343.     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
  2344.     [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
  2345.     [p=${PACKAGE-default}
  2346.     case $enableval in
  2347.     yes) enable_shared=yes ;;
  2348.     no) enable_shared=no ;;
  2349.     *)
  2350.       enable_shared=no
  2351.       # Look at the argument we got.  We use all the common list separators.
  2352.       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  2353.       for pkg in $enableval; do
  2354.     IFS="$lt_save_ifs"
  2355.     if test "X$pkg" = "X$p"; then
  2356.       enable_shared=yes
  2357.     fi
  2358.       done
  2359.       IFS="$lt_save_ifs"
  2360.       ;;
  2361.     esac],
  2362.     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
  2363. ])# AC_ENABLE_SHARED
  2364.  
  2365.  
  2366. # AC_DISABLE_SHARED
  2367. # -----------------
  2368. #- set the default shared flag to --disable-shared
  2369. AC_DEFUN([AC_DISABLE_SHARED],
  2370. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2371. AC_ENABLE_SHARED(no)
  2372. ])# AC_DISABLE_SHARED
  2373.  
  2374.  
  2375. # AC_ENABLE_STATIC([DEFAULT])
  2376. # ---------------------------
  2377. # implement the --enable-static flag
  2378. # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
  2379. AC_DEFUN([AC_ENABLE_STATIC],
  2380. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  2381. AC_ARG_ENABLE([static],
  2382.     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
  2383.     [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
  2384.     [p=${PACKAGE-default}
  2385.     case $enableval in
  2386.     yes) enable_static=yes ;;
  2387.     no) enable_static=no ;;
  2388.     *)
  2389.      enable_static=no
  2390.       # Look at the argument we got.  We use all the common list separators.
  2391.       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  2392.       for pkg in $enableval; do
  2393.     IFS="$lt_save_ifs"
  2394.     if test "X$pkg" = "X$p"; then
  2395.       enable_static=yes
  2396.     fi
  2397.       done
  2398.       IFS="$lt_save_ifs"
  2399.       ;;
  2400.     esac],
  2401.     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
  2402. ])# AC_ENABLE_STATIC
  2403.  
  2404.  
  2405. # AC_DISABLE_STATIC
  2406. # -----------------
  2407. # set the default static flag to --disable-static
  2408. AC_DEFUN([AC_DISABLE_STATIC],
  2409. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2410. AC_ENABLE_STATIC(no)
  2411. ])# AC_DISABLE_STATIC
  2412.  
  2413.  
  2414. # AC_ENABLE_FAST_INSTALL([DEFAULT])
  2415. # ---------------------------------
  2416. # implement the --enable-fast-install flag
  2417. # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
  2418. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  2419. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  2420. AC_ARG_ENABLE([fast-install],
  2421.     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
  2422.     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
  2423.     [p=${PACKAGE-default}
  2424.     case $enableval in
  2425.     yes) enable_fast_install=yes ;;
  2426.     no) enable_fast_install=no ;;
  2427.     *)
  2428.       enable_fast_install=no
  2429.       # Look at the argument we got.  We use all the common list separators.
  2430.       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
  2431.       for pkg in $enableval; do
  2432.     IFS="$lt_save_ifs"
  2433.     if test "X$pkg" = "X$p"; then
  2434.       enable_fast_install=yes
  2435.     fi
  2436.       done
  2437.       IFS="$lt_save_ifs"
  2438.       ;;
  2439.     esac],
  2440.     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
  2441. ])# AC_ENABLE_FAST_INSTALL
  2442.  
  2443.  
  2444. # AC_DISABLE_FAST_INSTALL
  2445. # -----------------------
  2446. # set the default to --disable-fast-install
  2447. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  2448. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2449. AC_ENABLE_FAST_INSTALL(no)
  2450. ])# AC_DISABLE_FAST_INSTALL
  2451.  
  2452.  
  2453. # AC_LIBTOOL_PICMODE([MODE])
  2454. # --------------------------
  2455. # implement the --with-pic flag
  2456. # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
  2457. AC_DEFUN([AC_LIBTOOL_PICMODE],
  2458. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2459. pic_mode=ifelse($#,1,$1,default)
  2460. ])# AC_LIBTOOL_PICMODE
  2461.  
  2462.  
  2463. # AC_PROG_EGREP
  2464. # -------------
  2465. # This is predefined starting with Autoconf 2.54, so this conditional
  2466. # definition can be removed once we require Autoconf 2.54 or later.
  2467. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
  2468. [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
  2469.    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
  2470.     then ac_cv_prog_egrep='grep -E'
  2471.     else ac_cv_prog_egrep='egrep'
  2472.     fi])
  2473.  EGREP=$ac_cv_prog_egrep
  2474.  AC_SUBST([EGREP])
  2475. ])])
  2476.  
  2477.  
  2478. # AC_PATH_TOOL_PREFIX
  2479. # -------------------
  2480. # find a file program which can recognise shared library
  2481. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  2482. [AC_REQUIRE([AC_PROG_EGREP])dnl
  2483. AC_MSG_CHECKING([for $1])
  2484. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  2485. [case $MAGIC_CMD in
  2486. [[\\/*] |  ?:[\\/]*])
  2487.   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  2488.   ;;
  2489. *)
  2490.   lt_save_MAGIC_CMD="$MAGIC_CMD"
  2491.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2492. dnl $ac_dummy forces splitting on constant user-supplied paths.
  2493. dnl POSIX.2 word splitting is done only on the output of word expansions,
  2494. dnl not every word.  This closes a longstanding sh security hole.
  2495.   ac_dummy="ifelse([$2], , $PATH, [$2])"
  2496.   for ac_dir in $ac_dummy; do
  2497.     IFS="$lt_save_ifs"
  2498.     test -z "$ac_dir" && ac_dir=.
  2499.     if test -f $ac_dir/$1; then
  2500.       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  2501.       if test -n "$file_magic_test_file"; then
  2502.     case $deplibs_check_method in
  2503.     "file_magic "*)
  2504.       file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  2505.       MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2506.       if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  2507.         $EGREP "$file_magic_regex" > /dev/null; then
  2508.         :
  2509.       else
  2510.         cat <<EOF 1>&2
  2511.  
  2512. *** Warning: the command libtool uses to detect shared libraries,
  2513. *** $file_magic_cmd, produces output that libtool cannot recognize.
  2514. *** The result is that libtool may fail to recognize shared libraries
  2515. *** as such.  This will affect the creation of libtool libraries that
  2516. *** depend on shared libraries, but programs linked with such libtool
  2517. *** libraries will work regardless of this problem.  Nevertheless, you
  2518. *** may want to report the problem to your system manager and/or to
  2519. *** bug-libtool@gnu.org
  2520.  
  2521. EOF
  2522.       fi ;;
  2523.     esac
  2524.       fi
  2525.       break
  2526.     fi
  2527.   done
  2528.   IFS="$lt_save_ifs"
  2529.   MAGIC_CMD="$lt_save_MAGIC_CMD"
  2530.   ;;
  2531. esac])
  2532. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  2533. if test -n "$MAGIC_CMD"; then
  2534.   AC_MSG_RESULT($MAGIC_CMD)
  2535. else
  2536.   AC_MSG_RESULT(no)
  2537. fi
  2538. ])# AC_PATH_TOOL_PREFIX
  2539.  
  2540.  
  2541. # AC_PATH_MAGIC
  2542. # -------------
  2543. # find a file program which can recognise a shared library
  2544. AC_DEFUN([AC_PATH_MAGIC],
  2545. [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
  2546. if test -z "$lt_cv_path_MAGIC_CMD"; then
  2547.   if test -n "$ac_tool_prefix"; then
  2548.     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
  2549.   else
  2550.     MAGIC_CMD=:
  2551.   fi
  2552. fi
  2553. ])# AC_PATH_MAGIC
  2554.  
  2555.  
  2556. # AC_PROG_LD
  2557. # ----------
  2558. # find the pathname to the GNU or non-GNU linker
  2559. AC_DEFUN([AC_PROG_LD],
  2560. [AC_ARG_WITH([gnu-ld],
  2561.     [AC_HELP_STRING([--with-gnu-ld],
  2562.     [assume the C compiler uses GNU ld @<:@default=no@:>@])],
  2563.     [test "$withval" = no || with_gnu_ld=yes],
  2564.     [with_gnu_ld=no])
  2565. AC_REQUIRE([LT_AC_PROG_SED])dnl
  2566. AC_REQUIRE([AC_PROG_CC])dnl
  2567. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2568. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  2569. ac_prog=ld
  2570. if test "$GCC" = yes; then
  2571.   # Check if gcc -print-prog-name=ld gives a path.
  2572.   AC_MSG_CHECKING([for ld used by $CC])
  2573.   case $host in
  2574.   *-*-mingw*)
  2575.     # gcc leaves a trailing carriage return which upsets mingw
  2576.     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  2577.   *)
  2578.     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  2579.   esac
  2580.   case $ac_prog in
  2581.     # Accept absolute paths.
  2582.     [[\\/]]* | ?:[[\\/]]*)
  2583.       re_direlt='/[[^/]][[^/]]*/\.\./'
  2584.       # Canonicalize the pathname of ld
  2585.       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
  2586.       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  2587.     ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
  2588.       done
  2589.       test -z "$LD" && LD="$ac_prog"
  2590.       ;;
  2591.   "")
  2592.     # If it fails, then pretend we aren't using GCC.
  2593.     ac_prog=ld
  2594.     ;;
  2595.   *)
  2596.     # If it is relative, then search for the first ld in PATH.
  2597.     with_gnu_ld=unknown
  2598.     ;;
  2599.   esac
  2600. elif test "$with_gnu_ld" = yes; then
  2601.   AC_MSG_CHECKING([for GNU ld])
  2602. else
  2603.   AC_MSG_CHECKING([for non-GNU ld])
  2604. fi
  2605. AC_CACHE_VAL(lt_cv_path_LD,
  2606. [if test -z "$LD"; then
  2607.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2608.   for ac_dir in $PATH; do
  2609.     IFS="$lt_save_ifs"
  2610.     test -z "$ac_dir" && ac_dir=.
  2611.     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  2612.       lt_cv_path_LD="$ac_dir/$ac_prog"
  2613.       # Check to see if the program is GNU ld.  I'd rather use --version,
  2614.       # but apparently some GNU ld's only accept -v.
  2615.       # Break only if it was the GNU/non-GNU ld that we prefer.
  2616.       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
  2617.       *GNU* | *'with BFD'*)
  2618.     test "$with_gnu_ld" != no && break
  2619.     ;;
  2620.       *)
  2621.     test "$with_gnu_ld" != yes && break
  2622.     ;;
  2623.       esac
  2624.     fi
  2625.   done
  2626.   IFS="$lt_save_ifs"
  2627. else
  2628.   lt_cv_path_LD="$LD" # Let the user override the test with a path.
  2629. fi])
  2630. LD="$lt_cv_path_LD"
  2631. if test -n "$LD"; then
  2632.   AC_MSG_RESULT($LD)
  2633. else
  2634.   AC_MSG_RESULT(no)
  2635. fi
  2636. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  2637. AC_PROG_LD_GNU
  2638. ])# AC_PROG_LD
  2639.  
  2640.  
  2641. # AC_PROG_LD_GNU
  2642. # --------------
  2643. AC_DEFUN([AC_PROG_LD_GNU],
  2644. [AC_REQUIRE([AC_PROG_EGREP])dnl
  2645. AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  2646. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  2647. case `$LD -v 2>&1 </dev/null` in
  2648. *GNU* | *'with BFD'*)
  2649.   lt_cv_prog_gnu_ld=yes
  2650.   ;;
  2651. *)
  2652.   lt_cv_prog_gnu_ld=no
  2653.   ;;
  2654. esac])
  2655. with_gnu_ld=$lt_cv_prog_gnu_ld
  2656. ])# AC_PROG_LD_GNU
  2657.  
  2658.  
  2659. # AC_PROG_LD_RELOAD_FLAG
  2660. # ----------------------
  2661. # find reload flag for linker
  2662. #   -- PORTME Some linkers may need a different reload flag.
  2663. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  2664. [AC_CACHE_CHECK([for $LD option to reload object files],
  2665.   lt_cv_ld_reload_flag,
  2666.   [lt_cv_ld_reload_flag='-r'])
  2667. reload_flag=$lt_cv_ld_reload_flag
  2668. case $reload_flag in
  2669. "" | " "*) ;;
  2670. *) reload_flag=" $reload_flag" ;;
  2671. esac
  2672. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2673. ])# AC_PROG_LD_RELOAD_FLAG
  2674.  
  2675.  
  2676. # AC_DEPLIBS_CHECK_METHOD
  2677. # -----------------------
  2678. # how to check for library dependencies
  2679. #  -- PORTME fill in with the dynamic library characteristics
  2680. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  2681. [AC_CACHE_CHECK([how to recognise dependent libraries],
  2682. lt_cv_deplibs_check_method,
  2683. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  2684. lt_cv_file_magic_test_file=
  2685. lt_cv_deplibs_check_method='unknown'
  2686. # Need to set the preceding variable on all platforms that support
  2687. # interlibrary dependencies.
  2688. # 'none' -- dependencies not supported.
  2689. # `unknown' -- same as none, but documents that we really don't know.
  2690. # 'pass_all' -- all dependencies passed with no checks.
  2691. # 'test_compile' -- check by making test program.
  2692. # 'file_magic [[regex]]' -- check by looking for files in library path
  2693. # which responds to the $file_magic_cmd with a given extended regex.
  2694. # If you have `file' or equivalent on your system and you're not sure
  2695. # whether `pass_all' will *always* work, you probably want this one.
  2696.  
  2697. case $host_os in
  2698. aix4* | aix5*)
  2699.   lt_cv_deplibs_check_method=pass_all
  2700.   ;;
  2701.  
  2702. beos*)
  2703.   lt_cv_deplibs_check_method=pass_all
  2704.   ;;
  2705.  
  2706. bsdi4*)
  2707.   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  2708.   lt_cv_file_magic_cmd='/usr/bin/file -L'
  2709.   lt_cv_file_magic_test_file=/shlib/libc.so
  2710.   ;;
  2711.  
  2712. cygwin*)
  2713.   # func_win32_libid is a shell function defined in ltmain.sh
  2714.   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
  2715.   lt_cv_file_magic_cmd='func_win32_libid'
  2716.   ;;
  2717.  
  2718. mingw* | pw32*)
  2719.   # Base MSYS/MinGW do not provide the 'file' command needed by
  2720.   # func_win32_libid shell function, so use a weaker test based on 'objdump'.
  2721.   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  2722.   lt_cv_file_magic_cmd='$OBJDUMP -f'
  2723.   ;;
  2724.  
  2725. darwin* | rhapsody*)
  2726.   lt_cv_deplibs_check_method=pass_all
  2727.   ;;
  2728.  
  2729. freebsd* | kfreebsd*-gnu)
  2730.   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2731.     case $host_cpu in
  2732.     i*86 )
  2733.       # Not sure whether the presence of OpenBSD here was a mistake.
  2734.       # Let's accept both of them until this is cleared up.
  2735.       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  2736.       lt_cv_file_magic_cmd=/usr/bin/file
  2737.       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2738.       ;;
  2739.     esac
  2740.   else
  2741.     lt_cv_deplibs_check_method=pass_all
  2742.   fi
  2743.   ;;
  2744.  
  2745. gnu*)
  2746.   lt_cv_deplibs_check_method=pass_all
  2747.   ;;
  2748.  
  2749. hpux10.20* | hpux11*)
  2750.   lt_cv_file_magic_cmd=/usr/bin/file
  2751.   case "$host_cpu" in
  2752.   ia64*)
  2753.     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
  2754.     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
  2755.     ;;
  2756.   hppa*64*)
  2757.     [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]']
  2758.     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
  2759.     ;;
  2760.   *)
  2761.     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  2762.     lt_cv_file_magic_test_file=/usr/lib/libc.sl
  2763.     ;;
  2764.   esac
  2765.   ;;
  2766.  
  2767. irix5* | irix6* | nonstopux*)
  2768.   case $LD in
  2769.   *-32|*"-32 ") libmagic=32-bit;;
  2770.   *-n32|*"-n32 ") libmagic=N32;;
  2771.   *-64|*"-64 ") libmagic=64-bit;;
  2772.   *) libmagic=never-match;;
  2773.   esac
  2774.   lt_cv_deplibs_check_method=pass_all
  2775.   ;;
  2776.  
  2777. # This must be Linux ELF.
  2778. linux*)
  2779.   lt_cv_deplibs_check_method=pass_all
  2780.   ;;
  2781.  
  2782. netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
  2783.   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  2784.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
  2785.   else
  2786.     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
  2787.   fi
  2788.   ;;
  2789.  
  2790. newos6*)
  2791.   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  2792.   lt_cv_file_magic_cmd=/usr/bin/file
  2793.   lt_cv_file_magic_test_file=/usr/lib/libnls.so
  2794.   ;;
  2795.  
  2796. nto-qnx*)
  2797.   lt_cv_deplibs_check_method=unknown
  2798.   ;;
  2799.  
  2800. openbsd*)
  2801.   lt_cv_file_magic_cmd=/usr/bin/file
  2802.   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  2803.   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2804.     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  2805.   else
  2806.     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  2807.   fi
  2808.   ;;
  2809.  
  2810. osf3* | osf4* | osf5*)
  2811.   lt_cv_deplibs_check_method=pass_all
  2812.   ;;
  2813.  
  2814. sco3.2v5*)
  2815.   lt_cv_deplibs_check_method=pass_all
  2816.   ;;
  2817.  
  2818. solaris*)
  2819.   lt_cv_deplibs_check_method=pass_all
  2820.   ;;
  2821.  
  2822. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2823.   case $host_vendor in
  2824.   motorola)
  2825.     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]]'
  2826.     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  2827.     ;;
  2828.   ncr)
  2829.     lt_cv_deplibs_check_method=pass_all
  2830.     ;;
  2831.   sequent)
  2832.     lt_cv_file_magic_cmd='/bin/file'
  2833.     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  2834.     ;;
  2835.   sni)
  2836.     lt_cv_file_magic_cmd='/bin/file'
  2837.     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  2838.     lt_cv_file_magic_test_file=/lib/libc.so
  2839.     ;;
  2840.   siemens)
  2841.     lt_cv_deplibs_check_method=pass_all
  2842.     ;;
  2843.   esac
  2844.   ;;
  2845.  
  2846. sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
  2847.   lt_cv_deplibs_check_method=pass_all
  2848.   ;;
  2849. esac
  2850. ])
  2851. file_magic_cmd=$lt_cv_file_magic_cmd
  2852. deplibs_check_method=$lt_cv_deplibs_check_method
  2853. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2854. ])# AC_DEPLIBS_CHECK_METHOD
  2855.  
  2856.  
  2857. # AC_PROG_NM
  2858. # ----------
  2859. # find the pathname to a BSD-compatible name lister
  2860. AC_DEFUN([AC_PROG_NM],
  2861. [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
  2862. [if test -n "$NM"; then
  2863.   # Let the user override the test.
  2864.   lt_cv_path_NM="$NM"
  2865. else
  2866.   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  2867.   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  2868.     IFS="$lt_save_ifs"
  2869.     test -z "$ac_dir" && ac_dir=.
  2870.     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
  2871.     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
  2872.       # Check to see if the nm accepts a BSD-compat flag.
  2873.       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  2874.       #   nm: unknown option "B" ignored
  2875.       # Tru64's nm complains that /dev/null is an invalid object file
  2876.       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
  2877.       */dev/null* | *'Invalid file or object type'*)
  2878.     lt_cv_path_NM="$tmp_nm -B"
  2879.     break
  2880.         ;;
  2881.       *)
  2882.     case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
  2883.     */dev/null*)
  2884.       lt_cv_path_NM="$tmp_nm -p"
  2885.       break
  2886.       ;;
  2887.     *)
  2888.       lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  2889.       continue # so that we can try to find one that supports BSD flags
  2890.       ;;
  2891.     esac
  2892.       esac
  2893.     fi
  2894.   done
  2895.   IFS="$lt_save_ifs"
  2896.   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  2897. fi])
  2898. NM="$lt_cv_path_NM"
  2899. ])# AC_PROG_NM
  2900.  
  2901.  
  2902. # AC_CHECK_LIBM
  2903. # -------------
  2904. # check for math library
  2905. AC_DEFUN([AC_CHECK_LIBM],
  2906. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  2907. LIBM=
  2908. case $host in
  2909. *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
  2910.   # These system don't have libm, or don't need it
  2911.   ;;
  2912. *-ncr-sysv4.3*)
  2913.   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  2914.   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
  2915.   ;;
  2916. *)
  2917.   AC_CHECK_LIB(m, cos, LIBM="-lm")
  2918.   ;;
  2919. esac
  2920. ])# AC_CHECK_LIBM
  2921.  
  2922.  
  2923. # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
  2924. # -----------------------------------
  2925. # sets LIBLTDL to the link flags for the libltdl convenience library and
  2926. # LTDLINCL to the include flags for the libltdl header and adds
  2927. # --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
  2928. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
  2929. # DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
  2930. # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
  2931. # '${top_srcdir}/' (note the single quotes!).  If your package is not
  2932. # flat and you're not using automake, define top_builddir and
  2933. # top_srcdir appropriately in the Makefiles.
  2934. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  2935. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2936.   case $enable_ltdl_convenience in
  2937.   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  2938.   "") enable_ltdl_convenience=yes
  2939.       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  2940.   esac
  2941.   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  2942.   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2943.   # For backwards non-gettext consistent compatibility...
  2944.   INCLTDL="$LTDLINCL"
  2945. ])# AC_LIBLTDL_CONVENIENCE
  2946.  
  2947.  
  2948. # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
  2949. # -----------------------------------
  2950. # sets LIBLTDL to the link flags for the libltdl installable library and
  2951. # LTDLINCL to the include flags for the libltdl header and adds
  2952. # --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
  2953. # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
  2954. # DIRECTORY is not provided and an installed libltdl is not found, it is
  2955. # assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
  2956. # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
  2957. # quotes!).  If your package is not flat and you're not using automake,
  2958. # define top_builddir and top_srcdir appropriately in the Makefiles.
  2959. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  2960. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  2961. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  2962.   AC_CHECK_LIB(ltdl, lt_dlinit,
  2963.   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  2964.   [if test x"$enable_ltdl_install" = xno; then
  2965.      AC_MSG_WARN([libltdl not installed, but installation disabled])
  2966.    else
  2967.      enable_ltdl_install=yes
  2968.    fi
  2969.   ])
  2970.   if test x"$enable_ltdl_install" = x"yes"; then
  2971.     ac_configure_args="$ac_configure_args --enable-ltdl-install"
  2972.     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  2973.     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  2974.   else
  2975.     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  2976.     LIBLTDL="-lltdl"
  2977.     LTDLINCL=
  2978.   fi
  2979.   # For backwards non-gettext consistent compatibility...
  2980.   INCLTDL="$LTDLINCL"
  2981. ])# AC_LIBLTDL_INSTALLABLE
  2982.  
  2983.  
  2984. # AC_LIBTOOL_CXX
  2985. # --------------
  2986. # enable support for C++ libraries
  2987. AC_DEFUN([AC_LIBTOOL_CXX],
  2988. [AC_REQUIRE([_LT_AC_LANG_CXX])
  2989. ])# AC_LIBTOOL_CXX
  2990.  
  2991.  
  2992. # _LT_AC_LANG_CXX
  2993. # ---------------
  2994. AC_DEFUN([_LT_AC_LANG_CXX],
  2995. [AC_REQUIRE([AC_PROG_CXX])
  2996. AC_REQUIRE([AC_PROG_CXXCPP])
  2997. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
  2998. ])# _LT_AC_LANG_CXX
  2999.  
  3000.  
  3001. # AC_LIBTOOL_F77
  3002. # --------------
  3003. # enable support for Fortran 77 libraries
  3004. AC_DEFUN([AC_LIBTOOL_F77],
  3005. [AC_REQUIRE([_LT_AC_LANG_F77])
  3006. ])# AC_LIBTOOL_F77
  3007.  
  3008.  
  3009. # _LT_AC_LANG_F77
  3010. # ---------------
  3011. AC_DEFUN([_LT_AC_LANG_F77],
  3012. [AC_REQUIRE([AC_PROG_F77])
  3013. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
  3014. ])# _LT_AC_LANG_F77
  3015.  
  3016.  
  3017. # AC_LIBTOOL_GCJ
  3018. # --------------
  3019. # enable support for GCJ libraries
  3020. AC_DEFUN([AC_LIBTOOL_GCJ],
  3021. [AC_REQUIRE([_LT_AC_LANG_GCJ])
  3022. ])# AC_LIBTOOL_GCJ
  3023.  
  3024.  
  3025. # _LT_AC_LANG_GCJ
  3026. # ---------------
  3027. AC_DEFUN([_LT_AC_LANG_GCJ],
  3028. [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
  3029.   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
  3030.     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
  3031.       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
  3032.      [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
  3033.        [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
  3034. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
  3035. ])# _LT_AC_LANG_GCJ
  3036.  
  3037.  
  3038. # AC_LIBTOOL_RC
  3039. # --------------
  3040. # enable support for Windows resource files
  3041. AC_DEFUN([AC_LIBTOOL_RC],
  3042. [AC_REQUIRE([LT_AC_PROG_RC])
  3043. _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
  3044. ])# AC_LIBTOOL_RC
  3045.  
  3046.  
  3047. # AC_LIBTOOL_LANG_C_CONFIG
  3048. # ------------------------
  3049. # Ensure that the configuration vars for the C compiler are
  3050. # suitably defined.  Those variables are subsequently used by
  3051. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3052. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
  3053. AC_DEFUN([_LT_AC_LANG_C_CONFIG],
  3054. [lt_save_CC="$CC"
  3055. AC_LANG_PUSH(C)
  3056.  
  3057. # Source file extension for C test sources.
  3058. ac_ext=c
  3059.  
  3060. # Object file extension for compiled C test sources.
  3061. objext=o
  3062. _LT_AC_TAGVAR(objext, $1)=$objext
  3063.  
  3064. # Code to be used in simple compile tests
  3065. lt_simple_compile_test_code="int some_variable = 0;\n"
  3066.  
  3067. # Code to be used in simple link tests
  3068. lt_simple_link_test_code='int main(){return(0);}\n'
  3069.  
  3070. _LT_AC_SYS_COMPILER
  3071.  
  3072. #
  3073. # Check for any special shared library compilation flags.
  3074. #
  3075. _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
  3076. if test "$GCC" = no; then
  3077.   case $host_os in
  3078.   sco3.2v5*)
  3079.     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
  3080.     ;;
  3081.   esac
  3082. fi
  3083. if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
  3084.   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
  3085.   if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[     ]]" >/dev/null; then :
  3086.   else
  3087.     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
  3088.     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
  3089.   fi
  3090. fi
  3091.  
  3092.  
  3093. #
  3094. # Check to make sure the static flag actually works.
  3095. #
  3096. AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
  3097.   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
  3098.   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
  3099.   [],
  3100.   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
  3101.  
  3102.  
  3103. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  3104. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  3105. AC_LIBTOOL_PROG_CC_C_O($1)
  3106. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  3107. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  3108. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  3109. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  3110. AC_LIBTOOL_SYS_LIB_STRIP
  3111. AC_LIBTOOL_DLOPEN_SELF($1)
  3112.  
  3113. # Report which librarie types wil actually be built
  3114. AC_MSG_CHECKING([if libtool supports shared libraries])
  3115. AC_MSG_RESULT([$can_build_shared])
  3116.  
  3117. AC_MSG_CHECKING([whether to build shared libraries])
  3118. test "$can_build_shared" = "no" && enable_shared=no
  3119.  
  3120. # On AIX, shared libraries and static libraries use the same namespace, and
  3121. # are all built from PIC.
  3122. case "$host_os" in
  3123. aix3*)
  3124.   test "$enable_shared" = yes && enable_static=no
  3125.   if test -n "$RANLIB"; then
  3126.     archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3127.     postinstall_cmds='$RANLIB $lib'
  3128.   fi
  3129.   ;;
  3130.  
  3131. aix4* | aix5*)
  3132.   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3133.     test "$enable_shared" = yes && enable_static=no
  3134.   fi
  3135.   ;;
  3136.   darwin* | rhapsody*)
  3137.   if test "$GCC" = yes; then
  3138.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3139.     case "$host_os" in
  3140.     rhapsody* | darwin1.[[012]])
  3141.       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  3142.       ;;
  3143.     *) # Darwin 1.3 on
  3144.       if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  3145.           _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  3146.       else
  3147.         case ${MACOSX_DEPLOYMENT_TARGET} in
  3148.           10.[[012]])
  3149.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  3150.             ;;
  3151.           10.*)
  3152.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  3153.             ;;
  3154.         esac
  3155.       fi
  3156.       ;;
  3157.     esac
  3158.     output_verbose_link_cmd='echo'
  3159.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
  3160.     _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  3161.     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  3162.     _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}'
  3163.     _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  3164.     _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3165.     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  3166.     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3167.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  3168.     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3169.   else
  3170.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3171.   fi
  3172.     ;;
  3173. esac
  3174. AC_MSG_RESULT([$enable_shared])
  3175.  
  3176. AC_MSG_CHECKING([whether to build static libraries])
  3177. # Make sure either enable_shared or enable_static is yes.
  3178. test "$enable_shared" = yes || enable_static=yes
  3179. AC_MSG_RESULT([$enable_static])
  3180.  
  3181. AC_LIBTOOL_CONFIG($1)
  3182.  
  3183. AC_LANG_POP
  3184. CC="$lt_save_CC"
  3185. ])# AC_LIBTOOL_LANG_C_CONFIG
  3186.  
  3187.  
  3188. # AC_LIBTOOL_LANG_CXX_CONFIG
  3189. # --------------------------
  3190. # Ensure that the configuration vars for the C compiler are
  3191. # suitably defined.  Those variables are subsequently used by
  3192. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  3193. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
  3194. AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
  3195. [AC_LANG_PUSH(C++)
  3196. AC_REQUIRE([AC_PROG_CXX])
  3197. AC_REQUIRE([AC_PROG_CXXCPP])
  3198.  
  3199. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3200. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  3201. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3202. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  3203. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  3204. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3205. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  3206. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  3207. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3208. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  3209. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  3210. _LT_AC_TAGVAR(module_cmds, $1)=
  3211. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  3212. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  3213. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  3214. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  3215. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3216. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  3217.  
  3218. # Dependencies to place before and after the object being linked:
  3219. _LT_AC_TAGVAR(predep_objects, $1)=
  3220. _LT_AC_TAGVAR(postdep_objects, $1)=
  3221. _LT_AC_TAGVAR(predeps, $1)=
  3222. _LT_AC_TAGVAR(postdeps, $1)=
  3223. _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
  3224.  
  3225. # Source file extension for C++ test sources.
  3226. ac_ext=cc
  3227.  
  3228. # Object file extension for compiled C++ test sources.
  3229. objext=o
  3230. _LT_AC_TAGVAR(objext, $1)=$objext
  3231.  
  3232. # Code to be used in simple compile tests
  3233. lt_simple_compile_test_code="int some_variable = 0;\n"
  3234.  
  3235. # Code to be used in simple link tests
  3236. lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
  3237.  
  3238. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  3239. _LT_AC_SYS_COMPILER
  3240.  
  3241. # Allow CC to be a program name with arguments.
  3242. lt_save_CC=$CC
  3243. lt_save_LD=$LD
  3244. lt_save_GCC=$GCC
  3245. GCC=$GXX
  3246. lt_save_with_gnu_ld=$with_gnu_ld
  3247. lt_save_path_LD=$lt_cv_path_LD
  3248. if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
  3249.   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
  3250. else
  3251.   unset lt_cv_prog_gnu_ld
  3252. fi
  3253. if test -n "${lt_cv_path_LDCXX+set}"; then
  3254.   lt_cv_path_LD=$lt_cv_path_LDCXX
  3255. else
  3256.   unset lt_cv_path_LD
  3257. fi
  3258. test -z "${LDCXX+set}" || LD=$LDCXX
  3259. CC=${CXX-"c++"}
  3260. compiler=$CC
  3261. _LT_AC_TAGVAR(compiler, $1)=$CC
  3262. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  3263.  
  3264. # We don't want -fno-exception wen compiling C++ code, so set the
  3265. # no_builtin_flag separately
  3266. if test "$GXX" = yes; then
  3267.   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  3268. else
  3269.   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  3270. fi
  3271.  
  3272. if test "$GXX" = yes; then
  3273.   # Set up default GNU C++ configuration
  3274.  
  3275.   AC_PROG_LD
  3276.  
  3277.   # Check if GNU C++ uses GNU ld as the underlying linker, since the
  3278.   # archiving commands below assume that GNU ld is being used.
  3279.   if test "$with_gnu_ld" = yes; then
  3280.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3281.     _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'
  3282.  
  3283.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  3284.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3285.  
  3286.     # If archive_cmds runs LD, not CC, wlarc should be empty
  3287.     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
  3288.     #     investigate it a little bit more. (MM)
  3289.     wlarc='${wl}'
  3290.  
  3291.     # ancient GNU ld didn't support --whole-archive et. al.
  3292.     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
  3293.     grep 'no-whole-archive' > /dev/null; then
  3294.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  3295.     else
  3296.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  3297.     fi
  3298.   else
  3299.     with_gnu_ld=no
  3300.     wlarc=
  3301.  
  3302.     # A generic and very simple default shared library creation
  3303.     # command for GNU C++ for the case where it uses the native
  3304.     # linker, instead of GNU ld.  If possible, this setting should
  3305.     # overridden to take advantage of the native linker features on
  3306.     # the platform it is being used on.
  3307.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
  3308.   fi
  3309.  
  3310.   # Commands to make compiler produce verbose output that lists
  3311.   # what "hidden" libraries, object files and flags are used when
  3312.   # linking a shared library.
  3313.   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3314.  
  3315. else
  3316.   GXX=no
  3317.   with_gnu_ld=no
  3318.   wlarc=
  3319. fi
  3320.  
  3321. # PORTME: fill in a description of your system's C++ link characteristics
  3322. AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  3323. _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  3324. case $host_os in
  3325.   aix3*)
  3326.     # FIXME: insert proper C++ library support
  3327.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3328.     ;;
  3329.   aix4* | aix5*)
  3330.     if test "$host_cpu" = ia64; then
  3331.       # On IA64, the linker does run time linking by default, so we don't
  3332.       # have to do anything special.
  3333.       aix_use_runtimelinking=no
  3334.       exp_sym_flag='-Bexport'
  3335.       no_entry_flag=""
  3336.     else
  3337.       aix_use_runtimelinking=no
  3338.  
  3339.       # Test if we are trying to use run time linking or normal
  3340.       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  3341.       # need to do runtime linking.
  3342.       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  3343.     for ld_flag in $LDFLAGS; do
  3344.       case $ld_flag in
  3345.       *-brtl*)
  3346.         aix_use_runtimelinking=yes
  3347.         break
  3348.         ;;
  3349.       esac
  3350.     done
  3351.       esac
  3352.  
  3353.       exp_sym_flag='-bexport'
  3354.       no_entry_flag='-bnoentry'
  3355.     fi
  3356.  
  3357.     # When large executables or shared objects are built, AIX ld can
  3358.     # have problems creating the table of contents.  If linking a library
  3359.     # or program results in "error TOC overflow" add -mminimal-toc to
  3360.     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  3361.     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  3362.  
  3363.     _LT_AC_TAGVAR(archive_cmds, $1)=''
  3364.     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3365.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  3366.     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3367.  
  3368.     if test "$GXX" = yes; then
  3369.       case $host_os in aix4.[012]|aix4.[012].*)
  3370.       # We only want to do this on AIX 4.2 and lower, the check
  3371.       # below for broken collect2 doesn't work under 4.3+
  3372.     collect2name=`${CC} -print-prog-name=collect2`
  3373.     if test -f "$collect2name" && \
  3374.        strings "$collect2name" | grep resolve_lib_name >/dev/null
  3375.     then
  3376.       # We have reworked collect2
  3377.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3378.     else
  3379.       # We have old collect2
  3380.       _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  3381.       # It fails to find uninstalled libraries when the uninstalled
  3382.       # path is not listed in the libpath.  Setting hardcode_minus_L
  3383.       # to unsupported forces relinking
  3384.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  3385.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3386.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  3387.     fi
  3388.       esac
  3389.       shared_flag='-shared'
  3390.     else
  3391.       # not using gcc
  3392.       if test "$host_cpu" = ia64; then
  3393.     # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  3394.     # chokes on -Wl,-G. The following line is correct:
  3395.     shared_flag='-G'
  3396.       else
  3397.     if test "$aix_use_runtimelinking" = yes; then
  3398.       shared_flag='${wl}-G'
  3399.     else
  3400.       shared_flag='${wl}-bM:SRE'
  3401.     fi
  3402.       fi
  3403.     fi
  3404.  
  3405.     # It seems that -bexpall does not export symbols beginning with
  3406.     # underscore (_), so it is better to generate a list of symbols to export.
  3407.     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  3408.     if test "$aix_use_runtimelinking" = yes; then
  3409.       # Warning - without using the other runtime loading flags (-brtl),
  3410.       # -berok will link without error, but may produce a broken library.
  3411.       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  3412.       # Determine the default libpath from the value encoded in an empty executable.
  3413.       _LT_AC_SYS_LIBPATH_AIX
  3414.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  3415.  
  3416.       _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"
  3417.      else
  3418.       if test "$host_cpu" = ia64; then
  3419.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  3420.     _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  3421.     _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"
  3422.       else
  3423.     # Determine the default libpath from the value encoded in an empty executable.
  3424.     _LT_AC_SYS_LIBPATH_AIX
  3425.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  3426.     # Warning - without using the other run time loading flags,
  3427.     # -berok will link without error, but may produce a broken library.
  3428.     _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  3429.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  3430.     # -bexpall does not export symbols beginning with underscore (_)
  3431.     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  3432.     # Exported symbols can be pulled into shared objects from archives
  3433.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  3434.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  3435.     # This is similar to how AIX traditionally builds it's shared libraries.
  3436.     _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'
  3437.       fi
  3438.     fi
  3439.     ;;
  3440.   chorus*)
  3441.     case $cc_basename in
  3442.       *)
  3443.     # FIXME: insert proper C++ library support
  3444.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3445.     ;;
  3446.     esac
  3447.     ;;
  3448.  
  3449.   cygwin* | mingw* | pw32*)
  3450.     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  3451.     # as there is no search path for DLLs.
  3452.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3453.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  3454.     _LT_AC_TAGVAR(always_export_symbols, $1)=no
  3455.     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  3456.  
  3457.     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  3458.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  3459.       # If the export-symbols file already is a .def file (1st line
  3460.       # is EXPORTS), use it as is; otherwise, prepend...
  3461.       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  3462.     cp $export_symbols $output_objdir/$soname.def;
  3463.       else
  3464.     echo EXPORTS > $output_objdir/$soname.def;
  3465.     cat $export_symbols >> $output_objdir/$soname.def;
  3466.       fi~
  3467.       $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  3468.     else
  3469.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3470.     fi
  3471.   ;;
  3472.  
  3473.   darwin* | rhapsody*)
  3474.   if test "$GXX" = yes; then
  3475.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3476.     case "$host_os" in
  3477.     rhapsody* | darwin1.[[012]])
  3478.       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  3479.       ;;
  3480.     *) # Darwin 1.3 on
  3481.       if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  3482.           _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  3483.       else
  3484.         case ${MACOSX_DEPLOYMENT_TARGET} in
  3485.           10.[[012]])
  3486.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  3487.             ;;
  3488.           10.*)
  3489.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  3490.             ;;
  3491.         esac
  3492.       fi
  3493.       ;;
  3494.     esac
  3495.     lt_int_apple_cc_single_mod=no
  3496.     output_verbose_link_cmd='echo'
  3497.     if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  3498.       lt_int_apple_cc_single_mod=yes
  3499.     fi
  3500.     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  3501.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  3502.     else
  3503.       _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'
  3504.     fi
  3505.     _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  3506.  
  3507.     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  3508.     if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  3509.       _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}'
  3510.     else
  3511.       _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}'
  3512.     fi
  3513.     _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  3514.     _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3515.     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  3516.     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  3517.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  3518.     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3519.   else
  3520.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3521.   fi
  3522.     ;;
  3523.  
  3524.   dgux*)
  3525.     case $cc_basename in
  3526.       ec++)
  3527.     # FIXME: insert proper C++ library support
  3528.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3529.     ;;
  3530.       ghcx)
  3531.     # Green Hills C++ Compiler
  3532.     # FIXME: insert proper C++ library support
  3533.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3534.     ;;
  3535.       *)
  3536.     # FIXME: insert proper C++ library support
  3537.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3538.     ;;
  3539.     esac
  3540.     ;;
  3541.   freebsd[12]*)
  3542.     # C++ shared libraries reported to be fairly broken before switch to ELF
  3543.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3544.     ;;
  3545.   freebsd-elf*)
  3546.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3547.     ;;
  3548.   freebsd* | kfreebsd*-gnu)
  3549.     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
  3550.     # conventions
  3551.     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  3552.     ;;
  3553.   gnu*)
  3554.     ;;
  3555.   hpux9*)
  3556.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  3557.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3558.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3559.     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3560.     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  3561.                 # but as the default
  3562.                 # location of the library.
  3563.  
  3564.     case $cc_basename in
  3565.     CC)
  3566.       # FIXME: insert proper C++ library support
  3567.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3568.       ;;
  3569.     aCC)
  3570.       _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'
  3571.       # Commands to make compiler produce verbose output that lists
  3572.       # what "hidden" libraries, object files and flags are used when
  3573.       # linking a shared library.
  3574.       #
  3575.       # There doesn't appear to be a way to prevent this compiler from
  3576.       # explicitly linking system object files so we need to strip them
  3577.       # from the output so that they don't get included in the library
  3578.       # dependencies.
  3579.       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'
  3580.       ;;
  3581.     *)
  3582.       if test "$GXX" = yes; then
  3583.         _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'
  3584.       else
  3585.         # FIXME: insert proper C++ library support
  3586.         _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3587.       fi
  3588.       ;;
  3589.     esac
  3590.     ;;
  3591.   hpux10*|hpux11*)
  3592.     if test $with_gnu_ld = no; then
  3593.       case "$host_cpu" in
  3594.       hppa*64*)
  3595.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  3596.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  3597.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3598.         ;;
  3599.       ia64*)
  3600.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  3601.         ;;
  3602.       *)
  3603.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  3604.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3605.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  3606.         ;;
  3607.       esac
  3608.     fi
  3609.     case "$host_cpu" in
  3610.     hppa*64*)
  3611.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3612.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3613.       ;;
  3614.     ia64*)
  3615.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  3616.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3617.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  3618.                           # but as the default
  3619.                           # location of the library.
  3620.       ;;
  3621.     *)
  3622.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3623.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
  3624.                           # but as the default
  3625.                           # location of the library.
  3626.       ;;
  3627.     esac
  3628.  
  3629.     case $cc_basename in
  3630.       CC)
  3631.     # FIXME: insert proper C++ library support
  3632.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3633.     ;;
  3634.       aCC)
  3635.     case "$host_cpu" in
  3636.     hppa*64*|ia64*)
  3637.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  3638.       ;;
  3639.     *)
  3640.       _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'
  3641.       ;;
  3642.     esac
  3643.     # Commands to make compiler produce verbose output that lists
  3644.     # what "hidden" libraries, object files and flags are used when
  3645.     # linking a shared library.
  3646.     #
  3647.     # There doesn't appear to be a way to prevent this compiler from
  3648.     # explicitly linking system object files so we need to strip them
  3649.     # from the output so that they don't get included in the library
  3650.     # dependencies.
  3651.     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'
  3652.     ;;
  3653.       *)
  3654.     if test "$GXX" = yes; then
  3655.       if test $with_gnu_ld = no; then
  3656.         case "$host_cpu" in
  3657.         ia64*|hppa*64*)
  3658.           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
  3659.           ;;
  3660.         *)
  3661.           _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'
  3662.           ;;
  3663.         esac
  3664.       fi
  3665.     else
  3666.       # FIXME: insert proper C++ library support
  3667.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3668.     fi
  3669.     ;;
  3670.     esac
  3671.     ;;
  3672.   irix5* | irix6*)
  3673.     case $cc_basename in
  3674.       CC)
  3675.     # SGI C++
  3676.     _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'
  3677.  
  3678.     # Archives containing C++ object files must be created using
  3679.     # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
  3680.     # necessary to make sure instantiated templates are included
  3681.     # in the archive.
  3682.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
  3683.     ;;
  3684.       *)
  3685.     if test "$GXX" = yes; then
  3686.       if test "$with_gnu_ld" = no; then
  3687.         _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'
  3688.       else
  3689.         _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'
  3690.       fi
  3691.     fi
  3692.     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3693.     ;;
  3694.     esac
  3695.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3696.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3697.     ;;
  3698.   linux*)
  3699.     case $cc_basename in
  3700.       KCC)
  3701.     # Kuck and Associates, Inc. (KAI) C++ Compiler
  3702.  
  3703.     # KCC will only create a shared library if the output file
  3704.     # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3705.     # to its proper name (with version) after linking.
  3706.     _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'
  3707.     _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'
  3708.     # Commands to make compiler produce verbose output that lists
  3709.     # what "hidden" libraries, object files and flags are used when
  3710.     # linking a shared library.
  3711.     #
  3712.     # There doesn't appear to be a way to prevent this compiler from
  3713.     # explicitly linking system object files so we need to strip them
  3714.     # from the output so that they don't get included in the library
  3715.     # dependencies.
  3716.     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'
  3717.  
  3718.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
  3719.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3720.  
  3721.     # Archives containing C++ object files must be created using
  3722.     # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3723.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3724.     ;;
  3725.       icpc)
  3726.     # Intel C++
  3727.     with_gnu_ld=yes
  3728.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3729.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3730.     _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'
  3731.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3732.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  3733.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
  3734.     ;;
  3735.       cxx)
  3736.     # Compaq C++
  3737.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
  3738.     _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'
  3739.  
  3740.     runpath_var=LD_RUN_PATH
  3741.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3742.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3743.  
  3744.     # Commands to make compiler produce verbose output that lists
  3745.     # what "hidden" libraries, object files and flags are used when
  3746.     # linking a shared library.
  3747.     #
  3748.     # There doesn't appear to be a way to prevent this compiler from
  3749.     # explicitly linking system object files so we need to strip them
  3750.     # from the output so that they don't get included in the library
  3751.     # dependencies.
  3752.     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'
  3753.     ;;
  3754.     esac
  3755.     ;;
  3756.   lynxos*)
  3757.     # FIXME: insert proper C++ library support
  3758.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3759.     ;;
  3760.   m88k*)
  3761.     # FIXME: insert proper C++ library support
  3762.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3763.     ;;
  3764.   mvs*)
  3765.     case $cc_basename in
  3766.       cxx)
  3767.     # FIXME: insert proper C++ library support
  3768.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3769.     ;;
  3770.       *)
  3771.     # FIXME: insert proper C++ library support
  3772.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3773.     ;;
  3774.     esac
  3775.     ;;
  3776.   netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
  3777.     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  3778.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
  3779.       wlarc=
  3780.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3781.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  3782.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3783.     fi
  3784.     # Workaround some broken pre-1.5 toolchains
  3785.     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
  3786.     ;;
  3787.   osf3*)
  3788.     case $cc_basename in
  3789.       KCC)
  3790.     # Kuck and Associates, Inc. (KAI) C++ Compiler
  3791.  
  3792.     # KCC will only create a shared library if the output file
  3793.     # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3794.     # to its proper name (with version) after linking.
  3795.     _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'
  3796.  
  3797.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3798.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3799.  
  3800.     # Archives containing C++ object files must be created using
  3801.     # "CC -Bstatic", where "CC" is the KAI C++ compiler.
  3802.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
  3803.  
  3804.     ;;
  3805.       RCC)
  3806.     # Rational C++ 2.4.1
  3807.     # FIXME: insert proper C++ library support
  3808.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3809.     ;;
  3810.       cxx)
  3811.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3812.     _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'
  3813.  
  3814.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3815.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3816.  
  3817.     # Commands to make compiler produce verbose output that lists
  3818.     # what "hidden" libraries, object files and flags are used when
  3819.     # linking a shared library.
  3820.     #
  3821.     # There doesn't appear to be a way to prevent this compiler from
  3822.     # explicitly linking system object files so we need to strip them
  3823.     # from the output so that they don't get included in the library
  3824.     # dependencies.
  3825.     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'
  3826.     ;;
  3827.       *)
  3828.     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3829.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3830.       _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'
  3831.  
  3832.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3833.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3834.  
  3835.       # Commands to make compiler produce verbose output that lists
  3836.       # what "hidden" libraries, object files and flags are used when
  3837.       # linking a shared library.
  3838.       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3839.  
  3840.     else
  3841.       # FIXME: insert proper C++ library support
  3842.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3843.     fi
  3844.     ;;
  3845.     esac
  3846.     ;;
  3847.   osf4* | osf5*)
  3848.     case $cc_basename in
  3849.       KCC)
  3850.     # Kuck and Associates, Inc. (KAI) C++ Compiler
  3851.  
  3852.     # KCC will only create a shared library if the output file
  3853.     # ends with ".so" (or ".sl" for HP-UX), so rename the library
  3854.     # to its proper name (with version) after linking.
  3855.     _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'
  3856.  
  3857.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  3858.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3859.  
  3860.     # Archives containing C++ object files must be created using
  3861.     # the KAI C++ compiler.
  3862.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
  3863.     ;;
  3864.       RCC)
  3865.     # Rational C++ 2.4.1
  3866.     # FIXME: insert proper C++ library support
  3867.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3868.     ;;
  3869.       cxx)
  3870.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  3871.     _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'
  3872.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
  3873.       echo "-hidden">> $lib.exp~
  3874.       $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~
  3875.       $rm $lib.exp'
  3876.  
  3877.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  3878.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3879.  
  3880.     # Commands to make compiler produce verbose output that lists
  3881.     # what "hidden" libraries, object files and flags are used when
  3882.     # linking a shared library.
  3883.     #
  3884.     # There doesn't appear to be a way to prevent this compiler from
  3885.     # explicitly linking system object files so we need to strip them
  3886.     # from the output so that they don't get included in the library
  3887.     # dependencies.
  3888.     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'
  3889.     ;;
  3890.       *)
  3891.     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3892.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  3893.      _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'
  3894.  
  3895.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  3896.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  3897.  
  3898.       # Commands to make compiler produce verbose output that lists
  3899.       # what "hidden" libraries, object files and flags are used when
  3900.       # linking a shared library.
  3901.       output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
  3902.  
  3903.     else
  3904.       # FIXME: insert proper C++ library support
  3905.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3906.     fi
  3907.     ;;
  3908.     esac
  3909.     ;;
  3910.   psos*)
  3911.     # FIXME: insert proper C++ library support
  3912.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3913.     ;;
  3914.   sco*)
  3915.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  3916.     case $cc_basename in
  3917.       CC)
  3918.     # FIXME: insert proper C++ library support
  3919.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3920.     ;;
  3921.       *)
  3922.     # FIXME: insert proper C++ library support
  3923.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3924.     ;;
  3925.     esac
  3926.     ;;
  3927.   sunos4*)
  3928.     case $cc_basename in
  3929.       CC)
  3930.     # Sun C++ 4.x
  3931.     # FIXME: insert proper C++ library support
  3932.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3933.     ;;
  3934.       lcc)
  3935.     # Lucid
  3936.     # FIXME: insert proper C++ library support
  3937.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3938.     ;;
  3939.       *)
  3940.     # FIXME: insert proper C++ library support
  3941.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  3942.     ;;
  3943.     esac
  3944.     ;;
  3945.   solaris*)
  3946.     case $cc_basename in
  3947.       CC)
  3948.     # Sun C++ 4.2, 5.x and Centerline C++
  3949.     _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
  3950.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
  3951.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3952.     $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'
  3953.  
  3954.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  3955.     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  3956.     case $host_os in
  3957.       solaris2.[0-5] | solaris2.[0-5].*) ;;
  3958.       *)
  3959.         # The C++ compiler is used as linker so we must use $wl
  3960.         # flag to pass the commands to the underlying system
  3961.         # linker.
  3962.         # Supported since Solaris 2.6 (maybe 2.5.1?)
  3963.         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
  3964.         ;;
  3965.     esac
  3966.     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  3967.  
  3968.     # Commands to make compiler produce verbose output that lists
  3969.     # what "hidden" libraries, object files and flags are used when
  3970.     # linking a shared library.
  3971.     #
  3972.     # There doesn't appear to be a way to prevent this compiler from
  3973.     # explicitly linking system object files so we need to strip them
  3974.     # from the output so that they don't get included in the library
  3975.     # dependencies.
  3976.     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'
  3977.  
  3978.     # Archives containing C++ object files must be created using
  3979.     # "CC -xar", where "CC" is the Sun C++ compiler.  This is
  3980.     # necessary to make sure instantiated templates are included
  3981.     # in the archive.
  3982.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
  3983.     ;;
  3984.       gcx)
  3985.     # Green Hills C++ Compiler
  3986.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3987.  
  3988.     # The C++ compiler must be used to create the archive.
  3989.     _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
  3990.     ;;
  3991.       *)
  3992.     # GNU C++ compiler with Solaris linker
  3993.     if test "$GXX" = yes && test "$with_gnu_ld" = no; then
  3994.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
  3995.       if $CC --version | grep -v '^2\.7' > /dev/null; then
  3996.         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  3997.         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  3998.         $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  3999.  
  4000.         # Commands to make compiler produce verbose output that lists
  4001.         # what "hidden" libraries, object files and flags are used when
  4002.         # linking a shared library.
  4003.         output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  4004.       else
  4005.         # g++ 2.7 appears to require `-G' NOT `-shared' on this
  4006.         # platform.
  4007.         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
  4008.         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  4009.         $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
  4010.  
  4011.         # Commands to make compiler produce verbose output that lists
  4012.         # what "hidden" libraries, object files and flags are used when
  4013.         # linking a shared library.
  4014.         output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
  4015.       fi
  4016.  
  4017.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
  4018.     fi
  4019.     ;;
  4020.     esac
  4021.     ;;
  4022.   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
  4023.     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  4024.     ;;
  4025.   tandem*)
  4026.     case $cc_basename in
  4027.       NCC)
  4028.     # NonStop-UX NCC 3.20
  4029.     # FIXME: insert proper C++ library support
  4030.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4031.     ;;
  4032.       *)
  4033.     # FIXME: insert proper C++ library support
  4034.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4035.     ;;
  4036.     esac
  4037.     ;;
  4038.   vxworks*)
  4039.     # FIXME: insert proper C++ library support
  4040.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4041.     ;;
  4042.   *)
  4043.     # FIXME: insert proper C++ library support
  4044.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  4045.     ;;
  4046. esac
  4047. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  4048. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  4049.  
  4050. _LT_AC_TAGVAR(GCC, $1)="$GXX"
  4051. _LT_AC_TAGVAR(LD, $1)="$LD"
  4052.  
  4053. AC_LIBTOOL_POSTDEP_PREDEP($1)
  4054. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  4055. AC_LIBTOOL_PROG_CC_C_O($1)
  4056. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  4057. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  4058. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  4059. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  4060. AC_LIBTOOL_SYS_LIB_STRIP
  4061. AC_LIBTOOL_DLOPEN_SELF($1)
  4062.  
  4063. AC_LIBTOOL_CONFIG($1)
  4064.  
  4065. AC_LANG_POP
  4066. CC=$lt_save_CC
  4067. LDCXX=$LD
  4068. LD=$lt_save_LD
  4069. GCC=$lt_save_GCC
  4070. with_gnu_ldcxx=$with_gnu_ld
  4071. with_gnu_ld=$lt_save_with_gnu_ld
  4072. lt_cv_path_LDCXX=$lt_cv_path_LD
  4073. lt_cv_path_LD=$lt_save_path_LD
  4074. lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
  4075. lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
  4076. ])# AC_LIBTOOL_LANG_CXX_CONFIG
  4077.  
  4078. # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
  4079. # ------------------------
  4080. # Figure out "hidden" library dependencies from verbose
  4081. # compiler output when linking a shared library.
  4082. # Parse the compiler output and extract the necessary
  4083. # objects, libraries and library flags.
  4084. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
  4085. dnl we can't use the lt_simple_compile_test_code here,
  4086. dnl because it contains code intended for an executable,
  4087. dnl not a library.  It's possible we should let each
  4088. dnl tag define a new lt_????_link_test_code variable,
  4089. dnl but it's only used here...
  4090. ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
  4091. int a;
  4092. void foo (void) { a = 0; }
  4093. EOF
  4094. ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
  4095. class Foo
  4096. {
  4097. public:
  4098.   Foo (void) { a = 0; }
  4099. private:
  4100.   int a;
  4101. };
  4102. EOF
  4103. ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
  4104.       subroutine foo
  4105.       implicit none
  4106.       integer*4 a
  4107.       a=0
  4108.       return
  4109.       end
  4110. EOF
  4111. ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
  4112. public class foo {
  4113.   private int a;
  4114.   public void bar (void) {
  4115.     a = 0;
  4116.   }
  4117. };
  4118. EOF
  4119. ])
  4120. dnl Parse the compiler output and extract the necessary
  4121. dnl objects, libraries and library flags.
  4122. if AC_TRY_EVAL(ac_compile); then
  4123.   # Parse the compiler output and extract the necessary
  4124.   # objects, libraries and library flags.
  4125.  
  4126.   # Sentinel used to keep track of whether or not we are before
  4127.   # the conftest object file.
  4128.   pre_test_object_deps_done=no
  4129.  
  4130.   # The `*' in the case matches for architectures that use `case' in
  4131.   # $output_verbose_cmd can trigger glob expansion during the loop
  4132.   # eval without this substitution.
  4133.   output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
  4134.  
  4135.   for p in `eval $output_verbose_link_cmd`; do
  4136.     case $p in
  4137.  
  4138.     -L* | -R* | -l*)
  4139.        # Some compilers place space between "-{L,R}" and the path.
  4140.        # Remove the space.
  4141.        if test $p = "-L" \
  4142.       || test $p = "-R"; then
  4143.      prev=$p
  4144.      continue
  4145.        else
  4146.      prev=
  4147.        fi
  4148.  
  4149.        if test "$pre_test_object_deps_done" = no; then
  4150.      case $p in
  4151.      -L* | -R*)
  4152.        # Internal compiler library paths should come after those
  4153.        # provided the user.  The postdeps already come after the
  4154.        # user supplied libs so there is no need to process them.
  4155.        if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
  4156.          _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
  4157.        else
  4158.          _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
  4159.        fi
  4160.        ;;
  4161.      # The "-l" case would never come before the object being
  4162.      # linked, so don't bother handling this case.
  4163.      esac
  4164.        else
  4165.      if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
  4166.        _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
  4167.      else
  4168.        _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
  4169.      fi
  4170.        fi
  4171.        ;;
  4172.  
  4173.     *.$objext)
  4174.        # This assumes that the test object file only shows up
  4175.        # once in the compiler output.
  4176.        if test "$p" = "conftest.$objext"; then
  4177.      pre_test_object_deps_done=yes
  4178.      continue
  4179.        fi
  4180.  
  4181.        if test "$pre_test_object_deps_done" = no; then
  4182.      if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
  4183.        _LT_AC_TAGVAR(predep_objects, $1)="$p"
  4184.      else
  4185.        _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
  4186.      fi
  4187.        else
  4188.      if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
  4189.        _LT_AC_TAGVAR(postdep_objects, $1)="$p"
  4190.      else
  4191.        _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
  4192.      fi
  4193.        fi
  4194.        ;;
  4195.  
  4196.     *) ;; # Ignore the rest.
  4197.  
  4198.     esac
  4199.   done
  4200.  
  4201.   # Clean up.
  4202.   rm -f a.out a.exe
  4203. else
  4204.   echo "libtool.m4: error: problem compiling $1 test program"
  4205. fi
  4206.  
  4207. $rm -f confest.$objext
  4208.  
  4209. case " $_LT_AC_TAGVAR(postdeps, $1) " in
  4210. *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
  4211. esac
  4212. ])# AC_LIBTOOL_POSTDEP_PREDEP
  4213.  
  4214. # AC_LIBTOOL_LANG_F77_CONFIG
  4215. # ------------------------
  4216. # Ensure that the configuration vars for the C compiler are
  4217. # suitably defined.  Those variables are subsequently used by
  4218. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  4219. AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
  4220. AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
  4221. [AC_REQUIRE([AC_PROG_F77])
  4222. AC_LANG_PUSH(Fortran 77)
  4223.  
  4224. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  4225. _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  4226. _LT_AC_TAGVAR(always_export_symbols, $1)=no
  4227. _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  4228. _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  4229. _LT_AC_TAGVAR(hardcode_direct, $1)=no
  4230. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  4231. _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  4232. _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  4233. _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  4234. _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  4235. _LT_AC_TAGVAR(module_cmds, $1)=
  4236. _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  4237. _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  4238. _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
  4239. _LT_AC_TAGVAR(no_undefined_flag, $1)=
  4240. _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  4241. _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  4242.  
  4243. # Source file extension for f77 test sources.
  4244. ac_ext=f
  4245.  
  4246. # Object file extension for compiled f77 test sources.
  4247. objext=o
  4248. _LT_AC_TAGVAR(objext, $1)=$objext
  4249.  
  4250. # Code to be used in simple compile tests
  4251. lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
  4252.  
  4253. # Code to be used in simple link tests
  4254. lt_simple_link_test_code="      program t\n      end\n"
  4255.  
  4256. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  4257. _LT_AC_SYS_COMPILER
  4258.  
  4259. # Allow CC to be a program name with arguments.
  4260. lt_save_CC="$CC"
  4261. CC=${F77-"f77"}
  4262. compiler=$CC
  4263. _LT_AC_TAGVAR(compiler, $1)=$CC
  4264. cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
  4265.  
  4266. AC_MSG_CHECKING([if libtool supports shared libraries])
  4267. AC_MSG_RESULT([$can_build_shared])
  4268.  
  4269. AC_MSG_CHECKING([whether to build shared libraries])
  4270. test "$can_build_shared" = "no" && enable_shared=no
  4271.  
  4272. # On AIX, shared libraries and static libraries use the same namespace, and
  4273. # are all built from PIC.
  4274. case "$host_os" in
  4275. aix3*)
  4276.   test "$enable_shared" = yes && enable_static=no
  4277.   if test -n "$RANLIB"; then
  4278.     archive_cmds="$archive_cmds~\$RANLIB \$lib"
  4279.     postinstall_cmds='$RANLIB $lib'
  4280.   fi
  4281.   ;;
  4282. aix4* | aix5*)
  4283.   test "$enable_shared" = yes && enable_static=no
  4284.   ;;
  4285. esac
  4286. AC_MSG_RESULT([$enable_shared])
  4287.  
  4288. AC_MSG_CHECKING([whether to build static libraries])
  4289. # Make sure either enable_shared or enable_static is yes.
  4290. test "$enable_shared" = yes || enable_static=yes
  4291. AC_MSG_RESULT([$enable_static])
  4292.  
  4293. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  4294.  
  4295. _LT_AC_TAGVAR(GCC, $1)="$G77"
  4296. _LT_AC_TAGVAR(LD, $1)="$LD"
  4297.  
  4298. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  4299. AC_LIBTOOL_PROG_CC_C_O($1)
  4300. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  4301. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  4302. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  4303. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  4304. AC_LIBTOOL_SYS_LIB_STRIP
  4305.  
  4306.  
  4307. AC_LIBTOOL_CONFIG($1)
  4308.  
  4309. AC_LANG_POP
  4310. CC="$lt_save_CC"
  4311. ])# AC_LIBTOOL_LANG_F77_CONFIG
  4312.  
  4313.  
  4314. # AC_LIBTOOL_LANG_GCJ_CONFIG
  4315. # --------------------------
  4316. # Ensure that the configuration vars for the C compiler are
  4317. # suitably defined.  Those variables are subsequently used by
  4318. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  4319. AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
  4320. AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
  4321. [AC_LANG_SAVE
  4322.  
  4323. # Source file extension for Java test sources.
  4324. ac_ext=java
  4325.  
  4326. # Object file extension for compiled Java test sources.
  4327. objext=o
  4328. _LT_AC_TAGVAR(objext, $1)=$objext
  4329.  
  4330. # Code to be used in simple compile tests
  4331. lt_simple_compile_test_code="class foo {}\n"
  4332.  
  4333. # Code to be used in simple link tests
  4334. lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
  4335.  
  4336. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  4337. _LT_AC_SYS_COMPILER
  4338.  
  4339. # Allow CC to be a program name with arguments.
  4340. lt_save_CC="$CC"
  4341. CC=${GCJ-"gcj"}
  4342. compiler=$CC
  4343. _LT_AC_TAGVAR(compiler, $1)=$CC
  4344.  
  4345. # GCJ did not exist at the time GCC didn't implicitly link libc in.
  4346. _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  4347.  
  4348. AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
  4349. AC_LIBTOOL_PROG_COMPILER_PIC($1)
  4350. AC_LIBTOOL_PROG_CC_C_O($1)
  4351. AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
  4352. AC_LIBTOOL_PROG_LD_SHLIBS($1)
  4353. AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
  4354. AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
  4355. AC_LIBTOOL_SYS_LIB_STRIP
  4356. AC_LIBTOOL_DLOPEN_SELF($1)
  4357.  
  4358. AC_LIBTOOL_CONFIG($1)
  4359.  
  4360. AC_LANG_RESTORE
  4361. CC="$lt_save_CC"
  4362. ])# AC_LIBTOOL_LANG_GCJ_CONFIG
  4363.  
  4364.  
  4365. # AC_LIBTOOL_LANG_RC_CONFIG
  4366. # --------------------------
  4367. # Ensure that the configuration vars for the Windows resource compiler are
  4368. # suitably defined.  Those variables are subsequently used by
  4369. # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
  4370. AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
  4371. AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
  4372. [AC_LANG_SAVE
  4373.  
  4374. # Source file extension for RC test sources.
  4375. ac_ext=rc
  4376.  
  4377. # Object file extension for compiled RC test sources.
  4378. objext=o
  4379. _LT_AC_TAGVAR(objext, $1)=$objext
  4380.  
  4381. # Code to be used in simple compile tests
  4382. lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
  4383.  
  4384. # Code to be used in simple link tests
  4385. lt_simple_link_test_code="$lt_simple_compile_test_code"
  4386.  
  4387. # ltmain only uses $CC for tagged configurations so make sure $CC is set.
  4388. _LT_AC_SYS_COMPILER
  4389.  
  4390. # Allow CC to be a program name with arguments.
  4391. lt_save_CC="$CC"
  4392. CC=${RC-"windres"}
  4393. compiler=$CC
  4394. _LT_AC_TAGVAR(compiler, $1)=$CC
  4395. _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
  4396.  
  4397. AC_LIBTOOL_CONFIG($1)
  4398.  
  4399. AC_LANG_RESTORE
  4400. CC="$lt_save_CC"
  4401. ])# AC_LIBTOOL_LANG_RC_CONFIG
  4402.  
  4403.  
  4404. # AC_LIBTOOL_CONFIG([TAGNAME])
  4405. # ----------------------------
  4406. # If TAGNAME is not passed, then create an initial libtool script
  4407. # with a default configuration from the untagged config vars.  Otherwise
  4408. # add code to config.status for appending the configuration named by
  4409. # TAGNAME from the matching tagged config vars.
  4410. AC_DEFUN([AC_LIBTOOL_CONFIG],
  4411. [# The else clause should only fire when bootstrapping the
  4412. # libtool distribution, otherwise you forgot to ship ltmain.sh
  4413. # with your package, and you will get complaints that there are
  4414. # no rules to generate ltmain.sh.
  4415. if test -f "$ltmain"; then
  4416.   # See if we are running on zsh, and set the options which allow our commands through
  4417.   # without removal of \ escapes.
  4418.   if test -n "${ZSH_VERSION+set}" ; then
  4419.     setopt NO_GLOB_SUBST
  4420.   fi
  4421.   # Now quote all the things that may contain metacharacters while being
  4422.   # careful not to overquote the AC_SUBSTed values.  We take copies of the
  4423.   # variables and quote the copies for generation of the libtool script.
  4424.   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \
  4425.     SED SHELL STRIP \
  4426.     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
  4427.     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
  4428.     deplibs_check_method reload_flag reload_cmds need_locks \
  4429.     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
  4430.     lt_cv_sys_global_symbol_to_c_name_address \
  4431.     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  4432.     old_postinstall_cmds old_postuninstall_cmds \
  4433.     _LT_AC_TAGVAR(compiler, $1) \
  4434.     _LT_AC_TAGVAR(CC, $1) \
  4435.     _LT_AC_TAGVAR(LD, $1) \
  4436.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
  4437.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
  4438.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
  4439.     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
  4440.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
  4441.     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
  4442.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
  4443.     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
  4444.     _LT_AC_TAGVAR(old_archive_cmds, $1) \
  4445.     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
  4446.     _LT_AC_TAGVAR(predep_objects, $1) \
  4447.     _LT_AC_TAGVAR(postdep_objects, $1) \
  4448.     _LT_AC_TAGVAR(predeps, $1) \
  4449.     _LT_AC_TAGVAR(postdeps, $1) \
  4450.     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
  4451.     _LT_AC_TAGVAR(archive_cmds, $1) \
  4452.     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
  4453.     _LT_AC_TAGVAR(postinstall_cmds, $1) \
  4454.     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
  4455.     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
  4456.     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
  4457.     _LT_AC_TAGVAR(no_undefined_flag, $1) \
  4458.     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
  4459.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
  4460.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
  4461.     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
  4462.     _LT_AC_TAGVAR(hardcode_automatic, $1) \
  4463.     _LT_AC_TAGVAR(module_cmds, $1) \
  4464.     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
  4465.     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
  4466.     _LT_AC_TAGVAR(exclude_expsyms, $1) \
  4467.     _LT_AC_TAGVAR(include_expsyms, $1); do
  4468.  
  4469.     case $var in
  4470.     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
  4471.     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
  4472.     _LT_AC_TAGVAR(archive_cmds, $1) | \
  4473.     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
  4474.     _LT_AC_TAGVAR(module_cmds, $1) | \
  4475.     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
  4476.     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
  4477.     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
  4478.     extract_expsyms_cmds | reload_cmds | finish_cmds | \
  4479.     postinstall_cmds | postuninstall_cmds | \
  4480.     old_postinstall_cmds | old_postuninstall_cmds | \
  4481.     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  4482.       # Double-quote double-evaled strings.
  4483.       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  4484.       ;;
  4485.     *)
  4486.       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  4487.       ;;
  4488.     esac
  4489.   done
  4490.  
  4491.   case $lt_echo in
  4492.   *'\[$]0 --fallback-echo"')
  4493.     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
  4494.     ;;
  4495.   esac
  4496.  
  4497. ifelse([$1], [],
  4498.   [cfgfile="${ofile}T"
  4499.   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
  4500.   $rm -f "$cfgfile"
  4501.   AC_MSG_NOTICE([creating $ofile])],
  4502.   [cfgfile="$ofile"])
  4503.  
  4504.   cat <<__EOF__ >> "$cfgfile"
  4505. ifelse([$1], [],
  4506. [#! $SHELL
  4507.  
  4508. # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  4509. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  4510. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  4511. #
  4512. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
  4513. # Free Software Foundation, Inc.
  4514. #
  4515. # This file is part of GNU Libtool:
  4516. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  4517. #
  4518. # This program is free software; you can redistribute it and/or modify
  4519. # it under the terms of the GNU General Public License as published by
  4520. # the Free Software Foundation; either version 2 of the License, or
  4521. # (at your option) any later version.
  4522. #
  4523. # This program is distributed in the hope that it will be useful, but
  4524. # WITHOUT ANY WARRANTY; without even the implied warranty of
  4525. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  4526. # General Public License for more details.
  4527. #
  4528. # You should have received a copy of the GNU General Public License
  4529. # along with this program; if not, write to the Free Software
  4530. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  4531. #
  4532. # As a special exception to the GNU General Public License, if you
  4533. # distribute this file as part of a program that contains a
  4534. # configuration script generated by Autoconf, you may include it under
  4535. # the same distribution terms that you use for the rest of that program.
  4536.  
  4537. # A sed program that does not truncate output.
  4538. SED=$lt_SED
  4539.  
  4540. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  4541. Xsed="$SED -e s/^X//"
  4542.  
  4543. # The HP-UX ksh and POSIX shell print the target directory to stdout
  4544. # if CDPATH is set.
  4545. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  4546.  
  4547. # The names of the tagged configurations supported by this script.
  4548. available_tags=
  4549.  
  4550. # ### BEGIN LIBTOOL CONFIG],
  4551. [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
  4552.  
  4553. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  4554.  
  4555. # Shell to use when invoking shell scripts.
  4556. SHELL=$lt_SHELL
  4557.  
  4558. # Whether or not to build shared libraries.
  4559. build_libtool_libs=$enable_shared
  4560.  
  4561. # Whether or not to build static libraries.
  4562. build_old_libs=$enable_static
  4563.  
  4564. # Whether or not to add -lc for building shared libraries.
  4565. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
  4566.  
  4567. # Whether or not to disallow shared libs when runtime libs are static
  4568. allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
  4569.  
  4570. # Whether or not to optimize for fast installation.
  4571. fast_install=$enable_fast_install
  4572.  
  4573. # The host system.
  4574. host_alias=$host_alias
  4575. host=$host
  4576.  
  4577. # An echo program that does not interpret backslashes.
  4578. echo=$lt_echo
  4579.  
  4580. # The archiver.
  4581. AR=$lt_AR
  4582. AR_FLAGS=$lt_AR_FLAGS
  4583.  
  4584. # A C compiler.
  4585. LTCC=$lt_LTCC
  4586.  
  4587. # A language-specific compiler.
  4588. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
  4589.  
  4590. # Is the compiler the GNU C compiler?
  4591. with_gcc=$_LT_AC_TAGVAR(GCC, $1)
  4592.  
  4593. # An ERE matcher.
  4594. EGREP=$lt_EGREP
  4595.  
  4596. # The linker used to build libraries.
  4597. LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
  4598.  
  4599. # Whether we need hard or soft links.
  4600. LN_S=$lt_LN_S
  4601.  
  4602. # A BSD-compatible nm program.
  4603. NM=$lt_NM
  4604.  
  4605. # A symbol stripping program
  4606. STRIP=$lt_STRIP
  4607.  
  4608. # Used to examine libraries when file_magic_cmd begins "file"
  4609. MAGIC_CMD=$MAGIC_CMD
  4610.  
  4611. # Used on cygwin: DLL creation program.
  4612. DLLTOOL="$DLLTOOL"
  4613.  
  4614. # Used on cygwin: object dumper.
  4615. OBJDUMP="$OBJDUMP"
  4616.  
  4617. # Used on cygwin: assembler.
  4618. AS="$AS"
  4619.  
  4620. # The name of the directory that contains temporary libtool files.
  4621. objdir=$objdir
  4622.  
  4623. # How to create reloadable object files.
  4624. reload_flag=$lt_reload_flag
  4625. reload_cmds=$lt_reload_cmds
  4626.  
  4627. # How to pass a linker flag through the compiler.
  4628. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  4629.  
  4630. # Object file suffix (normally "o").
  4631. objext="$ac_objext"
  4632.  
  4633. # Old archive suffix (normally "a").
  4634. libext="$libext"
  4635.  
  4636. # Shared library suffix (normally ".so").
  4637. shrext_cmds='$shrext_cmds'
  4638.  
  4639. # Executable file suffix (normally "").
  4640. exeext="$exeext"
  4641.  
  4642. # Additional compiler flags for building library objects.
  4643. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
  4644. pic_mode=$pic_mode
  4645.  
  4646. # What is the maximum length of a command?
  4647. max_cmd_len=$lt_cv_sys_max_cmd_len
  4648.  
  4649. # Does compiler simultaneously support -c and -o options?
  4650. compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
  4651.  
  4652. # Must we lock files when doing compilation ?
  4653. need_locks=$lt_need_locks
  4654.  
  4655. # Do we need the lib prefix for modules?
  4656. need_lib_prefix=$need_lib_prefix
  4657.  
  4658. # Do we need a version for libraries?
  4659. need_version=$need_version
  4660.  
  4661. # Whether dlopen is supported.
  4662. dlopen_support=$enable_dlopen
  4663.  
  4664. # Whether dlopen of programs is supported.
  4665. dlopen_self=$enable_dlopen_self
  4666.  
  4667. # Whether dlopen of statically linked programs is supported.
  4668. dlopen_self_static=$enable_dlopen_self_static
  4669.  
  4670. # Compiler flag to prevent dynamic linking.
  4671. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
  4672.  
  4673. # Compiler flag to turn off builtin functions.
  4674. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
  4675.  
  4676. # Compiler flag to allow reflexive dlopens.
  4677. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
  4678.  
  4679. # Compiler flag to generate shared objects directly from archives.
  4680. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
  4681.  
  4682. # Compiler flag to generate thread-safe objects.
  4683. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
  4684.  
  4685. # Library versioning type.
  4686. version_type=$version_type
  4687.  
  4688. # Format of library name prefix.
  4689. libname_spec=$lt_libname_spec
  4690.  
  4691. # List of archive names.  First name is the real one, the rest are links.
  4692. # The last name is the one that the linker finds with -lNAME.
  4693. library_names_spec=$lt_library_names_spec
  4694.  
  4695. # The coded name of the library, if different from the real name.
  4696. soname_spec=$lt_soname_spec
  4697.  
  4698. # Commands used to build and install an old-style archive.
  4699. RANLIB=$lt_RANLIB
  4700. old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
  4701. old_postinstall_cmds=$lt_old_postinstall_cmds
  4702. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  4703.  
  4704. # Create an old-style archive from a shared archive.
  4705. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
  4706.  
  4707. # Create a temporary old-style archive to link instead of a shared archive.
  4708. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
  4709.  
  4710. # Commands used to build and install a shared archive.
  4711. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
  4712. archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
  4713. postinstall_cmds=$lt_postinstall_cmds
  4714. postuninstall_cmds=$lt_postuninstall_cmds
  4715.  
  4716. # Commands used to build a loadable module (assumed same as above if empty)
  4717. module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
  4718. module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
  4719.  
  4720. # Commands to strip libraries.
  4721. old_striplib=$lt_old_striplib
  4722. striplib=$lt_striplib
  4723.  
  4724. # Dependencies to place before the objects being linked to create a
  4725. # shared library.
  4726. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
  4727.  
  4728. # Dependencies to place after the objects being linked to create a
  4729. # shared library.
  4730. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
  4731.  
  4732. # Dependencies to place before the objects being linked to create a
  4733. # shared library.
  4734. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
  4735.  
  4736. # Dependencies to place after the objects being linked to create a
  4737. # shared library.
  4738. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
  4739.  
  4740. # The library search path used internally by the compiler when linking
  4741. # a shared library.
  4742. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
  4743.  
  4744. # Method to check whether dependent libraries are shared objects.
  4745. deplibs_check_method=$lt_deplibs_check_method
  4746.  
  4747. # Command to use when deplibs_check_method == file_magic.
  4748. file_magic_cmd=$lt_file_magic_cmd
  4749.  
  4750. # Flag that allows shared libraries with undefined symbols to be built.
  4751. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
  4752.  
  4753. # Flag that forces no undefined symbols.
  4754. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
  4755.  
  4756. # Commands used to finish a libtool library installation in a directory.
  4757. finish_cmds=$lt_finish_cmds
  4758.  
  4759. # Same as above, but a single script fragment to be evaled but not shown.
  4760. finish_eval=$lt_finish_eval
  4761.  
  4762. # Take the output of nm and produce a listing of raw symbols and C names.
  4763. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
  4764.  
  4765. # Transform the output of nm in a proper C declaration
  4766. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
  4767.  
  4768. # Transform the output of nm in a C name address pair
  4769. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
  4770.  
  4771. # This is the shared library runtime path variable.
  4772. runpath_var=$runpath_var
  4773.  
  4774. # This is the shared library path variable.
  4775. shlibpath_var=$shlibpath_var
  4776.  
  4777. # Is shlibpath searched before the hard-coded library search path?
  4778. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  4779.  
  4780. # How to hardcode a shared library path into an executable.
  4781. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
  4782.  
  4783. # Whether we should hardcode library paths into libraries.
  4784. hardcode_into_libs=$hardcode_into_libs
  4785.  
  4786. # Flag to hardcode \$libdir into a binary during linking.
  4787. # This must work even if \$libdir does not exist.
  4788. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
  4789.  
  4790. # If ld is used when linking, flag to hardcode \$libdir into
  4791. # a binary during linking. This must work even if \$libdir does
  4792. # not exist.
  4793. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
  4794.  
  4795. # Whether we need a single -rpath flag with a separated argument.
  4796. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
  4797.  
  4798. # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
  4799. # resulting binary.
  4800. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
  4801.  
  4802. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  4803. # resulting binary.
  4804. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
  4805.  
  4806. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  4807. # the resulting binary.
  4808. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
  4809.  
  4810. # Set to yes if building a shared library automatically hardcodes DIR into the library
  4811. # and all subsequent libraries and executables linked against it.
  4812. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
  4813.  
  4814. # Variables whose values should be saved in libtool wrapper scripts and
  4815. # restored at relink time.
  4816. variables_saved_for_relink="$variables_saved_for_relink"
  4817.  
  4818. # Whether libtool must link a program against all its dependency libraries.
  4819. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
  4820.  
  4821. # Compile-time system search path for libraries
  4822. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  4823.  
  4824. # Run-time system search path for libraries
  4825. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  4826.  
  4827. # Fix the shell variable \$srcfile for the compiler.
  4828. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
  4829.  
  4830. # Set to yes if exported symbols are required.
  4831. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
  4832.  
  4833. # The commands to list exported symbols.
  4834. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
  4835.  
  4836. # The commands to extract the exported symbol list from a shared archive.
  4837. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  4838.  
  4839. # Symbols that should not be listed in the preloaded symbols.
  4840. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
  4841.  
  4842. # Symbols that must always be exported.
  4843. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
  4844.  
  4845. ifelse([$1],[],
  4846. [# ### END LIBTOOL CONFIG],
  4847. [# ### END LIBTOOL TAG CONFIG: $tagname])
  4848.  
  4849. __EOF__
  4850.  
  4851. ifelse([$1],[], [
  4852.   case $host_os in
  4853.   aix3*)
  4854.     cat <<\EOF >> "$cfgfile"
  4855.  
  4856. # AIX sometimes has problems with the GCC collect2 program.  For some
  4857. # reason, if we set the COLLECT_NAMES environment variable, the problems
  4858. # vanish in a puff of smoke.
  4859. if test "X${COLLECT_NAMES+set}" != Xset; then
  4860.   COLLECT_NAMES=
  4861.   export COLLECT_NAMES
  4862. fi
  4863. EOF
  4864.     ;;
  4865.   esac
  4866.  
  4867.   # We use sed instead of cat because bash on DJGPP gets confused if
  4868.   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
  4869.   # text mode, it properly converts lines to CR/LF.  This bash problem
  4870.   # is reportedly fixed, but why not run on old versions too?
  4871.   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
  4872.  
  4873.   mv -f "$cfgfile" "$ofile" || \
  4874.     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
  4875.   chmod +x "$ofile"
  4876. ])
  4877. else
  4878.   # If there is no Makefile yet, we rely on a make rule to execute
  4879.   # `config.status --recheck' to rerun these tests and create the
  4880.   # libtool script then.
  4881.   ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
  4882.   if test -f "$ltmain_in"; then
  4883.     test -f Makefile && make "$ltmain"
  4884.   fi
  4885. fi
  4886. ])# AC_LIBTOOL_CONFIG
  4887.  
  4888.  
  4889. # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
  4890. # -------------------------------------------
  4891. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
  4892. [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
  4893.  
  4894. _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
  4895.  
  4896. if test "$GCC" = yes; then
  4897.   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
  4898.  
  4899.   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
  4900.     lt_cv_prog_compiler_rtti_exceptions,
  4901.     [-fno-rtti -fno-exceptions], [],
  4902.     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
  4903. fi
  4904. ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
  4905.  
  4906.  
  4907. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  4908. # ---------------------------------
  4909. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  4910. [AC_REQUIRE([AC_CANONICAL_HOST])
  4911. AC_REQUIRE([AC_PROG_NM])
  4912. AC_REQUIRE([AC_OBJEXT])
  4913. # Check for command to grab the raw symbol name followed by C symbol from nm.
  4914. AC_MSG_CHECKING([command to parse $NM output from $compiler object])
  4915. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
  4916. [
  4917. # These are sane defaults that work on at least a few old systems.
  4918. # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
  4919.  
  4920. # Character class describing NM global symbol codes.
  4921. symcode='[[BCDEGRST]]'
  4922.  
  4923. # Regexp to match symbols that can be accessed directly from C.
  4924. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  4925.  
  4926. # Transform the above into a raw symbol and a C symbol.
  4927. symxfrm='\1 \2\3 \3'
  4928.  
  4929. # Transform an extracted symbol line into a proper C declaration
  4930. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
  4931.  
  4932. # Transform an extracted symbol line into symbol name and symbol address
  4933. 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'"
  4934.  
  4935. # Define system-specific variables.
  4936. case $host_os in
  4937. aix*)
  4938.   symcode='[[BCDT]]'
  4939.   ;;
  4940. cygwin* | mingw* | pw32*)
  4941.   symcode='[[ABCDGISTW]]'
  4942.   ;;
  4943. hpux*) # Its linker distinguishes data from code symbols
  4944.   if test "$host_cpu" = ia64; then
  4945.     symcode='[[ABCDEGRST]]'
  4946.   fi
  4947.   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  4948.   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'"
  4949.   ;;
  4950. irix* | nonstopux*)
  4951.   symcode='[[BCDEGRST]]'
  4952.   ;;
  4953. osf*)
  4954.   symcode='[[BCDEGQRST]]'
  4955.   ;;
  4956. solaris* | sysv5*)
  4957.   symcode='[[BDRT]]'
  4958.   ;;
  4959. sysv4)
  4960.   symcode='[[DFNSTU]]'
  4961.   ;;
  4962. esac
  4963.  
  4964. # Handle CRLF in mingw tool chain
  4965. opt_cr=
  4966. case $build_os in
  4967. mingw*)
  4968.   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  4969.   ;;
  4970. esac
  4971.  
  4972. # If we're using GNU nm, then use its standard symbol codes.
  4973. case `$NM -V 2>&1` in
  4974. *GNU* | *'with BFD'*)
  4975.   symcode='[[ABCDGIRSTW]]' ;;
  4976. esac
  4977.  
  4978. # Try without a prefix undercore, then with it.
  4979. for ac_symprfx in "" "_"; do
  4980.  
  4981.   # Write the raw and C identifiers.
  4982.   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[     ]]\($symcode$symcode*\)[[     ]][[     ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  4983.  
  4984.   # Check to see that the pipe works correctly.
  4985.   pipe_works=no
  4986.  
  4987.   rm -f conftest*
  4988.   cat > conftest.$ac_ext <<EOF
  4989. #ifdef __cplusplus
  4990. extern "C" {
  4991. #endif
  4992. char nm_test_var;
  4993. void nm_test_func(){}
  4994. #ifdef __cplusplus
  4995. }
  4996. #endif
  4997. int main(){nm_test_var='a';nm_test_func();return(0);}
  4998. EOF
  4999.  
  5000.   if AC_TRY_EVAL(ac_compile); then
  5001.     # Now try to grab the symbols.
  5002.     nlist=conftest.nm
  5003.     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  5004.       # Try sorting and uniquifying the output.
  5005.       if sort "$nlist" | uniq > "$nlist"T; then
  5006.     mv -f "$nlist"T "$nlist"
  5007.       else
  5008.     rm -f "$nlist"T
  5009.       fi
  5010.  
  5011.       # Make sure that we snagged all the symbols we need.
  5012.       if grep ' nm_test_var$' "$nlist" >/dev/null; then
  5013.     if grep ' nm_test_func$' "$nlist" >/dev/null; then
  5014.       cat <<EOF > conftest.$ac_ext
  5015. #ifdef __cplusplus
  5016. extern "C" {
  5017. #endif
  5018.  
  5019. EOF
  5020.       # Now generate the symbol file.
  5021.       eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
  5022.  
  5023.       cat <<EOF >> conftest.$ac_ext
  5024. #if defined (__STDC__) && __STDC__
  5025. # define lt_ptr_t void *
  5026. #else
  5027. # define lt_ptr_t char *
  5028. # define const
  5029. #endif
  5030.  
  5031. /* The mapping between symbol names and symbols. */
  5032. const struct {
  5033.   const char *name;
  5034.   lt_ptr_t address;
  5035. }
  5036. lt_preloaded_symbols[[]] =
  5037. {
  5038. EOF
  5039.       $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
  5040.       cat <<\EOF >> conftest.$ac_ext
  5041.   {0, (lt_ptr_t) 0}
  5042. };
  5043.  
  5044. #ifdef __cplusplus
  5045. }
  5046. #endif
  5047. EOF
  5048.       # Now try linking the two files.
  5049.       mv conftest.$ac_objext conftstm.$ac_objext
  5050.       lt_save_LIBS="$LIBS"
  5051.       lt_save_CFLAGS="$CFLAGS"
  5052.       LIBS="conftstm.$ac_objext"
  5053.       CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
  5054.       if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
  5055.         pipe_works=yes
  5056.       fi
  5057.       LIBS="$lt_save_LIBS"
  5058.       CFLAGS="$lt_save_CFLAGS"
  5059.     else
  5060.       echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
  5061.     fi
  5062.       else
  5063.     echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
  5064.       fi
  5065.     else
  5066.       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
  5067.     fi
  5068.   else
  5069.     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
  5070.     cat conftest.$ac_ext >&5
  5071.   fi
  5072.   rm -f conftest* conftst*
  5073.  
  5074.   # Do not use the global_symbol_pipe unless it works.
  5075.   if test "$pipe_works" = yes; then
  5076.     break
  5077.   else
  5078.     lt_cv_sys_global_symbol_pipe=
  5079.   fi
  5080. done
  5081. ])
  5082. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  5083.   lt_cv_sys_global_symbol_to_cdecl=
  5084. fi
  5085. if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
  5086.   AC_MSG_RESULT(failed)
  5087. else
  5088.   AC_MSG_RESULT(ok)
  5089. fi
  5090. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  5091.  
  5092.  
  5093. # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
  5094. # ---------------------------------------
  5095. AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
  5096. [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
  5097. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5098. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
  5099.  
  5100. AC_MSG_CHECKING([for $compiler option to produce PIC])
  5101.  ifelse([$1],[CXX],[
  5102.   # C++ specific cases for pic, static, wl, etc.
  5103.   if test "$GXX" = yes; then
  5104.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5105.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5106.  
  5107.     case $host_os in
  5108.     aix*)
  5109.       # All AIX code is PIC.
  5110.       if test "$host_cpu" = ia64; then
  5111.     # AIX 5 now supports IA64 processor
  5112.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5113.       fi
  5114.       ;;
  5115.     amigaos*)
  5116.       # FIXME: we need at least 68020 code to build shared libraries, but
  5117.       # adding the `-m68020' flag to GCC prevents building anything better,
  5118.       # like `-m68040'.
  5119.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5120.       ;;
  5121.     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5122.       # PIC is the default for these OSes.
  5123.       ;;
  5124.     mingw* | os2* | pw32*)
  5125.       # This hack is so that the source file can tell whether it is being
  5126.       # built for inclusion in a dll (and should export symbols for example).
  5127.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  5128.       ;;
  5129.     darwin* | rhapsody*)
  5130.       # PIC is the default on this platform
  5131.       # Common symbols not allowed in MH_DYLIB files
  5132.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5133.       ;;
  5134.     *djgpp*)
  5135.       # DJGPP does not support shared libraries at all
  5136.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5137.       ;;
  5138.     sysv4*MP*)
  5139.       if test -d /usr/nec; then
  5140.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5141.       fi
  5142.       ;;
  5143.     hpux*)
  5144.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5145.       # not for PA HP-UX.
  5146.       case "$host_cpu" in
  5147.       hppa*64*|ia64*)
  5148.     ;;
  5149.       *)
  5150.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5151.     ;;
  5152.       esac
  5153.       ;;
  5154.     *)
  5155.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5156.       ;;
  5157.     esac
  5158.   else
  5159.     case $host_os in
  5160.       aix4* | aix5*)
  5161.     # All AIX code is PIC.
  5162.     if test "$host_cpu" = ia64; then
  5163.       # AIX 5 now supports IA64 processor
  5164.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5165.     else
  5166.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5167.     fi
  5168.     ;;
  5169.       chorus*)
  5170.     case $cc_basename in
  5171.     cxch68)
  5172.       # Green Hills C++ Compiler
  5173.       # _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"
  5174.       ;;
  5175.     esac
  5176.     ;;
  5177.       dgux*)
  5178.     case $cc_basename in
  5179.       ec++)
  5180.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5181.         ;;
  5182.       ghcx)
  5183.         # Green Hills C++ Compiler
  5184.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5185.         ;;
  5186.       *)
  5187.         ;;
  5188.     esac
  5189.     ;;
  5190.       freebsd* | kfreebsd*-gnu)
  5191.     # FreeBSD uses GNU C++
  5192.     ;;
  5193.       hpux9* | hpux10* | hpux11*)
  5194.     case $cc_basename in
  5195.       CC)
  5196.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5197.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  5198.         if test "$host_cpu" != ia64; then
  5199.           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5200.         fi
  5201.         ;;
  5202.       aCC)
  5203.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5204.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
  5205.         case "$host_cpu" in
  5206.         hppa*64*|ia64*)
  5207.           # +Z the default
  5208.           ;;
  5209.         *)
  5210.           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5211.           ;;
  5212.         esac
  5213.         ;;
  5214.       *)
  5215.         ;;
  5216.     esac
  5217.     ;;
  5218.       irix5* | irix6* | nonstopux*)
  5219.     case $cc_basename in
  5220.       CC)
  5221.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5222.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5223.         # CC pic flag -KPIC is the default.
  5224.         ;;
  5225.       *)
  5226.         ;;
  5227.     esac
  5228.     ;;
  5229.       linux*)
  5230.     case $cc_basename in
  5231.       KCC)
  5232.         # KAI C++ Compiler
  5233.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5234.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5235.         ;;
  5236.       icpc)
  5237.         # Intel C++
  5238.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5239.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5240.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5241.         ;;
  5242.       cxx)
  5243.         # Compaq C++
  5244.         # Make sure the PIC flag is empty.  It appears that all Alpha
  5245.         # Linux and Compaq Tru64 Unix objects are PIC.
  5246.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5247.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5248.         ;;
  5249.       *)
  5250.         ;;
  5251.     esac
  5252.     ;;
  5253.       lynxos*)
  5254.     ;;
  5255.       m88k*)
  5256.     ;;
  5257.       mvs*)
  5258.     case $cc_basename in
  5259.       cxx)
  5260.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
  5261.         ;;
  5262.       *)
  5263.         ;;
  5264.     esac
  5265.     ;;
  5266.       netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
  5267.     ;;
  5268.       osf3* | osf4* | osf5*)
  5269.     case $cc_basename in
  5270.       KCC)
  5271.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
  5272.         ;;
  5273.       RCC)
  5274.         # Rational C++ 2.4.1
  5275.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5276.         ;;
  5277.       cxx)
  5278.         # Digital/Compaq C++
  5279.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5280.         # Make sure the PIC flag is empty.  It appears that all Alpha
  5281.         # Linux and Compaq Tru64 Unix objects are PIC.
  5282.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5283.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5284.         ;;
  5285.       *)
  5286.         ;;
  5287.     esac
  5288.     ;;
  5289.       psos*)
  5290.     ;;
  5291.       sco*)
  5292.     case $cc_basename in
  5293.       CC)
  5294.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5295.         ;;
  5296.       *)
  5297.         ;;
  5298.     esac
  5299.     ;;
  5300.       solaris*)
  5301.     case $cc_basename in
  5302.       CC)
  5303.         # Sun C++ 4.2, 5.x and Centerline C++
  5304.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5305.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5306.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5307.         ;;
  5308.       gcx)
  5309.         # Green Hills C++ Compiler
  5310.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5311.         ;;
  5312.       *)
  5313.         ;;
  5314.     esac
  5315.     ;;
  5316.       sunos4*)
  5317.     case $cc_basename in
  5318.       CC)
  5319.         # Sun C++ 4.x
  5320.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5321.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5322.         ;;
  5323.       lcc)
  5324.         # Lucid
  5325.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5326.         ;;
  5327.       *)
  5328.         ;;
  5329.     esac
  5330.     ;;
  5331.       tandem*)
  5332.     case $cc_basename in
  5333.       NCC)
  5334.         # NonStop-UX NCC 3.20
  5335.         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5336.         ;;
  5337.       *)
  5338.         ;;
  5339.     esac
  5340.     ;;
  5341.       unixware*)
  5342.     ;;
  5343.       vxworks*)
  5344.     ;;
  5345.       *)
  5346.     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5347.     ;;
  5348.     esac
  5349.   fi
  5350. ],
  5351. [
  5352.   if test "$GCC" = yes; then
  5353.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5354.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5355.  
  5356.     case $host_os in
  5357.       aix*)
  5358.       # All AIX code is PIC.
  5359.       if test "$host_cpu" = ia64; then
  5360.     # AIX 5 now supports IA64 processor
  5361.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5362.       fi
  5363.       ;;
  5364.  
  5365.     amigaos*)
  5366.       # FIXME: we need at least 68020 code to build shared libraries, but
  5367.       # adding the `-m68020' flag to GCC prevents building anything better,
  5368.       # like `-m68040'.
  5369.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
  5370.       ;;
  5371.  
  5372.     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
  5373.       # PIC is the default for these OSes.
  5374.       ;;
  5375.  
  5376.     mingw* | pw32* | os2*)
  5377.       # This hack is so that the source file can tell whether it is being
  5378.       # built for inclusion in a dll (and should export symbols for example).
  5379.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  5380.       ;;
  5381.  
  5382.     darwin* | rhapsody*)
  5383.       # PIC is the default on this platform
  5384.       # Common symbols not allowed in MH_DYLIB files
  5385.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
  5386.       ;;
  5387.  
  5388.     msdosdjgpp*)
  5389.       # Just because we use GCC doesn't mean we suddenly get shared libraries
  5390.       # on systems that don't support them.
  5391.       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5392.       enable_shared=no
  5393.       ;;
  5394.  
  5395.     sysv4*MP*)
  5396.       if test -d /usr/nec; then
  5397.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
  5398.       fi
  5399.       ;;
  5400.  
  5401.     hpux*)
  5402.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5403.       # not for PA HP-UX.
  5404.       case "$host_cpu" in
  5405.       hppa*64*|ia64*)
  5406.     # +Z the default
  5407.     ;;
  5408.       *)
  5409.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5410.     ;;
  5411.       esac
  5412.       ;;
  5413.  
  5414.     *)
  5415.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
  5416.       ;;
  5417.     esac
  5418.   else
  5419.     # PORTME Check for flag to pass linker flags through the system compiler.
  5420.     case $host_os in
  5421.     aix*)
  5422.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5423.       if test "$host_cpu" = ia64; then
  5424.     # AIX 5 now supports IA64 processor
  5425.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5426.       else
  5427.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
  5428.       fi
  5429.       ;;
  5430.  
  5431.     mingw* | pw32* | os2*)
  5432.       # This hack is so that the source file can tell whether it is being
  5433.       # built for inclusion in a dll (and should export symbols for example).
  5434.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
  5435.       ;;
  5436.  
  5437.     hpux9* | hpux10* | hpux11*)
  5438.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5439.       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
  5440.       # not for PA HP-UX.
  5441.       case "$host_cpu" in
  5442.       hppa*64*|ia64*)
  5443.     # +Z the default
  5444.     ;;
  5445.       *)
  5446.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
  5447.     ;;
  5448.       esac
  5449.       # Is there a better lt_prog_compiler_static that works with the bundled CC?
  5450.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
  5451.       ;;
  5452.  
  5453.     irix5* | irix6* | nonstopux*)
  5454.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5455.       # PIC (with -KPIC) is the default.
  5456.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5457.       ;;
  5458.  
  5459.     newsos6)
  5460.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5461.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5462.       ;;
  5463.  
  5464.     linux*)
  5465.       case $CC in
  5466.       icc* | ecc*)
  5467.     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5468.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5469.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
  5470.         ;;
  5471.       ccc*)
  5472.         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5473.         # All Alpha code is PIC.
  5474.         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5475.         ;;
  5476.       esac
  5477.       ;;
  5478.  
  5479.     osf3* | osf4* | osf5*)
  5480.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5481.       # All OSF/1 code is PIC.
  5482.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
  5483.       ;;
  5484.  
  5485.     sco3.2v5*)
  5486.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
  5487.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
  5488.       ;;
  5489.  
  5490.     solaris*)
  5491.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5492.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5493.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5494.       ;;
  5495.  
  5496.     sunos4*)
  5497.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
  5498.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
  5499.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5500.       ;;
  5501.  
  5502.     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  5503.       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
  5504.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
  5505.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5506.       ;;
  5507.  
  5508.     sysv4*MP*)
  5509.       if test -d /usr/nec ;then
  5510.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
  5511.     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5512.       fi
  5513.       ;;
  5514.  
  5515.     uts4*)
  5516.       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
  5517.       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
  5518.       ;;
  5519.  
  5520.     *)
  5521.       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
  5522.       ;;
  5523.     esac
  5524.   fi
  5525. ])
  5526. AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
  5527.  
  5528. #
  5529. # Check to make sure the PIC flag actually works.
  5530. #
  5531. if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
  5532.   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
  5533.     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
  5534.     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
  5535.     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
  5536.      "" | " "*) ;;
  5537.      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
  5538.      esac],
  5539.     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5540.      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
  5541. fi
  5542. case "$host_os" in
  5543.   # For platforms which do not support PIC, -DPIC is meaningless:
  5544.   *djgpp*)
  5545.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
  5546.     ;;
  5547.   *)
  5548.     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
  5549.     ;;
  5550. esac
  5551. ])
  5552.  
  5553.  
  5554. # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
  5555. # ------------------------------------
  5556. # See if the linker supports building shared libraries.
  5557. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
  5558. [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
  5559. ifelse([$1],[CXX],[
  5560.   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5561.   case $host_os in
  5562.   aix4* | aix5*)
  5563.     # If we're using GNU nm, then we don't want the "-C" option.
  5564.     # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5565.     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  5566.       _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'
  5567.     else
  5568.       _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'
  5569.     fi
  5570.     ;;
  5571.   pw32*)
  5572.     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
  5573.   ;;
  5574.   cygwin* | mingw*)
  5575.     _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'
  5576.   ;;
  5577.   linux*)
  5578.     _LT_AC_TAGVAR(link_all_deplibs, $1)=no
  5579.   ;;
  5580.   *)
  5581.     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5582.   ;;
  5583.   esac
  5584. ],[
  5585.   runpath_var=
  5586.   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  5587.   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
  5588.   _LT_AC_TAGVAR(archive_cmds, $1)=
  5589.   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
  5590.   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
  5591.   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
  5592.   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
  5593.   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5594.   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
  5595.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  5596.   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
  5597.   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5598.   _LT_AC_TAGVAR(hardcode_direct, $1)=no
  5599.   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  5600.   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  5601.   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
  5602.   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
  5603.   _LT_AC_TAGVAR(module_cmds, $1)=
  5604.   _LT_AC_TAGVAR(module_expsym_cmds, $1)=
  5605.   _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5606.   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
  5607.   # include_expsyms should be a list of space-separated symbols to be *always*
  5608.   # included in the symbol list
  5609.   _LT_AC_TAGVAR(include_expsyms, $1)=
  5610.   # exclude_expsyms can be an extended regexp of symbols to exclude
  5611.   # it will be wrapped by ` (' and `)$', so one must not match beginning or
  5612.   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  5613.   # as well as any symbol that contains `d'.
  5614.   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
  5615.   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  5616.   # platforms (ab)use it in PIC code, but their linkers get confused if
  5617.   # the symbol is explicitly referenced.  Since portable code cannot
  5618.   # rely on this symbol name, it's probably fine to never include it in
  5619.   # preloaded symbol tables.
  5620.   extract_expsyms_cmds=
  5621.  
  5622.   case $host_os in
  5623.   cygwin* | mingw* | pw32*)
  5624.     # FIXME: the MSVC++ port hasn't been tested in a loooong time
  5625.     # When not using gcc, we currently assume that we are using
  5626.     # Microsoft Visual C++.
  5627.     if test "$GCC" != yes; then
  5628.       with_gnu_ld=no
  5629.     fi
  5630.     ;;
  5631.   openbsd*)
  5632.     with_gnu_ld=no
  5633.     ;;
  5634.   esac
  5635.  
  5636.   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  5637.   if test "$with_gnu_ld" = yes; then
  5638.     # If archive_cmds runs LD, not CC, wlarc should be empty
  5639.     wlarc='${wl}'
  5640.  
  5641.     # See if GNU ld supports shared libraries.
  5642.     case $host_os in
  5643.     aix3* | aix4* | aix5*)
  5644.       # On AIX/PPC, the GNU linker is very broken
  5645.       if test "$host_cpu" != ia64; then
  5646.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5647.     cat <<EOF 1>&2
  5648.  
  5649. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  5650. *** to be unable to reliably create shared libraries on AIX.
  5651. *** Therefore, libtool is disabling shared libraries support.  If you
  5652. *** really care for shared libraries, you may want to modify your PATH
  5653. *** so that a non-GNU linker is found, and then restart.
  5654.  
  5655. EOF
  5656.       fi
  5657.       ;;
  5658.  
  5659.     amigaos*)
  5660.       _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)'
  5661.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5662.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5663.  
  5664.       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  5665.       # that the semantics of dynamic libraries on AmigaOS, at least up
  5666.       # to version 4, is to share data among multiple programs linked
  5667.       # with the same dynamic library.  Since this doesn't match the
  5668.       # behavior of shared libraries on other platforms, we can't use
  5669.       # them.
  5670.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5671.       ;;
  5672.  
  5673.     beos*)
  5674.       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5675.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5676.     # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  5677.     # support --undefined.  This deserves some investigation.  FIXME
  5678.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5679.       else
  5680.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5681.       fi
  5682.       ;;
  5683.  
  5684.     cygwin* | mingw* | pw32*)
  5685.       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
  5686.       # as there is no search path for DLLs.
  5687.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5688.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5689.       _LT_AC_TAGVAR(always_export_symbols, $1)=no
  5690.       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5691.       _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'
  5692.  
  5693.       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
  5694.         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
  5695.     # If the export-symbols file already is a .def file (1st line
  5696.     # is EXPORTS), use it as is; otherwise, prepend...
  5697.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
  5698.       cp $export_symbols $output_objdir/$soname.def;
  5699.     else
  5700.       echo EXPORTS > $output_objdir/$soname.def;
  5701.       cat $export_symbols >> $output_objdir/$soname.def;
  5702.     fi~
  5703.     $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
  5704.       else
  5705.     ld_shlibs=no
  5706.       fi
  5707.       ;;
  5708.  
  5709.     netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
  5710.       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  5711.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  5712.     wlarc=
  5713.       else
  5714.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5715.     _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'
  5716.       fi
  5717.       ;;
  5718.  
  5719.     solaris* | sysv5*)
  5720.       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
  5721.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5722.     cat <<EOF 1>&2
  5723.  
  5724. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  5725. *** create shared libraries on Solaris systems.  Therefore, libtool
  5726. *** is disabling shared libraries support.  We urge you to upgrade GNU
  5727. *** binutils to release 2.9.1 or newer.  Another option is to modify
  5728. *** your PATH or compiler configuration so that the native linker is
  5729. *** used, and then restart.
  5730.  
  5731. EOF
  5732.       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5733.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5734.     _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'
  5735.       else
  5736.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5737.       fi
  5738.       ;;
  5739.  
  5740.     sunos4*)
  5741.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  5742.       wlarc=
  5743.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5744.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  5745.       ;;
  5746.  
  5747.   linux*)
  5748.     if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5749.         tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5750.     _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds"
  5751.       supports_anon_versioning=no
  5752.       case `$LD -v 2>/dev/null` in
  5753.         *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
  5754.         *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
  5755.         *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
  5756.         *\ 2.11.*) ;; # other 2.11 versions
  5757.         *) supports_anon_versioning=yes ;;
  5758.       esac
  5759.       if test $supports_anon_versioning = yes; then
  5760.         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
  5761. cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
  5762. $echo "local: *; };" >> $output_objdir/$libname.ver~
  5763.         $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
  5764.       else
  5765.         _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds"
  5766.       fi
  5767.       _LT_AC_TAGVAR(link_all_deplibs, $1)=no
  5768.     else
  5769.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5770.     fi
  5771.     ;;
  5772.  
  5773.     *)
  5774.       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
  5775.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  5776.     _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'
  5777.       else
  5778.     _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5779.       fi
  5780.       ;;
  5781.     esac
  5782.  
  5783.     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
  5784.       runpath_var=LD_RUN_PATH
  5785.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
  5786.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
  5787.       # ancient GNU ld didn't support --whole-archive et. al.
  5788.       if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
  5789.      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  5790.       else
  5791.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
  5792.       fi
  5793.     fi
  5794.   else
  5795.     # PORTME fill in a description of your system's linker (not GNU ld)
  5796.     case $host_os in
  5797.     aix3*)
  5798.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5799.       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5800.       _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'
  5801.       # Note: this linker hardcodes the directories in LIBPATH if there
  5802.       # are no directories specified by -L.
  5803.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5804.       if test "$GCC" = yes && test -z "$link_static_flag"; then
  5805.     # Neither direct hardcoding nor static linking is supported with a
  5806.     # broken collect2.
  5807.     _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5808.       fi
  5809.       ;;
  5810.  
  5811.     aix4* | aix5*)
  5812.       if test "$host_cpu" = ia64; then
  5813.     # On IA64, the linker does run time linking by default, so we don't
  5814.     # have to do anything special.
  5815.     aix_use_runtimelinking=no
  5816.     exp_sym_flag='-Bexport'
  5817.     no_entry_flag=""
  5818.       else
  5819.     # If we're using GNU nm, then we don't want the "-C" option.
  5820.     # -C means demangle to AIX nm, but means don't demangle with GNU nm
  5821.     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
  5822.       _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'
  5823.     else
  5824.       _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'
  5825.     fi
  5826.     aix_use_runtimelinking=no
  5827.  
  5828.     # Test if we are trying to use run time linking or normal
  5829.     # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  5830.     # need to do runtime linking.
  5831.     case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  5832.       for ld_flag in $LDFLAGS; do
  5833.         if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  5834.           aix_use_runtimelinking=yes
  5835.           break
  5836.         fi
  5837.       done
  5838.     esac
  5839.  
  5840.     exp_sym_flag='-bexport'
  5841.     no_entry_flag='-bnoentry'
  5842.       fi
  5843.  
  5844.       # When large executables or shared objects are built, AIX ld can
  5845.       # have problems creating the table of contents.  If linking a library
  5846.       # or program results in "error TOC overflow" add -mminimal-toc to
  5847.       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
  5848.       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  5849.  
  5850.       _LT_AC_TAGVAR(archive_cmds, $1)=''
  5851.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5852.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
  5853.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  5854.  
  5855.       if test "$GCC" = yes; then
  5856.     case $host_os in aix4.[012]|aix4.[012].*)
  5857.     # We only want to do this on AIX 4.2 and lower, the check
  5858.     # below for broken collect2 doesn't work under 4.3+
  5859.       collect2name=`${CC} -print-prog-name=collect2`
  5860.       if test -f "$collect2name" && \
  5861.          strings "$collect2name" | grep resolve_lib_name >/dev/null
  5862.       then
  5863.         # We have reworked collect2
  5864.         _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  5865.       else
  5866.         # We have old collect2
  5867.         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
  5868.         # It fails to find uninstalled libraries when the uninstalled
  5869.         # path is not listed in the libpath.  Setting hardcode_minus_L
  5870.         # to unsupported forces relinking
  5871.         _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5872.         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5873.         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
  5874.       fi
  5875.     esac
  5876.     shared_flag='-shared'
  5877.       else
  5878.     # not using gcc
  5879.     if test "$host_cpu" = ia64; then
  5880.       # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
  5881.       # chokes on -Wl,-G. The following line is correct:
  5882.       shared_flag='-G'
  5883.     else
  5884.       if test "$aix_use_runtimelinking" = yes; then
  5885.         shared_flag='${wl}-G'
  5886.       else
  5887.         shared_flag='${wl}-bM:SRE'
  5888.       fi
  5889.     fi
  5890.       fi
  5891.  
  5892.       # It seems that -bexpall does not export symbols beginning with
  5893.       # underscore (_), so it is better to generate a list of symbols to export.
  5894.       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5895.       if test "$aix_use_runtimelinking" = yes; then
  5896.     # Warning - without using the other runtime loading flags (-brtl),
  5897.     # -berok will link without error, but may produce a broken library.
  5898.     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
  5899.        # Determine the default libpath from the value encoded in an empty executable.
  5900.        _LT_AC_SYS_LIBPATH_AIX
  5901.        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5902.     _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"
  5903.        else
  5904.     if test "$host_cpu" = ia64; then
  5905.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
  5906.       _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
  5907.       _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"
  5908.     else
  5909.      # Determine the default libpath from the value encoded in an empty executable.
  5910.      _LT_AC_SYS_LIBPATH_AIX
  5911.      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
  5912.       # Warning - without using the other run time loading flags,
  5913.       # -berok will link without error, but may produce a broken library.
  5914.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
  5915.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
  5916.       # -bexpall does not export symbols beginning with underscore (_)
  5917.       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
  5918.       # Exported symbols can be pulled into shared objects from archives
  5919.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
  5920.       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  5921.       # This is similar to how AIX traditionally builds it's shared libraries.
  5922.       _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'
  5923.     fi
  5924.       fi
  5925.       ;;
  5926.  
  5927.     amigaos*)
  5928.       _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)'
  5929.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  5930.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  5931.       # see comment about different semantics on the GNU ld section
  5932.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  5933.       ;;
  5934.  
  5935.     bsdi4*)
  5936.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
  5937.       ;;
  5938.  
  5939.     cygwin* | mingw* | pw32*)
  5940.       # When not using gcc, we currently assume that we are using
  5941.       # Microsoft Visual C++.
  5942.       # hardcode_libdir_flag_spec is actually meaningless, as there is
  5943.       # no search path for DLLs.
  5944.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
  5945.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  5946.       # Tell ltmain to make .lib files, not .a files.
  5947.       libext=lib
  5948.       # Tell ltmain to make .dll files, not .so files.
  5949.       shrext_cmds=".dll"
  5950.       # FIXME: Setting linknames here is a bad hack.
  5951.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
  5952.       # The linker will automatically build a .lib file if we build a DLL.
  5953.       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
  5954.       # FIXME: Should let the user specify the lib program.
  5955.       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
  5956.       fix_srcfile_path='`cygpath -w "$srcfile"`'
  5957.       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
  5958.       ;;
  5959.  
  5960.     darwin* | rhapsody*)
  5961.     if test "$GXX" = yes ; then
  5962.       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  5963.       case "$host_os" in
  5964.       rhapsody* | darwin1.[[012]])
  5965.     _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
  5966.     ;;
  5967.       *) # Darwin 1.3 on
  5968.       if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
  5969.           _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  5970.       else
  5971.         case ${MACOSX_DEPLOYMENT_TARGET} in
  5972.           10.[[012]])
  5973.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
  5974.             ;;
  5975.           10.*)
  5976.             _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup'
  5977.             ;;
  5978.         esac
  5979.       fi
  5980.     ;;
  5981.       esac
  5982.         lt_int_apple_cc_single_mod=no
  5983.         output_verbose_link_cmd='echo'
  5984.         if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
  5985.           lt_int_apple_cc_single_mod=yes
  5986.         fi
  5987.         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  5988.           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
  5989.         else
  5990.         _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'
  5991.       fi
  5992.       _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
  5993.       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
  5994.         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
  5995.           _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}'
  5996.         else
  5997.           _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}'
  5998.         fi
  5999.           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
  6000.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  6001.       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
  6002.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
  6003.       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
  6004.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6005.     else
  6006.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6007.     fi
  6008.       ;;
  6009.  
  6010.     dgux*)
  6011.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6012.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6013.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6014.       ;;
  6015.  
  6016.     freebsd1*)
  6017.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6018.       ;;
  6019.  
  6020.     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  6021.     # support.  Future versions do this automatically, but an explicit c++rt0.o
  6022.     # does not break anything, and helps significantly (at the cost of a little
  6023.     # extra space).
  6024.     freebsd2.2*)
  6025.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  6026.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6027.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6028.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6029.       ;;
  6030.  
  6031.     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  6032.     freebsd2*)
  6033.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6034.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6035.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6036.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6037.       ;;
  6038.  
  6039.     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  6040.     freebsd* | kfreebsd*-gnu)
  6041.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  6042.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6043.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6044.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6045.       ;;
  6046.  
  6047.     hpux9*)
  6048.       if test "$GCC" = yes; then
  6049.     _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'
  6050.       else
  6051.     _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'
  6052.       fi
  6053.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6054.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6055.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6056.  
  6057.       # hardcode_minus_L: Not really in the search PATH,
  6058.       # but as the default location of the library.
  6059.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6060.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6061.       ;;
  6062.  
  6063.     hpux10* | hpux11*)
  6064.       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
  6065.     case "$host_cpu" in
  6066.     hppa*64*|ia64*)
  6067.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6068.       ;;
  6069.     *)
  6070.       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
  6071.       ;;
  6072.     esac
  6073.       else
  6074.     case "$host_cpu" in
  6075.     hppa*64*|ia64*)
  6076.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
  6077.       ;;
  6078.     *)
  6079.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
  6080.       ;;
  6081.     esac
  6082.       fi
  6083.       if test "$with_gnu_ld" = no; then
  6084.     case "$host_cpu" in
  6085.     hppa*64*)
  6086.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6087.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
  6088.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6089.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  6090.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6091.       ;;
  6092.     ia64*)
  6093.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6094.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  6095.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6096.  
  6097.       # hardcode_minus_L: Not really in the search PATH,
  6098.       # but as the default location of the library.
  6099.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6100.       ;;
  6101.     *)
  6102.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
  6103.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6104.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6105.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6106.  
  6107.       # hardcode_minus_L: Not really in the search PATH,
  6108.       # but as the default location of the library.
  6109.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6110.       ;;
  6111.     esac
  6112.       fi
  6113.       ;;
  6114.  
  6115.     irix5* | irix6* | nonstopux*)
  6116.       if test "$GCC" = yes; then
  6117.     _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'
  6118.       else
  6119.     _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'
  6120.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
  6121.       fi
  6122.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6123.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6124.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6125.       ;;
  6126.  
  6127.     netbsd* | netbsdelf*-gnu | knetbsd*-gnu)
  6128.       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  6129.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
  6130.       else
  6131.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
  6132.       fi
  6133.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6134.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6135.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6136.       ;;
  6137.  
  6138.     newsos6)
  6139.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6140.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6141.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6142.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6143.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6144.       ;;
  6145.  
  6146.     openbsd*)
  6147.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6148.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6149.       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  6150.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6151.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6152.     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
  6153.       else
  6154.        case $host_os in
  6155.      openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  6156.        _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  6157.        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6158.        ;;
  6159.      *)
  6160.        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
  6161.        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
  6162.        ;;
  6163.        esac
  6164.       fi
  6165.       ;;
  6166.  
  6167.     os2*)
  6168.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6169.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6170.       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
  6171.       _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'
  6172.       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  6173.       ;;
  6174.  
  6175.     osf3*)
  6176.       if test "$GCC" = yes; then
  6177.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6178.     _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'
  6179.       else
  6180.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6181.     _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'
  6182.       fi
  6183.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6184.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6185.       ;;
  6186.  
  6187.     osf4* | osf5*)    # as osf3* with the addition of -msym flag
  6188.       if test "$GCC" = yes; then
  6189.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
  6190.     _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'
  6191.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
  6192.       else
  6193.     _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
  6194.     _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'
  6195.     _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~
  6196.     $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'
  6197.  
  6198.     # Both c and cxx compiler support -rpath directly
  6199.     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
  6200.       fi
  6201.       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
  6202.       ;;
  6203.  
  6204.     sco3.2v5*)
  6205.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6206.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6207.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
  6208.       runpath_var=LD_RUN_PATH
  6209.       hardcode_runpath_var=yes
  6210.       ;;
  6211.  
  6212.     solaris*)
  6213.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  6214.       if test "$GCC" = yes; then
  6215.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6216.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6217.       $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
  6218.       else
  6219.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6220.     _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6221.       $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  6222.       fi
  6223.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
  6224.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6225.       case $host_os in
  6226.       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  6227.       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  6228.     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
  6229.       esac
  6230.       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
  6231.       ;;
  6232.  
  6233.     sunos4*)
  6234.       if test "x$host_vendor" = xsequent; then
  6235.     # Use $CC to link under sequent, because it throws in some extra .o
  6236.     # files that make .init and .fini sections work.
  6237.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  6238.       else
  6239.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  6240.       fi
  6241.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6242.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6243.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
  6244.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6245.       ;;
  6246.  
  6247.     sysv4)
  6248.       case $host_vendor in
  6249.     sni)
  6250.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6251.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
  6252.     ;;
  6253.     siemens)
  6254.       ## LD is ld it makes a PLAMLIB
  6255.       ## CC just makes a GrossModule.
  6256.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  6257.       _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
  6258.       _LT_AC_TAGVAR(hardcode_direct, $1)=no
  6259.         ;;
  6260.     motorola)
  6261.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6262.       _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
  6263.     ;;
  6264.       esac
  6265.       runpath_var='LD_RUN_PATH'
  6266.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6267.       ;;
  6268.  
  6269.     sysv4.3*)
  6270.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6271.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6272.       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
  6273.       ;;
  6274.  
  6275.     sysv4*MP*)
  6276.       if test -d /usr/nec; then
  6277.     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6278.     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6279.     runpath_var=LD_RUN_PATH
  6280.     hardcode_runpath_var=yes
  6281.     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
  6282.       fi
  6283.       ;;
  6284.  
  6285.     sysv4.2uw2*)
  6286.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  6287.       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
  6288.       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
  6289.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6290.       hardcode_runpath_var=yes
  6291.       runpath_var=LD_RUN_PATH
  6292.       ;;
  6293.  
  6294.    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
  6295.       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
  6296.       if test "$GCC" = yes; then
  6297.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6298.       else
  6299.     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  6300.       fi
  6301.       runpath_var='LD_RUN_PATH'
  6302.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6303.       ;;
  6304.  
  6305.     sysv5*)
  6306.       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
  6307.       # $CC -shared without GNU ld will not create a library from C++
  6308.       # object files and a static libstdc++, better avoid it by now
  6309.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6310.       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  6311.           $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  6312.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
  6313.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6314.       runpath_var='LD_RUN_PATH'
  6315.       ;;
  6316.  
  6317.     uts4*)
  6318.       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  6319.       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
  6320.       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
  6321.       ;;
  6322.  
  6323.     *)
  6324.       _LT_AC_TAGVAR(ld_shlibs, $1)=no
  6325.       ;;
  6326.     esac
  6327.   fi
  6328. ])
  6329. AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
  6330. test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
  6331.  
  6332. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  6333. if test "$GCC" = yes; then
  6334.   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  6335. fi
  6336.  
  6337. #
  6338. # Do we need to explicitly link libc?
  6339. #
  6340. case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
  6341. x|xyes)
  6342.   # Assume -lc should be added
  6343.   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  6344.  
  6345.   if test "$enable_shared" = yes && test "$GCC" = yes; then
  6346.     case $_LT_AC_TAGVAR(archive_cmds, $1) in
  6347.     *'~'*)
  6348.       # FIXME: we may have to deal with multi-command sequences.
  6349.       ;;
  6350.     '$CC '*)
  6351.       # Test whether the compiler implicitly links with -lc since on some
  6352.       # systems, -lgcc has to come before -lc. If gcc already passes -lc
  6353.       # to ld, don't add -lc before -lgcc.
  6354.       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  6355.       $rm conftest*
  6356.       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
  6357.  
  6358.       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
  6359.         soname=conftest
  6360.         lib=conftest
  6361.         libobjs=conftest.$ac_objext
  6362.         deplibs=
  6363.         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
  6364.         compiler_flags=-v
  6365.         linker_flags=-v
  6366.         verstring=
  6367.         output_objdir=.
  6368.         libname=conftest
  6369.         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
  6370.         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
  6371.         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  6372.         then
  6373.       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
  6374.         else
  6375.       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
  6376.         fi
  6377.         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
  6378.       else
  6379.         cat conftest.err 1>&5
  6380.       fi
  6381.       $rm conftest*
  6382.       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
  6383.       ;;
  6384.     esac
  6385.   fi
  6386.   ;;
  6387. esac
  6388. ])# AC_LIBTOOL_PROG_LD_SHLIBS
  6389.  
  6390.  
  6391. # _LT_AC_FILE_LTDLL_C
  6392. # -------------------
  6393. # Be careful that the start marker always follows a newline.
  6394. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
  6395. # /* ltdll.c starts here */
  6396. # #define WIN32_LEAN_AND_MEAN
  6397. # #include <windows.h>
  6398. # #undef WIN32_LEAN_AND_MEAN
  6399. # #include <stdio.h>
  6400. #
  6401. # #ifndef __CYGWIN__
  6402. # #  ifdef __CYGWIN32__
  6403. # #    define __CYGWIN__ __CYGWIN32__
  6404. # #  endif
  6405. # #endif
  6406. #
  6407. # #ifdef __cplusplus
  6408. # extern "C" {
  6409. # #endif
  6410. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  6411. # #ifdef __cplusplus
  6412. # }
  6413. # #endif
  6414. #
  6415. # #ifdef __CYGWIN__
  6416. # #include <cygwin/cygwin_dll.h>
  6417. # DECLARE_CYGWIN_DLL( DllMain );
  6418. # #endif
  6419. # HINSTANCE __hDllInstance_base;
  6420. #
  6421. # BOOL APIENTRY
  6422. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  6423. # {
  6424. #   __hDllInstance_base = hInst;
  6425. #   return TRUE;
  6426. # }
  6427. # /* ltdll.c ends here */
  6428. ])# _LT_AC_FILE_LTDLL_C
  6429.  
  6430.  
  6431. # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
  6432. # ---------------------------------
  6433. AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
  6434.  
  6435.  
  6436. # old names
  6437. AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
  6438. AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
  6439. AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
  6440. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  6441. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  6442. AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
  6443. AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
  6444.  
  6445. # This is just to silence aclocal about the macro not being used
  6446. ifelse([AC_DISABLE_FAST_INSTALL])
  6447.  
  6448. AC_DEFUN([LT_AC_PROG_GCJ],
  6449. [AC_CHECK_TOOL(GCJ, gcj, no)
  6450.   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
  6451.   AC_SUBST(GCJFLAGS)
  6452. ])
  6453.  
  6454. AC_DEFUN([LT_AC_PROG_RC],
  6455. [AC_CHECK_TOOL(RC, windres, no)
  6456. ])
  6457.  
  6458. # NOTE: This macro has been submitted for inclusion into   #
  6459. #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
  6460. #  a released version of Autoconf we should remove this    #
  6461. #  macro and use it instead.                               #
  6462. # LT_AC_PROG_SED
  6463. # --------------
  6464. # Check for a fully-functional sed program, that truncates
  6465. # as few characters as possible.  Prefer GNU sed if found.
  6466. AC_DEFUN([LT_AC_PROG_SED],
  6467. [AC_MSG_CHECKING([for a sed that does not truncate output])
  6468. AC_CACHE_VAL(lt_cv_path_SED,
  6469. [# Loop through the user's path and test for sed and gsed.
  6470. # Then use that list of sed's as ones to test for truncation.
  6471. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  6472. for as_dir in $PATH
  6473. do
  6474.   IFS=$as_save_IFS
  6475.   test -z "$as_dir" && as_dir=.
  6476.   for lt_ac_prog in sed gsed; do
  6477.     for ac_exec_ext in '' $ac_executable_extensions; do
  6478.       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
  6479.         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
  6480.       fi
  6481.     done
  6482.   done
  6483. done
  6484. lt_ac_max=0
  6485. lt_ac_count=0
  6486. # Add /usr/xpg4/bin/sed as it is typically found on Solaris
  6487. # along with /bin/sed that truncates output.
  6488. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
  6489.   test ! -f $lt_ac_sed && break
  6490.   cat /dev/null > conftest.in
  6491.   lt_ac_count=0
  6492.   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
  6493.   # Check for GNU sed and select it if it is found.
  6494.   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
  6495.     lt_cv_path_SED=$lt_ac_sed
  6496.     break
  6497.   fi
  6498.   while true; do
  6499.     cat conftest.in conftest.in >conftest.tmp
  6500.     mv conftest.tmp conftest.in
  6501.     cp conftest.in conftest.nl
  6502.     echo >>conftest.nl
  6503.     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
  6504.     cmp -s conftest.out conftest.nl || break
  6505.     # 10000 chars as input seems more than enough
  6506.     test $lt_ac_count -gt 10 && break
  6507.     lt_ac_count=`expr $lt_ac_count + 1`
  6508.     if test $lt_ac_count -gt $lt_ac_max; then
  6509.       lt_ac_max=$lt_ac_count
  6510.       lt_cv_path_SED=$lt_ac_sed
  6511.     fi
  6512.   done
  6513. done
  6514. SED=$lt_cv_path_SED
  6515. ])
  6516. AC_MSG_RESULT([$SED])
  6517. ])
  6518.  
  6519. # Configure paths for LIBXML2
  6520. # Mike Hommey 2004-06-19
  6521. # use CPPFLAGS instead of CFLAGS
  6522. # Toshio Kuratomi 2001-04-21
  6523. # Adapted from:
  6524. # Configure paths for GLIB
  6525. # Owen Taylor     97-11-3
  6526.  
  6527. dnl AM_PATH_XML2([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]]])
  6528. dnl Test for XML, and define XML_CPPFLAGS and XML_LIBS
  6529. dnl
  6530. AC_DEFUN([AM_PATH_XML2],[ 
  6531. AC_ARG_WITH(xml-prefix,
  6532.             [  --with-xml-prefix=PFX   Prefix where libxml is installed (optional)],
  6533.             xml_config_prefix="$withval", xml_config_prefix="")
  6534. AC_ARG_WITH(xml-exec-prefix,
  6535.             [  --with-xml-exec-prefix=PFX Exec prefix where libxml is installed (optional)],
  6536.             xml_config_exec_prefix="$withval", xml_config_exec_prefix="")
  6537. AC_ARG_ENABLE(xmltest,
  6538.               [  --disable-xmltest       Do not try to compile and run a test LIBXML program],,
  6539.               enable_xmltest=yes)
  6540.  
  6541.   if test x$xml_config_exec_prefix != x ; then
  6542.      xml_config_args="$xml_config_args"
  6543.      if test x${XML2_CONFIG+set} != xset ; then
  6544.         XML2_CONFIG=$xml_config_exec_prefix/bin/xml2-config
  6545.      fi
  6546.   fi
  6547.   if test x$xml_config_prefix != x ; then
  6548.      xml_config_args="$xml_config_args --prefix=$xml_config_prefix"
  6549.      if test x${XML2_CONFIG+set} != xset ; then
  6550.         XML2_CONFIG=$xml_config_prefix/bin/xml2-config
  6551.      fi
  6552.   fi
  6553.  
  6554.   AC_PATH_PROG(XML2_CONFIG, xml2-config, no)
  6555.   min_xml_version=ifelse([$1], ,2.0.0,[$1])
  6556.   AC_MSG_CHECKING(for libxml - version >= $min_xml_version)
  6557.   no_xml=""
  6558.   if test "$XML2_CONFIG" = "no" ; then
  6559.     no_xml=yes
  6560.   else
  6561.     XML_CPPFLAGS=`$XML2_CONFIG $xml_config_args --cflags`
  6562.     XML_LIBS=`$XML2_CONFIG $xml_config_args --libs`
  6563.     xml_config_major_version=`$XML2_CONFIG $xml_config_args --version | \
  6564.            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
  6565.     xml_config_minor_version=`$XML2_CONFIG $xml_config_args --version | \
  6566.            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
  6567.     xml_config_micro_version=`$XML2_CONFIG $xml_config_args --version | \
  6568.            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
  6569.     if test "x$enable_xmltest" = "xyes" ; then
  6570.       ac_save_CPPFLAGS="$CPPFLAGS"
  6571.       ac_save_LIBS="$LIBS"
  6572.       CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  6573.       LIBS="$XML_LIBS $LIBS"
  6574. dnl
  6575. dnl Now check if the installed libxml is sufficiently new.
  6576. dnl (Also sanity checks the results of xml2-config to some extent)
  6577. dnl
  6578.       rm -f conf.xmltest
  6579.       AC_TRY_RUN([
  6580. #include <stdlib.h>
  6581. #include <stdio.h>
  6582. #include <string.h>
  6583. #include <libxml/xmlversion.h>
  6584.  
  6585. int 
  6586. main()
  6587. {
  6588.   int xml_major_version, xml_minor_version, xml_micro_version;
  6589.   int major, minor, micro;
  6590.   char *tmp_version;
  6591.  
  6592.   system("touch conf.xmltest");
  6593.  
  6594.   /* Capture xml2-config output via autoconf/configure variables */
  6595.   /* HP/UX 9 (%@#!) writes to sscanf strings */
  6596.   tmp_version = (char *)strdup("$min_xml_version");
  6597.   if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) {
  6598.      printf("%s, bad version string from xml2-config\n", "$min_xml_version");
  6599.      exit(1);
  6600.    }
  6601.    free(tmp_version);
  6602.  
  6603.    /* Capture the version information from the header files */
  6604.    tmp_version = (char *)strdup(LIBXML_DOTTED_VERSION);
  6605.    if (sscanf(tmp_version, "%d.%d.%d", &xml_major_version, &xml_minor_version, &xml_micro_version) != 3) {
  6606.      printf("%s, bad version string from libxml includes\n", "LIBXML_DOTTED_VERSION");
  6607.      exit(1);
  6608.    }
  6609.    free(tmp_version);
  6610.  
  6611.  /* Compare xml2-config output to the libxml headers */
  6612.   if ((xml_major_version != $xml_config_major_version) ||
  6613.       (xml_minor_version != $xml_config_minor_version) ||
  6614.       (xml_micro_version != $xml_config_micro_version))
  6615.     {
  6616.       printf("*** libxml header files (version %d.%d.%d) do not match\n",
  6617.          xml_major_version, xml_minor_version, xml_micro_version);
  6618.       printf("*** xml2-config (version %d.%d.%d)\n",
  6619.          $xml_config_major_version, $xml_config_minor_version, $xml_config_micro_version);
  6620.       return 1;
  6621.     } 
  6622. /* Compare the headers to the library to make sure we match */
  6623.   /* Less than ideal -- doesn't provide us with return value feedback, 
  6624.    * only exits if there's a serious mismatch between header and library.
  6625.    */
  6626.     LIBXML_TEST_VERSION;
  6627.  
  6628.     /* Test that the library is greater than our minimum version */
  6629.     if ((xml_major_version > major) ||
  6630.         ((xml_major_version == major) && (xml_minor_version > minor)) ||
  6631.         ((xml_major_version == major) && (xml_minor_version == minor) &&
  6632.         (xml_micro_version >= micro)))
  6633.       {
  6634.         return 0;
  6635.        }
  6636.      else
  6637.       {
  6638.         printf("\n*** An old version of libxml (%d.%d.%d) was found.\n",
  6639.                xml_major_version, xml_minor_version, xml_micro_version);
  6640.         printf("*** You need a version of libxml newer than %d.%d.%d. The latest version of\n",
  6641.            major, minor, micro);
  6642.         printf("*** libxml is always available from ftp://ftp.xmlsoft.org.\n");
  6643.         printf("***\n");
  6644.         printf("*** If you have already installed a sufficiently new version, this error\n");
  6645.         printf("*** probably means that the wrong copy of the xml2-config shell script is\n");
  6646.         printf("*** being found. The easiest way to fix this is to remove the old version\n");
  6647.         printf("*** of LIBXML, but you can also set the XML2_CONFIG environment to point to the\n");
  6648.         printf("*** correct copy of xml2-config. (In this case, you will have to\n");
  6649.         printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
  6650.         printf("*** so that the correct libraries are found at run-time))\n");
  6651.     }
  6652.   return 1;
  6653. }
  6654. ],, no_xml=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
  6655.        CPPFLAGS="$ac_save_CPPFLAGS"
  6656.        LIBS="$ac_save_LIBS"
  6657.      fi
  6658.   fi
  6659.  
  6660.   if test "x$no_xml" = x ; then
  6661.      AC_MSG_RESULT(yes (version $xml_config_major_version.$xml_config_minor_version.$xml_config_micro_version))
  6662.      ifelse([$2], , :, [$2])     
  6663.   else
  6664.      AC_MSG_RESULT(no)
  6665.      if test "$XML2_CONFIG" = "no" ; then
  6666.        echo "*** The xml2-config script installed by LIBXML could not be found"
  6667.        echo "*** If libxml was installed in PREFIX, make sure PREFIX/bin is in"
  6668.        echo "*** your path, or set the XML2_CONFIG environment variable to the"
  6669.        echo "*** full path to xml2-config."
  6670.      else
  6671.        if test -f conf.xmltest ; then
  6672.         :
  6673.        else
  6674.           echo "*** Could not run libxml test program, checking why..."
  6675.           CPPFLAGS="$CPPFLAGS $XML_CPPFLAGS"
  6676.           LIBS="$LIBS $XML_LIBS"
  6677.           AC_TRY_LINK([
  6678. #include <libxml/xmlversion.h>
  6679. #include <stdio.h>
  6680. ],      [ LIBXML_TEST_VERSION; return 0;],
  6681.         [ echo "*** The test program compiled, but did not run. This usually means"
  6682.           echo "*** that the run-time linker is not finding LIBXML or finding the wrong"
  6683.           echo "*** version of LIBXML. If it is not finding LIBXML, you'll need to set your"
  6684.           echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
  6685.           echo "*** to the installed location  Also, make sure you have run ldconfig if that"
  6686.           echo "*** is required on your system"
  6687.           echo "***"
  6688.           echo "*** If you have an old version installed, it is best to remove it, although"
  6689.           echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
  6690.         [ echo "*** The test program failed to compile or link. See the file config.log for the"
  6691.           echo "*** exact error that occured. This usually means LIBXML was incorrectly installed"
  6692.           echo "*** or that you have moved LIBXML since it was installed. In the latter case, you"
  6693.           echo "*** may want to edit the xml2-config script: $XML2_CONFIG" ])
  6694.           CPPFLAGS="$ac_save_CPPFLAGS"
  6695.           LIBS="$ac_save_LIBS"
  6696.        fi
  6697.      fi
  6698.  
  6699.      XML_CPPFLAGS=""
  6700.      XML_LIBS=""
  6701.      ifelse([$3], , :, [$3])
  6702.   fi
  6703.   AC_SUBST(XML_CPPFLAGS)
  6704.   AC_SUBST(XML_LIBS)
  6705.   rm -f conf.xmltest
  6706. ])
  6707.  
  6708. # pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
  6709. # Copyright ┬⌐ 2004 Scott James Remnant <scott@netsplit.com>.
  6710. #
  6711. # This program is free software; you can redistribute it and/or modify
  6712. # it under the terms of the GNU General Public License as published by
  6713. # the Free Software Foundation; either version 2 of the License, or
  6714. # (at your option) any later version.
  6715. #
  6716. # This program is distributed in the hope that it will be useful, but
  6717. # WITHOUT ANY WARRANTY; without even the implied warranty of
  6718. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  6719. # General Public License for more details.
  6720. #
  6721. # You should have received a copy of the GNU General Public License
  6722. # along with this program; if not, write to the Free Software
  6723. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  6724. #
  6725. # As a special exception to the GNU General Public License, if you
  6726. # distribute this file as part of a program that contains a
  6727. # configuration script generated by Autoconf, you may include it under
  6728. # the same distribution terms that you use for the rest of that program.
  6729.  
  6730. # PKG_PROG_PKG_CONFIG([MIN-VERSION])
  6731. # ----------------------------------
  6732. AC_DEFUN([PKG_PROG_PKG_CONFIG],
  6733. [m4_pattern_forbid([^_?PKG_[A-Z_]+$])
  6734. m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
  6735. AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
  6736. if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
  6737.     AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
  6738. fi
  6739. if test -n "$PKG_CONFIG"; then
  6740.     _pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
  6741.     AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
  6742.     if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
  6743.         AC_MSG_RESULT([yes])
  6744.     else
  6745.         AC_MSG_RESULT([no])
  6746.         PKG_CONFIG=""
  6747.     fi
  6748.         
  6749. fi[]dnl
  6750. ])# PKG_PROG_PKG_CONFIG
  6751.  
  6752. # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
  6753. # ---------------------------------------------
  6754. m4_define([_PKG_CONFIG],
  6755. [if test "x$ac_cv_env_[]$1[]_set" = "xset"; then
  6756.     pkg_cv_[]$1=$ac_cv_env_[]$1[]_value
  6757. elif test -n "$PKG_CONFIG"; then
  6758.     if AC_RUN_LOG([$PKG_CONFIG --exists "$3" >/dev/null 2>&1]); then
  6759.         pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
  6760.     else
  6761.         pkg_failed=yes
  6762.     fi
  6763. else
  6764.     pkg_failed=untried
  6765. fi[]dnl
  6766. ])# _PKG_CONFIG
  6767.  
  6768. # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
  6769. # [ACTION-IF-NOT-FOUND])
  6770. #
  6771. #
  6772. # Note that if there is a possibility the first call to
  6773. # PKG_CHECK_MODULES might not happen, you should be sure to include an
  6774. # explicit call to PKG_PROG_PKG_CONFIG in your configure.in
  6775. #
  6776. #
  6777. # --------------------------------------------------------------
  6778. AC_DEFUN([PKG_CHECK_MODULES],
  6779. [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
  6780. AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
  6781. AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
  6782.  
  6783. pkg_failed=no
  6784. AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS],
  6785.     [_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])])
  6786. AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS],
  6787.     [_PKG_CONFIG([$1][_LIBS], [libs], [$2])])
  6788.  
  6789. if test $pkg_failed = yes; then
  6790.     $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
  6791.     # Put the nasty error message in config.log where it belongs
  6792.     echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
  6793.  
  6794.     ifelse([$4], , [AC_MSG_ERROR(dnl
  6795. [Package requirements ($2) were not met.
  6796. Consider adjusting the PKG_CONFIG_PATH environment variable if you
  6797. installed software in a non-standard prefix.
  6798.  
  6799. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
  6800. to avoid the need to call pkg-config.  See the pkg-config man page for
  6801. more details.])],
  6802.         [$4])
  6803. elif test $pkg_failed = untried; then
  6804.     ifelse([$4], , [AC_MSG_FAILURE(dnl
  6805. [The pkg-config script could not be found or is too old.  Make sure it
  6806. is in your PATH or set the PKG_CONFIG environment variable to the full
  6807. path to pkg-config.
  6808.  
  6809. Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
  6810. to avoid the need to call pkg-config.  See the pkg-config man page for
  6811. more details.
  6812.  
  6813. To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
  6814.         [$4])
  6815. else
  6816.     $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
  6817.     $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
  6818.     ifelse([$3], , :, [$3])
  6819. fi[]dnl
  6820. ])# PKG_CHECK_MODULES
  6821.  
  6822. #                                                        -*- Autoconf -*-
  6823. # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
  6824. # Generated from amversion.in; do not edit by hand.
  6825.  
  6826. # This program is free software; you can redistribute it and/or modify
  6827. # it under the terms of the GNU General Public License as published by
  6828. # the Free Software Foundation; either version 2, or (at your option)
  6829. # any later version.
  6830.  
  6831. # This program is distributed in the hope that it will be useful,
  6832. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  6833. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  6834. # GNU General Public License for more details.
  6835.  
  6836. # You should have received a copy of the GNU General Public License
  6837. # along with this program; if not, write to the Free Software
  6838. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  6839.  
  6840. # AM_AUTOMAKE_VERSION(VERSION)
  6841. # ----------------------------
  6842. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  6843. # generated from the m4 files accompanying Automake X.Y.
  6844. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"])
  6845.  
  6846. # AM_SET_CURRENT_AUTOMAKE_VERSION
  6847. # -------------------------------
  6848. # Call AM_AUTOMAKE_VERSION so it can be traced.
  6849. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  6850. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  6851.      [AM_AUTOMAKE_VERSION([1.8.5])])
  6852.  
  6853. # AM_AUX_DIR_EXPAND
  6854.  
  6855. # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  6856.  
  6857. # This program is free software; you can redistribute it and/or modify
  6858. # it under the terms of the GNU General Public License as published by
  6859. # the Free Software Foundation; either version 2, or (at your option)
  6860. # any later version.
  6861.  
  6862. # This program is distributed in the hope that it will be useful,
  6863. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  6864. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  6865. # GNU General Public License for more details.
  6866.  
  6867. # You should have received a copy of the GNU General Public License
  6868. # along with this program; if not, write to the Free Software
  6869. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  6870. # 02111-1307, USA.
  6871.  
  6872. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  6873. # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
  6874. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  6875. #
  6876. # Of course, Automake must honor this variable whenever it calls a
  6877. # tool from the auxiliary directory.  The problem is that $srcdir (and
  6878. # therefore $ac_aux_dir as well) can be either absolute or relative,
  6879. # depending on how configure is run.  This is pretty annoying, since
  6880. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  6881. # source directory, any form will work fine, but in subdirectories a
  6882. # relative path needs to be adjusted first.
  6883. #
  6884. # $ac_aux_dir/missing
  6885. #    fails when called from a subdirectory if $ac_aux_dir is relative
  6886. # $top_srcdir/$ac_aux_dir/missing
  6887. #    fails if $ac_aux_dir is absolute,
  6888. #    fails when called from a subdirectory in a VPATH build with
  6889. #          a relative $ac_aux_dir
  6890. #
  6891. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  6892. # are both prefixed by $srcdir.  In an in-source build this is usually
  6893. # harmless because $srcdir is `.', but things will broke when you
  6894. # start a VPATH build or use an absolute $srcdir.
  6895. #
  6896. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  6897. # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
  6898. #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  6899. # and then we would define $MISSING as
  6900. #   MISSING="\${SHELL} $am_aux_dir/missing"
  6901. # This will work as long as MISSING is not called from configure, because
  6902. # unfortunately $(top_srcdir) has no meaning in configure.
  6903. # However there are other variables, like CC, which are often used in
  6904. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  6905. #
  6906. # Another solution, used here, is to always expand $ac_aux_dir to an
  6907. # absolute PATH.  The drawback is that using absolute paths prevent a
  6908. # configured tree to be moved without reconfiguration.
  6909.  
  6910. AC_DEFUN([AM_AUX_DIR_EXPAND],
  6911. [dnl Rely on autoconf to set up CDPATH properly.
  6912. AC_PREREQ([2.50])dnl
  6913. # expand $ac_aux_dir to an absolute path
  6914. am_aux_dir=`cd $ac_aux_dir && pwd`
  6915. ])
  6916.  
  6917.  
  6918. # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003
  6919. # Free Software Foundation, Inc.
  6920.  
  6921. # This program is free software; you can redistribute it and/or modify
  6922. # it under the terms of the GNU General Public License as published by
  6923. # the Free Software Foundation; either version 2, or (at your option)
  6924. # any later version.
  6925.  
  6926. # This program is distributed in the hope that it will be useful,
  6927. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  6928. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  6929. # GNU General Public License for more details.
  6930.  
  6931. # You should have received a copy of the GNU General Public License
  6932. # along with this program; if not, write to the Free Software
  6933. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  6934. # 02111-1307, USA.
  6935.  
  6936. # serial 3
  6937.  
  6938. # This was merged into AC_PROG_CC in Autoconf.
  6939.  
  6940. AU_DEFUN([AM_PROG_CC_STDC],
  6941. [AC_PROG_CC
  6942. AC_DIAGNOSE([obsolete], [$0:
  6943.     your code should no longer depend upon `am_cv_prog_cc_stdc', but upon
  6944.     `ac_cv_prog_cc_stdc'.  Remove this warning and the assignment when
  6945.     you adjust the code.  You can also remove the above call to
  6946.     AC_PROG_CC if you already called it elsewhere.])
  6947. am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc
  6948. ])
  6949. AU_DEFUN([fp_PROG_CC_STDC])
  6950.  
  6951. # AM_CONDITIONAL                                              -*- Autoconf -*-
  6952.  
  6953. # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
  6954.  
  6955. # This program is free software; you can redistribute it and/or modify
  6956. # it under the terms of the GNU General Public License as published by
  6957. # the Free Software Foundation; either version 2, or (at your option)
  6958. # any later version.
  6959.  
  6960. # This program is distributed in the hope that it will be useful,
  6961. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  6962. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  6963. # GNU General Public License for more details.
  6964.  
  6965. # You should have received a copy of the GNU General Public License
  6966. # along with this program; if not, write to the Free Software
  6967. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  6968. # 02111-1307, USA.
  6969.  
  6970. # serial 6
  6971.  
  6972. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  6973. # -------------------------------------
  6974. # Define a conditional.
  6975. AC_DEFUN([AM_CONDITIONAL],
  6976. [AC_PREREQ(2.52)dnl
  6977.  ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
  6978.     [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  6979. AC_SUBST([$1_TRUE])
  6980. AC_SUBST([$1_FALSE])
  6981. if $2; then
  6982.   $1_TRUE=
  6983.   $1_FALSE='#'
  6984. else
  6985.   $1_TRUE='#'
  6986.   $1_FALSE=
  6987. fi
  6988. AC_CONFIG_COMMANDS_PRE(
  6989. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  6990.   AC_MSG_ERROR([conditional "$1" was never defined.
  6991. Usually this means the macro was only invoked conditionally.])
  6992. fi])])
  6993.  
  6994. # serial 7                        -*- Autoconf -*-
  6995.  
  6996. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004
  6997. # Free Software Foundation, Inc.
  6998.  
  6999. # This program is free software; you can redistribute it and/or modify
  7000. # it under the terms of the GNU General Public License as published by
  7001. # the Free Software Foundation; either version 2, or (at your option)
  7002. # any later version.
  7003.  
  7004. # This program is distributed in the hope that it will be useful,
  7005. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7006. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7007. # GNU General Public License for more details.
  7008.  
  7009. # You should have received a copy of the GNU General Public License
  7010. # along with this program; if not, write to the Free Software
  7011. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7012. # 02111-1307, USA.
  7013.  
  7014.  
  7015. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  7016. # written in clear, in which case automake, when reading aclocal.m4,
  7017. # will think it sees a *use*, and therefore will trigger all it's
  7018. # C support machinery.  Also note that it means that autoscan, seeing
  7019. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  7020.  
  7021.  
  7022.  
  7023. # _AM_DEPENDENCIES(NAME)
  7024. # ----------------------
  7025. # See how the compiler implements dependency checking.
  7026. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  7027. # We try a few techniques and use that to set a single cache variable.
  7028. #
  7029. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  7030. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  7031. # dependency, and given that the user is not expected to run this macro,
  7032. # just rely on AC_PROG_CC.
  7033. AC_DEFUN([_AM_DEPENDENCIES],
  7034. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  7035. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  7036. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  7037. AC_REQUIRE([AM_DEP_TRACK])dnl
  7038.  
  7039. ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
  7040.        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
  7041.        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  7042.        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
  7043.                    [depcc="$$1"   am_compiler_list=])
  7044.  
  7045. AC_CACHE_CHECK([dependency style of $depcc],
  7046.                [am_cv_$1_dependencies_compiler_type],
  7047. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  7048.   # We make a subdir and do the tests there.  Otherwise we can end up
  7049.   # making bogus files that we don't know about and never remove.  For
  7050.   # instance it was reported that on HP-UX the gcc test will end up
  7051.   # making a dummy file named `D' -- because `-MD' means `put the output
  7052.   # in D'.
  7053.   mkdir conftest.dir
  7054.   # Copy depcomp to subdir because otherwise we won't find it if we're
  7055.   # using a relative directory.
  7056.   cp "$am_depcomp" conftest.dir
  7057.   cd conftest.dir
  7058.   # We will build objects and dependencies in a subdirectory because
  7059.   # it helps to detect inapplicable dependency modes.  For instance
  7060.   # both Tru64's cc and ICC support -MD to output dependencies as a
  7061.   # side effect of compilation, but ICC will put the dependencies in
  7062.   # the current directory while Tru64 will put them in the object
  7063.   # directory.
  7064.   mkdir sub
  7065.  
  7066.   am_cv_$1_dependencies_compiler_type=none
  7067.   if test "$am_compiler_list" = ""; then
  7068.      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  7069.   fi
  7070.   for depmode in $am_compiler_list; do
  7071.     # Setup a source with many dependencies, because some compilers
  7072.     # like to wrap large dependency lists on column 80 (with \), and
  7073.     # we should not choose a depcomp mode which is confused by this.
  7074.     #
  7075.     # We need to recreate these files for each test, as the compiler may
  7076.     # overwrite some of them when testing with obscure command lines.
  7077.     # This happens at least with the AIX C compiler.
  7078.     : > sub/conftest.c
  7079.     for i in 1 2 3 4 5 6; do
  7080.       echo '#include "conftst'$i'.h"' >> sub/conftest.c
  7081.       # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
  7082.       # Solaris 8's {/usr,}/bin/sh.
  7083.       touch sub/conftst$i.h
  7084.     done
  7085.     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
  7086.  
  7087.     case $depmode in
  7088.     nosideeffect)
  7089.       # after this tag, mechanisms are not by side-effect, so they'll
  7090.       # only be used when explicitly requested
  7091.       if test "x$enable_dependency_tracking" = xyes; then
  7092.     continue
  7093.       else
  7094.     break
  7095.       fi
  7096.       ;;
  7097.     none) break ;;
  7098.     esac
  7099.     # We check with `-c' and `-o' for the sake of the "dashmstdout"
  7100.     # mode.  It turns out that the SunPro C++ compiler does not properly
  7101.     # handle `-M -o', and we need to detect this.
  7102.     if depmode=$depmode \
  7103.        source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
  7104.        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
  7105.        $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
  7106.          >/dev/null 2>conftest.err &&
  7107.        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
  7108.        grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
  7109.        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  7110.       # icc doesn't choke on unknown options, it will just issue warnings
  7111.       # or remarks (even with -Werror).  So we grep stderr for any message
  7112.       # that says an option was ignored or not supported.
  7113.       # When given -MP, icc 7.0 and 7.1 complain thusly:
  7114.       #   icc: Command line warning: ignoring option '-M'; no argument required
  7115.       # The diagnosis changed in icc 8.0:
  7116.       #   icc: Command line remark: option '-MP' not supported
  7117.       if (grep 'ignoring option' conftest.err ||
  7118.           grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
  7119.         am_cv_$1_dependencies_compiler_type=$depmode
  7120.         break
  7121.       fi
  7122.     fi
  7123.   done
  7124.  
  7125.   cd ..
  7126.   rm -rf conftest.dir
  7127. else
  7128.   am_cv_$1_dependencies_compiler_type=none
  7129. fi
  7130. ])
  7131. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  7132. AM_CONDITIONAL([am__fastdep$1], [
  7133.   test "x$enable_dependency_tracking" != xno \
  7134.   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
  7135. ])
  7136.  
  7137.  
  7138. # AM_SET_DEPDIR
  7139. # -------------
  7140. # Choose a directory name for dependency files.
  7141. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  7142. AC_DEFUN([AM_SET_DEPDIR],
  7143. [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  7144. AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
  7145. ])
  7146.  
  7147.  
  7148. # AM_DEP_TRACK
  7149. # ------------
  7150. AC_DEFUN([AM_DEP_TRACK],
  7151. [AC_ARG_ENABLE(dependency-tracking,
  7152. [  --disable-dependency-tracking  speeds up one-time build
  7153.   --enable-dependency-tracking   do not reject slow dependency extractors])
  7154. if test "x$enable_dependency_tracking" != xno; then
  7155.   am_depcomp="$ac_aux_dir/depcomp"
  7156.   AMDEPBACKSLASH='\'
  7157. fi
  7158. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  7159. AC_SUBST([AMDEPBACKSLASH])
  7160. ])
  7161.  
  7162. # Generate code to set up dependency tracking.   -*- Autoconf -*-
  7163.  
  7164. # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
  7165.  
  7166. # This program is free software; you can redistribute it and/or modify
  7167. # it under the terms of the GNU General Public License as published by
  7168. # the Free Software Foundation; either version 2, or (at your option)
  7169. # any later version.
  7170.  
  7171. # This program is distributed in the hope that it will be useful,
  7172. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7173. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7174. # GNU General Public License for more details.
  7175.  
  7176. # You should have received a copy of the GNU General Public License
  7177. # along with this program; if not, write to the Free Software
  7178. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7179. # 02111-1307, USA.
  7180.  
  7181. #serial 2
  7182.  
  7183. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  7184. # ------------------------------
  7185. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  7186. [for mf in $CONFIG_FILES; do
  7187.   # Strip MF so we end up with the name of the file.
  7188.   mf=`echo "$mf" | sed -e 's/:.*$//'`
  7189.   # Check whether this is an Automake generated Makefile or not.
  7190.   # We used to match only the files named `Makefile.in', but
  7191.   # some people rename them; so instead we look at the file content.
  7192.   # Grep'ing the first line is not enough: some people post-process
  7193.   # each Makefile.in and add a new line on top of each file to say so.
  7194.   # So let's grep whole file.
  7195.   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  7196.     dirpart=`AS_DIRNAME("$mf")`
  7197.   else
  7198.     continue
  7199.   fi
  7200.   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
  7201.   # Extract the definition of DEP_FILES from the Makefile without
  7202.   # running `make'.
  7203.   DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
  7204.   test -z "$DEPDIR" && continue
  7205.   # When using ansi2knr, U may be empty or an underscore; expand it
  7206.   U=`sed -n 's/^U = //p' < "$mf"`
  7207.   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  7208.   # We invoke sed twice because it is the simplest approach to
  7209.   # changing $(DEPDIR) to its actual value in the expansion.
  7210.   for file in `sed -n '
  7211.     /^DEP_FILES = .*\\\\$/ {
  7212.       s/^DEP_FILES = //
  7213.       :loop
  7214.     s/\\\\$//
  7215.     p
  7216.     n
  7217.     /\\\\$/ b loop
  7218.       p
  7219.     }
  7220.     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  7221.        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  7222.     # Make sure the directory exists.
  7223.     test -f "$dirpart/$file" && continue
  7224.     fdir=`AS_DIRNAME(["$file"])`
  7225.     AS_MKDIR_P([$dirpart/$fdir])
  7226.     # echo "creating $dirpart/$file"
  7227.     echo '# dummy' > "$dirpart/$file"
  7228.   done
  7229. done
  7230. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  7231.  
  7232.  
  7233. # AM_OUTPUT_DEPENDENCY_COMMANDS
  7234. # -----------------------------
  7235. # This macro should only be invoked once -- use via AC_REQUIRE.
  7236. #
  7237. # This code is only required when automatic dependency tracking
  7238. # is enabled.  FIXME.  This creates each `.P' file that we will
  7239. # need in order to bootstrap the dependency handling code.
  7240. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  7241. [AC_CONFIG_COMMANDS([depfiles],
  7242.      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  7243.      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  7244. ])
  7245.  
  7246. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
  7247.  
  7248. # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
  7249.  
  7250. # This program is free software; you can redistribute it and/or modify
  7251. # it under the terms of the GNU General Public License as published by
  7252. # the Free Software Foundation; either version 2, or (at your option)
  7253. # any later version.
  7254.  
  7255. # This program is distributed in the hope that it will be useful,
  7256. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7257. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7258. # GNU General Public License for more details.
  7259.  
  7260. # You should have received a copy of the GNU General Public License
  7261. # along with this program; if not, write to the Free Software
  7262. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7263. # 02111-1307, USA.
  7264.  
  7265. # serial 7
  7266.  
  7267. # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
  7268. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
  7269.  
  7270. # Do all the work for Automake.                            -*- Autoconf -*-
  7271.  
  7272. # This macro actually does too much some checks are only needed if
  7273. # your package does certain things.  But this isn't really a big deal.
  7274.  
  7275. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
  7276. # Free Software Foundation, Inc.
  7277.  
  7278. # This program is free software; you can redistribute it and/or modify
  7279. # it under the terms of the GNU General Public License as published by
  7280. # the Free Software Foundation; either version 2, or (at your option)
  7281. # any later version.
  7282.  
  7283. # This program is distributed in the hope that it will be useful,
  7284. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7285. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7286. # GNU General Public License for more details.
  7287.  
  7288. # You should have received a copy of the GNU General Public License
  7289. # along with this program; if not, write to the Free Software
  7290. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7291. # 02111-1307, USA.
  7292.  
  7293. # serial 11
  7294.  
  7295. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  7296. # AM_INIT_AUTOMAKE([OPTIONS])
  7297. # -----------------------------------------------
  7298. # The call with PACKAGE and VERSION arguments is the old style
  7299. # call (pre autoconf-2.50), which is being phased out.  PACKAGE
  7300. # and VERSION should now be passed to AC_INIT and removed from
  7301. # the call to AM_INIT_AUTOMAKE.
  7302. # We support both call styles for the transition.  After
  7303. # the next Automake release, Autoconf can make the AC_INIT
  7304. # arguments mandatory, and then we can depend on a new Autoconf
  7305. # release and drop the old call support.
  7306. AC_DEFUN([AM_INIT_AUTOMAKE],
  7307. [AC_PREREQ([2.58])dnl
  7308. dnl Autoconf wants to disallow AM_ names.  We explicitly allow
  7309. dnl the ones we care about.
  7310. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  7311. AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  7312. AC_REQUIRE([AC_PROG_INSTALL])dnl
  7313. # test to see if srcdir already configured
  7314. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  7315.    test -f $srcdir/config.status; then
  7316.   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  7317. fi
  7318.  
  7319. # test whether we have cygpath
  7320. if test -z "$CYGPATH_W"; then
  7321.   if (cygpath --version) >/dev/null 2>/dev/null; then
  7322.     CYGPATH_W='cygpath -w'
  7323.   else
  7324.     CYGPATH_W=echo
  7325.   fi
  7326. fi
  7327. AC_SUBST([CYGPATH_W])
  7328.  
  7329. # Define the identity of the package.
  7330. dnl Distinguish between old-style and new-style calls.
  7331. m4_ifval([$2],
  7332. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  7333.  AC_SUBST([PACKAGE], [$1])dnl
  7334.  AC_SUBST([VERSION], [$2])],
  7335. [_AM_SET_OPTIONS([$1])dnl
  7336.  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
  7337.  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
  7338.  
  7339. _AM_IF_OPTION([no-define],,
  7340. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  7341.  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  7342.  
  7343. # Some tools Automake needs.
  7344. AC_REQUIRE([AM_SANITY_CHECK])dnl
  7345. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  7346. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  7347. AM_MISSING_PROG(AUTOCONF, autoconf)
  7348. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  7349. AM_MISSING_PROG(AUTOHEADER, autoheader)
  7350. AM_MISSING_PROG(MAKEINFO, makeinfo)
  7351. AM_MISSING_PROG(AMTAR, tar)
  7352. AM_PROG_INSTALL_SH
  7353. AM_PROG_INSTALL_STRIP
  7354. AC_REQUIRE([AM_PROG_MKDIR_P])dnl
  7355. # We need awk for the "check" target.  The system "awk" is bad on
  7356. # some platforms.
  7357. AC_REQUIRE([AC_PROG_AWK])dnl
  7358. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  7359. AC_REQUIRE([AM_SET_LEADING_DOT])dnl
  7360.  
  7361. _AM_IF_OPTION([no-dependencies],,
  7362. [AC_PROVIDE_IFELSE([AC_PROG_CC],
  7363.                   [_AM_DEPENDENCIES(CC)],
  7364.                   [define([AC_PROG_CC],
  7365.                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
  7366. AC_PROVIDE_IFELSE([AC_PROG_CXX],
  7367.                   [_AM_DEPENDENCIES(CXX)],
  7368.                   [define([AC_PROG_CXX],
  7369.                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  7370. ])
  7371. ])
  7372.  
  7373.  
  7374. # When config.status generates a header, we must update the stamp-h file.
  7375. # This file resides in the same directory as the config header
  7376. # that is generated.  The stamp files are numbered to have different names.
  7377.  
  7378. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
  7379. # loop where config.status creates the headers, so we can generate
  7380. # our stamp files there.
  7381. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
  7382. [# Compute $1's index in $config_headers.
  7383. _am_stamp_count=1
  7384. for _am_header in $config_headers :; do
  7385.   case $_am_header in
  7386.     $1 | $1:* )
  7387.       break ;;
  7388.     * )
  7389.       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
  7390.   esac
  7391. done
  7392. echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
  7393.  
  7394. # AM_PROG_INSTALL_SH
  7395. # ------------------
  7396. # Define $install_sh.
  7397.  
  7398. # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  7399.  
  7400. # This program is free software; you can redistribute it and/or modify
  7401. # it under the terms of the GNU General Public License as published by
  7402. # the Free Software Foundation; either version 2, or (at your option)
  7403. # any later version.
  7404.  
  7405. # This program is distributed in the hope that it will be useful,
  7406. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7407. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7408. # GNU General Public License for more details.
  7409.  
  7410. # You should have received a copy of the GNU General Public License
  7411. # along with this program; if not, write to the Free Software
  7412. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7413. # 02111-1307, USA.
  7414.  
  7415. AC_DEFUN([AM_PROG_INSTALL_SH],
  7416. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  7417. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  7418. AC_SUBST(install_sh)])
  7419.  
  7420. #                                                          -*- Autoconf -*-
  7421. # Copyright (C) 2003  Free Software Foundation, Inc.
  7422.  
  7423. # This program is free software; you can redistribute it and/or modify
  7424. # it under the terms of the GNU General Public License as published by
  7425. # the Free Software Foundation; either version 2, or (at your option)
  7426. # any later version.
  7427.  
  7428. # This program is distributed in the hope that it will be useful,
  7429. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7430. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7431. # GNU General Public License for more details.
  7432.  
  7433. # You should have received a copy of the GNU General Public License
  7434. # along with this program; if not, write to the Free Software
  7435. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7436. # 02111-1307, USA.
  7437.  
  7438. # serial 1
  7439.  
  7440. # Check whether the underlying file-system supports filenames
  7441. # with a leading dot.  For instance MS-DOS doesn't.
  7442. AC_DEFUN([AM_SET_LEADING_DOT],
  7443. [rm -rf .tst 2>/dev/null
  7444. mkdir .tst 2>/dev/null
  7445. if test -d .tst; then
  7446.   am__leading_dot=.
  7447. else
  7448.   am__leading_dot=_
  7449. fi
  7450. rmdir .tst 2>/dev/null
  7451. AC_SUBST([am__leading_dot])])
  7452.  
  7453. # Add --enable-maintainer-mode option to configure.
  7454. # From Jim Meyering
  7455.  
  7456. # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004
  7457. # Free Software Foundation, Inc.
  7458.  
  7459. # This program is free software; you can redistribute it and/or modify
  7460. # it under the terms of the GNU General Public License as published by
  7461. # the Free Software Foundation; either version 2, or (at your option)
  7462. # any later version.
  7463.  
  7464. # This program is distributed in the hope that it will be useful,
  7465. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7466. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7467. # GNU General Public License for more details.
  7468.  
  7469. # You should have received a copy of the GNU General Public License
  7470. # along with this program; if not, write to the Free Software
  7471. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7472. # 02111-1307, USA.
  7473.  
  7474. # serial 3
  7475.  
  7476. AC_DEFUN([AM_MAINTAINER_MODE],
  7477. [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  7478.   dnl maintainer-mode is disabled by default
  7479.   AC_ARG_ENABLE(maintainer-mode,
  7480. [  --enable-maintainer-mode  enable make rules and dependencies not useful
  7481.               (and sometimes confusing) to the casual installer],
  7482.       USE_MAINTAINER_MODE=$enableval,
  7483.       USE_MAINTAINER_MODE=no)
  7484.   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  7485.   AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
  7486.   MAINT=$MAINTAINER_MODE_TRUE
  7487.   AC_SUBST(MAINT)dnl
  7488. ]
  7489. )
  7490.  
  7491. AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
  7492.  
  7493. # Check to see how 'make' treats includes.    -*- Autoconf -*-
  7494.  
  7495. # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
  7496.  
  7497. # This program is free software; you can redistribute it and/or modify
  7498. # it under the terms of the GNU General Public License as published by
  7499. # the Free Software Foundation; either version 2, or (at your option)
  7500. # any later version.
  7501.  
  7502. # This program is distributed in the hope that it will be useful,
  7503. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7504. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7505. # GNU General Public License for more details.
  7506.  
  7507. # You should have received a copy of the GNU General Public License
  7508. # along with this program; if not, write to the Free Software
  7509. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7510. # 02111-1307, USA.
  7511.  
  7512. # serial 2
  7513.  
  7514. # AM_MAKE_INCLUDE()
  7515. # -----------------
  7516. # Check to see how make treats includes.
  7517. AC_DEFUN([AM_MAKE_INCLUDE],
  7518. [am_make=${MAKE-make}
  7519. cat > confinc << 'END'
  7520. am__doit:
  7521.     @echo done
  7522. .PHONY: am__doit
  7523. END
  7524. # If we don't find an include directive, just comment out the code.
  7525. AC_MSG_CHECKING([for style of include used by $am_make])
  7526. am__include="#"
  7527. am__quote=
  7528. _am_result=none
  7529. # First try GNU make style include.
  7530. echo "include confinc" > confmf
  7531. # We grep out `Entering directory' and `Leaving directory'
  7532. # messages which can occur if `w' ends up in MAKEFLAGS.
  7533. # In particular we don't look at `^make:' because GNU make might
  7534. # be invoked under some other name (usually "gmake"), in which
  7535. # case it prints its new name instead of `make'.
  7536. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
  7537.    am__include=include
  7538.    am__quote=
  7539.    _am_result=GNU
  7540. fi
  7541. # Now try BSD make style include.
  7542. if test "$am__include" = "#"; then
  7543.    echo '.include "confinc"' > confmf
  7544.    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  7545.       am__include=.include
  7546.       am__quote="\""
  7547.       _am_result=BSD
  7548.    fi
  7549. fi
  7550. AC_SUBST([am__include])
  7551. AC_SUBST([am__quote])
  7552. AC_MSG_RESULT([$_am_result])
  7553. rm -f confinc confmf
  7554. ])
  7555.  
  7556. #  -*- Autoconf -*-
  7557.  
  7558.  
  7559. # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
  7560.  
  7561. # This program is free software; you can redistribute it and/or modify
  7562. # it under the terms of the GNU General Public License as published by
  7563. # the Free Software Foundation; either version 2, or (at your option)
  7564. # any later version.
  7565.  
  7566. # This program is distributed in the hope that it will be useful,
  7567. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7568. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7569. # GNU General Public License for more details.
  7570.  
  7571. # You should have received a copy of the GNU General Public License
  7572. # along with this program; if not, write to the Free Software
  7573. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7574. # 02111-1307, USA.
  7575.  
  7576. # serial 3
  7577.  
  7578. # AM_MISSING_PROG(NAME, PROGRAM)
  7579. # ------------------------------
  7580. AC_DEFUN([AM_MISSING_PROG],
  7581. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  7582. $1=${$1-"${am_missing_run}$2"}
  7583. AC_SUBST($1)])
  7584.  
  7585.  
  7586. # AM_MISSING_HAS_RUN
  7587. # ------------------
  7588. # Define MISSING if not defined so far and test if it supports --run.
  7589. # If it does, set am_missing_run to use it, otherwise, to nothing.
  7590. AC_DEFUN([AM_MISSING_HAS_RUN],
  7591. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  7592. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  7593. # Use eval to expand $SHELL
  7594. if eval "$MISSING --run true"; then
  7595.   am_missing_run="$MISSING --run "
  7596. else
  7597.   am_missing_run=
  7598.   AC_MSG_WARN([`missing' script is too old or missing])
  7599. fi
  7600. ])
  7601.  
  7602. # AM_PROG_MKDIR_P
  7603. # ---------------
  7604. # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
  7605.  
  7606. # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
  7607.  
  7608. # This program is free software; you can redistribute it and/or modify
  7609. # it under the terms of the GNU General Public License as published by
  7610. # the Free Software Foundation; either version 2, or (at your option)
  7611. # any later version.
  7612.  
  7613. # This program is distributed in the hope that it will be useful,
  7614. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7615. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7616. # GNU General Public License for more details.
  7617.  
  7618. # You should have received a copy of the GNU General Public License
  7619. # along with this program; if not, write to the Free Software
  7620. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7621. # 02111-1307, USA.
  7622.  
  7623. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
  7624. # created by `make install' are always world readable, even if the
  7625. # installer happens to have an overly restrictive umask (e.g. 077).
  7626. # This was a mistake.  There are at least two reasons why we must not
  7627. # use `-m 0755':
  7628. #   - it causes special bits like SGID to be ignored,
  7629. #   - it may be too restrictive (some setups expect 775 directories).
  7630. #
  7631. # Do not use -m 0755 and let people choose whatever they expect by
  7632. # setting umask.
  7633. #
  7634. # We cannot accept any implementation of `mkdir' that recognizes `-p'.
  7635. # Some implementations (such as Solaris 8's) are not thread-safe: if a
  7636. # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
  7637. # concurrently, both version can detect that a/ is missing, but only
  7638. # one can create it and the other will error out.  Consequently we
  7639. # restrict ourselves to GNU make (using the --version option ensures
  7640. # this.)
  7641. AC_DEFUN([AM_PROG_MKDIR_P],
  7642. [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
  7643.   # Keeping the `.' argument allows $(mkdir_p) to be used without
  7644.   # argument.  Indeed, we sometimes output rules like
  7645.   #   $(mkdir_p) $(somedir)
  7646.   # where $(somedir) is conditionally defined.
  7647.   # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more
  7648.   # expensive solution, as it forces Make to start a sub-shell.)
  7649.   mkdir_p='mkdir -p -- .'
  7650. else
  7651.   # On NextStep and OpenStep, the `mkdir' command does not
  7652.   # recognize any option.  It will interpret all options as
  7653.   # directories to create, and then abort because `.' already
  7654.   # exists.
  7655.   for d in ./-p ./--version;
  7656.   do
  7657.     test -d $d && rmdir $d
  7658.   done
  7659.   # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
  7660.   if test -f "$ac_aux_dir/mkinstalldirs"; then
  7661.     mkdir_p='$(mkinstalldirs)'
  7662.   else
  7663.     mkdir_p='$(install_sh) -d'
  7664.   fi
  7665. fi
  7666. AC_SUBST([mkdir_p])])
  7667.  
  7668. # Helper functions for option handling.                    -*- Autoconf -*-
  7669.  
  7670. # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
  7671.  
  7672. # This program is free software; you can redistribute it and/or modify
  7673. # it under the terms of the GNU General Public License as published by
  7674. # the Free Software Foundation; either version 2, or (at your option)
  7675. # any later version.
  7676.  
  7677. # This program is distributed in the hope that it will be useful,
  7678. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7679. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7680. # GNU General Public License for more details.
  7681.  
  7682. # You should have received a copy of the GNU General Public License
  7683. # along with this program; if not, write to the Free Software
  7684. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7685. # 02111-1307, USA.
  7686.  
  7687. # serial 2
  7688.  
  7689. # _AM_MANGLE_OPTION(NAME)
  7690. # -----------------------
  7691. AC_DEFUN([_AM_MANGLE_OPTION],
  7692. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  7693.  
  7694. # _AM_SET_OPTION(NAME)
  7695. # ------------------------------
  7696. # Set option NAME.  Presently that only means defining a flag for this option.
  7697. AC_DEFUN([_AM_SET_OPTION],
  7698. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  7699.  
  7700. # _AM_SET_OPTIONS(OPTIONS)
  7701. # ----------------------------------
  7702. # OPTIONS is a space-separated list of Automake options.
  7703. AC_DEFUN([_AM_SET_OPTIONS],
  7704. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  7705.  
  7706. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  7707. # -------------------------------------------
  7708. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  7709. AC_DEFUN([_AM_IF_OPTION],
  7710. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  7711.  
  7712. #
  7713. # Check to make sure that the build environment is sane.
  7714. #
  7715.  
  7716. # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
  7717.  
  7718. # This program is free software; you can redistribute it and/or modify
  7719. # it under the terms of the GNU General Public License as published by
  7720. # the Free Software Foundation; either version 2, or (at your option)
  7721. # any later version.
  7722.  
  7723. # This program is distributed in the hope that it will be useful,
  7724. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7725. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7726. # GNU General Public License for more details.
  7727.  
  7728. # You should have received a copy of the GNU General Public License
  7729. # along with this program; if not, write to the Free Software
  7730. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7731. # 02111-1307, USA.
  7732.  
  7733. # serial 3
  7734.  
  7735. # AM_SANITY_CHECK
  7736. # ---------------
  7737. AC_DEFUN([AM_SANITY_CHECK],
  7738. [AC_MSG_CHECKING([whether build environment is sane])
  7739. # Just in case
  7740. sleep 1
  7741. echo timestamp > conftest.file
  7742. # Do `set' in a subshell so we don't clobber the current shell's
  7743. # arguments.  Must try -L first in case configure is actually a
  7744. # symlink; some systems play weird games with the mod time of symlinks
  7745. # (eg FreeBSD returns the mod time of the symlink's containing
  7746. # directory).
  7747. if (
  7748.    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  7749.    if test "$[*]" = "X"; then
  7750.       # -L didn't work.
  7751.       set X `ls -t $srcdir/configure conftest.file`
  7752.    fi
  7753.    rm -f conftest.file
  7754.    if test "$[*]" != "X $srcdir/configure conftest.file" \
  7755.       && test "$[*]" != "X conftest.file $srcdir/configure"; then
  7756.  
  7757.       # If neither matched, then we have a broken ls.  This can happen
  7758.       # if, for instance, CONFIG_SHELL is bash and it inherits a
  7759.       # broken ls alias from the environment.  This has actually
  7760.       # happened.  Such a system could not be considered "sane".
  7761.       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
  7762. alias in your environment])
  7763.    fi
  7764.  
  7765.    test "$[2]" = conftest.file
  7766.    )
  7767. then
  7768.    # Ok.
  7769.    :
  7770. else
  7771.    AC_MSG_ERROR([newly created file is older than distributed files!
  7772. Check your system clock])
  7773. fi
  7774. AC_MSG_RESULT(yes)])
  7775.  
  7776. # AM_PROG_INSTALL_STRIP
  7777.  
  7778. # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
  7779.  
  7780. # This program is free software; you can redistribute it and/or modify
  7781. # it under the terms of the GNU General Public License as published by
  7782. # the Free Software Foundation; either version 2, or (at your option)
  7783. # any later version.
  7784.  
  7785. # This program is distributed in the hope that it will be useful,
  7786. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  7787. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  7788. # GNU General Public License for more details.
  7789.  
  7790. # You should have received a copy of the GNU General Public License
  7791. # along with this program; if not, write to the Free Software
  7792. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  7793. # 02111-1307, USA.
  7794.  
  7795. # One issue with vendor `install' (even GNU) is that you can't
  7796. # specify the program used to strip binaries.  This is especially
  7797. # annoying in cross-compiling environments, where the build's strip
  7798. # is unlikely to handle the host's binaries.
  7799. # Fortunately install-sh will honor a STRIPPROG variable, so we
  7800. # always use install-sh in `make install-strip', and initialize
  7801. # STRIPPROG with the value of the STRIP variable (set by the user).
  7802. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  7803. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  7804. # Installed binaries are usually stripped using `strip' when the user
  7805. # run `make install-strip'.  However `strip' might not be the right
  7806. # tool to use in cross-compilation environments, therefore Automake
  7807. # will honor the `STRIP' environment variable to overrule this program.
  7808. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  7809. if test "$cross_compiling" != no; then
  7810.   AC_CHECK_TOOL([STRIP], [strip], :)
  7811. fi
  7812. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  7813. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  7814.  
  7815. m4_include([acinclude.m4])
  7816.