OSSP CVS Repository

ossp - ossp-pkg/fsl/configure.ac
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/fsl/configure.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 ##  configure.ac: GNU Autoconf source script
dnl ##

AC_PREREQ(2.54)
AC_INIT

dnl #   announce our version
V=`./shtool version -lc -dlong fsl_version.c`
./shtool echo -e "Configuring %BOSSP fsl%b (Faking/Flexible Syslog Library), Version %B${V}%b"
echo "Copyright (c) 2002-2005 Ralf S. Engelschall <rse@engelschall.com>"
echo "Copyright (c) 2002-2005 The OSSP Project <http://www.ossp.org/>"
echo "Copyright (c) 2002-2005 Cable & Wireless <http://www.cw.com/>"

AC_PROG_MAKE_SET
AC_PROG_CC
AC_CHECK_DEBUGGING

sinclude(libtool.m4)
AC_PROG_LIBTOOL

sinclude(fsl.ac)
FSL_CHECK_ALL

dnl #   FIXME FIXME FIXME FIXME FIXME FIXME FIXME
dnl #   perform important checks from OSSP l2 because we have
dnl #   no possibility to merge their determined knowledge
dnl #   into our brain.
AC_CHECK_LIB(nsl, gethostname)
if test ".`echo $LIBS | grep nsl`" = . ;then
    AC_CHECK_LIB(nsl, gethostbyname)
fi
AC_CHECK_LIB(socket, accept)

dnl #   pre-processing for subdirs
LIB_DEPS=""

dnl #   check for OSSP l2 library
AC_CHECK_EXTLIB([OSSP l2],
                l2, l2_channel_log, l2.h,
                [SUBDIR_L2=""],
                [SUBDIR_L2="lib_l2"
                 CPPFLAGS="$CPPFLAGS -Ilib_l2"
                 CFLAGS="$CFLAGS -Ilib_l2"
                 LIB_DEPS="$LIB_DEPS lib_l2/*.lo"])
AC_SUBST(SUBDIR_L2)

dnl #   check for OSSP cfg library
AC_CHECK_EXTLIB([OSSP cfg],
                cfg, cfg_syn_import, cfg.h,
                [SUBDIR_CFG=""],
                [SUBDIR_CFG="lib_cfg"
                 CPPFLAGS="$CPPFLAGS -Ilib_cfg"
                 CFLAGS="$CFLAGS -Ilib_cfg"
                 LIB_DEPS="$LIB_DEPS lib_cfg/*.lo"])
AC_SUBST(SUBDIR_CFG)

dnl #   check for OSSP pcre library
AC_CHECK_EXTLIB([OSSP pcre],
                pcre, pcre_compile, pcre.h,
                [SUBDIR_PCRE=""],
                [SUBDIR_PCRE="lib_pcre"
                 CPPFLAGS="$CPPFLAGS -Ilib_pcre -DPCRE_PREFIX=fsl_";
                 CFLAGS="$CFLAGS -Ilib_pcre"
                 LIB_DEPS="$LIB_DEPS lib_pcre/*.lo"])
AC_SUBST(SUBDIR_PCRE)

dnl #   post-processing for subdirs
AC_SUBST(LIB_DEPS)
if test ".$SUBDIR_L2"   != .; then AC_CONFIG_SUBDIRS(lib_l2)   fi
if test ".$SUBDIR_CFG"  != .; then AC_CONFIG_SUBDIRS(lib_cfg)  fi
if test ".$SUBDIR_PCRE" != .; then AC_CONFIG_SUBDIRS(lib_pcre) fi
dnl #   export is a hack to pass CPPFLAGS down to subdirs (introduced for PCRE_PREFIX)
export CPPFLAGS

dnl #   output generation
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([Makefile fsl-config])
AC_CONFIG_COMMANDS([adjustment], [chmod a+x fsl-config])
AC_OUTPUT


CVSTrac 2.0.1