aboutsummaryrefslogtreecommitdiffstats
path: root/aclocal-flags
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2013-08-12 17:16:08 +0000
committerGuy Harris <guy@alum.mit.edu>2013-08-12 17:16:08 +0000
commit95785b910040cf69d2fd64b2acdbb99e1606e953 (patch)
treecb45cbaf3e8ee1d5250b4ea70e9759a60b4a125e /aclocal-flags
parent1cf28c375f4ddc19fb4c4880281de2ad64df4fca (diff)
Use "command -v", required by recent POSIX, rather than "which"; I seem
to remember this being suggested relatively recently on some mailing list (either one of the Wireshark lists or tcpdump-workers, I think). Handle systems where /usr/X11R6/bin is a symlink to /usr/bin and where the user running autogen.sh has /usr/X11R6/bin before /usr/bin in their $PATH. svn path=/trunk/; revision=51315
Diffstat (limited to 'aclocal-flags')
-rwxr-xr-xaclocal-flags16
1 files changed, 14 insertions, 2 deletions
diff --git a/aclocal-flags b/aclocal-flags
index 77a5cd1571..e8a4209d07 100755
--- a/aclocal-flags
+++ b/aclocal-flags
@@ -48,11 +48,12 @@ aclocal_dir=`aclocal --print-ac-dir`
# And where do we want to make sure it looks?
# Look for pkg-config first.
#
-pkg_config_path=`which pkg-config 2>/dev/null`
+pkg_config_path=`command -v pkg-config 2>/dev/null`
if [ -z "$pkg_config_path" ]
then
#
- # Either we don't have "which" or it didn't find pkg-config.
+ # Either we don't have "command" (which is required by recent
+ # POSIX) or it didn't find pkg-config.
#
pkg_config_aclocal_dir=""
else
@@ -73,9 +74,20 @@ else
# it in /usr/ccs/bin, but there's no /usr/ccs/share.
# Map /usr/ccs to /usr.
#
+ # Ubuntu 7.10 has /usr/X11R6/bin as a symbolic link
+ # to /usr/bin, but there's no /usr/X11R6/share. If
+ # /usr/X11R6/bin is a symlink to /usr/bin, map
+ # /usr/X11R6 to /usr.
+ #
if [ "$pkg_config_prefix" = /usr/ccs ]
then
pkg_config_prefix=/usr
+ elif [ "$pkg_config_prefix" = /usr/X11R6 ]
+ then
+ if expr "`ls -ld /usr/X11R6/bin`" : '.*/usr/X11R6/bin -> .*/bin$' >/dev/null
+ then
+ pkg_config_prefix=/usr
+ fi
fi
#