diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 05d499ea26d..e58cad5b360 100644 --- a/usr.sbin/ntp/config.h +++ b/usr.sbin/ntp/config.h @@ -405,7 +405,7 @@ /* #undef HAVE_LIBPOSIX4 */ /* Define to 1 if you have the `readline' library (-lreadline). */ -#define HAVE_LIBREADLINE 1 +/* #undef HAVE_LIBREADLINE */ /* Define to 1 if you have the `rt' library (-lrt). */ /* #undef HAVE_LIBRT */ @@ -519,10 +519,10 @@ /* #undef HAVE_RANDOM */ /* Define to 1 if you have the header file. */ -#define HAVE_READLINE_HISTORY_H 1 +/* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the header file. */ -#define HAVE_READLINE_READLINE_H 1 +/* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if you have the `readlink' function. */ #define HAVE_READLINK 1 diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile index 9bb3a5430df..94947f5345f 100644 --- a/usr.sbin/ntp/ntpdc/Makefile +++ b/usr.sbin/ntp/ntpdc/Makefile @@ -8,8 +8,15 @@ SRCS= ntpdc.c ntpdc_ops.c version.c CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ -DPADD= ${LIBNTP} ${LIBREADLINE} ${LIBTERMCAP} ${LIBMD} -LDADD= ${LIBNTP} -lreadline -ltermcap -lmd +DPADD= ${LIBNTP} ${LIBMD} +LDADD= ${LIBNTP} -lmd + +.if !defined(NO_GNU) +DPADD+= ${LIBREADLINE} ${LIBTERMCAP} +LDADD+= -lreadline -ltermcap +CFLAGS+= -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY_H \ + -DHAVE_READLINE_READLINE_H +.endif CLEANFILES+= .version version.c diff --git a/usr.sbin/ntp/ntpq/Makefile b/usr.sbin/ntp/ntpq/Makefile index 67687e96141..7d3e1e5e07a 100644 --- a/usr.sbin/ntp/ntpq/Makefile +++ b/usr.sbin/ntp/ntpq/Makefile @@ -10,8 +10,15 @@ SRCS= ntpq.c ntpq_ops.c version.c CFLAGS+= -I${.CURDIR}/../../../contrib/ntp/include -I${.CURDIR}/../ -DPADD= ${LIBNTP} ${LIBREADLINE} ${LIBTERMCAP} ${LIBMD} -LDADD= ${LIBNTP} -lreadline -ltermcap -lmd +DPADD= ${LIBNTP} ${LIBMD} +LDADD= ${LIBNTP} -lmd + ++ .if !defined(NO_GNU) +DPADD+= ${LIBREADLINE} ${LIBTERMCAP} +LDADD+= -lreadline -ltermcap +CFLAGS+= -DHAVE_LIBREADLINE -DHAVE_READLINE_HISTORY_H \ +i -DHAVE_READLINE_READLINE_H +.endif CLEANFILES+= .version version.c