configure.ac 5.14 KB
Newer Older
1
AC_PREREQ([2.63])
2
AC_INIT([LALDetChar],[0.1.0.1],[lal-discuss@ligo.org])
Adam Mercer's avatar
Adam Mercer committed
3
AC_CONFIG_HEADERS([src/config.h src/LALDetCharConfig.h])
4 5 6 7 8 9
AC_CONFIG_SRCDIR([src/LALDetChar.h])
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
AC_CONFIG_FILES([ \
  laldetchar.spec \
  laldetchar.pc \
10
  laldetchar-uninstalled.pc \
11 12 13 14
  Makefile \
  debian/Makefile \
  include/Makefile \
  include/lal/Makefile \
15 16
  src/LALDetCharVCSInfo.c \
  src/LALDetCharVCSInfo.h \
17 18
  src/Makefile \
  python/Makefile \
19 20 21 22
  python/laldetchar/Makefile \
  python/laldetchar/__init__.py \
  python/laldetchar/triggers/Makefile \
  python/laldetchar/hveto/Makefile \
23 24 25
  swig/Makefile \
  test/Makefile
])
Karl Wette's avatar
Karl Wette committed
26
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects color-tests parallel-tests])
27 28 29

AC_CANONICAL_HOST

30 31
LALSUITE_ARG_VAR

Karl Wette's avatar
Karl Wette committed
32
LALSUITE_CHECK_GIT_REPO
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
LALSUITE_DISTCHECK_CONFIGURE_FLAGS

# set library api info
# 1. start with version information of "0:0:0" for each libtool library
# 2. update the version information only immediately before a public
#    release of your software. More frequent updates are unnecessary,
#    and only guarantee that the current interface number gets larger
#    faster.
# 3. if the library source code has changed at all since the last
#    update, then increment revision ("c:r:a" becomes "c:r+1:a").
# 4. if any interfaces have been added, removed, or changed since the
#    last update, increment current, and set revision to 0.
# 5. if any interfaces have been added since the last public release,
#    then increment age.
# 6. if any interfaces have been removed since the last public release,
#    then set age to 0.
49
AC_SUBST([LIBCURRENT],[1])
50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65
AC_SUBST([LIBREVISION],[0])
AC_SUBST([LIBAGE],[0])
AC_SUBST([LIBVERSION],[${LIBCURRENT}:${LIBREVISION}:${LIBAGE}])

# nightly build
LALSUITE_ENABLE_NIGHTLY

# enable strict gcc flags
LALSUITE_ENABLE_GCC_FLAGS

# enable SWIG wrapping modules
LALSUITE_ENABLE_SWIG

# optional lal libraries
LALSUITE_ENABLE_LALFRAME

66 67
# define version/configure info
LALSUITE_VERSION_CONFIGURE_INFO
68 69 70 71 72 73 74

# workaround broken libtool multilib support on sl6
LALSUITE_MULTILIB_LIBTOOL_HACK

# use silent build rules
AM_SILENT_RULES([yes])

75 76
# check for required compilers
LALSUITE_PROG_COMPILERS
77 78

# checks for programs
79
AC_PROG_INSTALL
80 81 82
AC_PROG_LN_S
AC_PROG_AWK
AC_PROG_SED
83
LALSUITE_CHECK_PYTHON([2.6])
84 85 86 87 88 89 90 91 92 93 94 95 96

# check for supported mac os x version
LALSUITE_OSX_VERSION_CHECK

# link tests using libtool
LALSUITE_USE_LIBTOOL

# check for header files
AC_HEADER_STDC

# check for required libraries
AC_CHECK_LIB([m],[main],,[AC_MSG_ERROR([could not find the math library])])

97 98
# check for gsl
PKG_CHECK_MODULES([GSL],[gsl],[true],[false])
99
LALSUITE_ADD_FLAGS([C],[${GSL_CFLAGS}],[${GSL_LIBS}])
100 101
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])])
102
LALSUITE_CHECK_GSL_VERSION([1.13])
103 104 105 106 107 108 109
LALSUITE_ENABLE_FAST_GSL

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

# check for glib
PKG_CHECK_MODULES([GLIB],[glib-2.0],[true],[false])
110
LALSUITE_ADD_FLAGS([C],[${GLIB_CFLAGS}],[${GLIB_LIBS}])
111 112 113
AC_CHECK_LIB([glib-2.0],[g_sequence_new],,[AC_MSG_ERROR([could not find the glib library])])
AC_CHECK_HEADERS([glib.h],,[AC_MSG_ERROR([could not find the glib.h header])])

114 115 116 117 118
# check for metaio
PKG_CHECK_MODULES([METAIO],[libmetaio],[true],[false])
LALSUITE_ADD_FLAGS([C],[${METAIO_CFLAGS}],[${METAIO_LIBS}])
AC_CHECK_LIB([metaio],[MetaioOpen],,[AC_MSG_ERROR([could not find the metaio library])])

119
# check for lal libraries and headers
120
LALSUITE_CHECK_LIB([LAL],[6.12.0],[LALVersion],[lal/LALStdio.h])
Karl Wette's avatar
Karl Wette committed
121
LALSUITE_CHECK_LIB([LALSupport],[6.12.0],[XLALCacheImport],[lal/LALCache.h])
122
LALSUITE_CHECK_LIB([LALMetaIO],[1.2.0],[XLALCreateMetaTableDir],[lal/LIGOLwXMLRead.h])
123
LALSUITE_CHECK_LIB([LALSimulation],[1.1.0],[XLALSimDetectorStrainREAL8TimeSeries],[lal/LALSimulation.h])
124
LALSUITE_CHECK_LIB([LALBurst],[1.2.0],[XLALEPSearch],[lal/EPSearch.h])
125 126

# configure SWIG wrapping modules
Karl Wette's avatar
Karl Wette committed
127
LALSUITE_USE_SWIG
128 129 130 131

# add gcc specific flags
LALSUITE_ADD_GCC_FLAGS

132 133 134
# link any executables against LALDetChar library
AC_SUBST([LDADD], ["\$(top_builddir)/src/liblaldetchar.la"])

135 136 137 138
# add extra preprocessor flags
AM_CPPFLAGS="-DPKG_DATA_DIR='\"\$(pkgdatadir)/\"' ${AM_CPPFLAGS}"
AM_CPPFLAGS="-I\$(top_builddir)/include ${AM_CPPFLAGS}"

139 140 141
# force headers to be installed in ${includedir}/lal, ignoring library name
AC_SUBST([pkgincludedir], ["\${includedir}/lal"])

142 143 144 145 146
# force all python modules into the exec dir to prevent mixed C and
# pure-python library code from being split across lib and lib64 on
# RedHat-derived systems.
AC_SUBST([pkgpythondir], ["\${pkgpyexecdir}"])

147
# output
148
AC_OUTPUT
149
AC_MSG_NOTICE([
150 151
==================================================
LALDetChar has now been successfully configured:
152

153
* Python support is $PYTHON_ENABLE_VAL
Karl Wette's avatar
Karl Wette committed
154 155 156
* SWIG binding generation is $SWIG_GENERATE_ENABLE_VAL
* SWIG bindings for Octave are $SWIG_BUILD_OCTAVE_ENABLE_VAL
* SWIG bindings for Python are $SWIG_BUILD_PYTHON_ENABLE_VAL
157

158
and will be installed under the directory:
159

160
${prefix}
161

162 163 164
Now run 'make' to build LALDetChar,
and run 'make install' to install LALDetChar.
==================================================
165
])