home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / ade-misc-src.tgz / ade-misc-src.tar / scripts / autoconf.all next >
Text File  |  1996-09-28  |  846b  |  39 lines

  1. #!/bin/sh
  2. #
  3. # Given a list of configure.in files in $1, remake the
  4. # corresponding "configure" script using the latest installed
  5. # version of autoconf. Useful to remake all configure scripts
  6. # when autoconf is updated.  Skips configure.in files that are
  7. # not meant to be fed to autoconf.
  8.  
  9. rootdir=`pwd`
  10. for i in `cat $1`
  11. do
  12. echo "=== $i ==="
  13. if grep AC_INIT $i >/dev/null 2>&1
  14. then
  15.     dir=`dirname $i`
  16.     if test -f $dir/configure
  17.     then
  18.         cd $dir
  19.         /bin/autoconf
  20.         # special hack for broken autoconf 2.9
  21.         sed "s:^char main:int main:" <configure >junkfile
  22.         if cmp junkfile configure >/dev/null 2>&1
  23.         then
  24.             true
  25.             rm -f junkfile
  26.         else
  27.             echo "Fixed up char main refs"
  28.             rm -f configure
  29.             mv junkfile configure
  30.         fi
  31.         cd $rootdir
  32.     else
  33.         echo "No configure script in $dir to rebuild"
  34.     fi
  35. else
  36.     echo "No autoconf processing necessary"
  37. fi
  38. done
  39.