From 94bf1d717aaa29678a98cf50455648a6410df795 Mon Sep 17 00:00:00 2001 From: Daniele Forsi IU5HKX Date: Sat, 17 May 2025 11:27:31 +0200 Subject: [PATCH] Fix failure of ./configure --with-tcl-binding --with-xml-support If pkg-config has found tcl.pc, then tclConfig.sh is not executed and $TCL_INCLUDE_SPEC is empty so the test for tcl.h fails. This patch moves the test inside the "else" case where the variable is always defined. The is a bug exposed by the fact that --with-xml-support redefines the macro PKG_CHECK_MODULES. Fix verified moving aside /usr/lib/x86_64-linux-gnu/pkgconfig/tcl.pc Fixes: configure: error: Unable to find Tcl headers --- configure.ac | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index f9bf267d5..4e4331504 100644 --- a/configure.ac +++ b/configure.ac @@ -637,14 +637,14 @@ AS_IF([test x"${build_tcl}" = "xyes"],[ AC_MSG_WARN([Unable to find Tcl pkgconfig]) SC_PATH_TCLCONFIG SC_LOAD_TCLCONFIG - ]) - tcl_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" - AC_CHECK_HEADERS([tcl.h], - [], - [AC_MSG_ERROR([Unable to find Tcl headers])]) - CPPFLAGS=$tcl_save_CPPFLAGS + tcl_save_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" + AC_CHECK_HEADERS([tcl.h], + [], + [AC_MSG_ERROR([Unable to find Tcl headers])]) + CPPFLAGS=$tcl_save_CPPFLAGS + ]) BINDING_LIST="${BINDING_LIST} tcl" BINDING_ALL="${BINDING_ALL} all-tcl"