[Pvfs2-cvs] commit by pw in pvfs2: configure configure.in

CVS commit program cvs at parl.clemson.edu
Sun Jul 22 12:34:32 EDT 2007


Update of /projects/cvsroot/pvfs2
In directory parlweb1:/tmp/cvs-serv24518

Modified Files:
	configure configure.in 
Log Message:
Move a big chunk of configure out to a separate M4 include:  --with-ib.


Index: configure
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure,v
diff -u -p -p -u -r1.352 -r1.353
--- configure	22 Jul 2007 16:22:02 -0000	1.352
+++ configure	22 Jul 2007 16:34:31 -0000	1.353
@@ -14093,17 +14093,18 @@ fi
 
 
 
-ib_home=
+
+                    ib_home=
 
 # Check whether --with-ib was given.
 if test "${with_ib+set}" = set; then
   withval=$with_ib; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-ib requires the path to your IB tree." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-ib requires the path to your IB tree." >&5
 echo "$as_me: error: Option --with-ib requires the path to your IB tree." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	ib_home="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    ib_home="$withval"
+	fi
 
 fi
 
@@ -14111,12 +14112,12 @@ fi
 # Check whether --with-ib-includes was given.
 if test "${with_ib_includes+set}" = set; then
   withval=$with_ib_includes; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-ib-includes requires path to IB headers." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-ib-includes requires path to IB headers." >&5
 echo "$as_me: error: Option --with-ib-includes requires path to IB headers." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	IB_INCDIR="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    IB_INCDIR="$withval"
+	fi
 
 fi
 
@@ -14124,30 +14125,30 @@ fi
 # Check whether --with-ib-libs was given.
 if test "${with_ib_libs+set}" = set; then
   withval=$with_ib_libs; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-ib-libs requires path to IB libraries." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-ib-libs requires path to IB libraries." >&5
 echo "$as_me: error: Option --with-ib-libs requires path to IB libraries." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	IB_LIBDIR="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    IB_LIBDIR="$withval"
+	fi
 
 fi
 
-if test -n "$ib_home" ; then
-    if test -z "$IB_INCDIR"; then
-	IB_INCDIR=$ib_home/include
-    fi
-    if test -z "$IB_LIBDIR"; then
-	IB_LIBDIR=$ib_home/lib64
-	if test ! -d "$IB_LIBDIR" ; then
-	    IB_LIBDIR=$ib_home/lib
+            if test -n "$ib_home" ; then
+	if test -z "$IB_INCDIR"; then
+	    IB_INCDIR=$ib_home/include
+	fi
+	if test -z "$IB_LIBDIR"; then
+	    IB_LIBDIR=$ib_home/lib64
+	    if test ! -d "$IB_LIBDIR" ; then
+		IB_LIBDIR=$ib_home/lib
+	    fi
 	fi
     fi
-fi
-if test -n "$IB_INCDIR$IB_LIBDIR" ; then
-    save_cppflags="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS -I$IB_INCDIR"
-    if test "${ac_cv_header_vapi_h+set}" = set; then
+        if test -n "$IB_INCDIR$IB_LIBDIR" ; then
+	save_cppflags="$CPPFLAGS"
+	CPPFLAGS="$CPPFLAGS -I$IB_INCDIR"
+	if test "${ac_cv_header_vapi_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for vapi.h" >&5
 echo $ECHO_N "checking for vapi.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_vapi_h+set}" = set; then
@@ -14281,15 +14282,15 @@ echo "$as_me: error: Header vapi.h not f
 fi
 
 
-                if test ! -f $IB_LIBDIR/libvapi.so ; then
-	if test ! -f $IB_LIBDIR/libvapi.a ; then
-	    { { echo "$as_me:$LINENO: error: Infiniband library libvapi.so not found." >&5
+				if test ! -f $IB_LIBDIR/libvapi.so ; then
+	    if test ! -f $IB_LIBDIR/libvapi.a ; then
+		{ { echo "$as_me:$LINENO: error: Infiniband library libvapi.so not found." >&5
 echo "$as_me: error: Infiniband library libvapi.so not found." >&2;}
    { (exit 1); exit 1; }; }
+	    fi
 	fi
-    fi
-    BUILD_IB=1
-    { echo "$as_me:$LINENO: checking for wrap_common.h" >&5
+	BUILD_IB=1
+	{ echo "$as_me:$LINENO: checking for wrap_common.h" >&5
 echo $ECHO_N "checking for wrap_common.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_wrap_common_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
@@ -14342,23 +14343,23 @@ _ACEOF
 fi
 
 
-    CPPFLAGS="$save_cppflags"
-fi
+	CPPFLAGS="$save_cppflags"
+    fi
 
 
 
 
-openib_home=
+                    openib_home=
 
 # Check whether --with-openib was given.
 if test "${with_openib+set}" = set; then
   withval=$with_openib; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-openib requires the path to your OpenIB tree." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-openib requires the path to your OpenIB tree." >&5
 echo "$as_me: error: Option --with-openib requires the path to your OpenIB tree." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	openib_home="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    openib_home="$withval"
+	fi
 
 fi
 
@@ -14366,12 +14367,12 @@ fi
 # Check whether --with-openib-includes was given.
 if test "${with_openib_includes+set}" = set; then
   withval=$with_openib_includes; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-openib-includes requires path to OpenIB headers." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-openib-includes requires path to OpenIB headers." >&5
 echo "$as_me: error: Option --with-openib-includes requires path to OpenIB headers." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	OPENIB_INCDIR="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    OPENIB_INCDIR="$withval"
+	fi
 
 fi
 
@@ -14379,30 +14380,30 @@ fi
 # Check whether --with-openib-libs was given.
 if test "${with_openib_libs+set}" = set; then
   withval=$with_openib_libs; if test -z "$withval" -o "$withval" = yes ; then
-	{ { echo "$as_me:$LINENO: error: Option --with-openib-libs requires path to OpenIB libraries." >&5
+	    { { echo "$as_me:$LINENO: error: Option --with-openib-libs requires path to OpenIB libraries." >&5
 echo "$as_me: error: Option --with-openib-libs requires path to OpenIB libraries." >&2;}
    { (exit 1); exit 1; }; }
-    elif test "$withval" != no ; then
-	OPENIB_LIBDIR="$withval"
-    fi
+	elif test "$withval" != no ; then
+	    OPENIB_LIBDIR="$withval"
+	fi
 
 fi
 
-if test -n "$openib_home" ; then
-    if test -z "$OPENIB_INCDIR"; then
-	OPENIB_INCDIR=$openib_home/include
-    fi
-    if test -z "$OPENIB_LIBDIR"; then
-	OPENIB_LIBDIR=$openib_home/lib64
-	if test ! -d "$OPENIB_LIBDIR" ; then
-	    OPENIB_LIBDIR=$openib_home/lib
+            if test -n "$openib_home" ; then
+	if test -z "$OPENIB_INCDIR"; then
+	    OPENIB_INCDIR=$openib_home/include
+	fi
+	if test -z "$OPENIB_LIBDIR"; then
+	    OPENIB_LIBDIR=$openib_home/lib64
+	    if test ! -d "$OPENIB_LIBDIR" ; then
+		OPENIB_LIBDIR=$openib_home/lib
+	    fi
 	fi
     fi
-fi
-if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then
-    save_cppflags="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR"
-    if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
+        if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then
+	save_cppflags="$CPPFLAGS"
+	CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR"
+	if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
   { echo "$as_me:$LINENO: checking for infiniband/verbs.h" >&5
 echo $ECHO_N "checking for infiniband/verbs.h... $ECHO_C" >&6; }
 if test "${ac_cv_header_infiniband_verbs_h+set}" = set; then
@@ -14536,26 +14537,26 @@ echo "$as_me: error: Header infiniband/v
 fi
 
 
-            if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then
-	if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then
-	    { { echo "$as_me:$LINENO: error: OpenIB library libibverbs.so not found." >&5
+			if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then
+	    if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then
+		{ { echo "$as_me:$LINENO: error: OpenIB library libibverbs.so not found." >&5
 echo "$as_me: error: OpenIB library libibverbs.so not found." >&2;}
    { (exit 1); exit 1; }; }
+	    fi
 	fi
+	BUILD_OPENIB=1
+	CPPFLAGS="$save_cppflags"
     fi
-    BUILD_OPENIB=1
-    CPPFLAGS="$save_cppflags"
-fi
 
 
 
 
-if test -n "$BUILD_OPENIB" ; then
-            save_ldflags="$LDFLAGS"
-    LDFLAGS="-L$OPENIB_LIBDIR -libverbs"
-    { echo "$as_me:$LINENO: checking for ibv_get_devices" >&5
+    if test -n "$BUILD_OPENIB" ; then
+			save_ldflags="$LDFLAGS"
+	LDFLAGS="-L$OPENIB_LIBDIR -libverbs"
+	{ echo "$as_me:$LINENO: checking for ibv_get_devices" >&5
 echo $ECHO_N "checking for ibv_get_devices... $ECHO_C" >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
+	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
@@ -14566,7 +14567,7 @@ int
 main ()
 {
 
-	ibv_get_devices();
+	    ibv_get_devices();
 
   ;
   return 0;
@@ -14608,24 +14609,24 @@ fi
 
 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
       conftest$ac_exeext conftest.$ac_ext
-    LDFLAGS="$save_ldflags"
+	LDFLAGS="$save_ldflags"
 
-        { echo "$as_me:$LINENO: checking for IBV_EVENT_CLIENT_REREGISTER" >&5
+		{ echo "$as_me:$LINENO: checking for IBV_EVENT_CLIENT_REREGISTER" >&5
 echo $ECHO_N "checking for IBV_EVENT_CLIENT_REREGISTER... $ECHO_C" >&6; }
-    cat >conftest.$ac_ext <<_ACEOF
+	cat >conftest.$ac_ext <<_ACEOF
 /* confdefs.h.  */
 _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 
-	#include "infiniband/verbs.h"
+	    #include "infiniband/verbs.h"
 
 int
 main ()
 {
 
-	enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER;
+	    enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER;
 
   ;
   return 0;
@@ -14665,7 +14666,8 @@ echo "${ECHO_T}no" >&6; }
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
+    fi
+
 
 
                                                                         use_portals=

Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
diff -u -p -p -u -r1.328 -r1.329
--- configure.in	22 Jul 2007 16:22:03 -0000	1.328
+++ configure.in	22 Jul 2007 16:34:32 -0000	1.329
@@ -810,163 +810,10 @@ fi
 AC_SUBST(MX_HOME)
 AC_SUBST(BUILD_MX)
 
-dnl Configure options for IB install path.
-dnl --with-ib=<dir> is shorthand for
-dnl    --with-ib-includes=<dir>/include
-dnl    --with-ib-libs=<dir>/lib  (or lib64 if that exists)
-ib_home=
-AC_ARG_WITH(ib,
-[  --with-ib=<dir>         Location of the IB installation (default no IB)],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-ib requires the path to your IB tree.])
-    elif test "$withval" != no ; then
-	ib_home="$withval"
-    fi
-)
-AC_ARG_WITH(ib-includes,
-[  --with-ib-includes=<dir>      Location of the IB includes],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-ib-includes requires path to IB headers.])
-    elif test "$withval" != no ; then
-	IB_INCDIR="$withval"
-    fi
-)
-AC_ARG_WITH(ib-libs,
-[  --with-ib-libs=<dir>          Location of the IB libraries],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-ib-libs requires path to IB libraries.])
-    elif test "$withval" != no ; then
-	IB_LIBDIR="$withval"
-    fi
-)
-dnl If supplied the incls and libs explicitly, use them, else populate them
-dnl using guesses from the --with-ib dir.
-if test -n "$ib_home" ; then
-    if test -z "$IB_INCDIR"; then
-	IB_INCDIR=$ib_home/include
-    fi
-    if test -z "$IB_LIBDIR"; then
-	IB_LIBDIR=$ib_home/lib64
-	if test ! -d "$IB_LIBDIR" ; then
-	    IB_LIBDIR=$ib_home/lib
-	fi
-    fi
-fi
-dnl If anything IB-ish was set, go look for header.
-if test -n "$IB_INCDIR$IB_LIBDIR" ; then
-    save_cppflags="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS -I$IB_INCDIR"
-    AC_CHECK_HEADER(vapi.h,, AC_MSG_ERROR([Header vapi.h not found.]))
-    dnl Run test is not possible on a machine that does not have an IB NIC,
-    dnl and link test is hard because we need so many little libraries.   Bail
-    dnl and just check for existence; full library list is in Makefile.in.
-    if test ! -f $IB_LIBDIR/libvapi.so ; then
-	if test ! -f $IB_LIBDIR/libvapi.a ; then
-	    AC_MSG_ERROR([Infiniband library libvapi.so not found.])
-	fi
-    fi
-    BUILD_IB=1
-    AC_CHECK_HEADER(wrap_common.h,
-	AC_DEFINE(HAVE_IB_WRAP_COMMON_H, 1, Define if IB wrap_common.h exists.),
-	,
-	[#include <vapi.h>])
-    CPPFLAGS="$save_cppflags"
-fi
-AC_SUBST(BUILD_IB)
-AC_SUBST(IB_INCDIR)
-AC_SUBST(IB_LIBDIR)
-
-dnl Configure options for OpenIB install path.
-dnl --with-openib=<dir> is shorthand for
-dnl    --with-openib-includes=<dir>/include
-dnl    --with-openib-libs=<dir>/lib  (or lib64 if that exists)
-openib_home=
-AC_ARG_WITH(openib,
-[  --with-openib=<dir>     Location of the OpenIB install (default no OpenIB)],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-openib requires the path to your OpenIB tree.])
-    elif test "$withval" != no ; then
-	openib_home="$withval"
-    fi
-)
-AC_ARG_WITH(openib-includes,
-[  --with-openib-includes=<dir>  Location of the OpenIB includes],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-openib-includes requires path to OpenIB headers.])
-    elif test "$withval" != no ; then
-	OPENIB_INCDIR="$withval"
-    fi
-)
-AC_ARG_WITH(openib-libs,
-[  --with-openib-libs=<dir>      Location of the OpenIB libraries],
-    if test -z "$withval" -o "$withval" = yes ; then
-	AC_MSG_ERROR([Option --with-openib-libs requires path to OpenIB libraries.])
-    elif test "$withval" != no ; then
-	OPENIB_LIBDIR="$withval"
-    fi
-)
-dnl If supplied the incls and libs explicitly, use them, else populate them
-dnl using guesses from the --with-openib dir.
-if test -n "$openib_home" ; then
-    if test -z "$OPENIB_INCDIR"; then
-	OPENIB_INCDIR=$openib_home/include
-    fi
-    if test -z "$OPENIB_LIBDIR"; then
-	OPENIB_LIBDIR=$openib_home/lib64
-	if test ! -d "$OPENIB_LIBDIR" ; then
-	    OPENIB_LIBDIR=$openib_home/lib
-	fi
-    fi
-fi
-dnl If anything OpenIB-ish was set, go look for header.
-if test -n "$OPENIB_INCDIR$OPENIB_LIBDIR" ; then
-    save_cppflags="$CPPFLAGS"
-    CPPFLAGS="$CPPFLAGS -I$OPENIB_INCDIR"
-    AC_CHECK_HEADER(infiniband/verbs.h,,
-	AC_MSG_ERROR([Header infiniband/verbs.h not found.]))
-    dnl Run test is not possible on a machine that does not have an IB NIC.
-    dnl Link test would work, but just check for existence.
-    if test ! -f $OPENIB_LIBDIR/libibverbs.so ; then
-	if test ! -f $OPENIB_LIBDIR/libibverbs.a ; then
-	    AC_MSG_ERROR([OpenIB library libibverbs.so not found.])
-	fi
-    fi
-    BUILD_OPENIB=1
-    CPPFLAGS="$save_cppflags"
-fi
-AC_SUBST(BUILD_OPENIB)
-AC_SUBST(OPENIB_INCDIR)
-AC_SUBST(OPENIB_LIBDIR)
-
-if test -n "$BUILD_OPENIB" ; then
-    dnl Check for which version of the ibverbs library, device opening is
-    dnl different.  This format is the older one; newer is ibv_get_device_list.
-    save_ldflags="$LDFLAGS"
-    LDFLAGS="-L$OPENIB_LIBDIR -libverbs"
-    AC_MSG_CHECKING(for ibv_get_devices)
-    AC_TRY_LINK([], [
-	ibv_get_devices();
-	],
-	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_IBV_GET_DEVICES, 1,
-	          Define if libibverbs has ibv_get_devices),
-	AC_MSG_RESULT(no)
-    )
-    LDFLAGS="$save_ldflags"
-
-    dnl Check for existence of reregister event; it's somewhat new.
-    AC_MSG_CHECKING(for IBV_EVENT_CLIENT_REREGISTER)
-    AC_TRY_COMPILE([
-	#include "infiniband/verbs.h"
-    ], [
-	enum ibv_event_type x = IBV_EVENT_CLIENT_REREGISTER;
-    ],
-	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_IBV_EVENT_CLIENT_REREGISTER, 1,
-	          Define if libibverbs has reregister event),
-	AC_MSG_RESULT(no)
-    )
-fi
+dnl
+dnl Configure bmi_ib, if --with-ib or a variant given.
+dnl
+AX_IB
 
 dnl
 dnl Configure bmi_portals, if --with-portals or a variant given.



More information about the Pvfs2-cvs mailing list