summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2000-02-11 05:04:44 +0000
committerTheodore Ts'o <tytso@mit.edu>2000-02-11 05:04:44 +0000
commit8f3f29d383f9301395d5d7b4411d62a35d077175 (patch)
treea78ee615fd51344d68d3be03ef58f3afcc320d83
parente1a0a3e304229a625c37f0e845c0c9fff117c8c1 (diff)
downloade2fsprogs-8f3f29d383f9301395d5d7b4411d62a35d077175.tar.gz
ChangeLog, configure, configure.in:
configure.in: Define HAVE_EXT2_IOCTLS based solely on the OS type, instead of basising on whether a test program compiles. This was screwing up on some Linux kernel header files, and we know the Hurd doesn't support the ext2 ioctls anyway. types.h: Add newline at end of file.
-rw-r--r--ChangeLog8
-rw-r--r--configure41
-rw-r--r--configure.in20
-rw-r--r--include/nonunix/asm/types.h2
4 files changed, 24 insertions, 47 deletions
diff --git a/ChangeLog b/ChangeLog
index f2361aed..f5a98567 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2000-02-11 Theodore Ts'o <tytso@valinux.com>
+
+ * configure.in: Define HAVE_EXT2_IOCTLS based solely on the OS
+ type, instead of basising on whether a test program
+ compiles. This was screwing up on some Linux kernel
+ header files, and we know the Hurd doesn't support the
+ ext2 ioctls anyway.
+
2000-02-08 Theodore Ts'o <tytso@valinux.com>
* configure.in, aclocal.m4: Add support for GNU gettext
diff --git a/configure b/configure
index f9eab551..b91a71b8 100644
--- a/configure
+++ b/configure
@@ -4502,39 +4502,14 @@ if test $ac_cv_have_optreset = yes; then
EOF
fi
-echo $ac_n "checking whether the ext2 ioctls compile""... $ac_c" 1>&6
-echo "configure:4507: checking whether the ext2 ioctls compile" >&5
-if eval "test \"`echo '$''{'e2fsprogs_cv_ioctl_ext2'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.$ac_ext <<EOF
-#line 4512 "configure"
-#include "confdefs.h"
-#include <linux/ext2_fs.h>
-#include <sys/ioctl.h>
-int main() {
-ioctl (0, EXT2_IOC_SETVERSION, 0);
-; return 0; }
-EOF
-if { (eval echo configure:4520: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
- e2fsprogs_cv_ioctl_ext2=yes
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- e2fsprogs_cv_ioctl_ext2=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$e2fsprogs_cv_ioctl_ext2" 1>&6
-if test "$e2fsprogs_cv_ioctl_ext2" = yes; then
- cat >> confdefs.h <<\EOF
+case "$host_os" in
+linux*)
+ cat >> confdefs.h <<\EOF
#define HAVE_EXT2_IOCTLS 1
EOF
-fi
+ ;;
+esac
case "$host_os" in
linux* | gnu*)
if test "$prefix" = NONE -a "$root_prefix" = NONE ; then
@@ -4560,20 +4535,20 @@ if test "$root_prefix" = NONE ; then
fi
echo $ac_n "checking whether linker accepts -static""... $ac_c" 1>&6
-echo "configure:4564: checking whether linker accepts -static" >&5
+echo "configure:4539: 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 <<EOF
-#line 4570 "configure"
+#line 4545 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
fflush(stdout);
; return 0; }
EOF
-if { (eval echo configure:4577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4552: \"$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 d31881e5..7a9b4f68 100644
--- a/configure.in
+++ b/configure.in
@@ -462,19 +462,13 @@ if test $ac_cv_have_optreset = yes; then
AC_DEFINE(HAVE_OPTRESET)
fi
dnl
-dnl See if using the EXT2 ioctls causes a compile-time barf (as on the Hurd).
-dnl
-AC_MSG_CHECKING(whether the ext2 ioctls compile)
-AC_CACHE_VAL(e2fsprogs_cv_ioctl_ext2,
- AC_TRY_COMPILE([#include <linux/ext2_fs.h>
-#include <sys/ioctl.h>],
- [ioctl (0, EXT2_IOC_SETVERSION, 0);],
- [e2fsprogs_cv_ioctl_ext2=yes],
- [e2fsprogs_cv_ioctl_ext2=no]))
-AC_MSG_RESULT($e2fsprogs_cv_ioctl_ext2)
-if test "$e2fsprogs_cv_ioctl_ext2" = yes; then
- AC_DEFINE(HAVE_EXT2_IOCTLS)
-fi
+dnl We use the EXT2 ioctls only under Linux
+dnl
+case "$host_os" in
+linux*)
+ AC_DEFINE(HAVE_EXT2_IOCTLS)
+ ;;
+esac
dnl
dnl Linux and Hurd places root files in the / by default
dnl
diff --git a/include/nonunix/asm/types.h b/include/nonunix/asm/types.h
index fccb4269..ad1c8898 100644
--- a/include/nonunix/asm/types.h
+++ b/include/nonunix/asm/types.h
@@ -1 +1 @@
-#include "../linux/types.h" \ No newline at end of file
+#include "../linux/types.h"