3 # Run this script to generate the configure script and other files that will
4 # be included in the distribution. These files are not checked in because they
5 # are automatically generated.
9 # Check that we're being run from the right directory.
10 if test ! -f src/google/protobuf/stubs/common.h; then
12 Could not find source code. Make sure you are running this script from the
13 root of the distribution tree.
18 # Check that gtest is present. Usually it is already there since the
19 # directory is set up as an SVN external.
20 if test ! -e gtest; then
21 echo "Google Test not present. Fetching gtest-1.5.0 from the web..."
22 curl http://googletest.googlecode.com/files/gtest-1.5.0.tar.bz2 | tar jx
28 # Temporary hack: Must change C runtime library to "multi-threaded DLL",
29 # otherwise it will be set to "multi-threaded static" when MSVC upgrades
30 # the project file to MSVC 2005/2008. vladl of Google Test says gtest will
31 # probably change their default to match, then this will be unnecessary.
32 # One of these mappings converts the debug configuration and the other
33 # converts the release configuration. I don't know which is which.
34 sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g;
35 s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj
37 # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
38 autoreconf -f -i -Wall,no-obsolete
40 rm -rf autom4te.cache config.h.in~