#!/bin/sh
# Don't build without gssapi.h
if [ -f /usr/include/ldap.h -o -f /usr/local/include/ldap.h ]; then
	# Won't link without SASL as well
	if [ -f /usr/include/sasl.h -o -f /usr/include/sasl/sasl.h -o -f /usr/local/include/sasl.h -o -f /usr/local/include/sasl/sasl.h ]; then
		if [ -f /usr/lib/libsasl.a -o -f /usr/lib/libsasl2.a ]; then
			exit 0
		fi
		if [ -f /usr/lib/libsasl.la -o -f /usr/lib/libsasl2.la ]; then
			exit 0
		fi
		if [ -f /usr/lib/libsasl.so -o -f /usr/lib/libsasl2.so ]; then
			exit 0
		fi
		if [ -f /usr/lib64/libsasl.so -o -f /usr/lib64/libsasl2.so ]; then
			exit 0
		fi
		if [ -f  /usr/local/lib/libsasl.so -o -f  /usr/local/lib/libsasl2.so ]; then
			exit 0
		fi
	fi
fi
exit 1
