autogen.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. srcdir=`dirname $0`
  4. test -z "$srcdir" && srcdir=.
  5. ORIGDIR=`pwd`
  6. cd $srcdir
  7. PROJECT=classpath
  8. TEST_TYPE=-f
  9. FILE=java/lang/Object.java
  10. DIE=0
  11. LIBTOOLIZE=libtoolize
  12. have_libtool=false
  13. if ${LIBTOOLIZE} --version < /dev/null > /dev/null 2>&1 ; then
  14. libtool_version=`${LIBTOOLIZE} --version | sed 's/^.*[^0-9.]\([0-9]\{1,\}\.[0-9.]\{1,\}\).*/\1/'`
  15. case $libtool_version in
  16. 1.5*|2.*)
  17. have_libtool=true
  18. ;;
  19. esac
  20. fi
  21. if $have_libtool ; then : ; else
  22. echo
  23. echo "You must have libtool 1.5 installed to compile $PROJECT."
  24. echo "Install the appropriate package for your distribution,"
  25. echo "or get the source tarball at http://ftp.gnu.org/gnu/libtool/"
  26. echo "For Darwin you need the latest stable (1.5.22) to support"
  27. echo "Frameworks linking. Also, you have to point"
  28. echo "LOCAL_AUTORECONF_FLAGS to this libtool/share/aclocal."
  29. DIE=1
  30. fi
  31. if test "$DIE" -eq 1; then
  32. exit 1
  33. fi
  34. test $TEST_TYPE $FILE || {
  35. echo "You must run this script in the top-level $PROJECT directory"
  36. exit 1
  37. }
  38. if test "x$AUTOGEN_SUBDIR_MODE" = "xyes"; then
  39. if test -z "$*"; then
  40. echo "I am going to run ./configure with no arguments - if you wish "
  41. echo "to pass any to it, please specify them on the $0 command line."
  42. fi
  43. fi
  44. autoreconf --force --install --warnings=no-portability || exit $?
  45. cd $ORIGDIR || exit $?
  46. if test "x$AUTOGEN_SUBDIR_MODE" = "xyes"; then
  47. $srcdir/configure --enable-maintainer-mode $AUTOGEN_CONFIGURE_ARGS "$@" || exit $?
  48. echo
  49. echo "Now type 'make' to compile $PROJECT."
  50. fi