# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Mar 9 14:02:25 EST 1998 [metaconfig 3.0 PL70]
+# Generated on Tue Mar 31 15:49:57 EST 1998 [metaconfig 3.0 PL70]
cat >/tmp/c1$$ <<EOF
ARGGGHHHH!!!!!
expr=''
find=''
flex=''
-gcc=''
grep=''
gzip=''
inews=''
d_gethname=''
d_phostname=''
d_uname=''
+d_gethostprotos=''
d_getlogin=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
+d_getnetprotos=''
d_getpent=''
d_getpgid=''
d_getpgrp2=''
d_getprior=''
d_getpbyname=''
d_getpbynumber=''
+d_getprotoprotos=''
d_getsent=''
+d_getservprotos=''
d_getsbyname=''
d_getsbyport=''
d_gnulibc=''
d_lockf=''
d_longdbl=''
longdblsize=''
+d_longlong=''
+longlongsize=''
d_lstat=''
d_mblen=''
d_mbstowcs=''
*.08.*) osvers=9 ;;
*.09.*) osvers=9 ;;
*.10.*) osvers=10 ;;
+ *.11.*) osvers=11 ;;
+ *.12.*) osvers=12 ;;
*) osvers="$3" ;;
esac
;;
set usethreads
eval $setvar
: Look for a hint-file generated 'call-back-unit'. Now that the
-: user has specified the compiler, we may need to set or change some
-: other defaults.
+: user has specified if a threading perl is to be built, we may need
+: to set or change some other defaults.
if $test -f usethreads.cbu; then
. ./usethreads.cbu
fi
echo "Could not find manual pages in source form." >&4
fi
-: determine where manual pages go
-set man1dir man1dir none
-eval $prefixit
+: see what memory models we can support
+case "$models" in
+'')
+ $cat >pdp11.c <<'EOP'
+main() {
+#ifdef pdp11
+ exit(0);
+#else
+ exit(1);
+#endif
+}
+EOP
+ ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1
+ if $test -f pdp11 && ./pdp11 2>/dev/null; then
+ dflt='unsplit split'
+ else
+ tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
+ case "$tans" in
+ X) dflt='none';;
+ *) if $test -d /lib/small || $test -d /usr/lib/small; then
+ dflt='small'
+ else
+ dflt=''
+ fi
+ if $test -d /lib/medium || $test -d /usr/lib/medium; then
+ dflt="$dflt medium"
+ fi
+ if $test -d /lib/large || $test -d /usr/lib/large; then
+ dflt="$dflt large"
+ fi
+ if $test -d /lib/huge || $test -d /usr/lib/huge; then
+ dflt="$dflt huge"
+ fi
+ esac
+ fi;;
+*) dflt="$models";;
+esac
$cat <<EOM
+
+Some systems have different model sizes. On most systems they are called
+small, medium, large, and huge. On the PDP11 they are called unsplit and
+split. If your system doesn't support different memory models, say "none".
+If you wish to force everything to one memory model, say "none" here and
+put the appropriate flags later when it asks you for other cc and ld flags.
+Venix systems may wish to put "none" and let the compiler figure things out.
+(In the following question multiple model names should be space separated.)
+
+The default for most systems is "none".
-$spackage has manual pages available in source form.
EOM
-case "$nroff" in
-nroff)
- echo "However, you don't have nroff, so they're probably useless to you."
- case "$man1dir" in
- '') man1dir="none";;
- esac;;
-esac
-echo "If you don't want the manual sources installed, answer 'none'."
-case "$man1dir" in
-' ') dflt=none
+rp="Which memory models are supported?"
+. ./myread
+models="$ans"
+
+case "$models" in
+none)
+ small=''
+ medium=''
+ large=''
+ huge=''
+ unsplit=''
+ split=''
;;
-'')
- lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
- lookpath="$lookpath $prefixexp/man/p_man/man1"
- lookpath="$lookpath $prefixexp/man/u_man/man1"
- lookpath="$lookpath $prefixexp/man/man.1"
- case "$sysman" in
- */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
- *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
+*split)
+ case "$split" in
+ '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
+ $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
+ dflt='-i'
+ else
+ dflt='none'
+ fi;;
+ *) dflt="$split";;
+ esac
+ rp="What flag indicates separate I and D space?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';;
+ esac
+ split="$tans"
+ unsplit='';;
+*large*|*small*|*medium*|*huge*)
+ case "$models" in
+ *large*)
+ case "$large" in
+ '') dflt='-Ml';;
+ *) dflt="$large";;
+ esac
+ rp="What flag indicates large model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ large="$tans";;
+ *) large='';;
+ esac
+ case "$models" in
+ *huge*) case "$huge" in
+ '') dflt='-Mh';;
+ *) dflt="$huge";;
+ esac
+ rp="What flag indicates huge model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ huge="$tans";;
+ *) huge="$large";;
+ esac
+ case "$models" in
+ *medium*) case "$medium" in
+ '') dflt='-Mm';;
+ *) dflt="$medium";;
+ esac
+ rp="What flag indicates medium model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ medium="$tans";;
+ *) medium="$large";;
+ esac
+ case "$models" in
+ *small*) case "$small" in
+ '') dflt='none';;
+ *) dflt="$small";;
+ esac
+ rp="What flag indicates small model?"
+ . ./myread
+ tans="$ans"
+ case "$tans" in
+ none) tans='';
+ esac
+ small="$tans";;
+ *) small='';;
esac
- set dflt
- eval $prefixup
;;
-*) dflt="$man1dir"
+*)
+ echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4
;;
esac
-echo " "
-fn=dn+~
-rp="Where do the main $spackage manual pages (source) go?"
-. ./getfile
-if $test "X$man1direxp" != "X$ansexp"; then
- installman1dir=''
-fi
-man1dir="$ans"
-man1direxp="$ansexp"
-case "$man1dir" in
-'') man1dir=' '
- installman1dir='';;
-esac
-if $afs; then
- $cat <<EOM
+$rm -f pdp11.* pdp11
-Since you are running AFS, I need to distinguish the directory in which
-manual pages reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
+: see if we need a special compiler
+echo " "
+if ./usg; then
+ case "$cc" in
+ '') case "$Mcc" in
+ /*) dflt='Mcc';;
+ *) case "$large" in
+ -M*) dflt='cc';;
+ *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
+ if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
+ dflt='cc'
+ else
+ dflt='cc -M'
+ fi
+ else
+ dflt='cc'
+ fi;;
+ esac;;
+ esac;;
+ *) dflt="$cc";;
+ esac
+ case "$dflt" in
+ *M*) $cat <<'EOM'
+On some older systems the default C compiler will not resolve multiple global
+references that happen to have the same name. On some such systems the "Mcc"
+command may be used to force these to be resolved. On other systems a "cc -M"
+command is required. (Note that the -M flag on other systems indicates a
+memory model to use!) If you have the Gnu C compiler, you might wish to use
+that instead.
EOM
- case "$installman1dir" in
- '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman1dir";;
+ ;;
esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman1dir="$ans"
+ rp="Use which C compiler?"
+ . ./myread
+ cc="$ans"
else
- installman1dir="$man1direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man1dir" in
-' ')
- man1ext='0'
- ;;
-*)
- rp="What suffix should be used for the main $spackage man pages?"
- case "$man1ext" in
- '') case "$man1dir" in
- *1) dflt=1 ;;
- *1p) dflt=1p ;;
- *1pm) dflt=1pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L1) dflt=L1;;
- *) dflt=1;;
- esac
- ;;
- *) dflt="$man1ext";;
+ case "$cc" in
+ '') dflt=cc;;
+ *) dflt="$cc";;
esac
- . ./myread
- man1ext="$ans"
- ;;
-esac
-
-: see if we can have long filenames
-echo " "
-rmlist="$rmlist /tmp/cf$$"
-$test -d /tmp/cf$$ || mkdir /tmp/cf$$
-first=123456789abcdef
-second=/tmp/cf$$/$first
-$rm -f $first $second
-if (echo hi >$first) 2>/dev/null; then
- if $test -f 123456789abcde; then
- echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
- val="$undef"
- else
- if (echo hi >$second) 2>/dev/null; then
- if $test -f /tmp/cf$$/123456789abcde; then
- $cat <<'EOM'
-That's peculiar... You can have filenames longer than 14 characters, but only
-on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
-I shall consider your system cannot support long filenames at all.
-EOM
- val="$undef"
- else
- echo 'You can have filenames longer than 14 characters.' >&4
- val="$define"
- fi
- else
- $cat <<'EOM'
-How confusing! Some of your filesystems are sane enough to allow filenames
-longer than 14 characters but some others like /tmp can't even think about them.
-So, for now on, I shall assume your kernel does not allow them at all.
-EOM
- val="$undef"
- fi
- fi
-else
- $cat <<'EOM'
-You can't have filenames longer than 14 chars. You can't even think about them!
-EOM
- val="$undef"
-fi
-set d_flexfnam
-eval $setvar
-$rm -rf /tmp/cf$$ 123456789abcde*
-
-: determine where library module manual pages go
-set man3dir man3dir none
-eval $prefixit
-$cat <<EOM
-
-$spackage has manual pages for many of the library modules.
-EOM
-
-case "$nroff" in
-nroff)
- $cat <<'EOM'
-However, you don't have nroff, so they're probably useless to you.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-case "$d_flexfnam" in
-undef)
- $cat <<'EOM'
-However, your system can't handle the long file names like File::Basename.3.
-EOM
- case "$man3dir" in
- '') man3dir="none";;
- esac;;
-esac
-
-echo "If you don't want the manual sources installed, answer 'none'."
-prog=`echo $package | $sed 's/-*[0-9.]*$//'`
-case "$man3dir" in
-'') case "$prefix" in
- *$prog*) dflt=`echo $man1dir |
- $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
- *) dflt="$privlib/man/man3" ;;
- esac
- ;;
-' ') dflt=none;;
-*) dflt="$man3dir" ;;
-esac
-echo " "
-
-fn=dn+~
-rp="Where do the $package library man pages (source) go?"
-. ./getfile
-if test "X$man3direxp" != "X$ansexp"; then
- installman3dir=''
-fi
-
-man3dir="$ans"
-man3direxp="$ansexp"
-case "$man3dir" in
-'') man3dir=' '
- installman3dir='';;
-esac
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-manual pages reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installman3dir" in
- '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installman3dir";;
- esac
- fn=de~
- rp='Where will man pages be installed?'
- . ./getfile
- installman3dir="$ans"
-else
- installman3dir="$man3direxp"
-fi
-
-: What suffix to use on installed man pages
-
-case "$man3dir" in
-' ')
- man3ext='0'
- ;;
-*)
- rp="What suffix should be used for the $package library man pages?"
- case "$man3ext" in
- '') case "$man3dir" in
- *3) dflt=3 ;;
- *3p) dflt=3p ;;
- *3pm) dflt=3pm ;;
- *l) dflt=l;;
- *n) dflt=n;;
- *o) dflt=o;;
- *p) dflt=p;;
- *C) dflt=C;;
- *L) dflt=L;;
- *L3) dflt=L3;;
- *) dflt=3;;
- esac
- ;;
- *) dflt="$man3ext";;
- esac
- . ./myread
- man3ext="$ans"
- ;;
-esac
-
-: determine where public executable scripts go
-set scriptdir scriptdir
-eval $prefixit
-case "$scriptdir" in
-'')
- dflt="$bin"
- : guess some guesses
- $test -d /usr/share/scripts && dflt=/usr/share/scripts
- $test -d /usr/share/bin && dflt=/usr/share/bin
- $test -d /usr/local/script && dflt=/usr/local/script
- $test -d $prefixexp/script && dflt=$prefixexp/script
- set dflt
- eval $prefixup
- ;;
-*) dflt="$scriptdir"
- ;;
-esac
-$cat <<EOM
-
-Some installations have a separate directory just for executable scripts so
-that they can mount it across multiple architectures but keep the scripts in
-one spot. You might, for example, have a subdirectory of /usr/share for this.
-Or you might just lump your scripts in with all your other executables.
-
-EOM
-fn=d~
-rp='Where do you keep publicly executable scripts?'
-. ./getfile
-if $test "X$ansexp" != "X$scriptdirexp"; then
- installscript=''
-fi
-scriptdir="$ans"
-scriptdirexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in which
-scripts reside from the directory in which they are installed (and from
-which they are presumably copied to the former directory by occult means).
-
-EOM
- case "$installscript" in
- '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installscript";;
- esac
- fn=de~
- rp='Where will public scripts be installed?'
- . ./getfile
- installscript="$ans"
-else
- installscript="$scriptdirexp"
-fi
-
-: determine where site specific libraries go.
-set sitelib sitelib
-eval $prefixit
-case "$sitelib" in
-'')
- prog=`echo $package | $sed 's/-*[0-9.]*$//'`
- dflt="$privlib/site_$prog" ;;
-*) dflt="$sitelib" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-site-specific extensions and modules. Some users find it convenient
-to place all local files in this directory rather than in the main
-distribution directory.
-
-EOM
-fn=d~+
-rp='Pathname for the site-specific library files?'
-. ./getfile
-if $test "X$sitelibexp" != "X$ansexp"; then
- installsitelib=''
-fi
-sitelib="$ans"
-sitelibexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific files reside from the directory in which they are
-installed (and from which they are presumably copied to the former
-directory by occult means).
-
-EOM
- case "$installsitelib" in
- '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitelib";;
- esac
- fn=de~
- rp='Where will site-specific files be installed?'
- . ./getfile
- installsitelib="$ans"
-else
- installsitelib="$sitelibexp"
-fi
-
-: determine where site specific architecture-dependent libraries go.
-xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
-: xxx is usuually lib/site_perl/archname.
-set sitearch sitearch none
-eval $prefixit
-case "$sitearch" in
-'') dflt="$sitelib/$archname" ;;
-*) dflt="$sitearch" ;;
-esac
-$cat <<EOM
-
-The installation process will also create a directory for
-architecture-dependent site-specific extensions and modules.
-
-EOM
-fn=nd~+
-rp='Pathname for the site-specific architecture-dependent library files?'
-. ./getfile
-if $test "X$sitearchexp" != "X$ansexp"; then
- installsitearch=''
-fi
-sitearch="$ans"
-sitearchexp="$ansexp"
-if $afs; then
- $cat <<EOM
-
-Since you are running AFS, I need to distinguish the directory in
-which site-specific architecture-dependent library files reside from
-the directory in which they are installed (and from which they are
-presumably copied to the former directory by occult means).
-
-EOM
- case "$installsitearch" in
- '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
- *) dflt="$installsitearch";;
- esac
- fn=de~
- rp='Where will site-specific architecture-dependent files be installed?'
- . ./getfile
- installsitearch="$ans"
-else
- installsitearch="$sitearchexp"
-fi
-
-: see what memory models we can support
-case "$models" in
-'')
- $cat >pdp11.c <<'EOP'
-main() {
-#ifdef pdp11
- exit(0);
-#else
- exit(1);
-#endif
-}
-EOP
- ( cc -o pdp11 pdp11.c ) >/dev/null 2>&1
- if $test -f pdp11 && ./pdp11 2>/dev/null; then
- dflt='unsplit split'
- else
- tans=`./loc . X /lib/small /lib/large /usr/lib/small /usr/lib/large /lib/medium /usr/lib/medium /lib/huge`
- case "$tans" in
- X) dflt='none';;
- *) if $test -d /lib/small || $test -d /usr/lib/small; then
- dflt='small'
- else
- dflt=''
- fi
- if $test -d /lib/medium || $test -d /usr/lib/medium; then
- dflt="$dflt medium"
- fi
- if $test -d /lib/large || $test -d /usr/lib/large; then
- dflt="$dflt large"
- fi
- if $test -d /lib/huge || $test -d /usr/lib/huge; then
- dflt="$dflt huge"
- fi
- esac
- fi;;
-*) dflt="$models";;
-esac
-$cat <<EOM
-
-Some systems have different model sizes. On most systems they are called
-small, medium, large, and huge. On the PDP11 they are called unsplit and
-split. If your system doesn't support different memory models, say "none".
-If you wish to force everything to one memory model, say "none" here and
-put the appropriate flags later when it asks you for other cc and ld flags.
-Venix systems may wish to put "none" and let the compiler figure things out.
-(In the following question multiple model names should be space separated.)
-
-The default for most systems is "none".
-
-EOM
-rp="Which memory models are supported?"
-. ./myread
-models="$ans"
-
-case "$models" in
-none)
- small=''
- medium=''
- large=''
- huge=''
- unsplit=''
- split=''
- ;;
-*split)
- case "$split" in
- '') if $contains '\-i' $sysman/ld.1 >/dev/null 2>&1 || \
- $contains '\-i' $sysman/cc.1 >/dev/null 2>&1; then
- dflt='-i'
- else
- dflt='none'
- fi;;
- *) dflt="$split";;
- esac
- rp="What flag indicates separate I and D space?"
- . ./myread
- tans="$ans"
- case "$tans" in
- none) tans='';;
- esac
- split="$tans"
- unsplit='';;
-*large*|*small*|*medium*|*huge*)
- case "$models" in
- *large*)
- case "$large" in
- '') dflt='-Ml';;
- *) dflt="$large";;
- esac
- rp="What flag indicates large model?"
- . ./myread
- tans="$ans"
- case "$tans" in
- none) tans='';
- esac
- large="$tans";;
- *) large='';;
- esac
- case "$models" in
- *huge*) case "$huge" in
- '') dflt='-Mh';;
- *) dflt="$huge";;
- esac
- rp="What flag indicates huge model?"
- . ./myread
- tans="$ans"
- case "$tans" in
- none) tans='';
- esac
- huge="$tans";;
- *) huge="$large";;
- esac
- case "$models" in
- *medium*) case "$medium" in
- '') dflt='-Mm';;
- *) dflt="$medium";;
- esac
- rp="What flag indicates medium model?"
- . ./myread
- tans="$ans"
- case "$tans" in
- none) tans='';
- esac
- medium="$tans";;
- *) medium="$large";;
- esac
- case "$models" in
- *small*) case "$small" in
- '') dflt='none';;
- *) dflt="$small";;
- esac
- rp="What flag indicates small model?"
- . ./myread
- tans="$ans"
- case "$tans" in
- none) tans='';
- esac
- small="$tans";;
- *) small='';;
- esac
- ;;
-*)
- echo "Unrecognized memory models--you may have to edit Makefile.SH" >&4
- ;;
-esac
-$rm -f pdp11.* pdp11
-
-: see if we need a special compiler
-echo " "
-if ./usg; then
- case "$cc" in
- '') case "$Mcc" in
- /*) dflt='Mcc';;
- *) case "$large" in
- -M*) dflt='cc';;
- *) if $contains '\-M' $sysman/cc.1 >/dev/null 2>&1 ; then
- if $contains '\-M' $sysman/cpp.1 >/dev/null 2>&1; then
- dflt='cc'
- else
- dflt='cc -M'
- fi
- else
- dflt='cc'
- fi;;
- esac;;
- esac;;
- *) dflt="$cc";;
- esac
- case "$dflt" in
- *M*) $cat <<'EOM'
-On some older systems the default C compiler will not resolve multiple global
-references that happen to have the same name. On some such systems the "Mcc"
-command may be used to force these to be resolved. On other systems a "cc -M"
-command is required. (Note that the -M flag on other systems indicates a
-memory model to use!) If you have the Gnu C compiler, you might wish to use
-that instead.
-
-EOM
- ;;
- esac
- rp="Use which C compiler?"
- . ./myread
- cc="$ans"
-else
- case "$cc" in
- '') dflt=cc;;
- *) dflt="$cc";;
- esac
- rp="Use which C compiler?"
+ rp="Use which C compiler?"
. ./myread
cc="$ans"
fi
compile='
mc_file=$1;
shift;
-$cc $optimize $ccflags $ldflags -o ${mc_file} $* ${mc_file}.c $libs > /dev/null 2>&1;'
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs > /dev/null 2>&1;'
+: define a shorthand compile call for compilations that should be ok.
+compile_ok='
+mc_file=$1;
+shift;
+$cc $optimize $ccflags $ldflags -o ${mc_file}$_exe $* ${mc_file}.c $libs;'
echo " "
echo "Checking for GNU C Library..." >&4
EOM
set gnulibc
if eval $compile && \
- ./gnulibc | $contains '^GNU C Library' >/dev/null 2>&1; then
+ ./gnulibc | $contains '^GNU C Library'; then
val="$define"
echo "You are using the GNU C Library"
else
: see if nm is to be used to determine whether a symbol is defined or not
case "$usenm" in
'')
+ dflt=''
case "$d_gnulibc" in
- $define)
+ "$define")
+ echo " "
+ echo "nm probably won't work on the GNU C Library." >&4
dflt=n
;;
- *)
- dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
+ esac
+ case "$dflt" in
+ '')
+ if $test "$osname" = aix -a ! -f /lib/syscalls.exp; then
+ echo " "
+ echo "Whoops! This is an AIX system without /lib/syscalls.exp!" >&4
+ echo "'nm' won't be sufficient on this sytem." >&4
+ dflt=n
+ fi
+ ;;
+ esac
+ case "$dflt" in
+ '') dflt=`egrep 'inlibc|csym' ../Configure | wc -l 2>/dev/null`
if $test $dflt -gt 20; then
dflt=y
else
;;
*)
case "$usenm" in
- true) dflt=y;;
+ true|$define) dflt=y;;
*) dflt=n;;
esac
;;
esac
$cat <<EOM
-I can use '$nm' to extract the symbols from your C libraries. This is a time
-consuming task which may generate huge output on the disk (up to 3 megabytes)
-but that should make the symbols extraction faster. The alternative is to skip
-the 'nm' extraction part and to compile a small test program instead to
-determine whether each symbol is present. If you have a fast C compiler and/or
-if your 'nm' output cannot be parsed, this may be the best solution.
-You shouldn't let me use 'nm' if you have the GNU C Library.
+I can use $nm to extract the symbols from your C libraries. This
+is a time consuming task which may generate huge output on the disk (up
+to 3 megabytes) but that should make the symbols extraction faster. The
+alternative is to skip the 'nm' extraction part and to compile a small
+test program instead to determine whether each symbol is present. If
+you have a fast C compiler and/or if your 'nm' output cannot be parsed,
+this may be the best solution.
+
+You probably shouldn't let me use 'nm' if you are using the GNU C Library.
EOM
rp="Shall I use $nm to extract C symbols from the libraries?"
. ./myread
case "$ans" in
-n|N) usenm=false;;
+[Nn]*) usenm=false;;
*) usenm=true;;
esac
echo " "
echo "$nm didn't seem to work right. Trying $ar instead..." >&4
com=''
- if $ar t $libc > libc.tmp; then
- for thisname in $libnames; do
+ if $ar t $libc > libc.tmp && $contains '^fprintf$' libc.tmp >/dev/null 2>&1; then
+ for thisname in $libnames $libc; do
$ar t $thisname >>libc.tmp
done
$sed -e "s/\\$_o\$//" < libc.tmp > libc.list
echo "Ok." >&4
+ elif test "X$osname" = "Xos2" && $ar tv $libc > libc.tmp; then
+ # Repeat libc to extract forwarders to DLL entries too
+ for thisname in $libnames $libc; do
+ $ar tv $thisname >>libc.tmp
+ # Revision 50 of EMX has bug in $ar.
+ # it will not extract forwarders to DLL entries
+ # Use emximp which will extract exactly them.
+ emximp -o tmp.imp $thisname \
+ 2>/dev/null && \
+ $sed -e 's/^\([_a-zA-Z0-9]*\) .*$/\1/p' \
+ < tmp.imp >>libc.tmp
+ $rm tmp.imp
+ done
+ $sed -e "s/\\$_o\$//" -e 's/^ \+//' < libc.tmp > libc.list
+ echo "Ok." >&4
else
echo "$ar didn't seem to work right." >&4
echo "Maybe this is a Cray...trying bld instead..." >&4
$define) dflt='y' ;;
esac
: Does a dl_xxx.xs file exist for this operating system
- $test -f ../$dldir/dl_${osname}.xs && dflt='y'
+ $test -f $rsrc/$dldir/dl_${osname}.xs && dflt='y'
;;
esac
rp="Do you wish to use dynamic loading?"
y*) usedl="$define"
case "$dlsrc" in
'')
- if $test -f ../$dldir/dl_${osname}.xs ; then
+ if $test -f $rsrc/$dldir/dl_${osname}.xs ; then
dflt="$dldir/dl_${osname}.xs"
elif $test "$d_dlopen" = "$define" ; then
dflt="$dldir/dl_dlopen.xs"
esac
echo "The following dynamic loading files are available:"
: Can not go over to $dldir because getfile has path hard-coded in.
- cd ..; ls -C $dldir/dl*.xs; cd UU
- rp="Source file to use for dynamic loading"
- fn="fne"
- . ./getfile
+ tdir=`pwd`; cd $rsrc; $ls -C $dldir/dl*.xs; cd $tdir
+ rp="Source file to use for dynamic loading"
+ fn="fne"
+ # XXX This getfile call will fail the existence check if you try
+ # building away from $src (this is not supported yet).
+ . ./getfile
usedl="$define"
: emulate basename
dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
- $cat << EOM
+ $cat << EOM
Some systems may require passing special flags to $cc -c to
compile modules that will be used to create a shared library.
# Why does next4 have to be so different?
case "${osname}${osvers}" in
next4*) xxx='DYLD_LIBRARY_PATH' ;;
+ os2*) xxx='' ;; # Nothing special needed.
*) xxx='LD_LIBRARY_PATH' ;;
esac
- case "$osname" in
- os2) ;;
- *) $cat <<EOM | $tee -a ../config.msg >&4
+ if test X"$xxx" != "X"; then
+ $cat <<EOM | $tee -a ../config.msg >&4
To build perl, you must add the current working directory to your
$xxx environment variable before running make. You can do
for Csh-style shells. You *MUST* do this before running make.
EOM
- esac
+ fi
;;
*) useshrplib='false' ;;
esac
conflicts with the value of $archlibexp/CORE
that installperl will use.
EOM
- ;;
+ ;;
+ esac
+ ;;
+esac
+
+# How will the perl executable find the installed shared $libperl?
+# Add $xxx to ccdlflags.
+# If we can't figure out a command-line option, use $shrpenv to
+# set env LD_RUN_PATH. The main perl makefile uses this.
+shrpdir=$archlibexp/CORE
+xxx=''
+tmp_shrpenv=''
+if "$useshrplib"; then
+ case "$osname" in
+ aix)
+ # We'll set it in Makefile.SH...
+ ;;
+ solaris|netbsd)
+ xxx="-R $shrpdir"
+ ;;
+ freebsd)
+ xxx="-Wl,-R$shrpdir"
+ ;;
+ linux|irix*|dec_osf)
+ xxx="-Wl,-rpath,$shrpdir"
+ ;;
+ next)
+ # next doesn't like the default...
+ ;;
+ *)
+ tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
+ ;;
+ esac
+ case "$xxx" in
+ '') ;;
+ *)
+ # Only add $xxx if it isn't already in ccdlflags.
+ case " $ccdlflags " in
+ *" $xxx "*) ;;
+ *) ccdlflags="$ccdlflags $xxx"
+ cat <<EOM >&4
+
+Adding $xxx to the flags
+passed to $ld so that the perl executable will find the
+installed shared $libperl.
+
+EOM
+ ;;
+ esac
+ ;;
+ esac
+fi
+# Respect a hint or command-line value.
+case "$shrpenv" in
+'') shrpenv="$tmp_shrpenv" ;;
+esac
+
+: determine where manual pages go
+set man1dir man1dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages available in source form.
+EOM
+case "$nroff" in
+nroff)
+ echo "However, you don't have nroff, so they're probably useless to you."
+ case "$man1dir" in
+ '') man1dir="none";;
+ esac;;
+esac
+echo "If you don't want the manual sources installed, answer 'none'."
+case "$man1dir" in
+' ') dflt=none
+ ;;
+'')
+ lookpath="$prefixexp/man/man1 $prefixexp/man/l_man/man1"
+ lookpath="$lookpath $prefixexp/man/p_man/man1"
+ lookpath="$lookpath $prefixexp/man/u_man/man1"
+ lookpath="$lookpath $prefixexp/man/man.1"
+ case "$sysman" in
+ */?_man*) dflt=`./loc . $prefixexp/l_man/man1 $lookpath` ;;
+ *) dflt=`./loc . $prefixexp/man/man1 $lookpath` ;;
+ esac
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$man1dir"
+ ;;
+esac
+echo " "
+fn=dn+~
+rp="Where do the main $spackage manual pages (source) go?"
+. ./getfile
+if $test "X$man1direxp" != "X$ansexp"; then
+ installman1dir=''
+fi
+man1dir="$ans"
+man1direxp="$ansexp"
+case "$man1dir" in
+'') man1dir=' '
+ installman1dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installman1dir" in
+ '') dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman1dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman1dir="$ans"
+else
+ installman1dir="$man1direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man1dir" in
+' ')
+ man1ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the main $spackage man pages?"
+ case "$man1ext" in
+ '') case "$man1dir" in
+ *1) dflt=1 ;;
+ *1p) dflt=1p ;;
+ *1pm) dflt=1pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L1) dflt=L1;;
+ *) dflt=1;;
+ esac
+ ;;
+ *) dflt="$man1ext";;
+ esac
+ . ./myread
+ man1ext="$ans"
+ ;;
+esac
+
+: see if we can have long filenames
+echo " "
+rmlist="$rmlist /tmp/cf$$"
+$test -d /tmp/cf$$ || mkdir /tmp/cf$$
+first=123456789abcdef
+second=/tmp/cf$$/$first
+$rm -f $first $second
+if (echo hi >$first) 2>/dev/null; then
+ if $test -f 123456789abcde; then
+ echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4
+ val="$undef"
+ else
+ if (echo hi >$second) 2>/dev/null; then
+ if $test -f /tmp/cf$$/123456789abcde; then
+ $cat <<'EOM'
+That's peculiar... You can have filenames longer than 14 characters, but only
+on some of the filesystems. Maybe you are using NFS. Anyway, to avoid problems
+I shall consider your system cannot support long filenames at all.
+EOM
+ val="$undef"
+ else
+ echo 'You can have filenames longer than 14 characters.' >&4
+ val="$define"
+ fi
+ else
+ $cat <<'EOM'
+How confusing! Some of your filesystems are sane enough to allow filenames
+longer than 14 characters but some others like /tmp can't even think about them.
+So, for now on, I shall assume your kernel does not allow them at all.
+EOM
+ val="$undef"
+ fi
+ fi
+else
+ $cat <<'EOM'
+You can't have filenames longer than 14 chars. You can't even think about them!
+EOM
+ val="$undef"
+fi
+set d_flexfnam
+eval $setvar
+$rm -rf /tmp/cf$$ 123456789abcde*
+
+: determine where library module manual pages go
+set man3dir man3dir none
+eval $prefixit
+$cat <<EOM
+
+$spackage has manual pages for many of the library modules.
+EOM
+
+case "$nroff" in
+nroff)
+ $cat <<'EOM'
+However, you don't have nroff, so they're probably useless to you.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+case "$d_flexfnam" in
+undef)
+ $cat <<'EOM'
+However, your system can't handle the long file names like File::Basename.3.
+EOM
+ case "$man3dir" in
+ '') man3dir="none";;
+ esac;;
+esac
+
+echo "If you don't want the manual sources installed, answer 'none'."
+prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+case "$man3dir" in
+'') case "$prefix" in
+ *$prog*) dflt=`echo $man1dir |
+ $sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt="$privlib/man/man3" ;;
esac
;;
+' ') dflt=none;;
+*) dflt="$man3dir" ;;
esac
+echo " "
-# How will the perl executable find the installed shared $libperl?
-# Add $xxx to ccdlflags.
-# If we can't figure out a command-line option, use $shrpenv to
-# set env LD_RUN_PATH. The main perl makefile uses this.
-shrpdir=$archlibexp/CORE
-xxx=''
-tmp_shrpenv=''
-if "$useshrplib"; then
- case "$osname" in
- aix)
- # We'll set it in Makefile.SH...
- ;;
- solaris|netbsd)
- xxx="-R $shrpdir"
- ;;
- freebsd)
- xxx="-Wl,-R$shrpdir"
- ;;
- linux|irix*|dec_osf)
- xxx="-Wl,-rpath,$shrpdir"
- ;;
- next)
- # next doesn't like the default...
- ;;
- *)
- tmp_shrpenv="env LD_RUN_PATH=$shrpdir"
- ;;
- esac
- case "$xxx" in
- '') ;;
- *)
- # Only add $xxx if it isn't already in ccdlflags.
- case " $ccdlflags " in
- *" $xxx "*) ;;
- *) ccdlflags="$ccdlflags $xxx"
- cat <<EOM >&4
+fn=dn+~
+rp="Where do the $package library man pages (source) go?"
+. ./getfile
+if test "X$man3direxp" != "X$ansexp"; then
+ installman3dir=''
+fi
-Adding $xxx to the flags
-passed to $ld so that the perl executable will find the
-installed shared $libperl.
+man3dir="$ans"
+man3direxp="$ansexp"
+case "$man3dir" in
+'') man3dir=' '
+ installman3dir='';;
+esac
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+manual pages reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
EOM
- ;;
+ case "$installman3dir" in
+ '') dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installman3dir";;
+ esac
+ fn=de~
+ rp='Where will man pages be installed?'
+ . ./getfile
+ installman3dir="$ans"
+else
+ installman3dir="$man3direxp"
+fi
+
+: What suffix to use on installed man pages
+
+case "$man3dir" in
+' ')
+ man3ext='0'
+ ;;
+*)
+ rp="What suffix should be used for the $package library man pages?"
+ case "$man3ext" in
+ '') case "$man3dir" in
+ *3) dflt=3 ;;
+ *3p) dflt=3p ;;
+ *3pm) dflt=3pm ;;
+ *l) dflt=l;;
+ *n) dflt=n;;
+ *o) dflt=o;;
+ *p) dflt=p;;
+ *C) dflt=C;;
+ *L) dflt=L;;
+ *L3) dflt=L3;;
+ *) dflt=3;;
esac
;;
+ *) dflt="$man3ext";;
esac
-fi
-# Respect a hint or command-line value.
-case "$shrpenv" in
-'') shrpenv="$tmp_shrpenv" ;;
+ . ./myread
+ man3ext="$ans"
+ ;;
esac
: see if we have to deal with yellow pages, now NIS.
*) echo "I'll use $perlpath in \"eval 'exec'\"" ;;
esac
+: determine where public executable scripts go
+set scriptdir scriptdir
+eval $prefixit
+case "$scriptdir" in
+'')
+ dflt="$bin"
+ : guess some guesses
+ $test -d /usr/share/scripts && dflt=/usr/share/scripts
+ $test -d /usr/share/bin && dflt=/usr/share/bin
+ $test -d /usr/local/script && dflt=/usr/local/script
+ $test -d $prefixexp/script && dflt=$prefixexp/script
+ set dflt
+ eval $prefixup
+ ;;
+*) dflt="$scriptdir"
+ ;;
+esac
+$cat <<EOM
+
+Some installations have a separate directory just for executable scripts so
+that they can mount it across multiple architectures but keep the scripts in
+one spot. You might, for example, have a subdirectory of /usr/share for this.
+Or you might just lump your scripts in with all your other executables.
+
+EOM
+fn=d~
+rp='Where do you keep publicly executable scripts?'
+. ./getfile
+if $test "X$ansexp" != "X$scriptdirexp"; then
+ installscript=''
+fi
+scriptdir="$ans"
+scriptdirexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in which
+scripts reside from the directory in which they are installed (and from
+which they are presumably copied to the former directory by occult means).
+
+EOM
+ case "$installscript" in
+ '') dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installscript";;
+ esac
+ fn=de~
+ rp='Where will public scripts be installed?'
+ . ./getfile
+ installscript="$ans"
+else
+ installscript="$scriptdirexp"
+fi
+
+: determine where site specific libraries go.
+set sitelib sitelib
+eval $prefixit
+case "$sitelib" in
+'')
+ prog=`echo $package | $sed 's/-*[0-9.]*$//'`
+ dflt="$privlib/site_$prog" ;;
+*) dflt="$sitelib" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+site-specific extensions and modules. Some users find it convenient
+to place all local files in this directory rather than in the main
+distribution directory.
+
+EOM
+fn=d~+
+rp='Pathname for the site-specific library files?'
+. ./getfile
+if $test "X$sitelibexp" != "X$ansexp"; then
+ installsitelib=''
+fi
+sitelib="$ans"
+sitelibexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific files reside from the directory in which they are
+installed (and from which they are presumably copied to the former
+directory by occult means).
+
+EOM
+ case "$installsitelib" in
+ '') dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitelib";;
+ esac
+ fn=de~
+ rp='Where will site-specific files be installed?'
+ . ./getfile
+ installsitelib="$ans"
+else
+ installsitelib="$sitelibexp"
+fi
+
+: determine where site specific architecture-dependent libraries go.
+xxx=`echo $sitelib/$archname | sed 's!^$prefix!!'`
+: xxx is usuually lib/site_perl/archname.
+set sitearch sitearch none
+eval $prefixit
+case "$sitearch" in
+'') dflt="$sitelib/$archname" ;;
+*) dflt="$sitearch" ;;
+esac
+$cat <<EOM
+
+The installation process will also create a directory for
+architecture-dependent site-specific extensions and modules.
+
+EOM
+fn=nd~+
+rp='Pathname for the site-specific architecture-dependent library files?'
+. ./getfile
+if $test "X$sitearchexp" != "X$ansexp"; then
+ installsitearch=''
+fi
+sitearch="$ans"
+sitearchexp="$ansexp"
+if $afs; then
+ $cat <<EOM
+
+Since you are running AFS, I need to distinguish the directory in
+which site-specific architecture-dependent library files reside from
+the directory in which they are installed (and from which they are
+presumably copied to the former directory by occult means).
+
+EOM
+ case "$installsitearch" in
+ '') dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ *) dflt="$installsitearch";;
+ esac
+ fn=de~
+ rp='Where will site-specific architecture-dependent files be installed?'
+ . ./getfile
+ installsitearch="$ans"
+else
+ installsitearch="$sitearchexp"
+fi
+
cat <<EOM
Previous version of $package used the standard IO mechanisms as defined
}
EOCP
set intsize
- if eval $compile && ./intsize > /dev/null; then
+ if eval $compile_ok && ./intsize > /dev/null; then
eval `./intsize`
echo "Your integers are $intsize bytes long."
echo "Your long integers are $longsize bytes long."
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
yyy=$?
else
}
EOCP
set try
-if eval $compile; then
+if eval $compile_ok; then
./try
castflags=$?
else
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
o_nonblock=`./try`
case "$o_nonblock" in
'') echo "I can't figure it out, assuming O_NONBLOCK will do.";;
#include <sys/types.h>
#include <signal.h>
#define MY_O_NONBLOCK $o_nonblock
+#ifndef errno /* XXX need better Configure test */
extern int errno;
+#endif
$signal_t blech(x) int x; { exit(3); }
EOCP
$cat >> try.c <<'EOCP'
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
echo "$startsh" >mtry
echo "./try >try.out 2>try.ret 3>try.err || exit 4" >>mtry
chmod +x mtry
set gethostent d_gethent
eval $inlibc
+hasproto='varname=$1; func=$2; shift; shift;
+while $test $# -ge 2; do
+ case "$1" in
+ $define) echo "#include <$2>";;
+ esac ;
+ shift 2;
+done > try.c;
+$cppstdin $cppflags $cppminus < try.c > tryout.c 2>/dev/null;
+if $contains "$func.*(" tryout.c >/dev/null 2>&1; then
+ echo "$func() prototype found.";
+ val="$define";
+else
+ echo "$func() prototype NOT found.";
+ val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm -f try.c tryout.c'
+
+: see if this is a netdb.h system
+set netdb.h i_netdb
+eval $inhdr
+
+: see if prototypes for various gethostxxx netdb.h functions are available
+echo " "
+set d_gethostprotos gethostent $i_netdb netdb.h
+eval $hasproto
+
: see if getlogin exists
set getlogin d_getlogin
eval $inlibc
set getnetent d_getnent
eval $inlibc
+: see if prototypes for various getnetxxx netdb.h functions are available
+echo " "
+set d_getnetprotos getnetent $i_netdb netdb.h
+eval $hasproto
+
: see if getprotobyname exists
set getprotobyname d_getpbyname
set getpriority d_getprior
eval $inlibc
+: see if prototypes for various getprotoxxx netdb.h functions are available
+echo " "
+set d_getprotoprotos getprotoent $i_netdb netdb.h
+eval $hasproto
+
: see if getservbyname exists
set getservbyname d_getsbyname
set getservent d_getsent
eval $inlibc
+: see if prototypes for various getservxxx netdb.h functions are available
+echo " "
+set d_getservprotos getservent $i_netdb netdb.h
+eval $hasproto
+
: see if gettimeofday or ftime exists
set gettimeofday d_gettimeod
eval $inlibc
echo " "
echo $n "Checking to see if your system supports long doubles...$c" >&4
echo 'long double foo() { long double x; x = 7.0; return x; }' > try.c
-if $cc $optimize $ccflags -c try.c; then
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
val="$define"
echo " Yup, it does." >&4
else
eval $setvar
: check for length of long double
-echo " "
-
case "${d_longdbl}${longdblsize}" in
$define)
+ echo " "
$echo $n "Checking to see how big your long doubles are...$c" >&4
$cat >try.c <<'EOCP'
#include <stdio.h>
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
longdblsize=`./try`
+ $echo " $longdblsize bytes." >&4
else
dflt='8'
+ echo " "
echo "(I can't seem to compile the test program. Guessing...)"
rp="What is the size of a long double (in bytes)?"
. ./myread
longdblsize="$ans"
fi
- $echo " $longdblsize bytes."
+ ;;
+esac
+$rm -f try.c try
+
+: check for long long
+echo " "
+echo $n "Checking to see if your system supports long long...$c" >&4
+echo 'long long foo() { long long x; x = 7; return x; }' > try.c
+if $cc $optimize $ccflags -c try.c >/dev/null 2>&1; then
+ val="$define"
+ echo " Yup, it does." >&4
+else
+ val="$undef"
+ echo " Nope, it doesn't." >&4
+fi
+$rm try.*
+set d_longlong
+eval $setvar
+
+: check for length of long long
+case "${d_longlong}${longlongsize}" in
+$define)
+ echo " "
+ $echo $n "Checking to see how big your long longs are...$c" >&4
+ $cat >try.c <<'EOCP'
+#include <stdio.h>
+main()
+{
+ printf("%d\n", sizeof(long long));
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ longlongsize=`./try`
+ $echo " $longlongsize bytes." >&4
+ else
+ dflt='8'
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the size of a long long (in bytes)?"
+ . ./myread
+ longlongsize="$ans"
+ fi
;;
esac
$rm -f try.c try
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
if ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
: see if we have sigaction
if set sigaction val -f d_sigaction; eval $csym; $val; then
echo 'sigaction() found.' >&4
- val="$define"
-else
- echo 'sigaction NOT found.' >&4
- val="$undef"
-fi
-$cat > try.c <<'EOP'
+ $cat > try.c <<'EOP'
#include <stdio.h>
#include <sys/types.h>
#include <signal.h>
struct sigaction act, oact;
}
EOP
-set try
-if eval $compile; then
- :
+ set try
+ if eval $compile_ok; then
+ val="$define"
+ else
+ echo "But you don't seem to have a useable struct sigaction." >&4
+ val="$undef"
+ fi
else
- echo "But you don't seem to have a useable struct sigaction." >&4
+ echo 'sigaction NOT found.' >&4
val="$undef"
fi
set d_sigaction; eval $setvar
else
echo "You don't have Berkeley networking in libc$_a..." >&4
if test -f /usr/lib/libnet$_a; then
- ( (nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
+ ( ($nm $nm_opt /usr/lib/libnet$_a | eval $nm_extract) || \
$ar t /usr/lib/libnet$_a) 2>/dev/null >> libc.list
if $contains socket libc.list >/dev/null 2>&1; then
echo "...but the Wollongong group seems to have hacked it in." >&4
*) eval "$var=\$varval";;
esac'
+: define an is-a-typedef? function that prompts if the type is not available.
+typedef_ask='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@;
+case "$inclist" in
+"") inclist="sys/types.h";;
+esac;
+eval "varval=\$$var";
+case "$varval" in
+"")
+ $rm -f temp.c;
+ for inc in $inclist; do
+ echo "#include <$inc>" >>temp.c;
+ done;
+ $cppstdin $cppflags $cppminus < temp.c >temp.E 2>/dev/null;
+ echo " " ;
+ echo "$rp" | $sed -e "s/What is/Looking for/" -e "s/?/./";
+ if $contains $type temp.E >/dev/null 2>&1; then
+ echo "$type found." >&4;
+ eval "$var=\$type";
+ else
+ echo "$type NOT found." >&4;
+ dflt="$def";
+ . ./myread ;
+ eval "$var=\$ans";
+ fi;
+ $rm -f temp.?;;
+*) eval "$var=\$varval";;
+esac'
+
: see if this is a sys/times.h system
set sys/times.h i_systimes
eval $inhdr
case "$i_systimes" in
"$define") inc='sys/times.h';;
esac
+ rp="What is the type returned by times() on this system?"
set clock_t clocktype long stdio.h sys/types.h $inc
- eval $typedef
- dflt="$clocktype"
- echo " "
- rp="What type is returned by times() on this system?"
- . ./myread
- clocktype="$ans"
+ eval $typedef_ask
else
echo 'times() NOT found, hope that will do.' >&4
d_times="$undef"
int main() { return closedir(opendir(".")); }
EOM
set closedir
- if eval $compile; then
+ if eval $compile_ok; then
if ./closedir > /dev/null 2>&1 ; then
echo "Yes, it does."
val="$undef"
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try`
else
dflt='8'
eval $inhdr
case "$i_db" in
-define)
- : Check the return type needed for hash
- echo " "
- echo "Checking return type needed for hash for Berkeley DB ..." >&4
- $cat >try.c <<EOCP
-#$d_const HASCONST
-#ifndef HASCONST
-#define const
-#endif
-#include <sys/types.h>
-#include <db.h>
-
-#ifndef DB_VERSION_MAJOR
-u_int32_t hash_cb (ptr, size)
-const void *ptr;
-size_t size;
-{
-}
-HASHINFO info;
-main()
-{
- info.hash = hash_cb;
-}
-#endif
-EOCP
- if $cc $ccflags -c try.c >try.out 2>&1 ; then
- if $contains warning try.out >>/dev/null 2>&1 ; then
- db_hashtype='int'
- else
- db_hashtype='u_int32_t'
- fi
- else
- : XXX Maybe we should just give up here.
- db_hashtype=u_int32_t
- echo "Help: I can't seem to compile the db test program." >&4
- echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
- fi
- $rm -f try.*
- echo "Your version of Berkeley DB uses $db_hashtype for hash."
- ;;
-*) db_hashtype=u_int32_t
- ;;
-esac
-
-case "$i_db" in
$define)
: Check db version.
echo " "
case "$i_db" in
define)
+ : Check the return type needed for hash
+ echo " "
+ echo "Checking return type needed for hash for Berkeley DB ..." >&4
+ $cat >try.c <<EOCP
+#$d_const HASCONST
+#ifndef HASCONST
+#define const
+#endif
+#include <sys/types.h>
+#include <db.h>
+
+#ifndef DB_VERSION_MAJOR
+u_int32_t hash_cb (ptr, size)
+const void *ptr;
+size_t size;
+{
+}
+HASHINFO info;
+main()
+{
+ info.hash = hash_cb;
+}
+#endif
+EOCP
+ if $cc $ccflags -c try.c >try.out 2>&1 ; then
+ if $contains warning try.out >>/dev/null 2>&1 ; then
+ db_hashtype='int'
+ else
+ db_hashtype='u_int32_t'
+ fi
+ else
+ : XXX Maybe we should just give up here.
+ db_hashtype=u_int32_t
+ $cat try.out >&4
+ echo "Help: I can't seem to compile the db test program." >&4
+ echo "Something's wrong, but I'll assume you use $db_hashtype." >&4
+ fi
+ $rm -f try.*
+ echo "Your version of Berkeley DB uses $db_hashtype for hash."
+ ;;
+*) db_hashtype=u_int32_t
+ ;;
+esac
+case "$i_db" in
+define)
: Check the return type needed for prefix
echo " "
echo "Checking return type needed for prefix for Berkeley DB ..." >&4
else
db_prefixtype='size_t'
: XXX Maybe we should just give up here.
+ $cat try.out >&4
echo "Help: I can't seem to compile the db test program." >&4
echo "Something's wrong, but I'll assume you use $db_prefixtype." >&4
fi
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
doublesize=`./try`
$echo $doublesize >&4
else
$rm -f try.c try
: see what type file positions are declared as in the library
-set fpos_t fpostype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$fpostype"
rp="What is the type for file position used by fsetpos()?"
-. ./myread
-fpostype="$ans"
+set fpos_t fpostype long stdio.h sys/types.h
+eval $typedef_ask
: get csh whereabouts
case "$csh" in
full_sed=$sed
: see what type gids are declared as in the kernel
+echo " "
+echo "Looking for the type for group ids returned by getgid()."
set gid_t gidtype xxx stdio.h sys/types.h
eval $typedef
case "$gidtype" in
;;
*) dflt="$gidtype";;
esac
-echo " "
-rp="What is the type for group ids returned by getgid()?"
-. ./myread
-gidtype="$ans"
+case "$gidtype" in
+gid_t) echo "gid_t found." ;;
+*) rp="What is the type for group ids returned by getgid()?"
+ . ./myread
+ gidtype="$ans"
+ ;;
+esac
: see if getgroups exists
set getgroups d_getgrps
*) dflt="$groupstype" ;;
esac
$cat <<EOM
-What is the type of the second argument to getgroups() and setgroups()?
+What type of pointer is the second argument to getgroups() and setgroups()?
Usually this is the same as group ids, $gidtype, but not always.
EOM
- rp='What type is the second argument to getgroups() and setgroups()?'
+ rp='What type pointer is the second argument to getgroups() and setgroups()?'
. ./myread
groupstype="$ans"
;;
esac
: see what type lseek is declared as in the kernel
+rp="What is the type used for lseek's offset on this system?"
set off_t lseektype long stdio.h sys/types.h
-eval $typedef
-echo " "
-dflt="$lseektype"
-rp="What type is lseek's offset on this system declared as?"
-. ./myread
-lseektype="$ans"
+eval $typedef_ask
echo " "
echo "Checking if your $make program sets \$(MAKE)..." >&4
esac
: see what type is used for mode_t
+rp="What is the type used for file modes for system calls (e.g. fchmod())?"
set mode_t modetype int stdio.h sys/types.h
-eval $typedef
-dflt="$modetype"
-echo " "
-rp="What type is used for file modes?"
-. ./myread
-modetype="$ans"
+eval $typedef_ask
: Cruising for prototypes
echo " "
chmod +x protochk
$eunicefix protochk
-: see if this is a netdb.h system
-set netdb.h i_netdb
-eval $inhdr
-
: see what type is used for size_t
+rp="What is the type used for the length parameter for string functions?"
set size_t sizetype 'unsigned int' stdio.h sys/types.h
-eval $typedef
-dflt="$sizetype"
-echo " "
-rp="What type is used for the length parameter for string functions?"
-. ./myread
-sizetype="$ans"
+eval $typedef_ask
: check for type of arguments to gethostbyaddr.
if test "X$netdb_host_type" = X -o "X$netdb_hlen_type" = X; then
pager="$ans"
: see what type pids are declared as in the kernel
+rp="What is the type of process ids on this system?"
set pid_t pidtype int stdio.h sys/types.h
-eval $typedef
-dflt="$pidtype"
-echo " "
-rp="What type are process ids on this system declared as?"
-. ./myread
-pidtype="$ans"
+eval $typedef_ask
: check for length of pointer
echo " "
case "$ptrsize" in
'')
- echo "Checking to see how big your pointers are..." >&4
+ $echo $n "Checking to see how big your pointers are...$c" >&4
if test "$voidflags" -gt 7; then
echo '#define VOID_PTR char *' > try.c
else
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
ptrsize=`./try`
+ $echo " $ptrsize bytes." >&4
else
dflt='4'
echo "(I can't seem to compile the test program. Guessing...)" >&4
}
EOCP
set try
- if eval $compile; then
+ if eval $compile_ok; then
dflt=`./try$_exe`
else
dflt='?'
xxx="$xxx TSTP TTIN TTOU URG USR1 USR2 USR3 USR4 VTALRM"
xxx="$xxx WINCH WIND WINDOW XCPU XFSZ"
: generate a few handy files for later
-$cat > signal.c <<'EOP'
+$cat > signal.c <<'EOCP'
#include <sys/types.h>
#include <signal.h>
+#include <stdio.h>
int main() {
/* Strange style to avoid deeply-nested #if/#else/#endif */
printf("NSIG %d\n", NSIG);
-EOP
+#ifndef JUST_NSIG
+
+EOCP
+
echo $xxx | $tr ' ' '\012' | $sort | $uniq | $awk '
{
printf "#ifdef SIG"; printf $1; printf "\n"
printf "#endif\n"
}
END {
+ printf "#endif /* JUST_NSIG */\n";
printf "}\n";
}
' >>signal.c
EOP
$cat >signal_cmd <<EOS
$startsh
-$test -s signal.lst && exit 0
-if $cc $optimize $ccflags $ldflags -o signal signal.c $libs >/dev/null 2>&1; then
+if $test -s signal.lst; then
+ echo "Using your existing signal.lst file"
+ exit 0
+fi
+xxx="$xxx"
+EOS
+$cat >>signal_cmd <<'EOS'
+
+set signal
+if eval $compile_ok; then
./signal$_exe | $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
else
- echo "(I can't seem be able to compile the test program -- Guessing)"
+ echo "(I can't seem be able to compile the whole test program)" >&4
+ echo "(I'll try it in little pieces.)" >&4
+ set signal -DJUST_NSIG
+ if eval $compile_ok; then
+ ./signal$_exe > signal.nsg
+ $cat signal.nsg
+ else
+ echo "I can't seem to figure out how many signals you have." >&4
+ echo "Guessing 50." >&4
+ echo 'NSIG 50' > signal.nsg
+ fi
+ : Now look at all the signal names, one at a time.
+ for xx in `echo $xxx | $tr ' ' '\012' | $sort | $uniq`; do
+ $cat > signal.c <<EOCP
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+int main() {
+printf("$xx %d\n", SIG${xx});
+return 0;
+}
+EOCP
+ set signal
+ if eval $compile; then
+ echo "SIG${xx} found."
+ ./signal$_exe >> signal.ls1
+ else
+ echo "SIG${xx} NOT found."
+ fi
+ done
+ if $test -s signal.ls1; then
+ $cat signal.nsg signal.ls1 |
+ $sort -n +1 | $uniq | $awk -f signal.awk >signal.lst
+ fi
+
+fi
+if $test -s signal.lst; then
+ :
+else
+ echo "(AAK! I can't compile the test programs -- Guessing)" >&4
echo 'kill -l' >signal
- set X \`csh -f <signal\`
+ set X `csh -f <signal`
$rm -f signal
shift
- case \$# in
+ case $# in
0) set HUP INT QUIT ILL TRAP ABRT EMT FPE KILL BUS SEGV SYS PIPE ALRM TERM;;
esac
- echo \$@ | $tr ' ' '\012' | \
- $awk '{ printf \$1; printf " %d\n", ++s; }' >signal.lst
+ echo $@ | $tr ' ' '\012' | \
+ $awk '{ printf $1; printf " %d\n", ++s; }' >signal.lst
fi
-$rm -f signal.c signal signal$_o
+$rm -f signal.c signal$_exe signal$_o signal.nsg signal.ls1
EOS
chmod a+x signal_cmd
$eunicefix signal_cmd
case "$sig_name_init" in
'')
echo "Generating a list of signal names and numbers..." >&4
- ./signal_cmd
+ . ./signal_cmd
sig_name=`$awk '{printf "%s ", $1}' signal.lst`
sig_name="ZERO $sig_name"
sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " }
EOM
echo " "
set ssize
-if eval $compile && ./ssize > /dev/null; then
+if eval $compile_ok && ./ssize > /dev/null; then
ssizetype=`./ssize`
echo "I'll be using $ssizetype for functions returning a byte count." >&4
else
if set time val -f d_time; eval $csym; $val; then
echo 'time() found.' >&4
val="$define"
+ rp="What is the type returned by time() on this system?"
set time_t timetype long stdio.h sys/types.h
- eval $typedef
- dflt="$timetype"
- echo " "
- rp="What type is returned by time() on this system?"
- . ./myread
- timetype="$ans"
+ eval $typedef_ask
else
echo 'time() not found, hope that will do.' >&4
val="$undef"
eval $setvar
: see what type uids are declared as in the kernel
+echo " "
+echo "Looking for the type for user ids returned by getuid()."
set uid_t uidtype xxx stdio.h sys/types.h
eval $typedef
case "$uidtype" in
;;
*) dflt="$uidtype";;
esac
-echo " "
-rp="What is the type for user ids returned by getuid()?"
-. ./myread
-uidtype="$ans"
+case "$uidtype" in
+uid_t) echo "uid_t found." ;;
+*) rp="What is the type for user ids returned by getuid()?"
+ . ./myread
+ uidtype="$ans"
+ ;;
+esac
: see if dbm.h is available
: see if dbmclose exists
echo " "
echo "Looking for extensions..." >&4
-cd ../ext
+tdir=`pwd`
+cd $rsrc/ext
: If we are using the old config.sh, known_extensions may contain
: old or inaccurate or duplicate values.
known_extensions=''
known_extensions="$known_extensions $xxx/$yyy"
fi
done
- cd ..
+ cd ..
fi
fi
;;
set X $known_extensions
shift
known_extensions="$*"
-cd ../UU
+cd $tdir
: Now see which are supported on this system.
avail_ext=''
d_gethbyname='$d_gethbyname'
d_gethent='$d_gethent'
d_gethname='$d_gethname'
+d_gethostprotos='$d_gethostprotos'
d_getlogin='$d_getlogin'
d_getnbyaddr='$d_getnbyaddr'
d_getnbyname='$d_getnbyname'
d_getnent='$d_getnent'
+d_getnetprotos='$d_getnetprotos'
d_getpbyname='$d_getpbyname'
d_getpbynumber='$d_getpbynumber'
d_getpent='$d_getpent'
d_getpgrp='$d_getpgrp'
d_getppid='$d_getppid'
d_getprior='$d_getprior'
+d_getprotoprotos='$d_getprotoprotos'
d_getsbyname='$d_getsbyname'
d_getsbyport='$d_getsbyport'
d_getsent='$d_getsent'
+d_getservprotos='$d_getservprotos'
d_gettimeod='$d_gettimeod'
d_gnulibc='$d_gnulibc'
d_htonl='$d_htonl'
d_locconv='$d_locconv'
d_lockf='$d_lockf'
d_longdbl='$d_longdbl'
+d_longlong='$d_longlong'
d_lstat='$d_lstat'
d_mblen='$d_mblen'
d_mbstowcs='$d_mbstowcs'
freetype='$freetype'
full_csh='$full_csh'
full_sed='$full_sed'
-gcc='$gcc'
gccversion='$gccversion'
gidtype='$gidtype'
glibpth='$glibpth'
locincpth='$locincpth'
loclibpth='$loclibpth'
longdblsize='$longdblsize'
+longlongsize='$longlongsize'
longsize='$longsize'
lp='$lp'
lpr='$lpr'
The basic steps to build and install perl5 on a Unix system are:
- rm -f config.sh
+ rm -f config.sh Policy.sh
sh Configure
make
make test
=head1 Space Requirements
-The complete perl5 source tree takes up about 7 MB of disk space. The
-complete tree after completing make takes roughly 15 MB, though the
+The complete perl5 source tree takes up about 10 MB of disk space. The
+complete tree after completing make takes roughly 20 MB, though the
actual total is likely to be quite system-dependent. The installation
-directories need something on the order of 7 MB, though again that
+directories need something on the order of 10 MB, though again that
value is system-dependent.
=head1 Start with a Fresh Distribution
If you have built perl before, you should clean out the build directory
with the command
+ make distclean
+
+or
+
make realclean
-The results of a Configure run are stored in the config.sh file. If
-you are upgrading from a previous version of perl, or if you change
-systems or compilers or make other significant changes, or if you are
-experiencing difficulties building perl, you should probably not
-re-use your old config.sh. Simply remove it or rename it, e.g.
+The only difference between the two is that make distclean also removes
+your old config.sh and Policy.sh files.
+
+The results of a Configure run are stored in the config.sh and Policy.sh
+files. If you are upgrading from a previous version of perl, or if you
+change systems or compilers or make other significant changes, or if
+you are experiencing difficulties building perl, you should probably
+not re-use your old config.sh. Simply remove it or rename it, e.g.
mv config.sh config.sh.old
In short, if you wish to use your old config.sh, I recommend running
Configure interactively rather than blindly accepting the defaults.
+If your reason to reuse your old config.sh is to save your
+particular installation choices, then you can probably achieve the
+same effect by using the new Policy.sh file. See the section on
+L<"Site-wide Policy settings"> below.
+
=head1 Run Configure
Configure will figure out various things about your system. Some
=head2 GNU-style configure
If you prefer the GNU-style configure command line interface, you can
-use the supplied configure command, e.g.
+use the supplied configure.gnu command, e.g.
CC=gcc ./configure.gnu
-The configure script emulates a few of the more common configure
+The configure.gnu script emulates a few of the more common configure
options. Try
./configure.gnu --help
Cross compiling is not supported.
-(The file is called configugre.gnu to avoid problems on systems
+(The file is called configure.gnu to avoid problems on systems
that would not distinguish the files "Configure" and "configure".)
=head2 Extensions
DB or newer releases of version 2. Configure will automatically detect
this for you and refuse to try to build DB_File with version 2.
+If you re-use your old config.sh but change your system (e.g. by
+adding libgdbm) Configure will still offer your old choices of extensions
+for the default answer, but it will also point out the discrepancy to
+you.
+
Finally, if you have dynamic loading (most modern Unix systems do)
remember that these extensions do not increase the size of your perl
executable, nor do they impact start-up time, so you probably might as
cd /usr/local # Or wherever you specified as $prefix
tar xvf perl5-archive.tar
-=head2 Site-wide "Policy" settings
+=head2 Site-wide Policy settings
After Configure runs, it stores a number of common site-wide "policy"
answers (such as installation directories and the local perl contact
to the new system and Configure will use it along with the appropriate
hint file for your system.
+Alternatively, if you wish to change some or all of those policy
+answers, you should
+
+ rm -f Policy.sh
+
+to ensure that Configure doesn't re-use them.
+
+Further information is in the Policy_sh.SH file itself.
+
=head2 Configure-time Options
There are several different ways to Configure and build perl for your
=item malloc duplicates
-If you get duplicates upon linking for malloc et al, add -DHIDEMYMALLOC
-or -DEMBEDMYMALLOC to your ccflags variable in config.sh.
+If you get duplicates upon linking for malloc et al, add -DEMBEDMYMALLOC
+to your ccflags variable in config.sh.
=item varargs
all of your add-on extensions. You can also safely leave the old version
around in case the new version causes you problems for some reason.
For example, if you want to be sure that your script continues to run
-with 5.004_04, simplly replace the '#!/usr/local/bin/perl' line at the
+with 5.004_04, simply replace the '#!/usr/local/bin/perl' line at the
top of the script with the particular version you want to run, e.g.
#!/usr/local/bin/perl5.00404.
If you wish to continue using those extensions under 5.004_04, for
example, then you need to move those extensions from their current
-direcotries, which are something like
+directories, which are something like
/usr/local/lib/perl5/site_perl/
/usr/local/lib/perl5/site_perl/archname
=head1 LAST MODIFIED
-$Id: INSTALL,v 1.31 1998/03/03 18:08:52 doughera Released $
+$Id: INSTALL,v 1.32 1998/03/20 19:20:08 doughera Released $
#
# The idea here is to distill in one place the common site-wide
# "policy" answers (such as installation directories) that are
-# to be "sticky". That is, if you keep the file Policy.sh around in
+# to be "sticky". If you keep the file Policy.sh around in
# the same directory as you are building Perl, then Configure will
# (by default) load up the Policy.sh file just before the
# platform-specific hints file.
-#
+#
#Credits:
# The original design for this Policy.sh file came from Wayne Davison,
# maintainer of trn.
-# This version for Perl5.004_61 originally written by
+# This version for Perl5.004_61 originally written by
# Andy Dougherty <doughera@lafcol.lafayette.edu>.
# This file may be distributed under the same terms as Perl itself.
+# Allow Configure command-line overrides; usually these won't be
+# needed, but something like -Dprefix=/test/location can be quite
+# useful for testing out new versions.
-# Site-specific values
+#Site-specific values:
-perladmin='$perladmin'
+case "\$perladmin" in
+'') perladmin='$perladmin' ;;
+esac
+
+# Installation prefix. Allow a Configure -D override. You
+# may wish to reinstall perl under a different prefix, perhaps
+# in order to test a different configuration.
+case "\$prefix" in
+'') prefix='$prefix' ;;
+esac
# Installation directives. Note that each one comes in three flavors.
# For example, we have privlib, privlibexp, and installprivlib.
# privlib is for private (to perl) library files.
# privlibexp is the same, expcept any '~' the user gave to Configure
# is expanded to the user's home directory. This is figured
-# out automatically by Configure, so you don't have to include it here.
+# out automatically by Configure, so you don't have to include it here.
# installprivlib is for systems (such as those running AFS) that
# need to distinguish between the place where things
# get installed and where they finally will reside.
-
-# Installation Prefix.
-prefix='$prefix'
-
-bin='$bin'
-installbin='$installbin'
-
-scriptdir='$scriptdir'
-installscript='$installscript'
-
-privlib='$privlib'
-installprivlib='$installprivlib'
-
-sitelib='$sitelib'
-installsitelib='$installsitelib'
-
-# man1 and man3 manpage directories and extensions.
-man1dir='$man1dir'
-man1ext='$man1ext'
-installman1dir='$installman1dir'
-man3dir='$man3dir'
-man3ext='$man3ext'
-installman3dir='$installman3dir'
-
-# NOTE: Be careful about architecture-dependent names. If you have
-# accepted the default, the following definitions will be commented out.
-# That way you can carry this file to another architecture and this file
-# won't mistakenly set architecture-dependent names to the wrong value.
+#
+# In each case, if your previous value was the default, leave it commented
+# out. That way, if you override prefix, all of these will be
+# automatically adjusted.
#
-# If you have not accepted the default, then be sure to check the
-# following lines before copying this file to another system.
+# NOTE: Be especially careful about architecture-dependent and
+# version-dependent names, particularly if you reuse this file for
+# different versions of perl.
!GROK!THIS!
if test 0 -eq "$subversion"; then
version=`LC_ALL=C; export LC_ALL; \
- echo $baserev $patchlevel |
+ echo $baserev $patchlevel |
$awk '{ printf "%.3f\n", $1 + $2/1000.0 }'`
else
version=`LC_ALL=C; export LC_ALL; \
$awk '{ printf "%.5f\n", $1 + $2/1000.0 + $3/100000.0 }'`
fi
-dflt="$privlib/$archname/$version"
-if test X"$archlib" = X"$dflt"; then
- echo "# archlib='$archlib'"
- echo "# installarchlib='$installarchlib'"
-else
- echo '# NOTE: Preserving your custom archlib.'
- echo "archlib='$archlib'"
- echo "installarchlib='$installarchlib'"
-fi >> Policy.sh
-echo >> Policy.sh
-
-# Now consider sitearch.
-dflt="$sitelib/$archname"
-if test X"$sitearch" = X"$dflt"; then
- echo "# sitearch='$sitearch'"
- echo "# installsitearch='$installsitearch'"
-else
- echo '# NOTE: Preserving your custom sitearch.'
- echo "sitearch='$sitearch'"
- echo "installsitearch='$installsitearch'"
-fi >> Policy.sh
+for var in bin scriptdir privlib archlib \
+ man1dir man3dir sitelib sitearch \
+ installbin installscript installprivlib installarchlib \
+ installman1dir installman3dir installsitelib installsitearch \
+ man1ext man3ext; do
+
+ case "$var" in
+ bin) dflt=$prefix/bin ;;
+ # The scriptdir test is more complex, but this is probably usually ok.
+ scriptdir) dflt=$prefix/script ;;
+ privlib)
+ case "$prefix" in
+ *perl*) dflt=$prefix/lib ;;
+ *) dflt=$prefix/lib/$package ;;
+ esac
+ ;;
+ archlib) dflt="$privlib/$archname/$version" ;;
+ sitelib) dflt="$privlib/site_perl" ;;
+ sitearch) dflt="$sitelib/$archname" ;;
+ man1dir) dflt="$prefix/man/man1" ;;
+ man3dir)
+ case "$prefix" in
+ *perl*) dflt=`echo $man1dir |
+ sed -e 's/man1/man3/g' -e 's/man\.1/man\.3/g'` ;;
+ *) dflt=$privlib/man3 ;;
+ esac
+ ;;
+
+ # Can we assume all sed's have greedy matching?
+ man1ext) dflt=`echo $man1dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+ man3ext) dflt=`echo $man3dir | sed -e 's!.*man!!' -e 's!^\.!!'` ;;
+
+ # It might be possible to fool these next tests. Please let
+ # me know if they don't work right for you.
+ installbin) dflt=`echo $binexp | sed 's#^/afs/#/afs/.#'`;;
+ installscript) dflt=`echo $scriptdirexp | sed 's#^/afs/#/afs/.#'`;;
+ installprivlib) dflt=`echo $privlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installarchlib) dflt=`echo $archlibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitelib) dflt=`echo $sitelibexp | sed 's#^/afs/#/afs/.#'`;;
+ installsitearch) dflt=`echo $sitearchexp | sed 's#^/afs/#/afs/.#'`;;
+ installman1dir) dflt=`echo $man1direxp | sed 's#^/afs/#/afs/.#'`;;
+ installman3dir) dflt=`echo $man3direxp | sed 's#^/afs/#/afs/.#'`;;
+ esac
+
+ eval val="\$$var"
+ if test X"$val" = X"$dflt"; then
+ echo "# $var='$dflt'"
+ else
+ echo "# Preserving custom $var"
+ eval val=$var
+ echo "$var='$val'"
+ fi
+
+done >> Policy.sh
$spitshell <<!GROK!THIS! >>Policy.sh
-# Lastly, you may add additional items here. For example, to set the
+# Lastly, you may add additional items here. For example, to set the
# pager to your local favorite value, uncomment the following line in
# the original Policy_sh.SH file and re-run sh Policy_sh.SH.
-# pager='$pager'
+#
+# pager='$pager'
#
# A full Glossary of all the config.sh variables is in the file
# Porting/Glossary.
of architecture-dependent library files for $package. If
$archlib is the same as $privlib, then this is set to undef.
+d_attribut (d_attribut.U):
+ This variable conditionally defines HASATTRIBUTE, which
+ indicates the C compiler can check for function attributes,
+ such as printf formats.
+
d_bcmp (d_bcmp.U):
This variable conditionally defines the HAS_BCMP symbol if
the bcmp() routine is available to compare strings.
This variable conditionally defines USE_BSD_GETPGRP if
getpgrp needs one arguments whereas USG one needs none.
+d_bsdsetpgrp (d_setpgrp.U):
+ This variable conditionally defines USE_BSD_SETPGRP if
+ setpgrp needs two arguments whereas USG one needs none.
+ See also d_setpgid for a POSIX interface.
+
d_bzero (d_bzero.U):
This variable conditionally defines the HAS_BZERO symbol if
the bzero() routine is available to set memory to 0.
indicates to the C program that the gethostbyaddr() routine is available
to look up hosts by their IP addresses.
+d_gethbyname (d_gethbynm.U):
+ This variable conditionally defines the HAS_GETHOSTBYNAME symbol, which
+ indicates to the C program that the gethostbyname() routine is available
+ to look up host names in some data base or other.
+
d_gethent (d_gethent.U):
This variable conditionally defines HAS_GETHOSTENT if gethostent() is
available to look up host names in some data base or another.
indicates to the C program that the gethostname() routine may be
used to derive the host name.
+d_gethostprotos (d_gethostprotos.U):
+ This variable conditionally defines the HAS_GETHOST_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various gethost*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_getlogin (d_getlogin.U):
This variable conditionally defines the HAS_GETLOGIN symbol, which
indicates to the C program that the getlogin() routine is available
This variable conditionally defines HAS_GETNETENT if getnetent() is
available to look up network names in some data base or another.
+d_getnetprotos (d_getnetprotos.U):
+ This variable conditionally defines the HAS_GETNET_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getnet*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_getpbyname (d_getprotby.U):
This variable conditionally defines the HAS_GETPROTOBYNAME
symbol, which indicates to the C program that the
This variable conditionally defines HAS_GETPRIORITY if getpriority()
is available to get a process's priority.
+d_getprotoprotos (d_getprotoprotos.U):
+ This variable conditionally defines the HAS_GETPROTO_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getproto*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_getsbyname (d_getsrvby.U):
This variable conditionally defines the HAS_GETSERVBYNAME
symbol, which indicates to the C program that the
This variable conditionally defines HAS_GETSERVENT if getservent() is
available to look up network services in some data base or another.
+d_getservprotos (d_getservprotos.U):
+ This variable conditionally defines the HAS_GETSERV_PROTOS symbol,
+ which indicates to the C program that <netdb.h> supplies
+ prototypes for the various getserv*() functions.
+ See also netdbtype.U for probing for various netdb types.
+
d_gettimeod (d_ftime.U):
This variable conditionally defines the HAS_GETTIMEOFDAY symbol, which
indicates that the gettimeofday() system call exists (to obtain a
This variable conditionally defines HAS_LONG_DOUBLE if
the long double type is supported.
+d_longlong (d_longlong.U):
+ This variable conditionally defines HAS_LONG_LONG if
+ the long long type is supported.
+
d_lstat (d_lstat.U):
This variable conditionally defines HAS_LSTAT if lstat() is
available to do file stats on symbolic links.
This variable conditionally defines the I_DB symbol, and indicates
whether a C program may include Berkeley's DB include file <db.h>.
+i_dbm (i_dbm.U):
+ This variable conditionally defines the I_DBM symbol, which
+ indicates to the C program that <dbm.h> exists and should
+ be included.
+
i_dirent (i_dirent.U):
This variable conditionally defines I_DIRENT, which indicates
to the C program that it should include <dirent.h>.
whether a C program may include <float.h> to get symbols like DBL_MAX
or DBL_MIN, i.e. machine dependent floating point values.
+i_gdbm (i_gdbm.U):
+ This variable conditionally defines the I_GDBM symbol, which
+ indicates to the C program that <gdbm.h> exists and should
+ be included.
+
i_grp (i_grp.U):
This variable conditionally defines the I_GRP symbol, and indicates
whether a C program should include <grp.h>.
This variable conditionally defines the I_MEMORY symbol, and indicates
whether a C program should include <memory.h>.
+i_ndbm (i_ndbm.U):
+ This variable conditionally defines the I_NDBM symbol, which
+ indicates to the C program that <ndbm.h> exists and should
+ be included.
+
i_netdb (i_netdb.U):
This variable conditionally defines the I_NETDB symbol, and indicates
whether a C program should include <netdb.h>.
indicates to the C program how many bytes there are in a long double,
if this system supports long doubles.
+longlongsize (d_longlong.U):
+ This variable contains the value of the LONGLONGSIZE symbol, which
+ indicates to the C program how many bytes there are in a long long,
+ if this system supports long long.
+
longsize (intsize.U):
This variable contains the value of the LONGSIZE symbol, which
indicates to the C program how many bytes there are in a long.
The domain must be appended to myhostname to form a complete host name.
The dot comes with mydomain, and need not be supplied by the program.
+myhostname (myhostname.U):
+ This variable contains the eventual value of the MYHOSTNAME symbol,
+ which is the name of the host the program is going to run on.
+ The domain is not kept with hostname, but must be gotten from mydomain.
+ The dot comes with mydomain, and need not be supplied by the program.
+
myuname (Oldconfig.U):
The output of 'uname -a' if available, otherwise the hostname. On Xenix,
pseudo variables assignments in the output are stripped, thank you. The
machines that support separation of instruction and data space. It is
up to the Makefile to use this.
+src (src.U):
+ This variable holds the path to the package source. It is up to
+ the Makefile to use this variable and set VPATH accordingly to
+ find the sources remotely.
+
ssizetype (ssizetype.U):
This variable defines ssizetype to be something like ssize_t,
long or int. It is used by functions that return a count
# Package name : perl5
# Source directory : .
-# Configuration time: Mon Mar 9 14:20:14 EST 1998
+# Configuration time: Tue Mar 31 15:51:58 EST 1998
# Configured by : doughera
# Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
alignbytes='4'
aphostname=''
ar='ar'
-archlib='/opt/perl/lib/i686-linux-thread/5.00462'
-archlibexp='/opt/perl/lib/i686-linux-thread/5.00462'
+archlib='/opt/perl/lib/i686-linux-thread/5.00463'
+archlibexp='/opt/perl/lib/i686-linux-thread/5.00463'
archname='i686-linux-thread'
archobjs=''
awk='awk'
ccflags='-D_REENTRANT -Dbool=char -DHAS_BOOL -I/usr/local/include'
cf_by='doughera'
cf_email='yourname@yourhost.yourplace.com'
-cf_time='Mon Mar 9 14:20:14 EST 1998'
+cf_time='Tue Mar 31 15:51:58 EST 1998'
chgrp=''
chmod=''
chown=''
d_gethbyname='define'
d_gethent='define'
d_gethname='undef'
+d_gethostprotos='define'
d_getlogin='define'
d_getnbyaddr='define'
d_getnbyname='define'
d_getnent='define'
+d_getnetprotos='define'
d_getpbyname='define'
d_getpbynumber='define'
d_getpent='define'
d_getpgrp='define'
d_getppid='define'
d_getprior='define'
+d_getprotoprotos='define'
d_getsbyname='define'
d_getsbyport='define'
d_getsent='define'
+d_getservprotos='define'
d_gettimeod='define'
d_gnulibc='define'
d_htonl='define'
d_locconv='define'
d_lockf='define'
d_longdbl='define'
+d_longlong='define'
d_lstat='define'
d_mblen='define'
d_mbstowcs='define'
freetype='void'
full_csh='/bin/csh'
full_sed='/bin/sed'
-gcc=''
gccversion='2.7.2.3'
gidtype='gid_t'
glibpth='/usr/shlib /shlib /lib/pa1.1 /usr/lib/large /lib /usr/lib /usr/lib/386 /lib/386 /lib/large /usr/lib/small /lib/small /usr/ccs/lib /usr/ucblib /usr/local/lib '
i_vfork='undef'
incpath=''
inews=''
-installarchlib='/opt/perl/lib/i686-linux-thread/5.00462'
+installarchlib='/opt/perl/lib/i686-linux-thread/5.00463'
installbin='/opt/perl/bin'
installman1dir='/opt/perl/man/man1'
installman3dir='/opt/perl/man/man3'
locincpth='/usr/local/include /opt/local/include /usr/gnu/include /opt/gnu/include /usr/GNU/include /opt/GNU/include'
loclibpth='/usr/local/lib /opt/local/lib /usr/gnu/lib /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib'
longdblsize='12'
+longlongsize='8'
longsize='4'
lp=''
lpr=''
stdio_ptr='((fp)->_IO_read_ptr)'
strings='/usr/include/string.h'
submit=''
-subversion='62'
+subversion='63'
sysman='/usr/man/man1'
tail=''
tar=''
zcat=''
zip='zip'
PATCHLEVEL=4
-SUBVERSION=62
+SUBVERSION=63
CONFIG=true
/*
* Package name : perl5
* Source directory : .
- * Configuration time: Mon Mar 9 14:20:14 EST 1998
+ * Configuration time: Tue Mar 31 15:51:58 EST 1998
* Configured by : doughera
* Target system : linux fractal 2.0.33 #1 tue feb 3 10:11:46 est 1998 i686 unknown
*/
#define Shmat_t void * /**/
#define HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-#define HAS_SOCKET /**/
-#define HAS_SOCKETPAIR /**/
-
/* USE_STAT_BLOCKS:
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
*/
#define HAS_TCSETPGRP /**/
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define Time_t time_t /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#define HAS_TIMES /**/
-
/* HAS_TRUNCATE:
* This symbol, if defined, indicates that the truncate routine is
* available to truncate files.
*/
#define HAS_WCTOMB /**/
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t fpos_t /* File position type */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * uid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t gid_t /* Type for getgid(), etc... */
-
/* I_DBM:
* This symbol, if defined, indicates that <dbm.h> exists and should
* be included.
*/
#define I_SYS_TIMES /**/
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#define I_SYS_TYPES /**/
-
/* I_SYS_UN:
* This symbol, if defined, indicates to the C program that it should
* include <sys/un.h> to get UNIX domain socket definitions.
*/
/*#define I_VFORK / **/
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Off_t off_t /* <offset> type */
-
/* Free_t:
* This variable contains the return type of free(). It is usually
* void, but occasionally int.
*/
/*#define MYMALLOC / **/
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t mode_t /* file mode parameter for system calls */
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t pid_t /* PID type */
-
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* function prototypes.
*/
#define SH_PATH "/bin/sh" /**/
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t size_t /* length paramater for string functions */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
*/
#define STDCHAR char /**/
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t uid_t /* UID type */
-
/* VOIDFLAGS:
* This symbol indicates how much support of the void type is given by this
* compiler. What various bits mean:
* This symbol contains the ~name expanded version of ARCHLIB, to be used
* in programs that are not prepared to deal with ~ expansion at run-time.
*/
-#define ARCHLIB "/opt/perl/lib/i686-linux-thread/5.00462" /**/
-#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00462" /**/
+#define ARCHLIB "/opt/perl/lib/i686-linux-thread/5.00463" /**/
+#define ARCHLIB_EXP "/opt/perl/lib/i686-linux-thread/5.00463" /**/
/* CAT2:
* This macro catenates 2 tokens together.
#define LONG_DOUBLESIZE 12 /**/
#endif
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#define HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE 8 /**/
+#endif
+
/* HAS_MKSTEMP:
* This symbol, if defined, indicates that the mkstemp routine is
* available to create and open a unique temporary file.
*/
#define HAS_SETVBUF /**/
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#define HAS_SOCKET /**/
+#define HAS_SOCKETPAIR /**/
+
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
*/
#define I_NETDB /**/
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#define I_SYS_TYPES /**/
+
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
#define PRIVLIB "/opt/perl/lib" /**/
#define PRIVLIB_EXP "/opt/perl/lib" /**/
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_num list.
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name list.
- */
-#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0 /**/
-#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0 /**/
-
/* SITEARCH:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
*/
/*#define USE_PERLIO / **/
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#define HAS_GETSERV_PROTOS /**/
+
/* Netdb_host_t:
* This symbol holds the type used for the 1st argument
* to gethostbyaddr().
*/
#define Select_fd_set_t fd_set * /**/
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME "ZERO", "HUP", "INT", "QUIT", "ILL", "TRAP", "ABRT", "BUS", "FPE", "KILL", "USR1", "SEGV", "USR2", "PIPE", "ALRM", "TERM", "STKFLT", "CHLD", "CONT", "STOP", "TSTP", "TTIN", "TTOU", "URG", "XCPU", "XFSZ", "VTALRM", "PROF", "WINCH", "IO", "PWR", "UNUSED", "IOT", "CLD", "POLL", 0 /**/
+#define SIG_NUM 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 6, 17, 29, 0 /**/
+
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* It may be used to construct an architecture-dependant pathname
#define USE_THREADS /**/
/*#define OLD_PTHREADS_API / **/
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t time_t /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#define HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t fpos_t /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t gid_t /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t off_t /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t mode_t /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t pid_t /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t size_t /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t uid_t /* UID type */
+
#endif
#define Shmat_t $shmattype /**/
#$d_shmatprototype HAS_SHMAT_PROTOTYPE /**/
-/* HAS_SOCKET:
- * This symbol, if defined, indicates that the BSD socket interface is
- * supported.
- */
-/* HAS_SOCKETPAIR:
- * This symbol, if defined, indicates that the BSD socketpair() call is
- * supported.
- */
-#$d_socket HAS_SOCKET /**/
-#$d_sockpair HAS_SOCKETPAIR /**/
-
/* USE_STAT_BLOCKS:
* This symbol is defined if this system has a stat structure declaring
* st_blksize and st_blocks.
*/
#$d_tcsetpgrp HAS_TCSETPGRP /**/
-/* Time_t:
- * This symbol holds the type returned by time(). It can be long,
- * or time_t on BSD sites (in which case <sys/types.h> should be
- * included).
- */
-#define Time_t $timetype /* Time type */
-
-/* HAS_TIMES:
- * This symbol, if defined, indicates that the times() routine exists.
- * Note that this became obsolete on some systems (SUNOS), which now
- * use getrusage(). It may be necessary to include <sys/times.h>.
- */
-#$d_times HAS_TIMES /**/
-
/* HAS_TRUNCATE:
* This symbol, if defined, indicates that the truncate routine is
* available to truncate files.
*/
#$d_wctomb HAS_WCTOMB /**/
-/* Fpos_t:
- * This symbol holds the type used to declare file positions in libc.
- * It can be fpos_t, long, uint, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Fpos_t $fpostype /* File position type */
-
-/* Gid_t:
- * This symbol holds the return type of getgid() and the type of
- * argument to setrgid() and related functions. Typically,
- * it is the type of group ids in the kernel. It can be int, ushort,
- * uid_t, etc... It may be necessary to include <sys/types.h> to get
- * any typedef'ed information.
- */
-#define Gid_t $gidtype /* Type for getgid(), etc... */
-
/* I_DBM:
* This symbol, if defined, indicates that <dbm.h> exists and should
* be included.
*/
#$i_systimes I_SYS_TIMES /**/
-/* I_SYS_TYPES:
- * This symbol, if defined, indicates to the C program that it should
- * include <sys/types.h>.
- */
-#$i_systypes I_SYS_TYPES /**/
-
/* I_SYS_UN:
* This symbol, if defined, indicates to the C program that it should
* include <sys/un.h> to get UNIX domain socket definitions.
*/
#$i_vfork I_VFORK /**/
-/* Off_t:
- * This symbol holds the type used to declare offsets in the kernel.
- * It can be int, long, off_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Off_t $lseektype /* <offset> type */
-
/* Free_t:
* This variable contains the return type of free(). It is usually
* void, but occasionally int.
*/
#$d_mymalloc MYMALLOC /**/
-/* Mode_t:
- * This symbol holds the type used to declare file modes
- * for systems calls. It is usually mode_t, but may be
- * int or unsigned short. It may be necessary to include <sys/types.h>
- * to get any typedef'ed information.
- */
-#define Mode_t $modetype /* file mode parameter for system calls */
-
-/* Pid_t:
- * This symbol holds the type used to declare process ids in the kernel.
- * It can be int, uint, pid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Pid_t $pidtype /* PID type */
-
/* CAN_PROTOTYPE:
* If defined, this macro indicates that the C compiler can handle
* function prototypes.
*/
#define SH_PATH "$sh" /**/
-/* Size_t:
- * This symbol holds the type used to declare length parameters
- * for string functions. It is usually size_t, but may be
- * unsigned long, int, etc. It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Size_t $sizetype /* length paramater for string functions */
-
/* STDCHAR:
* This symbol is defined to be the type of char used in stdio.h.
* It has the values "unsigned char" or "char".
*/
#define STDCHAR $stdchar /**/
-/* Uid_t:
- * This symbol holds the type used to declare user ids in the kernel.
- * It can be int, ushort, uid_t, etc... It may be necessary to include
- * <sys/types.h> to get any typedef'ed information.
- */
-#define Uid_t $uidtype /* UID type */
-
/* VOIDFLAGS:
* This symbol indicates how much support of the void type is given by this
* compiler. What various bits mean:
#define LONG_DOUBLESIZE $longdblsize /**/
#endif
+/* HAS_LONG_LONG:
+ * This symbol will be defined if the C compiler supports
+ * long long.
+ */
+/* LONGLONGSIZE:
+ * This symbol contains the size of a long long, so that the
+ * C preprocessor can make decisions based on it. It is only
+ * defined if the system supports long long.
+ */
+#$d_longlong HAS_LONG_LONG /**/
+#ifdef HAS_LONG_LONG
+#define LONGLONGSIZE $longlongsize /**/
+#endif
+
/* HAS_MKSTEMP:
* This symbol, if defined, indicates that the mkstemp routine is
* available to create and open a unique temporary file.
*/
#$d_setvbuf HAS_SETVBUF /**/
+/* HAS_SOCKET:
+ * This symbol, if defined, indicates that the BSD socket interface is
+ * supported.
+ */
+/* HAS_SOCKETPAIR:
+ * This symbol, if defined, indicates that the BSD socketpair() call is
+ * supported.
+ */
+#$d_socket HAS_SOCKET /**/
+#$d_sockpair HAS_SOCKETPAIR /**/
+
/* Signal_t:
* This symbol's value is either "void" or "int", corresponding to the
* appropriate return type of a signal handler. Thus, you can declare
*/
#$i_netdb I_NETDB /**/
+/* I_SYS_TYPES:
+ * This symbol, if defined, indicates to the C program that it should
+ * include <sys/types.h>.
+ */
+#$i_systypes I_SYS_TYPES /**/
+
/* PRIVLIB:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
#define PRIVLIB "$privlib" /**/
#define PRIVLIB_EXP "$privlibexp" /**/
-/* SIG_NAME:
- * This symbol contains a list of signal names in order of
- * signal number. This is intended
- * to be used as a static array initialization, like this:
- * char *sig_name[] = { SIG_NAME };
- * The signals in the list are separated with commas, and each signal
- * is surrounded by double quotes. There is no leading SIG in the signal
- * name, i.e. SIGQUIT is known as "QUIT".
- * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
- * etc., where nn is the actual signal number (e.g. NUM37).
- * The signal number for sig_name[i] is stored in sig_num[i].
- * The last element is 0 to terminate the list with a NULL. This
- * corresponds to the 0 at the end of the sig_num list.
- */
-/* SIG_NUM:
- * This symbol contains a list of signal numbers, in the same order as the
- * SIG_NAME list. It is suitable for static array initialization, as in:
- * int sig_num[] = { SIG_NUM };
- * The signals in the list are separated with commas, and the indices
- * within that list and the SIG_NAME list match, so it's easy to compute
- * the signal name from a number or vice versa at the price of a small
- * dynamic linear lookup.
- * Duplicates are allowed, but are moved to the end of the list.
- * The signal number corresponding to sig_name[i] is sig_number[i].
- * if (i < NSIG) then sig_number[i] == i.
- * The last element is 0, corresponding to the 0 at the end of
- * the sig_name list.
- */
-#define SIG_NAME $sig_name_init /**/
-#define SIG_NUM $sig_num /**/
-
/* SITEARCH:
* This symbol contains the name of the private library for this package.
* The library is private in the sense that it needn't be in anyone's
*/
#$useperlio USE_PERLIO /**/
+/* HAS_GETHOST_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for gethostent(), gethostbyname(), and
+ * gethostbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_gethostprotos HAS_GETHOST_PROTOS /**/
+
+/* HAS_GETNET_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getnetent(), getnetbyname(), and
+ * getnetbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getnetprotos HAS_GETNET_PROTOS /**/
+
+/* HAS_GETPROTO_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getprotoent(), getprotobyname(), and
+ * getprotobyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getprotoprotos HAS_GETPROTO_PROTOS /**/
+
+/* HAS_GETSERV_PROTOS:
+ * This symbol, if defined, indicates that <netdb.h> includes
+ * prototypes for getservent(), getservbyname(), and
+ * getservbyaddr(). Otherwise, it is up to the program to guess
+ * them. See netdbtype.U for probing for various Netdb_xxx_t types.
+ */
+#$d_getservprotos HAS_GETSERV_PROTOS /**/
+
/* Netdb_host_t:
* This symbol holds the type used for the 1st argument
* to gethostbyaddr().
*/
#define Select_fd_set_t $selecttype /**/
+/* SIG_NAME:
+ * This symbol contains a list of signal names in order of
+ * signal number. This is intended
+ * to be used as a static array initialization, like this:
+ * char *sig_name[] = { SIG_NAME };
+ * The signals in the list are separated with commas, and each signal
+ * is surrounded by double quotes. There is no leading SIG in the signal
+ * name, i.e. SIGQUIT is known as "QUIT".
+ * Gaps in the signal numbers (up to NSIG) are filled in with NUMnn,
+ * etc., where nn is the actual signal number (e.g. NUM37).
+ * The signal number for sig_name[i] is stored in sig_num[i].
+ * The last element is 0 to terminate the list with a NULL. This
+ * corresponds to the 0 at the end of the sig_num list.
+ */
+/* SIG_NUM:
+ * This symbol contains a list of signal numbers, in the same order as the
+ * SIG_NAME list. It is suitable for static array initialization, as in:
+ * int sig_num[] = { SIG_NUM };
+ * The signals in the list are separated with commas, and the indices
+ * within that list and the SIG_NAME list match, so it's easy to compute
+ * the signal name from a number or vice versa at the price of a small
+ * dynamic linear lookup.
+ * Duplicates are allowed, but are moved to the end of the list.
+ * The signal number corresponding to sig_name[i] is sig_number[i].
+ * if (i < NSIG) then sig_number[i] == i.
+ * The last element is 0, corresponding to the 0 at the end of
+ * the sig_name list.
+ */
+#define SIG_NAME $sig_name_init /**/
+#define SIG_NUM $sig_num /**/
+
/* ARCHNAME:
* This symbol holds a string representing the architecture name.
* It may be used to construct an architecture-dependant pathname
#$usethreads USE_THREADS /**/
#$d_oldpthreads OLD_PTHREADS_API /**/
+/* Time_t:
+ * This symbol holds the type returned by time(). It can be long,
+ * or time_t on BSD sites (in which case <sys/types.h> should be
+ * included).
+ */
+#define Time_t $timetype /* Time type */
+
+/* HAS_TIMES:
+ * This symbol, if defined, indicates that the times() routine exists.
+ * Note that this became obsolete on some systems (SUNOS), which now
+ * use getrusage(). It may be necessary to include <sys/times.h>.
+ */
+#$d_times HAS_TIMES /**/
+
+/* Fpos_t:
+ * This symbol holds the type used to declare file positions in libc.
+ * It can be fpos_t, long, uint, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Fpos_t $fpostype /* File position type */
+
+/* Gid_t:
+ * This symbol holds the return type of getgid() and the type of
+ * argument to setrgid() and related functions. Typically,
+ * it is the type of group ids in the kernel. It can be int, ushort,
+ * uid_t, etc... It may be necessary to include <sys/types.h> to get
+ * any typedef'ed information.
+ */
+#define Gid_t $gidtype /* Type for getgid(), etc... */
+
+/* Off_t:
+ * This symbol holds the type used to declare offsets in the kernel.
+ * It can be int, long, off_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Off_t $lseektype /* <offset> type */
+
+/* Mode_t:
+ * This symbol holds the type used to declare file modes
+ * for systems calls. It is usually mode_t, but may be
+ * int or unsigned short. It may be necessary to include <sys/types.h>
+ * to get any typedef'ed information.
+ */
+#define Mode_t $modetype /* file mode parameter for system calls */
+
+/* Pid_t:
+ * This symbol holds the type used to declare process ids in the kernel.
+ * It can be int, uint, pid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Pid_t $pidtype /* PID type */
+
+/* Size_t:
+ * This symbol holds the type used to declare length parameters
+ * for string functions. It is usually size_t, but may be
+ * unsigned long, int, etc. It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Size_t $sizetype /* length paramater for string functions */
+
+/* Uid_t:
+ * This symbol holds the type used to declare user ids in the kernel.
+ * It can be int, ushort, uid_t, etc... It may be necessary to include
+ * <sys/types.h> to get any typedef'ed information.
+ */
+#define Uid_t $uidtype /* UID type */
+
#endif
!GROK!THIS!
#endif
-#ifndef HAS_LONG_DOUBLE /* XXX What to do about long doubles? */
+#ifdef HAS_LONG_DOUBLE
+# if LONG_DOUBLESIZE > DOUBLESIZE
+# undef HAS_LONG_DOUBLE /* XXX until we figure out how to use them */
+# endif
+#endif
+
+#ifndef HAS_LONG_DOUBLE
#ifdef LDBL_MAX
#undef LDBL_MAX
#endif
expecting an int), but the disadvantage that an I32 is not 32 bits.
Andy Dougherty August 1996
- In the future, we may perhaps want to think about something like
- #if INTSIZE == 4
- typedef I32 int;
- #else
- # if LONGSIZE == 4
- typedef I32 long;
- # else
- # if SHORTSIZE == 4
- typedef I32 short;
- # else
- typedef I32 int;
- # endif
- # endif
- #endif
-
- except that still won't work if a system has no integral type
- with a size that is 32 bytes.
-
- Further, we need to know about PTRSIZE == sizeof(void *) and
- DOUBLESIZE == sizeof(double) if we really want to try to handle
- 32/64-bit combinations. Finally, we might also need to know
- HAS_LONG_DOUBLE and LONG_DOUBLESIZE.
-
- For the moment, these are only mentioned here so metaconfig will
- construct Configure to figure out the various sizes.
+ There is no guarantee that there is *any* integral type with
+ exactly 32 bits. It is perfectly legal for a system to have
+ sizeof(short) == sizeof(int) == sizeof(long) == 8.
+
+ Similarly, there is no guarantee that I16 and U16 have exactly 16
+ bits.
+
+ For dealing with issues that may arise from various 32/64-bit
+ systems, we will ask Configure to check out
+ SHORTSIZE == sizeof(short)
+ INTSIZE == sizeof(int)
+ LONGSIZE == sizeof(long)
+ LONGLONGSIZE == sizeof(long long) (if HAS_LONG_LONG)
+ PTRSIZE == sizeof(void *)
+ DOUBLESIZE == sizeof(double)
+ LONG_DOUBLESIZE == sizeof(long double) (if HAS_LONG_DOUBLE).
+ Most of these are currently unused, but they are mentioned here so
+ metaconfig will include the appropriate tests in Configure and
+ we can then start to consider how best to deal with long long
+ variables.
+ Andy Dougherty April 1998
*/
typedef char I8;
'') prefix='/opt/perl5' ;;
esac
+# HP-UX can't do setuid emulation offered by Configure
+case "$d_dosuid" in
+'') d_dosuid="$undef" ;;
+esac
+
# Date: Fri, 6 Sep 96 23:15:31 CDT
# From: "Daniel S. Lewart" <d-lewart@uiuc.edu>
# I looked through the gcc.info and found this:
# Note that the text lines /^Summary of/ .. /^\s*$/ are copied into Config.pm.
$spitshell <<!GROK!THIS!
-
Summary of my $package ($baserev patchlevel $PATCHLEVEL subversion $SUBVERSION) configuration:
Platform:
osname=$osname, osvers=$osvers, archname=$archname
ccflags ='$ccflags'
stdchar='$stdchar', d_stdstdio=$d_stdstdio, usevfork=$usevfork
intsize=$intsize, longsize=$longsize, ptrsize=$ptrsize, doublesize=$doublesize
+ d_longlong=$d_longlong, longlongsize=$longlongsize, d_longdbl=$d_longdbl, longdblsize=$longdblsize
alignbytes=$alignbytes, usemymalloc=$usemymalloc, prototype=$prototype
Linker and Libraries:
ld='$ld', ldflags ='$ldflags'
libpth=$libpth
libs=$libs
- libc=$libc, so=$so
- useshrplib=$useshrplib, libperl=$libperl
+ libc=$libc, so=$so, useshrplib=$useshrplib, libperl=$libperl
Dynamic Linking:
dlsrc=$dlsrc, dlext=$dlext, d_dlsymun=$d_dlsymun, ccdlflags='$ccdlflags'
cccdlflags='$cccdlflags', lddlflags='$lddlflags'
-
!GROK!THIS!
#define PerlSock_accept(s, a, l) accept(s, a, l)
#define PerlSock_bind(s, n, l) bind(s, n, l)
#define PerlSock_connect(s, n, l) connect(s, n, l)
+
#define PerlSock_gethostbyaddr(a, l, t) gethostbyaddr(a, l, t)
#define PerlSock_gethostbyname(n) gethostbyname(n)
-#define PerlSock_gethostent() gethostent()
+#define PerlSock_gethostent gethostent
+#define PerlSock_endhostent endhostent
#define PerlSock_gethostname(n, l) gethostname(n, l)
+
+#define PerlSock_getnetbyaddr(n, t) getnetbyaddr(n, t)
+#define PerlSock_getnetbyname(n) getnetbyname(n)
+#define PerlSock_getnetent getnetent
+#define PerlSock_endnetent endnetent
+
#define PerlSock_getpeername(s, n, l) getpeername(s, n, l)
+
#define PerlSock_getprotobyname(n) getprotobyname(n)
#define PerlSock_getprotobynumber(n) getprotobynumber(n)
-#define PerlSock_getprotoent() getprotoent()
+#define PerlSock_getprotoent getprotoent
+#define PerlSock_endprotoent endprotoent
+
#define PerlSock_getservbyname(n, p) getservbyname(n, p)
#define PerlSock_getservbyport(port, p) getservbyport(port, p)
-#define PerlSock_getservent() getservent()
+#define PerlSock_getservent getservent
+#define PerlSock_endservent endservent
+
#define PerlSock_getsockname(s, n, l) getsockname(s, n, l)
#define PerlSock_getsockopt(s, l, n, v, i) getsockopt(s, l, n, v, i)
#define PerlSock_listen(s, b) listen(s, b)
* If they're not right on your machine, then pack() and unpack()
* wouldn't work right anyway; you'll need to apply the Cray hack.
* (I'd like to check them with #if, but you can't use sizeof() in
- * the preprocessor.)
+ * the preprocessor.) --???
+ */
+/*
+ The appropriate SHORTSIZE, INTSIZE, LONGSIZE, and LONGLONGSIZE
+ defines are now in config.h. --Andy Dougherty April 1998
*/
#define SIZE16 2
#define SIZE32 4
#endif
#endif
-#ifdef HOST_NOT_FOUND
+/* XXX Configure test needed.
+ h_errno might not be a simple 'int', especially for multi-threaded
+ applications. HOST_NOT_FOUND is typically defined in <netdb.h>.
+*/
+#if defined(HOST_NOT_FOUND) && !defined(h_errno)
extern int h_errno;
#endif
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#if defined(HAS_GETHOSTENT) && !defined(DONT_DECLARE_STD)
+#ifndef HAS_GETHOST_PROTOS /* XXX Do we need individual probes? */
struct hostent *PerlSock_gethostbyaddr(Netdb_host_t, Netdb_hlen_t, int);
struct hostent *PerlSock_gethostbyname(Netdb_name_t);
-#ifndef PerlSock_gethostent
struct hostent *PerlSock_gethostent(void);
#endif
-#endif
struct hostent *hent;
unsigned long len;
EXTEND(SP, 10);
- if (which == OP_GHBYNAME) {
+ if (which == OP_GHBYNAME)
+#ifdef HAS_GETHOSTBYNAME
hent = PerlSock_gethostbyname(POPp);
- }
+#else
+ DIE(no_sock_func, "gethostbyname");
+#endif
else if (which == OP_GHBYADDR) {
+#ifdef HAS_GETHOSTBYADDR
int addrtype = POPi;
SV *addrsv = POPs;
STRLEN addrlen;
Netdb_host_t addr = (Netdb_host_t) SvPV(addrsv, addrlen);
hent = PerlSock_gethostbyaddr(addr, (Netdb_hlen_t) addrlen, addrtype);
+#else
+ DIE(no_sock_func, "gethostbyaddr");
+#endif
}
else
#ifdef HAS_GETHOSTENT
hent = PerlSock_gethostent();
#else
- DIE("gethostent not implemented");
+ DIE(no_sock_func, "gethostent");
#endif
#ifdef HOST_NOT_FOUND
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifdef NETDB_H_OMITS_GETNET
- struct netent *getnetbyaddr(Netdb_net_t, int);
- struct netent *getnetbyname(Netdb_name_t);
- struct netent *getnetent(void);
+#ifndef HAS_GETNET_PROTOS /* XXX Do we need individual probes? */
+ struct netent *PerlSock_getnetbyaddr(Netdb_net_t, int);
+ struct netent *PerlSock_getnetbyname(Netdb_name_t);
+ struct netent *PerlSock_getnetent(void);
#endif
struct netent *nent;
if (which == OP_GNBYNAME)
- nent = getnetbyname(POPp);
+#ifdef HAS_GETNETBYNAME
+ nent = PerlSock_getnetbyname(POPp);
+#else
+ DIE(no_sock_func, "getnetbyname");
+#endif
else if (which == OP_GNBYADDR) {
+#ifdef HAS_GETNETBYADDR
int addrtype = POPi;
Netdb_net_t addr = (Netdb_net_t) U_L(POPn);
- nent = getnetbyaddr(addr, addrtype);
+ nent = PerlSock_getnetbyaddr(addr, addrtype);
+#else
+ DIE(no_sock_func, "getnetbyaddr");
+#endif
}
else
- nent = getnetent();
+#ifdef HAS_GETNETENT
+ nent = PerlSock_getnetent();
+#else
+ DIE(no_sock_func, "getnetent");
+#endif
EXTEND(SP, 4);
if (GIMME != G_ARRAY) {
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifndef DONT_DECLARE_STD
+#ifndef HAS_GETPROTO_PROTOS /* XXX Do we need individual probes? */
struct protoent *PerlSock_getprotobyname(Netdb_name_t);
struct protoent *PerlSock_getprotobynumber(int);
-#ifndef PerlSock_getprotoent
struct protoent *PerlSock_getprotoent(void);
#endif
-#endif
struct protoent *pent;
if (which == OP_GPBYNAME)
I32 which = op->op_type;
register char **elem;
register SV *sv;
-#ifndef DONT_DECLARE_STD
+#ifndef HAS_GETSERV_PROTOS /* XXX Do we need individual probes? */
struct servent *PerlSock_getservbyname(Netdb_name_t, Netdb_name_t);
struct servent *PerlSock_getservbyport(int, Netdb_name_t);
-#ifndef PerlSock_getservent
struct servent *PerlSock_getservent(void);
#endif
-#endif
struct servent *sent;
if (which == OP_GSBYNAME) {
+#ifdef HAS_GETSERVBYNAME
char *proto = POPp;
char *name = POPp;
proto = Nullch;
sent = PerlSock_getservbyname(name, proto);
+#else
+ DIE(no_sock_func, "getservbyname");
+#endif
}
else if (which == OP_GSBYPORT) {
+#ifdef HAS_GETSERVBYPORT
char *proto = POPp;
unsigned short port = POPu;
port = PerlSock_htons(port);
#endif
sent = PerlSock_getservbyport(port, proto);
+#else
+ DIE(no_sock_func, "getservbyport");
+#endif
}
else
#ifdef HAS_GETSERVENT
{
djSP;
#ifdef HAS_ENDHOSTENT
- endhostent();
+ PerlSock_endhostent();
EXTEND(SP,1);
RETPUSHYES;
#else
{
djSP;
#ifdef HAS_ENDNETENT
- endnetent();
+ PerlSock_endnetent();
EXTEND(SP,1);
RETPUSHYES;
#else
{
djSP;
#ifdef HAS_ENDPROTOENT
- endprotoent();
+ PerlSock_endprotoent();
EXTEND(SP,1);
RETPUSHYES;
#else
{
djSP;
#ifdef HAS_ENDSERVENT
- endservent();
+ PerlSock_endservent();
EXTEND(SP,1);
RETPUSHYES;
#else
*reglastparen = paren;
}
#endif
- scan = NEXTOPER(scan) + 4/sizeof(regnode);
+ scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
if (paren)
scan += NEXT_OFF(scan); /* Skip former OPEN. */
reginput = locinput;
*reglastparen = paren;
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
- scan = regnext(NEXTOPER(scan) + 4/sizeof(regnode));
+ scan = regnext(NEXTOPER(scan) + NODE_STEP_REGNODE);
goto repeat;
case CURLY:
paren = 0;
ln = ARG1(scan); /* min to match */
n = ARG2(scan); /* max to match */
- scan = NEXTOPER(scan) + 4/sizeof(regnode);
+ scan = NEXTOPER(scan) + NODE_STEP_REGNODE;
goto repeat;
case STAR:
ln = 0;