esac
AMU_OS_CFLAGS
+LIBOPTS_CHECK
+
+AC_MSG_CHECKING(for bin subdirectory)
+AC_ARG_WITH(binsubdir,
+ AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
+ use_binsubdir="$withval", use_binsubdir="bin")
+
+case "$use_binsubdir" in
+ bin)
+ ;;
+ sbin)
+ ;;
+ *)
+ AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
+ ;;
+esac
+AC_MSG_RESULT($use_binsubdir)
+BINSUBDIR=$use_binsubdir
+AC_SUBST(BINSUBDIR)
+
+AC_MSG_CHECKING(if we want to use arlib)
+AC_ARG_WITH(arlib,
+ AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
+ [ans=$withval], [ans=no])
+AC_MSG_RESULT($ans)
+
+if test -d $srcdir/arlib
+then
+ case "$ans" in
+ yes)
+ ARLIB_DIR=arlib
+ AC_CONFIG_SUBDIRS(arlib)
+ ;;
+ esac
+fi
+AC_SUBST(ARLIB_DIR)
+ AC_MSG_CHECKING(for bin subdirectory)
+ AC_ARG_WITH(binsubdir,
+ AC_HELP_STRING([--with-binsubdir], [bin ={bin,sbin}]),
+ use_binsubdir="$withval", use_binsubdir="bin")
+
+ case "$use_binsubdir" in
+ bin)
+ ;;
+ sbin)
+ ;;
+ *)
+ AC_MSG_ERROR([<$use_binsubdir> is illegal - must be "bin" or "sbin"])
+ ;;
+ esac
+ AC_MSG_RESULT($use_binsubdir)
+ BINSUBDIR=$use_binsubdir
+ AC_SUBST(BINSUBDIR)
+
+ if test -d $srcdir/arlib
+ then
+ AC_ARG_WITH(arlib,
+ AC_HELP_STRING([--with-arlib], [- Compile the async resolver library?]),
+ [ans=$withval], [ans=no])
+
+ case "$ans" in
+ yes)
+ ARLIB_DIR=arlib
+ AC_CONFIG_SUBDIRS(arlib)
+ ;;
+ esac
+ fi
+ AC_SUBST(ARLIB_DIR)
+
AC_ARG_WITH(rpath,
AC_HELP_STRING([--without-rpath], [s Disable auto-added -R linker paths]),
[ans=$withval], [ans=x])
bin_PROGRAMS= ntpdc
EXTRA_PROGRAMS= ntpdc-layout
EXTRA_DATA= check-layout
- BUILT_SOURCES= maybe-layout
+ BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
-AM_CPPFLAGS= -I$(top_srcdir)/include
+AM_CPPFLAGS= -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD= version.o ../libntp/libntp.a @READLINE_LIBS@
+ntpdc_LDADD= version.o ../libntp/libntp.a @READLINE_LIBS@ $(LIBOPTS_LDADD)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
DISTCLEANFILES= .version version.c
CLEANFILES= check-layout layout.here nl.c ntpdc-layout
noinst_HEADERS= ntpdc.h
-EXTRA_DIST= nl_in.c nl.pl layout.std
ETAGS_ARGS= Makefile.am
+EXTRA_DIST= nl_in.c nl.pl layout.std \
+ ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
+BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \
+ ntpdc-opts.menu
+man_MANS= ntpdc.1
-ntpdc_SOURCES = ntpdc.c ntpdc_ops.c
+
+ntpdc-opts.h: ntpdc-opts.c
+ntpdc-opts.c: ntpdc-opts.def
+ cd $(srcdir) && autogen ntpdc-opts.def
+
+ntpdc.1: ntpdc-opts.def
+ cd $(srcdir) && autogen -Tagman1.tpl -bntpdc ntpdc-opts.def
+
+ntpdc-opts.texi ntpdc-opts.menu: ntpdc-opts.def
+ cd $(srcdir) && autogen -L ${prefix}/share/autogen \
+ -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
+
+ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
- maybe-layout:
- @case "${PATH_PERL}" in \
- /*) ${MAKE} check-layout ;; \
- esac
-
ntpdc-layout.o: nl.c
layout.here: ntpdc-layout