+2003-04-24 Bruno Haible <bruno@clisp.org>
+
+ * config.rpath: Update to libtool-1.5. Small changes for AIX, HP-UX,
+ Irix, Linux, MacOS X, Windows.
+
2003-04-24 Bruno Haible <bruno@clisp.org>
* config.rpath: Don't set sys_lib_search_path_spec and
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
-shlibext=
+shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
- aix3* | aix4* | aix5*)
+ aix*)
wl='-Wl,'
;;
+ mingw* | pw32* | os2*)
+ ;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
+ newsos6)
+ ;;
linux*)
- echo '__INTEL_COMPILER' > conftest.$ac_ext
- if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
- then
- :
- else
- # Intel icc
- wl='-Qoption,ld,'
- fi
+ case $CC in
+ icc|ecc)
+ wl='-Wl,'
+ ;;
+ ccc)
+ wl='-Wl,'
+ ;;
+ esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
+ sco3.2v5*)
+ ;;
solaris*)
wl='-Wl,'
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
esac
fi
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- ld_shlibs=no
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
;;
esac
if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
done
esac
fi
fi
esac
fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
+ bsdi4*)
+ ;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
libext=lib
;;
darwin* | rhapsody*)
- hardcode_direct=yes
+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+ hardcode_direct=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
- hpux9* | hpux10* | hpux11*)
+ hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
;;
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- hardcode_libdir_flag_spec='-rpath $libdir'
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
;;
sysv4.3*)
;;
- sysv5*)
- hardcode_libdir_flag_spec=
- ;;
- uts4*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- dgux*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
hardcode_direct=yes
hardcode_minus_L=no
;;
- sysv5uw7* | unixware7*)
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
fi
# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
- shlibext=so
;;
aix4* | aix5*)
- shlibext=so
;;
amigaos*)
- shlibext=ixlibrary
;;
beos*)
- shlibext=so
;;
bsdi4*)
- shlibext=so
;;
cygwin* | mingw* | pw32*)
- case $GCC,$host_os in
- yes,cygwin*)
- shlibext=dll.a
- ;;
- yes,mingw*)
- shlibext=dll
- ;;
- yes,pw32*)
- shlibext=dll
- ;;
- *)
- shlibext=dll
- ;;
- esac
+ shrext=.dll
;;
darwin* | rhapsody*)
- shlibext=dylib
+ shrext=.dylib
+ ;;
+ dgux*)
;;
freebsd1*)
;;
freebsd*)
- shlibext=so
;;
gnu*)
- shlibext=so
;;
hpux9* | hpux10* | hpux11*)
- shlibext=sl
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
;;
irix5* | irix6* | nonstopux*)
- shlibext=so
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
- *-32|*"-32 ") libsuff= shlibsuff= ;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
- linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ linux*oldld* | linux*aout* | linux*coff*)
;;
- linux-gnu*)
- shlibext=so
+ linux*)
;;
netbsd*)
- shlibext=so
;;
newsos6)
- shlibext=so
+ ;;
+ nto-qnx)
;;
openbsd*)
- shlibext=so
;;
os2*)
libname_spec='$name'
- shlibext=dll
+ shrext=.dll
;;
osf3* | osf4* | osf5*)
- shlibext=so
;;
sco3.2v5*)
- shlibext=so
;;
solaris*)
- shlibext=so
;;
sunos4*)
- shlibext=so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- shlibext=so
- ;;
- uts4*)
- shlibext=so
- ;;
- dgux*)
- shlibext=so
;;
sysv4*MP*)
- if test -d /usr/nec; then
- shlibext=so
- fi
+ ;;
+ uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
# All known linkers require a `.a' archive for static linking (except M$VC,
# which needs '.lib').
libext=a
-shlibext=
+shrext=.so
host="$1"
host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
wl=
if test "$GCC" = yes; then
wl='-Wl,'
else
case "$host_os" in
- aix3* | aix4* | aix5*)
+ aix*)
wl='-Wl,'
;;
+ mingw* | pw32* | os2*)
+ ;;
hpux9* | hpux10* | hpux11*)
wl='-Wl,'
;;
irix5* | irix6* | nonstopux*)
wl='-Wl,'
;;
+ newsos6)
+ ;;
linux*)
- echo '__INTEL_COMPILER' > conftest.$ac_ext
- if $CC -E conftest.$ac_ext >/dev/null | grep __INTEL_COMPILER >/dev/null
- then
- :
- else
- # Intel icc
- wl='-Qoption,ld,'
- fi
+ case $CC in
+ icc|ecc)
+ wl='-Wl,'
+ ;;
+ ccc)
+ wl='-Wl,'
+ ;;
+ esac
;;
osf3* | osf4* | osf5*)
wl='-Wl,'
;;
+ sco3.2v5*)
+ ;;
solaris*)
wl='-Wl,'
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
wl='-Wl,'
;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
esac
fi
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
hardcode_libdir_flag_spec=
hardcode_libdir_separator=
hardcode_direct=no
if test "$with_gnu_ld" = yes; then
case "$host_os" in
aix3* | aix4* | aix5*)
- # On AIX, the GNU linker is very broken
- ld_shlibs=no
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
;;
amigaos*)
hardcode_libdir_flag_spec='-L$libdir'
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
;;
solaris* | sysv5*)
if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
;;
esac
if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
fi
else
# need to do runtime linking.
case $host_os in aix4.[23]|aix4.[23].*|aix5*)
for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
done
esac
fi
fi
esac
fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
if test "$aix_use_runtimelinking" = yes; then
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
else
if test "$host_cpu" = ia64; then
hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
else
- hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
fi
fi
;;
# see comment about different semantics on the GNU ld section
ld_shlibs=no
;;
+ bsdi4*)
+ ;;
cygwin* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
libext=lib
;;
darwin* | rhapsody*)
- hardcode_direct=yes
+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+ hardcode_direct=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
;;
freebsd1*)
ld_shlibs=no
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
- hpux9* | hpux10* | hpux11*)
+ hpux9*)
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
;;
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- hardcode_libdir_flag_spec='-rpath $libdir'
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
netbsd*)
;;
sysv4.3*)
;;
- sysv5*)
- hardcode_libdir_flag_spec=
- ;;
- uts4*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
- dgux*)
- hardcode_libdir_flag_spec='-L$libdir'
- ;;
sysv4*MP*)
if test -d /usr/nec; then
ld_shlibs=yes
hardcode_direct=yes
hardcode_minus_L=no
;;
- sysv5uw7* | unixware7*)
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
;;
*)
ld_shlibs=no
fi
# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
libname_spec='lib$name'
case "$host_os" in
aix3*)
- shlibext=so
;;
aix4* | aix5*)
- shlibext=so
;;
amigaos*)
- shlibext=ixlibrary
;;
beos*)
- shlibext=so
;;
bsdi4*)
- shlibext=so
;;
cygwin* | mingw* | pw32*)
- case $GCC,$host_os in
- yes,cygwin*)
- shlibext=dll.a
- ;;
- yes,mingw*)
- shlibext=dll
- ;;
- yes,pw32*)
- shlibext=dll
- ;;
- *)
- shlibext=dll
- ;;
- esac
+ shrext=.dll
;;
darwin* | rhapsody*)
- shlibext=dylib
+ shrext=.dylib
+ ;;
+ dgux*)
;;
freebsd1*)
;;
freebsd*)
- shlibext=so
;;
gnu*)
- shlibext=so
;;
hpux9* | hpux10* | hpux11*)
- shlibext=sl
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
;;
irix5* | irix6* | nonstopux*)
- shlibext=so
case "$host_os" in
irix5* | nonstopux*)
libsuff= shlibsuff=
;;
*)
case $LD in
- *-32|*"-32 ") libsuff= shlibsuff= ;;
- *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 ;;
- *-64|*"-64 ") libsuff=64 shlibsuff=64 ;;
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
*) libsuff= shlibsuff= ;;
esac
;;
esac
;;
- linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
+ linux*oldld* | linux*aout* | linux*coff*)
;;
- linux-gnu*)
- shlibext=so
+ linux*)
;;
netbsd*)
- shlibext=so
;;
newsos6)
- shlibext=so
+ ;;
+ nto-qnx)
;;
openbsd*)
- shlibext=so
;;
os2*)
libname_spec='$name'
- shlibext=dll
+ shrext=.dll
;;
osf3* | osf4* | osf5*)
- shlibext=so
;;
sco3.2v5*)
- shlibext=so
;;
solaris*)
- shlibext=so
;;
sunos4*)
- shlibext=so
;;
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- shlibext=so
- ;;
- uts4*)
- shlibext=so
- ;;
- dgux*)
- shlibext=so
;;
sysv4*MP*)
- if test -d /usr/nec; then
- shlibext=so
- fi
+ ;;
+ uts4*)
;;
esac
sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF