Page MenuHomeHEPForge

No OneTemporary

Index: trunk/configure.ac
===================================================================
--- trunk/configure.ac (revision 5879)
+++ trunk/configure.ac (revision 5880)
@@ -1,742 +1,748 @@
dnl configure.ac -- Main configuration script for WHIZARD
dnl
dnl Process this file with autoconf to produce a configure script.
dnl ************************************************************************
dnl configure -- Main configuration script for WHIZARD
dnl configure.ac -- WHIZARD configuration
dnl
dnl Copyright (C) 1999-2014 by
dnl Wolfgang Kilian <kilian@physik.uni-siegen.de>
dnl Thorsten Ohl <ohl@physik.uni-wuerzburg.de>
dnl Juergen Reuter <juergen.reuter@desy.de>
dnl with contributions from
dnl Christian Speckner <cnspeckn@googlemail.com>
dnl and others
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([WHIZARD],[2.2.2])
AM_INIT_AUTOMAKE([1.11 color-tests parallel-tests])
AC_PREREQ([2.65])
dnl Caveat: automake internal macro
AM_MAKE_INCLUDE
########################################################################
### Package-specific initialization
AC_MSG_NOTICE([**************************************************************])
WO_CONFIGURE_SECTION([Start of package configuration])
### Further version information
PACKAGE_DATE="July 1 2014"
PACKAGE_STATUS="alpha"
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 1:0:0"
AC_SUBST([LIBRARY_VERSION])
########################################################################
### 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])
### 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])
########################################################################
### Required programs and checks
###---------------------------------------------------------------------
### GNU Tools
WO_CONFIGURE_SECTION([Generic tools])
### Initialize LIBTOOL
LT_INIT(dlopen)
LT_PREREQ([2.2.6b])
AX_CHECK_GNU_MAKE()
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)
########################################################################
### 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/.*<key>CFBundleShortVersionString<\/key>.<string>\([[0-9.]]*\)<\/string>.*/\1/'`
fi
AC_MSG_RESULT([$XCODE_VERSION])
AC_SUBST(XCODE_VERSION)
fi
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"])
########################################################################
if test "$enable_shared" = no; then
AC_MSG_ERROR([you've used --disable-shared which will not produce a working Whizard.])
fi
########################################################################
### 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_PS2PDF()
AC_PROG_EPSPDF()
AC_PROG_EPSTOPDF()
AC_PROG_SUPP_PDF()
AC_PROG_GZIP()
AC_PATH_PROG(ACROREAD,acroread,false)
AC_PATH_PROG(GHOSTVIEW,gv ghostview,false)
AC_PATH_PROG(DOT,dot,false)
### 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 PYTHIA F77 files
AC_PROG_F77([$FC])
### Determine compiler vendor and version
WO_FC_GET_VENDOR_AND_VERSION()
### Veto against gfortran 4.5/4.6/4.7.0
WO_FC_VETO_GFORTRAN_456()
WO_FC_VETO_GFORTRAN_470()
### Work around the `-g' vs. `-g90' confusion at NAG:
### (NB: apparently `echo -n' is not portable (OSX).
### Let's hope that tr is ...)
if test X"${user_FCFLAGS}" = X; then
if test X"${FC_VENDOR}" = X"NAG"; then
FCFLAGS="`for f in ${FCFLAGS}; do case $f in "-g") echo "-g90";; *) echo $f;; esac; done | tr '\n\r' ' '`"
fi
fi
### 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 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()
### Check for quadruple precision support
WO_FC_CHECK_QUADRUPLE()
### Check for quadruple precision support in the C interface
WO_FC_CHECK_QUADRUPLE_C()
### Quadruple precision enforced upon request
WO_FC_SET_PRECISION()
### Warn about gfortran 4.7 (currently not necessary)
# WO_FC_WARN_GFORTRAN_47()
### OpenMP threading activated upon request
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], [FC_MODULE_EXT], [$FC], [f90])
###---------------------------------------------------------------------
### 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(310000)
AC_PROG_OCAMLLEX()
AC_PROG_OCAMLYACC()
AC_PROG_OCAMLCP()
### Ocamlweb is required to be newer than v0.9
AC_PROG_OCAMLWEB(009000)
AC_PROG_OCAML_LABLGTK()
AC_PATH_PROGS(OCAMLDOT,ocamldot)
AC_PATH_PROGS(OCAMLDEFUN,ocamldefun)
else
AC_MSG_NOTICE([WARNING: O'Caml and O'Mega matrix elements disabled by request!])
AM_CONDITIONAL([OCAMLWEB_AVAILABLE],[false])
fi
########################################################################
### Libraries
###---------------------------------------------------------------------
### LHAPDF
WO_CONFIGURE_SECTION([LHAPDF])
+AC_PROG_CXX()
WO_PROG_LHAPDF()
###---------------------------------------------------------------------
### HepMC
WO_CONFIGURE_SECTION([HepMC])
AC_PROG_CXX()
WO_PROG_HEPMC()
###---------------------------------------------------------------------
### STDHEP
AC_PROG_FC()
WO_CONFIGURE_SECTION([STDHEP])
WO_PROG_STDHEP()
###---------------------------------------------------------------------
### PYTHIA
WO_CONFIGURE_SECTION([SHOWERS PYTHIA MPI])
WO_PROG_QCD()
###---------------------------------------------------------------------
### HOPPET
AC_PROG_FC()
WO_CONFIGURE_SECTION([HOPPET])
WO_PROG_HOPPET()
###---------------------------------------------------------------------
### FASTJET
AC_PROG_FC()
WO_CONFIGURE_SECTION([FASTJET])
WO_PROG_FASTJET()
###---------------------------------------------------------------------
### Extra flags for helping the linker finding libraries
LDFLAGS_STATIC="$wo_ldflags_stdcpp"
AC_SUBST([LDFLAGS_STATIC])
########################################################################
### 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"])
###---------------------------------------------------------------------
### Disable default checks upon request
AC_ARG_ENABLE([default_checks],
[AS_HELP_STRING([--disable-default-checks],
[disable the default self-checks [[no]]])])
AC_CACHE_CHECK([whether we want the default self-checks],
[wo_cv_default_checks],
[dnl
if test "$enable_default_checks" != "no"; then
wo_cv_default_checks=yes
else
wo_cv_default_checks=no
fi])
AM_CONDITIONAL([DEFAULT_CHECKS],
[test "$enable_default_checks" != "no"])
###---------------------------------------------------------------------
### Enable numerical checks upon request
AC_ARG_ENABLE([extnum_checks],
[AS_HELP_STRING([--enable-extnum-checks],
[enable time-consuming extensive SM, SUSY and models checks [[no]]])])
AC_CACHE_CHECK([whether we want extra extensive checks],
[wo_cv_extnum_checks],
[dnl
if test "$enable_extnum_checks" = "yes"; then
wo_cv_extnum_checks=yes
else
wo_cv_extnum_checks=no
fi])
AM_CONDITIONAL([EXT_NUM_CHECKS],
[test "$enable_extnum_checks" = "yes"])
###---------------------------------------------------------------------
### Checks for external interfaces
WO_CONFIGURE_SECTION([Auxiliary stuff for external interfaces])
AX_PYTHON()
########################################################################
### Wrapup
WO_CONFIGURE_SECTION([Finalize configuration])
###--------------------------------------------------------------------
### Main directory
AC_CONFIG_FILES([Makefile])
###---------------------------------------------------------------------
### Subdirectory src
AC_CONFIG_FILES([src/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/hepmc
AC_CONFIG_FILES([src/hepmc/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/pythia: WHIZARD's PYTHIA version
AC_CONFIG_FILES([src/pythia/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/stdhep: dummy library as STDHEP replacement
AC_CONFIG_FILES([src/stdhep/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/hoppet
AC_CONFIG_FILES([src/hoppet/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/fastjet
AC_CONFIG_FILES([src/fastjet/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/shower: shower and all that
AC_CONFIG_FILES([src/shower/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/misc: numeric kinds, strings
AC_CONFIG_FILES([src/misc/Makefile] [src/misc/kinds.f90])
AC_CONFIG_FILES([src/misc/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/misc/system_dependencies.f90 > \
src/misc/system_dependencies.tmp
mv -f src/misc/system_dependencies.tmp src/misc/system_dependencies.f90
])
###---------------------------------------------------------------------
### Subdirectory src/models
AC_CONFIG_FILES([src/models/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/models/threeshl_bundle
AC_CONFIG_FILES([src/models/threeshl_bundle/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/vamp
AC_CONFIG_SUBDIRS([src/vamp])
###---------------------------------------------------------------------
### Subdirectory src/whizard-core
AC_CONFIG_FILES([src/whizard-core/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/prebuilt
AC_CONFIG_FILES([src/prebuilt/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/omega
AC_CONFIG_SUBDIRS([src/omega])
###---------------------------------------------------------------------
### Subdirectory src/feynmf
AC_CONFIG_FILES([src/feynmf/Makefile])
###---------------------------------------------------------------------
### Subdirectory src/circe1
AC_CONFIG_SUBDIRS([src/circe1])
###---------------------------------------------------------------------
### Subdirectory src/circe2
AC_CONFIG_SUBDIRS([src/circe2])
###---------------------------------------------------------------------
### Subdirectory src/gamelan: WHIZARD graphics package
AC_CONFIG_FILES([src/gamelan/Makefile])
AC_CONFIG_FILES([src/gamelan/gml], [chmod u+x src/gamelan/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/interfaces
AC_CONFIG_FILES([share/interfaces/Makefile])
AC_CONFIG_FILES([share/interfaces/py_whiz_setup.py])
###---------------------------------------------------------------------
### Subdirectory tests
AC_CONFIG_FILES([tests/Makefile])
AC_CONFIG_FILES([tests/run_whizard.sh], [chmod u+x tests/run_whizard.sh])
###---------------------------------------------------------------------
### Subdirectory libtool-config
AC_CONFIG_SUBDIRS([libtool-config])
###--------------------------------------------------------------------
### 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])
AC_CONFIG_FILES([scripts/libtool-config.sh], [chmod u+x scripts/libtool-config.sh])
AC_CONFIG_FILES([scripts/libtool-relocate.sh], [chmod u+x scripts/libtool-relocate.sh])
AC_CONFIG_FILES([scripts/whizard-relocate.sh], [chmod u+x scripts/whizard-relocate.sh])
###--------------------------------------------------------------------
AC_OUTPUT()
########################################################################
Index: trunk/m4/lhapdf.m4
===================================================================
--- trunk/m4/lhapdf.m4 (revision 5879)
+++ trunk/m4/lhapdf.m4 (revision 5880)
@@ -1,170 +1,211 @@
dnl lhapdf.m4 -- checks for LHAPDF library
dnl
### Determine paths to LHAPDF components
### Sets LDFLAGS_LHAPDF and the conditional LHAPDF_AVAILABLE if successful
### Also: LHAPDF_ROOT LHAPDF_VERSION LHAPDF_PDFSETS_PATH
AC_DEFUN([WO_PROG_LHAPDF],
[dnl
AC_REQUIRE([AC_PROG_FC])
AC_ARG_ENABLE([lhapdf],
[AS_HELP_STRING([--enable-lhapdf],
[enable LHAPDF for structure functions [[yes]]])],
[], [enable_lhapdf="yes"])
if test "$enable_lhapdf" = "yes"; then
if test -n "$LHAPDF_DIR"; then
wo_lhapdf_config_path=$LHAPDF_DIR/bin:$PATH
else
wo_lhapdf_config_path=$PATH
fi
AC_PATH_PROG([LHAPDF], [lhapdf], [no],
[$wo_lhapdf_config_path])
if test "$LHAPDF" != "no"; then
AC_CACHE_CHECK([the LHAPDF version],
[wo_cv_lhapdf_version],
[dnl,
wo_cv_lhapdf_version=[`$LHAPDF --version | $SED -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'`]
])
LHAPDF_FULL_VERSION="wo_cv_lhapdf_version"
AC_SUBST([LHAPDF_FULL_VERSION])
AC_CACHE_CHECK([the major version],
[wo_cv_lhapdf_major_version],
[wo_cv_lhapdf_major_version=[`echo $wo_cv_lhapdf_version | $SED -e 's/\([0-9][0-9]*\)\..*/\1/'`]
])
LHAPDF_MAJOR_VERSION="$wo_cv_lhapdf_major_version"
AC_SUBST([LHAPDF_MAJOR_VERSION])
+ AC_PATH_PROG([LHAPDF_CONFIG], [lhapdf-config], [no],
+ [$wo_lhapdf_config_path])
+
+ AC_MSG_CHECKING([the LHAPDF pdfsets path])
+ LHAPDF_PDFSETS_PATH=`$LHAPDF_CONFIG --datadir`
+ AC_MSG_RESULT([$LHAPDF_PDFSETS_PATH])
+
else
AC_PATH_PROG([LHAPDF_CONFIG], [lhapdf-config], [no],
[$wo_lhapdf_config_path])
if test "$LHAPDF_CONFIG" != "no"; then
LHAPDF_ROOT=`$LHAPDF_CONFIG --prefix`
AC_CACHE_CHECK([the LHAPDF version],
[wo_cv_lhapdf_version],
[dnl,
wo_cv_lhapdf_version=[`$LHAPDF_CONFIG --version | $SED -e 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/'`]
])
LHAPDF_FULL_VERSION="wo_cv_lhapdf_version"
AC_SUBST([LHAPDF_FULL_VERSION])
AC_CACHE_CHECK([the major version],
[wo_cv_lhapdf_major_version],
[wo_cv_lhapdf_major_version=[`echo $wo_cv_lhapdf_version | $SED -e 's/\([0-9][0-9]*\)\..*/\1/'`]
])
LHAPDF_MAJOR_VERSION="$wo_cv_lhapdf_major_version"
AC_SUBST([LHAPDF_MAJOR_VERSION])
AC_MSG_CHECKING([the LHAPDF pdfsets path])
LHAPDF_PDFSETS_PATH=`$LHAPDF_CONFIG --pdfsets-path`
- if test "$LHAPDF_VERSION" = "5.5.0"; then
+ if test "$LHAPDF_FULL_VERSION" = "5.5.0"; then
LHAPDF_PDFSETS_PATH=`$LHAPDF_CONFIG --datarootdir`$LHAPDF_PDFSETS_PATH
fi
AC_MSG_RESULT([$LHAPDF_PDFSETS_PATH])
AC_MSG_CHECKING([the standard PDF sets])
if test -f "$LHAPDF_PDFSETS_PATH/cteq61.LHpdf" -a -f "$LHAPDF_PDFSETS_PATH/cteq5l.LHgrid" -a -f "$LHAPDF_PDFSETS_PATH/GSG961.LHgrid" -a -f "$LHAPDF_PDFSETS_PATH/cteq6ll.LHpdf"; then
AC_MSG_RESULT([ all standard PDF sets installed])
else
AC_MSG_RESULT([ not all standard PDF sets installed])
AC_MSG_NOTICE([error: *************************************************************])
AC_MSG_NOTICE([error: LHAPDF standard PDF sets not installed, please install these ])
AC_MSG_NOTICE([error: PDF sets: cteq61.LHpdf, cteq6ll.LHpdf, cteq5l.LHgrid, ])
AC_MSG_NOTICE([error: GSG961.LHgrid. ])
AC_MSG_NOTICE([error: *************************************************************])
enable_lhapdf="no"
AC_MSG_CHECKING([for LHAPDF])
AC_MSG_RESULT([(disabled)])
fi
else
enable_lhapdf="no"
fi
fi
else
AC_MSG_CHECKING([for LHAPDF])
AC_MSG_RESULT([(disabled)])
fi
AC_SUBST(LHAPDF_ROOT)
-AC_SUBST(LHAPDF_VERSION)
+AC_SUBST(LHAPDF_FULL_VERSION)
AC_SUBST(LHAPDF_PDFSETS_PATH)
dnl LHAPDF requires the STD C++ library, when linking statically
if test "$enable_lhapdf" = "yes"; then
### Checking for static C++ libraries for the static version
### This is only necessary for MAC OS X and BSD-like OS
case $host in
*-darwin*)
case "$XCODE_VERSION" in
1.*|2.*|3.*)
wo_ldflags_stdcpp="-lstdc++-static" ;;
*)
wo_ldflags_stdcpp="-lstdc++" ;;
esac ;;
*-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
wo_ldflags_stdcpp="-lstdc++-static" ;;
*)
wo_ldflags_stdcpp="-lstdc++" ;;
esac
AC_MSG_CHECKING([for wo_ldflags_stdcpp: host system is $host_os: static flag])
AC_MSG_RESULT([$wo_ldflags_stdcpp])
fi
if test "$enable_lhapdf" = "yes"; then
- wo_lhapdf_libdir="-L$LHAPDF_ROOT/lib"
- AC_LANG([Fortran])
- AC_CHECK_LIB([LHAPDF],[getxminm],[LDFLAGS_LHAPDF="$wo_lhapdf_libdir -lLHAPDF"],
- [dnl
- AC_MSG_NOTICE([warning: ********************************************************])
- AC_MSG_NOTICE([warning: Either your LHAPDF version is too old (you need 5.3.0 or])
- AC_MSG_NOTICE([warning: higher), or LHAPDF was compiled with a different FORTRAN])
- AC_MSG_NOTICE([warning: compiler you and forgot to add the proper runtime to ])
- AC_MSG_NOTICE([warning: LIBS / LD_LIBRARY_PATH. Disabling LHAPDF support... ])
- AC_MSG_NOTICE([warning: ********************************************************])
- enable_lhapdf=no
- ],[$wo_lhapdf_libdir])
+ if test "$LHAPDF_MAJOR_VERSION" = "5"; then
+ wo_lhapdf_libdir="-L$LHAPDF_ROOT/lib"
+ AC_LANG_PUSH([Fortran])
+ AC_CHECK_LIB([LHAPDF],[getxminm],[LDFLAGS_LHAPDF="$wo_lhapdf_libdir -lLHAPDF"],
+ [dnl
+ AC_MSG_NOTICE([warning: ********************************************************])
+ AC_MSG_NOTICE([warning: Either your LHAPDF version is too old (you need 5.3.0 or])
+ AC_MSG_NOTICE([warning: higher), or LHAPDF was compiled with a different FORTRAN])
+ AC_MSG_NOTICE([warning: compiler you and forgot to add the proper runtime to ])
+ AC_MSG_NOTICE([warning: LIBS / LD_LIBRARY_PATH. Disabling LHAPDF support... ])
+ AC_MSG_NOTICE([warning: ********************************************************])
+ enable_lhapdf=no
+ ],[$wo_lhapdf_libdir])
+ AC_LANG_POP()
+ elif test "$LHAPDF_MAJOR_VERSION" = "6"; then
+ dnl now see if LHAPDF 6 is functional
+ ACX_CHECK_LHAPDF()
+ fi
fi
AC_SUBST(LDFLAGS_LHAPDF)
dnl Determine whether we need to stub photon-as-parton related bits of LHAPDF
if test "$enable_lhapdf" = "yes"; then
- AC_LANG([Fortran])
+ AC_LANG_PUSH([Fortran])
AC_CHECK_LIB([LHAPDF],[has_photon],[test],[dnl
AC_MSG_NOTICE([warning: ********************************************************])
AC_MSG_NOTICE([warning: Your LHAPDF version is not supported for PDF sets like ])
AC_MSG_NOTICE([warning: MRTS2004QED which include the photon as a parton --- ])
AC_MSG_NOTICE([warning: don't try to use those! ])
AC_MSG_NOTICE([warning: ********************************************************])
LHAPDF_HAS_PHOTON_DUMMY=true
],[$wo_lhapdf_libdir])
fi
if test "$enable_lhapdf" = "yes"; then
LHAPDF_AVAILABLE_FLAG=".true."
else
LHAPDF_AVAILABLE_FLAG=".false."
fi
AC_SUBST(LHAPDF_AVAILABLE_FLAG)
AM_CONDITIONAL([LHAPDF_AVAILABLE], [test "$enable_lhapdf" = "yes"])
AM_CONDITIONAL([LHAPDF6_AVAILABLE], [
test "$enable_lhapdf" = "yes" -a "$LHAPDF_MAJOR_VERSION" = "6"])
AM_CONDITIONAL([LHAPDF5_AVAILABLE], [
- test "$enable_lhapdf" = "yes" -a "$LHAPDF_MAJOR_VERSION" = "5" || \
- test "$enable_lhapdf" = "yes" -a "$LHAPDF_MAJOR_VERSION" = "4"])
+ test "$enable_lhapdf" = "yes" -a "$LHAPDF_MAJOR_VERSION" = "5"])
AM_CONDITIONAL([LHAPDF_FULL_DUMMY], [test "$enable_lhapdf" = "no"])
AM_CONDITIONAL([LHAPDF_HAS_PHOTON_DUMMY], [test -n "$LHAPDF_HAS_PHOTON_DUMMY"])
AM_CONDITIONAL([LHAPDF_DUMMY], [
test -n "$LHAPDF_HAS_PHOTON_DUMMY" || \
test "$enable_lhapdf" = "no" dnl
])
])
+
+
+AC_DEFUN([ACX_CHECK_LHAPDF],
+[
+save_CXXFLAGS="$CXXFLAGS"
+save_LIBS="$LIBS"
+CXXFLAGS="${CXXFLAGS} `${LHAPDF_CONFIG} --cxxflags`"
+LDFLAGS="${LDFLAGS} `${LHAPDF_CONFIG} --ldflags`"
+AC_MSG_CHECKING([if LHAPDF is functional (may take a while)])
+AC_LANG_PUSH([C++])
+AC_LINK_IFELSE(dnl
+ [AC_LANG_PROGRAM([[#include "LHAPDF/LHAPDF.h"]],
+ [[using namespace LHAPDF; LHAPDF::PDF* pdf = LHAPDF::mkPDF("CT10nlo", 0); delete pdf;]])],
+ [lhapdfok="yes"], [lhapdfok="no"])
+AC_MSG_RESULT([$lhapdfok])
+CXXFLAGS="$save_CXXFLAGS"
+LDFLAGS="$save_LDFLAGS"
+AC_LANG_POP()
+AC_MSG_CHECKING(LHAPDF)
+if test "${lhapdfok}" = "yes"; then
+ LHAPDF_CXXFLAGS="`${LHAPDF_CONFIG} --cxxflags`"
+ LHAPDF_LDFLAGS="`${LHAPDF_CONFIG} --ldflags`"
+ AC_MSG_RESULT(yes)
+ $1
+else
+ AC_MSG_RESULT(no)
+ $2
+fi
+])
Index: trunk/src/lhapdf/LHAPDFWrap_dummy.f90
===================================================================
Index: trunk/src/lhapdf/LHAPDFWrap.cpp
===================================================================
--- trunk/src/lhapdf/LHAPDFWrap.cpp (revision 0)
+++ trunk/src/lhapdf/LHAPDFWrap.cpp (revision 5880)
@@ -0,0 +1,8 @@
+using namespace LHAPDF;
+using namespace std;
+
+extern "C" {
+
+
+
+}
Index: trunk/src/lhapdf/Makefile.am
===================================================================
--- trunk/src/lhapdf/Makefile.am (revision 0)
+++ trunk/src/lhapdf/Makefile.am (revision 5880)
@@ -0,0 +1,73 @@
+## Makefile.am -- Makefile for WHIZARD
+##
+## Process this file with automake to produce Makefile.in
+#
+# Copyright (C) 1999-2014 by
+# Wolfgang Kilian <kilian@physik.uni-siegen.de>
+# Thorsten Ohl <ohl@physik.uni-wuerzburg.de>
+# Juergen Reuter <juergen.reuter@desy.de>
+# Christian Speckner <cnspeckn@googlemail.com>
+#
+# 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 end up in an auxiliary libtool library.
+if LHAPDF6_AVAILABLE
+noinst_LTLIBRARIES = libLHAPDFWrap.la
+libLHAPDFWrap_la_SOURCES = \
+ LHAPDFWrap.cpp lhapdf.f90
+libLHAPDFWrap_la_CPPFLAGS = $(LHAPDF_CXXFLAGS)
+else
+noinst_LTLIBRARIES = libLHAPDFWrap_dummy.la
+libLHAPDFWrap_dummy_la_SOURCES = \
+ LHAPDFWrap_dummy.f90
+endif
+
+AM_FCFLAGS =
+
+########################################################################
+## Default Fortran compiler options
+
+## Profiling
+if FC_USE_PROFILING
+AM_FCFLAGS += $(FCFLAGS_PROFILING)
+endif
+
+## OpenMP
+if FC_USE_OPENMP
+AM_FCFLAGS += $(FCFLAGS_OPENMP)
+endif
+
+########################################################################
+## Explicit dependencies
+
+lhapdf.lo: ../misc/kinds.$(FC_MODULE_EXT)
+
+AM_FCFLAGS += -I../misc
+
+MODULES= \
+ lhapdf.$(FC_MODULE_EXT)
+
+########################################################################
+## Non-standard cleanup tasks
+
+## Remove backup files
+maintainer-clean-local:
+ -rm -f *~
+
+## Remove module files
+clean-local:
+ -rm -f $(MODULES)
Index: trunk/src/lhapdf/lhapdf.f90
===================================================================
--- trunk/src/lhapdf/lhapdf.f90 (revision 0)
+++ trunk/src/lhapdf/lhapdf.f90 (revision 5880)
@@ -0,0 +1,2 @@
+module lhapdf
+end module lhapdf

File Metadata

Mime Type
text/x-diff
Expires
Tue, Nov 19, 8:40 PM (1 d, 4 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3806111
Default Alt Text
(33 KB)

Event Timeline