eggmod.m4 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. dnl eggmod.m4
  2. dnl macros eggdrop modules should use instead of the original autoconf
  3. dnl versions.
  4. dnl
  5. dnl
  6. dnl EGG_REMOVE_MOD(MODULE-NAME)
  7. dnl
  8. define(EGG_REMOVE_MOD,
  9. [${srcdir}/../../../misc/modconfig -q --top_srcdir=${srcdir}/../../.. --bindir=../../.. del $1])
  10. dnl
  11. dnl EGG_INIT(UNIQUE-SOURCE-FILE)
  12. dnl
  13. define(EGG_INIT,
  14. [AC_INIT($1)
  15. ## SPLIT
  16. # configure -- Special configure variant for eggdrop modules based on the
  17. # GNU autoconf scripts.
  18. #
  19. # Automatically created by src/mod/eggautoconf from `configure.in'
  20. #
  21. echo "running in eggdrop mode."
  22. # This tells the code in eggmod.sh to search for the file `$1'.
  23. # That way we can make sure we're started from the correct directory.
  24. ac_egg_uniquefile=$1
  25. # Scan for out source directory
  26. ac_egg_srcdir=.
  27. for i in [$]*; do
  28. case "[$]{i}" in
  29. --srcdir=*)
  30. ac_egg_srcdir=`echo [$]{i} | sed -e 's/^--srcdir=//'`
  31. ;;
  32. esac
  33. done
  34. if test -r [$]{ac_egg_srcdir}/../eggmod.sh; then
  35. . [$]{ac_egg_srcdir}/../eggmod.sh
  36. else
  37. echo "[$]0: error: failed to locate eggmod.sh in [$]{ac_egg_srcdir}/.." >&2
  38. exit 1
  39. fi
  40. # Standard autoconf commands/tests follow below.])