#!/bin/sh
set -e
[ "$1" = "configure" ] || exit 0
cd /usr/include
if [ -e apache ]
then
    if [ -L apache ]
    then
	rm apache
    else
	echo
	echo "Error: /usr/include/apache is not a symbolic link, possibly from"
	echo "an old apache package or from user-provided sources.  Please"
	echo "remove /usr/include/apache and try to reconfigure apache-dev."
	echo
	exit 1
    fi
fi
echo -n "Linking /usr/include/apache to /usr/src/apache-1.2.1..."
if ln -s ../src/apache-1.2.1 apache
then
    echo done.
else
    echo
fi
