forked from CESARBR/knot-network-nrf24
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure.ac
72 lines (54 loc) · 1.53 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
AC_PREREQ(2.60)
AC_INIT(nrfd, 0.0)
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([subdir-objects foreign color-tests silent-rules])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AM_MAINTAINER_MODE
AC_PREFIX_DEFAULT(/usr/local)
PKG_PROG_PKG_CONFIG
COMPILER_WARNING_CFLAGS
COMPILER_BUILD_CFLAGS
AC_LANG_C
AC_PROG_CC
AC_PROG_CC_PIE
AC_PROG_INSTALL
AC_PROG_MKDIR_P
AC_PROG_LN_S
LT_PREREQ(2.2)
LT_INIT([disable-static])
PKG_CHECK_MODULES(ELL, ell,
[AC_DEFINE([HAVE_ELL],[1],[Use ELL])],
[AC_MSG_ERROR("ell missing")])
AC_SUBST(ELL_CFLAGS)
AC_SUBST(ELL_LIBS)
if (test "$sysconfdir" = '${prefix}/etc'); then
knotconfigdir="${prefix}/etc/knot"
else
knotconfigdir="${sysconfdir}/knot"
fi
AC_DEFINE_UNQUOTED(KNOTCONFIGDIR, "${knotconfigdir}",
[Directory for the KNoT configuration files])
AC_SUBST(KNOTCONFIGDIR, "${knotconfigdir}")
AC_ARG_ENABLE(optimization, AC_HELP_STRING([--disable-optimization],
[disable code optimization through compiler]), [
if (test "${enableval}" = "no"); then
CFLAGS="$CFLAGS -U_FORTIFY_SOURCE -O0"
fi
])
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
[enable compiling with debugging information]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_g}" = "yes"); then
CFLAGS="$CFLAGS -g"
fi
])
AC_ARG_ENABLE(pie, AC_HELP_STRING([--enable-pie],
[enable position independent executables flag]), [
if (test "${enableval}" = "yes" &&
test "${ac_cv_prog_cc_pie}" = "yes"); then
CFLAGS="$CFLAGS -fPIE"
LDFLAGS="$LDFLAGS -pie"
fi
])
AC_CONFIG_FILES(Makefile)
AC_OUTPUT