diff --git a/autogen.sh b/autogen.sh index f436be0710..7628474b47 100755 --- a/autogen.sh +++ b/autogen.sh @@ -311,6 +311,10 @@ EOF "$rgt_lam_topdir/config/mca_make_configure.pl" \ --lamdir "$rgt_lam_topdir" \ --moduledir "`pwd`" + if test "$?" != "0"; then + echo "*** autogen.sh failed to complete!" + exit 1 + fi happy=1 file=configure.ac elif test -f configure.in; then diff --git a/config/mca_configure.ac b/config/mca_configure.ac index 483bd8cf02..b369d2f97a 100644 --- a/config/mca_configure.ac +++ b/config/mca_configure.ac @@ -24,37 +24,42 @@ AC_SUBST(top_lam_builddir) # Get the version of @MCA_TYPE@ @MCA_MODULE_NAME@ that we are installing. -LAM_GET_VERSION($srcdir/../../../../../config, @PARAM_VERSION_FILE@, - @PARAM_VAR_PREFIX@) +if test -n "@PARAM_VERSION_FILE@" -a -f "@PARAM_VERSION_FILE@"; then + LAM_GET_VERSION($srcdir/../../../../../config, @PARAM_VERSION_FILE@, + @PARAM_VAR_PREFIX@) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION, - $@PARAM_VAR_PREFIX@_MAJOR_VERSION, - [Major LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION, - $@PARAM_VAR_PREFIX@_MINOR_VERSION, - [Minor LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION, - $@PARAM_VAR_PREFIX@_RELEASE_VERSION, - [Release LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION, - $@PARAM_VAR_PREFIX@_ALPHA_VERSION, - [Alpha LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION, - $@PARAM_VAR_PREFIX@_BETA_VERSION, - [Beta LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION, - $@PARAM_VAR_PREFIX@_CVS_VERSION, - [CVS LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) -AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION, - "$@PARAM_VAR_PREFIX@_VERSION", - [Overall LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version number]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MAJOR_VERSION, + $@PARAM_VAR_PREFIX@_MAJOR_VERSION, + [Major LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_MINOR_VERSION, + $@PARAM_VAR_PREFIX@_MINOR_VERSION, + [Minor LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_RELEASE_VERSION, + $@PARAM_VAR_PREFIX@_RELEASE_VERSION, + [Release LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_ALPHA_VERSION, + $@PARAM_VAR_PREFIX@_ALPHA_VERSION, + [Alpha LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_BETA_VERSION, + $@PARAM_VAR_PREFIX@_BETA_VERSION, + [Beta LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_CVS_VERSION, + $@PARAM_VAR_PREFIX@_CVS_VERSION, + [CVS LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version]) + AC_DEFINE_UNQUOTED(@PARAM_VAR_PREFIX@_VERSION, + "$@PARAM_VAR_PREFIX@_VERSION", + [Overall LAM MCA @MCA_TYPE@ @MCA_MODULE_NAME@ version number]) + version_string="version $@PARAM_VAR_PREFIX@_VERSION" +else + version_string="" +fi # # Start it up # LAM_CONFIGURE_SETUP -lam_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module version $@PARAM_VAR_PREFIX@_VERSION" +lam_show_title "Configuring MCA @MCA_TYPE@ @MCA_MODULE_NAME@ module $version_string" lam_show_subtitle "Initialization, setup" # diff --git a/config/mca_make_configure.pl b/config/mca_make_configure.pl index 88f19a1a08..e835d75798 100755 --- a/config/mca_make_configure.pl +++ b/config/mca_make_configure.pl @@ -244,6 +244,42 @@ foreach my $key (sort keys(%config_param_names)) { } +# Do some error checking on the values that we've determined + +if (! -f $config_params{PARAM_INIT_FILE}) { + print "*** WARNING: PARAM_INIT_FILE does not exist:\n"; + print "*** WARNING: $config_params{PARAM_INIT_FILE}\n"; + print "*** WARNING: resulting configure script will not run properly!\n"; + exit(1); +} + +if ($config_params{PARAM_INIT_FILE} eq "" || + ! -f $config_params{PARAM_INIT_FILE}) { + print "*** WARNING: PARAM_VERSION_FILE does not exit:\n"; + print "*** WARNING: $config_params{PARAM_VERSION_FILE} does not exist!\n"; + print "*** WARNING: resulting configure script will not check for the version!!\n"; +} + +my @files = split(/ /, $config_params{PARAM_CONFIG_FILES}); +foreach my $file (@files) { + if (! -f "$file.in" && ! -f "$file.am") { + print "*** WARNING: PARAM_CONFIG_FILES file does not exist:\n"; + print "*** WARNING: $file.[in|am]\n"; + print "*** WARNING: resulting configure script may not run correctly!!\n"; + exit(1); + } +} + +if (! -d $config_params{PARAM_CONFIG_AUX_DIR}) { + print "*** WARNING: PARAM_CONFIG_AUX_DIR does not exit:\n"; + print "*** WARNING: $config_params{PARAM_CONFIG_AUX_DIR}\n"; + print "*** WARNING: Taking the liberty of trying to make it...\n"; + if (mkdir($config_params{PARAM_CONFIG_AUX_DIR})) { + printf("BARF\n"); + exit(1); + } +} + ############################################################################ # Read in the configure.ac template ############################################################################ @@ -312,3 +348,5 @@ make_template("$lam_topdir/config/mca_acinclude.m4", ############################################################################ print "\n$announce_str finished\n"; + +exit(0);