Statistics
| Revision:

root / config.rpath

History | View | Annotate | Download (17.9 kB)

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