History

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.

Diego Biurrun committed 12 years ago

Commit 52ccc4a1 parent 82b97991 file · +9 −2Browse files

Unified · Split

configure+9−2
@@ -763,6 +763,13 @@ check_ld(){ · 762 unmodified lines
763 check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs763 check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
764}764}
765 765
766print_include(){
767 hdr=$1
768 test "${hdr%.h}" = "${hdr}" &&
769 echo "#include $hdr" ||
770 echo "#include <$hdr>"
771}
772
766check_code(){773check_code(){
767 log check_code "$@"774 log check_code "$@"
768 check=$1775 check=$1
@@ -771,7 +778,7 @@ check_code(){ · 2 unmodified lines
771 shift 3778 shift 3
772 {779 {
773 for hdr in $headers; do780 for hdr in $headers; do
774 echo "#include <$hdr>"781 print_include $hdr
775 done782 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 2873 shift 2
867 {874 {
868 for hdr in $headers; do875 for hdr in $headers; do
869 echo "#include <$hdr>"876 print_include $hdr
870 done877 done
871 for func in $funcs; do878 for func in $funcs; do
872 echo "long check_$func(void) { return (long) $func; }"879 echo "long check_$func(void) { return (long) $func; }"

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t