hepmc - Blame information for rev 310

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)
310 garren 12 AC_INIT(HepMC, 2.03.08, 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 # ----------------------------------------------------------------------
43 garren 60 # find CLHEP and/or GENSER:
61 # these are used ONLY in the examples
5 garren 62 # ----------------------------------------------------------------------
63  
64 AC_ARG_WITH(CLHEP,
43 garren 65 AC_HELP_STRING([--with-CLHEP],[--with-CLHEP=$CLHEP_DIR: CLHEP is used in the examples]),
5 garren 66 [CLHEPdir=${withval}],[CLHEPdir=" "])
67 AC_SUBST(CLHEPdir)
68  
38 garren 69 AC_ARG_WITH(GENSER,
43 garren 70 AC_HELP_STRING([--with-GENSER],[--with-GENSER=$GENSER_DIR: GENSER is used in the examples]),
38 garren 71 [GENSERdir=${withval}],[GENSERdir=" "])
72 AC_SUBST(GENSERdir)
73  
5 garren 74 # ----------------------------------------------------------------------
75 # Identify the files that 'configure' is to produce:
76 # ----------------------------------------------------------------------
77  
78 # Header containing #defines:
79 AM_CONFIG_HEADER([HepMC/defs.h])
80  
81 # Makefiles:
82 AC_CONFIG_FILES([Makefile])
83 AC_CONFIG_FILES([HepMC/Makefile])
84 AC_CONFIG_FILES([fio/Makefile])
85 AC_CONFIG_FILES([src/Makefile])
86 AC_CONFIG_FILES([doc/Makefile])
17 garren 87 AC_CONFIG_FILES([test/Makefile])
88 AC_CONFIG_FILES([test/testHepMC.cc])
89 AC_CONFIG_FILES([test/testHepMC.sh], [chmod +x test/testHepMC.sh])
107 garren 90 AC_CONFIG_FILES([test/testMass.cc])
91 AC_CONFIG_FILES([test/testMass.sh], [chmod +x test/testMass.sh])
88 garren 92 AC_CONFIG_FILES([test/testHepMCIteration.cc])
93 AC_CONFIG_FILES([test/testHepMCIteration.sh], [chmod +x test/testHepMCIteration.sh])
242 garren 94 AC_CONFIG_FILES([test/testMultipleCopies.cc])
26 garren 95 AC_CONFIG_FILES([test/testPrintBug.sh], [chmod +x test/testPrintBug.sh])
128 garren 96 AC_CONFIG_FILES([test/testDeprecated.cc])
97 AC_CONFIG_FILES([test/testDeprecated.sh], [chmod +x test/testDeprecated.sh])
7 garren 98 AC_CONFIG_FILES([examples/Makefile])
99 AC_CONFIG_FILES([examples/GNUmakefile.example])
5 garren 100  
101  
102 # ----------------------------------------------------------------------
103 # Capture post-install information:
104 # ----------------------------------------------------------------------
105  
106 # ----------------------------------------------------------------------
107 # Supply boilerplate for HepMC/defs.h source header:
108 # ----------------------------------------------------------------------
109  
110 AH_TOP([#ifndef HEPMC_DEFS_H
111 #define HEPMC_DEFS_H])
112  
113 ## the undefs are converted by configure
114 AH_VERBATIM([PACKAGE],[/* Name of package */
115 #ifndef PACKAGE
116 #undef PACKAGE
117 #endif])
118 AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
119 #ifndef PACKAGE_BUGREPORT
120 #undef PACKAGE_BUGREPORT
121 #endif])
122 AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
123 #ifndef PACKAGE_NAME
124 #undef PACKAGE_NAME
125 #endif])
126 AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
127 #ifndef PACKAGE_STRING
128 #undef PACKAGE_STRING
129 #endif])
130 AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
131 #ifndef PACKAGE_TARNAME
132 #undef PACKAGE_TARNAME
133 #endif])
134 AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
135 #ifndef PACKAGE_VERSION
136 #undef PACKAGE_VERSION
137 #endif])
138 AH_VERBATIM([VERSION],[/* Version number of package */
139 #ifndef VERSION
140 #undef VERSION
141 #endif])
142  
143 AH_BOTTOM([#endif // HEPMC_DEFS_H])
144  
145 # ----------------------------------------------------------------------
146 # Account for any user configuration options:
147 # ----------------------------------------------------------------------
148  
149  
150 # ----------------------------------------------------------------------
151 # Check for needed programs:
152 # ----------------------------------------------------------------------
153  
53 garren 154 # need latex to build documents
78 garren 155 #AC_ARG_VAR(LATEX,[set if latex is in the path])
156 #AC_CHECK_PROG([LATEX],[latex],yes)
157 #AM_CONDITIONAL(HAVE_LATEX, test x$LATEX = xyes)
158 #AC_PATH_PROG([LATEXPATH],[latex])
159 #AC_SUBST(LATEXPATH)
53 garren 160  
5 garren 161 # Locate a C++ compiler:
26 garren 162 AC_PROG_CXX(cl g++ g++4 c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
5 garren 163  
164 # Use it hereinafter:
165 AC_LANG(C++)
166  
167 # Ensure we've found a preprocessor:
168 AC_REQUIRE_CPP
169  
170 # copy and diff
171 case "$target" in
172 *-*-win32*)
173 COPY_P="copy -p";DIFF_Q="diff -q -b"
174 ;;
175 *-*-cygwin*)
176 COPY_P="cp -p";DIFF_Q="diff -q -b"
177 ;;
178 *-*-solaris*)
179 COPY_P="cp -p";DIFF_Q="diff -b"
180 use_gmake="yes"
181 ;;
182 *-*-linux*)
183 COPY_P="cp -p";DIFF_Q="diff -q -b"
184 ;;
185 *)
186 COPY_P="cp -p";DIFF_Q="diff -q -b"
187 esac
188  
189 AM_CONDITIONAL(USE_GMAKE, test x$use_gmake = xyes)
190  
191 AC_SUBST(COPY_P)
192 AC_SUBST(DIFF_Q)
193  
194 # worry about compiler flags
195 case "$CXX" in
196 g++)
197 case "$target" in
198 *-*-linux*)
199 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
200 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
201 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
202 AR="ar"; ARFLAGS="cru"
203 ;;
204 *-*-darwin*)
155 garren 205 AC_PATH_PROG(SWVERS, sw_vers)
149 garren 206 MACOSX_DEPLOYMENT_TARGET=`$SWVERS -productVersion | cut -f 1,2 -d.`
150 garren 207 MACOSX_MAJOR_VERSION=`echo $MACOSX_DEPLOYMENT_TARGET | cut -f 1 -d.`
149 garren 208 MACOSX_VERSION=`echo $MACOSX_DEPLOYMENT_TARGET | cut -f 2 -d.`
209 AC_MSG_NOTICE([MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET])
210 AC_MSG_NOTICE([MACOSX_VERSION = $MACOSX_VERSION])
5 garren 211 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
149 garren 212 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -undefined dynamic_lookup -single_module"; SHEXT=dylib
5 garren 213 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
214 AR="ar"; ARFLAGS="cru"
150 garren 215 if test "$MACOSX_MAJOR_VERSION" -eq "10"; then
216 if test "$MACOSX_VERSION" -gt "2"; then
149 garren 217 AC_MSG_NOTICE([Mac OS X >= 3... building shared libraries for OS X])
218 build_shared="yes"
219 else
220 AC_MSG_WARN([Mac OS X < 3... not building shared libraries])
221 build_shared="no"
222 fi
150 garren 223 else
224 AC_MSG_WARN([Mac OS X != 10.X... not building shared libraries])
225 build_shared="no"
226 fi
5 garren 227 ;;
228 *)
229 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
230 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
231 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
232 AR="ar"; ARFLAGS="cru"
233 esac;;
185 garren 234 g++-*)
235 case "$target" in
236 *-*-linux*)
237 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
238 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
239 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
240 AR="ar"; ARFLAGS="cru"
241 ;;
242 *-*-darwin*)
243 AC_PATH_PROG(SWVERS, sw_vers)
244 MACOSX_DEPLOYMENT_TARGET=`$SWVERS -productVersion | cut -f 1,2 -d.`
245 MACOSX_MAJOR_VERSION=`echo $MACOSX_DEPLOYMENT_TARGET | cut -f 1 -d.`
246 MACOSX_VERSION=`echo $MACOSX_DEPLOYMENT_TARGET | cut -f 2 -d.`
247 AC_MSG_NOTICE([MACOSX_DEPLOYMENT_TARGET = $MACOSX_DEPLOYMENT_TARGET])
248 AC_MSG_NOTICE([MACOSX_VERSION = $MACOSX_VERSION])
249 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
250 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -undefined dynamic_lookup -single_module"; SHEXT=dylib
251 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
252 AR="ar"; ARFLAGS="cru"
253 if test "$MACOSX_MAJOR_VERSION" -eq "10"; then
254 if test "$MACOSX_VERSION" -gt "2"; then
255 AC_MSG_NOTICE([Mac OS X >= 3... building shared libraries for OS X])
256 build_shared="yes"
257 else
258 AC_MSG_WARN([Mac OS X < 3... not building shared libraries])
259 build_shared="no"
260 fi
261 else
262 AC_MSG_WARN([Mac OS X != 10.X... not building shared libraries])
263 build_shared="no"
264 fi
265 ;;
266 *)
267 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
268 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
269 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
270 AR="ar"; ARFLAGS="cru"
271 esac;;
26 garren 272 g++4)
273 case "$target" in
274 *-*-linux*)
275 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
276 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
277 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
278 AR="ar"; ARFLAGS="cru"
279 ;;
280 *-*-darwin*)
281 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
282 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
283 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
284 AR="ar"; ARFLAGS="cru"
285 build_shared="no"
286 ;;
287 *)
288 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
289 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
290 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
291 AR="ar"; ARFLAGS="cru"
292 esac;;
5 garren 293 c++)
294 case "$target" in
295 *-*-linux*)
296 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
297 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
298 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
299 AR="ar"; ARFLAGS="cru"
300 ;;
301 *-*-darwin*)
302 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
303 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
304 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
305 AR="ar"; ARFLAGS="cru"
306 build_shared="no"
307 ;;
308 *)
309 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
310 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
311 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
312 AR="ar"; ARFLAGS="cru"
313 esac;;
314 cl)
303 garren 315 AM_CXXFLAGS="-EHsc -nologo -GR -MD"
5 garren 316 AR="ar"; ARFLAGS="cru"
317 MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
318 MY_SHNAME="/OUT:"; MY_LD=" "
319 build_static="no"
320 build_shared="yes"
321 build_visual="yes"
322 CXXFLAGS=" "
323 AC_SUBST(CXXFLAGS)
324 ;;
325 CC)
326 case "$target" in
327 *-*-solaris*)
328 AM_CXXFLAGS="-O"
329 MY_SHFLAGS="-KPIC -DPIC"; MY_SHLINK="-G"; SHEXT=so
330 MY_SHNAME="-h"; MY_LD="-R"
331 AM_LDFLAGS="-lsunmath"
332 AR="CC"; ARFLAGS="-xar -o"
333 build_shared="no"
334 ;;
335 *-*-hpux*) AM_CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit"
336 AR="ar"; ARFLAGS="cru"
337 build_shared="no"
338 ;;
339 *-*-irix*) AM_CXXFLAGS="-O -OPT:Olimit=0 -pta"
340 AR="ar"; ARFLAGS="cru"
341 build_shared="no"
342 ;;
343 *) echo UNEXPECTED CHOICE OF OPERATING SYSTEM FOR $CXX: $target
344 esac;;
345 aCC)
346 AM_CXXFLAGS="-O -Aa +DAportable +Onolimit"
347 AR="ar"; ARFLAGS="cru"
348 build_shared="no"
349 ;;
350 cxx)
351 AM_CXXFLAGS="-O -std strict_ansi -timplicit_local"
352 AR="ar"; ARFLAGS="cru"
353 build_shared="no"
354 ;;
355 xlC)
356 AM_CXXFLAGS="-O3 -qtwolink -+"
357 AR="ar"; ARFLAGS="cru"
358 build_shared="no"
359 ;;
360 *) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
361 esac
362  
363 AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
364 AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
365 AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
366  
367 AC_SUBST(AM_CXXFLAGS)
368 AC_SUBST(AM_LDFLAGS)
369 AC_SUBST(MY_SHFLAGS)
370 AC_SUBST(MY_SHLINK)
371 AC_SUBST(MY_SHNAME)
372 AC_SUBST(MY_LD)
373 AC_SUBST(SHEXT)
374 AC_SUBST(AR)
375 AC_SUBST(ARFLAGS)
376  
377 # ----------------------------------------------------------------------
378 # Set system-dependent options:
379 # ----------------------------------------------------------------------
380  
381  
382 # ----------------------------------------------------------------------
383 # Check for needed libraries:
384 # ----------------------------------------------------------------------
385  
386  
387 # ----------------------------------------------------------------------
388 # Check for needed header files:
389 # ----------------------------------------------------------------------
390  
391 # ----------------------------------------------------------------------
392 # Check for needed typedefs, structures, and compiler characteristics:
393 # ----------------------------------------------------------------------
394  
395 AC_CHECK_TYPES([ptrdiff_t])
396  
397 # ----------------------------------------------------------------------
398 # Check for needed library functions:
399 # ----------------------------------------------------------------------
400  
401  
402 # ----------------------------------------------------------------------
403 # Finish up:
404 # ----------------------------------------------------------------------
405  
406 AC_OUTPUT
407  
408  
409 # ======================================================================