-
Notifications
You must be signed in to change notification settings - Fork 63
/
configure.ac
87 lines (67 loc) · 2.41 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
AC_INIT([easycwmpd], [1.8.6], [[email protected]])
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/easycwmp.c])
AM_INIT_AUTOMAKE([subdir-objects])
AC_ARG_ENABLE(jsonc, [AS_HELP_STRING([--enable-jsonc], [build with jsonc])], [
AC_DEFINE(JSONC)
LIBJSON_LIBS='-ljson-c'
AC_SUBST([LIBJSON_LIBS])
], [
LIBJSON_LIBS='-ljson'
AC_SUBST([LIBJSON_LIBS])
])
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [enable debugging messages])], AC_DEFINE(DEBUG),)
AC_ARG_ENABLE(devel, [AS_HELP_STRING([--enable-devel], [enable development messages])], AC_DEFINE(DEVEL),)
AC_ARG_ENABLE(backupdatainconfig, [AS_HELP_STRING([--enable-backupdatainconfig], [enable backup data saved in the config])], AC_DEFINE(BACKUP_DATA_IN_CONFIG),)
# checks for programs
AC_PROG_CC
AM_PROG_CC_C_O
# checks for libraries
AC_ARG_WITH([uci-include-path],
[AS_HELP_STRING([--with-uci-include-path],
[location of the uci library headers])],
[LIBUCI_CFLAGS="-I$withval"])
AC_SUBST([LIBUCI_CFLAGS])
AC_ARG_WITH([uci-lib-path],
[AS_HELP_STRING([--with-uci-lib-path], [location of the uci library])], [LIBUCI_LDFLAGS="-L$withval"])
AC_SUBST([LIBUCI_LDFLAGS])
LIBUCI_LIBS='-luci'
AC_SUBST([LIBUCI_LIBS])
AC_ARG_WITH([libubox-include-path],
[AS_HELP_STRING([--with-libubox-include-path],
[location of the libubox library headers])],
[LIBUBOX_CFLAGS="-I$withval"])
AC_SUBST([LIBUBOX_CFLAGS])
AC_ARG_WITH([libubox-lib-path],
[AS_HELP_STRING([--with-libubox-lib-path], [location of the libubox library])], [LIBUBOX_LDFLAGS="-L$withval"])
AC_SUBST([LIBUBOX_LDFLAGS])
LIBUBOX_LIBS='-lubox'
AC_SUBST([LIBUBOX_LIBS])
AC_ARG_WITH([libubus-include-path],
[AS_HELP_STRING([--with-libubus-include-path],
[location of the libubus library headers])],
[LIBUBUS_CFLAGS="-I$withval"])
AC_SUBST([LIBUBUS_CFLAGS])
AC_ARG_WITH([libubus-lib-path],
[AS_HELP_STRING([--with-libubus-lib-path], [location of the libubus library])], [LIBUBUS_LDFLAGS="-L$withval"])
AC_SUBST([LIBUBUS_LDFLAGS])
LIBUBUS_LIBS='-lubus'
AC_SUBST([LIBUBUS_LIBS])
PKG_CHECK_MODULES(LIBCURL, [libcurl])
AC_SUBST(LIBCURL_CFLAGS)
AC_SUBST(LIBCURL_LDFLAGS)
AC_SUBST(LIBCURL_LIBS)
PKG_CHECK_MODULES(MICROXML, [microxml])
AC_SUBST(MICROXML_CFLAGS)
AC_SUBST(MICROXML_LDFLAGS)
AC_SUBST(MICROXML_LIBS)
# checks for header files
AC_CHECK_HEADERS([stdlib.h string.h])
# checks for typedefs, structures, and compiler characteristics
AC_TYPE_UINT8_T
# Makefiles
AC_CONFIG_FILES([
Makefile
bin/Makefile
])
AC_OUTPUT