AC_PREREQ(2.59) AC_INIT([groonga-<%= config[:plugin_name] %>], 0.0.1, [<%= config[:email] %>]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([<%= config[:plugin_name] %>/<%= config[:plugin_name] %>.c]) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE(foreign) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CXX AC_PROG_LIBTOOL if test "$GCC" = "yes"; then CFLAGS="$CFLAGS -Wall -Wextra" CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes" fi AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [use debug flags (default=no)])], [sample_debug="$enableval"], [sample_debug="no"]) if test "x$sample_debug" != "xno"; then if test "$CLANG" = "yes"; then CFLAGS="$CFLAGS -O0 -g" elif test "$GCC" = "yes"; then CFLAGS="$CFLAGS -O0 -g3" fi fi GROONGA_REQUIRED_VERSION=2.0.9 PKG_CHECK_MODULES([GROONGA], [groonga >= ${GROONGA_REQUIRED_VERSION}]) _PKG_CONFIG(GROONGA_PLUGINS_DIR, [variable=pluginsdir], [groonga]) _PKG_CONFIG(GROONGA, [variable=groonga], [groonga]) _PKG_CONFIG(GROONGA_HTTPD, [variable=groonga_httpd], [groonga]) GROONGA_PLUGINS_DIR="${pkg_cv_GROONGA_PLUGINS_DIR}" GROONGA="${pkg_cv_GROONGA}" GROONGA_HTTPD="${pkg_cv_GROONGA_HTTPD}" AC_SUBST(GROONGA_PLUGINS_DIR) AC_SUBST(GROONGA) AC_SUBST(GROONGA_HTTPD) <%= config[:plugin_name] %>_pluginsdir="\${GROONGA_PLUGINS_DIR}/<%= config[:plugin_name] %>" AC_SUBST(<%= config[:plugin_name] %>_pluginsdir) AC_CONFIG_FILES([ Makefile <%= config[:plugin_name] %>/Makefile test/Makefile ]) AC_OUTPUT echo "$PACKAGE_NAME $PACKAGE_VERSION configuration:" echo "-----------------------" echo " Compiler: ${CC}" echo " CFLAGS: ${CFLAGS}" echo " CXXFLAGS: ${CXXFLAGS}" echo " Libraries: ${LIBS}" echo echo "groonga-<%= config[:plugin_name] %>" echo " CFLAGS: ${GROONGA_CFLAGS}" echo " Libraries: ${GROONGA_LIBS}" echo " install directory: ${<%= config[:plugin_name] %>_pluginsdir}"