Tcl Source Code

View Ticket
Login
Ticket UUID: 1cf49a09261a8650662cce3ea50e8be618d162db
Title: Install pkgconfig
Type: Patch Created on: 2025-10-27 15:16:21
Submitter: oscarfv Assigned to: jan.nijtmans
Subsystem: 53. Configuration and Build Tools Severity: Important
Priority: 5 Medium Last modified: 2025-10-30 18:36:02
Status: Closed Closed by: jan.nijtmans
Resolution: Fixed Closed on: 2025-10-30 18:36:02
Version:
Description:
From MSYS2/Mingw-packages:

--- a/win/configure.in
+++ b/win/configure.in
@@ -285,6 +285,7 @@
 
 eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
 
+eval "TCL_LIB_FLAG=\"-ltcl${VER}${LIBFLAGSUFFIX}\""
 eval "TCL_STUB_LIB_FILE=\"${LIBPREFIX}tclstub${VER}${LIBSUFFIX}\""
 eval "TCL_STUB_LIB_FLAG=\"-ltclstub${VER}${LIBFLAGSUFFIX}\""
 eval "TCL_BUILD_STUB_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TCL_STUB_LIB_FLAG}\""
@@ -375,6 +376,7 @@
 AC_SUBST(TCL_IMPORT_LIB_FILE)
 AC_SUBST(TCL_IMPORT_LIB_FLAG)
 # empty on win
+AC_SUBST(TCL_LIBS)
 AC_SUBST(TCL_LIB_SPEC)
 AC_SUBST(TCL_STUB_LIB_FILE)
 AC_SUBST(TCL_STUB_LIB_FLAG)
@@ -458,7 +458,7 @@
 AC_SUBST(RC_DEFINES)
 AC_SUBST(RES)
 
-AC_CONFIG_FILES([Makefile tclConfig.sh tcl.hpj tclsh.exe.manifest])
+AC_CONFIG_FILES([Makefile tclConfig.sh tcl.hpj tclsh.exe.manifest tcl.pc])
 AC_OUTPUT
 
 dnl Local Variables:
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -672,6 +672,9 @@
 	    echo Installing $(REG_LIB_FILE); \
 	    $(COPY) $(REG_LIB_FILE) "$(LIB_INSTALL_DIR)/reg${REGDOTVER}"; \
 	    fi
+	@echo "Installing pkg-config file to $(LIB_INSTALL_DIR)/pkgconfig/"
+	@$(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/pkgconfig"
+	@$(INSTALL_DATA) tcl.pc "$(LIB_INSTALL_DIR)/pkgconfig/tcl.pc"
 
 install-libraries: libraries install-tzdata install-msgs
 	@for i in "$(prefix)/lib" "$(INCLUDE_INSTALL_DIR)" \
User Comments:
jan.nijtmans added on 2025-10-28 07:58:54:

Trying this, I get:

error: cannot find input file: tcl.pc.in

Did you add a "tcl.pc.in" in the win directory, or is the UNIX version (tcl.pc:../unix/tcl.pc.in) fine?


oscarfv added on 2025-10-28 09:31:13:
Yes, we are using unix/tcltcl.pc.in by explicitly copying it from the build recipe:

  cp unix/tcl.pc.in win/tcl.pc.in

Sorry for missing this detail.

The Tk counterpart ( https://core.tcl-lang.org/tk/tktview/2c240bb0f5 ) does this on a different way (AC_CONFIG_FILES).

jan.nijtmans added on 2025-10-28 10:26:51:

So, does [f856dbf9394261fb|this] work for you?


oscarfv added on 2025-10-28 10:48:42:
I don't know autotools, so your judgement is way better than mine. After resolving the other tickets, I'll get an snapshot of the repo to test the build.

Thank you.

jan.nijtmans added on 2025-10-30 18:36:02:

Fixed [bbc10f091d6e0ab6|here]

Thanks for the report and the patch!