configure.ac 15.9 KB
Newer Older
Adam Mercer's avatar
Adam Mercer committed
1
AC_INIT([lalapps],[6.6.4.1],[lal-discuss@gravity.phys.uwm.edu])
2
AC_CONFIG_HEADERS([src/config.h])
3
AC_CONFIG_SRCDIR([src/lalapps/lalapps.c])
Adam Mercer's avatar
Adam Mercer committed
4
AC_CONFIG_AUX_DIR([misc])
Adam Mercer's avatar
Adam Mercer committed
5
AC_CONFIG_MACRO_DIR([misc])
Adam Mercer's avatar
Adam Mercer committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
AC_CONFIG_FILES([\
  Makefile \
  lalapps.spec \
  debian/Makefile \
  doc/Makefile \
  man/Makefile \
  misc/Makefile \
  src/Makefile \
  src/lalapps/Makefile \
  src/calibration/Makefile \
  src/frametools/Makefile \
  src/findchirp/Makefile \
  src/stochastic/Makefile \
  src/power/Makefile \
  src/ring/Makefile \
  src/string/Makefile \
  src/pulsar/Makefile \
  src/pulsar/FDS_isolated/Makefile \
24
  src/pulsar/FDS_isolated/OptimizedCFS/Makefile \
Adam Mercer's avatar
Adam Mercer committed
25
26
27
28
29
30
  src/pulsar/FDS_isolated/ResamplingFstat/Makefile \
  src/pulsar/Injections/Makefile \
  src/pulsar/hough/Makefile \
  src/pulsar/hough/src/Makefile \
  src/pulsar/FDS_binary/Makefile \
  src/pulsar/SideBand/Makefile \
31
  src/pulsar/CombSearch/Makefile \
Adam Mercer's avatar
Adam Mercer committed
32
33
34
35
36
  src/pulsar/templateBanks/Makefile \
  src/pulsar/TimingTests/Makefile \
  src/pulsar/TDS_isolated/Makefile \
  src/inspiral/Makefile \
  src/inspiral/posterior/Makefile \
Kipp Cannon's avatar
Kipp Cannon committed
37
  src/inspiral/posterior/SPINspiral/Makefile \
38
  src/inspiral/posterior/mpi/Makefile \
Adam Mercer's avatar
Adam Mercer committed
39
  src/pulsar/hough/src2/Makefile \
40
  src/pulsar/GCT/Makefile \
Adam Mercer's avatar
Adam Mercer committed
41
42
43
  src/pulsar/MakeSFTs/Makefile \
  src/pulsar/crosscorr/Makefile \
  src/pulsar/fscan/Makefile \
44
  src/pulsar/TwoSpect/Makefile \
45
  src/pulsar/SFTReferenceLibrary/Makefile \
Adam Mercer's avatar
Adam Mercer committed
46
  src/tracksearch/Makefile \
47
  src/online/Makefile \
48
  src/hwinjection/Makefile \
Adam Mercer's avatar
Adam Mercer committed
49
])
Adam Mercer's avatar
Adam Mercer committed
50
AM_INIT_AUTOMAKE([foreign])
51
AH_TOP([
52
53
#ifndef CONFIG_H
#define CONFIG_H])
54
55
56
AH_BOTTOM([
#endif /* CONFIG_H */
])
jolien's avatar
jolien committed
57

Adam Mercer's avatar
Adam Mercer committed
58
59
AC_CANONICAL_HOST

60
LALSUITE_ARG_VAR
61
LALSUITE_DISTCHECK_CONFIGURE_FLAGS
62

jolien's avatar
jolien committed
63
64
65
66
67
68
LALAPPS_WITH_CC
LALAPPS_WITH_LAL_PREFIX
LALAPPS_WITH_EXTRA_CPPFLAGS
LALAPPS_WITH_EXTRA_CFLAGS
LALAPPS_WITH_EXTRA_LDFLAGS
LALAPPS_WITH_EXTRA_LIBS
69

Adam Mercer's avatar
Adam Mercer committed
70
LALSUITE_ENABLE_DEBUG
Adam Mercer's avatar
Adam Mercer committed
71
72
73

LALSUITE_WITH_CUDA

74
LALSUITE_ENABLE_GCC_FLAGS
75
LALSUITE_ENABLE_NIGHTLY
jolien's avatar
jolien committed
76
LALAPPS_ENABLE_CONDOR
Adam Mercer's avatar
Adam Mercer committed
77
LALSUITE_ENABLE_BOINC
78
LALAPPS_ENABLE_STATIC_BINARIES
Adam Mercer's avatar
Adam Mercer committed
79
80
81

LALAPPS_ENABLE_MPI

82
LALAPPS_ENABLE_FFTW
jolien's avatar
jolien committed
83
84
LALAPPS_ENABLE_FRAME
LALAPPS_ENABLE_METAIO
85
LALAPPS_ENABLE_CFITSIO
Adam Mercer's avatar
Adam Mercer committed
86
LALAPPS_ENABLE_PSS
87
LALAPPS_ENABLE_GDS
88
89
90

LALSUITE_ENABLE_LALFRAME
LALSUITE_ENABLE_LALMETAIO
91
LALSUITE_ENABLE_LALXML
Adam Mercer's avatar
Adam Mercer committed
92
LALSUITE_ENABLE_LALSIMULATION
93
94
95
LALSUITE_ENABLE_LALBURST
LALSUITE_ENABLE_LALINSPIRAL
LALSUITE_ENABLE_LALPULSAR
96
LALSUITE_ENABLE_LALINFERENCE
97
LALSUITE_ENABLE_LALSTOCHASTIC
jolien's avatar
jolien committed
98

Adam Mercer's avatar
Adam Mercer committed
99
# put version/configure info in config header
100
101
lalapps_version_major=`echo "$VERSION" | cut -d. -f1`
lalapps_version_minor=`echo "$VERSION" | cut -d. -f2`
Adam Mercer's avatar
Adam Mercer committed
102
103
lalapps_version_micro=`echo "$VERSION" | cut -d. -f3`
lalapps_version_devel=`echo "$VERSION" | cut -d. -f4-`
104
105
test -z "$lalapps_version_micro" && lalapps_version_micro=0
test -z "$lalapps_version_devel" && lalapps_version_devel=0
106
lalapps_configure_date=`date +"%Y-%m-%dT%H:%M:%S%z"`
Adam Mercer's avatar
Adam Mercer committed
107
108
AC_DEFINE_UNQUOTED([LALAPPS_VERSION],["$VERSION"],[LALApps Version])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MAJOR],[$lalapps_version_major],
109
                   [LALApps Version Major Number])
Adam Mercer's avatar
Adam Mercer committed
110
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MINOR],[$lalapps_version_minor],
111
                   [LALApps Version Minor Number])
Adam Mercer's avatar
Adam Mercer committed
112
113
114
115
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_MICRO],[$lalapps_version_micro],
                   [LALApps Version Micro Number])
AC_DEFINE_UNQUOTED([LALAPPS_VERSION_DEVEL],[$lalapps_version_devel],
                   [LALApps Version Devel Number])
Adam Mercer's avatar
Adam Mercer committed
116
AC_DEFINE_UNQUOTED([LALAPPS_CONFIGURE_ARGS],["$ac_configure_args"],
117
                   [LALApps Configure Arguments])
Adam Mercer's avatar
Adam Mercer committed
118
AC_DEFINE_UNQUOTED([LALAPPS_CONFIGURE_DATE],["$lalapps_configure_date"],
119
120
                   [LALApps Configure Date])

Adam Mercer's avatar
Adam Mercer committed
121
# remove -all-static from ldflags, breaks tests
duncan's avatar
duncan committed
122
123
124
125
126
127
128
129
allstatic=`echo $LDFLAGS | sed '/-all-static/!d'`
if test "x$allstatic" = "x" ; then
  allstatic="false"
else
  LDFLAGS=`echo $LDFLAGS | sed s/-all-static//g`
  allstatic="true"
fi

130
131
132
# workaround broken libtool multilib support on sl6
LALSUITE_MULTILIB_LIBTOOL_HACK

133
134
# check for c compiler
m4_pattern_allow([AC_PROG_CC_C99])
135
m4_ifdef([AC_PROG_CC_C99],[AC_PROG_CC_C99],[LALSUITE_AC_PROG_CC_C99])
136

137
# check for c++ compiler
138
AC_PROG_CXX
139

Adam Mercer's avatar
Adam Mercer committed
140
141
142
143
144
145
# check for MPI compiler
if test "x$mpi" = "xtrue"; then
  AX_MPI([mpi=true],[mpi=false])
fi
LALSUITE_ENABLE_MODULE([MPI],[mpi])

146
147
148
# use silent build rules if appropriate
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])],)

Adam Mercer's avatar
Adam Mercer committed
149
# checks for programs
jolien's avatar
jolien committed
150
AC_PROG_CPP
Adam Mercer's avatar
Adam Mercer committed
151
152
AC_PROG_INSTALL
AC_PROG_LN_S
153
AC_PROG_AWK
154

Adam Mercer's avatar
Adam Mercer committed
155
# check for condor_compile
156
AC_ENABLE_SHARED
157
if test "x$condor" = "xtrue"; then
158
159
160
161
  AC_CHECK_PROGS([CONDOR_COMPILE],[condor_compile],[false])
  if test "x$CONDOR_COMPILE" = "xfalse"; then
    AC_MSG_ERROR([condor_compile not found])
  fi
162
163
164
165
166
167
168
169
170

  # does condor_compile suffer from condorbug 19343
  AC_MSG_CHECKING([if condor_compile suffers from bug 19343])
  if $CONDOR_COMPILE $CC -print-prog-name=ld 1>/dev/null 2>/dev/null; then
    AC_MSG_RESULT([no])
  else
    AC_MSG_RESULT([yes])
    LD=/usr/bin/ld
  fi
171
fi
172
CONDOR_ENABLE_VAL="`eval test x$condor = xtrue && echo "ENABLED" || echo "DISABLED"`"
173
174
AM_CONDITIONAL([CONDOR_ENABLED],[test "$CONDOR_ENABLE_VAL" = "ENABLED"])

Adam Mercer's avatar
Adam Mercer committed
175
# further program checks
Adam Mercer's avatar
Adam Mercer committed
176
LT_INIT
Adam Mercer's avatar
Adam Mercer committed
177
178
179
180
181
AC_CHECK_PROGS([LATEX],[pdflatex latex],[echo])
AC_CHECK_PROGS([MKIND],[makeindex],[echo])
AC_CHECK_PROGS([DVIPS],[dvips],[echo])
AC_CHECK_PROGS([BIBTEX],[bibtex],[echo])
AM_PATH_PYTHON([2.4],,[:])
182
AM_CONDITIONAL([HAVE_PYTHON],[test "$PYTHON" != :])
jolien's avatar
jolien committed
183

184
# check for supported mac os x version
185
LALSUITE_OSX_VERSION_CHECK
186

187
188
189
# link tests using libtool
LALSUITE_USE_LIBTOOL

190
191
192
# check complex number types
LALSUITE_CHECK_COMPLEX_NUMBER_TYPES

Adam Mercer's avatar
Adam Mercer committed
193
# check for system libraries
Adam Mercer's avatar
Adam Mercer committed
194
195
AC_CHECK_LIB([m],[sin])
AC_CHECK_LIB([z],[compress])
196

197
198
199
200
201
202
# check for system headers
AC_HEADER_STDC
AC_CHECK_HEADERS([glob.h])
AC_CHECK_HEADERS([punistd.h])
AC_CHECK_HEADERS([getopt.h])

203
204
205
206
207
208
# check for boinc
if test "${boinc}" = "true" ; then
  if test -n "$BOINC_PREFIX}" ; then
    # do compilation checks with c++
    AC_LANG_PUSH([C++])

209
    # has lal build built with boinc support
Adam Mercer's avatar
Adam Mercer committed
210
    LALSUITE_CHECK_BOINC
211
212

    # point to boinc headers and libraries
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
    CPPFLAGS="$CPPFLAGS -I$BOINC_PREFIX/include"
    LDFLAGS="$LDFLAGS -L$BOINC_PREFIX/lib"

    # check for boinc libraries
    AC_CHECK_LIB([boinc],[boinc_fopen],[true],[boinc=false])
    AC_CHECK_LIB([boinc_api],[boinc_finish],[true],[boinc=false],[-lboinc])

    # check for boinc headers
    AC_CHECK_HEADERS([boinc/boinc_api.h],,[boinc=false])

    # go back to c
    AC_LANG_POP([C++])
  fi
fi
BOINC_ENABLE_VAL="`eval test x$boinc = xtrue && echo "ENABLED" || echo "DISABLED"`"

Adam Mercer's avatar
Adam Mercer committed
229
# check for gsl
Adam Mercer's avatar
Adam Mercer committed
230
PKG_CHECK_MODULES([GSL],[gsl],[true],[false])
231
CPPFLAGS="$CPPFLAGS $GSL_CFLAGS"
232
LIBS="$GSL_LIBS $LIBS"
233
234
AC_CHECK_LIB([gslcblas],[main],,[AC_MSG_ERROR([could not find the gsl library])])
AC_CHECK_LIB([gsl],[gsl_version],,[AC_MSG_ERROR([could not find the gsl library])])
235
LALSUITE_ENABLE_FAST_GSL
236

237
# check for gsl headers
238
AC_CHECK_HEADERS([gsl/gsl_errno.h],,[AC_MSG_ERROR([could not find the gsl/gsl_errno.h header])])
239

240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# check for fftw libraries
if test "${fftw}" = "true"; then
  PKG_CHECK_MODULES([FFTW3],[fftw3 fftw3f],[true],[false])
  CPPFLAGS="$CPPFLAGS $FFTW3_CFLAGS"
  LIBS="$LIBS $FFTW3_LIBS"
  AC_CHECK_LIB([fftw3f],[fftwf_execute_dft],,[AC_MSG_WARN([could not find the fftw3f library])],[-lm])
  AC_CHECK_LIB([fftw3],[fftw_execute_dft],,[AC_MSG_WARN([could not find the fftw3 library])],[-lm])
fi

# check for fftw headers
if test "${fftw}" = "true"; then
  AC_CHECK_HEADERS([fftw3.h],,[AC_MSG_WARN([could not find the fftw3.h header])])
fi
LALSUITE_ENABLE_MODULE([FFTW],[fftw])

255
256
# check for GDS system: we check if we can link against libawg which is in GDS
# GDS is a requirements for building 'online_psinject', which is used for hardware injections
257
258
259
260
if test "${gds}" = "true"; then
  AC_CHECK_LIB([awg],[awgGetChannelNames],,[gds="false"])
  AC_CHECK_HEADERS([gdstype.h],,[gds="false"])
fi
261
262
LALSUITE_ENABLE_MODULE([GDS],[gds])

Adam Mercer's avatar
Adam Mercer committed
263
# check for libFrame
264
if test "${frame}" = "true"; then
Adam Mercer's avatar
Adam Mercer committed
265
  PKG_CHECK_MODULES([FRAME],[libframe],[true],[false])
266
267
  lal_pre_frame_LIBS="$LIBS"
  LIBS="$LIBS $FRAME_LIBS"
Adam Mercer's avatar
Adam Mercer committed
268
  AC_SEARCH_LIBS([FrLibIni],[Frame],,
269
                 [AC_MSG_WARN([could not find the frame library])]
270
                 [frame="false"]
271
                 [lalframe="false"]
272
273
274
                 [LIBS="$lal_pre_frame_LIBS"])
fi

275
276
277
278
279
# check for libFrame headers
if test "${frame}" = "true"; then
  lal_pre_frame_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$CPPFLAGS $FRAME_CFLAGS"
  AC_CHECK_HEADERS([FrameL.h],,
280
                   [AC_MSG_WARN([could not find the FrameL.h header])]
281
282
283
284
285
286
                   [frame="false"]
                   [lalframe="false"]
                   [CPPFLAGS="$lal_pre_frame_CPPFLAGS"])
fi
LALSUITE_ENABLE_MODULE([FRAME],[frame])

Adam Mercer's avatar
Adam Mercer committed
287
# check for libmetaio
288
if test "${metaio}" = "true"; then
Adam Mercer's avatar
Adam Mercer committed
289
  PKG_CHECK_MODULES([METAIO],[libmetaio],[true],[false])
290
291
  lal_pre_metaio_LIBS="$LIBS"
  LIBS="$LIBS $METAIO_LIBS"
Adam Mercer's avatar
Adam Mercer committed
292
  AC_SEARCH_LIBS([MetaioOpen],[metaio],,
293
                 [AC_MSG_WARN([could not find the metaio library])]
294
                 [metaio="false"]
295
                 [lalmetaio="false"]
296
297
298
                 [LIBS="$lal_pre_metaio_LIBS"])
fi

299
300
301
302
303
# check for libmetaio headers
if test "${metaio}" = "true"; then
  lal_pre_metaio_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$CPPFLAGS $METAIO_CFLAGS"
  AC_CHECK_HEADERS([metaio.h],,
304
                   [AC_MSG_WARN([could not find the metaio.h header])]
305
306
307
308
309
310
                   [metaio="false"]
                   [lalmetaio="false"]
                   [CPPFLAGS="$lal_pre_metaio_CPPFLAGS"])
fi
LALSUITE_ENABLE_MODULE([METAIO],[metaio])

Adam Mercer's avatar
Adam Mercer committed
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
# check for libxml2
if test "$lalxml" = "true"; then
  PKG_CHECK_MODULES([LIBXML2],[libxml-2.0 >= 2.6],[true],[false])
  lal_pre_libxml2_LIBS="$LIBS"
  LIBS="$LIBS $LIBXML2_LIBS"
  AC_SEARCH_LIBS([xmlInitParser],[xml2],,
                 [AC_MSG_WARN([cannot find the xml2 library])]
                 [lalxml="false"]
                 [LIBS="$lal_pre_libxml2_LIBS"])
fi

# check for libxml2 headers
if test "$lalxml" = "true"; then
  lal_pre_libxml2_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$CPPFLAGS $LIBXML2_CFLAGS"
  AC_CHECK_HEADERS([libxml/tree.h],,
                   [AC_MSG_WARN([could not the libxml/tree.h header])]
                   [lalxml="false"]
                   [CPPFLAGS="$lal_pre_libxml2_CPPFLAGS"])
fi

Adam Mercer's avatar
Adam Mercer committed
332
# check for libcfitsio
333
if test "${cfitsio}" = "true"; then
334
335
336
337
338
339
  PKG_CHECK_MODULES([CFITSIO],[cfitsio],[true],[false])
  lal_pre_cfitsio_libs="$LIBS"
  LIBS="$CFITSIO_LIBS $LIBS"
  AC_SEARCH_LIBS([ffopen],[cfitsio],,
                 [cfitsio="false"]
                 [LIBS="$lal_pre_cfitsio_LIBS"])
340
341
fi

342
343
344
345
# check for libcfitsio headers
if test "${cfitsio}" = "true"; then
  lal_pre_cfitsio_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$CPPFLAGS $CFITSIO_CFLAGS"
346
347
348
  AC_CHECK_HEADERS([fitsio.h],,
                   [cfitsio="false"]
                   [CPPFLAGS="$lal_pre_cfitsio_CPPFLAGS"])
349
350
351
fi
LALSUITE_ENABLE_MODULE([CFITSIO],[cfitsio])

Adam Mercer's avatar
Adam Mercer committed
352
353
# check for pss
if test "${pss}" = "true"; then
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
  PKG_CHECK_MODULES([PSS],[pss],[true],[false])
  lal_pre_pss_LIBS="$LIBS"
  LIBS="$PSS_LIBS $LIBS"
  AC_SEARCH_LIBS([crea_sfdbheader],[psssfdb],,
                 [pss="false"]
                 [LIBS="$lal_pre_pss_LIBS"])
  AC_SEARCH_LIBS([pss_set_gw],[pss],,
                 [pss="false"]
                 [LIBS="$lal_pre_pss_LIBS"])
  AC_SEARCH_LIBS([PSS_utc2tdt],[pssastro],,
                 [pss="false"]
                 [LIBS="$lal_pre_pss_LIBS"])
  AC_SEARCH_LIBS([app_star],[pssnovas],,
                 [pss="false"]
                 [LIBS="$lal_pre_pss_LIBS"])
fi

371

372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
# check for pss headers
if test "${pss}" = "true"; then
  lal_pre_pss_CPPFLAGS="$CPPFLAGS"
  CPPFLAGS="$PSS_CFLAGS $CPPFLAGS"
  AC_CHECK_HEADERS([pss_sfdb.h],,
                   [pss="false"]
                   [CPPFLAGS="$lal_pre_pss_CPPFLAGS"])
  AC_CHECK_HEADERS([pss_gw.h],,
                   [pss="false"]
                   [CPPFLAGS="$lal_pre_pss_CPPFLAGS"])
  AC_CHECK_HEADERS([pss_astro.h],,
                   [pss="false"]
                   [CPPFLAGS="$lal_pre_pss_CPPFLAGS"])
  AC_CHECK_HEADERS([novas.h],,
                   [pss="false"]
                   [CPPFLAGS="$lal_pre_pss_CPPFLAGS"])
Adam Mercer's avatar
Adam Mercer committed
388
389
390
fi
LALSUITE_ENABLE_MODULE([PSS],[pss])

Adam Mercer's avatar
typo    
Adam Mercer committed
391
# use c++ mode for boinc build
392
393
394
395
if test "${boinc}" = "true" ; then
   AC_LANG_PUSH([C++])
fi

396
# check for lal libararies and headers
397
398
399
400
401
402
403
LALSUITE_CHECK_LIB([LAL],[6.6.0],[LALVersion],[lal/LALStdio.h])
LALSUITE_CHECK_LIB([LALSupport],[6.6.0],[LALOpenDataFile],[lal/FileIO.h])
LALSUITE_CHECK_OPT_LIB([LALFrame],[1.0.3],[LALFrOpen],[lal/LALFrameL.h])
LALSUITE_CHECK_OPT_LIB([LALMetaIO],[1.0.2],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
LALSUITE_CHECK_OPT_LIB([LALXML],[1.1.1],[XLALXMLFilePrintElements],[lal/LALXML.h])
LALSUITE_CHECK_OPT_LIB([LALSimulation],[0.1.0],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
LALSUITE_CHECK_OPT_LIB([LALBurst],[1.1.0],[XLALEPSearch],[lal/EPSearch.h])
404
LALSUITE_CHECK_OPT_LIB([LALInspiral],[1.2.3],[LALInspiralParameterCalc],[lal/LALInspiral.h])
405
406
407
LALSUITE_CHECK_OPT_LIB([LALInference],[0.1.0],[LALInferenceAddVariable],[lal/LALInference.h])
LALSUITE_CHECK_OPT_LIB([LALPulsar],[1.2.0],[XLALComputeFaFb],[lal/ComputeFstat.h])
LALSUITE_CHECK_OPT_LIB([LALStochastic],[1.1.2],[LALStochasticOptimalFilter],[lal/StochasticCrossCorrelation.h])
408

409
410
411
412
413
# back to c mode
if test "${boinc}" = "true" ; then
   AC_LANG_POP([C++])
fi

Adam Mercer's avatar
Adam Mercer committed
414
# check for qthread
415
416
LALAPPS_CHECK_QTHREAD

Adam Mercer's avatar
Adam Mercer committed
417
# check for gethostname prototype
Adam Mercer's avatar
Adam Mercer committed
418
419
420
421
422
AC_MSG_CHECKING([for gethostname prototype in unistd.h])
AC_EGREP_HEADER([gethostname],[unistd.h],[AC_MSG_RESULT([yes])]
  [AC_DEFINE([HAVE_GETHOSTNAME_PROTOTYPE],[1],
             [Define if gethostname prototype is in unistd.h])],
  [AC_MSG_RESULT([no])])
423

Adam Mercer's avatar
Adam Mercer committed
424
AC_CHECK_FUNCS([setenv])
jolien's avatar
jolien committed
425

426
# set prefix
Adam Mercer's avatar
Adam Mercer committed
427
AC_DEFINE_UNQUOTED([PREFIX],["$prefix"],[Install prefix])
jolien's avatar
jolien committed
428

429
430
# add gcc specific flags
if test "$GCC" = yes; then
Adam Mercer's avatar
Adam Mercer committed
431
432
433
434
435
436
  # don't use gcc flags when cuda is enabled
  if test "${cuda}" != "true"; then
    CFLAGS="$CFLAGS $lal_gcc_flags"
  else
    AC_MSG_NOTICE([CUDA support is enabled, disabling GCC flags])
  fi
437
438
439
440
441
442
443

  # add mac os x specific flags
  if test "x$MACOSX_VERSION" != "x"; then
    CFLAGS="$CFLAGS -mmacosx-version-min=10.4"
  fi
fi

Adam Mercer's avatar
Adam Mercer committed
444
445
446
447
448
# define if CUDA is enabled
if test "${cuda}" = "true"; then
  AC_DEFINE([LALAPPS_CUDA_ENABLED],[1],[Define if using cuda library])
fi

Adam Mercer's avatar
Adam Mercer committed
449
450
451
452
453
454
455
456
457
# enable condor compile
if test "x${condor}" = "xtrue" ; then
  CC="$CONDOR_COMPILE $CC"
  AM_LDFLAGS="$AM_LDFLAGS -all-static"
  AC_DISABLE_SHARED
  AC_SUBST([AM_LDFLAGS])
  AC_DEFINE([LALAPPS_CONDOR],[1],[LALApps is condor compiled])
fi

458
459
460
461
462
463
464
# add -all-static to AM_LDFLAGS for --enable-static-binaries
if test "${static_binaries}" = "true"; then
  AM_LDFLAGS="$AM_LDFLAGS -all-static"
  AC_DISABLE_SHARED
  AC_SUBST([AM_LDFLAGS])
fi

465
# restore all static to ldflags
duncan's avatar
duncan committed
466
if test "${allstatic}" = "true" ; then
467
  LDFLAGS="-static -all-static $LDFLAGS"
duncan's avatar
duncan committed
468
469
fi

Adam Mercer's avatar
Adam Mercer committed
470
AC_OUTPUT
471
472
473
474
475
476

echo "
================================================================

        LALApps has now been successfully configured:

477
                FFTW library support is $FFTW_ENABLE_VAL
478
479
                Frame library support is $FRAME_ENABLE_VAL
                MetaIO library support is $METAIO_ENABLE_VAL
480
                LAL Frame library support is $LALFRAME_ENABLE_VAL
481
                LAL MetaIO library support is $LALMETAIO_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
482
                LAL XML library support is $LALXML_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
483
                LAL Simulation library support is $LALSIMULATION_ENABLE_VAL
484
                LAL Burst library support is $LALBURST_ENABLE_VAL
485
                LAL Inspiral library support is $LALINSPIRAL_ENABLE_VAL
486
                LAL Stochastic library support is $LALSTOCHASTIC_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
487
                LAL Pulsar library support is $LALPULSAR_ENABLE_VAL
488
                LAL Inference library support is $LALINFERENCE_ENABLE_VAL
489
                FITS library support is $CFITSIO_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
490
                PSS library support is $PSS_ENABLE_VAL
491
                Condor support is $CONDOR_ENABLE_VAL
492
                BOINC support is $BOINC_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
493
                MPI support is $MPI_ENABLE_VAL
494
                GDS support is $GDS_ENABLE_VAL
Adam Mercer's avatar
Adam Mercer committed
495
                CUDA support is $CUDA_ENABLE_VAL
496
497
498
499
500
501
502
503

        Now run 'make' to build LALApps
        and run 'make install' to install LALApps
        LALApps will be installed under the directory:

                $prefix

================================================================="