"Fossies" - the Fresh Open Source Software Archive 
Member "fping-5.1/configure.ac" (6 Feb 2022, 3119 Bytes) of package /linux/misc/fping-5.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
See also the latest
Fossies "Diffs" side-by-side code changes report for "configure.ac":
5.0_vs_5.1.
1 dnl Process this file with autoconf to produce a configure script.
2
3 dnl Minimum Autoconf version required.
4 AC_PREREQ(2.59)
5
6 AC_INIT([fping],[5.1])
7 AC_GNU_SOURCE
8
9 dnl --disable-ipv4
10 AC_ARG_ENABLE([ipv4],
11 AS_HELP_STRING([--disable-ipv4], [Disable support for pinging IPv4 hosts]))
12 AM_CONDITIONAL([IPV4], [test "x$enable_ipv4" != "xno"])
13 AM_COND_IF([IPV4], [AC_DEFINE([IPV4], [1], [IPv4 enabled])])
14
15 dnl --disable-ipv6
16 AC_ARG_ENABLE([ipv6],
17 AS_HELP_STRING([--disable-ipv6], [Disable support for pinging IPv6 hosts]))
18 AS_IF([test "x$enable_ipv6" != "xno"], [
19 dnl Test if IPv6 is supported
20 AC_CHECK_HEADERS([netinet/icmp6.h], [have_ipv6="yes"], [], [[
21 #include <netinet/in.h>
22 #include <sys/types.h>
23 ]])
24 ])
25 dnl Can't disable both IPv4 and IPv6
26 AS_IF([test "x$enable_ipv4" = "xno" -a "x$enable_ipv6" = "xno"], [
27 AC_MSG_ERROR([Need to enable IPv4 or IPv6. Can't disable both!)])
28 ])
29 dnl IPv6 required, but not supported?
30 AS_IF([test \( "x$enable_ipv6" = "xyes" -o "x$enable_ipv4" = "xno" \) -a "x$have_ipv6" != "xyes" ], [
31 AC_MSG_ERROR([IPv6 not supported on this platform (netinet/icmp6.h header not found)])
32 ])
33 AM_CONDITIONAL([IPV6], [test "x$have_ipv6" = "xyes"])
34 AM_COND_IF([IPV6], [AC_DEFINE([IPV6], [1], [IPv6 enabled])])
35
36 AC_ARG_ENABLE([timestamp],
37 AS_HELP_STRING([--disable-timestamp], [Disable kernel-based packet timestaping (SO_TIMESTAMPNS)]))
38 AS_IF([test "x$enable_timestamp" != "xno"], [
39 AC_CHECK_DECL([SO_TIMESTAMPNS], [AC_DEFINE(HAVE_SO_TIMESTAMPNS, [1], [SO_TIMESTAMPNS is defined])], [have_so_timestamp="no"], [#include <sys/types.h>
40 #include <sys/socket.h>])
41 ])
42 dnl Test if --enable-timestamp is explicitely enabled and make an error if this platform doesn't support it
43 AS_IF([test "x$enable_timestamp" = "xyes" -a "x$have_so_timestamp" = "xno"], [
44 AC_MSG_ERROR([--enable-timestamp not supported on this platform])
45 ])
46
47 AC_ARG_ENABLE([safe-limits],
48 AS_HELP_STRING([--enable-safe-limits], [Restrict timing parameters (-i, -p) within "safe" limits]))
49 AS_IF([test "x$enable_safe_limits" = "xyes"], [
50 AC_DEFINE(FPING_SAFE_LIMITS, [1], [safe limits should be enforced])])
51
52 AC_CANONICAL_TARGET
53 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
54 AM_MAINTAINER_MODE
55
56 AC_CONFIG_HEADERS([config.h])
57
58 dnl Checks for programs.
59
60 AC_PROG_CC
61 AM_PROG_CC_C_O
62 AC_PROG_CC_STDC
63 AC_PROG_CPP
64 AC_PROG_INSTALL
65
66 dnl Checks for libraries.
67
68 AC_CHECK_FUNC(gethostbyname)
69 if test $ac_cv_func_gethostbyname = no; then
70 AC_CHECK_LIB(nsl, gethostbyname)
71 fi
72 AC_CHECK_FUNC(connect)
73 if test $ac_cv_func_connect = no; then
74 AC_CHECK_LIB(socket, connect)
75 fi
76 AC_CHECK_FUNC(sigaction)
77 if test $ac_cv_func_sigaction = yes; then
78 AC_DEFINE([USE_SIGACTION],[1],[Define if sigaction is available.])
79 fi
80
81 AH_TOP([
82 #ifndef CONFIG_H
83 #define CONFIG_H
84 ])
85
86 AH_BOTTOM([
87 /* some OSes do not define this ... lets take a wild guess */
88
89 #ifndef INADDR_NONE
90 # define INADDR_NONE 0xffffffffU
91 #endif
92
93 #endif /* CONFIG_H */
94
95 ])
96
97 dnl Checks for header files.
98 AC_CHECK_HEADERS([unistd.h sys/file.h stdlib.h sys/select.h])
99
100 AC_CONFIG_FILES([Makefile
101 doc/Makefile
102 src/Makefile])
103
104 AC_OUTPUT