Skip to content

Commit

Permalink
Issue #722: Allowing for sites to specify TCL_INCLUDE and TCL_LIBS
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert McLay committed Sep 6, 2024
1 parent f215c7b commit eb664a5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 14 deletions.
41 changes: 28 additions & 13 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -4487,7 +4487,7 @@ done
done
IFS=$as_save_IFS
test -z "$ac_cv_path_pkgConfig" && ac_cv_path_pkgConfig=""""
test -z "$ac_cv_path_pkgConfig" && ac_cv_path_pkgConfig=""UNKNOWN_PKG_CONFIG""
;;
esac
fi
Expand All @@ -4501,7 +4501,17 @@ printf "%s\n" "no" >&6; }
fi
if test -n "$TCL_PKG_CONFIG_DIR" ; then
if test -n "$TCL_INCLUDE" -a -n "$TCL_LIBS"; then
echo "using TCL_INCLUDE: $TCL_INCLUDE"
echo "using TCL_LIBS: $TCL_LIBS"
elif test -n "$TCL_PKG_CONFIG_DIR" ; then
if test "$pkgConfig" = "UNKNOWN_PKG_CONFIG" ; then
echo
echo "You must have valid pkg-config in your path. Quitting!"
echo
rm -f makefile
exit 1
fi
export PKG_CONFIG_PATH=$TCL_PKG_CONFIG_DIR
TCL_INCLUDE=`$pkgConfig --cflags-only-I tcl 2> /dev/null`
TCL_LIBS=`$pkgConfig --libs tcl`
Expand All @@ -4519,16 +4529,21 @@ fi
fi
if test -z "$TCL_INCLUDE" ; then
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=`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 $pkgConfig --cflags-only-I $i 2> /dev/null`
TCL_LIBS=`$pkgConfig --libs $i`
break
fi
done
fi
if test "$pkgConfig" = "UNKNOWN_PKG_CONFIG" ; then
echo
echo "You must have valid pkg-config in your path. Quitting!"
echo
rm -f makefile
exit 1
fi
for i in tcl tcl8.8 tcl8.7 tcl8.6 tcl8.5; do
$pkgConfig --exists $i
if test $? = 0; then
TCL_INCLUDE=`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 $pkgConfig --cflags-only-I $i 2> /dev/null`
TCL_LIBS=`$pkgConfig --libs $i`
break
fi
done
fi
CPPFLAGS="$TCL_INCLUDE"
Expand Down Expand Up @@ -4575,7 +4590,7 @@ fi
if test "$ac_cv_header_tcl_h" != yes ; then
rm -f makefile
FOUND_ERROR=yes
MSG="Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h. You can also provide your own tcl source. Please set TCL_PKG_CONFIG_DIR to point to the directory containing tcl.pc"
MSG="Unable to build Lmod without tcl.h. Please install the tcl devel package or configure --with-fastTCLInterp=no to not require tcl.h. You can also provide your own tcl source. Please set TCL_PKG_CONFIG_DIR to point to the directory containing tcl.pc Or specify TCL_INCLUDE and TCL_LIBS"
ERR_MSG="$ERR_MSG||$MSG"
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: $MSG" >&5
printf "%s\n" "$as_me: $MSG" >&6;}
Expand Down
1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,6 @@ if test "$FAST_TCL_INTERP" = yes ; then
break
fi
done
fi
fi

CPPFLAGS="$TCL_INCLUDE"
Expand Down

0 comments on commit eb664a5

Please sign in to comment.