configure.ac 4.22 KB
Newer Older
Adam Mercer's avatar
Adam Mercer committed
1
AC_PREREQ([2.63])
2
AC_INIT([LALSuite],[6.23.1],[lal-discuss@ligo.org])
3
AC_CONFIG_SRCDIR([configure.ac])
4 5
AC_CONFIG_AUX_DIR([gnuscripts])
AC_CONFIG_MACRO_DIR([gnuscripts])
6 7 8
AC_PREFIX_DEFAULT(["`pwd`/_inst"])
AC_CONFIG_FILES([Makefile])
AM_INIT_AUTOMAKE([1.11 foreign subdir-objects color-tests parallel-tests])
9

10
LALSUITE_DISTCHECK_CONFIGURE_FLAGS
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

# provide LAL library enable/disable options
LALSUITE_ENABLE_ALL_LAL
doxygen=true
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

28 29 30 31 32 33
# directories of top-level build and source
lalsuite_abs_top_builddir="`pwd`"
#lalsuite_top_builddir='$(top_builddir)/..'
lalsuite_top_srcdir='$(top_srcdir)/..'

# configure a lalsuite package
34
AC_DEFUN([lalsuite_config_subdir],[
35 36
  m4_pushdef([lowercase],m4_translit([[$1]], [A-Z], [a-z]))
  m4_pushdef([uppercase],m4_translit([[$1]], [a-z], [A-Z]))
37

38
  # if $1 is enabled
39 40
  AS_IF([test "x${lowercase}" = xtrue],[

41 42 43 44 45 46 47 48
    # export precious environment variables
    uppercase[]_LIBS="${lalsuite_abs_top_builddir}/lowercase/src/lib[]lowercase.la"
    uppercase[]_CFLAGS="-I${lalsuite_abs_top_builddir}/lowercase/include"
    uppercase[]_DATA_PATH="${lalsuite_top_srcdir}/lowercase/test"
    uppercase[]_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lowercase/octave"
    uppercase[]_PYTHON_PATH="${lalsuite_abs_top_builddir}/lowercase/python"
    export uppercase[]_LIBS uppercase[]_CFLAGS
    export uppercase[]_DATA_PATH uppercase[]_OCTAVE_PATH uppercase[]_PYTHON_PATH
49

50 51
    # configure $1
    AC_CONFIG_SUBDIRS(lowercase)
52

53
    # set enable string
54 55
    uppercase[]_ENABLE_VAL=ENABLED
  ],[
56
    # set disable string
57 58 59 60 61 62
    uppercase[]_ENABLE_VAL=DISABLED
  ])

  m4_popdef([lowercase])
  m4_popdef([uppercase])
])
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82

# doxygen, lal, and lalsupport are always configured
AC_CONFIG_SUBDIRS(doxygen)
AC_CONFIG_SUBDIRS(lal)
LAL_LIBS="${lalsuite_abs_top_builddir}/lal/lib/lal/liblal.la"
LAL_CFLAGS="-I${lalsuite_abs_top_builddir}/lal/include"
LAL_DATA_PATH="${lalsuite_top_srcdir}/lal/test"
LAL_OCTAVE_PATH="${lalsuite_abs_top_builddir}/lal/octave"
LAL_PYTHON_PATH="${lalsuite_abs_top_builddir}/lal/python"
LALSUPPORT_LIBS="${lalsuite_abs_top_builddir}/lal/lib/lalsupport/src/liblalsupport.la"
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}"
LALSUITE_BUILD="true"
export LALSUITE_BUILD
export LAL_LIBS LAL_CFLAGS LAL_DATA_PATH LAL_OCTAVE_PATH LAL_PYTHON_PATH
export LALSUPPORT_LIBS LALSUPPORT_CFLAGS LALSUPPORT_DATA_PATH LALSUPPORT_OCTAVE_PATH LALSUPPORT_PYTHON_PATH

# configure optional packages
83 84 85 86 87 88 89 90 91 92
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])
93 94 95 96 97 98 99 100

# optionally configure lalapps
AS_IF([test "x$lalapps" = xtrue],[
  AC_CONFIG_SUBDIRS(lalapps)
  LALAPPS_ENABLE_VAL=ENABLED
],[
  LALAPPS_ENABLE_VAL=DISABLED
])
101

102
AC_SUBST([ac_configure_args])
103
AC_OUTPUT
104
AC_MSG_NOTICE([
105 106
==================================================
LALSuite has now been successfully configured:
107

108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
* 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

and will be installed under the directory:

${prefix}

124 125
Now run 'make' to build LALSuite,
and run 'make install' to install LALSuite.
126
==================================================
127
])