Engine for the ICSF backend
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.4 KiB

  1. #
  2. # configure.in for the OpenSSL IBM PKCS#11 engine project
  3. #
  4. AC_INIT(openssl-ibmpkcs11, 1.0.0, opencryptoki-users@lists.sf.net)
  5. AC_CONFIG_SRCDIR([src/e_pkcs11.c]) #sanity check
  6. AC_CONFIG_MACRO_DIR([m4])
  7. AM_INIT_AUTOMAKE(1.6.3)
  8. # Debugging support
  9. AC_ARG_ENABLE(debug,
  10. AC_HELP_STRING([--enable-debug], [turn on all debugging flags [default is off]]),
  11. [enable_debug="yes"
  12. AC_MSG_RESULT([*** Enabling debugging at user request ***])],)
  13. # custom openssl location
  14. AC_ARG_WITH(openssl,
  15. [ --with-openssl[[=DIR]] build with OpenSSL support [[/usr/local/ssl]]],
  16. [openssl_prefix=$withval],
  17. [openssl_prefix=]
  18. )
  19. if test "x$openssl_prefix" != x; then
  20. AC_MSG_RESULT([*** Using OpenSSL directory $openssl_prefix ***])
  21. LDFLAGS="-L$openssl_prefix/lib $LDFLAGS"
  22. CFLAGS="-I$openssl_prefix/include $CFLAGS"
  23. fi
  24. # If the user has not set CFLAGS, do something appropriate
  25. test_CFLAGS=${CFLAGS+set}
  26. if test "$test_CFLAGS" != set; then
  27. if test "x$enable_debug" == "xyes"; then
  28. CFLAGS="-O0 -g -DDEBUG -DPKCS11_DEBUG"
  29. else
  30. CFLAGS="-O2"
  31. fi
  32. fi
  33. # OpenSSL location
  34. AC_MSG_CHECKING([OpenSSL])
  35. AC_CHECK_LIB(crypto, RAND_add, [], \
  36. AC_MSG_ERROR([*** libcrypto not found]))
  37. AC_DISABLE_STATIC
  38. AC_PROG_CC
  39. AC_PROG_LIBTOOL
  40. CFLAGS="$CFLAGS -Wall -DLINUX -DOPENCRYPTOKI"
  41. AC_SUBST(CFLAGS)
  42. AC_SUBST(LIBDIR, $libdir)
  43. AC_OUTPUT(Makefile src/Makefile openssl.cnf.sample)
  44. echo "CFLAGS=$CFLAGS"