mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-06 07:05:06 -05:00
Add PPS API refclock driver
This commit is contained in:
32
configure
vendored
32
configure
vendored
@@ -132,6 +132,30 @@ EOF
|
||||
echo $result
|
||||
}
|
||||
#}}}
|
||||
#{{{ test_for_ppsapi
|
||||
test_for_ppsapi () {
|
||||
cat >docheck.c <<EOF;
|
||||
#include <timepps.h>
|
||||
int main(int argc, char **argv) {
|
||||
pps_handle_t h;
|
||||
pps_info_t i;
|
||||
struct timespec ts;
|
||||
return time_pps_fetch(&h, PPS_TSFMT_TSPEC, &i, &ts);
|
||||
}
|
||||
EOF
|
||||
|
||||
${MYCC} ${MYCFLAGS} -c -o docheck.o docheck.c >/dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
result=0
|
||||
else
|
||||
result=1
|
||||
fi
|
||||
|
||||
rm -f docheck.c docheck.o
|
||||
echo $result
|
||||
}
|
||||
#}}}
|
||||
#{{{ usage
|
||||
usage () {
|
||||
cat <<EOF;
|
||||
@@ -378,6 +402,14 @@ else
|
||||
printf "No\n"
|
||||
fi
|
||||
|
||||
printf "Checking for PPS API : "
|
||||
if [ `test_for_ppsapi` -eq 0 ]; then
|
||||
printf "Yes\n"
|
||||
SYSDEFS="${SYSDEFS} -DHAVE_PPSAPI"
|
||||
else
|
||||
printf "No\n"
|
||||
fi
|
||||
|
||||
if [ "x${MYCC}" = "xgcc" ]; then
|
||||
CCWARNFLAGS="-Wmissing-prototypes -Wall"
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user