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
|
# This file is part of Jumper -*- autoconf -*-
# Copyright (C) 2013, 2017, 2018, 2020 Sergey Poznyakoff
#
# Jumper 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 3, or (at your option)
# any later version.
#
# Jumper 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 Jumper. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
AC_INIT([jumper], [1.2.90], [bug-jumper@gnu.org.ua],,
[http://www.gnu.org.ua/software/jumper])
AC_CONFIG_SRCDIR([src/jumper.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([1.11.5 gnits tar-ustar silent-rules])
# Enable silent rules by default:
AM_SILENT_RULES([yes])
# Checks for programs.
AC_PROG_AWK
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_PROG_YACC
# Checks for libraries.
AC_CHECK_LIB(socket, main)
AC_CHECK_LIB(nsl, main)
AC_CHECK_LIB(pcap, pcap_compile,
[LIBS="-lpcap $LIBS"],
[AC_MSG_ERROR([Required library libpcap not found])])
# Checks for header files.
AC_CHECK_HEADER(pcap.h,:,
[AC_MSG_ERROR([Required header pcap.h not found])])
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_MSG_CHECKING(for log facility)
AC_SUBST(LOG_FACILITY,["LOG_DAEMON"])
AC_ARG_VAR([LOG_FACILITY],
[Default syslog facility])
if test -n "$LOG_FACILITY"; then
logfacility=`echo $LOG_FACILITY | tr a-z A-Z`
case $logfacility in
USER|DAEMON|AUTH|AUTHPRIV|MAIL|CRON|LOCAL[[0-7]])
LOG_FACILITY=LOG_$logfacility;;
LOG_USER|LOG_DAEMON|LOG_AUTH|LOG_AUTHPRIV|LOG_MAIL|LOG_CRON|LOG_LOCAL[[0-7]])
LOG_FACILITY=$logfacility;;
*) AC_MSG_ERROR([Invalid value of LOG_FACILITY]);;
esac
fi
AC_DEFINE_UNQUOTED(LOGFACILITY, $LOG_FACILITY,
[The syslog facility to be used for diagnostics])
AC_MSG_RESULT($LOG_FACILITY)
AC_SUBST([INCLUDEDIR],['$(pkgdatadir)/include'])
AC_SUBST([VINCLUDEDIR],['$(pkgdatadir)/$(VERSION)/include'])
AM_CONDITIONAL([JMP_PROCNET_COND], [test -f /proc/net/dev])
# Grecs subsystem
GRECS_SETUP([grecs],[tree-api git2chg getopt])
AC_CONFIG_FILES([Makefile
src/Makefile
extra/Makefile
doc/Makefile])
AC_OUTPUT
|