#! /bin/sh
CONFIG_FILES="$*"
export CONFIG_FILES
PREFIX="/usr/lib/mpich"
#
# I once made a suggestion to do
#if [ -n "$PREFIX" ] ; then 
#    /bin/rm -f .t1 
#    cat $file | sed -e "s%@INSTALL_DIR@%$PREFIX%g" > .t1
#    mv .t1 $file
#fi
# 
# but I've lost the example that made me suggest this.
# 
# First, try the device/architecture specific config.status
if [ -s /usr/lib/mpich/lib/LINUX/ch_p4/config.status ] ; then 
    # Export the location of mpichconf.h.in
    #CONFIG_HEADERS="/usr/lib/mpich/lib/LINUX/ch_p4/mpichconf.h"
    # In fact, we DO NOT want to recreate mpichconf.h  We must
    # suppress it by defineing CONFIG_HEADERS as empty
    CONFIG_HEADERS=""
    export CONFIG_HEADERS
    /usr/lib/mpich/lib/LINUX/ch_p4/config.status
elif [ -s /usr/lib/mpich/config.status ] ; then
    # Export the location of mpichconf.h.in
    #CONFIG_HEADERS="/usr/lib/mpich/mpichconf.h"
    CONFIG_HEADERS=""
    export CONFIG_HEADERS
    /usr/lib/mpich/config.status
else
    echo "A config.status file is needed to perform a reconfig of a file"
    exit 1
fi

