/tags/rel-0-6-1/FreeSpeech/vflow/macros/autogen.sh

# · Shell · 145 lines · 133 code · 8 blank · 4 comment · 26 complexity · bc95e3012b393e4406bcdfa7a7ebd35f MD5 · raw file

  1. #!/bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. DIE=0
  4. (autoconf --version) < /dev/null > /dev/null 2>&1 || {
  5. echo
  6. echo "**Error**: You must have \`autoconf' installed to compile Gnome."
  7. echo "Download the appropriate package for your distribution,"
  8. echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
  9. DIE=1
  10. }
  11. (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
  12. (libtool --version) < /dev/null > /dev/null 2>&1 || {
  13. echo
  14. echo "**Error**: You must have \`libtool' installed to compile Gnome."
  15. echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
  16. echo "(or a newer version if it is available)"
  17. DIE=1
  18. }
  19. }
  20. grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
  21. grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
  22. (gettext --version) < /dev/null > /dev/null 2>&1 || {
  23. echo
  24. echo "**Error**: You must have \`gettext' installed to compile Gnome."
  25. echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
  26. echo "(or a newer version if it is available)"
  27. DIE=1
  28. }
  29. }
  30. grep "^AM_GNOME_GETTEXT" $srcdir/configure.in >/dev/null && {
  31. grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
  32. (gettext --version) < /dev/null > /dev/null 2>&1 || {
  33. echo
  34. echo "**Error**: You must have \`gettext' installed to compile Gnome."
  35. echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
  36. echo "(or a newer version if it is available)"
  37. DIE=1
  38. }
  39. }
  40. (automake --version) < /dev/null > /dev/null 2>&1 || {
  41. echo
  42. echo "**Error**: You must have \`automake' installed to compile Gnome."
  43. echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
  44. echo "(or a newer version if it is available)"
  45. DIE=1
  46. NO_AUTOMAKE=yes
  47. }
  48. # if no automake, don't bother testing for aclocal
  49. test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
  50. echo
  51. echo "**Error**: Missing \`aclocal'. The version of \`automake'"
  52. echo "installed doesn't appear recent enough."
  53. echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
  54. echo "(or a newer version if it is available)"
  55. DIE=1
  56. }
  57. if test "$DIE" -eq 1; then
  58. exit 1
  59. fi
  60. if test -z "$*"; then
  61. echo "**Warning**: I am going to run \`configure' with no arguments."
  62. echo "If you wish to pass any to it, please specify them on the"
  63. echo \`$0\'" command line."
  64. echo
  65. fi
  66. case $CC in
  67. xlc )
  68. am_opt=--include-deps;;
  69. esac
  70. for coin in `find $srcdir -name configure.in -print`
  71. do
  72. dr=`dirname $coin`
  73. if test -f $dr/NO-AUTO-GEN; then
  74. echo skipping $dr -- flagged as no auto-gen
  75. else
  76. echo processing $dr
  77. macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
  78. ( cd $dr
  79. aclocalinclude="$ACLOCAL_FLAGS"
  80. for k in $macrodirs; do
  81. if test -d $k; then
  82. aclocalinclude="$aclocalinclude -I $k"
  83. ##else
  84. ## echo "**Warning**: No such directory \`$k'. Ignored."
  85. fi
  86. done
  87. if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
  88. if grep "sed.*POTFILES" configure.in >/dev/null; then
  89. : do nothing -- we still have an old unmodified configure.in
  90. else
  91. echo "Creating $dr/aclocal.m4 ..."
  92. test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
  93. echo "Running gettextize... Ignore non-fatal messages."
  94. echo "no" | gettextize --force --copy
  95. echo "Making $dr/aclocal.m4 writable ..."
  96. test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
  97. fi
  98. fi
  99. if grep "^AM_GNOME_GETTEXT" configure.in >/dev/null; then
  100. echo "Creating $dr/aclocal.m4 ..."
  101. test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
  102. echo "Running gettextize... Ignore non-fatal messages."
  103. echo "no" | gettextize --force --copy
  104. echo "Making $dr/aclocal.m4 writable ..."
  105. test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
  106. fi
  107. if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
  108. echo "Running libtoolize..."
  109. libtoolize --force --copy
  110. fi
  111. echo "Running aclocal $aclocalinclude ..."
  112. aclocal $aclocalinclude
  113. if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
  114. echo "Running autoheader..."
  115. autoheader
  116. fi
  117. echo "Running automake --gnu $am_opt ..."
  118. automake --add-missing --gnu $am_opt
  119. echo "Running autoconf ..."
  120. autoconf
  121. )
  122. fi
  123. done
  124. conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
  125. if test x$NOCONFIGURE = x; then
  126. echo Running $srcdir/configure $conf_flags "$@" ...
  127. $srcdir/configure $conf_flags "$@" \
  128. && echo Now type \`make\' to compile $PKG_NAME || exit 1
  129. else
  130. echo Skipping configure process.
  131. fi