summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2014-04-05 13:00:59 +0200
committerUwe Hermann <uwe@hermann-uwe.de>2014-04-09 10:57:06 +0200
commita5077804d65c3b699a9dbce76ac77d6a7db81133 (patch)
tree1cf174935d069e82f23fe09d8aae8b0ab8688965 /configure.ac
parent1ced2b013412336a9d9ac77aded7078b4eef3780 (diff)
downloadlibsigrokdecode-a5077804d65c3b699a9dbce76ac77d6a7db81133.tar.gz
libsigrokdecode-a5077804d65c3b699a9dbce76ac77d6a7db81133.zip
configure.ac: Clearly mark required and optional libs.
Also, drop printing of the detected Python CPPFLAGS/LDFLAGS, not really needed since it's available in 'make V=1' output as well (and we don't print it for other libs either).
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac41
1 files changed, 26 insertions, 15 deletions
diff --git a/configure.ac b/configure.ac
index d9bf6a9..09f7421 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@ AC_SUBST(SRD_LIB_VERSION_AGE)
AC_SUBST(SRD_LIB_VERSION)
AC_SUBST(SRD_LIB_LDFLAGS)
-# assume we can build tests/runtc unless proven otherwise
+# Assume we can build tests/runtc unless proven otherwise.
build_runtc="yes"
# Checks for libraries.
@@ -94,14 +94,18 @@ AM_PATH_GLIB_2_0([2.24.0],
# See also: http://sigrok.org/wiki/Libsigrokdecode/Python
CPPFLAGS_PYTHON=""
LDFLAGS_PYTHON=""
+pyver="none"
PKG_CHECK_MODULES([python3], [python3 >= 3.2],
- [CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python3_CFLAGS";
+ [pyver=`$PKG_CONFIG --modversion python3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python3_CFLAGS";
LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python3_LIBS"],
[PKG_CHECK_MODULES([python33], [python-3.3 >= 3.2],
- [CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
+ [pyver=`$PKG_CONFIG --modversion python-3.3`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python33_CFLAGS";
LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python33_LIBS"],
[PKG_CHECK_MODULES([python32], [python-3.2 >= 3.2],
- [CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
+ [pyver=`$PKG_CONFIG --modversion python-3.2`;
+ CPPFLAGS_PYTHON="$CPPFLAGS_PYTHON $python32_CFLAGS";
LDFLAGS_PYTHON="$LDFLAGS_PYTHON $python32_LIBS"],
)])])
AC_SUBST(CPPFLAGS_PYTHON)
@@ -161,26 +165,33 @@ echo " - Library version (current:revision:age): $SRD_LIB_VERSION"
echo " - Prefix: $prefix"
echo " - Building on: $build"
echo " - Building for: $host"
-echo " - Building protocol decoder test framework: $build_runtc"
echo
echo "Detected libraries:"
echo
+if test "x$pyver" = "xnone"; then
+ echo " - (REQUIRED) python >= 3.2: no"
+else
+ echo " - (REQUIRED) python >= 3.2: yes ($pyver)"
+fi
+
# Note: This only works for libs with pkg-config integration.
for lib in "glib-2.0 >= 2.24.0" "check >= 0.9.4" "libsigrok >= 0.2.0"; do
- if `$PKG_CONFIG --exists $lib`; then
- ver=`$PKG_CONFIG --modversion $lib`
- answer="yes ($ver)"
- else
- answer="no"
- fi
- echo " - $lib: $answer"
+ optional="OPTIONAL"
+ if test "x$lib" = "xglib-2.0 >= 2.24.0"; then optional="REQUIRED"; fi
+ if `$PKG_CONFIG --exists $lib`; then
+ ver=`$PKG_CONFIG --modversion $lib`
+ answer="yes ($ver)"
+ else
+ answer="no"
+ fi
+ echo " - ($optional) $lib: $answer"
done
echo
-echo "Detected Python:"
+echo "Enabled features:"
echo
-echo " - Python CPPFLAGS: $CPPFLAGS_PYTHON"
-echo " - Python LDFLAGS: $LDFLAGS_PYTHON"
+echo " - (OPTIONAL) Library unit test framework support: $have_check"
+echo " - (OPTIONAL) Protocol decoder test framework support: $build_runtc"
echo