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 | 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 | 773 | check_code(){ |
| 767 | 774 | log check_code "$@" |
| 768 | 775 | check=$1 |
| @@ -771,7 +778,7 @@ check_code(){ · 2 unmodified lines | ||
| 771 | 778 | shift 3 |
| 772 | 779 | { |
| 773 | 780 | for hdr in $headers; do |
| 774 | − echo "#include <$hdr>" | |
| 781 | + print_include $hdr | |
| 775 | 782 | done |
| 776 | 783 | echo "int main(void) { $code; return 0; }" |
| 777 | 784 | } | check_$check "$@" |
| @@ -866,7 +873,7 @@ check_func_headers(){ · 88 unmodified lines | ||
| 866 | 873 | shift 2 |
| 867 | 874 | { |
| 868 | 875 | for hdr in $headers; do |
| 869 | − echo "#include <$hdr>" | |
| 876 | + print_include $hdr | |
| 870 | 877 | done |
| 871 | 878 | for func in $funcs; do |
| 872 | 879 | echo "long check_$func(void) { return (long) $func; }" |