Update version to 1.3.2.
[proj/eselect.git] / acinclude.m4
1 AC_DEFUN([ES_PROG_GNU_SED],
2 [AC_MSG_CHECKING([for GNU sed])
3 AC_CACHE_VAL(es_cv_path_SED,
4 [# Loop through the user's path and test for sed and gsed.
5 saved_IFS=$IFS ; IFS=:
6 for es_dir in $PATH
7 do
8     IFS=$saved_IFS
9     if test -x "$es_dir/sed" ; then
10         if "$es_dir/sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null ; then
11             es_path_sed="$es_dir/sed"
12         fi
13     fi
14
15     if test -z "$es_path_sed" && test -x "$es_dir/gsed" ; then
16         if "$es_dir/gsed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null ; then
17             es_path_sed="$es_dir/gsed"
18         fi
19     fi
20
21     es_cv_path_SED=$es_path_sed
22 done
23 ])
24 SED=$es_cv_path_SED
25 AC_MSG_RESULT([$SED])
26 AC_SUBST(SED)
27 ])