]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
clean up configure.in and make consistent patch
authorpmmccorm <patrick.m.mccormick@intel.com>
Mon, 13 May 2013 20:47:36 +0000 (13:47 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Fri, 17 May 2013 19:35:52 +0000 (12:35 -0700)
configure.in

index 84ad9e3a709927c9d1c783decab8b9312de42eaf..abffe215b5daf8daed13e6c98cf83a105096bb78 100644 (file)
@@ -8,52 +8,33 @@ AM_CONFIG_HEADER(config.h)
 AM_INIT_AUTOMAKE(intel-mic-ofed-dapl, 2.0.36.7)
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 
-
 AM_PROG_LIBTOOL
 
-AC_ARG_ENABLE(libcheck, [  --disable-libcheck      do not test for presence of ib libraries],
-[       if test x$enableval = xno ; then
-                disable_libcheck=yes
-        fi
-])
+AC_ARG_ENABLE([libcheck],
+  AS_HELP_STRING([--disable-libcheck], [do not test for presence of ib libraries]),
+    [ if test x$enableval = xno ; then
+      disable_libcheck=yes
+    fi ]
+)
 
 dnl Checks for programs
 AC_PROG_CC
 
-dnl Checks for header files 
-if test "$disable_libcheck" != "yes"
-then
-AC_CHECK_HEADER(infiniband/verbs.h, [],
+dnl Checks for header files and libraries
+if test "$disable_libcheck" != "yes"; then
+  AC_CHECK_HEADER(infiniband/verbs.h, [],
     AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
-AC_CHECK_HEADER(scif.h, [],
-    AC_MSG_ERROR([<scif.h> not found.  Is libscif installed?]))
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h])
-AC_CHECK_MEMBER(struct ibv_port_attr.link_layer, 
+  AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h syslog.h unistd.h])
+  AC_CHECK_MEMBER(struct ibv_port_attr.link_layer,
     AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "yes"), 
     AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no"), 
     [#include <infiniband/verbs.h>])
-AC_CHECK_FUNCS([gethostname gettimeofday inet_ntoa memset select socket strcasecmp strdup strerror strtol sysinfo])
-
-if test "$with_ib_acm" != "" && test "$with_ib_acm" != "no"; then
-AC_CHECK_MEMBER(struct ibv_path_record.service_id, [],
-    AC_MSG_ERROR([IB ACM support requires libibverbs 1.1.4 or greater.]),
-    [#include <infiniband/sa.h>])
-AC_CHECK_HEADER(infiniband/acm.h, [],
-    AC_MSG_ERROR([IB ACM requested but <infiniband/acm.h> not found.]))
-fi
+  AC_CHECK_FUNCS([gethostname gettimeofday inet_ntoa memset select socket strcasecmp strdup strerror strtol sysinfo])
 
 else
     AM_CONDITIONAL(DEFINE_ATTR_LINK_LAYER, test "yes" = "no")
 fi
-dnl End check for libraries
-
-if test "$with_ib_acm" != "" && test "$with_ib_acm" != "no"; then
-    AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services])
-    ac_use_acm=yes
-else
-    ac_use_acm=no
-fi
-AM_CONDITIONAL(DAPL_USE_IBACM, test "$ac_use_acm" = "yes")
+dnl End check for header files and libraries
 
 AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
     if test -n "`$LD --help < /dev/null 2>/dev/null | grep version-script`"; then
@@ -64,15 +45,35 @@ AC_CACHE_CHECK(whether ld accepts --version-script, ac_cv_version_script,
 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
 
 dnl Support debug mode build - if enable-debug provided the DEBUG variable is set 
-AC_ARG_ENABLE(debug,
-[  --enable-debug Turn on debug mode, default=off],
-[case "${enableval}" in
-  yes) debug=true ;;
-  no)  debug=false ;;
-  *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
-esac],[debug=false])
+AC_ARG_ENABLE([debug],
+  AS_HELP_STRING([--enable-debug],[enable debug build, default=disabled]),
+  [case "${enableval}" in
+    yes) debug=true ;;
+    no)  debug=false ;;
+    *) AC_MSG_ERROR(bad value ${enableval} for --enable-debug) ;;
+  esac],
+  [debug=false])
 AM_CONDITIONAL(DEBUG, test x$debug = xtrue)
 
+dnl Support for IB acm sevices
+AC_ARG_ENABLE([acm],
+  AS_HELP_STRING([--enable-acm],[enable IB ACM services, default=disabled]),
+  [case "$enableval" in
+    yes)
+        AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services])
+          AC_CHECK_MEMBER(struct ibv_path_record.service_id, [],
+          AC_MSG_ERROR([IB ACM support requires libibverbs 1.1.4 or greater.]),
+          [#include <infiniband/sa.h>])
+        AC_CHECK_HEADER(infiniband/acm.h, [],
+          AC_MSG_ERROR([IB ACM requested but <infiniband/acm.h> not found.]))
+        AC_DEFINE(DAPL_USE_IBACM, 1, [set to 1 to use IB ACM services])
+        acm=true ;;
+    no) acm=false ;;
+    *) AC_MSG_ERROR(bad value ${enableval} for --enable-acm) ;;
+  esac],
+  [acm=false])
+AM_CONDITIONAL(DAPL_USE_IBACM, test x$acm = true)
+
 dnl Support to enable/disable CMA (rdma_cm) provider library build
 AC_ARG_ENABLE([cma], 
   AS_HELP_STRING([--disable-cma],[disable CMA (rdma_cm) provider build, default=enabled]),
@@ -110,7 +111,9 @@ dnl Support to enable/disable MCM (proxy) MIC SCIF provider library build
 AC_ARG_ENABLE([mcm], 
   AS_HELP_STRING([--enable-mcm],[enable MCM (proxy CM) SCIF provider build, default=disabled]),
   [case "${enableval}" in
-    yes) mcm=true ;;
+    yes)
+         AC_CHECK_HEADER(scif.h, [], AC_MSG_ERROR([<scif.h> not found.  Is libscif installed?]))
+         mcm=true ;;
     no)  mcm=false ;;
     *) AC_MSG_ERROR(bad value ${enableval} for --enable-mcm) ;; 
   esac],