#!/bin/sh

# $Id: getTIFFDirs,v 1.2 1996/03/15 11:00:38 svein Exp $

# Determine the TIFF directory parameters

if test -z "$TIFF_INC_DIR" -o -z "$TIFF_LIB_DIR"
then

cat <<EOF 1>&2

This software provides converters between the XITE image file
format and the TIFF file format.

If the TIFF library "libtiff" by Sam Leffler is already installed on your
platform, you may want these converters installed also.

Note: You need an ANSI compiler (e. g. GNU gcc) for these converters.

EOF
	echo "If you want the TIFF converters, you will need to specify where" 1>&2
	echo "the TIFF library and TIFF include files are located." 1>&2
	$echoNl "Would you like to install the converters between TIFF and " 1>&2
	$echoNl "XITE? ([y]/n) " 1>&2

	read tiff_install

	if test -z "$tiff_install" -o "$tiff_install" = "yes" \
		-o "$tiff_install" = "y"
	then
		tiff_install="y"
	else
		tiff_install="n"
	fi

	if test "$tiff_install" = "y"
	then
		tiff_inc_def=/usr/local/include
		tiff_lib_def=/usr/local/lib
	fi
elif test "$TIFF_INC_DIR" = "-" -o "$TIFF_LIB_DIR" = "-"
then
	tiff_install="n"
	tiff_inc_def=""
	tiff_lib_def=""
else
	tiff_install="y"
	tiff_inc_def=""
	tiff_lib_def=""
fi

if test "$tiff_install" = "y"
then
	TIFF_INC_DIR=`$getDir "$TIFF_INC_DIR" "$tiff_inc_def" 'TIFF include directory' "$TMP_INSTALL" "stderr" 1`

	TIFF_LIB_DIR=`$getDir "$TIFF_LIB_DIR" "$tiff_lib_def" 'TIFF library directory' "$TMP_INSTALL" "stderr" 1`
else
	TIFF_INC_DIR="-"
	TIFF_LIB_DIR="-"
	exceptionDirs="$exceptionDirs tiff"
fi

echo "TIFF_INC_DIR=$TIFF_INC_DIR; TIFF_LIB_DIR=$TIFF_LIB_DIR"
echo "tiff_install=$tiff_install; exceptionDirs='$exceptionDirs'"
echo "export TIFF_INC_DIR TIFF_LIB_DIR tiff_install exceptionDirs"
