Andy Green | 3c97469 | 2010-11-08 17:04:09 +0000 | [diff] [blame] | 1 | # -*- Autoconf -*- |
| 2 | # Process this file with autoconf to produce a configure script. |
| 3 | |
| 4 | AC_PREREQ([2.66]) |
| 5 | AC_INIT(libwebsockets, 0.1, andy@warmcat.com) |
| 6 | AC_CONFIG_SRCDIR([test-server/test-server.c]) |
| 7 | AC_CONFIG_HEADERS([config.h]) |
| 8 | |
| 9 | AM_INIT_AUTOMAKE([-Wall -Werror foreign]) |
| 10 | LT_INIT(shared) |
| 11 | |
| 12 | # Checks for programs. |
| 13 | AC_PROG_CC |
| 14 | AC_PROG_INSTALL |
| 15 | AC_PROG_MAKE_SET |
| 16 | AC_CONFIG_MACRO_DIR([m4]) |
| 17 | |
| 18 | |
| 19 | AC_ARG_ENABLE(openssl, |
| 20 | [ --enable-openssl Enables https support and needs openssl libs], |
| 21 | [ openssl=yes |
| 22 | ]) |
| 23 | |
| 24 | if test "x$openssl" = "xyes" ; then |
| 25 | AC_CHECK_LIB([ssl], [SSL_library_init]) |
| 26 | CFLAGS="$CFLAGS -DLWS_OPENSSL_SUPPORT" |
| 27 | fi |
| 28 | |
| 29 | |
| 30 | |
| 31 | # Checks for header files. |
| 32 | AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h]) |
| 33 | |
| 34 | # Checks for typedefs, structures, and compiler characteristics. |
| 35 | AC_TYPE_SIZE_T |
| 36 | |
| 37 | # Checks for library functions. |
| 38 | AC_FUNC_FORK |
| 39 | AC_FUNC_MALLOC |
| 40 | AC_FUNC_REALLOC |
| 41 | AC_CHECK_FUNCS([bzero memset socket strerror]) |
| 42 | |
| 43 | AC_CONFIG_FILES([Makefile |
| 44 | lib/Makefile |
| 45 | test-server/Makefile]) |
| 46 | |
| 47 | AC_OUTPUT |