$NetBSD: patch-aa,v 1.6 2020/04/13 19:09:32 joerg Exp $

--- configure.orig	2005-03-02 18:36:35.000000000 +0000
+++ configure
@@ -3230,8 +3230,8 @@ if test "$x_libraries" != "NONE"; then
 fi
 
 # Add some common include and library path's
-CPPFLAGS="$CPPFLAGS -I/usr/local/include -I/usr/X11/include/ -I/usr/X11R6/include/ -I/usr/X11R6/include/X11 -I/usr/openwin/include -I$wprefix/include"
-LDFLAGS="$LDFLAGS -L/usr/local/lib -L/usr/X11/lib -L/usr/X11R6/lib -L/usr/openwin/lib -L$wprefix/lib"
+CPPFLAGS="$CPPFLAGS"
+LDFLAGS="$LDFLAGS"
 
 # Checks for socket and nsl library, required on Solaris systems
 # (reported by Peter da Silva <peter@baileynm.com>)
@@ -3458,35 +3458,7 @@ fi
 libwmfun="no"
 # Checks for wraster lib
 # Extract the first word of "get-wings-flags", so it can be a program name with args.
-set dummy get-wings-flags; 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_wraster+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  case $wraster in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_wraster="$wraster" # 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_wraster="$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
-
-  ;;
-esac
-fi
-wraster=$ac_cv_path_wraster
+wraster="pkg-config wrlib WUtil"
 
 if test -n "$wraster"; then
   echo "$as_me:$LINENO: result: $wraster" >&5
@@ -3497,7 +3469,7 @@ echo "${ECHO_T}no" >&6
 fi
 
 if test -n "$wraster"; then
-        WRASTERLIBS=`($wraster --ldflags --libs 2>/dev/null || $wraster --lflags --libs) | xargs`
+        WRASTERLIBS=`$wraster --libs`
         WRASTERINCLUDES=`$wraster --cflags`
         MKPREVIEW="mkpreview"
         OLD_LDFLAGS="$LDFLAGS"
