# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) AC_INIT([phptags],[0.3.0],[bogorodskiy@inbox.ru]) AM_INIT_AUTOMAKE AC_CONFIG_SRCDIR([src/]) AC_CONFIG_HEADER([config.h]) test x$prefix = "xNONE" && prefix="$ac_default_prefix" # Checks for programs. AC_PROG_CC AC_PROG_LN_S AC_PROG_RANLIB AC_PROG_INSTALL AC_PROG_MAKE_SET #AC_PROG_INSTALL AC_CHECK_PROGS(sort_cmd, sort) if test x$sort_cmd = "x"; then AC_MSG_ERROR([error. sort was not found.]) fi AC_CHECK_PROGS(regex_cmd, sed) if test x$regex_cmd = "x"; then AC_MSG_ERROR([error. sed is required to build the data files.]) fi # Checks for libraries. # Checks for header files. #AC_HAVE_HEADERS() AC_CHECK_HEADERS(getopt.h) # Checks for typedefs, structures, and compiler characteristics. # Checks for library functions. AC_HEADER_STDC AC_FUNC_FORK AC_C_CONST AC_FUNC_MALLOC AC_CHECK_FUNCS([memset strchr memmove],, exit 1) AC_CHECK_FUNCS([strnstr getopt_long]) DEBUG="" AC_MSG_CHECKING([whether to include verbose debugging code]) AC_ARG_ENABLE(debug, [ --enable-debug include verbose debugging code [default=no]], if test x$enableval = "xyes"; then AC_MSG_RESULT([yes]) DEBUG="-DDEBUG -g -Wall" else AC_MSG_RESULT([no]) fi, AC_MSG_RESULT([no]) ) AC_SUBST(DEBUG) CFLAGS="$CFLAGS $DEBUG" e_prefix=`echo $prefix | sed -e 's|NONE|/usr/local|'` e_sysconfdir=`echo $sysconfdir | sed -e "s|\\${prefix}|$e_prefix|"` default_config=$e_sysconfdir/phptags.conf AC_DEFINE_UNQUOTED(PHPTAGS_DEFAULT_CONF,"$default_config") AH_TEMPLATE([PHPTAGS_DEFAULT_CONF], [Default config file.]) AC_SUBST(e_prefix) AC_SUBST(e_sysconfdir) AC_CONFIG_FILES([Makefile man/Makefile src/Makefile]) AC_OUTPUT AC_MSG_RESULT([]) AC_MSG_RESULT([ $PACKAGE version $VERSION configured successfully.]) AC_MSG_RESULT([]) AC_MSG_RESULT([Using '$prefix' for installation.]) AC_MSG_RESULT([Using '$CC' for C compiler.]) AC_MSG_RESULT([Building with '$CFLAGS' for C compiler flags.]) AC_MSG_RESULT([])