?RCS: $Id$ ?RCS: ?RCS: Copyright (c) 1999 Jarkko Hietaniemi ?RCS: ?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 \ ccflags_uselargefiles \ ldflags_uselargefiles \ libswanted_uselargefiles: \ Myread Oldconfig Setvar test lseeksize fpossize \ fpostype Compile echo n c cat lseektype rm_try run \ use64bitint use64bitall i_stdlib ?MAKE: -pick add $@ %< ?Y:TOP ?S:uselargefiles: ?S: This variable conditionally defines the USE_LARGE_FILES symbol, ?S: and indicates that large file interfaces should be used when ?S: available. ?S:. ?S:ccflags_uselargefiles: ?S: This variable contains the compiler flags needed by large file builds ?S: and added to ccflags by hints files. ?S:. ?S:ldflags_uselargefiles: ?S: This variable contains the loader flags needed by large file builds ?S: and added to ldflags by hints files. ?S:. ?S:libswanted_uselargefiles: ?S: This variable contains the libraries needed by large file builds ?S: and added to ldflags by hints files. It is a space separated list ?S: of the library names without the "lib" prefix or any suffix, just ?S: like libswanted.. ?S:. ?C:USE_LARGE_FILES: ?C: This symbol, if defined, indicates that large file support ?C: should be used when available. ?C:. ?H:?%<:#ifndef USE_LARGE_FILES ?H:?%<:#$uselargefiles USE_LARGE_FILES /**/ ?H:?%<:#endif ?H:. ?INIT:ccflags_uselargefiles='' ?INIT:ldflags_uselargefiles='' ?INIT:libswanted_uselargefiles='' ?T:yyy zzz ?F:!uselargefiles.cbu !try ?LINT:change lseeksize ?LINT:change fpossize ?LINT:extern uselfs ?LINT:use use64bitint ?LINT:use use64bitall : Check for large file support # Backward compatibility (uselfs is deprecated). case "$uselfs" in "$define"|true|[yY]*) cat <&4 *** Configure -Duselfs is deprecated, using -Duselargefiles instead. EOM uselargefiles="$define" ;; esac case "$lseeksize:$fpossize" in 8:8) cat <&4 $cat >try.c < #include int main() { printf("%d\n", (int)sizeof($lseektype)); return(0); } EOCP set try if eval $compile_ok; then lseeksize=`$run ./try` $echo "Your file offsets are now $lseeksize bytes long." 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 < #include #$i_stdlib I_STDLIB #ifdef I_STDLIB #include #endif int main() { printf("%d\n", (int)sizeof($fpostype)); return(0); } EOCP set try if eval $compile_ok; then yyy=`$run ./try` dflt="$lseeksize" case "$yyy" in '') echo " " echo "(I can't execute the test program--guessing $fpossize.)" >&4 ;; *) fpossize=$yyy echo " $fpossize bytes." >&4 ;; 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_try fi ;; esac