# See Porting/pumpkin.pod for more information on metaconfig.
#
-# Generated on Sun Jul 31 12:11:29 CEST 2011 [metaconfig 3.5 PL0]
+# Generated on Thu Feb 16 16:57:30 CET 2012 [metaconfig 3.5 PL0]
# (with additional metaconfig patches by perlbug@perl.org)
cat >c1$$ <<EOF
d_inetpton=''
d_int64_t=''
d_isascii=''
+d_isblank=''
d_isfinite=''
d_isinf=''
d_isnan=''
d_vsnprintf=''
d_sockatmark=''
d_sockatmarkproto=''
+d_ipv6_mreq=''
d_msg_ctrunc=''
d_msg_dontroute=''
d_msg_oob=''
d_oldsock=''
d_scm_rights=''
d_sin6_scope_id=''
+d_sockaddr_in6=''
d_sockaddr_sa_len=''
d_socket=''
d_sockpair=''
i_sfio=''
i_shadow=''
i_socks=''
+i_stdbool=''
i_stddef=''
i_stdlib=''
i_string=''
dtrace=''
usedtrace=''
usefaststdio=''
+usekernprocpathname=''
ccflags_uselargefiles=''
ldflags_uselargefiles=''
libswanted_uselargefiles=''
nm_so_opt=''
runnm=''
usenm=''
+usensgetexecutablepath=''
useperlio=''
usesocks=''
d_oldpthreads=''
groupstype=''
i_whoami=''
+: Trailing extension. Override this in a hint file, if needed.
+: Extra object files, if any, needed on this platform.
+archobjs=''
archname=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
EBUGGING=''
DEBUGGING=''
-: set usethreads on the Configure command line to enable threads.
-usereentrant='undef'
-: Trailing extension. Override this in a hint file, if needed.
-: Extra object files, if any, needed on this platform.
-archobjs=''
libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
xlibpth='/usr/lib/386 /lib/386'
libswanted=''
: some systems want to use only the non-versioned libso:s
ignore_versioned_solibs=''
+: set usethreads on the Configure command line to enable threads.
+usereentrant='undef'
: full support for void wanted by default
defvoidused=15
4) dflt='y' ;;
*) dflt='n' ;;
esac
+ if test "$useithreads" = "$define"; then dflt='n'; fi
;;
esac
rp="Do you wish to attempt to use the malloc that comes with $package?"
$rm_try
echo " "
+echo "Checking the availability struct sockaddr_in6 ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct sockaddr_in6 sin6;
+return (sin6.sin6_family);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+ val="$define"
+fi
+set d_sockaddr_in6; eval $setvar
+$rm_try
+
+echo " "
echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4
$cat >try.c <<EOF
#include <sys/types.h>
$rm_try
echo " "
+echo "Checking the availability struct ipv6_mreq ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct ipv6_mreq mreq;
+return (mreq.ipv6mr_interface);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+ val="$define"
+fi
+set d_ipv6_mreq; eval $setvar
+$rm_try
+
+echo " "
echo "Checking the availability of certain socket constants..." >&4
for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do
enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'`
eval $setvar
$rm -f isascii*
+: Look for isblank
+echo " "
+$cat >isblank.c <<'EOCP'
+#include <stdio.h>
+#include <ctype.h>
+int main() {
+ int c = ' ';
+ if (isblank(c))
+ exit(0);
+ else
+ exit(1);
+}
+EOCP
+if $cc $ccflags $ldflags -o isblank isblank.c $libs >/dev/null 2>&1 ; then
+ echo "isblank() found." >&4
+ val="$define"
+else
+ echo "isblank() NOT found." >&4
+ val="$undef"
+fi
+set d_isblank
+eval $setvar
+$rm -f isblank*
+
: see if isfinite exists
set isfinite d_isfinite
eval $inlibc
procselfexe=''
val="$undef"
case "$d_readlink" in
-"$define")
- if $issymlink /proc/self/exe ; then
- $ls -l /proc/self/exe > reflect
+ "$define")
+ : NetBSD first as /proc/self is a symlink to /proc/curproc, and it feels
+ : more tidy to avoid an extra level of symlink
+ set NetBSD /proc/curproc/exe Linux /proc/self/exe FreeBSD /proc/curproc/file Solaris /proc/self/path/a.out
+ while test $# -gt 0; do
+ type=$1; try=$2
+ shift; shift
+ if $issymlink $try; then
+ $ls -l $try > reflect
if $contains /`basename $ls` reflect >/dev/null 2>&1; then
- echo "You have Linux-like /proc/self/exe."
- procselfexe='"/proc/self/exe"'
- val="$define"
- fi
- fi
- if $issymlink /proc/curproc/file ; then
- $ls -l /proc/curproc/file > reflect
- if $contains /`basename $ls` reflect >/dev/null 2>&1; then
- echo "You have BSD-like /proc/curproc/file."
- procselfexe='"/proc/curproc/file"'
- val="$define"
+ echo "You have $type-like $try."
+ procselfexe='"'$try'"'
+ val="$define"
+ : This will break out of the loop
+ set X; shift
fi
- fi
+ fi
+ done
;;
esac
$rm -f reflect
;;
esac
+: Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
+echo " "
+echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
+$cat >try.c <<'EOM'
+/* Intentionally a long probe as I'd like to sanity check that the exact
+ approach is going to work, as thinking it will work, but only having it
+ part working at runtime is worse than not having it. */
+
+#include <sys/types.h>
+#include <sys/sysctl.h>
+#include <sys/param.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+int
+main(int argc, char **argv) {
+ char *buffer;
+ char *argv_leaf = strrchr(argv[0], '/');
+ char *buffer_leaf;
+ size_t size = 0;
+ int mib[4];
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
+ mib[2] = KERN_PROC_PATHNAME;
+ mib[3] = -1;
+
+ if (!argv_leaf) {
+ fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
+ return 1;
+ }
+
+ if (sysctl(mib, 4, NULL, &size, NULL, 0)) {
+ perror("sysctl");
+ return 2;
+ }
+
+ if (size < strlen(argv_leaf) + 1) {
+ fprintf(stderr, "size %lu is too short for a path\n",
+ (unsigned long) size);
+ return 3;
+ }
+
+ if (size > MAXPATHLEN * MAXPATHLEN) {
+ fprintf(stderr, "size %lu is too long for a path\n",
+ (unsigned long) size);
+ return 4;
+ }
+
+ buffer = malloc(size);
+ if (!buffer) {
+ perror("malloc");
+ return 5;
+ }
+
+ if (sysctl(mib, 4, buffer, &size, NULL, 0)) {
+ perror("sysctl");
+ return 6;
+ }
+
+ if (strlen(buffer) + 1 != size) {
+ fprintf(stderr, "size != strlen(buffer) + 1 (%lu != %lu)\n",
+ (unsigned long)size, (unsigned long)strlen(buffer) + 1);
+ return 7;
+ }
+
+
+ if (*buffer != '/') {
+ fprintf(stderr, "Not an absolute path: '%s'\n", buffer);
+ return 8;
+ }
+
+ if (strstr(buffer, "/./")) {
+ fprintf(stderr, "Contains /./: '%s'\n", buffer);
+ return 9;
+ }
+
+ if (strstr(buffer, "/../")) {
+ fprintf(stderr, "Contains /../: '%s'\n", buffer);
+ return 10;
+ }
+
+ buffer_leaf = strrchr(buffer, '/');
+ if (strcmp(buffer_leaf, argv_leaf) != 0) {
+ fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], buffer);
+ return 11;
+ }
+
+ free(buffer);
+
+ return 0;
+}
+EOM
+
+val=$undef
+set try
+if eval $compile_ok; then
+ if $run ./try; then
+ echo "You can use sysctl with KERN_PROC_PATHNAME to find the executing program." >&4
+ val="$define"
+ else
+ echo "Nope, sysctl with KERN_PROC_PATHNAME doesn't work here." >&4
+ val="$undef"
+ fi
+else
+ echo "I'm unable to compile the test program." >&4
+ echo "I'll assume no sysctl with KERN_PROC_PATHNAME here." >&4
+ val="$undef"
+fi
+$rm_try
+set usekernprocpathname
+eval $setvar
+
+: Determine if we can use _NSGetExecutablePath to find executing program
+echo " "
+echo "Determining whether we can use _NSGetExecutablePath to find executing program..." >&4
+$cat >try.c <<'EOM'
+/* Intentionally a long probe as I'd like to sanity check that the exact
+ approach is going to work, as thinking it will work, but only having it
+ part working at runtime is worse than not having it. */
+#include <mach-o/dyld.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/param.h>
+#include <string.h>
+
+int
+main(int argc, char **argv) {
+ char buf[1];
+ uint32_t size = sizeof(buf);
+ int result;
+ char *buffer;
+ char *tidied;
+ char *argv_leaf = strrchr(argv[0], '/');
+ char *tidied_leaf;
+
+ if (!argv_leaf) {
+ fprintf(stderr, "Can't locate / in '%s'\n", argv[0]);
+ return 1;
+ }
+
+ _NSGetExecutablePath(buf, &size);
+ if (size > MAXPATHLEN * MAXPATHLEN) {
+ fprintf(stderr, "_NSGetExecutablePath size %u is too long for a path\n",
+ (unsigned int) size);
+ return 2;
+ }
+
+ buffer = malloc(size);
+ if (!buffer) {
+ perror("malloc");
+ return 3;
+ }
+
+ result = _NSGetExecutablePath(buffer, &size);
+ if (result != 0) {
+ fprintf(stderr, "_NSGetExecutablePath returned %i for a size of %u\n",
+ result, (unsigned int) size);
+ return 4;
+ }
+
+ tidied = realpath(buffer, NULL);
+ if (!tidied) {
+ perror("realpath");
+ return 5;
+ }
+
+ free(buffer);
+
+ if (*tidied != '/') {
+ fprintf(stderr, "Not an absolute path: '%s'\n", tidied);
+ return 6;
+ }
+
+ if (strstr(tidied, "/./")) {
+ fprintf(stderr, "Contains /./: '%s'\n", tidied);
+ return 7;
+ }
+
+ if (strstr(tidied, "/../")) {
+ fprintf(stderr, "Contains /../: '%s'\n", tidied);
+ return 8;
+ }
+
+ tidied_leaf = strrchr(tidied, '/');
+ if (strcmp(tidied_leaf, argv_leaf) != 0) {
+ fprintf(stderr, "Leafnames differ: '%s' vs '%s'\n", argv[0], tidied);
+ return 9;
+ }
+
+ free(tidied);
+
+ return 0;
+}
+EOM
+
+val=$undef
+set try
+if eval $compile_ok; then
+ if $run ./try; then
+ echo "You can use _NSGetExecutablePath to find the executing program." >&4
+ val="$define"
+ else
+ echo "Nope, _NSGetExecutablePath doesn't work here." >&4
+ fi
+else
+ echo "I'm unable to compile the test program." >&4
+ echo "I'll assume no _NSGetExecutablePath here." >&4
+fi
+$rm_try
+set usensgetexecutablepath
+eval $setvar
+
: Check if site customization support was requested
case "$usesitecustomize" in
$define|true|[Yy]*)
val=$val2; set i_sgtty; eval $setvar
val=$val3; set i_termios; eval $setvar
+: see if stdbool is available
+: we want a real compile instead of Inhdr because some Solaris systems
+: have stdbool.h, but it can only be used if the compiler indicates it
+: is sufficiently c99-compliant.
+echo " "
+$cat >try.c <<EOCP
+#include <stdio.h>
+#include <stdbool.h>
+int func(bool x)
+{
+ return x ? 1 : 0;
+}
+int main(int argc, char **argv)
+{
+ return func(0);
+}
+EOCP
+set try
+if eval $compile; then
+ echo "<stdbool.h> found." >&4
+ val="$define"
+else
+ echo "<stdbool.h> NOT found." >&4
+ val="$undef"
+fi
+$rm_try
+set i_stdbool
+eval $setvar
+
: see if stddef is available
set stddef.h i_stddef
eval $inhdr
fi;
fi;
else
+ echo " $known_extensions $nonxs_extensions" > $$.tmp;
+ if $contains " $this_ext " $$.tmp; then
+ echo >&4;
+ echo "Duplicate directories detected for extension $xxx" >&4;
+ echo "Configure cannot correctly recover from this - shall I abort?" >&4;
+ case "$knowitall" in
+ "") dflt=y;;
+ *) dflt=n;;
+ esac;
+ . ../UU/myread;
+ case "$ans" in
+ n*|N*) ;;
+ *) echo >&4;
+ echo "Ok. Stopping Configure." >&4;
+ echo "Please remove the duplicate directory (eg using git clean) and then re-run Configure" >&4;
+ exit 1;;
+ esac;
+ echo "Ok. You will need to correct config.sh before running make." >&4;
+ fi;
$ls -1 $xxx > $$.tmp;
if $contains "\.xs$" $$.tmp > /dev/null 2>&1; then
known_extensions="$known_extensions $this_ext";
d_inetntop='$d_inetntop'
d_inetpton='$d_inetpton'
d_int64_t='$d_int64_t'
+d_ipv6_mreq='$d_ipv6_mreq'
d_isascii='$d_isascii'
+d_isblank='$d_isblank'
d_isfinite='$d_isfinite'
d_isinf='$d_isinf'
d_isnan='$d_isnan'
d_sin6_scope_id='$d_sin6_scope_id'
d_sitearch='$d_sitearch'
d_snprintf='$d_snprintf'
+d_sockaddr_in6='$d_sockaddr_in6'
d_sockaddr_sa_len='$d_sockaddr_sa_len'
d_sockatmark='$d_sockatmark'
d_sockatmarkproto='$d_sockatmarkproto'
i_shadow='$i_shadow'
i_socks='$i_socks'
i_stdarg='$i_stdarg'
+i_stdbool='$i_stdbool'
i_stddef='$i_stddef'
i_stdlib='$i_stdlib'
i_string='$i_string'
usedtrace='$usedtrace'
usefaststdio='$usefaststdio'
useithreads='$useithreads'
+usekernprocpathname='$usekernprocpathname'
uselargefiles='$uselargefiles'
uselongdouble='$uselongdouble'
usemallocwrap='$usemallocwrap'
usemultiplicity='$usemultiplicity'
usemymalloc='$usemymalloc'
usenm='$usenm'
+usensgetexecutablepath='$usensgetexecutablepath'
useopcode='$useopcode'
useperlio='$useperlio'
useposix='$useposix'