1 AC_INIT(liboping, 0.2.1-alpha0)
2 AC_CONFIG_SRCDIR(src/liboping.c)
3 AC_CONFIG_HEADERS(src/config.h)
4 AM_INIT_AUTOMAKE(dist-bzip2)
7 AC_PREFIX_DEFAULT("/opt/oping")
10 # Check for programs/utilities
17 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
22 AC_LIBLTDL_CONVENIENCE
28 AC_CONFIG_SUBDIRS(libltdl src)
31 # Checks for header files.
34 AC_CHECK_HEADERS(unistd.h)
35 AC_CHECK_HEADERS(math.h)
36 AC_CHECK_HEADERS(fcntl.h)
37 AC_CHECK_HEADERS(sys/types.h)
38 AC_CHECK_HEADERS(sys/stat.h)
40 AC_CHECK_HEADERS(sys/socket.h)
41 AC_CHECK_HEADERS(netdb.h)
42 AC_CHECK_HEADERS(signal.h)
44 # This sucks, but what can I do..?
45 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
50 # include <sys/types.h>
53 AC_CHECK_HEADERS(netinet/in.h, [], [],
58 # include <sys/types.h>
60 #if HAVE_NETINET_IN_SYSTM_H
61 # include <netinet/in_systm.h>
64 AC_CHECK_HEADERS(netinet/ip.h, [], [],
69 # include <sys/types.h>
71 #if HAVE_NETINET_IN_SYSTM_H
72 # include <netinet/in_systm.h>
75 # include <netinet/in.h>
78 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
83 # include <sys/types.h>
85 #if HAVE_NETINET_IN_SYSTM_H
86 # include <netinet/in_systm.h>
89 # include <netinet/in.h>
92 # include <netinet/ip.h>
95 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
100 # include <sys/types.h>
102 #if HAVE_NETINET_IN_SYSTM_H
103 # include <netinet/in_systm.h>
105 #if HAVE_NETINET_IN_H
106 # include <netinet/in.h>
108 #if HAVE_NETINET_IP_H
109 # include <netinet/ip.h>
112 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
117 # include <sys/types.h>
120 # include <sys/types.h>
122 #if HAVE_NETINET_IN_SYSTM_H
123 # include <netinet/in_systm.h>
125 #if HAVE_NETINET_IN_H
126 # include <netinet/in.h>
129 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
134 # include <sys/types.h>
136 #if HAVE_NETINET_IN_SYSTM_H
137 # include <netinet/in_systm.h>
139 #if HAVE_NETINET_IN_H
140 # include <netinet/in.h>
142 #if HAVE_NETINET_IP6_H
143 # include <netinet/ip6.h>
147 socket_needs_socket="no"
148 AC_CHECK_FUNCS(socket, [],
149 AC_CHECK_LIB(socket, socket,
150 [socket_needs_socket="yes"],
151 AC_MSG_ERROR(cannot find socket)))
152 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
154 nanosleep_needs_rt="no"
155 AC_CHECK_FUNCS(nanosleep, [],
156 AC_CHECK_LIB(rt, nanosleep,
157 [nanosleep_needs_rt="yes"],
158 AC_MSG_ERROR(cannot find nanosleep)))
159 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
161 AC_OUTPUT(Makefile src/Makefile src/mans/Makefile)