RPi Locator and Display Services
configure.ac
Go to the documentation of this file.
1 dnl Process this file with autoconf to produce a configure script.
2 AC_PREREQ([2.69])
3 AC_INIT([skn_rpi-locator-service], [0.6.1], [James Scott Jr. <skoona@gmail.com>],
4  [skn_rpi-locator-service], [https://github.com/skoona/skn_rpi-display-services])
5 
6 # Put autotools auxiliary files in subdirectories to reduce clutter:
7 AC_CONFIG_AUX_DIR([build-aux])
8 AC_CONFIG_MACRO_DIR([m4])
9 
10 AM_INIT_AUTOMAKE([foreign])
11 AM_SILENT_RULES([yes])
12 AM_MAINTAINER_MODE([enable])
13 
14 dnl Standard C constructs
15 AC_GNU_SOURCE
16 AC_HEADER_STDC
17 AC_PROG_CC
18 AC_PROG_INSTALL
19 AC_PROG_MAKE_SET
20 
21 # stricter options -ansi -pedantic
22 CFLAGS='-g -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -Winline -pipe -I/usr/include -I/usr/local/include '
23 AC_SUBST(CFLAGS)
24 
25 AC_CHECK_LIB([pthread],[pthread_create],
26  AC_MSG_RESULT([pthread library is ready to use]),
27  AC_MSG_FAILURE([Unable to identify pthread_create method in pthread or pthread not available.], [1])
28 )
29 
30 AC_CHECK_LIB([wiringPi],[wiringPiSetup],
31  AC_MSG_RESULT([Building WIRINGPI based services and clients.])
32  AM_CONDITIONAL([WIRINGPI], [test "xY" = "xY"]),
33  AC_MSG_RESULT([Building NON-WIRINGPI services and clients.])
34  AM_CONDITIONAL([WIRINGPI], [test "xY" = "xX"]),
35  [-lwiringPiDev -lrt -lm -lpthread]
36 )
37 
38 PKG_CHECK_MODULES([GTKDS], [gssdp-1.0 >= 0.12],
39  AC_MSG_RESULT([Building GSSDP services and clients.])
40  AM_CONDITIONAL([DOGSSDP], [test "xY" = "xY"]),
41  AC_MSG_RESULT([Skipping GSSDP services and clients GSSDP not found.])
42  AM_CONDITIONAL([DOGSSDP], [test "xY" = "xX"])
43 )
44 
45 PKG_CHECK_MODULES([GTK], [gtk+-3.0 >= 3.10],
46  AC_MSG_RESULT([Building GTK+-3.0 services and clients.])
47  AM_CONDITIONAL([DOGTK], [$DOGSSDP]),
48  AC_MSG_RESULT([Skipping GTK+-3.0 services and clients GTK+ not found.])
49  AM_CONDITIONAL([DOGTK], [test "xY" = "xX"])
50 )
51 
52 # AC_CONFIG_HEADERS([config.h])
53 AC_CONFIG_SRCDIR([src/skn_rpi_helpers.c])
54 AC_CONFIG_FILES([Makefile src/Makefile gtkDS/Makefile cmdDS/Makefile cmdDC/Makefile gssdpDC/Makefile])
55 
56 AC_OUTPUT
57