To: xbugs@x.org
Subject: xdm: does not build on system needing -lcrypt

     VERSION:

R6, public-patch-11

     CLIENT MACHINE and OPERATING SYSTEM:

Sun3 / NetBSD-1.0  (also SPARC / NetBSD-1.0)

     DISPLAY TYPE:

Sun bwtwo, cgtwo, cgfour

     WINDOW MANAGER:

twm (any)

     COMPILER:

native cc (gcc)

     AREA:

xdm

     SYNOPSIS:

Any system that needs -lcrypt will fail to link xdm
(unless the system happens to also be XFree86).

     DESCRIPTION:

The Imakefile uses a conditional section to bring in -lcrypt
but that section uses a conditional that prevents bringing
in -lcrypt on any system except XFree86.  Perhaps the logical
and was meant to be a logical or instead.  There are other
systems that need -lcrypt that do not use XFree86 (i.e. Sun.)

     REPEAT BY:

Try to compile xdm on a system that needs -lcrypt but does not
use XFree86 (i.e. SPARC/Solaris, or SPARC/NetBSD, Sun3/NetBSD).
The linker will say something like:
Unresolved: _crypt

     SAMPLE FIX:

cd xc/programs/xdm
diff -c Imakefile.save Imakefile
*** Imakefile.save	Wed Mar 15 16:16:30 1995
--- Imakefile	Wed Jul 12 23:13:25 1995
***************
*** 1,4 ****
--- 1,5 ----
  XCOMM $XConsortium: Imakefile,v 1.76 95/01/05 20:57:42 kaleb Exp $
+ XCOMM Fix condition for -lcrypt <gwr@mc.com>
  #define IHaveSubdirs
  #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
  
***************
*** 59,65 ****
  SYS_LIBRARIES = -ls
  #endif
  
! #if defined(XFree86Version) && HasLibCrypt
  SYS_LIBRARIES = -lcrypt
  #endif
  
--- 60,66 ----
  SYS_LIBRARIES = -ls
  #endif
  
! #if HasLibCrypt
  SYS_LIBRARIES = -lcrypt
  #endif
  
