#! /bin/sh

if [ ! -f doc/RELEASE ];then
  cd doc
  ln -s ../phreeqc3-doc/RELEASE.TXT RELEASE
  cd ..
fi

if [ ! -f doc/NOTICE ];then
  cd doc
  ln -s ../phreeqc3-doc/NOTICE.TXT NOTICE
  cd ..
fi

if [ ! -f /doc/html ];then
  cd doc
  doxygen
  cd ..
fi

if [ ! -f doc/README ];then
  cd doc
  ln -s ../phreeqc3-doc/README.IPhreeqc.TXT README
  cd ..
fi

exec autoreconf -fvi
