hepmc - Blame information for rev 26

Subversion Repositories:
Rev:
Rev Author Line No. Line
5 garren 1 # ======================================================================
2 # This is the HepMC configuration input file
3 # Process this file with autoconf to produce a configure script.
4 # ======================================================================
5  
6  
7 # ----------------------------------------------------------------------
8 # Identify the package and initialize the autotools:
9 # ----------------------------------------------------------------------
10  
11 AC_PREREQ(2.59)
23 garren 12 AC_INIT(HepMC, 1.27.01, https://savannah.cern.ch/projects/hepmc/, HepMC)
5 garren 13 AC_CANONICAL_TARGET
14 AC_CONFIG_SRCDIR([src/GenEvent.cc])
15 AM_INIT_AUTOMAKE(1.9 foreign)
16 AC_PROG_INSTALL
17 AC_PROG_LN_S
18 AC_PROG_RANLIB
19  
20 # ----------------------------------------------------------------------
21 # --enable-shared and --enable-static
22 # both shared and static libraries are built by default
23 # ----------------------------------------------------------------------
24  
25 AC_ARG_ENABLE(shared,
26 AC_HELP_STRING([--disable-shared],[do not build shared libraries]),
27 [case "${enableval}" in
28 yes) build_shared="yes";;
29 no) build_shared="no";;
30 *) build_shared="yes";;
31 esac],
32 [build_shared="yes"])
33 AC_ARG_ENABLE(static,
34 AC_HELP_STRING([--disable-static],[do not build static libraries]),
35 [case "${enableval}" in
36 yes) build_static="yes";;
37 no) build_static="no";;
38 *) build_static="yes";;
39 esac],
40 [build_static="yes"])
41 AC_ARG_ENABLE(visual,
42 AC_HELP_STRING([--enable-visual],[on by default when using Visual C++]),
43 [case "${enableval}" in
44 yes) build_visual="yes";;
45 no) build_visual="no";;
46 *) build_visual="no";;
47 esac],
48 [build_visual="no"])
49  
50 AC_ARG_ENABLE(gmake,
51 AC_HELP_STRING([--enable-gmake],[use gmake (default is make)]),
52 [case "${enableval}" in
53 yes) use_gmake="yes";;
54 no) use_gmake="no";;
55 *) use_gmake="no";;
56 esac],
57 [use_gmake="no"])
58  
59 # ----------------------------------------------------------------------
60 # find CLHEP:
61 # ----------------------------------------------------------------------
62  
63 AC_ARG_WITH(CLHEP,
64 AC_HELP_STRING([--with-CLHEP],[--with-CLHEP=$CLHEP_DIR: CLHEP is required]),
65 [CLHEPdir=${withval}],[CLHEPdir=" "])
66 AC_SUBST(CLHEPdir)
67  
68 # ----------------------------------------------------------------------
69 # Identify the files that 'configure' is to produce:
70 # ----------------------------------------------------------------------
71  
72 # Header containing #defines:
73 AM_CONFIG_HEADER([HepMC/defs.h])
74  
75 # Makefiles:
76 AC_CONFIG_FILES([Makefile])
77 AC_CONFIG_FILES([HepMC/Makefile])
78 AC_CONFIG_FILES([fio/Makefile])
79 AC_CONFIG_FILES([src/Makefile])
80 AC_CONFIG_FILES([doc/Makefile])
17 garren 81 AC_CONFIG_FILES([test/Makefile])
82 AC_CONFIG_FILES([test/testHepMC.cc])
83 AC_CONFIG_FILES([test/testHepMC.sh], [chmod +x test/testHepMC.sh])
26 garren 84 AC_CONFIG_FILES([test/testPrintBug.sh], [chmod +x test/testPrintBug.sh])
7 garren 85 AC_CONFIG_FILES([examples/Makefile])
86 AC_CONFIG_FILES([examples/GNUmakefile.example])
5 garren 87  
88  
89 # ----------------------------------------------------------------------
90 # Capture post-install information:
91 # ----------------------------------------------------------------------
92  
93 # ----------------------------------------------------------------------
94 # Supply boilerplate for HepMC/defs.h source header:
95 # ----------------------------------------------------------------------
96  
97 AH_TOP([#ifndef HEPMC_DEFS_H
98 #define HEPMC_DEFS_H])
99  
100 ## the undefs are converted by configure
101 AH_VERBATIM([PACKAGE],[/* Name of package */
102 #ifndef PACKAGE
103 #undef PACKAGE
104 #endif])
105 AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
106 #ifndef PACKAGE_BUGREPORT
107 #undef PACKAGE_BUGREPORT
108 #endif])
109 AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
110 #ifndef PACKAGE_NAME
111 #undef PACKAGE_NAME
112 #endif])
113 AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
114 #ifndef PACKAGE_STRING
115 #undef PACKAGE_STRING
116 #endif])
117 AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
118 #ifndef PACKAGE_TARNAME
119 #undef PACKAGE_TARNAME
120 #endif])
121 AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
122 #ifndef PACKAGE_VERSION
123 #undef PACKAGE_VERSION
124 #endif])
125 AH_VERBATIM([VERSION],[/* Version number of package */
126 #ifndef VERSION
127 #undef VERSION
128 #endif])
129  
130 AH_BOTTOM([#endif // HEPMC_DEFS_H])
131  
132 # ----------------------------------------------------------------------
133 # Account for any user configuration options:
134 # ----------------------------------------------------------------------
135  
136  
137 # ----------------------------------------------------------------------
138 # Check for needed programs:
139 # ----------------------------------------------------------------------
140  
141 # Locate a C++ compiler:
26 garren 142 AC_PROG_CXX(cl g++ g++4 c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
5 garren 143  
144 # Use it hereinafter:
145 AC_LANG(C++)
146  
147 # Ensure we've found a preprocessor:
148 AC_REQUIRE_CPP
149  
150 # copy and diff
151 case "$target" in
152 *-*-win32*)
153 COPY_P="copy -p";DIFF_Q="diff -q -b"
154 ;;
155 *-*-cygwin*)
156 COPY_P="cp -p";DIFF_Q="diff -q -b"
157 ;;
158 *-*-solaris*)
159 COPY_P="cp -p";DIFF_Q="diff -b"
160 use_gmake="yes"
161 ;;
162 *-*-linux*)
163 COPY_P="cp -p";DIFF_Q="diff -q -b"
164 ;;
165 *)
166 COPY_P="cp -p";DIFF_Q="diff -q -b"
167 esac
168  
169 AM_CONDITIONAL(USE_GMAKE, test x$use_gmake = xyes)
170  
171 AC_SUBST(COPY_P)
172 AC_SUBST(DIFF_Q)
173  
174 # worry about compiler flags
175 case "$CXX" in
176 g++)
177 case "$target" in
178 *-*-linux*)
179 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
180 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
181 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
182 AR="ar"; ARFLAGS="cru"
183 ;;
184 *-*-darwin*)
185 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
186 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
187 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
188 AR="ar"; ARFLAGS="cru"
189 build_shared="no"
190 ;;
191 *)
192 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
193 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
194 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
195 AR="ar"; ARFLAGS="cru"
196 esac;;
26 garren 197 g++4)
198 case "$target" in
199 *-*-linux*)
200 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
201 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
202 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
203 AR="ar"; ARFLAGS="cru"
204 ;;
205 *-*-darwin*)
206 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
207 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
208 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
209 AR="ar"; ARFLAGS="cru"
210 build_shared="no"
211 ;;
212 *)
213 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
214 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
215 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
216 AR="ar"; ARFLAGS="cru"
217 esac;;
5 garren 218 c++)
219 case "$target" in
220 *-*-linux*)
221 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
222 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
223 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
224 AR="ar"; ARFLAGS="cru"
225 ;;
226 *-*-darwin*)
227 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
228 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
229 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
230 AR="ar"; ARFLAGS="cru"
231 build_shared="no"
232 ;;
233 *)
234 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
235 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
236 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
237 AR="ar"; ARFLAGS="cru"
238 esac;;
239 cl)
240 AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
241 AR="ar"; ARFLAGS="cru"
242 MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
243 MY_SHNAME="/OUT:"; MY_LD=" "
244 build_static="no"
245 build_shared="yes"
246 build_visual="yes"
247 CXXFLAGS=" "
248 AC_SUBST(CXXFLAGS)
249 ;;
250 CC)
251 case "$target" in
252 *-*-solaris*)
253 AM_CXXFLAGS="-O"
254 MY_SHFLAGS="-KPIC -DPIC"; MY_SHLINK="-G"; SHEXT=so
255 MY_SHNAME="-h"; MY_LD="-R"
256 AM_LDFLAGS="-lsunmath"
257 AR="CC"; ARFLAGS="-xar -o"
258 build_shared="no"
259 ;;
260 *-*-hpux*) AM_CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit"
261 AR="ar"; ARFLAGS="cru"
262 build_shared="no"
263 ;;
264 *-*-irix*) AM_CXXFLAGS="-O -OPT:Olimit=0 -pta"
265 AR="ar"; ARFLAGS="cru"
266 build_shared="no"
267 ;;
268 *) echo UNEXPECTED CHOICE OF OPERATING SYSTEM FOR $CXX: $target
269 esac;;
270 aCC)
271 AM_CXXFLAGS="-O -Aa +DAportable +Onolimit"
272 AR="ar"; ARFLAGS="cru"
273 build_shared="no"
274 ;;
275 cxx)
276 AM_CXXFLAGS="-O -std strict_ansi -timplicit_local"
277 AR="ar"; ARFLAGS="cru"
278 build_shared="no"
279 ;;
280 xlC)
281 AM_CXXFLAGS="-O3 -qtwolink -+"
282 AR="ar"; ARFLAGS="cru"
283 build_shared="no"
284 ;;
285 *) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
286 esac
287  
288 AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
289 AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
290 AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
291  
292 AC_SUBST(AM_CXXFLAGS)
293 AC_SUBST(AM_LDFLAGS)
294 AC_SUBST(MY_SHFLAGS)
295 AC_SUBST(MY_SHLINK)
296 AC_SUBST(MY_SHNAME)
297 AC_SUBST(MY_LD)
298 AC_SUBST(SHEXT)
299 AC_SUBST(AR)
300 AC_SUBST(ARFLAGS)
301  
302 # ----------------------------------------------------------------------
303 # Set system-dependent options:
304 # ----------------------------------------------------------------------
305  
306  
307 # ----------------------------------------------------------------------
308 # Check for needed libraries:
309 # ----------------------------------------------------------------------
310  
311  
312 # ----------------------------------------------------------------------
313 # Check for needed header files:
314 # ----------------------------------------------------------------------
315  
316 # ----------------------------------------------------------------------
317 # Check for needed typedefs, structures, and compiler characteristics:
318 # ----------------------------------------------------------------------
319  
320 AC_CHECK_TYPES([ptrdiff_t])
321  
322 # ----------------------------------------------------------------------
323 # Check for needed library functions:
324 # ----------------------------------------------------------------------
325  
326  
327 # ----------------------------------------------------------------------
328 # Finish up:
329 # ----------------------------------------------------------------------
330  
331 AC_OUTPUT
332  
333  
334 # ======================================================================