-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
175 lines (140 loc) · 4.57 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
165
166
167
168
169
170
171
172
173
174
175
dnl Process this file with autoconf to produce a configure script.
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