autogen.sh 1007 Bytes
Newer Older
temporal's avatar
temporal committed
1 2 3 4 5 6
#!/bin/sh

# Run this script to generate the configure script and other files that will
# be included in the distribution.  These files are not checked in because they
# are automatically generated.

7 8
set -e

9 10 11 12 13 14 15 16 17 18 19
if [ ! -z "$@" ]; then
  for argument in "$@"; do
    case $argument in
	  # make curl silent
      "-s")
        curlopts="-s"
        ;;
    esac
  done
fi

temporal's avatar
temporal committed
20
# Check that we're being run from the right directory.
21
if test ! -f src/google/protobuf/stubs/common.h; then
temporal's avatar
temporal committed
22 23 24 25 26 27 28
  cat >&2 << __EOF__
Could not find source code.  Make sure you are running this script from the
root of the distribution tree.
__EOF__
  exit 1
fi

29
set -ex
30

31 32 33 34 35
# The absence of a m4 directory in googletest causes autoreconf to fail when
# building under the CentOS docker image. It's a warning in regular build on
# Ubuntu/gLinux as well.
mkdir -p third_party/googletest/m4

36 37
# TODO(kenton):  Remove the ",no-obsolete" part and fix the resulting warnings.
autoreconf -f -i -Wall,no-obsolete
temporal's avatar
temporal committed
38 39 40

rm -rf autom4te.cache config.h.in~
exit 0