?INIT:loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
?INIT:
?INIT:: general looking path for locating libraries
-?X: /lib/pa1.1 is for HP-UX specially tuned PA-RISC libraries.
?X: /shlib is for Digital Unix 4.0
?X: /usr/shlib is for OSF/1 systems.
?X: I don't know why the large & small libraries are in this order.
-?INIT:glibpth="/shlib /usr/shlib /lib/pa20_64 /lib/pa1.1 /usr/lib/large"
-?INIT:glibpth="$glibpth /lib /usr/lib $xlibpth"
+?INIT:glibpth="/usr/lib/large /lib/pa1.1 /lib /usr/lib $xlibpth"
?INIT:glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
?INIT:glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+?INIT:test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+?INIT:test -f /shlib/libc.so && glibpth="/shlib $glibpth"
?INIT:
?INIT:: Private path used by Configure to find libraries. Its value
?INIT:: is prepended to libpth. This variable takes care of special
?RCS:
?MAKE:libs ignore_versioned_solibs libsfound libsfiles libsdirs: \
test cat Myread Oldconfig Loc libpth package xlibpth so _a \
- use64bits usesocks ccflags
+ usesocks ccflags
?MAKE: -pick add $@ %<
?S:libs:
?S: This variable holds the additional libraries we want to use.
;;
esac
for thislib in $libswanted; do
-
?X:
?X: Comparisons via case statement use the string " $dflt " to ensure that
?X: each library is separated by a space. That way, by looking to something
?X: like *"-l$thislib "*, we ensure we find -lm and not -lmalloc (which was
?X: the case with the old looking pattern *-l$thislib*.
?X:
- libname="$thislib"
- if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`
- $test -f "$xxx" -a "X$ignore_versioned_solibs" = "X" ; then
- libstyle=shared
- elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
- libstyle=shared
- elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
- libstyle=static
-?X: Don't forget about OS/2 where -lmalloc is spelled out malloc.a
- elif xxx=`./loc $thislib$_a X $libpth`; $test -f "$xxx"; then
- libstyle=static
- elif xxx=`./loc lib${thislib}_s$_a X $libpth`; $test -f "$xxx"; then
- libstyle=static
- libname=${thislib}_s
- elif xxx=`./loc Slib$thislib$_a X $xlibpth`; $test -f "$xxx"; then
- libstyle="static"
- fi
- if $test -f "$xxx"; then
+ for thisdir in $libpth; do
+ xxx=''
+ if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
+ xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib.$so
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=shared
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/lib${thislib}_s$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/Slib$thislib$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle=static
+ fi
+ if $test -f "$xxx"; then
case "$libstyle" in
- shared) echo "Found -l$libname (shared)." ;;
- static) echo "Found -l$libname." ;;
- *) echo "Found -l$libname ($libstyle)." ;;
+ shared) echo "Found -l$thislib (shared)." ;;
+ static) echo "Found -l$thislib." ;;
+ *) echo "Found -l$thislib ($libstyle)." ;;
esac
case " $dflt " in
*"-l$thislib "*);;
- *) dflt="$dflt -l$libname"
+ *) dflt="$dflt -l$thislib"
libsfound="$libsfound $xxx"
yyy=`basename $xxx`
libsfiles="$libsfiles $yyy"
esac
;;
esac
- else
- echo "No -l$thislib."
+ break
+ fi
+ done
+ if $test ! -f "$xxx"; then
+ echo "No -l$thislib."
fi
done
set X $dflt