Tue, 05 Aug 2014 15:45:23 +0200
Updated dependencies
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" | |
142
4f21ffc16cd4
Bumped to version 0.0.11. Added owserver C api.
Michiel Broek <mbroek@mbse.eu>
parents:
107
diff
changeset
|
11 | VERSION="0.0.11" |
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 | # | |
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 | ||
50 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) | |
51 | if test "$debugging" = "yes"; then | |
52 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
53 | else | |
54 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
55 | fi | |
56 | ||
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
57 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
58 | 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
|
59 | if test "$result" = "yes"; then |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
60 | LIBS="$LIBS -lxml2" |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
61 | CFLAGS="$CFLAGS $(xml2-config --cflags)" |
79 | 62 | 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
|
63 | else |
4b976601737d
Writes a basic xml configuration next to the plain ascii config file
Michiel Broek <mbroek@mbse.eu>
parents:
57
diff
changeset
|
64 | AC_MSG_ERROR(libxml2 not found) |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
65 | fi |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
66 | |
79 | 67 | AC_CHECK_LIB(uuid,uuid_generate,result=yes,result=no) |
68 | if test "$result" = "yes"; then | |
69 | LIBS="$LIBS $(pkg-config --libs uuid)" | |
70 | CFLAGS="$CFLAGS $(pkg-config --cflags uuid)" | |
71 | AC_CHECK_HEADERS(uuid/uuid.h) | |
72 | else | |
73 | AC_MSG_ERROR(libuuid not found) | |
74 | fi | |
57
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
75 | |
a76dc0db592c
Bumped version, added libxml2 tests to configure
Michiel Broek <mbroek@mbse.eu>
parents:
51
diff
changeset
|
76 | |
0 | 77 | dnl Checks for header files. |
78 | AC_HEADER_STDC | |
79 | ||
80 | ||
81 | AC_SUBST(CXXFLAGS) | |
82 | ||
83 | AC_OUTPUT( | |
84 | Makefile.global | |
85 | ) | |
86 | ||
87 | AC_MSG_RESULT([ | |
88 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
89 | ||
90 | Configuration summary : | |
91 | ||
92 | Version : ............ ${VERSION} | |
93 | Main directory : ..... ${prefix} | |
17
b802305046dc
Tests for wiringPi are now not fatal
Michiel Broek <mbroek@mbse.eu>
parents:
16
diff
changeset
|
94 | WiringPi : ........... ${WIRINGPI} |
0 | 95 | |
96 | Now type 'make' and 'sudo make install' | |
97 | ]) | |
98 |