$OpenBSD: patch-configure,v 1.29 2021/04/28 04:03:24 rsadowski Exp $

Index: configure
--- configure.orig
+++ configure
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
 cat <<EOF
@@ -1322,10 +1322,6 @@ if [ "$pic" = "yes" ] ; then
     [ $SYS = SunOS -a "$ARCH" = "X86" ] && SOFLAGS="$SOFLAGS -mimpure-text"
 fi
 
-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
-    CFLAGS="$CFLAGS -fomit-frame-pointer"
-fi
-
 if [ "$strip" = "yes" ]; then
     LDFLAGS="$LDFLAGS -s"
 fi
@@ -1334,11 +1330,11 @@ if [ "$debug" = "yes" ]; then
     CFLAGS="-O1 -g $CFLAGS"
     RCFLAGS="$RCFLAGS -DDEBUG"
 else
-    CFLAGS="-O3 -ffast-math $CFLAGS"
+    CFLAGS="-ffast-math $CFLAGS"
     if [ "$lto" = "auto" ] && [ $compiler = GNU ] && cc_check "" "-flto" ; then
         lto="yes"
         CFLAGS="$CFLAGS -flto"
-        LDFLAGS="$LDFLAGS -O3 -flto"
+        LDFLAGS="$LDFLAGS -flto"
     fi
 fi
 [ "$lto" = "auto" ] && lto="no"
@@ -1367,10 +1363,6 @@ if cc_check '' -Wshadow ; then
     CFLAGS="-Wshadow $CFLAGS"
 fi
 
-if cc_check '' -Wmaybe-uninitialized ; then
-    CFLAGS="-Wno-maybe-uninitialized $CFLAGS"
-fi
-
 if [ $compiler = GNU ] && cc_check '' -fvisibility=hidden ; then
     CFLAGS="$CFLAGS -fvisibility=hidden"
 fi
@@ -1570,7 +1562,6 @@ if [ "$cli" = "yes" ]; then
 fi
 
 if [ "$shared" = "yes" ]; then
-    API=$(grep '#define X264_BUILD' < ${SRCPATH}/x264.h | cut -f 3 -d ' ')
     if [ "$SYS" = "WINDOWS" -o "$SYS" = "CYGWIN" ]; then
         echo "SONAME=libx264-$API.dll" >> config.mak
         if [ $compiler_style = MS ]; then
@@ -1591,7 +1582,7 @@ if [ "$shared" = "yes" ]; then
     else
         echo "SOSUFFIX=so" >> config.mak
         echo "SONAME=libx264.so.$API" >> config.mak
-        echo "SOFLAGS=-shared -Wl,-soname,\$(SONAME) $SOFLAGS" >> config.mak
+        echo "SOFLAGS=-shared $SOFLAGS" >> config.mak
     fi
     echo 'default: lib-shared' >> config.mak
     echo 'install: install-lib-shared' >> config.mak
