ossp-pkg/cfg/cfg.ac
dnl ##
dnl ## OSSP cfg - Configuration Parsing
dnl ## Copyright (c) 2002-2006 Ralf S. Engelschall <rse@engelschall.com>
dnl ## Copyright (c) 2002-2006 The OSSP Project <http://www.ossp.org/>
dnl ##
dnl ## This file is part of OSSP cfg, a configuration parsing library which
dnl ## can be found at http://www.ossp.org/pkg/lib/cfg/.
dnl ##
dnl ## Permission to use, copy, modify, and distribute this software for
dnl ## any purpose with or without fee is hereby granted, provided that
dnl ## the above copyright notice and this permission notice appear in all
dnl ## copies.
dnl ##
dnl ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
dnl ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
dnl ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
dnl ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
dnl ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
dnl ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
dnl ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
dnl ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
dnl ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
dnl ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
dnl ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
dnl ## SUCH DAMAGE.
dnl ##
dnl ## cfg.ac: OSSP cfg Autoconf checks
dnl ##
dnl # Check for anything OSSP cfg wants to know
dnl # configure.in:
dnl # CFG_CHECK_ALL
AC_DEFUN(CFG_CHECK_ALL,[
dnl # configure option --with-perl
AC_ARG_WITH([perl],
AS_HELP_STRING([--with-perl], [build Perl bindings to C API]),
[ac_cv_with_perl=$withval], [ac_cv_with_perl=no])
AC_CACHE_CHECK([whether to build Perl bindings to C API], [ac_cv_with_perl], [ac_cv_with_perl=no])
if test ".$ac_cv_with_perl" = ".yes"; then
AC_DEFINE(WITH_PERL, 1, [whether to build Perl bindings to C API])
WITH_PERL='yes'
PERL_NAME='$(PERL_NAME)'
else
WITH_PERL='no'
PERL_NAME=''
fi
AC_SUBST(WITH_PERL)
AC_SUBST(PERL_NAME)
AC_PATH_PROG(PERL, perl, NA)
if test ".$ac_cv_with_perl" = ".yes" -a ".$PERL" = ".NA"; then
AC_ERROR([required Perl interpreter not found in \$PATH])
fi
dnl # additional checks
AC_CHECK_FUNCS(isnan isinf)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_VA_COPY
])