# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Thu Feb 17 01:07:48 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Thu Feb 24 03:13:49 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
d_htonl=''
d_iconv=''
d_inetaton=''
-d_int64t=''
+d_int64_t=''
d_isascii=''
d_killpg=''
d_lchown=''
d_sockpair=''
sockethdr=''
socketlib=''
+d_socklen_t=''
d_sqrtl=''
d_statblks=''
d_statfs_f_flags=''
libsdirs=''
libsfiles=''
libsfound=''
+libspath=''
lns=''
d_PRIEldbl=''
d_PRIFldbl=''
: specified already.
case "$hintfile" in
''|' ')
- file=`echo "${osname}_${osvers}" | $sed -e 's@\.@_@g' -e 's@_$@@'`
+ file=`echo "${osname}_${osvers}" | $sed -e 's%\.%_%g' -e 's%_$%%'`
: Also try without trailing minor version numbers.
- xfile=`echo $file | $sed -e 's@_[^_]*$@@'`
- xxfile=`echo $xfile | $sed -e 's@_[^_]*$@@'`
- xxxfile=`echo $xxfile | $sed -e 's@_[^_]*$@@'`
- xxxxfile=`echo $xxxfile | $sed -e 's@_[^_]*$@@'`
+ xfile=`echo $file | $sed -e 's%_[^_]*$%%'`
+ xxfile=`echo $xfile | $sed -e 's%_[^_]*$%%'`
+ xxxfile=`echo $xxfile | $sed -e 's%_[^_]*$%%'`
+ xxxxfile=`echo $xxxfile | $sed -e 's%_[^_]*$%%'`
case "$file" in
'') dflt=none ;;
*) case "$osvers" in
libswanted="$libswanted socks5 socks5_sh"
;;
esac
+libsfound=''
+libsfiles=''
+libsdirs=''
+libspath=''
+for thisdir in $libpth $xlibpth; do
+ test -d $thisdir && libspath="$libspath $thisdir"
+done
for thislib in $libswanted; do
- for thisdir in $libpth; do
+ for thisdir in $libspath; do
xxx=''
if $test ! -f "$xxx" -a "X$ignore_versioned_solibs" = "X"; then
xxx=`ls $thisdir/lib$thislib.$so.[0-9] 2>/dev/null|tail -1`
libsfound="$libsfound $xxx"
yyy=`basename $xxx`
libsfiles="$libsfiles $yyy"
- yyy=`echo $xxx|sed "s@/$yyy\\$@@"`
+ yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"`
case " $libsdirs " in
*" $yyy "*) ;;
*) libsdirs="$libsdirs $yyy" ;;
yyy=`./try`
case "$yyy" in
'') fpossize=4
- echo " "
+ echo " " >&4
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo " $fpossize bytes."
+ echo " $fpossize bytes." >&4
;;
esac
else
dflt="$longsize"
- echo " "
+ echo " " >&4
echo "(I can't compile the test program. Guessing...)" >&4
rp="What is the size of your file positions (in bytes)?"
. ./myread
. ./getfile
usedl="$define"
: emulate basename
- dlsrc=`echo $ans | $sed -e 's@.*/\([^/]*\)$@\1@'`
+ dlsrc=`echo $ans | $sed -e 's%.*/\([^/]*\)$%\1%'`
$cat << EOM
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo " " >&4
+ echo "You have long double."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo " " >&4
+ echo "You do not have long double."
fi
$rm try.*
set d_longdbl
$cat >try.c <<EOCP
#include <sys/types.h>
#include <unistd.h>
-int main() { off64_t x = 7; }'
+int main() { off64_t x = 7; }
EOCP
set try
if eval $compile; then
echo " "
echo "Checking to see if your system supports fpos64_t..." >&4
$cat >try.c <<EOCP
-#include <sys/stdio.h>
-int main() { fpos64_t x x = 7; }'
+#include <stdio.h>
+int main() { fpos64_t x = 7; }
EOCP
set try
if eval $compile; then
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo " " >&4
+ echo "You have int64_t."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo " " >&4
+ echo "You do not have int64_t."
fi
$rm -f try try.*
-set d_int64t
+set d_int64_t
eval $setvar
: Look for isascii
set try
if eval $compile; then
val="$define"
- echo " Yes, it does." >&4
+ echo " " >&4
+ echo "You have have long long."
else
val="$undef"
- echo " No, it doesn't." >&4
+ echo " " >&4
+ echo "You do not have long long."
fi
$rm try.*
set d_longlong
set mktime d_mktime
eval $inlibc
+: 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 if mprotect exists
set mprotect d_mprotect
eval $inlibc
eval $setvar
quadkind=3
;;
- *) case "$d_int64t" in
+ *) case "$d_int64_t" in
define)
val=int64_t
set quadtype
eval $setvar
$rm -f try.c try
+: check for socklen_t
+echo " "
+$echo $n "Checking to see if your system supports socklen_t...$c" >&4
+$cat >try.c <<EOCP
+#include <sys/types.h>
+#$d_socket HAS_SOCKET
+#ifdef HAS_SOCKET
+#include <sys/socket.h>
+#endif
+int main() { socklen_t x = 16; }
+EOCP
+set try
+if eval $compile; then
+ val="$define"
+ echo " " >&4
+ echo "You have socklen_t."
+else
+ val="$undef"
+ echo " " >&4
+ echo "You do not have socklen_t."
+fi
+$rm -f try try.*
+set d_socklen_t
+eval $setvar
+
: see if sys/stat.h is available
set sys/stat.h i_sysstat
eval $inhdr
*)
case "$alignbytes" in
'') echo "Checking alignment constraints..." >&4
- $cat >try.c <<'EOCP'
+ if $test "X$uselongdouble" = Xdefine -a "X$d_longdbl" = Xdefine; then
+ $cat >try.c <<'EOCP'
+typedef long double NV;
+EOCP
+ else
+ $cat >try.c <<'EOCP'
+typedef double NV;
+EOCP
+ fi
+ $cat >>try.c <<'EOCP'
#include <stdio.h>
struct foobar {
char foo;
- double bar;
+ NV bar;
} try_algn;
int main()
{
*) 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
d_iconv='$d_iconv'
d_index='$d_index'
d_inetaton='$d_inetaton'
-d_int64t='$d_int64t'
+d_int64_t='$d_int64_t'
d_isascii='$d_isascii'
d_killpg='$d_killpg'
d_lchown='$d_lchown'
d_sigaction='$d_sigaction'
d_sigsetjmp='$d_sigsetjmp'
d_socket='$d_socket'
+d_socklen_t='$d_socklen_t'
d_sockpair='$d_sockpair'
d_sqrtl='$d_sqrtl'
d_statblks='$d_statblks'
libsdirs='$libsdirs'
libsfiles='$libsfiles'
libsfound='$libsfound'
+libspath='$libspath'
libswanted='$libswanted'
line='$line'
lint='$lint'