Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=14193bbf...
Commit: 14193bbfe3220386ab8e53d28f548f2938d3f1a9
Parent: 46ca47cf35a03e1d9c57d89b67e84c25a8492a0e
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Tue Mar 31 01:13:18 2015 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Tue Mar 31 01:18:00 2015 +0100
gfs2-utils build: Remove superfluous passive header checks
The configure script contained passive header and feature checks which
set variables depending on what they find, to be used to make code
portable, but the code does not use those checks. It also duplicated
some checks for standard headers which autoconf already does itself.
Remove the unneeded checks and speed up the configure script a bit.
Also remove some checks for headers which are no longer required (since
the cluster.git split) and remove some unused #includes which were
discovered along the way.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
configure.ac | 39 +++++----------------------------------
gfs2/mkfs/main_grow.c | 3 ---
gfs2/mkfs/main_jadd.c | 1 -
3 files changed, 5 insertions(+), 38 deletions(-)
diff --git a/configure.ac b/configure.ac
index a41eb57..de96e5a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,46 +110,17 @@ if test -z "$ncurses_CFLAGS" && test -z
"$ncurses_LIBS"; then
ncurses_LIBS=-lncurses
fi
-# external libs (no pkgconfig)
-check_lib_no_libs pthread pthread_mutex_lock
-
# Checks for header files.
-
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h libintl.h limits.h locale.h mntent.h
netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/ioctl.h
sys/mount.h sys/param.h sys/socket.h sys/time.h sys/vfs.h syslog.h termios.h unistd.h])
-
-AC_CHECK_HEADERS([linux/dlmconstants.h linux/limits.h linux/types.h linux/netlink.h
linux/fs.h],,
- [AC_MSG_ERROR([Unable to find all required kernel headers.])])
-
+AC_CHECK_HEADERS([fcntl.h libintl.h limits.h locale.h mntent.h stddef.h sys/file.h
sys/ioctl.h sys/mount.h sys/time.h sys/vfs.h syslog.h termios.h])
+AC_CHECK_HEADER([linux/fs.h], [], [AC_MSG_ERROR([Unable to find linux/fs.h])])
+AC_CHECK_HEADER([linux/types.h], [], [AC_MSG_ERROR([Unable to find linux/types.h])])
+AC_CHECK_HEADER([linux/limits.h], [], [AC_MSG_ERROR([Unable to find linux/limits.h])])
AC_CHECK_HEADER([linux/gfs2_ondisk.h], [], [AC_MSG_ERROR([Unable to find
linux/gfs2_ondisk.h])])
AC_CHECK_MEMBER([struct gfs2_sb.sb_uuid], [], [], [[#include
<linux/gfs2_ondisk.h>]])
AC_CHECK_MEMBER([struct gfs2_leaf.lf_inode],[AC_DEFINE([GFS2_HAS_LEAF_HINTS],[],[Leaf
block hints])],
[], [[#include <linux/gfs2_ondisk.h>]])
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_INLINE
-AC_TYPE_INT64_T
-AC_TYPE_MODE_T
-AC_TYPE_OFF_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_TYPE_SSIZE_T
-AC_STRUCT_ST_BLOCKS
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-AC_TYPE_UINT8_T
-
-# Checks for library functions.
-AC_FUNC_CHOWN
-AC_FUNC_FORK
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_HEADER_MAJOR
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
-AC_CHECK_FUNCS([ftruncate gettimeofday memset realpath rmdir select setlocale socket
strcasecmp strchr strdup strerror strstr])
-
-## *FLAGS handling
-
+# *FLAGS handling
ENV_CFLAGS="$CFLAGS"
ENV_CPPFLAGS="$CPPFLAGS"
ENV_LDFLAGS="$LDFLAGS"
diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index 6ba14b0..1115e5f 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -9,8 +9,6 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <sys/file.h>
-#include <sys/vfs.h>
#include <sys/mount.h>
#include <fcntl.h>
#include <unistd.h>
@@ -18,7 +16,6 @@
#include <errno.h>
#include <stdarg.h>
#include <linux/types.h>
-#include <linux/falloc.h>
#include <blkid.h>
#include <libintl.h>
#include <locale.h>
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index 9190d44..739d964 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -9,7 +9,6 @@
#include <dirent.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
-#include <sys/file.h>
#include <sys/vfs.h>
#include <sys/mount.h>
#include <fcntl.h>