From 4f79081a4b9afe73de61ab8df619912399d0f786 Mon Sep 17 00:00:00 2001 From: Alexey Lyashkov Date: Wed, 17 Apr 2013 13:40:10 -0700 Subject: [PATCH] LU-3185 build: fix autogen with modern autoconf tools Modern autoconf tools request configure scripts to be more strict in style, some fixes to improve autoconf usage. Signed-off-by: Alexey Lyashkov Signed-off-by: Andreas Dilger Change-Id: I954c0fc7be34d84ec279883debc44e7a543ebbe5 Reviewed-on: http://review.whamcloud.com/7490 Reviewed-by: Keith Mannthey Tested-by: Maloo Tested-by: Hudson Reviewed-by: Bob Glossman Reviewed-by: Oleg Drokin --- config/lustre-build.m4 | 4 ++-- libsysio/{configure.in => configure.ac} | 18 +++++++++--------- lustre-iokit/configure.ac | 5 +++-- lustre/autoconf/lustre-core.m4 | 2 ++ lustre/obdclass/autoMakefile.am | 5 ++--- lustre/utils/Makefile.am | 12 ++++++------ 6 files changed, 24 insertions(+), 22 deletions(-) rename libsysio/{configure.in => configure.ac} (98%) diff --git a/config/lustre-build.m4 b/config/lustre-build.m4 index 69648a6..24a7556 100644 --- a/config/lustre-build.m4 +++ b/config/lustre-build.m4 @@ -226,7 +226,7 @@ case x$with_sysio in esac # We have to configure even if we don't build here for make dist to work -AC_CONFIG_SUBDIRS(libsysio) +AC_CONFIG_SUBDIRS([libsysio]) ]) # @@ -265,7 +265,7 @@ case x$with_lustre_iokit in esac AC_SUBST(LUSTREIOKIT_SUBDIR) # We have to configure even if we don't build here for make dist to work -AC_CONFIG_SUBDIRS(lustre-iokit) +AC_CONFIG_SUBDIRS([lustre-iokit]) AM_CONDITIONAL(BUILD_LUSTREIOKIT, [test "x$with_lustre_iokit" != xno]) ]) diff --git a/libsysio/configure.in b/libsysio/configure.ac similarity index 98% rename from libsysio/configure.in rename to libsysio/configure.ac index 890b7ee..d28778b 100644 --- a/libsysio/configure.in +++ b/libsysio/configure.ac @@ -101,7 +101,7 @@ AC_ARG_WITH(automount, AC_HELP_STRING([--with-automount@<:@=@:>@], [with automounts @<:@=.mount@:>@]), [ if test x${withval} = xyes; then - AUTOMOUNT=-DAUTOMOUNT_FILE_NAME="\\\".mount\\\"" + AUTOMOUNT=-DAUTOMOUNT_FILE_NAME="\\\".mount\\\"" elif test x${withval} != x; then AUTOMOUNT=-DAUTOMOUNT_FILE_NAME="\\\"${withval}\\\"" fi]) @@ -153,7 +153,7 @@ AC_SUBST(TRACING) AC_ARG_WITH(cplant_yod, AC_HELP_STRING([--with-cplant-yod],[build cplant yod I/O driver]), - [ case "${withval}" in + [ case "${withval}" in yes) if test x${with_stdfd_dev} != xyes; then with_stdfd_dev=yes AM_CONDITIONAL(WITH_STDFD_DEV, test x$with_stdfd_dev = xyes) @@ -171,7 +171,7 @@ AC_ARG_WITH(cplant_tests, yes) AC_MSG_ERROR(need path to compiler for --with-cplant-tests);; no) with_cplant_tests=no;; *) CC=${withval} - CCDEPMODE=${CC} + CCDEPMODE=${CC} CPP="${CC} -E" AC_CHECK_FILE(${CC}, [ if test x${with_cplant_yod} != xyes; then @@ -341,8 +341,8 @@ if test x$sysio_largefile64_source_required = xyes; then AC_DEFINE(_LARGEFILE64_SOURCE) fi -# Alpha linux defines -# +# Alpha linux defines +# AC_MSG_CHECKING(for alpha linux) alpha_linux_env=no if test `expr ${machine} : "alpha"` = 5 && \ @@ -353,7 +353,7 @@ fi AC_MSG_RESULT($alpha_linux_env) AM_CONDITIONAL(TEST_ALPHA_ARG, test x$alpha_linux_env = xyes) -# Check for __st_ino +# Check for __st_ino # AC_MSG_CHECKING(for __st_ino) AC_TRY_COMPILE([ @@ -367,7 +367,7 @@ if test x$have__st_ino = xyes; then AC_DEFINE(HAVE__ST_INO) fi -# Check for st_gen +# Check for st_gen # AC_MSG_CHECKING(for st_gen) AC_TRY_COMPILE([ @@ -419,7 +419,7 @@ int scandir(const char *dir, ],[ ], [ AC_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir]) -AC_MSG_RESULT(yes) +AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) ]) @@ -464,7 +464,7 @@ int scandir(const char *dir, ],[ ], [ AC_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir]) -AC_MSG_RESULT(yes) +AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) ]) diff --git a/lustre-iokit/configure.ac b/lustre-iokit/configure.ac index b25db9b..54d9a79 100644 --- a/lustre-iokit/configure.ac +++ b/lustre-iokit/configure.ac @@ -1,6 +1,7 @@ -AC_INIT +AC_PREREQ([2.57]) +AC_INIT([lustre-iokit],[2.3.65], [http://bugs.hpdd.intel.com/]) AC_CONFIG_AUX_DIR([.]) -AM_INIT_AUTOMAKE(lustre-iokit,1.4.0) +AM_INIT_AUTOMAKE AC_PATH_PROGS(BASH, bash) AC_PATH_PROGS(PERL, perl) RELEASE="1" diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index 17e4d36..c6e5e29 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1609,9 +1609,11 @@ AC_DEFUN([LC_QUOTA], [#check global LC_CONFIG_QUOTA #check for utils +if test x$enable_quota != xno -a x$enable_utils != xno; then AC_CHECK_HEADER(sys/quota.h, [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have .])], [AC_MSG_ERROR([don't find in your system])]) +fi ]) # diff --git a/lustre/obdclass/autoMakefile.am b/lustre/obdclass/autoMakefile.am index ba8b75a..493a4aa 100644 --- a/lustre/obdclass/autoMakefile.am +++ b/lustre/obdclass/autoMakefile.am @@ -5,7 +5,6 @@ endif DIST_SUBDIRS = linux darwin if LIBLUSTRE -INCLUDES = -I$(SYSIO)/include noinst_LIBRARIES = liblustreclass.a liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c mea.c uuid.c liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c @@ -14,8 +13,8 @@ liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c capa.c liblustreclass_a_SOURCES += lu_object.c cl_object.c lu_ref.c liblustreclass_a_SOURCES += cl_page.c cl_lock.c cl_io.c liblustreclass_a_SOURCES += #llog_ioctl.c rbtree.c -liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) -liblustreclass_a_CFLAGS = $(LLCFLAGS) +liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS) -I$(SYSIO)/include +liblustreclass_a_CFLAGS = $(LLCFLAGS) -I$(SYSIO)/include endif diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am index 8bf84c4..964e7be 100644 --- a/lustre/utils/Makefile.am +++ b/lustre/utils/Makefile.am @@ -33,7 +33,6 @@ endif bin_PROGRAMS = lfs req_layout bin_SCRIPTS = $(bin_scripts) sbin_SCRIPTS = $(sbin_scripts) -endif # UTILS lib_LIBRARIES = liblustreapi.a if LDISKFS_ENABLED @@ -108,11 +107,6 @@ if LDISKFS_ENABLED libiam_a_SOURCES = libiam.c endif -wirecheck_SOURCES = wirecheck.c -wirecheck_CPPFLAGS = -DCC="\"$(CC)\"" - -wiretest_SOURCES = wiretest.c - obdio_SOURCES = obdio.c obdiolib.c obdiolib.h obdbarrier_SOURCES = obdbarrier.c obdiolib.c obdiolib.h req_layout_SOURCES = req-layout.c @@ -172,6 +166,12 @@ l_getidentity_LDADD := $(LIBPTLCTL) l_getidentity_DEPENDENCIES := $(LIBPTLCTL) ltrack_stats_SOURCES = ltrack_stats.c +endif # UTILS + +wirecheck_SOURCES = wirecheck.c +wirecheck_CPPFLAGS = -DCC="\"$(CC)\"" + +wiretest_SOURCES = wiretest.c lhsmtool_posix_SOURCES = lhsmtool_posix.c lhsmtool_posix_LDADD := liblustreapi.a $(PTHREAD_LIBS) -- 1.8.3.1