AC_INIT([LibPSL], [0.1], [tim.ruehsen@gmx.de], [psl], [http://github.com/rockdaboot/libpsl]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 -Wall no-define]) # Generate two configuration headers; one for building the library itself with # an autogenerated template, and a second one that will be installed alongside # the library. AC_CONFIG_HEADERS([config.h]) AC_PROG_CXX LT_INIT([disable-static]) AC_CONFIG_MACRO_DIR([m4]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) # # Gettext # AM_GNU_GETTEXT([external],[need-ngettext]) AM_GNU_GETTEXT_VERSION([0.18.1]) # Define these substitions here to keep all version information in one place. # For information on how to properly maintain the library version information, # refer to the libtool manual, section "Updating library version information": # http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html AC_SUBST([LIBPSL_SO_VERSION], [0:0:0]) AC_SUBST([LIBPSL_API_VERSION], [0.1]) # Check for valgrind ac_enable_valgrind=no AC_ARG_ENABLE(valgrind-tests, AS_HELP_STRING([--enable-valgrind-tests], [enable using Valgrind for tests]), [ac_enable_valgrind=$enableval], [ac_enable_valgrind=no]) if test "${ac_enable_valgrind}" = "yes" ; then AC_CHECK_PROG(HAVE_VALGRIND, valgrind, yes, no) if test "$HAVE_VALGRIND" = "yes" ; then VALGRIND_ENVIRONMENT="valgrind --error-exitcode=1 --leak-check=yes --show-reachable=yes --track-origins=yes" AC_SUBST(VALGRIND_ENVIRONMENT) TESTS_INFO="Test suite will be run under Valgrind" else TESTS_INFO="Valgrind not found" fi else TESTS_INFO="Valgrind testing not enabled" fi # Override the template file name of the generated .pc file, so that there # is no need to rename the template file when the API version changes. AC_CONFIG_FILES([Makefile include/Makefile src/Makefile po/Makefile.in data/Makefile tests/Makefile libpsl-${LIBPSL_API_VERSION}.pc:libpsl.pc.in]) AC_OUTPUT AC_MSG_NOTICE([Summary of build options: Version: ${PACKAGE_VERSION} Host OS: ${host_os} Install prefix: ${prefix} Compiler: ${CC} CFlags: ${CFLAGS} ${CPPFLAGS} LDFlags: ${LDFLAGS} Tests: ${TESTS_INFO} ])