From: Uwe Hermann Date: Wed, 4 Jan 2012 02:09:20 +0000 (+0100) Subject: cli: configure.ac: Show config summary. X-Git-Tag: sigrok-cli-0.3.0~80 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=81f487d6a14133ab56466316499ce7cd1cff2d9b;p=sigrok-cli.git cli: configure.ac: Show config summary. Also, add missing glib-2.0 check, we use it directly in the CLI too, not just due to the libsigrok dependency. --- diff --git a/configure.ac b/configure.ac index 7a8fb7a..dbfee3f 100644 --- a/configure.ac +++ b/configure.ac @@ -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 +