OSSP CVS Repository

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

ossp-pkg/lmtp2nntp/configure.ac 1.17
dnl ##
dnl ##  Copyright (c) 2001 The OSSP Project <http://www.ossp.org/>
dnl ##  Copyright (c) 2001 Cable & Wireless Deutschland <http://www.cw.com/de/>
dnl ##
dnl ##  This file is part of OSSP lmtp2nntp, an LMTP speaking local
dnl ##  mailer which forwards mails as Usenet news articles via NNTP.
dnl ##  It can be found at http://www.ossp.org/pkg/lmtp2nntp/.
dnl ##
dnl ##  This program is free software; you can redistribute it and/or
dnl ##  modify it under the terms of the GNU General Public  License
dnl ##  as published by the Free Software Foundation; either version
dnl ##  2.0 of the License, or (at your option) any later version.
dnl ##
dnl ##  This program is distributed in the hope that it will be useful,
dnl ##  but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl ##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl ##  General Public License for more details.
dnl ##
dnl ##  You should have received a copy of the GNU General Public License
dnl ##  along with this file; if not, write to the Free Software
dnl ##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
dnl ##  USA, or contact the OSSP project <ossp@ossp.org>.
dnl ##
dnl ##  configure.ac: GNU Autoconf script input (M4 syntax)
dnl ##

dnl #   standard preamble
AC_PREREQ(2.52)
AC_REVISION(1.0)
AC_INIT(lmtp2nntp_main.c)

dnl #   announce our version
AC_DIVERT_PUSH(NOTICE)
V=`./shtool version -lc -dlong version.c`
./shtool echo -e "Configuring %BOSSP lmtp2nntp%b, Version %B${V}%b"
echo "Copyright (c) 2001 The OSSP Project <http://www.ossp.org/>"
echo "Copyright (c) 2001 Cable & Wireless Deutschland <http://www.cw.com/de/>"
AC_DIVERT_POP()

dnl #   perform feature tests
AC_SET_MAKE
AC_PROG_CC
AC_PROG_CPP
AC_CHECK_DEBUGGING
AC_CHECK_LIB(socket, getprotobyname)
AC_CHECK_LIB(nsl, gethostbyname)
AC_CHECK_FUNCS(inet_pton inet_aton)
AC_CHECK_FUNCS(setsid)
AC_CHECK_HEADERS(sys/termios.h)

dnl #   check for Str library
AC_CHECK_EXTLIB([OSSP Str], 
                str, str_parse, str.h, 
                [SUBDIR_STR=""], 
                [SUBDIR_STR="lib_str"
                 CPPFLAGS="$CPPFLAGS -Ilib_str"
                 CFLAGS="$CFLAGS -Ilib_str"
                 LDFLAGS="$LDFLAGS -Llib_str/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lstr"])
AC_SUBST(SUBDIR_STR)

dnl #   check for L2 library
AC_CHECK_EXTLIB([OSSP L2], 
                l2, l2_stream_log, l2.h, 
                [SUBDIR_L2=""], 
                [SUBDIR_L2="lib_l2"
                 CPPFLAGS="$CPPFLAGS -Ilib_l2"
                 CFLAGS="$CFLAGS -Ilib_l2"
                 LDFLAGS="$LDFLAGS -Llib_l2/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -ll2"])
AC_SUBST(SUBDIR_L2)

dnl #   check for SA library
AC_CHECK_EXTLIB([OSSP SA], 
                sa, sa_create, sa.h, 
                [SUBDIR_SA=""], 
                [SUBDIR_SA="lib_sa"
                 CPPFLAGS="$CPPFLAGS -Ilib_sa"
                 CFLAGS="$CFLAGS -Ilib_sa"
                 LDFLAGS="$LDFLAGS -Llib_sa/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lsa"])
AC_SUBST(SUBDIR_SA)

dnl #   check for VAR library
AC_CHECK_EXTLIB([OSSP Var], 
                var, var_expand, var.h, 
                [SUBDIR_VAR=""], 
                [SUBDIR_VAR="lib_var"
                 CPPFLAGS="$CPPFLAGS -Ilib_var"
                 CFLAGS="$CFLAGS -Ilib_var"
                 LDFLAGS="$LDFLAGS -Llib_var/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lvar"])
AC_SUBST(SUBDIR_VAR)

dnl #   check for external Dmalloc library
AC_CHECK_EXTLIB([Dmalloc], dmalloc, dmalloc_debug, dmalloc.h, AC_DEFINE(DMALLOC))

dnl #   post-processing for LIBS_EXTRA
LIBS="$LIBS $LIBS_EXTRA"

enable_shared=no
export enable_shared
enable_headline=no
export enable_headline
AC_CONFIG_SUBDIRS([$SUBDIR_STR $SUBDIR_L2 $SUBDIR_SA $SUBDIR_VAR])

dnl #   standard output generation
AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES(Makefile:Makefile.in)
AC_OUTPUT


CVSTrac 2.0.1