[523] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Changes to build krb5 B4 on HP-UX with configure

daemon@ATHENA.MIT.EDU (John Brezak)
Tue Jun 21 17:46:56 1994

To: krb5-bugs@MIT.EDU
Date: Tue, 21 Jun 1994 17:45:42 -0400
From: John Brezak <brezak@apollo.hp.com>


Here are some changes to build Kerberos5 beta 4 on HP-UX 9.03. Most changes
are in the configure files.

Highlights:
	- try to locate dbm and setup the Makefiles accordingly
	- accomodate a more system 5 environment w.r.t.
		rand() vs. random()
		getcwd() vs. getwd()
		utime() vs. utimes()
	- detect/use setsid() when appropriate
	- detect/use TCL for admin/edit

To compile you need the HP c89 compiler (or gcc - not tested)

$ CC="c89 -D_HPUX_SOURCE" ./configure
$ make CC="c89 -D_HPUX_SOURCE"

[ I haven't figured out how to have configure do this for me... ]

[ There may be a few more changes as I get to trying things, but this
  is a start. ]


*** ./admin/aname/Makefile.in.orig	Tue Jun 21 11:37:25 1994
--- ./admin/aname/Makefile.in	Tue Jun 21 11:37:48 1994
***************
*** 3,8 ****
--- 3,9 ----
   
  DEFS = @DEFS@
  LIBS = @LIBS@
+ DBMLIB = @DBMLIB@
   
  CFLAGS = -g $(DEFS) $(LOCALINCLUDE)
  LDFLAGS = -g
***************
*** 12,18 ****
  TOPLIBD = $(BUILDTOP)/lib
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
- DBMLIB=
  KDBLIB=$(TOPLIBD)/libkdb5.a 
  
  all::
--- 13,18 ----
*** ./admin/aname/configure.orig	Tue Jun 21 11:37:29 1994
--- ./admin/aname/configure	Tue Jun 21 11:38:47 1994
***************
*** 373,379 ****
--- 373,465 ----
     LIBS="${LIBS} -lnsl"
  fi
  
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -lndbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -lndbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
  
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-lndbm"
+ echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-lndbm"
+ fi
+ 
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -ldbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ldbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-ldbm"
+ echo "#define" HAVE_LIBDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-ldbm"
+ fi
+ 
+ test -n "$silent" || echo "checking for dbm_open"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+ choke me
+ #else
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ extern char dbm_open(); dbm_open();
+ #endif
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   :
+ else
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining ODBM"
+ echo "#define" ODBM "1" >> confdefs.h
+ }
+ 
+ fi
+ rm -f conftest*
  
  
  
***************
*** 438,443 ****
--- 524,530 ----
  
  trap 'rm -f Makefile; exit 1' 1 2 15
  LIBS='$LIBS'
+ DBMLIB='$DBMLIB'
  srcdir='$srcdir'
  top_srcdir='$top_srcdir'
  prefix='$prefix'
***************
*** 485,490 ****
--- 572,578 ----
  $ac_vpsub
  $extrasub
  s%@LIBS@%$LIBS%g
+ s%@DBMLIB@%$DBMLIB%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@prefix@%$prefix%g
*** ./admin/edit/kdb5_edit.c.orig	Tue Jun 21 11:32:49 1994
--- ./admin/edit/kdb5_edit.c	Tue Jun 21 11:33:14 1994
***************
*** 1353,1359 ****
--- 1353,1363 ----
  {
  	char	buf[MAXPATHLEN];
  
+ #ifdef SYS5
+ 	if (!getcwd(buf, sizeof(buf))) {
+ #else
  	if (!getwd(buf)) {
+ #endif
  		com_err(argv[0], 0, "Couldn't get working directory: %s",
  			buf);
  		return;
*** ./admin/edit/configure.orig	Tue Jun 21 11:27:34 1994
--- ./admin/edit/configure	Tue Jun 21 11:30:33 1994
***************
*** 373,381 ****
--- 373,500 ----
     LIBS="${LIBS} -lnsl"
  fi
  
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -lndbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -lndbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
  
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-lndbm"
+ echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-lndbm"
+ fi
+ 
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -ldbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ldbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-ldbm"
+ echo "#define" HAVE_LIBDBM "1" >> confdefs.h
+ }
  
+    DBMLIB="-ldbm"
+ fi
+ 
+ test -n "$silent" || echo "checking for dbm_open"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+ choke me
+ #else
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ extern char dbm_open(); dbm_open();
+ #endif
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   :
+ else
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining ODBM"
+ echo "#define" ODBM "1" >> confdefs.h
+ }
+ 
+ fi
+ rm -f conftest*
  
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -L/usr/local/lib -ltcl"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ltcl"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining TCLLIB=-ltcl"
+ echo "#define" HAVE_LIBTCL "1" >> confdefs.h
+ }
+ 
+    TCLLIB="-L/usr/local/lib -ltcl -lm"
+    LOCALINCLUDE="$LOCALINCLUDE -I/usr/local/include"
+    UIOBJS="\$(TCLOBJS)"
+    UILIB="\$(TCLLIB)"
+ else
+    UIOBJS="\$(SSOBJS)"
+    UILIB="\$(SSLIB)"
+ fi
+ rm -f conftest*
  
  
  
***************
*** 440,445 ****
--- 559,569 ----
  
  trap 'rm -f Makefile; exit 1' 1 2 15
  LIBS='$LIBS'
+ DBMLIB='$DBMLIB'
+ TCLLIB='$TCLLIB'
+ UILIB='$UILIB'
+ UIOBJS='$UIOBJS'
+ LOCALINCLUDE='$LOCALINCLUDE'
  srcdir='$srcdir'
  top_srcdir='$top_srcdir'
  prefix='$prefix'
***************
*** 487,492 ****
--- 611,621 ----
  $ac_vpsub
  $extrasub
  s%@LIBS@%$LIBS%g
+ s%@DBMLIB@%$DBMLIB%g
+ s%@TCLLIB@%$TCLLIB%g
+ s%@UILIB@%$UILIB%g
+ s%@UIOBJS@%$UIOBJS%g
+ s%@LOCALINCLUDE@%$LOCALINCLUDE%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@prefix@%$prefix%g
*** ./admin/edit/Makefile.in.orig	Tue Jun 21 11:27:13 1994
--- ./admin/edit/Makefile.in	Tue Jun 21 11:31:35 1994
***************
*** 3,8 ****
--- 3,11 ----
   
  DEFS = @DEFS@
  LIBS = @LIBS@
+ DBMLIB = @DBMLIB@
+ TCLLIB = @TCLLIB@
+ LOCALINCLUDE = @LOCALINCLUDE@
   
  CFLAGS = -g $(DEFS) $(LOCALINCLUDE)
  LDFLAGS = -g
***************
*** 13,30 ****
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
  SSLIB=$(BUILDTOP)/util/ss/libss.a
- DBMLIB=
  KDBLIB=$(TOPLIBD)/libkdb5.a 
  
  all::
  
! KLIB = $(TOPLIBD)/libkrb5.a $(TOPLIBD)/libcrypto.a $(ISODELIB) $(SSLIB) 
$(COMERRLIB) $(DBMLIB)
  
  
  DEPLIBS = $(DEPKDBLIB) $(DEPKLIB)
  LOCAL_LIBRARIES = $(KDBLIB) $(KLIB)
  
! OBJS= kdb5_edit.o kdb5_ed_ct.o util.o dump.o ss_wrapper.o
  SRCS= $(srcdir)/kdb5_edit.c $(srcdir)/kdb5_ed_ct.c $(srcdir)/util.c 
$(srcdir)/dump.c $(srcdir)/ss_wrapper.c
  
  all:: kdb5_edit
--- 16,37 ----
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
  SSLIB=$(BUILDTOP)/util/ss/libss.a
  KDBLIB=$(TOPLIBD)/libkdb5.a 
+ UILIB = @UILIB@
  
  all::
  
! KLIB = $(TOPLIBD)/libkrb5.a $(TOPLIBD)/libcrypto.a $(ISODELIB) $(UILIB) 
$(COMERRLIB) $(DBMLIB)
  
  
  DEPLIBS = $(DEPKDBLIB) $(DEPKLIB)
  LOCAL_LIBRARIES = $(KDBLIB) $(KLIB)
  
! SSOBJS =  kdb5_ed_ct.o ss_wrapper.o
! TCLOBJS = tcl_wrapper.o
! UIOBJS = @UIOBJS@
! 
! OBJS= kdb5_edit.o util.o dump.o $(UIOBJS)
  SRCS= $(srcdir)/kdb5_edit.c $(srcdir)/kdb5_ed_ct.c $(srcdir)/util.c 
$(srcdir)/dump.c $(srcdir)/ss_wrapper.c
  
  all:: kdb5_edit
*** ./admin/stash/Makefile.in.orig	Tue Jun 21 11:36:24 1994
--- ./admin/stash/Makefile.in	Tue Jun 21 11:36:38 1994
***************
*** 3,8 ****
--- 3,9 ----
   
  DEFS = @DEFS@
  LIBS = @LIBS@
+ DBMLIB = @DBMLIB@
   
  CFLAGS = -g $(DEFS) $(LOCALINCLUDE)
  LDFLAGS = -g
***************
*** 12,18 ****
  TOPLIBD = $(BUILDTOP)/lib
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
- DBMLIB=
  KDBLIB=$(TOPLIBD)/libkdb5.a 
  
  all::
--- 13,18 ----
*** ./admin/stash/configure.orig	Tue Jun 21 11:34:51 1994
--- ./admin/stash/configure	Tue Jun 21 11:36:14 1994
***************
*** 373,379 ****
--- 373,464 ----
     LIBS="${LIBS} -lnsl"
  fi
  
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -lndbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -lndbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
  
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-lndbm"
+ echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-lndbm"
+ fi
+ 
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -ldbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ldbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-ldbm"
+ echo "#define" HAVE_LIBDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-ldbm"
+ fi
+ 
+ test -n "$silent" || echo "checking for dbm_open"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+ choke me
+ #else
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ extern char dbm_open(); dbm_open();
+ #endif
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   :
+ else
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining ODBM"
+ echo "#define" ODBM "1" >> confdefs.h
+ }
+ 
+ fi
  
  
  
***************
*** 438,443 ****
--- 523,529 ----
  
  trap 'rm -f Makefile; exit 1' 1 2 15
  LIBS='$LIBS'
+ DBMLIB='$DBMLIB'
  srcdir='$srcdir'
  top_srcdir='$top_srcdir'
  prefix='$prefix'
***************
*** 485,490 ****
--- 571,577 ----
  $ac_vpsub
  $extrasub
  s%@LIBS@%$LIBS%g
+ s%@DBMLIB@%$DBMLIB%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@prefix@%$prefix%g
*** ./include/krb5/configure.orig	Mon Jun 20 17:52:32 1994
--- ./include/krb5/configure	Tue Jun 21 13:43:33 1994
***************
*** 440,445 ****
--- 440,522 ----
  fi
  rm -f conftest*
  
+ test -n "$silent" || echo "checking for utimes"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ extern int utimes(); utimes();
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining HAS_UTIMES"
+ echo "#define" HAS_UTIMES "1" >> confdefs.h
+ DEFS="$DEFS -DHAS_UTIMES=1"
+ ac_sed_defs="${ac_sed_defs}\${ac_dA}HAS_UTIMES\${ac_dB}HAS_UTIMES\${ac_dC}1\$
{ac_dD}
+ \${ac_uA}HAS_UTIMES\${ac_uB}HAS_UTIMES\${ac_uC}1\${ac_uD}
+ \${ac_eA}HAS_UTIMES\${ac_eB}HAS_UTIMES\${ac_eC}1\${ac_eD}
+ "
+ }
+ 
+ 
+ fi
+ rm -f conftest*
+ 
+ test -n "$silent" || echo "checking for random"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ extern int random(); random();
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining HAS_RANDOM"
+ echo "#define" HAS_RANDOM "1" >> confdefs.h
+ DEFS="$DEFS -DHAS_RANDOM=1"
+ ac_sed_defs="${ac_sed_defs}\${ac_dA}HAS_RANDOM\${ac_dB}HAS_RANDOM\${ac_dC}1\$
{ac_dD}
+ \${ac_uA}HAS_RANDOM\${ac_uB}HAS_RANDOM\${ac_uC}1\${ac_uD}
+ \${ac_eA}HAS_RANDOM\${ac_eB}HAS_RANDOM\${ac_eC}1\${ac_eD}
+ "
+ }
+ 
+ 
+ fi
+ rm -f conftest*
+ 
+ test -n "$silent" || echo "checking for setsid"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ extern int setsid(); setsid();
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining HAS_SETSID"
+ echo "#define" HAS_SETSID "1" >> confdefs.h
+ DEFS="$DEFS -DHAS_SETSID=1"
+ ac_sed_defs="${ac_sed_defs}\${ac_dA}HAS_SETSID\${ac_dB}HAS_SETSID\${ac_dC}1\$
{ac_dD}
+ \${ac_uA}HAS_SETSID\${ac_uB}HAS_SETSID\${ac_uC}1\${ac_uD}
+ \${ac_eA}HAS_SETSID\${ac_eB}HAS_SETSID\${ac_eC}1\${ac_eD}
+ "
+ }
+ 
+ 
+ fi
+ rm -f conftest*
  
  test -n "$silent" || echo "checking for dirent.h"
  cat > conftest.${ac_ext} <<EOF
*** ./include/krb5/autoconf.h.in.orig	Tue Jun 21 13:45:41 1994
--- ./include/krb5/autoconf.h.in	Tue Jun 21 13:46:24 1994
***************
*** 12,17 ****
--- 12,20 ----
  #undef HAS_ANSI_VOLATILE
  #undef HAS_STDLIB_H
  #undef HAS_STRDUP
+ #undef HAS_SETSID
+ #undef HAS_RANDOM
+ #undef HAS_UTIMES
  #undef HAS_VOID_TYPE
  #undef KRB5_PROVIDE_PROTOTYPES
  #undef NEED_SYS_FCNTL_H
*** ./include/krb5/config.h.orig	Mon Jun 20 17:56:25 1994
--- ./include/krb5/config.h	Tue Jun 21 13:51:13 1994
***************
*** 30,36 ****
  #define KRB5_AUTOCONF__
  #include "autoconf.h"
  #endif
! #ifdef SYSV
  /* Change srandom and random to use rand and srand */
  /* Taken from the Sandia changes.  XXX  We should really just include */
  /* srandom and random into Kerberos release, since rand() is a really */
--- 30,37 ----
  #define KRB5_AUTOCONF__
  #include "autoconf.h"
  #endif
! 
! #ifndef HAS_RANDOM
  /* Change srandom and random to use rand and srand */
  /* Taken from the Sandia changes.  XXX  We should really just include */
  /* srandom and random into Kerberos release, since rand() is a really */
***************
*** 37,46 ****
  /* bad random number generator.... [tytso:19920616.2231EDT] */
  #define random() rand()
  #define srandom(a) srand(a)
! #ifndef unicos61
! #define utimes(a,b) utime(a,b)
! #endif  /* unicos61 */
! #endif /* SYSV */
  
  /* XXX these should be parameterized soon... */
  #define PROVIDE_DES_CBC_CRC
--- 38,44 ----
  /* bad random number generator.... [tytso:19920616.2231EDT] */
  #define random() rand()
  #define srandom(a) srand(a)
! #endif
  
  /* XXX these should be parameterized soon... */
  #define PROVIDE_DES_CBC_CRC
*** ./isode/compat/signals.c.orig	Mon Jun 20 15:15:29 1994
--- ./isode/compat/signals.c	Mon Jun 20 15:19:36 1994
***************
*** 98,104 ****
  }
  
  /*  */
! #ifndef SVR4_UCB
  
  int	sigblock (mask)
  int	mask;
--- 98,104 ----
  }
  
  /*  */
! #if !defined(SVR4_UCB) && !defined(__hpux)
  
  int	sigblock (mask)
  int	mask;
*** ./isode/h/config.h.orig	Mon Jun 20 15:55:02 1994
--- ./isode/h/config.h	Mon Jun 20 15:57:06 1994
***************
*** 17,22 ****
--- 17,29 ----
  #define BSD42
  #endif
  
+ #if defined(HPUX) || defined(__hpux)
+ #define SYS5
+ #ifndef HPUX
+ #define HPUX
+ #endif
+ #endif
+ 
  #ifdef _AIX
  /* SYS5 is also for fcntl.h instead of sys/fcntl.h */
  #define SYS5
*** ./kadmin/server/Makefile.in.orig	Tue Jun 21 11:59:33 1994
--- ./kadmin/server/Makefile.in	Tue Jun 21 12:00:44 1994
***************
*** 3,8 ****
--- 3,9 ----
   
  DEFS = @DEFS@
  LIBS = @LIBS@
+ DBMLIB = @DBMLIB@
   
  CFLAGS = -g $(DEFS) $(LOCALINCLUDE)
  LDFLAGS = -g
***************
*** 13,19 ****
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
  SSLIB=$(BUILDTOP)/util/ss/libss.a
- DBMLIB=
  KDBLIB=$(TOPLIBD)/libkdb5.a 
  
  all::
--- 14,19 ----
*** ./kadmin/server/configure.orig	Tue Jun 21 11:59:29 1994
--- ./kadmin/server/configure	Tue Jun 21 12:00:30 1994
***************
*** 373,379 ****
--- 373,467 ----
     LIBS="${LIBS} -lnsl"
  fi
  
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -lndbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -lndbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
  
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-lndbm"
+ echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-lndbm"
+ fi
+ 
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -ldbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ldbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-ldbm"
+ echo "#define" HAVE_LIBDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-ldbm"
+ fi
+ 
+ test -n "$silent" || echo "checking for dbm_open"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+ choke me
+ #else
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ extern char dbm_open(); dbm_open();
+ #endif
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   :
+ else
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining ODBM"
+ echo "#define" ODBM "1" >> confdefs.h
+ }
+ 
+ fi
+ rm -f conftest*
+ 
+ 
  for ac_prog in mawk gawk nawk awk
  do
  if test -z "$AWK"; then
***************
*** 462,467 ****
--- 550,556 ----
  trap 'rm -f Makefile; exit 1' 1 2 15
  AWK='$AWK'
  LIBS='$LIBS'
+ DBMLIB='$DBMLIB'
  srcdir='$srcdir'
  top_srcdir='$top_srcdir'
  prefix='$prefix'
***************
*** 510,515 ****
--- 599,605 ----
  $extrasub
  s%@AWK@%$AWK%g
  s%@LIBS@%$LIBS%g
+ s%@DBMLIB@%$DBMLIB%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
  s%@prefix@%$prefix%g
*** ./kdc/Makefile.in.orig	Mon Jun 20 17:40:10 1994
--- ./kdc/Makefile.in	Mon Jun 20 17:40:48 1994
***************
*** 5,10 ****
--- 5,11 ----
  LIBS = @LIBS@
  KRB4 = @KRB4@
  K4LIB = @K4LIB@
+ DBMLIB = @DBMLIB@
  
  CFLAGS = -g $(DEFS) $(LOCALINCLUDE)
  LDFLAGS = -g
***************
*** 14,20 ****
  TOPLIBD = $(BUILDTOP)/lib
  ISODELIB=$(TOPLIBD)/libisode.a
  COMERRLIB=$(BUILDTOP)/util/et/libcom_err.a
- DBMLIB = @DBMLIB@
  KDBLIB=$(TOPLIBD)/libkdb5.a 
  
  RM = rm -f
--- 15,20 ----
*** ./kdc/configure.orig	Mon Jun 20 17:28:28 1994
--- ./kdc/configure	Tue Jun 21 11:11:34 1994
***************
*** 373,379 ****
--- 373,465 ----
     LIBS="${LIBS} -lnsl"
  fi
  
+ rm -f conftest*
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -lndbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -lndbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
  
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-lndbm"
+ echo "#define" HAVE_LIBNDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-lndbm"
+ fi
+ 
+ ac_save_LIBS="${LIBS}"
+ LIBS="${LIBS} -ldbm"
+ ac_have_lib=""
+ test -n "$silent" || echo "checking for -ldbm"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ 
+ int main() { return 0; }
+ int t() { main();; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   ac_have_lib="1"
+ 
+ fi
+ rm -f conftest*
+ LIBS="${ac_save_LIBS}"
+ if test -n "${ac_have_lib}"; then
+    
+ {
+ test -n "$verbose" && \
+ echo "	defining DBMLIB=-ldbm"
+ echo "#define" HAVE_LIBDBM "1" >> confdefs.h
+ }
+ 
+    DBMLIB="-ldbm"
+ fi
+ 
+ test -n "$silent" || echo "checking for dbm_open"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <ctype.h>
+ int main() { return 0; }
+ int t() { 
+ /* The GNU C library defines this for functions which it implements
+     to always fail with ENOSYS.  Some functions are actually named
+     something starting with __ and the normal name is an alias.  */
+ #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+ choke me
+ #else
+ /* Override any gcc2 internal prototype to avoid an error.  */
+ extern char dbm_open(); dbm_open();
+ #endif
+ ; return 0; }
+ EOF
+ if eval $ac_compile; then
+   :
+ else
+   rm -rf conftest*
+   {
+ test -n "$verbose" && \
+ echo "	defining ODBM"
+ echo "#define" ODBM "1" >> confdefs.h
+ }
+ 
+ fi
+ rm -f conftest*
+ 
  for ac_prog in mawk gawk nawk awk
  do
  if test -z "$AWK"; then
***************
*** 490,495 ****
--- 576,582 ----
  AWK='$AWK'
  KRB4='$KRB4'
  K4LIB='$K4LIB'
+ DBMLIB='$DBMLIB'
  LIBS='$LIBS'
  srcdir='$srcdir'
  top_srcdir='$top_srcdir'
***************
*** 540,545 ****
--- 627,633 ----
  s%@AWK@%$AWK%g
  s%@KRB4@%$KRB4%g
  s%@K4LIB@%$K4LIB%g
+ s%@DBMLIB@%$DBMLIB%g
  s%@LIBS@%$LIBS%g
  s%@srcdir@%$srcdir%g
  s%@top_srcdir@%$top_srcdir%g
*** ./lib/kdb/kdb_dbm.c.orig	Tue Jun 21 13:53:19 1994
--- ./lib/kdb/kdb_dbm.c	Tue Jun 21 13:53:25 1994
***************
*** 1348,1350 ****
--- 1348,1368 ----
      non_blocking = mode;
      return old;
  }
+ 
+ #ifndef HAS_UTIMES
+ extern int errno;
+ 
+ #include <utime.h>
+ #include <sys/time.h>
+ 
+ utimes(file, tvp)
+ char *file;
+ struct timeval *tvp;
+ {
+ 	struct utimbuf times;
+ 
+ 	times.actime = tvp[0].tv_sec;
+ 	times.modtime = tvp[1].tv_sec;
+ 	return(utime(file, &times));
+ }
+ #endif
*** ./slave/kpropd.c.orig	Tue Jun 21 13:55:20 1994
--- ./slave/kpropd.c	Tue Jun 21 13:58:32 1994
***************
*** 458,463 ****
--- 458,466 ----
  	(void) dup2(n, 2);
  	if (n > 2)
  		(void) close(n);
+ #ifdef HAS_SETSID
+ 	(void) setsid();
+ #else
  #ifdef SYSV
  	setpgrp();
  #else
***************
*** 476,481 ****
--- 479,485 ----
  		}
  	}
  #endif /* SYSV */
+ #endif /* HAS_SETSID */
  #endif /* BSD > 199006 */
  }
  


home help back first fref pref prev next nref lref last post