$OpenBSD: patch-configure_ac,v 1.23 2021/01/23 09:27:49 ajacoutot Exp $

Index: configure.ac
--- configure.ac.orig
+++ configure.ac
@@ -888,9 +888,7 @@ AC_ARG_ENABLE([optimizations],
               [AS_HELP_STRING([--disable-optimizations], [Don't try to guess what optimization to enable])],
               [], [test x"$enable_debug" != x"no" && enable_optimizations="no"])
 AM_CONDITIONAL([DISABLE_OPTIMIZATIONS], [test x"$enable_optimizations" = x"no"])
-if test x"$enable_optimizations" = x"no"; then
-    DEFAULT_OCFLAGS="O0_CFLAGS"
-else
+if test x"$enable_optimizations" = x"yes"; then
     dnl For multi-pass compilation: never when cross-compiling
     if test x"$cross_compiling" != x"yes"; then
         if test x"$GCC" = x"yes"; then
@@ -911,7 +909,7 @@ AC_SUBST(O0_CFLAGS)
 AC_SUBST(PASS1_CFLAGS)
 AC_SUBST(PASS2_CFLAGS)
 
-test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS="O3_CFLAGS"
+test x"$DEFAULT_OCFLAGS" = x"" && DEFAULT_OCFLAGS=""
 
 
 dnl xineutils.h:dlist_*
@@ -1324,9 +1322,9 @@ t q
 b
 :q
 q"
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libX11.$acl_cv_shlibext"* 2>/dev/null | sed -e \"${soname_script}\"`"
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libX11.$acl_cv_shlibext"* "${x_libraries:-/usr/lib}/libX11.$acl_cv_shlibext"* 2>/dev/null | sed 1q`"
 AC_DEFINE_UNQUOTED([LIBX11_SO], "${x_lib_location:-libX11.$acl_cv_shlibext}", [The soname of libX11, needed for dlopen()])
-x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.$acl_cv_shlibext"*  "${x_libraries:-/usr/lib}/libXv.$acl_cv_shlibext"*  2>/dev/null | sed -e \"${soname_script}\"`"
+x_lib_location="`ls -1 "${x_libraries:-/usr/local/lib}/libXv.$acl_cv_shlibext"*  "${x_libraries:-/usr/lib}/libXv.$acl_cv_shlibext"*  2>/dev/null | sed 1q`"
 AC_DEFINE_UNQUOTED([LIBXV_SO],  "${x_lib_location:-libXv.$acl_cv_shlibext}",  [The soname of libXv, needed for dlopen()])
 
 dnl Does X11 need XLockDisplay () to prevent deadlocks?
