X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=Configure;h=952a685c0b4f54c46f5cff3da4925ec21107e167;hb=49d8d3a1123fb996c090905424ed66f675b3df17;hp=934958b4ce128abfc24099aec7426c70ae74ca1a;hpb=c6ee37c52f2ca9e544af4866d4237b0404bcddb7;p=p5sagit%2Fp5-mst-13.2.git diff --git a/Configure b/Configure index 934958b..952a685 100755 --- a/Configure +++ b/Configure @@ -63,6 +63,9 @@ if test -d c:/. -a -n "$OS2_SHELL"; then PATH=`cmd /c "echo %PATH%" | tr '\\\\' / ` OS2_SHELL=`cmd /c "echo %OS2_SHELL%" | tr '\\\\' / | tr '[A-Z]' '[a-z]'` fi +if test -d c:/. -a -n "$DJDIR"; then + p_=\; +fi : Proper PATH setting paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin' @@ -1822,7 +1825,7 @@ EOM osf1|mls+) case "$5" in alpha) osname=dec_osf - osvers=`echo "$3" | sed 's/^[vt]//'` + osvers=`echo "$3" | sed 's/^[xvt]//'` ;; hp*) osname=hp_osf1 ;; mips) osname=mips_osf1 ;; @@ -1900,6 +1903,10 @@ EOM set X $myuname osname=os2 osvers="$5" + if test -n "$DJDIR"; then + osname=dos + osvers=djgpp + fi fi fi @@ -5457,13 +5464,13 @@ fi cat <. Versions 5.003_02 and later of perl allow alternate IO +Previous version of $package used the standard IO mechanisms as defined +in . Versions 5.003_02 and later of perl allow alternate IO mechanisms via a "PerlIO" abstraction, but the stdio mechanism is still -the default and is the only supported mechanism. This abstraction -layer can use AT&T's sfio (if you already have sfio installed) or -fall back on standard IO. This PerlIO abstraction layer is -experimental and may cause problems with some extension modules. +the default. This abstraction layer can use AT&T's sfio (if you already +have sfio installed) or regular stdio. Using PerlIO with sfio may cause +problems with some extension modules. Using PerlIO with stdio is safe, +but it is slower than plain stdio and therefore is not the default. If this doesn't make any sense to you, just accept the default 'n'. EOM @@ -8273,7 +8280,7 @@ eval $inhdr case "$i_db" in $define) - : Check db version. We can not use version 2. + : Check db version. echo " " echo "Checking Berkeley DB version ..." >&4 $cat >try.c < main() { -#ifdef DB_VERSION_MAJOR /* DB version >= 2: not yet. */ - printf("You have Berkeley DB Version %d.%d\n", - DB_VERSION_MAJOR, DB_VERSION_MINOR); - printf("Perl currently only supports up to version 1.86.\n"); - exit(2); +#ifdef DB_VERSION_MAJOR /* DB version >= 2 */ + int Major, Minor, Patch ; + (void)db_version(&Major, &Minor, &Patch) ; + printf("You have Berkeley DB Version 2 or greater\n"); + + printf("db.h is from Berkeley DB Version %d.%d.%d\n", + DB_VERSION_MAJOR, DB_VERSION_MINOR, DB_VERSION_PATCH); + printf("libdb is from Berkeley DB Version %d.%d.%d\n", + Major, Minor, Patch) ; + + /* check that db.h & libdb are compatible */ + if (DB_VERSION_MAJOR != Major || DB_VERSION_MINOR != Minor || DB_VERSION_PATCH != Patch) { + printf("db.h and libdb are incompatible\n") ; + exit(3); + } + + printf("db.h and libdb are compatible\n") ; + /* needs to be >= 2.05 */ + if (DB_VERSION_MAJOR == 2 && DB_VERSION_MINOR == 0 && DB_VERSION_PATCH < 5) { + printf("but Perl needs Berkeley DB 2.0.5 or greater\n") ; + exit(2); + } + + exit(0); #else #if defined(_DB_H_) && defined(BTREEMAGIC) && defined(HASHMAGIC) + printf("You have Berkeley DB Version 1\n"); exit(0); /* DB version < 2: the coast is clear. */ #else exit(1); /* not Berkeley DB? */ @@ -8301,7 +8328,7 @@ main() } EOCP if $cc $optimize $ccflags $ldflags -o try try.c $libs && ./try; then - echo 'Looks OK. (Perl supports up to version 1.86).' >&4 + echo 'Looks OK.' >&4 else echo "I can't use Berkeley DB with your . I'll disable Berkeley DB." >&4 i_db=$undef @@ -8332,6 +8359,8 @@ define) #endif #include #include + +#ifndef DB_VERSION_MAJOR u_int32_t hash_cb (ptr, size) const void *ptr; size_t size; @@ -8342,6 +8371,7 @@ main() { info.hash = hash_cb; } +#endif EOCP if $cc $ccflags -c try.c >try.out 2>&1 ; then if $contains warning try.out >>/dev/null 2>&1 ; then @@ -8374,6 +8404,8 @@ define) #endif #include #include + +#ifndef DB_VERSION_MAJOR size_t prefix_cb (key1, key2) const DBT *key1; const DBT *key2; @@ -8384,6 +8416,7 @@ main() { info.prefix = prefix_cb; } +#endif EOCP if $cc $ccflags -c try.c >try.out 2>&1 ; then if $contains warning try.out >>/dev/null 2>&1 ; then @@ -9294,7 +9327,7 @@ EOM gethbadd_addr_type="$ans" # Remove the "const" if needed. - gethbadd_addr_type=`echo $gethbadd_addr_type | sed 's/^const //'` + gethbadd_addr_type=`echo "$gethbadd_addr_type" | sed 's/^const //'` rp='What is the type for the 2nd argument to gethostbyaddr ?' dflt="Size_t" @@ -9933,11 +9966,16 @@ int main() { exit(0); } EOCP - : Compile and link separately because the used cc might not be - : able to link the right CRT and libs for pthreading. - if $cc $ccflags -c try.c >/dev/null 2>&1 && - $ld $ldflags -o try try$obj_ext $libs >/dev/null 2>&1; then + if $cc $ccflags $ldflags -o try try.c $libs >/dev/null 2>&1; then yyy=`./try` + case "$yyy" in + detached) + echo "Nope, they aren't." + ;; + *) + echo "Yup, they are." + ;; + esac else echo "(I can't execute the test program--assuming they are.)" yyy=joinable @@ -9945,11 +9983,9 @@ EOCP case "$yyy" in detached) val="$undef" - echo "Nope, they aren't." ;; *) val="$define" - echo "Yup, they are." ;; esac set d_pthreads_created_joinable @@ -9957,7 +9993,7 @@ EOCP $rm -f try try.* fi else - d_pthreads_created_joinable=$undef + d_pthreads_created_joinable="$undef" fi : see whether the various POSIXish _yields exist within given cccmd @@ -10032,35 +10068,35 @@ cd ../UU avail_ext='' for xxx in $known_extensions ; do case "$xxx" in - DB_File) case "$i_db" in + DB_File|db_file) case "$i_db" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; - GDBM_File) case "$i_gdbm" in + GDBM_File|gdbm_fil) case "$i_gdbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; - NDBM_File) case "$i_ndbm" in + NDBM_File|ndbm_fil) case "$i_ndbm" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; - ODBM_File) case "${i_dbm}${i_rpcsvcdbm}" in + ODBM_File|odbm_fil) case "${i_dbm}${i_rpcsvcdbm}" in *"${define}"*) avail_ext="$avail_ext $xxx" ;; esac ;; - POSIX) case "$useposix" in + POSIX|posix) case "$useposix" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; - Opcode) case "$useopcode" in + Opcode|opcode) case "$useopcode" in true|define|y) avail_ext="$avail_ext $xxx" ;; esac ;; - Socket) case "$d_socket" in + Socket|socket) case "$d_socket" in $define) avail_ext="$avail_ext $xxx" ;; esac ;; - Thread) case "$usethreads" in + Thread|thread) case "$usethreads" in $define) avail_ext="$avail_ext $xxx" ;; esac ;;