diff --git a/config/pac.m4 b/config/pac.m4 index becf32ad..46a56b68 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -1848,6 +1848,23 @@ dnl Maybe new structure with METIS UFconfig METIS? [pac_metis_header_ok=no; METIS_INCLUDES=""]) fi +if test "x$pac_metis_header_ok" == "xyes" ; then + AC_LANG_PUSH([C]) + AC_MSG_CHECKING([for METIS integer size]) + AC_LINK_IFELSE([AC_LANG_SOURCE( + #include + #include "$psblas_cv_metisincfile" + void main(){ + printf("%d\n",IDXTYPEWIDTH); + } + )], + [pac_cv_metis_idx=`./conftest${ac_exeext} | sed 's/^ *//'`], + [pac_cv_metis_idx="unknown"]) + AC_MSG_RESULT($pac_cv_metis_idx) + + AC_LANG_POP() +fi + if test "x$pac_metis_header_ok" == "xyes" ; then AC_LANG_PUSH([C]) AC_MSG_CHECKING([for METIS real size]) diff --git a/configure b/configure index a0979f7e..e8688547 100755 --- a/configure +++ b/configure @@ -8981,6 +8981,42 @@ done fi +if test "x$pac_metis_header_ok" == "xyes" ; then + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for METIS integer size" >&5 +$as_echo_n "checking for METIS integer size... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include "$psblas_cv_metisincfile" + void main(){ + printf("%d\n",IDXTYPEWIDTH); + } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + pac_cv_metis_idx=`./conftest${ac_exeext} | sed 's/^ *//'` +else + pac_cv_metis_idx="unknown" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pac_cv_metis_idx" >&5 +$as_echo "$pac_cv_metis_idx" >&6; } + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi + if test "x$pac_metis_header_ok" == "xyes" ; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -10812,6 +10848,7 @@ fi METIS usable : ${psblas_cv_have_metis} METIS bitsize : ${pac_cv_metis_idx} + METIS realsize : ${pac_cv_metis_real} AMD detected : ${psblas_cv_have_amd} LIBS : ${LIBS} LDLIBS : ${LDLIBS} @@ -10841,6 +10878,7 @@ $as_echo "$as_me: METIS usable : ${psblas_cv_have_metis} METIS bitsize : ${pac_cv_metis_idx} + METIS realsize : ${pac_cv_metis_real} AMD detected : ${psblas_cv_have_amd} LIBS : ${LIBS} LDLIBS : ${LDLIBS} diff --git a/configure.ac b/configure.ac index 0145a9e1..a2650489 100755 --- a/configure.ac +++ b/configure.ac @@ -841,6 +841,7 @@ AC_MSG_NOTICE([ METIS usable : ${psblas_cv_have_metis} METIS bitsize : ${pac_cv_metis_idx} + METIS realsize : ${pac_cv_metis_real} AMD detected : ${psblas_cv_have_amd} LIBS : ${LIBS} dnl Note : we should use LDLIBS sooner or later!