$OpenBSD: patch-configure,v 1.14 2016/06/24 14:06:27 robert Exp $
--- configure.orig.port	Thu Jun 23 19:25:16 2016
+++ configure	Thu Jun 23 19:37:51 2016
@@ -1,4 +1,4 @@
-#! /bin/sh
+#!/usr/bin/env bash
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.68 for LibreOffice 5.1.4.2.
 #
@@ -245,7 +245,7 @@ $0: the script under such a shell if you do have one."
 fi
 fi
 fi
-SHELL=${CONFIG_SHELL-/bin/sh}
+SHELL=${CONFIG_SHELL-/usr/bin/env bash}
 export SHELL
 # Unset more variables known to interfere with behavior of common tools.
 CLICOLOR_FORCE= GREP_OPTIONS=
@@ -5971,6 +5971,7 @@ openbsd*)
     test_gtk=yes
     test_tde=yes
     test_freetype=yes
+    test_kde4=yes
     PTHREAD_CFLAGS="-D_THREAD_SAFE"
     PTHREAD_LIBS="-pthread"
     _os=OpenBSD
@@ -10407,7 +10408,7 @@ fi
 # Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers.
 # NOTE: must _not_ be used for bundled external libraries!
 ISYSTEM=
-if test "$GCC" = "yes"; then
+if test "$GCC" = "yes" -a "$_os" != "OpenBSD" ; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -isystem " >&5
 $as_echo_n "checking for -isystem ... " >&6; }
     save_CFLAGS=$CFLAGS
@@ -23130,7 +23131,7 @@ if ${am_cv_pathless_PYTHON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-	for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+	for am_cv_pathless_PYTHON in python python3.4 python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
 	  test "$am_cv_pathless_PYTHON" = none && break
 	  prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
@@ -23396,7 +23397,7 @@ if ${am_cv_pathless_PYTHON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-	for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+	for am_cv_pathless_PYTHON in python python3.4 python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
 	  test "$am_cv_pathless_PYTHON" = none && break
 	  prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
@@ -23681,7 +23682,7 @@ if ${am_cv_pathless_PYTHON+:} false; then :
   $as_echo_n "(cached) " >&6
 else
 
-	for am_cv_pathless_PYTHON in python python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
+	for am_cv_pathless_PYTHON in python python3.4 python2 python3 python3.2 python3.1 python3.0 python2.7  python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do
 	  test "$am_cv_pathless_PYTHON" = none && break
 	  prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
@@ -38032,8 +38033,8 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE
     qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes"
     qt_libdirs="$QT4LIB /usr/lib/qt4 /usr/lib $x_libraries"
 
-    kde_incdirs="/usr/include /usr/include/kde4 $x_includes"
-    kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
+    kde_incdirs="$KDE4INC /usr/include /usr/include/kde4 $x_includes"
+    kde_libdirs="$KDE4LIB /usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries"
 
     if test -n "$supports_multilib"; then
         qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
@@ -38058,11 +38059,11 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE
     fi
 
     if test -n "$KDEDIR"; then
-        kde_incdirs="$KDEDIR/include $kde_incdirs"
+        kde_incdirs="$KDEDIR/include/kde $KDEDIR/include $kde_incdirs"
         if test -z "$supports_multilib"; then
-            kde_libdirs="$KDEDIR/lib $kde_libdirs"
+            kde_libdirs="$KDEDIR/lib/kde3 $KDEDIR/lib $kde_libdirs"
         else
-            kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
+            kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib/kde3 $KDEDIR/lib $kde_libdirs"
         fi
     fi
     if test -n "$KDE4DIR"; then
@@ -38192,7 +38193,7 @@ the root of your Qt installation by exporting QT4DIR b
 $as_echo_n "checking for Qt4 libraries... " >&6; }
     qt_lib_dir="no"
     for lib_dir in $qt_libdirs; do
-        if test -r "$lib_dir/$qt_test_library"; then
+        if ls $lib_dir/$qt_test_library* /dev/null 2>&1 >/dev/null; then
             qt_lib_dir="$lib_dir"
             PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH
             break
@@ -38318,7 +38319,7 @@ $as_echo "$kde_incdir" >&6; }
 $as_echo_n "checking for KDE4 libraries... " >&6; }
     kde_libdir="no"
     for kde_check in $kde_libdirs; do
-        if test -r "$kde_check/$kde_test_library"; then
+        if ls $kde_check/$kde_test_library* /dev/null 2>&1 >/dev/null; then
             kde_libdir="$kde_check"
             break
         fi
