[mpich2-commits] r5511 - mpich2/trunk/confdb
balaji at mcs.anl.gov
balaji at mcs.anl.gov
Tue Oct 20 18:46:33 CDT 2009
Author: balaji
Date: 2009-10-20 18:46:33 -0500 (Tue, 20 Oct 2009)
New Revision: 5511
Added:
mpich2/trunk/confdb/aclocal_config.m4
Modified:
mpich2/trunk/confdb/aclocal.m4
Log:
Added a PAC macro to allow for sandbox sub-configures. This allows us
to call sub-configures and check if they succeeded or not before
performing some action. AC_CONFIG_SUBDIRS doesn't allow this -- a
sub-configure failing will result in the top-level configure failing
as well.
Modified: mpich2/trunk/confdb/aclocal.m4
===================================================================
--- mpich2/trunk/confdb/aclocal.m4 2009-10-20 20:35:47 UTC (rev 5510)
+++ mpich2/trunk/confdb/aclocal.m4 2009-10-20 23:46:33 UTC (rev 5511)
@@ -15,3 +15,4 @@
builtin(include,aclocal_shl.m4)
builtin(include,fortran90.m4)
builtin(include,aclocal_libs.m4)
+builtin(include,aclocal_config.m4)
Added: mpich2/trunk/confdb/aclocal_config.m4
===================================================================
--- mpich2/trunk/confdb/aclocal_config.m4 (rev 0)
+++ mpich2/trunk/confdb/aclocal_config.m4 2009-10-20 23:46:33 UTC (rev 5511)
@@ -0,0 +1,42 @@
+dnl Sandbox configure
+dnl Usage: PAC_CONFIG_SUBDIR(subdir,abs_srcdir,config_args,action-if-success,action-if-failure)
+AC_DEFUN([PAC_CONFIG_SUBDIR],[
+ echo
+ echo "===== configuring $1 ====="
+
+ PAC_MKDIRS($1)
+ pac_subconfig_args=""
+ # Strip off the args we need to update
+ for ac_arg in $3 ; do
+ # Remove any quotes around the args (added by configure)
+ ac_narg=`expr x$ac_arg : 'x'"'"'\(.*\)'"'"`
+ if test -n "$ac_narg" ; then ac_arg=$ac_narg ; fi
+
+ case $ac_arg in
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ *)
+ pac_subconfig_args="$pac_subconfig_args $ac_arg"
+ ;;
+ esac
+ done
+
+ if (cd $1 && eval $2/$1/configure $pac_subconfig_args) ; then
+ $4
+ :
+ else
+ $5
+ :
+ fi
+
+ echo "===== done with $1 configure ====="
+ echo
+])
\ No newline at end of file
More information about the mpich2-commits
mailing list