2 # Process this file with autoconf to produce a configure script.
5 AC_INIT(libwebsockets, 0.3, andy@warmcat.com)
6 AC_CONFIG_SRCDIR([test-server/test-server.c])
7 AC_CONFIG_HEADERS([config.h])
9 AM_INIT_AUTOMAKE([-Wall -Werror foreign])
14 # Checks for programs.
18 AC_CONFIG_MACRO_DIR([m4])
24 AC_ARG_ENABLE(openssl,
25 [ --enable-openssl Enables https support and needs openssl libs],
29 if test "x$openssl" = "xyes" ; then
30 AC_CHECK_LIB([ssl], [SSL_library_init])
31 CFLAGS="$CFLAGS -DLWS_OPENSSL_SUPPORT"
38 [ --enable-nofork Disables fork-related options],
42 if test "x$nofork" = "xyes" ; then
43 CFLAGS="$CFLAGS -DLWS_NO_FORK"
51 AC_ARG_ENABLE(libcrypto,
52 [ --enable-libcrypto Use libcrypto MD5 and SHA1 implementations],
56 if test "x$libcrypto" = "xyes" ; then
57 CFLAGS="$CFLAGS -DLWS_LIBCRYPTO"
58 LDFLAGS="$LDFLAGS -lcrypto"
60 AM_CONDITIONAL(LIBCRYPTO, test x$libcrypto = xyes)
66 AC_ARG_ENABLE(x-google-mux,
67 [ --enable-x-google-mux Build experimental x-google-mux],
70 if test "x$x_google_mux" = "xyes" ; then
71 CFLAGS="$CFLAGS -DLWS_EXT_GOOGLE_MUX"
73 AM_CONDITIONAL(EXT_GOOGLE_MUX, test x$x_google_mux = xyes)
79 AC_ARG_WITH([client-cert-dir],
80 [AS_HELP_STRING([--with-client-cert-dir],[directory containing client certs, defaults to /etc/pki/tls/certs/])],
81 [clientcertdir=$withval],
82 [clientcertdir=/etc/pki/tls/certs/]
84 AC_SUBST([clientcertdir])
93 [ --enable-noping Do not build ping test app, which has some unixy stuff in sources],
97 AM_CONDITIONAL(NOPING, test x$noping = xyes)
101 # Checks for header files.
102 AC_CHECK_HEADERS([zlib.h fcntl.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
104 # Checks for typedefs, structures, and compiler characteristics.
107 # Checks for library functions.
111 AC_CHECK_FUNCS([bzero memset socket strerror])
113 AC_CONFIG_FILES([Makefile
115 test-server/Makefile])