autogen.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #! /bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. # Make it possible to specify path in the environment
  4. : ${AUTOCONF=autoconf}
  5. : ${AUTOHEADER=autoheader}
  6. : ${AUTOMAKE=automake}
  7. : ${ACLOCAL=aclocal}
  8. : ${GETTEXTIZE=gettextize}
  9. srcdir=`dirname $0`
  10. test -z "$srcdir" && srcdir=.
  11. (
  12. cd $srcdir
  13. : ${CVS=cvs}
  14. test -d macros || $CVS co -d macros gnome-common/macros || exit 1
  15. # Ensure that gettext is reasonably new.
  16. gettext_ver=`$GETTEXTIZE --version | sed -n '1s/^.* //p'`
  17. case $gettext_ver in
  18. 0.10.3[89]) ;;
  19. *) echo "Don't use gettext other than versions 0.10.38 and 0.10.39"
  20. exit 1;;
  21. esac
  22. rm -rf intl
  23. $GETTEXTIZE --copy --force >tmpout || exit 1
  24. rm -f po/ChangeLog
  25. mv po/ChangeLog~ po/ChangeLog
  26. # Ugly way to parse the instructions gettexize gives us.
  27. m4files="`cat tmpout | sed -n -e '/^Please/,/^from/s/^ *//p'`"
  28. fromdir=`cat tmpout | sed -n -e '/^Please/,/^from/s/^from the \([^ ]*\) .*$/\1/p'`
  29. rm tmpout
  30. rm -rf gettext.m4
  31. mkdir gettext.m4
  32. for i in $m4files; do
  33. cp -f $fromdir/$i gettext.m4
  34. done
  35. $ACLOCAL -I macros -I gettext.m4 $ACLOCAL_FLAGS || exit 1
  36. $AUTOHEADER || exit 1
  37. $AUTOCONF || exit 1
  38. $AUTOMAKE -a || exit 1
  39. cd vfs/samba || exit 1
  40. date -u >include/stamp-h.in
  41. $AUTOHEADER || exit 1
  42. $AUTOCONF || exit 1
  43. ) || exit 1
  44. $srcdir/configure --cache-file=config.cache --enable-maintainer-mode "$@"