1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
# $Id: configure.in,v 1.10 2001/10/14 18:07:36 fygrave Exp $
#
# Copyright (C) 2001 Fyodor Yarochkin <fygrave@tigerteam.net>,
# Ofir Arkin <ofir@sys-security.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# All material for nonprofit, educational use only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
AC_INIT(xprobe.c)
PACKAGE=xprobe
VERSION=0.0.2
AC_SUBST(PACKAGE)
AC_SUBST(VERSION)
AC_CONFIG_HEADER(config.h)
AC_CONFIG_AUX_DIR(cfg-scripts)
AC_PROG_CC
if test -n "$GCC"; then
CFLAGS="$CFLAGS -Wall"
fi
AC_ARG_ENABLE(debug,
[ --enable-debug enable debugging )],
[ if test -n "$GCC"; then
CFLAGS="$CFLAGS -DDEBUG -ggdb"
else
CLFLAGS="$CFLAGS -DDEBUG"
fi
],)
AC_CANONICAL_HOST
case "$host" in
*-solaris*)
AC_DEFINE(SOLARIS)
LDFLAGS="${LDFLAGS} -lsocket -lnsl -lresolv"
;;
esac
AC_HEADER_STDC
AC_CHECK_HEADERS(strings.h)
AC_CHECK_HEADERS(string.h)
AC_CHECK_HEADERS(stdlib.h)
AC_CHECK_HEADERS(unistd.h)
AC_CHECK_HEADERS(glib.h)
AC_C_CONST
AC_ARG_WITH(libpcap_includes,
[ --with-libpcap-includes=DIR libcap include directory],
[with_libpcap_includes="$withval"],[with_libpcap_includes=no])
AC_ARG_WITH(libpcap_libraries,
[ --with-libpcap-libraries=DIR libcap library directory],
[with_libpcap_libraries="$withval"],[with_libpcap_libraries=no])
if test "$with_libpcap_includes" != "no"; then
CPPFLAGS="${CPPFLAGS} -I${with_libpcap_includes}"
fi
if test "$with_libpcap_libraries" != "no"; then
LDFLAGS="${LDFLAGS} -L${with_libpcap_libraries}"
fi
LPCAP=""
AC_CHECK_LIB(pcap, pcap_datalink,, LPCAP="no")
if test "$LPCAP" = "no"; then
echo
echo " ERROR! Libpcap library/headers not found."
echo " http://www.tcpdump.org/ is a good place to fetch one"
echo " if libpcap library is installed, use the --with-libpcap-* options"
echo " to specify pathes to include and library files locations."
exit
fi
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_OUTPUT([
Makefile
])
|