Annotation of embedaddon/arping/configure.ac, revision 1.1.1.2
1.1 misho 1: # -*- Autoconf -*-
2: # Process this file with autoconf to produce a configure script.
3:
4: AC_PREREQ(2.61)
1.1.1.2 ! misho 5: AC_INIT(arping, 2.13, thomas@habets.se)
1.1 misho 6: AC_CANONICAL_SYSTEM
7: AC_CONFIG_SRCDIR([src/arping.c])
8: AM_INIT_AUTOMAKE
9: AM_MAINTAINER_MODE
10: AC_CONFIG_HEADER(config.h)
11:
12:
13: # Checks for programs.
14: AC_PROG_CC
15: AC_PROG_INSTALL
16: AC_PROG_MAKE_SET
17:
18: # Checks for libraries.
1.1.1.2 ! misho 19: AC_CHECK_LIB([m], [sqrt])
1.1 misho 20: AC_CHECK_LIB([socket], [socket])
21: AC_CHECK_LIB([nsl], [gethostbyname])
1.1.1.2 ! misho 22: AC_CHECK_LIB([rt], [clock_gettime])
1.1 misho 23: AC_CHECK_LIB([net], [libnet_name_resolve],
24: [AC_MSG_ERROR([libnet 1.0.x found. Arping 2.x requires libnet 1.1.x])])
25: AC_CHECK_LIB([net], [libnet_init], ,[AC_MSG_ERROR([libnet 1.1.x not found])])
26: AC_CHECK_LIB([pcap], [pcap_open_live], ,[AC_MSG_ERROR([libpcap not found])])
1.1.1.2 ! misho 27: AC_SEARCH_LIBS([clock_gettime], [rt])
1.1 misho 28:
29: # Checks for header files.
30: AC_HEADER_STDC
31: AC_CHECK_HEADERS([\
32: arpa/inet.h \
33: netinet/in.h \
34: stdlib.h \
35: sys/socket.h \
1.1.1.2 ! misho 36: time.h \
1.1 misho 37: sys/time.h \
38: sys/types.h \
39: stdint.h \
40: libnet.h \
41: win32/libnet.h \
42: net/bpf.h \
43: unistd.h])
44:
45: # Libnet include file is not optional
46: if test ! x$ac_cv_header_libnet_h = xyes; then
47: AC_MSG_ERROR([Can't find libnet.h. See INSTALL file for where to get Libnet])
48: fi
49:
50: # Checks for typedefs, structures, and compiler characteristics.
51: AC_C_CONST
52: AC_HEADER_TIME
53: AC_C_VOLATILE
54: AC_TYPE_UINT8_T
55: AC_TYPE_UINT16_T
56: AC_TYPE_UINT32_T
57: AC_TYPE_UINT64_T
58:
59: # Checks for library functions.
60: AC_PROG_GCC_TRADITIONAL
61: AC_FUNC_SELECT_ARGTYPES
62: AC_FUNC_SETVBUF_REVERSED
63: AC_TYPE_SIGNAL
1.1.1.2 ! misho 64: AC_CHECK_FUNCS([gettimeofday memset select strchr strdup strerror strstr \
! 65: getifaddrs])
! 66:
! 67: if test x$ac_cv_func_getifaddrs = xyes; then
! 68: AC_LIBOBJ([findif_getifaddrs])
! 69: else
! 70: case "$target_os" in
! 71: *linux*)
! 72: AC_LIBOBJ([findif_linux])
! 73: ;;
! 74: *freebsd*|*openbsd*|*darwin*)
! 75: AC_LIBOBJ([findif_sysctl])
! 76: ;;
! 77: *solaris*)
! 78: AC_LIBOBJ([findif_bsdroute])
! 79: ;;
! 80: *)
! 81: AC_LIBOBJ([findif_other])
! 82: ;;
! 83: esac
! 84: fi
! 85:
! 86:
! 87:
! 88: # check for CLOCK_MONOTONIC
! 89: AC_CACHE_CHECK([for CLOCK_MONOTONIC],
! 90: ac_cv_have_clock_monotonic, [
! 91: AC_TRY_RUN(
! 92: [
! 93: #include <time.h>
! 94: #include <sys/time.h>
! 95: int main() {
! 96: struct timespec ts;
! 97: exit(!!clock_gettime(CLOCK_MONOTONIC, &ts));
! 98: }
! 99: ],
! 100: [ ac_cv_have_clock_monotonic="yes" ],
! 101: [ ac_cv_have_clock_monotonic="no" ]
! 102: )
! 103: ])
! 104: AM_CONDITIONAL(HAVE_CLOCK_MONOTONIC, test x$ac_cv_have_clock_monotonic = xyes)
! 105: if test x$ac_cv_have_clock_monotonic = xyes; then
! 106: AC_DEFINE([HAVE_CLOCK_MONOTONIC], [1], [Monotonic clock])
! 107: fi
1.1 misho 108:
109: AC_CONFIG_FILES([Makefile])
110: AC_CONFIG_FILES([src/Makefile])
111: AC_CONFIG_FILES([doc/Makefile])
112: AC_OUTPUT
113:
114: echo "
115: $PACKAGE_NAME version $PACKAGE_VERSION
116: Prefix.........: $prefix
117: Debug Build....: $debug
118: C Compiler.....: $CC $CFLAGS $CPPFLAGS
119: Linker.........: $LD $LDFLAGS $LIBS
120: "
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>