]> granicus.if.org Git - graphviz/commitdiff
gdtclft is conditional on HAVE_LIBGD
authorellson <devnull@localhost>
Sun, 21 May 2006 16:43:22 +0000 (16:43 +0000)
committerellson <devnull@localhost>
Sun, 21 May 2006 16:43:22 +0000 (16:43 +0000)
rendergd method in tcldot is conditional on HAVE_LIBGD

tclpkg/gdtclft/Makefile.am
tclpkg/tcldot/tcldot.c

index f096277043b6a2c7b5b8f4a5b18d32881a173ad7..33a0cd8828a5d7997492645b77f891f64bc840ed 100644 (file)
@@ -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 = \
index f6e5b672b343f8eff3492081a2dd8498f1b9d323..b1cc3fc14c4d5e705795351df1b892262eb162c9 100644 (file)
@@ -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 */