# # configure.in for the OpenSSL IBM PKCS#11 engine project # AC_INIT(openssl-ibmpkcs11, 0.1, opencryptoki-users@lists.sf.net) AM_INIT_AUTOMAKE(1.6.3) # Debugging support AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [turn on all debugging flags [default is off]]), [enable_debug="yes" AC_MSG_RESULT([*** Enabling debugging at user request ***])],) # custom openssl location AC_ARG_WITH(openssl, [ --with-openssl[[=DIR]] build with OpenSSL support [[/usr/local/ssl]]], [openssl_prefix=$withval], [openssl_prefix=] ) if test "x$openssl_prefix" != x; then AC_MSG_RESULT([*** Using OpenSSL directory $openssl_prefix ***]) LDFLAGS="-L$openssl_prefix/lib $LDFLAGS" CFLAGS="-I$openssl_prefix/include $CFLAGS" fi # If the user has not set CFLAGS, do something appropriate test_CFLAGS=${CFLAGS+set} if test "$test_CFLAGS" != set; then if test "x$enable_debug" == "xyes"; then CFLAGS="-O0 -g -DDEBUG -DPKCS11_DEBUG" else CFLAGS="-O2" fi fi # OpenSSL location AC_MSG_CHECKING([OpenSSL]) AC_CHECK_LIB(crypto, RAND_add, [], \ AC_MSG_ERROR([*** libcrypto not found])) AC_DISABLE_STATIC AC_PROG_CC AC_PROG_LIBTOOL CFLAGS="$CFLAGS -Wall -DLINUX -DOPENCRYPTOKI" AC_SUBST(CFLAGS) AC_SUBST(LIBDIR, $libdir) AC_OUTPUT(Makefile src/Makefile openssl.cnf.sample) echo "CFLAGS=$CFLAGS"