-rw-r--r-- | Makefile.am | 5 | ||||
-rw-r--r-- | acinclude.m4 | 45 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 2 insertions, 51 deletions
diff --git a/Makefile.am b/Makefile.am index fb04e49..01b6df7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,22 +1,19 @@ SUBDIRS=include lib share src components EXTRA_DIST= NEWS NEWS.xml NEWS.xsl -DISTCHECK_CONFIGURE_FLAGS=--with-pkgconfigdir=$${dc_install_base}/lib/pkgconfig -if HAVE_PKGCONFIG -pkgconfigdir=@PKGCONFIG_DIR@ +pkgconfigdir=${libdir}/pkgconfig pkgconfig_DATA=sitecing.pc -endif all-local: NEWS if HAVE_DOXYGEN clean-local: rm -rf doxydox endif NEWS: NEWS.xsl NEWS.xml ${XSLTPROC} -o $@ NEWS.xsl NEWS.xml if HAVE_DOXYGEN dox: ${DOXYGEN} endif diff --git a/acinclude.m4 b/acinclude.m4 index 14b6de7..e732535 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -1,141 +1,96 @@ -dnl AC_WITH_PKGCONFIG([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) -dnl Outputs: -dnl AC_SUBST: PKGCONFIG_PKGCONFIG PKGCONFIG_DIR -dnl AM_CONDTIONAL: HAVE_PKGCONFIG -AC_DEFUN([AC_WITH_PKGCONFIG],[ - PKGCONFIG_PKGCONFIG="" - PKGCONFIG_DIR="" - HAVE_PKGCONFIG="no" - EXPLICIT_PKGCONFIGDIR="no" - test -z "${WANT_PKGCONFIG}" && WANT_PKGCONFIG="" - AC_PATH_PROG([PKGCONFIG_PKGCONFIG],[pkg-config],[false]) - if test "${PKGCONFIG_PKGCONFIG}" != "false" ; then - AC_ARG_WITH([pkgconfigdir], - AC_HELP_STRING([--with-pkgconfigdir=dir],[Specify pkgconfig directory]), - [ - if test "${withval}" = "no" ; then - WANT_PKGCONFIG="no" - else - PKGCONFIG_DIR="${withval}" - EXPLICIT_PKGCONFIGDIR="yes" - fi - ],[ - AC_MSG_CHECKING([for pkgconfig directory]) - PKGCONFIG_DIR="`${PKGCONFIG_PKGCONFIG} --debug 2>&1 | grep '^Scanning'| head -n 1 | cut -d\' -f2-|cut -d\' -f1`" - AC_MSG_RESULT([${PKGCONFIG_DIR}]) - ] - ) - if test -d "${PKGCONFIG_DIR}" ; then - HAVE_PKGCONFIG=yes - AC_SUBST([PKGCONFIG_PKGCONFIG]) - AC_SUBST([PKGCONFIG_DIR]) - else - AC_MSG_NOTICE([unexistent pkgconfig directory: ${PKGCONFIG_DIR}]) - if test "${EXPLICIT_PKGCONFIGDIR}" = "yes" ; then - HAVE_PKGCONFIG=yes - AC_SUBST([PKGCONFIG_PKGCONFIG]) - AC_SUBST([PKGCONFIG_DIR]) - else - ifelse([$2], , :, [$2]) - fi - fi - fi - AM_CONDITIONAL([HAVE_PKGCONFIG],[test "${HAVE_PKGCONFIG}" = "yes"]) -]) - dnl AC_WITH_DOXYGEN([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Outputs: dnl AC_SUBST: DOXYGEN HAVE_DOXYGEN dnl AM_CONDTIONAL: HAVE_DOXYGEN AC_DEFUN([AC_WITH_DOXYGEN],[ HAVE_DOXYGEN="no" AC_PATH_PROG([DOXYGEN],[doxygen],[false]) if test "${DOXYGEN}" = "false" ; then ifelse([$2], , :, [$2]) else HAVE_DOXYGEN="yes" AC_SUBST([DOXYGEN]) $1 fi AC_SUBST([HAVE_DOXYGEN]) AM_CONDITIONAL([HAVE_DOXYGEN],[test "${HAVE_DOXYGEN}" = "yes"]) ]) dnl AC_WITH_DOT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Outputs: dnl AC_SUBST: DOT HAVE_DOT dnl AM_CONDITIONAL: HAVE_DOT AC_DEFUN([AC_WITH_DOT],[ HAVE_DOT="no" AC_PATH_PROG([DOT],[dot],[false]) if test "${DOT}" = "false" ; then ifelse([$2], , :, [$2]) else HAVE_DOT="yes" AC_SUBST([DOT]) $1 fi AC_SUBST([HAVE_DOT]) AM_CONDITIONAL([HAVE_DOT],[test "${HAVE_DOT}" = "yes"]) ]) dnl AC_WITH_PCRE([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Outputs: dnl AC_SUBST: PCRE_CONFIG PCRE_PREFIX PCRE_EXEC_PREFIX dnl PCRE_VERSION PCRE_CFLAGS PCRE_LIBS dnl PCRE_LIBS_POSIX PCRE_CFLAGS_POSIX dnl AM_CONDITIONAL: HAVE_PCRE dnl AC_DEFINE: HAVE_PCRE PCRE_VERSION AC_DEFUN([AC_WITH_PCRE],[ HAVE_PCRE="no" PCRE_CONFIG="" PCRE_PREFIX="" PCRE_EXEC_PREFIX="" PCRE_VERSION="" PCRE_CFLAGS="" PCRE_LIBS="" PCRE_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin" test -z "$WANT_PCRE" && WANT_PCRE="" AC_ARG_WITH([pcre], AC_HELP_STRING([--with-pcre=location],[Look for pcre in specified locations]), [ if test "${withval}" = "no" ; then WANT_PCRE="no" else if test -x "${withval}" ; then PCRE_CONFIG="${withval}" elif test -x "${withval}/pcre-config" ; then PCRE_CONFIG="${withval}/pcre-config" elif test -x "${withval}/bin/pcre-config" ; then PCRE_CONFIG="${withval}/bin/pcre-config" fi fi ] ) if test "${WANT_PCRE}" = "no" ; then ifelse([$2], , :, [$2]) else if test -z "${PCRE_CONFIG}" ; then AC_PATH_PROG(PCRE_CONFIG,[pcre-config],false,[${PCRE_LOCATIONS}]) if test "${PCRE_CONFIG}" = "false" ; then ifelse([$2], , :, [$2]) else HAVE_PCRE="yes" PCRE_PREFIX="`${PCRE_CONFIG} --prefix`" PCRE_EXEC_PREFIX="`${PCRE_CONFIG} --exec-prefix`" PCRE_VERSION="`${PCRE_CONFIG} --version`" PCRE_CFLAGS="`${PCRE_CONFIG} --cflags`" PCRE_LIBS="`${PCRE_CONFIG} --libs`" PCRE_CFLAGS_POSIX="`${PCRE_CONFIG} --cflags-posix`" PCRE_LIBS_POSIX="`${PCRE_CONFIG} --libs-posix`" AC_SUBST([PCRE_CONFIG]) AC_SUBST([PCRE_PREFIX]) AC_SUBST([PCRE_EXEC_PREFIX]) AC_SUBST([PCRE_VERSION]) AC_SUBST([PCRE_CFLAGS]) AC_SUBST([PCRE_LIBS]) AC_SUBST([PCRE_CFLAGS_POSIX]) AC_SUBST([PCRE_LIBS_POSIX]) AC_DEFINE([HAVE_PCRE],,[pcre support]) AC_DEFINE_UNQUOTED([PCRE_VERSION],["${PCRE_VERSION}"],[pcre version]) $1 diff --git a/configure.ac b/configure.ac index bb1557a..a7741c5 100644 --- a/configure.ac +++ b/configure.ac @@ -1,93 +1,92 @@ AC_INIT([sitecing], [0.0.2], [sitecing-bugs@klever.net]) AC_CONFIG_SRCDIR([include/sitecing/sitecing_parser.h]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([dist-bzip2]) AC_PROG_INSTALL AC_PROG_AWK AC_PROG_CXX AC_PROG_CC AM_PROG_LEX AC_PROG_LIBTOOL +PKG_PROG_PKG_CONFIG AC_HEADER_STDC AC_CHECK_HEADERS([stdlib.h unistd.h]) AC_C_CONST AC_FUNC_MALLOC AC_FUNC_REALLOC -AC_WITH_PKGCONFIG - PKG_CHECK_MODULES([KONFORKA],[konforka >= 0.0.1],,[ AC_MSG_ERROR([no proper version of konforka library found, get it at http://kin.klever.net/konforka/]) ]) PKG_CHECK_MODULES([KINGATE],[kingate >= 0.0.1],,[ AC_MSG_ERROR([no kingate library found, get it at http://kin.klever.net/kingate/]) ]) HAVE_FCGI=false HAVE_PLAINCGI=false PKG_CHECK_MODULES([KINGATE_FCGI],[kingate-fcgi >= 0.0.1],[ HAVE_FCGI=true ],[ AC_MSG_NOTICE([no fastcgi support in kingate library]) ]) PKG_CHECK_MODULES([KINGATE_PLAINCGI],[kingate-plaincgi >= 0.0.1],[ HAVE_PLAINCGI=true ],[ AC_MSG_NOTICE([no plaincgi support in kingate library]) ]) if ! (${HAVE_FCGI} || ${HAVE_PLAINCGI}) ; then AC_MSG_ERROR([not a single CGI interface supported in kingate]) fi AM_CONDITIONAL([HAVE_FCGI],[${HAVE_FCGI}]) AM_CONDITIONAL([HAVE_PLAINCGI],[${HAVE_PLAINCGI}]) PKG_CHECK_MODULES([DOTCONF],[dotconf],,[ AC_MSG_ERROR([no dotconf library found]) ]) AC_WITH_PCRE([ AC_WITH_PCREPP(,[ AC_MSG_ERROR([no pcre++ library found]) ]) ],[ AC_MSG_ERROR([no pcre library found]) ]) AC_CHECK_FUNC([dlopen],,[ AC_CHECK_LIB([dl],[dlopen],,[ AC_MSG_ERROR([no dlopen library found]) ]) ]) AC_PATH_PROG([XSLTPROC],[xsltproc],[true]) WANT_DOXYGEN="yes" AC_ARG_ENABLE([doxygen], AC_HELP_STRING([--disable-doxygen],[do not generate documentation]), [ test "${enableval}" = "no" && WANT_DOXYGEN="no" ] ) if test "${WANT_DOXYGEN}" = "yes" ; then AC_WITH_DOXYGEN AC_WITH_DOT else AM_CONDITIONAL([HAVE_DOXYGEN],[false]) AM_CONDITIONAL([HAVE_DOT],[false]) fi AC_CONFIG_FILES([ Makefile Doxyfile sitecing.pc include/Makefile lib/Makefile share/Makefile src/Makefile components/Makefile ]) AC_OUTPUT |