1*29619d2aSchristos#! /bin/sh 2*29619d2aSchristos# Output a system dependent set of variables, describing how to set the 3*29619d2aSchristos# run time search path of shared libraries in an executable. 4*29619d2aSchristos# 5*29619d2aSchristos# Copyright 1996-2003 Free Software Foundation, Inc. 6*29619d2aSchristos# Taken from GNU libtool, 2001 7*29619d2aSchristos# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 8*29619d2aSchristos# 9*29619d2aSchristos# This program is free software; you can redistribute it and/or modify 10*29619d2aSchristos# it under the terms of the GNU General Public License as published by 11*29619d2aSchristos# the Free Software Foundation; either version 2 of the License, or 12*29619d2aSchristos# (at your option) any later version. 13*29619d2aSchristos# 14*29619d2aSchristos# This program is distributed in the hope that it will be useful, but 15*29619d2aSchristos# WITHOUT ANY WARRANTY; without even the implied warranty of 16*29619d2aSchristos# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17*29619d2aSchristos# General Public License for more details. 18*29619d2aSchristos# 19*29619d2aSchristos# You should have received a copy of the GNU General Public License 20*29619d2aSchristos# along with this program; if not, write to the Free Software 21*29619d2aSchristos# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22*29619d2aSchristos# 23*29619d2aSchristos# As a special exception to the GNU General Public License, if you 24*29619d2aSchristos# distribute this file as part of a program that contains a 25*29619d2aSchristos# configuration script generated by Autoconf, you may include it under 26*29619d2aSchristos# the same distribution terms that you use for the rest of that program. 27*29619d2aSchristos# 28*29619d2aSchristos# The first argument passed to this file is the canonical host specification, 29*29619d2aSchristos# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM 30*29619d2aSchristos# or 31*29619d2aSchristos# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM 32*29619d2aSchristos# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld 33*29619d2aSchristos# should be set by the caller. 34*29619d2aSchristos# 35*29619d2aSchristos# The set of defined variables is at the end of this script. 36*29619d2aSchristos 37*29619d2aSchristos# Known limitations: 38*29619d2aSchristos# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer 39*29619d2aSchristos# than 256 bytes, otherwise the compiler driver will dump core. The only 40*29619d2aSchristos# known workaround is to choose shorter directory names for the build 41*29619d2aSchristos# directory and/or the installation directory. 42*29619d2aSchristos 43*29619d2aSchristos# All known linkers require a `.a' archive for static linking (except M$VC, 44*29619d2aSchristos# which needs '.lib'). 45*29619d2aSchristoslibext=a 46*29619d2aSchristosshrext=.so 47*29619d2aSchristos 48*29619d2aSchristoshost="$1" 49*29619d2aSchristoshost_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` 50*29619d2aSchristoshost_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 51*29619d2aSchristoshost_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 52*29619d2aSchristos 53*29619d2aSchristos# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. 54*29619d2aSchristos 55*29619d2aSchristoswl= 56*29619d2aSchristosif test "$GCC" = yes; then 57*29619d2aSchristos wl='-Wl,' 58*29619d2aSchristoselse 59*29619d2aSchristos case "$host_os" in 60*29619d2aSchristos aix*) 61*29619d2aSchristos wl='-Wl,' 62*29619d2aSchristos ;; 63*29619d2aSchristos mingw* | pw32* | os2*) 64*29619d2aSchristos ;; 65*29619d2aSchristos hpux9* | hpux10* | hpux11*) 66*29619d2aSchristos wl='-Wl,' 67*29619d2aSchristos ;; 68*29619d2aSchristos irix5* | irix6* | nonstopux*) 69*29619d2aSchristos wl='-Wl,' 70*29619d2aSchristos ;; 71*29619d2aSchristos newsos6) 72*29619d2aSchristos ;; 73*29619d2aSchristos linux*) 74*29619d2aSchristos case $CC in 75*29619d2aSchristos icc|ecc) 76*29619d2aSchristos wl='-Wl,' 77*29619d2aSchristos ;; 78*29619d2aSchristos ccc) 79*29619d2aSchristos wl='-Wl,' 80*29619d2aSchristos ;; 81*29619d2aSchristos esac 82*29619d2aSchristos ;; 83*29619d2aSchristos osf3* | osf4* | osf5*) 84*29619d2aSchristos wl='-Wl,' 85*29619d2aSchristos ;; 86*29619d2aSchristos sco3.2v5*) 87*29619d2aSchristos ;; 88*29619d2aSchristos solaris*) 89*29619d2aSchristos wl='-Wl,' 90*29619d2aSchristos ;; 91*29619d2aSchristos sunos4*) 92*29619d2aSchristos wl='-Qoption ld ' 93*29619d2aSchristos ;; 94*29619d2aSchristos sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 95*29619d2aSchristos wl='-Wl,' 96*29619d2aSchristos ;; 97*29619d2aSchristos sysv4*MP*) 98*29619d2aSchristos ;; 99*29619d2aSchristos uts4*) 100*29619d2aSchristos ;; 101*29619d2aSchristos esac 102*29619d2aSchristosfi 103*29619d2aSchristos 104*29619d2aSchristos# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. 105*29619d2aSchristos 106*29619d2aSchristoshardcode_libdir_flag_spec= 107*29619d2aSchristoshardcode_libdir_separator= 108*29619d2aSchristoshardcode_direct=no 109*29619d2aSchristoshardcode_minus_L=no 110*29619d2aSchristos 111*29619d2aSchristoscase "$host_os" in 112*29619d2aSchristos cygwin* | mingw* | pw32*) 113*29619d2aSchristos # FIXME: the MSVC++ port hasn't been tested in a loooong time 114*29619d2aSchristos # When not using gcc, we currently assume that we are using 115*29619d2aSchristos # Microsoft Visual C++. 116*29619d2aSchristos if test "$GCC" != yes; then 117*29619d2aSchristos with_gnu_ld=no 118*29619d2aSchristos fi 119*29619d2aSchristos ;; 120*29619d2aSchristos openbsd*) 121*29619d2aSchristos with_gnu_ld=no 122*29619d2aSchristos ;; 123*29619d2aSchristosesac 124*29619d2aSchristos 125*29619d2aSchristosld_shlibs=yes 126*29619d2aSchristosif test "$with_gnu_ld" = yes; then 127*29619d2aSchristos case "$host_os" in 128*29619d2aSchristos aix3* | aix4* | aix5*) 129*29619d2aSchristos # On AIX/PPC, the GNU linker is very broken 130*29619d2aSchristos if test "$host_cpu" != ia64; then 131*29619d2aSchristos ld_shlibs=no 132*29619d2aSchristos fi 133*29619d2aSchristos ;; 134*29619d2aSchristos amigaos*) 135*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 136*29619d2aSchristos hardcode_minus_L=yes 137*29619d2aSchristos # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports 138*29619d2aSchristos # that the semantics of dynamic libraries on AmigaOS, at least up 139*29619d2aSchristos # to version 4, is to share data among multiple programs linked 140*29619d2aSchristos # with the same dynamic library. Since this doesn't match the 141*29619d2aSchristos # behavior of shared libraries on other platforms, we can use 142*29619d2aSchristos # them. 143*29619d2aSchristos ld_shlibs=no 144*29619d2aSchristos ;; 145*29619d2aSchristos beos*) 146*29619d2aSchristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 147*29619d2aSchristos : 148*29619d2aSchristos else 149*29619d2aSchristos ld_shlibs=no 150*29619d2aSchristos fi 151*29619d2aSchristos ;; 152*29619d2aSchristos cygwin* | mingw* | pw32*) 153*29619d2aSchristos # hardcode_libdir_flag_spec is actually meaningless, as there is 154*29619d2aSchristos # no search path for DLLs. 155*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 156*29619d2aSchristos if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then 157*29619d2aSchristos : 158*29619d2aSchristos else 159*29619d2aSchristos ld_shlibs=no 160*29619d2aSchristos fi 161*29619d2aSchristos ;; 162*29619d2aSchristos netbsd*) 163*29619d2aSchristos ;; 164*29619d2aSchristos solaris* | sysv5*) 165*29619d2aSchristos if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then 166*29619d2aSchristos ld_shlibs=no 167*29619d2aSchristos elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 168*29619d2aSchristos : 169*29619d2aSchristos else 170*29619d2aSchristos ld_shlibs=no 171*29619d2aSchristos fi 172*29619d2aSchristos ;; 173*29619d2aSchristos sunos4*) 174*29619d2aSchristos hardcode_direct=yes 175*29619d2aSchristos ;; 176*29619d2aSchristos *) 177*29619d2aSchristos if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then 178*29619d2aSchristos : 179*29619d2aSchristos else 180*29619d2aSchristos ld_shlibs=no 181*29619d2aSchristos fi 182*29619d2aSchristos ;; 183*29619d2aSchristos esac 184*29619d2aSchristos if test "$ld_shlibs" = yes; then 185*29619d2aSchristos # Unlike libtool, we use -rpath here, not --rpath, since the documented 186*29619d2aSchristos # option of GNU ld is called -rpath, not --rpath. 187*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 188*29619d2aSchristos fi 189*29619d2aSchristoselse 190*29619d2aSchristos case "$host_os" in 191*29619d2aSchristos aix3*) 192*29619d2aSchristos # Note: this linker hardcodes the directories in LIBPATH if there 193*29619d2aSchristos # are no directories specified by -L. 194*29619d2aSchristos hardcode_minus_L=yes 195*29619d2aSchristos if test "$GCC" = yes; then 196*29619d2aSchristos # Neither direct hardcoding nor static linking is supported with a 197*29619d2aSchristos # broken collect2. 198*29619d2aSchristos hardcode_direct=unsupported 199*29619d2aSchristos fi 200*29619d2aSchristos ;; 201*29619d2aSchristos aix4* | aix5*) 202*29619d2aSchristos if test "$host_cpu" = ia64; then 203*29619d2aSchristos # On IA64, the linker does run time linking by default, so we don't 204*29619d2aSchristos # have to do anything special. 205*29619d2aSchristos aix_use_runtimelinking=no 206*29619d2aSchristos else 207*29619d2aSchristos aix_use_runtimelinking=no 208*29619d2aSchristos # Test if we are trying to use run time linking or normal 209*29619d2aSchristos # AIX style linking. If -brtl is somewhere in LDFLAGS, we 210*29619d2aSchristos # need to do runtime linking. 211*29619d2aSchristos case $host_os in aix4.[23]|aix4.[23].*|aix5*) 212*29619d2aSchristos for ld_flag in $LDFLAGS; do 213*29619d2aSchristos if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 214*29619d2aSchristos aix_use_runtimelinking=yes 215*29619d2aSchristos break 216*29619d2aSchristos fi 217*29619d2aSchristos done 218*29619d2aSchristos esac 219*29619d2aSchristos fi 220*29619d2aSchristos hardcode_direct=yes 221*29619d2aSchristos hardcode_libdir_separator=':' 222*29619d2aSchristos if test "$GCC" = yes; then 223*29619d2aSchristos case $host_os in aix4.[012]|aix4.[012].*) 224*29619d2aSchristos collect2name=`${CC} -print-prog-name=collect2` 225*29619d2aSchristos if test -f "$collect2name" && \ 226*29619d2aSchristos strings "$collect2name" | grep resolve_lib_name >/dev/null 227*29619d2aSchristos then 228*29619d2aSchristos # We have reworked collect2 229*29619d2aSchristos hardcode_direct=yes 230*29619d2aSchristos else 231*29619d2aSchristos # We have old collect2 232*29619d2aSchristos hardcode_direct=unsupported 233*29619d2aSchristos hardcode_minus_L=yes 234*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 235*29619d2aSchristos hardcode_libdir_separator= 236*29619d2aSchristos fi 237*29619d2aSchristos esac 238*29619d2aSchristos fi 239*29619d2aSchristos # Begin _LT_AC_SYS_LIBPATH_AIX. 240*29619d2aSchristos echo 'int main () { return 0; }' > conftest.c 241*29619d2aSchristos ${CC} ${LDFLAGS} conftest.c -o conftest 242*29619d2aSchristos aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 243*29619d2aSchristos}'` 244*29619d2aSchristos if test -z "$aix_libpath"; then 245*29619d2aSchristos aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } 246*29619d2aSchristos}'` 247*29619d2aSchristos fi 248*29619d2aSchristos if test -z "$aix_libpath"; then 249*29619d2aSchristos aix_libpath="/usr/lib:/lib" 250*29619d2aSchristos fi 251*29619d2aSchristos rm -f conftest.c conftest 252*29619d2aSchristos # End _LT_AC_SYS_LIBPATH_AIX. 253*29619d2aSchristos if test "$aix_use_runtimelinking" = yes; then 254*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" 255*29619d2aSchristos else 256*29619d2aSchristos if test "$host_cpu" = ia64; then 257*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' 258*29619d2aSchristos else 259*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" 260*29619d2aSchristos fi 261*29619d2aSchristos fi 262*29619d2aSchristos ;; 263*29619d2aSchristos amigaos*) 264*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 265*29619d2aSchristos hardcode_minus_L=yes 266*29619d2aSchristos # see comment about different semantics on the GNU ld section 267*29619d2aSchristos ld_shlibs=no 268*29619d2aSchristos ;; 269*29619d2aSchristos bsdi4*) 270*29619d2aSchristos ;; 271*29619d2aSchristos cygwin* | mingw* | pw32*) 272*29619d2aSchristos # When not using gcc, we currently assume that we are using 273*29619d2aSchristos # Microsoft Visual C++. 274*29619d2aSchristos # hardcode_libdir_flag_spec is actually meaningless, as there is 275*29619d2aSchristos # no search path for DLLs. 276*29619d2aSchristos hardcode_libdir_flag_spec=' ' 277*29619d2aSchristos libext=lib 278*29619d2aSchristos ;; 279*29619d2aSchristos darwin* | rhapsody*) 280*29619d2aSchristos if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 281*29619d2aSchristos hardcode_direct=no 282*29619d2aSchristos fi 283*29619d2aSchristos ;; 284*29619d2aSchristos dgux*) 285*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 286*29619d2aSchristos ;; 287*29619d2aSchristos freebsd1*) 288*29619d2aSchristos ld_shlibs=no 289*29619d2aSchristos ;; 290*29619d2aSchristos freebsd2.2*) 291*29619d2aSchristos hardcode_libdir_flag_spec='-R$libdir' 292*29619d2aSchristos hardcode_direct=yes 293*29619d2aSchristos ;; 294*29619d2aSchristos freebsd2*) 295*29619d2aSchristos hardcode_direct=yes 296*29619d2aSchristos hardcode_minus_L=yes 297*29619d2aSchristos ;; 298*29619d2aSchristos freebsd*) 299*29619d2aSchristos hardcode_libdir_flag_spec='-R$libdir' 300*29619d2aSchristos hardcode_direct=yes 301*29619d2aSchristos ;; 302*29619d2aSchristos hpux9*) 303*29619d2aSchristos hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 304*29619d2aSchristos hardcode_libdir_separator=: 305*29619d2aSchristos hardcode_direct=yes 306*29619d2aSchristos # hardcode_minus_L: Not really in the search PATH, 307*29619d2aSchristos # but as the default location of the library. 308*29619d2aSchristos hardcode_minus_L=yes 309*29619d2aSchristos ;; 310*29619d2aSchristos hpux10* | hpux11*) 311*29619d2aSchristos if test "$with_gnu_ld" = no; then 312*29619d2aSchristos case "$host_cpu" in 313*29619d2aSchristos hppa*64*) 314*29619d2aSchristos hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 315*29619d2aSchristos hardcode_libdir_separator=: 316*29619d2aSchristos hardcode_direct=no 317*29619d2aSchristos ;; 318*29619d2aSchristos ia64*) 319*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 320*29619d2aSchristos hardcode_direct=no 321*29619d2aSchristos # hardcode_minus_L: Not really in the search PATH, 322*29619d2aSchristos # but as the default location of the library. 323*29619d2aSchristos hardcode_minus_L=yes 324*29619d2aSchristos ;; 325*29619d2aSchristos *) 326*29619d2aSchristos hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' 327*29619d2aSchristos hardcode_libdir_separator=: 328*29619d2aSchristos hardcode_direct=yes 329*29619d2aSchristos # hardcode_minus_L: Not really in the search PATH, 330*29619d2aSchristos # but as the default location of the library. 331*29619d2aSchristos hardcode_minus_L=yes 332*29619d2aSchristos ;; 333*29619d2aSchristos esac 334*29619d2aSchristos fi 335*29619d2aSchristos ;; 336*29619d2aSchristos irix5* | irix6* | nonstopux*) 337*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 338*29619d2aSchristos hardcode_libdir_separator=: 339*29619d2aSchristos ;; 340*29619d2aSchristos netbsd*) 341*29619d2aSchristos hardcode_libdir_flag_spec='-R$libdir' 342*29619d2aSchristos hardcode_direct=yes 343*29619d2aSchristos ;; 344*29619d2aSchristos newsos6) 345*29619d2aSchristos hardcode_direct=yes 346*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 347*29619d2aSchristos hardcode_libdir_separator=: 348*29619d2aSchristos ;; 349*29619d2aSchristos openbsd*) 350*29619d2aSchristos hardcode_direct=yes 351*29619d2aSchristos if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 352*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 353*29619d2aSchristos else 354*29619d2aSchristos case "$host_os" in 355*29619d2aSchristos openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) 356*29619d2aSchristos hardcode_libdir_flag_spec='-R$libdir' 357*29619d2aSchristos ;; 358*29619d2aSchristos *) 359*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath,$libdir' 360*29619d2aSchristos ;; 361*29619d2aSchristos esac 362*29619d2aSchristos fi 363*29619d2aSchristos ;; 364*29619d2aSchristos os2*) 365*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 366*29619d2aSchristos hardcode_minus_L=yes 367*29619d2aSchristos ;; 368*29619d2aSchristos osf3*) 369*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 370*29619d2aSchristos hardcode_libdir_separator=: 371*29619d2aSchristos ;; 372*29619d2aSchristos osf4* | osf5*) 373*29619d2aSchristos if test "$GCC" = yes; then 374*29619d2aSchristos hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' 375*29619d2aSchristos else 376*29619d2aSchristos # Both cc and cxx compiler support -rpath directly 377*29619d2aSchristos hardcode_libdir_flag_spec='-rpath $libdir' 378*29619d2aSchristos fi 379*29619d2aSchristos hardcode_libdir_separator=: 380*29619d2aSchristos ;; 381*29619d2aSchristos sco3.2v5*) 382*29619d2aSchristos ;; 383*29619d2aSchristos solaris*) 384*29619d2aSchristos hardcode_libdir_flag_spec='-R$libdir' 385*29619d2aSchristos ;; 386*29619d2aSchristos sunos4*) 387*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 388*29619d2aSchristos hardcode_direct=yes 389*29619d2aSchristos hardcode_minus_L=yes 390*29619d2aSchristos ;; 391*29619d2aSchristos sysv4) 392*29619d2aSchristos case $host_vendor in 393*29619d2aSchristos sni) 394*29619d2aSchristos hardcode_direct=yes # is this really true??? 395*29619d2aSchristos ;; 396*29619d2aSchristos siemens) 397*29619d2aSchristos hardcode_direct=no 398*29619d2aSchristos ;; 399*29619d2aSchristos motorola) 400*29619d2aSchristos hardcode_direct=no #Motorola manual says yes, but my tests say they lie 401*29619d2aSchristos ;; 402*29619d2aSchristos esac 403*29619d2aSchristos ;; 404*29619d2aSchristos sysv4.3*) 405*29619d2aSchristos ;; 406*29619d2aSchristos sysv4*MP*) 407*29619d2aSchristos if test -d /usr/nec; then 408*29619d2aSchristos ld_shlibs=yes 409*29619d2aSchristos fi 410*29619d2aSchristos ;; 411*29619d2aSchristos sysv4.2uw2*) 412*29619d2aSchristos hardcode_direct=yes 413*29619d2aSchristos hardcode_minus_L=no 414*29619d2aSchristos ;; 415*29619d2aSchristos sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) 416*29619d2aSchristos ;; 417*29619d2aSchristos sysv5*) 418*29619d2aSchristos hardcode_libdir_flag_spec= 419*29619d2aSchristos ;; 420*29619d2aSchristos uts4*) 421*29619d2aSchristos hardcode_libdir_flag_spec='-L$libdir' 422*29619d2aSchristos ;; 423*29619d2aSchristos *) 424*29619d2aSchristos ld_shlibs=no 425*29619d2aSchristos ;; 426*29619d2aSchristos esac 427*29619d2aSchristosfi 428*29619d2aSchristos 429*29619d2aSchristos# Check dynamic linker characteristics 430*29619d2aSchristos# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. 431*29619d2aSchristoslibname_spec='lib$name' 432*29619d2aSchristoscase "$host_os" in 433*29619d2aSchristos aix3*) 434*29619d2aSchristos ;; 435*29619d2aSchristos aix4* | aix5*) 436*29619d2aSchristos ;; 437*29619d2aSchristos amigaos*) 438*29619d2aSchristos ;; 439*29619d2aSchristos beos*) 440*29619d2aSchristos ;; 441*29619d2aSchristos bsdi4*) 442*29619d2aSchristos ;; 443*29619d2aSchristos cygwin* | mingw* | pw32*) 444*29619d2aSchristos shrext=.dll 445*29619d2aSchristos ;; 446*29619d2aSchristos darwin* | rhapsody*) 447*29619d2aSchristos shrext=.dylib 448*29619d2aSchristos ;; 449*29619d2aSchristos dgux*) 450*29619d2aSchristos ;; 451*29619d2aSchristos freebsd1*) 452*29619d2aSchristos ;; 453*29619d2aSchristos freebsd*) 454*29619d2aSchristos ;; 455*29619d2aSchristos gnu*) 456*29619d2aSchristos ;; 457*29619d2aSchristos hpux9* | hpux10* | hpux11*) 458*29619d2aSchristos case "$host_cpu" in 459*29619d2aSchristos ia64*) 460*29619d2aSchristos shrext=.so 461*29619d2aSchristos ;; 462*29619d2aSchristos hppa*64*) 463*29619d2aSchristos shrext=.sl 464*29619d2aSchristos ;; 465*29619d2aSchristos *) 466*29619d2aSchristos shrext=.sl 467*29619d2aSchristos ;; 468*29619d2aSchristos esac 469*29619d2aSchristos ;; 470*29619d2aSchristos irix5* | irix6* | nonstopux*) 471*29619d2aSchristos case "$host_os" in 472*29619d2aSchristos irix5* | nonstopux*) 473*29619d2aSchristos libsuff= shlibsuff= 474*29619d2aSchristos ;; 475*29619d2aSchristos *) 476*29619d2aSchristos case $LD in 477*29619d2aSchristos *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; 478*29619d2aSchristos *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; 479*29619d2aSchristos *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; 480*29619d2aSchristos *) libsuff= shlibsuff= ;; 481*29619d2aSchristos esac 482*29619d2aSchristos ;; 483*29619d2aSchristos esac 484*29619d2aSchristos ;; 485*29619d2aSchristos linux*oldld* | linux*aout* | linux*coff*) 486*29619d2aSchristos ;; 487*29619d2aSchristos linux*) 488*29619d2aSchristos ;; 489*29619d2aSchristos netbsd*) 490*29619d2aSchristos ;; 491*29619d2aSchristos newsos6) 492*29619d2aSchristos ;; 493*29619d2aSchristos nto-qnx) 494*29619d2aSchristos ;; 495*29619d2aSchristos openbsd*) 496*29619d2aSchristos ;; 497*29619d2aSchristos os2*) 498*29619d2aSchristos libname_spec='$name' 499*29619d2aSchristos shrext=.dll 500*29619d2aSchristos ;; 501*29619d2aSchristos osf3* | osf4* | osf5*) 502*29619d2aSchristos ;; 503*29619d2aSchristos sco3.2v5*) 504*29619d2aSchristos ;; 505*29619d2aSchristos solaris*) 506*29619d2aSchristos ;; 507*29619d2aSchristos sunos4*) 508*29619d2aSchristos ;; 509*29619d2aSchristos sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 510*29619d2aSchristos ;; 511*29619d2aSchristos sysv4*MP*) 512*29619d2aSchristos ;; 513*29619d2aSchristos uts4*) 514*29619d2aSchristos ;; 515*29619d2aSchristosesac 516*29619d2aSchristos 517*29619d2aSchristossed_quote_subst='s/\(["`$\\]\)/\\\1/g' 518*29619d2aSchristosescaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` 519*29619d2aSchristosshlibext=`echo "$shrext" | sed -e 's,^\.,,'` 520*29619d2aSchristosescaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` 521*29619d2aSchristos 522*29619d2aSchristossed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF 523*29619d2aSchristos 524*29619d2aSchristos# How to pass a linker flag through the compiler. 525*29619d2aSchristoswl="$escaped_wl" 526*29619d2aSchristos 527*29619d2aSchristos# Static library suffix (normally "a"). 528*29619d2aSchristoslibext="$libext" 529*29619d2aSchristos 530*29619d2aSchristos# Shared library suffix (normally "so"). 531*29619d2aSchristosshlibext="$shlibext" 532*29619d2aSchristos 533*29619d2aSchristos# Flag to hardcode \$libdir into a binary during linking. 534*29619d2aSchristos# This must work even if \$libdir does not exist. 535*29619d2aSchristoshardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec" 536*29619d2aSchristos 537*29619d2aSchristos# Whether we need a single -rpath flag with a separated argument. 538*29619d2aSchristoshardcode_libdir_separator="$hardcode_libdir_separator" 539*29619d2aSchristos 540*29619d2aSchristos# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the 541*29619d2aSchristos# resulting binary. 542*29619d2aSchristoshardcode_direct="$hardcode_direct" 543*29619d2aSchristos 544*29619d2aSchristos# Set to yes if using the -LDIR flag during linking hardcodes DIR into the 545*29619d2aSchristos# resulting binary. 546*29619d2aSchristoshardcode_minus_L="$hardcode_minus_L" 547*29619d2aSchristos 548*29619d2aSchristosEOF 549