[openib-general] RE: [PATCH2] uDAPL/uDAT autotools - Package for udat, udaplcma, udaplscm

James Lentini jlentini at netapp.com
Fri Mar 17 09:23:48 PST 2006



On Thu, 16 Mar 2006, Arlin Davis wrote:

> James and Bryan,
> 
> Here is an updated patch with your recommended changes. 
> Also added Changelog, COPYING, NEWS, AUTHORS.
> 
> -arlin

This looks excellent Arlin. I think it is essentailly ready to go. I 
have a few minor questions/commnets:

I'll add an empty directory called "config" to the root of the dapl 
tree.

> Index: AUTHORS
> ===================================================================
> --- AUTHORS	(revision 0)
> +++ AUTHORS	(revision 0)
> @@ -0,0 +1,2 @@
> +James Lentini	<jlentini at netapp.com>
> +Arlin Davis	<arlin.r.davis at intel.com>

I'll add several more names to this. 

> Index: configure.in
> ===================================================================
> --- configure.in	(revision 0)
> +++ configure.in	(revision 0)
> @@ -0,0 +1,60 @@
> +dnl Process this file with autoconf to produce a configure script.
> +
> +AC_PREREQ(2.57)
> +AC_INIT(dapl, 1.2.0, dapl-devel at lists.sourceforge.net)
> +AC_CONFIG_SRCDIR([dat/udat/udat.c])
> +AC_CONFIG_AUX_DIR(config)
> +AM_CONFIG_HEADER(config.h)
> +AM_INIT_AUTOMAKE(dapl, 1.2.0)
> +
> +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
> +])
> +
> +dnl Checks for programs
> +AC_PROG_CC
> +

> +dnl Checks for typedefs, structures, and compiler characteristics.
> +AC_C_CONST
> +AC_CHECK_SIZEOF(long)

If the code does not include config.h, do these have any effect? 

> +
> +dnl Checks for libraries
> +if test "$disable_libcheck" != "yes"
> +then
> +AC_CHECK_LIB(ibverbs, ibv_get_device_list, [],
> +    AC_MSG_ERROR([ibv_get_device_list() not found.  libdapl requires libibverbs.]))
> +fi

Should we throw in a check for librdmacm?

> +
> +dnl Checks for header files.
> +if test "$disable_libcheck" != "yes"
> +then
> +AC_CHECK_HEADER(infiniband/verbs.h, [],
> +    AC_MSG_ERROR([<infiniband/verbs.h> not found.  Is libibverbs installed?]))
> +fi

> +AC_HEADER_STDC

Again, if the code doesn't include config.h, does this have any 
effect?

> +
> +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
> +        ac_cv_version_script=yes
> +    else
> +        ac_cv_version_script=no
> +    fi)
> +
> +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],
> +[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)
> +
> +AC_CONFIG_FILES([Makefile libdat.spec])
> +AC_OUTPUT
> Index: ChangeLog
> Index: dat/udat/libdat.map
> ===================================================================
> --- dat/udat/libdat.map	(revision 0)
> +++ dat/udat/libdat.map	(revision 0)
> @@ -0,0 +1,77 @@
> +DAT_1.2 {
> +        global:
> +		dat_cno_create;
> +		dat_cno_free;
> +		dat_cno_modify_agent;
> +		dat_cno_query;
> +		dat_cno_wait;
> +		dat_cr_accept;
> +		dat_cr_handoff;
> +		dat_cr_query;
> +		dat_cr_reject;
> +		dat_ep_connect;
> +		dat_ep_create;
> +		dat_ep_create_with_srq;
> +		dat_ep_disconnect;
> +		dat_ep_dup_connect;
> +		dat_ep_free;
> +		dat_ep_get_status;
> +		dat_ep_modify;
> +		dat_ep_post_rdma_read;
> +		dat_ep_post_rdma_write;
> +		dat_ep_post_recv;
> +		dat_ep_post_send;
> +		dat_ep_query;
> +		dat_ep_recv_query;
> +		dat_ep_reset;
> +		dat_ep_set_watermark;
> +		dat_evd_clear_unwaitable;
> +		dat_evd_create;
> +		dat_evd_dequeue;
> +		dat_evd_disable;
> +		dat_evd_enable;
> +		dat_evd_free;
> +		dat_evd_modify_cno;
> +		dat_evd_post_se;
> +		dat_evd_query;
> +		dat_evd_resize;
> +		dat_evd_set_unwaitable;
> +		dat_evd_wait;
> +		dat_get_consumer_context;
> +		dat_get_handle_type;
> +		dat_ia_close;
> +		dat_ia_openv;
> +		dat_ia_query;
> +		dat_lmr_create;
> +		dat_lmr_free;
> +		dat_lmr_query;
> +		dat_lmr_sync_rdma_read;
> +		dat_lmr_sync_rdma_write;
> +		dat_psp_create;
> +		dat_psp_create_any;
> +		dat_psp_free;
> +		dat_psp_query;
> +		dat_pz_create;
> +		dat_pz_free;
> +		dat_pz_query;
> +		dat_registry_add_provider;
> +		dat_registry_list_providers;
> +		dat_registry_remove_provider;
> +		dat_rmr_bind;
> +		dat_rmr_create;
> +		dat_rmr_free;
> +		dat_rmr_query;
> +		dat_rsp_create;
> +		dat_rsp_free;
> +		dat_rsp_query;
> +		dat_set_consumer_context;
> +		dat_srq_create;
> +		dat_srq_free;
> +		dat_srq_post_recv;
> +		dat_srq_query;
> +		dat_srq_resize;
> +		dat_srq_set_lw;

We can make this local, right?

> +		dats_get_ia_handle;

> +		dat_strerror;
> +	local: *;
> +};
> Index: Makefile.am
> ===================================================================
> --- Makefile.am	(revision 0)
> +++ Makefile.am	(revision 0)
> @@ -0,0 +1,348 @@
> +# $Id: $
> +
> +# TODO...Need check to set properly
> +OSVENDOR="REDHAT_EL4"

I think the right thing to do is to add something to the configure.in 
script. Here's what I propose (patch to your patch). I'm not 
autotools expert, so let me know if you see anything wrong with this:

--- configure.in.old	2006-03-17 11:56:05.382596000 -0500
+++ configure.in	2006-03-17 12:12:23.355748000 -0500
@@ -46,6 +46,16 @@ AC_CACHE_CHECK(whether ld accepts --vers
 
 AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$ac_cv_version_script" = "yes")
 
+AC_CACHE_CHECK(whether this is an RHEL system, ac_cv_rhel,
+    if test -f /etc/redhat-release && 
+       test -n "`grep -v Fedora /etc/redhat-release`"; then
+        ac_cv_rhel=yes
+    else
+        ac_cv_rhel=no
+    fi)
+
+AM_CONDITIONAL(OS_RHEL, test "$ac_cv_rhel" = "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],
--- Makefile.am.old	2006-03-17 11:55:42.598746000 -0500
+++ Makefile.am	2006-03-17 12:21:37.739222000 -0500
@@ -1,7 +1,10 @@
 # $Id: $
 
-# TODO...Need check to set properly
-OSVENDOR="REDHAT_EL4"
+if OS_RHEL
+OSFLAGS=-DREDHAT_EL4
+else
+OSFLAGS=
+endif
 
 if DEBUG
 DBGFLAGS = -ggdb -DDAPL_DBG
@@ -19,17 +22,17 @@ datlib_LTLIBRARIES = dat/udat/libdat.la
 dapllibcma_LTLIBRARIES = dapl/udapl/libdaplcma.la
 dapllibscm_LTLIBRARIES = dapl/udapl/libdaplscm.la
 
-dat_udat_libdat_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE -D$(OSVENDOR) \
+dat_udat_libdat_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
 				-I$(srcdir)/dat/include/ -I$(srcdir)/dat/udat/ \
 				-I$(srcdir)/dat/udat/linux -I$(srcdir)/dat/common/ 
 
-dapl_udapl_libdaplcma_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE -D$(OSVENDOR) \
+dapl_udapl_libdaplcma_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
 				-DOPENIB -DCQ_WAIT_OBJECT \
 				-I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
 				-I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \
 				-I$(srcdir)/dapl/openib_cma 
 		
-dapl_udapl_libdaplscm_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE -D$(OSVENDOR) \
+dapl_udapl_libdaplscm_la_CFLAGS = -Wall $(DBGFLAGS) -D_GNU_SOURCE $(OSFLAGS) \
 				-DOPENIB -DCQ_WAIT_OBJECT \
 				-I$(srcdir)/dat/include/ -I$(srcdir)/dapl/include/ \
 				-I$(srcdir)/dapl/common -I$(srcdir)/dapl/udapl/linux \



More information about the general mailing list