hepmc - Blame information for rev 78

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)
61 garren 12 AC_INIT(HepMC, 2.00.02, 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])
26 garren 90 AC_CONFIG_FILES([test/testPrintBug.sh], [chmod +x test/testPrintBug.sh])
7 garren 91 AC_CONFIG_FILES([examples/Makefile])
92 AC_CONFIG_FILES([examples/GNUmakefile.example])
5 garren 93  
94  
95 # ----------------------------------------------------------------------
96 # Capture post-install information:
97 # ----------------------------------------------------------------------
98  
99 # ----------------------------------------------------------------------
100 # Supply boilerplate for HepMC/defs.h source header:
101 # ----------------------------------------------------------------------
102  
103 AH_TOP([#ifndef HEPMC_DEFS_H
104 #define HEPMC_DEFS_H])
105  
106 ## the undefs are converted by configure
107 AH_VERBATIM([PACKAGE],[/* Name of package */
108 #ifndef PACKAGE
109 #undef PACKAGE
110 #endif])
111 AH_VERBATIM([PACKAGE_BUGREPORT],[/* Define to the address where bug reports for this package should be sent. */
112 #ifndef PACKAGE_BUGREPORT
113 #undef PACKAGE_BUGREPORT
114 #endif])
115 AH_VERBATIM([PACKAGE_NAME],[/* Define to the full name of this package. */
116 #ifndef PACKAGE_NAME
117 #undef PACKAGE_NAME
118 #endif])
119 AH_VERBATIM([PACKAGE_STRING],[/* Define to the full name and version of this package. */
120 #ifndef PACKAGE_STRING
121 #undef PACKAGE_STRING
122 #endif])
123 AH_VERBATIM([PACKAGE_TARNAME],[/* Define to the one symbol short name of this package. */
124 #ifndef PACKAGE_TARNAME
125 #undef PACKAGE_TARNAME
126 #endif])
127 AH_VERBATIM([PACKAGE_VERSION],[/* Define to the version of this package. */
128 #ifndef PACKAGE_VERSION
129 #undef PACKAGE_VERSION
130 #endif])
131 AH_VERBATIM([VERSION],[/* Version number of package */
132 #ifndef VERSION
133 #undef VERSION
134 #endif])
135  
136 AH_BOTTOM([#endif // HEPMC_DEFS_H])
137  
138 # ----------------------------------------------------------------------
139 # Account for any user configuration options:
140 # ----------------------------------------------------------------------
141  
142  
143 # ----------------------------------------------------------------------
144 # Check for needed programs:
145 # ----------------------------------------------------------------------
146  
53 garren 147 # need latex to build documents
78 garren 148 #AC_ARG_VAR(LATEX,[set if latex is in the path])
149 #AC_CHECK_PROG([LATEX],[latex],yes)
150 #AM_CONDITIONAL(HAVE_LATEX, test x$LATEX = xyes)
151 #AC_PATH_PROG([LATEXPATH],[latex])
152 #AC_SUBST(LATEXPATH)
53 garren 153  
5 garren 154 # Locate a C++ compiler:
26 garren 155 AC_PROG_CXX(cl g++ g++4 c++ aCC CC cxx cc++ FCC KCC RCC xlC_r xlC gpp)
5 garren 156  
157 # Use it hereinafter:
158 AC_LANG(C++)
159  
160 # Ensure we've found a preprocessor:
161 AC_REQUIRE_CPP
162  
163 # copy and diff
164 case "$target" in
165 *-*-win32*)
166 COPY_P="copy -p";DIFF_Q="diff -q -b"
167 ;;
168 *-*-cygwin*)
169 COPY_P="cp -p";DIFF_Q="diff -q -b"
170 ;;
171 *-*-solaris*)
172 COPY_P="cp -p";DIFF_Q="diff -b"
173 use_gmake="yes"
174 ;;
175 *-*-linux*)
176 COPY_P="cp -p";DIFF_Q="diff -q -b"
177 ;;
178 *)
179 COPY_P="cp -p";DIFF_Q="diff -q -b"
180 esac
181  
182 AM_CONDITIONAL(USE_GMAKE, test x$use_gmake = xyes)
183  
184 AC_SUBST(COPY_P)
185 AC_SUBST(DIFF_Q)
186  
187 # worry about compiler flags
188 case "$CXX" in
189 g++)
190 case "$target" in
191 *-*-linux*)
192 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
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 ;;
197 *-*-darwin*)
198 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
199 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
200 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
201 AR="ar"; ARFLAGS="cru"
202 build_shared="no"
203 ;;
204 *)
205 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
206 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
207 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
208 AR="ar"; ARFLAGS="cru"
209 esac;;
26 garren 210 g++4)
211 case "$target" in
212 *-*-linux*)
213 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
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 ;;
218 *-*-darwin*)
219 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
220 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
221 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
222 AR="ar"; ARFLAGS="cru"
223 build_shared="no"
224 ;;
225 *)
226 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
227 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
228 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
229 AR="ar"; ARFLAGS="cru"
230 esac;;
5 garren 231 c++)
232 case "$target" in
233 *-*-linux*)
234 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
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 ;;
239 *-*-darwin*)
240 AM_CXXFLAGS="-O -ansi -pedantic -Wall -D_GNU_SOURCE"
241 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-dynamiclib -single_module"; SHEXT=dylib
242 MY_SHNAME="-Wl,-install_name,"; MY_LD="-Wl,--rpath -Wl,"
243 AR="ar"; ARFLAGS="cru"
244 build_shared="no"
245 ;;
246 *)
247 AM_CXXFLAGS="-O -ansi -pedantic -Wall"
248 MY_SHFLAGS="-fPIC -DPIC"; MY_SHLINK="-shared"; SHEXT=so
249 MY_SHNAME="-Wl,-soname,"; MY_LD="-Wl,--rpath -Wl,"
250 AR="ar"; ARFLAGS="cru"
251 esac;;
252 cl)
253 AM_CXXFLAGS="-EHsc -nologo -GR -GX -MD"
254 AR="ar"; ARFLAGS="cru"
255 MY_SHFLAGS=" "; MY_SHLINK="lib /NOLOGO"; SHEXT=lib
256 MY_SHNAME="/OUT:"; MY_LD=" "
257 build_static="no"
258 build_shared="yes"
259 build_visual="yes"
260 CXXFLAGS=" "
261 AC_SUBST(CXXFLAGS)
262 ;;
263 CC)
264 case "$target" in
265 *-*-solaris*)
266 AM_CXXFLAGS="-O"
267 MY_SHFLAGS="-KPIC -DPIC"; MY_SHLINK="-G"; SHEXT=so
268 MY_SHNAME="-h"; MY_LD="-R"
269 AM_LDFLAGS="-lsunmath"
270 AR="CC"; ARFLAGS="-xar -o"
271 build_shared="no"
272 ;;
273 *-*-hpux*) AM_CXXFLAGS="+O3 +DAportable +a1 -z -pta +Onolimit"
274 AR="ar"; ARFLAGS="cru"
275 build_shared="no"
276 ;;
277 *-*-irix*) AM_CXXFLAGS="-O -OPT:Olimit=0 -pta"
278 AR="ar"; ARFLAGS="cru"
279 build_shared="no"
280 ;;
281 *) echo UNEXPECTED CHOICE OF OPERATING SYSTEM FOR $CXX: $target
282 esac;;
283 aCC)
284 AM_CXXFLAGS="-O -Aa +DAportable +Onolimit"
285 AR="ar"; ARFLAGS="cru"
286 build_shared="no"
287 ;;
288 cxx)
289 AM_CXXFLAGS="-O -std strict_ansi -timplicit_local"
290 AR="ar"; ARFLAGS="cru"
291 build_shared="no"
292 ;;
293 xlC)
294 AM_CXXFLAGS="-O3 -qtwolink -+"
295 AR="ar"; ARFLAGS="cru"
296 build_shared="no"
297 ;;
298 *) echo UNEXPECTED CHOICE OF C++ COMPILER: $CXX
299 esac
300  
301 AM_CONDITIONAL(BUILD_SHARED, test x$build_shared = xyes)
302 AM_CONDITIONAL(BUILD_STATIC, test x$build_static = xyes)
303 AM_CONDITIONAL(BUILD_VISUAL, test x$build_visual = xyes)
304  
305 AC_SUBST(AM_CXXFLAGS)
306 AC_SUBST(AM_LDFLAGS)
307 AC_SUBST(MY_SHFLAGS)
308 AC_SUBST(MY_SHLINK)
309 AC_SUBST(MY_SHNAME)
310 AC_SUBST(MY_LD)
311 AC_SUBST(SHEXT)
312 AC_SUBST(AR)
313 AC_SUBST(ARFLAGS)
314  
315 # ----------------------------------------------------------------------
316 # Set system-dependent options:
317 # ----------------------------------------------------------------------
318  
319  
320 # ----------------------------------------------------------------------
321 # Check for needed libraries:
322 # ----------------------------------------------------------------------
323  
324  
325 # ----------------------------------------------------------------------
326 # Check for needed header files:
327 # ----------------------------------------------------------------------
328  
329 # ----------------------------------------------------------------------
330 # Check for needed typedefs, structures, and compiler characteristics:
331 # ----------------------------------------------------------------------
332  
333 AC_CHECK_TYPES([ptrdiff_t])
334  
335 # ----------------------------------------------------------------------
336 # Check for needed library functions:
337 # ----------------------------------------------------------------------
338  
339  
340 # ----------------------------------------------------------------------
341 # Finish up:
342 # ----------------------------------------------------------------------
343  
344 AC_OUTPUT
345  
346  
347 # ======================================================================