# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT(src/sflowtool.c) PACKAGE=sflowtool VERSION=3.12 AM_INIT_AUTOMAKE($PACKAGE,$VERSION) AM_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR([src/sflow.h]) # Checks for programs. AC_PROG_CC # Checks for libraries. AC_CANONICAL_HOST case "$host" in *-*-solaris*) LDFLAGS="$LDFLAGS -lsocket -lnsl" ;; esac # Checks for header files. AC_HEADER_STDC AC_CHECK_HEADERS([netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_HEADER_TIME AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ AC_TRY_COMPILE( [ #include #include ], [ struct in6_addr s; s.s6_addr[0] = 0; ], [ ac_cv_have_struct_in6_addr="yes" ], [ ac_cv_have_struct_in6_addr="no" ] ) ]) if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then AC_DEFINE([HAVE_STRUCT_IN6_ADDR], [], [description]) fi AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ AC_TRY_COMPILE( [ #include ], [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], [ ac_cv_have_u_intxx_t="yes" ], [ ac_cv_have_u_intxx_t="no" ] ) ]) if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then AC_DEFINE([HAVE_U_INTXX_T], [], [description]) have_u_intxx_t=1 fi AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ AC_TRY_COMPILE( [ #include ], [ u_int64_t a; a = 1;], [ ac_cv_have_u_int64_t="yes" ], [ ac_cv_have_u_int64_t="no" ] ) ]) if test "x$ac_cv_have_u_int64_t" = "xyes" ; then AC_DEFINE([HAVE_U_INT64_T], [], [description]) have_u_int64_t=1 fi # Checks for library functions. AC_FUNC_SELECT_ARGTYPES AC_FUNC_VPRINTF AC_CHECK_FUNCS([gethostbyname memset select socket strdup strerror]) AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT