ossp-pkg/fsl/fsl.ac
dnl ##
dnl ## OSSP fsl - Faking/Flexible Syslog Library
dnl ## Copyright (c) 2002-2005 Ralf S. Engelschall <rse@engelschall.com>
dnl ## Copyright (c) 2002-2005 The OSSP Project <http://www.ossp.org/>
dnl ## Copyright (c) 2002-2005 Cable & Wireless <http://www.cw.com/>
dnl ##
dnl ## This file is part of OSSP fsl, a syslog(3) API faking library which
dnl ## can be found at http://www.ossp.org/pkg/lib/fsl/.
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 ## fsl.ac: OSSP fsl Autoconf checks
dnl ##
dnl # Check for anything OSSP fsl wants to know
dnl # configure.in:
dnl # FSL_CHECK_ALL
AC_DEFUN(FSL_CHECK_ALL,[
dnl # header checking
AC_CHECK_HEADERS(syslog.h)
dnl # platform specific hacks
AC_MSG_CHECKING(for platform)
PLATFORM=`sh ./config.guess`
if test ".$PLATFORM" != .; then
PLATFORM=`sh ./config.sub $PLATFORM`
fi
AC_MSG_RESULT([$PLATFORM])
case $PLATFORM in
*-*-solaris2.[[6-9]]* | *-*-solaris2.1[[0-9]] )
AC_DEFINE(HAVE_VSYSLOG_USVALIST, 1, [vsyslog(3) uses __va_list])
;;
*-*-osf* )
CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
;;
esac
dnl # built-time configuration parameter --with-fsl-cfgdir
AC_MSG_CHECKING(for configuration directory)
AC_ARG_WITH(fsl-cfgdir,dnl
[ --with-fsl-cfgdir=PATH set configuration directory (default="PREFIX/etc/fsl")],
[ fsl_cfgdir=$withval ],
[ fsl_cfgdir="${prefix}/etc/fsl" ]
)dnl
AC_DEFINE_UNQUOTED(FSL_CFGDIR, "$fsl_cfgdir", [Define for OSSP fsl configuration directory])
FSL_CFGDIR="$fsl_cfgdir"
AC_SUBST(FSL_CFGDIR)
AC_MSG_RESULT([$fsl_cfgdir])
dnl # built-time configuration parameter --with-fsl-prefix
AC_MSG_CHECKING(for configuration file prefix)
AC_ARG_WITH(fsl-prefix,dnl
[ --with-fsl-prefix=PATH set configuration file prefix (default="fsl.")],
[ fsl_prefix=$withval ],
[ fsl_prefix="fsl." ]
)dnl
AC_DEFINE_UNQUOTED(FSL_PREFIX, "$fsl_prefix", [Define for OSSP fsl configuration file prefix])
FSL_PREFIX="$fsl_prefix"
AC_SUBST(FSL_PREFIX)
AC_MSG_RESULT([$fsl_prefix])
])
dnl # built-time configuration parameter --with-fsl-debuglogcode
AC_MSG_CHECKING(for debug log code)
AC_ARG_WITH(fsl-debuglogcode,dnl
[ --with-fsl-debuglogcode=BOOL set debug log code (default=0) 0=omit; 1=include],
[ AC_DEFINE(FSL_DEBUGLOGCODE, 1, [Define for OSSP fsl debug log code; 0=omit, 1=include]) ]
)dnl
FSL_DEBUGLOGCODE="$fsl_debuglogcode"
AC_SUBST(FSL_DEBUGLOGCODE)
AC_MSG_RESULT([$fsl_debuglogcode])
dnl # built-time configuration parameter --with-fsl-debuglogfile
AC_MSG_CHECKING(for debug log file)
AC_ARG_WITH(fsl-debuglogfile,dnl
[ --with-fsl-debuglogfile=FILE set debug log file (default="PREFIX/var/fsl/debuglogfile")],
[ fsl_debuglogfile=$withval ],
[ fsl_debuglogfile="${prefix}/var/fsl/debuglogfile" ]
)dnl
AC_DEFINE_UNQUOTED(FSL_DEBUGLOGFILE, "$fsl_debuglogfile", [Define for OSSP fsl debug log file; name])
FSL_DEBUGLOGFILE="$fsl_debuglogfile"
AC_SUBST(FSL_DEBUGLOGFILE)
AC_MSG_RESULT([$fsl_debuglogfile])
dnl # built-time configuration parameter --with-fsl-debuglogmask
AC_MSG_CHECKING(for debug log mask)
AC_ARG_WITH(fsl-debuglogmask,dnl
[ --with-fsl-debuglogmask=FILE set debug log mask (default="PREFIX/var/fsl/debuglogmask")],
[ fsl_debuglogmask=$withval ],
[ fsl_debuglogmask="${prefix}/var/fsl/debuglogmask" ]
)dnl
AC_DEFINE_UNQUOTED(FSL_DEBUGLOGMASK, "$fsl_debuglogmask", [Define for OSSP fsl debug log mask; symlink])
FSL_DEBUGLOGMASK="$fsl_debuglogmask"
AC_SUBST(FSL_DEBUGLOGMASK)
AC_MSG_RESULT([$fsl_debuglogmask])
dnl # built-time configuration parameter --with-fsl-debuglogstop
AC_MSG_CHECKING(for debug log stop)
AC_ARG_WITH(fsl-debuglogstop,dnl
[ --with-fsl-debuglogstop=SIZE set debug log stop (default=16777216)],
[ fsl_debuglogstop=$withval ],
[ fsl_debuglogstop=16777216 ]
)dnl
AC_DEFINE_UNQUOTED(FSL_DEBUGLOGSTOP, $fsl_debuglogstop, [Define for OSSP fsl debug log stop; maxsize])
FSL_DEBUGLOGSTOP="$fsl_debuglogstop"
AC_SUBST(FSL_DEBUGLOGSTOP)
AC_MSG_RESULT([$fsl_debuglogstop])