Add PPS API refclock driver

This commit is contained in:
Miroslav Lichvar
2009-10-28 12:23:00 +01:00
parent 352f03d487
commit b4069a4c3b
8 changed files with 328 additions and 4 deletions

32
configure vendored
View File

@@ -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