Some of autoconf checks are not used any more and can be removed.
Some of them should be moved according new place of code.
Rrename LN_CONFIG_CDEBUG to LIBCFS_CONFIG_CDEBUG
fix AC_CHECK_HEADERS([netdb.h]) and AC_CHECK_FUNCS([gethostbyname])
fix caching for check LB_CONFIG_MPITESTS
Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I988434d97051972b76b611e7b5a54835e8044734
Reviewed-on: http://review.whamcloud.com/14541
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
AS_IF([test "x$enable_utils" = xno], [enable_tests="no"])
m4_ifdef([LC_NODEMAP_PROC_DEBUG], [LC_NODEMAP_PROC_DEBUG])
-LN_CONFIG_CDEBUG
+LIBCFS_CONFIG_CDEBUG
LC_QUOTA
LB_PATH_SNMP
#
-# LN_CONFIG_CDEBUG
+# LIBCFS_CONFIG_CDEBUG
#
# whether to enable various libcfs debugs (CDEBUG, ENTRY/EXIT, LASSERT, etc.)
#
-AC_DEFUN([LN_CONFIG_CDEBUG], [
+AC_DEFUN([LIBCFS_CONFIG_CDEBUG], [
AC_MSG_CHECKING([whether to enable CDEBUG, CWARN])
AC_ARG_ENABLE([libcfs_cdebug],
AC_HELP_STRING([--disable-libcfs-cdebug],
AC_MSG_RESULT([$enable_libcfs_assert])
AS_IF([test x$enable_libcfs_assert = xyes],
[AC_DEFINE(LIBCFS_DEBUG, 1, [enable libcfs LASSERT, LASSERTF])])
-]) # LN_CONFIG_CDEBUG
+]) # LIBCFS_CONFIG_CDEBUG
#
# LIBCFS_CONFIG_PANIC_DUMPLOG
# libcfs/libcfs/user-prim.c, missing for RHEL5 and earlier userspace
AC_CHECK_FUNCS([strlcat])
+# libcfs/include/libcfs/linux/linux-prim.h, ...
+AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
+
+# libcfs/include/libcfs/linux/linux-prim.h
+AC_CHECK_HEADERS([linux/random.h], [], [],
+ [#ifdef HAVE_LINUX_TYPES_H
+ #include <linux/types.h>
+ #endif
+ ])
+
+# libcfs/include/libcfs/linux/libcfs.h
+# libcfs/include/libcfs/byteorder.h
+# libcfs/libcfs/util/nidstrings.c
+AC_CHECK_HEADERS([netdb.h asm/types.h endian.h])
+AC_CHECK_FUNCS([gethostbyname])
+
# -------- Check for required packages --------------
AC_MSG_NOTICE([LibCFS required packages checks
==============================================================================])
-AC_MSG_CHECKING([whether to enable 'efence' debugging support])
-AC_ARG_ENABLE(efence,
- AC_HELP_STRING([--enable-efence],
- [use efence library]),
- [], [enable_efence="no"])
-AC_MSG_RESULT([$enable_efence])
-AS_IF([test "$enable_efence" = yes], [
- LIBEFENCE="-lefence"
- AC_DEFINE(HAVE_LIBEFENCE, 1, [libefence support is requested])
-], [
- LIBEFENCE=""
+AC_MSG_CHECKING([whether to enable readline support])
+AC_ARG_ENABLE(readline,
+ AC_HELP_STRING([--disable-readline],
+ [disable readline support]),
+ [], [enable_readline="yes"])
+AC_MSG_RESULT([$enable_readline])
+
+LIBREADLINE=""
+AS_IF([test "x$enable_readline" = xyes], [
+ AC_CHECK_LIB([readline], [readline], [
+ LIBREADLINE="-lreadline"
+ AC_DEFINE(HAVE_LIBREADLINE, 1,
+ [readline library is available])
+ ])
])
-AC_SUBST(LIBEFENCE)
-
-# -------- check for -lpthread support ----
+AC_SUBST(LIBREADLINE)
AC_MSG_CHECKING([whether to use libpthread for libcfs library])
AC_ARG_ENABLE([libpthread],
[disable libpthread]),
[], [enable_libpthread="yes"])
AC_MSG_RESULT([$enable_libpthread])
+
+PTHREAD_LIBS=""
AS_IF([test "x$enable_libpthread" = xyes], [
- AC_CHECK_LIB([pthread], [pthread_create],
- [ENABLE_LIBPTHREAD="yes"],
- [ENABLE_LIBPTHREAD="no"])
- AS_IF([test "$ENABLE_LIBPTHREAD" = yes], [
+ AC_CHECK_LIB([pthread], [pthread_create], [
PTHREAD_LIBS="-lpthread"
- AC_DEFINE([HAVE_LIBPTHREAD], 1, [use libpthread])
- ], [
- PTHREAD_LIBS=""
+ AC_DEFINE([HAVE_LIBPTHREAD], 1,
+ [use libpthread for libcfs library])
])
- AC_SUBST(PTHREAD_LIBS)
], [
AC_MSG_WARN([Using libpthread for libcfs library is disabled explicitly])
- ENABLE_LIBPTHREAD="no"
])
-AC_SUBST(ENABLE_LIBPTHREAD)
+AC_SUBST(PTHREAD_LIBS)
]) # LIBCFS_CONFIGURE
#
# include <asm/byteorder.h>
#else /* __KERNEL__ */
-# include <endian.h>
+# ifdef HAVE_ENDIAN_H
+# include <endian.h>
+# endif
# include <byteswap.h>
# define __swab16(x) bswap_16(x)
#include <libcfs/libcfs.h>
#include <libcfs/libcfs_crypto.h>
#include <lnet/lib-lnet.h>
-#include <lnet/lib-dlc.h>
-#include <lnet/lnet.h>
-#include <lnet/nidstr.h>
static void
kportal_memhog_free (struct libcfs_device_userstate *ldu)
#include <libcfs/util/string.h>
#include <lnet/types.h>
#include <lnet/nidstr.h>
-#ifdef HAVE_GETHOSTBYNAME
+#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
return rrc;
],[
GNICPPFLAGS="$GNICPPFLAGS -DGNILND_USE_RCA=1"
- GNILNDRCA="gnilndrca"
])
EXTRA_KCFLAGS="$EXTRA_KCFLAGS_save"
])
AC_SUBST(GNICPPFLAGS)
-AC_SUBST(GNILNDRCA)
AC_SUBST(GNILND)
]) # LN_CONFIG_GNILND
==============================================================================])
# lnet/utils/portals.c
-AC_CHECK_HEADERS([netdb.h netinet/tcp.h asm/types.h endian.h sys/ioctl.h])
-AC_CHECK_FUNCS([gethostbyname socket connect])
-
-# lnet/utils/debug.c
-AC_CHECK_HEADERS([linux/version.h])
+AC_CHECK_HEADERS([netdb.h])
+AC_CHECK_FUNCS([gethostbyname])
# lnet/utils/wirecheck.c
AC_CHECK_FUNCS([strnlen])
# -------- Check for required packages --------------
-#
-# LC_CONFIG_READLINE
-#
-# Build with readline
-#
-AC_MSG_CHECKING([whether to enable readline support])
-AC_ARG_ENABLE(readline,
- AC_HELP_STRING([--disable-readline],
- [disable readline support]),
- [], [enable_readline="yes"])
-AC_MSG_RESULT([$enable_readline])
-
-# -------- check for readline if enabled ----
-
-LIBREADLINE=""
-AS_IF([test "x$enable_readline" = xyes], [
- AC_CHECK_LIB([readline], [readline], [
- LIBREADLINE="-lreadline"
- AC_DEFINE(HAVE_LIBREADLINE, 1,
- [readline library is available])])
-])
-AC_SUBST(LIBREADLINE)
-
-# -------- enable acceptor libwrap (TCP wrappers) support? -------
-
-AC_MSG_CHECKING([if libwrap support is requested])
-AC_ARG_ENABLE([libwrap],
- AC_HELP_STRING([--enable-libwrap], [use TCP wrappers]),
- [case "${enableval}" in
- yes) enable_libwrap="yes" ;;
- no) enable_libwrap="no" ;;
- *) AC_MSG_ERROR(bad value ${enableval} for --enable-libwrap) ;;
- esac], [enable_libwrap="no"])
-AC_MSG_RESULT([$enable_libwrap])
-LIBWRAP=""
-AS_IF([test "x$enable_libwrap" = xyes], [
- LIBWRAP="-lwrap"
- AC_DEFINE(HAVE_LIBWRAP, 1,
- [libwrap support is requested])
+AC_MSG_CHECKING([whether to enable 'efence' debugging support])
+AC_ARG_ENABLE(efence,
+ AC_HELP_STRING([--enable-efence],
+ [use efence library]),
+ [], [enable_efence="no"])
+AC_MSG_RESULT([$enable_efence])
+
+LIBEFENCE=""
+AS_IF([test "$enable_efence" = yes], [
+ LIBEFENCE="-lefence"
+ AC_DEFINE(HAVE_LIBEFENCE, 1,
+ [libefence support is requested])
])
-AC_SUBST(LIBWRAP)
+AC_SUBST(LIBEFENCE)
LN_CONFIG_MAX_PAYLOAD
LN_CONFIG_DLC
#
AC_DEFUN([LN_CONDITIONALS], [
AM_CONDITIONAL(BUILD_O2IBLND, test x$O2IBLND = "xo2iblnd")
-AM_CONDITIONAL(BUILD_GNILND, test x$GNILND = "xgnilnd")
-AM_CONDITIONAL(BUILD_GNILND_RCA, test x$GNILNDRCA = "xgnilndrca")
+AM_CONDITIONAL(BUILD_GNILND, test x$GNILND = "xgnilnd")
AM_CONDITIONAL(BUILD_DLC, test x$USE_DLC = "xyes")
]) # LN_CONDITIONALS
#include <errno.h>
#include <getopt.h>
#include <limits.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
MPI_Initialized(&flag);
return 0;
}
- ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"
- enable_mpitests=$lb_cv_mpi_tests])
+ ])], [lb_cv_mpi_tests="yes"], [lb_cv_mpi_tests="no"])
])
+ enable_mpitests=$lb_cv_mpi_tests
CC=$oldcc
fi
AC_SUBST(MPICC_WRAPPER)
# maximum MDS thread count
LC_MDS_MAX_THREADS
+# lustre/utils/gss/gss_util.c
+# lustre/utils/gss/gssd_proc.c
+# lustre/utils/gss/krb5_util.c
+# lustre/utils/llog_reader.c
+# lustre/utils/create_iam.c
+# lustre/utils/libiam.c
+AC_CHECK_HEADERS([netdb.h endian.h])
+AC_CHECK_FUNCS([gethostbyname])
+
# lustre/utils/llverdev.c
AC_CHECK_HEADERS([blkid/blkid.h])
-# libcfs/include/libcfs/linux/linux-prim.h, ...
-AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
-
-# libcfs/include/libcfs/linux/linux-prim.h
-AC_CHECK_HEADERS([linux/random.h], [], [],
- [#ifdef HAVE_LINUX_TYPES_H
- #include <linux/types.h>
- #endif
- ])
-
-# utils/llverfs.c
+# lustre/utils/llverfs.c
AC_CHECK_HEADERS([ext2fs/ext2fs.h])
SELINUX=""
* Lustre is a trademark of Sun Microsystems, Inc.
*/
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/mman.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
#include <fcntl.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <netdb.h>
+#include <getopt.h>
#include <string.h>
-#include <sys/wait.h>
-#include <sys/time.h>
+#include <errno.h>
char *dir = NULL, *dir2 = NULL;
long page_size;
#include <errno.h>
#include <stdio.h>
#include <ctype.h>
-#include <sys/file.h>
-#include <signal.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
#include <sys/param.h>
-#include <netdb.h>
-#include <fcntl.h>
#include <gssapi/gssapi.h>
#if defined(HAVE_KRB5) && !defined(GSS_C_NT_HOSTBASED_SERVICE)
#include <gssapi/gssapi_generic.h>
#include "err_util.h"
#include "gssd.h"
#ifdef HAVE_UNISTD_H
-#include <unistd.h>
+# include <unistd.h>
#endif
#include <stdlib.h>
#ifdef HAVE_COM_ERR_H
-#include <com_err.h>
+# include <com_err.h>
#endif
#include "lsupport.h"
#include <unistd.h>
#include <errno.h>
#include <gssapi/gssapi.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
#include "gssd.h"
#include "err_util.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
#include <dirent.h>
#include <fcntl.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
#include <dirent.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
#include <errno.h>
#include <assert.h>
-#ifdef HAVE_GETHOSTBYNAME
+#ifdef HAVE_NETDB_H
# include <netdb.h>
#endif
#include <lnet/nidstr.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
-#include <netdb.h>
+#ifdef HAVE_NETDB_H
+# include <netdb.h>
+#endif
#include "svcgssd.h"
#include "gss_util.h"
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
-#include <endian.h>
+#ifdef HAVE_ENDIAN_H
+# include <endian.h>
+#endif
#include <unistd.h>
#include <fcntl.h>