Sun, 13 Jul 2014 22:11:46 +0200
Was not added
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" | |
107
f2f201b7cb48
Updated dependencies, bumped to version 0.0.10
Michiel Broek <mbroek@mbse.eu>
parents:
79
diff
changeset
|
11 | VERSION="0.0.10" |
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 | 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 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
84 | |
0 | 85 | dnl Checks for header files. |
86 | AC_HEADER_STDC | |
87 | ||
88 | ||
89 | AC_SUBST(CXXFLAGS) | |
90 | ||
91 | AC_OUTPUT( | |
92 | Makefile.global | |
93 | ) | |
94 | ||
95 | AC_MSG_RESULT([ | |
96 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
97 | ||
98 | Configuration summary : | |
99 | ||
100 | Version : ............ ${VERSION} | |
101 | Main directory : ..... ${prefix} | |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
102 | WiringPi : ........... ${WIRINGPI} |
0 | 103 | |
104 | Now type 'make' and 'sudo make install' | |
105 | ]) | |
106 |