This macro will check various standard spots for OpenSSL including
a user-supplied directory.
The user uses '--with-ssl' or '--with-ssl=/path/to/ssl' as arguments
to configure.
If OpenSSL is found the include directory gets added to CFLAGS as well
as '-DHAVE_SSL', '-lssl' & '-lcrypto' get added to LIBS, and
the libraries location gets added to LDFLAGS.
Finally 'HAVE_SSL' gets set to 'yes' for use in your Makefile.in
I use it like so (valid for gmake):
HAVE_SSL = @HAVE_SSL@
ifeq ($(HAVE_SSL),yes)
SRCS+= @srcdir@/my_file_that_needs_ssl.c
endif
For bsd 'bmake' use:
.if ${HAVE_SSL} == "yes"
SRCS+= @srcdir@/my_file_that_needs_ssl.c
.endif