aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
blob: ab90ecca21e5fa3ac02dd8a9bc5272bea3f75307 (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
# This file is part of Ping903
# Copyright (C) 2020 Sergey Poznyakoff
# 
# Ping903 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.
# 
# Ping903 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 Ping903.  If not, see <http://www.gnu.org/licenses/>.

AC_PREREQ([2.69])
AC_INIT([Ping903], [0.5], [gray@gnu.org],
        [ping903],
        [https://puszcza.gnu.org.ua/projects/ping903/])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([-Wall -Werror 1.11.5 foreign tar-ustar silent-rules])
AM_SILENT_RULES([yes])

# Checks for programs.
AC_PROG_CC
AC_PROG_RANLIB
AM_PROG_AR

# Checks for libraries.
AC_CHECK_LIB([microhttpd],[MHD_start_daemon],[],
             [AC_MSG_ERROR([required library microhttpd not found

Please see https://www.gnu.org/software/libmicrohttpd for download instructions.])])
AC_CHECK_LIB([pthread],[pthread_sigmask],[],
             [AC_MSG_ERROR([required library pthread not found])])
AC_CHECK_LIB([wrap], [main])
AC_CHECK_LIB([nsl], [main])

# Checks for header files.
AC_CHECK_HEADERS([arpa/inet.h \
                  netinet/in.h \
                  netinet/in_systm.h \
                  netinet/ip.h \
                  netinet/ip_icmp.h \
		  stddef.h \
		  sys/socket.h \
		  sys/time.h \
		  unistd.h \
		  tcpd.h])

AM_CONDITIONAL([COND_TCPD], [test x$ac_cv_lib_wrap_main = xyes && test x$ac_cv_header_tcpd_h = xyes])
		  
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

# Checks for library functions.
AC_CHECK_FUNCS([gettimeofday])

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

Return to:

Send suggestions and report system problems to the System administrator.