Commit abe11eab authored by Ramiro Polla's avatar Ramiro Polla Committed by Fiona Glaser
Browse files

Create and install x264_config.h

This header can be used to determine the bit-depth and license of libx264.
parent ee6b4822
...@@ -214,6 +214,7 @@ install: x264$(EXE) $(SONAME) ...@@ -214,6 +214,7 @@ install: x264$(EXE) $(SONAME)
install -d $(DESTDIR)$(libdir) install -d $(DESTDIR)$(libdir)
install -d $(DESTDIR)$(libdir)/pkgconfig install -d $(DESTDIR)$(libdir)/pkgconfig
install -m 644 x264.h $(DESTDIR)$(includedir) install -m 644 x264.h $(DESTDIR)$(includedir)
install -m 644 x264_config.h $(DESTDIR)$(includedir)
install -m 644 libx264.a $(DESTDIR)$(libdir) install -m 644 libx264.a $(DESTDIR)$(libdir)
install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig install -m 644 x264.pc $(DESTDIR)$(libdir)/pkgconfig
install x264$(EXE) $(DESTDIR)$(bindir) install x264$(EXE) $(DESTDIR)$(bindir)
...@@ -227,7 +228,7 @@ endif ...@@ -227,7 +228,7 @@ endif
$(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir)) $(if $(IMPLIBNAME), install -m 644 $(IMPLIBNAME) $(DESTDIR)$(libdir))
uninstall: uninstall:
rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(libdir)/libx264.a rm -f $(DESTDIR)$(includedir)/x264.h $(DESTDIR)$(includedir)/x264_config.h $(DESTDIR)$(libdir)/libx264.a
rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc rm -f $(DESTDIR)$(bindir)/x264$(EXE) $(DESTDIR)$(libdir)/pkgconfig/x264.pc
$(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX)) $(if $(SONAME), rm -f $(DESTDIR)$(libdir)/$(SONAME) $(DESTDIR)$(libdir)/libx264.$(SOSUFFIX))
......
...@@ -128,6 +128,8 @@ typedef union { x264_uint128_t i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; u ...@@ -128,6 +128,8 @@ typedef union { x264_uint128_t i; uint64_t a[2]; uint32_t b[4]; uint16_t c[8]; u
# define MPIXEL_X4(src) M32(src) # define MPIXEL_X4(src) M32(src)
#endif #endif
#define BIT_DEPTH X264_BIT_DEPTH
#define CPPIXEL_X4(dst,src) MPIXEL_X4(dst) = MPIXEL_X4(src) #define CPPIXEL_X4(dst,src) MPIXEL_X4(dst) = MPIXEL_X4(src)
#define X264_SCAN8_SIZE (6*8) #define X264_SCAN8_SIZE (6*8)
......
...@@ -138,7 +138,7 @@ die() { ...@@ -138,7 +138,7 @@ die() {
exit 1 exit 1
} }
rm -f config.h config.mak config.log x264.pc conftest* rm -f x264_config.h config.h config.mak config.log x264.pc conftest*
prefix='/usr/local' prefix='/usr/local'
exec_prefix='${prefix}' exec_prefix='${prefix}'
...@@ -735,10 +735,9 @@ if [ "$bit_depth" -gt "8" ]; then ...@@ -735,10 +735,9 @@ if [ "$bit_depth" -gt "8" ]; then
ASFLAGS="$ASFLAGS -DHIGH_BIT_DEPTH" ASFLAGS="$ASFLAGS -DHIGH_BIT_DEPTH"
fi fi
define BIT_DEPTH $bit_depth
ASFLAGS="$ASFLAGS -DBIT_DEPTH=$bit_depth" ASFLAGS="$ASFLAGS -DBIT_DEPTH=$bit_depth"
[ $gpl = yes ] && define HAVE_GPL [ $gpl = yes ] && define HAVE_GPL && x264_gpl=1 || x264_gpl=0
#define undefined vars as 0 #define undefined vars as 0
for var in $CONFIG_HAVE; do for var in $CONFIG_HAVE; do
...@@ -747,6 +746,13 @@ done ...@@ -747,6 +746,13 @@ done
rm -f conftest* rm -f conftest*
# generate exported config file
cat > x264_config.h << EOF
#define X264_BIT_DEPTH $bit_depth
#define X264_GPL $x264_gpl
EOF
# generate config files # generate config files
cat > config.mak << EOF cat > config.mak << EOF
......
...@@ -39,6 +39,8 @@ ...@@ -39,6 +39,8 @@
#include <stdarg.h> #include <stdarg.h>
#include "x264_config.h"
#define X264_BUILD 110 #define X264_BUILD 110
/* x264_t: /* x264_t:
......
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