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