Index: trunk/tests/unit_tests/Makefile.am
===================================================================
--- trunk/tests/unit_tests/Makefile.am	(revision 8452)
+++ trunk/tests/unit_tests/Makefile.am	(revision 8453)
@@ -1,449 +1,448 @@
 ## Makefile.am -- Makefile for executable WHIZARD test scripts
 ##
 ## Process this file with automake to produce Makefile.in
 ##
 ########################################################################
 #
 # Copyright (C) 1999-2020 by 
 #     Wolfgang Kilian <kilian@physik.uni-siegen.de>
 #     Thorsten Ohl <ohl@physik.uni-wuerzburg.de>
 #     Juergen Reuter <juergen.reuter@desy.de>
 #     with contributions from
 #     cf. main AUTHORS file
 #
 # WHIZARD is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by 
 # the Free Software Foundation; either version 2, or (at your option)
 # any later version.
 #
 # WHIZARD is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
 ########################################################################
 
 WHIZARD_UT_DRIVER = run_whizard_ut.sh
 WHIZARD_C_TEST_DRIVER = run_whizard_c_test.sh
 WHIZARD_CC_TEST_DRIVER = run_whizard_cc_test.sh
 
 UNIT_TESTS = \
     analysis.run \
     commands.run \
     pdg_arrays.run \
     expressions.run \
     beams.run \
     su_algebra.run \
     bloch_vectors.run \
     polarizations.run \
     md5.run \
     cputime.run \
     lexers.run \
     parser.run \
     color.run \
     os_interface.run \
     evaluators.run \
     formats.run \
     sorting.run \
     grids.run \
     solver.run \
     state_matrices.run \
     interactions.run \
     xml.run \
     sm_qcd.run \
     sm_physics.run \
     models.run \
     auto_components.run \
     radiation_generator.run \
     blha.run \
     particles.run \
     beam_structures.run \
     sf_aux.run \
     sf_mappings.run \
     sf_base.run \
     sf_pdf_builtin.run \
     sf_isr.run \
     sf_epa.run \
     sf_ewa.run \
     sf_circe1.run \
     sf_circe2.run \
     sf_gaussian.run \
     sf_beam_events.run \
     sf_escan.run \
     phs_base.run \
     phs_none.run \
     phs_single.run \
     phs_rambo.run \
     resonances.run \
     phs_trees.run \
     phs_forests.run \
     phs_wood.run \
     phs_fks_generator.run \
     fks_regions.run \
     real_subtraction.run \
     rng_base.run \
     rng_tao.run \
     rng_stream.run \
     selectors.run \
     vegas.run \
     vamp2.run \
     mci_base.run \
     mci_none.run \
     mci_midpoint.run \
     mci_vamp.run \
     mci_vamp2.run \
     integration_results.run \
     prclib_interfaces.run \
     particle_specifiers.run \
     process_libraries.run \
     prclib_stacks.run \
     slha_interface.run \
     prc_test.run \
     prc_template_me.run \
     parton_states.run \
     subevt_expr.run \
     processes.run \
     process_stacks.run \
     cascades.run \
     cascades2_lexer.run \
     cascades2.run \
     event_transforms.run \
     resonance_insertion.run \
     recoil_kinematics.run \
     isr_handler.run \
     epa_handler.run \
     decays.run \
     shower.run \
     shower_base.run \
     events.run \
     hep_events.run \
     whizard_lha.run \
     pythia8.run \
     eio_data.run \
     eio_base.run \
     eio_direct.run \
     eio_raw.run \
     eio_checkpoints.run \
     eio_lhef.run \
     eio_stdhep.run \
     eio_ascii.run \
     eio_weights.run \
     eio_dump.run \
     iterations.run \
     rt_data.run \
     dispatch.run \
     dispatch_rng.run \
     dispatch_mci.run \
     dispatch_phs.run \
     dispatch_transforms.run \
     process_configurations.run \
     event_streams.run \
     integrations.run \
     ttv_formfactors.run
 
 XFAIL_UNIT_TESTS =
 
 UNIT_TESTS_REQ_EV_ANA = \
     phs_wood_vis.run \
     prc_omega_diags.run \
     integrations_history.run
 
 UNIT_TESTS_REQ_FASTJET = \
     jets.run
 
 UNIT_TESTS_REQ_HEPMC2 = \
     hepmc2.run \
     eio_hepmc2.run \
     api_hepmc2.run
 
 UNIT_TESTS_REQ_HEPMC3 = \
     hepmc3.run \
     eio_hepmc3.run \
     api_hepmc3.run
 
 UNIT_TESTS_REQ_LCIO = \
     lcio.run \
     eio_lcio.run \
     api_lcio.run
 
 UNIT_TESTS_REQ_OCAML = \
     prc_omega.run \
     compilations.run \
     compilations_static.run \
     restricted_subprocesses.run \
     simulations.run \
     api.run \
     api_c.run \
     api_cc.run
 
 UNIT_TESTS_REQ_RECOLA = \
    prc_recola.run
 
 UNIT_TESTS_REQ_LHAPDF5 = \
     sf_lhapdf5.run 
 UNIT_TESTS_REQ_LHAPDF6 = \
     sf_lhapdf6.run 
 
 TEST_DRIVERS_RUN = \
     $(UNIT_TESTS) \
     $(UNIT_TESTS_REQ_HEPMC2) \
     $(UNIT_TESTS_REQ_HEPMC3) \
     $(UNIT_TESTS_REQ_LCIO) \
     $(UNIT_TESTS_REQ_FASTJET) \
     $(UNIT_TESTS_REQ_LHAPDF5) \
     $(UNIT_TESTS_REQ_LHAPDF6) \
     $(UNIT_TESTS_REQ_OCAML) \
     $(UNIT_TESTS_REQ_RECOLA)
 TEST_DRIVERS_SH = $(TEST_DRIVERS_RUN:.run=.sh)
 
 ########################################################################
 
 TESTS = 
 XFAIL_TESTS =
 TESTS_SRC =
 
 UNIT_TESTS += $(UNIT_TESTS_REQ_FASTJET)
 UNIT_TESTS += $(UNIT_TESTS_REQ_HEPMC2)
 UNIT_TESTS += $(UNIT_TESTS_REQ_HEPMC3)
 UNIT_TESTS += $(UNIT_TESTS_REQ_LCIO)
 UNIT_TESTS += $(UNIT_TESTS_REQ_LHAPDF5)
 UNIT_TESTS += $(UNIT_TESTS_REQ_LHAPDF6)
 UNIT_TESTS += $(UNIT_TESTS_REQ_OCAML)
 UNIT_TESTS += $(UNIT_TESTS_REQ_EV_ANA)
 UNIT_TESTS += $(UNIT_TESTS_REQ_RECOLA)
 
 TESTS += $(UNIT_TESTS)
 XFAIL_TESTS += $(XFAIL_UNIT_TESTS)
 
 
 EXTRA_DIST = $(TEST_DRIVERS_SH)
     $(TESTS_SRC)
 
 ########################################################################
 # Force building the whizard_ut executable in the main src directory.
 # This depends on the unit-test libraries which will be built recursively.
 
 WHIZARD_UT = ../../src/whizard_ut
 
 $(TEST_DRIVERS_RUN): $(WHIZARD_UT)
 
 $(WHIZARD_UT):
 	$(MAKE) -C ../../src check
 
 ########################################################################
 # Force building the whizard_c_test executable in the main src directory.
 # This depends on the unit-test libraries which will be built recursively.
 
 WHIZARD_C_TEST = ../../src/whizard_c_test
 
 $(TEST_DRIVERS_RUN): $(WHIZARD_C_TEST)
 
 $(WHIZARD_C_TEST): $(WHIZARD_UT)
 
 ########################################################################
 # Force building the whizard_c_test executable in the main src directory.
 # This depends on the unit-test libraries which will be built recursively.
 
 WHIZARD_CC_TEST = ../../src/whizard_cc_test
 
 $(TEST_DRIVERS_RUN): $(WHIZARD_CC_TEST)
 
 $(WHIZARD_CC_TEST): $(WHIZARD_C_TEST)
 
 ########################################################################
 
 VPATH = $(srcdir)
 
 SUFFIXES = .sh .run
 
 .sh.run:
 	@rm -f $@
 	@cp $< $@
 	@chmod +x $@
 
 sf_beam_events.run: test_beam_events.dat
 test_beam_events.dat: $(top_builddir)/share/beam-sim/test_beam_events.dat
 	cp $< $@
 
 cascades2_lexer.run: cascades2_lexer_1.fds
 cascades2_lexer_1.fds: $(top_srcdir)/share/tests/cascades2_lexer_1.fds
 	cp $< $@
 cascades2.run: cascades2_1.fds cascades2_2.fds
 cascades2_1.fds: $(top_srcdir)/share/tests/cascades2_1.fds
 	cp $< $@
 cascades2_2.fds: $(top_srcdir)/share/tests/cascades2_2.fds
 	cp $< $@
 
-
-
-commands.run: sps1ap_decays.slha
-sps1ap_decays.slha: $(top_builddir)/share/susy/sps1ap_decays.slha
-	cp $< $@
-
 WT_OCAML_NATIVE_EXT=opt
 
 if MPOST_AVAILABLE
-commands.run: gamelan.sty
+commands.run: gamelan.sty sps1ap_decays.slha
 gamelan.sty: $(top_builddir)/src/gamelan/gamelan.sty
 	cp $< $@
 
 $(top_builddir)/src/gamelan/gamelan.sty:
 	$(MAKE) -C $(top_builddir)/src/gamelan gamelan.sty
+else
+commands.run: sps1ap_decays.slha
 endif
 
+sps1ap_decays.slha: $(top_builddir)/share/susy/sps1ap_decays.slha
+	cp $< $@
+
 if OCAML_AVAILABLE
 
 UFO_TAG_FILE = __init__.py
 UFO_MODELPATH = ../models/UFO
 
 models.run: $(UFO_MODELPATH)/SM/$(UFO_TAG_FILE)
 
 $(UFO_MODELPATH)/SM/$(UFO_TAG_FILE): $(top_srcdir)/omega/tests/UFO/SM/$(UFO_TAG_FILE)
 	$(MAKE) -C $(UFO_MODELPATH)/SM all
 
 endif
 
 BUILT_SOURCES = \
     TESTFLAG  \
     HEPMC2_FLAG \
     HEPMC3_FLAG \
     LCIO_FLAG \
     FASTJET_FLAG \
     LHAPDF5_FLAG \
     LHAPDF6_FLAG \
     EVENT_ANALYSIS_FLAG \
     OCAML_FLAG \
     RECOLA_FLAG \
     PYTHIA6_FLAG \
     PYTHIA8_FLAG \
     STATIC_FLAG \
     ref-output \
     err-output
 
 # If this file is found in the working directory, WHIZARD
 # will use the paths for the uninstalled version (source/build tree),
 # otherwise it uses the installed version
 TESTFLAG:
 	touch $@
 
 FASTJET_FLAG:
 if FASTJET_AVAILABLE
 	touch $@
 endif
 
 HEPMC2_FLAG:
 if HEPMC2_AVAILABLE
 	touch $@
 endif
 
 HEPMC3_FLAG:
 if HEPMC3_AVAILABLE
 	touch $@
 endif
 
 LCIO_FLAG:
 if LCIO_AVAILABLE
 	touch $@
 endif
 
 LHAPDF5_FLAG:
 if LHAPDF5_AVAILABLE
 	touch $@
 endif
 
 LHAPDF6_FLAG:
 if LHAPDF6_AVAILABLE
 	touch $@
 endif
 
 OCAML_FLAG:
 if OCAML_AVAILABLE
 	touch $@
 endif
 
 RECOLA_FLAG:
 if RECOLA_AVAILABLE
 	touch $@
 endif
 
 PYTHIA6_FLAG:
 if PYTHIA6_AVAILABLE
 	touch $@
 endif
 
 PYTHIA8_FLAG:
 if PYTHIA8_AVAILABLE
 	touch $@
 endif
 
 EVENT_ANALYSIS_FLAG:
 if EVENT_ANALYSIS_AVAILABLE
 	touch $@
 endif
 
 STATIC_FLAG:
 if STATIC_AVAILABLE
 	touch $@
 endif
 
 # The reference output files are in the source directory.  Copy them here.
 ref-output: $(top_srcdir)/share/tests/unit_tests/ref-output
 	mkdir -p ref-output
 	for f in $</*.ref; do cp $$f $@; done
 
 # The output files from self tests go here.
 err-output:
 	mkdir -p err-output
 
 ## installcheck runs the test scripts with the TESTFLAG removed.
 ## NOTE: disabled for unit tests, because whizard_ut will not be installed.
 installcheck-local:
 #installcheck-local: notestflag check-am
 notestflag:
 	rm -f TESTFLAG
 .PHONY: notestflag
 
 ### Remove DWARF debug information on MAC OS X
 clean-macosx:
 	-rm -rf compilations_static_1.dSYM
 	-rm -rf compilations_static_2.dSYM
 .PHONY: clean-macosx
 
 ## Remove generated files
 clean-local: clean-macosx
 	rm -f gamelan.sty
 	rm -f TESTFLAG 
 	rm -f OCAML_FLAG FASTJET_FLAG HEPMC2_FLAG HEPMC3_FLAG LCIO_FLAG 
 	rm -f RECOLA_FLAG EVENT_ANALYSIS_FLAG PYTHIA6_FLAG PYTHIA8_FLAG 
 	rm -f LHAPDF5_FLAG LHAPDF6_FLAG STATIC_FLAG static_1.exe
 	rm -f *.run *.log slha_test.out
 	rm -f core* 
 	rm -f *.f90 *.c *.$(FCMOD) *.o *.la
 	rm -f *.makefile
 	rm -f *.grid output.rcl
 	rm -rf err-output
 	rm -rf ref-output
 	rm -f *.sin *.hbc *_fks_regions.out
 	rm -f *.phs *.vg *.vgb *.evt *.evx *.lhe *.hepmc *.dat *.debug *.mdl
 	rm -f *.tmp *.hepevt *.hepevt.verb *.lha *.lha.verb *.slcio
 	rm -f prc_omega_diags_1_p_i1_diags.out prc_omega_diags_1_p_i1_diags.toc
 	rm -f *.hep *.up.hep *.hep.out *.[1-9] *.[1-9][0-9] *.[1-9][0-9][0-9] 
 	rm -f *.tex *.mp *.mpx *.t[1-9] *.t[1-9][0-9] *.t[1-9][0-9][0-9] 
 	rm -f *.ltp *.aux *.dvi *.ps *.pdf so_test.*
 	rm -f *.tbl sps1ap_decays.slha bar structure_6[a-b].out
 	rm -f *.fds api_*.out
 	rm -f *.vg2 *.vegas *.grids grids_2_test
 	rm -rf output_cll
 	rm -rf *.dSYM
 if FC_SUBMODULES
 	rm -f *.smod
 endif
 
 ## Remove backup files
 maintainer-clean-local: maintainer-clean-fc
 	-rm -f *~
 .PHONY: maintainer-clean-local
Index: trunk/m4/hepmc.m4
===================================================================
--- trunk/m4/hepmc.m4	(revision 8452)
+++ trunk/m4/hepmc.m4	(revision 8453)
@@ -1,206 +1,207 @@
 dnl hepmc.m4 -- checks for HepMC library
 dnl
 
 ### Determine paths to HEPMC components
 ### If successful, set the conditional HEPMC_AVAILABLE
 ### Also: HEPMC_VERSION HEPMC_INCLUDES LDFLAGS_HEPMC
 AC_DEFUN([WO_PROG_HEPMC],
 [dnl
 AC_REQUIRE([AC_PROG_CXX])
 AC_REQUIRE([AC_PROG_FC])
 
 AC_ARG_ENABLE([hepmc],
   [AS_HELP_STRING([--enable-hepmc],
     [enable HepMC for handling event data [[yes]]])],
   [], [enable_hepmc="yes"])
 
 hepmc_is_v3="no"
 hepmcok="no"
 
 if test "$enable_hepmc" = "yes"; then
    ACX_CHECK_HEPMC3()
    if test "${hepmcok}" = "no"; then
      AC_MSG_NOTICE([HepMC3 not found, incompatible, or HepMC3-config not found])
      AC_MSG_NOTICE([looking for HepMC2 instead ... ])
      if test -n "$HEPMC_DIR"; then
        wo_hepmc_includes="-I$HEPMC_DIR/include"
      fi
      AC_MSG_CHECKING([the HepMC version])
      AC_LANG([C++])
      wo_cxxflags_tmp=$CXXFLAGS
      CXXFLAGS="$CXXFLAGS $wo_hepmc_includes"
      AC_LINK_IFELSE([dnl
        AC_LANG_PROGRAM([[#include "HepMC/Version.h"]],
          [[std::cout << HepMC::versionName();]])],
        [dnl
        wk_hepmc_version=`./conftest`
        AC_MSG_RESULT([$wk_hepmc_version])],
        [dnl
        AC_MSG_RESULT([unknown])
        enable_hepmc="no"])
      CXXFLAGS=$wo_cxxflags_tmp
      
      HEPMC_VERSION=$wk_hepmc_version
      AC_SUBST([HEPMC_VERSION])
 
      if test -n "$HEPMC_DIR"; then
        wo_hepmc_ldflags="-Wl,-rpath,$HEPMC_DIR/lib -L$HEPMC_DIR/lib -lHepMC"
      else
        wo_hepmc_ldflags="-lHepMC"
      fi
      if test "$enable_hepmc" = "yes"; then
        wo_require_stdcpp="yes"
        AC_MSG_CHECKING([for GenEvent class in -lHepMC])
        wo_libs_tmp=$LIBS
        LIBS="$wo_hepmc_ldflags $wo_libs_tmp"
        AC_LANG([C++])
        wo_cxxflags_tmp=$CXXFLAGS
        CXXFLAGS="$CXXFLAGS $wo_hepmc_includes"
        AC_LINK_IFELSE([dnl
          AC_LANG_PROGRAM([[#include "HepMC/GenEvent.h"]],
            [[using namespace HepMC;  GenEvent* evt = new GenEvent();]])],
          [],
          [enable_hepmc="no"])
        AC_MSG_RESULT([$enable_hepmc])
        CXXFLAGS=$wo_cxxflags_tmp
        LIBS=$wo_libs_tmp
      else
        AC_MSG_CHECKING([for HepMC])
        AC_MSG_RESULT([(disabled)])
      fi
      
      if test "$enable_hepmc" = "yes"; then
        HEPMC_INCLUDES=$wo_hepmc_includes
        LDFLAGS_HEPMC=$wo_hepmc_ldflags
      fi
      AM_CONDITIONAL([HEPMC3_HAS_ROOT],false)
    else
       hepmc_is_v3="yes"
       AC_MSG_CHECKING([the HepMC3 version])
       save_CXXFLAGS="$CXXFLAGS"
       save_LIBS="$LIBS"
       CXXFLAGS="${CXXFLAGS} --std=c++11 `${hepmcconfig} --cxxflags`"
       LIBS="${LIBS} -Wl,-rpath,`${hepmcconfig} --libdir` `${hepmcconfig} --libs`"
       AC_LANG([C++])
       AC_LINK_IFELSE([dnl
         AC_LANG_PROGRAM([[
 #include <stdio.h>
 #include <iostream>
 #include "HepMC3/Version.h"
 ]],
           [[using namespace HepMC3; std::cout << HepMC3::version();]])],
         [dnl
         wk_hepmc_version=`./conftest`
         AC_MSG_RESULT([$wk_hepmc_version])],
         [dnl
         AC_MSG_RESULT([unknown])
         enable_hepmc="no"])  
       CXXFLAGS="$save_CXXFLAGS"
       LIBS="$save_LIBS"  
       HEPMC_VERSION=$wk_hepmc_version
       AC_SUBST([HEPMC_VERSION])   
    fi
 fi
 
 HEPMC_AVAILABLE_FLAG=$enable_hepmc
 
 AC_SUBST([HEPMC_INCLUDES])
 AC_SUBST([LDFLAGS_HEPMC])
 AC_SUBST([HEPMC_AVAILABLE_FLAG])
 
 AM_CONDITIONAL([HEPMC_AVAILABLE], [test "$enable_hepmc" = "yes"])
 AM_CONDITIONAL([HEPMC2_AVAILABLE], [test "$enable_hepmc" = "yes" -a "$hepmc_is_v3" = "no"])
 AM_CONDITIONAL([HEPMC3_AVAILABLE], [test "$enable_hepmc" = "yes" -a "$hepmc_is_v3" = "yes"])
 if test "$enable_hepmc" = "yes" -a "$hepmc_is_v3" = "yes"; then
    HEPMC3_AVAILABLE_FLAG=".true."
 else
    HEPMC3_AVAILABLE_FLAG=".false."
 fi
 if test "$enable_hepmc" = "yes" -a "$hepmc_is_v3" = "no"; then
    HEPMC2_AVAILABLE_FLAG=".true."
 else
    HEPMC2_AVAILABLE_FLAG=".false."
 fi
 if test "$enable_hepmc" = "no"; then
    AM_CONDITIONAL([HEPMC3_HAS_ROOT],false)
 fi
 AC_SUBST([HEPMC2_AVAILABLE_FLAG])
 AC_SUBST([HEPMC3_AVAILABLE_FLAG])
 AM_CONDITIONAL([HEPMC_IS_VERSION3], [test "$enable_hepmc" = "yes" -a "$hepmc_is_v3" = "yes"])
 ])
 
 dnl #####################################################################
 dnl CHECK HEPMC3 BEGIN
 dnl
 dnl This script can be used in configure scripts to check for the
 dnl usability of the HepMC3 library.
 dnl
 dnl By defaults, it searches the HepMC3 library in standard system
 dnl locations but an alternative path can be specified using the
 dnl --with-hepmc=... configure option
 dnl
 dnl If HepMC3 is found and functional, the variables HEPMC_CXXFLAGS
 dnl and HEPMC_LIBS are set
 AC_DEFUN([ACX_CHECK_HEPMC3],
 [
 dnl ckeck if a directory is specified for HepMC
 AC_ARG_WITH(HepMC,
             [AC_HELP_STRING([--with-hepmc=dir], 
                             [assume the given directory for HepMC])])
 
 dnl search for the Hepmc3-config script
 if test "$with_hepmc" = ""; then
    AC_PATH_PROG(hepmcconfig, HepMC3-config, no)
 else
    AC_PATH_PROG(hepmcconfig, HepMC3-config, no, ${with_hepmc}/bin)
 fi
 
 if test "${hepmcconfig}" = "no"; then
    AC_MSG_CHECKING([for HepMC3 or newer])
    AC_MSG_RESULT(no);
    $2
 else
 
    dnl now see if HepMC is functional
    save_CXXFLAGS="$CXXFLAGS"
    save_LIBS="$LIBS"
 
    CXXFLAGS="${CXXFLAGS} --std=c++11 `${hepmcconfig} --cxxflags`"
    LIBS="${LIBS} `${hepmcconfig} --libs`"
 
    AC_MSG_CHECKING([if HepMC3 is built with ROOT interface])
    if ${hepmcconfig} --rootIO | grep rootIO >/dev/null 2>&1; then
       hepmc3_root="yes"
       HEPMCROOTLIBS="`${hepmcconfig} --rootIO` -Wl,-rpath,$ROOTLIBDIR -L$ROOTLIBDIR $ROOTLIBS"
+      HEPMCROOTINCL="-I$ROOTINCDIR"
    else
       hepmc3_root="no"
    fi
    AC_MSG_RESULT([$hepmc3_root])
    AM_CONDITIONAL([HEPMC3_HAS_ROOT], [test "$hepmc3_root" = "yes"])
 
    AC_MSG_CHECKING([if HepMC3 is functional])
    AC_LANG_PUSH(C++)
    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <HepMC3/GenEvent.h>
    ]], [[
 using namespace HepMC3; GenEvent evt(Units::GEV,Units::MM);
    ]])], [hepmcok='yes'], [hepmcok='no'])
    AC_MSG_RESULT([$hepmcok])
    AC_LANG_POP()
    CXXFLAGS="$save_CXXFLAGS"
    LIBS="$save_LIBS"
 
    AC_MSG_CHECKING([for HepMC3])
    if test "${hepmcok}" = "yes"; then
-      HEPMC_INCLUDES="--std=c++11 `${hepmcconfig} --cxxflags`"
+      HEPMC_INCLUDES="--std=c++11 `${hepmcconfig} --cxxflags` $HEPMCROOTINCL"
       LDFLAGS_HEPMC="-Wl,-rpath,`${hepmcconfig} --libdir` `${hepmcconfig} --libs` $HEPMCROOTLIBS"
       AC_MSG_RESULT([yes])
       $1
    else
       AC_MSG_RESULT([no])
       $2
    fi
 fi
 ])
 
 dnl CHECK HEPMC3 END
Index: trunk/src/whizard-core/Makefile.am
===================================================================
--- trunk/src/whizard-core/Makefile.am	(revision 8452)
+++ trunk/src/whizard-core/Makefile.am	(revision 8453)
@@ -1,308 +1,304 @@
 ## Makefile.am -- Makefile for WHIZARD
 ##
 ## Process this file with automake to produce Makefile.in
 #
 # Copyright (C) 1999-2020 by
 #     Wolfgang Kilian <kilian@physik.uni-siegen.de>
 #     Thorsten Ohl <ohl@physik.uni-wuerzburg.de>
 #     Juergen Reuter <juergen.reuter@desy.de>
 #     with contributions from
 #     cf. main AUTHORS file
 #
 # WHIZARD is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2, or (at your option)
 # any later version.
 #
 # WHIZARD is distributed in the hope that it will be useful, but
 # WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #
 ########################################################################
 
 ## The files in this directory make up the WHIZARD core
 
 ## We create a library which is still to be combined with auxiliary libs.
 noinst_LTLIBRARIES = libwhizard_core.la
 check_LTLIBRARIES = libwhizard_core_ut.la
 
 COMMON_F90 = \
   user_files.f90 \
   rt_data.f90  \
   dispatch_me_methods.f90 \
   process_configurations.f90 \
   compilations.f90 \
   event_streams.f90 \
   whizard.f90 \
   features.f90
 MPI_F90 = \
   integrations.f90_mpi \
   restricted_subprocesses.f90_mpi \
   simulations.f90_mpi \
   commands.f90_mpi
 SERIAL_F90 = \
   integrations.f90_serial \
   restricted_subprocesses.f90_serial \
   simulations.f90_serial \
   commands.f90_serial
 
 nodist_libwhizard_core_la_SOURCES = \
   $(COMMON_F90) \
   integrations.f90 \
   restricted_subprocesses.f90 \
   simulations.f90 \
   commands.f90
 
 DISTCLEANFILES = integrations.f90 restricted_subprocesses.f90 \
 	simulations.f90 commands.f90
 
 if FC_USE_MPI
 integrations.f90: integrations.f90_mpi
 	-cp -f $< $@
 restricted_subprocesses.f90: restricted_subprocesses.f90_mpi
 	-cp -f $< $@
 simulations.f90: simulations.f90_mpi
 	-cp -f $< $@
 commands.f90: commands.f90_mpi
 	-cp -f $< $@
 else
 integrations.f90: integrations.f90_serial
 	-cp -f $< $@
 restricted_subprocesses.f90: restricted_subprocesses.f90_serial
 	-cp -f $< $@
 simulations.f90: simulations.f90_serial
 	-cp -f $< $@
 commands.f90: commands.f90_serial
 	-cp -f $< $@
 endif
 
 libwhizard_core_ut_la_SOURCES = \
   expr_tests_uti.f90 expr_tests_ut.f90 \
   rt_data_uti.f90 rt_data_ut.f90 \
   dispatch_uti.f90 dispatch_ut.f90 \
   process_configurations_uti.f90 process_configurations_ut.f90 \
   compilations_uti.f90 compilations_ut.f90 \
   integrations_uti.f90 integrations_ut.f90 \
   event_streams_uti.f90 event_streams_ut.f90 \
   restricted_subprocesses_uti.f90 restricted_subprocesses_ut.f90 \
   simulations_uti.f90 simulations_ut.f90 \
   commands_uti.f90 commands_ut.f90
 
-# Adds the whizard-c-interface
-EXTRA_libwhizard_core_la_SOURCES = whizard-c-interface.f90
-libwhizard_core_la_LIBADD = whizard-c-interface.lo
-
 EXTRA_DIST = \
   $(COMMON_F90) \
   $(SERIAL_F90) \
   $(MPI_F90)
 
 ## Omitting this would exclude it from the distribution
 dist_noinst_DATA = whizard.nw
 
 # Modules and installation
 # Dump module names into file Modules
 execmoddir = $(fmoddir)/whizard
 nodist_execmod_HEADERS = \
   ${nodist_libwhizard_core_la_SOURCES:.f90=.$(FCMOD)} \
   ${libwhizard_core_la_SOURCES:.f90=.$(FCMOD)}
 
 libwhizard_core_Modules = \
   ${libwhizard_core_la_SOURCES:.f90=} \
   ${nodist_libwhizard_core_la_SOURCES:.f90=} \
   ${libwhizard_core_ut_la_SOURCES:.f90=}
 Modules: Makefile
 	@for module in $(libwhizard_core_Modules); do \
           echo $$module >> $@.new; \
         done
 	@if diff $@ $@.new -q >/dev/null; then \
           rm $@.new; \
 	else \
           mv $@.new $@; echo "Modules updated"; \
         fi
 BUILT_SOURCES = Modules
 
 ## Fortran module dependencies
 # Get module lists from other directories
 module_lists = \
   ../basics/Modules \
   ../utilities/Modules \
   ../testing/Modules \
   ../system/Modules \
   ../combinatorics/Modules \
   ../parsing/Modules \
   ../rng/Modules \
   ../physics/Modules \
   ../qft/Modules \
   ../expr_base/Modules \
   ../types/Modules \
   ../matrix_elements/Modules \
   ../particles/Modules \
   ../beams/Modules \
   ../me_methods/Modules \
   ../pythia8/Modules \
   ../events/Modules \
   ../phase_space/Modules \
   ../mci/Modules \
   ../vegas/Modules \
   ../blha/Modules \
   ../gosam/Modules \
   ../openloops/Modules \
   ../recola/Modules \
   ../fks/Modules \
   ../variables/Modules \
   ../model_features/Modules \
   ../muli/Modules \
   ../shower/Modules \
   ../matching/Modules \
   ../process_integration/Modules \
   ../transforms/Modules \
   ../threshold/Modules
 
 $(module_lists):
 	$(MAKE) -C `dirname $@` Modules
 
 Module_dependencies.sed: $(nodist_libwhizard_core_la_SOURCES) \
   $(libwhizard_core_ut_la_SOURCES) \
   $(EXTRA_libwhizard_core_la_SOURCES)
 Module_dependencies.sed: $(module_lists)
 	@rm -f $@
 	echo 's/, *only:.*//' >> $@
 	echo 's/, *&//' >> $@
 	echo 's/, *.*=>.*//' >> $@
 	echo 's/$$/.lo/' >> $@
 	for list in $(module_lists); do \
 		dir="`dirname $$list`"; \
 		for mod in `cat $$list`; do \
 			echo 's!: '$$mod'.lo$$!': $$dir/$$mod'.lo!' >> $@; \
 		done \
 	done
 
 DISTCLEANFILES += Module_dependencies.sed
 
 # The following line just says
 #    include Makefile.depend
 # but in a portable fashion (depending on automake's AM_MAKE_INCLUDE
 @am__include@ @am__quote@Makefile.depend@am__quote@
 
 Makefile.depend: Module_dependencies.sed
 Makefile.depend: $(nodist_libwhizard_core_la_SOURCES) \
   $(libwhizard_core_ut_la_SOURCES) \
   $(EXTRA_libwhizard_core_la_SOURCES)
 #  $(nodist_libwhizard_main_la_SOURCES) \
 #  $(nodist_libwhizard_main_ut_la_SOURCES) \
 	@rm -f $@
 	for src in $^; do \
 		module="`basename $$src | sed 's/\.f[90][0358]//'`"; \
 		grep '^ *use ' $$src \
 			| grep -v '!NODEP!' \
 			| sed -e 's/^ *use */'$$module'.lo: /' \
 			-f Module_dependencies.sed; \
 	done > $@
 
 DISTCLEANFILES += Makefile.depend
 
 SUFFIXES = .lo .$(FCMOD)
 # Fortran90 module files are generated at the same time as object files
 .lo.$(FCMOD):
 	@:
 #	touch $@
 
 AM_FCFLAGS = -I../basics -I../utilities -I../testing -I../system -I../combinatorics -I../parsing -I../rng -I../physics -I../qed_pdf -I../qft -I../expr_base -I../types -I../matrix_elements -I../particles -I../beams -I../me_methods -I../events -I../phase_space -I../mci -I../vegas  -I../blha -I../gosam -I../openloops -I../fks -I../variables -I../model_features -I../muli -I../pythia8 -I../shower -I../matching -I../process_integration -I../transforms -I../xdr -I../../vamp/src -I../pdf_builtin -I../../circe1/src -I../../circe2/src -I../lhapdf -I../fastjet -I../threshold -I../tauola -I../recola
 ########################################################################
 ## Default Fortran compiler options
 
 ## Profiling
 if FC_USE_PROFILING
 AM_FCFLAGS += $(FCFLAGS_PROFILING)
 endif
 
 ## OpenMP
 if FC_USE_OPENMP
 AM_FCFLAGS += $(FCFLAGS_OPENMP)
 endif
 
 ## MPI
 if FC_USE_MPI
 AM_FCFLAGS += $(FCFLAGS_MPI)
 endif
 
 if RECOLA_AVAILABLE
 AM_FCFLAGS += $(RECOLA_INCLUDES)
 endif
 
 ########################################################################
 ## Non-standard targets and dependencies
 
 ## (Re)create F90 sources from NOWEB source.
 if NOWEB_AVAILABLE
 
 FILTER = -filter "sed 's/defn MPI:/defn/'"
 
 COMMON_SRC = \
   $(COMMON_F90) \
   $(libwhizard_core_ut_la_SOURCES) \
   $(EXTRA_libwhizard_core_la_SOURCES)
 
 PRELUDE = $(top_srcdir)/src/noweb-frame/whizard-prelude.nw
 POSTLUDE = $(top_srcdir)/src/noweb-frame/whizard-postlude.nw
 
 whizard.stamp: $(PRELUDE) $(srcdir)/whizard.nw $(POSTLUDE)
 	@rm -f whizard.tmp
 	@touch whizard.tmp
 	for src in $(COMMON_SRC); do \
 	  $(NOTANGLE) -R[[$$src]] $^ | $(CPIF) $$src; \
         done
 	for src in $(MPI_F90:.f90_mpi=.f90); do \
 	  $(NOTANGLE) -R[[$$src]] $(FILTER) $^ | $(CPIF) $$src'_mpi'; \
         done
 	for src in $(SERIAL_F90:.f90_serial=.f90); do \
 	  $(NOTANGLE) -R[[$$src]] $^ | $(CPIF) $$src'_serial'; \
         done
 	@mv -f whizard.tmp whizard.stamp
 
 $(MPI_F90) $(SERIAL_F90) $(COMMON_SRC): whizard.stamp
 ## Recover from the removal of $@
 	@if test -f $@; then :; else \
 	  rm -f whizard.stamp; \
 	  $(MAKE) $(AM_MAKEFLAGS) whizard.stamp; \
 	fi
 
 endif
 
 ########################################################################
 ## Non-standard cleanup tasks
 ## Remove sources that can be recreated using NOWEB
 if NOWEB_AVAILABLE
 maintainer-clean-noweb:
 	-rm -f *.f90 *.f90_mpi *.f90_serial *.c
 endif
 .PHONY: maintainer-clean-noweb
 
 ## Remove those sources also if builddir and srcdir are different
 if NOWEB_AVAILABLE
 clean-noweb:
 	test "$(srcdir)" != "." && rm -f *.f90 *.f90_mpi *.f90_serial *.c || true
 endif
 .PHONY: clean-noweb
 
 ## Remove F90 module files
 clean-local: clean-noweb
 	-rm -f whizard.stamp whizard.tmp
 	-rm -f *.$(FCMOD)
 if FC_SUBMODULES
 	-rm -f *.smod
 endif
 
 ## Remove backup files
 maintainer-clean-backup:
 	-rm -f *~
 .PHONY: maintainer-clean-backup
 
 ## Register additional clean targets
 maintainer-clean-local: maintainer-clean-noweb maintainer-clean-backup