diff --git a/eo/.cvsignore b/eo/.cvsignore index b7e78eccf..3e34ecb4c 100644 --- a/eo/.cvsignore +++ b/eo/.cvsignore @@ -9,11 +9,12 @@ autom4te.cache build* confdefs.h config.cache -config.cache +config.guess config.h config.h.in config.log config.status +config.sub configure depcomp install-sh diff --git a/eo/Makefile.am b/eo/Makefile.am index 9e6eb03a5..25d8c43a6 100644 --- a/eo/Makefile.am +++ b/eo/Makefile.am @@ -4,28 +4,18 @@ ## ############################################################################### -SUBDIRS = src test doc app tutorial contrib win +SUBDIRS = src test doc app tutorial contrib win #Directory for documents -DOCDIR = ~/public_html/eodocs +DOCDIR = ~/public_html/eodocs #Directory for indices -- not useful for the user -IDXDIR = ~/index +IDXDIR = ~/index -# special targets -app: - cd app; $(MAKE) all; cd .. +dist-hook: + $(MAKE) doc -# so that make doc always compiles the doc ... -doc: doc/eo.cfg - cd doc; $(MAKE) doc; touch eo.cfg; cd .. - - - - -############################################################################### - -#lib: -# cd src; $(MAKE) all; cd .. +doc: $(srcdir)/doc/eo.cfg + cd doc && $(MAKE) doc && cd .. diff --git a/eo/acinclude.m4 b/eo/acinclude.m4 index aa781f376..855ffdddf 100644 --- a/eo/acinclude.m4 +++ b/eo/acinclude.m4 @@ -1,3 +1,26 @@ +# AC_PARADISEO() +# +# Compile ParadisEO if user requests it. +AC_DEFUN([AC_PARADISEO],[dnl + AC_ARG_ENABLE([paradiseo],[ --enable-paradiseo build ParadisEO (default=no)], + [ case "${enableval}" in + yes) paradiseo=true ;; + no) paradiseo=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for paradiseo option) ;; + 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.])) + else + AM_CONDITIONAL([USE_PARADISEO], 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 @@ -24,6 +47,8 @@ if test "$ac_cv_cxx_have_sstream" = yes; then AC_DEFINE(HAVE_SSTREAM,,[define if the compiler has stringstream]) fi ]) + + dnl Available from the GNU Autoconf Macro Archive at: dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_namespaces.html dnl diff --git a/eo/configure.in b/eo/configure.in index 8af929c9b..f71d1fc77 100644 --- a/eo/configure.in +++ b/eo/configure.in @@ -2,12 +2,22 @@ dnl Process this file with autoconf to produce a configure script. dnl Change the version number here AC_INIT(Evolving Objects, 0.9.3, eodev-main@sourceforge.net, eo) AC_PREREQ(2.53) + dnl make sure we are compiling from the correct sources AC_CONFIG_SRCDIR(src/eoOp.h) +dnl define host, build, and target machine +AC_CANONICAL_BUILD +AC_CANONICAL_HOST +AC_CANONICAL_TARGET + +dnl automake initialization AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) +dnl user-switches +AC_PARADISEO + dnl Checks for programs. AC_PROG_CC AC_PROG_CXX @@ -15,10 +25,7 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB - -# Why shall we check for these, we just build them... -# AC_CHECK_LIB(eo, main) -# AC_CHECK_LIB(eoutils, main) +AC_CHECK_PROG(DOXYGEN, doxygen, doxygen, true) dnl Checks for header files. AC_HEADER_STDC diff --git a/eo/doc/Makefile.am b/eo/doc/Makefile.am index c31407947..0bcba7a27 100644 --- a/eo/doc/Makefile.am +++ b/eo/doc/Makefile.am @@ -5,10 +5,14 @@ ############################################################################### -# EXTRA_DIST = eo.cfg foot.html html/* latex/* +EXTRA_DIST = eo.cfg foot.html \ + $(srcdir)/html/* \ + $(srcdir)/latex/* \ + $(srcdir)/man/* -doc: eo.cfg - doxygen eo.cfg + +doc: + cd $(srcdir) && $(DOXYGEN) eo.cfg && touch eo.cfg clean-local: - rm -rf html latex man + cd $(srcdir) && rm -rf html latex man && touch eo.cfg diff --git a/eo/doc/eo.cfg b/eo/doc/eo.cfg index 17c29d6a4..40844dc5d 100644 --- a/eo/doc/eo.cfg +++ b/eo/doc/eo.cfg @@ -23,7 +23,7 @@ PROJECT_NAME = EO # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 0.9.2 +PROJECT_NUMBER = 0.9.3 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. diff --git a/eo/test/Makefile.am b/eo/test/Makefile.am index 5f55323a3..b662839cf 100644 --- a/eo/test/Makefile.am +++ b/eo/test/Makefile.am @@ -9,27 +9,25 @@ LIBEOUTILS = $(top_builddir)/src/utils/libeoutils.a LIBES = $(top_builddir)/src/es/libes.a LIBGA = $(top_builddir)/src/ga/libga.a -AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src - -CLEANFILES = monitor.csv t-eoRandom.out - -DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) - -LIBS = $(DEPS) - - - - # PLEASE don't break the line (see create_batch.sh) check_PROGRAMS = t-eoParetoFitness t-eoPareto t-eofitness t-eoRandom t-eobin t-eoVirus t-MGE t-MGE1bit t-MGE-control t-eoStateAndParser t-eoCheckpointing t-eoSSGA t-eoExternalEO t-eoSymreg t-eo t-eoReplacement t-eoSelect t-eoGenOp t-eoGA t-eoReal t-eoVector t-eoESAll t-eoPBIL t-eoFitnessAssembled t-eoFitnessAssembledEA t-eoRoulette t-eoSharing -noinst_headers = binary_value.h real_value.h RoyalRoad.h + +TESTS = $(check_PROGRAMS) \ + run_tests # This script can be used to check command-line arguments + +noinst_HEADERS = binary_value.h real_value.h RoyalRoad.h -# The run_tests script can be used to check various arguments -TESTS=$(check_PROGRAMS) run_tests +AM_CXXFLAGS = -g -Wall -I$(top_srcdir)/src +DEPS = $(LIBGA) $(LIBES) $(LIBEO) $(LIBEOUTILS) +LIBS = $(DEPS) +CLEANFILES = monitor.csv t-eoRandom.out +EXTRA_DIST = run_tests +# extra flags for specific targets +t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib # Specify source-files, # otherwise automake/make looks for C sources @@ -61,6 +59,3 @@ t_eoPBIL_SOURCES = t-eoPBIL.cpp t_eoFitnessAssembled_SOURCES = t-eoFitnessAssembled.cpp t_eoRoulette_SOURCES = t-eoRoulette.cpp t_eoSharing_SOURCES = t-eoSharing.cpp - -# extra flags for specific targets -t_eoVirus_CXXFLAGS = -I$(top_srcdir)/contrib