Index: gst-doc.m4 =================================================================== RCS file: /cvsroot/gstreamer/common/m4/gst-doc.m4,v retrieving revision 1.10 diff -u -r1.10 gst-doc.m4 --- gst-doc.m4 8 Sep 2002 11:17:53 -0000 1.10 +++ gst-doc.m4 21 Nov 2002 02:42:49 -0000 @@ -9,23 +9,61 @@ AC_SUBST(HTML_DIR) + + + + +dnl Stolen from beast/acbeast.m4d +dnl MC_CHECK_VERSION() extracts up to 6 decimal numbers out of given-version +dnl and required-version, using any non-number letters as delimiters. it then +dnl compares each of those 6 numbers in order 1..6 to each other, requirering +dnl all of the 6 given-version numbers to be greater than, or at least equal +dnl to the corresponding number of required-version. +dnl MC_CHECK_VERSION(given-version, required-version [, match-action] [, else-action]) +AC_DEFUN(MC_CHECK_VERSION,[ +[eval `echo "$1:0:0:0:0:0:0" | sed -e 's/^[^0-9]*//' -e 's/[^0-9]\+/:/g' \ + -e 's/\([^:]*\):\([^:]*\):\([^:]*\):\([^:]*\):\([^:]*\):.*/ac_v1=\1 ac_v2=\2 ac_v3=\3 ac_v4=\4 ac_v5=\5 ac_v6=\6/' \ +`] +[eval `echo "$2:0:0:0:0:0:0" | sed -e 's/^[^0-9]*//' -e 's/[^0-9]\+/:/g' \ + -e 's/\([^:]*\):\([^:]*\):\([^:]*\):\([^:]*\):\([^:]*\):.*/ac_r1=\1 ac_r2=\2 ac_r3=\3 ac_r4=\4 ac_r5=\5 ac_r6=\6/' \ +`] +ac_vm=[`expr \( $ac_v1 \> $ac_r1 \) \| \( \( $ac_v1 \= $ac_r1 \) \& \( \ + \( $ac_v2 \> $ac_r2 \) \| \( \( $ac_v2 \= $ac_r2 \) \& \( \ + \( $ac_v3 \> $ac_r3 \) \| \( \( $ac_v3 \= $ac_r3 \) \& \( \ + \( $ac_v4 \> $ac_r4 \) \| \( \( $ac_v4 \= $ac_r4 \) \& \( \ + \( $ac_v5 \> $ac_r5 \) \| \( \( $ac_v5 \= $ac_r5 \) \& \( \ + \( $ac_v6 \>= $ac_r6 \) \ + \) \) \ + \) \) \ + \) \) \ + \) \) \ + \) \) `] +case $ac_vm in +[1)] + [$3] + ;; +*[)] + [$4] + ;; +esac +]) + dnl check for gtk-doc AC_CHECK_PROG(HAVE_GTK_DOC, gtkdoc-scangobj, true, false) -gtk_doc_min_version=0.7 +gtk_doc_min_version=0.12 if $HAVE_GTK_DOC ; 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 - AC_MSG_RESULT(yes) - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(gtk-doc version is too low, need $gtk_doc_min_version, please disable doc building) - HAVE_GTK_DOC=false - fi + gtk_doc_version=`gtkdoc-mkdb --version` + MC_CHECK_VERSION($gtk_doc_version, $gtk_doc_min_version, + [HAVE_REQUIRED_GTK_DOC=true], + AC_MSG_ERROR([gtk-doc version is too low, need $gtk_doc_min_version, please disable doc building])) + if test "x$HAVE_REQUIRED_GTK_DOC" = "xtrue" ; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + fi fi + # don't you love undocumented command line options? GTK_DOC_SCANOBJ="gtkdoc-scangobj --nogtkinit" AC_SUBST(HAVE_GTK_DOC)