aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2010-11-26 16:13:32 -0500
committerJeff Garzik <jgarzik@redhat.com>2010-11-26 16:13:32 -0500
commit4575851ea331ea85946c30421541a493c6659445 (patch)
treed71f52e1328b2db7f39102bdf2fdfca99d8d31e6 /configure.ac
parent750deb7a9912af13a83f737753fac24dc4dc5bd8 (diff)
Build jansson 1.3 in-tree, if not present on system.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac13
1 files changed, 12 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index ce4272b..b60fbfb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -17,9 +17,18 @@ AC_PROG_RANLIB
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_LIB(jansson, json_loads, JANSSON_LIBS=-ljansson)
+AC_CHECK_LIB(jansson, json_loads, request_jansson=false, request_jansson=true)
AC_CHECK_LIB(pthread, pthread_create, PTHREAD_LIBS=-lpthread)
+AM_CONDITIONAL([WANT_JANSSON], [test x$request_jansson = xtrue])
+
+if test x$request_jansson = xtrue
+then
+ JANSSON_LIBS="compat/jansson/libjansson.a"
+else
+ JANSSON_LIBS=-ljansson
+fi
+
PKG_PROG_PKG_CONFIG()
LIBCURL_CHECK_CONFIG(, 7.10.1, ,
@@ -30,6 +39,8 @@ AC_SUBST(PTHREAD_LIBS)
AC_CONFIG_FILES([
Makefile
+ compat/Makefile
+ compat/jansson/Makefile
])
AC_OUTPUT