From 7a1cebcfd90bde5f7b93525942a598ac6ef864ed Mon Sep 17 00:00:00 2001 From: Salvatore Filippone Date: Thu, 13 Mar 2008 10:30:13 +0000 Subject: [PATCH] Configure machinery for gnumake. --- configure | 21 +++++++++++++++++++-- configure.ac | 3 +++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/configure b/configure index d6819aa0..886ae164 100755 --- a/configure +++ b/configure @@ -10037,6 +10037,20 @@ fi FC="$save_FC"; CC="$save_CC"; +{ echo "$as_me:$LINENO: checking for gnumake" >&5 +echo $ECHO_N "checking for gnumake... $ECHO_C" >&6; } +MAKE=${MAKE:-make} + +if $MAKE --version 2>&1 | grep -e"GNU Make" >/dev/null; then + { echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6; } + psblas_make_gnumake='yes' +else + { echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6; } + psblas_make_gnumake='no' +fi + ############################################################################### # METIS, SuperLU, SuperLU_Dist UMFPack libraries presence checks @@ -10279,12 +10293,14 @@ UTILLIBNAME=libpsb_util.a -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 $< @@ -10311,9 +10327,10 @@ PSBLASRULES=' PSBLDLIBS=$(BLACS) $(BLAS) $(METIS_LIB) $(LIBS) CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) -$(.mod).o: +$(.mod).o: + # These should be portable rules, arent they? .c.o: $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $< diff --git a/configure.ac b/configure.ac index 5c81b858..dc617a95 100755 --- a/configure.ac +++ b/configure.ac @@ -655,6 +655,7 @@ CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) # Warning : these rules are only valid with GNU make! $(.mod).o: + %.o: %.c $(CC) $(F90COPT) $(CINCLUDES) $(CDEFINES) -c $< @@ -683,6 +684,8 @@ CDEFINES=$(PSBCDEFINES) FDEFINES=$(PSBFDEFINES) +$(.mod).o: + # These should be portable rules, arent they? .c.o: $(CC) $(CCOPT) $(CINCLUDES) $(CDEFINES) -c $<