openbsd-ports/multimedia/x264/patches/patch-configure
ajacoutot 867e47f00d - use -pthread instead of -lpthread when linking
- kill a hardcoded /usr/X11R6 in configure
- generate x264.pc with proper libraries (add -m, use -pthread instead
of -lpthread)

from jakemsr (Jacob Meuser)
2007-04-23 10:20:48 +00:00

58 lines
1.6 KiB
Plaintext

$OpenBSD: patch-configure,v 1.2 2007/04/23 10:20:48 ajacoutot Exp $
--- configure.orig Sun Mar 25 13:45:02 2007
+++ configure Fri Apr 20 13:54:14 2007
@@ -46,7 +46,7 @@ as_check() {
rm -f config.h config.mak x264.pc
-prefix='/usr/local'
+prefix='!!PREFIX!!';
exec_prefix='${prefix}'
bindir='${exec_prefix}/bin'
libdir='${exec_prefix}/lib'
@@ -334,6 +334,9 @@ if test "$pthread" = "auto" ; then
CFLAGS="$CFLAGS -DPTW32_STATIC_LIB"
fi
;;
+ OPENBSD)
+ cc_check pthread.h -pthread && pthread="yes" && libpthread="-pthread"
+ ;;
*)
cc_check pthread.h -lpthread && pthread="yes" && libpthread="-lpthread"
;;
@@ -375,14 +378,14 @@ if [ "$pic" = "yes" ] ; then
fi
if [ "$debug" != "yes" -a "$gprof" != "yes" ]; then
- CFLAGS="$CFLAGS -s -fomit-frame-pointer"
- LDFLAGS="$LDFLAGS -s"
+ CFLAGS="$CFLAGS"
+ LDFLAGS="$LDFLAGS"
fi
if [ "$debug" = "yes" ]; then
CFLAGS="-O1 -g $CFLAGS"
else
- CFLAGS="-O4 -ffast-math $CFLAGS"
+ CFLAGS="-ffast-math $CFLAGS"
fi
if cc_check "stdio.h" "" "fseeko(stdin,0,0);" ; then
@@ -426,7 +429,6 @@ echo '' >> config.mak
cp config.mak gtk/config.mak
if [ "$shared" = "yes" ]; then
- API=$(grep '#define X264_BUILD' < x264.h | cut -f 3 -d ' ')
echo "SONAME=libx264.so.$API" >> config.mak
echo 'default: $(SONAME)' >> config.mak
if [ "$gtk" = "yes" ]; then
@@ -441,7 +443,7 @@ fi
./version.sh
-pclibs="-L$libdir -lx264 $libpthread"
+pclibs="-L$libdir -lx264 -lm $libpthread"
cat > x264.pc << EOF
prefix=$prefix