OSSP CVS Repository

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

ossp-pkg/lmtp2nntp/configure.ac 1.32
dnl ##
dnl ##  OSSP lmtp2nntp - Mail to News Gateway
dnl ##  Copyright (c) 2002-2003 Ralf S. Engelschall <rse@engelschall.com>
dnl ##  Copyright (c) 2002-2003 The OSSP Project <http://www.ossp.org/>
dnl ##  Copyright (c) 2002-2003 Cable & Wireless Germany <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/tool/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.53)
AC_INIT

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

dnl #   perform feature tests
AC_PROG_MAKE_SET
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 #   checks for POPT library
AC_CHECK_HEADERS(alloca.h float.h)

dnl #   check for OSSP ex library
AC_CHECK_EXTLIB([OSSP ex],
                ex, __ex_ctx, ex.h,
                [SUBDIR_EX=""],
                [SUBDIR_EX="lib_ex"
                 CPPFLAGS="$CPPFLAGS -Ilib_ex"
                 CFLAGS="$CFLAGS -Ilib_ex"
                 LDFLAGS="$LDFLAGS -Llib_ex/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lex"])
AC_SUBST(SUBDIR_EX)

dnl #   check for OSSP 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 OSSP 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 OSSP 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 OSSP 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 OSSP val library
AC_CHECK_EXTLIB([OSSP val],
                val, val_create, val.h,
                [SUBDIR_VAL=""],
                [SUBDIR_VAL="lib_val"
                 CPPFLAGS="$CPPFLAGS -Ilib_val"
                 CFLAGS="$CFLAGS -Ilib_val"
                 LDFLAGS="$LDFLAGS -Llib_val/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lval"])
AC_SUBST(SUBDIR_VAL)

dnl #   check for OSSP popt library
AC_CHECK_EXTLIB([OSSP popt],
                popt, popt_getcontext, popt.h,
                [SUBDIR_POPT=""],
                [SUBDIR_POPT="lib_popt"
                 CPPFLAGS="$CPPFLAGS -Ilib_popt"
                 CFLAGS="$CFLAGS -Ilib_popt"
                 LDFLAGS="$LDFLAGS -Llib_popt/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lpopt"])
AC_SUBST(SUBDIR_POPT)

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"
                 CFLAGS="$CFLAGS -Ilib_pcre"
                 LDFLAGS="$LDFLAGS -Llib_pcre/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -lpcre"])
AC_SUBST(SUBDIR_PCRE)

dnl #   check for OSSP tai library
AC_CHECK_EXTLIB([OSSP tai],
                tai, tai_create, tai.h,
                [SUBDIR_TAI=""],
                [SUBDIR_TAI="lib_tai"
                 CPPFLAGS="$CPPFLAGS -Ilib_tai"
                 CFLAGS="$CFLAGS -Ilib_tai"
                 LDFLAGS="$LDFLAGS -Llib_tai/.libs"
                 LIBS_EXTRA="$LIBS_EXTRA -ltai"])
AC_SUBST(SUBDIR_TAI)

dnl #   check for external Dmalloc library
AC_CHECK_EXTLIB([Dmalloc], dmalloc, dmalloc_debug, dmalloc.h,
                [AC_DEFINE(WITH_DMALLOC, 1, [Define to 1 if building with 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_EX $SUBDIR_STR $SUBDIR_L2 $SUBDIR_SA $SUBDIR_VAR $SUBDIR_VAL $SUBDIR_POPT $SUBDIR_PCRE $SUBDIR_TAI])

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


CVSTrac 2.0.1