configure.ac 5.46 KB
Newer Older
Adam Mercer's avatar
Adam Mercer committed
1
AC_PREREQ([2.63])
2
AC_INIT([LALSuite],[6.48.1],[lal-discuss@ligo.org])
3
AC_CONFIG_SRCDIR([configure.ac])
4 5
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
6
AC_PREFIX_DEFAULT(["`pwd`/_inst"])
7
AC_CONFIG_FILES([Makefile wheel/Makefile wheel/setup.py])
8 9 10 11 12 13
AM_INIT_AUTOMAKE([ \
  1.11 \
  foreign \
  subdir-objects \
  color-tests \
  parallel-tests \
Adam Mercer's avatar
Adam Mercer committed
14
  tar-ustar \
15 16
  dist-xz \
  no-dist-gzip \
17
])
18

19
LALSUITE_DISTCHECK_CONFIGURE_FLAGS
20

21 22 23
# use silent build rules
AM_SILENT_RULES([yes])

24 25 26 27
# check for programs
AC_PROG_AWK
AC_PROG_SED

28 29 30
LALSUITE_ENABLE_NIGHTLY
LALSUITE_CHECK_PYTHON([2.6])

31 32 33 34 35 36 37 38 39 40 41 42 43 44 45
# provide LAL library enable/disable options
LALSUITE_ENABLE_ALL_LAL
lal=true
LALSUITE_ENABLE_LALFRAME
LALSUITE_ENABLE_LALMETAIO
LALSUITE_ENABLE_LALXML
LALSUITE_ENABLE_LALSIMULATION
LALSUITE_ENABLE_LALBURST
LALSUITE_ENABLE_LALDETCHAR
LALSUITE_ENABLE_LALINSPIRAL
LALSUITE_ENABLE_LALSTOCHASTIC
LALSUITE_ENABLE_LALPULSAR
LALSUITE_ENABLE_LALINFERENCE
LALSUITE_ENABLE_LALAPPS

46 47 48 49
# configure Doxygen top-level page
LALSUITE_ENABLE_DOXYGEN
LALSUITE_ENABLE_MODULE([DOXYGEN])
AS_IF([test "x${doxygen}" = xtrue],[
50
  AC_CONFIG_FILES([index.html:gnuscripts/lalsuite_index.html.in])
51 52 53 54 55 56 57 58
  AC_SUBST([DOXYGEN_PACKAGE_LINKS],[])
  AM_SUBST_NOTMAKE([DOXYGEN_PACKAGE_LINKS])
  AC_SUBST([DOXYGEN_LAST_PACKAGE],[])
  AM_SUBST_NOTMAKE([DOXYGEN_LAST_PACKAGE])
])
AC_DEFUN([lalsuite_config_doxygen],[
  m4_pushdef([lowercase],m4_translit([[$1]], [A-Z], [a-z]))
  AS_IF([test "x${doxygen}" = xtrue],[
59 60
    DOXYGEN_PACKAGE_LINKS="${DOXYGEN_PACKAGE_LINKS}"' <a target="docframe" href="lowercase/doxygen/out/index.html">$1</a>'
    DOXYGEN_LAST_PACKAGE="lowercase/doxygen/out/index.html"
61 62 63 64
  ])
  m4_popdef([lowercase])
])

65 66
# directories of top-level build and source
lalsuite_abs_top_builddir="`pwd`"
67
lalsuite_abs_top_srcdir='$(abs_top_srcdir)/..'
68 69

# configure a lalsuite package
70
AC_DEFUN([lalsuite_config_subdir],[
71 72
  m4_pushdef([lowercase],m4_translit([[$1]], [A-Z], [a-z]))
  m4_pushdef([uppercase],m4_translit([[$1]], [a-z], [A-Z]))
73

74
  # if $1 is enabled
75 76
  AS_IF([test "x${lowercase}" = xtrue],[

77 78 79
    # export precious environment variables
    uppercase[]_LIBS="${lalsuite_abs_top_builddir}/lowercase/src/lib[]lowercase.la"
    uppercase[]_CFLAGS="-I${lalsuite_abs_top_builddir}/lowercase/include"
80
    uppercase[]_DATA_PATH="${lalsuite_abs_top_srcdir}/lowercase/src:${lalsuite_abs_top_srcdir}/lowercase/test"
81 82
    uppercase[]_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lowercase/octave"
    uppercase[]_PYTHON_PATH="${lalsuite_abs_top_builddir}/lowercase/python"
83 84
    uppercase[]_HTMLDIR="${htmldir}/../lowercase"
    export uppercase[]_LIBS uppercase[]_CFLAGS uppercase[]_HTMLDIR
85
    export uppercase[]_DATA_PATH uppercase[]_OCTAVE_PATH uppercase[]_PYTHON_PATH
86

87 88 89
    # configure Doxygen top-level page
    lalsuite_config_doxygen([$1])

90 91
    # configure $1
    AC_CONFIG_SUBDIRS(lowercase)
92

93
    # set enable string
94 95
    uppercase[]_ENABLE_VAL=ENABLED
  ],[
96
    # set disable string
97 98 99 100 101 102
    uppercase[]_ENABLE_VAL=DISABLED
  ])

  m4_popdef([lowercase])
  m4_popdef([uppercase])
])
103

104
# lal and lalsupport are always configured
105
lalsuite_config_doxygen([LAL])
106
AC_CONFIG_SUBDIRS(lal)
107
LAL_LIBS="${lalsuite_abs_top_builddir}/lal/src/liblal.la"
108
LAL_CFLAGS="-I${lalsuite_abs_top_builddir}/lal/include"
109
LAL_DATA_PATH="${lalsuite_abs_top_srcdir}/lal/test"
110 111
LAL_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lal/octave"
LAL_PYTHON_PATH="${lalsuite_abs_top_builddir}/lal/python"
112
LAL_HTMLDIR="${htmldir}/../lal"
113
LALSUPPORT_LIBS="${lalsuite_abs_top_builddir}/lal/src/support/liblalsupport.la"
114 115 116 117
LALSUPPORT_CFLAGS="-I${lalsuite_abs_top_builddir}/lal/include"
LALSUPPORT_DATA_PATH="${LAL_DATA_PATH}"
LALSUPPORT_OCTAVE_PATH="${LAL_OCTAVE_PATH}"
LALSUPPORT_PYTHON_PATH="${LAL_PYTHON_PATH}"
118
LALSUPPORT_HTMLDIR="${htmldir}/../lal"
119 120
LALSUITE_BUILD="true"
export LALSUITE_BUILD
121 122
export LAL_LIBS LAL_CFLAGS LAL_DATA_PATH LAL_OCTAVE_PATH LAL_PYTHON_PATH LAL_HTMLDIR
export LALSUPPORT_LIBS LALSUPPORT_CFLAGS LALSUPPORT_DATA_PATH LALSUPPORT_OCTAVE_PATH LALSUPPORT_PYTHON_PATH LALSUPPORT_HTMLDIR
123 124

# configure optional packages
125 126 127 128 129 130 131 132 133 134
lalsuite_config_subdir([LALFrame])
lalsuite_config_subdir([LALMetaIO])
lalsuite_config_subdir([LALXML])
lalsuite_config_subdir([LALSimulation])
lalsuite_config_subdir([LALBurst])
lalsuite_config_subdir([LALDetChar])
lalsuite_config_subdir([LALInspiral])
lalsuite_config_subdir([LALStochastic])
lalsuite_config_subdir([LALPulsar])
lalsuite_config_subdir([LALInference])
135 136 137

# optionally configure lalapps
AS_IF([test "x$lalapps" = xtrue],[
138
  lalsuite_config_doxygen([LALApps])
139 140 141 142 143
  AC_CONFIG_SUBDIRS(lalapps)
  LALAPPS_ENABLE_VAL=ENABLED
],[
  LALAPPS_ENABLE_VAL=DISABLED
])
144

145
AC_SUBST([ac_configure_args])
146
AC_OUTPUT
147
AC_MSG_NOTICE([
148 149
==================================================
LALSuite has now been successfully configured:
150

151 152 153 154 155 156 157 158 159 160 161
* LALFrame library support is $LALFRAME_ENABLE_VAL
* LALMetaIO library support is $LALMETAIO_ENABLE_VAL
* LALXML library support is $LALXML_ENABLE_VAL
* LALSimulation library support is $LALSIMULATION_ENABLE_VAL
* LALBurst library support is $LALBURST_ENABLE_VAL
* LALDetChar library support is $LALDETCHAR_ENABLE_VAL
* LALInspiral library support is $LALINSPIRAL_ENABLE_VAL
* LALStochastic library support is $LALSTOCHASTIC_ENABLE_VAL
* LALPulsar library support is $LALPULSAR_ENABLE_VAL
* LALInference library support is $LALINFERENCE_ENABLE_VAL
* LALApps library support is $LALAPPS_ENABLE_VAL
162
* Doxygen documentation is $DOXYGEN_ENABLE_VAL
163 164 165 166 167

and will be installed under the directory:

${prefix}

168 169
Now run 'make' to build LALSuite,
and run 'make install' to install LALSuite.
170
==================================================
171
])