#!/bin/sh
if [ -e "lib/Makefile" ] || [ -e "examples/Makefile" ]; then
        make -i distclean
fi

if [ -f /etc/fedora-release ]; then
        DIS_PATH='/etc/rc.d/rc.local'
else
        DIS_PATH='/etc/rc.local'
fi

# Clear all auto-generated files
rm -rf *~ aclocal.m4 autom4te.cache configure depcomp install-sh missing mkinstalldirs stamp-h.in
sed -i '/ixpci/d' $DIS_PATH >> /dev/null 2>&1

aclocal
# autoheader
automake -a -c
autoconf
rm -rf autom4te.cache
