$OpenBSD: patch-build_generic_configure,v 1.7 2012/01/25 15:34:02 ajacoutot Exp $
--- build/generic/configure.orig	Mon May 23 06:22:01 2011
+++ build/generic/configure	Sat Dec 24 11:52:46 2011
@@ -2243,8 +2243,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
 
-API_MAJOR="4"
-API_MINOR="3"
 
 minimum_yasm_major_version=1
 minimum_nasm_minor_version=0
@@ -4333,7 +4331,7 @@ $as_echo "ok" >&6; }
 $as_echo "ok" >&6; }
 	STATIC_LIB="libxvidcore.\$(STATIC_EXTENSION)"
 	SHARED_LIB="libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR).\$(API_MINOR)"
-	SPECIFIC_LDFLAGS="-Wl,-soname,libxvidcore.\$(SHARED_EXTENSION).\$(API_MAJOR) -shared -lc -lm"
+	SPECIFIC_LDFLAGS="-shared -fPIC -lm"
 	SPECIFIC_CFLAGS="-fPIC"
 	;;
      [cC][yY][gG][wW][iI][nN]*|mingw32*|mks*)
@@ -4597,7 +4595,7 @@ $as_echo "macho32" >&6; }
 
        AS="$chosen_asm_prog"
        ASSEMBLY_EXTENSION="asm"
-       AFLAGS="-I\$(<D)/ -I../../src/ -f $NASM_FORMAT $PREFIX $MARK_FUNCS"
+       AFLAGS="-I\$(<D)/ -I../../src/ -I../../src/image/x86_asm/ -f $NASM_FORMAT $PREFIX $MARK_FUNCS"
        ASSEMBLY_SOURCES="SRC_${ARCHITECTURE}"
        if test "$ARCHITECTURE" = "X86_64" ; then
                AFLAGS=${AFLAGS}" -DARCH_IS_X86_64"
@@ -4733,13 +4731,13 @@ done
 if test x"$pthread" = x"yes" ; then
    ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
 if test "x$ac_cv_header_pthread_h" = xyes; then :
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5
-$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -pthread" >&5
+$as_echo_n "checking for pthread_create in -pthread... " >&6; }
 if ${ac_cv_lib_pthread_pthread_create+:} false; then :
   $as_echo_n "(cached) " >&6
 else
   ac_check_lib_save_LIBS=$LIBS
-LIBS="-lpthread  $LIBS"
+LIBS="-pthread  $LIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
@@ -4771,7 +4769,7 @@ fi
 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
 if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then :
   SPECIFIC_CFLAGS="$SPECIFIC_CFLAGS -DHAVE_PTHREAD"
-		 SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -lpthread"
+		 SPECIFIC_LDFLAGS="$SPECIFIC_LDFLAGS -pthread"
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Pthread not supported. No SMP support" >&5
 $as_echo "$as_me: WARNING: Pthread not supported. No SMP support" >&2;}
