]> git.webhop.me Git - lcd4linux.git/commitdiff
[lcd4linux @ 2006-06-20 08:50:58 by reinelt]
authorreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Tue, 20 Jun 2006 08:50:59 +0000 (08:50 +0000)
committerreinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f>
Tue, 20 Jun 2006 08:50:59 +0000 (08:50 +0000)
widget_image linker error hopefully finally fixed

git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@663 3ae390bd-cb1e-0410-b409-cd5a39f66f1f

config.h.in
configure
drivers.m4
drv_generic_graphic.c
widget_image.c

index 278b78b7bc7470b8c37d8133b604d9b8b8f45bd6..9ec12f4f06643254c262a2c8cc5f32254aa540dd 100644 (file)
 /* I2C bus driver */
 #undef WITH_I2C
 
+/* image widget */
+#undef WITH_IMAGE
+
 /* LCD2USB driver */
 #undef WITH_LCD2USB
 
 /* NULL driver */
 #undef WITH_NULL
 
-/* driver */
+/* PNG driver */
 #undef WITH_PNG
 
-/* driver */
+/* PPM driver */
 #undef WITH_PPM
 
 /* RouterBoard driver */
index 77041906c6252e7b17e4f72bc1059a48d61392a9..a13a35685b6e5d1bf049098421e07d1781a9b5cb 100755 (executable)
--- a/configure
+++ b/configure
@@ -7340,6 +7340,7 @@ echo "${ECHO_T}done" >&6; }
 # generic display drivers
 TEXT="no"
 GRAPHIC="no"
+IMAGE="no"
 GPIO="no"
 
 # generiv I/O drivers
@@ -7579,7 +7580,7 @@ fi
 
 if test "$PNG" = "yes"; then
    if test "$has_gd" = "true"; then
-      GRAPHIC="yes"
+      IMAGE="yes"
 
 cat >>confdefs.h <<\_ACEOF
 #define WITH_PNG 1
@@ -7592,7 +7593,7 @@ echo "$as_me: WARNING: gd.h not found: PNG driver disabled" >&2;}
 fi
 
 if test "$PPM" = "yes"; then
-   GRAPHIC="yes"
+   IMAGE="yes"
 
 cat >>confdefs.h <<\_ACEOF
 #define WITH_PPM 1
@@ -7735,18 +7736,28 @@ echo "$as_me: error: You should activate at least one driver..." >&2;}
    { (exit 1); exit 1; }; }
 fi
 
-
 # generic text driver
 if test "$TEXT" = "yes"; then
    DRIVERS="$DRIVERS drv_generic_text.o"
 fi
 
+# Image driver
+if test "$IMAGE" = "yes"; then
+   GRAPHIC="yes"
+   DRIVERS="$DRIVERS drv_Image.o"
+fi
+
 # generic graphic driver
 if test "$GRAPHIC" = "yes"; then
    DRIVERS="$DRIVERS drv_generic_graphic.o"
    if test "$has_gd" = "true"; then
       DRIVERS="$DRIVERS widget_image.o"
       DRVLIBS="$DRVLIBS -lgd"
+
+cat >>confdefs.h <<\_ACEOF
+#define WITH_IMAGE 1
+_ACEOF
+
    fi
 fi
 
index 8f2565125d0d4ba799067710bb9c1b63c30952d3..78b9907b26c22effe2d3731278a5aef6db8d4152 100644 (file)
@@ -179,6 +179,7 @@ AC_MSG_RESULT([done])
 # generic display drivers
 TEXT="no"
 GRAPHIC="no"
+IMAGE="no"
 GPIO="no"
 
 # generiv I/O drivers
@@ -344,16 +345,16 @@ fi
 
 if test "$PNG" = "yes"; then
    if test "$has_gd" = "true"; then
-      GRAPHIC="yes"
-      AC_DEFINE(WITH_PNG,1,[ driver])
+      IMAGE="yes"
+      AC_DEFINE(WITH_PNG,1,[PNG driver])
    else
       AC_MSG_WARN(gd.h not found: PNG driver disabled)
    fi
 fi
 
 if test "$PPM" = "yes"; then
-   GRAPHIC="yes"
-   AC_DEFINE(WITH_PPM,1,[ driver])
+   IMAGE="yes"
+   AC_DEFINE(WITH_PPM,1,[PPM driver])
 fi
 
 if test "$ROUTERBOARD" = "yes"; then
@@ -450,18 +451,24 @@ if test "$DRIVERS" = ""; then
    AC_MSG_ERROR([You should activate at least one driver...])
 fi
    
-
 # generic text driver
 if test "$TEXT" = "yes"; then
    DRIVERS="$DRIVERS drv_generic_text.o"
 fi
 
+# Image driver
+if test "$IMAGE" = "yes"; then
+   GRAPHIC="yes"
+   DRIVERS="$DRIVERS drv_Image.o"
+fi
+
 # generic graphic driver
 if test "$GRAPHIC" = "yes"; then
    DRIVERS="$DRIVERS drv_generic_graphic.o"
    if test "$has_gd" = "true"; then
       DRIVERS="$DRIVERS widget_image.o"
       DRVLIBS="$DRVLIBS -lgd"
+      AC_DEFINE(WITH_IMAGE, 1, [image widget])
    fi  
 fi
 
index 56de80c31cb384678e360699c15e63582834d8d3..bf11a24c9851bfc0f3f6562586088129fa9285b6 100644 (file)
@@ -23,6 +23,9 @@
  *
  *
  * $Log: drv_generic_graphic.c,v $
+ * Revision 1.28  2006/06/20 08:50:58  reinelt
+ * widget_image linker error hopefully finally fixed
+ *
  * Revision 1.27  2006/04/09 17:46:14  reinelt
  * vertical bar patch fro graphic displays by Ronald Hopfer
  *
@@ -685,9 +688,11 @@ int drv_generic_graphic_init(const char *section, const char *driver)
     widget_register(&wc);
 
     /* register image widget */
+#ifdef WITH_IMAGE
     wc = Widget_Image;
     wc.draw = drv_generic_graphic_image_draw;
     widget_register(&wc);
+#endif
 
     /* clear framebuffer */
     drv_generic_graphic_clear();
index 63e20adc0a8792a102b9e1f8a74a21b92e64ac9d..d4ee1f43732c5dea7fb9c0731ec53b9715266f79 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: widget_image.c,v 1.7 2006/04/15 05:22:52 reinelt Exp $
+/* $Id: widget_image.c,v 1.8 2006/06/20 08:50:59 reinelt Exp $
  *
  * image widget handling
  *
@@ -21,6 +21,9 @@
  *
  *
  * $Log: widget_image.c,v $
+ * Revision 1.8  2006/06/20 08:50:59  reinelt
+ * widget_image linker error hopefully finally fixed
+ *
  * Revision 1.7  2006/04/15 05:22:52  reinelt
  * mpd plugin from Stefan Kuhne
  *
 
 #ifdef HAVE_GD_GD_H
 #include <gd/gd.h>
-#define WITH_GD
 #else
 #ifdef HAVE_GD_H
 #include <gd.h>
-#define WITH_GD
+#else
+#error "gd.h not found!"
+#error "cannot compile image widget"
 #endif
 #endif
 
@@ -85,7 +89,6 @@
 #endif
 
 
-#ifdef WITH_GD
 static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
 {
     int x, y;
@@ -168,7 +171,6 @@ static void widget_image_render(const char *Name, WIDGET_IMAGE * Image)
        }
     }
 }
-#endif
 
 
 static void widget_image_update(void *Self)
@@ -215,10 +217,9 @@ static void widget_image_update(void *Self)
            Image->inverted = Image->inverted > 0;
            DelResult(&result);
        }
-#ifdef WITH_GD
+
        /* render image into bitmap */
        widget_image_render(W->name, Image);
-#endif
 
     }