autogen.sh 983 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. # Run this script to generate the configure script and other files that will
  3. # be included in the distribution. These files are not checked in because they
  4. # are automatically generated.
  5. set -e
  6. # Check that we're being run from the right directory.
  7. if test ! -f src/google/protobuf/stubs/common.h; then
  8. cat >&2 << __EOF__
  9. Could not find source code. Make sure you are running this script from the
  10. root of the distribution tree.
  11. __EOF__
  12. exit 1
  13. fi
  14. # Check that gmock is present. Usually it is already there since the
  15. # directory is set up as an SVN external.
  16. if test ! -e gmock; then
  17. echo "Google Mock not present. Fetching gmock-1.7.0 from the web..."
  18. curl -O https://googlemock.googlecode.com/files/gmock-1.7.0.zip
  19. unzip -q gmock-1.7.0.zip
  20. rm gmock-1.7.0.zip
  21. mv gmock-1.7.0 gmock
  22. fi
  23. set -ex
  24. # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
  25. autoreconf -f -i -Wall,no-obsolete
  26. rm -rf autom4te.cache config.h.in~
  27. exit 0