#!/bin/sh
#
# Configure script for wmbday by astratis <steffen@x-berg.de>
# 
# Copyright (C) 2003 Rafal Lesniak <cache@sowatech.com.pl>
# Copyright (C) 2006 Slava Semushin <php-coder@ngs.ru>
#

echo "[+] simple wmbday configuration script"

echo "/* This file was autogenerated by configure script! */" > config.h
echo "#ifndef CONFIG_H" >> config.h

echo -n "Checking for xmessage... "
XM_PATH=`which xmessage`;

if [ -e "$XM_PATH" ]; then
    echo "$XM_PATH";
    echo "#define XM_PATH \"$XM_PATH\"" >> config.h
else
    echo "not found."
    echo "xmessage not installed or not in \$PATH. Fix this in order to continue."
    rm -fv config.h
    exit 1
fi

echo "#endif /* CONFIG_H */" >> config.h

echo 
echo "[+] All done, now go on with 'make'"

