autogen.sh 1.2 KB

12345678910111213141516171819202122232425262728293031
  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. # Check that we're being run from the right directory.
  6. if test ! -f src/google/protobuf/stubs/common.h; then
  7. cat >&2 << __EOF__
  8. Could not find source code. Make sure you are running this script from the
  9. root of the distribution tree.
  10. __EOF__
  11. exit 1
  12. fi
  13. set -ex
  14. # Temporary hack: Must change C runtime library to "multi-threaded DLL",
  15. # otherwise it will be set to "multi-threaded static" when MSVC upgrades
  16. # the project file to MSVC 2005/2008. vladl of Google Test says gtest will
  17. # probably change their default to match, then this will be unnecessary.
  18. # One of these mappings converts the debug configuration and the other
  19. # converts the release configuration. I don't know which is which.
  20. sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
  21. s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
  22. # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
  23. autoreconf -f -i -Wall,no-obsolete
  24. rm -rf autom4te.cache config.h.in~
  25. exit 0