diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1,175 +1,175 @@ dnl Process this file with autoconf to produce a configure script. -AC_PREREQ([2.69]) +AC_PREREQ([2.71]) AC_INIT([ThePEG],[devel],[http://www.thep.lu.se/ThePEG/],[ThePEG]) AC_CONFIG_AUX_DIR([Config]) AC_CONFIG_MACRO_DIR([m4]) THEPEG_LIBTOOL_VERSION_INFO(30,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 -Wno-use-after-free" ;; 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/m4/ax_check_zlib.m4 b/m4/ax_check_zlib.m4 --- a/m4/ax_check_zlib.m4 +++ b/m4/ax_check_zlib.m4 @@ -1,165 +1,141 @@ # =========================================================================== -# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html +# https://www.gnu.org/software/autoconf-archive/ax_check_zlib.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_ZLIB([action-if-found], [action-if-not-found]) # # DESCRIPTION # # This macro searches for an installed zlib library. If nothing was # specified when calling configure, it searches first in /usr/local and # then in /usr, /opt/local and /sw. If the --with-zlib=DIR is specified, # it will try to find it in DIR/include/zlib.h and DIR/lib/libz.a. If # --without-zlib is specified, the library is not searched at all. # # If either the header file (zlib.h) or the library (libz) is not found, # shell commands 'action-if-not-found' is run. If 'action-if-not-found' is # not specified, the configuration exits on error, asking for a valid zlib # installation directory or --without-zlib. # # If both header file and library are found, shell commands # 'action-if-found' is run. If 'action-if-found' is not specified, the # default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends # '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls # AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition # for this symbol in a config.h file. Sample usage in a C/C++ source is as # follows: # # #ifdef HAVE_LIBZ # #include <zlib.h> # #endif /* HAVE_LIBZ */ # # LICENSE # # Copyright (c) 2008 Loic Dachary <loic@senga.org> # Copyright (c) 2010 Bastien Chevreux <bach@chevreux.org> -# Mods for ThePEG Copyright (c) 2013 David Grellscheid <david.grellscheid@durham.ac.uk> # # This program 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 of the License, or (at your # option) any later version. # # This program 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, see <http://www.gnu.org/licenses/>. +# with this program. If not, see <https://www.gnu.org/licenses/>. # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 14 +#serial 16 -# Define m4_ifblank and m4_ifnblank macros from introduced in -# autotools 2.64 m4sugar.m4 if using an earlier autotools. - -ifdef([m4_ifblank], [], [ -m4_define([m4_ifblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$2], [$3])]) -]) - - -ifdef([m4_ifnblank], [], [ -m4_define([m4_ifnblank], -[m4_if(m4_translit([[$1]], [ ][ ][ -]), [], [$3], [$2])]) -]) - AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB]) AC_DEFUN([AX_CHECK_ZLIB], # # Handle user hints # [AC_MSG_CHECKING(if zlib is wanted) zlib_places="/usr/local /usr /opt/local /sw" -withval_result= AC_ARG_WITH([zlib], [ --with-zlib=DIR root directory path of zlib installation @<:@defaults to /usr/local or /usr if not found in /usr/local@:>@ --without-zlib to disable zlib usage completely], [if test "$withval" != no ; then AC_MSG_RESULT(yes) if test -d "$withval" then zlib_places="$withval $zlib_places" else AC_MSG_WARN([Sorry, $withval does not exist, checking usual places]) fi - withval_result="$withval" else zlib_places= AC_MSG_RESULT(no) fi], [AC_MSG_RESULT(yes)]) # # Locate zlib, if wanted # if test -n "${zlib_places}" then # check the user supplied or any other more or less 'standard' place: # Most UNIX systems : /usr/local and /usr # MacPorts / Fink on OSX : /opt/local respectively /sw for ZLIB_HOME in ${zlib_places} ; do if test -f "${ZLIB_HOME}/include/zlib.h"; then break; fi ZLIB_HOME="" done ZLIB_OLD_LDFLAGS=$LDFLAGS ZLIB_OLD_CPPFLAGS=$CPPFLAGS if test -n "${ZLIB_HOME}"; then - if test -n "${withval_result}"; then - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" - CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" - fi + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" + CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" fi - AC_LANG_SAVE - AC_LANG_C + AC_LANG_PUSH([C]) AC_CHECK_LIB([z], [inflateEnd], [zlib_cv_libz=yes], [zlib_cv_libz=no]) AC_CHECK_HEADER([zlib.h], [zlib_cv_zlib_h=yes], [zlib_cv_zlib_h=no]) - AC_LANG_RESTORE + AC_LANG_POP([C]) if test "$zlib_cv_libz" = "yes" && test "$zlib_cv_zlib_h" = "yes" then # # If both library and header were found, action-if-found # m4_ifblank([$1],[ - if test -n "${withval_result}"; then - LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" - CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" - fi + CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include" + LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib" LIBS="-lz $LIBS" AC_DEFINE([HAVE_LIBZ], [1], [Define to 1 if you have `z' library (-lz)]) ],[ # Restore variables LDFLAGS="$ZLIB_OLD_LDFLAGS" CPPFLAGS="$ZLIB_OLD_CPPFLAGS" $1 ]) else # # If either header or library was not found, action-if-not-found # m4_default([$2],[ AC_MSG_ERROR([either specify a valid zlib installation with --with-zlib=DIR or disable zlib usage with --without-zlib]) ]) fi fi ]) diff --git a/m4/fastjet.m4 b/m4/fastjet.m4 --- a/m4/fastjet.m4 +++ b/m4/fastjet.m4 @@ -1,88 +1,88 @@ dnl CHECK FASTJET BEGIN dnl dnl This script can be used in configure scripts to check for the dnl usability of the FastJet librarty. dnl dnl By defaults, it searches the FastJet library in standard system dnl locations but an alternative path can be specified using the dnl --with-fastjet=... configure option dnl dnl If FastJet is found and functional, the variables FASTJET_CXXFLAGS dnl and FASTJET_LIBS are set dnl dnl modified for Herwig++ 2011-10-04 D.Grellscheid dnl AC_DEFUN([FASTJET_CHECK_FASTJET], [ dnl ckeck if a directory is specified for FastJet AC_ARG_WITH(fastjet, - [AC_HELP_STRING([--with-fastjet=dir], + [AS_HELP_STRING([--with-fastjet=dir], [Assume the given directory for FastJet])]) dnl search for the fastjet-config script if test "$with_fastjet" = ""; then AC_PATH_PROG(fjconfig, fastjet-config, no) else AC_PATH_PROG(fjconfig, fastjet-config, no, ${with_fastjet}/bin) fi LOAD_FASTJET="" CREATE_FASTJET="#create" if test "${fjconfig}" = "no"; then AC_MSG_CHECKING(FastJet) AC_MSG_RESULT(no); $2 else dnl now see if FastJet is functional save_CXXFLAGS="$CXXFLAGS" save_LIBS="$LIBS" CXXFLAGS="${CXXFLAGS} `${fjconfig} --cxxflags`" LIBS="${LIBS} `${fjconfig} --libs --plugins`" AC_MSG_CHECKING([if FastJet is functional]) AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <fastjet/ClusterSequence.hh> ]], [[ fastjet::PseudoJet pj=fastjet::PtYPhiM(10.0,0.5,1.0,0.0); ]])], [fjok='yes'], [fjok='no']) AC_MSG_RESULT([$fjok]) AC_LANG_POP() CXXFLAGS="$save_CXXFLAGS" LIBS="$save_LIBS" AC_MSG_CHECKING(FastJet) if test "${fjok}" = "yes"; then FASTJET_CXXFLAGS="`${fjconfig} --cxxflags`" FASTJET_LIBS="`${fjconfig} --libs --plugins`" LOAD_FASTJET="library HwLEPJetAnalysis.so" CREATE_FASTJET="create" AC_MSG_RESULT(yes) $1 else AC_MSG_RESULT(no) $2 fi fi warnfastjet="" if test "$LOAD_FASTJET" = "" ; then AC_MSG_WARN([ ***************************************************************************** Warning: Herwig++ will require ThePEG to be configured with FastJet. *****************************************************************************]) warnfastjet=" *** Herwig++ will require ThePEG to be configured with fastjet. ***" fi AC_SUBST(FASTJETINCLUDE,[$FASTJET_CXXFLAGS]) AC_SUBST(CREATE_FASTJET) AC_SUBST(LOAD_FASTJET) AC_SUBST(FASTJETLIBS,[${FASTJET_LIBS/-Wl,-rpath,/-R}]) AM_CONDITIONAL(WANT_LIBFASTJET,[test "x$CREATE_FASTJET" = "xcreate"]) ]) dnl CHECK FASTJET END diff --git a/m4/hepmc.m4 b/m4/hepmc.m4 --- a/m4/hepmc.m4 +++ b/m4/hepmc.m4 @@ -1,146 +1,146 @@ dnl ##### HEPMC ##### AC_DEFUN([THEPEG_CHECK_HEPMC], [ AC_MSG_CHECKING([for HepMC location]) HEPMCINCLUDE="" HEPMCROOTIO=0 AC_ARG_WITH(hepmc, - AC_HELP_STRING([--with-hepmc=DIR],[Location of HepMC2 or HepMC3 installation @<:@default=system libs@:>@]), + AS_HELP_STRING([--with-hepmc=DIR],[Location of HepMC2 or HepMC3 installation @<:@default=system libs@:>@]), [], [with_hepmc=no]) AC_ARG_WITH(hepmcversion, - AC_HELP_STRING([--with-hepmcversion=version],[Version of HepMC]), + AS_HELP_STRING([--with-hepmcversion=version],[Version of HepMC]), [], [with_hepmcversion=no]) if test "x$with_hepmc" == "xno" -a "x$with_hepmcversion" != "xno"; then with_hepmc=yes fi if test "x$with_hepmcversion" == "xno"; then with_hepmcversion=2 fi HEPMCLIBS="" if test "x$with_hepmcversion" = "x2"; then SHORTHEPMCLIBS="-lHepMC" SHORTHEPMCLIBNAME="HepMC" fi if test "x$with_hepmcversion" = "x3"; then SHORTHEPMCLIBS="-lHepMC3" SHORTHEPMCLIBNAME="HepMC3" fi if test "x$with_hepmc" == "xyes"; then if test "x$prefix" == "xNONE"; then with_hepmc=$ac_default_prefix else with_hepmc=$prefix fi fi if test "x$with_hepmc" = "xno"; then AC_MSG_RESULT([HepMC support disabled.]) elif test "x$with_hepmc" = "xsystem"; then AC_MSG_RESULT([in system libraries]) oldlibs="$LIBS" AC_CHECK_LIB($SHORTHEPMCLIBNAME,main, [], [with_hepmc=no AC_MSG_WARN([HepMC not found in system libraries]) ]) HEPMCLIBS="$LIBS" LIBS=$oldlibs else AC_MSG_RESULT([$with_hepmc]) HEPMCINCLUDE=-I$with_hepmc/include HEPMCLIBS="-L$with_hepmc/lib -R$with_hepmc/lib "$SHORTHEPMCLIBS if test "${host_cpu}" == "x86_64" -a "x$with_hepmcversion" = "x2" -a -e $with_hepmc/lib64/libHepMC.so ; then HEPMCLIBS="-L$with_hepmc/lib64 -R$with_hepmc/lib64 "$SHORTHEPMCLIBS fi if test "${host_cpu}" == "x86_64" -a "x$with_hepmcversion" = "x3" -a -e $with_hepmc/lib64/libHepMC3.so ; then HEPMCLIBS="-L$with_hepmc/lib64 -R$with_hepmc/lib64 "$SHORTHEPMCLIBS fi fi if test "x$with_hepmc" != "xno"; then # Now lets see if the libraries work properly oldLIBS="$LIBS" oldLDFLAGS="$LDFLAGS" oldCPPFLAGS="$CPPFLAGS" LIBS="$LIBS `echo $HEPMCLIBS | sed -e 's! -R.* ! !'`" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $HEPMCINCLUDE" if test "x$with_hepmcversion" = "x2"; then AC_CHECK_HEADERS([HepMC/HepMCDefs.h],[],[AC_MSG_WARN([ ********************************************************************* * HepMC versions before 2.05 may still work, but are not supported. * ********************************************************************* ])]) # check HepMC AC_MSG_CHECKING([that HepMC works]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <HepMC/GenEvent.h> ]],[[HepMC::GenEvent(HepMC::Units::GEV, HepMC::Units::MM);]])],[AC_MSG_RESULT([yes])],[ AC_MSG_RESULT([no]) AC_MSG_ERROR([Use '--with-hepmc=' to set a path or use '--without-hepmc'.]) ]) AC_CHECK_HEADERS([HepMC/PdfInfo.h],[],[AC_MSG_ERROR([Need HepMC with PdfInfo support.])],[#include <iostream> ]) fi if test "x$with_hepmcversion" = "x3"; then # check HepMC AC_MSG_CHECKING([that HepMC3 works]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <HepMC3/GenEvent.h>]],[[HepMC3::GenEvent(HepMC3::Units::GEV, HepMC3::Units::MM);]])], [ AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) AC_MSG_ERROR([Use '--with-hepmc=' to set a path or use '--without-hepmc'.]) ]) HEPMCROOTIO=0 AC_CHECK_HEADERS([HepMC3/WriterRoot.h], [ HEPMCROOTIO=1 AC_MSG_RESULT([HepMC3 has ROOT support.]) ],[]) AC_CHECK_HEADERS([HepMC3/WriterRootTree.h], [ HEPMCROOTIO=1 AC_MSG_RESULT([HepMC has ROOT Tree support.]) ],[]) AC_CHECK_HEADERS([HepMC3/Writer.h], [ AC_DEFINE([HAVE_HEPMC3], [1],[ We have HepMC3 ]) AC_DEFINE([HEPMC_HAS_CROSS_SECTION], [1],[ Has GenCrossection ]) AC_DEFINE([HEPMC_HAS_NAMED_WEIGHTS], [1],[ Has named weights ]) AC_DEFINE([HEPMC_HAS_PDF_INFO], [1],[ Has GenPdfInfo ]) AC_DEFINE([HEPMC_HAS_UNITS] , [1],[ Has units ]) ],[]) fi LIBS="$oldLIBS" LDFLAGS="$oldLDFLAGS" CPPFLAGS="$oldCPPFLAGS" fi AM_CONDITIONAL(HAVE_HEPMC,[test "x$with_hepmc" != "xno"]) AM_CONDITIONAL(HAVE_HEPMCROOTIO,[test "x$with_hepmc" != "xno" && test "$HEPMCROOTIO" != "0" ]) AC_SUBST(HEPMCINCLUDE) AC_SUBST(HEPMCLIBS) AC_SUBST(CREATE_HEPMC) AC_SUBST(LOAD_HEPMC) ]) diff --git a/m4/lhapdf.m4 b/m4/lhapdf.m4 --- a/m4/lhapdf.m4 +++ b/m4/lhapdf.m4 @@ -1,84 +1,84 @@ # lhapdf.m4 based on fastjet.m4 # D.Grellscheid 2013-06-20 # Search for LHAPDF in standard directories AC_DEFUN([THEPEG_SEARCH_LHAPDF], [ dnl ckeck if a directory is specified for LHAPDF AC_ARG_WITH(lhapdf, - [AC_HELP_STRING([--with-lhapdf=dir], + [AS_HELP_STRING([--with-lhapdf=dir], [Assume the given directory for LHAPDF])]) dnl search for the lhapdf-config script if test "$with_lhapdf" = ""; then AC_PATH_PROG(lhaconfig, lhapdf-config, no) else AC_PATH_PROG(lhaconfig, lhapdf-config, no, ${with_lhapdf}/bin) fi LOAD_LHAPDF="" lhapdf_version="0" if test "${lhaconfig}" = "no"; then AC_MSG_CHECKING([LHAPDF]) AC_MSG_RESULT([no]); $2 else lhapdf_version="`${lhaconfig} --version | cut -d. -f1`" if test "$lhapdf_version" -lt "6"; then AC_MSG_CHECKING([LHAPDF]) AC_MSG_RESULT([version 5]) AC_MSG_ERROR([ ***************************************************** LHAPDF versions before 6.0 are no longer supported. Please upgrade LHAPDF. ***************************************************** ]) fi dnl now see if LHAPDF is functional save_LDFLAGS="$LDFLAGS" save_LIBS="$LIBS" LDFLAGS="${LDFLAGS} -L`${lhaconfig} --libdir`" LIBS="${LIBS} -lLHAPDF" AC_MSG_CHECKING([if LHAPDF is functional]) AC_LANG_PUSH(C++) AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[extern "C" { void initpdf_(int&); }]], [[int i = 1; initpdf_(i);]])], [lhaok='yes'], [lhaok='no']) AC_MSG_RESULT([$lhaok]) AC_LANG_POP() LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" AC_MSG_CHECKING([LHAPDF]) if test "${lhaok}" = "yes"; then LHAPDF_LDFLAGS="-L`${lhaconfig} --libdir`" LHAPDF_LIBS="-lLHAPDF" LOAD_LHAPDF="library ThePEGLHAPDF.so" LHAPDF_CPPFLAGS="`${lhaconfig} --cppflags`" AC_MSG_RESULT([yes]) $1 else AC_MSG_RESULT([no]) $2 fi fi warnlhapdf="" if test "$LOAD_LHAPDF" = "" ; then AC_MSG_WARN([ ***************************************************************************** Warning: Herwig++ will require ThePEG to be configured with LHAPDF. *****************************************************************************]) warnlhapdf=" *** Herwig++ will require ThePEG to be configured with LHAPDF. ***" fi AC_SUBST([LHAPDF_LIBS]) AC_SUBST([LOAD_LHAPDF]) AC_SUBST([LHAPDF_LDFLAGS]) AC_SUBST([LHAPDF_CPPFLAGS]) AM_CONDITIONAL([USELHAPDF],[test "x$LOAD_LHAPDF" = "xlibrary ThePEGLHAPDF.so"]) ]) diff --git a/m4/rivet.m4 b/m4/rivet.m4 --- a/m4/rivet.m4 +++ b/m4/rivet.m4 @@ -1,83 +1,83 @@ dnl ##### RIVET ##### AC_DEFUN([THEPEG_CHECK_RIVET], [ AC_REQUIRE([THEPEG_CHECK_HEPMC]) AC_REQUIRE([THEPEG_CHECK_GSL]) AC_MSG_CHECKING([for Rivet location]) RIVETINCLUDE="" LOAD_RIVET="" RIVETLIBS="-lRivet" AC_ARG_WITH(rivet, - AC_HELP_STRING([--with-rivet=DIR],[Location of Rivet installation @<:@default=system libs@:>@]), + AS_HELP_STRING([--with-rivet=DIR],[Location of Rivet installation @<:@default=system libs@:>@]), [], [with_rivet=system]) if test "x$with_hepmc" = "xno"; then with_rivet=no fi if test "x$with_rivet" = "xno"; then AC_MSG_RESULT([Rivet support disabled.]) elif test "x$with_rivet" = "xsystem"; then AC_MSG_RESULT([in system libraries]) oldlibs="$LIBS" LIBS="$LIBS $HEPMCLIBS" AC_CHECK_LIB(Rivet,main, [], [with_rivet=no AC_MSG_WARN([Rivet >= 1.3 not found in system libraries]) ]) RIVETLIBS="$LIBS" LIBS=$oldlibs else AC_MSG_RESULT([$with_rivet]) RIVETINCLUDE="$( $with_rivet/bin/rivet-config --cppflags )" RIVETLIBS="-L$with_rivet/lib -R$with_rivet/lib -lRivet" if test "${host_cpu}" == "x86_64" -a -e $with_rivet/lib64/libRivet.so ; then RIVETLIBS="-L$with_rivet/lib64 -R$with_rivet/lib64 -lRivet" fi fi if test "x$with_rivet" != "xno"; then LOAD_RIVET="library RivetAnalysis.so" # Now lets see if the libraries work properly oldLIBS="$LIBS" oldLDFLAGS="$LDFLAGS" oldCPPFLAGS="$CPPFLAGS" LIBS="$LIBS `echo $HEPMCLIBS | sed -e 's! -R.* ! !'` `echo $RIVETLIBS | sed -e 's! -R.* ! !'` `echo $GSLLIBS | sed -e 's! -R.* ! !'`" LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $HEPMCINCLUDE $RIVETINCLUDE $GSLINCLUDE" # check Rivet AC_MSG_CHECKING([that Rivet works]) AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <Rivet/AnalysisHandler.hh> ]],[[Rivet::AnalysisHandler foo; foo.writeData("foo");]])],[AC_MSG_RESULT([yes])],[AC_MSG_RESULT([no]) AC_MSG_RESULT([No. Use '--with-rivet=' to set a path to Rivet >= 1.3'.]) with_rivet="no" LOAD_RIVET="" ]) LIBS="$oldLIBS" LDFLAGS="$oldLDFLAGS" CPPFLAGS="$oldCPPFLAGS" fi rivetversion=1 if test "x$with_rivet" = "xsystem"; then echo $( rivet-config --version ) | grep -q '^2\.' && rivetversion=2 echo $( rivet-config --version ) | grep -q '^3\.' && rivetversion=3 echo $( rivet-config --version ) | grep -q '^4\.' && rivetversion=4 elif test "x$with_rivet" != "xno"; then echo $( "$with_rivet/bin/rivet-config" --version ) | grep -q '^2\.' && rivetversion=2 echo $( "$with_rivet/bin/rivet-config" --version ) | grep -q '^3\.' && rivetversion=3 echo $( "$with_rivet/bin/rivet-config" --version ) | grep -q '^4\.' && rivetversion=4 fi AC_DEFINE_UNQUOTED([ThePEG_RIVET_VERSION], [$rivetversion], [Rivet major version (1,2,3)]) AM_CONDITIONAL(HAVE_RIVET,[test "x$with_rivet" != "xno"]) AC_SUBST(RIVETINCLUDE) AC_SUBST(RIVETLIBS) AC_SUBST(LOAD_RIVET) ]) diff --git a/m4/thepeg.m4 b/m4/thepeg.m4 --- a/m4/thepeg.m4 +++ b/m4/thepeg.m4 @@ -1,410 +1,410 @@ # Check for ThePEG. AC_DEFUN([THEPEG_CHECK_THEPEG], [THEPEGBUILD="no" AC_MSG_CHECKING([if THEPEGPATH is set]) if test -z "$THEPEGPATH"; then if test -f "../ThePEG/Config/config.h"; then THEPEGPATH="\$(top_builddir)/../ThePEG" THEPEGBUILD="yes" AC_MSG_RESULT([no (using ../ThePEG)]) AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_builddir)/../ThePEG/include " SETUPTHEPEG="$THEPEGPATH/src/setupThePEG -L $THEPEGPATH/lib" RUNTHEPEG="$THEPEGPATH/src/runThePEG -L $THEPEGPATH/lib" THEPEGDOC="\$(top_builddir)/../ThePEG/Doc" THEPEGLIB="\$(top_builddir)/../ThePEG/lib" else if test "x$prefix" == "xNONE"; then THEPEGPATH=$ac_default_prefix else THEPEGPATH=$prefix fi AC_MSG_RESULT([no (using $THEPEGPATH)]) fi else AC_MSG_RESULT([yes ($THEPEGPATH)]) fi if test "$THEPEGBUILD" == "no"; then AM_CPPFLAGS="-I\$(top_builddir)/include -I$THEPEGPATH/include " SETUPTHEPEG="$THEPEGPATH/bin/setupThePEG" RUNTHEPEG="$THEPEGPATH/bin/runThePEG" THEPEGDOC="$THEPEGPATH/share/ThePEG/Doc" THEPEGLIB="$THEPEGPATH/lib/ThePEG" AC_MSG_CHECKING([if the installed ThePEG works]) if test -x $SETUPTHEPEG && $SETUPTHEPEG /dev/null; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR(ThePEG must be installed and THEPEGPATH set properly.) fi fi AC_ARG_VAR(THEPEGPATH,[The path to where ThePEG is installed. Default is $prefix unless we are working in a sister of the build directory of ThePEG.]) pkglibdir="\$(libdir)/ThePEG" AC_SUBST(pkglibdir) AC_SUBST(THEPEGPATH) AC_SUBST(THEPEGINCLUDE) AC_SUBST(THEPEGDOC) AC_SUBST(THEPEGLIB) AC_SUBST(SETUPTHEPEG) AC_SUBST(RUNTHEPEG) AC_SUBST(AM_CPPFLAGS) ]) # Search for ThePEG in standard places. AC_DEFUN([THEPEG_SEARCH_THEPEG], [THEPEGBUILD="no" AC_MSG_CHECKING([if THEPEGPATH is set]) if test -z "$THEPEGPATH"; then if test -f "../ThePEG/Config/config.h"; then THEPEGPATH="\$(top_builddir)/../ThePEG" THEPEGBUILD="yes" AC_MSG_RESULT([no (found ../ThePEG)]) AM_CPPFLAGS="-I\$(top_builddir)/include -I\$(top_builddir)/../ThePEG/include " SETUPTHEPEG="$THEPEGPATH/src/setupThePEG -L $THEPEGPATH/lib" RUNTHEPEG="$THEPEGPATH/src/runThePEG -L $THEPEGPATH/lib" THEPEGDOC="\$(top_builddir)/../ThePEG/Doc" THEPEGLIB="\$(top_builddir)/../ThePEG/lib" else for dirbase in / /usr $ac_default_prefix $prefix; do if test -f $dirbase/include/ThePEG/Config/config.h; then THEPEGPATH=$dirbase fi done if test -z "$THEPEGPATH"; then AC_MSG_RESULT([no]) AC_MSG_ERROR(Could not find a valid ThePEG installation or build directory) else AC_MSG_RESULT([no (found $THEPEGPATH)]) fi fi else AC_MSG_RESULT([yes ($THEPEGPATH)]) fi if test "$THEPEGBUILD" == "no"; then AM_CPPFLAGS="-I\$(top_builddir)/include -I$THEPEGPATH/include " SETUPTHEPEG="$THEPEGPATH/bin/setupThePEG" RUNTHEPEG="$THEPEGPATH/bin/runThePEG" THEPEGDOC="$THEPEGPATH/share/ThePEG/Doc" THEPEGLIB="$THEPEGPATH/lib/ThePEG" AC_MSG_CHECKING([if the installed ThePEG works]) if test -x $SETUPTHEPEG && $SETUPTHEPEG /dev/null; then AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) AC_MSG_ERROR(ThePEG must be installed and THEPEGPATH set properly.) fi fi AC_ARG_VAR(THEPEGPATH,[The path to where ThePEG is installed. Default is $prefix unless we are working in a sister of the build directory of ThePEG.]) pkglibdir="\$(libdir)/ThePEG" AC_SUBST(pkglibdir) AC_SUBST(THEPEGPATH) AC_SUBST(THEPEGINCLUDE) AC_SUBST(THEPEGDOC) AC_SUBST(THEPEGLIB) AC_SUBST(SETUPTHEPEG) AC_SUBST(RUNTHEPEG) AC_SUBST(AM_CPPFLAGS) ]) AC_DEFUN([THEPEG_EMPTY_SUBST], [EMPTY="" AC_SUBST(EMPTY) ]) AC_DEFUN([THEPEG_SEARCH_PREFIXDIR_FILES], [AC_MSG_CHECKING([if $1 and $2 is set]) if test -z "$$1"; then for dirbase in / /usr $ac_default_prefix $prefix; do if test -z "$$2"; then for filename in $4; do if test -f $dirbase/$3/$filename; then $1=$dirbase/$3 $2=$filename fi done else if test -f $dirbase/$3/$$2; then $1=$dirbase/$3 fi fi done if test -z "$$1" -o -z "$$2"; then AC_MSG_ERROR(no. Could not guess appropriate value for $1 and $2) else AC_MSG_RESULT([no (found $$1 and $$2)]) fi else if test -z "$$2"; then for filename in $4; do if test -f $$1/$filename; then $2=$filename fi done AC_MSG_RESULT([no (found $$1 and $$2)]) else if test -f $$1/$$2; then AC_MSG_RESULT([yes ($$1 and $$2)]) else AC_MSG_ERROR(no. Could not guess appropriate value for $1 and $2) fi fi fi AC_ARG_VAR($1,[$5]) AC_ARG_VAR($2,[$6]) ]) AC_DEFUN([THEPEG_CHECK_PREFIXDIR], [AC_MSG_CHECKING([if $1 is set]) if test -z "$$1"; then if test -d $prefix/$2; then $1=$prefix/$2 elif test -d $ac_default_prefix/$2; then $1=$ac_default_prefix/$2 elif test -d /usr/$2; then $1=/usr/$2 elif test -d /$2; then $1=/$2 else AC_MSG_ERROR(no. Could not guess appropriate value for $1) fi AC_MSG_RESULT([no (using $$1)]) else AC_MSG_RESULT([yes ($$1)]) fi AC_ARG_VAR($1,[$3]) ]) AC_DEFUN([THEPEG_CHECK_ENVDEFAULT], [AC_MSG_CHECKING([if $1 is set]) if test -z "$$1"; then $1="$2" AC_MSG_RESULT([no (using $$1)]) else AC_MSG_RESULT([yes ($$1)]) fi AC_ARG_VAR($1,[$3]) ]) AC_DEFUN([THEPEG_DEFINE_ENVDEFAULT], [AC_MSG_CHECKING([if $2 is set]) if test -z "$$2"; then $2="$3" AC_MSG_RESULT([no (using $$2)]) else AC_MSG_RESULT([yes ($$2)]) fi AC_ARG_VAR($2,[$4]) AC_DEFINE_UNQUOTED($1,"$$2",[$4]) ]) AC_DEFUN([THEPEG_CHECK_EXPM1], [echo $ECHO_N "checking for expm1... $ECHO_C" 1>&6 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath> ]], [[expm1(1.0); ]])],[AC_DEFINE(ThePEG_HAS_EXPM1,1,define if expm1 is available) echo "${ECHO_T}yes" 1>&6 ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_CHECK_LOG1P], [echo $ECHO_N "checking for log1p... $ECHO_C" 1>&6 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <cmath> ]], [[log1p(1.0); ]])],[AC_DEFINE(ThePEG_HAS_LOG1P,1,define if log1p is available) echo "${ECHO_T}yes" 1>&6 ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_CHECK_DLOPEN], [echo $ECHO_N "checking for dlopen... $ECHO_C" 1>&6 # do this with libtool! AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <dlfcn.h> ]], [[dlopen("", 1); ]])],[AC_DEFINE(ThePEG_HAS_DLOPEN,1,define if dlopen is available) echo "${ECHO_T}yes" 1>&6 ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_CHECK_SSTREAM], [echo $ECHO_N "checking for <sstream>... $ECHO_C" 1>&6 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sstream> ]], [[std::ostringstream os; ]])],[AC_DEFINE(ThePEG_HAS_SSTREAM,1,define if sstream is available) echo "${ECHO_T}yes" 1>&6 ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_CHECK_FPUCONTROL], [ AC_REQUIRE([AX_COMPILER_VENDOR]) echo $ECHO_N "checking for <fpu_control>... $ECHO_C" 1>&6 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fpu_control.h> ]], [[fpu_control_t cw; _FPU_GETCW(cw); cw &= ~(_FPU_MASK_IM|_FPU_MASK_DM|_FPU_MASK_ZM|_FPU_MASK_OM); _FPU_SETCW(cw); ]])],[ if test "${ax_cv_cxx_compiler_vendor}" == "clang"; then echo "${ECHO_T}not useable with clang/llvm" 1>&6 else AC_DEFINE(ThePEG_HAS_FPU_CONTROL,1,define if fpucontrol is available) echo "${ECHO_T}yes" 1>&6 fi ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_CHECK_FENV], [ AC_REQUIRE([AX_COMPILER_VENDOR]) echo $ECHO_N "checking for <fenv.h>... $ECHO_C" 1>&6 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <fenv.h> ]], [[feenableexcept(FE_DIVBYZERO|FE_OVERFLOW|FE_INVALID);]])],[ if test "${ax_cv_cxx_compiler_vendor}" == "clang"; then echo "${ECHO_T}not useable with clang/llvm" 1>&6 else AC_DEFINE(ThePEG_HAS_FENV,1,define if fenv is available) echo "${ECHO_T}yes" 1>&6 fi ],[echo "${ECHO_T}no" 1>&6])]) AC_DEFUN([THEPEG_ADD_THEPEG_PATH], [if test "$THEPEGBUILD" == "yes"; then if test -f "../$2/Config/config.h"; then $1="\$(top_builddir)/../$2/lib" SETUPTHEPEG="$SETUPTHEPEG -L\$(top_builddir)/../$2/lib" RUNTHEPEG="$RUNTHEPEG -L\$(top_builddir)/../$2/lib" AM_CPPFLAGS="$AM_CPPFLAGS -I\$(top_builddir)/../$2/include" fi else $1="$THEPEGLIB" fi AC_SUBST($1) ]) AC_DEFUN([THEPEG_HAS_JAVA], [ hasjava=yes AC_PATH_PROG(JAVAC, javac) AC_PATH_PROG(JAVA, java) AC_PATH_PROG(JAR, jar) if test -z "$JAR" -o -z "$JAVA" -o -z "$JAVAC"; then hasjava=no; else AC_MSG_CHECKING([if java works]) echo 'public class conftest { public static void main(String[[]]arg){}}' > conftest.java $JAVAC -source $1 conftest.java 1>&5 2>&5 if test $? -ne 0; then hasjava=no; fi echo "Main-Class: conftest" > conftest.manifest $JAR cmf conftest.manifest conftest.jar conftest.class 1>&5 2>&5 if test $? -ne 0; then hasjava=no; fi $JAVA -jar conftest.jar 1>&5 2>&5 if test $? -ne 0; then hasjava=no; fi rm -f conftest.java conftest.err conftest.class conftest.manifest conftest.jar fi if test "x$hasjava" != "xno"; then AC_MSG_RESULT([yes]) $2 else AC_MSG_RESULT([no]) $3 fi ]) AC_DEFUN([THEPEG_LIBTOOL_VERSION_INFO], [ LIBTOOLVERSIONINFO="-version-info $1:$2:$3" AC_SUBST(LIBTOOLVERSIONINFO)]) AC_DEFUN([THEPEG_CHECK_GSL], [ AC_MSG_CHECKING([for gsl location]) GSLINCLUDE="" GSLLIBS="" AC_ARG_WITH(gsl, - AC_HELP_STRING([--with-gsl=path],[location of gsl installation. Default: system lib]), + AS_HELP_STRING([--with-gsl=path],[location of gsl installation. Default: system lib]), [], [with_gsl=system]) if test "x$with_gsl" = "xno"; then AC_MSG_ERROR([libgsl is required. Please install the GNU scientific library and header files.]) fi if test "x$with_gsl" = "xsystem"; then AC_MSG_RESULT([in system libraries]) oldlibs="$LIBS" AC_CHECK_LIB(m,sqrt) AC_CHECK_LIB(gslcblas,cblas_srot) AC_CHECK_LIB(gsl,gsl_ran_poisson,[], [ AC_MSG_ERROR([Cannot find libgsl. Please install the GNU scientific library.]) ] ) GSLLIBS="$LIBS" LIBS=$oldlibs GSLPATH="$with_gsl" else if test "`uname -m`" = "x86_64" -a -e "$with_gsl/lib64/libgsl.a" -a -d "$with_gsl/include/gsl"; then AC_MSG_RESULT([found in $with_gsl]) GSLLIBS="-L$with_gsl/lib64 -R$with_gsl/lib64 -lgsl -lgslcblas" GSLINCLUDE="-I$with_gsl/include" GSLPATH="$with_gsl" elif test -e "$with_gsl/lib/libgsl.a" -a -d "$with_gsl/include/gsl"; then AC_MSG_RESULT([found in $with_gsl]) GSLLIBS="-L$with_gsl/lib -R$with_gsl/lib -lgsl -lgslcblas" GSLINCLUDE="-I$with_gsl/include" GSLPATH="$with_gsl" else AC_MSG_RESULT([not found]) AC_MSG_ERROR([Can't find $with_gsl/lib/libgsl.a or the headers in $with_gsl/include]) fi fi dnl AM_CONDITIONAL(HAVE_GSL,[test "x$with_HepMC" != "xno"]) AC_SUBST(GSLINCLUDE) AC_SUBST(GSLLIBS) AC_SUBST(GSLPATH) ]) AC_DEFUN([THEPEG_BOOST_UNIT_TEST], [ AC_REQUIRE([BOOST_REQUIRE]) if test "x$BOOST_NOT_FOUND" = "xtrue"; then BOOSTMESSAGE="Boost not found." AC_SUBST([BOOST_ACTIVATE_UNIT_TESTS],[false]) elif test -z "$BOOST_UNIT_TEST_FRAMEWORK_LDPATH"; then BOOSTMESSAGE="Boost unit test libs not found." AC_SUBST([BOOST_ACTIVATE_UNIT_TESTS],[false]) AC_SUBST([BOOST_NOT_FOUND],[false]) else BOOSTMESSAGE="$BOOST_UNIT_TEST_FRAMEWORK_LDPATH" AC_SUBST([BOOST_ACTIVATE_UNIT_TESTS],[true]) AC_SUBST([BOOST_NOT_FOUND],[false]) fi AC_SUBST(BOOSTMESSAGE) AM_CONDITIONAL([COND_BOOSTTEST], [test "x$BOOST_ACTIVATE_UNIT_TESTS" = "xtrue"]) ]) AC_DEFUN([THEPEG_OVERVIEW], [ CXXSTRING=`$CXX --version | head -1` cat << _THEPEG_EOF_ > config.thepeg ***************************************************** *** $PACKAGE_STRING configuration summary *** Please include this information in bug reports! ***-------------------------------------------------- *** Prefix: $prefix *** *** Dimension checks: yes *** *** GSL: $with_gsl *** *** LHAPDF: $lhaconfig ($lhapdf_version) $warnlhapdf *** HepMC: $with_hepmc *** Rivet: $with_rivet *** FastJet: $fjconfig $warnfastjet *** *** Boost Unit Tests: ${BOOSTMESSAGE} *** *** Host: $host *** CXX: $CXXSTRING *** *** CXXFLAGS: $CXXFLAGS ***************************************************** _THEPEG_EOF_ ]) diff --git a/m4/vl_readline.m4 b/m4/vl_readline.m4 --- a/m4/vl_readline.m4 +++ b/m4/vl_readline.m4 @@ -1,65 +1,65 @@ dnl http://autoconf-archive.cryp.to/vl_lib_readline.html dnl dnl Copyright © 2008 Ville Laurikari <vl@iki.fi> dnl dnl Modifications for ThePEG: dnl Copyright © 2009 D.Grellscheid <herwig@projects.hepforge.org> dnl dnl Copying and distribution of this file, with or without modification, dnl are permitted in any medium without royalty provided the copyright dnl notice and this notice are preserved. dnl AC_DEFUN([VL_LIB_READLINE], [ AC_ARG_ENABLE(readline, - AC_HELP_STRING([--disable-readline],[turns off readline support.]), + AS_HELP_STRING([--disable-readline],[turns off readline support.]), [], [enable_readline=yes] ) if test "$enable_readline" = "yes"; then AC_CACHE_CHECK([for a readline compatible library], vl_cv_lib_readline, [ ORIG_LIBS="$LIBS" for readline_lib in readline edit editline; do for termcap_lib in "" termcap curses ncurses; do if test -z "$termcap_lib"; then TRY_LIB="-l$readline_lib" else TRY_LIB="-l$readline_lib -l$termcap_lib" fi LIBS="$ORIG_LIBS $TRY_LIB" AC_TRY_LINK_FUNC(readline, vl_cv_lib_readline="$TRY_LIB") if test -n "$vl_cv_lib_readline"; then break fi done if test -n "$vl_cv_lib_readline"; then break fi done if test -z "$vl_cv_lib_readline"; then vl_cv_lib_readline="no" LIBS="$ORIG_LIBS" fi ]) if test "$vl_cv_lib_readline" != "no"; then AC_DEFINE(HAVE_LIBREADLINE, 1, [Define if you have a readline compatible library]) AC_CHECK_HEADERS(readline.h readline/readline.h) AC_CACHE_CHECK([whether readline supports history], vl_cv_lib_readline_history, [ vl_cv_lib_readline_history="no" AC_TRY_LINK_FUNC(add_history, vl_cv_lib_readline_history="yes") ]) if test "$vl_cv_lib_readline_history" = "yes"; then AC_DEFINE(HAVE_READLINE_HISTORY, 1, [Define if your readline library has \`add_history']) AC_CHECK_HEADERS(history.h readline/history.h) fi fi fi ])dnl diff --git a/src/thepeg-config.in b/src/thepeg-config.in --- a/src/thepeg-config.in +++ b/src/thepeg-config.in @@ -1,62 +1,62 @@ #! /usr/bin/env bash # @configure_input@ prefix=@prefix@ exec_prefix=@exec_prefix@ datarootdir=@datarootdir@ -tmp=$(echo $* | egrep -- '--\<help\>|-\<h\>') +tmp=$(echo $* | grep -E -- '--\<help\>|-\<h\>') 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 -- '--\<prefix\>') +tmp=$(echo "$*" | grep -E -- '--\<prefix\>') test -n "$tmp" && echo $prefix -tmp=$(echo "$*" | egrep -- '--\<datadir\>') +tmp=$(echo "$*" | grep -E -- '--\<datadir\>') test -n "$tmp" && echo @datadir@/@PACKAGE_TARNAME@ -tmp=$(echo "$*" | egrep -- '--\<libdir\>') +tmp=$(echo "$*" | grep -E -- '--\<libdir\>') test -n "$tmp" && echo @libdir@/@PACKAGE_TARNAME@ -tmp=$(echo "$*" | egrep -- '--\<includedir\>') +tmp=$(echo "$*" | grep -E -- '--\<includedir\>') test -n "$tmp" && echo @includedir@ -tmp=$(echo "$*" | egrep -- '--\<cppflags\>') +tmp=$(echo "$*" | grep -E -- '--\<cppflags\>') test -n "$tmp" && echo -I@includedir@ @BOOST_CPPFLAGS@ @GSLINCLUDE@ -tmp=$(echo "$*" | egrep -- '--\<ldflags\>') +tmp=$(echo "$*" | grep -E -- '--\<ldflags\>') test -n "$tmp" && echo @LDFLAGS@ -tmp=$(echo "$*" | egrep -- '--\<ldlibs\>') +tmp=$(echo "$*" | grep -E -- '--\<ldlibs\>') test -n "$tmp" && echo @LIBS@ -tmp=$(echo "$*" | egrep -- '--\<rivet-include\>') +tmp=$(echo "$*" | grep -E -- '--\<rivet-include\>') test -n "$tmp" && echo @RIVETINCLUDE@ -tmp=$(echo "$*" | egrep -- '--\<fastjet-include\>') +tmp=$(echo "$*" | grep -E -- '--\<fastjet-include\>') test -n "$tmp" && echo @FASTJETINCLUDE@ -tmp=$(echo "$*" | egrep -- '--\<rivet-libs\>') +tmp=$(echo "$*" | grep -E -- '--\<rivet-libs\>') test -n "$tmp" && echo @RIVETLIBS@ -tmp=$(echo "$*" | egrep -- '--\<fastjet-libs\>') +tmp=$(echo "$*" | grep -E -- '--\<fastjet-libs\>') test -n "$tmp" && echo @FASTJETLIBS@