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.
 
 
 
 

84 lines
2.4 KiB

dnl Configure template for the gfsecret package
AC_INIT([gfsecret], [0.4.4], [devel@incenp.org])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_AUX_DIR([config])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_LIBOBJ_DIR([lib])
AC_USE_SYSTEM_EXTENSIONS
AM_INIT_AUTOMAKE([foreign])
dnl Check for development tools
AC_PROG_CC
AC_PROG_RANLIB
AC_PROG_INSTALL
dnl Check for some non-ubiquitous functions
ICP_CHECK_NOTCH_FUNCS
dnl Check for Libgcrypt
AM_PATH_LIBGCRYPT([1.6.0],
[CFLAGS="$CFLAGS $LIBGCRYPT_FLAGS"
LIBS="$LIBS $LIBGCRYPT_LIBS"],
[AC_MSG_ERROR([libgcrypt not found])])
dnl Check for Libgfshare
PKG_CHECK_MODULES([LIBGFSHARE], [libgfshare])
dnl Check for LibMTP
PKG_CHECK_MODULES([LIBMTP], [libmtp],
[AC_DEFINE([HAVE_LIBMTP], [1], [Define if libmtp is present.])],
[])
dnl Check for GIO
PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.22],
[AC_DEFINE([HAVE_GIO], [1], [Define if gio-2.0 is present.])],
[])
dnl Set max size for secret
AC_ARG_ENABLE([max-size],
[AS_HELP_STRING([--enable-max-size],
[Limit size of secret file @<:@default=no@:>@])],
[],
[enable_max_size=no])
AS_CASE([$enable_max_size],
[yes], [max_secret_size=16777216],
[no], [max_secret_size=0],
[max_secret_size=$enable_max_size])
AS_IF([test $max_secret_size -eq 0],
[max_secret_size_string="Unlimited"],
[max_secret_size_string="$max_secret_size bytes"])
AC_DEFINE_UNQUOTED([GFSEC_SECRET_MAX_SIZE], [$max_secret_size],
[Max size of secret.])
dnl I18N support
AM_GNU_GETTEXT([external])
AH_BOTTOM([#ifdef ENABLE_NLS
#include <libintl.h>
#define _(a) gettext(a)
#define n(a, b, c) ngettext(a, b, c)
#else
#define _(a) a
#define n(a, b, c) ((c) > 1 ? (b) : (a))
#define bindtextdomain(a, b)
#define textdomain(a)
#endif])
dnl Output files
AC_CONFIG_FILES([Makefile lib/Makefile po/Makefile.in
src/Makefile src/gfsec-split-gpg
info/Makefile man/Makefile man/gfsec-use.1
man/gfsec-split.1 man/gfsec-split-gpg.1])
AC_OUTPUT
dnl Summary
echo "
${PACKAGE_NAME} version ${PACKAGE_VERSION}
Configuration complete
Prefix: '${prefix}'
Compiler: '${CC} ${CFLAGS} ${CPPFLAGS}'
Secret max size: ${max_secret_size_string}
"