Whamcloud - gitweb
LU-3185 build: fix autogen with modern autoconf tools 90/7490/4
authorAlexey Lyashkov <alexey_lyashkov@xyratex.com>
Wed, 17 Apr 2013 20:40:10 +0000 (13:40 -0700)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 18 Sep 2013 08:49:55 +0000 (08:49 +0000)
Modern autoconf tools request configure scripts to be more
strict in style, some fixes to improve autoconf usage.

Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I954c0fc7be34d84ec279883debc44e7a543ebbe5
Reviewed-on: http://review.whamcloud.com/7490
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Tested-by: Hudson
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
config/lustre-build.m4
libsysio/configure.ac [moved from libsysio/configure.in with 98% similarity]
lustre-iokit/configure.ac
lustre/autoconf/lustre-core.m4
lustre/obdclass/autoMakefile.am
lustre/utils/Makefile.am

index 69648a6..24a7556 100644 (file)
@@ -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
 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
 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])
 ])
 
 AM_CONDITIONAL(BUILD_LUSTREIOKIT, [test "x$with_lustre_iokit" != xno])
 ])
 
similarity index 98%
rename from libsysio/configure.in
rename to libsysio/configure.ac
index 890b7ee..d28778b 100644 (file)
@@ -101,7 +101,7 @@ AC_ARG_WITH(automount,
   AC_HELP_STRING([--with-automount@<:@=<automount-file-name>@:>@],
     [with automounts @<:@<automount-file-name>=.mount@:>@]),
   [    if test x${withval} = xyes; then
   AC_HELP_STRING([--with-automount@<:@=<automount-file-name>@:>@],
     [with automounts @<:@<automount-file-name>=.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])
        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]),
 
 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)
        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}
        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
           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
 
        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 && \
 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)
 
 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([
 #
 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
 
        AC_DEFINE(HAVE__ST_INO)
 fi
 
-# Check for st_gen 
+# Check for st_gen
 #
 AC_MSG_CHECKING(for st_gen)
 AC_TRY_COMPILE([
 #
 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_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir])
-AC_MSG_RESULT(yes) 
+AC_MSG_RESULT(yes)
 ],[
 AC_MSG_RESULT(no)
 ])
 ],[
 AC_MSG_RESULT(no)
 ])
@@ -464,7 +464,7 @@ int scandir(const char *dir,
 ],[
 ], [
 AC_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir])
 ],[
 ], [
 AC_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir])
-AC_MSG_RESULT(yes) 
+AC_MSG_RESULT(yes)
 ],[
 AC_MSG_RESULT(no)
 ])
 ],[
 AC_MSG_RESULT(no)
 ])
index b25db9b..54d9a79 100644 (file)
@@ -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([.])
 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"
 AC_PATH_PROGS(BASH, bash)
 AC_PATH_PROGS(PERL, perl)
 RELEASE="1"
index 17e4d36..c6e5e29 100644 (file)
@@ -1609,9 +1609,11 @@ AC_DEFUN([LC_QUOTA],
 [#check global
 LC_CONFIG_QUOTA
 #check for utils
 [#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 <sys/quota.h>.])],
                 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
 AC_CHECK_HEADER(sys/quota.h,
                 [AC_DEFINE(HAVE_SYS_QUOTA_H, 1, [Define to 1 if you have <sys/quota.h>.])],
                 [AC_MSG_ERROR([don't find <sys/quota.h> in your system])])
+fi
 ])
 
 #
 ])
 
 #
index ba8b75a..493a4aa 100644 (file)
@@ -5,7 +5,6 @@ endif
 DIST_SUBDIRS = linux darwin
 
 if LIBLUSTRE
 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
 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_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
 
 
 endif
 
index 8bf84c4..964e7be 100644 (file)
@@ -33,7 +33,6 @@ endif
 bin_PROGRAMS = lfs req_layout
 bin_SCRIPTS = $(bin_scripts)
 sbin_SCRIPTS = $(sbin_scripts)
 bin_PROGRAMS = lfs req_layout
 bin_SCRIPTS = $(bin_scripts)
 sbin_SCRIPTS = $(sbin_scripts)
-endif # UTILS
 
 lib_LIBRARIES = liblustreapi.a
 if LDISKFS_ENABLED
 
 lib_LIBRARIES = liblustreapi.a
 if LDISKFS_ENABLED
@@ -108,11 +107,6 @@ if LDISKFS_ENABLED
 libiam_a_SOURCES = libiam.c
 endif
 
 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
 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
 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)
 
 lhsmtool_posix_SOURCES = lhsmtool_posix.c
 lhsmtool_posix_LDADD := liblustreapi.a $(PTHREAD_LIBS)