configure

changeset 675
825210ba2707
parent 673
0c084b876a2c
child 691
cfe13185fd02
--- a/configure	Thu Apr 11 15:58:49 2024 +0200
+++ b/configure	Sat Apr 13 16:50:26 2024 +0200
@@ -2033,7 +2033,7 @@
 
 ac_config_headers="$ac_config_headers config.h"
 
-SUBDIRS="thermferm brewpanel tools"
+SUBDIRS="thermferm brewpanel tools www"
 
 
 PACKAGE="mbsePi-apps"
@@ -3643,6 +3643,67 @@
   as_fn_error $? "json-c not found" "$LINENO" 5
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for lws_create_context in -lwebsockets" >&5
+$as_echo_n "checking for lws_create_context in -lwebsockets... " >&6; }
+if ${ac_cv_lib_websockets_lws_create_context+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwebsockets  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lws_create_context ();
+int
+main ()
+{
+return lws_create_context ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_websockets_lws_create_context=yes
+else
+  ac_cv_lib_websockets_lws_create_context=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_websockets_lws_create_context" >&5
+$as_echo "$ac_cv_lib_websockets_lws_create_context" >&6; }
+if test "x$ac_cv_lib_websockets_lws_create_context" = xyes; then :
+  result=yes
+else
+  result=no
+fi
+
+if test "$result" = "yes"; then
+  LIBS="$LIBS -lwebsockets"
+  for ac_header in libwebsockets.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "libwebsockets.h" "ac_cv_header_libwebsockets_h" "$ac_includes_default"
+if test "x$ac_cv_header_libwebsockets_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBWEBSOCKETS_H 1
+_ACEOF
+
+fi
+
+done
+
+else
+  as_fn_error $? "libwebsockets not found" "$LINENO" 5
+fi
+
+
 #
 # Additional commandline switches
 #
@@ -3993,7 +4054,7 @@
 
 
 
-ac_config_files="$ac_config_files Makefile.global"
+ac_config_files="$ac_config_files Makefile.global www/version.php"
 
 cat >confcache <<\_ACEOF
 # This file is a shell script that caches the results of configure
@@ -4686,6 +4747,7 @@
   case $ac_config_target in
     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
     "Makefile.global") CONFIG_FILES="$CONFIG_FILES Makefile.global" ;;
+    "www/version.php") CONFIG_FILES="$CONFIG_FILES www/version.php" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac

mercurial