-
Notifications
You must be signed in to change notification settings - Fork 1
/
configure.ac
60 lines (51 loc) · 1.66 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
AC_INIT([apteryx_schema], [1.0])
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
AC_PROG_CC_STDC
AM_PROG_AR
LT_INIT([disable-static pic-only])
AC_CONFIG_MACRO_DIRS([m4])
PKG_CHECK_MODULES([GLIB],[glib-2.0])
PKG_CHECK_MODULES([APTERYX],[apteryx])
AC_ARG_ENABLE([xml],
[ --enable-xml support XML based schema (default=yes)],
[case "${enableval}" in
yes) xml=true ;;
no) xml=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-xml]) ;;
esac],[xml=true])
AM_CONDITIONAL([HAVE_LIBXML], [test x$xml = xtrue])
if test x$xml = xtrue; then
PKG_CHECK_MODULES([LIBXML],[libxml-2.0])
fi
AC_ARG_ENABLE([yang],
[ --enable-yang support Yang based schema (default=yes)],
[case "${enableval}" in
yes) yang=true ;;
no) yang=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-yang]) ;;
esac],[yang=true])
AM_CONDITIONAL([HAVE_LIBYANG], [test x$yang = xtrue])
if test x$yang = xtrue; then
PKG_CHECK_MODULES([LIBYANG],[libyang])
fi
AC_ARG_ENABLE([lua],
[ --enable-lua build lua api (default=yes)],
[case "${enableval}" in
yes) lua=true ;;
no) lua=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-lua]) ;;
esac],[lua=true])
AM_CONDITIONAL([HAVE_LUA], [test x$lua = xtrue])
if test x$lua = xtrue; then
PKG_CHECK_MODULES(LUA, [lua5.3],,[PKG_CHECK_MODULES(LUA, [lua5.2])])
fi
AC_ARG_ENABLE([tests],
[ --enable-tests build unit tests (default=yes)],
[case "${enableval}" in
yes) tests=true ;;
no) tests=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-tests]) ;;
esac],[tests=true])
AM_CONDITIONAL([HAVE_TESTS], [test x$tests = xtrue])
AC_CONFIG_FILES([Makefile apteryx-schema.pc])
AC_OUTPUT