Skip to content
Snippets Groups Projects
Commit 023a0161 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

LDFLAGS -> LIBS transition for the m4 files

[[Imported from SVN: r5583]]
parent 3bba5f80
No related branches found
No related tags found
No related merge requests found
......@@ -110,8 +110,7 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
_DUNE_MODULE[]_ROOT="`$PKG_CONFIG --variable=prefix _dune_name`" 2>/dev/null
_DUNE_MODULE[]_VERSION="`$PKG_CONFIG --modversion _dune_name`" 2>/dev/null
ifelse(_dune_symbol,,,[
_DUNE_MODULE[]_LDFLAGS="-L`$PKG_CONFIG --variable=libdir _dune_name`" 2>/dev/null
_DUNE_MODULE[]_LIBS="-l[]_dune_lib"
_DUNE_MODULE[]_LIBS="-L`$PKG_CONFIG --libs _dune_name`" 2>/dev/null
])
HAVE_[]_DUNE_MODULE=1
AC_MSG_RESULT([
......@@ -138,8 +137,7 @@ AC_DEFUN([DUNE_CHECK_MODULES],[
_DUNE_MODULE[]_VERSION="`grep Version $_DUNE_MODULE[]_ROOT/dune.module | sed -e 's/^Version: *//'`" 2>/dev/null
fi
ifelse(_dune_symbol,,,[
_DUNE_MODULE[]_LDFLAGS="-L$_DUNE_MODULE[]_ROOT/lib"
_DUNE_MODULE[]_LIBS="-l[]_dune_lib"
_DUNE_MODULE[]_LIBS="-L$_DUNE_MODULE[]_ROOT/lib -l[]_dune_lib"
])
# set expanded module path
with_[]_dune_module="$_DUNE_MODULE[]_ROOT"
......
......@@ -109,9 +109,7 @@ AC_DEFUN([DUNE_MPI],[
ac_save_LIBS="$LIBS"
ac_save_CPPFLAGS="$CPPFLAGS"
# looks weird but as the -l... are contained in the MPI_LDFLAGS these
# parameters have to be last on the commandline: with LIBS this is true
LIBS="$MPI_LDFLAGS"
LIBS="$MPI_LIBS"
CPPFLAGS="$CPPFLAGS $MPI_CPPFLAGS"
# try to create MPI program
......@@ -169,6 +167,7 @@ AC_DEFUN([DUNE_MPI],[
if test x"$with_mpi" != xno ; then
AC_SUBST(MPI_CPPFLAGS, $MPI_CPPFLAGS)
AC_SUBST(MPI_LDFLAGS, $MPI_LDFLAGS)
AC_SUBST(MPI_LIBS, $MPI_LIBS)
AC_SUBST(MPI_VERSION, $MPI_VERSION)
AC_DEFINE(HAVE_MPI,ENABLE_MPI,[Define if you have the MPI library.
This is only true if MPI was found by configure
......@@ -176,6 +175,7 @@ AC_DEFUN([DUNE_MPI],[
else
AC_SUBST(MPI_CPPFLAGS, "")
AC_SUBST(MPI_LDFLAGS, "")
AC_SUBST(MPI_LIBS, "")
fi
AM_CONDITIONAL(MPI, test x"$with_mpi" != xno)
......
......@@ -32,8 +32,8 @@ AC_DEFUN([DUNE_PATH_F5],[
AC_MSG_CHECKING([for make/arch])
if test -x $F5ARCH ; then
AC_MSG_RESULT([yes])
LDFLAGS="$HDF5_LDFLAGS -L$with_f5/lib/`$F5ARCH`"
F5_LDFLAGS="$LDFLAGS"
LIBS="$HDF5_LIBS -L$with_f5/lib/`$F5ARCH`"
F5_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS -I$with_f5"
else
AC_MSG_RESULT([no])
......
......@@ -36,7 +36,7 @@ if test "x$X_LIBS" != x && test x$with_grape != xno ; then
fi
CPPFLAGS="$CPPFLAGS -I$GRAPEROOT"
LDFLAGS="$LDFLAGS -L$GRAPEROOT"
LIBS="$LIBS -L$GRAPEROOT"
# check for header
# we have to use CC for checking the header!!
......@@ -61,9 +61,9 @@ if test "x$X_LIBS" != x && test x$with_grape != xno ; then
fi
AC_CHECK_LIB(gr, grape,
[GRAPE_LDFLAGS="-L$GRAPEROOT $GL_LDFLAGS $GRAPE_LINKER_FLAGS"
[GRAPE_LDFLAGS="$GL_LDFLAGS $GRAPE_LINKER_FLAGS"
GRAPE_CPPFLAGS="$CPPFLAGS"
GRAPE_LIBS="-lgr $GL_LIBS -lXext"],
GRAPE_LIBS="-L$GRAPEROOT -lgr $GL_LIBS -lXext"],
[HAVE_GRAPE="0"])
fi
......
......@@ -32,8 +32,8 @@ AC_DEFUN([DUNE_PATH_HDF5],[
else
AC_MSG_ERROR([HDF5-directory $with_hdf5 does not exist])
fi
LDFLAGS="$LDFLAGS -L$with_hdf5/lib"
HDF5_LDFLAGS="$LDFLAGS"
LIBS="$LIBS -L$with_hdf5/lib"
HDF5_LIBS="$LIBS"
CPPFLAGS="$CPPFLAGS -I$with_hdf5/include"
fi
......
......@@ -66,6 +66,7 @@ AC_DEFUN([IMMDX_LIB_METIS], [
if test -n "$with_metis" ; then
old_CFLAGS=$CFLAGS
old_LDFLAGS=$LDFLAGS
old_LIBS=$LIBS
if test -f "$with_metis/include/metis.h"; then
lib_path="/lib"
......@@ -78,7 +79,7 @@ AC_DEFUN([IMMDX_LIB_METIS], [
include_path="/Lib"
fi
CFLAGS="-I$with_metis/$include_path"
LDFLAGS="-L$with_metis/$lib_path"
LIBS="-L$with_metis/$lib_path"
AC_LANG_SAVE
AC_LANG_C
......@@ -95,12 +96,13 @@ AC_DEFUN([IMMDX_LIB_METIS], [
CFLAGS=$old_CFLAGS
LDFLAGS=$old_LDFLAGS
LIBS=$old_LIBS
AC_MSG_CHECKING(METIS in $with_metis)
if test "$metis_lib" = "yes" -a "$metis_h" = "yes" ; then
AC_SUBST(METIS_INCLUDE, [-I$with_metis$include_path])
AC_SUBST(METIS_LDFLAGS, [-L$with_metis$lib_path])
AC_SUBST(METIS_LIB, [-lmetis])
AC_SUBST(METIS_LDFLAGS, [])
AC_SUBST(METIS_LIB, [-L$with_metis$lib_path -lmetis])
AC_MSG_RESULT(ok)
else
AC_MSG_RESULT(failed)
......
......@@ -54,14 +54,14 @@ _EOF
MPI_VERSION="LAM >= 7.1"
MPI_CPPFLAGS="$retval"
mpi_getflags "-showme:link"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
else
MPI_VERSION="LAM < 7.1"
# use -showme and dummy parameters to extract flags
mpi_getflags "-showme" "-c $MPISOURCE"
MPI_CPPFLAGS="$retval"
mpi_getflags "-showme" "dummy.o -o dummy"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
fi
# hack in option to disable LAM-C++-bindings...
# we fake to have mpicxx.h read already
......@@ -86,13 +86,13 @@ mpi_getmpichflags() {
# get linker options
mpi_getflags "-link_info"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
# strip -o option
mpi_remove "$MPI_LDFLAGS" "-o"
MPI_LDFLAGS="$retval"
mpi_remove "$MPI_LIBS" "-o"
MPI_LIBS="$retval"
#strip MPI_CPPFLAGS (which are included for mpich2 on jugene)
enc=`echo "$MPI_CPPFLAGS" | sed -e 's/\\//\\\\\\//g'`
MPI_LDFLAGS=`echo "$retval" | sed -e "s/$enc / /"`
MPI_LIBS=`echo "$MPI_LIBS" | sed -e "s/$enc / /"`
# hack in option to disable MPICH-C++-bindings...
......@@ -109,13 +109,13 @@ mpi_getmpich2flags() {
# get linker options
mpi_getflags "-show" "-o"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
# strip -o option
mpi_remove "$MPI_LDFLAGS" "-o"
MPI_LDFLAGS="$retval"
mpi_remove "$MPI_LIBS" "-o"
MPI_LIBS="$retval"
#strip MPI_CPPFLAGS (which are included for mpich2 on jugene)
enc=`echo "$MPI_CPPFLAGS" | sed -e 's/\\//\\\\\\//g'`
MPI_LDFLAGS=`echo "$retval" | sed -e "s/$enc / /"`
MPI_LIBS=`echo "$retval" | sed -e "s/$enc / /"`
# hack in option to disable MPICH-C++-bindings...
......@@ -181,7 +181,7 @@ _EOF
mpi_getflags "-showme:compile"
MPI_CPPFLAGS="$retval"
mpi_getflags "-showme:link"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
MPI_NOCXXFLAGS="-DMPIPP_H"
AC_MSG_RESULT([yes])
......@@ -204,7 +204,7 @@ test_mvapich() {
mpi_getflags "-compile_info $ADDFLAGS" "dummy.o -o dummy"
MPI_CPPFLAGS="$retval"
mpi_getflags "-link_info $ADDFLAGS" "dummy.o -o dummy"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
AC_MSG_RESULT([yes])
rm -f conftest*
return 0
......@@ -244,7 +244,7 @@ test_ibmmpi() {
# retval=`echo $retval | sed -e 's/\(-b[[^ ]]*\)/-Xlinker \1/g'`
# fi
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
AC_MSG_RESULT([yes])
rm -f conftest*
......@@ -264,7 +264,7 @@ test_intelmpi() {
MPI_VERSION="Intel MPI"
mpi_getflags "-show"
MPI_CPPFLAGS="$retval"
MPI_LDFLAGS="$retval"
MPI_LIBS="$retval"
AC_MSG_RESULT([yes])
rm -f conftest*
return 0
......
AC_DEFUN([DUNE_PARDISO], [
AC_PREREQ(2.50)
dnl this will set the variable FLIBS (*not* ..._LDFLAGS)
AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
AC_REQUIRE([ACX_LAPACK])
acx_pardiso_ok=no
......
......@@ -55,13 +55,14 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
ac_save_LIBS="$LIBS"
## do nothing if --without-parmetis is used
if test x"$MPI_LDFLAGS" != x"" && test x"$with_parmetis" != x"no" ; then
if test x"$MPI_LIBS" != x"" && test x"$with_parmetis" != x"no" ; then
# defaultpath
PARMETIS_LIB_PATH="$with_parmetis$lib_path"
PARMETIS_INCLUDE_PATH="$with_parmetis$lib_path"
PARMETIS_LIBS="-L$PARMETIS_LIB_PATH $MPI_LDFLAGS $MPI_LIBS"
PARMETIS_LIBS="-L$PARMETIS_LIB_PATH $MPI_LIBS"
PARMETIS_LDFLAGS="$MPI_LDFLAGS"
# set variables so that tests can use them
CPPFLAGS="$CPPFLAGS -I$PARMETIS_INCLUDE_PATH $MPI_CPPFLAGS"
......@@ -81,6 +82,7 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
# if header is found check for the libs
LIBS="$LIBS $PARMETIS_LIBS -lm"
LDFLAGS="$LDFLAGS $PARMETIS_LDFLAGS"
if test x$HAVE_PARMETIS = x1 ; then
AC_CHECK_LIB(metis, [metis_partgraphkway],[
......@@ -106,6 +108,7 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
# did it work?
AC_MSG_CHECKING(ParMETIS in $with_parmetis)
if test x$HAVE_PARMETIS = x1 ; then
AC_SUBST(PARMETIS_LDFLAGS, $PARMETIS_LDFLAGS)
AC_SUBST(PARMETIS_LIBS, $PARMETIS_LIBS)
AC_SUBST(PARMETIS_CPPFLAGS, $PARMETIS_CPPFLAGS)
AC_DEFINE(HAVE_PARMETIS,ENABLE_PARMETIS,[Define if you have the Parmetis library.
......@@ -114,6 +117,7 @@ AC_DEFUN([DUNE_PATH_PARMETIS],[
AC_MSG_RESULT(ok)
# add to global list
DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $PARMETIS_LDFLAGS"
DUNE_PKG_LIBS="$DUNE_PKG_LIBS $PARMETIS_LIBS"
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $PARMETIS_CPPFLAGS"
......
......@@ -95,7 +95,8 @@ AC_DEFUN([DUNE_PATH_SUPERLU_DIST],[
SUPERLU_DIST_LIB_PATH="$with_superlu_dist/$my_lib_path"
SUPERLU_DIST_INCLUDE_PATH="$with_superlu_dist/$my_include_path"
SUPERLU_DIST_LDFLAGS="-L$SUPERLU_DIST_LIB_PATH $MPI_LDFLAGS"
SUPERLU_DIST_LDFLAGS="$MPI_LDFLAGS"
SUPERLU_DIST_LIBS="-L$SUPERLU_DIST_LIB_PATH $MPI_LIBS"
# set variables so that tests can use them
CPPFLAGS="$CPPFLAGS -I$SUPERLU_DIST_INCLUDE_PATH $MPI_CPPFLAGS"
......@@ -116,12 +117,12 @@ AC_DEFUN([DUNE_PATH_SUPERLU_DIST],[
# set variables so that tests can use them
OLDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS -L$SUPERLU_DIST_LIB_PATH $MPI_LDFLAGS"
LIBS="$BLAS_LIBS $LIBS $FLIBS $MPILIBS $MPI_LDFLAGS"
LDFLAGS="$LDFLAGS $MPI_LDFLAGS"
LIBS="$BLAS_LIBS $LIBS $FLIBS $MPILIBS -L$SUPERLU_DIST_LIB_PATH"
AC_CHECK_LIB(superlu-mpi, [pdgssvx],
[dnl
SUPERLU_DIST_LIBS="-lsuperlu-mpi $LIBS"
SUPERLU_DIST_LIBS="$LIBS -lsuperlu-mpi"
SUPERLU_DIST_LDFLAGS="$LDFLAGS"
HAVE_SUPERLU_DIST="1"
AC_MSG_RESULT(yes)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment