hepmc - Blame information for rev 5

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