1 # arch-tag: 9e49a1d9-1005-4ae9-8bf1-04a7b9b80285
2 dnl configure.ac for CryWrap
3 dnl Copyright (C) 2003, 2004 Gergely Nagy <algernon@bonehunter.rulez.org>
5 dnl Process this file with autoconf to produce a configure script.
7 dnl This file is part of CryWrap.
9 dnl CryWrap is free software; you can redistribute it and/or modify
10 dnl it under the terms of the GNU General Public License as published by
11 dnl the Free Software Foundation; either version 2 of the License, or
12 dnl (at your option) any later version.
14 dnl CryWrap is distributed in the hope that it will be useful,
15 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
16 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 dnl GNU General Public License for more details.
19 dnl You should have received a copy of the GNU General Public License
20 dnl along with this program; if not, write to the Free Software
21 dnl Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 dnl **********************
25 dnl **********************
27 AC_INIT([crywrap],[0.3],[bug-gnutls@gnu.org])
28 AC_CONFIG_SRCDIR(src/crywrap.c)
29 AC_CONFIG_AUX_DIR([build-aux])
30 AC_CONFIG_MACRO_DIR([m4])
32 AC_CONFIG_HEADERS(system.h)
40 dnl **********************
42 dnl **********************
49 dnl **********************
51 dnl **********************
54 AC_CHECK_HEADERS([arpa/inet.h netinet/in.h sys/select.h sys/types.h])
56 dnl **********************
58 dnl **********************
64 BHM4_SOCKADDR_STORAGE_CHECK
66 dnl **********************
67 dnl * Library functions
68 dnl **********************
70 AC_CACHE_CHECK([return type of signal handlers],[ac_cv_type_signal],[AC_COMPILE_IFELSE(
71 [AC_LANG_PROGRAM([#include <sys/types.h>
74 [return *(signal (0, 0)) (0) == 1;])],
75 [ac_cv_type_signal=int],
76 [ac_cv_type_signal=void])])
77 AC_DEFINE_UNQUOTED([RETSIGTYPE],[$ac_cv_type_signal],[Define as the return type of signal handlers
86 AC_FUNC_SELECT_ARGTYPES
88 AC_CHECK_FUNCS([alarm atexit dup2 epoll_create kqueue memchr memset munmap \
89 putenv regcomp scandir select socket strcasecmp strchr \
90 strdup strerror strncasecmp strrchr strstr strtoul uname])
91 AC_CHECK_FUNC([sendfile], [], [AC_CHECK_LIB(sendfile, sendfile)])
93 dnl **********************
95 dnl **********************
99 dnl **********************
101 dnl **********************
103 PKG_CHECK_MODULES(LIBGNUTLS, [gnutls >= 2.10.0])
105 AC_CHECK_HEADER([idna.h],
106 [AC_CHECK_LIB(idn, stringprep_check_version,
107 [libidn=yes; AC_SUBST(SHISHI_LIBS, -lidn)], [libidn=no])],
110 if test "x$libidn" != "xno" ; then
111 AC_DEFINE(USE_LIBIDN, 1, [Define to 1 if you want Libidn.])
113 AC_MSG_ERROR([You need Libidn to compile CryWrap])
116 dnl **********************
118 dnl **********************
121 AS_HELP_STRING([--disable-fork],[disable forking to background]),
122 [f_fork="$enableval"], [f_fork="yes"])
123 if test "x$f_fork" != "xno"; then
124 AC_DEFINE_UNQUOTED(CRYWRAP_OPTION_FORK, 1,
125 Define this to enable forking to background)
127 AC_DEFINE_UNQUOTED(CRYWRAP_OPTION_NOFORK, 1,
128 Define this to disable forking to background)
131 dnl **********************
133 dnl **********************