AC_DEFUN(CY_AC_PATH_TCLCONFIG, [ # # Ok, lets find the tcl configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tclconfig # if test x"${no_tcl}" = x ; then # we reset no_tcl in case something fails here no_tcl=true AC_ARG_WITH(tclconfig, [ --with-tclconfig=DIR 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-tclconfig 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 # then check for a private Tcl installation if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ./tcl \ ../tcl \ `ls -dr ../tcl[[7-9]]* 2>/dev/null` \ ../../tcl \ `ls -dr ../../tcl[[7-9]]* 2>/dev/null` \ ../../../tcl \ `ls -dr ../../../tcl[[7-9]]* 2>/dev/null` ; do if test -f "$i/${configdir}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tclconfig}" = x ; then for i in \ ${srcdir}/../tcl \ `ls -dr ${srcdir}/../tcl[[7-9]]* 2>/dev/null` ; do if test -f "$i/${configdir}/tclConfig.sh" ; then ac_cv_c_tclconfig=`(cd $i/${configdir}; pwd)` break fi done fi ]) if test x"${ac_cv_c_tclconfig}" = x ; then TCLCONFIG="# no Tcl configs found" AC_MSG_WARN(Can't find Tcl configuration definitions) else no_tcl= TCLCONFIG=${ac_cv_c_tclconfig}/tclConfig.sh AC_MSG_RESULT(found $TCLCONFIG) fi fi ]) AC_DEFUN(CY_AC_LOAD_TCLCONFIG, [ . $TCLCONFIG AC_SUBST(TCL_VERSION) AC_SUBST(TCL_MAJOR_VERSION) AC_SUBST(TCL_MINOR_VERSION) AC_SUBST(TCL_CC) AC_SUBST(TCL_DEFS) dnl not used, don't export to save symbols dnl AC_SUBST(TCL_LIB_FILE) dnl don't export, not used outside of configure dnl AC_SUBST(TCL_LIBS) dnl not used, don't export to save symbols dnl AC_SUBST(TCL_PREFIX) dnl not used, don't export to save symbols dnl AC_SUBST(TCL_EXEC_PREFIX) AC_SUBST(TCL_SHLIB_CFLAGS) AC_SUBST(TCL_SHLIB_LD) dnl don't export, not used outside of configure AC_SUBST(TCL_SHLIB_LD_LIBS) AC_SUBST(TCL_SHLIB_SUFFIX) dnl not used, don't export to save symbols AC_SUBST(TCL_DL_LIBS) AC_SUBST(TCL_LD_FLAGS) dnl don't export, not used outside of configure AC_SUBST(TCL_LD_SEARCH_FLAGS) AC_SUBST(TCL_COMPAT_OBJS) AC_SUBST(TCL_RANLIB) AC_SUBST(TCL_BUILD_LIB_SPEC) AC_SUBST(TCL_LIB_SPEC) AC_SUBST(TCL_LIB_VERSIONS_OK) dnl not used, don't export to save symbols dnl AC_SUBST(TCL_SHARED_LIB_SUFFIX) dnl not used, don't export to save symbols dnl AC_SUBST(TCL_UNSHARED_LIB_SUFFIX) ]) AC_DEFUN(CY_AC_PATH_TKCONFIG, [ # # Ok, lets find the tk configuration # First, look for one uninstalled. # the alternative search directory is invoked by --with-tkconfig # if test x"${no_tk}" = x ; then # we reset no_tk in case something fails here no_tk=true AC_ARG_WITH(tkconfig, [ --with-tkconfig=DIR 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 # then check for a private Tk library if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ./tk \ ../tk \ `ls -dr ../tk[[4-9]]* 2>/dev/null` \ ../../tk \ `ls -dr ../../tk[[4-9]]* 2>/dev/null` \ ../../../tk \ `ls -dr ../../../tk[[4-9]]* 2>/dev/null` ; do if test -f "$i/${configdir}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` break fi done fi # check in a few common install locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in `ls -d ${prefix}/lib /usr/lib /usr/local/lib 2>/dev/null` ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i; pwd)` break fi done fi # check in a few other private locations if test x"${ac_cv_c_tkconfig}" = x ; then for i in \ ${srcdir}/../tk \ `ls -dr ${srcdir}/../tk[[4-9]]* 2>/dev/null` ; do if test -f "$i/${configdir}/tkConfig.sh" ; then ac_cv_c_tkconfig=`(cd $i/${configdir}; pwd)` break fi done fi ]) if test x"${ac_cv_c_tkconfig}" = x ; then TKCONFIG="# no Tk configs found" AC_MSG_WARN(Can't find Tk configuration definitions) else no_tk= TKCONFIG=${ac_cv_c_tkconfig}/tkConfig.sh AC_MSG_RESULT(found $TKCONFIG) fi fi ]) AC_DEFUN(CY_AC_LOAD_TKCONFIG, [ if test -f "$TKCONFIG" ; then . $TKCONFIG fi AC_SUBST(TK_VERSION) dnl not actually used, don't export to save symbols dnl AC_SUBST(TK_MAJOR_VERSION) dnl AC_SUBST(TK_MINOR_VERSION) AC_SUBST(TK_DEFS) dnl not used, don't export to save symbols dnl AC_SUBST(TK_LIB_FILE) dnl not used outside of configure dnl AC_SUBST(TK_LIBS) dnl not used, don't export to save symbols dnl AC_SUBST(TK_PREFIX) dnl not used, don't export to save symbols dnl AC_SUBST(TK_EXEC_PREFIX) AC_SUBST(TK_BUILD_INCLUDES) AC_SUBST(TK_XINCLUDES) AC_SUBST(TK_XLIBSW) AC_SUBST(TK_BUILD_LIB_SPEC) AC_SUBST(TK_LIB_SPEC) ])