-
Notifications
You must be signed in to change notification settings - Fork 1k
Expand file tree
/
Copy pathconfigure.ac
More file actions
59 lines (44 loc) · 1.65 KB
/
configure.ac
File metadata and controls
59 lines (44 loc) · 1.65 KB
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
52
53
54
55
56
57
58
59
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.65])
AC_INIT([shadowvpn],[0.1.0],[clowwindy42@gmail.com])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src/main.c])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE([1.11 dist-bzip2 tar-ustar foreign subdir-objects])
# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
AC_PROG_RANLIB
AC_PROG_INSTALL
LT_INIT
# Checks for header files.
AC_HEADER_RESOLV
AC_CHECK_HEADERS([arpa/inet.h fcntl.h netdb.h stdlib.h string.h sys/socket.h unistd.h])
AC_CHECK_HEADER([linux/if_tun.h],[],[AC_MSG_ERROR([linux/if_tun.h not found.])],[])
# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_TYPE_UINT16_T
# Checks for library functions.
# To fix rpl_malloc undefined error in mips cross-compile enviroment.
AC_CHECK_FUNCS([malloc realloc])
AC_CHECK_FUNCS([inet_ntoa memset select socket strchr strdup strrchr])
AC_ARG_ENABLE([debug],
[ --enable-debug build with additional debugging code],
[CFLAGS="$CFLAGS -g -DDEBUG"])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
# Add a option to force static link the target.
AC_ARG_ENABLE([static],
[ --enable-static build with static linking],
[LDFLAGS="$LDFLAGS -static"])
AC_ARG_ENABLE([profile],
[ --enable-profile build with profile],
[CFLAGS="$CFLAGS -pg"])
AC_ARG_ENABLE([analyze],
[ --enable-analyze build with analyze],
[CC="clang --analyze"])
AM_CONDITIONAL(STATIC, test x"$static" = x"true")
AC_CONFIG_FILES([Makefile src/Makefile samples/Makefile])
AC_CONFIG_SUBDIRS([libsodium])
AC_OUTPUT