From e5b06ec1719a09eb94829e87676fe8b8166689a2 Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Wed, 12 Mar 2008 18:07:53 +0000 Subject: [PATCH] psblas2: config/pac.m4 configure.ac configure Fixed recognition of GNU make for .mod.o rule. --- config/pac.m4 | 17 +++++++++++++++++ configure.ac | 6 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/config/pac.m4 b/config/pac.m4 index 26480f12..08e5d200 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -598,3 +598,20 @@ else fi ])dnl + +dnl @synopsis PAC_MAKE_IS_GNUMAKE +dnl +dnl @author Salvatore Filippone +dnl +define(PAC_MAKE_IS_GNUMAKE,[ +AC_MSG_CHECKING(for gnumake) +MAKE=${MAKE:-make} + +if $MAKE --version 2>&1 | grep -e"GNU Make" >/dev/null; then + AC_MSG_RESULT(yes) + psblas_make_gnumake='yes' +else + AC_MSG_RESULT(no) + psblas_make_gnumake='no' +fi +])dnl diff --git a/configure.ac b/configure.ac index abadda5b..5c81b858 100755 --- a/configure.ac +++ b/configure.ac @@ -558,7 +558,7 @@ CC="$MPICC"; PAC_CHECK_BLACS FC="$save_FC"; CC="$save_CC"; - +PAC_MAKE_IS_GNUMAKE ############################################################################### # METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks @@ -648,12 +648,13 @@ AC_SUBST(METIS_LIBS) AC_SUBST(CINCLUDES) AC_SUBST(FINCLUDES) -if test "X$psblas_cv_fc" == "Xgcc" ; then +if test "X$psblas_make_gnumake" == "Xyes" ; then PSBLASRULES=' PSBLDLIBS=$(BLACS) $(BLAS) $(METIS_LIB) $(LIBS) CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) # Warning : these rules are only valid with GNU make! +$(.mod).o: %.o: %.c $(CC) $(F90COPT) $(CINCLUDES) $(CDEFINES) -c $< @@ -680,7 +681,6 @@ PSBLASRULES=' PSBLDLIBS=$(BLACS) $(BLAS) $(METIS_LIB) $(LIBS) CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) -$(.mod).o: # These should be portable rules, arent they?