openbsd-ports/x11/vlc/patches/patch-configure_ac
2013-03-09 09:32:03 +00:00

129 lines
4.4 KiB
Plaintext

$OpenBSD: patch-configure_ac,v 1.26 2013/03/09 09:32:03 brad Exp $
--- configure.ac.orig Mon Oct 22 05:03:51 2012
+++ configure.ac Fri Mar 8 19:45:35 2013
@@ -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
@@ -964,33 +960,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}"
@@ -1736,7 +1705,7 @@ AS_IF([test "${enable_live555}" != "no" -a -n "${CXX}"
AC_LANG_PUSH(C++)
CPPFLAGS_save="${CPPFLAGS}"
AS_IF([test -z "${CONTRIB_DIR}"], [
- CPPFLAGS_live555="-I/usr/include/liveMedia -I/usr/include/groupsock -I/usr/include/BasicUsageEnvironment -I/usr/include/UsageEnvironment"
+ CPPFLAGS_live555="-I${LOCALBASE}/live/liveMedia/include -I${LOCALBASE}/live/groupsock/include -I${LOCALBASE}/live/BasicUsageEnvironment/include -I${LOCALBASE}/live/UsageEnvironment/include"
], [
CPPFLAGS_live555="-I${CONTRIB_DIR}/include/liveMedia -I${CONTRIB_DIR}/include/groupsock -I${CONTRIB_DIR}/include/BasicUsageEnvironment -I${CONTRIB_DIR}/include/UsageEnvironment"
])
@@ -2415,23 +2384,28 @@ dnl
AC_ARG_ENABLE(avcodec,
[ --enable-avcodec libavcodec codec (default enabled)])
AS_IF([test "${enable_avcodec}" != "no"], [
- PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil],
- [
- VLC_SAVE_FLAGS
- CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
- CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
- AC_CHECK_HEADERS(libavcodec/avcodec.h)
- AC_CHECK_HEADERS(libavutil/avutil.h)
- VLC_ADD_PLUGIN([avcodec])
- VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
- AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
- VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
- ])
- VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
- VLC_RESTORE_FLAGS
- have_avcodec="yes"
- ],[
- AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
+ PKG_CHECK_MODULES(AVCODEC,[libavcodec >= 52.25.0 libavutil], [
+ PKG_CHECK_EXISTS([libavcodec < 55],, [
+ AC_MSG_ERROR([libavcodec versions 55 and later are not supported yet.])
+ ])
+ VLC_SAVE_FLAGS
+ CPPFLAGS="${CPPFLAGS} ${AVCODEC_CFLAGS}"
+ CFLAGS="${CFLAGS} ${AVCODEC_CFLAGS}"
+ LIBS="${LIBS} ${AVCODEC_LIBS}"
+ AC_CHECK_LIB(avutil, av_sample_fmt_is_planar,
+ AC_DEFINE([HAVE_AVUTIL_PLANAR], [1], [Define if libav* use planar audio formats]))
+ AC_CHECK_HEADERS(libavcodec/avcodec.h)
+ AC_CHECK_HEADERS(libavutil/avutil.h)
+ VLC_ADD_PLUGIN([avcodec])
+ VLC_ADD_LIBS([avcodec],[$AVCODEC_LIBS])
+ AS_IF([test "${ac_cv_ld_bsymbolic}" != "no"], [
+ VLC_ADD_LIBS([avcodec],[-Wl,-Bsymbolic])
+ ])
+ VLC_ADD_CFLAGS([avcodec],[$AVCODEC_CFLAGS])
+ VLC_RESTORE_FLAGS
+ have_avcodec="yes"
+ ],[
+ AC_MSG_ERROR([${AVCODEC_PKG_ERRORS}. Pass --disable-avcodec to ignore this error.])
])
], [
have_avcodec="no"
@@ -3514,6 +3488,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