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