source: trunk/third/librep/rep.m4 @ 15283

Revision 15283, 2.0 KB checked in by ghudson, 24 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r15282, which included commits to RCS files with non-trunk default branches.
Line 
1dnl Configure paths for librep
2dnl $Id: rep.m4,v 1.1.1.1 2000-11-12 06:10:07 ghudson Exp $
3dnl
4dnl AM_PATH_REP([MINIMUM_VERSION])
5dnl Test for librep, define REP_VERSION, REP_CFLAGS, REP_LIBS and REP_EXECDIR
6dnl
7AC_DEFUN(AM_PATH_REP,
8[dnl
9  AC_ARG_WITH(rep_prefix,[  --with-rep-prefix=PFX   Prefix where rep is installed (optional)],
10              [rep_prefix="$withval"], [rep_prefix=""])
11  if test "x$rep_prefix" = "x"; then
12    rep_config="rep-config"
13  else
14    rep_config="${rep_prefix}/bin/rep-config"
15  fi
16  min_rep_version=ifelse([$1], ,0.1,$1)
17  AC_MSG_CHECKING(for rep - version >= $min_rep_version)
18  rep_version=`$rep_config --version`
19  if test $? -eq 0; then
20    rep_major=`echo $rep_version \
21        | sed -e 's/\([[0-9]]*\)\..*/\1/'`
22    rep_minor=`echo $rep_version \
23        | sed -e 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
24    min_rep_major=`echo $min_rep_version \
25        | sed -e 's/\([[0-9]]*\)\..*/\1/'`
26    min_rep_minor=`echo $min_rep_version \
27        | sed -e 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'`
28    if test '(' $rep_major -gt $min_rep_major ')' \
29        -o '(' $rep_major -eq $min_rep_major \
30               -a $rep_minor -ge $min_rep_minor ')';
31    then
32      REP_VERSION="${rep_version}"
33      REP_CFLAGS="`$rep_config --cflags`"
34      REP_LIBS="`$rep_config --libs`"
35      REP_EXECDIR="`$rep_config --execdir`"
36      AC_SUBST(REP_VERSION)
37      AC_SUBST(REP_CFLAGS)
38      AC_SUBST(REP_LIBS)
39      AC_SUBST(REP_EXECDIR)
40      AC_MSG_RESULT([version ${rep_version}])
41    else
42      AC_MSG_ERROR([version ${rep_version}; require $min_rep_version])
43    fi
44  else
45    AC_MSG_ERROR([can't find librep; is it installed?])
46  fi
47
48  dnl scan for GNU msgfmt
49  AC_MSG_CHECKING(for GNU msgfmt)
50  REP_MSGFMT=
51  for p in `echo "$PATH" | sed -e 's/:/ /g'`; do
52    if test -x $p/msgfmt; then
53      if $p/msgfmt --version 2>&1 | grep GNU >/dev/null; then
54        REP_MSGFMT=$p/msgfmt
55      fi
56    fi
57  done
58  if test x$REP_MSGFMT != x; then
59    AC_MSG_RESULT($REP_MSGFMT)
60  else
61    AC_MSG_RESULT(unavailable, disabling i18n)
62    REP_MSGFMT=true
63  fi
64  AC_SUBST(REP_MSGFMT)
65])
Note: See TracBrowser for help on using the repository browser.