diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -1,75 +1,76 @@ Makefile$ Makefile\.in$ \.deps$ \.libs$ \.l[ao]$ \.so$ \.so\. \.o$ ~$ \.orig$ ^include/.done-all-links$ ^lib/.done-all-links$ ^src/.*\.(run|tex|out|log|rpo|spc|top|dump|dot|aux|pdf|ps|png|svg|hepmc)$ ^src/.done-all-links$ +^src/thepeg-config$ ^autom4te.cache$ ^config.thepeg$ ^config.log$ ^config.status$ ^configure$ ^Config/config.h$ ^Config/config.h.in$ ^Config/config.sub$ ^Config/depcomp$ ^Config/install-sh$ ^Config/compile$ ^Config/missing$ ^Config/stamp-h.$ ^Config/ar-lib$ ^Config/config.guess$ ^Config/test-driver$ ^Doc/fixinterfaces.pl$ ^include/ThePEG$ ^Doc/MakeDocs.in$ ^Doc/refman.conf$ ^Doc/refman.h$ ^Doc/refman-html$ ^Doc/AllInterfaces.h$ ^Doc/MoreInterfaces.h$ ^Doc/ThePEG-refman.tag$ ^java/.*\.(java|class)$ ^java/ThePEG$ ^java/ThePEG.jar$ ^java/thepeg.sh$ ^java/thepeg$ ^PDF/.done-all-links$ ^lib/ThePEGDefaults.rpo$ ^lib/Makefile.common ^lib/Makefile.dist$ ^src/runThePEG$ ^src/setupThePEG$ ^aclocal.m4$ ^libtool$ ^INSTALL$ ^src/TestDecayMode.in$ ^ThePEG.*\.tar\.(bz2|gz)$ ^src/runThePEG.bin$ ^src/setupThePEG.bin$ ^ThePEG-default.kdev4$ ^src/SimpleLEP.cmp$ ^Repository/versionstamp.inc$ ^Repository/repository_test(.log|.trs)?$ ^Repository/test-suite.log$ ^Repository/tests/.dirstamp$ # added by aHg on Wed Jan 13 13:27:00 2016 syntax: glob Config/LWH.h PDF/done-all-links include/done-all-links lib/done-all-links src/done-all-links # added by aHg on Tue Oct 11 14:21:42 2016 syntax: glob Config/ThePEG_Qty.h diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1,174 +1,175 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.59]) AC_INIT([ThePEG],[2.2.0],[http://www.thep.lu.se/ThePEG/],[ThePEG]) AC_CONFIG_AUX_DIR([Config]) AC_CONFIG_MACRO_DIR([m4]) THEPEG_LIBTOOL_VERSION_INFO(29,0,0) AC_CONFIG_SRCDIR([EventRecord/SubProcess.h]) AC_CONFIG_HEADERS([Config/config.h]) AC_CANONICAL_HOST case "${host}" in *-darwin[[0156]].*) AC_MSG_ERROR([ThePEG requires OS X 10.3 or later]) ;; *-darwin7.*) if test "x$MACOSX_DEPLOYMENT_TARGET" != "x10.3"; then AC_MSG_ERROR( [Please export the MACOSX_DEPLOYMENT_TARGET variable, set to 10.3]) fi ;; esac AC_LANG(C++) AM_INIT_AUTOMAKE([1.9 gnu dist-bzip2 subdir-objects -Wall]) dnl also include std-options once --version and --help exist m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) dnl Checks for C++ compiler. Handle C++11 flags. AC_PROG_CXX AX_CXX_COMPILE_STDCXX([11],[noext],[mandatory]) dnl check for unistd AC_CHECK_HEADER([unistd.h],[], [AC_MSG_ERROR([ThePEG needs "unistd.h". Check your system is POSIX-compliant.])]) dnl Checks for programs. AC_PROG_INSTALL AC_PROG_MAKE_SET AC_PROG_LN_S LT_PREREQ([2.2]) LT_INIT([disable-static dlopen pic-only]) VL_LIB_READLINE THEPEG_CHECK_GSL THEPEG_SEARCH_LHAPDF THEPEG_CHECK_HEPMC THEPEG_CHECK_RIVET FASTJET_CHECK_FASTJET AX_CHECK_ZLIB dnl AX_CHECK_BZ2LIB THEPEG_DEFINE_ENVDEFAULT(ThePEG_GZREAD_FILE,GZREAD_FILE,gunzip -c,[The command which, taking the name of a gzipped file as argument, unzips it and prints it to stdout. Default is "gunzip -c"]) THEPEG_DEFINE_ENVDEFAULT(ThePEG_GZWRITE_FILE,GZWRITE_FILE,[gzip -c > ],[The command which, taking the name of a gzipped file as argument, reads stdin, zips it and writes it to the file. Default is "gzip -c > ".]) THEPEG_DEFINE_ENVDEFAULT(ThePEG_BZ2READ_FILE,BZ2READ_FILE,bunzip2 -c,[The command which, taking the name of a bzipped file as argument, unzips it and prints it to stdout. Default is "bunzip2 -c".]) THEPEG_DEFINE_ENVDEFAULT(ThePEG_BZ2WRITE_FILE,BZ2WRITE_FILE,[bzip2 -c > ],[The command which, taking the name of a bzipped file as argument, reads stdin, zips it and writes it to the file. Default is "bzip2 -c > ".]) THEPEG_CHECK_EXPM1 THEPEG_CHECK_LOG1P THEPEG_CHECK_DLOPEN AX_COMPILER_VENDOR case "${ax_cv_cxx_compiler_vendor}" in clang) case "${host}" in *linux*) AC_MSG_WARN([ ***************************************************************************** clang/LLVM ignores the CPU floating-point environment. All floating point exception trapping will be disabled. *****************************************************************************]) ;; esac esac THEPEG_CHECK_FPUCONTROL THEPEG_CHECK_FENV AM_CPPFLAGS="-I\$(top_builddir)/include \$(GSLINCLUDE)" case "${ax_cv_cxx_compiler_vendor}" in gnu) AM_CXXFLAGS="-pedantic -Wall -W" ;; clang) AM_CXXFLAGS="-pedantic -Wall -Wno-overloaded-virtual -Wno-unused-function" dnl -Wno-unneeded-internal-declaration ;; intel) AM_CXXFLAGS="-strict-ansi -Wall -wd13000,1418,981,444,383,1599,1572,2259,980" ;; esac AC_SUBST(AM_CPPFLAGS) AC_SUBST(AM_CXXFLAGS) dnl do an actual capability check on ld instead of this workaround case "${host}" in *-darwin*) ;; *) AM_LDFLAGS="-Wl,--enable-new-dtags" ;; esac AC_SUBST(AM_LDFLAGS) THEPEG_EMPTY_SUBST AC_PATH_PROG(PERL, perl) AC_ARG_WITH(javagui, [ --with-javagui Compile and install the java-based GUI.]) if test "x$with_javagui" != "xno"; then THEPEG_HAS_JAVA([1.4], [], [with_javagui=no; AC_MSG_NOTICE([Java GUI disabled])]) fi AM_CONDITIONAL([JAVAGUI], [test "x$with_javagui" != "xno"]) AC_CONFIG_FILES([Helicity/Makefile Helicity/WaveFunction/Makefile Helicity/Vertex/Makefile Helicity/Vertex/Scalar/Makefile Helicity/Vertex/Vector/Makefile Helicity/Vertex/Tensor/Makefile Utilities/Makefile include/Makefile Interface/Makefile LesHouches/Makefile Vectors/Makefile PDT/Makefile PDF/Makefile Persistency/Makefile Config/Makefile Handlers/Makefile MatrixElement/Makefile Pointer/Makefile lib/Makefile lib/Makefile.common.install src/Makefile +src/thepeg-config ACDC/Makefile Repository/Makefile EventRecord/Makefile StandardModel/Makefile Cuts/Makefile Analysis/Makefile Doc/Makefile Doc/MakeDocs.in Doc/refman.h Doc/refman.conf java/Makefile Makefile]) AC_CONFIG_FILES([Doc/fixinterfaces.pl],[chmod +x Doc/fixinterfaces.pl]) BOOST_REQUIRE([1.41],[AC_SUBST([BOOST_NOT_FOUND],[true])]) BOOST_TEST() THEPEG_BOOST_UNIT_TEST THEPEG_OVERVIEW AC_CONFIG_COMMANDS([summary],[cat config.thepeg]) AC_OUTPUT diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,143 +1,145 @@ AUTOMAKE_OPTIONS = -Wno-portability bin_PROGRAMS = setupThePEG runThePEG EXTRA_PROGRAMS = runEventLoop +bin_SCRIPTS = thepeg-config + EXTRA_DIST = testpdfs .check-local.sh myLDADD = $(top_builddir)/lib/libThePEG.la myLDFLAGS = -export-dynamic runThePEG_SOURCES = runThePEG.cc runThePEG_LDADD = $(myLDADD) $(GSLLIBS) runThePEG_LDFLAGS = $(AM_LDFLAGS) $(myLDFLAGS) runEventLoop_SOURCES = runEventLoop.cc runEventLoop_LDADD = -lHepMC $(myLDADD) $(GSLLIBS) runEventLoop_LDFLAGS = $(AM_LDFLAGS) $(myLDFLAGS) setupThePEG_SOURCES = setupThePEG.cc setupThePEG_LDADD = $(myLDADD) $(GSLLIBS) setupThePEG_LDFLAGS = $(AM_LDFLAGS) $(myLDFLAGS) setupThePEG_CPPFLAGS = $(AM_CPPFLAGS) \ -DTHEPEG_PKGLIBDIR="\"$(pkglibdir)\"" if USELHAPDF pkglib_LTLIBRARIES = TestLHAPDF.la TestLHAPDF_la_SOURCES = TestLHAPDF.cc TestLHAPDF.h TestLHAPDF_la_LDFLAGS = $(AM_LDFLAGS) -module $(LIBTOOLVERSIONINFO) endif dist_pkgdata_DATA = SimpleLEP.in ThePEGDefaults.in ThePEGParticles.in debugItems.txt TestLHAPDF.in MultiLEP.in rpodir = $(pkglibdir) nodist_rpo_DATA = ThePEGDefaults.rpo CLEANFILES = SimpleLEP.log SimpleLEP.out SimpleLEP.run SimpleLEP.tex \ MultiLEP.log MultiLEP.out MultiLEP.run MultiLEP.tex \ ThePEGDefaults.rpo .done-all-links \ TestLHAPDF.log TestLHAPDF.out TestLHAPDF.run TestLHAPDF.tex \ .runThePEG.timer.TestLHAPDF.run SimpleLEP.dump MultiLEP.dump save: mkdir -p save cp *.log *.out *.run *.tex *.rpo save valgrind: valgrind --leak-check=full --num-callers=25 --track-fds=yes --freelist-vol=100000000 --leak-resolution=med --trace-children=yes ./setupThePEG -r ThePEGDefaults.rpo SimpleLEP.in &> /tmp/valgrind.out valgrind --leak-check=full --num-callers=25 --track-fds=yes --freelist-vol=100000000 --leak-resolution=med --trace-children=yes ./runThePEG SimpleLEP.run >> /tmp/valgrind.out 2>&1 INPUTFILES = ThePEGDefaults.in ThePEGParticles.in \ SimpleLEP.in SimpleLEP.mod MultiLEP.in TestLHAPDF.in .done-all-links: @EMPTY@ifdef SHOWCOMMAND for file in $(INPUTFILES); do \ if test ! -f $$file; then $(LN_S) $(srcdir)/$$file $$file; fi; done echo "stamp" > .done-all-links @EMPTY@else @echo "sym-linking input files files..." @for file in $(INPUTFILES); do \ if test ! -f $$file; then $(LN_S) $(srcdir)/$$file $$file; fi; done @echo "stamp" > .done-all-links @EMPTY@endif ThePEGDefaults.rpo: .done-all-links setupThePEG ThePEGDefaults.in ThePEGParticles.in ./setupThePEG --init --exitonerror -L../lib -r ThePEGDefaults.rpo ThePEGDefaults.in cd ../lib; rm -f ThePEGDefaults.rpo; $(LN_S) -f ../src/ThePEGDefaults.rpo . check-local: ThePEGDefaults.rpo @$(srcdir)/.check-local.sh if USELHAPDF LHAPATH=$(srcdir)/testpdfs ./setupThePEG --exitonerror -r ThePEGDefaults.rpo TestLHAPDF.in LHAPATH=$(srcdir)/testpdfs time ./runThePEG -d 1 -x .libs/TestLHAPDF.so TestLHAPDF.run endif SimpleLEP.run: .done-all-links setupThePEG ThePEGDefaults.rpo SimpleLEP.in ./setupThePEG --exitonerror -r ThePEGDefaults.rpo SimpleLEP.in SimpleLEP.out: runThePEG SimpleLEP.run time ./runThePEG -d 0 SimpleLEP.run MultiLEP.run: .done-all-links setupThePEG ThePEGDefaults.rpo MultiLEP.in ./setupThePEG --exitonerror -r ThePEGDefaults.rpo MultiLEP.in MultiLEP.out: runThePEG MultiLEP.run time ./runThePEG -d 0 MultiLEP.run if USELHAPDF TestLHAPDF.run: .done-all-links setupThePEG ThePEGDefaults.rpo TestLHAPDF.in TestLHAPDF.la LHAPATH=$(srcdir)/testpdfs ./setupThePEG --exitonerror -r ThePEGDefaults.rpo TestLHAPDF.in TestLHAPDF.out: runThePEG TestLHAPDF.run LHAPATH=$(srcdir)/testpdfs time ./runThePEG -d 1 -x .libs/TestLHAPDF.so TestLHAPDF.run endif install-exec-hook: cd $(DESTDIR)$(pkglibdir); \ rm -f setupThePEG-$(VERSION) runThePEG-$(VERSION); \ cp $(DESTDIR)$(bindir)/setupThePEG setupThePEG-$(VERSION); \ cp $(DESTDIR)$(bindir)/runThePEG runThePEG-$(VERSION) install-data-hook: rm -f $(DESTDIR)$(pkglibdir)/ThePEGDefaults.rpo ./setupThePEG --init --exitonerror -L$(DESTDIR)$(pkglibdir) -r $(DESTDIR)$(pkglibdir)/ThePEGDefaults.rpo $(DESTDIR)$(pkgdatadir)/ThePEGDefaults.in if USELHAPDF # LHAPATH=$(srcdir)/testpdfs ./setupThePEG --init --exitonerror -r $(DESTDIR)$(pkglibdir)/ThePEGDefaults.rpo -o $(DESTDIR)$(pkglibdir)/ThePEGDefaults.rpo endif cd $(DESTDIR)$(pkglibdir); \ if test -n "$(DESTDIR)"; \ then sed -i.bak -e "s@$(DESTDIR)@@g" ThePEGDefaults.rpo; \ rm -f ThePEGDefaults.rpo.bak; \ fi ; \ cp ThePEGDefaults.rpo ThePEGDefaults-$(VERSION).rpo uninstall-local: cd $(DESTDIR)$(pkglibdir); \ rm -f setupThePEG-$(VERSION) runThePEG-$(VERSION) ThePEGDefaults-$(VERSION).rpo installcheck-local: $(mkdir_p) _test_thepeg_installation_ cd _test_thepeg_installation_; \ $(DESTDIR)$(bindir)/setupThePEG --exitonerror $(DESTDIR)$(pkgdatadir)/SimpleLEP.in; \ mv SimpleLEP.out SimpleLEP.cmp; \ $(DESTDIR)$(bindir)/runThePEG SimpleLEP.run; \ diff SimpleLEP.out SimpleLEP.cmp; \ mv SimpleLEP.out SimpleLEP.cmp; \ $(DESTDIR)$(bindir)/runThePEG --resume SimpleLEP.dump; \ diff SimpleLEP.out SimpleLEP.cmp; \ $(DESTDIR)$(bindir)/setupThePEG --exitonerror $(DESTDIR)$(pkgdatadir)/MultiLEP.in; \ $(DESTDIR)$(bindir)/runThePEG MultiLEP.run; if USELHAPDF export LHAPATH=$$(pwd)/$(srcdir)/testpdfs; cd _test_thepeg_installation_; \ $(DESTDIR)$(bindir)/setupThePEG --exitonerror $(DESTDIR)$(pkgdatadir)/TestLHAPDF.in; \ $(DESTDIR)$(bindir)/runThePEG -x $(DESTDIR)$(pkglibdir)/TestLHAPDF.so TestLHAPDF.run endif rm -rf _test_thepeg_installation_ %.run: %.in .done-all-links ThePEGDefaults.rpo ./setupThePEG --exitonerror -L .libs -r ../lib/ThePEGDefaults.rpo $< %.out: %.run time ./runThePEG -d 0 $< diff --git a/src/thepeg-config.in b/src/thepeg-config.in new file mode 100644 --- /dev/null +++ b/src/thepeg-config.in @@ -0,0 +1,62 @@ +#! /usr/bin/env bash +# @configure_input@ + +prefix=@prefix@ +exec_prefix=@exec_prefix@ +datarootdir=@datarootdir@ + +tmp=$(echo $* | egrep -- '--\|-\') +if test $# -eq 0 || test -n "$tmp"; then + echo "thepeg-config: configuration tool for the ThePEG event generator framework" + echo " http://projects.hepforge.org/thepeg/" + echo + echo "Usage: `basename $0` [Option]" + echo "Options:" + echo " --help | -h : show this help message" + echo " --prefix : show the installation prefix (cf. autoconf)" + echo " --datadir : show the path to the directory containing shared data" + echo " --libdir : show the path to the directory containing the libraries" + echo " --includedir : show the path to the directory containing the headers" + echo " --cppflags : show the required CPPFLAGS for building against ThePEG" + echo " --ldflags : show the required LDFLAGS for linking against ThePEG" + echo " --ldlibs : show the required libraries for linking against ThePEG" + echo " --rivet-include : show the path to the directory containing the Rivet headers" + echo " --fastjet-include : show the path to the directory containing the FastJet headers" + echo " --rivet-libs : show the required libraries for linking against Rivet" + echo " --fastjet-libs : show the required libraries for linking against FastJet" + + echo +fi + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo $prefix + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @datadir@/@PACKAGE_TARNAME@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @libdir@/@PACKAGE_TARNAME@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @includedir@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo -I@includedir@ @BOOST_CPPFLAGS@ @GSLINCLUDE@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @LDFLAGS@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @LIBS@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @RIVETINCLUDE@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @FASTJETINCLUDE@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @RIVETLIBS@ + +tmp=$(echo "$*" | egrep -- '--\') +test -n "$tmp" && echo @FASTJETLIBS@