Index: trunk/configure.ac.in =================================================================== --- trunk/configure.ac.in (revision 8474) +++ trunk/configure.ac.in (revision 8475) @@ -1,1227 +1,1234 @@ dnl configure.ac -- Main configuration script for WHIZARD dnl dnl Process this file with autoconf to produce a configure script. dnl ************************************************************************ dnl configure.ac -- Main configuration script for WHIZARD dnl configure.ac -- WHIZARD configuration dnl dnl Copyright (C) 1999-2020 by dnl Wolfgang Kilian dnl Thorsten Ohl dnl Juergen Reuter dnl with contributions from dnl cf. main AUTHORS file dnl dnl WHIZARD is free software; you can redistribute it and/or modify it dnl under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2, or (at your option) dnl any later version. dnl dnl WHIZARD is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. dnl dnl *********************************************************************** dnl Environment variables that can be set by the user: dnl FC Fortran compiler dnl FCFLAGS Fortran compiler flags dnl *********************************************************************** dnl dnl Start configuration AC_INIT([XXXWHIZARDXXX],[3.0.0_beta+]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([1.12.2 color-tests parallel-tests]) AC_PREREQ([2.65]) AM_MAKE_INCLUDE dnl Make make less verbose to improve signal/noise AM_SILENT_RULES([yes]) ######################################################################## ### Package-specific initialization AC_MSG_NOTICE([**************************************************************]) WO_CONFIGURE_SECTION([Start of package configuration]) ### Further version information PACKAGE_DATE="Aug 30 2020" PACKAGE_STATUS="beta" AC_SUBST(PACKAGE_DATE) AC_SUBST(PACKAGE_STATUS) AC_MSG_NOTICE([**************************************************************]) AC_MSG_NOTICE([Package name: AC_PACKAGE_NAME()]) AC_MSG_NOTICE([Version: AC_PACKAGE_VERSION()]) AC_MSG_NOTICE([Date: $PACKAGE_DATE]) AC_MSG_NOTICE([Status: $PACKAGE_STATUS]) AC_MSG_NOTICE([**************************************************************]) ### Dump Package version and date to file 'VERSION' echo "$PACKAGE_STRING ($PACKAGE_STATUS) $PACKAGE_DATE" \ > VERSION ######################################################################## ###--------------------------------------------------------------------- ### shared library versioning (not the same as the package version!) LIBRARY_VERSION="-version-info 2:0:0" AC_SUBST([LIBRARY_VERSION]) ######################################################################## ###--------------------------------------------------------------------- ### Define the main package variables ### Source directory, for testing purposes SRCDIR=`cd $srcdir && pwd` AC_SUBST([SRCDIR]) ### Build directory, for testing purposes BUILDDIR=`pwd` AC_SUBST([BUILDDIR]) ### Location of installed libraries and such eval BINDIR=$bindir case $BINDIR in NONE*) eval BINDIR=$prefix/bin ;; esac case $BINDIR in NONE*) BINDIR="\${prefix}/bin" ;; esac AC_SUBST([BINDIR]) eval INCLUDEDIR=$includedir case $INCLUDEDIR in NONE*) eval INCLUDEDIR=$prefix/include ;; esac case $INCLUDEDIR in NONE*) INCLUDEDIR="\${prefix}/include" ;; esac AC_SUBST([INCLUDEDIR]) eval LIBDIR=$libdir case $LIBDIR in NONE*) eval LIBDIR=$prefix/lib ;; esac case $LIBDIR in NONE*) eval LIBDIR=$ac_default_prefix/lib ;; esac AC_SUBST([LIBDIR]) ### Location of installed libraries and such eval PKGLIBDIR=$libdir/$PACKAGE case $PKGLIBDIR in NONE*) eval PKGLIBDIR=$prefix/lib/$PACKAGE ;; esac case $PKGLIBDIR in NONE*) PKGLIBDIR="\${prefix}/lib/$PACKAGE" ;; esac AC_SUBST([PKGLIBDIR]) ### Location of installed system-independent data eval PKGDATADIR=$datarootdir/$PACKAGE case $PKGDATADIR in NONE*) eval PKGDATADIR=$prefix/share/$PACKAGE ;; esac case $PKGDATADIR in NONE*) PKGDATADIR="\${prefix}/share/$PACKAGE" ;; esac AC_SUBST([PKGDATADIR]) ### Location of installed TeX files and such eval PKGTEXDIR=$datarootdir/texmf/$PACKAGE case $PKGTEXDIR in NONE*) eval PKGTEXDIR=$prefix/share/texmf/$PACKAGE ;; esac case $PKGTEXDIR in NONE*) PKGTEXDIR="\${prefix}/share/texmf/$PACKAGE" ;; esac AC_SUBST([PKGTEXDIR]) ### Parent location of installed .mod files ### To be used in Fortran source FMODDIR=$prefix/lib/mod AC_SUBST([FMODDIR]) ### To be used in Makefile.am ### Don't use ${libdir} since lib may be changed to lib64 by configure fmoddir="\${prefix}/lib/mod" AC_SUBST([fmoddir]) ######################################################################## ###--------------------------------------------------------------------- ### Required programs and checks ### GNU Tools WO_CONFIGURE_SECTION([Generic tools]) ### Initialize LIBTOOL LT_INIT(dlopen) LT_PREREQ([2.4.1b]) AX_CHECK_GNU_MAKE() AC_PROG_GREP() AC_MSG_CHECKING([for the suffix of shared libraries]) case $host in *-darwin* | rhapsody*) SHRLIB_EXT="dylib" ;; cygwin* | mingw* | pw32* | cegcc* | os2*) SHRLIB_EXT="dll" ;; hpux9* | hpux10* | hpux11*) SHRLIB_EXT="sl" ;; *) SHRLIB_EXT="so" ;; esac if test "x$SHRLIB_EXT" != "x"; then SHRLIB_EXT=$SHRLIB_EXT else SHRLIB_EXT="so" fi AC_MSG_RESULT([.$SHRLIB_EXT]) AC_SUBST(SHRLIB_EXT) ### Export whether the C compiler is GNU AC_MSG_CHECKING([whether the C compiler is the GNU compiler]) if test "x$ac_cv_c_compiler_gnu" = "xyes"; then CC_IS_GNU=".true." else CC_IS_GNU=".false." fi AC_MSG_RESULT([$ac_cv_c_compiler_gnu]) AC_SUBST([CC_IS_GNU]) AC_CHECK_HEADERS([quadmath.h]) if test "x$ac_cv_header_quadmath_h" = "xyes"; then CC_HAS_QUADMATH=".true." else CC_HAS_QUADMATH=".false." fi AC_SUBST([CC_HAS_QUADMATH]) ######################################################################## ###--------------------------------------------------------------------- ### Host system MAC OS X check for XCode case $host in *-darwin*) WO_HLINE() AC_MSG_NOTICE([Host is $host, checking for XCode]) AC_PATH_PROG(XCODE_SELECT, xcode-select) # locate currently selected Xcode path if test "x$XCODE_SELECT" != "x"; then AC_MSG_CHECKING(Xcode location) DEVELOPER_DIR=`$XCODE_SELECT -print-path` AC_MSG_RESULT([$DEVELOPER_DIR]) else DEVELOPER_DIR=/Developer fi AC_SUBST(DEVELOPER_DIR) XCODEPLIST=$DEVELOPER_DIR/Applications/Xcode.app/Contents/version.plist if test -r "$XCODEPLIST"; then AC_MSG_CHECKING(Xcode version) if test "x$DEFAULTS" != "x"; then XCODE_VERSION=`$DEFAULTS read $DEVELOPER_DIR/Applications/Xcode.app/Contents/version CFBundleShortVersionString` else XCODE_VERSION=`tr -d '\r\n' < $XCODEPLIST | sed -e 's/.*CFBundleShortVersionString<\/key>.\([[0-9.]]*\)<\/string>.*/\1/'` fi AC_MSG_RESULT([$XCODE_VERSION]) AC_SUBST(XCODE_VERSION) fi AC_MSG_NOTICE([checking for Security Integrity Protocol (SIP)]) AC_PATH_PROG(CSRUTIL, csrutil) if test "x$CSRUTIL" != "x"; then SIP_CHECK=`$CSRUTIL status | $SED "s/System Integrity Protection status: //"` if test "$SIP_CHECK" = "enabled."; then SIP_ACTIVE="yes" else SIP_ACTIVE="no" fi else SIP_ACTIVE="no" fi AC_MSG_CHECKING([Checking whether MAC OS X SIP is activated]) AC_MSG_RESULT([$SIP_ACTIVE]) AC_SUBST([SIP_ACTIVE]) WO_HLINE() ;; *) ;; esac ######################################################################## ###--------------------------------------------------------------------- ### Enable the distribution tools ### (default: disabled, to speed up compilation) AC_ARG_ENABLE([distribution], [AS_HELP_STRING([--enable-distribution], [build the distribution incl. all docu (developers only) [[no]]])]) AC_CACHE_CHECK([whether we want to build the distribution], [wo_cv_distribution], [dnl if test "$enable_distribution" = "yes"; then wo_cv_distribution=yes else wo_cv_distribution=no fi]) AM_CONDITIONAL([DISTRIBUTION], [test "$enable_distribution" = "yes"]) ### ONLY_FULL {{{ ######################################################################## ###--------------------------------------------------------------------- if test "$enable_shared" = no; then AC_MSG_ERROR([you've used --disable-shared which will not produce a working Whizard.]) fi ### ONLY_FULL }}} ######################################################################## ###--------------------------------------------------------------------- ### We include the m4 macro tool here AC_PATH_PROG(M4,m4,false) if test "$M4" = false; then AM_CONDITIONAL([M4_AVAILABLE],[false]) else AM_CONDITIONAL([M4_AVAILABLE],[true]) fi ######################################################################## ###--------------------------------------------------------------------- ### Dynamic runtime linking WO_CONFIGURE_SECTION([Dynamic runtime linking]) ### Look for libdl (should provide 'dlopen' and friends) AC_PROG_CC() WO_PROG_DL() ### Define the conditional for static builds if test "$enable_static" = yes; then AM_CONDITIONAL([STATIC_AVAILABLE],[true]) else AM_CONDITIONAL([STATIC_AVAILABLE],[false]) fi ######################################################################## ###--------------------------------------------------------------------- ### Noweb WO_CONFIGURE_SECTION([Checks for 'noweb' system]) ### Enable/disable noweb and determine locations of notangle, cpif, noweave WO_PROG_NOWEB() ######################################################################## ###--------------------------------------------------------------------- ### LaTeX WO_CONFIGURE_SECTION([Checks for 'LaTeX' system]) ### Determine whether LaTeX is present AC_PROG_LATEX() AC_PROG_DVIPS() AC_PROG_PDFLATEX() AC_PROG_MAKEINDEX() AC_PROG_PS2PDF() AC_PROG_EPSPDF() AC_PROG_EPSTOPDF() if test "$EPSPDF" = "no" -a "$EPSTOPDF" = "no"; then AC_MSG_NOTICE([*********************************************************]) AC_MSG_NOTICE([WARNING: eps(to)pdf n/a; O'Mega documentation will crash!]) AC_MSG_NOTICE([WARNING: this applies only to the svn developer version!]) AC_MSG_NOTICE([*********************************************************]) fi AC_PROG_SUPP_PDF() AC_PROG_GZIP() AC_PATH_PROG(ACROREAD,acroread,false) AC_PATH_PROG(GHOSTVIEW,gv ghostview,false) AC_PROG_DOT() ### Determine whether Metapost is present and whether event display is possible AC_PROG_MPOST() WO_CHECK_EVENT_ANALYSIS_METHODS() ### We put here the check for HEVEA components as well WO_PROG_HEVEA() ######################################################################## ###--------------------------------------------------------------------- ### Fortran compiler WO_CONFIGURE_SECTION([Fortran compiler checks]) ### Determine default compiler to use user_FCFLAGS="${FCFLAGS}" AC_PROG_FC() ### Choose FC standard for PYTHIA6 F77 files AC_PROG_F77([$FC]) ### Determine compiler vendor and version WO_FC_GET_VENDOR_AND_VERSION() ### Veto against old gfortran 4 versions WO_FC_VETO_GFORTRAN_4() ### Veto against buggy gfortran 6.5.0 version WO_FC_VETO_GFORTRAN_65() ### Veto against ifort 15/16/17 WO_FC_VETO_IFORT_15_18() ### Veto against ifort 19.0.0/1/2 WO_FC_VETO_IFORT_190012() ### Require extension '.f90' for all compiler checks AC_FC_SRCEXT([f90]) ### Determine flags and extensions WO_FC_PARAMETERS() ### Determine flags for linking the Fortran runtime library WO_FC_LIBRARY_LDFLAGS() ### Check for Fortran 95 features WO_FC_CHECK_F95() ### Check for allocatable subobjects (TR15581) WO_FC_CHECK_TR15581() ### Check for allocatable scalars WO_FC_CHECK_ALLOCATABLE_SCALARS() ### Check for ISO C binding support WO_FC_CHECK_C_BINDING() ### Check for procedures pointers and abstract interfaces WO_FC_CHECK_PROCEDURE_POINTERS() ### Check for type extension and further OO features WO_FC_CHECK_OO_FEATURES() ### Check for submodules (not yet used) WO_FC_CHECK_TR19767() ### Check for F2003 command-line interface WO_FC_CHECK_CMDLINE() ### Check for F2003-style access to environment variables WO_FC_CHECK_ENVVAR() ### Check for the flush statement WO_FC_CHECK_FLUSH() ### Check for iso_fortran_env WO_FC_CHECK_ISO_FORTRAN_ENV() WO_FC_CHECK_ISO_FORTRAN_ENV_2008() ### Turn on/off master switch for debugging features WO_FC_SET_DEBUG() ### OpenMP threading activated upon request AC_OPENMP() WO_FC_SET_OPENMP() ### Profiling compilation enforced upon request WO_FC_SET_PROFILING() ### Impure subroutines enforced upon request WO_FC_SET_OMEGA_IMPURE() ### Find the extension of Fortran module files WO_FC_MODULE_FILE([FC_MODULE_NAME], [FCMOD], [$FC], [f90]) ###--------------------------------------------------------------------- ### Check for the requested precision WO_FC_CONFIGURE_KINDS([src/basics/kinds.f90]) ### ONLY_FULL {{{ AC_PROG_INSTALL() ${INSTALL} -d circe1/src cp -a src/basics/kinds.f90 circe1/src ${INSTALL} -d circe2/src cp -a src/basics/kinds.f90 circe2/src ${INSTALL} -d omega/src cp -a src/basics/kinds.f90 omega/src ${INSTALL} -d vamp/src cp -a src/basics/kinds.f90 vamp/src ### ONLY_FULL }}} ### ONLY_VAMP_AND_FULL {{{ ######################################################################## # VAMP Fortran options for the configure script ######################################################################## WO_FC_SET_MPI() ### ONLY_VAMP_AND_FULL }}} ######################################################################## ###--------------------------------------------------------------------- ### O'Caml WO_CONFIGURE_SECTION([Objective Caml checks]) ### Check for ocamlc and its relatives AC_PROG_OCAML() if test "$enable_ocaml" != "no"; then AC_OCAML_VERSION_CHECK(402003) AC_PROG_OCAMLLEX() AC_PROG_OCAMLYACC() AC_PROG_OCAMLCP() AC_OCAML_BIGARRAY_MODULE() ### Ocamlweb is required to be newer than v0.9 AC_PROG_OCAMLWEB(009000) AC_PROG_OCAML_LABLGTK() AC_PATH_PROGS([OCAMLDOT],[ocamldot],[no]) AM_CONDITIONAL([OCAMLDOT_AVAILABLE],[test "$OCAMLDOT" != "no"]) AC_PATH_PROGS([OCAMLDEP],[ocamldep],[no]) AM_CONDITIONAL([OCAMLDEP_AVAILABLE],[test "$OCAMLDEP" != "no"]) AC_PATH_PROGS([OCAMLDEFUN],[ocamldefun],[no]) else AC_MSG_NOTICE([WARNING: O'Caml and O'Mega matrix elements disabled by request!]) AM_CONDITIONAL([OCAMLWEB_AVAILABLE],[false]) AM_CONDITIONAL([OCAMLDOT_AVAILABLE],[false]) AM_CONDITIONAL([OCAMLDEP_AVAILABLE],[false]) fi ######################################################################## ###--------------------------------------------------------------------- ### C++ WO_CONFIGURE_SECTION([C++ compiler checks]) AC_PROG_CXX() AC_CXX_LIBRARY_LDFLAGS() ######################################################################## ###--------------------------------------------------------------------- ### Checks for external interfaces WO_CONFIGURE_SECTION([Checking for PYTHON / PYTHON API]) AX_PYTHON_DEVEL([>= '2.7']) WO_PROG_PYTHON_API() ### ONLY_OMEGA_AND_FULL {{{ ######################################################################## # O'Mega options for the configure script ######################################################################## ######################################################################## ###--------------------------------------------------------------------- ### O'Mega UFO file paths WO_CONFIGURE_SECTION([O'Mega UFO file paths]) AC_ARG_ENABLE([default-UFO-dir], [ --enable-default-UFO-dir=directory Read precomputed model tables from this directory, which will be populated by an administrator at install time [[default=$datadir/UFO, enabled]].], [case "$enableval" in no) OMEGA_DEFAULT_UFO_DIR="." ;; *) OMEGA_DEFAULT_UFO_DIR="$enableval" ;; esac], [### use eval b/c $datadir defaults to unexpanded ${datarootdir} case "$OMEGA_DEFAULT_UFO_DIR" in "") OMEGA_DEFAULT_UFO_DIR="${prefix}/omega/share/UFO" ;; *) eval OMEGA_DEFAULT_UFO_DIR="$datadir/UFO" ;; esac]) AC_SUBST([OMEGA_DEFAULT_UFO_DIR]) case "$OMEGA_DEFAULT_UFO_DIR" in .|""|NONE*) OMEGA_DEFAULT_UFO_DIR="." ;; *) AC_MSG_NOTICE([Creating default UFO directory $OMEGA_DEFAULT_UFO_DIR]) $MKDIR_P "$OMEGA_DEFAULT_UFO_DIR" 2>/dev/null chmod u+w "$OMEGA_DEFAULT_UFO_DIR" 2>/dev/null ;; esac ###--------------------------------------------------------------------- ### Recola WO_CONFIGURE_SECTION([RECOLA]) WO_PROG_RECOLA() ### ONLY_OMEGA_AND_FULL }}} ### ONLY_FULL {{{ ######################################################################## ###--------------------------------------------------------------------- ### Libraries ###--------------------------------------------------------------------- ### LHAPDF WO_CONFIGURE_SECTION([LHAPDF]) WO_PROG_LHAPDF() ###--------------------------------------------------------------------- ### ROOT WO_CONFIGURE_SECTION([ROOT]) WO_ROOT_PATH(,[ AC_DEFINE([HAVE_ROOT],,[Root library]) AC_CHECK_LIB([dl],[dlopen],[],AC_MSG_WARN([Root libraries not linking properly])) ],AC_MSG_RESULT([The ROOT support of HepMC might not be working properly])) ###--------------------------------------------------------------------- ### HepMC WO_CONFIGURE_SECTION([HepMC]) WO_PROG_HEPMC() ###--------------------------------------------------------------------- ### STDHEP WO_CONFIGURE_SECTION([STDHEP]) WO_PROG_TIRPC() AC_MSG_NOTICE([StdHEP v5.06.01 is included internally]) ###--------------------------------------------------------------------- ### LCIO WO_CONFIGURE_SECTION([LCIO]) WO_PROG_LCIO() ###--------------------------------------------------------------------- +### HDF5 (for events, grids etc.) + +WO_CONFIGURE_SECTION([HDF5]) + +WO_PROG_HDF5(1.8.0,no) + +###--------------------------------------------------------------------- ### PYTHIA6, PYTHIA8 etc WO_CONFIGURE_SECTION([SHOWERS PYTHIA6 PYTHIA8 MPI]) WO_PROG_QCD() WO_PROG_PYTHIA8() ###--------------------------------------------------------------------- ### HOPPET WO_CONFIGURE_SECTION([HOPPET]) WO_PROG_HOPPET() ###--------------------------------------------------------------------- ### FASTJET WO_CONFIGURE_SECTION([FASTJET]) WO_PROG_FASTJET() ###--------------------------------------------------------------------- ### GoSam WO_CONFIGURE_SECTION([GOSAM]) WO_PROG_GOSAM() ###--------------------------------------------------------------------- ### OpenLoops WO_CONFIGURE_SECTION([OPENLOOPS]) WO_PROG_OPENLOOPS() ###--------------------------------------------------------------------- ### LoopTools WO_CONFIGURE_SECTION([LOOPTOOLS]) WO_PROG_LOOPTOOLS() ### ONLY_FULL }}} ######################################################################## ###--------------------------------------------------------------------- ### Extra flags for helping the linker finding libraries WO_CONFIGURE_SECTION([Handle linking with C++ libraries]) WO_PROG_STDCPP() ### ONLY_FULL {{{ ######################################################################## ###--------------------------------------------------------------------- ### Miscellaneous WO_CONFIGURE_SECTION([Numerical checks]) ### Disable irrelevant optimization for parameter files ### (default: disabled, to speed up compilation) AC_ARG_ENABLE([optimization-for-parameter-files], [AS_HELP_STRING([--enable-optimization-for-parameter-files], [enable (useless) optimization for parameter files [[no]]])]) AC_CACHE_CHECK([whether we want optimization for parameter files], [wo_cv_optimization_for_parfiles], [dnl if test "$enable_optimization_for_parameter_files" = "yes"; then wo_cv_optimization_for_parfiles=yes else wo_cv_optimization_for_parfiles=no fi]) AM_CONDITIONAL([OPTIMIZATION_FOR_PARFILES], [test "$enable_optimization_for_parameter_files" = "yes"]) ### ONLY_FULL }}} ######################################################################## ###--------------------------------------------------------------------- ### Wrapup WO_CONFIGURE_SECTION([Finalize configuration]) ### Main directory AC_CONFIG_FILES([Makefile]) ### ONLY_FULL {{{ ###--------------------------------------------------------------------- ### Subdirectory src AC_CONFIG_FILES([src/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory python: WHIZARD's PYTHON/CYTHON interface AC_CONFIG_FILES([python/Makefile]) AC_CONFIG_FILES([python/setup.py], [chmod u+x python/setup.py]) AC_CONFIG_LINKS([python/whizard_python.pyx:python/whizard_python.pyx]) AC_CONFIG_LINKS([python/cwhizard.pxd:python/cwhizard.pxd]) ###--------------------------------------------------------------------- ### Subdirectory src/hepmc AC_CONFIG_FILES([src/hepmc/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/lcio AC_CONFIG_FILES([src/lcio/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory pythia6: WHIZARD's internal PYTHIA6 version AC_CONFIG_FILES([pythia6/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory tauola: WHIZARD's internal TAUOLA version AC_CONFIG_FILES([tauola/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory stdhep: WHIZARD's internal StdHep version AC_CONFIG_FILES([mcfio/Makefile]) AC_CONFIG_FILES([stdhep/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/muli: multiple interactions AC_CONFIG_FILES([src/muli/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/lhapdf5: dummy library as LHAPDF5 replacement AC_CONFIG_FILES([src/lhapdf5/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/lhapdf: LHAPDF v6 AC_CONFIG_FILES([src/lhapdf/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/pdf_builtin: Builtin PDFs AC_CONFIG_FILES([src/pdf_builtin/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/pdf_builtin: Electron PDFs AC_CONFIG_FILES([src/qed_pdf/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/tauola AC_CONFIG_FILES([src/tauola/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/xdr: XDR reader AC_CONFIG_FILES([src/xdr/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/hoppet AC_CONFIG_FILES([src/hoppet/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/fastjet AC_CONFIG_FILES([src/fastjet/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/looptools AC_CONFIG_FILES([src/looptools/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/shower: shower and all that AC_CONFIG_FILES([src/pythia8/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/shower: shower and all that AC_CONFIG_FILES([src/shower/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/noweb-frame: frame for whizard Noweb sources AC_CONFIG_FILES([src/noweb-frame/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/basics: numeric kinds, strings AC_CONFIG_FILES([src/basics/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/utilities: simple utilities AC_CONFIG_FILES([src/utilities/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/testing: unit-test support AC_CONFIG_FILES([src/testing/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/system: modules related to local setup and OS issues AC_CONFIG_FILES([src/system/Makefile]) AC_CONFIG_FILES([src/system/system_dependencies.f90], [ maxlen=70 i=1 pat="" while test ${i} -lt ${maxlen}; do pat="${pat}."; i=`expr ${i} + 1`; done pat=${pat}[[^\"]] pat="/^ \"${pat}/ s/${pat}/&\&\\ \&/g" $SED "${pat}" < src/system/system_dependencies.f90 > \ src/system/system_dependencies.tmp mv -f src/system/system_dependencies.tmp src/system/system_dependencies.f90 ]) AC_CONFIG_FILES([src/system/debug_master.f90]) ###--------------------------------------------------------------------- ### Subdirectory src/combinatorics: standard algorithms AC_CONFIG_FILES([src/combinatorics/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/parsing: text-handling and parsing AC_CONFIG_FILES([src/parsing/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/rng: random-number generation AC_CONFIG_FILES([src/rng/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/expr_base: abstract expressions AC_CONFIG_FILES([src/expr_base/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/physics: particle-physics related functions AC_CONFIG_FILES([src/physics/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/qft: quantum (field) theory concepts as data types AC_CONFIG_FILES([src/qft/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/types: HEP and other types for common use AC_CONFIG_FILES([src/types/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/matrix_elements: process code and libraries AC_CONFIG_FILES([src/matrix_elements/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/me_methods: specific process code and interface AC_CONFIG_FILES([src/me_methods/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/particles: particle objects AC_CONFIG_FILES([src/particles/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/beams: beams and beam structure AC_CONFIG_FILES([src/beams/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/events: generic events and event I/O AC_CONFIG_FILES([src/events/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/vegas: VEGAS Monte Carlo adaptive integration AC_CONFIG_FILES([src/vegas/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/mci: multi-channel integration and event generation AC_CONFIG_FILES([src/mci/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/phase_space: parameterization and evaluation AC_CONFIG_FILES([src/phase_space/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/blha: BLHA support (NLO data record) AC_CONFIG_FILES([src/blha/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/gosam: GoSAM support (NLO amplitudes) AC_CONFIG_FILES([src/gosam/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/openloops: OpenLoops support (NLO amplitudes) AC_CONFIG_FILES([src/openloops/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/recola: Recola support (NLO amplitudes) AC_CONFIG_FILES([src/recola/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/fks: FKS subtraction algorithm AC_CONFIG_FILES([src/fks/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/matching: matching algorithms AC_CONFIG_FILES([src/matching/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/variables: Implementation of variable lists AC_CONFIG_FILES([src/variables/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/model_features: Model access and methods AC_CONFIG_FILES([src/model_features/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/models: Model-specific code AC_CONFIG_FILES([src/models/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/threshold AC_CONFIG_FILES([src/threshold/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/models/threeshl_bundle AC_CONFIG_FILES([src/models/threeshl_bundle/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/process_integration AC_CONFIG_FILES([src/process_integration/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/transforms: event transforms and event API AC_CONFIG_FILES([src/transforms/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/whizard-core AC_CONFIG_FILES([src/whizard-core/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/api AC_CONFIG_FILES([src/api/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/main AC_CONFIG_FILES([src/main/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/prebuilt AC_CONFIG_FILES([src/prebuilt/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/feynmf AC_CONFIG_FILES([src/feynmf/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory src/gamelan: WHIZARD graphics package AC_CONFIG_FILES([src/gamelan/Makefile]) AC_CONFIG_FILES([src/gamelan/whizard-gml], [chmod u+x src/gamelan/whizard-gml]) ###--------------------------------------------------------------------- ### Subdirectory share AC_CONFIG_FILES([share/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/doc AC_CONFIG_FILES([share/doc/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/models AC_CONFIG_FILES([share/models/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/cuts AC_CONFIG_FILES([share/cuts/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/beam-sim AC_CONFIG_FILES([share/beam-sim/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/susy AC_CONFIG_FILES([share/susy/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/examples AC_CONFIG_FILES([share/examples/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/tests AC_CONFIG_FILES([share/tests/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/muli AC_CONFIG_FILES([share/muli/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/SM_tt_threshold_data AC_CONFIG_FILES([share/SM_tt_threshold_data/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory share/gui AC_CONFIG_FILES([share/gui/Makefile]) ###--------------------------------------------------------------------- ### Subdirectory tests AC_CONFIG_FILES([tests/Makefile]) AC_CONFIG_FILES([tests/models/Makefile]) AC_CONFIG_FILES([tests/models/UFO/Makefile]) AC_CONFIG_FILES([tests/models/UFO/SM/Makefile]) AC_CONFIG_FILES([tests/models/UFO/MSSM/Makefile]) AC_CONFIG_FILES([tests/unit_tests/Makefile]) AC_CONFIG_FILES([tests/functional_tests/Makefile]) AC_CONFIG_FILES([tests/ext_tests_mssm/Makefile]) AC_CONFIG_FILES([tests/ext_tests_nmssm/Makefile]) AC_CONFIG_FILES([tests/ext_tests_ilc/Makefile]) AC_CONFIG_FILES([tests/ext_tests_shower/Makefile]) AC_CONFIG_FILES([tests/ext_tests_nlo/Makefile]) AC_CONFIG_FILES([tests/ext_tests_nlo_add/Makefile]) AC_CONFIG_FILES([tests/unit_tests/run_whizard_ut.sh], [chmod u+x tests/unit_tests/run_whizard_ut.sh]) AC_CONFIG_FILES([tests/unit_tests/run_whizard_ut_c.sh], [chmod u+x tests/unit_tests/run_whizard_ut_c.sh]) AC_CONFIG_FILES([tests/unit_tests/run_whizard_ut_cc.sh], [chmod u+x tests/unit_tests/run_whizard_ut_cc.sh]) AC_CONFIG_FILES([tests/functional_tests/run_whizard.sh], [chmod u+x tests/functional_tests/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_mssm/run_whizard.sh], [chmod u+x tests/ext_tests_mssm/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_nmssm/run_whizard.sh], [chmod u+x tests/ext_tests_nmssm/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_ilc/run_whizard.sh], [chmod u+x tests/ext_tests_ilc/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_shower/run_whizard.sh], [chmod u+x tests/ext_tests_shower/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_nlo/run_whizard.sh], [chmod u+x tests/ext_tests_nlo/run_whizard.sh]) AC_CONFIG_FILES([tests/ext_tests_nlo_add/run_whizard.sh], [chmod u+x tests/ext_tests_nlo_add/run_whizard.sh]) ###-------------------------------------------------------------------- ### Subdirectory scripts AC_CONFIG_FILES([scripts/Makefile]) AC_CONFIG_FILES([scripts/whizard-config], [chmod u+x scripts/whizard-config]) AC_CONFIG_FILES([scripts/whizard-setup.sh], [chmod u+x scripts/whizard-setup.sh]) AC_CONFIG_FILES([scripts/whizard-setup.csh], [chmod u+x scripts/whizard-setup.csh]) ### ONLY_FULL }}} ### ONLY_CIRCE1_AND_FULL {{{ ###-------------------------------------------------------------------- ### CIRCE1 subdirectory files AC_CONFIG_FILES([circe1/Makefile]) AC_CONFIG_FILES([circe1/src/Makefile]) AC_CONFIG_FILES([circe1/minuit/Makefile]) AC_CONFIG_FILES([circe1/tools/Makefile]) AC_CONFIG_FILES([circe1/share/Makefile]) AC_CONFIG_FILES([circe1/share/data/Makefile]) AC_CONFIG_FILES([circe1/share/doc/Makefile]) ### ONLY_CIRCE1_AND_FULL }}} ### ONLY_CIRCE2_AND_FULL {{{ ###-------------------------------------------------------------------- ### CIRCE2 subdirectory files AC_CONFIG_FILES([circe2/Makefile]) AC_CONFIG_FILES([circe2/src/Makefile]) AC_CONFIG_FILES([circe2/share/Makefile]) AC_CONFIG_FILES([circe2/share/doc/Makefile]) AC_CONFIG_FILES([circe2/share/examples/Makefile]) AC_CONFIG_FILES([circe2/share/data/Makefile]) AC_CONFIG_FILES([circe2/share/tests/Makefile]) AC_CONFIG_FILES([circe2/tests/Makefile]) AC_CONFIG_FILES([circe2/tests/test_wrapper.sh], [chmod u+x circe2/tests/test_wrapper.sh]) AC_CONFIG_FILES([circe2/tests/circe2_tool.sh], [chmod u+x circe2/tests/circe2_tool.sh]) AC_CONFIG_FILES([circe2/tests/generate.sh], [chmod u+x circe2/tests/generate.sh]) ### ONLY_CIRCE2_AND_FULL }}} ### ONLY_OMEGA_AND_FULL {{{ ###-------------------------------------------------------------------- ### OMEGA subdirectory files AC_CONFIG_FILES([omega/Makefile]) AC_CONFIG_FILES([omega/bin/Makefile]) AC_CONFIG_FILES([omega/lib/Makefile]) AC_CONFIG_FILES([omega/models/Makefile]) AC_CONFIG_FILES([omega/src/Makefile]) AC_CONFIG_FILES([omega/share/Makefile]) AC_CONFIG_FILES([omega/share/doc/Makefile]) AC_CONFIG_FILES([omega/extensions/Makefile]) AC_CONFIG_FILES([omega/extensions/people/Makefile]) AC_CONFIG_FILES([omega/extensions/people/jr/Makefile]) AC_CONFIG_FILES([omega/extensions/people/tho/Makefile]) AC_CONFIG_FILES([omega/tests/Makefile]) AC_CONFIG_FILES([omega/tests/UFO/Makefile]) AC_CONFIG_FILES([omega/tests/UFO/SM/Makefile]) AC_CONFIG_FILES([omega/tests/UFO/MSSM/Makefile]) AC_CONFIG_FILES([omega/tools/Makefile]) AC_CONFIG_FILES([omega/scripts/Makefile]) AC_CONFIG_FILES([omega/scripts/omega-config], [chmod u+x omega/scripts/omega-config]) # Copy config.mli to the build directory (otherwise ocamlc and/or # ocamlopt would create one on their own). ###-------------------------------------------------------------------- AC_CONFIG_FILES([omega/src/config.ml]) case "$srcdir" in .) ;; *) $MKDIR_P ./omega/src rm -f ./omega/src/config.mli cp $srcdir/omega/src/config.mli ./omega/src/config.mli 1>/dev/null 2>&1;; esac ###-------------------------------------------------------------------- ### ONLY_OMEGA_AND_FULL }}} ### ONLY_VAMP_AND_FULL {{{ ###-------------------------------------------------------------------- ### VAMP subdirectory files AC_CONFIG_FILES([vamp/Makefile]) AC_CONFIG_FILES([vamp/src/Makefile]) AC_CONFIG_FILES([vamp/share/Makefile]) AC_CONFIG_FILES([vamp/share/doc/Makefile]) AC_CONFIG_FILES([vamp/tests/Makefile]) ### ONLY_VAMP_AND_FULL }}} ######################################################################## ###--------------------------------------------------------------------- ### Final output AC_OUTPUT() ### ONLY_FULL {{{ ######################################################################## ###--------------------------------------------------------------------- ### Final output WO_SUMMARY() ### ONLY_FULL }}} ######################################################################## Index: trunk/m4/hdf5.m4 =================================================================== --- trunk/m4/hdf5.m4 (revision 0) +++ trunk/m4/hdf5.m4 (revision 8475) @@ -0,0 +1,233 @@ +dnl hdf5.m4 -- Check for HDF5 library +dnl + +# ------------------------------------------------------------- +# Hdf5 library +# ------------------------------------------------------------- +## Provides a --with-hdf5=DIR option and minimum version check for +## the HDF I/O library. Searches --with-hdf5, $HDF5DIR, and the +## usual places for HDF5 headers and libraries. +## +## On success, sets HDF5_CFLAGS, HDF5_LIBS, and #defines HAVE_HDF5. +## Assumes package is optional unless overridden with $2=yes. +## +AC_DEFUN([WO_PROG_HDF5], +[dnl + +AC_ARG_ENABLE([hdf5], + [AS_HELP_STRING([--enable-hdf5], + [build WHIZARD with HDF5 support [[yes]]])], + [], [enable_hdf5="yes"]) + +if test "x$enable_hdf5" = "xyes"; then + HAVE_HDF5=0 + AC_ARG_VAR(HDF5_DIR,[root directory of HDF5 installation]) + AC_ARG_WITH(hdf5, + [AS_HELP_STRING([--with-hdf5=DIR],[root directory of HDF5 installation (default = HDF5_DIR)])], + dnl action-if-given + [with_hdf5=$withval + if test "x${with_hdf5}" != "xyes"; then + HDF5_PREFIX=$withval + fi], + dnl action-if-not-given + [ + dnl This is "no" if the user did not specify --with-hdf5=foo + with_hdf5=$withval + dnl If $HDF5_DIR is set in the user's environment, then treat that + dnl as though they had said --with-hdf5=$HDF5_DIR. + if test "x${HDF5_DIR}" != "x"; then + HDF5_PREFIX=${HDF5_DIR} + with_hdf5=yes + fi]) + + dnl package requirement; if not specified, the default is to assume that + dnl the package is optional + + dnl GNU-m4 ifelse documentation: + dnl ifelse (string-1, string-2, equal, [not-equal]) + dnl If string-1 and string-2 are equal (character for character), + dnl expands to the string in 'equal', otherwise to the string in + dnl 'not-equal'. + is_package_required=ifelse([$2], ,no, $2) + + if test "x${with_hdf5}" != "xno"; then + if test -d "${HDF5_PREFIX}/lib"; then + HDF5_LIBS="-L${HDF5_PREFIX}/lib -lhdf5" + HDF5_FLIBS="-L${HDF5_PREFIX}/lib -lhdf5_fortran" + HDF5_CXXLIBS="-L${HDF5_PREFIX}/lib -lhdf5_cpp" + fi + dnl If there is an "rpath" flag detected, append it to the various + dnl LIBS vars. This avoids hard-coding -Wl,-rpath, in case that is + dnl not the right approach for some compilers. + fi + + if test "x$RPATHFLAG" != "x" && test -d "${HDF5_PREFIX}/lib"; then + HDF5_LIBS="${HDF5_LIBS} ${RPATHFLAG}${HDF5_PREFIX}/lib" + HDF5_FLIBS="${HDF5_FLIBS} ${RPATHFLAG}${HDF5_PREFIX}/lib" + HDF5_CXXLIBS="${HDF5_CXXLIBS} ${RPATHFLAG}${HDF5_PREFIX}/lib" + fi + + if test -d "${HDF5_PREFIX}/include"; then + HDF5_CPPFLAGS="-I${HDF5_PREFIX}/include" + fi + + wo_save_CFLAGS="$CFLAGS" + wo_save_CPPFLAGS="$CPPFLAGS" + wo_save_LDFLAGS="$LDFLAGS" + wo_save_LIBS="$LIBS" + + CFLAGS="${HDF5_CPPFLAGS} ${CFLAGS}" + CPPFLAGS="${HDF5_CPPFLAGS} ${CPPFLAGS}" + LDFLAGS="${HDF5_LIBS} ${LDFLAGS}" + + AC_LANG_PUSH([C]) + AC_CHECK_HEADER([hdf5.h],[found_header=yes],[found_header=no]) + + dnl ---------------------- + dnl Minimum version check + dnl ---------------------- + min_hdf5_version=ifelse([$1], ,1.8.0, $1) + AC_MSG_CHECKING([for HDF5 version >= $min_hdf5_version]) + + dnl Strip the major.minor.micro version numbers out of the min version string + MAJOR_VER=`echo $min_hdf5_version | sed -e 's/^\([[0-9]]*\).*/\1/'` + if test "x${MAJOR_VER}" = "x"; then + MAJOR_VER=0 + fi + MINOR_VER=`echo $min_hdf5_version | sed -e 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\2/'` + if test "x${MINOR_VER}" = "x"; then + MINOR_VER=0 + fi + MICRO_VER=`echo $min_hdf5_version | sed -e 's/^\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\)\.\{0,1\}\([[0-9]]*\).*/\3/'` + if test "x${MICRO_VER}" = "x"; then + MICRO_VER=0 + fi + + dnl begin additional test(s) if header if available + succeeded=no + version_known=no + + if test "x${found_header}" = "xyes"; then + min_version_succeeded=no + hdf5_has_cxx=no + + dnl Test that HDF5 version is greater than or equal to the required min version. + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + ]], [[ + @%:@if H5_VERS_MAJOR > $MAJOR_VER + /* Sweet nibblets */ + @%:@elif (H5_VERS_MAJOR >= $MAJOR_VER) && (H5_VERS_MINOR >= $MINOR_VER) && (H5_VERS_RELEASE >= $MICRO_VER) + /* Winner winner, chicken dinner */ + @%:@else + @%:@ error HDF5 version is too old + @%:@endif + printf("%i.%i.%i",H5_VERS_MAJOR, H5_VERS_MINOR, H5_VERS_RELEASE); + ]])],[ + min_version_succeeded=yes + version_known=yes + HDF5_VERSION=`./conftest` + ],[ + min_version_succeeded=no + version_known=no + ]) + if test "x$min_version_succeeded" = "xno"; then + AC_MSG_RESULT([no]) + if test "x$is_package_required" = "xyes"; then + AC_MSG_ERROR([Your HDF5 library version does not meet the minimum version requirement (HDF5 >= $min_hdf5_version). Please use --with-hdf5 to specify the location of a valid installation.]) + fi + else + AC_MSG_RESULT([yes]) + fi + dnl Check for -lhdf5 + AC_CHECK_LIB([hdf5],[H5Fopen],[found_library=yes],[found_library=no]) + + dnl Test for the HDF5 C++ interface by trying to link a test code. + AC_LANG_PUSH([C++]) + + AC_MSG_CHECKING([if HDF5 C++ interface is present]) + + dnl Using the C++ interface requires linking against both the C + dnl and C++ libs. + LIBS="${HDF5_LIBS} ${HDF5_CXXLIBS}" + + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ + @%:@include + @%:@ifndef H5_NO_NAMESPACE + using namespace H5; + @%:@endif + ]], [[ + H5std_string fname("test.h5"); + H5File file (fname, H5F_ACC_TRUNC); + ]])],[ + hdf5_has_cxx=yes + ],[ + hdf5_has_cxx=no + ]) + + AC_LANG_POP([C++]) + dnl Not having the C++ interface doesn't disqualify us from using + dnl the C interface. We'll set a define if C++ is available, so + dnl code can conditionally make use of it. + if test "x$hdf5_has_cxx" = "xyes"; then + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_HDF5_CXX, 1, [Define if the HDF5 C++ interface is available]) + else + AC_MSG_RESULT([no]) + fi + succeeded=no + if test "x$found_header" = "xyes" && test "x$min_version_succeeded" = "xyes" && test "x$found_library" = "xyes"; then + succeeded=yes + fi + else + AC_MSG_RESULT([no]) + fi + if test "$version_known" = "yes"; then + AC_MSG_CHECKING([the HDF5 version]) + AC_MSG_RESULT([$HDF5_VERSION]) + AC_SUBST([HDF5_VERSION]) + fi + + dnl Reset variables used by configure tests. + CFLAGS="$wo_save_CFLAGS" + CPPFLAGS="$wo_save_CPPFLAGS" + LDFLAGS="$wo_save_LDFLAGS" + LIBS="$wo_save_LIBS" + + if test "x$succeeded" = "xno"; then + if test "x$is_package_required" = "xyes"; then + AC_MSG_ERROR([HDF5 not found. Try either --with-hdf5 or setting HDF5_DIR.]) + else + AC_MSG_NOTICE([optional HDF5 library not found, or does not meet version requirements]) + fi + HDF5_CFLAGS="" + HDF5_CPPFLAGS="" + HDF5_LIBS="" + HDF5_FLIBS="" + HDF5_CXXLIBS="" + HDF5_PREFIX="" + else + HAVE_HDF5=1 + AC_DEFINE(HAVE_HDF5,1,[define if HDF5 is available]) + AC_SUBST(HDF5_CFLAGS) + AC_SUBST(HDF5_CPPFLAGS) + AC_SUBST(HDF5_LIBS) + AC_SUBST(HDF5_FLIBS) + AC_SUBST(HDF5_CXXLIBS) + AC_SUBST(HDF5_PREFIX) + fi + + AM_CONDITIONAL(HDF5_AVAILABLE,test x$HAVE_HDF5 = x1) + + HDF5_AVAILABLE_FLAG=$succeeded + AC_SUBST([HDF5_AVAILABLE_FLAG]) + + AC_MSG_CHECKING([for HDF5 support]) + if test "x$HAVE_HDF5" = "x0"; then + enable_hdf5=no + AC_MSG_RESULT([not found or disabled]) + else + AC_MSG_RESULT([yes]) + fi +fi +]) Index: trunk/m4/aux.m4 =================================================================== --- trunk/m4/aux.m4 (revision 8474) +++ trunk/m4/aux.m4 (revision 8475) @@ -1,345 +1,350 @@ dnl aux.m4 -- Auxiliary macros for WHIZARD's configure.ac dnl dnl Horizontal line for readability: AC_DEFUN([WO_HLINE], [AC_MSG_NOTICE([--------------------------------------------------------------])]) dnl Message at the beginning of a configure section AC_DEFUN([WO_CONFIGURE_SECTION], [WO_HLINE() AC_MSG_NOTICE([--- ]$1[ ---]) AC_MSG_NOTICE([]) ]) dnl Define a variable and export it dnl WO_SET(variable, value) AC_DEFUN([WO_SET], [$1=$2 AC_SUBST($1)]) dnl Add a list of names to the list of output or executable files dnl WO_OUTFILES(subdir, files) AC_DEFUN([WO_OUTFILES], [for file in $2; do OUTFILES="$OUTFILES $1/$file"; done]) dnl WO_EXECUTABLES(subdir, files) AC_DEFUN([WO_EXECUTABLES], [for file in $2; do OUTFILES="$OUTFILES $1/$file"; EXECUTABLES="$EXECUTABLES $1/$file" done]) dnl Add a list of names to the list of automake-controlled files AC_DEFUN([WO_AUTOMAKE], [for file in $2; do AUTOMAKEFILES="$AUTOMAKEFILES $1/$file"; done]) dnl This adds a package which resides in a subdirectory of 'src' dnl The `variable' is inserted into AC_SUBST; it will refer to enl the package subdirectory in Makefiles. The package dnl resides in src/XXX and and optionally has a Makefile (or similar). dnl WO_PACKAGE(variable, identifier [,Makefiles [,Executables]]) AC_DEFUN([WO_PACKAGE], [WO_SET($1,src/$2) ifelse($#, 3, [WO_OUTFILES($$1, $3) WO_AUTOMAKE($$1, $3)]) ifelse($#, 4, [WO_OUTFILES($$1, $3) WO_EXECUTABLES($$1, $4)]) ]) dnl This is like WO_PACKAGE, but it calls AC_ARG_ENABLE in addition. dnl If the package `id' is disabled or the 'file' is not found, dnl the variable `var' is set to "no". dnl WO_PACKAGE_ENABLE(var, id, help, file [,Makefiles [,Executables]]) AC_DEFUN([WO_PACKAGE_ENABLE], [AC_ARG_ENABLE($2,[$3]) if test "$enable_$2" = "no"; then AC_MSG_CHECKING([for src/$2/$4]) WO_SET($1, no) AC_MSG_RESULT([(disabled)]) else AC_CHECK_FILE(src/$2/$4, enable_$2=yes, enable_$2=no) if test "$enable_$2" = "no"; then WO_SET($1, no) else ifelse($#, 4, [WO_PACKAGE($1, $2)]) ifelse($#, 5, [WO_PACKAGE($1, $2, $5)]) ifelse($#, 6, [WO_PACKAGE($1, $2, $5, $6)]) fi fi ]) dnl The same, but disabled by default. dnl If the package `id' is disabled or the 'file' is not found, dnl the variable `var' is set to "no". dnl WO_PACKAGE_DISABLE(var, id, help, file [,Makefiles [,Executables]]) AC_DEFUN([WO_PACKAGE_DISABLE], [AC_ARG_ENABLE($2,[$3]) if test "$enable_$2" = "yes"; then AC_CHECK_FILE(src/$2/$4, enable_$2=yes, enable_$2=no) if test "$enable_$2" = "no"; then WO_SET($1, no) else ifelse($#, 4, [WO_PACKAGE($1, $2)]) ifelse($#, 5, [WO_PACKAGE($1, $2, $5)]) ifelse($#, 6, [WO_PACKAGE($1, $2, $5, $6)]) fi else enable_$2="no" AC_MSG_CHECKING([for src/$2/$4]) WO_SET($1, no) AC_MSG_RESULT([(disabled)]) fi ]) dnl Extension of AC_PATH_PROG: Search for libraries for which the name dnl is not exactly known (because it may have the version number in it) dnl Set output variables $var, $var_DIR, $var_LIB accordingly dnl WO_PATH_LIB(var, id, name-list, path) AC_DEFUN([WO_PATH_LIB], [AC_CACHE_CHECK(for $3, wo_cv_path_$1, [case "$$1" in /*) wo_cv_path_$1="$$1" # User-supplied path ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_dummy=$4 for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. unset wo_cv_path_$1 ac_pwd=`pwd` if test -d "$ac_dir"; then cd $ac_dir for ac_word in $3; do test -f "$ac_word" && wo_cv_path_$1="$ac_dir/$ac_word" done cd $ac_pwd fi if test -n "$wo_cv_path_$1"; then break fi done IFS="$ac_save_ifs" if test -z "$wo_cv_path_$1"; then wo_cv_path_$1="no" fi ;; esac ]) $1=$wo_cv_path_$1 if test "$$1" != "no"; then $1_DIR=`echo $$1 | sed -e 's|/lib$2.*\.a$||'` $1_LIB=`echo $$1 | sed -e 's|^.*/lib\($2.*\)\.a$|\1|'` fi AC_SUBST($1) AC_SUBST($1_DIR) AC_SUBST($1_LIB) ]) dnl WHIZARD summary AC_DEFUN([WO_SUMMARY],[dnl WO_VERSION=AC_PACKAGE_VERSION() function echo_summary () { echo "|=============================================================================|" echo "| |" echo "| WW WW WW WW WW WWWWWW WW WWWWW WWWW |" echo "| WW WW WW WW WW WW WW WWWW WW WW WW WW |" echo "| WW WW WW WW WWWWWWW WW WW WW WW WWWWW WW WW |" echo "| WWWW WWWW WW WW WW WW WWWWWWWW WW WW WW WW |" echo "| WW WW WW WW WW WWWWWW WW WW WW WW WWWW |" echo "| |" echo "| |" echo "| W |" echo "| sW |" echo "| WW |" echo "| sWW |" echo "| WWW |" echo "| wWWW |" echo "| wWWWW |" echo "| WW WW |" echo "| WW WW |" echo "| wWW WW |" echo "| wWW WW |" echo "| WW WW |" echo "| WW WW |" echo "| WW WW |" echo "| WW WW |" echo "| WW WW |" echo "| WW WW |" echo "| wwwwww WW WW |" echo "| WWWWWww WW WW |" echo "| WWWWWwwwww WW WW |" echo "| wWWWwwwwwWW WW |" echo "| wWWWWWWWWWWwWWW WW |" echo "| wWWWWW wW WWWWWWW |" echo "| WWWW wW WW wWWWWWWWwww |" echo "| WWWW wWWWWWWWwwww |" echo "| WWWW WWWW WWw |" echo "| WWWWww WWWW |" echo "| WWWwwww WWWW |" echo "| wWWWWwww wWWWWW |" echo "| WwwwwwwwwWWW |" echo "| |" echo "| |" echo "| |" echo "| by: Wolfgang Kilian, Thorsten Ohl, Juergen Reuter |" echo "| with contributions from Christian Speckner |" echo "| Contact: |" echo "| |" echo "| if you use WHIZARD please cite: |" echo "| W. Kilian, T. Ohl, J. Reuter, Eur.Phys.J.C71 (2011) 1742 |" echo "| @<:@arXiv: 0708.4233 @<:@hep-ph@:>@@:>@ |" echo "| M. Moretti, T. Ohl, J. Reuter, arXiv: hep-ph/0102195 |" echo "| |" echo "|=============================================================================|" echo "**************************************************************" echo "--------------------------------------------------------------" echo "--- AC_PACKAGE_NAME() CONFIGURATION SUMMARY ---" echo "**************************************************************" echo "Package name: AC_PACKAGE_NAME()" echo "Version: AC_PACKAGE_VERSION()" echo "Date: $PACKAGE_DATE" echo "Status: $PACKAGE_STATUS" echo "**************************************************************" echo "--- Compilers ---" echo "--------------------------------------------------------------" echo "Fortran compiler: --- $FC_VENDOR ---" echo " Version: --- $FC_VERSION ---" echo " Flags: --- $FCFLAGS ---" echo " float precision: --- $FC_PRECISION ---" if test "$FC_DEBUG_ON" = ".true."; then echo " debug features: --- on ---" else echo " debug features: --- off ---" fi if test "$FC_OPENMP_OFF" = "!" ; then echo " OpenMP: --- on with max. $FC_OPENMP_DEFAULT_MAX_THREADS threads" elif test "$FC_OPENMP_ON" = "!" ; then echo " OpenMP: --- off ---" fi if test "$MPI_AVAILABLE" = "yes" ; then echo " MPI: --- on ---" echo " MPI Library: --- $MPI_LIBRARY, v$MPI_VERSION ---" else echo " MPI: --- off ---" fi echo "--------------------------------------------------------------" echo " OCaml compiler: --- $OCAMLOPT ---" echo " Version: --- $OCAMLVERSION ---" echo " Flags: --- $OCAMLFLAGS ---" echo "--------------------------------------------------------------" echo " C++ compiler: --- $CXX --- @<:@interfaces only@:>@" echo " Flags: --- $CXXFLAGS ---" echo "--------------------------------------------------------------" echo " Python compiler: --- $PYTHON --- @<:@interfaces only@:>@" echo " Version: --- $PYTHON_FULL_VERSION ---" echo "**************************************************************" echo "--- Internal and shipped packages ---" echo "--------------------------------------------------------------" echo "VAMP (multi-channel adapative integrator) : yes, v$WO_VERSION" if test "$OCAMLOPT" != "no" ; then echo "O'Mega (matrix element generator) : yes, v$WO_VERSION" else echo "O'Mega (matrix element generator) : no" fi echo "CIRCE1 (lepton beam spectra, parameterized): yes, v$WO_VERSION" echo "CIRCE2 (lepton beam spectra, sampled) : yes, v$WO_VERSION" if test "$OCAMLOPT" != "no" ; then echo " incl. tools for generating new spectra : yes" else echo " incl. tools for generating new spectra : no" fi echo "--------------------------------------------------------------" if test "$PYTHIA6_AVAILABLE_FLAG" = ".true." ; then echo "PYTHIA6 (parton showering & hadronization) : yes, v6.427" if test "$PYTHIA6_EH_AVAILABLE_FLAG" = "yes" ; then echo " (settings for eh collisions) : yes" else echo " (settings for eh collisions) : no" fi echo "TAUOLA (tau decays) : yes" else echo "PYTHIA6 (parton showering & hadronization) : no" echo "TAUOLA (tau decays) : no" fi echo "StdHEP (event format) : yes, v5.06.01" echo "--------------------------------------------------------------" echo "--- External packages ---" echo "--------------------------------------------------------------" if test "$HEPMC_AVAILABLE_FLAG" = "yes" ; then echo "HepMC (event format): yes, v$HEPMC_VERSION" else echo "HepMC (event format): no" fi +if test "$HDF5_AVAILABLE_FLAG" = "yes" ; then + echo "HDF5 (binary format): yes, v$HDF5_VERSION" +else + echo "HDF5 (binary format): no" +fi if test "$LCIO_AVAILABLE_FLAG" = "yes" ; then echo "LCIO (event format) : yes, v$LCIO_VERSION" else echo "LCIO (event format) : no" fi if test "$LHAPDF5_AVAILABLE_FLAG" = ".true." ; then echo "LHAPDF (PDF sets) : yes, v$LHAPDF_FULL_VERSION" elif test "$LHAPDF6_AVAILABLE_FLAG" = ".true." ; then echo "LHAPDF (PDF sets) : yes, v$LHAPDF_FULL_VERSION" echo " PDF set path: $LHAPDF_PDFSETS_PATH" else echo "LHAPDF (PDF sets) : no" fi if test "$HOPPET_AVAILABLE_FLAG" = ".true." ; then echo "HOPPET (PDF match.) : yes, v$HOPPET_VERSION" else echo "HOPPET (PDF match.) : no" fi if test "$FASTJET_AVAILABLE_FLAG" = "yes" ; then echo "FastJet (clustering): yes, v$FASTJET_VERSION" else echo "FastJet (clustering): no" fi if test "$PYTHIA8_AVAILABLE_FLAG" = ".true." ; then echo "PYTHIA8 (QCD) : yes, v$PYTHIA8_VERSION" else echo "PYTHIA8 (QCD) : no" fi if test "$GOSAM_AVAILABLE_FLAG" = ".true." ; then echo "GoSam (OLP) : yes, v$GOSAM_VERSION" else echo "GoSam (OLP) : no" fi if test "$OPENLOOPS_AVAILABLE_FLAG" = ".true." ; then echo "OpenLoops (OLP) : yes, v$OPENLOOPS_VERSION" echo " path : $OPENLOOPS_DIR" else echo "OpenLoops (OLP) : no" fi if test "$RECOLA_AVAILABLE_FLAG" = ".true." ; then echo "RECOLA (OLP) : yes, v$RECOLA_VERSION" echo " path : $RECOLA_DIR" else echo "RECOLA (OLP) : no" fi if test "$LOOPTOOLS_AVAILABLE_FLAG" = ".true." ; then echo "LoopTools : yes" else echo "LoopTools : no" fi echo "--------------------------------------------------------------" if test "$SIP_ACTIVE" = "yes" ; then echo "**************************************************************" echo "*** MAC OS X Darwin system with ***" echo "*** Security Integrity Protection (SIP) enabled. ***" echo "*** 'make check' will not work, and most likely also ***" echo "*** 'make installcheck' will not work. The installed ***" echo "*** WHIZARD will work as intended. ***" echo "**************************************************************" fi } echo_summary | tee config-summary.log ])