Commit b3dc88f6 authored by Steven Walters's avatar Steven Walters Committed by Fiona Glaser

Fix configure so that boolean configuration options are 1/0

There are many cases of 1/undef, not 1/0.
parent d50e971f
......@@ -25,34 +25,34 @@ SRCSO =
CONFIG := $(shell cat config.h)
# GPL-only files
ifeq ($(GPL),yes)
ifneq ($(findstring HAVE_GPL 1, $(CONFIG)),)
SRCCLI +=
endif
# Optional module sources
ifneq ($(findstring HAVE_AVS, $(CONFIG)),)
ifneq ($(findstring HAVE_AVS 1, $(CONFIG)),)
SRCCLI += input/avs.c
endif
ifneq ($(findstring HAVE_PTHREAD, $(CONFIG)),)
ifneq ($(findstring HAVE_PTHREAD 1, $(CONFIG)),)
SRCCLI += input/thread.c
SRCS += common/threadpool.c
endif
ifneq ($(findstring HAVE_LAVF, $(CONFIG)),)
ifneq ($(findstring HAVE_LAVF 1, $(CONFIG)),)
SRCCLI += input/lavf.c
endif
ifneq ($(findstring HAVE_FFMS, $(CONFIG)),)
ifneq ($(findstring HAVE_FFMS 1, $(CONFIG)),)
SRCCLI += input/ffms.c
endif
ifneq ($(findstring HAVE_GPAC, $(CONFIG)),)
ifneq ($(findstring HAVE_GPAC 1, $(CONFIG)),)
SRCCLI += output/mp4.c
endif
# Visualization sources
ifeq ($(VIS),yes)
ifneq ($(findstring HAVE_VISUALIZE 1, $(CONFIG)),)
SRCS += common/visualize.c common/display-x11.c
endif
......
......@@ -56,7 +56,7 @@ ELF .type \name, %function
.endm
.macro movrel rd, val
#if defined(HAVE_ARMV6T2) && !defined(PIC)
#if HAVE_ARMV6T2 && !defined(PIC)
movw \rd, #:lower16:\val
movt \rd, #:upper16:\val
#else
......@@ -65,7 +65,7 @@ ELF .type \name, %function
.endm
.macro movconst rd, val
#ifdef HAVE_ARMV6T2
#if HAVE_ARMV6T2
movw \rd, #:lower16:\val
.if \val >> 16
movt \rd, #:upper16:\val
......
......@@ -39,7 +39,7 @@ static uint8_t *x264_nal_escape_c( uint8_t *dst, uint8_t *src, uint8_t *end )
return dst;
}
#ifdef HAVE_MMX
#if HAVE_MMX
uint8_t *x264_nal_escape_mmxext( uint8_t *dst, uint8_t *src, uint8_t *end );
uint8_t *x264_nal_escape_sse2( uint8_t *dst, uint8_t *src, uint8_t *end );
#endif
......@@ -88,7 +88,7 @@ void x264_nal_encode( x264_t *h, uint8_t *dst, x264_nal_t *nal )
void x264_bitstream_init( int cpu, x264_bitstream_function_t *pf )
{
pf->nal_escape = x264_nal_escape_c;
#ifdef HAVE_MMX
#if HAVE_MMX
if( cpu&X264_CPU_MMXEXT )
pf->nal_escape = x264_nal_escape_mmxext;
if( (cpu&X264_CPU_SSE2) && (cpu&X264_CPU_SSE2_IS_FAST) )
......
......@@ -364,7 +364,7 @@ static ALWAYS_INLINE uint32_t pack16to32_mask( int a, int b )
}
static ALWAYS_INLINE uint64_t pack32to64( uint32_t a, uint32_t b )
{
#ifdef WORDS_BIGENDIAN
#if WORDS_BIGENDIAN
return b + ((uint64_t)a<<32);
#else
return a + ((uint64_t)b<<32);
......
......@@ -171,6 +171,9 @@ cross_prefix=""
EXE=""
# list of all preprocessor HAVE values we can define
CONFIG_HAVE="MALLOC_H ALTIVEC ALTIVEC_H MMX ARMV6 ARMV6T2 NEON PTHREAD LOG2F VISUALIZE SWSCALE LAVF FFMS GPAC GF_MALLOC AVS GPL"
# parse options
for opt do
......@@ -735,11 +738,12 @@ fi
define BIT_DEPTH $bit_depth
ASFLAGS="$ASFLAGS -DBIT_DEPTH=$bit_depth"
if [ $gpl = yes ]; then
define HAVE_GPL 1
else
define HAVE_GPL 0
fi
[ $gpl = yes ] && define HAVE_GPL
#define undefined vars as 0
for var in $CONFIG_HAVE; do
grep -q "HAVE_$var 1" config.h || define HAVE_$var 0
done
rm -f conftest*
......@@ -763,10 +767,8 @@ STRIP=$STRIP
AS=$AS
ASFLAGS=$ASFLAGS
EXE=$EXE
VIS=$vis
HAVE_GETOPT_LONG=$HAVE_GETOPT_LONG
DEVNULL=$DEVNULL
GPL=$gpl
EOF
if [ "$shared" = "yes" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment