PageRenderTime 43ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

/liblo-0.26/autogen.sh

#
Shell | 121 lines | 108 code | 11 blank | 2 comment | 19 complexity | e825e3b038763a5ae2e6498df501f27f MD5 | raw file
Possible License(s): LGPL-2.1
  1. #!/bin/sh
  2. # Run this to generate all the initial makefiles, etc.
  3. srcdir=`dirname $0`
  4. test -z "$srcdir" && srcdir=.
  5. DIE=0
  6. (test -f $srcdir/configure.ac) || {
  7. echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
  8. echo " top-level package directory"
  9. exit 1
  10. }
  11. (autoconf --version) < /dev/null > /dev/null 2>&1 || {
  12. echo
  13. echo "**Error**: You must have \`autoconf' installed."
  14. echo "Download the appropriate package for your distribution,"
  15. echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
  16. DIE=1
  17. }
  18. (grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && {
  19. (libtoolize --version) < /dev/null > /dev/null 2>&1 \
  20. && LIBTOOLIZE=libtoolize || {
  21. (glibtoolize --version) < /dev/null > /dev/null 2>&1 \
  22. && LIBTOOLIZE=glibtoolize || {
  23. echo
  24. echo "**Error**: You must have \`libtool' installed."
  25. echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
  26. DIE=1
  27. }
  28. }
  29. }
  30. (automake --version) < /dev/null > /dev/null 2>&1 || {
  31. echo
  32. echo "**Error**: You must have \`automake' installed."
  33. echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/"
  34. DIE=1
  35. NO_AUTOMAKE=yes
  36. }
  37. # if no automake, don't bother testing for aclocal
  38. test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
  39. echo
  40. echo "**Error**: Missing \`aclocal'. The version of \`automake'"
  41. echo "installed doesn't appear recent enough."
  42. echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/"
  43. DIE=1
  44. }
  45. if test "$DIE" -eq 1; then
  46. exit 1
  47. fi
  48. if test -z "$*"; then
  49. echo "**Warning**: I am going to run \`configure' with no arguments."
  50. echo "If you wish to pass any to it, please specify them on the"
  51. echo \`$0\'" command line."
  52. echo
  53. fi
  54. case $CC in
  55. xlc )
  56. am_opt=--include-deps;;
  57. esac
  58. for coin in `find $srcdir -name configure.ac -print`
  59. do
  60. dr=`dirname $coin`
  61. if test -f $dr/NO-AUTO-GEN; then
  62. echo skipping $dr -- flagged as no auto-gen
  63. else
  64. echo processing $dr
  65. ( cd $dr
  66. aclocalinclude="$ACLOCAL_FLAGS"
  67. if grep "^AM_GLIB_GNU_GETTEXT" configure.ac >/dev/null; then
  68. echo "Creating $dr/aclocal.m4 ..."
  69. test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
  70. echo "Running glib-gettextize... Ignore non-fatal messages."
  71. echo "no" | glib-gettextize --force --copy
  72. echo "Making $dr/aclocal.m4 writable ..."
  73. test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
  74. fi
  75. if grep "^AC_PROG_INTLTOOL" configure.ac >/dev/null; then
  76. echo "Running intltoolize..."
  77. intltoolize --copy --force --automake
  78. fi
  79. if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then
  80. if test -z "$NO_LIBTOOLIZE" ; then
  81. echo "Running libtoolize..."
  82. $LIBTOOLIZE --force --copy
  83. fi
  84. fi
  85. echo "Running aclocal $aclocalinclude ..."
  86. aclocal $aclocalinclude
  87. if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then
  88. echo "Running autoheader..."
  89. autoheader
  90. fi
  91. echo "Running automake --gnu $am_opt ..."
  92. automake --add-missing --gnu $am_opt
  93. echo "Running autoconf ..."
  94. autoconf
  95. )
  96. fi
  97. done
  98. conf_flags="--enable-maintainer-mode"
  99. if test x$NOCONFIGURE = x; then
  100. echo Running $srcdir/configure $conf_flags "$@" ...
  101. $srcdir/configure $conf_flags "$@" \
  102. && echo Now type \`make\' to compile. || exit 1
  103. else
  104. echo Skipping configure process.
  105. fi