$OpenBSD: patch-configure,v 1.6 2010/05/26 21:18:17 jakemsr Exp $
--- configure.orig	Tue May 11 13:45:10 2010
+++ configure	Thu May 20 10:24:27 2010
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 
 if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
 
@@ -606,25 +606,17 @@ if [ "$avs_input" = "auto" ] ; then
 fi
 
 if [ "$pic" = "yes" ] ; then
-    CFLAGS="$CFLAGS -fPIC"
     ASFLAGS="$ASFLAGS -DPIC"
-    # resolve textrels in the x86 asm
-    cc_check stdio.h -Wl,-Bsymbolic && LDFLAGS="$LDFLAGS -Wl,-Bsymbolic"
 fi
 
-if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
-    CFLAGS="$CFLAGS -s -fomit-frame-pointer"
-    LDFLAGS="$LDFLAGS -s"
-fi
-
 if [ "$debug" = "yes" ]; then
     CFLAGS="-O1 -g $CFLAGS"
 elif [ $ARCH = ARM ]; then
     # arm-gcc-4.2 produces incorrect output with -ffast-math
     # and it doesn't save any speed anyway on 4.4, so disable it
-    CFLAGS="-O3 -fno-fast-math $CFLAGS"
+    CFLAGS="-fno-fast-math $CFLAGS"
 else
-    CFLAGS="-O3 -ffast-math $CFLAGS"
+    CFLAGS="-ffast-math $CFLAGS"
 fi
 
 if cc_check "stdio.h" "" "fseeko(stdin,0,0);" ; then
@@ -663,7 +655,6 @@ DEVNULL=$DEVNULL
 EOF
 
 if [ "$shared" = "yes" ]; then
-    API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
     if [ "$SYS" = "MINGW" ]; then
         echo "SONAME=libx264-$API.dll" >> config.mak
         echo 'IMPLIBNAME=libx264.dll.a' >> config.mak
@@ -679,14 +670,13 @@ if [ "$shared" = "yes" ]; then
     else
         echo "SOSUFFIX=so" >> config.mak
         echo "SONAME=libx264.so.$API" >> config.mak
-        echo 'SOFLAGS=-Wl,-soname,$(SONAME)' >> config.mak
     fi
     echo 'default: $(SONAME)' >> config.mak
 fi
 
 ./version.sh
 
-pclibs="-L$libdir -lx264 $libpthread"
+pclibs="-L$libdir -lx264 -lm $libpthread"
 
 cat > x264.pc << EOF
 prefix=$prefix
