Tools to make secret sharing easier.
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.

70 lines
2.0 KiB

  1. dnl Configure template for the gfsecret package
  2. AC_INIT([gfsecret], [0.3.1],
  3. [dgouttegattat@incenp.org])
  4. AC_CONFIG_SRCDIR([configure.ac])
  5. AC_CONFIG_MACRO_DIR([m4])
  6. AC_CONFIG_AUX_DIR([config])
  7. AC_CONFIG_HEADERS([config.h])
  8. AC_CONFIG_LIBOBJ_DIR([lib])
  9. AC_USE_SYSTEM_EXTENSIONS
  10. AM_INIT_AUTOMAKE([foreign])
  11. dnl Check for development tools
  12. AC_PROG_CC
  13. AC_PROG_RANLIB
  14. AC_PROG_INSTALL
  15. dnl Check for some non-ubiquitous functions
  16. ICP_CHECK_NOTCH_FUNCS
  17. dnl Check for Libgcrypt
  18. AM_PATH_LIBGCRYPT([1.6.0],
  19. [CFLAGS="$CFLAGS $LIBGCRYPT_FLAGS"
  20. LIBS="$LIBS $LIBGCRYPT_LIBS"],
  21. [AC_MSG_ERROR([libgcrypt not found])])
  22. dnl Check for Libgfshare
  23. PKG_CHECK_MODULES([LIBGFSHARE], [libgfshare])
  24. dnl Check for LibMTP
  25. PKG_CHECK_MODULES([LIBMTP], [libmtp],
  26. [AC_DEFINE([HAVE_LIBMTP], [1], [Define if libmtp is present.])],
  27. [])
  28. dnl Check for GIO
  29. PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.22],
  30. [AC_DEFINE([HAVE_GIO], [1], [Define if gio-2.0 is present.])],
  31. [])
  32. dnl Set max size for secret
  33. AC_ARG_ENABLE([max-size],
  34. [AS_HELP_STRING([--enable-max-size],
  35. [Limit size of secret file @<:@default=no@:>@])],
  36. [],
  37. [enable_max_size=no])
  38. AS_CASE([$enable_max_size],
  39. [yes], [max_secret_size=16777216],
  40. [no], [max_secret_size=0],
  41. [max_secret_size=$enable_max_size])
  42. AS_IF([test $max_secret_size -eq 0],
  43. [max_secret_size_string="Unlimited"],
  44. [max_secret_size_string="$max_secret_size bytes"])
  45. AC_DEFINE_UNQUOTED([GFSEC_SECRET_MAX_SIZE], [$max_secret_size],
  46. [Max size of secret.])
  47. dnl Output files
  48. AC_CONFIG_FILES([Makefile lib/Makefile src/Makefile
  49. man/Makefile man/gfsec-use.1 man/gfsec-split.1])
  50. AC_OUTPUT
  51. dnl Summary
  52. echo "
  53. ${PACKAGE_NAME} version ${PACKAGE_VERSION}
  54. Configuration complete
  55. Prefix: '${prefix}'
  56. Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
  57. Secret max size: ${max_secret_size_string}
  58. "