$NetBSD$

--- configure.orig	2011-12-19 14:16:11.000000000 +0000
+++ configure
@@ -18927,7 +18927,7 @@ fi
 fi
 
 
-if test "x$enable_broadway_backend" == xyes; then
+if test "x$enable_broadway_backend" = xyes; then
   GDK_BACKENDS="$GDK_BACKENDS broadway"
   cairo_backends="$cairo_backends cairo"
   GDK_WINDOWING="$GDK_WINDOWING
@@ -18952,7 +18952,7 @@ fi
 
 fi
 
-if test "x$enable_wayland_backend" == "xyes"; then
+if test "x$enable_wayland_backend" = "xyes"; then
   # Wayland uses cairo-gl
   cairo_backends="$cairo_backends cairo-gl"
   GDK_BACKENDS="$GDK_BACKENDS wayland"
@@ -22056,7 +22056,7 @@ _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-       X_LIBS="$X_LIBS -R$x_libraries"
+       X_LIBS="$X_LIBS ${COMPILER_RPATH_FLAG}$x_libraries"
 else
   LIBS="$ac_xsave_LIBS -R $x_libraries"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
