From: Sandro Santilli Date: Fri, 21 Jun 2013 15:15:58 +0000 (+0000) Subject: Do not override JSON_LDFLAGS, fixing --with-jsondir usage X-Git-Tag: 2.2.0rc1~1475 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e2350ec2b9bec2df33a9aee6ab45f1fa72105ffd;p=postgis Do not override JSON_LDFLAGS, fixing --with-jsondir usage git-svn-id: http://svn.osgeo.org/postgis/trunk@11563 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/configure.ac b/configure.ac index b6f015fde..888dbc39b 100644 --- a/configure.ac +++ b/configure.ac @@ -776,7 +776,7 @@ if test ! "x$JSONDIR" = "x"; then dnl Add the include directory to JSON_CPPFLAGS JSON_CPPFLAGS="-I$JSONDIR/include" - JSON_LDFLAGS="-L$JSONDIR/lib -ljson" + JSON_LDFLAGS="-L$JSONDIR/lib" fi fi @@ -789,16 +789,13 @@ CPPFLAGS="$CPPFLAGS_SAVE" dnl Ensure we can link against libjson LIBS_SAVE="$LIBS" LIBS="$JSON_LDFLAGS" -AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="-ljson-c"], [ - AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="-ljson"], [], []) +AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [ + AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], []) ], []) LIBS="$LIBS_SAVE" if test "$HAVE_JSON" = "yes"; then AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) - if test "x$JSON_LDFLAGS" = "x"; then - JSON_LDFLAGS="-ljson" - fi fi AC_SUBST([JSON_CPPFLAGS])