summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorManolis Stamatogiannakis <mstamat@gmail.com>2021-03-01 03:29:57 (GMT)
committerGitHub <noreply@github.com>2021-03-01 03:29:57 (GMT)
commitd20279494a3a311c7aefa313174c45d32aa7f5d1 (patch)
treeee5dc615a34501a4466b707782c277be0b7ae615 /configure
parenta8e2615aa885a121b8cf8e9cd07696207356a25a (diff)
downloadcpython-d20279494a3a311c7aefa313174c45d32aa7f5d1.zip
cpython-d20279494a3a311c7aefa313174c45d32aa7f5d1.tar.gz
cpython-d20279494a3a311c7aefa313174c45d32aa7f5d1.tar.bz2
bpo-42603: Use pkg-config to get TCL/TK paths for tkinter. (GH-23721)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure b/configure
index 8c94825..2d5a61e 100755
--- a/configure
+++ b/configure
@@ -10714,8 +10714,13 @@ then
then
as_fn_error $? "use both --with-tcltk-includes='...' and --with-tcltk-libs='...' or neither" "$LINENO" 5
fi
- TCLTK_INCLUDES=""
- TCLTK_LIBS=""
+ if test -n "$PKG_CONFIG" && "$PKG_CONFIG" --exists tcl tk; then
+ TCLTK_INCLUDES="`"$PKG_CONFIG" tcl tk --cflags-only-I 2>/dev/null`"
+ TCLTK_LIBS="`"$PKG_CONFIG" tcl tk --libs 2>/dev/null`"
+ else
+ TCLTK_INCLUDES=""
+ TCLTK_LIBS=""
+ fi
else
TCLTK_INCLUDES="$with_tcltk_includes"
TCLTK_LIBS="$with_tcltk_libs"