aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-09-18 17:34:37 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-09-18 17:34:37 -0400
commitd1154eb460efe588eaed3d439c1caaca149fa362 (patch)
tree2c7330818b40f9341003bf7cbe1dd5a3f622af0d /configure.in
parent30295f16a95b873965d1650b24fb6f5b82bde675 (diff)
downloade2fsprogs-d1154eb460efe588eaed3d439c1caaca149fa362.tar.gz
e2fsprogs-d1154eb460efe588eaed3d439c1caaca149fa362.tar.xz
e2fsprogs-d1154eb460efe588eaed3d439c1caaca149fa362.zip
Shorten compile commands run by the build system
The DEFS line in MCONFIG had gotten so long that it exceeded 4k, and this was starting to cause some tools heartburn. It also made "make V=1" almost useless, since trying to following the individual commands run by make was lost in the noise of all of the defines. So fix this by putting the configure-generated defines in lib/config.h and the directory pathnames to lib/dirpaths.h. In addition, clean up some vestigal defines in configure.in and in the Makefiles to further shorten the cc command lines. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in93
1 files changed, 52 insertions, 41 deletions
diff --git a/configure.in b/configure.in
index 8dc75a9b..e8e41fb2 100644
--- a/configure.in
+++ b/configure.in
@@ -1,6 +1,8 @@
AC_INIT(version.h)
AC_PREREQ(2.50)
AC_CONFIG_AUX_DIR(config)
+AC_CONFIG_HEADERS([lib/config.h])
+AH_BOTTOM([#include "dirpaths.h"])
MCONFIG=./MCONFIG
AC_SUBST_FILE(MCONFIG)
BINARY_TYPE=bin
@@ -68,7 +70,7 @@ dnl
DLOPEN_LIB=''
AC_CHECK_LIB(dl, dlopen,
[DLOPEN_LIB=-ldl
-AC_DEFINE(HAVE_DLOPEN)])
+AC_DEFINE(HAVE_DLOPEN, 1, [Define to 1 if dlopen/libdl exists])])
AC_SUBST(DLOPEN_LIB)
dnl
dnl Use diet libc
@@ -99,16 +101,6 @@ if test "$GCC" = yes; then
fi
AC_PROG_CPP
dnl
-dnl On systems without linux header files, we add an extra include directory
-dnl that holds enough to fake it (hopefully). Note that the $(top_srcdir) here
-dnl is quoted so that it gets expanded by make, not by configure.
-dnl
-AC_CHECK_HEADER(linux/fs.h, [linux_headers=yes], [linux_headers=no])
-if test "$linux_headers" != yes; then
- LINUX_INCLUDE='-I$(top_builddir)/include'
-fi
-AC_SUBST(LINUX_INCLUDE)
-dnl
dnl Alpha computers use fast and imprecise floating point code that may
dnl miss exceptions by default. Force sane options if we're using GCC.
AC_MSG_CHECKING(for additional special compiler flags)
@@ -224,7 +216,8 @@ if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling compression support])
else
- AC_DEFINE(ENABLE_COMPRESSION)
+ AC_DEFINE(ENABLE_COMPRESSION, 1,
+ [Define to 1 if ext2 compression enabled])
AC_MSG_RESULT([Enabling compression support])
AC_MSG_WARN([Compression support is experimental])
fi
@@ -234,6 +227,7 @@ AC_MSG_RESULT([Disabling compression support by default])
dnl
dnl handle --enable-htree
dnl
+AH_TEMPLATE([ENABLE_HTREE], [Define to 1 if ext3/4 htree support enabled])
AC_ARG_ENABLE([htree],
[ --enable-htree enable EXPERIMENTAL htree directory support],
if test "$enableval" = "no"
@@ -242,12 +236,12 @@ then
AC_MSG_RESULT([Disabling htree directory support])
else
HTREE_CMT=
- AC_DEFINE(ENABLE_HTREE)
+ AC_DEFINE(ENABLE_HTREE, 1)
AC_MSG_RESULT([Enabling htree directory support])
fi
,
HTREE_CMT=
-AC_DEFINE(ENABLE_HTREE)
+AC_DEFINE(ENABLE_HTREE, 1)
AC_MSG_RESULT([Enabling htree directory support by default])
)
AC_SUBST(HTREE_CMT)
@@ -381,7 +375,8 @@ if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling journal debugging])
else
- AC_DEFINE(CONFIG_JBD_DEBUG)
+ AC_DEFINE(CONFIG_JBD_DEBUG, 1,
+ [Define to 1 if debugging ext3/4 journal code])
AC_MSG_RESULT([Enabling journal debugging])
fi
,
@@ -396,7 +391,8 @@ if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling blkid debugging])
else
- AC_DEFINE(CONFIG_BLKID_DEBUG)
+ AC_DEFINE(CONFIG_BLKID_DEBUG, 1,
+ [Define to 1 if debugging the blkid library])
AC_MSG_RESULT([Enabling blkid debugging])
fi
,
@@ -407,18 +403,20 @@ dnl handle --enable-testio-debug
dnl
AC_ARG_ENABLE([testio-debug],
[ --disable-testio-debug disable the use of the test I/O manager for debugging],
+AH_TEMPLATE([CONFIG_TESTIO_DEBUG],
+ [Define to 1 if the testio I/O manager should be enabled])
if test "$enableval" = "no"
then
AC_MSG_RESULT([Disabling testio debugging])
TEST_IO_CMT="#"
else
TEST_IO_CMT=
- AC_DEFINE(CONFIG_TESTIO_DEBUG)
+ AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
AC_MSG_RESULT([Enabling testio debugging])
fi
,
AC_MSG_RESULT([Enabling testio debugging by default])
-AC_DEFINE(CONFIG_TESTIO_DEBUG)
+AC_DEFINE(CONFIG_TESTIO_DEBUG, 1)
TEST_IO_CMT=
)
AC_SUBST(TEST_IO_CMT)
@@ -484,6 +482,7 @@ DEPSTATIC_LIBBLKID=
PROFILED_LIBBLKID=
DEPPROFILED_LIBBLKID=
BLKID_CMT=
+AH_TEMPLATE([CONFIG_BUILD_FINDFS], [Define to 1 to compile findfs])
AC_ARG_ENABLE([libblkid],
[ --disable-libblkid do not build private blkid library],
if test "$enableval" = "no"
@@ -506,7 +505,7 @@ else
DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
- AC_DEFINE(CONFIG_BUILD_FINDFS)
+ AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
AC_MSG_RESULT([Enabling private blkid library])
fi
,
@@ -516,7 +515,7 @@ STATIC_LIBBLKID='$(LIB)/libblkid'$STATIC_LIB_EXT
DEPSTATIC_LIBBLKID=$STATIC_LIBBLKID
PROFILED_LIBBLKID='$(LIB)/libblkid'$PROFILED_LIB_EXT
DEPPROFILED_LIBBLKID=$PROFILED_LIBBLKID
-AC_DEFINE(CONFIG_BUILD_FINDFS)
+AC_DEFINE(CONFIG_BUILD_FINDFS, 1)
AC_MSG_RESULT([Enabling private blkid library by default])
)
AC_SUBST(LIBBLKID)
@@ -724,6 +723,7 @@ fi
dnl
dnl
dnl
+AH_TEMPLATE([USE_UUIDD], [Define to 1 to build uuidd])
AC_ARG_ENABLE([uuidd],
[ --disable-uuidd disable building the uuid daemon],
[if test "$enableval" = "no"
@@ -731,12 +731,12 @@ then
AC_MSG_RESULT([Not building uuidd])
UUIDD_CMT="#"
else
- AC_DEFINE(USE_UUIDD)
+ AC_DEFINE(USE_UUIDD, 1)
UUIDD_CMT=""
AC_MSG_RESULT([Building uuidd])
fi]
,
-AC_DEFINE(USE_UUIDD)
+AC_DEFINE(USE_UUIDD, 1)
UUIDD_CMT=""
AC_MSG_RESULT([Building uuidd by default])
)
@@ -753,8 +753,8 @@ GETTEXT_PACKAGE=e2fsprogs
PACKAGE=e2fsprogs
VERSION="$E2FSPROGS_VERSION"
VERSION=0.14.1
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION")
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [package name for gettext])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [version for gettext])
AC_SUBST(GETTEXT_PACKAGE)
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
@@ -821,16 +821,19 @@ AC_CHECK_HEADERS(net/if.h,,,
AC_FUNC_VPRINTF
dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen
dnl is not decleared.
-AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT)],,
+AC_CHECK_MEMBER(struct dirent.d_reclen,[AC_DEFINE(HAVE_RECLEN_DIRENT, 1,
+ [Define to 1 if dirent has d_reclen])],,
[#include <dirent.h>])
-dnl Check to see if ssize_t was decleared
-AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T)],,
+dnl Check to see if ssize_t was declared
+AC_CHECK_TYPE(ssize_t,[AC_DEFINE(HAVE_TYPE_SSIZE_T, 1,
+ [Define to 1 if ssize_t declared])],,
[#include <sys/types.h>])
dnl
dnl Check to see if llseek() is declared in unistd.h. On some libc's
dnl it is, and on others it isn't..... Thank you glibc developers....
dnl
-AC_CHECK_DECL(llseek,[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE)],,
+AC_CHECK_DECL(llseek,[AC_DEFINE(HAVE_LLSEEK_PROTOTYPE, 1,
+ [Define to 1 if llseek declared in unistd.h])],,
[#include <unistd.h>])
dnl
dnl Check to see if lseek64() is declared in unistd.h. Glibc's header files
@@ -841,7 +844,8 @@ dnl
dnl Warning! Use of --enable-gcc-wall may throw off this test.
dnl
dnl
-AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE)],,
+AC_CHECK_DECL(lseek64,[AC_DEFINE(HAVE_LSEEK64_PROTOTYPE, 1,
+ [Define to 1 if lseek64 declared in unistd.h])],,
[#define _LARGEFILE_SOURCE
#define _LARGEFILE64_SOURCE
#include <unistd.h>])
@@ -908,14 +912,16 @@ if test "$e2fsprogs_cv_struct_st_flags" = yes; then
[e2fsprogs_cv_struct_st_flags_immut=no]))
AC_MSG_RESULT($e2fsprogs_cv_struct_st_flags_immut)
if test "$e2fsprogs_cv_struct_st_flags_immut" = yes; then
- AC_DEFINE(HAVE_STAT_FLAGS)
+ AC_DEFINE(HAVE_STAT_FLAGS, 1,
+ [Define to 1 if struct stat has st_flags])
fi
fi
dnl
dnl Check for the presence of SA_LEN
dnl
AC_CHECK_MEMBER(struct sockaddr.sa_len,
- AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,[Define if struct sockaddr contains sa_len]),,
+ AC_DEFINE_UNQUOTED(HAVE_SA_LEN,1,
+ [Define to 1 if if struct sockaddr contains sa_len]),,
[#include <sys/types.h>
#include <sys/socket.h>])
dnl
@@ -943,21 +949,22 @@ AC_CACHE_VAL(ac_cv_have_optreset,
ac_cv_have_optreset=yes, ac_cv_have_optreset=no)])dnl
AC_MSG_RESULT($ac_cv_have_optreset)
if test $ac_cv_have_optreset = yes; then
- AC_DEFINE(HAVE_OPTRESET)
+ AC_DEFINE(HAVE_OPTRESET, 1, [Define to 1 if optreset for getopt is present])
fi
dnl
dnl Test for sem_init, and which library it might require:
dnl
+AH_TEMPLATE([HAVE_SEM_INIT], [Define to 1 if sem_init() exists])
SEM_INIT_LIB=''
AC_CHECK_FUNC(sem_init, ,
AC_CHECK_LIB(pthread, sem_init,
- AC_DEFINE(HAVE_SEM_INIT)
+ AC_DEFINE(HAVE_SEM_INIT, 1)
SEM_INIT_LIB=-lpthread,
AC_CHECK_LIB(rt, sem_init,
- AC_DEFINE(HAVE_SEM_INIT)
+ AC_DEFINE(HAVE_SEM_INIT, 1)
SEM_INIT_LIB=-lrt,
AC_CHECK_LIB(posix4, sem_init,
- AC_DEFINE(HAVE_SEM_INIT)
+ AC_DEFINE(HAVE_SEM_INIT, 1)
SEM_INIT_LIB=-lposix4))))dnl
AC_SUBST(SEM_INIT_LIB)
dnl
@@ -976,7 +983,7 @@ dnl We use the EXT2 ioctls only under Linux
dnl
case "$host_os" in
linux*)
- AC_DEFINE(HAVE_EXT2_IOCTLS)
+ AC_DEFINE(HAVE_EXT2_IOCTLS, 1, [Define to 1 if Ext2 ioctls present])
;;
esac
dnl
@@ -1095,7 +1102,8 @@ dnl
case "$host_os" in
darwin*)
AC_MSG_RESULT([Using Apple Darwin / GNU libintl workaround])
- AC_DEFINE(_INTL_REDIRECT_MACROS)
+ AC_DEFINE(_INTL_REDIRECT_MACROS, 1,
+ [Define to 1 if Apple Darwin libintl workaround is needed])
;;
esac
dnl
@@ -1116,12 +1124,15 @@ fi
AC_SUBST(DO_TEST_SUITE)
dnl
dnl Only include the intl include files if we're building with them
-dnl
-INTL_FLAGS=
+dnl
+INCLUDES='-I. -I$(top_builddir)/lib -I$(top_srcdir)/lib'
+if test -n "$CPPFLAGS" ; then
+ INCLUDES="$INCLUDES $CPPFLAGS"
+fi
if test "$USE_INCLUDED_LIBINTL" = "yes" ; then
- INTL_FLAGS='-I$(top_builddir)/intl -I$(top_srcdir)/intl'
+ INCLUDES=$INCLUDES' -I$(top_builddir)/intl -I$(top_srcdir)/intl'
fi
-AC_SUBST(INTL_FLAGS)
+AC_SUBST(INCLUDES)
dnl
dnl Build CFLAGS
dnl