temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 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. |
| 6 | |
| 7 | # Check that we're being run from the right directory. |
| 8 | if test ! -e src/google/protobuf/stubs/common.h; then |
| 9 | cat >&2 << __EOF__ |
| 10 | Could not find source code. Make sure you are running this script from the |
| 11 | root of the distribution tree. |
| 12 | __EOF__ |
| 13 | exit 1 |
| 14 | fi |
| 15 | |
kenton@google.com | 37ad00d | 2009-04-21 21:00:39 +0000 | [diff] [blame] | 16 | if test ! -e gtest; then |
| 17 | echo "gtest bundle not present. Downloading gtest-1.3.0 automatically." >&2 |
| 18 | set -ex |
| 19 | curl http://googletest.googlecode.com/files/gtest-1.3.0.tar.bz2 | tar jx |
| 20 | mv gtest-1.3.0 gtest |
kenton@google.com | bbbd4d3 | 2009-04-22 01:34:07 +0000 | [diff] [blame^] | 21 | |
| 22 | # Temporary hack: Must change C runtime library to "multi-threaded DLL", |
| 23 | # otherwise it will be set to "multi-threaded static" when MSVC upgrades |
| 24 | # the project file to MSVC 2005/2008. vladl of Google Test says gtest will |
| 25 | # probably change their default to match, then this will be unnecessary. |
| 26 | # One of these mappings converts the debug configuration and the other |
| 27 | # converts the release configuration. I don't know which is which. |
| 28 | sed -i -e 's/RuntimeLibrary="5"/RuntimeLibrary="3"/g; |
| 29 | s/RuntimeLibrary="4"/RuntimeLibrary="2"/g;' gtest/msvc/*.vcproj |
kenton@google.com | 37ad00d | 2009-04-21 21:00:39 +0000 | [diff] [blame] | 30 | else |
| 31 | set -ex |
| 32 | fi |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 33 | |
kenton@google.com | cf3f638 | 2008-09-30 22:01:45 +0000 | [diff] [blame] | 34 | # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings. |
| 35 | autoreconf -f -i -Wall,no-obsolete |
temporal | 40ee551 | 2008-07-10 02:12:20 +0000 | [diff] [blame] | 36 | |
| 37 | rm -rf autom4te.cache config.h.in~ |
| 38 | exit 0 |