# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Fri Feb 12 13:46:36 EET 1999 [metaconfig 3.0 PL70]
+# Generated on Mon Mar 15 18:36:13 EET 1999 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
vi=''
zcat=''
zip=''
+full_ar=''
full_sed=''
libswanted=''
hint=''
cppminus=''
cpprun=''
cppstdin=''
+crosscompile=''
d_access=''
d_accessx=''
d_alarm=''
d_uname=''
d_gethostprotos=''
d_getlogin=''
+d_getmntent=''
d_getnbyaddr=''
d_getnbyname=''
d_getnent=''
d_getsbyname=''
d_getsbyport=''
d_gnulibc=''
+d_hasmntopt=''
d_htonl=''
d_inetaton=''
d_isascii=''
i_niin=''
i_sysin=''
i_poll=''
+i_pthread=''
d_pwage=''
d_pwchange=''
d_pwclass=''
small=''
split=''
modetype=''
+multiarch=''
mydomain=''
myhostname=''
phostname=''
fi
i_whoami=''
-: change the next line if compiling for Xenix/286 on Xenix/386
-xlibpth='/usr/lib/386 /lib/386'
-
-: Possible local library directories to search.
-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
-loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
-
-: general looking path for locating libraries
-glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
-glibpth="$glibpth /lib /usr/lib $xlibpth"
-glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
-
-: Private path used by Configure to find libraries. Its value
-: is prepended to libpth. This variable takes care of special
-: machines, like the mips. Usually, it should be empty.
-plibpth=''
-
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
: Extra object files, if any, needed on this platform.
archobjs=''
groupstype=''
+: change the next line if compiling for Xenix/286 on Xenix/386
+xlibpth='/usr/lib/386 /lib/386'
+
+: Possible local library directories to search.
+loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
+loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+
+: general looking path for locating libraries
+glibpth="/shlib /usr/shlib /lib/pa1.1 /usr/lib/large"
+glibpth="$glibpth /lib /usr/lib $xlibpth"
+glibpth="$glibpth /lib/large /usr/lib/small /lib/small"
+glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
+
+: Private path used by Configure to find libraries. Its value
+: is prepended to libpth. This variable takes care of special
+: machines, like the mips. Usually, it should be empty.
+plibpth=''
+
: default library list
libswanted=''
: some systems want to use only the non-versioned libso:s
: List of libraries we want.
: If anyone needs -lnet, put it in a hint file.
libswanted='sfio socket inet nsl nm ndbm gdbm dbm db malloc dl'
-libswanted="$libswanted dld ld sun m c cposix posix ndir dir crypt"
+libswanted="$libswanted dld ld sun m rt c cposix posix"
+libswanted="$libswanted ndir dir crypt"
libswanted="$libswanted ucb bsd BSD PW x"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
[23]100) osname=mips ;;
next*) osname=next ;;
i386*)
- tmp=`/bin/uname -X 2>/dev/null|awk -e '/3\.2v[45]/{ print $(NF) }'`
- if $test "$tmp" != "" -a "$3" = "3.2" -a test -e '/etc/systemid'; then
+ tmp=`/bin/uname -X 2>/dev/null|awk '/3\.2v[45]/{ print $(NF) }'`
+ if $test "$tmp" != "" -a "$3" = "3.2" -a -f '/etc/systemid'; then
osname='sco'
osvers=$tmp
elif $test -f /etc/kconfig; then
Perl can be built to take advantage of threads, on some systems.
To do so, Configure must be run with -Dusethreads.
-(See README.threads for details.)
+
+Note that threading is a highly experimental feature, and
+some known race conditions still remain. If you choose to try
+it, be very sure to not actually deploy it for production
+purposes. README.threads has more details, and is required
+reading if you enable threads.
EOM
case "$usethreads" in
$define|true|[yY]*) dflt='y';;
. ./usethreads.cbu
fi
case "$osname" in
- aix|dec_osf|dos_djgpp|freebsd|hpux|irix|linux|openbsd|os2|solaris|vmesa)
+ aix|dec_osf|dos_djgpp|freebsd|hpux|irix|linux|next|openbsd|os2|solaris|vmesa)
# Known thread-capable platforms.
;;
*)
esac;
fi'
-if ./osf1; then
- set signal.h __LANGUAGE_C__; eval $inctest
-else
- set signal.h LANGUAGE_C; eval $inctest
-fi
+set signal.h LANGUAGE_C; eval $inctest
case "$hint" in
none|recommended) dflt="$ccflags $dflt" ;;
if $test -f /lib/syscalls.exp; then
echo " "
echo "Also extracting names from /lib/syscalls.exp for good ole AIX..." >&4
- $sed -n 's/^\([^ ]*\)[ ]*syscall$/\1/p' /lib/syscalls.exp >>libc.list
+ $sed -n 's/^\([^ ]*\)[ ]*syscall[0-9]*$/\1/p' /lib/syscalls.exp >>libc.list
fi
;;
esac
useshrplib='true'
# Why does next4 have to be so different?
case "${osname}${osvers}" in
- next4*) xxx='DYLD_LIBRARY_PATH' ;;
+ next4*|rhapsody*)
+ xxx='DYLD_LIBRARY_PATH' ;;
os2*) xxx='' ;; # Nothing special needed.
beos*) xxx='' ;;
*) xxx='LD_LIBRARY_PATH' ;;
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.
+to place all site-specific files in this directory rather than in the
+main distribution directory.
EOM
fn=d~+
: see how we will look up host name
echo " "
-if false; then
- : dummy stub to allow use of elif
-elif set gethostname val -f d_gethname; eval $csym; $val; then
+call=''
+if set gethostname val -f d_gethname; eval $csym; $val; then
echo 'gethostname() found.' >&4
d_gethname="$define"
call=gethostname
-elif set uname val -f d_uname; eval $csym; $val; then
+fi
+if set uname val -f d_uname; eval $csym; $val; then
if ./xenix; then
$cat <<'EOM'
uname() was found, but you're running xenix, and older versions of xenix
else
echo 'uname() found.' >&4
d_uname="$define"
- call=uname
+ case "$call" in
+ '') call=uname ;;
+ esac
fi
fi
case "$d_gethname" in
set getlogin d_getlogin
eval $inlibc
+: see if getmntent exists
+set getmntent d_getmntent
+eval $inlibc
+
: see if getnetbyaddr exists
set getnetbyaddr d_getnbyaddr
eval $inlibc
;;
esac
+: see if hasmntopt exists
+set hasmntopt d_hasmntopt
+eval $inlibc
+
: see if this is a netinet/in.h or sys/in.h system
set netinet/in.h i_niin sys/in.h i_sysin
eval $inhdr
set nice d_nice
eval $inlibc
-: how to create joinable pthreads
+: see if POSIX threads are available
if test "X$usethreads" = "X$define"; then
+ set pthread.h i_pthread
+ eval $inhdr
+else
+ i_pthread="$undef"
+fi
+
+
+
+: how to create joinable pthreads
+if test "X$usethreads" = "X$define" -a "X$i_pthread" = "X$define"; then
echo " "
echo "Checking what constant to use for creating joinable pthreads..." >&4
$cat >try.c <<'EOCP'
EOCP
set try -DJOINABLE=PTHREAD_CREATE_JOINABLE
if eval $compile; then
- echo "You seem to use PTHREAD_CREATE_JOINABLE." >&2
+ echo "You seem to use PTHREAD_CREATE_JOINABLE." >&4
val="$undef" # Yes, undef.
set d_old_pthread_create_joinable
eval $setvar
else
set try -DJOINABLE=PTHREAD_CREATE_UNDETACHED
if eval $compile; then
- echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&2
+ echo "You seem to use PTHREAD_CREATE_UNDETACHED." >&4
val="$define"
set d_old_pthread_create_joinable
eval $setvar
else
set try -DJOINABLE=__UNDETACHED
if eval $compile; then
- echo "You seem to use __UNDETACHED." >&2
+ echo "You seem to use __UNDETACHED." >&4
val="$define"
set d_old_pthread_create_joinable
eval $setvar
set old_pthread_create_joinable
eval $setvar
else
- echo "Egads, nothing obvious found. Guessing that you use 0." >&2
+ echo "Egads, nothing obvious found. Guessing that you use 0." >&4
val="$define"
set d_old_pthread_create_joinable
eval $setvar
false) dflt='n';;
*) dflt='y';;
esac
- rp="Some systems have problems with vfork(). Do you want to use it?"
+ cat <<'EOM'
+
+Perl can only use a vfork() that doesn't suffer from strict
+restrictions on calling functions or modifying global data in
+the child. For example, glibc-2.1 contains such a vfork()
+that is unsuitable. If your system provides a proper fork()
+call, chances are that you do NOT want perl to use vfork().
+
+EOM
+ rp="Do you still want to use vfork()?"
. ./myread
case "$ans" in
y|Y) ;;
RCSfile='$RCSfile'
Revision='$Revision'
+case "$crosscompile" in
+''|[nN]*) crosscompile="$undef" ;;
+esac
+
+case "$osname" in
+next|rhapsody) multiarch="$define" ;;
+esac
+case "$multiarch" in
+''|[nN]*) multiarch="$undef" ;;
+esac
+
: check for alignment requirements
echo " "
-case "$alignbytes" in
-'') echo "Checking alignment constraints..." >&4
- $cat >try.c <<'EOCP'
+case "$crosscompile$multiarch" in
+*$define*)
+ $cat <<EOM
+You seem to be either cross-compiling or doing a multiarchitecture build,
+skipping the memory alignment check.
+
+EOM
+ case "$alignbytes" in
+ '') alignbytes=8 ;;
+ esac
+ ;;
+*)
+ case "$alignbytes" in
+ '') echo "Checking alignment constraints..." >&4
+ $cat >try.c <<'EOCP'
struct foobar {
char foo;
double bar;
-} try;
+} try_algn;
int main()
{
- printf("%d\n", (char *)&try.bar - (char *)&try.foo);
+ printf("%d\n", (char *)&try_algn.bar - (char *)&try_algn.foo);
}
EOCP
- set try
- if eval $compile_ok; then
- dflt=`./try`
- else
- dflt='8'
- echo "(I can't seem to compile the test program...)"
- fi
- ;;
-*) dflt="$alignbytes"
+ set try
+ if eval $compile_ok; then
+ dflt=`./try`
+ else
+ dflt='8'
+ echo "(I can't seem to compile the test program...)"
+ fi
+ ;;
+ *) dflt="$alignbytes"
+ ;;
+ esac
+ rp="Doubles must be aligned on a how-many-byte boundary?"
+ . ./myread
+ alignbytes="$ans"
+ $rm -f try.c try
;;
esac
-rp="Doubles must be aligned on a how-many-byte boundary?"
-. ./myread
-alignbytes="$ans"
-$rm -f try.c try
+
: check for ordering of bytes in a long
-case "$byteorder" in
-'')
- $cat <<'EOM'
-
+echo " "
+case "$crosscompile$multiarch" in
+*$define*)
+ $cat <<EOM
+You seem to be either cross-compiling or doing a multiarchitecture build,
+skipping the byteorder check.
+
+EOM
+ byteorder=''
+ ;;
+*)
+ case "$byteorder" in
+ '')
+ $cat <<'EOM'
In the following, larger digits indicate more significance. A big-endian
machine like a Pyramid or a Motorola 680?0 chip will come out to 4321. A
little-endian machine like a Vax or an Intel 80?86 chip would be 1234. Other
the test program works the default is probably right.
I'm now running the test program...
EOM
- $cat >try.c <<'EOCP'
+ $cat >try.c <<'EOCP'
#include <stdio.h>
int main()
{
exit(0);
}
EOCP
- xxx_prompt=y
- set try
- if eval $compile && ./try > /dev/null; then
- dflt=`./try`
- case "$dflt" in
- [1-4][1-4][1-4][1-4]|12345678|87654321)
- echo "(The test program ran ok.)"
- echo "byteorder=$dflt"
- xxx_prompt=n
+ xxx_prompt=y
+ set try
+ if eval $compile && ./try > /dev/null; then
+ dflt=`./try`
+ case "$dflt" in
+ [1-4][1-4][1-4][1-4]|12345678|87654321)
+ echo "(The test program ran ok.)"
+ echo "byteorder=$dflt"
+ xxx_prompt=n
;;
- ????|????????) echo "(The test program ran ok.)" ;;
- *) echo "(The test program didn't run right for some reason.)" ;;
- esac
- else
- dflt='4321'
- cat <<'EOM'
+ ????|????????) echo "(The test program ran ok.)" ;;
+ *) echo "(The test program didn't run right for some reason.)" ;;
+ esac
+ else
+ dflt='4321'
+ cat <<'EOM'
(I can't seem to compile the test program. Guessing big-endian...)
EOM
- fi
- case "$xxx_prompt" in
- y)
- rp="What is the order of bytes in a long?"
- . ./myread
- byteorder="$ans"
- ;;
- *) byteorder=$dflt
+ fi
+ case "$xxx_prompt" in
+ y)
+ rp="What is the order of bytes in a long?"
+ . ./myread
+ byteorder="$ans"
+ ;;
+ *) byteorder=$dflt
+ ;;
+ esac
;;
esac
+ $rm -f try.c try
;;
esac
-$rm -f try.c try
+
: how do we catenate cpp tokens here?
echo " "
set fpos_t fpostype long stdio.h sys/types.h
eval $typedef_ask
+: Store the full pathname to the ar program for use in the C program
+: Respect a hint or command line value for full_ar.
+case "$full_ar" in
+'') full_ar=$ar ;;
+esac
+
: Store the full pathname to the sed program for use in the C program
full_sed=$sed
./Cppsym -l $al | $sort | $grep -v '^$' >Cppsym.true
: now check the C compiler for additional symbols
+postprocess_cc_v=''
+case "$osname" in
+aix) postprocess_cc_v="|$tr , ' '" ;;
+esac
$cat >ccsym <<EOS
$startsh
$cat >tmp.c <<EOF
extern int foo;
EOF
-for i in \`$cc -v -c tmp.c 2>&1\`
+for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\`
do
case "\$i" in
-D*) echo "\$i" | $sed 's/^-D//';;
done
$rm -f try.c
EOS
+unset postprocess_cc_v
chmod +x ccsym
$eunicefix ccsym
./ccsym > ccsym1.raw
cpprun='$cpprun'
cppstdin='$cppstdin'
cppsymbols='$cppsymbols'
+crosscompile='$crosscompile'
cryptlib='$cryptlib'
csh='$csh'
d_Gconvert='$d_Gconvert'
d_gethname='$d_gethname'
d_gethostprotos='$d_gethostprotos'
d_getlogin='$d_getlogin'
+d_getmntent='$d_getmntent'
d_getnbyaddr='$d_getnbyaddr'
d_getnbyname='$d_getnbyname'
d_getnent='$d_getnent'
d_gettimeod='$d_gettimeod'
d_gnulibc='$d_gnulibc'
d_grpasswd='$d_grpasswd'
+d_hasmntopt='$d_hasmntopt'
d_htonl='$d_htonl'
d_index='$d_index'
d_inetaton='$d_inetaton'
flex='$flex'
fpostype='$fpostype'
freetype='$freetype'
+full_ar='$full_ar'
full_csh='$full_csh'
full_sed='$full_sed'
gccversion='$gccversion'
i_neterrno='$i_neterrno'
i_niin='$i_niin'
i_poll='$i_poll'
+i_pthread='$i_pthread'
i_pwd='$i_pwd'
i_rpcsvcdbm='$i_rpcsvcdbm'
i_sfio='$i_sfio'
models='$models'
modetype='$modetype'
more='$more'
+multiarch='$multiarch'
mv='$mv'
myarchname='$myarchname'
mydomain='$mydomain'