aboutsummaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure12
1 files changed, 11 insertions, 1 deletions
diff --git a/configure b/configure
index 79dcc1a..80518fa 100755
--- a/configure
+++ b/configure
@@ -7,7 +7,7 @@ prefix=$default_prefix
default_CC='c99'
# FILE_OFFSET_BITS=64 is required for large file support on 32-bit platforms.
default_CFLAGS='-O1 -g -D_FILE_OFFSET_BITS=64 -Wall -MD'
-default_LDFLAGS="-lcjson -lm"
+default_LDFLAGS="-lm"
CC=${CC:-$default_CC}
CFLAGS=${CFLAGS:-"$default_CFLAGS $default_NPCFLAGS"}
@@ -62,6 +62,16 @@ else
exit 1
fi
+if pkg-config libcjson
+then
+ CFLAGS="$CFLAGS $(pkg-config --cflags libcjson)"
+ LDFLAGS="$LDFLAGS $(pkg-config --libs libcjson)"
+ USERGEN_LDFLAGS="$USERGEN_LDFLAGS $(pkg-config --libs libcjson)"
+else
+ echo "Error: libcjson not found." >&2
+ exit 1
+fi
+
if pkg-config dynstr
then
in_tree_dynstr=0