bootstrap.sh 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #!/bin/sh
  2. set -e
  3. AUTORECONF=`which autoreconf`
  4. if test -z $AUTORECONF; then
  5. echo "*** No autoreconf found, please install it ***"
  6. exit 1
  7. fi
  8. INTLTOOLIZE=`which intltoolize`
  9. if test -z $INTLTOOLIZE; then
  10. echo "*** No intltoolize found, please install the intltool package ***"
  11. exit 1
  12. fi
  13. LIBTOOLIZE=`which libtoolize`
  14. if test -z $LIBTOOLIZE; then
  15. LIBTOOLIZE=`which glibtoolize`
  16. if ! test -z $LIBTOOLIZE; then
  17. echo "Using glibtoolize. Is it OSX?"
  18. fi
  19. fi
  20. if test -z $LIBTOOLIZE; then
  21. echo "*** No libtoolize nor glibtoolize found, please install the intltool package ***"
  22. exit 1
  23. fi
  24. echo "running libtooize ($LIBTOOLIZE)..."
  25. $LIBTOOLIZE --ltdl --copy --force
  26. echo "running autopoint..."
  27. autopoint --force
  28. echo "running autoreconf..."
  29. AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
  30. # WORKAROUND 2013-08-15:
  31. # Patch the generated po/Makefile.in.in file so that locale files are installed
  32. # in the correct location on OS X and Free-BSD systems. This is a workaround
  33. # for a bug in intltool.
  34. # See https://launchpad.net/bugs/398571 and https://bugs.launchpad.net/bugs/992047
  35. #
  36. # TODO: Drop this hack, and bump our intltool version requiement once the issue
  37. # is fixed in intltool
  38. echo "patching po/Makefile.in.in..."
  39. sed 's/itlocaledir = $(prefix)\/$(DATADIRNAME)\/locale/itlocaledir = $(datarootdir)\/locale/' < po/Makefile.in.in > po/Makefile.in.in.tmp
  40. mv po/Makefile.in.in.tmp po/Makefile.in.in
  41. echo "Done! Please run ./configure now."