(with a setback, see hpux.sh).
p4raw-id: //depot/metaconfig@4581
?RCS: that same Artistic Licence; a copy of which may be found at the root
?RCS: of the source tree for dist 3.0.
?RCS:
-?MAKE:fpossize: Myread Typedef fpostype Compile
+?MAKE:fpossize: Myread Typedef fpostype Compile longsize echo n c
?MAKE: -pick add $@ %<
?S:fpossize:
?S: This variable contains the size of a fpostype in bytes.
*_t) zzz="$fpostype" ;;
*) zzz="fpos_t" ;;
esac
-echo "Checking the size of $zzz..." >&4
+$echo $n "Checking the size of $zzz...$c" >&4
cat > try.c <<EOCP
#include <sys/types.h>
#include <stdio.h>
yyy=`./try`
case "$yyy" in
'') fpossize=4
+ echo " "
echo "(I can't execute the test program--guessing $fpossize.)" >&4
;;
*) fpossize=$yyy
- echo "Your $zzz size is $fpossize bytes."
+ echo " $fpossize bytes."
;;
esac
else
- fpossize=4
- echo "(I can't compile the test program--guessing $fpossize.)" >&4
+ dflt="$longsize"
+ echo " "
+ echo "(I can't compile the test program. Guessing...)" >&4
+ rp="What is the size of your file positions (in bytes)?"
+ . ./myread
+ fpossize="$ans"
fi
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
?MAKE:use64bits archname64: Myread Oldconfig Setvar test gccversion cat \
- usemorebits uselargefiles
+ uselargefiles usemorebits longsize intsize
?MAKE: -pick add $@ %<
?Y:TOP
?S:use64bits:
?S: This variable conditionally defines the USE_64_BITS symbol,
-?S: and indicates that explicit 64-bit interfaces should be used
+?S: and indicates that 64-bit integer types should be used
?S: when available.
?S:.
?S:archname64:
?S: This variable is used for the 64-bitness part of $archname.
?S:.
?C:USE_64_BITS:
-?C: This symbol, if defined, indicates that 64-bit interfaces should
-?C: be used when available. If not defined, the native default interfaces
+?C: This symbol, if defined, indicates that 64-bit integers should
+?C: be used when available. If not defined, the native integers
?C: will be used (be they 32 or 64 bits).
?C:.
?H:?%<:#ifndef USE_64_BITS
?LINT:set archname64
?LINT:extern ccflags
?LINT:change ccflags
-?LINT:use usemorebits
?LINT:use uselargefiles
+?LINT:use usemorebits
?F:!use64bits.cbu
-cat <<EOM
-Perl can be built to take advantage of explicit 64-bit interfaces,
+case "$intsize:$longsize" in
+8:*|*:8) cat <<EOM
+
+You have natively 64-bit integers.
+EOM
+ val="$define" ;;
+*) cat <<EOM
+
+Perl can be built to take advantage of 64-bit integer types
on some systems. To do so, Configure must be run with -Duse64bits.
If this doesn't make any sense to you, just accept the default.
EOM
-case "$use64bits" in
-$define|true|[yY]*) dflt='y';;
-*) dflt='n';;
-esac
-rp='Try to use explicit 64-bit interfaces, if available?'
-. ./myread
-case "$ans" in
-y|Y)
- val="$define"
- ;;
-*)
- val="$undef"
- ;;
+ case "$use64bits" in
+ $define|true|[yY]*) dflt='y';;
+ *) dflt='n';;
+ esac
+ rp='Try to use 64-bit integers, if available?'
+ . ./myread
+ case "$ans" in
+ y|Y) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
esac
set use64bits
eval $setvar
case "$use64bits" in
"$define"|true|[yY]*)
: Look for a hint-file generated 'call-back-unit'. If the
-: user has specified that a 64 bit perl is to be built,
+: user has specified that a 64-bit perl is to be built,
: we may need to set or change some other defaults.
if $test -f use64bits.cbu; then
echo "Your platform has some specific hints for 64-bit builds, using them..."
. ./use64bits.cbu
else
$cat <<EOM
-(Your platform doesn't have any specific hints for 64-bit builds.
- This is probably okay, especially if your system is a true 64-bit system.)
+(Your platform doesn't have any specific hints for 64-bit builds.)
+EOM
+ case "$intsize:$longsize" in
+8:*|*:8) cat <<EOM
+(This is probably okay, as your system is a natively 64-bit system.)
EOM
+ ;;
+ esac
case "$gccversion" in
'') ;;
- *) $cat <<EOM
-But since you seem to be using gcc,
-I will now add -DUSE_LONG_LONG to the compilation flags.
+ *) case "$ccflags" in
+ *-DUSE_LONG_LONG*) ;;
+ *) $cat <<EOM
+But since you seem to be using gcc, I will now add -DUSE_LONG_LONG
+to the compilation flags.
EOM
- ccflags="$ccflags -DUSE_LONG_LONG"
+ ccflags="$ccflags -DUSE_LONG_LONG"
+ ;;
+ esac
;;
esac
fi
?RCS: You may distribute under the terms of either the GNU General Public
?RCS: License or the Artistic License, as specified in the README file.
?RCS:
-?MAKE:uselargefiles: Myread Oldconfig Setvar
+?MAKE:uselargefiles: Myread Oldconfig Setvar test lseeksize fpossize \
+ fpostype Compile echo n c cat lseektype rm
?MAKE: -pick add $@ %<
?Y:TOP
?S:uselargefiles:
?H:?%<:#$uselargefiles USE_LARGE_FILES /**/
?H:?%<:#endif
?H:.
+?F:!uselfs.cbu !try
+?T:yyy zzz
?LINT:set uselargefiles
?LINT:extern use64bits
?LINT:change use64bits
+?LINT:change lseeksize
+?LINT:change fpossize
-cat <<EOM
+case "$lseeksize:$fpossize" in
+8:8) cat <<EOM
+
+You can have files larger than 2 gigabytes.
+EOM
+ val="$define" ;;
+*) cat <<EOM
Perl can be built to understand large files (files larger than 2 gigabytes)
on some systems. To do so, Configure must be run with -Duselargefiles.
-If this doesn't make any sense to you, just accept the default.
+If this doesn't make any sense to you, just accept the default 'y'.
EOM
-case "$uselargefiles" in
-"$define"|true|[yY]*) dflt='y' ;;
-*) dflt='n' ;;
-esac
-rp='Try to understand large files?'
-. ./myread
-case "$ans" in
-y|Y) val="$define" ;;
-*) val="$undef" ;;
+ case "$uselargefiles" in
+ "$undef"|false|[nN]*) dflt='n' ;;
+ *) dflt='y' ;;
+ esac
+ rp='Try to understand large files, if available?'
+ . ./myread
+ case "$ans" in
+ y|Y) val="$define" ;;
+ *) val="$undef" ;;
+ esac
+ ;;
esac
set uselargefiles
eval $setvar
case "$uselargefiles" in
-"$define") use64bits="$define" ;;
+"$define")
+: Look for a hint-file generated 'call-back-unit'. If the
+: user has specified that a large files perl is to be built,
+: we may need to set or change some other defaults.
+ if $test -f uselfs.cbu; then
+ echo "Your platform has some specific hints for large file builds, using them..."
+ . ./uselfs.cbu
+ echo " "
+ $echo $n "Rechecking to see how big your file offsets are...$c" >&4
+ $cat >try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main()
+{
+ printf("%d\n", (int)sizeof($lseektype));
+ return(0);
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ lseeksize=`./try`
+ $echo " $lseeksize bytes." >&4
+ else
+ dflt="$lseeksize"
+ echo " "
+ echo "(I can't seem to compile the test program. Guessing...)"
+ rp="What is the size of your file offsets (in bytes)?"
+ . ./myread
+ lseeksize="$ans"
+ fi
+ case "$fpostype" in
+ *_t) zzz="$fpostype" ;;
+ *) zzz="fpos_t" ;;
+ esac
+ $echo $n "Rechecking the size of $zzz...$c" >&4
+ $cat > try.c <<EOCP
+#include <sys/types.h>
+#include <stdio.h>
+int main() {
+ printf("%d\n", (int)sizeof($fpostype));
+ exit(0);
+}
+EOCP
+ set try
+ if eval $compile_ok; then
+ yyy=`./try`
+ dflt="$lseeksize"
+ case "$yyy" in
+ '') echo " "
+ echo "(I can't execute the test program--guessing $fpossize.)" >&4
+ ;;
+ *) fpossize=$yyy
+ echo " $fpossize bytes."
+ ;;
+ esac
+ else
+ dflt="$fpossize"
+ echo " "
+ echo "(I can't compile the test program. Guessing...)" >&4
+ rp="What is the size of your file positions (in bytes)?"
+ . ./myread
+ fpossize="$ans"
+ fi
+ $rm -f try.c try
+ fi
+ ;;
esac
@if use64bits
case "$use64bits" in
$define)
- echo "Explicit 64-bitness selected." >&4
case "$archname64" in
'')
;;
?RCS: Revision 3.0 1993/08/18 12:09:08 ram
?RCS: Baseline for dist 3.0 netwide release.
?RCS:
-?MAKE:lseektype lseeksize: Myread Typedef echo n c cat Compile rm
+?MAKE:lseektype lseeksize: Myread Typedef echo n c cat Compile rm longsize
?MAKE: -pick add $@ %<
?S:lseektype:
?S: This variable defines lseektype to be something like off_t, long,
lseeksize=`./try`
$echo " $lseeksize bytes." >&4
else
- dflt='4'
+ dflt=$longsize
echo " "
echo "(I can't seem to compile the test program. Guessing...)"
rp="What is the size of your file offsets (in bytes)?"