diff options
author | roberto <roberto@FreeBSD.org> | 2004-07-22 08:14:37 +0000 |
---|---|---|
committer | roberto <roberto@FreeBSD.org> | 2004-07-22 08:14:37 +0000 |
commit | 393a8563ce53c0957b638f2b8837b256f3395794 (patch) | |
tree | 62aefadf50e2203fe5ce7dc7f0032cb518a93780 | |
parent | 896583b3ecfe3b3b153ace03a17a88c855cbc5fb (diff) | |
download | FreeBSD-src-393a8563ce53c0957b638f2b8837b256f3395794.zip FreeBSD-src-393a8563ce53c0957b638f2b8837b256f3395794.tar.gz |
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
-rw-r--r-- | usr.sbin/ntp/config.h | 6 | ||||
-rw-r--r-- | usr.sbin/ntp/ntpdc/Makefile | 11 | ||||
-rw-r--r-- | usr.sbin/ntp/ntpq/Makefile | 11 |
3 files changed, 21 insertions, 7 deletions
diff --git a/usr.sbin/ntp/config.h b/usr.sbin/ntp/config.h index 05d499e..e58cad5 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 <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 diff --git a/usr.sbin/ntp/ntpdc/Makefile b/usr.sbin/ntp/ntpdc/Makefile index 9bb3a54..94947f5 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 67687e9..7d3e1e5 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 |