Tue, 22 Apr 2014 23:28:17 +0200
Can connect and disconnect
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) | |
5 | SUBDIRS="thermometers" | |
6 | AC_SUBST(SUBDIRS) | |
7 | ||
8 | dnl General settings | |
9 | dnl After changeing the version number, run autoconf! | |
10 | PACKAGE="mbsePi-apps" | |
11 | VERSION="0.0.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 | ||
65 | AC_OUTPUT( | |
66 | Makefile.global | |
67 | ) | |
68 | ||
69 | AC_MSG_RESULT([ | |
70 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
71 | ||
72 | Configuration summary : | |
73 | ||
74 | Version : ............ ${VERSION} | |
75 | Main directory : ..... ${prefix} | |
76 | ||
77 | Now type 'make' and 'sudo make install' | |
78 | ]) | |
79 |