aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: 792ed0f4136d979dfc7a87910059fd2862aa46f3 (plain)
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
# This file is part of SLB -*- autoconf -*-
# Copyright (C) 2011, 2012 Sergey Poznyakoff
#
# SLB 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.
#
# SLB 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 SLB.  If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ(2.63)
AC_INIT([slb], 1.1, [gray+slb@gnu.org.ua])
AC_CONFIG_SRCDIR([src/slb.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE([1.11 gnits tar-ustar dist-xz std-options silent-rules])
AC_CONFIG_LIBOBJ_DIR([src])

# Enable silent rules by default:
AM_SILENT_RULES([yes])

# Checks for programs.
AC_PROG_CC
AC_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([getopt.h])

# Checks for library functions.
AC_CHECK_FUNCS([sysconf getdtablesize getopt_long])
AC_REPLACE_FUNCS(daemon)

# Check for Net-SNMP
AC_PATH_PROG([NET_SNMP_CONFIG], net-snmp-config, none, $PATH)
if test "$NET_SNMP_CONFIG" = "none"; then
  AC_MSG_ERROR([cannot find Net-SNMP (net-snmp-config not found)])
fi
AC_SUBST(NET_SNMP_CONFIG)

# Grecs subsystem

GRECS_SETUP([grecs],[tests getopt git2chg],[$(top_srcdir)/src/pp-setup])

AH_BOTTOM([
#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
#  define __attribute__(x)
#endif

#ifndef SLB_PRINTFLIKE
# define SLB_PRINTFLIKE(fmt,narg) __attribute__ ((__format__ (__printf__, fmt, narg)))
#endif
])

# Initialize the test suite.
AC_CONFIG_TESTDIR(tests)
AC_CONFIG_FILES([tests/Makefile tests/atlocal])
AM_MISSING_PROG([AUTOM4TE], [autom4te])


AC_CONFIG_FILES([Makefile
		 src/Makefile
		 doc/Makefile
		 examples/Makefile])
		 
AC_OUTPUT

Return to:

Send suggestions and report system problems to the System administrator.