autogen.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/sh
  2. # Run this script to generate the configure script and other files that will
  3. # be included in the distribution. These files are not checked in because they
  4. # are automatically generated.
  5. set -e
  6. if [ ! -z "$@" ]; then
  7. for argument in "$@"; do
  8. case $argument in
  9. # make curl silent
  10. "-s")
  11. curlopts="-s"
  12. ;;
  13. esac
  14. done
  15. fi
  16. # Check that we're being run from the right directory.
  17. if test ! -f src/google/protobuf/stubs/common.h; then
  18. cat >&2 << __EOF__
  19. Could not find source code. Make sure you are running this script from the
  20. root of the distribution tree.
  21. __EOF__
  22. exit 1
  23. fi
  24. set -ex
  25. # The absence of a m4 directory in googletest causes autoreconf to fail when
  26. # building under the CentOS docker image. It's a warning in regular build on
  27. # Ubuntu/gLinux as well. (This is only needed if git submodules have been
  28. # initialized, which is typically only needed for testing; see the installation
  29. # instructions for details.)
  30. if test -d third_party/googletest; then
  31. mkdir -p third_party/googletest/m4
  32. fi
  33. # TODO(kenton): Remove the ",no-obsolete" part and fix the resulting warnings.
  34. autoreconf -f -i -Wall,no-obsolete
  35. rm -rf autom4te.cache config.h.in~
  36. exit 0