Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [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 | set -e |
| 8 | |
| 9 | if [ ! -z "$@" ]; then |
| 10 | for argument in "$@"; do |
| 11 | case $argument in |
| 12 | # make curl silent |
| 13 | "-s") |
| 14 | curlopts="-s" |
| 15 | ;; |
| 16 | esac |
| 17 | done |
| 18 | fi |
| 19 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 20 | # Check that we're being run from the right directory. |
| 21 | if test ! -f src/google/protobuf/stubs/common.h; then |
| 22 | cat >&2 << __EOF__ |
| 23 | Could not find source code. Make sure you are running this script from the |
| 24 | root of the distribution tree. |
| 25 | __EOF__ |
| 26 | exit 1 |
| 27 | fi |
| 28 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 29 | set -ex |
| 30 | |
Austin Schuh | 40c1652 | 2018-10-28 20:27:54 -0700 | [diff] [blame] | 31 | # The absence of a m4 directory in googletest causes autoreconf to fail when |
| 32 | # building under the CentOS docker image. It's a warning in regular build on |
| 33 | # Ubuntu/gLinux as well. |
| 34 | mkdir -p third_party/googletest/m4 |
| 35 | |
Brian Silverman | 9c614bc | 2016-02-15 20:20:02 -0500 | [diff] [blame] | 36 | # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings. |
| 37 | autoreconf -f -i -Wall,no-obsolete |
| 38 | |
| 39 | rm -rf autom4te.cache config.h.in~ |
| 40 | exit 0 |