From: Uwe Hermann Date: Sun, 5 Mar 2017 16:01:17 +0000 (+0100) Subject: configure summary: Show compiler version and flags. X-Git-Tag: libserialport-0.1.2~100 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=d8de88de32a386cf21485898c6a9f8a4b5215a24;p=libserialport.git configure summary: Show compiler version and flags. --- diff --git a/configure.ac b/configure.ac index 90ea1d8..8dded71 100644 --- a/configure.ac +++ b/configure.ac @@ -50,6 +50,19 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_LN_S +## SP_PROG_VERSION(program, sh-var) +## Obtain the version of and store it in . +AC_DEFUN([SP_PROG_VERSION], +[dnl +m4_assert([$# >= 2])[]dnl +sp_prog_ver=`$1 --version 2>&AS_MESSAGE_LOG_FD | sed 1q 2>&AS_MESSAGE_LOG_FD` +AS_CASE([[$]?:$sp_prog_ver], + [[0:*[0-9].[0-9]*]], [$2=$sp_prog_ver], + [$2=unknown])[]dnl +]) + +SP_PROG_VERSION([$CC], [sp_cc_version]) + # Initialize libtool. LT_INIT @@ -145,4 +158,10 @@ libserialport configuration summary: - Building for.................... $host - Building shared / static........ $enable_shared / $enable_static +Compile configuration: + - C compiler...................... $CC + - C compiler version.............. $sp_cc_version + - C compiler flags................ $CFLAGS + - Linker flags.................... $LDFLAGS + _EOF