[EMAIL PROTECTED] wrote on Thu, 10 Jan 2008 09:48 -0700:
> I found a problem building pvfs-2.7.0, GM, on an
> x86_64 platform. The file Makefile.in assumes that
> the libraries for GM are found in [EMAIL PROTECTED]@/lib,
> but since the system is 64-bit, they are in [EMAIL PROTECTED]@/lib64.
> I have never used MX, but I suspect it has the same problem.
>
> Changing the Makefile.in file allowed me to build the
> code, but I suspect this should be automated.
I don't use GM or MX, so can't really test this. But I did the IB
configure rules a while back and it is still fresh enough in my mind
for me to do similar for these. Here's a first stab at a patch. If
you are willing to test the GM part and make it work for you, we can
check it in and cross fingers there are no typos.
I hope there isn't too much fuzz for you between 2.7.0 and the CVS
head that I use. Do something like:
cd pvfs2-2.7.0
patch -p0 -sNE < gm-mx-autoconf.diff
make distclean
./configure ...
make
Thanks for the push to fix this.
-- Pete
Index: Makefile.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/Makefile.in,v
retrieving revision 1.255
diff -u -p -r1.255 Makefile.in
--- Makefile.in 17 Aug 2007 04:04:23 -0000 1.255
+++ Makefile.in 10 Jan 2008 18:17:13 -0000
@@ -299,32 +299,24 @@ endif
# enable GM if configure detected it
ifdef BUILD_GM
- CFLAGS += -I @GM_HOME@/include -I @GM_HOME@/include/gm
- CFLAGS += -D__STATIC_METHOD_BMI_GM__
- # TODO: later on we will want the ability to modify this at configure
- # time
- CFLAGS += -DENABLE_GM_BUFPOOL
- LDFLAGS += [EMAIL PROTECTED]@/lib
- SERVER_LDFLAGS += [EMAIL PROTECTED]@/lib
- LIBS += -lgm
- LIBS_THREADED += -lgm
- SERVERLIBS += -lgm
+ # other settings in bmi_gm/module.mk.in
+ CFLAGS += -D__STATIC_METHOD_BMI_GM__
+ GMLIBS := [EMAIL PROTECTED]@ -lgm
+ LIBS += $(GMLIBS)
+ LIBS_THREADED += $(GMLIBS)
+ SERVERLIBS += $(GMLIBS)
endif
################################################################
# enable MX if configure detected it
ifdef BUILD_MX
- CFLAGS += -I @MX_HOME@/include
- CFLAGS += -D__STATIC_METHOD_BMI_MX__
- # TODO: later on we will want the ability to modify this at configure
- # time
- CFLAGS += -g -O0
- LDFLAGS += [EMAIL PROTECTED]@/lib
- SERVER_LDFLAGS += [EMAIL PROTECTED]@/lib
- LIBS += -lmyriexpress -lpthread
- LIBS_THREADED += -lmyriexpress -lpthread
- SERVERLIBS += -lmyriexpress -lpthread
+ # other settings in bmi_mx/module.mk.in
+ CFLAGS += -D__STATIC_METHOD_BMI_MX__
+ MXLIBS := [EMAIL PROTECTED]@ -lmyriexpress -lpthread
+ LIBS += $(MXLIBS)
+ LIBS_THREADED += $(MXLIBS)
+ SERVERLIBS += $(MXLIBS)
endif
#####################################
Index: configure
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure,v
retrieving revision 1.370
diff -u -p -r1.370 configure
--- configure 11 Dec 2007 15:51:19 -0000 1.370
+++ configure 10 Jan 2008 18:17:13 -0000
@@ -712,10 +712,12 @@ NEEDS_LIBRT
TARGET_OS_DARWIN
TARGET_OS_LINUX
BUILD_BMI_TCP
-GM_HOME
BUILD_GM
-MX_HOME
+GM_INCDIR
+GM_LIBDIR
BUILD_MX
+MX_INCDIR
+MX_LIBDIR
BUILD_IB
IB_INCDIR
IB_LIBDIR
@@ -1355,8 +1357,12 @@ Optional Packages:
--with-valgrind=<path> Use valgrind annotations for debugging.
--with-db=<dir> Location of installed DB package (default=/usr)
--without-bmi-tcp Disable BMI TCP method
- --with-gm=<dir> Location of the GM installation (default no GM)
- --with-mx=<dir> Location of the MX installation (default no MX)
+ --with-gm=<dir> Location of the GM install (default no GM)
+ --with-gm-includes=<dir> Location of the GM includes
+ --with-gm-libs=<dir> Location of the GM libraries
+ --with-mx=<dir> Location of the MX install (default no MX)
+ --with-mx-includes=<dir> Location of the MX includes
+ --with-mx-libs=<dir> Location of the MX libraries
--with-ib=<dir> Location of the IB installation (default no IB)
--with-ib-includes=<dir> Location of the IB includes
--with-ib-libs=<dir> Location of the IB libraries
@@ -5960,6 +5966,24 @@ fi
+#
+# Threading options.
+#
+# Client - thread-safe or not
+# --disable-thread-safety
+#
+# Server - three options:
+# trove
+# (hack Makefile.in)
+# job
+# (hack Makefile.in)
+# aio
+# --disable-aio-threaded-callbacks
+#
+# Client-core - threaded or not
+# currently both are built and installed
+#
+
{ echo "$as_me:$LINENO: checking for client library thread safety support" >&5
echo $ECHO_N "checking for client library thread safety support... $ECHO_C"
>&6; }
# Check whether --enable-thread-safety was given.
@@ -14255,24 +14279,62 @@ fi
-GM_HOME=
+
+ gm_home=
# Check whether --with-gm was given.
if test "${with_gm+set}" = set; then
withval=$with_gm; if test -z "$withval" -o "$withval" = yes ; then
- { { echo "$as_me:$LINENO: error: Option --with-gm requires the path to
your GM tree." >&5
+ { { echo "$as_me:$LINENO: error: Option --with-gm requires the path
to your GM tree." >&5
echo "$as_me: error: Option --with-gm requires the path to your GM tree." >&2;}
{ (exit 1); exit 1; }; }
- elif test "$withval" != no ; then
- GM_HOME="$withval"
- fi
+ elif test "$withval" != no ; then
+ gm_home="$withval"
+ fi
fi
-if test -n "$GM_HOME" ; then
- save_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I ${GM_HOME}/include -I ${GM_HOME}/include/gm"
- if test "${ac_cv_header_gm_h+set}" = set; then
+
+# Check whether --with-gm-includes was given.
+if test "${with_gm_includes+set}" = set; then
+ withval=$with_gm_includes; if test -z "$withval" -o "$withval" = yes ; then
+ { { echo "$as_me:$LINENO: error: Option --with-gm-includes requires
path to GM headers." >&5
+echo "$as_me: error: Option --with-gm-includes requires path to GM headers."
>&2;}
+ { (exit 1); exit 1; }; }
+ elif test "$withval" != no ; then
+ GM_INCDIR="$withval"
+ fi
+
+fi
+
+
+# Check whether --with-gm-libs was given.
+if test "${with_gm_libs+set}" = set; then
+ withval=$with_gm_libs; if test -z "$withval" -o "$withval" = yes ; then
+ { { echo "$as_me:$LINENO: error: Option --with-gm-libs requires
path to GM libraries." >&5
+echo "$as_me: error: Option --with-gm-libs requires path to GM libraries."
>&2;}
+ { (exit 1); exit 1; }; }
+ elif test "$withval" != no ; then
+ GM_LIBDIR="$withval"
+ fi
+
+fi
+
+ if test -n "$gm_home" ; then
+ if test -z "$GM_INCDIR"; then
+ GM_INCDIR=$gm_home/include
+ fi
+ if test -z "$GM_LIBDIR"; then
+ GM_LIBDIR=$gm_home/lib64
+ if test ! -d "$GM_LIBDIR" ; then
+ GM_LIBDIR=$gm_home/lib
+ fi
+ fi
+ fi
+ if test -n "$GM_INCDIR$GM_LIBDIR" ; then
+ save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm"
+ if test "${ac_cv_header_gm_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for gm.h" >&5
echo $ECHO_N "checking for gm.h... $ECHO_C" >&6; }
if test "${ac_cv_header_gm_h+set}" = set; then
@@ -14406,29 +14468,77 @@ echo "$as_me: error: Header gm.h not fou
fi
- BUILD_GM=1
- CPPFLAGS="$save_cppflags"
-fi
+ if test ! -f $GM_LIBDIR/libgm.so ; then
+ if test ! -f $GM_LIBDIR/libgm.a ; then
+ { { echo "$as_me:$LINENO: error: Neither GM library libgm.so or
libgm.a found." >&5
+echo "$as_me: error: Neither GM library libgm.so or libgm.a found." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ BUILD_GM=1
+ CPPFLAGS="$save_cppflags"
+ fi
+
+
-MX_HOME=
+
+ mx_home=
# Check whether --with-mx was given.
if test "${with_mx+set}" = set; then
withval=$with_mx; if test -z "$withval" -o "$withval" = yes ; then
- { { echo "$as_me:$LINENO: error: Option --with-mx requires the path to
your MX tree." >&5
+ { { echo "$as_me:$LINENO: error: Option --with-mx requires the path
to your MX tree." >&5
echo "$as_me: error: Option --with-mx requires the path to your MX tree." >&2;}
{ (exit 1); exit 1; }; }
- elif test "$withval" != no ; then
- MX_HOME="$withval"
- fi
+ elif test "$withval" != no ; then
+ mx_home="$withval"
+ fi
+
+fi
+
+
+# Check whether --with-mx-includes was given.
+if test "${with_mx_includes+set}" = set; then
+ withval=$with_mx_includes; if test -z "$withval" -o "$withval" = yes ; then
+ { { echo "$as_me:$LINENO: error: Option --with-mx-includes requires
path to MX headers." >&5
+echo "$as_me: error: Option --with-mx-includes requires path to MX headers."
>&2;}
+ { (exit 1); exit 1; }; }
+ elif test "$withval" != no ; then
+ MX_INCDIR="$withval"
+ fi
+
+fi
+
+
+# Check whether --with-mx-libs was given.
+if test "${with_mx_libs+set}" = set; then
+ withval=$with_mx_libs; if test -z "$withval" -o "$withval" = yes ; then
+ { { echo "$as_me:$LINENO: error: Option --with-mx-libs requires
path to MX libraries." >&5
+echo "$as_me: error: Option --with-mx-libs requires path to MX libraries."
>&2;}
+ { (exit 1); exit 1; }; }
+ elif test "$withval" != no ; then
+ MX_LIBDIR="$withval"
+ fi
fi
-if test -n "$MX_HOME" ; then
- CPPFLAGS="$CPPFLAGS -I ${MX_HOME}/include"
- if test "${ac_cv_header_myriexpress_h+set}" = set; then
+ if test -n "$mx_home" ; then
+ if test -z "$MX_INCDIR"; then
+ MX_INCDIR=$mx_home/include
+ fi
+ if test -z "$MX_LIBDIR"; then
+ MX_LIBDIR=$mx_home/lib64
+ if test ! -d "$MX_LIBDIR" ; then
+ MX_LIBDIR=$mx_home/lib
+ fi
+ fi
+ fi
+ if test -n "$MX_INCDIR$MX_LIBDIR" ; then
+ save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx"
+ if test "${ac_cv_header_myriexpress_h+set}" = set; then
{ echo "$as_me:$LINENO: checking for myriexpress.h" >&5
echo $ECHO_N "checking for myriexpress.h... $ECHO_C" >&6; }
if test "${ac_cv_header_myriexpress_h+set}" = set; then
@@ -14562,13 +14672,18 @@ echo "$as_me: error: Header myriexpress.
fi
- BUILD_MX=1
- CPPFLAGS="$CPPFLAGS_OLD"
- CFLAGS="${CFLAGS} -I${MX_HOME}/include"
- LDFLAGS="$LDFLAGS -L${MX_HOME}/lib"
- SERVER_LDFLAGS="$SERVER_LDFLAGS -L${MX_HOME}/lib"
- LIBS="$LIBS -lmyriexpress"
-fi
+ if test ! -f $MX_LIBDIR/libmyriexpress.so ; then
+ if test ! -f $MX_LIBDIR/libmyriexpress.a ; then
+ { { echo "$as_me:$LINENO: error: Neither MX library
libmyriexpress.so or libmyriexpress.a found." >&5
+echo "$as_me: error: Neither MX library libmyriexpress.so or libmyriexpress.a
found." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ fi
+ BUILD_MX=1
+ CPPFLAGS="$save_cppflags"
+ fi
+
+
@@ -16625,7 +16740,7 @@ if test "$ac_res" != no; then
ac_cv_func_getmntent=yes
cat >>confdefs.h <<\_ACEOF
-#define HAVE_GETMNTENT 1
+#define HAVE_GETMNTENT
_ACEOF
else
@@ -18239,10 +18354,12 @@ for ac_last_try in false false false fal
cat >conf$$subs.sed <<_ACEOF
TARGET_OS_LINUX!$TARGET_OS_LINUX$ac_delim
BUILD_BMI_TCP!$BUILD_BMI_TCP$ac_delim
-GM_HOME!$GM_HOME$ac_delim
BUILD_GM!$BUILD_GM$ac_delim
-MX_HOME!$MX_HOME$ac_delim
+GM_INCDIR!$GM_INCDIR$ac_delim
+GM_LIBDIR!$GM_LIBDIR$ac_delim
BUILD_MX!$BUILD_MX$ac_delim
+MX_INCDIR!$MX_INCDIR$ac_delim
+MX_LIBDIR!$MX_LIBDIR$ac_delim
BUILD_IB!$BUILD_IB$ac_delim
IB_INCDIR!$IB_INCDIR$ac_delim
IB_LIBDIR!$IB_LIBDIR$ac_delim
@@ -18261,7 +18378,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 22; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 24; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
Index: configure.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/configure.in,v
retrieving revision 1.334
diff -u -p -r1.334 configure.in
--- configure.in 11 Dec 2007 15:51:19 -0000 1.334
+++ configure.in 10 Jan 2008 18:17:13 -0000
@@ -91,6 +91,24 @@ AC_SUBST(BUILD_CC)
AC_SUBST(BUILD_CFLAGS)
AC_SUBST(BUILD_LDFLAGS)
+#
+# Threading options.
+#
+# Client - thread-safe or not
+# --disable-thread-safety
+#
+# Server - three options:
+# trove
+# (hack Makefile.in)
+# job
+# (hack Makefile.in)
+# aio
+# --disable-aio-threaded-callbacks
+#
+# Client-core - threaded or not
+# currently both are built and installed
+#
+
dnl a mechanism to turn off threads in the client library
AC_MSG_CHECKING([for client library thread safety support])
AC_ARG_ENABLE(thread-safety,
@@ -776,48 +794,15 @@ AC_ARG_WITH(bmi-tcp,
)
AC_SUBST(BUILD_BMI_TCP)
-dnl configure options for GM install path
-GM_HOME=
-AC_ARG_WITH(gm,
-[ --with-gm=<dir> Location of the GM installation (default no GM)],
- if test -z "$withval" -o "$withval" = yes ; then
- AC_MSG_ERROR([Option --with-gm requires the path to your GM tree.])
- elif test "$withval" != no ; then
- GM_HOME="$withval"
- fi
-)
-if test -n "$GM_HOME" ; then
- save_cppflags="$CPPFLAGS"
- CPPFLAGS="$CPPFLAGS -I ${GM_HOME}/include -I ${GM_HOME}/include/gm"
- AC_CHECK_HEADER(gm.h,, AC_MSG_ERROR([Header gm.h not found.]))
- BUILD_GM=1
- CPPFLAGS="$save_cppflags"
-fi
-AC_SUBST(GM_HOME)
-AC_SUBST(BUILD_GM)
-
-dnl configure options for MX install path
-MX_HOME=
-AC_ARG_WITH(mx,
-[ --with-mx=<dir> Location of the MX installation (default no MX)],
- if test -z "$withval" -o "$withval" = yes ; then
- AC_MSG_ERROR([Option --with-mx requires the path to your MX tree.])
- elif test "$withval" != no ; then
- MX_HOME="$withval"
- fi
-)
-if test -n "$MX_HOME" ; then
- CPPFLAGS="$CPPFLAGS -I ${MX_HOME}/include"
- AC_CHECK_HEADER(myriexpress.h,, AC_MSG_ERROR([Header myriexpress.h not
found.]))
- BUILD_MX=1
- CPPFLAGS="$CPPFLAGS_OLD"
- CFLAGS="${CFLAGS} -I${MX_HOME}/include"
- LDFLAGS="$LDFLAGS -L${MX_HOME}/lib"
- SERVER_LDFLAGS="$SERVER_LDFLAGS -L${MX_HOME}/lib"
- LIBS="$LIBS -lmyriexpress"
-fi
-AC_SUBST(MX_HOME)
-AC_SUBST(BUILD_MX)
+dnl
+dnl Configure bmi_gm, if --with-gm or a variant given.
+dnl
+AX_GM
+
+dnl
+dnl Configure bmi_mx, if --with-mx or a variant given.
+dnl
+AX_MX
dnl
dnl Configure bmi_ib, if --with-ib or a variant given.
Index: src/apps/admin/pvfs2-config.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/apps/admin/pvfs2-config.in,v
retrieving revision 1.13
diff -u -p -r1.13 pvfs2-config.in
--- src/apps/admin/pvfs2-config.in 20 Jul 2007 19:21:11 -0000 1.13
+++ src/apps/admin/pvfs2-config.in 10 Jan 2008 18:17:13 -0000
@@ -47,7 +47,7 @@ while test $# -gt 0; do
--libs|--static-libs)
libflags="[EMAIL PROTECTED]@ -lpvfs2 @LIBS@ @THREAD_LIB@"
if [ x"@BUILD_GM@" = x"1" ]; then
- libflags="$libflags [EMAIL PROTECTED]@/lib -lgm"
+ libflags="$libflags [EMAIL PROTECTED]@ -lgm"
fi
if [ x"@BUILD_IB@" = x"1" ]; then
libflags="$libflags [EMAIL PROTECTED]@ -lvapi -lmtl_common
-lmosal -lmpga -lpthread -ldl"
@@ -56,7 +56,7 @@ while test $# -gt 0; do
libflags="$libflags [EMAIL PROTECTED]@ -libverbs"
fi
if [ x"@BUILD_MX@" = x"1" ]; then
- libflags="$libflags [EMAIL PROTECTED]@/lib -lmyriexpress"
+ libflags="$libflags [EMAIL PROTECTED]@ -lmyriexpress -lpthread"
fi
if [ x"@BUILD_PORTALS@" = x"1" ]; then
libflags="$libflags @PORTALS_LIBS@"
@@ -70,7 +70,7 @@ while test $# -gt 0; do
libflags="$libflags -lrt"
fi
if [ x"@BUILD_GM@" = x"1" ]; then
- libflags="$libflags [EMAIL PROTECTED]@/lib -lgm"
+ libflags="$libflags [EMAIL PROTECTED]@ -lgm"
fi
if [ x"@BUILD_IB@" = x"1" ]; then
libflags="$libflags [EMAIL PROTECTED]@ -lvapi -lmtl_common
-lmosal -lmpga -lpthread -ldl"
@@ -79,7 +79,7 @@ while test $# -gt 0; do
libflags="$libflags [EMAIL PROTECTED]@ -libverbs"
fi
if [ x"@BUILD_MX@" = x"1" ]; then
- libflags="$libflags [EMAIL PROTECTED]@/lib -lmyriexpress"
+ libflags="$libflags [EMAIL PROTECTED]@ -lmyriexpress -lpthread"
fi
if [ x"@BUILD_PORTALS@" = x"1" ]; then
libflags="$libflags @PORTALS_LIBS@"
Index: src/io/bmi/bmi_gm/module.mk.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_gm/module.mk.in,v
retrieving revision 1.1
diff -u -p -r1.1 module.mk.in
--- src/io/bmi/bmi_gm/module.mk.in 12 May 2003 17:59:13 -0000 1.1
+++ src/io/bmi/bmi_gm/module.mk.in 10 Jan 2008 18:17:13 -0000
@@ -1,14 +1,31 @@
-BUILD_GM = @BUILD_GM@
+#
+# Makefile stub for bmi_gm.
+#
+# Copyright (C) 2008 Pete Wyckoff <[EMAIL PROTECTED]>
+#
+# See COPYING in top-level directory.
+#
-# only build GM module if configure detected GM
-ifdef BUILD_GM
- DIR := src/io/bmi/bmi_gm
- LIBSRC += \
- $(DIR)/bmi-gm-addr-list.c \
- $(DIR)/bmi-gm-bufferpool.c \
- $(DIR)/bmi-gm.c
- SERVERSRC += \
- $(DIR)/bmi-gm-addr-list.c \
- $(DIR)/bmi-gm-bufferpool.c \
- $(DIR)/bmi-gm.c
-endif
+# only do any of this if configure decided to use GM
+ifneq (,$(BUILD_GM))
+
+#
+# Local definitions.
+#
+DIR := src/io/bmi/bmi_gm
+cfiles := bmi-gm-addr-list.c bmi-gm-bufferpool.c bmi-gm.c
+
+#
+# Export these to the top Makefile to tell it what to build.
+#
+src := $(patsubst %,$(DIR)/%,$(cfiles))
+LIBSRC += $(src)
+SERVERSRC += $(src)
+
+#
+# Extra cflags for files in this directory.
+# TODO: later on we will want the ability to modify this at configure time
+#
+MODCFLAGS_$(DIR) := [EMAIL PROTECTED]@ [EMAIL PROTECTED]@/gm
-DENABLE_GM_BUFPOOL
+
+endif # BUILD_GM
Index: src/io/bmi/bmi_mx/module.mk.in
===================================================================
RCS file: /projects/cvsroot/pvfs2/src/io/bmi/bmi_mx/module.mk.in,v
retrieving revision 1.1
diff -u -p -r1.1 module.mk.in
--- src/io/bmi/bmi_mx/module.mk.in 13 Feb 2007 18:39:39 -0000 1.1
+++ src/io/bmi/bmi_mx/module.mk.in 10 Jan 2008 18:17:13 -0000
@@ -1,10 +1,30 @@
-BUILD_MX = @BUILD_MX@
+#
+# Makefile stub for bmi_mx.
+#
+# Copyright (C) 2008 Pete Wyckoff <[EMAIL PROTECTED]>
+#
+# See COPYING in top-level directory.
+#
-# only build MX module if configure detected MX
-ifdef BUILD_MX
- DIR := src/io/bmi/bmi_mx
- LIBSRC += \
- $(DIR)/mx.c
- SERVERSRC += \
- $(DIR)/mx.c
-endif
+# only do any of this if configure decided to use MX
+ifneq (,$(BUILD_MX))
+
+#
+# Local definitions.
+#
+DIR := src/io/bmi/bmi_mx
+cfiles := mx.c
+
+#
+# Export these to the top Makefile to tell it what to build.
+#
+src := $(patsubst %,$(DIR)/%,$(cfiles))
+LIBSRC += $(src)
+SERVERSRC += $(src)
+
+#
+# Extra cflags for files in this directory.
+#
+MODCFLAGS_$(DIR) := [EMAIL PROTECTED]@
+
+endif # BUILD_MX
--- /dev/null 2007-11-09 13:26:52.993004710 -0500
+++ maint/config/gm.m4 2008-01-10 13:14:42.000000000 -0500
@@ -0,0 +1,72 @@
+#
+# Configure rules for GM
+#
+# Copyright (C) 2008 Pete Wyckoff <[EMAIL PROTECTED]>
+#
+# See COPYING in top-level directory.
+#
+AC_DEFUN([AX_GM],
+[
+ dnl Configure options for GM install path.
+ dnl --with-gm=<dir> is shorthand for
+ dnl --with-gm-includes=<dir>/include
+ dnl --with-gm-libs=<dir>/lib (or lib64 if that exists)
+ gm_home=
+ AC_ARG_WITH(gm,
+ [ --with-gm=<dir> Location of the GM install (default no GM)],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-gm requires the path to your GM tree.])
+ elif test "$withval" != no ; then
+ gm_home="$withval"
+ fi
+ )
+ AC_ARG_WITH(gm-includes,
+ [ --with-gm-includes=<dir> Location of the GM includes],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-gm-includes requires path to GM
headers.])
+ elif test "$withval" != no ; then
+ GM_INCDIR="$withval"
+ fi
+ )
+ AC_ARG_WITH(gm-libs,
+ [ --with-gm-libs=<dir> Location of the GM libraries],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-gm-libs requires path to GM libraries.])
+ elif test "$withval" != no ; then
+ GM_LIBDIR="$withval"
+ fi
+ )
+ dnl If supplied the incls and libs explicitly, use them, else populate them
+ dnl using guesses from the --with-gm dir.
+ if test -n "$gm_home" ; then
+ if test -z "$GM_INCDIR"; then
+ GM_INCDIR=$gm_home/include
+ fi
+ if test -z "$GM_LIBDIR"; then
+ GM_LIBDIR=$gm_home/lib64
+ if test ! -d "$GM_LIBDIR" ; then
+ GM_LIBDIR=$gm_home/lib
+ fi
+ fi
+ fi
+ dnl If anything GM-ish was set, go look for header.
+ if test -n "$GM_INCDIR$GM_LIBDIR" ; then
+ save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$GM_INCDIR -I$GM_INCDIR/gm"
+ AC_CHECK_HEADER(gm.h,, AC_MSG_ERROR([Header gm.h not found.]))
+ dnl Run test is not possible on a machine that does not have a GM NIC.
+ dnl Link test would work, but just check for existence.
+ if test ! -f $GM_LIBDIR/libgm.so ; then
+ if test ! -f $GM_LIBDIR/libgm.a ; then
+ AC_MSG_ERROR([Neither GM library libgm.so or libgm.a found.])
+ fi
+ fi
+ BUILD_GM=1
+ CPPFLAGS="$save_cppflags"
+ fi
+ AC_SUBST(BUILD_GM)
+ AC_SUBST(GM_INCDIR)
+ AC_SUBST(GM_LIBDIR)
+])
+
+dnl vim: set ft=config :
--- /dev/null 2007-11-09 13:26:52.993004710 -0500
+++ maint/config/mx.m4 2008-01-10 13:16:40.000000000 -0500
@@ -0,0 +1,73 @@
+#
+# Configure rules for MX
+#
+# Copyright (C) 2008 Pete Wyckoff <[EMAIL PROTECTED]>
+#
+# See COPYING in top-level directory.
+#
+AC_DEFUN([AX_MX],
+[
+ dnl Configure options for MX install path.
+ dnl --with-mx=<dir> is shorthand for
+ dnl --with-mx-includes=<dir>/include
+ dnl --with-mx-libs=<dir>/lib (or lib64 if that exists)
+ mx_home=
+ AC_ARG_WITH(mx,
+ [ --with-mx=<dir> Location of the MX install (default no MX)],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-mx requires the path to your MX tree.])
+ elif test "$withval" != no ; then
+ mx_home="$withval"
+ fi
+ )
+ AC_ARG_WITH(mx-includes,
+ [ --with-mx-includes=<dir> Location of the MX includes],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-mx-includes requires path to MX
headers.])
+ elif test "$withval" != no ; then
+ MX_INCDIR="$withval"
+ fi
+ )
+ AC_ARG_WITH(mx-libs,
+ [ --with-mx-libs=<dir> Location of the MX libraries],
+ if test -z "$withval" -o "$withval" = yes ; then
+ AC_MSG_ERROR([Option --with-mx-libs requires path to MX libraries.])
+ elif test "$withval" != no ; then
+ MX_LIBDIR="$withval"
+ fi
+ )
+ dnl If supplied the incls and libs explicitly, use them, else populate them
+ dnl using guesses from the --with-mx dir.
+ if test -n "$mx_home" ; then
+ if test -z "$MX_INCDIR"; then
+ MX_INCDIR=$mx_home/include
+ fi
+ if test -z "$MX_LIBDIR"; then
+ MX_LIBDIR=$mx_home/lib64
+ if test ! -d "$MX_LIBDIR" ; then
+ MX_LIBDIR=$mx_home/lib
+ fi
+ fi
+ fi
+ dnl If anything MX-ish was set, go look for header.
+ if test -n "$MX_INCDIR$MX_LIBDIR" ; then
+ save_cppflags="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS -I$MX_INCDIR -I$MX_INCDIR/mx"
+ AC_CHECK_HEADER(myriexpress.h,,
+ AC_MSG_ERROR([Header myriexpress.h not found.]))
+ dnl Run test is not possible on a machine that does not have a MX NIC.
+ dnl Link test would work, but just check for existence.
+ if test ! -f $MX_LIBDIR/libmyriexpress.so ; then
+ if test ! -f $MX_LIBDIR/libmyriexpress.a ; then
+ AC_MSG_ERROR([Neither MX library libmyriexpress.so or
libmyriexpress.a found.])
+ fi
+ fi
+ BUILD_MX=1
+ CPPFLAGS="$save_cppflags"
+ fi
+ AC_SUBST(BUILD_MX)
+ AC_SUBST(MX_INCDIR)
+ AC_SUBST(MX_LIBDIR)
+])
+
+dnl vim: set ft=config :
_______________________________________________
Pvfs2-users mailing list
[email protected]
http://www.beowulf-underground.org/mailman/listinfo/pvfs2-users