diff options
author | Luca Deri <deri@ntop.org> | 2015-05-23 07:15:24 +0200 |
---|---|---|
committer | Luca Deri <deri@ntop.org> | 2015-05-23 07:15:24 +0200 |
commit | 3caf906c9a7cf87a72225994ae404fa2e384b16e (patch) | |
tree | 9eb330dbcb0783222f426006988b9c7117d3f092 | |
parent | 43bf9df219c8208abadb144857ebe83fe80b517b (diff) |
Fixes to catch missing GNU tools
-rwxr-xr-x | autogen.sh | 25 | ||||
-rw-r--r-- | configure.ac | 8 |
2 files changed, 31 insertions, 2 deletions
diff --git a/autogen.sh b/autogen.sh index 7f109b0a5..1a1b36c0f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -2,5 +2,30 @@ /bin/rm -f configure config.h config.h.in src/lib/Makefile.in + +AUTOCONF=$(which autoconf) +AUTOMAKE=$(which automake) +LIBTOOL=$(which libtool) + +if test -z $AUTOCONF; then + echo "autoconf is missing: please install it and try again" + exit +fi + +if test -z $AUTOMAKE; then + echo "automake is missing: please install it and try again" + exit +fi + +if test -z $LIBTOOL; then + echo "libtool is missing: please install it and try again" + exit +fi + +if test -z $AUTORECONF; then + echo "autoreconf is missing: please install it and try again" + exit +fi + autoreconf -ivf ./configure diff --git a/configure.ac b/configure.ac index 598c0a22b..c85c0c38c 100644 --- a/configure.ac +++ b/configure.ac @@ -57,12 +57,16 @@ else fi fi +PKG_CONFIG=$(which pkg-config) + if test -d /usr/local/include/json-c/; then : CFLAGS="$CFLAGS -I/usr/local/include/json-c/" LDFLAGS="$LDFLAGS -L/usr/local/lib -ljson-c" else - CFLAGS="$CFLAGS $(pkg-config --cflags json-c)" - LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)" + if ! test -z "$PKG_CONFIG"; then : + CFLAGS="$CFLAGS $(pkg-config --cflags json-c)" + LDFLAGS="$LDFLAGS $(pkg-config --libs json-c)" + fi fi OLD_LIBS=$LIBS |