reqd2.sh 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #! /bin/sh
  2. # Copyright (C) 2002-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. # Regression test for a bug reported by Andrew Suffield.
  17. # (Automake goes wild and try to rerun itself more than two time
  18. # to fix the Makefiles.)
  19. required='libtoolize'
  20. . test-init.sh
  21. cat > configure.ac << 'END'
  22. AC_INIT([req2], [1.0])
  23. AC_CONFIG_AUX_DIR([autoconf])
  24. AM_INIT_AUTOMAKE
  25. AC_CONFIG_FILES([Makefile])
  26. AC_PROG_CC
  27. AM_PROG_AR
  28. AM_PROG_LIBTOOL
  29. AC_CONFIG_FILES([autoconf/Makefile main/Makefile])
  30. AC_OUTPUT
  31. END
  32. mkdir autoconf
  33. mkdir main
  34. : > autoconf/Makefile.am
  35. echo 'SUBDIRS = autoconf main' >Makefile.am
  36. cat >main/Makefile.am <<'END'
  37. lib_LTLIBRARIES = lib0.la
  38. lib0_la_SOURCES = 0.c
  39. END
  40. : > ar-lib
  41. libtoolize --force --copy
  42. $ACLOCAL
  43. $AUTOCONF
  44. test -f autoconf/ltmain.sh # Sanity check.
  45. rm -f autoconf/ltmain.sh
  46. AUTOMAKE_fails --add-missing --copy
  47. grep '^configure\.ac:7:.* required file.*autoconf/ltmain\.sh' stderr
  48. :