# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Feb 14 06:52:21 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Tue Feb 15 03:52:41 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
: general looking path for locating libraries
-glibpth="/shlib /usr/shlib /lib/pa20_64 /lib/pa1.1 /usr/lib/large"
-glibpth="$glibpth /lib /usr/lib $xlibpth"
+glibpth="/usr/lib/large /lib/pa1.1 /lib /usr/lib $xlibpth"
glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
+test -f /shlib/libc.so && glibpth="/shlib $glibpth"
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
;;
esac
for thislib in $libswanted; do
-
- 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
- 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
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' ;;
;;
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)
#
# Lastly, you may want to include the "-z" HP linker flag so that
# reading from a NULL pointer causes a SEGV.
-ccflags="$ccflags -D_HPUX_SOURCE"
+ccflags="$ccflags -D_HPUX_SOURCE -Wl,-z"
# Check if you're using the bundled C compiler. This compiler doesn't support
# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have
EOM
exit 1
fi
- ccflags="$ccflags +DD64"
- ldflags="$ldflags +DD64"
+
ld=/usr/bin/ld
ar=/usr/bin/ar
- loclibpth="/lib/pa20_64 $loclibpth"
+ full_ar=$ar
# The strict ANSI mode (-Aa) doesn't like the LL suffixes.
- ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of 64-bitness)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
set `echo " $libswanted " | sed -e 's@ dl @ @'`
libswanted="$*"
esac
EOCBU
+case "$use64bits" in
+$define|true|[yY]*)
+ glibpth="`echo $glibpth|sed 's: /lib/pa1.1 : /lib/pa20_64 :'`"
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ libscheck='case "`file $xxx`" in
+*LP64*|*PA-RISC2.0*) ;;
+*) xxx=/no/64-bit$xxx ;;
+esac'
+ ;;
+esac
+
+case "`getconf KERNEL_BITS 2>/dev/null`" in
+*64*) ldflags="$ldflags -Wl,+vnocompatwarnings" ;;
+esac
+
# This script UU/uselfs.cbu will get 'called-back' by Configure
# after it has prompted the user for whether to use 64 bits.
cat > UU/uselfs.cbu <<'EOCBU'
ccflags="$ccflags -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
# The strict ANSI mode (-Aa) doesn't like large files.
- ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ case "$ccflags" in
+ *-Aa*)
+ echo "(Changing from strict ANSI compilation to extended because of large files)"
+ ccflags=`echo $ccflags|sed 's@ -Aa @ -Ae @'`
+ ;;
+ esac
;;
esac
EOCBU
+