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