1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT(libpwmd, 3.0.0, [Ben Kibbey bjk@luxsci.net])
4 AC_CONFIG_AUX_DIR(build)
6 AM_INIT_AUTOMAKE([foreign])
10 AC_CONFIG_SRCDIR([libpwmd.c])
11 AM_CONFIG_HEADER([config.h])
15 LDFLAGS="$LDFLAGS -flat_namespace -L/sw/lib"
16 CPPFLAGS="$CPPFLAGS -I/sw/include -L/sw/lib"
22 CFLAGS="$CFLAGS -D_GNU_SOURCE"
24 dnl Checks for programs.
27 dnl Checks for header files.
30 AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h unistd.h sys/socket.h \
33 dnl Checks for typedefs, structures, and compiler characteristics.
40 AM_PATH_LIBASSUAN(,, AC_MSG_ERROR([libassuan not found]))
41 AM_PATH_GPG_ERROR(,, AC_MSG_ERROR([libgpg-error not found]))
43 dnl Checks for library functions.
47 AC_FUNC_SELECT_ARGTYPES
48 AC_CHECK_FUNCS([memmove select socket strdup strerror setlocale getcwd \
49 memset stpcpy strchr strrchr])
51 AC_ARG_ENABLE(pinentry, AC_HELP_STRING([--disable-pinentry],
52 [Disable pinentry(1) support.]), USE_PINENTRY=no,
53 USE_PINENTRY=$enableval)
55 if test $USE_PINENTRY = "yes"; then
56 AC_CHECK_HEADERS([locale.h])
57 AC_DEFINE(USE_PINENTRY, 1, [Define if you want pinentry(1) support.])
60 AM_CONDITIONAL(USE_PINENTRY, [test $USE_PINENTRY = "yes"])
63 AC_SUBST(PACKAGE_VERSION)
65 AC_CONFIG_FILES([Makefile libpwmd.pc libpwmd.3])