Page MenuHomeHEPForge

configure.in
No OneTemporary

configure.in

dnl WHIZARD configuration
dnl
dnl Process this file with autoconf to produce a configure script.
dnl ************************************************************************
dnl Environment variables that can overrun configure defaults:
dnl (Default values in parantheses, if any)
dnl
dnl Programs:
dnl OMEGADIR [path to the O'Mega directory]
dnl
dnl If empty, the default $PATH will be searched
dnl To override this, provide an absolute path name
dnl PERL
dnl NOWEBDIR [path to 'notangle', 'noweave', 'cpif']
dnl HEVEADIR [path to 'hevea', 'hacha']
dnl MPOST [METAPOST]
dnl LATEX
dnl DVIPS
dnl F95
dnl F77
dnl GMAKE [GNU Make]
dnl GTAR [GNU TAR]
dnl
dnl Auxiliary:
dnl TMPDIR (/tmp)
dnl PRECISION (double) [allowed values: single|double|quadruple]
dnl F95FLAGS [flags for the f95 compiler]
dnl USERLIBS [flags for the linker, e.g., for external libs]
dnl
dnl CompHEP: Split Fortran files if they contain more diagrams than this:
dnl CHEP_MAXDIAG (100) [default value in chep_src/c_source/f90_out.h]
dnl ************************************************************************
dnl Start
AC_INIT(kinds-src/kinds.in)
WK_CONFIGURE_SECTION([Initial setup and sanity checks])
dnl Read in user defaults (in addition to the ones in CONFIG_SITE, if set)
if test -r config.site; then
echo "loading site script config.site"
. ./config.site
fi
dnl Check the host type.
dnl Actually, we need this only for the macro AC_F77_LIBRARY_LDFLAGS to work.
AC_CANONICAL_HOST()
dnl This is activated for the restricted bundle
dnl If RESTRICTED is set, certain tests and messages are omitted
dnl and the Makefiles depend on this parameter
dnl###define(WHIZARD_RESTRICTED)
ifdef([WHIZARD_RESTRICTED], [RESTRICTED=yes])
AC_SUBST(RESTRICTED)
dnl ------------------------------------------------------------------------
dnl Packages for matrix elements
ifdef([WHIZARD_RESTRICTED],
[WK_WHIZARD_SET(CHSRC, no)],
[WK_WHIZARD_ME_GENERATOR_ENABLE(CHSRC, chep,
[ --enable-chep enable CompHEP as matrix element generator [[yes]]],
unix_com/comphep, unix_com/c_compile)
])
ifdef([WHIZARD_RESTRICTED],
[WK_WHIZARD_SET(MADGRAPH, no)]
dnl####with_helas#[WK_WHIZARD_PACKAGE(HELAS, helas, Makefile)]
dnl####without_helas#[WK_WHIZARD_SET(HELAS, no)]
,
[WK_WHIZARD_ME_GENERATOR_ENABLE(MADGRAPH, mad,
[ --enable-mad enable Madgraph as matrix element generator [[yes]]],
driver.f, Makefile)
# Enable HELAS as well if Madgraph is enabled
if test "$MADGRAPH" != "no"; then
WK_WHIZARD_PACKAGE(HELAS, helas, Makefile)
else
WK_WHIZARD_SET(HELAS, no)
fi
])
ifdef([WHIZARD_RESTRICTED],
dnl####with_omega#[WK_WHIZARD_PACKAGE(OMEGA, omega, Makefile)]
dnl####without_omega#[WK_WHIZARD_SET(OMEGA, no)]
,
[WK_WHIZARD_ME_GENERATOR_ENABLE(OMEGA, omega,
[ --enable-omega enable O'Mega as matrix element generator [[yes]]
(if not found by configure, set OMEGA_DIR correctly)],
Makefile.in, Makefile naive-color.pl insert-color.pl)]
)
dnl Edit and uncomment this for adding more packages:
dnl ifdef([WHIZARD_RESTRICTED], ,[
dnl WK_WHIZARD_ME_GENERATOR(MY_PACKAGE, my-package, Makefile)
dnl ])
dnl ------------------------------------------------------------------------
dnl Beamstrahlung
ifdef([WHIZARD_RESTRICTED],
dnl####with_circe#[WK_WHIZARD_PACKAGE_ENABLE(CIRCE, circe,
dnl####with_circe#[ --enable-circe use CIRCE v1 for beamstrahlung spectra [[yes]]],
dnl####with_circe#circe.f, Makefile)]
dnl####without_circe#[WK_WHIZARD_SET(CIRCE, no)]
,
[WK_WHIZARD_PACKAGE_ENABLE(CIRCE, circe,
[ --enable-circe use CIRCE v1 for beamstrahlung spectra [[yes]]],
circe.f, Makefile)])
ifdef([WHIZARD_RESTRICTED],
dnl####with_circe2#[WK_WHIZARD_PACKAGE_ENABLE(CIRCE2, circe2,
dnl####with_circe2#[ --enable-circe2 use CIRCE v2 for beamstrahlung spectra [[yes]]],
dnl####with_circe2#circe2.f, Makefile)]
dnl####without_circe2#[WK_WHIZARD_SET(CIRCE2, no)]
,
[WK_WHIZARD_PACKAGE_ENABLE(CIRCE2, circe2,
[ --enable-circe2 use CIRCE v2 for beamstrahlung spectra [[yes]]],
circe2.f, Makefile)])
dnl ------------------------------------------------------------------------
dnl Global variables (directories and program names)
dnl The main directory
PWD=`pwd`
WK_WHIZARD_SET(SRCDIR, $PWD)
dnl The parent directory (look there for the O'Mega installation)
cd ..; PARENTDIR=`pwd`; cd $SRCDIR
dnl Scripts and files
WK_WHIZARD_SET(MAKEPROC, make-proc.pl)
WK_WHIZARD_SET(MAKEINCLUDE, make-include.pl)
WK_WHIZARD_SET(F77TOF90, f77tof90.pl)
WK_WHIZARD_SET(F77TOF90_SIMPLE, f90contline.pl)
WK_WHIZARD_SET(MAKEDEPEND, make-depend)
WK_WHIZARD_SET(MAKESELFILE, make-selfile.pl)
WK_WHIZARD_SET(MAKEPARFILE, make-parfile.pl)
WK_WHIZARD_SET(MAKETEST, fulltest.pl)
WK_WHIZARD_SET(CONFIG, whizard.prc)
dnl Where the executables are. In the restricted bundle, not all are present.
ifdef([WHIZARD_RESTRICTED],
[WK_WHIZARD_SUBDIR(BIN, bin, Makefile, $F77TOF90 $MAKETEST)],
[WK_WHIZARD_SUBDIR(BIN, bin, Makefile, $F77TOF90 $MAKETEST $MAKEPROC $F77TOF90_SIMPLE $MAKEPARFILE $MAKESELFILE $MAKEINCLUDE)]
)
WK_WHIZARD_SET(BINDIR, $SRCDIR/$BIN)
dnl Where the libraries are
WK_WHIZARD_SUBDIR(LIB, lib)
WK_WHIZARD_SET(LIBDIR, $SRCDIR/$LIB)
dnl Where the modules and include files are
WK_WHIZARD_SUBDIR(MOD, include)
dnl Directories where programs needed for WHIZARD are located
WK_WHIZARD_PACKAGE(KINDS, kinds, Makefile kinds)
WK_WHIZARD_PACKAGE(VAMP, vamp, Makefile)
WK_WHIZARD_PACKAGE(WCODE, whizard, Makefile)
dnl Here will the generated matrix element code be located
ifdef([WHIZARD_RESTRICTED],
[WK_WHIZARD_PACKAGE(CHCODE, processes, Makefile)],
[WK_WHIZARD_PACKAGE(CHCODE, processes)]
)
dnl The configuration files
WK_WHIZARD_SUBDIR(CONFSRC, conf)
dnl The calculation results
WK_WHIZARD_SUBDIR(RESULTS, results, Makefile)
dnl Plotting package GAMELAN
WK_WHIZARD_PACKAGE(GMLSRC, gml, Makefile, gml)
WK_WHIZARD_SET(GMLDIR, $SRCDIR/$GMLSRC)
dnl FeynMF package
WK_WHIZARD_PACKAGE(FMFSRC, fmf)
WK_WHIZARD_SET(FMFDIR, $SRCDIR/$FMFSRC)
dnl Documentation
WK_WHIZARD_SUBDIR(DOC, doc, Makefile)
dnl *** Experimental *** Used for the GUI
OUTFILES="$OUTFILES config.vars"
dnl The main program
WK_WHIZARD_SET(PRG, whizard)
OUTFILES="$OUTFILES Makefile"
dnl ------------------------------------------------------------------------
dnl User options
WK_CONFIGURE_SECTION([Check generic programs and tools])
dnl This we don't need in restricted mode
ifdef([WHIZARD_RESTRICTED], ,
[AC_CACHE_CHECK([for tmp directory], [wk_cv_tmpdir],
[ac_tmpdir_path="$TMPDIR /tmp /var/tmp"
for ac_dummy in $ac_tmpdir_path; do
if test -d $ac_dummy -a -w $ac_dummy; then
wk_cv_tmpdir=$ac_dummy
break
fi
done
])
TMPDIR=$wk_cv_tmpdir
test -z "$TMPDIR" && AC_MSG_ERROR([No writable directory found in $ac_tmpdir_path])
AC_SUBST(TMPDIR)
])
dnl Extra libraries etc. can be activated by this
AC_SUBST(USERLIBS)
dnl PRECISION=single, double, or quadruple
test -z "$PRECISION" && PRECISION="double";
AC_SUBST(PRECISION)
dnl C Preprocessor macros (for use in the CompHEP compilation):
test -n "$CHEP_MAXDIAG" && AC_DEFINE_UNQUOTED(F90_MAXDIAG, $CHEP_MAXDIAG)
dnl disable the 'signal' service routines upon request
AC_ARG_ENABLE(signals,
[ --enable-signals accept external signals at runtime [[yes]]])
F90UNIX_ALLOW_SIGNALS=$enable_signals
AC_SUBST(F90UNIX_ALLOW_SIGNALS)
dnl ************************************************************************
dnl Checks for programs.
WK_PROG_GNU_MAKE()
if test "$GMAKE" = "no"; then
AC_MSG_WARN([*** GNU Make not found. The Makefiles will probably not run correctly. ***])
elif test $GMAKE != make; then
AC_MSG_WARN([*** Use GNU Make ($GMAKE) for compilation. ***])
fi
WK_PROG_GNU_TAR()
if test "$GTAR" = "no"; then
AC_MSG_WARN([*** GNU tar not found. Tarring will not work. ***])
else
TAR="$GTAR"
fi
AC_SUBST(TAR)
AC_PROG_RANLIB()
test $RANLIB = ranlib || AC_MSG_WARN([*** ranlib not found. Linking problems may result. ***])
ifdef([WHIZARD_RESTRICTED],
[WK_WHIZARD_SET(AUTOCONF,no)],
[AC_CHECK_PROG(AUTOCONF,autoconf,autoconf,no)
if test "$AUTOCONF" = "no"; then
AC_MSG_WARN([*** autoconf not found. Making a restricted bundle is not possible. ***])
fi
])
if test -z "$PERL"; then
AC_PATH_PROG(PERL,perl)
test -z "$PERL" && AC_MSG_ERROR([perl not found in \$PATH])
fi
test -x "$PERL" || AC_MSG_ERROR([Can't execute $PERL])
dnl ------------------------------------------------------------------------
dnl Check for NOWEB programs; the system should, however, work without them.
test -n "$NOWEB_DIR" && NOWEBDIR=$NOWEB_DIR
if test -n "$NOWEBDIR"; then
NOTANGLE=$NOWEBDIR/notangle
CPIF=$NOWEBDIR/cpif
NOWEAVE=$NOWEBDIR/noweave
fi
if test -z "$NOTANGLE"; then
AC_PATH_PROG(NOTANGLE,notangle)
fi
if test -n "$NOTANGLE"; then
test -x "$NOTANGLE" || AC_MSG_ERROR([Can't execute $NOTANGLE.])
fi
if test -z "$CPIF"; then
AC_PATH_PROG(CPIF,cpif)
fi
if test -n "$CPIF"; then
test -x "$CPIF" || AC_MSG_ERROR([Can't execute $CPIF])
else
CPIF="$BINDIR/cat"
fi
if test -z "$NOWEAVE"; then
AC_PATH_PROG(NOWEAVE,noweave)
fi
if test -n "$NOWEAVE"; then
test -x "$NOWEAVE" || AC_MSG_ERROR([Can't execute $NOWEAVE])
fi
dnl ------------------------------------------------------------------------
dnl Check for working METAPOST installation
dnl latex and dvips are needed for histograms (and documentation)
AC_PATH_PROG(LATEX,latex)
test -z "$LATEX" && AC_MSG_WARN([*** latex not found in \$PATH])
AC_PATH_PROG(DVIPS,dvips)
test -z "$DVIPS" && AC_MSG_WARN([*** dvips not found in \$PATH])
dnl These are needed for documentation only, no warnings here
AC_PATH_PROG(PS2PDF,ps2pdf)
AC_PATH_PROG(HEVEA,hevea)
AC_PATH_PROG(IMAGEN,imagen)
AC_PATH_PROG(HACHA,hacha)
AC_ARG_ENABLE(metapost,
[ --enable-metapost use Metapost/gamelan for plotting histograms [[yes]]])
if test "$enable_metapost" = "no"; then
AC_MSG_CHECKING([for mpost])
unset MPOST
AC_MSG_RESULT([(disabled)])
else
if test -z "$MPOST"; then
AC_PATH_PROGS(MPOST,mpost mp)
fi
fi
if test -n "$MPOST"; then
WK_PROG_MPOST_WORKS()
fi
AC_SUBST(MPOST)
dnl Without latex and dvips, metapost is useless for us
test -z "$LATEX" -o -z "$DVIPS" && unset MPOST
dnl ------------------------------------------------------------------------
dnl Check if we are able to compile CompHEP
dnl The F77 compiler will not be checked, not needed for WHIZARD
WK_CONFIGURE_SECTION([Check compilers])
ifdef([WHIZARD_RESTRICTED], , [
if test "$enable_chep" != "no"; then
comphepcom=$CHSRC/unix_com
WK_PROG_COMPHEP_CC_WORKS()
dnl WK_PROG_COMPHEP_F77_WORKS()
fi
])
dnl ------------------------------------------------------------------------
dnl Check the Fortran Compiler
dnl If quadruple/quad.complex is not available, we need some workarounds
WK_PROG_F90()
QCOMPLEX="no"
if test "$PRECISION" = "quadruple"; then
if test $wk_cv_prog_f90_quadra = yes; then
AC_MSG_WARN([*** Using quadruple precision ***])
if test $wk_cv_prog_f90_qcomplex = yes; then
QCOMPLEX="yes"
else
AC_MSG_ERROR([Fortran 90 compiler does not permit quadruple complex])
dnl QCOMPLEX="emulate"
dnl AC_MSG_WARN([*** Quadruple precision complex type will be emulated ***])
fi
else
AC_MSG_ERROR([Fortran 90 compiler does not permit quadruple precision])
fi
QUAD_OR_SINGLE="quadruple"
else
QUAD_OR_SINGLE="single"
fi
AC_SUBST(QCOMPLEX)
AC_SUBST(QUAD_OR_SINGLE)
dnl Some compilers may need special treatment
F90TYPE=$wk_cv_prog_f90_type
AC_SUBST(F90TYPE)
F90VERSION=$wk_cv_prog_f90_version
F90MAJOR_VERSION=$wk_cv_prog_f90_major_version
AC_SUBST(F90VERSION)
AC_SUBST(F90MAJOR_VERSION)
dnl Don't care about old ifc anymore
if test "$F90TYPE" = "Intel"; then
if test "$F90MAJOR_VERSION" -le 7; then
AC_MSG_ERROR([Intel Compiler version is too old, please upgrade])
fi
fi
dnl Whether to accept 'pure' qualifiers
F90PURE=$wk_cv_prog_f90_pure
AC_SUBST(F90PURE)
dnl Workaround for g95: disable 'pure'
if test "$F90TYPE" = "GNU"; then
F90PURE=no
fi
dnl Module names: (obsolete now, since all compilers apparently have converged)
dnl The perl scripts need a quoted version of this
F90MODNAME='$(1:.o=.mod)'
F90MODNAME_Q='\$(1:.o=.mod)'
AC_SUBST(F90MODNAME)
AC_SUBST(F90MODNAME_Q)
dnl Check for a MPI f90 compiler
dnl [temporarily disabled]
dnl WK_PROG_MPIF90()
MPIF90=$F90
AC_SUBST(MPIF90)
dnl Add -g flag etc.
# Make backslash character in strings normal character
# (no longer needed for Intel 8.x)
#test "$F90TYPE" = "Intel" && F90FLAGS="-nbs $F90FLAGS"
test "$F90TYPE" = "PGI" && F90FLAGS="-Mbackslash $F90FLAGS"
# NAG F90 option: set -maxcontin=200 if not already set
if test "$F90TYPE" = "NAG"; then
if (echo $F90FLAGS | grep -qve '-maxcontin') then
F90FLAGS="-maxcontin=200 $F90FLAGS"
fi
fi
AC_SUBST(F90FLAGS)
dnl Intel 8.x on Opteron crashes at the 'signal' code; disable this
if test "$F90TYPE" = "Intel"; then
if test "$F90MAJOR_VERSION" -eq 8; then
case $basic_machine in
x86_64-*)
F90UNIX_ALLOW_SIGNALS=no
;;
esac
fi
fi
dnl ------------------------------------------------------------------------
dnl Look for the C preprocessor and set CPP
AC_PROG_CPP()
dnl ------------------------------------------------------------------------
dnl Get the F77 runtime libraries. Allow the user to override this test
dnl (it will need the F77 compiler)
if test -z "$FLIBS"; then
AC_F77_LIBRARY_LDFLAGS()
fi
test -z "$FLIBS" && AC_MSG_WARN([*** Fortran 77 runtime libraries not set. Linking of F77 libraries will be disabled])
dnl On Alpha machines, the unix interface has name clashes with the g77-lib.
dnl The same is true on Linux for the Intel compiler.
dnl For g95 we should load libf95.a which contains 'main' etc. before g77-libs
dnl Make sure that the F90 libraries are loaded first.
if test -n "$FLIBS"; then
if test "$F90TYPE" = "DEC" -o "$F90TYPE" = "Compaq"; then
FLIBS="-lUfor $FLIBS"
elif test "$F90TYPE" = "GNU"; then
FLIBS="-lf95 $FLIBS"
fi
fi
dnl ------------------------------------------------------------------------
dnl If the user has not provided CERNLIB_DIR, assume /cern/pro/lib
WK_CONFIGURE_SECTION([Check libraries])
test -z "$CERNLIB_DIR" -a -z "$CERNLIBDIR" && CERNLIB_DIR=/cern/pro/lib
CERNLIBPATH=$CERNLIB_DIR:$CERNLIBDIR:$LD_LIBRARY_PATH
dnl ------------------------------------------------------------------------
dnl Library checks: enable/disable option, version number extensions to names,
dnl set variables e.g. STDHEP, STDHEP_DIR, STDHEP_LIB
test -z "$FLIBS" && enable_stdhep="no"
WHIZARD_LIB_ENABLE(STDHEP, stdhep,
[ --enable-stdhep enable the STDHEP library for writing events [[yes]]
(if not found, set STDHEP_DIR or CERNLIB_DIR)],
libstdhep.a,
$STDHEP_DIR:$STDHEPDIR:$CERNLIBPATH)
if test "$STDHEP" != "no"; then
WHIZARD_PATH_LIB(FMCFIO, Fmcfio,
libFmcfio.a,
$FMCFIO_DIR:$FMCFIODIR:$STDHEP_DIR:$STDHEPDIR:$CERNLIBPATH)
if test "$FMCFIO" = "no"; then
AC_MSG_WARN([*** Fmcfio library not found. StdHEP support will be disabled.])
STDHEP="no"
fi
fi
test -z "$FLIBS" && enable_pythia="no"
WHIZARD_LIB_ENABLE(PYTHIA, pythia,
[ --enable-pythia enable the PYTHIA fragmentation library [[yes]]
(if not found, set PYTHIA_DIR or CERNLIB_DIR)],
libpythia.a libpythia6*.a,
$PYTHIA_DIR:$PYTHIADIR:$CERNLIBPATH)
if test "$PYTHIA" != "no"; then
WK_CHECK_PYTHIA_INTERFACE()
PYTHIA_HEPRUP=$wk_cv_pythia_supports_heprup
else
PYTHIA_HEPRUP="no"
fi
AC_SUBST(PYTHIA_HEPRUP)
test -z "$FLIBS" && enable_pdflib="no"
WHIZARD_LIB_ENABLE(PDFLIB, pdflib,
[ --enable-pdflib enable the PDF library [[yes]]
(if not found, set PDFLIB_DIR or CERNLIB_DIR)],
libpdflib.a libpdflib8*.a,
$PDFLIB_DIR:$PDFLIBDIR:$CERNLIBPATH)
if test "$PDFLIB" != "no"; then
WHIZARD_PATH_LIB(KERNLIB, kernlib,
libkernlib.a,
$KERNLIBDIR:$KERNLIB_DIR:$PDFLIB_DIR:$PDFLIBDIR:$CERNLIBPATH)
if test "$KERNLIB" = "no"; then
AC_MSG_WARN([*** kernlib not found. PDFlib support will be disabled.])
PDFLIB="no"
fi
fi
if test "$PDFLIB" != "no" ; then
WHIZARD_PATH_LIB(MATHLIB, mathlib,
libmathlib.a,
$MATHLIBDIR:$MATHLIB_DIR:$PDFLIB_DIR:$PDFLIBDIR:$ISAJETDIR:$CERNLIBPATH)
if test "$MATHLIB" = "no"; then
AC_MSG_WARN([*** mathlib not found. PDFlib support will be disabled.])
PDFLIB="no"
fi
fi
dnl packlib is not really needed
dnl if test "$PDFLIB" != "no"; then
dnl WHIZARD_PATH_LIB(PACKLIB, packlib,
dnl libpacklib.a,
dnl $PACKLIBDIR:$PACKLIB_DIR:$PDFLIB_DIR:$PDFLIBDIR:$CERNLIBPATH)
dnl if test "$PACKLIB" = "no"; then
dnl AC_MSG_WARN([*** packlib not found. PDFlib support will be disabled.])
dnl PDFLIB="no"
dnl fi
dnl fi
dnl ------------------------------------------------------------------------
dnl Check for working O'Mega installation
dnl The restricted bundle has the omegalib in a subdirectory
dnl The full bundle has to search for it elsewhere
LIBOMEGA=libomega95.a
AC_SUBST(LIBOMEGA)
if test "$OMEGA" != "no"; then
ifdef([WHIZARD_RESTRICTED],
[
OMEGALIBPATH=$OMEGA
OMEGASRCPATH=$OMEGA
OMEGALIB=$SRCDIR/$OMEGALIBPATH/$LIBOMEGA
], [
dnl This is more in line with STDHEP_DIR etc.
test -n "$OMEGA_DIR" && OMEGADIR=$OMEGA_DIR
dnl The path to the O'Mega installation
if test -n "$OMEGADIR"
then
OMEGAPATH=$OMEGADIR
else
OMEGAPATH=$PARENTDIR/omega:$HOME/omega:/usr/local/omega:/usr/local/lib/omega:/usr/omega:/usr/lib/omega
fi
OMEGASRCPATH=$OMEGAPATH
dnl Look for the O'Mega installation.
WK_CONFIGURE_SECTION([Check the O'Mega installation])
AC_PATH_PROG(OMEGA_VERSION_FILE, VERSION, [no], $OMEGAPATH)
AC_CACHE_CHECK([the O'Mega version],
[wk_cv_omega_version],
[if test "$OMEGA_VERSION_FILE" != "no"; then
wk_cv_omega_version=`cat $OMEGA_VERSION_FILE`
OMEGAPATH=`echo $OMEGA_VERSION_FILE | sed -e 's|/VERSION||'`
else
wk_cv_omega_version='unknown'
AC_MSG_WARN([*** O'Mega installation is absent or outdated.])
fi
OMEGA_VERSION=$wk_cv_omega_version
AC_SUBST(OMEGA_VERSION)
[OMEGA_MAJOR_VERSION=`echo $OMEGA_VERSION | sed -e 's/.*\([0-9][0-9][0-9]\)\.\([0-9][0-9][0-9]\).*/\1/'`]
[OMEGA_MINOR_VERSION=`echo $OMEGA_VERSION | sed -e 's/.*\([0-9][0-9][0-9]\)\.\([0-9][0-9][0-9]\).*/\2/'`]
AC_SUBST(OMEGA_MAJOR_VERSION)
AC_SUBST(OMEGA_MINOR_VERSION)
])
dnl first check for 'config.guess' in the OMega path
dnl if found, include architecture-specific directories in the path
AC_PATH_PROG(OMEGA_CONFIG_GUESS, config.guess, no, $OMEGAPATH)
if test "$OMEGA_CONFIG_GUESS" != "no"; then
OMEGA_ARCHDIR=`echo $OMEGA_CONFIG_GUESS | sed -e 's|/config.guess|/arch|'`
OMEGASRCPATH=`echo $OMEGA_CONFIG_GUESS | sed -e 's|/config.guess|/src|'`
if test -d "$OMEGA_ARCHDIR"; then
OMEGA_HOST=`$OMEGA_CONFIG_GUESS`
if test -n "$OMEGA_HOST"; then
OMEGAPATH=$OMEGA_ARCHDIR/$OMEGA_HOST:$OMEGAPATH
fi
fi
fi
dnl Append /lib to all elements of OMEGAPATH and consider LD_LIBRARY_PATH
OMEGALIBPATH=`echo $OMEGAPATH | sed -e 's|:|/lib:|g'`/lib:$LD_LIBRARY_PATH
AC_PATH_PROG(OMEGALIB, $LIBOMEGA, no, $OMEGALIBPATH)
dnl Older versions than 000.010 won't work anymore:
if test "$OMEGA_MAJOR_VERSION" -le 0; then
if test "$OMEGA_MINOR_VERSION" -lt 10; then
AC_MSG_WARN([*** O'Mega version must be at least 000.010 -- O'Mega will be disabled])
enable_omega=no
OMEGALIB=no
OMEGA=no
elif test "$OMEGA_MINOR_VERSION" -lt 11; then
AC_MSG_WARN([*** This O'Mega version does not support some special models (Little Higgs etc.) -- upgrade O'Mega if you need them])
fi
fi
if test "$OMEGALIB" = "no"; then
if test "$OMEGA" != "no"; then
AC_MSG_WARN([*** O'Mega run-time library not found.
Check the O'Mega installation and/or set \$OMEGA_DIR appropriately])
fi
enable_omega=no
OMEGALIBPATH=
OMEGA_SCATTER=no
OMEGA=no
else # $OMEGALIB != no
dnl This is the actual path of OMEGALIB
OMEGALIBPATH=`echo $OMEGALIB | sed -e s!/$LIBOMEGA!!`
dnl Extract the members of the O'Mega library
OMEGAOBJ=`ar t $OMEGALIB | xargs echo`
dnl The path to O'Mega binaries
OMEGABINPATH=`echo $OMEGALIB | sed -e s!lib/$LIBOMEGA!bin!`
AC_PATH_PROGS(OMEGA_SM_BIN, f90_SM.opt f90_SM.bin, no, $OMEGABINPATH)
if test "$OMEGA_SM_BIN" = "no"; then
AC_MSG_WARN([*** O'Mega SM executable not found.
Check the O'Mega installation and/or set \$OMEGAPATH appropriately])
enable_omega=no
OMEGALIBPATH=
OMEGA_SCATTER=no
OMEGA=no
else
AC_CACHE_CHECK([whether the O'Mega executable ($OMEGA_SM_BIN) works],
[wk_cv_omega_works],
[$OMEGA_SM_BIN -help >conftest.out 2>&1
if (grep target conftest.out >/dev/null); then
wk_cv_omega_works=yes
else
wk_cv_omega_works=no
fi
if (grep scatter conftest.out >/dev/null); then
wk_cv_omega_scatter=yes
else
wk_cv_omega_scatter=no
fi
rm -fr conftest.out
])
if test "$wk_cv_omega_works" = "no"; then
AC_MSG_WARN([*** Installation or configuration problem: O'Mega SM executable fails.])
enable_omega=no
OMEGALIBPATH=
OMEGA_SCATTER=no
OMEGA=no
else
AC_CACHE_CHECK([whether the O'Mega executable ($OMEGA_SM_BIN) accepts -scatter],
[wk_cv_omega_scatter],[:])
fi
fi
OMEGA_SCATTER=$wk_cv_omega_scatter
AC_SUBST(OMEGA_SCATTER)
AC_SUBST(OMEGAOBJ)
dnl Look for the O'Mega sources (these are supposed to be arch-independent)
AC_PATH_PROGS(OMEGA_SRC, omega_utils.f95, no, $OMEGASRCPATH)
if test "$OMEGA_SRC" = "no"; then
AC_MSG_WARN([O'Mega sources not found.
Check the O'Mega installation and/or set \$OMEGAPATH appropriately])
enable_omega=no
OMEGALIBPATH=
OMEGA_SCATTER=no
OMEGA=no
fi
fi # $OMEGALIB != no
]) dnl RESTRICTED
fi # $OMEGA != no
AC_SUBST(OMEGALIB)
AC_SUBST(OMEGALIBPATH)
AC_SUBST(OMEGABINPATH)
AC_SUBST(OMEGASRCPATH)
dnl ************************************************************************
dnl Finalize
WK_CONFIGURE_SECTION([Final setup of build system])
dnl Extra commands in AC_OUTPUT:
dnl Make executables executable
AC_OUTPUT_COMMANDS(
[for file in $EXECUTABLES; do
chmod u+x $file
done],
EXECUTABLES="$EXECUTABLES")
dnl Don't overwrite kinds.f90 if it hasn't changed
AC_OUTPUT_COMMANDS(
[cat $KINDS/kinds | $CPIF $KINDS/kinds.f90
rm -f $KINDS/kinds
],
KINDS=$KINDS
CPIF=$CPIF
)
dnl ------------------------------------------------------------------------
dnl Write a summary of the configure results
AC_OUTPUT_COMMANDS(
[
echo
echo "--- Configure summary: ---"
echo "--- Enabled features: ---"
if test "$CHSRC" != "no"; then
echo " CompHEP (Matrix elements) $CHSRC/setup/"; enabled=1
fi
if test "$MADGRAPH" != "no"; then
echo " Madgraph (Matrix elements) $MADGRAPH/"; enabled=1
fi
if test "$OMEGA" != "no" -a "$RESTRICTED" != "yes"; then
echo " O'Mega (Matrix elements) $OMEGABINPATH/"; enabled=1
fi
if test "$AUTOCONF" != "no"; then
echo " Autoconf (Restricted bundle) $AUTOCONF"; enabled=1
fi
if test "$CIRCE" != "no"; then
echo " CIRCE (Beamstrahlung) $CIRCE/"; enabled=1
fi
if test "$CIRCE2" != "no"; then
echo " CIRCE2 (Beamstrahlung) $CIRCE2/"; enabled=1
fi
if test "$PDFLIB" != "no"; then
echo " PDFLIB (Structure functions) $PDFLIB"; enabled=1
fi
if test "$PYTHIA" != "no"; then
echo " PYTHIA (Fragmentation) $PYTHIA"; enabled=1
fi
if test "$STDHEP" != "no"; then
echo " STDHEP (Binary event files) $STDHEP"; enabled=1
fi
if test -n "$MPOST"; then
echo " LaTeX/Metapost (Histograms) $MPOST"; enabled=1
fi
if test -z "$enabled"; then
echo " (none)"
fi
echo
echo "--- Disabled or absent features: ---"
if test "$CHSRC" = "no"; then
echo " CompHEP (Matrix elements)"; disabled=1
fi
if test "$MADGRAPH" = "no"; then
echo " Madgraph (Matrix elements)"; disabled=1
fi
if test "$OMEGA" = "no" -o "$RESTRICTED" = "yes"; then
echo " O'Mega (Matrix elements)"; disabled=1
fi
if test "$AUTOCONF" = "no"; then
echo " Autoconf (Restricted bundle)"; disabled=1
fi
if test "$CIRCE" = "no"; then
echo " CIRCE (Beamstrahlung)"; disabled=1
fi
if test "$CIRCE2" = "no"; then
echo " CIRCE2 (Beamstrahlung)"; disabled=1
fi
if test "$PDFLIB" = "no"; then
echo " PDFLIB (Structure functions)"; disabled=1
fi
if test "$PYTHIA" = "no"; then
echo " PYTHIA (Fragmentation)"; disabled=1
fi
if test "$STDHEP" = "no"; then
echo " STDHEP (Binary event files)"; disabled=1
fi
if test -z "$MPOST"; then
echo " LaTeX/Metapost (Histograms)"; disabled=1
fi
if test -z "$disabled"; then
echo " (none)"
fi
echo
echo "--- Configuration complete. ---"
],
RESTRICTED=$RESTRICTED
CHSRC=$CHSRC
MADGRAPH=$MADGRAPH
OMEGA=$OMEGA
OMEGABINPATH=$OMEGABINPATH
AUTOCONF=$AUTOCONF
CIRCE=$CIRCE
CIRCE2=$CIRCE2
PDFLIB=$PDFLIB
PYTHIA=$PYTHIA
STDHEP=$STDHEP
MPOST=$MPOST
)
dnl ------------------------------------------------------------------------
dnl Finalize, write Makefiles etc., and execute the extra commands above.
AC_OUTPUT($OUTFILES)
dnl The end.

File Metadata

Mime Type
text/x-m4
Expires
Sat, May 3, 6:26 AM (1 d, 12 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4980342
Default Alt Text
configure.in (24 KB)

Event Timeline