From 6f0da163dde71e51fa67e47139476d0715323b78 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 9 Aug 2007 11:35:41 +0000 Subject: [PATCH] Move some more compiler flags to configure. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24043 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 11 ++++++++++- dvdread/Makefile | 2 +- libfaad2/common.h | 6 ++++-- libfaad2/local_changes.diff | 14 ++++++-------- 4 files changed, 21 insertions(+), 12 deletions(-) diff --git a/configure b/configure index f750f6edf7..597bd458c5 100755 --- a/configure +++ b/configure @@ -7371,6 +7371,11 @@ if test "$_largefiles" = yes || freebsd ; then fi fi +# Make sure config.h gets included. +if test "$_dvdread_internal" = yes || test "$_faad_internal" = yes ; then + CFLAGS="$CFLAGS -DHAVE_CONFIG_H" +fi + CFLAGS="-I. -I.. -I../libavutil $CFLAGS" CXXFLAGS=" $CFLAGS -D__STDC_LIMIT_MACROS" @@ -7682,13 +7687,17 @@ $_def_fast_inttypes /* libdvdcss */ #define HAVE_ERRNO_H 1 + +/* libdvdcss + libdvdread */ #define HAVE_LIMITS_H 1 /* libdvdcss + libfaad2 */ #define HAVE_UNISTD_H 1 -/* libfaad2 */ +/* libfaad2 + libdvdread */ #define STDC_HEADERS 1 + +/* libfaad2 */ #define HAVE_MEMCPY 1 #define HAVE_STRCHR 1 diff --git a/dvdread/Makefile b/dvdread/Makefile index 1e10547561..77f2e1c2ee 100644 --- a/dvdread/Makefile +++ b/dvdread/Makefile @@ -11,7 +11,7 @@ SRCS_COMMON = dvd_input.c \ nav_read.c \ md5.c \ -CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE -DSTDC_HEADERS -DHAVE_LIMITS_H +CFLAGS = -D__USE_UNIX98 -D_GNU_SOURCE CFLAGS-$(DVDCSS_INTERNAL) += -I../libdvdcss -DHAVE_DVDCSS_DVDCSS_H diff --git a/libfaad2/common.h b/libfaad2/common.h index e43e11ed13..6fb5a12b08 100644 --- a/libfaad2/common.h +++ b/libfaad2/common.h @@ -35,13 +35,15 @@ extern "C" { #endif +#ifdef HAVE_CONFIG_H +# include "../config.h" +#endif + /* Allow build on Cygwin*/ #if defined(__CYGWIN__) #define __STRICT_ANSI__ #endif -#include "../config.h" - #define INLINE __inline #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) #define ALIGN __declspec(align(16)) diff --git a/libfaad2/local_changes.diff b/libfaad2/local_changes.diff index 084c44bb24..d7b1a7b081 100644 --- a/libfaad2/local_changes.diff +++ b/libfaad2/local_changes.diff @@ -33,19 +33,17 @@ **/ #ifndef __COMMON_H__ -@@ -32,10 +35,13 @@ - extern "C" { - #endif +@@ -32,8 +35,13 @@ --#ifdef HAVE_CONFIG_H --# include "../config.h" + #ifdef HAVE_CONFIG_H + # include "../config.h" + #endif ++ +/* Allow build on Cygwin*/ +#if defined(__CYGWIN__) +#define __STRICT_ANSI__ - #endif ++#endif -+#include "../config.h" -+ #define INLINE __inline #if 0 //defined(_WIN32) && !defined(_WIN32_WCE) #define ALIGN __declspec(align(16))