#!/bin/sh
#
# getMotifIncludePath - Return the location of the directory just above the 
# motif include files, i.e. the one with the Xm directory of header files.
#


LIKELY_X11_ROOT_DIRS=`getKnownX11Roots`

POSSIBLE_DIRS=
POSSIBLE_DIRS="$POSSIBLE_DIRS $LIKELY_X11_ROOT_DIRS"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/dt"
POSSIBLE_DIRS="$POSSIBLE_DIRS /opt/dt"
POSSIBLE_DIRS="$POSSIBLE_DIRS /opt/SUNWmotif"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/openwin"
POSSIBLE_DIRS="$POSSIBLE_DIRS /opt/SUNWlesstif"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/local"      # LessTif goes here sometimes
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/local/LessTif/Motif1.2"  # and here 88.1

for i in $POSSIBLE_DIRS
do
    if [ -f "$i/include/Xm/Xm.h" ]
    then
        echo `deReference $i`/include
	exit 0
    fi

done

echo "Failed to find the motif include directory!!!" >> $SCRIPT_LOG
echo "Add the path to the list in getMotifIncludePath" >> $SCRIPT_LOG

abortScript


