d_attribute_noreturn=''
d_attribute_pure=''
d_attribute_unused=''
+d_attribute_visibility=''
d_attribute_warn_unused_result=''
d_printf_format_null=''
d_backtrace=''
d_semop=''
d_sendmsg=''
d_setegid=''
+d_setenv=''
d_seteuid=''
d_setgrent=''
d_setgrent_r=''
d_statfs_s=''
d_static_inline=''
perl_static_inline=''
-d_thread_local=''
-perl_thread_local=''
d_fstatvfs=''
d_statvfs=''
d_stdio_cnt_lval=''
d_tcsetpgrp=''
d_telldirproto=''
d_tgamma=''
+d_thread_local=''
+perl_thread_local=''
d_time=''
timetype=''
d_asctime64=''
u8type=''
uvsize=''
uvtype=''
+i32dformat=''
ivdformat=''
nvEUformat=''
nvFUformat=''
nveformat=''
nvfformat=''
nvgformat=''
+u32XUformat=''
+u32oformat=''
+u32uformat=''
+u32xformat=''
uvXUformat=''
uvoformat=''
uvuformat=''
usereentrant='undef'
: List of libraries we want.
: If anyone needs extra -lxxx, put those in a hint file.
-libswanted="cl pthread socket bind inet nsl ndbm gdbm dbm db malloc dl ld"
+libswanted="cl pthread socket bind inet ndbm gdbm dbm db malloc dl ld"
libswanted="$libswanted sun m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
xxxm=\$dflt
$myecho
ans='!'
+counter=42
case "\$fastread" in
yes) case "\$dflt" in
'') ;;
$myecho
;;
esac
+ counter=\`echo \$counter | awk '{ print --\$0 }'\`
+ if [ \$counter = 0 ]; then
+ echo >&4
+ echo >&4 Too many attempts asking the same question. Giving up.
+ exit 1
+ fi
done
case "\$ans" in
'') ans="\$xxxm";;
osvers="$3"
;;
dragonfly) osname=dragonfly
- osvers="$3"
+ case "$3" in
+ [0-9]*) osvers="$3" ;;
+ *) osvers="$2" ;;
+ esac
;;
dynixptx*) osname=dynixptx
osvers=`echo "$4"|sed 's/^v//'`
# (Does this syntax conflict with something else that was valid C89?)
# We also add a declaration after a statement to detect whether the compiler
# (or the user supplied -Accflags) consider such declarations to be errors.
-# This causes ./Configure with -Accflags="-Werror=declaration-after-statement"
+# This causes 'Configure with -Accflags="-Werror=declaration-after-statement"'
# to fail hard and early.
#
# Annoyingly -std=c99 will cause gcc to tell glibc not to define prototypes for
esac
$rm -f try try.*
-
: What should the include directory be ?
: Use sysroot if set, so findhdr looks in the right place.
echo " "
$test -f "$xxx" && libstyle=shared
fi
if test ! -f "$xxx"; then
+ xxx=$thisdir/lib$thislib.$so$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle="import"
+ fi
+ if test ! -f "$xxx"; then
+ xxx=$thisdir/$thislib.$so$_a
+ $test -f "$xxx" && eval $libscheck
+ $test -f "$xxx" && libstyle="import"
+ fi
+ if test ! -f "$xxx"; then
xxx=$thisdir/lib$thislib.$so
$test -f "$xxx" && eval $libscheck
$test -f "$xxx" && libstyle=shared
If you or somebody else will be maintaining perl at your site, please
fill in the correct e-mail address here so that they may be contacted
-if necessary. Currently, the "perlbug" program included with perl
-will send mail to this address in addition to perlbug@perl.org. You may
-enter "none" for no administrator.
+if necessary. You may enter "none" for no administrator.
EOM
case "$perladmin" in
eval $setvar
$rm -f attrib*
+: Look for GCC-style attribute visibility
+case "$d_attribute_visibility" in
+'')
+echo " "
+echo "Checking whether your compiler can handle __attribute__((visibility)) ..." >&4
+$cat >attrib.c <<'EOCP'
+#include <stdio.h>
+__attribute__((visibility("hidden"))) int I_will_be_hidden(void);
+EOCP
+if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then
+ if $compiler_warning attrib.out >/dev/null 2>&1; then
+ echo "Your C compiler doesn't support __attribute__((visibility))."
+ val="$undef"
+ else
+ echo "Your C compiler supports __attribute__((visibility))."
+ val="$define"
+ fi
+else
+ echo "Your C compiler doesn't seem to understand __attribute__ at all."
+ val="$undef"
+fi
+;;
+*) val="$d_attribute_visibility" ;;
+esac
+set d_attribute_visibility
+eval $setvar
+$rm -f attrib*
+
: see if getpgrp exists
set getpgrp d_getpgrp
eval $inlibc
#ifdef I_STDLIB
#include <stdlib.h>
#endif
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
#include <sys/types.h>
#include <signal.h>
#ifdef SIGFPE
set setegid d_setegid
eval $inlibc
+: see if setenv exists
+set setenv d_setenv
+eval $inlibc
+
: see if seteuid exists
set seteuid d_seteuid
eval $inlibc
$rm -f a.[co] b.[co]
$rm_try
-: see what flavor, if any, of thread local storage is supported
-echo " "
-echo "Checking to see if your system supports C11 thread local storage..."
-$cat > try.c <<'EOCP'
-#include <stdio.h>
-#include <stdlib.h>
-#include <pthread.h>
-
-static int plus_one = 1;
-static int minus_one = -1;
-
-PROBE_MACRO int *minion;
-
-int callback (const void *a, const void *b) {
- int val_a = *minion * *(const int *)a;
- int val_b = *minion * *(const int *)b;
- return val_a < val_b ? -1 : val_a > val_b;
-}
-
-#define SIZE 8
-
-void *thread_function(void *arg) {
- /* thread local variables should start zeroed in each thread. */
- if (minion != NULL) {
- fprintf(stderr, "__thread variable started with %p, should be NULL\n",
- minion);
- exit(2);
- }
- minion = &minus_one;
-
- int array[SIZE];
- unsigned int i;
- for (i = 0; i < SIZE; ++i) {
- /* "Hash randomisation" - this array isn't in sorted order: */
- array[i ^ 5] = i * i;
- }
-
- qsort(array, SIZE, sizeof(int), callback);
-
- int bad = 0;
- for (i = 0; i < SIZE; ++i) {
- int want = (SIZE - 1 - i) * (SIZE - 1 - i);
- int have = array[i];
- if (want != have) {
- ++bad;
- fprintf(stderr, "array[%u] - want %i, have %i\n", i, want, have);
- }
- }
- if (bad)
- exit(3);
-
- return NULL;
-}
-
-int main(int argc, char **argv) {
- if (minion != NULL) {
- fprintf(stderr, "__thread variable started with %p, should be NULL\n",
- minion);
- exit(4);
- }
-
- minion = &plus_one;
-
- pthread_t tid;
- int result = pthread_create(&tid, NULL, thread_function, NULL);
- if (result) {
- fprintf(stderr, "pthread_create failed (%d)\n", result);
- exit(5);
- }
-
- result = pthread_join(tid, NULL);
- if (result) {
- fprintf(stderr, "pthread_join failed (%d)\n", result);
- exit(6);
- }
-
- if (minion == NULL) {
- fprintf(stderr, "__thread variable should not be NULL\n");
- exit(7);
- }
- if (!(minion == &plus_one && *minion == 1)) {
- fprintf(stderr, "__thread variable should be %d @ %p, not %d @ %p\n",
- 1, &plus_one, *minion, minion);
- exit(8);
- }
-
- return 0;
-}
-EOCP
-
-# Respect a hint (or previous) value for perl_thread_local, if there is one.
-case "$perl_thread_local" in
-'') # Check the various possibilities, and break out on success.
- for thread_local in _Thread_local __thread; do
- set try -DPROBE_MACRO=$thread_local
- if eval $compile && $run ./try; then
- $echo "Your compiler supports $thread_local." >&4
- val=$define
- perl_thread_local="$thread_local";
- break;
- fi
- $echo "Your compiler does NOT support $thread_local." >&4
- val="$undef"
- done
- ;;
-*thread*|*Thread*) # Some variant of thread local exists.
- echo "Keeping your $hint value of $perl_thread_local."
- val=$define
- ;;
-*) # Unrecognized previous value -- blindly trust the supplied
- # value and hope it makes sense. Use old value for
- # d_thread_local, if there is one.
- echo "Keeping your $hint value of $perl_thread_local."
- case "$d_thread_local" in
- '') val=$define ;;
- *) val=$d_thread_local ;;
- esac
- ;;
-esac
-set d_thread_local
-eval $setvar
-$rm_try
-
: Check stream access
$cat >&4 <<EOM
Checking how to access stdio streams by file descriptor number...
set tgamma d_tgamma
eval $inlibc
+: see what flavor, if any, of thread local storage is supported
+echo " "
+echo "Checking to see if your system supports C11 thread local storage..."
+$cat > try.c <<'EOCP'
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+static int plus_one = 1;
+static int minus_one = -1;
+
+PROBE_MACRO int *minion;
+
+int callback (const void *a, const void *b) {
+ int val_a = *minion * *(const int *)a;
+ int val_b = *minion * *(const int *)b;
+ return val_a < val_b ? -1 : val_a > val_b;
+}
+
+#define SIZE 8
+
+void *thread_function(void *arg) {
+ /* thread local variables should start zeroed in each thread. */
+ if (minion != NULL) {
+ fprintf(stderr, "__thread variable started with %p, should be NULL\n",
+ minion);
+ exit(2);
+ }
+ minion = &minus_one;
+
+ int array[SIZE];
+ unsigned int i;
+ for (i = 0; i < SIZE; ++i) {
+ /* "Hash randomisation" - this array isn't in sorted order: */
+ array[i ^ 5] = i * i;
+ }
+
+ qsort(array, SIZE, sizeof(int), callback);
+
+ int bad = 0;
+ for (i = 0; i < SIZE; ++i) {
+ int want = (SIZE - 1 - i) * (SIZE - 1 - i);
+ int have = array[i];
+ if (want != have) {
+ ++bad;
+ fprintf(stderr, "array[%u] - want %i, have %i\n", i, want, have);
+ }
+ }
+ if (bad)
+ exit(3);
+
+ return NULL;
+}
+
+int main(int argc, char **argv) {
+ if (minion != NULL) {
+ fprintf(stderr, "__thread variable started with %p, should be NULL\n",
+ minion);
+ exit(4);
+ }
+
+ minion = &plus_one;
+
+ pthread_t tid;
+ int result = pthread_create(&tid, NULL, thread_function, NULL);
+ if (result) {
+ fprintf(stderr, "pthread_create failed (%d)\n", result);
+ exit(5);
+ }
+
+ result = pthread_join(tid, NULL);
+ if (result) {
+ fprintf(stderr, "pthread_join failed (%d)\n", result);
+ exit(6);
+ }
+
+ if (minion == NULL) {
+ fprintf(stderr, "__thread variable should not be NULL\n");
+ exit(7);
+ }
+ if (!(minion == &plus_one && *minion == 1)) {
+ fprintf(stderr, "__thread variable should be %d @ %p, not %d @ %p\n",
+ 1, &plus_one, *minion, minion);
+ exit(8);
+ }
+
+ return 0;
+}
+EOCP
+
+# Respect a hint (or previous) value for perl_thread_local, if there is one.
+case "$perl_thread_local" in
+'') # Check the various possibilities, and break out on success.
+ for thread_local in _Thread_local __thread; do
+ set try -DPROBE_MACRO=$thread_local
+ if eval $compile && $run ./try; then
+ $echo "Your compiler supports $thread_local." >&4
+ val=$define
+ perl_thread_local="$thread_local";
+ break;
+ fi
+ $echo "Your compiler does NOT support $thread_local." >&4
+ val="$undef"
+ done
+ ;;
+*thread*|*Thread*) # Some variant of thread local exists.
+ echo "Keeping your $hint value of $perl_thread_local."
+ val=$define
+ ;;
+*) # Unrecognized previous value -- blindly trust the supplied
+ # value and hope it makes sense. Use old value for
+ # d_thread_local, if there is one.
+ echo "Keeping your $hint value of $perl_thread_local."
+ case "$d_thread_local" in
+ '') val=$define ;;
+ *) val=$d_thread_local ;;
+ esac
+ ;;
+esac
+set d_thread_local
+eval $setvar
+$rm_try
+
: see if time exists
echo " "
if test "X$d_time" = X -o X"$timetype" = X; then
#ifdef I_STDLIB
#include <stdlib.h>
#endif
+#$i_inttypes I_INTTYPES
+#ifdef I_INTTYPES
+#include <inttypes.h>
+#endif
#include <sys/types.h>
typedef $uvtype UV;
int main()
memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10);
memset((char *)&ldnan + 10, '\0', LONG_DOUBLESIZE - 10);
# endif
+#endif
if (argc == 2) {
switch (argv[1][0]) {
case '1': bytes(&dinf, sizeof(dinf)); break;
case '2': bytes(&dnan, sizeof(dnan)); break;
+#ifdef HAS_LONG_DOUBLE
case '3': bytes(&ldinf, sizeof(ldinf)); break;
case '4': bytes(&ldnan, sizeof(ldnan)); break;
#endif
case "$yyy" in
12345678901)
sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64;
- sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64;
+ sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIX64;
echo "We will use the C9X style."
;;
esac
;;
esac
+case "$i32dformat" in
+'') case "$i32type" in
+ int)
+ i32dformat='"d"'
+ u32uformat='"u"'
+ u32oformat='"o"'
+ u32xformat='"x"'
+ u32XUformat='"X"'
+ ;;
+ long)
+ i32dformat='"ld"'
+ u32uformat='"lu"'
+ u32oformat='"lo"'
+ u32xformat='"lx"'
+ u32XUformat='"lX"'
+ ;;
+ int_least32_t) : will not happen currently
+ i32dformat=PRIdLEAST32
+ u32uformat=PRIuLEAST32
+ u32oformat=PRIoLEAST32
+ u32xformat=PRIxLEAST32
+ u32XUformat=PRIXLEAST32
+ ;;
+ int32_t)
+ i32dformat=PRId32
+ u32uformat=PRIu32
+ u32oformat=PRIo32
+ u32xformat=PRIx32
+ u32XUformat=PRIX32
+ ;;
+ esac ;;
+esac
+
+case "$i32dformat" in
+'') echo "$0: Fatal: failed to find format strings for 32-bit integers, cannot continue." >&4
+ exit 1
+ ;;
+esac
+
: Check format string for GID
echo " "
fi
$rm_try
-: Check the size of st_ino
+: Check the size of st_dev
$echo " "
-$echo "Checking the size of st_ino..." >&4
+$echo "Checking the size of st_dev..." >&4
$cat > try.c <<EOCP
#include <sys/stat.h>
#include <stdio.h>
#endif
int main() {
struct stat st;
- printf("%d\n", (int)sizeof(st.st_ino));
+ printf("%d\n", (int)sizeof(st.st_dev));
exit(0);
}
EOCP
if eval $compile_ok; then
val=`$run ./try`
case "$val" in
- '') st_ino_size=4
- $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
+ '') st_dev_size=4
+ $echo "(I can't execute the test program--guessing $st_dev_size.)" >&4
;;
- *) st_ino_size=$val
- $echo "Your st_ino is $st_ino_size bytes long."
+ *) st_dev_size=$val
+ $echo "Your st_dev is $st_dev_size bytes long."
;;
esac
else
- st_ino_size=4
- $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
+ st_dev_size=4
+ $echo "(I can't compile the test program--guessing $st_dev_size.)" >&4
fi
$rm_try
-: Check if st_ino is signed
+: Check if st_dev is signed
$echo " "
-$echo "Checking the sign of st_ino..." >&4
+$echo "Checking the sign of st_dev..." >&4
$cat > try.c <<EOCP
#include <sys/stat.h>
#include <stdio.h>
int main() {
struct stat foo;
- foo.st_ino = -1;
- if (foo.st_ino < 0)
+ foo.st_dev = -1;
+ if (foo.st_dev < 0)
printf("-1\n");
else
printf("1\n");
if eval $compile; then
val=`$run ./try`
case "$val" in
- '') st_ino_sign=1
+ '') st_dev_sign=1
$echo "(I can't execute the test program--guessing unsigned.)" >&4
;;
- *) st_ino_sign=$val
- case "$st_ino_sign" in
- 1) $echo "Your st_ino is unsigned." ;;
- -1) $echo "Your st_ino is signed." ;;
+ *) st_dev_sign=$val
+ case "$st_dev_sign" in
+ 1) $echo "Your st_dev is unsigned." ;;
+ -1) $echo "Your st_dev is signed." ;;
esac
;;
esac
else
- st_ino_sign=1
+ st_dev_sign=1
$echo "(I can't compile the test program--guessing unsigned.)" >&4
fi
$rm_try
-: Check the size of st_dev
+: Check the size of st_ino
$echo " "
-$echo "Checking the size of st_dev..." >&4
+$echo "Checking the size of st_ino..." >&4
$cat > try.c <<EOCP
#include <sys/stat.h>
#include <stdio.h>
#endif
int main() {
struct stat st;
- printf("%d\n", (int)sizeof(st.st_dev));
+ printf("%d\n", (int)sizeof(st.st_ino));
exit(0);
}
EOCP
if eval $compile_ok; then
val=`$run ./try`
case "$val" in
- '') st_dev_size=4
- $echo "(I can't execute the test program--guessing $st_dev_size.)" >&4
+ '') st_ino_size=4
+ $echo "(I can't execute the test program--guessing $st_ino_size.)" >&4
;;
- *) st_dev_size=$val
- $echo "Your st_dev is $st_dev_size bytes long."
+ *) st_ino_size=$val
+ $echo "Your st_ino is $st_ino_size bytes long."
;;
esac
else
- st_dev_size=4
- $echo "(I can't compile the test program--guessing $st_dev_size.)" >&4
+ st_ino_size=4
+ $echo "(I can't compile the test program--guessing $st_ino_size.)" >&4
fi
$rm_try
-: Check if st_dev is signed
+: Check if st_ino is signed
$echo " "
-$echo "Checking the sign of st_dev..." >&4
+$echo "Checking the sign of st_ino..." >&4
$cat > try.c <<EOCP
#include <sys/stat.h>
#include <stdio.h>
int main() {
struct stat foo;
- foo.st_dev = -1;
- if (foo.st_dev < 0)
+ foo.st_ino = -1;
+ if (foo.st_ino < 0)
printf("-1\n");
else
printf("1\n");
if eval $compile; then
val=`$run ./try`
case "$val" in
- '') st_dev_sign=1
+ '') st_ino_sign=1
$echo "(I can't execute the test program--guessing unsigned.)" >&4
;;
- *) st_dev_sign=$val
- case "$st_dev_sign" in
- 1) $echo "Your st_dev is unsigned." ;;
- -1) $echo "Your st_dev is signed." ;;
+ *) st_ino_sign=$val
+ case "$st_ino_sign" in
+ 1) $echo "Your st_ino is unsigned." ;;
+ -1) $echo "Your st_ino is signed." ;;
esac
;;
esac
else
- st_dev_sign=1
+ st_ino_sign=1
$echo "(I can't compile the test program--guessing unsigned.)" >&4
fi
$rm_try
d_attribute_noreturn='$d_attribute_noreturn'
d_attribute_pure='$d_attribute_pure'
d_attribute_unused='$d_attribute_unused'
+d_attribute_visibility='$d_attribute_visibility'
d_attribute_warn_unused_result='$d_attribute_warn_unused_result'
d_backtrace='$d_backtrace'
d_bsd='$d_bsd'
d_semop='$d_semop'
d_sendmsg='$d_sendmsg'
d_setegid='$d_setegid'
+d_setenv='$d_setenv'
d_seteuid='$d_seteuid'
d_setgrent='$d_setgrent'
d_setgrent_r='$d_setgrent_r'
html3direxp='$html3direxp'
i16size='$i16size'
i16type='$i16type'
+i32dformat='$i32dformat'
i32size='$i32size'
i32type='$i32type'
i64size='$i64size'
ttyname_r_proto='$ttyname_r_proto'
u16size='$u16size'
u16type='$u16type'
+u32XUformat='$u32XUformat'
+u32oformat='$u32oformat'
u32size='$u32size'
u32type='$u32type'
+u32uformat='$u32uformat'
+u32xformat='$u32xformat'
u64size='$u64size'
u64type='$u64type'
u8size='$u8size'