fi
fi
-if [ $feat_pps = "1" ] && \
- test_code 'PPS API' 'string.h timepps.h' '' '' '
+timepps_h=""
+if [ $feat_pps = "1" ]; then
+ if test_code '<sys/timepps.h>' 'sys/timepps.h' '' '' ''; then
+ timepps_h="sys/timepps.h"
+ add_def HAVE_SYS_TIMEPPS_H
+ else
+ if test_code '<timepps.h>' 'timepps.h' '' '' ''; then
+ timepps_h="timepps.h"
+ add_def HAVE_TIMEPPS_H
+ fi
+ fi
+fi
+
+if [ "x$timepps_h" != "x" ] && \
+ test_code 'PPSAPI' "string.h $timepps_h" '' '' '
pps_handle_t h;
pps_info_t i;
struct timespec ts;
#if HAVE_PPSAPI
+#if defined(HAVE_SYS_TIMEPPS_H)
+#include <sys/timepps.h>
+#elif defined(HAVE_TIMEPPS_H)
#include <timepps.h>
+#endif
#include "logging.h"
#include "memory.h"