$OpenBSD: patch-configure,v 1.26 2019/07/22 06:56:33 ajacoutot 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
@@ -1259,10 +1259,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
@@ -1271,11 +1267,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"
@@ -1304,10 +1300,6 @@ if cc_check '' -Wshadow ; then
     CFLAGS="-Wshadow $CFLAGS"
 fi
 
-if cc_check '' -Wmaybe-uninitialized ; then
-    CFLAGS="-Wno-maybe-uninitialized $CFLAGS"
-fi
-
 if [ $compiler = ICC -o $compiler = ICL ] ; then
     if cc_check 'extras/intel_dispatcher.h' '' 'x264_intel_dispatcher_override();' ; then
         define HAVE_INTEL_DISPATCHER
@@ -1485,7 +1477,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
@@ -1513,7 +1504,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
