blob: d00d21727c2d815ce352f1a8705ae532dd03a619 [file] [log] [blame]
temporal40ee5512008-07-10 02:12:20 +00001#!/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.comfccb1462009-12-18 02:11:36 +00007set -e
8
Matthew Valimakic0a7ea42015-10-13 09:42:20 -07009if [ ! -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
temporal40ee5512008-07-10 02:12:20 +000020# Check that we're being run from the right directory.
kenton@google.com2fd12082009-05-01 21:41:32 +000021if test ! -f src/google/protobuf/stubs/common.h; then
temporal40ee5512008-07-10 02:12:20 +000022 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
kenton@google.com6cbe32f2009-07-31 21:20:02 +000029set -ex
kenton@google.combbbd4d32009-04-22 01:34:07 +000030
Feng Xiao9de4e642018-07-13 16:55:32 -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
kenton@google.comcf3f6382008-09-30 22:01:45 +000036# TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
37autoreconf -f -i -Wall,no-obsolete
temporal40ee5512008-07-10 02:12:20 +000038
temporal40ee5512008-07-10 02:12:20 +000039rm -rf autom4te.cache config.h.in~
40exit 0