Sat, 05 Dec 2015 21:46:22 +0100
Switched to PID code from Arduino
0 | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | ||
407
ee8f851b4d93
Removed thermometers program and directory. Version 0.4.3
Michiel Broek <mbroek@mbse.eu>
parents:
397
diff
changeset
|
3 | AC_INIT(thermferm/thermferm.c) |
0 | 4 | AM_CONFIG_HEADER(config.h) |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
5 | SUBDIRS="dht11 rc433 thermferm brewco brewpanel" |
0 | 6 | AC_SUBST(SUBDIRS) |
7 | ||
8 | dnl General settings | |
9 | dnl After changeing the version number, run autoconf! | |
10 | PACKAGE="mbsePi-apps" | |
433 | 11 | VERSION="0.5.1" |
306
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
303
diff
changeset
|
12 | COPYRIGHT="Copyright (C) 2014-2015 Michiel Broek, All Rights Reserved" |
97602274eb58
Updated to add support for lights in a fermenter unit and a Power Supply status.
Michiel Broek <mbroek@mbse.eu>
parents:
303
diff
changeset
|
13 | CYEARS="2014-2015" |
0 | 14 | AC_SUBST(PACKAGE) |
15 | AC_SUBST(VERSION) | |
16 | AC_SUBST(COPYRIGHT) | |
17 | AC_SUBST(CYEARS) | |
18 | AC_PREFIX_DEFAULT(/usr/local) | |
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 | # | |
6 | 33 | # Libraries for mbsePi-apps |
34 | # | |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
35 | WIRINGPI=No |
16
f4cbe008da72
Version 0.0.2. Added LCD display using wiringPi library. The display is connected via a LCM1602 IIC board.
Michiel Broek <mbroek@mbse.eu>
parents:
13
diff
changeset
|
36 | AC_CHECK_LIB(wiringPi,wiringPiSetup,result=yes,result=no) |
f4cbe008da72
Version 0.0.2. Added LCD display using wiringPi library. The display is connected via a LCM1602 IIC board.
Michiel Broek <mbroek@mbse.eu>
parents:
13
diff
changeset
|
37 | if test "$result" = "yes"; then |
f4cbe008da72
Version 0.0.2. Added LCD display using wiringPi library. The display is connected via a LCM1602 IIC board.
Michiel Broek <mbroek@mbse.eu>
parents:
13
diff
changeset
|
38 | LIBS="$LIBS -lwiringPi -lwiringPiDev" |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
39 | AC_CHECK_HEADERS(wiringPi.h,WIRINGPI=Yes,WIRINGPI=No) |
16
f4cbe008da72
Version 0.0.2. Added LCD display using wiringPi library. The display is connected via a LCM1602 IIC board.
Michiel Broek <mbroek@mbse.eu>
parents:
13
diff
changeset
|
40 | fi |
f4cbe008da72
Version 0.0.2. Added LCD display using wiringPi library. The display is connected via a LCM1602 IIC board.
Michiel Broek <mbroek@mbse.eu>
parents:
13
diff
changeset
|
41 | |
6 | 42 | # |
0 | 43 | # Additional commandline switches |
44 | # | |
45 | AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) | |
46 | if test "$experiment" = "yes"; then | |
47 | AC_DEFINE(USE_EXPERIMENT) | |
48 | fi | |
49 | ||
283 | 50 | SIMULATOR=No |
259
b7c967359771
Added framework for a simulation of a fridge with heater to use as controlled fermentor
Michiel Broek <mbroek@mbse.eu>
parents:
250
diff
changeset
|
51 | AC_ARG_ENABLE(simulator, [ --enable-simulator Compile simulator code], [ simulator=$enableval ], [ simulator=no ]) |
b7c967359771
Added framework for a simulation of a fridge with heater to use as controlled fermentor
Michiel Broek <mbroek@mbse.eu>
parents:
250
diff
changeset
|
52 | if test "$simulator" = "yes"; then |
b7c967359771
Added framework for a simulation of a fridge with heater to use as controlled fermentor
Michiel Broek <mbroek@mbse.eu>
parents:
250
diff
changeset
|
53 | AC_DEFINE(USE_SIMULATOR) |
283 | 54 | SIMULATOR=Yes |
259
b7c967359771
Added framework for a simulation of a fridge with heater to use as controlled fermentor
Michiel Broek <mbroek@mbse.eu>
parents:
250
diff
changeset
|
55 | fi |
b7c967359771
Added framework for a simulation of a fridge with heater to use as controlled fermentor
Michiel Broek <mbroek@mbse.eu>
parents:
250
diff
changeset
|
56 | |
0 | 57 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) |
58 | if test "$debugging" = "yes"; then | |
59 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
60 | else | |
61 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
62 | fi | |
262
d0014ccec615
Simulation of fridge cold loss to the room added for testing.
Michiel Broek <mbroek@mbse.eu>
parents:
259
diff
changeset
|
63 | LIBS="$LIBS -lm" |
0 | 64 | |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
65 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
66 | AC_CHECK_LIB(xml2,xmlParseFile,result=yes,result=no) |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
67 | if test "$result" = "yes"; then |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
68 | LIBS="$LIBS -lxml2" |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
69 | CFLAGS="$CFLAGS $(xml2-config --cflags)" |
79 | 70 | AC_CHECK_HEADERS(libxml/xmlmemory.h) |
75
4b976601737d
Writes a basic xml configuration next to the plain ascii config file
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
71 | else |
4b976601737d
Writes a basic xml configuration next to the plain ascii config file
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
72 | AC_MSG_ERROR(libxml2 not found) |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
73 | fi |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
74 | |
79 | 75 | AC_CHECK_LIB(uuid,uuid_generate,result=yes,result=no) |
76 | if test "$result" = "yes"; then | |
77 | LIBS="$LIBS $(pkg-config --libs uuid)" | |
78 | CFLAGS="$CFLAGS $(pkg-config --cflags uuid)" | |
79 | AC_CHECK_HEADERS(uuid/uuid.h) | |
80 | else | |
81 | AC_MSG_ERROR(libuuid not found) | |
82 | fi | |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
83 | |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
84 | # Check for SDL |
410
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
85 | SDL_CFLAGS="" |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
86 | SDL_LIBS="" |
411
ae85e91dcc58
Added configure message about SDL presence.
Michiel Broek <mbroek@mbse.eu>
parents:
410
diff
changeset
|
87 | SDL="No" |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
88 | AC_MSG_CHECKING(SDL library) |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
89 | pkg-config --exists sdl |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
90 | if test "$?" = "0"; then |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
91 | AC_MSG_RESULT(yes) |
410
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
92 | AC_MSG_CHECKING(sdl library v1.2.0 or newer) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
93 | pkg-config --atleast-version=1.2.0 sdl |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
94 | if test "$?" = "0"; then |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
95 | AC_MSG_RESULT(found) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
96 | else |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
97 | AC_MSG_ERROR(not found) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
98 | fi |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
99 | SDL_CFLAGS="$(pkg-config --cflags sdl)" |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
100 | SDL_LIBS="$(pkg-config --libs sdl)" |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
101 | AC_CHECK_HEADERS(SDL/SDL.h) |
411
ae85e91dcc58
Added configure message about SDL presence.
Michiel Broek <mbroek@mbse.eu>
parents:
410
diff
changeset
|
102 | SDL="Yes" |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
103 | else |
410
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
104 | AC_MSG_RESULT(no) |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
105 | fi |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
106 | |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
107 | # Check for SDL_ttf |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
108 | AC_MSG_CHECKING(SDL_ttf library) |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
109 | pkg-config --exists SDL_ttf |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
110 | if test "$?" = "0"; then |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
111 | AC_MSG_RESULT(yes) |
410
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
112 | AC_MSG_CHECKING(sdl library v2.0.0 or newer) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
113 | pkg-config --atleast-version=2.0.0 SDL_ttf |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
114 | if test "$?" = "0"; then |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
115 | AC_MSG_RESULT(found) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
116 | else |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
117 | AC_MSG_ERROR(not found) |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
118 | fi |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
119 | # Override flags |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
120 | SDL_CFLAGS="$(pkg-config --cflags SDL_ttf)" |
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
121 | SDL_LIBS="$(pkg-config --libs SDL_ttf)" |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
122 | else |
410
e3f8a51b566a
Fixed compiling on systems without SDL libraries, and they don't need tha brewpanel program.
Michiel Broek <mbroek@mbse.eu>
parents:
409
diff
changeset
|
123 | AC_MSG_RESULT(no) |
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
124 | fi |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
125 | |
0 | 126 | dnl Checks for header files. |
127 | AC_HEADER_STDC | |
128 | ||
409
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
129 | AC_SUBST(SDL_CFLAGS) |
cdf68044adaf
Added a new brewpanel program that runs on an SDL/X screen. It will be an emulator for the hardware panels. Development version 0.5.0
Michiel Broek <mbroek@mbse.eu>
parents:
407
diff
changeset
|
130 | AC_SUBST(SDL_LIBS) |
0 | 131 | |
132 | ||
133 | AC_OUTPUT( | |
134 | Makefile.global | |
135 | ) | |
136 | ||
137 | AC_MSG_RESULT([ | |
138 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
139 | ||
140 | Configuration summary : | |
141 | ||
142 | Version : ............ ${VERSION} | |
143 | Main directory : ..... ${prefix} | |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
144 | WiringPi : ........... ${WIRINGPI} |
411
ae85e91dcc58
Added configure message about SDL presence.
Michiel Broek <mbroek@mbse.eu>
parents:
410
diff
changeset
|
145 | SDL library : ........ ${SDL} |
283 | 146 | Simulator : .......... ${SIMULATOR} |
0 | 147 | |
148 | Now type 'make' and 'sudo make install' | |
149 | ]) | |
150 |