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
103
|
# This file is part of tagr -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
# Copyright (C) 2000, 2005, 2008, 2009 Max Bouglacoff, Sergey Poznyakoff
#
# 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 3, or (at your option)
# any later version.
#
# 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, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.61)
AC_INIT([tagr], 1.9.90, [gray@gnu.org.ua])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.10 gnits tar-ustar std-options])
# Checks for programs.
AC_PROG_CC
gl_EARLY
AM_PROG_LEX
AC_PROG_YACC
AC_PROG_RANLIB
# Checks for libraries.
# Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h limits.h malloc.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h syslog.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_TYPE_UID_T
AC_TYPE_PID_T
AC_TYPE_SIZE_T
AC_STRUCT_TM
# Checks for library functions.
AC_FUNC_FORK
AC_FUNC_MALLOC
AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_TYPE_SIGNAL
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([memset pow select socket strchr strdup strerror strtoul])
# GNUlib
gl_INIT
GRECS_SETUP
# Check for gd headers and libraries
AC_CHECK_HEADERS([gd.h gdfonts.h],:,
[AC_MSG_ERROR([Libgd headers gd.h and/or gdfonts.h are not found])])
AC_CHECK_LIB([gd],[gdImageCreate],
,
[AC_MSG_ERROR([libgd not found])])
AC_CHECK_HEADERS(gdbm.h,
,
[AC_MSG_ERROR([gdbm.h not found])])
AC_CHECK_LIB([gdbm], [gdbm_open],
,
[AC_MSG_ERROR([libgdbm not found])])
## Default syslog facility
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([LOG_FACILITY],$LOG_FACILITY,
[Default syslog facility.])
AC_CONFIG_FILES([Makefile
gnu/Makefile
grecs/Makefile
grecs/src/Makefile
src/Makefile
etc/Makefile])
AC_OUTPUT
|