From: ellson Date: Sun, 21 May 2006 16:43:22 +0000 (+0000) Subject: gdtclft is conditional on HAVE_LIBGD X-Git-Tag: LAST_LIBGRAPH~32^2~6598 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dbd202258f0774fc9698cb95322aecc669f7f971;p=graphviz gdtclft is conditional on HAVE_LIBGD rendergd method in tcldot is conditional on HAVE_LIBGD --- diff --git a/tclpkg/gdtclft/Makefile.am b/tclpkg/gdtclft/Makefile.am index f09627704..33a0cd882 100644 --- a/tclpkg/gdtclft/Makefile.am +++ b/tclpkg/gdtclft/Makefile.am @@ -18,11 +18,13 @@ AM_CFLAGS = @TCL_CFLAGS@ man = gdtclft.n pdf = gdtclft.pdf +if WITH_LIBGD if WITH_TCL pkgtcl_LTLIBRARIES = libgdtclft.la man_MANS = $(man) pdf_DATA = $(pdf) endif +endif libgdtclft_la_SOURCES = gdtclft.c libgdtclft_la_LIBADD = \ diff --git a/tclpkg/tcldot/tcldot.c b/tclpkg/tcldot/tcldot.c index f6e5b672b..b1cc3fc14 100644 --- a/tclpkg/tcldot/tcldot.c +++ b/tclpkg/tcldot/tcldot.c @@ -45,8 +45,10 @@ Tcl_GetString(Tcl_Obj *obj) { #endif ********* */ +#if HAVE_LIBGD extern void *GDHandleTable; extern int Gdtclft_Init(Tcl_Interp *); +#endif #ifndef DISABLE_CODEGENS extern codegen_t TK_CodeGen; @@ -1101,6 +1103,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, gvjobs_delete(gvc); return TCL_OK; +#if HAVE_LIBGD } else if ((c == 'r') && (strncmp(argv[1], "rendergd", length) == 0)) { void **hdl; @@ -1135,6 +1138,7 @@ static int graphcmd(ClientData clientData, Tcl_Interp * interp, gvjobs_delete(gvc); Tcl_AppendResult(interp, argv[2], (char *) NULL); return TCL_OK; +#endif } else if ((c == 's') && (strncmp(argv[1], "setattributes", length) == 0)) { @@ -1642,7 +1646,9 @@ int Tcldot_Init(Tcl_Interp * interp) return TCL_ERROR; } +#if HAVE_LIBGD Gdtclft_Init(interp); +#endif aginit(); /* set persistent attributes here */