-
Notifications
You must be signed in to change notification settings - Fork 4
/
configure.ac
81 lines (65 loc) · 2.18 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
dnl # This Source Code Form is subject to the terms of the Mozilla Public
dnl # License, v. 2.0. If a copy of the MPL was not distributed with this
dnl # file, You can obtain one at http://mozilla.org/MPL/2.0/.
dnl # standard Autoconf prolog
AC_PREREQ(2.59)
AC_INIT(fw, [1.0])
AC_CONFIG_SRCDIR(src/fw.c)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(1.9)
AC_SRCDIR_PREFIX(srcdir_prefix)
AC_HEADLINE(dnl
OpenCPE firmware deamon for OpenWrt, dnl
[Released under MPL 2.0])
AC_CONFIG_PARAM(config.param)
AM_CONFIG_HEADER(config.h)
AC_PREFIX_DEFAULT(/usr)
AC_PLATFORM(PLATFORM)
dnl ##
dnl ## BUILD TOOLS
dnl ##
AC_MSG_PART(Build Tools)
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CPP
AC_DISABLE_SHARED
AC_PROG_INSTALL
AC_SET_MAKE
AC_CHECK_DEBUGGING
AC_MSG_PART(Configure libtool)
AM_PROG_LIBTOOL
dnl ##
dnl ## MANDATORY PLATFORM ENVIRONMENT
dnl ##
AC_MSG_PART(Mandatory Platform Environment)
AC_HEADER_STDC
AC_ISC_POSIX
AC_C_BIGENDIAN
AC_HEADER_STDC
AC_CHECK_HEADERS([stdarg.h])
AC_CHECK_FUNCS(strcpy strdup strcmp free malloc open read close fprintf)
AC_CHECK_LIBM
AM_MAINTAINER_MODE
AC_MSG_PART(required libraries)
AC_CHECK_LIB([ev], [event_init],, AC_MSG_ERROR(Required library ev missing))
AC_CHECK_HEADERS([talloc.h talloc/talloc.h])
AC_CHECK_LIB([talloc], [talloc_named_const],, AC_MSG_ERROR(Required library talloc missing))
AC_CHECK_LIB([dmutils], [logx],, AC_MSG_ERROR(Required library dmutils missing))
AC_CHECK_HEADER([mand/logx.h])
AC_CHECK_LIB([dmconfig], [dm_context_init],, AC_MSG_ERROR(Required library dmconfig missing))
AC_CHECK_HEADER([libdmconfig/dmconfig.h])
AC_CHECK_LIB([dm_dmclient], [rpc_startsession],, AC_MSG_ERROR(Required library dmconfig missing))
AC_CHECK_HEADER([curl/curl.h])
AC_CHECK_LIB([curl],[curl_global_init],, AC_MSG_ERROR(Required library curl missing))
AC_CHECK_HEADER([libssh/libssh.h])
AC_CHECK_LIB([ssh],[ssh_new],, AC_MSG_ERROR(Required library libssh missing))
# Check for libnl3 >=3.2.8. If present enable remus network buffering.
PKG_CHECK_MODULES([LIBNL3], [libnl-3.0 >= 3.2.8 libnl-route-3.0 >= 3.2.8])
AC_SUBST([LIBNL3_LIBS])
AC_SUBST([LIBNL3_CFLAGS])
AC_CONFIG_FILES([
Makefile
src/Makefile
])
AC_OUTPUT