mirror of
https://github.com/sfilippone/psblas3.git
synced 2026-10-07 07:04:57 +00:00
New configry for METIS: detect int width, set include file name
This commit is contained in:
+22
-3
@@ -1792,6 +1792,9 @@ AC_DEFUN(PAC_CHECK_METIS,
|
||||
Default: "-lmetis"]),
|
||||
[psblas_cv_metis=$withval],
|
||||
[psblas_cv_metis='-lmetis'])
|
||||
AC_ARG_WITH(metisincfile, AC_HELP_STRING([--with-metisincfile=DIR], [Specify the name for METIS include file.]),
|
||||
[psblas_cv_metisincfile=$withval],
|
||||
[psblas_cv_metisincfile='metis.h'])
|
||||
AC_ARG_WITH(metisdir, AC_HELP_STRING([--with-metisdir=DIR], [Specify the directory for METIS library and includes.]),
|
||||
[psblas_cv_metisdir=$withval],
|
||||
[psblas_cv_metisdir=''])
|
||||
@@ -1821,7 +1824,7 @@ if test "x$psblas_cv_metislibdir" != "x"; then
|
||||
fi
|
||||
|
||||
AC_MSG_NOTICE([metis dir $psblas_cv_metisdir])
|
||||
AC_CHECK_HEADERS([limits.h metis.h],
|
||||
AC_CHECK_HEADERS([limits.h $psblas_cv_metisincfile],
|
||||
[pac_metis_header_ok=yes],
|
||||
[pac_metis_header_ok=no; METIS_INCLUDES=""])
|
||||
if test "x$pac_metis_header_ok" == "xno" ; then
|
||||
@@ -1831,7 +1834,7 @@ dnl Maybe Include or include subdirs?
|
||||
CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS"
|
||||
|
||||
AC_MSG_CHECKING([for metis_h in $METIS_INCLUDES])
|
||||
AC_CHECK_HEADERS([limits.h metis.h],
|
||||
AC_CHECK_HEADERS([limits.h $psblas_cv_metisincfile],
|
||||
[pac_metis_header_ok=yes],
|
||||
[pac_metis_header_ok=no; METIS_INCLUDES=""])
|
||||
fi
|
||||
@@ -1840,11 +1843,27 @@ dnl Maybe new structure with METIS UFconfig METIS?
|
||||
unset ac_cv_header_metis_h
|
||||
METIS_INCLUDES="-I$psblas_cv_metisdir/UFconfig -I$psblas_cv_metisdir/METIS/Include -I$psblas_cv_metisdir/METIS/Include"
|
||||
CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS"
|
||||
AC_CHECK_HEADERS([limits.h metis.h],
|
||||
AC_CHECK_HEADERS([limits.h $psblas_cv_metisincfile],
|
||||
[pac_metis_header_ok=yes],
|
||||
[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 idx size])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE(
|
||||
#include <$psblas_cv_metisincfile>
|
||||
#include <stdio.h>
|
||||
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
|
||||
psblas_cv_metis_includes="$METIS_INCLUDES"
|
||||
|
||||
@@ -775,6 +775,7 @@ with_blasdir
|
||||
with_lapack
|
||||
with_rsb
|
||||
with_metis
|
||||
with_metisincfile
|
||||
with_metisdir
|
||||
with_metisincdir
|
||||
with_metislibdir
|
||||
@@ -1454,6 +1455,7 @@ Optional Packages:
|
||||
configure script invoke librsb-config)
|
||||
--with-metis=LIBNAME Specify the library name for METIS library. Default:
|
||||
"-lmetis"
|
||||
--with-metisincfile=DIR Specify the name for METIS include file.
|
||||
--with-metisdir=DIR Specify the directory for METIS library and
|
||||
includes.
|
||||
--with-metisincdir=DIR Specify the directory for METIS includes.
|
||||
@@ -8857,6 +8859,14 @@ else
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-metisincfile was given.
|
||||
if test "${with_metisincfile+set}" = set; then :
|
||||
withval=$with_metisincfile; psblas_cv_metisincfile=$withval
|
||||
else
|
||||
psblas_cv_metisincfile='metis.h'
|
||||
fi
|
||||
|
||||
|
||||
# Check whether --with-metisdir was given.
|
||||
if test "${with_metisdir+set}" = set; then :
|
||||
withval=$with_metisdir; psblas_cv_metisdir=$withval
|
||||
@@ -8906,7 +8916,7 @@ fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: metis dir $psblas_cv_metisdir" >&5
|
||||
$as_echo "$as_me: metis dir $psblas_cv_metisdir" >&6;}
|
||||
for ac_header in limits.h metis.h
|
||||
for ac_header in limits.h $psblas_cv_metisincfile
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -8928,7 +8938,7 @@ if test "x$pac_metis_header_ok" == "xno" ; then
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for metis_h in $METIS_INCLUDES" >&5
|
||||
$as_echo_n "checking for metis_h in $METIS_INCLUDES... " >&6; }
|
||||
for ac_header in limits.h metis.h
|
||||
for ac_header in limits.h $psblas_cv_metisincfile
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -8948,7 +8958,7 @@ if test "x$pac_metis_header_ok" == "xno" ; then
|
||||
unset ac_cv_header_metis_h
|
||||
METIS_INCLUDES="-I$psblas_cv_metisdir/UFconfig -I$psblas_cv_metisdir/METIS/Include -I$psblas_cv_metisdir/METIS/Include"
|
||||
CPPFLAGS="$METIS_INCLUDES $SAVE_CPPFLAGS"
|
||||
for ac_header in limits.h metis.h
|
||||
for ac_header in limits.h $psblas_cv_metisincfile
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
@@ -8965,6 +8975,41 @@ 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 idx size" >&5
|
||||
$as_echo_n "checking for METIS idx size... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <$psblas_cv_metisincfile>
|
||||
#include <stdio.h>
|
||||
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
|
||||
psblas_cv_metis_includes="$METIS_INCLUDES"
|
||||
@@ -9319,11 +9364,6 @@ fi
|
||||
|
||||
|
||||
|
||||
# Note : We would like to detect PSBLAS, but this is complicated by the
|
||||
# module symbols mangling rules, which are compiler specific !
|
||||
#
|
||||
# Moreover, the PSBLAS doesn't have an installer, currently.
|
||||
|
||||
###############################################################################
|
||||
# Library target directory and archive files.
|
||||
###############################################################################
|
||||
|
||||
@@ -702,11 +702,6 @@ fi
|
||||
|
||||
|
||||
|
||||
# Note : We would like to detect PSBLAS, but this is complicated by the
|
||||
# module symbols mangling rules, which are compiler specific !
|
||||
#
|
||||
# Moreover, the PSBLAS doesn't have an installer, currently.
|
||||
|
||||
###############################################################################
|
||||
# Library target directory and archive files.
|
||||
###############################################################################
|
||||
|
||||
Reference in New Issue
Block a user