diff --git a/ChangeLog b/ChangeLog index f14ee9b93..da725cd11 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f14ee9b93..da725cd11 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,7 @@ +2002-11-28 Matthias Clasen + + * configure.in: Fix the gtk-doc version check. + 2002-11-27 Matthias Clasen * glib/gmessages.h: Use G_LIKELY without surrounding parentheses diff --git a/configure.in b/configure.in index c003de688..115b4c593 100644 --- a/configure.in +++ b/configure.in @@ -843,13 +843,16 @@ dnl **************************************** dnl *** strlcpy/strlcat *** dnl **************************************** # Check for strlcpy -AC_MSG_CHECKING(for strlcpy/strlcat) -AC_TRY_LINK([#include -#include ], [ -char *p = malloc(10); -(void) strlcpy(p, "hi", 10); -(void) strlcat(p, "bye", 10); -], glib_ok=yes, glib_ok=no) +AC_MSG_CHECKING(for OpenBSD strlcpy/strlcat) +AC_TRY_RUN([ +#include +int main() { + char *p = malloc (10); + (void) strlcpy (p, "hi", 10); + if (strlcat (p, "bye", 0) != 3) + exit (1); + return 0; +}], glib_ok=yes, glib_ok=no) AC_MSG_RESULT($glib_ok) if test "$glib_ok" = "yes"; then AC_DEFINE(HAVE_STRLCPY,1,[Have functions strlcpy and strlcat]) @@ -1778,19 +1781,29 @@ AC_SUBST(HTML_DIR) AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) -gtk_doc_min_version=0.6 -if $GTKDOC ; then +AC_CHECK_PROG(GTKDOC, gtkdoc-mkdb, true, false) + +gtk_doc_min_version=0.10 +if $GTKDOC ; then gtk_doc_version=`gtkdoc-mkdb --version` AC_MSG_CHECKING([gtk-doc version ($gtk_doc_version) >= $gtk_doc_min_version]) - if perl <= "$gtk_doc_min_version") ? 0 : 1); -EOF + + IFS="${IFS= }"; gtk_save_IFS="$IFS"; IFS="." + set $gtk_doc_version + for min in $gtk_doc_min_version ; do + cur=$1; shift + if test -z $min ; then break; fi + if test -z $cur ; then GTKDOC=false; break; fi + if test $cur -gt $min ; then break ; fi + if test $cur -lt $min ; then GTKDOC=false; break ; fi + done + IFS="$gtk_save_IFS" + + if $GTKDOC ; then AC_MSG_RESULT(yes) - else + else AC_MSG_RESULT(no) - GTKDOC=false - fi + fi fi AM_CONDITIONAL(HAVE_GTK_DOC, $GTKDOC)