blob: d00d21727c2d815ce352f1a8705ae532dd03a619 [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001#!/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
7set -e
8
9if [ ! -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
18fi
19
Brian Silverman9c614bc2016-02-15 20:20:02 -050020# Check that we're being run from the right directory.
21if test ! -f src/google/protobuf/stubs/common.h; then
22 cat >&2 << __EOF__
23Could not find source code. Make sure you are running this script from the
24root of the distribution tree.
25__EOF__
26 exit 1
27fi
28
Brian Silverman9c614bc2016-02-15 20:20:02 -050029set -ex
30
Austin Schuh40c16522018-10-28 20:27:54 -070031# 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.
34mkdir -p third_party/googletest/m4
35
Brian Silverman9c614bc2016-02-15 20:20:02 -050036# TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
37autoreconf -f -i -Wall,no-obsolete
38
39rm -rf autom4te.cache config.h.in~
40exit 0