tests: fix bug in pkg-config-macros.sh, could cause spurious SKIPs
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 31 Dec 2012 23:51:37 +0000 (00:51 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 1 Jan 2013 00:10:43 +0000 (01:10 +0100)
Issue spotted perusing the testsuite logs reported in bug#13317.

* t/pkg-config-macros.sh: Don't use (uninitialized) '$dir' where '$d'
should have been used instead.  Set IFS to ':' before looping on the
$PATH expansion.  Fix typo: 'alocal' instead of 'aclocal'.  These
issues were causing the location in PATH of the 'pkg-config' program
not to be found even when the program was present.
* THANKS: Update.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
THANKS
t/pkg-config-macros.sh

diff --git a/THANKS b/THANKS
index 1ff7c08..5fa307d 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -337,6 +337,7 @@ Robert Collins                  robert.collins@itdomain.com.au
 Robert Swafford                 robert.swafford@l-3com.com
 Roberto Bagnara                 bagnara@cs.unipr.it
 Roman Fietze                    roman.fietze@telemotive.de
+Ronald Copley                   ronald.copley@gmail.com
 Ronald Landheer                 ronald@landheer.com
 Roumen Petrov                   bugtrack@roumenpetrov.info
 Russ Allbery                    rra@stanford.edu
index ec8b381..5069c08 100755 (executable)
@@ -48,9 +48,10 @@ XT_ACLOCAL_PATH=/usr/local/share/aclocal:/usr/share/aclocal
 
 # Find the location of the pkg-config executable.
 oIFS=$IFS dir=
+IFS=:
 for d in $PATH; do
   IFS=$oIFS
-  if test -f $dir/pkg-config || test -f $dir/pkg-config.exe; then
+  if test -f $d/pkg-config || test -f $d/pkg-config.exe; then
     dir=$d
     break
   fi
@@ -61,7 +62,7 @@ IFS=$oIFS
 # where the corresponding pkg.m4 might be installed.
 if test -n "$dir"; then
   # Only support standard installation layouts.
-  XT_ACLOCAL_PATH=${dir%/bin}/share/alocal:$XT_ACLOCAL_PATH
+  XT_ACLOCAL_PATH=${dir%/bin}/share/aclocal:$XT_ACLOCAL_PATH
 fi
 
 XT_ACLOCAL_PATH=$XT_ACLOCAL_PATH${ACLOCAL_PATH+":$ACLOCAL_PATH"}