summaryrefslogtreecommitdiffabout
authorMichael Krelin <hacker@klever.net>2007-10-01 13:25:32 (UTC)
committer Michael Krelin <hacker@klever.net>2007-10-01 13:25:32 (UTC)
commita4c2f2e18459bc8f97860362cbde9070f51993d8 (patch) (side-by-side diff)
treea84f9f296c64b22c0891f94a40dfbad68e5f2292
parent1e329b6fcb1f6d2df9b3337c574bbcd7e66c27ea (diff)
downloadlibopkele-a4c2f2e18459bc8f97860362cbde9070f51993d8.zip
libopkele-a4c2f2e18459bc8f97860362cbde9070f51993d8.tar.gz
libopkele-a4c2f2e18459bc8f97860362cbde9070f51993d8.tar.bz2
don't be smart about pkgconfig dir
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.am5
-rw-r--r--acinclude.m445
-rw-r--r--configure.ac2
3 files changed, 2 insertions, 50 deletions
diff --git a/Makefile.am b/Makefile.am
index 741d585..638d6af 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,23 +1,20 @@
SUBDIRS=include lib test
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=libopkele.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: Doxyfile
${DOXYGEN}
endif
diff --git a/acinclude.m4 b/acinclude.m4
index 532f978..80defc7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,173 +1,128 @@
-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 AC_DEFINE: HAVE_PCRE PCRE_VERSION
dnl env: HAVE_PCRE=yes|no
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
fi
fi
fi
])
dnl AC_WITH_PCREPP([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]])
dnl Outputs:
dnl AC_SUBST: PCREPP_CONFIG PCREPP_PREFIX PCREPP_EXEC_PREFIX
dnl PCREPP_VERSION PCREPP_CFLAGS PCREPP_LIBS
dnl AC_DEFINE: HAVE_PCREPP PCREPP_VERSION
dnl env: HAVE_PCREPP=yes|no
AC_DEFUN([AC_WITH_PCREPP],[
HAVE_PCREPP="no"
PCREPP_CONFIG=""
PCREPP_PREFIX=""
PCREPP_EXEC_PREFIX=""
PCREPP_VERSION=""
PCREPP_CFLAGS=""
PCREPP_LIBS=""
PCREPP_LOCATIONS="${PATH}:/usr/local/bin:/usr/bin"
test -z "$WANT_PCREPP" && WANT_PCREPP=""
AC_ARG_WITH([pcrepp],
AC_HELP_STRING([--with-pcrepp=location],[Look for pcre++ in specified locations]),
[
if test "${withval}" = "no" ; then
WANT_PCREPP="no"
else
if test -x "${withval}" ; then
PCREPP_CONFIG="${withval}"
elif test -x "${withval}/pcre++-config" ; then
PCREPP_CONFIG="${withval}/pcre++-config"
elif test -x "${withval}/bin/pcre++-config" ; then
diff --git a/configure.ac b/configure.ac
index 53e22ba..4f9b6c2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,91 +1,91 @@
AC_INIT([libopkele], [0.3], [libopkele-bugs@klever.net])
AC_CONFIG_SRCDIR([include/opkele/opkele-config.h])
AC_CONFIG_HEADERS([config.h include/opkele/acconfig.h])
AM_INIT_AUTOMAKE([dist-bzip2])
AC_PROG_INSTALL
AC_PROG_CXX
AC_PROG_CC
AC_PROG_LIBTOOL
+PKG_PROG_PKG_CONFIG
AC_HEADER_STDC
AC_PATH_PROG([XSLTPROC],[xsltproc],[true])
-AC_WITH_PKGCONFIG
PKG_CHECK_MODULES([OPENSSL],[openssl],,[
AC_MSG_ERROR([no openssl library found. get one from http://www.openssl.org/])
])
WANT_KONFORKA="yes"
AC_ARG_ENABLE([konforka],
AC_HELP_STRING([--disable-konforka],[do not use konforka library (default: use if found)]),
[
test "${enableval}" = "no" && WANT_KONFORKA="no"
]
)
if test "${WANT_KONFORKA}" = "yes" ; then
PKG_CHECK_MODULES([KONFORKA],[konforka],[
AC_SUBST([KONFORKA_CFLAGS])
AC_SUBST([KONFORKA_LIBS])
AC_DEFINE([HAVE_KONFORKA],,[defined in presence of konforka library])
AC_DEFINE([OPKELE_HAVE_KONFORKA],,[defined in presence of konforka library])
AC_SUBST([KONFORKA_KONFORKA],[konforka])
],[true])
fi
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
LIBCURL_CHECK_CONFIG(,,,[
AC_MSG_ERROR([no required libcurl library. get one from http://curl.haxx.se/])
])
PKG_CHECK_MODULES([PCRE],[libpcre],,[
AC_MSG_ERROR([no libpcre found, go get it at http://www.pcre.org/])
])
curl_ssl_verify_host="true"
AC_ARG_ENABLE([ssl-verify-host],
AC_HELP_STRING([--disable-ssl-verify-host],[disable cURL cert/host relationships verification]),
[ test "${enableval}" = "no" && curl_ssl_verify_host="false" ]
)
${curl_ssl_verify_host} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYHOST],,[defined if cURL is not to verify cert/host])
curl_ssl_verify_peer="true"
AC_ARG_ENABLE([ssl-verify-peer],
AC_HELP_STRING([--disable-ssl-verify-peer],[disable cURL cert validity verification]),
[ test "${enableval}" = "no" && curl_ssl_verify_peer="false" ]
)
${curl_ssl_verify_peer} || AC_DEFINE([DISABLE_CURL_SSL_VERIFYPEER],,[defined if cURL is not to verify cert validity])
postels_law=true
AC_ARG_ENABLE([postels-law],
AC_HELP_STRING([--disable-postels-law],[Be strict, do not adhere to Postel's Law ("be conservative in what you do, be liberal in what you accept from others", RFC 793)]),
[ test "${enableval}" = "no" && postels_law=false ]
)
$postels_law && AC_DEFINE([POSTELS_LAW],,[defined if we want to adhere to Postel's Law])
AC_DEFINE_UNQUOTED([OPKELE_SRC_DIR],["$PWD"],[source directory])
AC_CONFIG_FILES([
Makefile
libopkele.pc
Doxyfile
include/Makefile
lib/Makefile
test/Makefile
])
AC_OUTPUT