From 866ca339120b8c50e785dff33ab6e1182335405a Mon Sep 17 00:00:00 2001 From: "ramiro%netscape.com" Date: Wed, 9 Sep 1998 08:34:48 +0000 Subject: [PATCH] Fix the hanging problem when invoked with -xpm (and possibly other flags) and no include/Xm.h is found anywhere. --- config/mkdetect/detect_motif.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/config/mkdetect/detect_motif.sh b/config/mkdetect/detect_motif.sh index 979562c9d95..34877298ce5 100755 --- a/config/mkdetect/detect_motif.sh +++ b/config/mkdetect/detect_motif.sh @@ -431,17 +431,21 @@ fi ## for d in $MOTIF_SEARCH_PATH do - if [ -d $d/include/Xm -a -f $d/include/Xm/Xm.h ] + # Check for $d that exists and is readable + if [ -d $d -a -r $d ] then - MOTIF_INCLUDE_DIR=$d/include - break; + if [ -d $d/include/Xm -a -f $d/include/Xm/Xm.h ] + then + MOTIF_INCLUDE_DIR=$d/include + break; + fi fi done ## ## Make sure the header was found. ## -if [ -z $MOTIF_INCLUDE_DIR ] +if [ "$MOTIF_INCLUDE_DIR" = "unknown" ] then echo echo "Could not find anywhere on your system."