Skip to content

Commit

Permalink
Change logic for finding tcl.h to look in /usr/include and tcl direct…
Browse files Browse the repository at this point in the history
…ories before trying pkg-config
  • Loading branch information
Robert McLay committed Feb 26, 2021
1 parent 632a0e4 commit 62ce5ad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
31 changes: 19 additions & 12 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4028,15 +4028,22 @@ if test "$ALLOW_TCL_MFILES" = no ; then
fi
if test "$FAST_TCL_INTERP" = yes ; then
TCL_INCLUDE=/usr/include/tcl
TCL_LIBS="-ltcl"
OS=$(uname -s)
if test "$OS" = Darwin ; then
TCL_INCLUDE=$(xcrun --show-sdk-path)
TCL_INCLUDE=${DIR}/usr/include
else
for i in "" tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
if test -f /usr/include/$i/tcl.h ; then
TCL_INCLUDE=/usr/include/$i
break;
fi
done
fi
# Extract the first word of "pkg-config", so it can be a program name with args.
if test -z "$TCL_INCLUDE" ; then
# Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
Expand Down Expand Up @@ -4077,15 +4084,16 @@ $as_echo "no" >&6; }
fi
if ! test x$pkgConfig = "x"; then
for i in tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
$pkgConfig --exists $i
if test $? = 0; then
TCL_INCLUDE=`$pkgConfig --cflags $i | sed -e 's/^-I//' -e 's/ //g'`
TCL_LIBS=`$pkgConfig --libs $i`
break
fi
done
if ! test x$pkgConfig = "x"; then
for i in tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
$pkgConfig --exists $i
if test $? = 0; then
TCL_INCLUDE=`$pkgConfig --cflags $i | sed -e 's/^-I//' -e 's/ //g'`
TCL_LIBS=`$pkgConfig --libs $i`
break
fi
done
fi
fi
CPPFLAGS="-I $TCL_INCLUDE"
Expand Down Expand Up @@ -5112,7 +5120,6 @@ fi
PATH_TO_LUA=$(FOLLOW_READLINK $FIND_PATH_TO_LUA)
fi
echo "2) PATH_TO_LUA: $PATH_TO_LUA"
if ! command -v $PATH_TO_LUAC &>/dev/null ; then
echo 'The program "'$PATH_TO_LUAC'" must be in your path'
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ if test ${PATH_TO_LUA:0:1} != '/' ; then
AC_PATH_PROG(FIND_PATH_TO_LUA, $PATH_TO_LUA)
PATH_TO_LUA=$(FOLLOW_READLINK $FIND_PATH_TO_LUA)
fi
echo "2) PATH_TO_LUA: $PATH_TO_LUA"

if ! command -v $PATH_TO_LUAC &>/dev/null ; then
echo 'The program "'$PATH_TO_LUAC'" must be in your path'
Expand Down

0 comments on commit 62ce5ad

Please sign in to comment.