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