Home | History | Annotate | Line # | Download | only in build-aux
      1      1.1  christos #! /bin/sh
      2      1.1  christos # Output a system dependent set of variables, describing how to set the
      3      1.1  christos # run time search path of shared libraries in an executable.
      4      1.1  christos #
      5  1.1.1.2  christos #   Copyright 1996-2010 Free Software Foundation, Inc.
      6      1.1  christos #   Taken from GNU libtool, 2001
      7      1.1  christos #   Originally by Gordon Matzigkeit <gord (at] gnu.ai.mit.edu>, 1996
      8      1.1  christos #
      9      1.1  christos #   This file is free software; the Free Software Foundation gives
     10      1.1  christos #   unlimited permission to copy and/or distribute it, with or without
     11      1.1  christos #   modifications, as long as this notice is preserved.
     12      1.1  christos #
     13      1.1  christos # The first argument passed to this file is the canonical host specification,
     14      1.1  christos #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
     15      1.1  christos # or
     16      1.1  christos #    CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
     17      1.1  christos # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
     18      1.1  christos # should be set by the caller.
     19      1.1  christos #
     20      1.1  christos # The set of defined variables is at the end of this script.
     21      1.1  christos 
     22      1.1  christos # Known limitations:
     23      1.1  christos # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
     24      1.1  christos #   than 256 bytes, otherwise the compiler driver will dump core. The only
     25      1.1  christos #   known workaround is to choose shorter directory names for the build
     26      1.1  christos #   directory and/or the installation directory.
     27      1.1  christos 
     28  1.1.1.2  christos # All known linkers require a `.a' archive for static linking (except MSVC,
     29      1.1  christos # which needs '.lib').
     30      1.1  christos libext=a
     31      1.1  christos shrext=.so
     32      1.1  christos 
     33      1.1  christos host="$1"
     34      1.1  christos host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
     35      1.1  christos host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
     36      1.1  christos host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
     37      1.1  christos 
     38      1.1  christos # Code taken from libtool.m4's _LT_CC_BASENAME.
     39      1.1  christos 
     40      1.1  christos for cc_temp in $CC""; do
     41      1.1  christos   case $cc_temp in
     42      1.1  christos     compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
     43      1.1  christos     distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
     44      1.1  christos     \-*) ;;
     45      1.1  christos     *) break;;
     46      1.1  christos   esac
     47      1.1  christos done
     48      1.1  christos cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
     49      1.1  christos 
     50      1.1  christos # Code taken from libtool.m4's _LT_COMPILER_PIC.
     51      1.1  christos 
     52      1.1  christos wl=
     53      1.1  christos if test "$GCC" = yes; then
     54      1.1  christos   wl='-Wl,'
     55      1.1  christos else
     56      1.1  christos   case "$host_os" in
     57      1.1  christos     aix*)
     58      1.1  christos       wl='-Wl,'
     59      1.1  christos       ;;
     60  1.1.1.2  christos     darwin*)
     61  1.1.1.2  christos       case $cc_basename in
     62  1.1.1.2  christos         xlc*)
     63  1.1.1.2  christos           wl='-Wl,'
     64  1.1.1.2  christos           ;;
     65  1.1.1.2  christos       esac
     66  1.1.1.2  christos       ;;
     67      1.1  christos     mingw* | cygwin* | pw32* | os2* | cegcc*)
     68      1.1  christos       ;;
     69      1.1  christos     hpux9* | hpux10* | hpux11*)
     70      1.1  christos       wl='-Wl,'
     71      1.1  christos       ;;
     72      1.1  christos     irix5* | irix6* | nonstopux*)
     73      1.1  christos       wl='-Wl,'
     74      1.1  christos       ;;
     75  1.1.1.2  christos     newsos6)
     76  1.1.1.2  christos       ;;
     77  1.1.1.2  christos     linux* | k*bsd*-gnu)
     78      1.1  christos       case $cc_basename in
     79      1.1  christos         ecc*)
     80      1.1  christos           wl='-Wl,'
     81      1.1  christos           ;;
     82      1.1  christos         icc* | ifort*)
     83      1.1  christos           wl='-Wl,'
     84      1.1  christos           ;;
     85      1.1  christos         lf95*)
     86      1.1  christos           wl='-Wl,'
     87      1.1  christos           ;;
     88  1.1.1.2  christos         pgcc | pgf77 | pgf90)
     89      1.1  christos           wl='-Wl,'
     90      1.1  christos           ;;
     91      1.1  christos         ccc*)
     92      1.1  christos           wl='-Wl,'
     93      1.1  christos           ;;
     94      1.1  christos         como)
     95      1.1  christos           wl='-lopt='
     96      1.1  christos           ;;
     97      1.1  christos         *)
     98      1.1  christos           case `$CC -V 2>&1 | sed 5q` in
     99      1.1  christos             *Sun\ C*)
    100      1.1  christos               wl='-Wl,'
    101      1.1  christos               ;;
    102      1.1  christos           esac
    103      1.1  christos           ;;
    104      1.1  christos       esac
    105      1.1  christos       ;;
    106      1.1  christos     osf3* | osf4* | osf5*)
    107      1.1  christos       wl='-Wl,'
    108      1.1  christos       ;;
    109      1.1  christos     rdos*)
    110      1.1  christos       ;;
    111      1.1  christos     solaris*)
    112  1.1.1.2  christos       wl='-Wl,'
    113      1.1  christos       ;;
    114      1.1  christos     sunos4*)
    115      1.1  christos       wl='-Qoption ld '
    116      1.1  christos       ;;
    117      1.1  christos     sysv4 | sysv4.2uw2* | sysv4.3*)
    118      1.1  christos       wl='-Wl,'
    119      1.1  christos       ;;
    120      1.1  christos     sysv4*MP*)
    121      1.1  christos       ;;
    122      1.1  christos     sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
    123      1.1  christos       wl='-Wl,'
    124      1.1  christos       ;;
    125      1.1  christos     unicos*)
    126      1.1  christos       wl='-Wl,'
    127      1.1  christos       ;;
    128      1.1  christos     uts4*)
    129      1.1  christos       ;;
    130      1.1  christos   esac
    131      1.1  christos fi
    132      1.1  christos 
    133      1.1  christos # Code taken from libtool.m4's _LT_LINKER_SHLIBS.
    134      1.1  christos 
    135      1.1  christos hardcode_libdir_flag_spec=
    136      1.1  christos hardcode_libdir_separator=
    137      1.1  christos hardcode_direct=no
    138      1.1  christos hardcode_minus_L=no
    139      1.1  christos 
    140      1.1  christos case "$host_os" in
    141      1.1  christos   cygwin* | mingw* | pw32* | cegcc*)
    142      1.1  christos     # FIXME: the MSVC++ port hasn't been tested in a loooong time
    143      1.1  christos     # When not using gcc, we currently assume that we are using
    144      1.1  christos     # Microsoft Visual C++.
    145      1.1  christos     if test "$GCC" != yes; then
    146      1.1  christos       with_gnu_ld=no
    147      1.1  christos     fi
    148      1.1  christos     ;;
    149      1.1  christos   interix*)
    150      1.1  christos     # we just hope/assume this is gcc and not c89 (= MSVC++)
    151      1.1  christos     with_gnu_ld=yes
    152      1.1  christos     ;;
    153      1.1  christos   openbsd*)
    154      1.1  christos     with_gnu_ld=no
    155      1.1  christos     ;;
    156      1.1  christos esac
    157      1.1  christos 
    158      1.1  christos ld_shlibs=yes
    159      1.1  christos if test "$with_gnu_ld" = yes; then
    160      1.1  christos   # Set some defaults for GNU ld with shared library support. These
    161      1.1  christos   # are reset later if shared libraries are not supported. Putting them
    162      1.1  christos   # here allows them to be overridden if necessary.
    163      1.1  christos   # Unlike libtool, we use -rpath here, not --rpath, since the documented
    164      1.1  christos   # option of GNU ld is called -rpath, not --rpath.
    165      1.1  christos   hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    166      1.1  christos   case "$host_os" in
    167      1.1  christos     aix[3-9]*)
    168      1.1  christos       # On AIX/PPC, the GNU linker is very broken
    169      1.1  christos       if test "$host_cpu" != ia64; then
    170      1.1  christos         ld_shlibs=no
    171      1.1  christos       fi
    172      1.1  christos       ;;
    173      1.1  christos     amigaos*)
    174  1.1.1.2  christos       hardcode_libdir_flag_spec='-L$libdir'
    175  1.1.1.2  christos       hardcode_minus_L=yes
    176  1.1.1.2  christos       # Samuel A. Falvo II <kc5tja (at] dolphin.openprojects.net> reports
    177  1.1.1.2  christos       # that the semantics of dynamic libraries on AmigaOS, at least up
    178  1.1.1.2  christos       # to version 4, is to share data among multiple programs linked
    179  1.1.1.2  christos       # with the same dynamic library.  Since this doesn't match the
    180  1.1.1.2  christos       # behavior of shared libraries on other platforms, we cannot use
    181  1.1.1.2  christos       # them.
    182  1.1.1.2  christos       ld_shlibs=no
    183      1.1  christos       ;;
    184      1.1  christos     beos*)
    185      1.1  christos       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    186      1.1  christos         :
    187      1.1  christos       else
    188      1.1  christos         ld_shlibs=no
    189      1.1  christos       fi
    190      1.1  christos       ;;
    191      1.1  christos     cygwin* | mingw* | pw32* | cegcc*)
    192      1.1  christos       # hardcode_libdir_flag_spec is actually meaningless, as there is
    193      1.1  christos       # no search path for DLLs.
    194      1.1  christos       hardcode_libdir_flag_spec='-L$libdir'
    195      1.1  christos       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
    196      1.1  christos         :
    197      1.1  christos       else
    198      1.1  christos         ld_shlibs=no
    199      1.1  christos       fi
    200      1.1  christos       ;;
    201      1.1  christos     interix[3-9]*)
    202      1.1  christos       hardcode_direct=no
    203      1.1  christos       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
    204      1.1  christos       ;;
    205  1.1.1.2  christos     gnu* | linux* | k*bsd*-gnu)
    206      1.1  christos       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    207      1.1  christos         :
    208      1.1  christos       else
    209      1.1  christos         ld_shlibs=no
    210      1.1  christos       fi
    211      1.1  christos       ;;
    212      1.1  christos     netbsd*)
    213      1.1  christos       ;;
    214      1.1  christos     solaris*)
    215      1.1  christos       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
    216      1.1  christos         ld_shlibs=no
    217      1.1  christos       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    218      1.1  christos         :
    219      1.1  christos       else
    220      1.1  christos         ld_shlibs=no
    221      1.1  christos       fi
    222      1.1  christos       ;;
    223      1.1  christos     sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
    224      1.1  christos       case `$LD -v 2>&1` in
    225      1.1  christos         *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
    226      1.1  christos           ld_shlibs=no
    227      1.1  christos           ;;
    228      1.1  christos         *)
    229      1.1  christos           if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    230      1.1  christos             hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
    231      1.1  christos           else
    232      1.1  christos             ld_shlibs=no
    233      1.1  christos           fi
    234      1.1  christos           ;;
    235      1.1  christos       esac
    236      1.1  christos       ;;
    237      1.1  christos     sunos4*)
    238      1.1  christos       hardcode_direct=yes
    239      1.1  christos       ;;
    240      1.1  christos     *)
    241      1.1  christos       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
    242      1.1  christos         :
    243      1.1  christos       else
    244      1.1  christos         ld_shlibs=no
    245      1.1  christos       fi
    246      1.1  christos       ;;
    247      1.1  christos   esac
    248      1.1  christos   if test "$ld_shlibs" = no; then
    249      1.1  christos     hardcode_libdir_flag_spec=
    250      1.1  christos   fi
    251      1.1  christos else
    252      1.1  christos   case "$host_os" in
    253      1.1  christos     aix3*)
    254      1.1  christos       # Note: this linker hardcodes the directories in LIBPATH if there
    255      1.1  christos       # are no directories specified by -L.
    256      1.1  christos       hardcode_minus_L=yes
    257      1.1  christos       if test "$GCC" = yes; then
    258      1.1  christos         # Neither direct hardcoding nor static linking is supported with a
    259      1.1  christos         # broken collect2.
    260      1.1  christos         hardcode_direct=unsupported
    261      1.1  christos       fi
    262      1.1  christos       ;;
    263      1.1  christos     aix[4-9]*)
    264      1.1  christos       if test "$host_cpu" = ia64; then
    265      1.1  christos         # On IA64, the linker does run time linking by default, so we don't
    266      1.1  christos         # have to do anything special.
    267      1.1  christos         aix_use_runtimelinking=no
    268      1.1  christos       else
    269      1.1  christos         aix_use_runtimelinking=no
    270      1.1  christos         # Test if we are trying to use run time linking or normal
    271      1.1  christos         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
    272      1.1  christos         # need to do runtime linking.
    273      1.1  christos         case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
    274      1.1  christos           for ld_flag in $LDFLAGS; do
    275      1.1  christos             if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
    276      1.1  christos               aix_use_runtimelinking=yes
    277      1.1  christos               break
    278      1.1  christos             fi
    279      1.1  christos           done
    280      1.1  christos           ;;
    281      1.1  christos         esac
    282      1.1  christos       fi
    283      1.1  christos       hardcode_direct=yes
    284      1.1  christos       hardcode_libdir_separator=':'
    285      1.1  christos       if test "$GCC" = yes; then
    286      1.1  christos         case $host_os in aix4.[012]|aix4.[012].*)
    287      1.1  christos           collect2name=`${CC} -print-prog-name=collect2`
    288      1.1  christos           if test -f "$collect2name" && \
    289      1.1  christos             strings "$collect2name" | grep resolve_lib_name >/dev/null
    290      1.1  christos           then
    291      1.1  christos             # We have reworked collect2
    292      1.1  christos             :
    293      1.1  christos           else
    294      1.1  christos             # We have old collect2
    295      1.1  christos             hardcode_direct=unsupported
    296      1.1  christos             hardcode_minus_L=yes
    297      1.1  christos             hardcode_libdir_flag_spec='-L$libdir'
    298      1.1  christos             hardcode_libdir_separator=
    299      1.1  christos           fi
    300      1.1  christos           ;;
    301      1.1  christos         esac
    302      1.1  christos       fi
    303      1.1  christos       # Begin _LT_AC_SYS_LIBPATH_AIX.
    304      1.1  christos       echo 'int main () { return 0; }' > conftest.c
    305      1.1  christos       ${CC} ${LDFLAGS} conftest.c -o conftest
    306      1.1  christos       aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    307      1.1  christos }'`
    308      1.1  christos       if test -z "$aix_libpath"; then
    309      1.1  christos         aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
    310      1.1  christos }'`
    311      1.1  christos       fi
    312      1.1  christos       if test -z "$aix_libpath"; then
    313      1.1  christos         aix_libpath="/usr/lib:/lib"
    314      1.1  christos       fi
    315      1.1  christos       rm -f conftest.c conftest
    316      1.1  christos       # End _LT_AC_SYS_LIBPATH_AIX.
    317      1.1  christos       if test "$aix_use_runtimelinking" = yes; then
    318      1.1  christos         hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
    319      1.1  christos       else
    320      1.1  christos         if test "$host_cpu" = ia64; then
    321      1.1  christos           hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
    322      1.1  christos         else
    323      1.1  christos           hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
    324      1.1  christos         fi
    325      1.1  christos       fi
    326      1.1  christos       ;;
    327      1.1  christos     amigaos*)
    328  1.1.1.2  christos       hardcode_libdir_flag_spec='-L$libdir'
    329  1.1.1.2  christos       hardcode_minus_L=yes
    330  1.1.1.2  christos       # see comment about different semantics on the GNU ld section
    331  1.1.1.2  christos       ld_shlibs=no
    332      1.1  christos       ;;
    333      1.1  christos     bsdi[45]*)
    334      1.1  christos       ;;
    335      1.1  christos     cygwin* | mingw* | pw32* | cegcc*)
    336      1.1  christos       # When not using gcc, we currently assume that we are using
    337      1.1  christos       # Microsoft Visual C++.
    338      1.1  christos       # hardcode_libdir_flag_spec is actually meaningless, as there is
    339      1.1  christos       # no search path for DLLs.
    340      1.1  christos       hardcode_libdir_flag_spec=' '
    341      1.1  christos       libext=lib
    342      1.1  christos       ;;
    343      1.1  christos     darwin* | rhapsody*)
    344      1.1  christos       hardcode_direct=no
    345  1.1.1.2  christos       if test "$GCC" = yes ; then
    346      1.1  christos         :
    347      1.1  christos       else
    348  1.1.1.2  christos         case $cc_basename in
    349  1.1.1.2  christos           xlc*)
    350  1.1.1.2  christos             ;;
    351  1.1.1.2  christos           *)
    352  1.1.1.2  christos             ld_shlibs=no
    353  1.1.1.2  christos             ;;
    354  1.1.1.2  christos         esac
    355      1.1  christos       fi
    356      1.1  christos       ;;
    357      1.1  christos     dgux*)
    358      1.1  christos       hardcode_libdir_flag_spec='-L$libdir'
    359      1.1  christos       ;;
    360  1.1.1.2  christos     freebsd1*)
    361  1.1.1.2  christos       ld_shlibs=no
    362  1.1.1.2  christos       ;;
    363      1.1  christos     freebsd2.2*)
    364      1.1  christos       hardcode_libdir_flag_spec='-R$libdir'
    365      1.1  christos       hardcode_direct=yes
    366      1.1  christos       ;;
    367      1.1  christos     freebsd2*)
    368      1.1  christos       hardcode_direct=yes
    369      1.1  christos       hardcode_minus_L=yes
    370      1.1  christos       ;;
    371      1.1  christos     freebsd* | dragonfly*)
    372      1.1  christos       hardcode_libdir_flag_spec='-R$libdir'
    373      1.1  christos       hardcode_direct=yes
    374      1.1  christos       ;;
    375      1.1  christos     hpux9*)
    376      1.1  christos       hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
    377      1.1  christos       hardcode_libdir_separator=:
    378      1.1  christos       hardcode_direct=yes
    379      1.1  christos       # hardcode_minus_L: Not really in the search PATH,
    380      1.1  christos       # but as the default location of the library.
    381      1.1  christos       hardcode_minus_L=yes
    382      1.1  christos       ;;
    383      1.1  christos     hpux10*)
    384      1.1  christos       if test "$with_gnu_ld" = no; then
    385      1.1  christos         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
    386      1.1  christos         hardcode_libdir_separator=:
    387      1.1  christos         hardcode_direct=yes
    388      1.1  christos         # hardcode_minus_L: Not really in the search PATH,
    389      1.1  christos         # but as the default location of the library.
    390      1.1  christos         hardcode_minus_L=yes
    391      1.1  christos       fi
    392      1.1  christos       ;;
    393      1.1  christos     hpux11*)
    394      1.1  christos       if test "$with_gnu_ld" = no; then
    395      1.1  christos         hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
    396      1.1  christos         hardcode_libdir_separator=:
    397      1.1  christos         case $host_cpu in
    398      1.1  christos           hppa*64*|ia64*)
    399      1.1  christos             hardcode_direct=no
    400      1.1  christos             ;;
    401      1.1  christos           *)
    402      1.1  christos             hardcode_direct=yes
    403      1.1  christos             # hardcode_minus_L: Not really in the search PATH,
    404      1.1  christos             # but as the default location of the library.
    405      1.1  christos             hardcode_minus_L=yes
    406      1.1  christos             ;;
    407      1.1  christos         esac
    408      1.1  christos       fi
    409      1.1  christos       ;;
    410      1.1  christos     irix5* | irix6* | nonstopux*)
    411      1.1  christos       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    412      1.1  christos       hardcode_libdir_separator=:
    413      1.1  christos       ;;
    414      1.1  christos     netbsd*)
    415      1.1  christos       hardcode_libdir_flag_spec='-R$libdir'
    416      1.1  christos       hardcode_direct=yes
    417      1.1  christos       ;;
    418      1.1  christos     newsos6)
    419      1.1  christos       hardcode_direct=yes
    420      1.1  christos       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    421      1.1  christos       hardcode_libdir_separator=:
    422      1.1  christos       ;;
    423      1.1  christos     openbsd*)
    424      1.1  christos       if test -f /usr/libexec/ld.so; then
    425      1.1  christos         hardcode_direct=yes
    426      1.1  christos         if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
    427      1.1  christos           hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
    428      1.1  christos         else
    429      1.1  christos           case "$host_os" in
    430      1.1  christos             openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
    431      1.1  christos               hardcode_libdir_flag_spec='-R$libdir'
    432      1.1  christos               ;;
    433      1.1  christos             *)
    434      1.1  christos               hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
    435      1.1  christos               ;;
    436      1.1  christos           esac
    437      1.1  christos         fi
    438      1.1  christos       else
    439      1.1  christos         ld_shlibs=no
    440      1.1  christos       fi
    441      1.1  christos       ;;
    442      1.1  christos     os2*)
    443      1.1  christos       hardcode_libdir_flag_spec='-L$libdir'
    444      1.1  christos       hardcode_minus_L=yes
    445      1.1  christos       ;;
    446      1.1  christos     osf3*)
    447      1.1  christos       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    448      1.1  christos       hardcode_libdir_separator=:
    449      1.1  christos       ;;
    450      1.1  christos     osf4* | osf5*)
    451      1.1  christos       if test "$GCC" = yes; then
    452      1.1  christos         hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
    453      1.1  christos       else
    454      1.1  christos         # Both cc and cxx compiler support -rpath directly
    455      1.1  christos         hardcode_libdir_flag_spec='-rpath $libdir'
    456      1.1  christos       fi
    457      1.1  christos       hardcode_libdir_separator=:
    458      1.1  christos       ;;
    459      1.1  christos     solaris*)
    460      1.1  christos       hardcode_libdir_flag_spec='-R$libdir'
    461      1.1  christos       ;;
    462      1.1  christos     sunos4*)
    463      1.1  christos       hardcode_libdir_flag_spec='-L$libdir'
    464      1.1  christos       hardcode_direct=yes
    465      1.1  christos       hardcode_minus_L=yes
    466      1.1  christos       ;;
    467      1.1  christos     sysv4)
    468      1.1  christos       case $host_vendor in
    469      1.1  christos         sni)
    470      1.1  christos           hardcode_direct=yes # is this really true???
    471      1.1  christos           ;;
    472      1.1  christos         siemens)
    473      1.1  christos           hardcode_direct=no
    474      1.1  christos           ;;
    475      1.1  christos         motorola)
    476      1.1  christos           hardcode_direct=no #Motorola manual says yes, but my tests say they lie
    477      1.1  christos           ;;
    478      1.1  christos       esac
    479      1.1  christos       ;;
    480      1.1  christos     sysv4.3*)
    481      1.1  christos       ;;
    482      1.1  christos     sysv4*MP*)
    483      1.1  christos       if test -d /usr/nec; then
    484      1.1  christos         ld_shlibs=yes
    485      1.1  christos       fi
    486      1.1  christos       ;;
    487      1.1  christos     sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
    488      1.1  christos       ;;
    489      1.1  christos     sysv5* | sco3.2v5* | sco5v6*)
    490      1.1  christos       hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
    491      1.1  christos       hardcode_libdir_separator=':'
    492      1.1  christos       ;;
    493      1.1  christos     uts4*)
    494      1.1  christos       hardcode_libdir_flag_spec='-L$libdir'
    495      1.1  christos       ;;
    496      1.1  christos     *)
    497      1.1  christos       ld_shlibs=no
    498      1.1  christos       ;;
    499      1.1  christos   esac
    500      1.1  christos fi
    501      1.1  christos 
    502      1.1  christos # Check dynamic linker characteristics
    503      1.1  christos # Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
    504      1.1  christos # Unlike libtool.m4, here we don't care about _all_ names of the library, but
    505      1.1  christos # only about the one the linker finds when passed -lNAME. This is the last
    506      1.1  christos # element of library_names_spec in libtool.m4, or possibly two of them if the
    507      1.1  christos # linker has special search rules.
    508      1.1  christos library_names_spec=      # the last element of library_names_spec in libtool.m4
    509      1.1  christos libname_spec='lib$name'
    510      1.1  christos case "$host_os" in
    511      1.1  christos   aix3*)
    512      1.1  christos     library_names_spec='$libname.a'
    513      1.1  christos     ;;
    514      1.1  christos   aix[4-9]*)
    515      1.1  christos     library_names_spec='$libname$shrext'
    516      1.1  christos     ;;
    517      1.1  christos   amigaos*)
    518  1.1.1.2  christos     library_names_spec='$libname.a'
    519      1.1  christos     ;;
    520      1.1  christos   beos*)
    521      1.1  christos     library_names_spec='$libname$shrext'
    522      1.1  christos     ;;
    523      1.1  christos   bsdi[45]*)
    524      1.1  christos     library_names_spec='$libname$shrext'
    525      1.1  christos     ;;
    526      1.1  christos   cygwin* | mingw* | pw32* | cegcc*)
    527      1.1  christos     shrext=.dll
    528      1.1  christos     library_names_spec='$libname.dll.a $libname.lib'
    529      1.1  christos     ;;
    530      1.1  christos   darwin* | rhapsody*)
    531      1.1  christos     shrext=.dylib
    532      1.1  christos     library_names_spec='$libname$shrext'
    533      1.1  christos     ;;
    534      1.1  christos   dgux*)
    535      1.1  christos     library_names_spec='$libname$shrext'
    536      1.1  christos     ;;
    537  1.1.1.2  christos   freebsd1*)
    538  1.1.1.2  christos     ;;
    539      1.1  christos   freebsd* | dragonfly*)
    540      1.1  christos     case "$host_os" in
    541      1.1  christos       freebsd[123]*)
    542      1.1  christos         library_names_spec='$libname$shrext$versuffix' ;;
    543      1.1  christos       *)
    544      1.1  christos         library_names_spec='$libname$shrext' ;;
    545      1.1  christos     esac
    546      1.1  christos     ;;
    547      1.1  christos   gnu*)
    548      1.1  christos     library_names_spec='$libname$shrext'
    549      1.1  christos     ;;
    550      1.1  christos   hpux9* | hpux10* | hpux11*)
    551      1.1  christos     case $host_cpu in
    552      1.1  christos       ia64*)
    553      1.1  christos         shrext=.so
    554      1.1  christos         ;;
    555      1.1  christos       hppa*64*)
    556      1.1  christos         shrext=.sl
    557      1.1  christos         ;;
    558      1.1  christos       *)
    559      1.1  christos         shrext=.sl
    560      1.1  christos         ;;
    561      1.1  christos     esac
    562      1.1  christos     library_names_spec='$libname$shrext'
    563      1.1  christos     ;;
    564      1.1  christos   interix[3-9]*)
    565      1.1  christos     library_names_spec='$libname$shrext'
    566      1.1  christos     ;;
    567      1.1  christos   irix5* | irix6* | nonstopux*)
    568      1.1  christos     library_names_spec='$libname$shrext'
    569      1.1  christos     case "$host_os" in
    570      1.1  christos       irix5* | nonstopux*)
    571      1.1  christos         libsuff= shlibsuff=
    572      1.1  christos         ;;
    573      1.1  christos       *)
    574      1.1  christos         case $LD in
    575      1.1  christos           *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
    576      1.1  christos           *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
    577      1.1  christos           *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
    578      1.1  christos           *) libsuff= shlibsuff= ;;
    579      1.1  christos         esac
    580      1.1  christos         ;;
    581      1.1  christos     esac
    582      1.1  christos     ;;
    583      1.1  christos   linux*oldld* | linux*aout* | linux*coff*)
    584      1.1  christos     ;;
    585  1.1.1.2  christos   linux* | k*bsd*-gnu)
    586      1.1  christos     library_names_spec='$libname$shrext'
    587      1.1  christos     ;;
    588      1.1  christos   knetbsd*-gnu)
    589      1.1  christos     library_names_spec='$libname$shrext'
    590      1.1  christos     ;;
    591      1.1  christos   netbsd*)
    592      1.1  christos     library_names_spec='$libname$shrext'
    593      1.1  christos     ;;
    594      1.1  christos   newsos6)
    595      1.1  christos     library_names_spec='$libname$shrext'
    596      1.1  christos     ;;
    597  1.1.1.2  christos   nto-qnx*)
    598      1.1  christos     library_names_spec='$libname$shrext'
    599      1.1  christos     ;;
    600      1.1  christos   openbsd*)
    601      1.1  christos     library_names_spec='$libname$shrext$versuffix'
    602      1.1  christos     ;;
    603      1.1  christos   os2*)
    604      1.1  christos     libname_spec='$name'
    605      1.1  christos     shrext=.dll
    606      1.1  christos     library_names_spec='$libname.a'
    607      1.1  christos     ;;
    608      1.1  christos   osf3* | osf4* | osf5*)
    609      1.1  christos     library_names_spec='$libname$shrext'
    610      1.1  christos     ;;
    611      1.1  christos   rdos*)
    612      1.1  christos     ;;
    613      1.1  christos   solaris*)
    614      1.1  christos     library_names_spec='$libname$shrext'
    615      1.1  christos     ;;
    616      1.1  christos   sunos4*)
    617      1.1  christos     library_names_spec='$libname$shrext$versuffix'
    618      1.1  christos     ;;
    619      1.1  christos   sysv4 | sysv4.3*)
    620      1.1  christos     library_names_spec='$libname$shrext'
    621      1.1  christos     ;;
    622      1.1  christos   sysv4*MP*)
    623      1.1  christos     library_names_spec='$libname$shrext'
    624      1.1  christos     ;;
    625      1.1  christos   sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
    626      1.1  christos     library_names_spec='$libname$shrext'
    627      1.1  christos     ;;
    628      1.1  christos   uts4*)
    629      1.1  christos     library_names_spec='$libname$shrext'
    630      1.1  christos     ;;
    631      1.1  christos esac
    632      1.1  christos 
    633      1.1  christos sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
    634      1.1  christos escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
    635      1.1  christos shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
    636      1.1  christos escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
    637      1.1  christos escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
    638      1.1  christos escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
    639      1.1  christos 
    640      1.1  christos LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
    641      1.1  christos 
    642      1.1  christos # How to pass a linker flag through the compiler.
    643      1.1  christos wl="$escaped_wl"
    644      1.1  christos 
    645      1.1  christos # Static library suffix (normally "a").
    646      1.1  christos libext="$libext"
    647      1.1  christos 
    648      1.1  christos # Shared library suffix (normally "so").
    649      1.1  christos shlibext="$shlibext"
    650      1.1  christos 
    651      1.1  christos # Format of library name prefix.
    652      1.1  christos libname_spec="$escaped_libname_spec"
    653      1.1  christos 
    654      1.1  christos # Library names that the linker finds when passed -lNAME.
    655      1.1  christos library_names_spec="$escaped_library_names_spec"
    656      1.1  christos 
    657      1.1  christos # Flag to hardcode \$libdir into a binary during linking.
    658      1.1  christos # This must work even if \$libdir does not exist.
    659      1.1  christos hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
    660      1.1  christos 
    661      1.1  christos # Whether we need a single -rpath flag with a separated argument.
    662      1.1  christos hardcode_libdir_separator="$hardcode_libdir_separator"
    663      1.1  christos 
    664      1.1  christos # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
    665      1.1  christos # resulting binary.
    666      1.1  christos hardcode_direct="$hardcode_direct"
    667      1.1  christos 
    668      1.1  christos # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
    669      1.1  christos # resulting binary.
    670      1.1  christos hardcode_minus_L="$hardcode_minus_L"
    671      1.1  christos 
    672      1.1  christos EOF
    673