Solution: You probably have it in a non-standard place, ie somewhere that gcc can't find it on it's own.
Let's say you had your tcp wrappers installed in /opt/tcpd_7.6
.
To help gcc find your include files and libraries, you'd want to set three
environment variables as follows:
CFLAGS="$CFLAGS -I/opt/tcpd_7.6/include" CPPFLAGS="$CPPFLAGS -I/opt/tcpd_7.6/include" LDFLAGS="$LDFLAGS -L/opt/tcpd_7.6/lib" export CFLAGS CPPFLAGS LDFLAGS
configure
. This is the generic way to have
configure
find specific libraries, and is not specific to Stunnel
itself. The configure
program should be able to determine if the libwrap
library (-lwrap
) and headers are available in standard locations.
.............
I have openssl 0.9.7h installed on ccpe01 v51b pk#5,
with
tcp-wrappers7.6.
I did the configure, make and make install and things. All
stages
appeared successful, but then I attempted the
./configure
--with-tcp-wrappers and it errored with -lwrap not
found.
checking for SSL directory...
/usr/local/ssl
checking
for "/dev/urandom"...
yes
checking
whether to disable RSA support...
no
checking
whether to enable DH support...
no
checking
for gethostbyname in -lnsl...
no
checking
for socket in -lsocket...
no
checking
for pthread_create in -lpthread...
no
checking
for pthread_create in -lc_r...
no
checking
for openpty in -lutil...
yes
checking
whether to use the libwrap (TCP wrappers) library... yes
checking
for hosts_access in -lwrap... not found <--
..............
So then I tried assigning the 3 environment variables and things got worse. The include and lib directories are referenced for tcpd 7.6, but after installing tcp wrappers I do not find include or lib directories for tcpd.
Q: Should I expect NOT to see the include or lib directories as defined in #1 above, and, if so, will specifying the absolute path to the tcpwrapper images (EX: /var/tcp_wrappers/tcp_wrappers_7.6) suffice?
3. I followed these instructions when compiling/configuring tcpd v7.6 (downloaded from ftp://ftp.porcupine.org/pub/security/index.html):
............
7.1 - Easy configuration and
installation
-----------------------------------------
The "easy" recipe requires no changes to existing software
or
configuration files. Basically, you move the daemons that you want
to
protect to a different directory and plug the resulting holes
with
copies of the wrapper programs.
If you don't run Ultrix, you won't need the miscd wrapper program.
The
miscd daemon implements among others the SYSTAT service, which
produces
the same output as the WHO command.
Type `make' and follow the instructions. The Makefile comes
with
ready-to-use templates for many common UNIX implementations
(sun,
ultrix, hp-ux, aix, irix,...).
..............
Thanks in advance for any guidance and/or advice that you can offer.
--John Lanier