SSO Logout

Subversion Repositories hepmc

Rev

Rev 7 | Details | Compare with Previous | Last modification | View Log | RSS feed

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