bootstrap 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #! /bin/sh
  2. ## bootstrap file for the VLC media player
  3. ##
  4. ## Copyright (C) 2005-2008 the VideoLAN team
  5. ##
  6. ## Authors: Sam Hocevar <sam@zoy.org>
  7. ## Rémi Denis-Courmont
  8. set -e
  9. cd "$(dirname "$0")"
  10. if test "$#" != "0"; then
  11. echo "Usage: $0" >&2
  12. echo " Calls autoreconf to generate m4 macros and prepare Makefiles." >&2
  13. exit 1
  14. fi
  15. ACLOCAL_ARGS="-I m4 ${ACLOCAL_ARGS}"
  16. # Check for tools directory
  17. if test -z ${VLC_TOOLS}; then
  18. VLC_TOOLS=extras/tools/build
  19. fi
  20. if test -d ${VLC_TOOLS}/bin; then
  21. VLC_TOOLS_PATH="$( cd "${VLC_TOOLS}/bin" ; pwd -P )"
  22. PATH="$VLC_TOOLS_PATH:$PATH"
  23. fi
  24. ###
  25. ### Get a sane environment, just in case
  26. ###
  27. CYGWIN=binmode
  28. export CYGWIN
  29. # Check for pkg-config
  30. if ! "${PKG_CONFIG:-pkg-config}" --version >/dev/null 2>&1; then
  31. echo 'Error: "pkg-config" is not installed.' >&2
  32. exit 1
  33. fi
  34. # Check for autopoint (GNU gettext)
  35. export AUTOPOINT
  36. test "$AUTOPOINT" || AUTOPOINT=autopoint
  37. if ! "$AUTOPOINT" --dry-run --force >/dev/null 2>&1; then
  38. AUTOPOINT=true
  39. cat << EOF
  40. NOTE: autopoint (GNU gettext-tools) appears to be missing or out-of-date.
  41. Please install or update GNU gettext tools.
  42. Otherwise, you will not be able to build a source tarball.
  43. ==========================================================================
  44. EOF
  45. fi
  46. # Check for flex and bison
  47. if ! flex --version >/dev/null 2>&1; then
  48. echo "ERROR: flex is not installed." >&2
  49. if ! test -f modules/codec/webvtt/CSSLexer.c; then
  50. exit 1
  51. fi
  52. fi
  53. if ! bison --version >/dev/null 2>&1; then
  54. echo "ERROR: GNU bison is not installed." >&2
  55. if ! test -f modules/codec/webvtt/CSSGrammar.c; then
  56. exit 1
  57. fi
  58. fi
  59. ###
  60. ### classic bootstrap stuff
  61. ###
  62. autoreconf --install --force --verbose ${ACLOCAL_ARGS}
  63. rm -f po/Makevars.template
  64. ##
  65. ## files which need to be regenerated
  66. ##
  67. rm -f stamp-h*
  68. # Shut up
  69. set +x
  70. echo "Successfully bootstrapped"