Skip to content

Commit

Permalink
Enable the capability to use either the internal PLE library or an ex…
Browse files Browse the repository at this point in the history
…ternal

already installed library.


git-svn-id: https://svn.isais.edf.fr/mfee/saturne/trunk@1286 e44c5d27-f830-0410-8ce8-974f7a764be6
  • Loading branch information
David Monfort committed May 11, 2010
1 parent 925a6d4 commit 9fbecb8
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 9 deletions.
13 changes: 13 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
* 11/05/2010 - David Monfort <david.monfort@edf.fr>
Enable the capability to use either the internal PLE library or an external
already installed library.
modified scripts:
config/cs_ple.m4
configure.ac
libsyrcs/Makefile.am
Makefile.am
sbin/bootstrap
src/apps/Makefile.am
src/base/Makefile.am
src/ctwr/Makefile.am

* 11/05/2010 - Yvan Fournier <yvan.fournier@edf.fr>
Add PLE library to Code_Saturne Subversion repository.
added files:
Expand Down
6 changes: 5 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ if HAVE_GUI
GUI = gui
endif

SUBDIRS = src libsyrcs po doc $(GUI) tests
if HAVE_INTERNAL_PLE
PLE = libple
endif

SUBDIRS = $(PLE) src libsyrcs po doc $(GUI) tests

MAINTAINERCLEANFILES = \
$(top_srcdir)/Makefile.in \
Expand Down
9 changes: 6 additions & 3 deletions config/cs_ple.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@ dnl-----------------------------------------------------------------------------

AC_DEFUN([CS_AC_TEST_PLE], [
have_internal_ple=yes
AC_ARG_WITH(ple,
[AS_HELP_STRING([--with-ple=PATH],
[specify prefix directory for PLE])],
[if test "x$withval" = "x"; then
with_ple=yes
fi],
[with_ple=yes])
[with_ple=no])
AC_ARG_WITH(ple-exec,
[AS_HELP_STRING([--with-ple-exec=PATH],
Expand Down Expand Up @@ -145,8 +147,9 @@ if test "x$with_ple" != "xno" ; then
# endif
#endif
]])],
[AC_MSG_RESULT([compatible ple version found])],
[AC_MSG_FAILURE([compatible ple version not found])])
[have_internal_ple=no
AC_MSG_RESULT([using external PLE library])],
[AC_MSG_RESULT([external PLE library not found, using internal])])
CPPFLAGS=$saved_CPPFLAGS
LDFLAGS=$saved_LDFLAGS
Expand Down
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,12 @@ fi
#------------------------------------------------------------------------------

CS_AC_TEST_PLE(["1.0.0"])

AM_CONDITIONAL(HAVE_INTERNAL_PLE, test x$have_internal_ple = xyes)
if test "x$have_internal_ple" = xyes; then
AC_CONFIG_SUBDIRS([libple])
fi

CS_AC_TEST_LIBXML2
CS_AC_TEST_BLAS([$cs_have_openmp])
CS_AC_TEST_MPI
Expand Down
10 changes: 9 additions & 1 deletion libsyrcs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,17 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#-------------------------------------------------------------------------------

# PLE dependency

if HAVE_INTERNAL_PLE
CPPFLAGS_PLE = -I$(top_srcdir)/libple/src -I$(top_builddir)/libple
else
CPPFLAGS_PLE = @PLE_CPPFLAGS@
endif

# Main part

AM_CPPFLAGS = @PLE_CPPFLAGS@ @MPI_CPPFLAGS@
AM_CPPFLAGS = $(CPPFLAGS_PLE) @MPI_CPPFLAGS@
AM_CFLAGS = @CFLAGS_DBG@ @CFLAGS_OPT@
AM_LDFLAGS =

Expand Down
7 changes: 7 additions & 0 deletions sbin/bootstrap
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,10 @@ cd src/mei
\rm -f mei_parser.h mei_parser.c mei_scanner.c
bison -o mei_parser.c -d mei_parser.y
flex -o mei_scanner.c -l mei_scanner.l
cd ../..

echo
echo "running bootstrap for PLE library"
echo
cd libple
sbin/bootstrap
17 changes: 15 additions & 2 deletions src/apps/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#-------------------------------------------------------------------------------

# PLE dependency

if HAVE_INTERNAL_PLE
CPPFLAGS_PLE = -I$(top_srcdir)/libple/src -I$(top_builddir)/libple
LDFLAGS_PLE =
LIBS_PLE = $(top_builddir)/libple/src/libple.la
else
CPPFLAGS_PLE = @PLE_CPPFLAGS@
LDFLAGS_PLE = @PLE_LDFLAGS@
LIBS_PLE = @PLE_LIBS@
endif

# Main part

AM_CPPFLAGS = \
Expand All @@ -28,7 +40,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/include/lagr \
-I$(top_srcdir)/src/bft \
-I$(top_srcdir)/src/fvm \
@PLE_CPPFLAGS@ @MPI_CPPFLAGS@ @LIBXML2_CPPFLAGS@ @BLAS_CPPFLAGS@
$(CPPFLAGS_PLE) \
@MPI_CPPFLAGS@ @LIBXML2_CPPFLAGS@ @BLAS_CPPFLAGS@

AM_CFLAGS = @CFLAGS_DBG@ @CFLAGS_OPT@

Expand Down Expand Up @@ -78,7 +91,7 @@ cs_solver_LDADD = libsaturne.la $(LTLIBINTL) \
$(top_builddir)/src/mei/libmei.la \
$(top_builddir)/src/fvm/libfvm.la \
$(top_builddir)/src/bft/libbft.la \
@PLE_LDFLAGS@ @PLE_LIBS@ \
$(LDFLAGS_PLE) $(LIBS_PLE) \
@CGNS_LDFLAGS@ @CGNS_LIBS@ \
@MED_LDFLAGS@ @MED_LIBS@ \
@HDF5_LDFLAGS@ @HDF5_LIBS@ \
Expand Down
11 changes: 10 additions & 1 deletion src/base/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#-------------------------------------------------------------------------------

# PLE dependency

if HAVE_INTERNAL_PLE
CPPFLAGS_PLE = -I$(top_srcdir)/libple/src -I$(top_builddir)/libple
else
CPPFLAGS_PLE = @PLE_CPPFLAGS@
endif

# Main part

AM_CPPFLAGS = \
Expand All @@ -29,7 +37,8 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/bft \
-I$(top_srcdir)/src/fvm \
-I$(top_srcdir)/src/mei \
@PLE_CPPFLAGS@ @MPI_CPPFLAGS@ @LIBXML2_CPPFLAGS@ @BLAS_CPPFLAGS@
$(CPPFLAGS_PLE) \
@MPI_CPPFLAGS@ @LIBXML2_CPPFLAGS@ @BLAS_CPPFLAGS@

AM_CFLAGS = @CFLAGS_DBG@ @CFLAGS_OPT@

Expand Down
11 changes: 10 additions & 1 deletion src/ctwr/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,23 @@
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#-------------------------------------------------------------------------------

# PLE dependency

if HAVE_INTERNAL_PLE
CPPFLAGS_PLE = -I$(top_srcdir)/libple/src -I$(top_builddir)/libple
else
CPPFLAGS_PLE = @PLE_CPPFLAGS@
endif

# Main part

AM_CPPFLAGS = \
-I$(top_srcdir)/include/base \
-I$(top_srcdir)/include/ctwr \
-I$(top_srcdir)/src/bft \
-I$(top_srcdir)/src/fvm \
@PLE_CPPFLAGS@ @MPI_CPPFLAGS@
$(CPPFLAGS_PLE) \
@MPI_CPPFLAGS@

AM_CFLAGS = @CFLAGS_DBG@ @CFLAGS_OPT@

Expand Down

0 comments on commit 9fbecb8

Please sign in to comment.