add-enable-nofork-config-option.patch
[profile/ivi/libwebsockets.git] / configure.ac
1 #                                               -*- Autoconf -*-
2 # Process this file with autoconf to produce a configure script.
3
4 AC_PREREQ([2.66])
5 AC_INIT(libwebsockets, 0.2, 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 #AX_PTHREAD
13
14 # Checks for programs.
15 AC_PROG_CC
16 AC_PROG_INSTALL
17 AC_PROG_MAKE_SET
18 AC_CONFIG_MACRO_DIR([m4])
19
20
21 AC_ARG_ENABLE(openssl,
22  [  --enable-openssl  Enables https support and needs openssl libs],
23  [ openssl=yes
24  ])
25
26 if test "x$openssl" = "xyes" ; then
27 AC_CHECK_LIB([ssl], [SSL_library_init])
28 CFLAGS="$CFLAGS -DLWS_OPENSSL_SUPPORT"
29 fi
30
31 AC_ARG_ENABLE(nofork,
32  [  --enable-nofork  Disables fork-related options],
33  [ nofork=yes
34  ])
35
36 if test "x$nofork" = "xyes" ; then
37 CFLAGS="$CFLAGS -DLWS_NO_FORK"
38 else
39 AC_FUNC_FORK
40 fi
41
42
43
44 # Checks for header files.
45 AC_CHECK_HEADERS([fcntl.h netinet/in.h stdlib.h string.h sys/socket.h unistd.h])
46
47 # Checks for typedefs, structures, and compiler characteristics.
48 AC_TYPE_SIZE_T
49
50 # Checks for library functions.
51
52 AC_FUNC_MALLOC
53 AC_FUNC_REALLOC
54 AC_CHECK_FUNCS([bzero memset socket strerror])
55
56 AC_CONFIG_FILES([Makefile
57                  lib/Makefile
58                  test-server/Makefile])
59
60 AC_OUTPUT