-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
142 lines (121 loc) · 3.68 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
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# arch-tag: 9e49a1d9-1005-4ae9-8bf1-04a7b9b80285
dnl configure.ac for CryWrap
dnl Copyright (C) 2003, 2004 Gergely Nagy <algernon@bonehunter.rulez.org>
dnl
dnl Process this file with autoconf to produce a configure script.
dnl
dnl This file is part of CryWrap.
dnl
dnl CryWrap is free software; you can redistribute it and/or modify
dnl it under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2 of the License, or
dnl (at your option) any later version.
dnl
dnl CryWrap is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
dnl GNU General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
dnl **********************
dnl * Boilerplate
dnl **********************
AC_PREREQ(2.65)
AC_INIT([crywrap],[0.3.0],[bug-gnutls@gnu.org])
AC_CONFIG_SRCDIR(src/crywrap.c)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_HEADERS(config.h)
AC_SUBST(CRYWRAP_PATCHLEVEL, [[`echo $PACKAGE_VERSION | sed 's/.*\..*\.\([0-9]*\).*/\1/g'`]])
AC_PROG_CC
AC_PROG_CPP
AC_CANONICAL_HOST
AC_SUBST(host_os)
dnl **********************
dnl * Programs
dnl **********************
BHM4_CC_CHECK
AC_PROG_INSTALL
BHMK_MAKE_CHECK
dnl **********************
dnl * Headers
dnl **********************
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([arpa/inet.h netinet/in.h sys/select.h sys/types.h])
dnl **********************
dnl * Typedefs & co
dnl **********************
AC_STRUCT_TM
AC_TYPE_UID_T
AC_TYPE_PID_T
BHM4_TCP_CORK_CHECK
dnl **********************
dnl * Library functions
dnl **********************
AC_FUNC_FORK
AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([#include <sys/types.h>
#include <signal.h>
],
[return *(signal (0, 0)) (0) == 1;])],
[ac_cv_type_signal=int],
[ac_cv_type_signal=void])])
AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
(`int' or `void').])
AC_FUNC_STAT
AC_FUNC_LSTAT
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_STRFTIME
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_MMAP
AC_CHECK_FUNCS([alarm atexit dup2 epoll_create kqueue memchr memset munmap \
putenv regcomp scandir select socket strcasecmp strchr \
strdup strerror strncasecmp strrchr strstr strtoul uname])
AC_CHECK_FUNC([sendfile], [], [AC_CHECK_LIB(sendfile, sendfile)])
dnl **********************
dnl * Rest
dnl **********************
PKG_CHECK_MODULES([LIBGNUTLS], [gnutls >= 3.1.10])
AC_CHECK_HEADER([idna.h],
[AC_CHECK_LIB(idn, stringprep_check_version,
[libidn=yes; AC_SUBST(SHISHI_LIBS, -lidn)], [libidn=no])],
libidn=no)
if test "x$libidn" != "xno" ; then
AC_DEFINE(USE_LIBIDN, 1, [Define to 1 if you want Libidn.])
else
AC_MSG_ERROR([You need Libidn to compile CryWrap])
fi
dnl **********************
dnl * Features
dnl **********************
dnl * Fork
AC_ARG_ENABLE(fork,
AS_HELP_STRING([--disable-fork],[disable forking to background]),
[f_fork="$enableval"], [f_fork="yes"])
if test "x$f_fork" != "xno"; then
AC_DEFINE_UNQUOTED(CRYWRAP_OPTION_FORK, 1,
Define this to enable forking to background)
else
AC_DEFINE_UNQUOTED(CRYWRAP_OPTION_NOFORK, 1,
Define this to disable forking to background)
fi
dnl **********************
dnl * Output
dnl **********************
AC_CONFIG_FILES([
Makefile
Mk/Rules.mk
Mk/Makefile
config.mk
doc/Makefile
etc/Makefile
history/Makefile
m4/Makefile
src/Makefile
utils/Makefile
])
AC_OUTPUT