clamp the result to the time_t range, and document that. Remove the #ifdef
[platform/upstream/libsoup.git] / acinclude.m4
1 dnl Usage:
2 dnl   GTK_DOC_CHECK([minimum-gtk-doc-version])
3 AC_DEFUN([GTK_DOC_CHECK],
4 [
5   AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first
6   AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first
7   dnl for overriding the documentation installation directory
8   AC_ARG_WITH(html-dir,
9     AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),,
10     [with_html_dir='${datadir}/gtk-doc/html'])
11   HTML_DIR="$with_html_dir"
12   AC_SUBST(HTML_DIR)
13
14   dnl enable/disable documentation building
15   AC_ARG_ENABLE(gtk-doc,
16     AC_HELP_STRING([--enable-gtk-doc],
17                    [use gtk-doc to build documentation [default=no]]),,
18     enable_gtk_doc=no)
19
20   have_gtk_doc=no
21   if test -z "$PKG_CONFIG"; then
22     AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
23   fi
24   if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then
25     have_gtk_doc=yes
26   fi
27
28   dnl do we want to do a version check?
29 ifelse([$1],[],,
30   [gtk_doc_min_version=$1
31   if test "$have_gtk_doc" = yes; then
32     AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version])
33     if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then
34       AC_MSG_RESULT(yes)
35     else
36       AC_MSG_RESULT(no)
37       have_gtk_doc=no
38     fi
39   fi
40 ])
41   if test x$enable_gtk_doc = xyes; then
42     if test "$have_gtk_doc" != yes; then
43       enable_gtk_doc=no
44     fi
45   fi
46
47   AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
48   AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL")
49 ])