This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
.github - switch to v3 actions
[perl5.git] / Configure
index ab468d5..6727379 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -1235,6 +1235,7 @@ u8size=''
 u8type=''
 uvsize=''
 uvtype=''
+i32dformat=''
 ivdformat=''
 nvEUformat=''
 nvFUformat=''
@@ -1242,6 +1243,10 @@ nvGUformat=''
 nveformat=''
 nvfformat=''
 nvgformat=''
+u32XUformat=''
+u32oformat=''
+u32uformat=''
+u32xformat=''
 uvXUformat=''
 uvoformat=''
 uvuformat=''
@@ -1505,7 +1510,7 @@ archname=''
 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.
@@ -2215,6 +2220,7 @@ $startsh
 xxxm=\$dflt
 $myecho
 ans='!'
+counter=42
 case "\$fastread" in
 yes) case "\$dflt" in
        '') ;;
@@ -2289,6 +2295,12 @@ while expr "X\$ans" : "X!" >/dev/null; do
                $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";;
@@ -3494,7 +3506,10 @@ EOM
                        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//'`
@@ -17026,6 +17041,10 @@ $cat <<EOP >try.c
 #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
@@ -20124,6 +20143,10 @@ EOM
 #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()
@@ -21789,6 +21812,45 @@ case "$ivdformat" in
     ;;
 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 " "
@@ -25252,6 +25314,7 @@ html3dir='$html3dir'
 html3direxp='$html3direxp'
 i16size='$i16size'
 i16type='$i16type'
+i32dformat='$i32dformat'
 i32size='$i32size'
 i32type='$i32type'
 i64size='$i64size'
@@ -25639,8 +25702,12 @@ troff='$troff'
 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'