mirror of
https://github.com/darlinghq/darling-libkqueue.git
synced 2025-03-01 08:47:24 +00:00
add check_symbol to configure
git-svn-id: svn://svn.code.sf.net/p/libkqueue/code/trunk@71 fb4e3144-bc1c-4b72-a658-5bcd248dd7f7
This commit is contained in:
parent
69d51032a8
commit
5bca0111bd
20
configure
vendored
20
configure
vendored
@ -77,6 +77,26 @@ check_headers() {
|
||||
done
|
||||
}
|
||||
|
||||
check_symbol() {
|
||||
header=$1
|
||||
symbol=$2
|
||||
|
||||
uc_symbol=`echo "HAVE_$symbol" | tr a-z A-Z | sed 's,[./],_,g'`
|
||||
lc_symbol=`echo "have_$symbol" | tr A-Z a-z | sed 's,[./],_,g'`
|
||||
|
||||
printf "checking <$header> for $symbol.. "
|
||||
if [ "`grep '#define $symbol' /usr/include/$header`" != "" ] ; then
|
||||
eval "$lc_symbol=yes"
|
||||
echo "#define $uc_symbol" >> config.h
|
||||
return 0
|
||||
else
|
||||
eval "$lc_symbol=no"
|
||||
echo "#undef $uc_symbol" >> config.h
|
||||
return 1
|
||||
fi
|
||||
echo "$sym"
|
||||
}
|
||||
|
||||
check_install() {
|
||||
printf "checking for a BSD-compatible install.. "
|
||||
if [ "`uname -s`" = "SunOS" ] ; then
|
||||
|
Loading…
x
Reference in New Issue
Block a user