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


LIKELY_X11_ROOT_DIRS=`getKnownX11Roots`

POSSIBLE_DIRS=
POSSIBLE_DIRS="$POSSIBLE_DIRS $LIKELY_X11_ROOT_DIRS"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/dt"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr/openwin"
POSSIBLE_DIRS="$POSSIBLE_DIRS /opt/SUNWx11"
POSSIBLE_DIRS="$POSSIBLE_DIRS /opt/SUNWx11R6"
POSSIBLE_DIRS="$POSSIBLE_DIRS /usr"

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

done

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

abortScript


