You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
3.4KB

  1. #!/bin/sh
  2. #
  3. # autogen.sh - Generates the initial makefiles from a pristine CVS tree
  4. #
  5. # $Id: autogen.sh,v 1.1 2002-10-30 22:38:35 nebogeo Exp $
  6. #
  7. # USAGE: autogen.sh [configure options]
  8. #
  9. # If environment variable DRYRUN is set, no configuring will be done -
  10. # (e.g. in bash) DRYRUN=1 ./autogen.sh
  11. # will not do any configuring but will emit the programs that would be run.
  12. #
  13. # This script is based on similar scripts used in various tools
  14. # commonly made available via CVS and used with GNU automake.
  15. # Try 'locate autogen.sh' on your system and see what you get.
  16. #
  17. PACKAGE=spiralsynthmodular
  18. DIE=
  19. if test "X$DRYRUN" != X; then
  20. DRYRUN=echo
  21. fi
  22. autoconf_vers=2.13
  23. automake_vers=1.4
  24. aclocal_vers=1.4
  25. program=`basename $0`
  26. if (autoconf --version) < /dev/null > /dev/null 2>&1 ; then
  27. if (autoconf --version | awk 'NR==1 { if( $3 >= '$autoconf_vers') \
  28. exit 1; exit 0; }');
  29. then
  30. echo "$program: ERROR: \`autoconf' is too old."
  31. echo " (version $autoconf_vers or newer is required)"
  32. DIE="yes"
  33. fi
  34. else
  35. echo
  36. echo "$program: ERROR: You must have \`autoconf' installed to compile $PACKAGE."
  37. echo " (version $autoconf_vers or newer is required)"
  38. DIE="yes"
  39. fi
  40. # Ensure that these are created by the versions on this system
  41. # (indirectly via automake)
  42. rm -f libtool ltmain.sh
  43. if (automake --version) < /dev/null > /dev/null 2>&1 ; then
  44. if (automake --version | awk 'NR==1 { if( $4 >= '$automake_vers') \
  45. exit 1; exit 0; }');
  46. then
  47. echo "$program: ERROR: \`automake' is too old."
  48. echo " (version $automake_vers or newer is required)"
  49. DIE="yes"
  50. fi
  51. if (aclocal --version) < /dev/null > /dev/null 2>&1; then
  52. if (aclocal --version | awk 'NR==1 { if( $4 >= '$aclocal_vers' ) \
  53. exit 1; exit 0; }' );
  54. then
  55. echo "$program: ERROR: \`aclocal' is too old."
  56. echo " (version $aclocal_vers or newer is required)"
  57. DIE="yes"
  58. fi
  59. else
  60. echo
  61. echo "$program: ERROR: Missing \`aclocal'"
  62. echo " The version of automake installed doesn't appear recent enough."
  63. DIE="yes"
  64. fi
  65. else
  66. echo
  67. echo "$program: ERROR: You must have \`automake' installed to compile $PACKAGE."
  68. echo " (version $automake_vers or newer is required)"
  69. DIE="yes"
  70. fi
  71. if test "X$DIE" != X; then
  72. exit 1
  73. fi
  74. if test -z "$*"; then
  75. echo "$program: WARNING: Running \`configure' with no arguments."
  76. echo "If you wish to pass any to it, please specify them on the"
  77. echo "\`$0' command line."
  78. fi
  79. am_opt=
  80. for coin in `find $srcdir -name configure.in -print`
  81. do
  82. dir=`dirname $coin`
  83. if test -f $dir/NO-AUTO-GEN; then
  84. echo $program: Skipping $dir -- flagged as no auto-gen
  85. else
  86. echo $program: Processing directory $dir
  87. ( cd $dir
  88. aclocalinclude="$ACLOCAL_FLAGS"
  89. echo "$program: Running aclocal $aclocalinclude"
  90. $DRYRUN aclocal $aclocalinclude
  91. if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
  92. echo "$program: Running autoheader"
  93. $DRYRUN autoheader
  94. fi
  95. echo "$program: Running automake $am_opt"
  96. $DRYRUN automake --add-missing $am_opt
  97. echo "$program: Running autoconf"
  98. $DRYRUN autoconf
  99. )
  100. fi
  101. done
  102. conf_flags=
  103. echo "$program: Running ./configure $conf_flags $@"
  104. if test "X$DRYRUN" = X; then
  105. $DRYRUN ./configure $conf_flags "$@" \
  106. && echo "$program: Now type \`make' to compile $PACKAGE" || exit 1
  107. else
  108. $DRYRUN ./configure $conf_flags "$@"
  109. fi