Wed, 20 May 2020 21:49:09 +0200
Report any online status change via websocket broadcast. When starting, load all in memory tables sorted. The websocket status on the web pages has it's own panel. Prepared the menu system for dynamic updates.
0 | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | ||
3 | AC_INIT(bmsd/bms.c) | |
4 | AM_CONFIG_HEADER(config.h) | |
257
62e294ab94f5
Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
248
diff
changeset
|
5 | SUBDIRS="bmsd doc script tools www" |
0 | 6 | AC_SUBST(SUBDIRS) |
7 | ||
8 | dnl General settings | |
9 | dnl After changeing the version number, run autoconf! | |
10 | PACKAGE="bms" | |
671
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
11 | VERSION="0.3.33" |
588 | 12 | COPYRIGHT="Copyright (C) 2016-2020 Michiel Broek, All Rights Reserved" |
13 | CYEARS="2016-2020" | |
0 | 14 | AC_SUBST(PACKAGE) |
15 | AC_SUBST(VERSION) | |
16 | AC_SUBST(COPYRIGHT) | |
17 | AC_SUBST(CYEARS) | |
5
36387e45a194
Added Makefile install commands
Michiel Broek <mbroek@mbse.eu>
parents:
2
diff
changeset
|
18 | AC_PREFIX_DEFAULT(/var/lib/bms) |
0 | 19 | AC_DEFINE_UNQUOTED(VERSION, "$VERSION") |
20 | AC_DEFINE_UNQUOTED(COPYRIGHT, "$COPYRIGHT") | |
21 | TARGET="$target" | |
22 | ||
23 | ||
24 | dnl Checks for programs. | |
25 | AC_PROG_CC | |
26 | AC_PROG_RANLIB | |
27 | dnl Try to find GNU install | |
28 | AC_CHECK_PROG(INSTALL, ginstall, ginstall) | |
29 | AC_CHECK_PROG(INSTALL, install, install) | |
30 | AC_CHECK_PROG(TAR, tar, tar) | |
31 | ||
32 | ||
33 | # | |
34 | # Additional commandline switches | |
35 | # | |
36 | ||
37 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) | |
38 | if test "$debugging" = "yes"; then | |
39 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
40 | else | |
41 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
42 | fi | |
43 | LIBS="$LIBS -lm" | |
44 | ||
45 | ||
46 | # | |
47 | # Libraries for bms | |
48 | # | |
49 | AC_CHECK_LIB(mosquitto,mosquitto_lib_init,result=yes,result=no) | |
50 | if test "$result" = "yes"; then | |
51 | LIBS="$LIBS -lmosquitto" | |
52 | AC_CHECK_HEADERS(mosquitto.h) | |
53 | else | |
54 | AC_MSG_ERROR(mosquitto not found) | |
55 | fi | |
56 | ||
57 | AC_CHECK_LIB(json-c,json_object_iter_init_default,result=yes,result=no) | |
58 | if test "$result" = "yes"; then | |
59 | LIBS="$LIBS -ljson-c" | |
60 | AC_CHECK_HEADERS(json-c/json.h) | |
61 | else | |
62 | AC_MSG_ERROR(json-c not found) | |
63 | fi | |
64 | ||
65 | AC_CHECK_LIB(mysqlclient,mysql_server_init,result=yes,result=no) | |
66 | if test "$result" = "yes"; then | |
67 | LIBS="$LIBS -lmysqlclient" | |
68 | AC_CHECK_HEADERS(mysql/mysql.h) | |
551
57cb71496a9a
Compile fix for Debian Buster.
Michiel Broek <mbroek@mbse.eu>
parents:
548
diff
changeset
|
69 | AC_CHECK_HEADERS(mariadb/mysql.h) |
0 | 70 | else |
71 | AC_MSG_ERROR(mysqlclient not found) | |
72 | fi | |
73 | ||
74 | AC_CHECK_LIB(xml2,xmlParseFile,result=yes,result=no) | |
75 | if test "$result" = "yes"; then | |
76 | LIBS="$LIBS -lxml2" | |
77 | CFLAGS="$CFLAGS $(xml2-config --cflags)" | |
78 | AC_CHECK_HEADERS(libxml/xmlmemory.h) | |
79 | else | |
80 | AC_MSG_ERROR(libxml2 not found) | |
81 | fi | |
82 | ||
83 | AC_CHECK_LIB(uuid,uuid_generate,result=yes,result=no) | |
84 | if test "$result" = "yes"; then | |
85 | LIBS="$LIBS $(pkg-config --libs uuid)" | |
86 | CFLAGS="$CFLAGS $(pkg-config --cflags uuid)" | |
87 | AC_CHECK_HEADERS(uuid/uuid.h) | |
88 | else | |
89 | AC_MSG_ERROR(libuuid not found) | |
90 | fi | |
91 | ||
671
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
92 | AC_CHECK_LIB(websockets,lws_client_connect,result=yes,result=no) |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
93 | if test "$result" = "yes"; then |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
94 | LIBS="$LIBS -lwebsockets" |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
95 | AC_CHECK_HEADERS(libwebsockets.h) |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
96 | else |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
97 | AC_MSG_ERROR(libwebsockets not found) |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
98 | fi |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
99 | |
4b54d6f79d25
Version 0.3.33 Added websockets framework. Added fermenter status messages to the websockets broadcast.
Michiel Broek <mbroek@mbse.eu>
parents:
662
diff
changeset
|
100 | |
0 | 101 | |
102 | dnl Checks for header files. | |
103 | AC_HEADER_STDC | |
104 | ||
105 | AC_SUBST(SDL_CFLAGS) | |
106 | AC_SUBST(SDL_LIBS) | |
107 | ||
108 | ||
109 | AC_OUTPUT( | |
110 | Makefile.global | |
2 | 111 | www/version.php |
0 | 112 | ) |
113 | ||
114 | AC_MSG_RESULT([ | |
115 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
116 | ||
117 | Configuration summary : | |
118 | ||
119 | Version : ............ ${VERSION} | |
120 | Main directory : ..... ${prefix} | |
121 | ||
122 | ||
123 | Now type 'make' and 'sudo make install' | |
124 | ]) | |
125 |