+* Work around a VPATH difference in FreeBSD's 'make' command.
* Update bugreport URL.
* Update -I documentation.
* [Bug 713] Fix bug reporting information.
--- /dev/null
+dnl ######################################################################
+dnl Are we using FreeBSD's make?
+AC_DEFUN([NTP_VPATH_HACK], [
+AC_CACHE_CHECK([to see if we need a VPATH hack], ac_cv_vpath_hack,
+[
+ case "$ac_cv_vpath_hack" in
+ '')
+ ac_cv_vpath_hack="no"
+ case "$srcdir::$host_os" in
+ ??*::freebsd*)
+ case "`${MAKE-make} -v -f /dev/null 2>/dev/null | grep 'GNU Make version '`" in
+ '')
+ ac_cv_vpath_hack="yes"
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+])
+AM_CONDITIONAL([VPATH_HACK], [test x$ac_cv_vpath_hack = xyes])
+])
+dnl ======================================================================
LDADD= version.o libntpd.a @LIBPARSE@
AM_YFLAGS= -d -t
-BUILT_SOURCES= ntp_parser.c ntp_parser.h \
+if VPATH_HACK
+VPHACK= vphack
+else
+VPHACK=
+endif
+
+vphack:
+ test -e ntp_parser.c || ln -s $(srcdir)/ntp_parser.c .
+ test -e ntp_parser.h || ln -s $(srcdir)/ntp_parser.h .
+
+BUILT_SOURCES= ${VPHACK} ntp_parser.c ntp_parser.h \
ntpd-opts.c ntpd-opts.h ntpd.1 ntpd-opts.texi ntpd-opts.menu
man_MANS= ntpd.1