forked from alisw/sacrifice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
164 lines (127 loc) · 4.99 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
AC_PREREQ(2.59)
AC_INIT( [Sacrifice], [1.1.1], [[email protected]], [Sacrifice])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_SRCDIR([src/PythiaMain.cxx])
AC_CONFIG_HEADERS([config/config.h])
AM_INIT_AUTOMAKE
AC_CONFIG_MACRO_DIR([m4])
AC_SUBST(LT_OBJDIR)
AC_LANG(C++)
AC_PROG_CXX
AX_CXX_COMPILE_STDCXX_11([noext],[mandatory])
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_LN_S
AM_PROG_CC_C_O
## LT_INIT doesn't work with autoconf 2.59
#LT_INIT
##These are for tclap
AC_CXX_HAVE_SSTREAM
AC_CXX_HAVE_STRSTREAM
# lib suffix differs on OS X
AC_DEFINE_DYNAMIC_LIBS
# Do we have and LCG tag, AFS area.
# Can user-define the LCG tag for annoying cases (CENT OS!)
AC_ARG_WITH([LCGTag],
[AC_HELP_STRING([--with-LCGTag], [Specify the LCG tag (default=auto detect)])],
[auto_lcg=no], [auto_lcg=yes])
AS_IF([test x$auto_lcg == xno],
[LCG_TAG=$with_LCGTag],
[LCG_TAG=no]
)
AC_SEARCH_LCG
AC_GET_MCUTILS([AC_MSG_NOTICE([MCUtils headers present in include/MCUtils])],[AC_MSG_ERROR([Unable to download MCUtils or HEPUtils headers])])
AC_ARG_WITH([MCUtils],
[AC_HELP_STRING([--with-MCUtils], [enable MCUtils for HepMC filtering and (optionally) give the installation location (default disabled)])],
[],[with_MCUtils=yes])
AC_ARG_WITH([HepMC],
[AC_HELP_STRING([--with-HepMC], [enable HepMC and give the installation location (=no to disable)])],
)
AS_IF([test x$with_HepMC != xno],
[AC_SEARCH_HEPMC([enable_HepMC=yes],
[AS_IF( [test x$with_HepMC = x], [enable_HepMC=no], [AC_MSG_ERROR([HepMC package requested but not found!!])])])],
[enable_HepMC=no])
if test x$enable_HepMC = xyes; then
AC_MSG_NOTICE([Building with HepMC])
AS_IF([test x$with_MCUtils != xno],
[AC_SEARCH_MCUTILS([enable_MCUtils=yes],
[AC_MSG_ERROR([MCUtils support requested, but package not found!!])])],
[enable_MCUtils=no])
else
AC_MSG_NOTICE([*** Not building with HepMC - output of HepMC events will be disabled!! ***])
if test x$with_MCUtils != xno ; then
AC_MSG_ERROR([MCUtils support requested, but HepMC not found or requested!])
fi
fi
AM_CONDITIONAL(ENABLE_HEPMC, [test x$enable_HepMC = xyes])
AM_CONDITIONAL(ENABLE_MCUTILS, [test x$enable_MCUtils = xyes])
AC_ARG_WITH([pythia_version],
[AC_HELP_STRING([--with-pythia-version], [Request a particular Pythia 8 version if using AFS/LCG])],
[do_pythia_version=yes], [do_pythia_version=no])
AS_IF([test x$do_pythia_version == xyes],
[PYTHIA_VERSION=$with_pythia_version],
[PYTHIA_VERSION=no]
)
AC_ARG_WITH([LHAPDF],
[AC_HELP_STRING([--with-LHAPDF], [enable LHAPDF and give the installation location (=no to disable)])],
)
AS_IF([test x$with_LHAPDF != xno],
[AC_SEARCH_LHAPDF([enable_LHAPDF=yes],
[AS_IF( [test x$with_LHAPDF = x], [enable_LHAPDF=no], [AC_MSG_ERROR([LHAPDF package requested but not found!!])])])],
[enable_LHAPDF=no])
if test x$enable_LHAPDF = xyes; then
AC_MSG_NOTICE([Building with LHAPDF])
else
AC_MSG_NOTICE([*** Not building with LHAPDF - use of external PDF sets will be disabled!! ***])
fi
AM_CONDITIONAL(ENABLE_LHAPDF, [test x$enable_LHAPDF = xyes])
AC_ARG_WITH([photos],
[AC_HELP_STRING([--with-photos], [enable Photos and give the installation location (default disabled)])],
[test_photos=yes],[test_photos=no])
##
AC_ARG_ENABLE([photos],
[AC_HELP_STRING([--enable-photos], [Enable Photos++ and search default paths for libraries])],
[test_photos=yes],
[])
##
AS_IF( [test x$test_photos = xyes ],
[AS_IF( [test x$with_photos != xno ],
[AC_SEARCH_PHOTOS([enable_photos=yes],
[AC_MSG_ERROR([Photos++ support requested but package not found!!])])],
[enable_photos=no])],
[enable_photos=no])
if test x$enable_photos = xyes; then
AC_MSG_NOTICE([Building with Photos++ support])
else
AC_MSG_NOTICE([*** Building without Photos++ support!! ***])
fi
AM_CONDITIONAL(ENABLE_PHOTOS, [test x$enable_photos = xyes])
AC_ARG_WITH([pythia],
[AC_HELP_STRING([--with-pythia], [Give the Pythia 8 library and header installation location])],
)
AC_SEARCH_PYTHIA([AC_MSG_NOTICE([Found Pythia 8 library and headers])],
[AC_MSG_ERROR([Could not find Pythia 8 library and headers!!])])
AX_CHECK_ZLIB([have_zlib=yes],[have_zlib=no])
AC_MSG_NOTICE([have zlib = $have_zlib ])
AM_CONDITIONAL(ENABLE_GZIP, [test x$have_zlib = xyes] )
AM_CXXFLAGS="$AM_CXXFLAGS -Wall -O2"
AM_CPPFLAGS="$AM_CPPFLAGS -Wall -O2 -I\$(top_builddir)/ -I\$(top_builddir)/include"
if test x$have_zlib = xyes ; then
AM_LDFLAGS="$AM_LDFLAGS -L${ZLIB_HOME}/lib -lz"
AM_CPPFLAGS="$AM_CPPFLAGS -I${ZLIB_HOME}/include"
AM_CXXFLAGS="$AM_CPPFLAGS -I${ZLIB_HOME}/include"
AC_SUBST(AM_LDFLAGS)
fi
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(AM_CPPFLAGS)
AC_CONFIG_FILES([ Makefile
src/Makefile
include/Makefile
include/Sacrifice/Makefile
include/MCUtils/Makefile
include/HEPUtils/Makefile
include/tclap/Makefile
share/Makefile
share/setupPythia.sh
UserHooks/Makefile ])
AC_OUTPUT