forked from isc-projects/dns-echo-user
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure.ac
49 lines (38 loc) · 1.73 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.69])
AC_INIT([dns-echo], [0.1], [bind9-bugs@isc.org])
AM_INIT_AUTOMAKE([no-define foreign])
AM_SILENT_RULES([yes])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
# Checks for programs.
AC_PROG_CC
# Checks for compiler flags.
DESIRED_FLAGS="-std=c99"
for flag in $DESIRED_FLAGS; do
AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
done
# Checks for libraries.
CPPFLAGS="$AM_CPPFLAGS $CPPFLAGS"
CFLAGS="$AM_CFLAGS $CFLAGS"
LDFLAGS="$AM_LDFLAGS $LDFLAGS"
AC_CHECK_LIB([event], [event_base_new])
AC_CHECK_LIB([pthread], [pthread_setaffinity_np])
# Checks for header files.
AC_CHECK_HEADERS([fcntl.h net/netmap.h net/netmap_user.h netdb.h stdlib.h string.h])
AC_CHECK_HEADERS([sys/socket.h unistd.h wait.h sys/wait.h])
AC_CHECK_HEADERS([linux/if_packet.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SSIZE_T
# Checks for standard library functions.
AC_CHECK_FUNCS([socket poll select recvmmsg])
# Checks for non-standard library functions
AC_CHECK_FUNCS([pthread_setaffinity_np pthread_setname_np])
AC_CHECK_FUNCS([sched_setaffinity])
# Enable extra warnings
WARNING_FLAGS="-fdiagnostics-show-option -Wall -Wextra -Wno-unused-parameter -Wstrict-prototypes -Wundef -Wformat=2 -Wmissing-include-dirs -Wformat-nonliteral -Wold-style-definition -Wpointer-arith -Waggregate-return -Winit-self -Wpacked -Wc++-compat -Wno-long-long -Wno-overlength-strings -Wdeclaration-after-statement -Wredundant-decls -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-qual -Wwrite-strings -fno-common"
for flag in $WARNING_FLAGS; do
AS_COMPILER_FLAG([$flag], [CFLAGS="$CFLAGS $flag"])
done
AC_OUTPUT