aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--acinclude.m4141
2 files changed, 72 insertions, 75 deletions
diff --git a/ChangeLog b/ChangeLog
index e2df39af61..866f8e02c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2004-08-13 Rodney Dawes <dobey@novell.com>
+ * acinclude.m4: Remove EVO_CHECK_LIB
+ Update EVO_LDAP_CHECK to support --with-openldap-{libs,includes}
+ Sync with e-d-s acinclude.m4 (Adds GTK_DOC_CHECK)
+
+2004-08-13 Rodney Dawes <dobey@novell.com>
+
* configure.in: Check for et/comm-err.h and comm_err.h so that
we can include the correct one
diff --git a/acinclude.m4 b/acinclude.m4
index 63008b790d..72f77d3d33 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -1,65 +1,11 @@
# evolution/acinclude.m4
# shared configure.in hacks between Evolution and Connector
-# EVO_CHECK_LIB(dispname, pkgname, minvers[, maxvers])
-# Checks if the package with human-readable name @dispname, known
-# to gnome-config as @pkgname exists and has an appropriate version.
-# The version must be >= @minvers. If @maxvers is equal to @minvers,
-# it must be exactly that version. Otherwise, if @maxvers is set,
-# the version must be LESS THAN @maxvers (not less than or equal).
-AC_DEFUN(EVO_CHECK_LIB, [
- dispname="$1"
- pkgname="$2"
- minvers="$3"
- maxvers="$4"
-
- AC_MSG_CHECKING(for $dispname)
-
- if gnome-config --libs $pkgname > /dev/null 2>&1; then
- pkgvers=`gnome-config --modversion $pkgname | sed -e 's/^[[^0-9]]*//'`
- else
- pkgvers=not
- fi
- AC_MSG_RESULT($pkgvers found)
-
- pkgvers=`echo $pkgvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- cmpminvers=`echo $minvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- cmpmaxvers=`echo $maxvers | awk -F. '{ print $[]1 * 1000000 + $[]2 * 10000 + $[]3 * 100 + $[]4;}'`
- ok=yes
- if test "$pkgvers" -lt $cmpminvers; then
- ok=no
- elif test -n "$maxvers"; then
- if test "$pkgvers" -gt $cmpmaxvers; then
- ok=no
- elif test "$maxvers" != "$minvers" -a "$cmpmaxvers" -eq "$pkgvers"; then
- ok=no
- fi
- fi
- if test $ok = no; then
- case $maxvers in
- "")
- dispvers="$minvers or higher"
- ;;
- $minvers)
- dispvers="$minvers (exactly)"
- ;;
- *)
- dispvers="$minvers or higher, but less than $maxvers,"
- ;;
- esac
-
- AC_MSG_ERROR([
-""
-"You need $dispname $dispvers to build $PACKAGE"
-"If you think you already have this installed, consult the README."])
- fi
-])
-
# EVO_PURIFY_SUPPORT
# Add --enable-purify. If the user turns it on, subst PURIFY and set
# the automake conditional ENABLE_PURIFY
-AC_DEFUN(EVO_PURIFY_SUPPORT, [
+AC_DEFUN([EVO_PURIFY_SUPPORT], [
AC_ARG_ENABLE(purify,
[ --enable-purify=[no/yes] Enable support for building executables with Purify.],,enable_purify=no)
AC_PATH_PROG(PURIFY, purify, impure)
@@ -82,25 +28,16 @@ AC_DEFUN(EVO_PURIFY_SUPPORT, [
# configured, HAVE_LDAP will be defined and the automake conditional
# ENABLE_LDAP will be set. LDAP_CFLAGS and LDAP_LIBS will be set
# appropriately.
-AC_DEFUN(EVO_LDAP_CHECK, [
+AC_DEFUN([EVO_LDAP_CHECK], [
default="$1"
- AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution])
+ AC_ARG_WITH(openldap, [ --with-openldap=[no/yes/PREFIX] Enable LDAP support in evolution], with_openldap="$withval", with_openldap="/usr")
+ AC_ARG_WITH(openldap-libs,[ --with-openldap-libs=DIR Location of openldap libraries to link with], with_openldap_libs="$withval", with_openldap_libs="$with_openldap/lib")
+ AC_ARG_WITH(openldap-includes,[ --with-openldap-includes=DIR Location of openldap libraries to link with], with_openldap_includes="$withval", with_openldap_includes="$with_openldap/include")
AC_ARG_WITH(static-ldap, [ --with-static-ldap=[no/yes] Link LDAP support statically into evolution ])
- AC_CACHE_CHECK([for OpenLDAP], ac_cv_with_openldap, ac_cv_with_openldap="${with_openldap:=$default}")
- case $ac_cv_with_openldap in
- no|"")
- with_openldap=no
- ;;
- yes)
- with_openldap=/usr
- ;;
- *)
- with_openldap=$ac_cv_with_openldap
- LDAP_CFLAGS="-I$ac_cv_with_openldap/include"
- LDAP_LDFLAGS="-L$ac_cv_with_openldap/lib"
- ;;
- esac
+
+ LDAP_CFLAGS="-I$with_openldap_includes"
+ LDAP_LDFLAGS="-L$with_openldap_libs"
if test "$with_openldap" != no; then
AC_DEFINE(HAVE_LDAP,1,[Define if you have LDAP support])
@@ -134,20 +71,20 @@ AC_DEFUN(EVO_LDAP_CHECK, [
AC_CHECK_LIB(nsl, gethostbyaddr, LDAP_LIBS="$LDAP_LIBS -lnsl")
AC_CHECK_LIB(lber, ber_get_tag, [
if test "$with_static_ldap" = "yes"; then
- LDAP_LIBS="$with_openldap/lib/liblber.a $LDAP_LIBS"
+ LDAP_LIBS="$with_openldap_libs/liblber.a $LDAP_LIBS"
# libldap might depend on OpenSSL... We need to pull
# in the dependency libs explicitly here since we're
# not using libtool for the configure test.
- if test -f $with_openldap/lib/libldap.la; then
- LDAP_LIBS="`. $with_openldap/lib/libldap.la; echo $dependency_libs` $LDAP_LIBS"
+ if test -f $with_openldap_libs/libldap.la; then
+ LDAP_LIBS="`. $with_openldap_libs/libldap.la; echo $dependency_libs` $LDAP_LIBS"
fi
else
LDAP_LIBS="-llber $LDAP_LIBS"
fi
AC_CHECK_LIB(ldap, ldap_open, [
if test $with_static_ldap = "yes"; then
- LDAP_LIBS="$with_openldap/lib/libldap.a $LDAP_LIBS"
+ LDAP_LIBS="$with_openldap_libs/libldap.a $LDAP_LIBS"
else
LDAP_LIBS="-lldap $LDAP_LIBS"
fi],
@@ -165,6 +102,7 @@ AC_DEFUN(EVO_LDAP_CHECK, [
AM_CONDITIONAL(ENABLE_LDAP, test $with_openldap != no)
])
+
# EVO_PTHREAD_CHECK
AC_DEFUN([EVO_PTHREAD_CHECK],[
PTHREAD_LIB=""
@@ -180,3 +118,56 @@ AC_DEFUN([EVO_PTHREAD_CHECK],[
AC_SUBST(PTHREAD_LIB)
AC_PROVIDE([EVO_PTHREAD_CHECK])
])
+dnl -*- mode: autoconf -*-
+
+# serial 1
+
+dnl Usage:
+dnl GTK_DOC_CHECK([minimum-gtk-doc-version])
+AC_DEFUN([GTK_DOC_CHECK],
+[
+ AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
+ AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
+ dnl for overriding the documentation installation directory
+ AC_ARG_WITH(html-dir,
+ AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
+ [with_html_dir='${datadir}/gtk-doc/html'])
+ HTML_DIR="$with_html_dir"
+ AC_SUBST(HTML_DIR)
+
+ dnl enable/disable documentation building
+ AC_ARG_ENABLE(gtk-doc,
+ AC_HELP_STRING([--enable-gtk-doc],
+ [use gtk-doc to build documentation [default=no]]),,
+ enable_gtk_doc=no)
+
+ have_gtk_doc=no
+ if test -z "$PKG_CONFIG"; then
+ AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+ fi
+ if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
+ have_gtk_doc=yes
+ fi
+
+ dnl do we want to do a version check?
+ifelse([$1],[],,
+ [gtk_doc_min_version=$1
+ if test "$have_gtk_doc" = yes; then
+ AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
+ if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ have_gtk_doc=no
+ fi
+ fi
+])
+ if test x$enable_gtk_doc = xyes; then
+ if test "$have_gtk_doc" != yes; then
+ enable_gtk_doc=no
+ fi
+ fi
+
+ AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+ AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
+])