Allow ntpd to be compiled w/o readline when NO_GNU is defined. Part of a

larger patchset to get a GNU-free world.

Patch rewritten to cope with the 4.2.0 changes.

Submitted by:	des
This commit is contained in:
roberto 2004-07-22 08:14:37 +00:00
parent 896583b3ec
commit 393a8563ce
3 changed files with 21 additions and 7 deletions
usr.sbin/ntp

@ -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 <readline/history.h> header file. */
#define HAVE_READLINE_HISTORY_H 1
/* #undef HAVE_READLINE_HISTORY_H */
/* Define to 1 if you have the <readline/readline.h> 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

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

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