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
|
# 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.53)
AC_INIT([crywrap], [0.2-stable], [algernon@bonehunter.rulez.org])
AC_CONFIG_SRCDIR(src/crywrap.c)
AC_CONFIG_HEADERS(system.h)
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
BHM4_SOCKADDR_STORAGE_CHECK
dnl **********************
dnl * Library functions
dnl **********************
AC_FUNC_FORK
AC_TYPE_SIGNAL
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 * BH compat suite
dnl **********************
BHCOMPAT_CHECK
dnl **********************
dnl * Rest
dnl **********************
AM_PATH_LIBGNUTLS(1.0.0, [],
[AC_MSG_ERROR(You need GnuTLS to compile CryWrap)])
LIBGNUTLS_CFLAGS=`echo ${LIBGNUTLS_CFLAGS} | sed -e "s,-I/usr/include,,g"`
LIBGNUTLS_LIBS=`echo ${LIBGNUTLS_LIBS} | sed -e "s,-L/usr/lib,,g"`
AC_CHECK_HEADER(idna.h,
AC_CHECK_LIB(idn, stringprep_check_version,
[libidn=yes; AC_SUBST(SHISHI_LIBS, -lidn)], libidn=no))
if test "$libidn" != "no" ; 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,
AC_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
lib/Makefile
lib/compat/Makefile
m4/Makefile
m4/bh-m4/Makefile
src/Makefile
utils/Makefile
])
AC_OUTPUT
|