File: configure.ac

package info (click to toggle)
ocproxy 1.60-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, stretch, trixie
  • size: 5,372 kB
  • ctags: 10,629
  • sloc: ansic: 79,912; makefile: 550; sh: 145; tcl: 102; perl: 81
file content (83 lines) | stat: -rw-r--r-- 1,832 bytes parent folder | download
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
AC_PREREQ([2.61])
AC_INIT([ocproxy], [1.60], [dme@dme.org], [ocproxy], [https://github.com/cernekee/ocproxy])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])
AC_USE_SYSTEM_EXTENSIONS
AC_GNU_SOURCE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

AC_PROG_CC
AC_CANONICAL_HOST
AC_CONFIG_FILES([Makefile])

# --enable-debug

AC_ARG_ENABLE(
	[debug],
	[AS_HELP_STRING([--enable-debug],[enable debugging code and output])],
	[],
	[enable_debug="no"]
)

if test "x$enable_debug" = xyes; then
	CFLAGS="$CFLAGS -O0 -ggdb"
fi

# --enable-vpnns

case $host_os in
	*linux*)
		vpnns_default=yes
		;;
	*)
		vpnns_default=no
		;;
esac

AC_ARG_ENABLE(
	[vpnns],
	[AS_HELP_STRING([--enable-vpnns],[build vpnns binary (Linux only)])],
	[enable_vpnns="$enableval"],
	[enable_vpnns="$vpnns_default"]
)

if test "x$enable_vpnns" = xyes; then
	AC_CHECK_HEADERS([linux/if_tun.h sched.h], [],
			 [AC_MSG_ERROR([Missing headers for vpnns])])

fi
AM_CONDITIONAL([ENABLE_VPNNS], [test "x$enable_vpnns" = xyes])

EXTRA_PC_LIBS=""

AS_COMPILER_FLAGS(WFLAGS,
        "-Wall
         -Wextra
         -Wno-missing-field-initializers
         -Wno-sign-compare
         -Wno-pointer-sign
         -Wno-unused-parameter
         -Werror=pointer-to-int-cast
         -Wdeclaration-after-statement
         -Werror-implicit-function-declaration
         -Wformat-nonliteral
         -Wformat-security
         -Winit-self
         -Wno-missing-declarations
         -Wmissing-include-dirs
         -Wnested-externs
         -Wpointer-arith
         -Wwrite-strings")
AC_SUBST(WFLAGS, [$WFLAGS])

AC_SEARCH_LIBS([event_add], [event])
AC_CHECK_HEADERS([event2/event.h], [],
		 [AC_MSG_ERROR([Missing development files for libevent2])])

AX_PTHREAD
LIBS="$PTHREAD_LIBS $LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
CC="$PTHREAD_CC"

AC_OUTPUT