dnl ## dnl ## L2 - OSSP Logging Library dnl ## Copyright (c) 2001-2002 The OSSP Project (http://www.ossp.org/) dnl ## Copyright (c) 2001-2002 Cable & Wireless Deutschland (http://www.cw.com/de/) dnl ## dnl ## This file is part of OSSP L2, a flexible logging library which dnl ## can be found at http://www.ossp.org/pkg/l2/. 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.in: Autoconf specification dnl ## AC_PREREQ(2.53) AC_INIT AC_HEADLINE(dnl OSSP l2, Logging Library, dnl L2_VERSION, l2_version.c, dnl [Copyright (c) 2001-2002 The OSSP Project (http://www.ossp.org/) Copyright (c) 2001-2002 Cable & Wireless Deutschland (http://www.cw.com/de/)]) AC_PREFIX_DEFAULT(/usr/local) AC_PLATFORM(PLATFORM) AC_PROG_MAKE_SET AC_PROG_CC AC_PROG_CPP AC_CHECK_DEBUGGING AC_CHECK_MAINTAINER AC_CONFIGURE_LIBTOOL dnl # check for developer tools: dnl # GNU Bison and GNU Flex if test ".$enable_maintainer" = .yes; then dnl # check for GNU Bison >= 1.30 bison_version="" for prog in bison bison-beta bison-alpha bison-snap; do AC_PATH_PROG(BISON, $prog, NA) if test ".$BISON" != .NA; then bison_version=`($BISON --version | head -1 | sed -e 's;^[[^0-9]]*\([[0-9]][[0-9.]]*\).*;\1;') 2>/dev/null` case "$bison_version" in 1.3[[0-9]] | 1.[[4-9]] ) break ;; * ) BISON="NA"; unset ac_cv_path_BISON ;; esac else unset ac_cv_path_BISON fi done if test ".$BISON" = .NA; then if test ".$bison_version" != .; then AC_ERROR([found GNU Bison version $bison_version; require version >= 1.30]) else AC_ERROR([require GNU Bison version >= 1.30]) fi fi dnl # check for GNU Flex >= 2.5.6 flex_version="" for prog in flex flex-beta flex-alpha flex-snap; do AC_PATH_PROG(FLEX, $prog, NA) if test ".$FLEX" != .NA; then flex_version=`($FLEX --version | head -1 | sed -e 's;^[[^0-9]]*\([[0-9]][[0-9.]]*\).*;\1;') 2>/dev/null` case "$flex_version" in 2.5.[[6-9]] | 2.5.1[[0-9]] | 2.[[6-9]].* ) break ;; * ) FLEX="NA"; unset ac_cv_path_FLEX ;; esac else unset ac_cv_path_FLEX fi done if test ".$FLEX" = .NA; then if test ".$flex_version" != .; then AC_ERROR([found GNU Flex version $flex_version; require version >= 2.5.6]) else AC_ERROR([require GNU Flex version >= 2.5.6]) fi fi else dnl # disable the use of the tools, but still allow manual override test ".$BISON" = . && BISON=true AC_PATH_PROG(BISON, bison, true) test ".$FLEX" = . && FLEX=true AC_PATH_PROG(FLEX, flex, true) fi AC_CHECK_LIB(nsl, gethostname) if test ".`echo $LIBS | grep nsl`" = . ;then AC_CHECK_LIB(nsl, gethostbyname) fi AC_CHECK_LIB(socket, accept) AC_CHECK_HEADERS(sys/time.h) AC_CHECK_FUNCS(inet_aton inet_pton inet_ntoa inet_ntop snprintf vsnprintf setitimer) case $PLATFORM in *-*-solaris2.[[6-8]]* ) AC_DEFINE(HAVE_VSYSLOG_USVALIST, 1, [Define to 1 if vsyslog has underscored va_list]) ;; esac sinclude(l2_ut_sa.ac) SA_CHECK_ALL AC_CHECK_EXTLIB([Dmalloc], dmalloc, dmalloc_debug, dmalloc.h, [AC_DEFINE(WITH_DMALLOC, 1, [Define to 1 if building with Dmalloc])]) AC_CONFIG_HEADERS(l2_config.h) AC_CONFIG_FILES([Makefile l2.h l2-config]) AC_CONFIG_COMMANDS([adjustment], [chmod a+x l2-config]) AC_OUTPUT