Mon, 23 Jun 2014 20:01:27 +0200
Small fix for LCD output
0 | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | ||
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
41
diff
changeset
|
3 | AC_INIT(thermometers/thermometers.c) |
0 | 4 | AM_CONFIG_HEADER(config.h) |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
41
diff
changeset
|
5 | SUBDIRS="dht11 rc433 thermferm thermometers" |
0 | 6 | AC_SUBST(SUBDIRS) |
7 | ||
8 | dnl General settings | |
9 | dnl After changeing the version number, run autoconf! | |
10 | PACKAGE="mbsePi-apps" | |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
41
diff
changeset
|
11 | VERSION="0.0.7" |
0 | 12 | COPYRIGHT="Copyright (C) 2014 Michiel Broek, All Rights Reserved" |
13 | CYEARS="2014" | |
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 | # | |
35 | AC_CHECK_LIB(mosquitto,mosquitto_lib_init,result=yes,result=no) | |
36 | if test "$result" = "yes"; then | |
51
a03b6dac5398
Removed library, bumped to version 0.0.7
Michiel Broek <mbroek@mbse.eu>
parents:
41
diff
changeset
|
37 | AC_CHECK_HEADERS(mosquitto.h,MOSQUITTO=Yes,MOSQUITTO=No) |
6 | 38 | else |
39 | AC_MSG_ERROR(libmosquitto not found) | |
40 | fi | |
41 | ||
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
42 | 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
|
43 | 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
|
44 | 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
|
45 | LIBS="$LIBS -lwiringPi -lwiringPiDev" |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
46 | 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
|
47 | 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
|
48 | |
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
|
49 | |
6 | 50 | # |
0 | 51 | # Additional commandline switches |
52 | # | |
53 | AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) | |
54 | if test "$experiment" = "yes"; then | |
55 | AC_DEFINE(USE_EXPERIMENT) | |
56 | fi | |
57 | ||
58 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) | |
59 | if test "$debugging" = "yes"; then | |
60 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
61 | else | |
62 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
63 | fi | |
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 | LIBXML2=No |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
67 | 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
|
68 | if test "$result" = "yes"; then |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
69 | LIBS="$LIBS -lxml2" |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
70 | CFLAGS="$CFLAGS $(xml2-config --cflags)" |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
71 | AC_CHECK_HEADERS(libxml/xmlmemory.h,LIBXML2=Yes,LIBXML2=No) |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
72 | fi |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
73 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
74 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
75 | |
0 | 76 | dnl Checks for header files. |
77 | AC_HEADER_STDC | |
78 | ||
79 | ||
80 | AC_SUBST(CXXFLAGS) | |
81 | ||
82 | AC_OUTPUT( | |
83 | Makefile.global | |
84 | ) | |
85 | ||
86 | AC_MSG_RESULT([ | |
87 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
88 | ||
89 | Configuration summary : | |
90 | ||
91 | Version : ............ ${VERSION} | |
92 | Main directory : ..... ${prefix} | |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
93 | WiringPi : ........... ${WIRINGPI} |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
94 | XML2: ................ ${LIBXML2} |
0 | 95 | |
96 | Now type 'make' and 'sudo make install' | |
97 | ]) | |
98 |