Sat, 26 Apr 2014 22:53:10 +0200
Version 0.0.1, changed data topics to /raw tree
0 | 1 | dnl Process this file with autoconf to produce a configure script. |
2 | ||
3 | AC_INIT(thermometers/main.c) | |
4 | AM_CONFIG_HEADER(config.h) | |
7 | 5 | SUBDIRS="lib thermometers" |
0 | 6 | AC_SUBST(SUBDIRS) |
7 | ||
8 | dnl General settings | |
9 | dnl After changeing the version number, run autoconf! | |
10 | PACKAGE="mbsePi-apps" | |
13
7f8432413321
Version 0.0.1, changed data topics to /raw tree
Michiel Broek <mbroek@mbse.eu>
parents:
7
diff
changeset
|
11 | VERSION="0.0.1" |
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 | dnl AC_PROG_MAKE_SET | |
31 | AC_CHECK_PROG(TAR, tar, tar) | |
32 | ||
33 | # | |
6 | 34 | # Libraries for mbsePi-apps |
35 | # | |
36 | AC_CHECK_LIB(mosquitto,mosquitto_lib_init,result=yes,result=no) | |
37 | if test "$result" = "yes"; then | |
38 | LIBS="$LIBS -lmosquitto" | |
39 | else | |
40 | AC_MSG_ERROR(libmosquitto not found) | |
41 | fi | |
42 | ||
43 | # | |
0 | 44 | # Additional commandline switches |
45 | # | |
46 | AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) | |
47 | if test "$experiment" = "yes"; then | |
48 | AC_DEFINE(USE_EXPERIMENT) | |
49 | fi | |
50 | ||
51 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) | |
52 | if test "$debugging" = "yes"; then | |
53 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
54 | else | |
55 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
56 | fi | |
57 | ||
58 | dnl Checks for header files. | |
59 | AC_HEADER_STDC | |
60 | ||
61 | ||
62 | AC_SUBST(CXXFLAGS) | |
63 | ||
64 | AC_OUTPUT( | |
65 | Makefile.global | |
66 | ) | |
67 | ||
68 | AC_MSG_RESULT([ | |
69 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
70 | ||
71 | Configuration summary : | |
72 | ||
73 | Version : ............ ${VERSION} | |
74 | Main directory : ..... ${prefix} | |
75 | ||
76 | Now type 'make' and 'sudo make install' | |
77 | ]) | |
78 |