-
-dnl If configuring with large file support, determine the right flags to
-dnl use based on the platform. This is the wrong approach; autoconf 2.50
-dnl comes with a macro that takes the right approach. But this works well
-dnl enough until we switch to autoconf 2.50 or later.
-if test x"$rad_enable_largefiles" = xyes ; then
- AC_MSG_CHECKING(for largefile linkage)
- case "$host" in
- *-aix4.[01]*)
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([AIX before 4.2 does not support large files])
- ;;
- *-aix4*)
- AC_MSG_RESULT(ok)
- LFS_CFLAGS="-D_LARGE_FILES"
- LFS_LDFLAGS=""
- LFS_LIBS=""
- ;;
- *-hpux*)
- AC_MSG_RESULT(ok)
- LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- LFS_LDFLAGS=""
- LFS_LIBS=""
- ;;
- *-irix*)
- AC_MSG_RESULT(no)
- AC_MSG_ERROR([Large files not supported on this platform])
- ;;
- *-linux*)
- AC_MSG_RESULT(maybe)
- LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- LFS_LDFLAGS=""
- LFS_LIBS=""
- AC_DEFINE([_GNU_SOURCE], 1,
- [Some versions of glibc need this defined for pread/pwrite.])
- ;;
- *-solaris*)
- AC_MSG_RESULT(ok)
- AC_PATH_PROG(GETCONF, getconf)
- if test -z "$GETCONF" ; then
- AC_MSG_ERROR([getconf required to configure large file support])
- fi
- LFS_CFLAGS=`$GETCONF LFS_CFLAGS`
- LFS_LDFLAGS=`$GETCONF LFS_LDFLAGS`
- LFS_LIBS=`$GETCONF LFS_LIBS`
- ;;
- *)
- AC_MSG_RESULT(maybe)
- LFS_CFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
- LFS_LDFLAGS=""
- LFS_LIBS=""
- ;;
- esac
- AC_SUBST(LFS_CFLAGS)
- AC_SUBST(LFS_LDFLAGS)
- AC_SUBST(LFS_LIBS)
-fi
-