add_definitions(-DHAVE_ASM_HWPROBE_H)
endif()
-#
-# Check to see if we have large file support
-#
-set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1 -D__USE_LARGEFILE64)
-check_type_size(off64_t OFF64_T)
-if(HAVE_OFF64_T)
- add_definitions(-D_LARGEFILE64_SOURCE=1 -D__USE_LARGEFILE64)
-else()
- check_type_size(_off64_t _OFF64_T)
- if(HAVE__OFF64_T)
- add_definitions(-D_LARGEFILE64_SOURCE=1 -D__USE_LARGEFILE64)
- else()
- check_type_size(__off64_t __OFF64_T)
- endif()
-endif()
-set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
-
#
# Check for fseeko and other optional functions
#
fi
echo >> configure.log
-# check for large file support, and if none, check for fseeko()
+# check for fseeko()
cat > $test.c <<EOF
-#include <sys/types.h>
-off64_t dummy = 0;
-EOF
-if try $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then
- CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
- SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
- echo "Checking for off64_t... Yes." | tee -a configure.log
- echo "Checking for fseeko... Yes." | tee -a configure.log
-else
- echo "Checking for off64_t... No." | tee -a configure.log
- echo >> configure.log
- cat > $test.c <<EOF
-#include <sys/types.h>
-int main() {
- _off64_t dummy = 0;
- return 0;
-}
-EOF
- if try $CC $CFLAGS -o $test $test.c $LDSHAREDLIBC; then
- echo "Checking for _off64_t... Yes." | tee -a configure.log
- else
- echo "Checking for _off64_t... No." | tee -a configure.log
- fi
- echo >> configure.log
- cat > $test.c <<EOF
#include <stdio.h>
int main(void) {
fseeko(NULL, 0, 0);
return 0;
}
EOF
- if try $CC $CFLAGS $ADDITIONAL_CHECK_FLAGS -o $test $test.c $LDSHAREDLIBC; then
- echo "Checking for fseeko... Yes." | tee -a configure.log
- else
- CFLAGS="${CFLAGS} -DNO_FSEEKO"
- SFLAGS="${SFLAGS} -DNO_FSEEKO"
- echo "Checking for fseeko... No." | tee -a configure.log
- fi
+if try $CC $CFLAGS $ADDITIONAL_CHECK_FLAGS -o $test $test.c $LDSHAREDLIBC; then
+ echo "Checking for fseeko... Yes." | tee -a configure.log
+else
+ CFLAGS="${CFLAGS} -DNO_FSEEKO"
+ SFLAGS="${SFLAGS} -DNO_FSEEKO"
+ echo "Checking for fseeko... No." | tee -a configure.log
fi
echo >> configure.log