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.

51 lines
1.3 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. AM_INIT_AUTOMAKE(1.6.3)
  6. # Debugging support
  7. AC_ARG_ENABLE(debug,
  8. AC_HELP_STRING([--enable-debug], [turn on all debugging flags [default is off]]),
  9. [enable_debug="yes"
  10. AC_MSG_RESULT([*** Enabling debugging at user request ***])],)
  11. # custom openssl location
  12. AC_ARG_WITH(openssl,
  13. [ --with-openssl[[=DIR]] build with OpenSSL support [[/usr/local/ssl]]],
  14. [openssl_prefix=$withval],
  15. [openssl_prefix=]
  16. )
  17. if test "x$openssl_prefix" != x; then
  18. AC_MSG_RESULT([*** Using OpenSSL directory $openssl_prefix ***])
  19. LDFLAGS="-L$openssl_prefix/lib $LDFLAGS"
  20. CFLAGS="-I$openssl_prefix/include $CFLAGS"
  21. fi
  22. # If the user has not set CFLAGS, do something appropriate
  23. test_CFLAGS=${CFLAGS+set}
  24. if test "$test_CFLAGS" != set; then
  25. if test "x$enable_debug" == "xyes"; then
  26. CFLAGS="-O0 -g -DDEBUG -DPKCS11_DEBUG"
  27. else
  28. CFLAGS="-O2"
  29. fi
  30. fi
  31. # OpenSSL location
  32. AC_MSG_CHECKING([OpenSSL])
  33. AC_CHECK_LIB(crypto, RAND_add, [], \
  34. AC_MSG_ERROR([*** libcrypto not found]))
  35. AC_DISABLE_STATIC
  36. AC_PROG_CC
  37. AC_PROG_LIBTOOL
  38. CFLAGS="$CFLAGS -Wall -DLINUX -DOPENCRYPTOKI"
  39. AC_SUBST(CFLAGS)
  40. AC_SUBST(LIBDIR, $libdir)
  41. AC_OUTPUT(Makefile src/Makefile openssl.cnf.sample)
  42. echo "CFLAGS=$CFLAGS"