ajacoutot 2effdf8b9c Update to x264-20120520.
from Brad (maintainer)
2012-05-25 07:45:33 +00:00

67 lines
2.2 KiB
Plaintext

$OpenBSD: patch-configure,v 1.11 2012/05/25 07:45:33 ajacoutot Exp $
--- configure.orig Sun May 20 16:45:03 2012
+++ configure Sun May 20 20:09:21 2012
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
cat <<EOF
@@ -921,18 +921,6 @@ fi
cc_check "stdint.h" "" "uint32_t test_vec __attribute__ ((vector_size (16))) = {0,1,2,3};" && define HAVE_VECTOREXT
-if [ "$pic" = "yes" ] ; then
- CFLAGS="$CFLAGS -fPIC"
- ASFLAGS="$ASFLAGS -DPIC"
- # resolve textrels in the x86 asm
- cc_check stdio.h "-shared -Wl,-Bsymbolic" && SOFLAGS="$SOFLAGS -Wl,-Bsymbolic"
- [ $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
CFLAGS="$CFLAGS -s"
LDFLAGS="$LDFLAGS -s"
@@ -943,9 +931,9 @@ if [ "$debug" = "yes" ]; then
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 '' -fno-tree-vectorize ; then
@@ -1093,7 +1081,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 = ICL ]; then
@@ -1121,7 +1108,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 -fPIC $SOFLAGS" >> config.mak
fi
echo 'default: lib-shared' >> config.mak
echo 'install: install-lib-shared' >> config.mak
@@ -1149,7 +1136,7 @@ echo "CLI_LIBX264 = $CLI_LIBX264" >> config.mak
${SRCPATH}/version.sh "${SRCPATH}" >> x264_config.h
-pclibs="-L$libdir -lx264 $libpthread"
+pclibs="-L$libdir -lx264 -lm $libpthread"
cat > x264.pc << EOF
prefix=$prefix