# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Aug 14 00:51:07 EET DST 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Sep 20 12:57:28 EET DST 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_isascii=''
d_killpg=''
d_lchown=''
+d_ldbl_dig=''
d_link=''
d_locconv=''
d_lockf=''
startperl=''
startsh=''
stdchar=''
-d_fgetpos64=''
-d_fopen64=''
-d_freopen64=''
-d_fseek64=''
-d_fseeko64=''
-d_fsetpos64=''
-d_ftell64=''
-d_ftello64=''
-d_tmpfile64=''
d_stdio_stream_array=''
stdio_stream_array=''
d_strtoull=''
uidtype=''
archname64=''
use64bits=''
+uselfs=''
uselongdouble=''
+usemorebits=''
usemultiplicity=''
nm_opt=''
nm_so_opt=''
: produce awk script to parse command line options
cat >options.awk <<'EOF'
BEGIN {
- optstr = "dD:eEf:hKOrsSU:V"; # getopt-style specification
+ optstr = "A:dD:eEf:hKOrsSU:V"; # getopt-style specification
len = length(optstr);
for (i = 1; i <= len; i++) {
extractsh=''
override=''
knowitall=''
-rm -f optdef.sh
+rm -f optdef.sh posthint.sh
cat >optdef.sh <<EOS
$startsh
EOS
esac
shift
;;
+ -A)
+ shift
+ xxx=''
+ yyy="$1"
+ case "$yyy" in
+ *:*) xxx=`echo $yyy|sed 's!:.*!!'`
+ yyy=`echo $yyy|sed 's!^[^:]*:!!'`
+ ;;
+ esac
+ case "$xxx" in
+ '') xxx=define ;;
+ esac
+ zzz=''
+ uuu='undef'
+ case "$yyy" in
+ *=*) zzz=`echo $yyy|sed 's!^[^=]*=!!'`
+ yyy=`echo $yyy|sed 's!=.*!!'`
+ case "$yyy:$zzz" in
+ undef:) uuu='' ;;
+ esac
+ ;;
+ esac
+ case "$xxx" in
+ append)
+ echo "$yyy=\"\${$yyy}$zzz\"" >> posthint.sh
+ ;;
+ clear)
+ echo "$yyy=''" >> posthint.sh
+ ;;
+ define)
+ case "$zzz" in
+ '') zzz=define ;;
+ esac
+ echo "$yyy='$zzz'" >> posthint.sh
+ ;;
+ eval)
+ echo "eval \"$yyy=$zzz\"" >> posthint.sh
+ ;;
+ prepend)
+ echo "$yyy=\"$zzz\${$yyy}\"" >> posthint.sh
+ ;;
+ undef)
+ case "$zzz" in
+ '') zzz="$uuu" ;;
+ esac
+ echo "$yyy=$zzz" >> posthint.sh
+ ;;
+ *) echo "$me: unknown -A command '$xxx', ignoring -A $1" >&2
+ ;;
+ esac
+ ;;
-V) echo "$me generated by metaconfig 3.0 PL70." >&2
exit 0;;
--) break;;
true)
cat >&2 <<EOM
Usage: $me [-dehrsEKOSV] [-f config.sh] [-D symbol] [-D symbol=value]
- [-U symbol] [-U symbol=]
+ [-U symbol] [-U symbol=] [-A command:symbol...]
-d : use defaults for all answers.
-e : go on without questioning past the production of config.sh.
-f : specify an alternate default configuration file.
-U : undefine symbol:
-U symbol symbol gets the value 'undef'
-U symbol= symbol gets completely empty
+ -A : manipulate symbol after the platform specific hints have been applied:
+ -A append:symbol=value append value to symbol
+ -A define:symbol=value define symbol to have value
+ -A symbol=value define symbol to have value
+ -A clear:symbol define symbol to be ''
+ -A define:symbol define symbol to be 'define'
+ -A eval:symbol=value define symbol to be eval of value
+ -A prepend:symbol=value prepend value to symbol
+ -A undef:symbol define symbol to be 'undef'
+ -A undef:symbol= define symbol to be ''
-V : print version number and exit (with a zero status).
EOM
exit 1
: run the defines and the undefines, if any, but leave the file out there...
touch optdef.sh
. ./optdef.sh
+: create the posthint manipulation script and leave the file out there...
+touch posthint.sh
+. ./posthint.sh
: set package name
package=perl5
*) osvers="$ans" ;;
esac
+
+. ./posthint.sh
+
: who configured the system
cf_time=`LC_ALL=C; LANGUAGE=C; export LC_ALL; export LANGUAGE; $date 2>&1`
cf_by=`(logname) 2>/dev/null`
1*) cpp=`./loc gcc-cpp $cpp $pth` ;;
esac
+
+case "$usemorebits" in
+"$define"|true|[yY]*)
+ use64bits="$define"
+ uselongdouble="$define"
+ usemorebits="$define"
+ ;;
+*) usemorebits="$undef"
+ ;;
+esac
+
+
+cat <<EOM
+
+Perl can be built to understand large files (files larger than 2 gigabytes)
+on some systems. To do so, Configure must be run with -Duselfs.
+
+If this doesn't make any sense to you, just accept the default.
+EOM
+case "$uselfs" in
+"$define"|true|[yY]*) dflt='y' ;;
+*) dflt='n' ;;
+esac
+rp='Try to understand large files?'
+. ./myread
+case "$ans" in
+y|Y) val="$define" ;;
+*) val="$undef" ;;
+esac
+set uselfs
+eval $setvar
+case "$uselfs" in
+"$define") use64bits="$define" ;;
+esac
+
cat <<EOM
Perl can be built to take advantage of explicit 64-bit interfaces,
on some systems. To do so, Configure must be run with -Duse64bits.
-If this doesn't make any sense to you, just accept the default 'n'.
+If this doesn't make any sense to you, just accept the default.
EOM
case "$use64bits" in
$define|true|[yY]*) dflt='y';;
privlibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installprivlib=`echo $privlibexp | sed 's#^$prefix#$installprefix#'`
+ installprivlib=`echo $privlibexp | sed "s#^$prefix#$installprefix#"`
else
installprivlib="$privlibexp"
fi
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installarchlib=`echo $archlibexp | sed 's#^$prefix#$installprefix#'`
+ installarchlib=`echo $archlibexp | sed "s#^$prefix#$installprefix#"`
else
installarchlib="$archlibexp"
fi
*) libs="$ans";;
esac
-: determine optimize, if desired, or use for debug flag also
+: determine optimization, if desired, or use for debug flag also
case "$optimize" in
' '|$undef) dflt='none';;
'') dflt='-O';;
esac
$cat <<EOH
-Some C compilers have problems with their optimizers. By default, $package
-compiles with the -O flag to use the optimizer. Alternately, you might want
-to use the symbolic debugger, which uses the -g flag (on traditional Unix
-systems). Either flag can be specified here. To use neither flag, specify
-the word "none".
+By default, $package compiles with the -O flag to use the optimizer.
+Alternately, you might want to use the symbolic debugger, which uses
+the -g flag (on traditional Unix systems). Either flag can be
+specified here. To use neither flag, specify the word "none".
EOH
rp="What optimizer/debugger flag should be used?"
: We will not override a previous value, but we might want to
: augment a hint file
case "$hint" in
-none|recommended)
+default|recommended)
case "$gccversion" in
1*) dflt='-fpcc-struct-return' ;;
esac
fi
;;
esac
+ case "$gccversion" in
+ 1*) ;;
+ 2.[0-8]*) ;;
+ ?*) echo " "
+ echo "Checking if your compiler accepts -fno-strict-aliasing" 2>&1
+ echo 'int main(void) { return 0; }' > gcctest.c
+ if $cc -O2 -fno-strict-aliasing -o gcctest gcctest.c; then
+ echo "Yes, it does." 2>&1
+ case "$ccflags" in
+ *strict-aliasing*)
+ echo "Leaving current flags $ccflags alone." 2>&1
+ ;;
+ *) dflt="$dflt -fno-strict-aliasing" ;;
+ esac
+ else
+ echo "Nope, it doesn't, but that's ok." 2>&1
+ fi
+ ;;
+ esac
;;
esac
esac
case "$hint" in
-none|recommended) dflt="$ccflags $dflt" ;;
+default|recommended) dflt="$ccflags $dflt" ;;
*) dflt="$ccflags";;
esac
vendorlibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installvendorlib=`echo $vendorlibexp | $sed 's#^$prefix#$installprefix#'`
+ installvendorlib=`echo $vendorlibexp | $sed "s#^$prefix#$installprefix#"`
else
installvendorlib="$vendorlibexp"
fi
: Change installation prefix, if necessary.
: XXX Bug? -- ignores Configure -Dinstallprefix setting.
if $test X"$prefix" != X"$installprefix"; then
- installbin=`echo $binexp | sed 's#^$prefix#$installprefix#'`
+ installbin=`echo $binexp | sed "s#^$prefix#$installprefix#"`
else
installbin="$binexp"
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installman1dir=`echo $man1direxp | $sed 's#^$prefix#$installprefix#'`
+ installman1dir=`echo $man1direxp | $sed "s#^$prefix#$installprefix#"`
else
installman1dir="$man1direxp"
fi
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installman3dir=`echo $man3direxp | $sed 's#^$prefix#$installprefix#'`
+ installman3dir=`echo $man3direxp | $sed "s#^$prefix#$installprefix#"`
else
installman3dir="$man3direxp"
fi
scriptdirexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installscript=`echo $scriptdirexp | sed 's#^$prefix#$installprefix#'`
+ installscript=`echo $scriptdirexp | sed "s#^$prefix#$installprefix#"`
else
installscript="$scriptdirexp"
fi
sitelibexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installsitelib=`echo $sitelibexp | sed 's#^$prefix#$installprefix#'`
+ installsitelib=`echo $sitelibexp | sed "s#^$prefix#$installprefix#"`
else
installsitelib="$sitelibexp"
fi
sitearchexp="$ansexp"
: Change installation prefix, if necessary.
if $test X"$prefix" != X"$installprefix"; then
- installsitearch=`echo $sitearchexp | sed 's#^$prefix#$installprefix#'`
+ installsitearch=`echo $sitearchexp | sed "s#^$prefix#$installprefix#"`
else
installsitearch="$sitearchexp"
fi
rp='Try to use long doubles if available?'
. ./myread
case "$ans" in
-y|Y) val="$define" ;;
+y|Y) val="$define" ;;
*) val="$undef" ;;
esac
set uselongdouble
: check for long doubles
echo " "
-echo $n "Checking to see if your system supports long doubles...$c" >&4
+echo $n "Checking to see if your system supports long double...$c" >&4
echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
val="$define"
esac
else
echo "I can't compile and run the test program." >&4
+ echo "I'm guessing that dlsym doesn't need a leading underscore." >&4
fi
;;
esac
set fsetpos d_fsetpos
eval $inlibc
-
-if $test X"$use64bits" = X"$define"; then
- : see if fgetpos64 exists
- set fgetpos64 d_fgetpos64
- eval $inlibc
-
- : see if fopen64 exists
- set freopen64 d_fopen64
- eval $inlibc
-
- : see if freopen64 exists
- set freopen64 d_freopen64
- eval $inlibc
-
- : see if fseek64 exists
- set fseek64 d_fseek64
- eval $inlibc
-
- : see if fseeko64 exists
- set fseeko64 d_fseeko64
- eval $inlibc
-
- : see if fsetpos64 exists
- set fsetpos64 d_fsetpos64
- eval $inlibc
-
- : see if ftell64 exists
- set ftell64 d_ftell64
- eval $inlibc
-
- : see if ftello64 exists
- set ftello64 d_ftello64
- eval $inlibc
-
- : see if tmpfile64 exists
- set tmpfile64 d_tmpfile64
- eval $inlibc
-else
- val="$undef"
- for xxx in d_fgetpos64 d_fopen64 d_freopen64 d_fseek64 d_fseeko64 d_fsetpos64 d_ftell64 d_ftello64 d_tmpfile64
- do
- set $xxx
- eval $setvar
- done
-fi
-
: see if this is a sys/param system
set sys/param.h i_sysparam
eval $inhdr
set d_lchown
eval $setvar
+: See if number of significant digits in a double precision number is known
+echo " "
+$cat >ldbl_dig.c <<EOM
+#$i_limits I_LIMITS
+#$i_float I_FLOAT
+#ifdef I_LIMITS
+#include <limits.h>
+#endif
+#ifdef I_FLOAT
+#include <float.h>
+#endif
+#ifdef LDBL_DIG
+printf("Contains LDBL_DIG");
+#endif
+EOM
+$cppstdin $cppflags $cppminus < ldbl_dig.c >ldbl_dig.E 2>/dev/null
+if $contains 'LDBL_DIG' ldbl_dig.E >/dev/null 2>&1; then
+ echo "LDBL_DIG found." >&4
+ val="$define"
+else
+ echo "LDBL_DIG NOT found." >&4
+ val="$undef"
+fi
+$rm -f ldbl_dig.?
+set d_ldbl_dig
+eval $setvar
+
: see if link exists
set link d_link
eval $inlibc
eval $inlibc
: see if POSIX threads are available
-if test "X$usethreads" = "X$define"; then
- set pthread.h i_pthread
- eval $inhdr
-else
- i_pthread="$undef"
-fi
+set pthread.h i_pthread
+eval $inhdr
+
int main()
{
struct sigaction act, oact;
+ act.sa_flags = 0;
+ oact.sa_handler = 0;
}
EOP
set try
d_fd_macros='$d_fd_macros'
d_fd_set='$d_fd_set'
d_fds_bits='$d_fds_bits'
-d_fgetpos64='$d_fgetpos64'
d_fgetpos='$d_fgetpos'
d_flexfnam='$d_flexfnam'
d_flock='$d_flock'
-d_fopen64='$d_fopen64'
d_fork='$d_fork'
d_fpathconf='$d_fpathconf'
d_fpos64_t='$d_fpos64_t'
-d_freopen64='$d_freopen64'
-d_fseek64='$d_fseek64'
-d_fseeko64='$d_fseeko64'
d_fseeko='$d_fseeko'
-d_fsetpos64='$d_fsetpos64'
d_fsetpos='$d_fsetpos'
d_fstatfs='$d_fstatfs'
d_fstatvfs='$d_fstatvfs'
-d_ftell64='$d_ftell64'
-d_ftello64='$d_ftello64'
d_ftello='$d_ftello'
d_ftime='$d_ftime'
d_getgrent='$d_getgrent'
d_isascii='$d_isascii'
d_killpg='$d_killpg'
d_lchown='$d_lchown'
+d_ldbl_dig='$d_ldbl_dig'
d_link='$d_link'
d_llseek='$d_llseek'
d_locconv='$d_locconv'
d_telldirproto='$d_telldirproto'
d_time='$d_time'
d_times='$d_times'
-d_tmpfile64='$d_tmpfile64'
d_truncate='$d_truncate'
d_tzname='$d_tzname'
d_umask='$d_umask'
uniq='$uniq'
use64bits='$use64bits'
usedl='$usedl'
+uselfs='$uselfs'
uselongdouble='$uselongdouble'
+usemorebits='$usemorebits'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
usenm='$usenm'