autogen.sh 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/bin/sh
  2. # The version nr detection is not working.
  3. # It fails if there is a '-' char in the version nr e.g.
  4. # We should not use it until fixed. - Bram
  5. ## The reason this uses sed instead of "grep --only-matches"
  6. ## is because MinGW's grep is an old version and does not contain that flag.
  7. #automake_version=`automake --version | grep --regexp='[+0-9].[+0-9].[+0-9]' | sed -n 's/[* ()A-Za-z]//g;p'`
  8. #automake_mayor=${automake_version%.*.*}
  9. #automake_minor=${automake_version%.*}
  10. #automake_minor=${automake_minor##*.}
  11. #automake_revision=${automake_version##*.}
  12. #echo "AutoMake Version: $automake_mayor.$automake_minor.$automake_revision"
  13. #
  14. #if [ $automake_mayor -eq 1 ]; then
  15. # if [ $automake_minor -lt 8 ]; then
  16. # echo "Automake must be 1.8.2 or higher, please upgrade"
  17. # exit
  18. # else
  19. # if [ $automake_minor -eq 8 ] && [ $automake_revision -lt 2 ]; then
  20. # echo "Automake must be 1.8.2 or higher, please upgrade"
  21. # exit
  22. # fi
  23. # fi
  24. #fi
  25. echo "Please make sure that you use automake 1.10 or later"
  26. echo "Warnings about underquoted definitions are harmless"
  27. echo "Running aclocal"
  28. aclocal -I . || exit 1
  29. # on Mac libtoolize is called glibtoolize
  30. LIBTOOLIZE=libtoolize
  31. if [ `uname -s` = Darwin ]; then
  32. LIBTOOLIZE=glibtoolize
  33. fi
  34. echo "Running $LIBTOOLIZE"
  35. $LIBTOOLIZE --copy --force --automake || exit 1
  36. echo "Running autoheader"
  37. autoheader || exit 1
  38. echo "Running automake"
  39. automake --foreign --add-missing --copy || exit 1
  40. echo "Running autoconf"
  41. autoconf || exit 1
  42. echo "Running bootstrap in ou directory"
  43. (cd ou && ./bootstrap)
  44. #./configure $*
  45. echo "Now you are ready to run ./configure"