7 # Set up for large file suport on this system. Besides adding compiler flags,
8 # defines NEED_RESETOFS if the tape device's offset must be reset before it reaches
9 # 2GB (a Linux kernel bug in systems without LFS support).
11 AC_DEFUN([AMANDA_SETUP_LFS],
13 AC_REQUIRE([AMANDA_PROG_GETCONF])
14 AC_REQUIRE([AC_SYS_LARGEFILE])
16 # we use 'getconf', if it exists, to get the relevant
20 *-hp-*) GETCONF_LFS="XBS5_ILP32_OFFBIG" ;;
21 *-ibm-aix*) GETCONF_LFS="XBS5_ILP32_OFFBIG" ;;
24 # Checks for compilers, typedefs, structures, and compiler characteristics.
25 # Check for large file compilation environment.
27 AC_CACHE_CHECK([for large file compilation CFLAGS],
31 if test "$GETCONF"; then
32 if $GETCONF ${GETCONF_LFS}_CFLAGS >/dev/null 2>&1; then
33 amanda_cv_LFS_CFLAGS=`$GETCONF ${GETCONF_LFS}_CFLAGS 2>/dev/null`
39 AMANDA_ADD_CFLAGS([$amanda_cv_LFS_CFLAGS])
42 [for large file compilation LDFLAGS],
43 amanda_cv_LFS_LDFLAGS,
45 amanda_cv_LFS_LDFLAGS=
46 if test "$GETCONF"; then
47 if $GETCONF ${GETCONF_LFS}_LDFLAGS >/dev/null 2>&1; then
48 amanda_cv_LFS_LDFLAGS=`$GETCONF ${GETCONF_LFS}_LDFLAGS 2>/dev/null`
54 AMANDA_ADD_LDFLAGS([$amanda_cv_LFS_LDFLAGS])
57 [for large file compilation LIBS],
61 if test "$GETCONF"; then
62 if $GETCONF ${GETCONF_LFS}_LIBS >/dev/null 2>&1; then
63 amanda_cv_LFS_LIBS=`$GETCONF ${GETCONF_LFS}_LIBS 2>/dev/null`
69 AMANDA_ADD_LIBS([$amanda_cv_LFS_LIBS])
71 if test x"$NEED_RESETOFS" = x"yes"; then
72 AC_DEFINE(NEED_RESETOFS,1,
73 [Define if we have to reset tape offsets when reaching 2GB. ])