diff --git a/config/pac.m4 b/config/pac.m4 index c9e2ce95..ccaaf237 100644 --- a/config/pac.m4 +++ b/config/pac.m4 @@ -850,18 +850,35 @@ AC_ARG_WITH(superludistdir, AC_HELP_STRING([--with-superludistdir=DIR], [Specify [mld2p4_cv_superludistdir=$withval], [mld2p4_cv_superludistdir='']) +AC_ARG_WITH(superludistincdir, AC_HELP_STRING([--with-superludistincdir=DIR], [Specify the directory for SUPERLUDIST includes.]), + [mld2p4_cv_superludistincdir=$withval], + [mld2p4_cv_superludistincdir='']) + +AC_ARG_WITH(superludistlibdir, AC_HELP_STRING([--with-superludistlibdir=DIR], [Specify the directory for SUPERLUDIST library.]), + [mld2p4_cv_superludistlibdir=$withval], + [mld2p4_cv_superludistlibdir='']) + AC_LANG([C]) save_LIBS="$LIBS" save_CPPFLAGS="$CPPFLAGS" save_CC="$CC" CC=${MPICC} -if test "x$mld2p4_cv_superludistdir" != "x"; then - SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir" - SLUDIST_LIBS="-L$mld2p4_cv_superludistdir" +if test "x$mld2p4_cv_superludistincdir" != "x"; then + AC_MSG_NOTICE([sludist dir $mld2p4_cv_superludistincdir]) + SLUDIST_INCLUDES="-I$mld2p4_cv_superludistincdir" +elif test "x$mld2p4_cv_superludistdir" != "x"; then + AC_MSG_NOTICE([sludist dir $mld2p4_cv_superludistdir]) + SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir" +fi +if test "x$mld2p4_cv_superludistlibdir" != "x"; then + SLUDIST_LIBS="-L$mld2p4_cv_superludistlibdir" +elif test "x$mld2p4_cv_superludistdir" != "x"; then + SLUDIST_LIBS="-L$mld2p4_cv_superludir" fi + LIBS="$SLUDIST_LIBS $LIBS" CPPFLAGS="$SLUDIST_INCLUDES $CPPFLAGS" -AC_MSG_NOTICE([sludist dir $mld2p4_cv_superludistdir]) + AC_CHECK_HEADER([superlu_ddefs.h], [pac_sludist_header_ok=yes], [pac_sludist_header_ok=no; SLUDIST_INCLUDES=""]) diff --git a/configure b/configure index 91732f9a..76585ec4 100755 --- a/configure +++ b/configure @@ -728,6 +728,8 @@ with_superluincdir with_superlulibdir with_superludist with_superludistdir +with_superludistincdir +with_superludistlibdir ' ac_precious_vars='build_alias host_alias @@ -1400,6 +1402,10 @@ Optional Packages: --with-superludistdir=DIR Specify the directory for SUPERLUDIST library and includes. + --with-superludistincdir=DIR + Specify the directory for SUPERLUDIST includes. + --with-superludistlibdir=DIR + Specify the directory for SUPERLUDIST library. Some influential environment variables: FC Fortran compiler command @@ -6649,6 +6655,24 @@ else fi + +# Check whether --with-superludistincdir was given. +if test "${with_superludistincdir+set}" = set; then + withval=$with_superludistincdir; mld2p4_cv_superludistincdir=$withval +else + mld2p4_cv_superludistincdir='' +fi + + + +# Check whether --with-superludistlibdir was given. +if test "${with_superludistlibdir+set}" = set; then + withval=$with_superludistlibdir; mld2p4_cv_superludistlibdir=$withval +else + mld2p4_cv_superludistlibdir='' +fi + + ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -6659,14 +6683,24 @@ save_LIBS="$LIBS" save_CPPFLAGS="$CPPFLAGS" save_CC="$CC" CC=${MPICC} -if test "x$mld2p4_cv_superludistdir" != "x"; then - SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir" - SLUDIST_LIBS="-L$mld2p4_cv_superludistdir" +if test "x$mld2p4_cv_superludistincdir" != "x"; then + { $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistincdir" >&5 +$as_echo "$as_me: sludist dir $mld2p4_cv_superludistincdir" >&6;} + SLUDIST_INCLUDES="-I$mld2p4_cv_superludistincdir" +elif test "x$mld2p4_cv_superludistdir" != "x"; then + { $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistdir" >&5 +$as_echo "$as_me: sludist dir $mld2p4_cv_superludistdir" >&6;} + SLUDIST_INCLUDES="-I$mld2p4_cv_superludistdir" +fi +if test "x$mld2p4_cv_superludistlibdir" != "x"; then + SLUDIST_LIBS="-L$mld2p4_cv_superludistlibdir" +elif test "x$mld2p4_cv_superludistdir" != "x"; then + SLUDIST_LIBS="-L$mld2p4_cv_superludir" fi + LIBS="$SLUDIST_LIBS $LIBS" CPPFLAGS="$SLUDIST_INCLUDES $CPPFLAGS" -{ $as_echo "$as_me:$LINENO: sludist dir $mld2p4_cv_superludistdir" >&5 -$as_echo "$as_me: sludist dir $mld2p4_cv_superludistdir" >&6;} + if test "${ac_cv_header_superlu_ddefs_h+set}" = set; then { $as_echo "$as_me:$LINENO: checking for superlu_ddefs.h" >&5 $as_echo_n "checking for superlu_ddefs.h... " >&6; }