xtrlock compilation errors

Hello,

Trying to compile xtrlock from source on a RHEL system. It has an Imakefile but not being familiar enough with that system getting errors running imake:

#! Imakefile for xtrlock - X Transparent Lock
#!
#! Copyright (C)1993,1994 Ian Jackson
#!
#! This is free software; you can redistribute it and/or modify
#! it under the terms of the GNU General Public License as published by
#! the Free Software Foundation; either version 2, or (at your option)
#! any later version.
#!
#! This is distributed in the hope that it will be useful,
#! but WITHOUT ANY WARRANTY; without even the implied warranty of
#! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#! GNU General Public License for more details.

SingleProgramTarget(xtrlock,xtrlock.o,-lcrypt -lX11,)
InstallProgram(xtrlock,$(BINDIR))
InstallManPage(xtrlock,$(MANDIR))

This is what happens when we try imake:

imake -v -I /usr/share/X11/config/
gcc -I. -Uunix -D__amd64__ -D__amd64__ -traditional -Dlinux -I -E -v Imakefile.c 
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linux
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)
gcc: GNU C no longer supports -traditional without -E
imake: Exit code 1.
  Stop.

Tried taking out the -traditional in the files in /usr/share/X11/config/ but still gets the error. :confused:

There is also a Makefile.noimake:

# Makefile for xtrlock - X Transparent Lock
# This Makefile provided for those of you who lack a functioning xmkmf.
#
# Copyright (C)1993,1994 Ian Jackson
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

LDLIBS=-lX11
CC=gcc
CFLAGS=-Wall
INSTALL=install

xtrlock:        xtrlock.o

xtrlock.o:      xtrlock.c lock.bitmap mask.bitmap patchlevel.h

install:        xtrlock
                $(INSTALL) -c -m 755 xtrlock /usr/bin/X11

install.man:
                $(INSTALL) -c -m 644 xtrlock.man /usr/man/man1/xtrlock.1x

But it gives this error:

make
gcc   xtrlock.o  -lX11 -o xtrlock
xtrlock.o: In function `passwordok':
xtrlock.c:(.text+0x28): undefined reference to `crypt'
collect2: ld returned 1 exit status
make: *** [xtrlock] Error 1

We are a little rusty on this stuff so... Any help appreciated.

Thanks,

mgb

Try adding -lcrypt to LDLIBS in Makefile.noimake .