From d8de88de32a386cf21485898c6a9f8a4b5215a24 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Sun, 5 Mar 2017 17:01:17 +0100 Subject: [PATCH] configure summary: Show compiler version and flags. --- configure.ac | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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