autogen.sh 793 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. set -e
  3. # Use backticks to support ksh on Solaris
  4. basedir=`dirname "$0"`
  5. srcdir=`cd "$basedir" && pwd`
  6. cd "$srcdir"
  7. ${AUTORECONF:-autoreconf} --verbose --install --force -I m4 ${AUTORECONF_FLAGS}
  8. # Customize the INSTALL file
  9. rm -f INSTALL && ln -s doc/INSTALL .
  10. # Generate po/POTFILES.in
  11. if ! xgettext -h 2>&1 | grep -e '--keyword' >/dev/null ; then
  12. echo "gettext is unable to extract translations, set XGETTEXT to GNU gettext!" >&2
  13. touch po/POTFILES.in
  14. else
  15. ${XGETTEXT:-xgettext} --keyword=_ --keyword=N_ --keyword=Q_ --output=- \
  16. `find . -name '*.[ch]'` | ${SED-sed} -ne '/^#:/{s/#://;s/:[0-9]*/\
  17. /g;s/ //g;p;}' | \
  18. grep -v '^$' | sort | uniq >po/POTFILES.in
  19. fi
  20. "$srcdir/version.sh" "$srcdir"
  21. if test -x "$srcdir/configure.mc"; then
  22. "$srcdir/configure.mc" "$@"
  23. fi