-
Notifications
You must be signed in to change notification settings - Fork 13
/
configure.ac
51 lines (42 loc) · 1.4 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
50
51
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_INIT([sniproxy], [0.1.0], [https://github.com/XiaoxiaoPu/sniproxy/issues], [sniproxy], [https://github.com/XiaoxiaoPu/sniproxy])
AC_CONFIG_SRCDIR([sniproxy])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_AUX_DIR(.)
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_HOST
AM_INIT_AUTOMAKE([foreign -Wall -Werror])
# Checks for programs.
: ${CFLAGS=""}
AC_PROG_CC_C99
AC_PROG_INSTALL
# Custom options
AC_ARG_ENABLE(
[static],
[AS_HELP_STRING([--enable-static], [build with static linking])],
[LDFLAGS="$LDFLAGS -static"])
AM_CONDITIONAL(STATIC, test x"$static" = x"true")
AC_ARG_ENABLE(
[debug],
[AS_HELP_STRING([--enable-debug], [build with additional debugging code])],
[CFLAGS="$CFLAGS -g -DDEBUG -O0"])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
# Checks for libraries.
LIB_MILL="-lmill"
AC_CHECK_LIB([mill], [now], [AC_SUBST(LIB_MILL)])
# Checks for header files.
AC_HEADER_ASSERT
AC_CHECK_HEADERS([arpa/inet.h stdint.h stdlib.h string.h sys/socket.h unistd.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_INT64_T
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_PID_T
# Checks for library functions.
AC_CHECK_FUNCS([bzero sigaction strerror])
AC_CONFIG_FILES([Makefile
src/Makefile])
AC_OUTPUT