|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN(SC_PATH_TCLCONFIG, [ |
|
# |
|
# Ok, lets find the tcl configuration |
|
# First, look for one uninstalled. |
|
# the alternative search directory is invoked by --with-tcl |
|
# |
|
|
|
if test x"${no_tcl}" = x ; then |
|
# we reset no_tcl in case something fails here |
|
no_tcl=true |
|
AC_ARG_WITH(tcl, [ --with-tcl directory containing tcl configuration (tclConfig.sh)], with_tclconfig=${withval}) |
|
AC_MSG_CHECKING([for Tcl configuration]) |
|
AC_CACHE_VAL(ac_cv_c_tclconfig,[ |
|
|
|
# First check to see if --with-tcl was specified. |
|
if test x"${with_tclconfig}" != x ; then |
|
if test -f "${with_tclconfig}/tclConfig.sh" ; then |
|
ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` |
|
else |
|
AC_MSG_ERROR([${with_tclconfig} directory doesn't contain tclConfig.sh]) |
|
fi |
|
fi |
|
|
|
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then |
|
for i in \ |
|
../tcl \ |
|
`ls -dr ../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../tcl[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ |
|
../../tcl \ |
|
`ls -dr ../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../../tcl[[8-9]].[[0-9]]* 2>/dev/null` \ |
|
../../../tcl \ |
|
`ls -dr ../../../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../../../tcl[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../../../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do |
|
if test -f "$i/unix/tclConfig.sh" ; then |
|
ac_cv_c_tclconfig=`(cd $i/unix; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
|
|
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then |
|
for i in `ls -d ${libdir} 2>/dev/null` \ |
|
`ls -d /usr/local/lib 2>/dev/null` \ |
|
`ls -d /usr/contrib/lib 2>/dev/null` \ |
|
`ls -d /usr/lib 2>/dev/null` \ |
|
`ls -d /usr/lib64 2>/dev/null` \ |
|
; do |
|
if test -f "$i/tclConfig.sh" ; then |
|
ac_cv_c_tclconfig=`(cd $i; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
|
|
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then |
|
for i in \ |
|
${srcdir}/../tcl \ |
|
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ${srcdir}/../tcl[[8-9]].[[0-9]]* 2>/dev/null` ; do |
|
if test -f "$i/unix/tclConfig.sh" ; then |
|
ac_cv_c_tclconfig=`(cd $i/unix; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
]) |
|
|
|
if test x"${ac_cv_c_tclconfig}" = x ; then |
|
TCL_BIN_DIR="# no Tcl configs found" |
|
AC_MSG_WARN(Can't find Tcl configuration definitions) |
|
exit 0 |
|
else |
|
no_tcl= |
|
TCL_BIN_DIR=${ac_cv_c_tclconfig} |
|
AC_MSG_RESULT(found $TCL_BIN_DIR/tclConfig.sh) |
|
fi |
|
fi |
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN(SC_PATH_TKCONFIG, [ |
|
# |
|
# Ok, lets find the tk configuration |
|
# First, look for one uninstalled. |
|
# the alternative search directory is invoked by --with-tk |
|
# |
|
|
|
if test x"${no_tk}" = x ; then |
|
# we reset no_tk in case something fails here |
|
no_tk=true |
|
AC_ARG_WITH(tk, [ --with-tk directory containing tk configuration (tkConfig.sh)], with_tkconfig=${withval}) |
|
AC_MSG_CHECKING([for Tk configuration]) |
|
AC_CACHE_VAL(ac_cv_c_tkconfig,[ |
|
|
|
# First check to see if --with-tkconfig was specified. |
|
if test x"${with_tkconfig}" != x ; then |
|
if test -f "${with_tkconfig}/tkConfig.sh" ; then |
|
ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` |
|
else |
|
AC_MSG_ERROR([${with_tkconfig} directory doesn't contain tkConfig.sh]) |
|
fi |
|
fi |
|
|
|
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then |
|
for i in \ |
|
../tk \ |
|
`ls -dr ../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../tk[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../tk[[8-9]].[[0-9]]* 2>/dev/null` \ |
|
../../tk \ |
|
`ls -dr ../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../../tk[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../../tk[[8-9]].[[0-9]]* 2>/dev/null` \ |
|
../../../tk \ |
|
`ls -dr ../../../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ../../../tk[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ../../../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do |
|
if test -f "$i/unix/tkConfig.sh" ; then |
|
ac_cv_c_tkconfig=`(cd $i/unix; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then |
|
for i in `ls -d ${libdir} 2>/dev/null` \ |
|
`ls -d /usr/local/lib 2>/dev/null` \ |
|
`ls -d /usr/contrib/lib 2>/dev/null` \ |
|
`ls -d /usr/lib 2>/dev/null` \ |
|
`ls -d /usr/lib64 2>/dev/null` \ |
|
; do |
|
if test -f "$i/tkConfig.sh" ; then |
|
ac_cv_c_tkconfig=`(cd $i; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
|
|
if test x"${ac_cv_c_tkconfig}" = x ; then |
|
for i in \ |
|
${srcdir}/../tk \ |
|
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]].[[0-9]]* 2>/dev/null` \ |
|
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]] 2>/dev/null` \ |
|
`ls -dr ${srcdir}/../tk[[8-9]].[[0-9]]* 2>/dev/null` ; do |
|
if test -f "$i/unix/tkConfig.sh" ; then |
|
ac_cv_c_tkconfig=`(cd $i/unix; pwd)` |
|
break |
|
fi |
|
done |
|
fi |
|
]) |
|
if test x"${ac_cv_c_tkconfig}" = x ; then |
|
TK_BIN_DIR="# no Tk configs found" |
|
AC_MSG_WARN(Can't find Tk configuration definitions) |
|
exit 0 |
|
else |
|
no_tk= |
|
TK_BIN_DIR=${ac_cv_c_tkconfig} |
|
AC_MSG_RESULT(found $TK_BIN_DIR/tkConfig.sh) |
|
fi |
|
fi |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN(SC_LOAD_TCLCONFIG, [ |
|
AC_MSG_CHECKING([for existence of $TCL_BIN_DIR/tclConfig.sh]) |
|
|
|
if test -f "$TCL_BIN_DIR/tclConfig.sh" ; then |
|
AC_MSG_RESULT([loading]) |
|
. $TCL_BIN_DIR/tclConfig.sh |
|
else |
|
AC_MSG_RESULT([file not found]) |
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if test -f $TCL_BIN_DIR/Makefile ; then |
|
TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} |
|
TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} |
|
TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} |
|
fi |
|
|
|
|
|
|
|
|
|
|
|
eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" |
|
eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" |
|
eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" |
|
eval "TCL_INCLUDE_SPEC=\"${TCL_INCLUDE_SPEC}\"" |
|
|
|
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" |
|
eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" |
|
eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_SUBST(TCL_LIB_SPEC) |
|
AC_SUBST(TCL_INCLUDE_SPEC) |
|
|
|
|
|
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
AC_DEFUN(SC_LOAD_TKCONFIG, [ |
|
AC_MSG_CHECKING([for existence of $TK_BIN_DIR/tkConfig.sh]) |
|
|
|
if test -f "$TK_BIN_DIR/tkConfig.sh" ; then |
|
AC_MSG_RESULT([loading]) |
|
. $TK_BIN_DIR/tkConfig.sh |
|
else |
|
AC_MSG_RESULT([could not find $TK_BIN_DIR/tkConfig.sh]) |
|
fi |
|
|
|
AC_SUBST(TK_LIB_SPEC) |
|
AC_SUBST(TK_LIBS) |
|
AC_SUBST(TK_XINCLUDES) |
|
AC_SUBST(TK_PREFIX) |
|
|
|
|
|
|
|
|
|
|
|
]) |
|
|
|
dnl From Bruno Haible. |
|
|
|
AC_DEFUN([AC_LANGINFO_CODESET], |
|
[ |
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset, |
|
[AC_TRY_LINK([#include <langinfo.h>], |
|
[char* cs = nl_langinfo(CODESET);], |
|
am_cv_langinfo_codeset=yes, |
|
am_cv_langinfo_codeset=no) |
|
]) |
|
if test $am_cv_langinfo_codeset = yes; then |
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1, |
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).]) |
|
fi |
|
]) |
|
|
|
|