# -*- Autoconf -*- # # Copyright (C) 2005 Yann Droneaud # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # Process this file with autoconf to produce a configure script. AC_PREREQ(2.59) AC_INIT([mod-vhost-hash-alias], [1.0], [ydroneaud@meuh.org]) AC_COPYRIGHT([ Additionnaly, Portions Copyright (C) 2005 Yann Droneaud under the same terms of the source file 'configure.ac']) AC_CONFIG_SRCDIR([mod_vhost_hash_alias.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([1.7]) # Checks for programs. AC_PROG_CC AC_PROG_RANLIB AC_DISABLE_STATIC AC_PROG_LIBTOOL AC_ARG_WITH([apxs2], AC_HELP_STRING([--with-apxs2=PATH],[Set path to apxs2]), [case "${withval}" in no) AC_MSG_ERROR([you really want me to build without APX2 ?]) ;; yes) AC_CHECK_PROG([APXS2], [apxs2], [apxs2]) ;; *) AC_SUBST([APXS2], "${withval}") AC_MSG_NOTICE([using specified $APXS2]) ;; esac ], [AC_CHECK_PROG([APXS2], [apxs2], [apxs2])]) if test "x$APXS2" = "x" ; then AC_MSG_ERROR([missing apxs2 tool]) fi AC_CHECK_PROG([APR_CONFIG], [apr-config], [apr-config]) if test "x$APR_CONFIG" = "x" ; then AC_MSG_ERROR([missing apr-config tool]) fi # Checks for libraries. AC_CHECK_LIB([mhash], [mhash_init],,[AC_MSG_ERROR([missing libmhash])]) # Checks for header files. AC_CHECK_HEADER([mhash.h],,[AC_MSG_ERROR([missing libmhash])]) # Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_ALLOCA AC_CHECK_FUNCS([strcasecmp strncasecmp]) CPPFLAGS="$CPPFLAGS `$APR_CONFIG --cppflags`" INCLUDES="$INCLUDES `$APR_CONFIG --includes`" INCLUDES="$INCLUDES -I `$APXS2 -q INCLUDEDIR`" AC_SUBST([INCLUDES]) CFLAGS="$CFLAGS `$APR_CONFIG --cflags`" CFLAGS="$CFLAGS `$APXS2 -q CFLAGS`" CFLAGS="$CFLAGS `$APXS2 -q CFLAGS_SHLIB`" LDFLAGS="$LDFLAGS `$APR_CONFIG --ldflags`" LDFLAGS="$LDFLAGS `$APXS2 -q LDFLAGS_SHLIB`" LIBS="$LIBS `$APR_CONFIG --link-libtool --libs`" LIBS="$LIBS `$APXS2 -q LIBS_SHLIB`" APACHE_LIBEXECDIR="`$APXS2 -q LIBEXECDIR`" AC_SUBST([APACHE_LIBEXECDIR]) AC_CONFIG_FILES([Makefile lib/Makefile lib/tests/Makefile]) AC_OUTPUT