/xbmc/visualizations/Goom/goom2k4-0/gtk-gui-devel/autogen.sh

http://github.com/xbmc/xbmc · Shell · 148 lines · 134 code · 9 blank · 5 comment · 25 complexity · dd2f8f80f5a7fb0cb59f223cbe2a1d25 MD5 · raw file

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