[04d819]: tools-for-build / grovel-features.sh Maximize Restore History

Download this file

grovel-features.sh    27 lines (21 with data), 658 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Automated platform feature testing
cd ./tools-for-build > /dev/null
# FIXME: Use this to test for dlopen presence and hence
# load-shared-object buildability
# Assumes the presence of $1-test.c, which when built and
# run should return with 104 if the feature is present.
featurep() {
bin="$1-test"
rm -f $bin
$GNUMAKE $bin -I ../src/runtime > /dev/null 2>&1 && ./$bin > /dev/null 2>&1
if [ "$?" = 104 ]
then
printf " :$1"
fi
rm -f $bin
}
# KLUDGE: ppc/darwin dlopen is special cased in make-config.sh, as
# we fake it with a shim.
featurep os-provides-dlopen
featurep os-provides-dladdr
featurep os-provides-putwc