On Sun, Feb 10, 2013 at 1:37 PM, Diego Biurrun <[email protected]> wrote:
> ---
> Makefile | 2 +-
> configure | 16 +++++++++++++++-
> 2 files changed, 16 insertions(+), 2 deletions(-)
>
> diff --git a/Makefile b/Makefile
> index 291197b..290cf64 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -28,7 +28,7 @@ CFLAGS += $(ECFLAGS)
> CCFLAGS = $(CPPFLAGS) $(CFLAGS)
> ASFLAGS := $(CPPFLAGS) $(ASFLAGS)
> YASMFLAGS += $(IFLAGS:%=%/) -Pconfig.asm
> -HOSTCCFLAGS = $(IFLAGS) $(HOSTCFLAGS)
> +HOSTCCFLAGS = $(IFLAGS) $(HOSTCPPFLAGS) $(HOSTCFLAGS)
> LDFLAGS := $(ALLFFLIBS:%=$(LD_PATH)lib%) $(LDFLAGS)
>
> define COMPILE
> diff --git a/configure b/configure
> index d824ba5..086c55f 100755
> --- a/configure
> +++ b/configure
> @@ -222,6 +222,7 @@ Advanced options (experts only):
> --ld=LD use linker LD
> --host-cc=HOSTCC use host C compiler HOSTCC
> --host-cflags=HCFLAGS use HCFLAGS when compiling for host
> + --host-cppflags=HCPPFLAGS use HCPPFLAGS when compiling for host
> --host-ld=HOSTLD use host linker HOSTLD
> --host-ldflags=HLDFLAGS use HLDFLAGS when linking for host
> --host-libs=HLIBS use libs HLIBS when linking for host
> @@ -646,6 +647,10 @@ add_extralibs(){
> prepend extralibs $($ldflags_filter "$@")
> }
>
> +add_host_cppflags(){
> + append host_cppflags "$@"
> +}
> +
> add_host_cflags(){
> append host_cflags $($host_cflags_filter "$@")
> }
> @@ -968,6 +973,13 @@ int x;
> EOF
> }
>
> +check_host_cppflags(){
> + log check_host_cppflags "$@"
> + check_host_cc "$@" <<EOF && append host_cppflags "$@"
> +int x;
> +EOF
> +}
> +
> apply(){
> file=$1
> shift
> @@ -1874,7 +1886,8 @@ HOSTCC_C='-c'
> HOSTCC_O='-o $@'
> HOSTLD_O='-o $@'
>
> -host_cflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600 -O3 -g'
> +host_cflags='-O3 -g'
> +host_cppflags='-D_ISOC99_SOURCE -D_XOPEN_SOURCE=600'
> host_libs='-lm'
> host_cflags_filter=echo
> host_ldflags_filter=echo
> @@ -3911,6 +3924,7 @@ AS_DEPFLAGS=$AS_DEPFLAGS
> HOSTCC=$host_cc
> HOSTLD=$host_ld
> HOSTCFLAGS=$host_cflags
> +HOSTCPPFLAGS=$host_cppflags
> HOSTEXESUF=$HOSTEXESUF
> HOSTLDFLAGS=$host_ldflags
> HOSTLIBS=$host_libs
> --
LGTM
--
regards,
Reinhard
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel