# Use Configure -Dcc=gcc to use gcc.
# Use Configure -Dprefix=/usr/local to install in /usr/local.
+# Some users have reported problems with dynamic loading if the
+# environment variable LDOPTS='-a archive' .
+
# Turn on the _HPUX_SOURCE flag to get many of the HP add-ons
ccflags="$ccflags -D_HPUX_SOURCE"
ldflags="$ldflags"
# ANSI C (the -Aa flag) nor can it produce shared libraries. Thus we have
# to turn off dynamic loading.
case "$cc" in
-'') if cc $ccflags -Aa 2>&1 | $contains 'Unknown option "A"' >/dev/null
+'') if cc $ccflags -Aa 2>&1 | $contains 'option' >/dev/null
then
case "$usedl" in
'') usedl="$undef"
;;
esac
+# Determine the architecture type of this system.
+xxuname=`uname -r`
+if echo $xxuname | $contains '10'
+then
+ # This system is running 10.0
+ xxcontext=`grep $(printf %#x $(getconf CPU_VERSION)) /usr/include/sys/unistd.h`
+ if echo "$xxcontext" | $contains 'PA-RISC1.1'
+ then
+ archname='PA-RISC1.1'
+ elif echo "$xxcontext" | $contains 'PA-RISC1.0'
+ then
+ archname='PA-RISC1.0'
+ elif echo "$xxcontext" | $contains 'PA-RISC2'
+ then
+ archname='PA-RISC2'
+ else
+ echo "This 10.0 system is of a PA-RISC type I don't recognize."
+ echo "Debugging output: $xxcontext"
+ archname=''
+ fi
+else
+ # This system is not running 10.0
+ xxcontext=`/bin/getcontext`
+ if echo "$xxcontext" | $contains 'PA-RISC1.1'
+ then
+ archname='PA-RISC1.1'
+ elif echo "$xxcontext" | $contains 'PA-RISC1.0'
+ then
+ archname='PA-RISC1.0'
+ elif echo "$xxcontext" | $contains 'HP-MC'
+ then
+ archname='HP-MC68K'
+ else
+ echo "I cannot recognize what chip set this system is using."
+ echo "Debugging output: $xxcontext"
+ archname=''
+ fi
+fi
+
# Remove bad libraries that will cause problems
# (This doesn't remove libraries that don't actually exist)
# -lld is unneeded (and I can't figure out what it's used for anyway)
# -ldbm is obsolete and should not be used
# -lBSD contains BSD-style duplicates of SVR4 routines that cause confusion
# -lPW is obsolete and should not be used
-# Although -lndbm should be included, it will make perl blow up if you should
-# copy the binary to a system without libndbm.sl.
# The libraries crypt, malloc, ndir, and net are empty.
-set `echo " $libswanted " | sed -e 's@ ndbm @ @' -e 's@ ld @ @' -e 's@ dbm @ @' -e 's@ BSD @ @' -e 's@ PW @ @'`
+# Although -lndbm should be included, it will make perl blow up if you should
+# copy the binary to a system without libndbm.sl. See ccdlflags below.
+set `echo " $libswanted " | sed -e 's@ ld @ @' -e 's@ dbm @ @' -e 's@ BSD @ @' -e 's@ PW @ @'`
libswanted="$*"
-# If you copy the perl binaries to other systems and the dynamic loader
-# complains about missing libraries, you can either copy the shared libraries
-# or switch the comments to recompile perl to use archive libraries
-# ccdlflags="-Wl,-E -Wl,-a,archive $ccdlflags"
-ccdlflags="-Wl,-E $ccdlflags"
+# By setting the deferred flag below, this means that if you run perl on a
+# system that does not have the required shared library that you linked it
+# with, it will die when you try to access a symbol in the (missing) shared
+# library. If you would rather know at perl startup time that you are
+# missing an important shared library, switch the comments so that immediate,
+# rather than deferred loading is performed.
+# ccdlflags="-Wl,-E $ccdlflags"
+ccdlflags="-Wl,-E -Wl,-B,deferred $ccdlflags"
usemymalloc='y'
alignbytes=8
# If your compile complains about FLT_MIN, uncomment the next line
# POSIX_cflags='ccflags="$ccflags -DFLT_MIN=1.17549435E-38"'
-# Comment these out if you don't want to follow the SVR4 filesystem layout
+# Comment this out if you don't want to follow the SVR4 filesystem layout
# that HP-UX 10.0 uses
case "$prefix" in
-'') prefix='/opt/perl5'
- privlib='/opt/perl5/lib'
- archlib='/opt/perl5/lib/hpux'
- man3dir='/opt/perl5/man/man3'
- ;;
+'') prefix='/opt/perl5' ;;
esac
-