# $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $
#
-# Generated on Sat Feb 10 17:48:04 CET 2007 [metaconfig 3.0 PL70]
+# Generated on Wed Apr 18 21:01:29 CEST 2007 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
voidflags="$ans"
;;
esac
-$rm -f try.* .out
+$rm -f try try.* .out
: check for length of pointer
echo " "
set dld.h i_dld
eval $inhdr
+
+echo " "
+echo "Checking for C++..." >&4
+cat >try.c <<'EOCP'
+#include <stdio.h>
+int main(void)
+{
+#ifdef __cplusplus
+ printf("define\n");
+#else
+ printf("undef\n");
+#endif
+ return 0;
+}
+EOCP
+set try
+if eval $compile_ok && $run ./try >cplusplus$$; then
+ val=`$cat cplusplus$$`
+ echo "You are using a C++ compiler."
+else
+ val="$undef"
+ echo "You are not using a C++ compiler."
+fi
+$rm -f try try.* cplusplus$$
+set d_cplusplus
+eval $setvar
+
: is a C symbol defined?
csym='tlook=$1;
case "$3" in
case "$tx" in
yes)
tval=false;
+ case "$d_cplusplus" in
+ $define) extern_C=\"C\";;
+ esac;
if $test "$runnm" = true; then
if $contains $tlook $tf >/dev/null 2>&1; then
tval=true;
elif $test "$mistrustnm" = compile -o "$mistrustnm" = run; then
- echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+ echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c >/dev/null 2>&1 $libs && tval=true;
$test "$mistrustnm" = run -a -x try && { $run ./try$_exe >/dev/null 2>&1 || tval=false; };
$rm -f try$_exe try.c core core.* try.core;
fi;
else
- echo "void *(*(p()))$tdc { extern void *$1$tdc; return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
+ echo "extern $extern_C void *$1$tdc; void *(*(p()))$tdc { return &$1; } int main() { if(p()) return(0); else return(1); }"> try.c;
$cc -o try $optimize $ccflags $ldflags try.c $libs >/dev/null 2>&1 && tval=true;
$rm -f try$_exe try.c;
fi;
esac;;
esac'
-
-echo " "
-echo "Checking for C++..." >&4
-cat >try.c <<'EOCP'
-#include <stdio.h>
-int main(void)
-{
-#ifdef __cplusplus
- printf("define\n");
-#else
- printf("undef\n");
-#endif
- return 0;
-}
-EOCP
-set try
-if eval $compile_ok && $run ./try >cplusplus$$; then
- val=`$cat cplusplus$$`
- echo "You are using a C++ compiler."
-else
- val="$undef"
- echo "You are not using a C++ compiler."
-fi
-$rm -f try try.* cplusplus$$
-set d_cplusplus
-eval $setvar
-
: see if dlopen exists
xxx_runnm="$runnm"
xxx_ccflags="$ccflags"
;;
*) case "$osname" in
darwin) dflt='none' ;;
- svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
+ linux*|svr4*|esix*|solaris|nonstopux) dflt='-fPIC' ;;
*) dflt='-fpic' ;;
esac ;;
esac ;;
'') dflt="$dflt +vnocompatwarnings" ;;
esac
;;
- linux|irix*|gnu*) dflt='-shared' ;;
+ linux|irix*|gnu*) dflt="-shared $optimize" ;;
next) dflt='none' ;;
solaris) dflt='-G' ;;
sunos) dflt='-assert nodefinitions' ;;
fi;
set $varname;
eval $setvar;
-$rm -f try.c try.o'
+$rm -f try try.c try.o'
: see if we should include time.h, sys/time.h, or both
echo " "
esac
set d_castneg
eval $setvar
-$rm -f try.*
+$rm -f try try.*
: see if vprintf exists
echo " "
fi;
set $varname;
eval $setvar;
-$rm -f try.c try.o'
+$rm -f try try.c try.o'
socketlib=''
sockethdr=''
. ./myread
direntrytype="$ans"
fi
-$rm -f try.c
+$rm -f try try.c
: see if the directory entry stores field length
fi
set d_dirnamlen
eval $setvar
-$rm -f try.c
+$rm -f try try.c
: Look for DIR.dd_fd
case "$i_dirent" in
0) echo "Yes, it does" >&4
d_futimes="$define"
;;
- *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)\n" >&4
+ *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)" >&4
;;
esac
else
- echo "No, it does not (probably harmless)\n" >&4
+ echo "No, it does not (probably harmless)" >&4
fi
$rm -f try.* try core core.try.*
EOCP
set try
if eval $compile; then
- if ./try; then
+ if $run ./try; then
d_localtime_r_needs_tzset=undef;
else
d_localtime_r_needs_tzset=define;
fi
set d_volatile
eval $setvar
-$rm -f try.*
+$rm -f try try.*
echo " "
EOCP
set try
if eval $compile_ok; then
- if ./try 2>/dev/null; then
+ if $run ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
EOCP
set try
if eval $compile_ok; then
- if ./try 2>/dev/null; then
+ if $run ./try 2>/dev/null; then
echo "Yes, it can."
val="$define"
else
fi
set d_strctcpy
eval $setvar
-$rm -f try.*
+$rm -f try try.*
: see if strerror and/or sys_errlist[] exist
echo " "
d_strtoul="$undef"
;;
esac
+ else
+ echo "(I can't seem to compile the test program--assuming it doesn't)"
+ d_strtoul="$undef"
fi
;;
esac
d_strtoull="$undef"
;;
esac
+ else
+ echo "(I can't seem to compile the test program--assuming it doesn't)"
+ d_strtoull="$undef"
fi
;;
esac
d_strtouq="$undef"
;;
esac
+ else
+ echo "(I can't seem to compile the test program--assuming it doesn't)"
+ d_strtouq="$undef"
fi
;;
esac
EOCP
xxx_prompt=y
set try
- if eval $compile && ./try > /dev/null; then
+ if eval $compile && $run ./try > /dev/null; then
dflt=`$run ./try`
case "$dflt" in
[1-4][1-4][1-4][1-4]|12345678|87654321)
;;
esac
fi
- $rm -f try.*
+ $rm -f try try.*
;;
esac
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.*
+ $rm -f try try.*
echo "Your version of Berkeley DB uses $db_hashtype for hash."
;;
*) 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_prefixtype." >&4
fi
- $rm -f try.*
+ $rm -f try try.*
echo "Your version of Berkeley DB uses $db_prefixtype for prefix."
;;
*) db_prefixtype='size_t'
case "$xxx" in
DynaLoader|dynaload) ;;
*)
- if $test -f $xxx/$xxx.xs; then
+ if $test -f $xxx/$xxx.xs -o -f $xxx/$xxx.c; then
known_extensions="$known_extensions $1$xxx";
elif $test -f $xxx/Makefile.PL; then
nonxs_extensions="$nonxs_extensions $1$xxx";
esac
esac
;;
- Win32)
+ Win32*)
case "$osname" in
cygwin) avail_ext="$avail_ext $xxx" ;;
esac