objc-basic.sh 998 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #! /bin/sh
  2. # Copyright (C) 2012-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. # Basic tests on the Objective C support that don't actually
  14. # require an Objective-C compiler.
  15. # See also sister test 'objcxx-basic.sh'.
  16. . test-init.sh
  17. cat > Makefile.am <<'END'
  18. bin_PROGRAMS = hello
  19. hello_SOURCES = hello.m
  20. END
  21. $ACLOCAL
  22. AUTOMAKE_fails
  23. grep "'OBJC'.* undefined" stderr
  24. grep "add .*'AC_PROG_OBJC'" stderr
  25. rm -rf autom4te*.cache
  26. echo AC_PROG_OBJC >> configure.ac
  27. $ACLOCAL
  28. $AUTOMAKE
  29. $EGREP '^\.SUFFIXES:.* \.m( |$)' Makefile.in
  30. :