Permalink
Fetching contributors…
Cannot retrieve contributors at this time
132 lines (109 sloc) 4.01 KB
dnl -------------------------------------------------------------------------
dnl Autoconf startup.
dnl -------------------------------------------------------------------------
AC_PREREQ([2.63])
m4_define([GIT_VERSION_GEN], [dnl
pushdef([version], [m4_esyscmd([./git-version-gen])])dnl
ifelse([]version[], [], [0.4.1], []version[])[]dnl
popdef([version])dnl
])
AC_INIT([unserding], [GIT_VERSION_GEN], [https://github.com/hroptatyr/unserding])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([src/])
dnl -------------------------------------------------------------------------
dnl Local copyright notices.
dnl -------------------------------------------------------------------------
AC_COPYRIGHT(
[#### Configuration script for unserding.
#### Copyright (C) 2008-2013 Sebastian Freundt
### Don't edit this script!
### This script was automatically generated by the `autoconf' program
### from the file `./configure.ac'.
### To rebuild it, execute the command
### autoreconf
])
AM_INIT_AUTOMAKE([foreign dist-xz])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
## the build chain
AC_PROG_CC([icc gcc tcc cc])
SXE_CHECK_CC([c11 c1x c99 gnu99])
AC_C_BIGENDIAN
SXE_CHECK_CFLAGS
AC_CHECK_TOOLS([AR], [xiar ar], [false])
## check for working c11 features
SXE_CHECK_ANON_STRUCTS_DECL
SXE_CHECK_ANON_STRUCTS_INIT
AC_CHECK_HEADERS([stdbool.h])
AC_CHECK_HEADERS([fcntl.h])
## check for byteorder utils
AC_CHECK_HEADERS([endian.h sys/endian.h byteorder.h byteswap.h])
## some sizes we need
AC_CHECK_SIZEOF([long])
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([size_t])
AC_CHECK_HEADERS([stdbool.h])
AC_CHECK_HEADERS([fcntl.h])
AC_CHECK_HEADERS([sys/types.h])
AC_CHECK_HEADERS([sys/socket.h])
AC_CHECK_HEADERS([netinet/in.h])
AC_CHECK_HEADERS([netinet/tcp.h])
AC_CHECK_HEADERS([arpa/inet.h])
AC_CHECK_HEADERS([netdb.h])
AC_CHECK_HEADERS([net/if.h])
AC_CHECK_HEADERS([errno.h])
dnl -------------------------------------------------------------------------
dnl packages we allow/support
dnl -------------------------------------------------------------------------
## event lib
AC_CHECK_LIBEV
## libtool goddess^Wgoodness
SXE_CHECK_LIBTOOL
LT_CONFIG_LTDL_DIR([libltdl])
LTDL_INIT([recursive])
SXE_CHECK_LIBLTDL
## mimic automake on this one
pkglibdir="${libdir}/${PACKAGE}"
pkgincludedir="${includedir}/${PACKAGE}"
AC_SUBST([pkglibdir])
AC_SUBST([pkgincludedir])
AC_DEFINE_UNQUOTED([PKGLIBDIR], ["${pkglibdir}"], [where modules reside])
AC_DEFINE_UNQUOTED([PKGINCLUDEDIR], ["${pkgincludedir}"], [where headers reside])
unsermoddir="${pkglibdir}"
AC_SUBST([unsermoddir])
unserincdir="${pkgincludedir}"
AC_SUBST([unserincdir])
dnl -------------------------------------------------------------------------
dnl check splicing features
dnl -------------------------------------------------------------------------
SXE_CHECK_TCP_SPLICE
SXE_CHECK_UDP_SPLICE
dnl -------------------------------------------------------------------------
dnl diagnostics for the test suite
dnl -------------------------------------------------------------------------
AC_PATH_PROG([IP], [ip], [:],
[${PATH}]dnl
[${PATH_SEPARATOR}/usr/local/sbin]dnl
[${PATH_SEPARATOR}/usr/sbin]dnl
[${PATH_SEPARATOR}/sbin]dnl
[${PATH_SEPARATOR}/usr/local/bin]dnl
[${PATH_SEPARATOR}/usr/bin]dnl
[${PATH_SEPARATOR}/bin])
AC_MSG_CHECKING([for multicast6-capable adapters])
sxe_cv_ip_mc6_devlines=`"${IP}" -6 -o l | grep "state UP" | grep "MULTICAST"`
sxe_cv_ip_mc6_devices=`echo ${sxe_cv_ip_mc6_devlines} | \
awk 'BEGIN{FS=": "} {x=x $2 " "} END{print x}'`
AM_CONDITIONAL([HAVE_MC6_DEVICES], [test -n "${sxe_cv_ip_mc6_devices}"])
AC_MSG_RESULT([${sxe_cv_ip_mc6_devices}])
dnl -------------------------------------------------------------------------
dnl final output
dnl -------------------------------------------------------------------------
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([libltdl/Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([info/Makefile])
AC_CONFIG_FILES([test/Makefile])
AC_CONFIG_FILES([unserding.pc])
AC_OUTPUT
dnl configure.ac ends here