hepmc - Blame information for rev 7

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