blob: aefad879b403dc47621d241f0dbe17c87b2219ac (
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
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
|
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT([urshd], [1.1.1], [bugs@pengutronix.de])
AC_CONFIG_HEADERS([include/urshd_config.h])
AC_CONFIG_SRCDIR([src/urshd.c])
AC_CONFIG_MACRO_DIR([config/m4])
AC_CONFIG_AUX_DIR([config/autoconf])
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
AM_MAINTAINER_MODE
CFLAGS="${CFLAGS} -Wall -Wsign-compare -Wfloat-equal -Wformat-security"
#
# Checks for programs.
#
AC_PROG_CC
AM_INIT_AUTOMAKE([foreign no-exeext dist-bzip2])
#
# Checks for header files.
#
AC_HEADER_RESOLV
AC_HEADER_STDC
AC_CHECK_HEADERS([ \
arpa/inet.h \
fcntl.h \
netdb.h \
netinet/in.h \
paths.h \
stdlib.h \
string.h \
sys/ioctl.h \
sys/param.h \
sys/socket.h \
sys/time.h \
syslog.h \
unistd.h\
])
#
# Checks for typedefs, structures, and compiler characteristics.
#
AC_C_CONST
#
# Checks for library functions.
#
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FORK
AC_PROG_GCC_TRADITIONAL
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETPGRP
AC_TYPE_SIGNAL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([ \
alarm \
dup2 \
endpwent \
inet_ntoa \
isascii \
memset \
select \
socket \
strerror \
strrchr \
])
#
# Debugging
#
AC_MSG_CHECKING([whether to enable debugging])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug], [enable debugging @<:@default=no@:>@]),
[case "$enableval" in
y | yes) CONFIG_DEBUG=yes ;;
*) CONFIG_DEBUG=no ;;
esac],
[CONFIG_DEBUG=no])
AC_MSG_RESULT([${CONFIG_DEBUG}])
if test "${CONFIG_DEBUG}" = "yes"; then
CFLAGS="${CFLAGS} -Werror -ggdb -Og"
AC_DEFINE(DEBUG, 1, [debugging])
else
CFLAGS="${CFLAGS} -O2"
fi
AC_CONFIG_FILES([
GNUmakefile
doc/GNUmakefile
include/GNUmakefile
src/GNUmakefile
])
AC_OUTPUT
|