diff options
author | Lauris Kaplinski <lauris@src.gnome.org> | 2001-02-22 03:34:27 +0800 |
---|---|---|
committer | Lauris Kaplinski <lauris@src.gnome.org> | 2001-02-22 03:34:27 +0800 |
commit | 535fea211a9a35f5b04017124a71764daf926723 (patch) | |
tree | d154201dab0d1b22e3da59b403c4fff098c9b8d0 /macros | |
parent | d7a3b52b1c0e2754f2e33f3ba39eda535005a32c (diff) | |
download | gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar.gz gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar.bz2 gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar.lz gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar.xz gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.tar.zst gsoc2013-evolution-535fea211a9a35f5b04017124a71764daf926723.zip |
Replaced awk with sed in gnome-print checks, seems to work now
svn path=/trunk/; revision=8324
Diffstat (limited to 'macros')
-rw-r--r-- | macros/ChangeLog | 6 | ||||
-rw-r--r-- | macros/gnome-print-check.m4 | 26 |
2 files changed, 24 insertions, 8 deletions
diff --git a/macros/ChangeLog b/macros/ChangeLog index 022e2de456..bb09d18e10 100644 --- a/macros/ChangeLog +++ b/macros/ChangeLog @@ -1,3 +1,9 @@ +2001-02-21 Lauris Kaplinski <lauris@ximian.com> + + * gnome-print-check.m4: Replaced the awk alchemy with sed alchemy. + I seems to work now as long as gnome-config is working - but that is + the whole point of gnome-config, isn't it? + 2001-02-19 JP Rosevear <jpr@ximian.com> * gnome-pilot.m4: Revert my previous patch now that gnome-pim and diff --git a/macros/gnome-print-check.m4 b/macros/gnome-print-check.m4 index b8b924150d..c5f0fe39e8 100644 --- a/macros/gnome-print-check.m4 +++ b/macros/gnome-print-check.m4 @@ -12,7 +12,6 @@ AC_DEFUN([AM_PATH_GNOME_PRINT], [ min_version=ifelse([$1],,0.21,$1) - awk_alchemy=$'BEGIN {FS=".";} {print $\61 * 1000 + $\62;}' gnome_print_ok="" AC_PATH_PROG(GNOME_CONFIG, gnome-config, no) @@ -21,16 +20,27 @@ AC_DEFUN([AM_PATH_GNOME_PRINT], else AC_MSG_CHECKING(for GNOME-PRINT - version >= $min_version) if `$GNOME_CONFIG --libs print > /dev/null 2>&1`; then - gnome_print_version=$($GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' -e 's/cvs$//' | awk "$awk_alchemy") - requested_version=`echo "$min_version" | awk "$awk_alchemy"` - if test "$gnome_print_version" -ge "$requested_version"; then - AC_MSG_RESULT(found) - gnome_print_ok="yes" + rqmajor=$(echo "$1" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/') + rqminor=$(echo "$1" | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/') + major=$($GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\1/') + minor=$($GNOME_CONFIG --modversion print | sed -e 's/gnome-print-//' | sed -e 's/cvs-//' | sed 's/\([[0-9]]*\)\.\([[0-9]]*\).*/\2/') + if test "$major" -ge "$rqmajor"; then + if test "$major" -gt "$rqmajor"; then + AC_MSG_RESULT("found $major.$minor") + gnome_print_ok="yes" + else + if test "$minor" -ge "$rqminor"; then + AC_MSG_RESULT("found $major.$minor") + gnome_print_ok="yes" + else + AC_MSG_RESULT("you have $major.$minor") + fi + fi else - AC_MSG_RESULT(not found) + AC_MSG_RESULT("you have $major.$minor") fi else - AC_MSG_RESULT(gnome-print not installed) + AC_MSG_RESULT("did not find any version") fi fi |