mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-06 22:55:08 +00:00
Confg machinery to extract PSB version into psb_config.h
This commit is contained in:
@@ -4,6 +4,11 @@
|
||||
#define PSB_ERR_ERROR -1
|
||||
#define PSB_ERR_SUCCESS 0
|
||||
|
||||
#define PSB_VERSION_MAJOR @PSBLASMAJOR@
|
||||
#define PSB_VERSION_MINOR @PSBLASMINOR@
|
||||
#define PSB_VERSION_PATCHLEVEL @PSBLASPATCH@
|
||||
#define PSB_VERSION_STRING @PSBLASSTRING@
|
||||
|
||||
@CSERIALMPI@
|
||||
|
||||
@PSB_IPKDEF@
|
||||
|
||||
@@ -2348,3 +2348,23 @@ fi
|
||||
]
|
||||
)
|
||||
|
||||
dnl @synopsis PAC_FORTRAN_PSBLAS_VERSION( )
|
||||
dnl
|
||||
dnl Will try to compile, link and run a program using the PSBLAS library. \
|
||||
dnl Checks for version major, minor and patchlevel
|
||||
dnl
|
||||
dnl Will use MPIFC, otherwise '$FC'.
|
||||
dnl
|
||||
dnl If the test passes, will execute ACTION-IF-FOUND. Otherwise, ACTION-IF-NOT-FOUND.
|
||||
dnl
|
||||
dnl @author Michele Martone <michele.martone@uniroma2.it>
|
||||
dnl @author Salvatore Filippone <salvatore.filippone@uniroma2.it>
|
||||
dnl
|
||||
AC_DEFUN(PAC_EXTRACT_PSBLAS_VERSION,
|
||||
[AC_MSG_CHECKING([for version data of PSBLAS])
|
||||
pac_const_file="base/modules/psb_const_mod.F90";
|
||||
pac_cv_psblas_version_major=`cat $pac_const_file| grep version_major`;
|
||||
pac_cv_psblas_version_minor=`cat $pac_const_file | grep version_minor `;
|
||||
pac_cv_psblas_patchlevel=`cat $pac_const_file | grep patchlevel `;
|
||||
pac_cv_psblas_version_string=`cat $pac_const_file | grep version_string `;
|
||||
])
|
||||
|
||||
@@ -690,6 +690,10 @@ CINTMETIS
|
||||
CHAVEMETIS
|
||||
CHAVE_OPENMP
|
||||
CSERIALMPI
|
||||
PSBLASSTRING
|
||||
PSBLASPATCH
|
||||
PSBLASMINOR
|
||||
PSBLASMAJOR
|
||||
PSB_LPKDEF
|
||||
PSB_IPKDEF
|
||||
FINCLUDES
|
||||
@@ -8745,6 +8749,17 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
|
||||
|
||||
|
||||
|
||||
######################
|
||||
# Extract version data
|
||||
######################
|
||||
#PAC_EXTRACT_PSBLAS_VERSION
|
||||
CFILE="base/modules/psb_const_mod.F90";
|
||||
PSBLASMAJOR=`cat $CFILE| grep version_major | $AWK '{print $6;}'`;
|
||||
PSBLASMINOR=`cat $CFILE| grep version_minor| $AWK '{print $6;}'`;
|
||||
PSBLASPATCH=`cat $CFILE| grep patchlevel| $AWK '{print $6;}'`;
|
||||
PSBLASSTRING=`cat $CFILE | grep version_string | $AWK '{print $6;}'`;
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: version $PSBLASSTRING" >&5
|
||||
printf "%s\n" " version $PSBLASSTRING" >&6; }
|
||||
|
||||
###############################################################################
|
||||
# Additional pathname stuff (yes, it is redundant and confusing...)
|
||||
@@ -11694,6 +11709,10 @@ FDEFINES=$(PSBFDEFINES)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -680,6 +680,16 @@ PAC_FORTRAN_TEST_FLUSH(
|
||||
[FDEFINES="$psblas_cv_define_prepend-DPSB_HAVE_FLUSH_STMT $FDEFINES"],
|
||||
)
|
||||
|
||||
######################
|
||||
# Extract version data
|
||||
######################
|
||||
#PAC_EXTRACT_PSBLAS_VERSION
|
||||
CFILE="base/modules/psb_const_mod.F90";
|
||||
PSBLASMAJOR=`cat $CFILE| grep version_major | $AWK '{print $6;}'`;
|
||||
PSBLASMINOR=`cat $CFILE| grep version_minor| $AWK '{print $6;}'`;
|
||||
PSBLASPATCH=`cat $CFILE| grep patchlevel| $AWK '{print $6;}'`;
|
||||
PSBLASSTRING=`cat $CFILE | grep version_string | $AWK '{print $6;}'`;
|
||||
AC_MSG_RESULT([ version $PSBLASSTRING])
|
||||
|
||||
###############################################################################
|
||||
# Additional pathname stuff (yes, it is redundant and confusing...)
|
||||
@@ -1051,6 +1061,10 @@ FDEFINES=$(PSBFDEFINES)
|
||||
|
||||
AC_SUBST(PSB_IPKDEF)
|
||||
AC_SUBST(PSB_LPKDEF)
|
||||
AC_SUBST(PSBLASMAJOR)
|
||||
AC_SUBST(PSBLASMINOR)
|
||||
AC_SUBST(PSBLASPATCH)
|
||||
AC_SUBST(PSBLASSTRING)
|
||||
AC_SUBST(CSERIALMPI)
|
||||
AC_SUBST(CHAVE_OPENMP)
|
||||
AC_SUBST(CHAVEMETIS)
|
||||
|
||||
Reference in New Issue
Block a user