From: Daniel Elstner Date: Mon, 9 Nov 2015 10:10:48 +0000 (+0100) Subject: build: Check SDCC version during configure X-Git-Tag: sigrok-firmware-fx2lafw-0.1.3~7 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=92f54a3e99b0c6b952380725219fc606ca082ef9;p=sigrok-firmware-fx2lafw.git build: Check SDCC version during configure Require at least SDCC version 2.9.0. This fixes bug #696. --- diff --git a/configure.ac b/configure.ac index 0a925976..ccaf5dbb 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,10 @@ AC_CHECK_PROGS([SDCCLIB], [sdcclib sdcc-sdcclib]) AS_IF([test "x$SDCCLIB" = x], [AC_MSG_ERROR([cannot find sdcclib.])]) +sf_sdcc_version=`$SDCC --version | sed -n 's/.* \([[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\.[[0-9]][[0-9]]*\) .*/\1/p;q' 2>&AS_MESSAGE_LOG_FD` +AS_VERSION_COMPARE([$sf_sdcc_version], [2.9.0], + [AC_MSG_ERROR([At least version 2.9.0 of sdcc is required.])]) + AC_CHECK_PROGS([OBJCOPY], [objcopy]) AC_CHECK_PROGS([MAKEBIN], [makebin sdcc-makebin]) AS_IF([test "x$OBJCOPY$MAKEBIN" = x], @@ -59,6 +63,16 @@ AS_IF([test "x$SDAS8051" = x], [AC_MSG_ERROR([cannot find sdas8051.])]) AC_CONFIG_FILES([Makefile]) - AC_OUTPUT +cat >&AS_MESSAGE_FD <<_EOF + +sigrok-firmware-fx2lafw configuration summary: + - Package version................. $PACKAGE_VERSION + - Prefix.......................... $prefix + +Compile configuration: + - C compiler...................... $SDCC + - C compiler version.............. $sf_sdcc_version + +_EOF