eggautoconf 960 B

123456789101112131415161718192021222324252627282930313233343536
  1. #! /bin/sh
  2. #
  3. # eggautoconf -- creates workable small configure scripts by cutting down
  4. # GNU autoconf scripts with the help of special eggdrop
  5. # m4 macros.
  6. #
  7. # $Id: eggautoconf,v 1.4 2002/01/02 03:46:37 guppy Exp $
  8. #
  9. # Copyright (C) 2000, 2001, 2002 Eggheads Development Team
  10. # Written by Fabian Knittel
  11. set -e
  12. if test ! -f configure.in; then
  13. echo "$0: error: no \`configure.in' found."
  14. exit 1
  15. fi
  16. if test ! -f ../eggmod.sh; then
  17. echo "$0: \`../eggmod.sh' not found. Not calling from module directory?"
  18. exit 1
  19. fi
  20. autoconf
  21. if test ! -f configure; then
  22. echo "$0: error: autoconf did not produce \`configure' script."
  23. exit 1
  24. fi
  25. echo "Recreating eggdrop/autoconf configure script."
  26. if (cat configure | awk '
  27. BEGIN { RS = "\f-never-\f"; FS = "\n## SPLIT" }
  28. { print "#! /bin/sh" $2 }' > configure_new); then
  29. mv configure_new configure
  30. chmod 0775 configure
  31. else
  32. echo "Failed to create configure script!" >&2
  33. exit 1
  34. fi
  35. exit 0