aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2013-12-23 01:03:48 +0100
committerLuca Barbato <lu_zero@gentoo.org>2014-03-13 12:14:14 +0100
commita32e45df82751784f9461f01310e63f4bed721dc (patch)
treeda4c7ca3641edfa951aebde53ba6295c13f29d43
parent7a2254ab26b24255a4d6ea476ba5fd38525a9bb3 (diff)
downloadffmpeg-a32e45df82751784f9461f01310e63f4bed721dc.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> (cherry picked from commit 52ccc4a0ece88030e67254418317d72089a0ecc8) Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-rwxr-xr-xconfigure11
1 files changed, 9 insertions, 2 deletions
diff --git a/configure b/configure
index d65c112c3b..2734003b3b 100755
--- a/configure
+++ b/configure
@@ -738,6 +738,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
@@ -746,7 +753,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 "$@"
@@ -822,7 +829,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; }"