--- xsane-0.68/configure.orig	Sat Dec 16 05:11:55 2000
+++ xsane-0.68/configure	Tue Dec 26 20:36:44 2000
@@ -4423,8 +4423,8 @@
       gimp_config_micro_version=0
     fi
   else
-    GIMP_CFLAGS="-I"`$GIMP_CONFIG $gimp_config_args --includedir`
-    GIMP_LIBS="-L"`$GIMP_CONFIG $gimp_config_args --libdir`" -lgimp"
+    GIMP_CFLAGS=`$GIMP_CONFIG $gimp_config_args --cflags`
+    GIMP_LIBS=`$GIMP_CONFIG $gimp_config_args --libs`
     gimp_config_major_version=`$GIMP_CONFIG $gimp_config_args --version | \
            sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'`
     gimp_config_minor_version=`$GIMP_CONFIG $gimp_config_args --version | \
@@ -4545,21 +4545,23 @@
        echo "$ac_t""not tested" 1>&6
      fi
      if test "$GIMP_CONFIG" != "no" ; then
+       saved_CPPFLAGS="${CPPFLAGS}"
+       CPPFLAGS="${CPPFLAGS} ${GIMP_CFLAGS}"
        for ac_hdr in libgimp/gimp.h
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4553: checking for $ac_hdr" >&5
+echo "configure:4555: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4558 "configure"
+#line 4560 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4563: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4589,17 +4591,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4593: checking for $ac_hdr" >&5
+echo "configure:4595: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4598 "configure"
+#line 4600 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4603: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4605: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4625,6 +4627,7 @@
 fi
 done
 
+       CPPFLAGS="${saved_CPPFLAGS}"
      fi
      HAVE_GIMP=yes     
   else
@@ -4636,7 +4639,7 @@
         CFLAGS="$CFLAGS $GIMP_CFLAGS"
         LIBS="$LIBS $GIMP_LIBS"
         cat > conftest.$ac_ext <<EOF
-#line 4640 "configure"
+#line 4643 "configure"
 #include "confdefs.h"
 
 #include <libgimp/gimp.h>
@@ -4646,7 +4649,7 @@
  return ((gimp_major_version) || (gimp_minor_version) || (gimp_micro_version)); 
 ; return 0; }
 EOF
-if { (eval echo configure:4650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
    echo "*** The test program compiled, but did not run. This usually means"
         echo "*** that the run-time linker is not finding GIMP or finding the wrong"
@@ -4695,17 +4698,17 @@
 do
 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4699: checking for $ac_hdr" >&5
+echo "configure:4702: checking for $ac_hdr" >&5
 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
   cat > conftest.$ac_ext <<EOF
-#line 4704 "configure"
+#line 4707 "configure"
 #include "confdefs.h"
 #include <$ac_hdr>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
 if test -z "$ac_err"; then
   rm -rf conftest*
@@ -4726,7 +4729,7 @@
 #define $ac_tr_hdr 1
 EOF
  echo $ac_n "checking for png_create_info_struct in -lpng""... $ac_c" 1>&6
-echo "configure:4730: checking for png_create_info_struct in -lpng" >&5
+echo "configure:4733: checking for png_create_info_struct in -lpng" >&5
 ac_lib_var=`echo png'_'png_create_info_struct | sed 'y%./+-%__p_%'`
 if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
@@ -4734,7 +4737,7 @@
   ac_save_LIBS="$LIBS"
 LIBS="-lpng ${GTK_LIBS} $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 4738 "configure"
+#line 4741 "configure"
 #include "confdefs.h"
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
@@ -4745,7 +4748,7 @@
 png_create_info_struct()
 ; return 0; }
 EOF
-if { (eval echo configure:4749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=yes"
 else
--- xsane-0.68/aclocal.m4.orig	Sat Dec 16 05:11:53 2000
+++ xsane-0.68/aclocal.m4	Tue Dec 26 20:36:26 2000
@@ -218,8 +218,8 @@
       gimp_config_micro_version=0
     fi
   else
-    GIMP_CFLAGS="-I"`$GIMP_CONFIG $gimp_config_args --includedir`
-    GIMP_LIBS="-L"`$GIMP_CONFIG $gimp_config_args --libdir`" -lgimp"
+    GIMP_CFLAGS=`$GIMP_CONFIG $gimp_config_args --cflags`
+    GIMP_LIBS=`$GIMP_CONFIG $gimp_config_args --libs`
     gimp_config_major_version=`$GIMP_CONFIG $gimp_config_args --version | \
            sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
     gimp_config_minor_version=`$GIMP_CONFIG $gimp_config_args --version | \
@@ -324,8 +324,11 @@
        AC_MSG_RESULT(not tested)
      fi
      if test "$GIMP_CONFIG" != "no" ; then
+       saved_CPPFLAGS="${CPPFLAGS}"
+       CPPFLAGS="${CPPFLAGS} ${GIMP_CFLAGS}"
        AC_CHECK_HEADERS(libgimp/gimp.h)
        AC_CHECK_HEADERS(libgimp/gimpfeatures.h)
+       CPPFLAGS="${saved_CPPFLAGS}"
      fi
      ifelse([$2], , :, [$2])     
   else
