Revision fbe98aee configure
configure | ||
---|---|---|
700 | 700 |
check_func_headers(){ |
701 | 701 |
log check_func_headers "$@" |
702 | 702 |
headers=$1 |
703 |
funcs=$2
|
|
703 |
func=$2 |
|
704 | 704 |
shift 2 |
705 |
{ |
|
706 |
for hdr in $headers; do |
|
707 |
echo "#include <$hdr>" |
|
708 |
done |
|
709 |
for func in $funcs; do |
|
710 |
echo "long check_$func(void) { return (long) $func; }" |
|
711 |
done |
|
712 |
echo "int main(void) { return 0; }" |
|
713 |
} | check_ld "$@" && enable $funcs && enable_safe $headers |
|
705 |
disable $func |
|
706 |
incs="" |
|
707 |
for hdr in $headers; do |
|
708 |
incs="$incs |
|
709 |
#include <$hdr>" |
|
710 |
done |
|
711 |
check_ld "$@" <<EOF && enable $func && enable_safe $headers |
|
712 |
$incs |
|
713 |
int main(int argc, char **argv){ |
|
714 |
return (long) $func; |
|
715 |
} |
|
716 |
EOF |
|
714 | 717 |
} |
715 | 718 |
|
716 | 719 |
check_cpp_condition(){ |
... | ... | |
737 | 740 |
check_lib2(){ |
738 | 741 |
log check_lib2 "$@" |
739 | 742 |
headers="$1" |
740 |
funcs="$2"
|
|
743 |
func="$2" |
|
741 | 744 |
shift 2 |
742 |
check_func_headers "$headers" "$funcs" "$@" && add_extralibs "$@"
|
|
745 |
check_func_headers "$headers" $func "$@" && add_extralibs "$@"
|
|
743 | 746 |
} |
744 | 747 |
|
745 | 748 |
check_exec(){ |
Also available in: Unified diff