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