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