Commit bf6a2f78 authored by ram's avatar ram

use AC_CONFIG_AUX_DIR([]) for generating aclocal.m4

Original: 674120f4c672f566d8619b0a0088f5e3be2778cf
parent 8980a87a
......@@ -80,7 +80,7 @@ printf "00boot:\t%-16s %s\n" "autoconf-$autoconf_version:" "`which $AUTOCONF`"
## Generate the Makefile.in's and the configure script
echo "00boot: running aclocal"
$ACLOCAL || fail "aclocal"
$ACLOCAL -I misc || fail "aclocal"
echo "00boot: running autoheader"
$AUTOHEADER || fail "autoheader"
echo "00boot: running automake"
......
dnl Process this file with autoconf to produce a configure script.
dnl $Id$
AC_INIT(src/config.h.in)
AC_CONFIG_AUX_DIR([misc])
AM_INIT_AUTOMAKE(lalapps, 5.2)
AM_CONFIG_HEADER(src/config.h)
AH_TOP([/*
......
dnl lalapps.m4
dnl $Id$
AC_DEFUN([LALAPPS_WITH_EXTRA_CPPFLAGS],
[AC_ARG_WITH(
extra_cppflags,
[ --with-extra-cppflags=CPPFLAGS additional C preprocessor flags],
[ if test -n "${with_extra_cppflags}"
then
CPPFLAGS="$CPPFLAGS ${with_extra_cppflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_LAL_PREFIX],
[AC_ARG_WITH(
lal_prefix,
[ --with-lal-prefix=LAL_PREFIX location where to find LAL installation],
[ if test -n "${with_lal_prefix}"
then
LAL_PREFIX="${with_lal_prefix}"
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_CFLAGS],
[AC_ARG_WITH(
extra_cflags,
[ --with-extra-cflags=CFLAGS additional C compiler flags],
[ if test -n "${with_extra_cflags}"
then
CFLAGS="$CFLAGS ${with_extra_cflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_LDFLAGS],
[AC_ARG_WITH(
extra_ldflags,
[ --with-extra-ldflags=LDFLAGS additional linker flags],
[ if test -n "${with_extra_ldflags}"
then
LDFLAGS="$LDFLAGS ${with_extra_ldflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_LIBS],
[AC_ARG_WITH(
extra_libs,
[ --with-extra-libs=LIBS additional -l and -L linker flags],
[ if test -n "${with_extra_libs}"
then
LIBS="$LIBS ${with_extra_libs}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_GCC_FLAGS],
[AC_ARG_WITH(
[gcc_flags],
[ --with-gcc-flags turn on strict gcc warning flags],
[ if test -n "${with_gcc_flags}"
then
lalapps_gcc_flags="-g3 -O4 -ansi -pedantic -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -fno-common -Wnested-externs -D__NO_STRING_INLINES"
else
lalapps_gcc_flags=""
fi
], [ lalapps_gcc_flags="" ] )
])
AC_DEFUN([LALAPPS_WITH_CC],
[AC_ARG_WITH(
cc,
[ --with-cc=CC use the CC C compiler],
[ if test -n "${with_cc}"
then
CC="${with_cc}";
fi
],)
])
AC_DEFUN([LALAPPS_ENABLE_CONDOR],
[AC_ARG_ENABLE(
condor,
[ --enable-condor compile for use with condor [default=no] ],
[ case "${enableval}" in
yes) condor=true;;
no) condor=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-condor) ;;
esac
], [ condor=false ] )
])
AC_DEFUN([LALAPPS_ENABLE_FRAME],
[AC_ARG_ENABLE(
frame,
[ --enable-frame compile code that requires Frame library [default=yes] ],
[ case "${enableval}" in
yes) frame=true;;
no) frame=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-frame) ;;
esac
], [ frame=true ] )
])
AC_DEFUN([LALAPPS_ENABLE_METAIO],
[AC_ARG_ENABLE(
[metaio],
[ --enable-metaio compile code that requires metaio/dataflow library
[default=yes] ],
[ case "${enableval}" in
yes) metaio=true;;
no) metaio=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-metaio) ;;
esac
], [ metaio=true ] )
])
AC_DEFUN([LALAPPS_DISABLE_FRAME],
[echo "**************************************************************"
echo "* *"
echo "* Frame support will be DISABLED: *"
echo "* LALApps is being configured with --disable-frame settings. *"
echo "* *"
echo "**************************************************************"
frame=false
])
AC_DEFUN([LALAPPS_CHECK_QTHREAD],
[AC_MSG_CHECKING([whether LAL has been compiled with Intel MKL and qthread])
AC_TRY_RUN([
#include <lal/LALConfig.h>
#ifdef LAL_QTHREAD
int main( void ) { return 0; }
#else
int main( void ) { return 1; }
#endif
],
AC_MSG_RESULT([yes])
[
if test x$condor != xtrue ; then
echo "**************************************************************"
echo "* *"
echo "* LAL has been compiled with --enable-intelfft=condor but *"
echo "* but --enable-condor has not been specified when compiling *"
echo "* LALapps. *"
echo "* *"
echo "* LALapps must be configured with --condor-compile when *"
echo "* building LALapps against a version of LAL compiled with *"
echo "* the fake qthread library. *"
echo "* *"
echo "* Reconfigure LALapps with --enable-condor or rebuild and *"
echo "* reinstall LAL with either --enable-intelfft=yes or *"
echo "* --disable-intelfft to continue. *"
echo "* *"
echo "* See the documentation in the LAL fft package information. *"
echo "* *"
echo "**************************************************************"
AC_MSG_ERROR(qthread requires condor_compile)
fi
]
,
AC_MSG_RESULT([no]),
AC_MSG_RESULT([unknown]) ) ] )
AC_DEFUN([LALAPPS_ENABLE_NIGHTLY],[AC_ARG_ENABLE(
[nightly],
[ --enable-nightly nightly build [default=no] ],
[ case "${enableval}" in
yes) NIGHTLY_VERSION=`date +"%Y%m%d"`
VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
no) NIGHTLY_VERSION="";;
*) NIGHTLY_VERSION="${enableval}"
VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
esac ],
[ NIGHTLY_VERSION="" ] )
AC_SUBST(NIGHTLY_VERSION)
])
dnl acinclude.m4
dnl $Id$
AC_DEFUN([LALAPPS_WITH_EXTRA_CPPFLAGS],
[AC_ARG_WITH(
extra_cppflags,
[ --with-extra-cppflags=CPPFLAGS additional C preprocessor flags],
[ if test -n "${with_extra_cppflags}"
then
CPPFLAGS="$CPPFLAGS ${with_extra_cppflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_LAL_PREFIX],
[AC_ARG_WITH(
lal_prefix,
[ --with-lal-prefix=LAL_PREFIX location where to find LAL installation],
[ if test -n "${with_lal_prefix}"
then
LAL_PREFIX="${with_lal_prefix}"
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_CFLAGS],
[AC_ARG_WITH(
extra_cflags,
[ --with-extra-cflags=CFLAGS additional C compiler flags],
[ if test -n "${with_extra_cflags}"
then
CFLAGS="$CFLAGS ${with_extra_cflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_LDFLAGS],
[AC_ARG_WITH(
extra_ldflags,
[ --with-extra-ldflags=LDFLAGS additional linker flags],
[ if test -n "${with_extra_ldflags}"
then
LDFLAGS="$LDFLAGS ${with_extra_ldflags}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_EXTRA_LIBS],
[AC_ARG_WITH(
extra_libs,
[ --with-extra-libs=LIBS additional -l and -L linker flags],
[ if test -n "${with_extra_libs}"
then
LIBS="$LIBS ${with_extra_libs}";
fi
],)
])
AC_DEFUN([LALAPPS_WITH_GCC_FLAGS],
[AC_ARG_WITH(
[gcc_flags],
[ --with-gcc-flags turn on strict gcc warning flags],
[ if test -n "${with_gcc_flags}"
then
lalapps_gcc_flags="-g3 -O4 -ansi -pedantic -Wall -W -Wmissing-prototypes -Wstrict-prototypes -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Waggregate-return -fno-common -Wnested-externs -D__NO_STRING_INLINES"
else
lalapps_gcc_flags=""
fi
], [ lalapps_gcc_flags="" ] )
])
AC_DEFUN([LALAPPS_WITH_CC],
[AC_ARG_WITH(
cc,
[ --with-cc=CC use the CC C compiler],
[ if test -n "${with_cc}"
then
CC="${with_cc}";
fi
],)
])
AC_DEFUN([LALAPPS_ENABLE_CONDOR],
[AC_ARG_ENABLE(
condor,
[ --enable-condor compile for use with condor [default=no] ],
[ case "${enableval}" in
yes) condor=true;;
no) condor=false;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-condor) ;;
esac
], [ condor=false ] )
])
AC_DEFUN([LALAPPS_ENABLE_FRAME],
[AC_ARG_ENABLE(
frame,
[ --enable-frame compile code that requires Frame library [default=yes] ],
[ case "${enableval}" in
yes) frame=true;;
no) frame=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-frame) ;;
esac
], [ frame=true ] )
])
AC_DEFUN([LALAPPS_ENABLE_METAIO],
[AC_ARG_ENABLE(
[metaio],
[ --enable-metaio compile code that requires metaio/dataflow library
[default=yes] ],
[ case "${enableval}" in
yes) metaio=true;;
no) metaio=false ;;
*) AC_MSG_ERROR(bad value ${enableval} for --enable-metaio) ;;
esac
], [ metaio=true ] )
])
AC_DEFUN([LALAPPS_DISABLE_FRAME],
[echo "**************************************************************"
echo "* *"
echo "* Frame support will be DISABLED: *"
echo "* LALApps is being configured with --disable-frame settings. *"
echo "* *"
echo "**************************************************************"
frame=false
])
AC_DEFUN([LALAPPS_CHECK_QTHREAD],
[AC_MSG_CHECKING([whether LAL has been compiled with Intel MKL and qthread])
AC_TRY_RUN([
#include <lal/LALConfig.h>
#ifdef LAL_QTHREAD
int main( void ) { return 0; }
#else
int main( void ) { return 1; }
#endif
],
AC_MSG_RESULT([yes])
[
if test x$condor != xtrue ; then
echo "**************************************************************"
echo "* *"
echo "* LAL has been compiled with --enable-intelfft=condor but *"
echo "* but --enable-condor has not been specified when compiling *"
echo "* LALapps. *"
echo "* *"
echo "* LALapps must be configured with --condor-compile when *"
echo "* building LALapps against a version of LAL compiled with *"
echo "* the fake qthread library. *"
echo "* *"
echo "* Reconfigure LALapps with --enable-condor or rebuild and *"
echo "* reinstall LAL with either --enable-intelfft=yes or *"
echo "* --disable-intelfft to continue. *"
echo "* *"
echo "* See the documentation in the LAL fft package information. *"
echo "* *"
echo "**************************************************************"
AC_MSG_ERROR(qthread requires condor_compile)
fi
]
,
AC_MSG_RESULT([no]),
AC_MSG_RESULT([unknown]) ) ] )
AC_DEFUN([LALAPPS_ENABLE_NIGHTLY],[AC_ARG_ENABLE(
[nightly],
[ --enable-nightly nightly build [default=no] ],
[ case "${enableval}" in
yes) NIGHTLY_VERSION=`date +"%Y%m%d"`
VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
no) NIGHTLY_VERSION="";;
*) NIGHTLY_VERSION="${enableval}"
VERSION="${VERSION}.${NIGHTLY_VERSION}" ;;
esac ],
[ NIGHTLY_VERSION="" ] )
AC_SUBST(NIGHTLY_VERSION)
])
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test "x$ac_cv_env_[]$1[]_set" = "xset"; then
pkg_cv_[]$1=$ac_cv_env_[]$1[]_value
elif test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists "$3" >/dev/null 2>&1; then
pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS],
[_PKG_CONFIG([$1][_CFLAGS], [cflags], [[$2]])])
AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS],
[_PKG_CONFIG([$1][_LIBS], [libs], [[$2]])])
if test $pkg_failed = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[[Package requirements ($2) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.]])],
[$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.]])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
## Copyright 1996, 1997, 1998, 1999, 2000, 2001
## Free Software Foundation, Inc.
......
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
_pkg_min_version=m4_ifval([$1], [$1], [0.9.0])
AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
PKG_CONFIG=""
fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test "x$ac_cv_env_[]$1[]_set" = "xset"; then
pkg_cv_[]$1=$ac_cv_env_[]$1[]_value
elif test -n "$PKG_CONFIG"; then
if $PKG_CONFIG --exists "$3" >/dev/null 2>&1; then
pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
else
pkg_failed=yes
fi
else
pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_CACHE_CHECK([for $1][_CFLAGS], [pkg_cv_][$1][_CFLAGS],
[_PKG_CONFIG([$1][_CFLAGS], [cflags], [[$2]])])
AC_CACHE_CHECK([for $1][_LIBS], [pkg_cv_][$1][_LIBS],
[_PKG_CONFIG([$1][_LIBS], [libs], [[$2]])])
if test $pkg_failed = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" 1>&AS_MESSAGE_LOG_FD
ifelse([$4], , [AC_MSG_ERROR(dnl
[[Package requirements ($2) were not met.
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.]])],
[$4])
elif test $pkg_failed = untried; then
ifelse([$4], , [AC_MSG_FAILURE(dnl
[[The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively you may set the $1_CFLAGS and $1_LIBS environment variables
to avoid the need to call pkg-config. See the pkg-config man page for
more details.
To get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.]])],
[$4])
else
$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
ifelse([$3], , :, [$3])
fi[]dnl
])# PKG_CHECK_MODULES
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment