Whamcloud - gitweb
LU-6001 build: fix autoconf DLC detection output
[fs/lustre-release.git] / lnet / autoconf / lustre-lnet.m4
index 32eae63..9b0924f 100644 (file)
@@ -114,29 +114,36 @@ AS_IF([test "x$enable_backoff" = xyes], [
 ]) # LN_CONFIG_BACKOFF
 
 #
-# LN_CONFIG_USOCKLND
-#
-# configure support for userspace TCP/IP LND
-#
-AC_DEFUN([LN_CONFIG_USOCKLND], [
-AC_MSG_CHECKING([whether to enable usocklnd])
-AC_ARG_ENABLE([usocklnd],
-       AC_HELP_STRING([--disable-usocklnd],
-               [disable usocklnd]),
-       [], [enable_usocklnd="yes"])
-AC_MSG_RESULT([$enable_usocklnd])
-USOCKLND=""
-AS_IF([test "x$enable_usocklnd" = xyes], [
-       AC_MSG_CHECKING([whether to build usocklnd])
-       AS_IF([test "$ENABLE_LIBPTHREAD" = yes], [
-               AC_MSG_RESULT([yes])
-               USOCKLND="usocklnd"
+# LN_CONFIG_DLC
+#
+# Configure dlc if enabled
+#
+# if libyaml is set (IE libyaml installed) and enable_dlc = yes then build
+# dlc other wise (IE if libyaml is not set or enable_dlc = no) then don't
+# build dlc.
+#
+AC_DEFUN([LN_CONFIG_DLC], [
+       AC_CHECK_LIB([yaml],  [yaml_parser_initialize],[
+               LIBYAML="libyaml"],[
+               LIBYAML=""],[-lm])
+       AC_MSG_CHECKING([whether to enable dlc])
+       AC_ARG_ENABLE([dlc],
+               AC_HELP_STRING([--disable-dlc],
+                       [disable building dlc]),
+                       [], [enable_dlc="yes"])
+       USE_DLC=""
+       AS_IF([test "x$enable_dlc" = xyes],
+               [AS_IF([test "x$LIBYAML" = xlibyaml], [
+                       USE_DLC="yes"
+                       AC_MSG_RESULT([yes])
+               ], [
+                       AC_MSG_RESULT([no (libyaml not present)])
+               ])
        ], [
-               AC_MSG_RESULT([no (libpthread not present or disabled)])
+               AC_MSG_RESULT([no])
        ])
+       AC_SUBST(USE_DLC)
 ])
-AC_SUBST(USOCKLND)
-]) # LN_CONFIG_USOCKLND
 
 #
 # LN_CONFIG_QUADRICS
@@ -595,15 +602,6 @@ LN_CONFIG_SK_DATA_READY
 ]) # LN_PROG_LINUX
 
 #
-# LN_PROG_DARWIN
-#
-# Darwin checks
-#
-AC_DEFUN([LN_PROG_DARWIN], [
-LB_DARWIN_CHECK_FUNCS([get_preemption_level])
-]) # LN_PROG_DARWIN
-
-#
 # LN_PATH_DEFAULTS
 #
 # default paths for installed files
@@ -675,7 +673,7 @@ AS_IF([test "x$enable_libwrap" = xyes], [
 AC_SUBST(LIBWRAP)
 
 LN_CONFIG_MAX_PAYLOAD
-LN_CONFIG_USOCKLND
+LN_CONFIG_DLC
 ]) # LN_CONFIGURE
 
 #
@@ -690,7 +688,7 @@ AM_CONDITIONAL(BUILD_O2IBLND,    test x$O2IBLND = "xo2iblnd")
 AM_CONDITIONAL(BUILD_RALND,      test x$RALND = "xralnd")
 AM_CONDITIONAL(BUILD_GNILND,     test x$GNILND = "xgnilnd")
 AM_CONDITIONAL(BUILD_GNILND_RCA, test x$GNILNDRCA = "xgnilndrca")
-AM_CONDITIONAL(BUILD_USOCKLND,   test x$USOCKLND = "xusocklnd")
+AM_CONDITIONAL(BUILD_DLC,        test x$USE_DLC = "xyes")
 ]) # LN_CONDITIONALS
 
 #
@@ -726,10 +724,7 @@ lnet/lnet/Makefile
 lnet/lnet/autoMakefile
 lnet/selftest/Makefile
 lnet/selftest/autoMakefile
-lnet/ulnds/Makefile
-lnet/ulnds/autoMakefile
-lnet/ulnds/socklnd/Makefile
 lnet/utils/Makefile
-lnet/include/lnet/darwin/Makefile
+lnet/utils/lnetconfig/Makefile
 ])
 ]) # LN_CONFIG_FILES