Sat, 19 Aug 2023 15:11:35 +0200
De iSpindel plato berekening is in het webscript gezet omdat er dan met meer cijfers achter de komman gerekend wordt. De uitkomst verschilt 0.25 plato! De calibratie is nu dus extern.
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" | |
844
a6ee7b5b036b
Version 0.3.43 bmsd if there is no ssid received from a node message then send '' to the mon_nodes table in the database instead of (null).
Michiel Broek <mbroek@mbse.eu>
parents:
843
diff
changeset
|
11 | VERSION="0.3.43" |
843
29e7223e37ae
Version 0.3.42 added yeast_lo and yeast_hi fields to the iSpindel records and structures.
Michiel Broek <mbroek@mbse.eu>
parents:
799
diff
changeset
|
12 | COPYRIGHT="Copyright (C) 2016-2023 Michiel Broek, All Rights Reserved" |
29e7223e37ae
Version 0.3.42 added yeast_lo and yeast_hi fields to the iSpindel records and structures.
Michiel Broek <mbroek@mbse.eu>
parents:
799
diff
changeset
|
13 | CYEARS="2016-2023" |
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 | ||
846
d8ace3fa9ac7
Adjusted test for websockets for the 4.x.x releases.
Michiel Broek <mbroek@mbse.eu>
parents:
844
diff
changeset
|
92 | |
d8ace3fa9ac7
Adjusted test for websockets for the 4.x.x releases.
Michiel Broek <mbroek@mbse.eu>
parents:
844
diff
changeset
|
93 | AC_CHECK_LIB(websockets,lws_create_context,result=yes,result=no) |
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
|
94 | 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
|
95 | 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
|
96 | 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
|
97 | 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
|
98 | 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
|
99 | 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
|
100 | |
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
|
101 | |
0 | 102 | |
103 | dnl Checks for header files. | |
104 | AC_HEADER_STDC | |
105 | ||
106 | AC_SUBST(SDL_CFLAGS) | |
107 | AC_SUBST(SDL_LIBS) | |
108 | ||
109 | ||
110 | AC_OUTPUT( | |
111 | Makefile.global | |
2 | 112 | www/version.php |
0 | 113 | ) |
114 | ||
115 | AC_MSG_RESULT([ | |
116 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
117 | ||
118 | Configuration summary : | |
119 | ||
120 | Version : ............ ${VERSION} | |
121 | Main directory : ..... ${prefix} | |
122 | ||
123 | ||
124 | Now type 'make' and 'sudo make install' | |
125 | ]) | |
126 |