openbsd-ports/x11/vlc/patches/patch-configure_ac
ajacoutot 094095fd22 Major update to vlc-2.0.1.
More details at http://www.videolan.org/vlc/releases/2.0.1.html

tested on i386, amd64, sparc64
from Brad (maintainer)
2012-04-23 13:47:08 +00:00

95 lines
2.7 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.21 2012/04/23 13:47:08 ajacoutot Exp $
--- configure.ac.orig Thu Mar 8 07:18:41 2012
+++ configure.ac Fri Mar 30 19:07:47 2012
@@ -122,10 +122,6 @@ case "${host_os}" in
;;
openbsd*)
SYS=openbsd
- CPPFLAGS_save="${CPPFLAGS_save} -I/usr/local/include -I/usr/X11R6/include"
- CPPFLAGS="${CPPFLAGS_save}"
- LDFLAGS_save="${LDFLAGS_save} -L/usr/local/lib -L/usr/X11R6/lib/"
- LDFLAGS="${LDFLAGS_save}"
;;
netbsd*)
SYS=netbsd
@@ -687,6 +683,20 @@ if test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"
dnl Check for pthreads - borrowed from XMMS
THREAD_LIB=error
if test "${THREAD_LIB}" = "error"; then
+ AC_MSG_CHECKING(for pthread_create in -pthread)
+ save_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="${LDFLAGS} -pthread"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ pthread_t thr;]],
+ [pthread_create(&thr, NULL, NULL, NULL);])],
+ [THREAD_LIB="-pthread"
+ AC_MSG_RESULT(yes)],
+ [AC_MSG_RESULT(no)])
+ LDFLAGS="${save_LDFLAGS}"
+fi
+ if test "${THREAD_LIB}" = "error"; then
AC_CHECK_LIB(pthread,main,THREAD_LIB="-lpthread")
fi
if test "${THREAD_LIB}" = "error"; then
@@ -963,33 +973,6 @@ dnl Check for various optimization flags
AS_IF([test "${enable_optimizations}" != "no"], [
C_O=""
- dnl -O4 and -O3 only in production builds
- AS_IF([test "{enable_debug}" = "no"], [
- AC_CACHE_CHECK([if $CC accepts -O4], [ac_cv_c_o4], [
- CFLAGS="${CFLAGS_save} -O4"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
- ac_cv_c_o4=yes
- ], [
- ac_cv_c_o4=no
- ])
- ])
- AS_IF([test "${ac_cv_c_o4}" != "no"], [
- C_O="-O4"
- ], [
- AC_CACHE_CHECK([if $CC accepts -O3], [ac_cv_c_o3], [
- CFLAGS="${CFLAGS_save} -O3"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [
- ac_cv_c_o3=yes
- ], [
- ac_cv_c_o3=no
- ])
- ])
- AS_IF([test "${ac_cv_c_o3}" != "no"], [
- C_O="-O3"
- ])
- ])
- ])
-
VLC_RESTORE_FLAGS
CFLAGS="${CFLAGS} ${C_O}"
CXXFLAGS="${CXXFLAGS} ${C_O}"
@@ -3511,6 +3494,24 @@ AS_IF([test "$enable_oss" != "no"], [
])
AC_SUBST(OSS_LIBS)
AM_CONDITIONAL([HAVE_OSS], [test "${have_oss}" = "yes"])
+
+dnl
+dnl OpenBSD sndio module
+dnl
+AC_ARG_ENABLE([sndio],
+ [AS_HELP_STRING([--disable-sndio],
+ [support the OpenBSD sndio (default auto)])],, [
+ AS_IF([test "$SYS" = "opensd"], [
+ enable_sndio="yes"
+ ])
+])
+have_sndio="no"
+AS_IF([test "$enable_sndio" != "no"], [
+ AC_CHECK_HEADER([sndio.h], [
+ have_sndio="yes"
+ ])
+])
+AM_CONDITIONAL([HAVE_SNDIO], [test "${have_sndio}" = "yes"])
dnl
dnl Portaudio module