diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-12-23 01:03:48 +0100 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2014-01-05 11:48:13 +0100 |
commit | 52ccc4a0ece88030e67254418317d72089a0ecc8 (patch) | |
tree | 9ab3da1f092e44c5b2d2b315f51e95fa37b21bac /configure | |
parent | 82b9799bb211ecd117171115e4a8b832c4942314 (diff) | |
download | ffmpeg-52ccc4a0ece88030e67254418317d72089a0ecc8.tar.gz |
configure: Support preprocessor macros as header names
New versions of FreeType have moved the location of their API
header(s) and hide the location behind a macro.
Since the location changes between versions and no other way
to know the location exists, this workaround becomes necessary.
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -763,6 +763,13 @@ check_ld(){ check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs } +print_include(){ + hdr=$1 + test "${hdr%.h}" = "${hdr}" && + echo "#include $hdr" || + echo "#include <$hdr>" +} + check_code(){ log check_code "$@" check=$1 @@ -771,7 +778,7 @@ check_code(){ shift 3 { for hdr in $headers; do - echo "#include <$hdr>" + print_include $hdr done echo "int main(void) { $code; return 0; }" } | check_$check "$@" @@ -866,7 +873,7 @@ check_func_headers(){ shift 2 { for hdr in $headers; do - echo "#include <$hdr>" + print_include $hdr done for func in $funcs; do echo "long check_$func(void) { return (long) $func; }" |