#!/bin/bash REPLACE="AM_CONFIG_HEADER:AC_CONFIG_HEADER AM_PROG_CC_STDC:AC_PROG_CC" for i in $REPLACE; do OLD=$(echo $i | cut -d: -f1) NEW=$(echo $i | cut -d: -f2) if test -e configure.in && grep -q $OLD configure.in; then sed -i "s/$OLD/$NEW/" configure.in echo "replacing $OLD with $NEW in configure.in" fi if test -e configure.ac && grep -q $OLD configure.ac; then sed -i "s/$OLD/$NEW/" configure.ac echo "replacing $OLD with $NEW in configure.ac" fi done