File:  [Local Repository] / gnujdoc / acinclude.m4
Revision 1.3: download - view: text, annotated - select for diffs
Tue May 31 12:09:13 2005 UTC (15 years, 2 months ago) by futoshi
Branches: MAIN
CVS tags: HEAD
acinclude.m4: quate first argument for AC_DEFUN.
configure.in: binutils version fix.
update some scripts from automake.

    1: dnl gnujdoc_CHECK_SUBDIR(VARIABLE,DIR)
    2: dnl Check if DIR exists, and if DIR exists, then set VARIABLE to DIR,
    3: dnl otherwise set VARIABLE to an empty string "".
    4: 
    5: AC_DEFUN([gnujdoc_CHECK_SUBDIR],
    6: [dnl
    7: if test -d $srcdir/$2; then
    8:   $1=$2
    9: else
   10:   $1=""
   11: fi
   12: ])
   13: 
   14: 
   15: dnl gnujdoc_REQUIRE_MAKEINFO([VERSION], [action-if-found], [action-if-not-found])
   16: dnl Check makeinfo version, and if VERSION is greater then exit if-found,
   17: dnl else if-not-found.
   18: 
   19: AC_DEFUN([gnujdoc_REQUIRE_MAKEINFO],
   20: [dnl
   21: makeinfo_req_ver_major=`echo $1 | sed -n 's/\([[0-9]]*\)\.[[0-9]]*.*$/\1/p'`
   22: makeinfo_req_ver_minor=`echo $1 | sed -n 's/[[0-9]]*\.\([[0-9]]*\).*$/\1/p'`
   23: 
   24: AC_CHECK_PROG([MAKE_INFO], [makeinfo], [makeinfo], [no])
   25: AC_MSG_CHECKING([makeinfo version])
   26: 
   27: if test "$MAKE_INFO" = "makeinfo" ; then
   28:   makeinfo_version=`$MAKE_INFO --version | sed -n 's/^.*makeinfo.* \([[0-9]]*\.[[0-9.]]*\).*$/\1/p'`
   29:   makeinfo_ver_major=`echo $makeinfo_version | sed -n 's/\(^[[0-9]]*\)\.[[0-9]]*.*$/\1/p'`
   30:   makeinfo_ver_minor=`echo $makeinfo_version | sed -n 's/^[[0-9]]*\.\([[0-9]]*\).*$/\1/p'`
   31:   if test $makeinfo_ver_major -lt $makeinfo_req_ver_major; then
   32:     AC_MSG_RESULT([makeinfo version is $makeinfo_version, bad major])
   33:     $3
   34:   else
   35:     if test $makeinfo_ver_major -gt $makeinfo_req_ver_major; then
   36:       AC_MSG_RESULT([makeinfo version is $makeinfo_version, ok])
   37:       $2
   38:     else
   39:       if test $makeinfo_ver_minor -ge $makeinfo_req_ver_minor; then
   40:         AC_MSG_RESULT([makeinfo version is $makeinfo_version, ok])
   41:         $2
   42:       else
   43:         AC_MSG_RESULT([makeinfo version is $makeinfo_version, bad minor])
   44:         $3
   45:       fi
   46:     fi
   47:   fi
   48: else
   49:   AC_MSG_RESULT([makeinfo is not installed, bad])
   50:   $3
   51: fi
   52: ])

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>