-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathconfigure.ac
More file actions
77 lines (45 loc) · 1.53 KB
/
Copy pathconfigure.ac
File metadata and controls
77 lines (45 loc) · 1.53 KB
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
AC_PREREQ(2.50)
AC_INIT(rdate, 1.5)
AC_CONFIG_SRCDIR(src/rdate.c)
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE
dnl ############# Configure Arguments
AC_ARG_ENABLE(debug,
[--enable-debug=[no/yes] turn on debugging],
[ Debugging="Enabled"
AC_DEFINE(DEBUG, 1, [ Define if debugging is enabled. ]) ],
[ Debugging="Disabled" ]
)
dnl ############# Compiler and tools Checks
AC_PROG_CC
AC_PROG_INSTALL
dnl ############## Library and Function Checks
dnl Checks for libraries. We check for the library only if the function is
dnl not available without the library.
AC_CHECK_FUNC(gethostbyaddr, , [AC_CHECK_LIB(nsl, gethostbyaddr)])
AC_CHECK_FUNC(socket, , [AC_CHECK_LIB(socket, socket)])
AC_CHECK_FUNC(logwtmp, , [AC_CHECK_LIB(util, logwtmp)])
dnl Check for IPv6/protocol independent socket support
AC_CHECK_FUNCS( getaddrinfo \
getnameinfo \
adjtime \
sigaction \
)
AC_TYPE_SIGNAL
dnl ############## Header Checks
AC_CHECK_HEADERS(time.h sys/time.h)
AC_CHECK_HEADERS(libutil.h util.h utmp.h unistd.h)
dnl ############## Type checks
AC_CHECK_TYPE(uint32_t, unsigned long)
AC_CHECK_TYPE(uint16_t, unsigned short)
AC_CHECK_TYPE(uint8_t, unsigned char)
dnl ############## Compiler and Linker Flags
CFLAGS="$CFLAGS -Wunused -Wall -pipe"
LDFLAGS="$LDFLAGS"
if test x$Debugging = xEnabled; then
CFLAGS="$CFLAGS -g -Werror"
fi
dnl ############## Final Output
AC_OUTPUT( [ Makefile src/Makefile ] )
dnl ############## Display Message
echo "Now type 'make' and then 'make install'."