]> sigrok.org Git - sigrok-cli.git/commitdiff
cli: configure.ac: Show config summary.
authorUwe Hermann <redacted>
Wed, 4 Jan 2012 02:09:20 +0000 (03:09 +0100)
committerUwe Hermann <redacted>
Wed, 4 Jan 2012 02:09:20 +0000 (03:09 +0100)
Also, add missing glib-2.0 check, we use it directly in the CLI too,
not just due to the libsigrok dependency.

configure.ac

index 7a8fb7a7b408cdb6268876342895a77b21df09a0..dbfee3f8d91c8b8753ec4f3202e15289c4ac0af7 100644 (file)
@@ -52,6 +52,9 @@ PKG_PROG_PKG_CONFIG([0.22])
 
 # Checks for libraries.
 
+AM_PATH_GLIB_2_0([2.22.0],
+        [CFLAGS="$CFLAGS $GLIB_CFLAGS"; LIBS="$LIBS $GLIB_LIBS"])
+
 PKG_CHECK_MODULES([libsigrok], [libsigrok],
        [CFLAGS="$CFLAGS $libsigrok_CFLAGS";
        LIBS="$LIBS $libsigrok_LIBS"])
@@ -87,3 +90,25 @@ AC_CONFIG_FILES([Makefile
 
 AC_OUTPUT
 
+echo
+echo "sigrok-cli configuration summary:"
+echo
+echo "  - Package version: $VERSION"
+echo "  - Prefix: $prefix"
+echo
+echo "Detected libraries:"
+echo
+
+# Note: This only works for libs with pkg-config integration.
+for lib in "glib-2.0" "libsigrok" "libsigrokdecode"; do
+        if `$PKG_CONFIG --exists $lib`; then
+                ver=`$PKG_CONFIG --modversion $lib`
+                answer="yes ($ver)"
+        else
+                answer="no"
+        fi
+        echo "  - $lib: $answer"
+done
+
+echo
+