diff --git a/eo/Makefile.am b/eo/Makefile.am index 25d8c43a..07b73ede 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,10 +4,15 @@ ## ############################################################################### -SUBDIRS = src test doc app tutorial contrib win +SUBDIRS = src test doc contrib win +if USE_APPLICATIONS +SUBDIRS += app +endif +if USE_TUTORIAL +SUBDIRS += tutorial +endif - -#Directory for documents +# Directory for documents DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index 855ffddd..4fc7561f 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -1,8 +1,28 @@ +# AC_APPLICATIONS() +# +# Compile applications unless user requests not to do it. +AC_DEFUN([AC_APPLICATIONS],[dnl + AC_ARG_ENABLE([applications],[ --enable-applications build applications (default=yes)], + [ case "${enableval}" in + yes) applications=true ;; + no) applications=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for applications option) ;; + esac], + [applications=true]) + if test "$applications" = "true"; then + AM_CONDITIONAL([USE_APPLICATIONS], true) + else + AM_CONDITIONAL([USE_APPLICATIONS], false) + fi +]) + + + # AC_PARADISEO() # # Compile ParadisEO if user requests it. AC_DEFUN([AC_PARADISEO],[dnl - AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], + AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], [ case "${enableval}" in yes) paradiseo=true ;; no) paradiseo=false ;; @@ -10,10 +30,15 @@ AC_DEFUN([AC_PARADISEO],[dnl esac], [paradiseo=false]) if test "$paradiseo" = "true"; then - AC_DEFINE([PARADISEO], 1, [ParadisEO flag]) AM_CONDITIONAL([USE_PARADISEO], true) - AC_CHECK_PROG([MPICXX], [mpiCC], [], AC_MSG_ERROR([Need mpiCC to build PAradisEO.])) - AC_CHECK_PROG([MPIRUN], [mpirun], [], AC_MSG_ERROR([Need mpirun to use PAradisEO.])) + AC_CHECK_PROGS(MPICXX, [mpic++ mpiCC mpicxx], [false]) + if test $MPICXX = false; then + AC_MSG_ERROR([mpic++ is required for ParadisEO builds.]) + fi + AC_CHECK_PROGS(MPIRUN, [mpirun], [false]) + if test $MPIRUN = false; then + AC_MSG_ERROR([mpirun is required for ParadisEO builds.]) + fi else AM_CONDITIONAL([USE_PARADISEO], false) fi @@ -21,6 +46,26 @@ AC_DEFUN([AC_PARADISEO],[dnl +# AC_TUTORIAL() +# +# Compile tutorial unless user requests not to do it. +AC_DEFUN([AC_TUTORIAL],[dnl + AC_ARG_ENABLE([tutorial],[ --enable-tutorial build tutorial (default=yes)], + [ case "${enableval}" in + yes) tutorial=true ;; + no) tutorial=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for tutorial option) ;; + esac], + [tutorial=true]) + if test "$tutorial" = "true"; then + AM_CONDITIONAL([USE_TUTORIAL], true) + else + AM_CONDITIONAL([USE_TUTORIAL], false) + fi +]) + + + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_have_sstream.html dnl diff --git a/eo/configure.in b/eo/configure.in index f71d1fc7..bd1ca368 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -16,7 +16,9 @@ AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) dnl user-switches +AC_APPLICATIONS AC_PARADISEO +AC_TUTORIAL dnl Checks for programs. AC_PROG_CC @@ -65,4 +67,6 @@ AC_OUTPUT(Makefile \ tutorial/Lesson3/Makefile \ tutorial/Lesson4/Makefile \ tutorial/Lesson5/Makefile \ + tutorial/ParadisEO/Makefile \ + tutorial/ParadisEO/Lesson1/Makefile \ win/Makefile) diff --git a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h index f4824d25..01cc5d0f 100644 --- a/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h +++ b/eo/src/paradisEO/comm/messages/from/eoEOSendMessFrom.h @@ -24,11 +24,22 @@ #ifndef eoEOSendMessFrom_h #define eoEOSendMessFrom_h +#ifdef HAVE_CONFIG_H +#include +#endif + +#include #include +#ifdef HAVE_SSTREAM +#include +#else #include +#endif #include #include +using namespace std; + /** A message embeding a set of immigrants ... */ diff --git a/eo/src/utils/eoFileSnapshot.h b/eo/src/utils/eoFileSnapshot.h index 51643ff4..97a8e6f7 100644 --- a/eo/src/utils/eoFileSnapshot.h +++ b/eo/src/utils/eoFileSnapshot.h @@ -27,7 +27,9 @@ #ifndef _eoFileSnapshot_h #define _eoFileSnapshot_h +#ifdef HAVE_CONFIG_H #include +#endif #include #include diff --git a/eo/src/utils/eoGnuplot.h b/eo/src/utils/eoGnuplot.h index 38297cd6..50e372b4 100644 --- a/eo/src/utils/eoGnuplot.h +++ b/eo/src/utils/eoGnuplot.h @@ -26,7 +26,9 @@ #ifndef _eoGnuplot_H #define _eoGnuplot_H +#ifdef HAVE_CONFIG_H #include +#endif #include @@ -152,7 +154,7 @@ inline void eoGnuplot::initGnuPlot(std::string _title, std::string _extra) * Created......: Mon Mar 13 13:50:11 1995 * Description..: Communication par pipe bidirectionnel avec un autre process * - * Ident........: $Id: eoGnuplot.h,v 1.10 2004-09-17 16:53:15 kuepper Exp $ + * Ident........: $Id: eoGnuplot.h,v 1.11 2004-09-22 08:18:28 kuepper Exp $ * ---------------------------------------------------------------------- */ diff --git a/eo/src/utils/eoGnuplot1DMonitor.h b/eo/src/utils/eoGnuplot1DMonitor.h index 65596623..8e01413e 100644 --- a/eo/src/utils/eoGnuplot1DMonitor.h +++ b/eo/src/utils/eoGnuplot1DMonitor.h @@ -28,7 +28,9 @@ #ifndef _eoGnuplot1DMonitor_H #define _eoGnuplot1DMonitor_H +#ifdef HAVE_CONFIG_H #include +#endif #include diff --git a/eo/src/utils/eoGnuplot1DSnapshot.h b/eo/src/utils/eoGnuplot1DSnapshot.h index ef70aa63..0ef17c8a 100644 --- a/eo/src/utils/eoGnuplot1DSnapshot.h +++ b/eo/src/utils/eoGnuplot1DSnapshot.h @@ -28,7 +28,9 @@ #ifndef _eoGnuplot1DSnapshot_H #define _eoGnuplot1DSnapshot_H +#ifdef HAVE_CONFIG_H #include +#endif #include #ifdef HAVE_SSTREAM diff --git a/eo/src/utils/eoHowMany.h b/eo/src/utils/eoHowMany.h index 782bbd44..3f84a9c9 100644 --- a/eo/src/utils/eoHowMany.h +++ b/eo/src/utils/eoHowMany.h @@ -64,7 +64,9 @@ * It is an eoPersistent because we need to be able to use eoParamValue */ +#ifdef HAVE_CONFIG_H #include +#endif #ifdef HAVE_SSTREAM #include diff --git a/eo/src/utils/eoParam.h b/eo/src/utils/eoParam.h index 7595ef50..75875b9b 100644 --- a/eo/src/utils/eoParam.h +++ b/eo/src/utils/eoParam.h @@ -27,7 +27,9 @@ #ifndef eoParam_h #define eoParam_h +#ifdef HAVE_CONFIG_H #include +#endif //----------------------------------------------------------------------------- #include // for floor diff --git a/eo/src/utils/eoPopStat.h b/eo/src/utils/eoPopStat.h index 7dcf8259..983c8c1c 100644 --- a/eo/src/utils/eoPopStat.h +++ b/eo/src/utils/eoPopStat.h @@ -35,7 +35,9 @@ that can be used to dump to the screen #ifndef _eoPopStat_h #define _eoPopStat_h +#ifdef HAVE_CONFIG_H #include +#endif #include diff --git a/eo/tutorial/Makefile.am b/eo/tutorial/Makefile.am index 2df65391..61d590dd 100644 --- a/eo/tutorial/Makefile.am +++ b/eo/tutorial/Makefile.am @@ -1 +1,5 @@ +if USE_PARADISEO +SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 ParadisEO +else SUBDIRS = Lesson1 Lesson2 Lesson3 Lesson4 Lesson5 +endif diff --git a/eo/tutorial/ParadisEO/.cvsignore b/eo/tutorial/ParadisEO/.cvsignore new file mode 100644 index 00000000..70845e08 --- /dev/null +++ b/eo/tutorial/ParadisEO/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson1/.cvsignore b/eo/tutorial/ParadisEO/Lesson1/.cvsignore new file mode 100644 index 00000000..70845e08 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/.cvsignore @@ -0,0 +1 @@ +Makefile.in diff --git a/eo/tutorial/ParadisEO/Lesson1/Makefile.am b/eo/tutorial/ParadisEO/Lesson1/Makefile.am new file mode 100644 index 00000000..67f0e9e7 --- /dev/null +++ b/eo/tutorial/ParadisEO/Lesson1/Makefile.am @@ -0,0 +1,19 @@ +noinst_PROGRAMS = IslandBitEA IslandBitEA1 IslandBitEA2 + +LIBEO = $(top_builddir)/src/libeo.a +LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a + +CXX = $(MPICXX) +LD = $(MPICXX) +AM_CXXFLAGS = -I$(top_srcdir)/src +DEPS = $(LIBEOUTILS) $(LIBEO) +LIBS = $(LIBEOUTILS) $(LIBEO) + + +noinst_HEADERS = binary_value.h + +IslandBitEA_SOURCES = IslandBitEA.cpp + +IslandBitEA1_SOURCES = IslandBitEA1.cpp + +IslandBitEA2_SOURCES = IslandBitEA2.cpp diff --git a/eo/tutorial/ParadisEO/Makefile.am b/eo/tutorial/ParadisEO/Makefile.am new file mode 100644 index 00000000..3bdf4ca5 --- /dev/null +++ b/eo/tutorial/ParadisEO/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = Lesson1 \ No newline at end of file