From 70768203297a567581aaa764086cbcda4b8f09ca Mon Sep 17 00:00:00 2001 From: sof Date: Tue, 1 Mar 2005 19:16:18 +0000 Subject: [PATCH] [project @ 2005-03-01 19:16:14 by sof] aclocal.m4:FP_PROG_SORT: locate unix-like sort utility; on success, substituted as SortCmd. -configure.ac: use FP_PROG_SORT -mk/config.mk.in: added SORT setting..only used by libraries/Makefile Merge to STABLE --- aclocal.m4 | 19 +++++++++++++++++++ configure.ac | 3 +++ mk/config.mk.in | 1 + 3 files changed, 23 insertions(+) diff --git a/aclocal.m4 b/aclocal.m4 index 57821cd..8f087d1 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -648,6 +648,25 @@ AC_SUBST([FindCmd])[]dnl ])# FP_PROG_FIND +# FP_PROG_SORT +# ------------ +# Find a Unix-like sort +AC_DEFUN([FP_PROG_SORT], +[AC_PATH_PROG([fp_prog_sort], [sort]) +echo conwip > conftest.txt +$fp_prog_sort -f conftest.txt > conftest.out 2>&1 +if grep 'conwip' conftest.out > /dev/null 2>&1 ; then + # The goods + SortCmd="$fp_prog_sort" +else + # Summink else..pick next one. + AC_MSG_WARN([$fp_prog_sort looks like a non-*nix sort, ignoring it]) + FP_CHECK_PROG([SortCmd], [sort], [], [], [$fp_prog_sort]) +fi +rm -f conftest.txt conftest.out +AC_SUBST([SortCmd])[]dnl +])# FP_PROG_SORT + dnl dnl FPTOOLS_NOCACHE_CHECK prints a message, then sets the dnl values of the second argument to the result of running diff --git a/configure.ac b/configure.ac index 1b7dbda..1026d80 100644 --- a/configure.ac +++ b/configure.ac @@ -833,6 +833,9 @@ FP_PROG_CONTEXT_DIFF dnl ** Find find command (for Win32's benefit) FP_PROG_FIND +dnl ** Find sort command (for the benefit of Win32 environs) +FP_PROG_SORT + dnl ** figure out how to do a BSD-ish install AC_PROG_INSTALL diff --git a/mk/config.mk.in b/mk/config.mk.in index af7dbe9..c7dc6ec 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -794,6 +794,7 @@ CTAGS = $(ETAGS) # RAWCPP_FLAGS = -undef -traditional FIND = @FindCmd@ +SORT = @SortCmd@ INSTALL = @INSTALL@ # # Sigh - the autoconf macro for INSTALL will subst a relative path to the fallback -- 1.7.10.4