2010-11-08 17:04:09 +00:00
|
|
|
# -*- Autoconf -*-
|
|
|
|
# Process this file with autoconf to produce a configure script.
|
|
|
|
|
|
|
|
AC_PREREQ([2.66])
|
2011-01-27 06:36:39 +00:00
|
|
|
AC_INIT(libwebsockets, 0.3, andy@warmcat.com)
|
2010-11-08 17:04:09 +00:00
|
|
|
AC_CONFIG_SRCDIR([test-server/test-server.c])
|
|
|
|
AC_CONFIG_HEADERS([config.h])
|
|
|
|
|
|
|
|
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
|
|
|
|
LT_INIT(shared)
|
|
|
|
|
2010-12-18 15:13:50 +00:00
|
|
|
#AX_PTHREAD
|
|
|
|
|
2010-11-08 17:04:09 +00:00
|
|
|
# Checks for programs.
|
|
|
|
AC_PROG_CC
|
|
|
|
AC_PROG_INSTALL
|
|
|
|
AC_PROG_MAKE_SET
|
|
|
|
AC_CONFIG_MACRO_DIR([m4])
|
|
|
|
|
2011-01-27 06:26:52 +00:00
|
|
|
|
2011-01-23 17:47:08 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2010-11-08 17:04:09 +00:00
|
|
|
AC_ARG_ENABLE(openssl,
|
|
|
|
[ --enable-openssl Enables https support and needs openssl libs],
|
|
|
|
[ openssl=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "x$openssl" = "xyes" ; then
|
|
|
|
AC_CHECK_LIB([ssl], [SSL_library_init])
|
|
|
|
CFLAGS="$CFLAGS -DLWS_OPENSSL_SUPPORT"
|
|
|
|
fi
|
|
|
|
|
2011-01-23 17:47:08 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
2011-01-20 10:23:50 +00:00
|
|
|
AC_ARG_ENABLE(nofork,
|
|
|
|
[ --enable-nofork Disables fork-related options],
|
|
|
|
[ nofork=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "x$nofork" = "xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -DLWS_NO_FORK"
|
|
|
|
else
|
|
|
|
AC_FUNC_FORK
|
|
|
|
fi
|
|
|
|
|
2011-01-23 17:47:08 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
AC_ARG_ENABLE(libcrypto,
|
2011-01-27 06:26:52 +00:00
|
|
|
[ --enable-libcrypto Use libcrypto MD5 and SHA1 implementations],
|
2011-01-23 17:47:08 +00:00
|
|
|
[ libcrypto=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
if test "x$libcrypto" = "xyes" ; then
|
|
|
|
CFLAGS="$CFLAGS -DLWS_LIBCRYPTO"
|
|
|
|
LDFLAGS="$LDFLAGS -lcrypto"
|
|
|
|
fi
|
|
|
|
AM_CONDITIONAL(LIBCRYPTO, test x$libcrypto = xyes)
|
|
|
|
|
2010-11-08 17:04:09 +00:00
|
|
|
|
2011-01-27 06:26:52 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
AC_ARG_WITH([client-cert-dir],
|
|
|
|
[AS_HELP_STRING([--with-client-cert-dir],[directory containing client certs, defaults to /etc/pki/tls/certs/])],
|
|
|
|
[clientcertdir=$withval],
|
|
|
|
[clientcertdir=/etc/pki/tls/certs/]
|
|
|
|
)
|
|
|
|
AC_SUBST([clientcertdir])
|
|
|
|
|
|
|
|
AC_SUBST([CFLAGS])
|
|
|
|
|
|
|
|
|
2011-01-27 20:06:03 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
#
|
|
|
|
AC_ARG_ENABLE(noping,
|
|
|
|
[ --enable-noping Do not build ping test app, which has some unixy stuff in sources],
|
|
|
|
[ noping=yes
|
|
|
|
])
|
|
|
|
|
|
|
|
AM_CONDITIONAL(NOPING, test x$noping = xyes)
|
|
|
|
|
|
|
|
|
2010-11-08 17:04:09 +00:00
|
|
|
|
|
|
|
# Checks for header files.
|
2011-03-06 13:37:10 +00:00
|
|
|
AC_CHECK_HEADERS([zlib.h fcntl.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
|
2010-11-08 17:04:09 +00:00
|
|
|
|
|
|
|
# Checks for typedefs, structures, and compiler characteristics.
|
|
|
|
AC_TYPE_SIZE_T
|
|
|
|
|
|
|
|
# Checks for library functions.
|
2011-01-20 10:23:50 +00:00
|
|
|
|
2010-11-08 17:04:09 +00:00
|
|
|
AC_FUNC_MALLOC
|
|
|
|
AC_FUNC_REALLOC
|
|
|
|
AC_CHECK_FUNCS([bzero memset socket strerror])
|
|
|
|
|
|
|
|
AC_CONFIG_FILES([Makefile
|
|
|
|
lib/Makefile
|
|
|
|
test-server/Makefile])
|
|
|
|
|
|
|
|
AC_OUTPUT
|