2
2
# Output a system dependent set of variables, describing how to set the
3
3
# run time search path of shared libraries in an executable.
5
# Copyright 1996-2003 Free Software Foundation, Inc.
5
# Copyright 1996-2007 Free Software Foundation, Inc.
6
6
# Taken from GNU libtool, 2001
7
7
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
9
# This program is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
14
# This program is distributed in the hope that it will be useful, but
15
# WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
# General Public License for more details.
19
# You should have received a copy of the GNU General Public License
20
# along with this program; if not, write to the Free Software
21
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
# As a special exception to the GNU General Public License, if you
24
# distribute this file as part of a program that contains a
25
# configuration script generated by Autoconf, you may include it under
26
# the same distribution terms that you use for the rest of that program.
9
# This file is free software; the Free Software Foundation gives
10
# unlimited permission to copy and/or distribute it, with or without
11
# modifications, as long as this notice is preserved.
28
13
# The first argument passed to this file is the canonical host specification,
29
14
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
40
25
# known workaround is to choose shorter directory names for the build
41
26
# directory and/or the installation directory.
43
# All known linkers require a `.a' archive for static linking (except M$VC,
28
# All known linkers require a `.a' archive for static linking (except MSVC,
44
29
# which needs '.lib').
50
35
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
51
36
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
38
# Code taken from libtool.m4's _LT_CC_BASENAME.
40
for cc_temp in $CC""; do
42
compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
43
distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
48
cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
53
50
# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
126
153
if test "$with_gnu_ld" = yes; then
154
# Set some defaults for GNU ld with shared library support. These
155
# are reset later if shared libraries are not supported. Putting them
156
# here allows them to be overridden if necessary.
157
# Unlike libtool, we use -rpath here, not --rpath, since the documented
158
# option of GNU ld is called -rpath, not --rpath.
159
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
127
160
case "$host_os" in
128
161
aix3* | aix4* | aix5*)
129
162
# On AIX/PPC, the GNU linker is very broken
138
171
# that the semantics of dynamic libraries on AmigaOS, at least up
139
172
# to version 4, is to share data among multiple programs linked
140
173
# with the same dynamic library. Since this doesn't match the
141
# behavior of shared libraries on other platforms, we can use
174
# behavior of shared libraries on other platforms, we cannot use
197
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
199
gnu* | linux* | k*bsd*-gnu)
200
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
165
209
if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
167
211
elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
217
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
218
case `$LD -v 2>&1` in
219
*\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
223
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
224
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
174
232
hardcode_direct=yes
184
if test "$ld_shlibs" = yes; then
185
# Unlike libtool, we use -rpath here, not --rpath, since the documented
186
# option of GNU ld is called -rpath, not --rpath.
187
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
242
if test "$ld_shlibs" = no; then
243
hardcode_libdir_flag_spec=
190
246
case "$host_os" in
307
374
# but as the default location of the library.
308
375
hardcode_minus_L=yes
311
if test "$with_gnu_ld" = no; then
314
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
315
hardcode_libdir_separator=:
319
hardcode_libdir_flag_spec='-L$libdir'
321
# hardcode_minus_L: Not really in the search PATH,
322
# but as the default location of the library.
378
if test "$with_gnu_ld" = no; then
379
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
380
hardcode_libdir_separator=:
382
# hardcode_minus_L: Not really in the search PATH,
383
# but as the default location of the library.
388
if test "$with_gnu_ld" = no; then
389
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
390
hardcode_libdir_separator=:
326
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
327
hardcode_libdir_separator=:
328
396
hardcode_direct=yes
329
397
# hardcode_minus_L: Not really in the search PATH,
330
398
# but as the default location of the library.
347
415
hardcode_libdir_separator=:
351
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
352
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
418
if test -f /usr/libexec/ld.so; then
420
if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
421
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
424
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
425
hardcode_libdir_flag_spec='-R$libdir'
428
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
355
openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
356
hardcode_libdir_flag_spec='-R$libdir'
359
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
415
sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
418
hardcode_libdir_flag_spec=
481
sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
483
sysv5* | sco3.2v5* | sco5v6*)
484
hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
485
hardcode_libdir_separator=':'
421
488
hardcode_libdir_flag_spec='-L$libdir'
429
496
# Check dynamic linker characteristics
430
497
# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
498
# Unlike libtool.m4, here we don't care about _all_ names of the library, but
499
# only about the one the linker finds when passed -lNAME. This is the last
500
# element of library_names_spec in libtool.m4, or possibly two of them if the
501
# linker has special search rules.
502
library_names_spec= # the last element of library_names_spec in libtool.m4
431
503
libname_spec='lib$name'
432
504
case "$host_os" in
506
library_names_spec='$libname.a'
509
library_names_spec='$libname$shrext'
512
library_names_spec='$libname.a'
515
library_names_spec='$libname$shrext'
518
library_names_spec='$libname$shrext'
443
520
cygwin* | mingw* | pw32*)
522
library_names_spec='$libname.dll.a $libname.lib'
446
524
darwin* | rhapsody*)
526
library_names_spec='$libname$shrext'
529
library_names_spec='$libname$shrext'
533
freebsd* | dragonfly*)
536
library_names_spec='$libname$shrext$versuffix' ;;
538
library_names_spec='$libname$shrext' ;;
542
library_names_spec='$libname$shrext'
457
544
hpux9* | hpux10* | hpux11*)
485
577
linux*oldld* | linux*aout* | linux*coff*)
580
library_names_spec='$libname$shrext'
583
library_names_spec='$libname$shrext'
586
library_names_spec='$libname$shrext'
589
library_names_spec='$libname$shrext'
592
library_names_spec='$libname$shrext'
595
library_names_spec='$libname$shrext$versuffix'
498
598
libname_spec='$name'
600
library_names_spec='$libname.a'
501
602
osf3* | osf4* | osf5*)
603
library_names_spec='$libname$shrext'
608
library_names_spec='$libname$shrext'
611
library_names_spec='$libname$shrext$versuffix'
509
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
614
library_names_spec='$libname$shrext'
617
library_names_spec='$libname$shrext'
619
sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
620
library_names_spec='$libname$shrext'
623
library_names_spec='$libname$shrext'
517
627
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
518
628
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
519
629
shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
630
escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
631
escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
520
632
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
522
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
634
LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
524
636
# How to pass a linker flag through the compiler.
530
642
# Shared library suffix (normally "so").
531
643
shlibext="$shlibext"
645
# Format of library name prefix.
646
libname_spec="$escaped_libname_spec"
648
# Library names that the linker finds when passed -lNAME.
649
library_names_spec="$escaped_library_names_spec"
533
651
# Flag to hardcode \$libdir into a binary during linking.
534
652
# This must work even if \$libdir does not exist.
535
653
hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"