Tue, 22 Apr 2014 16:34:02 +0200
Initial set of files
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 | # | |
34 | # Additional commandline switches | |
35 | # | |
36 | AC_ARG_ENABLE(experiment, [ --enable-experiment Compile experimental code], [ experiment=$enableval ], [ experiment=no ]) | |
37 | if test "$experiment" = "yes"; then | |
38 | AC_DEFINE(USE_EXPERIMENT) | |
39 | fi | |
40 | ||
41 | AC_ARG_ENABLE(debugging, [ --enable-debugging Compile for debugging], [ debugging=$enableval ], [ debugging=no ]) | |
42 | if test "$debugging" = "yes"; then | |
43 | CFLAGS="-O -g -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
44 | else | |
45 | CFLAGS="-g -O2 -fomit-frame-pointer -fno-strict-aliasing -Wall -Wshadow -Wwrite-strings -Wstrict-prototypes -Winline" | |
46 | fi | |
47 | ||
48 | dnl Checks for header files. | |
49 | AC_HEADER_STDC | |
50 | ||
51 | ||
52 | AC_SUBST(CXXFLAGS) | |
53 | ||
54 | ||
55 | AC_OUTPUT( | |
56 | Makefile.global | |
57 | ) | |
58 | ||
59 | AC_MSG_RESULT([ | |
60 | -=-=-=-=-=-=-=-=-=-= Configuration Complete =-=-=-=-=-=-=-=-=-=- | |
61 | ||
62 | Configuration summary : | |
63 | ||
64 | Version : ............ ${VERSION} | |
65 | Main directory : ..... ${prefix} | |
66 | ||
67 | Now type 'make' and 'sudo make install' | |
68 | ]) | |
69 |