File libbluray-autotools.patch of Package libbluray.3101

--- libbluray-0.4.0.orig/configure.ac
+++ libbluray-0.4.0/configure.ac
@@ -99,8 +99,9 @@ AC_ARG_WITH([bdj-bootclasspath],
   [BDJ_BOOTCLASSPATH=])
 
 dnl required programs
-AC_PROG_CC
-AC_PROG_LIBTOOL
+AC_PROG_CC_STDC
+AC_USE_SYSTEM_EXTENSIONS
+LT_INIT([disable-static pic-only])
 
 dnl required types
 AC_TYPE_SIGNAL
@@ -115,23 +116,12 @@ AC_STRUCT_DIRENT_D_TYPE
 
 dnl required system services
 AC_SYS_LARGEFILE
+AC_FUNC_FSEEKO
 
 dnl required functions
 AC_CHECK_FUNC([snprintf],, [AC_MSG_ERROR($function_not_found)])
 
-dnl required libraries
-dnl pthreads (not on win32)
-AS_IF([test "${SYS}" != "mingw32"], [
-  AC_CHECK_HEADERS([pthread.h], ,
-    [AC_MSG_ERROR([pthread required])])
-  AC_SEARCH_LIBS([pthread_create], [pthread], ,
-    [AC_MSG_ERROR([pthread required])])
-  AC_SEARCH_LIBS([dlopen], [dl])
-  DLOPEN_LIBS="$ac_cv_search_dlopen"
-  AS_CASE([$DLOPEN_LIBS],
-    [no|none\ required], [DLOPEN_LIBS=""])
-  AC_SUBST([DLOPEN_LIBS])
-])
+AC_CHECK_HEADERS_ONCE([pthread.h])
 
 dnl libxml2 for metadata parser
 AS_IF([test "x$with_libxml2" != "xno"], [
--- libbluray-0.4.0.orig/src/Makefile.am
+++ libbluray-0.4.0/src/Makefile.am
@@ -1,7 +1,7 @@
-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
 SET_INCLUDES = -I$(top_srcdir) -Ifile -Ilibbluray -Ilibbluray/bdnav
 
-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES) $(LIBXML2_CFLAGS) $(FT2_CFLAGS)
+AM_CFLAGS = -pthread $(LIBXML2_CFLAGS) $(FT2_CFLAGS)
+AM_CPPFLAGS = $(SET_INCLUDES) -include config.h
 
 EXTRA_DIST = \
        libbluray/bdj/build.xml \
@@ -109,8 +109,8 @@ endif
 endif
 
 
-libbluray_la_LDFLAGS= -version-info $(LT_VERSION_INFO)
-libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS)
+libbluray_la_LDFLAGS= -no-undefined -version-info $(LT_VERSION_INFO)
+libbluray_la_LIBADD= $(LIBXML2_LIBS) $(FT2_LIBS) -ldl
 
 pkginclude_HEADERS = \
 	file/filesystem.h \
--- libbluray-0.4.0.orig/src/examples/Makefile.am
+++ libbluray-0.4.0/src/examples/Makefile.am
@@ -1,7 +1,8 @@
-SET_FEATURES = -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112L -D_REENTRANT
+SET_FEATURES = -D_REENTRANT
 SET_INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/file -I$(top_srcdir)/src/libbluray/bdnav
 
-AM_CFLAGS = -std=c99 $(SET_FEATURES) $(SET_INCLUDES)
+AM_CFLAGS = $(SET_FEATURES) $(SET_INCLUDES)
+AM_CPPFLAGS = -include config.h
 
 if USING_EXAMPLES
 
openSUSE Build Service is sponsored by