-
Notifications
You must be signed in to change notification settings - Fork 64
/
configure.ac
39 lines (27 loc) · 911 Bytes
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
AC_INIT(lolware_dht, [0.1])
AM_INIT_AUTOMAKE
AM_CONFIG_HEADER(config.h)
AM_SILENT_RULES([yes])
AC_LANG_C
AC_PROG_CC
AC_PROG_MAKE_SET
AC_ARG_ENABLE(development, [ --enable-development enable developer features [default=no]],
[CFLAGS="-Wall -O0 -g" ])
AC_ARG_ENABLE(secure, [ --enable-secure turn on security features [default=yes]])
AS_IF([test "x$enable_secure" != "xno"], [
if test "x$enable_development" = "xyes" ; then
AC_MSG_WARN("Developer on: Turning off secure")
else
CFLAGS="-Wall -fstack-protector -D_FORTIFY_SOURCE=2 -O2"
fi
])
AC_HEADER_STDC
AC_CHECK_HEADER(wiringPi.h,wiringpi_h_found=yes)
AS_IF([test x$wiringpi_h_found != "xyes"],
AC_CHECK_HEADER([/usr/local/include/wiringPi.h],
CFLAGS="${CFLAGS} -I/usr/local/include",
AC_MSG_ERROR(Fail to find wiringPi.h)
)
)
AC_CHECK_LIB(wiringPi, wiringPiSetup,,AC_MSG_ERROR(Fail to find wiringPi library))
AC_OUTPUT(Makefile)