2 # Process this file with autoconf to produce a configure script.
5 AC_INIT( [Photos C++ Interface], [3.3], [tomasz.przedzinski@uj.edu.pl] )
8 AC_PREFIX_DEFAULT([`pwd`])
9 AC_CONFIG_SRCDIR([src/photosCInterfaces/Photos.cxx])
11 ##############################################################################
12 # Process command line options
14 if test "$AFS_PATHS" == "yes"; then
15 with_hepmc=$HEPMCLOCATION
16 with_tauola=$TAUOLALOCATION
17 with_mc_tester=$MCTESTERLOCATION
18 with_pythia8=$PYTHIALOCATION
19 pythia8data=$PYTHIA8DATA
24 AC_MSG_CHECKING([if HepMC location defined])
27 [AS_HELP_STRING([--with-hepmc], [Path to HepMC 2.xx (use --without-hepmc to compile without HepMC)] )],
28 [AC_MSG_RESULT([$with_hepmc])],
32 AC_MSG_CHECKING([if MC-TESTER location defined])
35 [AS_HELP_STRING([--with-mc-tester], [Path to MC-TESTER 1.23 or later (used by examples only)] )],
36 [AC_MSG_RESULT([$with_mc_tester])],
40 AC_MSG_CHECKING([if Pythia 8 location defined])
43 [AS_HELP_STRING([--with-pythia8], [Path to Pythia 8.1 or later (used by examples only)] )],
44 [AC_MSG_RESULT([$with_pythia8])],
48 AC_MSG_CHECKING([if Tauola location defined])
51 [AS_HELP_STRING([--with-tauola], [Path to Tauola C++ interface v1.0.5 or later (used by examples only)] )],
52 [AC_MSG_RESULT([$with_tauola])],
56 # Check for debug flags
57 AC_MSG_CHECKING([if debug flags are enabled])
60 [AS_HELP_STRING([--enable-debug],[Enable debug flags])],
62 AC_MSG_RESULT([$enable_debug]) ;
75 ##############################################################################
83 # here is a trick to preffer
84 # gfortran for gcc4 and higher
85 # and g77 for gcc3 and lower
86 flist="gfortran g77 f77"
87 if [[[ "$(gcc -dumpversion | cut -d . -f 1)" < "4" ]]] ; then
88 flist="g77 f77 gfortran"
93 AC_CHECK_PROG(DIRECT_CPP,cpp,cpp,$CPP)
95 # Checks for typedefs, structures, and compiler characteristics.
98 AC_CHECK_TYPES([ptrdiff_t])
100 # Checks for library functions.
103 AC_CHECK_FUNCS([atexit getcwd pow sqrt], ,
105 echo "ERROR: Basic functions not found. Something's wrong with paths." &&
109 ##############################################################################
110 # Check for HepMC header files
112 # If user specified --without-hepmc, skip hepmc check
113 if ! test "$with_hepmc" == "no"; then
116 CPPFLAGS="-I$with_hepmc/include $CPPFLAGS"
118 AC_CHECK_HEADERS([HepMC/Version.h], ,
120 echo "ERROR: HepMC not found. To provide location use:" &&
121 echo " --with-hepmc=/path/to/HepMC" ;
123 echo " --without-hepmc";
124 echo " (Consider using 'source platform/afs.paths.sh' (or .csh) )"
134 ##############################################################################
137 if test "$prefix" != "NONE"; then
141 pythia8data=$PYTHIA8DATA
143 if test -z "$pythia8data"; then
144 pythia8data=$with_pythia8/xmldoc
147 ln -sf platform/make.inc make.inc
149 AC_SUBST(with_photos)
151 AC_SUBST(pythia8data)
152 AC_SUBST(with_tauola)
153 AC_SUBST(with_pythia8)
154 AC_SUBST(with_mc_tester)
155 AC_CONFIG_FILES([platform/make.inc configure.paths.sh configure.paths.csh])