changeset 121:d8af32b1b1cd

Switch back to using pixmaps and bitmaps, only use pixbufs for doing XPM conversion.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Sat, 19 Oct 2002 21:48:57 +0000
parents 7d2108cbcd3e
children a05b6fb9c545
files configure configure.in gtk/dw.c
diffstat 3 files changed, 285 insertions(+), 287 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sat Oct 19 11:46:54 2002 +0000
+++ b/configure	Sat Oct 19 21:48:57 2002 +0000
@@ -4221,6 +4221,263 @@
 
   rm -f conf.gtktest
 
+
+# Check whether --with-imlib-prefix or --without-imlib-prefix was given.
+if test "${with_imlib_prefix+set}" = set; then
+  withval="$with_imlib_prefix"
+  imlib_prefix="$withval"
+else
+  imlib_prefix=""
+fi;
+
+# Check whether --with-imlib-exec-prefix or --without-imlib-exec-prefix was given.
+if test "${with_imlib_exec_prefix+set}" = set; then
+  withval="$with_imlib_exec_prefix"
+  imlib_exec_prefix="$withval"
+else
+  imlib_exec_prefix=""
+fi;
+# Check whether --enable-imlibtest or --disable-imlibtest was given.
+if test "${enable_imlibtest+set}" = set; then
+  enableval="$enable_imlibtest"
+
+else
+  enable_imlibtest=yes
+fi;
+
+  if test x$imlib_exec_prefix != x ; then
+     imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
+     if test x${IMLIB_CONFIG+set} != xset ; then
+        IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
+     fi
+  fi
+  if test x$imlib_prefix != x ; then
+     imlib_args="$imlib_args --prefix=$imlib_prefix"
+     if test x${IMLIB_CONFIG+set} != xset ; then
+        IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
+     fi
+  fi
+
+  # Extract the first word of "imlib-config", so it can be a program name with args.
+set dummy imlib-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_IMLIB_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $IMLIB_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_IMLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_path_IMLIB_CONFIG" && ac_cv_path_IMLIB_CONFIG="no"
+  ;;
+esac
+fi
+IMLIB_CONFIG=$ac_cv_path_IMLIB_CONFIG
+
+if test -n "$IMLIB_CONFIG"; then
+  echo "$as_me:$LINENO: result: $IMLIB_CONFIG" >&5
+echo "${ECHO_T}$IMLIB_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  min_imlib_version=1.9.4
+  echo "$as_me:$LINENO: checking for IMLIB - version >= $min_imlib_version" >&5
+echo $ECHO_N "checking for IMLIB - version >= $min_imlib_version... $ECHO_C" >&6
+  no_imlib=""
+  if test "$IMLIB_CONFIG" = "no" ; then
+    no_imlib=yes
+  else
+    GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk`
+    GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk`
+
+    imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
+    imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
+    imlib_micro_version=`$IMLIB_CONFIG $imlib_args --version | \
+           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
+    if test "x$enable_imlibtest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
+      LIBS="$LIBS $GDK_IMLIB_LIBS"
+      rm -f conf.imlibtest
+      if test "$cross_compiling" = yes; then
+  echo $ac_n "cross compiling; assumed OK... $ac_c"
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <gdk_imlib.h>
+
+int main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.gdkimlibtest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_imlib_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_imlib_version");
+     exit(1);
+   }
+
+    if (($imlib_major_version > major) ||
+        (($imlib_major_version == major) && ($imlib_minor_version > minor)) ||
+	(($imlib_major_version == major) && ($imlib_minor_version == minor) &&
+	($imlib_micro_version >= micro)))
+    {
+      return 0;
+    }
+  else
+    {
+      printf("\n*** 'imlib-config --version' returned %d.%d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version, $imlib_micro_version);
+      printf("*** of IMLIB required is %d.%d.%d. If imlib-config is correct, then it is\n", major, minor, micro);
+      printf("*** best to upgrade to the required version.\n");
+      printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
+      printf("*** to point to the correct copy of imlib-config, and remove the file\n");
+      printf("*** config.cache before re-running configure\n");
+      return 1;
+    }
+}
+
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+( exit $ac_status )
+no_imlib=yes
+fi
+rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_imlib" = x ; then
+     echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+     cat >>confdefs.h <<\_ACEOF
+#define USE_IMLIB 1
+_ACEOF
+
+  else
+     echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+     if test "$IMLIB_CONFIG" = "no" ; then
+       echo "*** The imlib-config script installed by IMLIB could not be found"
+       echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
+       echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
+       echo "*** full path to imlib-config."
+     else
+       if test -f conf.gdkimlibtest ; then
+        :
+       else
+          echo "*** Could not run IMLIB test program, checking why..."
+          CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
+          LIBS="$LIBS $GDK_IMLIB_LIBS"
+          cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#include <stdio.h>
+#include <gdk_imlib.h>
+
+#ifdef F77_DUMMY_MAIN
+#  ifdef __cplusplus
+     extern "C"
+#  endif
+   int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+ return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+   echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
+          echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+	  echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
+else
+  echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
+          echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
+          echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GDK_IMLIB_CFLAGS=""
+     GDK_IMLIB_LIBS=""
+     { { echo "$as_me:$LINENO: error: IMLIB not found or too old. Dynamic Windows cannot build without it." >&5
+echo "$as_me: error: IMLIB not found or too old. Dynamic Windows cannot build without it." >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+
+
+  rm -f conf.gdkimlibtest
+
 else
   GTK_CFLAGS=`$PKG_CFG --cflags gtk+-2.0 gthread-2.0`
   GTK_LIBS=`$PKG_CFG --libs gtk+-2.0 gthread-2.0`
@@ -4525,264 +4782,6 @@
 fi
 
 
-
-# Check whether --with-imlib-prefix or --without-imlib-prefix was given.
-if test "${with_imlib_prefix+set}" = set; then
-  withval="$with_imlib_prefix"
-  imlib_prefix="$withval"
-else
-  imlib_prefix=""
-fi;
-
-# Check whether --with-imlib-exec-prefix or --without-imlib-exec-prefix was given.
-if test "${with_imlib_exec_prefix+set}" = set; then
-  withval="$with_imlib_exec_prefix"
-  imlib_exec_prefix="$withval"
-else
-  imlib_exec_prefix=""
-fi;
-# Check whether --enable-imlibtest or --disable-imlibtest was given.
-if test "${enable_imlibtest+set}" = set; then
-  enableval="$enable_imlibtest"
-
-else
-  enable_imlibtest=yes
-fi;
-
-  if test x$imlib_exec_prefix != x ; then
-     imlib_args="$imlib_args --exec-prefix=$imlib_exec_prefix"
-     if test x${IMLIB_CONFIG+set} != xset ; then
-        IMLIB_CONFIG=$imlib_exec_prefix/bin/imlib-config
-     fi
-  fi
-  if test x$imlib_prefix != x ; then
-     imlib_args="$imlib_args --prefix=$imlib_prefix"
-     if test x${IMLIB_CONFIG+set} != xset ; then
-        IMLIB_CONFIG=$imlib_prefix/bin/imlib-config
-     fi
-  fi
-
-  # Extract the first word of "imlib-config", so it can be a program name with args.
-set dummy imlib-config; ac_word=$2
-echo "$as_me:$LINENO: checking for $ac_word" >&5
-echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
-if test "${ac_cv_path_IMLIB_CONFIG+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $IMLIB_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_IMLIB_CONFIG="$IMLIB_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_IMLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-
-  test -z "$ac_cv_path_IMLIB_CONFIG" && ac_cv_path_IMLIB_CONFIG="no"
-  ;;
-esac
-fi
-IMLIB_CONFIG=$ac_cv_path_IMLIB_CONFIG
-
-if test -n "$IMLIB_CONFIG"; then
-  echo "$as_me:$LINENO: result: $IMLIB_CONFIG" >&5
-echo "${ECHO_T}$IMLIB_CONFIG" >&6
-else
-  echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-fi
-
-  min_imlib_version=1.9.4
-  echo "$as_me:$LINENO: checking for IMLIB - version >= $min_imlib_version" >&5
-echo $ECHO_N "checking for IMLIB - version >= $min_imlib_version... $ECHO_C" >&6
-  no_imlib=""
-  if test "$IMLIB_CONFIG" = "no" ; then
-    no_imlib=yes
-  else
-    GDK_IMLIB_CFLAGS=`$IMLIB_CONFIG $imlibconf_args --cflags-gdk`
-    GDK_IMLIB_LIBS=`$IMLIB_CONFIG $imlibconf_args --libs-gdk`
-
-    imlib_major_version=`$IMLIB_CONFIG $imlib_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
-    imlib_minor_version=`$IMLIB_CONFIG $imlib_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'`
-    imlib_micro_version=`$IMLIB_CONFIG $imlib_args --version | \
-           sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'`
-    if test "x$enable_imlibtest" = "xyes" ; then
-      ac_save_CFLAGS="$CFLAGS"
-      ac_save_LIBS="$LIBS"
-      CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
-      LIBS="$LIBS $GDK_IMLIB_LIBS"
-      rm -f conf.imlibtest
-      if test "$cross_compiling" = yes; then
-  echo $ac_n "cross compiling; assumed OK... $ac_c"
-else
-  cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <gdk_imlib.h>
-
-int main ()
-{
-  int major, minor, micro;
-  char *tmp_version;
-
-  system ("touch conf.gdkimlibtest");
-
-  /* HP/UX 9 (%@#!) writes to sscanf strings */
-  tmp_version = g_strdup("$min_imlib_version");
-  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
-     printf("%s, bad version string\n", "$min_imlib_version");
-     exit(1);
-   }
-
-    if (($imlib_major_version > major) ||
-        (($imlib_major_version == major) && ($imlib_minor_version > minor)) ||
-	(($imlib_major_version == major) && ($imlib_minor_version == minor) &&
-	($imlib_micro_version >= micro)))
-    {
-      return 0;
-    }
-  else
-    {
-      printf("\n*** 'imlib-config --version' returned %d.%d.%d, but the minimum version\n", $imlib_major_version, $imlib_minor_version, $imlib_micro_version);
-      printf("*** of IMLIB required is %d.%d.%d. If imlib-config is correct, then it is\n", major, minor, micro);
-      printf("*** best to upgrade to the required version.\n");
-      printf("*** If imlib-config was wrong, set the environment variable IMLIB_CONFIG\n");
-      printf("*** to point to the correct copy of imlib-config, and remove the file\n");
-      printf("*** config.cache before re-running configure\n");
-      return 1;
-    }
-}
-
-
-_ACEOF
-rm -f conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  :
-else
-  echo "$as_me: program exited with status $ac_status" >&5
-echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
-( exit $ac_status )
-no_imlib=yes
-fi
-rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-       CFLAGS="$ac_save_CFLAGS"
-       LIBS="$ac_save_LIBS"
-     fi
-  fi
-  if test "x$no_imlib" = x ; then
-     echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6
-     cat >>confdefs.h <<\_ACEOF
-#define USE_IMLIB 1
-_ACEOF
-
-  else
-     echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-     if test "$IMLIB_CONFIG" = "no" ; then
-       echo "*** The imlib-config script installed by IMLIB could not be found"
-       echo "*** If IMLIB was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the IMLIB_CONFIG environment variable to the"
-       echo "*** full path to imlib-config."
-     else
-       if test -f conf.gdkimlibtest ; then
-        :
-       else
-          echo "*** Could not run IMLIB test program, checking why..."
-          CFLAGS="$CFLAGS $GDK_IMLIB_CFLAGS"
-          LIBS="$LIBS $GDK_IMLIB_LIBS"
-          cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#include <gdk_imlib.h>
-
-#ifdef F77_DUMMY_MAIN
-#  ifdef __cplusplus
-     extern "C"
-#  endif
-   int F77_DUMMY_MAIN() { return 1; }
-#endif
-int
-main ()
-{
- return 0;
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
-  (eval $ac_link) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-         { ac_try='test -s conftest$ac_exeext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-   echo "*** The test program compiled, but did not run. This usually means"
-          echo "*** that the run-time linker is not finding IMLIB or finding the wrong"
-          echo "*** version of IMLIB. If it is not finding IMLIB, you'll need to set your"
-          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
-          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
-          echo "*** is required on your system"
-	  echo "***"
-          echo "*** If you have an old version installed, it is best to remove it, although"
-          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"
-else
-  echo "$as_me: failed program was:" >&5
-cat conftest.$ac_ext >&5
- echo "*** The test program failed to compile or link. See the file config.log for the"
-          echo "*** exact error that occured. This usually means IMLIB was incorrectly installed"
-          echo "*** or that you have moved IMLIB since it was installed. In the latter case, you"
-          echo "*** may want to edit the imlib-config script: $IMLIB_CONFIG"
-fi
-rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
-          CFLAGS="$ac_save_CFLAGS"
-          LIBS="$ac_save_LIBS"
-       fi
-     fi
-     GDK_IMLIB_CFLAGS=""
-     GDK_IMLIB_LIBS=""
-     { { echo "$as_me:$LINENO: error: IMLIB not found or too old. Dynamic Windows cannot build without it." >&5
-echo "$as_me: error: IMLIB not found or too old. Dynamic Windows cannot build without it." >&2;}
-   { (exit 1); exit 1; }; }
-  fi
-
-
-  rm -f conf.gdkimlibtest
-
-
 CFLAGS="$CFLAGS $GTK_CFLAGS $GDK_IMLIB_FLAGS"
 LIBS="$LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS"
 
--- a/configure.in	Sat Oct 19 11:46:54 2002 +0000
+++ b/configure.in	Sat Oct 19 21:48:57 2002 +0000
@@ -53,6 +53,7 @@
 if test x"$PKG_CFG" = x; then
   AM_PATH_GLIB(1.2.0,,AC_MSG_ERROR(AC_MSG_ERROR(Cannot find GLIB: Is glib-config in path?)))
   AM_PATH_GTK(1.2.0,,AC_MSG_ERROR(AC_MSG_ERROR(Cannot find GTK: Is gtk-config in path?)), gthread)
+  AM_PATH_GDK_IMLIB(1.9.4, AC_DEFINE(USE_IMLIB), AC_MSG_ERROR(IMLIB not found or too old. Dynamic Windows cannot build without it.))
 else
   GTK_CFLAGS=`$PKG_CFG --cflags gtk+-2.0 gthread-2.0`
   GTK_LIBS=`$PKG_CFG --libs gtk+-2.0 gthread-2.0`
@@ -68,8 +69,6 @@
   )
 )
 
-AM_PATH_GDK_IMLIB(1.9.4, AC_DEFINE(USE_IMLIB), AC_MSG_ERROR(IMLIB not found or too old. Dynamic Windows cannot build without it.))
-
 CFLAGS="$CFLAGS $GTK_CFLAGS $GDK_IMLIB_FLAGS"
 LIBS="$LIBS $GTK_LIBS $PTHREAD_LIBS $GDK_IMLIB_LIBS"
 
--- a/gtk/dw.c	Sat Oct 19 11:46:54 2002 +0000
+++ b/gtk/dw.c	Sat Oct 19 21:48:57 2002 +0000
@@ -538,7 +538,7 @@
 	return TRUE;
 }
 
-GdkPixmap *_find_pixmap(GdkBitmap **bitmap, long id, HWND handle)
+GdkPixmap *_find_pixmap(GdkBitmap **bitmap, long id, HWND handle, unsigned long *userwidth, unsigned long *userheight)
 {
 	char *data = NULL;
 	int z;
@@ -556,11 +556,19 @@
 	{
 		GdkPixmap *icon_pixmap = NULL;
 #if GTK_MAJOR_VERSION > 1
-		icon_pixmap = (GdkPixmap *)gdk_pixbuf_new_from_xpm_data((const char **)data);
+		GdkPixbuf *icon_pixbuf = gdk_pixbuf_new_from_xpm_data((const char **)data);
+
+		if(userwidth)
+			*userwidth = gdk_pixbuf_get_width(icon_pixbuf);
+		if(userheight)
+			*userheight = gdk_pixbuf_get_height(icon_pixbuf);
+      
+		gdk_pixbuf_render_pixmap_and_mask(icon_pixbuf, &icon_pixmap, bitmap, 1);
+		g_object_unref(icon_pixbuf);
 #elif defined(USE_IMLIB)
 		gdk_imlib_data_to_pixmap((char **)data, &icon_pixmap, bitmap);
 #else
-		icon_pixmap = gdk_pixmap_create_from_xpm_d(handle->window, bitmap, &_colors[DW_CLR_PALEGRAY], &data);
+		icon_pixmap = gdk_pixmap_create_from_xpm_d(handle->window, bitmap, &_colors[DW_CLR_PALEGRAY], (char **)data);
 #endif
 		return icon_pixmap;
 	}
@@ -1470,20 +1478,21 @@
  */
 HWND dw_bitmap_new(unsigned long id)
 {
+#if GTK_MAJOR_VERSION < 2
 	GdkPixmap *pixmap = NULL;
 	GdkBitmap *bitmap = NULL;
-	GtkWidget *tmp;
 	static char * test_xpm[] = {
 		"1 1 2 1",
 		"	c None",
 		".	c #FFFFFF",
 		"."};
+#endif
+	GtkWidget *tmp;
 	int _locked_by_me = FALSE;
 
 	DW_MUTEX_LOCK;
 #if GTK_MAJOR_VERSION > 1
-	pixmap = (GdkPixmap *)gdk_pixbuf_new_from_xpm_data((const char **)test_xpm);
-	tmp = gtk_image_new_from_pixbuf((GdkPixbuf *)pixmap);
+	tmp = gtk_image_new();
 #elif defined(USE_IMLIB)
 	gdk_imlib_data_to_pixmap(test_xpm, &pixmap, &bitmap);
 #else
@@ -2256,14 +2265,10 @@
 	int _locked_by_me = FALSE;
 
 	DW_MUTEX_LOCK;
-	icon_pixmap = _find_pixmap(&bitmap, id, handle);
+	icon_pixmap = _find_pixmap(&bitmap, id, handle, NULL, NULL);
 
 	if(handle->window && icon_pixmap)
-#if GTK_MAJOR_VERSION > 1
-		gtk_window_set_icon(GTK_WINDOW(handle), (GdkPixbuf *)icon_pixmap);
-#else
 		gdk_window_set_icon(handle->window, NULL, icon_pixmap, bitmap);
-#endif
 
 	DW_MUTEX_UNLOCK;
 }
@@ -2281,10 +2286,10 @@
 	int _locked_by_me = FALSE;
 
 	DW_MUTEX_LOCK;
-	tmp = _find_pixmap(&bitmap, id, handle);
+	tmp = _find_pixmap(&bitmap, id, handle, NULL, NULL);
 	if(tmp)
 #if GTK_MAJOR_VERSION > 1
-		gtk_image_set_from_pixbuf(GTK_IMAGE(handle), (GdkPixbuf *)tmp);
+		gtk_image_set_from_pixmap(GTK_IMAGE(handle), tmp, bitmap);
 #else
 		gtk_pixmap_set(GTK_PIXMAP(handle), tmp, bitmap);
 #endif
@@ -3070,9 +3075,9 @@
 	gtk_object_set_data(GTK_OBJECT(newitem), "tree", (gpointer)tree);
 	hbox = gtk_hbox_new(FALSE, 2);
 	gtk_object_set_data(GTK_OBJECT(newitem), "hbox", (gpointer)hbox);
-	gdkpix = _find_pixmap(&gdkbmp, icon, hbox);
+	gdkpix = _find_pixmap(&gdkbmp, icon, hbox, NULL, NULL);
 #if GTK_MAJOR_VERSION > 1
-	pixmap = gtk_image_new_from_pixbuf((GdkPixbuf *)gdkbmp);
+	pixmap = gtk_image_new_from_pixmap(gdkpix, gdkbmp);
 #else
 	pixmap = gtk_pixmap_new(gdkpix, gdkbmp);
 #endif
@@ -3159,9 +3164,9 @@
 	gtk_object_set_data(GTK_OBJECT(item), "tree", (gpointer)tree);
 	hbox = gtk_hbox_new(FALSE, 2);
 	gtk_object_set_data(GTK_OBJECT(item), "hbox", (gpointer)hbox);
-	gdkpix = _find_pixmap(&gdkbmp, icon, hbox);
+	gdkpix = _find_pixmap(&gdkbmp, icon, hbox, NULL, NULL);
 #if GTK_MAJOR_VERSION > 1
-	pixmap = gtk_image_new_from_pixbuf((GdkPixbuf *)gdkbmp);
+	pixmap = gtk_image_new_from_pixmap(gdkpix, gdkbmp);
 #else
 	pixmap = gtk_pixmap_new(gdkpix, gdkbmp);
 #endif
@@ -3244,9 +3249,9 @@
 	gtk_widget_destroy(hbox);
 	hbox = gtk_hbox_new(FALSE, 2);
 	gtk_object_set_data(GTK_OBJECT(item), "hbox", (gpointer)hbox);
-	gdkpix = _find_pixmap(&gdkbmp, icon, hbox);
+	gdkpix = _find_pixmap(&gdkbmp, icon, hbox, NULL, NULL);
 #if GTK_MAJOR_VERSION > 1
-	pixmap = gtk_image_new_from_pixbuf((GdkPixbuf *)gdkbmp);
+	pixmap = gtk_image_new_from_pixmap(gdkpix, gdkbmp);
 #else
 	pixmap = gtk_pixmap_new(gdkpix, gdkbmp);
 #endif
@@ -3605,12 +3610,10 @@
 	{
 		long hicon = *((long *)data);
 		GdkBitmap *bitmap = NULL;
-		GdkPixmap *pixmap = _find_pixmap(&bitmap, hicon, clist);
-
-#if GTK_MAJOR_VERSION < 2
+		GdkPixmap *pixmap = _find_pixmap(&bitmap, hicon, clist, NULL, NULL);
+
 		if(pixmap)
 			gtk_clist_set_pixmap(GTK_CLIST(clist), row, column, pixmap, bitmap);
-#endif
 	}
 	else if(flag & DW_CFA_STRING)
 	{
@@ -4315,15 +4318,12 @@
 
 
 	DW_MUTEX_LOCK;
-	pixmap->pixmap = _find_pixmap(&bitmap, id, handle);
+	pixmap->pixmap = _find_pixmap(&bitmap, id, handle, &pixmap->width, &pixmap->height);
 	if(pixmap->pixmap)
 	{
 #if GTK_MAJOR_VERSION < 2
 		GdkPixmapPrivate *pvt = (GdkPixmapPrivate *)pixmap->pixmap;
 		pixmap->width = pvt->width; pixmap->height = pvt->height;
-#else
-		pixmap->width = gdk_pixbuf_get_width((GdkPixbuf *)pixmap->pixmap);
-		pixmap->height = gdk_pixbuf_get_height((GdkPixbuf *)pixmap->pixmap);
 #endif
 	}
 	DW_MUTEX_UNLOCK;