+cc=${cc:-cc}
+ar=/usr/bin/ar # Yes, truly override. We do not want the GNU ar.
+full_ar=$ar # I repeat, no GNU ar. arrr.
+
+set `echo "X $ccflags " | sed -e 's/ -A[ea] / /' -e 's/ -D_HPUX_SOURCE / /'`
+shift
+ cc_cppflags="$* -D_HPUX_SOURCE"
+cppflags="-Aa -D__STDC_EXT__ $cc_cppflags"
+
+case "$prefix" in
+ "") prefix='/opt/perl5' ;;
+ esac
+
+ gnu_as=no
+ gnu_ld=no
+case `$cc -v 2>&1`"" in
+ *gcc*) ccisgcc="$define"
+ ccflags="$cc_cppflags"
+ if [ "X$gccversion" = "X" ]; then
+ # Done too late in Configure if hinted
+ gccversion=`$cc --version | sed 's/.*(GCC) *//'`
+ fi
+ case "$gccversion" in
+ [012]*) # HP-UX and gcc-2.* break UINT32_MAX :-(
+ ccflags="$ccflags -DUINT32_MAX_BROKEN"
+ ;;
+ 3*) # GCC (both 32bit and 64bit) will define __STDC_EXT__
+ # by default when using GCC 3.0 and newer versions of
+ # the compiler.
+ cppflags="$cc_cppflags"
+ ;;
+ esac
+ case "`getconf KERNEL_BITS 2>/dev/null`" in
+ *64*)
+ echo "main(){}">try.c
+ case "$gccversion" in
+ 3*)
+ case "$archname" in
+ PA-RISC*)
+ case "$ccflags" in
+ *-mpa-risc*) ;;
+ *) ccflags="$ccflags -mpa-risc-2-0" ;;
+ esac
+ ;;
+ esac
+ ;;
+ *) # gcc with gas will not accept +DA2.0
+ case "`$cc -c -Wa,+DA2.0 try.c 2>&1`" in
+ *"+DA2.0"*) # gas
+ gnu_as=yes
+ ;;
+ *) # HPas
+ ccflags="$ccflags -Wa,+DA2.0"
+ ;;
+ esac
+ ;;
+ esac
+ # gcc with gld will not accept +vnocompatwarnings
+ case "`$cc -o try -Wl,+vnocompatwarnings try.c 2>&1`" in
+ *"+vnocompat"*) # gld
+ gnu_ld=yes
+ ;;
+ *) # HPld
+ case "$gccversion" in
+ [12]*)
+ # Why not 3 as well here?
+ # Since not relevant to IA64, not changed.
+ ldflags="$ldflags -Wl,+vnocompatwarnings"
+ ccflags="$ccflags -Wl,+vnocompatwarnings"
+ ;;
+ esac
+ ;;
+ esac
+ rm -f try.c
+ ;;
+ esac
+ ;;
+ *) ccisgcc=''
+ ccversion=`which cc | xargs what | awk '/Compiler/{print $2}/Itanium/{print $6,$7}'`
+ case "$ccflags" in
+ "-Ae "*) ;;
+ *) ccflags="-Ae $cc_cppflags"
+ # +vnocompatwarnings not known in 10.10 and older
+ if [ $xxOsRev -ge 1020 ]; then
+ ccflags="$ccflags -Wl,+vnocompatwarnings"
+ fi
+ ;;
+ esac
+ # Needed because cpp does only support -Aa (not -Ae)
+ cpplast='-'
+ cppminus='-'
+ cppstdin='cc -E -Aa -D__STDC_EXT__'
+ cpprun=$cppstdin
+# case "$d_casti32" in
+# "") d_casti32='undef' ;;
+# esac
+ ;;
+ esac
+
+# When HP-UX runs a script with "#!", it sets argv[0] to the script name.
+toke_cflags='ccflags="$ccflags -DARG_ZERO_IS_SCRIPT"'
+
+### 64 BITNESS
+
+# Some gcc versions do native 64 bit long (e.g. 2.9-hppa-000310 and gcc-3.0)
+# We have to force 64bitness to go search the right libraries
+ gcc_64native=no
+case "$ccisgcc" in
+ $define|true|[Yy])
+ echo 'int main(){long l;printf("%d\\n",sizeof(l));}'>try.c
+ $cc -o try $ccflags $ldflags try.c
+ if [ "`try`" = "8" ]; then
+ cat <<EOM >&4
+
+*** This version of gcc uses 64 bit longs. -Duse64bitall is
+*** implicitly set to enable continuation
+EOM
+ use64bitall=$define
+ gcc_64native=yes
+ fi
+ ;;
+ esac
+
+case "$use64bitall" in
+ $define|true|[yY]*) use64bitint="$define" ;;
+ esac
+
+case "$usemorebits" in
+ $define|true|[yY]*) use64bitint="$define"; uselongdouble="$define" ;;
+ esac
+
+case "$archname" in
+ IA64*)
+ # While here, override so=sl auto-detection
+ so='so'
+ ;;
+ *)
+ case "$uselongdouble" in
+ *) ;;
+ $define|true|[yY]*)
+ cat <<EOM >&4
+
+*** long doubles are not (yet) supported on HP-UX (any version)
+*** Until it does, we cannot continue, aborting.
+EOM
+ exit 1 ;;
+ esac
+ ;;
+ esac
+
+case "$use64bitint" in
+ $define|true|[Yy])
+
+ if [ "$xxOsRevMajor" -lt 11 ]; then
+ cat <<EOM >&4
+
+*** 64-bit compilation is not supported on HP-UX $xxOsRevMajor.
+*** You need at least HP-UX 11.0.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+
+ # Set libc and the library paths
+ case "$archname" in
+ PA-RISC*)
+ loclibpth="$loclibpth /lib/pa20_64"
+ libc='/lib/pa20_64/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux64"
+ libc='/usr/lib/hpux64/libc.so' ;;
+ esac
+ if [ ! -f "$libc" ]; then
+ cat <<EOM >&4
+
+*** You do not seem to have the 64-bit libc.
+*** I cannot find the file $libc.
+*** Cannot continue, aborting.
+EOM
+ exit 1
+ fi
+
+ case "$ccisgcc" in
+ $define|true|[Yy])
+ # For the moment, don't care that it ain't supported (yet)
+ # by gcc (up to and including 2.95.3), cause it'll crash
+ # anyway. Expect auto-detection of 64-bit enabled gcc on
+ # HP-UX soon, including a user-friendly exit
+ case $gcc_64native in
+ no) case "$gccversion" in
+ [123]*) ccflags="$ccflags -mlp64"
+ case "$archname" in
+ PA-RISC*)
+ ldflags="$ldflags -Wl,+DD64"
+ ;;
+ IA64*)
+ ldflags="$ldflags -mlp64"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ ccflags="$ccflags +DD64"
+ ldflags="$ldflags +DD64"
+ ;;
+ esac
+
+ # Reset the library checker to make sure libraries
+ # are the right type
+ # (NOTE: on IA64, this doesn't work with .a files.)
+ libscheck='case "`/usr/bin/file $xxx`" in
+ *ELF-64*|*LP64*|*PA-RISC2.0*) ;;
+ *) xxx=/no/64-bit$xxx ;;
+ esac'
+
+ ;;
+
+ *) # Not in 64-bit mode
+
+ case "$archname" in
+ PA-RISC*)
+ libc='/lib/libc.sl' ;;
+ IA64*)
+ loclibpth="$loclibpth /usr/lib/hpux32"
+ libc='/usr/lib/hpux32/libc.so' ;;
+ esac
+ ;;
+ esac
+