Cleaned up a bunch of stuff around "magicdnull", starting with not

linking it to Tk or X11 graphics.  Added new command "display" which
returns the display type, which is good for finding out if the
display is "NULL".  Added code to allow the wrapper to be defined
for NULL graphics with the Tk console, the main necessities of which
are to remove the "openwrapper" command, and to return immediately
from a number of tag callback functions.
This commit is contained in:
Tim Edwards
2022-03-30 10:55:08 -04:00
parent bfa4272481
commit e675decfc0
8 changed files with 107 additions and 31 deletions
+22 -12
View File
@@ -656,6 +656,7 @@ gr_libs
TCL_LIB_DIR
TCLSH_EXE
WISH_EXE
LIB_SPECS_GRNULL
LIB_SPECS_NOSTUB
LIB_SPECS
INC_SPECS
@@ -6073,8 +6074,7 @@ fi
if test "x$no_x" = "x"; then
usingX11=1
else
echo Unable to find X11---compiling without graphics.
echo Cannot find X11---will attempt to compile anyway.
echo Unable to find X11 or X11 disabled---compiling without graphics.
echo Graphics options will be NULL only!
if test $usingOGL ; then
echo "Cannot use OpenGL/GLX without X11, disabling."
@@ -6084,10 +6084,10 @@ else
echo "Cannot use Cairo without X11, disabling."
usingCairo=
fi
if test $usingTcl ; then
echo "Cannot compile TCL version without X11, disabling."
usingTcl=
fi
# if test $usingTcl ; then
# echo "Cannot compile TCL version without X11, disabling."
# usingTcl=
# fi
fi
# For distributed installs, where the run-time files are installed in a
@@ -7290,13 +7290,15 @@ fi
if test "x$enable_threads" = "xyes" ; then
usingThreads=1
$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
if test $usingX11 ; then
usingThreads=1
$as_echo "#define HAVE_PTHREADS 1" >>confdefs.h
gr_libs="$gr_libs -lpthread"
gr_srcs="$gr_srcs \${X11THREAD_SRCS}"
gr_hsrcs=""
gr_hprog=""
gr_libs="$gr_libs -lpthread"
gr_srcs="$gr_srcs \${X11THREAD_SRCS}"
gr_hsrcs=""
gr_hprog=""
fi
fi
# Check whether --enable-route was given.
@@ -7703,6 +7705,10 @@ else
fi
fi
if test $usingX11 ; then
gr_libs="$gr_libs \${X11_LDFLAGS}"
fi
case $target in
*-linux*)
@@ -7764,6 +7770,7 @@ esac
if test $usingTcl ; then
LIB_SPECS_NOSTUB="${LIB_SPECS}"
LIB_SPECS_GRNULL="${LIB_SPECS}"
# -----------------------------------------------------------------------
#
@@ -7805,9 +7812,11 @@ if test $usingTcl ; then
"${TCL_LIB_DIR}" = "/usr/lib64" -o \
"${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then
LIB_SPECS_NOSTUB="${LIB_SPECS_NOSTUB} ${TCL_LIB_SPEC}"
LIB_SPECS_GRNULL="${LIB_SPECS_GRNULL} ${TCL_LIB_SPEC}"
LIB_SPECS="${LIB_SPECS} ${TCL_STUB_LIB_SPEC}"
else
LIB_SPECS_NOSTUB="${LIB_SPECS_NOSTUB} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
LIB_SPECS_GRNULL="${LIB_SPECS_GRNULL} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_STUB_LIB_SPEC}"
if test "x${loader_run_path}" = "x" ; then
loader_run_path="${TCL_LIB_DIR}"
@@ -8181,6 +8190,7 @@ fi
fi
if test "$GCC" = "yes" ; then
+21 -12
View File
@@ -318,8 +318,7 @@ AC_PATH_XTRA
if test "x$no_x" = "x"; then
usingX11=1
else
echo Unable to find X11---compiling without graphics.
echo Cannot find X11---will attempt to compile anyway.
echo Unable to find X11 or X11 disabled---compiling without graphics.
echo Graphics options will be NULL only!
if test $usingOGL ; then
echo "Cannot use OpenGL/GLX without X11, disabling."
@@ -329,10 +328,10 @@ else
echo "Cannot use Cairo without X11, disabling."
usingCairo=
fi
if test $usingTcl ; then
echo "Cannot compile TCL version without X11, disabling."
usingTcl=
fi
# if test $usingTcl ; then
# echo "Cannot compile TCL version without X11, disabling."
# usingTcl=
# fi
fi
# For distributed installs, where the run-time files are installed in a
@@ -1074,12 +1073,14 @@ AC_ARG_ENABLE(threads,
])
if test "x$enable_threads" = "xyes" ; then
usingThreads=1
AC_DEFINE(HAVE_PTHREADS)
gr_libs="$gr_libs -lpthread"
gr_srcs="$gr_srcs \${X11THREAD_SRCS}"
gr_hsrcs=""
gr_hprog=""
if test $usingX11 ; then
usingThreads=1
AC_DEFINE(HAVE_PTHREADS)
gr_libs="$gr_libs -lpthread"
gr_srcs="$gr_srcs \${X11THREAD_SRCS}"
gr_hsrcs=""
gr_hprog=""
fi
fi
AC_ARG_ENABLE(route,
@@ -1326,6 +1327,10 @@ else
fi
fi
if test $usingX11 ; then
gr_libs="$gr_libs \${X11_LDFLAGS}"
fi
dnl ----------------------------------------------------------------
dnl Define system-specific settings
dnl ----------------------------------------------------------------
@@ -1380,6 +1385,7 @@ esac
if test $usingTcl ; then
LIB_SPECS_NOSTUB="${LIB_SPECS}"
LIB_SPECS_GRNULL="${LIB_SPECS}"
# -----------------------------------------------------------------------
#
@@ -1421,9 +1427,11 @@ if test $usingTcl ; then
"${TCL_LIB_DIR}" = "/usr/lib64" -o \
"${TCL_LIB_DIR}" = "${TK_LIB_DIR}" ; then
LIB_SPECS_NOSTUB="${LIB_SPECS_NOSTUB} ${TCL_LIB_SPEC}"
LIB_SPECS_GRNULL="${LIB_SPECS_GRNULL} ${TCL_LIB_SPEC}"
LIB_SPECS="${LIB_SPECS} ${TCL_STUB_LIB_SPEC}"
else
LIB_SPECS_NOSTUB="${LIB_SPECS_NOSTUB} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
LIB_SPECS_GRNULL="${LIB_SPECS_GRNULL} -L${TCL_LIB_DIR} ${TCL_LIB_SPEC}"
LIB_SPECS="${LIB_SPECS} -L${TCL_LIB_DIR} ${TCL_STUB_LIB_SPEC}"
if test "x${loader_run_path}" = "x" ; then
loader_run_path="${TCL_LIB_DIR}"
@@ -1743,6 +1751,7 @@ if test $usingTcl ; then
AC_SUBST(INC_SPECS)
AC_SUBST(LIB_SPECS)
AC_SUBST(LIB_SPECS_NOSTUB)
AC_SUBST(LIB_SPECS_GRNULL)
AC_SUBST(WISH_EXE)
AC_SUBST(TCLSH_EXE)
AC_SUBST(TCL_LIB_DIR)
+2 -1
View File
@@ -66,6 +66,7 @@ LDDL_FLAGS = ${LDFLAGS} @LDDL_FLAGS@
LD_RUN_PATH = @LD_RUN_PATH@
LIB_SPECS = @LIB_SPECS@
LIB_SPECS_NOSTUB = @LIB_SPECS_NOSTUB@
LIB_SPECS_GRNULL = @LIB_SPECS_GRNULL@
WISH_EXE = @WISH_EXE@
TCL_LIB_DIR = @TCL_LIB_DIR@
MAGIC_VERSION = `cat ../VERSION | cut -d. -f1-2`
@@ -92,7 +93,7 @@ EXEEXT = @EXEEXT@
GR_CFLAGS = @X_CFLAGS@ @gr_cflags@
GR_DFLAGS = @gr_dflags@ -DNDEBUG
GR_LIBS = @gr_libs@ ${X11_LDFLAGS} @X_LIBS@
GR_LIBS = @gr_libs@ @X_LIBS@
GR_SRCS = @gr_srcs@
GR_HELPER_SRCS = @gr_hsrcs@
GR_HELPER_PROG = @gr_hprog@