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.
Unified · Split
| @@ -763,6 +763,13 @@ check_ld(){ · 762 unmodified lines | |||
| 763 | check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs | 763 | check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs |
| 764 | } | 764 | } |
| 765 | 765 | ||
| 766 | print_include(){ | ||
| 767 | hdr=$1 | ||
| 768 | test "${hdr%.h}" = "${hdr}" && | ||
| 769 | echo "#include $hdr" || | ||
| 770 | echo "#include <$hdr>" | ||
| 771 | } | ||
| 772 | |||
| 766 | check_code(){ | 773 | check_code(){ |
| 767 | log check_code "$@" | 774 | log check_code "$@" |
| 768 | check=$1 | 775 | check=$1 |
| @@ -771,7 +778,7 @@ check_code(){ · 2 unmodified lines | |||
| 771 | shift 3 | 778 | shift 3 |
| 772 | { | 779 | { |
| 773 | for hdr in $headers; do | 780 | for hdr in $headers; do |
| 774 | echo "#include <$hdr>" | 781 | print_include $hdr |
| 775 | done | 782 | done |
| 776 | echo "int main(void) { $code; return 0; }" | 783 | echo "int main(void) { $code; return 0; }" |
| 777 | } | check_$check "$@" | 784 | } | check_$check "$@" |
| @@ -866,7 +873,7 @@ check_func_headers(){ · 88 unmodified lines | |||
| 866 | shift 2 | 873 | shift 2 |
| 867 | { | 874 | { |
| 868 | for hdr in $headers; do | 875 | for hdr in $headers; do |
| 869 | echo "#include <$hdr>" | 876 | print_include $hdr |
| 870 | done | 877 | done |
| 871 | for func in $funcs; do | 878 | for func in $funcs; do |
| 872 | echo "long check_$func(void) { return (long) $func; }" | 879 | echo "long check_$func(void) { return (long) $func; }" |