Started redoing CMake support based on the up to date repos
[profile/ivi/libwebsockets.git] / configure.ac
index 3bf09ae..175ea87 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.61])
-AC_INIT(libwebsockets, 1.0, andy@warmcat.com)
+AC_INIT(libwebsockets, 1.1, andy@warmcat.com, libwebsockets, http://libwebsockets.org)
 AC_CONFIG_SRCDIR([test-server/test-server.c])
 AC_CONFIG_HEADERS([config.h])
 
@@ -18,6 +18,10 @@ AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_CONFIG_MACRO_DIR([m4])
 
+applyhash='CFLAGS+= -DLWS_LIBRARY_VERSION=\"$(PACKAGE_VERSION)\" -DLWS_BUILD_HASH=\"${shell git log -n 1 --pretty=%h}\"'
+AC_SUBST([applyhash])
+AM_SUBST_NOTMAKE([applyhash])
+
 #
 #
 #
@@ -34,20 +38,6 @@ fi
 #
 #
 #
-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
-
-#
-#
-#
 AC_ARG_ENABLE(libcrypto,
  [  --enable-libcrypto  Use libcrypto MD5 and SHA1 implementations],
  [ libcrypto=yes
@@ -59,19 +49,6 @@ LDFLAGS="$LDFLAGS -lcrypto"
 fi
 AM_CONDITIONAL(LIBCRYPTO, test x$libcrypto = xyes)
 
-
-#
-#
-#
-AC_ARG_ENABLE(x-google-mux,
- [  --enable-x-google-mux  Build experimental x-google-mux],
- [ x_google_mux=yes
- ])
-if test "x$x_google_mux" = "xyes" ; then
-CFLAGS="$CFLAGS -DLWS_EXT_GOOGLE_MUX"
-fi
-AM_CONDITIONAL(EXT_GOOGLE_MUX, test x$x_google_mux = xyes)
-
 # 
 #
 #
@@ -95,6 +72,59 @@ CFLAGS="$CFLAGS -DLWS_NO_CLIENT"
 fi
 AM_CONDITIONAL(NO_CLIENT, test x$no_client = xyes)
 
+# 
+#
+#
+AC_ARG_WITH(server,
+ [  --without-server  dont build the client part of the library ],
+ [ no_server=yes
+ ])
+
+if test "x$no_server" = "xyes" ; then                                             
+CFLAGS="$CFLAGS -DLWS_NO_SERVER"                                          
+fi
+AM_CONDITIONAL(NO_SERVER, test x$no_server = xyes)
+
+# 
+#
+#
+AC_ARG_WITH(extensions,
+ [  --without-extensions  dont build any stuff related to extensions ],
+ [ no_extensions=yes
+ ])
+
+if test "x$no_extensions" = "xyes" ; then                                             
+CFLAGS="$CFLAGS -DLWS_NO_EXTENSIONS"                                          
+fi
+AM_CONDITIONAL(NO_EXTENSIONS, test x$no_extensions = xyes)
+
+# 
+#
+#
+AC_ARG_WITH(latency,
+ [  --with-latency  Build latency measuring code into the library ],
+ [ latency=yes
+ ])
+
+if test "x$latency" = "xyes" ; then                                             
+CFLAGS="$CFLAGS -DLWS_LATENCY"                                          
+fi
+AM_CONDITIONAL(LATENCY, test x$latency = xyes)
+
+# 
+#
+#
+AC_ARG_WITH(daemonize,
+ [  --without-daemonize  dont build the daemonization api ],
+ [ no_daemonize=yes
+ ])
+
+if test "x$no_daemonize" = "xyes" ; then                                             
+CFLAGS="$CFLAGS -DLWS_NO_DAEMONIZE"                                          
+fi
+AM_CONDITIONAL(NO_DAEMONIZE, test x$no_daemonize = xyes)
+
+#                                                                               
 #                                                                               
 #                                                                               
 AC_ARG_ENABLE(mingw,