Copy and build daemon.c in whatever directories need it, instead of building it
authorKen Raeburn <raeburn@mit.edu>
Sat, 30 Aug 2003 01:09:41 +0000 (01:09 +0000)
committerKen Raeburn <raeburn@mit.edu>
Sat, 30 Aug 2003 01:09:41 +0000 (01:09 +0000)
into the krb5 library.

* aclocal.m4 (KRB5_AC_NEED_DAEMON): New macro.
* appl/bsd/configure.in, kadmin/configure.in, kdc/configure.in,
krb524/configure.in, slave/configure.in: Use it.  Don't directly check if
prototype for daemon() is needed.
* kadmin/server/Makefile.in (OBJS), kadmin/v5passwdd/Makefile.in (SERV_OBJS),
kdc/Makefile.in (OBJS, fakeka), krb524/Makefile.in (SERVER_OBJS),
slave/Makefile.in (SERVEROBJS): Use LIBOBJS.
* config/post.in (daemon.c): New rule for copying daemon.c locally
from lib/krb5/posix.

ticket: 1791

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15801 dc483132-0cff-0310-8789-dd5450dbe970

21 files changed:
src/ChangeLog
src/aclocal.m4
src/appl/bsd/ChangeLog
src/appl/bsd/configure.in
src/config/ChangeLog
src/config/post.in
src/kadmin/ChangeLog
src/kadmin/configure.in
src/kadmin/server/ChangeLog
src/kadmin/server/Makefile.in
src/kadmin/v5passwdd/ChangeLog
src/kadmin/v5passwdd/Makefile.in
src/kdc/ChangeLog
src/kdc/Makefile.in
src/kdc/configure.in
src/krb524/ChangeLog
src/krb524/Makefile.in
src/krb524/configure.in
src/slave/ChangeLog
src/slave/Makefile.in
src/slave/configure.in

index d845289a552dba896a24a5a67c6b8cf87346d6dc..43a57c215f60b7e83f6ed36a84d8e1dc7a997012 100644 (file)
@@ -1,3 +1,7 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * aclocal.m4 (KRB5_AC_NEED_DAEMON): New macro.
+
 2003-08-26  Ken Raeburn  <raeburn@mit.edu>
 
        * aclocal.m4 (WITH_CCOPTS, WITH_CPPOPTS, WITH_LINKER,
index afcd2228529ccbe36918ad0712d3d48426369ac4..2e28b69ef3302a25eaecd9d823bf71096ba5e9af 100644 (file)
@@ -615,6 +615,13 @@ AC_HELP_STRING([--with-netlib=LIBS], use user defined resolver library),
 [AC_LIBRARY_NET]
 )])dnl
 dnl
+dnl
+AC_DEFUN(KRB5_AC_NEED_DAEMON, [
+AC_REPLACE_FUNCS(daemon)
+KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif],daemon,1)])dnl
+dnl
 dnl Check if stdarg or varargs is available *and compiles*; prefer stdarg.
 dnl (This was sent to djm for incorporation into autoconf 3/12/1996.  KR)
 dnl
index 75066eedb4f071c636400cdf51179be372d88f48..253439c5241e1aa86675618bf4aaeee41af59534 100644 (file)
@@ -1,5 +1,8 @@
 2003-08-29  Ken Raeburn  <raeburn@mit.edu>
 
+       * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking
+       whether daemon() prototype is needed.
+
        * krshd.c (ignore_signals): Split out from cleanup().
        (doit): Call it when the shell process has completed, before
        calling syslog.
index 7bfc68e3bb5f3f3d2a44561af371423e421474bd..5620615597085fe0f88c35b8fcecc7d6d5db0d86 100644 (file)
@@ -80,9 +80,7 @@ AC_CHECK_HEADERS(unistd.h stdlib.h string.h sys/filio.h sys/sockio.h sys/label.h
 AC_HEADER_STDARG
 AC_REPLACE_FUNCS(getdtablesize)
 dnl
-KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],daemon,1)
+KRB5_AC_NEED_DAEMON
 dnl
 KRB5_SIGTYPE
 CHECK_SIGNALS
index 03c70e291b1d810a8639d9fafe37cf9c13e7aa1d..a47e8d2a2b3b0d5a326407c0527252c23bc93605 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * post.in (daemon.c): New rule for copying daemon.c locally from
+       master copy in lib/krb5/posix.
+
 2003-05-27  Ken Raeburn  <raeburn@mit.edu>
 
        * win-pre.in (CPPFLAGS): Define KRB5_DEPRECATED=1.
index 0a14ce8529df0aa2994c6199722a501ec3ecdb45..d42c2d213a54cc748599d1ccbd4708e11e7c7c24 100644 (file)
@@ -193,6 +193,12 @@ $(RECURSE_TARGETS):
        fi;\
        exit $$status
 
+# Some servers need "daemon", but we're not providing it directly
+# through a library.  We used to provide it through the krb5 library,
+# and the source is still there.
+daemon.c: $(SRCTOP)/lib/krb5/posix/daemon.c
+       $(CP) $(SRCTOP)/lib/krb5/posix/daemon.c daemon.c
+
 ##
 ## end of post.in
 ############################################################
index b16d87642747aa9caefbf2345f8bae5baa2566db..bd82399af8a0732b16de8fb3c1abf8e63cd35651 100644 (file)
@@ -1,3 +1,8 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking
+       whether daemon() prototype is needed.
+
 2003-01-10  Ken Raeburn  <raeburn@mit.edu>
 
        * configure.in: Use V5_AC_OUTPUT_MAKEFILE instead of
index 48eb0c32ad55ba50ad0b4091bdbbbd1afd741866..9141291826533ef967f29169429ec8a18de0b141 100644 (file)
@@ -5,10 +5,7 @@ AC_PROG_YACC
 AC_PROG_AWK
 AC_CHECK_HEADERS(unistd.h stdlib.h krb_db.h kdc.h regex.h alloca.h sys/time.h sys/select.h memory.h arpa/inet.h)
 AC_CHECK_FUNCS(ftime timezone getcwd strstr waitpid vsprintf)
-AC_REPLACE_FUNCS([memmove strftime])
-KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],daemon,1)
+KRB5_AC_NEED_DAEMON
 AC_HEADER_TIME
 CHECK_SIGNALS
 CHECK_WAIT_TYPE
index 4a2e37d378a6904f55d38160d37ab8f22f61296a..7c363fbcc2c154bf8cb4ac96a34504cf63fe369c 100644 (file)
@@ -1,3 +1,7 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * Makefile.in (OBJS): Use @LIBOBJS@.
+
 2003-05-27  Tom Yu  <tlyu@mit.edu>
 
        * schpw.c (process_chpw_request): Log chpw requests.
index 8a1ee6e392409531c45032634ff4bdc95c3995bc..21e6aab6cb575809b1d66f447a6b25db6d309447 100644 (file)
@@ -10,7 +10,7 @@ PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
 PROG = kadmind
-OBJS = kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o schpw.o misc.o server_glue_v1.o
+OBJS = kadm_rpc_svc.o server_stubs.o ovsec_kadmd.o schpw.o misc.o server_glue_v1.o @LIBOBJS@
 
 all:: $(PROG)
 
index b301eab762630d883fe519484d03ff2b254ff3c9..dc3a7b010e373d3b89bddf0810c152282b9d1bb5 100644 (file)
@@ -1,3 +1,7 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * Makefile.in (SERV_OBJS): Use @LIBOBJS@.
+
 2003-01-09  Ken Raeburn  <raeburn@mit.edu>
 
        * adm_conn.c (kadm_contact_server): Use socklen_t when passing
index 88a1221079163ab43a274601ca1913549c124202..c9c7672f8a45cd31cc32f61dbdb28cc2795a57de 100644 (file)
@@ -8,7 +8,7 @@ PROG_RPATH=$(KRB5_LIBDIR)
 COMMON_SRCS = $(srcdir)/adm_rw.c
 COMMON_OBJS = adm_rw.o
 SERV_SRCS = $(srcdir)/main.c $(srcdir)/srv_net.c $(srcdir)/proto_serv.c 
-SERV_OBJS = main.o srv_net.o proto_serv.o 
+SERV_OBJS = main.o srv_net.o proto_serv.o  @LIBOBJS@
 CLI_SRCS = $(srcdir)/kpasswd.c $(srcdir)/adm_conn.c
 CLI_OBJS = kpasswd.o adm_conn.o
 
index e4d7a9d9ad15667c26a176634767eb805b87ac1f..95ab6898707c5ea9e9bc6773cdf64b1c91cd9763 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking
+       whether daemon() prototype is needed.
+       * Makefile.in (OBJS, fakeka): Use @LIBOBJS@.
+
 2003-06-03  Tom Yu  <tlyu@mit.edu>
 
        * extern.h (master_princ): Remove realm_mkvno, realm_tgskey,
index 4608a7bfd73816a12e8d082b5650e14a7b112a11..c57dd4f4d4b664a8a88ced890d35283b84751bf5 100644 (file)
@@ -46,7 +46,8 @@ OBJS= \
        policy.o \
        extern.o \
        replay.o \
-       kerberos_v4.o
+       kerberos_v4.o \
+       @LIBOBJS@
 
 RT_OBJS= rtest.o \
        kdc_util.o \
@@ -73,8 +74,8 @@ krb5kdc: $(OBJS) $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS)
 rtest: $(RT_OBJS) $(KDB5_DEPLIBS) $(KADM_COMM_DEPLIBS) $(KRB5_BASE_DEPLIBS)
        $(CC_LINK) -o rtest $(RT_OBJS) $(KDB5_LIBS) $(KADM_COMM_LIBS) $(KRB5_BASE_LIBS)
 
-fakeka: fakeka.o $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS)
-       $(CC_LINK) -o fakeka fakeka.o $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS)
+fakeka: fakeka.o $(KADMSRV_DEPLIBS) $(KRB4COMPAT_DEPLIBS) @LIBOBJS@
+       $(CC_LINK) -o fakeka fakeka.o $(KADMSRV_LIBS) $(KRB4COMPAT_LIBS) @LIBOBJS@
 
 check-unix:: rtest
        KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ;\
index 620510df3d9ffe20e6c7be00aa38bbaa464c9446..9515483ac7a2f54b8e27a70a7888b2a60763fa06 100644 (file)
@@ -11,9 +11,7 @@ KRB5_NEED_PROTO([#include <string.h>
 #include <stdlib.h>
 ],swab,1)
 dnl
-KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],daemon,1)
+KRB5_AC_NEED_DAEMON
 dnl
 AC_PROG_AWK
 KRB5_AC_INET6
index b5e5b83779b318e48895a702a24a5a333060ff16..6f7fe60d70188453f3f07a6394d4586d8ae7888e 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking
+       whether daemon() prototype is needed.
+       * Makefile.in (SERVER_OBJS): Use @LIBOBJS@.
+
 2003-08-11  Tom Yu  <tlyu@mit.edu>
 
        * cnv_tkt_skey.c (krb524_convert_tkt_skey): Call krb_create_ticket
index 3de36c8187a074e5e227ecb437f3a0ddf09199c1..3d903cbb5d59063cd6ec9a682a7a330741fc51ec 100644 (file)
@@ -74,7 +74,7 @@ all-windows:: $(OUTPRE)k524init.exe $(K524LIB)
 krb524test: test.o $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS)
        $(CC_LINK) -o krb524test test.o $(KRB5_LIB) $(KRB4COMPAT_LIBS)
 
-SERVER_OBJS= krb524d.o cnv_tkt_skey.o conv_princ.o
+SERVER_OBJS= krb524d.o cnv_tkt_skey.o conv_princ.o @LIBOBJS@
 CLIENT_OBJS= $(OUTPRE)k524init.$(OBJEXT)
 
 krb524d: $(SERVER_OBJS) $(KADMSRV_DEPLIBS) $(KRB5_DEPLIB) $(KRB4COMPAT_DEPLIBS)
index 1ffdac7d76f6bab44abade13f4e61a3401c537a2..917ce2a725dbfc865bd1b15ee39df2a3a5e317a8 100644 (file)
@@ -4,9 +4,7 @@ KRB5_BUILD_LIBRARY_STATIC
 KRB5_BUILD_LIBOBJS
 AC_PROG_AWK
 AC_CHECK_HEADERS(sys/select.h unistd.h) dnl
-KRB5_NEED_PROTO([#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif],daemon,1)
+KRB5_AC_NEED_DAEMON
 AC_TYPE_SIGNAL
 
 KRB5_BUILD_PROGRAM
index bbf890c27348042245039d3f02340155f1f19e88..7a07be47cfc92cdf0f020c416f928ace8a442f66 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-29  Ken Raeburn  <raeburn@mit.edu>
+
+       * configure.in: Call KRB5_AC_NEED_DAEMON instead of checking
+       whether daemon() prototype is needed.
+       * Makefile.in (SERVEROBJS): Use @LIBOBJS@.
+
 2002-08-23  Ken Raeburn  <raeburn@mit.edu>
 
        * Makefile.in: Change $(S)=>/ and $(U)=>.. globally.
index f4d1ad6d4b13b426c1079c85c5f55a9fd9a8154f..6c689cfbbec0c250346aff45e01be0d624b86cc3 100644 (file)
@@ -11,7 +11,7 @@ CLIENTSRCS= $(srcdir)/kprop.c
 CLIENTOBJS= kprop.o 
 
 SERVERSRCS= $(srcdir)/kpropd.c 
-SERVEROBJS= kpropd.o 
+SERVEROBJS= kpropd.o @LIBOBJS@
 
 SRCS= $(CLIENTSRCS) $(SERVERSRCS)
 
index 5c1f2df12b6b5b13d4b25e03a5c3015e2183c66e..1ce9f0317301cdcb3375af39b20ab8e72f97e6ee 100644 (file)
@@ -3,7 +3,7 @@ CONFIG_RULES
 AC_TYPE_MODE_T
 AC_PROG_INSTALL
 AC_CHECK_LIB(util,main)
-KRB5_NEED_PROTO([#include <unistd.h>],daemon,1)
+KRB5_AC_NEED_DAEMON
 KRB5_GETSOCKNAME_ARGS
 KRB5_GETPEERNAME_ARGS
 KRB5_BUILD_PROGRAM