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
763763 check_cmd $ld $LDFLAGS $flags $(ld_o $TMPE) $TMPO $libs $extralibs
764764 }
765765
766+print_include(){
767+ hdr=$1
768+ test "${hdr%.h}" = "${hdr}" &&
769+ echo "#include $hdr" ||
770+ echo "#include <$hdr>"
771+}
772+
766773 check_code(){
767774 log check_code "$@"
768775 check=$1
@@ -771,7 +778,7 @@ check_code(){ · 2 unmodified lines
771778 shift 3
772779 {
773780 for hdr in $headers; do
774− echo "#include <$hdr>"
781+ print_include $hdr
775782 done
776783 echo "int main(void) { $code; return 0; }"
777784 } | check_$check "$@"
@@ -866,7 +873,7 @@ check_func_headers(){ · 88 unmodified lines
866873 shift 2
867874 {
868875 for hdr in $headers; do
869− echo "#include <$hdr>"
876+ print_include $hdr
870877 done
871878 for func in $funcs; do
872879 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