| 1 |
knight |
31 |
# $Id$
|
| 2 |
adx |
30 |
# This file is by Joshua Kwan, and the source is in the public domain.
|
| 3 |
|
|
|
| 4 |
|
|
AC_INIT
|
| 5 |
|
|
AC_CONFIG_FILES(Makefile)
|
| 6 |
|
|
|
| 7 |
knight |
31 |
AC_COPYRIGHT([$Id$])
|
| 8 |
adx |
30 |
|
| 9 |
|
|
AC_PROG_CC
|
| 10 |
|
|
|
| 11 |
|
|
AC_CHECK_LIB(crypto, RSA_private_decrypt, [LIBS="-lcrypto"],
|
| 12 |
|
|
[
|
| 13 |
|
|
LIBS="$LIBS -L/usr/local/lib"
|
| 14 |
|
|
AC_CHECK_LIB(crypto, RSA_private_decrypt, [LIBS="$LIBS -lcrypto"],
|
| 15 |
|
|
[AC_MSG_ERROR([Could not find libcrypto.])])
|
| 16 |
|
|
])
|
| 17 |
|
|
|
| 18 |
|
|
AC_MSG_CHECKING([for location of OpenSSL includes])
|
| 19 |
|
|
|
| 20 |
|
|
for dirs in /usr /usr/local/ssl /usr/pkg /usr/local /usr/local/openssl ; do
|
| 21 |
|
|
if test -f "${dirs}/include/openssl/opensslv.h" ; then
|
| 22 |
|
|
INCLUDES="${dirs}/include"
|
| 23 |
|
|
break
|
| 24 |
|
|
fi
|
| 25 |
|
|
done
|
| 26 |
|
|
|
| 27 |
|
|
AC_MSG_RESULT($INCLUDES)
|
| 28 |
|
|
AC_SUBST(INCLUDES)
|
| 29 |
|
|
|
| 30 |
|
|
if test "$ac_cv_c_compiler_gnu" = yes; then
|
| 31 |
|
|
CFLAGS="$CFLAGS -Wall"
|
| 32 |
|
|
fi
|
| 33 |
|
|
|
| 34 |
|
|
if test "$ac_cv_prog_cc_g" = yes; then
|
| 35 |
|
|
CFLAGS="$CFLAGS -g"
|
| 36 |
|
|
fi
|
| 37 |
|
|
|
| 38 |
|
|
AC_SUBST(CFLAGS)
|
| 39 |
|
|
|
| 40 |
|
|
AC_OUTPUT
|