From 6670495a39c98eca587a8e2efc1bd1c7fd33b5a2 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 25 Jun 1999 15:30:33 +0000 Subject: [PATCH] ChangeLog, configure.in, configure: configure.in: Check for the presence of i_generation field versus i_version in the ext2_inode to support compiling e2fsprogs in Linux 2.3. --- ChangeLog | 6 ++++++ configure | 38 +++++++++++++++++++++++++++++++++++--- configure.in | 13 +++++++++++++ 3 files changed, 54 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 02028a2..06da3b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +1999-06-23 + + * configure.in: Check for the presence of i_generation field + versus i_version in the ext2_inode to support compiling + e2fsprogs in Linux 2.3. + 1999-04-17 * MCONFIG.in: Define man1dir, man3dir, and man8dir in terms of diff --git a/configure b/configure index 6cdaa13..ab95828 100644 --- a/configure +++ b/configure @@ -2441,6 +2441,38 @@ if test "$e2fsprogs_cv_ioctl_ext2" = yes; then EOF fi +echo $ac_n "checking whether struct ext2_inode has an i_version field""... $ac_c" 1>&6 +echo "configure:2446: checking whether struct ext2_inode has an i_version field" >&5 +if eval "test \"`echo '$''{'e2fsprogs_cv_ext2_inode_version'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +int main() { +struct ext2_inode e2i; e2i.i_version=0; +; return 0; } +EOF +if { (eval echo configure:2458: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + e2fsprogs_cv_ext2_inode_version=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + e2fsprogs_cv_ext2_inode_version=no +fi +rm -f conftest* +fi + +echo "$ac_t""$e2fsprogs_cv_ext2_inode_version" 1>&6 +if test "$e2fsprogs_cv_ext2_inode_version" = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_EXT2_INODE_VERSION 1 +EOF + +fi case "$host_os" in linux*) if test "$prefix" = NONE -a "$root_prefix" = NONE ; then @@ -2466,20 +2498,20 @@ if test "$root_prefix" = NONE ; then fi echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6 -echo "configure:2470: checking whether linker accepts -static" >&5 +echo "configure:2502: checking whether linker accepts -static" >&5 if eval "test \"`echo '$''{'ac_cv_e2fsprogs_use_static'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else SAVE_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -static" cat > conftest.$ac_ext < int main() { fflush(stdout); ; return 0; } EOF -if { (eval echo configure:2483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_e2fsprogs_use_static=yes else diff --git a/configure.in b/configure.in index 513b05c..406a28e 100644 --- a/configure.in +++ b/configure.in @@ -452,6 +452,19 @@ if test "$e2fsprogs_cv_ioctl_ext2" = yes; then AC_DEFINE(HAVE_EXT2_IOCTLS) fi dnl +dnl Check if ext2_inode has i_version (changed to i_generation in Linux 2.3) +dnl +AC_MSG_CHECKING(whether struct ext2_inode has an i_version field) +AC_CACHE_VAL(e2fsprogs_cv_ext2_inode_version, + AC_TRY_COMPILE([#include ], + [struct ext2_inode e2i; e2i.i_version=0;], + [e2fsprogs_cv_ext2_inode_version=yes], + [e2fsprogs_cv_ext2_inode_version=no])) +AC_MSG_RESULT($e2fsprogs_cv_ext2_inode_version) +if test "$e2fsprogs_cv_ext2_inode_version" = yes; then + AC_DEFINE(HAVE_EXT2_INODE_VERSION) +fi +dnl dnl Linux places root files in the / by default dnl case "$host_os" in -- 1.8.3.1