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