aclocal-pr450.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #! /bin/sh
  2. # Copyright (C) 2005-2017 Free Software Foundation, Inc.
  3. #
  4. # This program is free software; you can redistribute it and/or modify
  5. # it under the terms of the GNU General Public License as published by
  6. # the Free Software Foundation; either version 2, or (at your option)
  7. # any later version.
  8. #
  9. # This program is distributed in the hope that it will be useful,
  10. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. # GNU General Public License for more details.
  13. #
  14. # You should have received a copy of the GNU General Public License
  15. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. # Make sure aclocal does not fail on configure.ac inclusions that do
  17. # more than just variable definitions.
  18. # Report from Peter Breitenlohner (PR/450).
  19. . test-init.sh
  20. cat >configure.ac <<END
  21. AC_INIT([$me], [1.0])
  22. m4_include([aconfig.ac])
  23. FOO
  24. AC_OUTPUT
  25. END
  26. cat >aconfig.ac <<'END'
  27. AM_INIT_AUTOMAKE
  28. AC_DEFUN([FOO], [echo GREPME])
  29. sinclude([bconfig.ac])
  30. END
  31. cat >bconfig.ac <<'END'
  32. AC_ARG_WITH([grepme], [string])
  33. END
  34. $ACLOCAL
  35. $AUTOCONF
  36. ./configure >stdout || { cat stdout; exit 1; }
  37. cat stdout
  38. grep GREPME stdout
  39. grep 'aconfig\.ac' aclocal.m4 && exit 1
  40. grep 'bconfig\.ac' aclocal.m4 && exit 1
  41. grep with-grepme configure
  42. :