# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Mon Jan 31 22:19:42 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Wed Feb 9 21:43:07 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_ftime=''
d_gettimeod=''
d_Gconvert=''
+d_getcwd=''
d_getgrent=''
d_getgrps=''
d_gethbyaddr=''
d_gnulibc=''
d_hasmntopt=''
d_htonl=''
+d_iconv=''
d_inetaton=''
d_int64t=''
d_isascii=''
d_memmove=''
d_memset=''
d_mkdir=''
+d_mkdtemp=''
d_mkfifo=''
+d_mkstemp=''
+d_mkstemps=''
d_mktime=''
+d_mmap=''
+mmaptype=''
+d_mprotect=''
d_msg=''
d_msgctl=''
d_msgget=''
d_msgrcv=''
d_msgsnd=''
+d_msync=''
+d_munmap=''
d_nice=''
d_open3=''
d_fpathconf=''
i_gdbm=''
d_grpasswd=''
i_grp=''
+i_iconv=''
i_inttypes=''
i_limits=''
i_locale=''
i_sysfilio=''
i_sysioctl=''
i_syssockio=''
+i_syslog=''
+i_sysmman=''
i_sysmount=''
i_sysndir=''
i_sysparam=''
xlibpth=''
ignore_versioned_solibs=''
libs=''
+libsdirs=''
+libsfiles=''
+libsfound=''
lns=''
d_PRIEldbl=''
d_PRIFldbl=''
vendorprefixexp=''
defvoidused=''
voidflags=''
+pm_apiversion=''
+xs_apiversion=''
CONFIG=''
define='define'
cat <<EOM
-Perl can be built to take advantage of threads, on some systems.
+Perl can be built to take advantage of threads on some systems.
To do so, Configure must be run with -Dusethreads.
Note that threading is a highly experimental feature, and
(ithreads) that has one interpreter per thread. Both are very
experimental. This arrangement exists to help developers work out
which one is better.
+
+If you're a casual user, you probably don't want interpreter-threads
+at this time. There doesn't yet exist a way to create threads from
+within Perl in this model, i.e., "use Thread;" will NOT work.
EOM
: Default to ithreads unless overridden on command line or with
: old config.sh
for thislib in $libswanted; do
libname="$thislib"
- if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`; $test -f "$xxx"; then
- if $test -a "X$ignore_versioned_solibs" = "X"; then
- xxx=/ignored/$xxx
- else
- libstyle=shared
- fi
+ if xxx=`./loc lib$thislib.$so.[0-9]'*' X $libpth`
+ $test -f "$xxx" -a "X$ignore_versioned_solibs" = "X" ; then
+ libstyle=shared
elif xxx=`./loc lib$thislib.$so X $libpth` ; $test -f "$xxx"; then
libstyle=shared
elif xxx=`./loc lib$thislib$_a X $libpth`; $test -f "$xxx"; then
libstyle="static"
fi
if $test -f "$xxx"; then
- if test X"$osname" = Xhpux -a -f /lib/pa20_64/libc.sl; then
- case "`file $xxx`" in
- *LP64*) ;;
- *) xxx=/non/64/bit/$xxx ;;
- esac
- fi
+ eval $libscheck
fi
if $test -f "$xxx"; then
case "$libstyle" in
esac
case " $dflt " in
*"-l$thislib "*);;
- *) dflt="$dflt -l$libname";;
+ *) dflt="$dflt -l$libname"
+ libsfound="$libsfound $xxx"
+ yyy=`basename $xxx`
+ libsfiles="$libsfiles $yyy"
+ yyy=`echo $xxx|sed "s@/$yyy\\$@@"`
+ case " $libsdirs " in
+ *" $yyy "*) ;;
+ *) libsdirs="$libsdirs $yyy" ;;
+ esac
+ ;;
esac
else
echo "No -l$thislib."
test 0 -eq "$subversion" || $echo $n " subversion $subversion" $c
echo ".)"
case "$osname" in
-dos|cygwin|vms|win32)
+dos|vms)
: XXX Should be a Configure test for double-dots in filenames.
version=`echo $baserev $patchlevel $subversion | \
$awk '{ printf "%d_%d_%d\n", $1, $2, $3 }'`
esac
case "$inc_version_list" in
''|' ')
- inc_version_list_init='""';;
+ inc_version_list_init='0';;
*) inc_version_list_init=`echo $inc_version_list |
- $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/"/'`
+ $sed -e 's/^/"/' -e 's/ /","/g' -e 's/$/",0/'`
;;
esac
$rm -f getverlist
installsitebin="$sitebinexp"
fi
+: see if sqrtl exists
+set sqrtl d_sqrtl
+eval $inlibc
+
cat <<EOM
Perl can be built to take advantage of long doubles which
;;
esac
+case "$uselongdouble:$d_sqrtl" in
+$define:$undef)
+ $cat <<EOM >&4
+
+You requested the use of long doubles but you do not seem to have
+the mathematic functions for long doubles. I'm disabling the use
+of long doubles.
+EOM
+ uselongdouble=$undef
+ ;;
+esac
+
cat <<EOM
Perl can be built to take advantage of long longs which
esac
case "$uselonglong" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
+'') dflt='y';;
esac
rp='Try to use long longs if available?'
. ./myread
set fseeko d_fseeko
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use fseek.)" ;;
+8) echo "(Your long is 64 bits, so you could use fseek.)" ;;
esac
: see if fsetpos exists
set ftello d_ftello
eval $inlibc
case "$longsize" in
-8) echo "(Your long is 64 bits, so in a pinch you could use ftell.)" ;;
+8) echo "(Your long is 64 bits, so you could use ftell.)" ;;
esac
+: see if getcwd exists
+set getcwd d_getcwd
+eval $inlibc
+
: see if getgrent exists
set getgrent d_getgrent
eval $inlibc
set d_htonl
eval $setvar
+: see if iconv exists
+set iconv d_iconv
+eval $inlibc
+
: index or strchr
echo " "
if set index val -f; eval $csym; $val; then
set inet_aton d_inetaton
eval $inlibc
+: see if inttypes.h is available
+: we want a real compile instead of Inhdr because some systems
+: have an inttypes.h which includes non-existent headers
+echo " "
+$cat >try.c <<EOCP
+#include <inttypes.h>
+int main() {
+ static int32_t foo32 = 0x12345678;
+}
+EOCP
+set try
+if eval $compile; then
+ echo "<inttypes.h> found." >&4
+ val="$define"
+else
+ echo "<inttypes.h> NOT found." >&4
+ val="$undef"
+fi
+$rm -f try.c try
+set i_inttypes
+eval $setvar
+
+: check for int64_t
+echo " "
+$echo $n "Checking to see if your system supports int64_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
+int main() { int64_t x = 7; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo " Yes, it does." >&4
+else
+ val="$undef"
+ echo " No, it doesn't." >&4
+fi
+$rm -f try try.*
+set d_int64t
+eval $setvar
+
: Look for isascii
echo " "
$cat >isascii.c <<'EOCP'
set mkdir d_mkdir
eval $inlibc
+: see if mkdtemp exists
+set mkdtemp d_mkdtemp
+eval $inlibc
+
: see if mkfifo exists
set mkfifo d_mkfifo
eval $inlibc
+: see if mkstemp exists
+set mkstemp d_mkstemp
+eval $inlibc
+
+: see if mkstemps exists
+set mkstemps d_mkstemps
+eval $inlibc
+
: see if mktime exists
set mktime d_mktime
eval $inlibc
+: see if mprotect exists
+set mprotect d_mprotect
+eval $inlibc
+
: see if msgctl exists
set msgctl d_msgctl
eval $inlibc
set d_msg
eval $setvar
-: see if nice exists
-set nice d_nice
+: see if msync exists
+set msync d_msync
eval $inlibc
-: see if inttypes.h is available
-: we want a real compile instead of Inhdr because some systems
-: have an inttypes.h which includes non-existent headers
-echo " "
-$cat >try.c <<EOCP
-#include <inttypes.h>
-int main() {
- static int32_t foo32 = 0x12345678;
-}
-EOCP
-set try
-if eval $compile; then
- echo "<inttypes.h> found." >&4
- val="$define"
-else
- echo "<inttypes.h> NOT found." >&4
- val="$undef"
-fi
-$rm -f try.c try
-set i_inttypes
-eval $setvar
+: see if munmap exists
+set munmap d_munmap
+eval $inlibc
-: check for int64_t
-echo " "
-$echo $n "Checking to see if your system supports int64_t...$c" >&4
-$cat >try.c <<EOCP
-#include <sys/types.h>
-#$i_inttypes I_INTTYPES
-#ifdef I_INTTYPES
-#include <inttypes.h>
-#endif
-int main() { int64_t x = 7; }
-EOCP
-set try
-if eval $compile; then
- val="$define"
- echo " Yes, it does." >&4
-else
- val="$undef"
- echo " No, it doesn't." >&4
-fi
-$rm -f try try.*
-set d_int64t
-eval $setvar
+: see if nice exists
+set nice d_nice
+eval $inlibc
echo " "
eval $setvar
quadkind=2
;;
- *) case "$uselonglong:$d_longlong:$longlongsize" in
- define:define:8)
+ *) case "$d_longlong:$longlongsize" in
+ define:8)
val='"long long"'
set quadtype
eval $setvar
eval $setvar
$rm -f try.c try
-: see if sqrtl exists
-set sqrtl d_sqrtl
-eval $inlibc
-
: see if sys/stat.h is available
set sys/stat.h i_sysstat
eval $inhdr
*) echo "Nope, it doesn't.";;
esac
+: see if this is a sys/mman.h system
+set sys/mman.h i_sysmman
+eval $inhdr
+
+: see if mmap exists
+set mmap d_mmap
+eval $inlibc
+: see what shmat returns
+: default to something harmless
+mmaptype='void *'
+case "$i_sysmman$d_mmap" in
+"$define$define")
+ $cat >mmap.c <<'END'
+#include <sys/mman.h>
+void *mmap();
+END
+ if $cc $ccflags -c mmap.c >/dev/null 2>&1; then
+ mmaptype='void *'
+ else
+ mmaptype='caddr_t'
+ fi
+ echo "and it returns ($mmaptype)." >&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
set pid_t pidtype int stdio.h sys/types.h
eval $typedef_ask
+: Find earliest binary compatible site_perl subdirectory perl can use.
+case "$bincompat5005" in
+"$define") xs_apiversion='5.005' ;;
+*) xs_apiversion=$version ;; # The current site_perl version.
+esac
+: Find earliest pure perl site_perl subdirectory perl can use.
+: The versioned directories started at 5.005.
+pm_apiversion='5.005'
+
: check for length of pointer
echo " "
case "$ptrsize" in
set i_fcntl
eval $setvar
+: see if this is a iconv.h system
+set iconv.h i_iconv
+eval $inhdr
+
: see if locale.h is available
set locale.h i_locale
eval $inhdr
cat <<EOSH > Cppsym
$startsh
if $test \$# -gt 0; then
- echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ echo \$* | $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ if $test -s Cppsym.got; then
+ $rm -f Cppsym.got
+ exit 0
+ fi
+ $rm -f Cppsym.got
+ exit 1
else
- $tr " " "$trnl" | ./Cppsym.try > Cppsym.got
+ $tr " " "$trnl" | ./Cppsym.try
+ exit 0
fi
-$test -s Cppsym.got && exit 0
-exit 1
EOSH
chmod +x Cppsym
$eunicefix Cppsym
cat <<EOSH > Cppsym.try
+$startsh
cat <<'EOCP' > try.c
#include <stdio.h>
int main() {
EOSH
cat <<'EOSH' >> Cppsym.try
'length($1) > 0 {
- printf "#ifdef %s\nprintf(\"%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef _%s\nprintf(\"_%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s\nprintf(\"__%s\\n\");\n#endif\n", $1, $1
- printf "#ifdef __%s__\nprintf(\"__%s__\\n\");\n#endif\n", $1, $1 }' \
- >> try.c
+ printf "#ifdef %s\n#if %s+0\nprintf(\"%s=%%ld\\n\", %s);\n#else\nprintf(\"%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef _%s\n#if _%s+0\nprintf(\"_%s=%%ld\\n\", _%s);\n#else\nprintf(\"_%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s\n#if __%s+0\nprintf(\"__%s=%%ld\\n\", __%s);\n#else\nprintf(\"__%s\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+ printf "#ifdef __%s__\n#if __%s__+0\nprintf(\"__%s__=%%ld\\n\", __%s__);\n#else\nprintf(\"__%s__\\n\");\n#endif\n#endif\n", $1, $1, $1, $1, $1
+}' >> try.c
echo '}' >> try.c
EOSH
-cat <<'EOSH' >> Cppsym.try
-set try
-eval $compile_ok && ./try$exe_ext
+cat <<EOSH >> Cppsym.try
+cc="$cc"
+optimize="$optimize"
+ccflags="$ccflags"
+ldflags="$ldflags"
+libs="$libs"
+exe_ext="$exe_ext"
+$cc $optimize $ccflags $ldflags -o try try.c $libs && ./try$exe_ext
EOSH
chmod +x Cppsym.try
$eunicefix Cppsym.try
$awk '/\=/ { print $0; next }
{ print $0"=1" }' ccsym.raw >ccsym.list
-$awk '{ print $0"=1" }' Cppsym.true >ccsym.true
+$awk '/\=/ { print $0; next }
+ { print $0"=1" }' Cppsym.true >ccsym.true
$comm -13 ccsym.true ccsym.list >ccsym.own
$comm -12 ccsym.true ccsym.list >ccsym.com
$comm -23 ccsym.true ccsym.list >ccsym.cpp
set i_sysioctl
eval $setvar
+
+: see if this is a syslog.h system
+set syslog.h i_syslog
+eval $inhdr
+
: see if sys/resource.h has to be included
set sys/resource.h i_sysresrc
eval $inhdr
d_fstatvfs='$d_fstatvfs'
d_ftello='$d_ftello'
d_ftime='$d_ftime'
+d_getcwd='$d_getcwd'
d_getgrent='$d_getgrent'
d_getgrps='$d_getgrps'
d_gethbyaddr='$d_gethbyaddr'
d_grpasswd='$d_grpasswd'
d_hasmntopt='$d_hasmntopt'
d_htonl='$d_htonl'
+d_iconv='$d_iconv'
d_index='$d_index'
d_inetaton='$d_inetaton'
d_int64t='$d_int64t'
d_memmove='$d_memmove'
d_memset='$d_memset'
d_mkdir='$d_mkdir'
+d_mkdtemp='$d_mkdtemp'
d_mkfifo='$d_mkfifo'
+d_mkstemp='$d_mkstemp'
+d_mkstemps='$d_mkstemps'
d_mktime='$d_mktime'
+d_mmap='$d_mmap'
+d_mprotect='$d_mprotect'
d_msg='$d_msg'
d_msg_ctrunc='$d_msg_ctrunc'
d_msg_dontroute='$d_msg_dontroute'
d_msgget='$d_msgget'
d_msgrcv='$d_msgrcv'
d_msgsnd='$d_msgsnd'
+d_msync='$d_msync'
+d_munmap='$d_munmap'
d_mymalloc='$d_mymalloc'
d_nice='$d_nice'
d_nv_preserves_uv='$d_nv_preserves_uv'
i_float='$i_float'
i_gdbm='$i_gdbm'
i_grp='$i_grp'
+i_iconv='$i_iconv'
i_inttypes='$i_inttypes'
i_limits='$i_limits'
i_locale='$i_locale'
i_sysfilio='$i_sysfilio'
i_sysin='$i_sysin'
i_sysioctl='$i_sysioctl'
+i_syslog='$i_syslog'
+i_sysmman='$i_sysmman'
i_sysmount='$i_sysmount'
i_sysndir='$i_sysndir'
i_sysparam='$i_sysparam'
libperl='$libperl'
libpth='$libpth'
libs='$libs'
+libsdirs='$libsdirs'
+libsfiles='$libsfiles'
+libsfound='$libsfound'
libswanted='$libswanted'
line='$line'
lint='$lint'
medium='$medium'
mips_type='$mips_type'
mkdir='$mkdir'
+mmaptype='$mmaptype'
models='$models'
modetype='$modetype'
more='$more'
phostname='$phostname'
pidtype='$pidtype'
plibpth='$plibpth'
+pm_apiversion='$pm_apiversion'
pmake='$pmake'
pr='$pr'
prefix='$prefix'
vi='$vi'
voidflags='$voidflags'
xlibpth='$xlibpth'
+xs_apiversion='$xs_apiversion'
zcat='$zcat'
zip='$zip'
EOT