This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Unroll the libs scan thanks to HP-UX.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 15 Feb 2000 05:22:09 +0000 (05:22 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 15 Feb 2000 05:22:09 +0000 (05:22 +0000)
p4raw-id: //depot/metaconfig@5092

U/modified/libpth.U
U/modified/libs.U
U/perl/Extensions.U
U/perl/dlsrc.U

index 964d5db..0fdb01f 100644 (file)
 ?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
index bc7a2be..71a9891 100644 (file)
@@ -34,7 +34,7 @@
 ?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.
@@ -102,39 +102,53 @@ $define)
        ;;
 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"
@@ -145,8 +159,11 @@ for thislib in $libswanted; do
                    esac
                   ;;
                esac
-       else
-               echo "No -l$thislib."
+               break
+           fi  
+       done
+       if $test ! -f "$xxx"; then
+           echo "No -l$thislib."
        fi
 done
 set X $dflt
index f39aad0..18bfa33 100644 (file)
@@ -119,12 +119,30 @@ for xxx in $known_extensions ; do
                ;;
        NDBM_File|ndbm_fil)
                case "$i_ndbm" in
-               $define) avail_ext="$avail_ext $xxx" ;;
+               $define)
+                   case "$osname-$use64bits" in
+                   hpux-define)
+                       case "$libs" in
+                       *-lndbm*) avail_ext="$avail_ext $xxx" ;;
+                       esac
+                       ;;
+                   *) avail_ext="$avail_ext $xxx" ;;
+                   esac
+                   ;;
                esac
                ;;
        ODBM_File|odbm_fil) 
                case "${i_dbm}${i_rpcsvcdbm}" in
-               *"${define}"*) avail_ext="$avail_ext $xxx" ;;
+               *"${define}"*)
+                   case "$osname-$use64bits" in
+                   hpux-define)
+                       case "$libs" in
+                       *-ldbm*) avail_ext="$avail_ext $xxx" ;;
+                       esac
+                       ;;
+                   *) avail_ext="$avail_ext $xxx" ;;
+                   esac
+                   ;;
                esac
                ;;
        POSIX|posix)
index 552325a..d9865e3 100644 (file)
@@ -203,7 +203,7 @@ EOM
     case "$lddlflags" in
     '') case "$osname" in
                        beos) dflt='-nostart' ;;
-                       hpux)  dflt='-b' ;;
+                       hpux)  dflt='-b +vnocompatwarnings' ;;
                        linux|irix*)    dflt='-shared' ;;
                        next)  dflt='none' ;;
                        solaris) dflt='-G' ;;