eggautoconf 903 B

1234567891011121314151617181920212223242526272829303132333435
  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. #
  8. # Copyright (C) 2000, 2001, 2002 Eggheads Development Team
  9. # Written by Fabian Knittel
  10. set -e
  11. if test ! -f configure.in; then
  12. echo "$0: error: no \`configure.in' found."
  13. exit 1
  14. fi
  15. if test ! -f ../eggmod.sh; then
  16. echo "$0: \`../eggmod.sh' not found. Not calling from module directory?"
  17. exit 1
  18. fi
  19. autoconf
  20. if test ! -f configure; then
  21. echo "$0: error: autoconf did not produce \`configure' script."
  22. exit 1
  23. fi
  24. echo "Recreating eggdrop/autoconf configure script."
  25. if (cat configure | awk '
  26. BEGIN { RS = "\f-never-\f"; FS = "\n## SPLIT" }
  27. { print "#! /bin/sh" $2 }' > configure_new); then
  28. mv configure_new configure
  29. chmod 0775 configure
  30. else
  31. echo "Failed to create configure script!" >&2
  32. exit 1
  33. fi
  34. exit 0