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.

преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
преди 19 години
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. #! /bin/sh
  2. # bootstrap: the ultimate bootstrap/autogen.sh script for autotools projects
  3. # Copyright (c) 2002, 2003, 2004, 2005, 2006 Sam Hocevar <sam@zoy.org>
  4. #
  5. # This program is free software; you can redistribute it and/or
  6. # modify it under the terms of the Do What The Fuck You Want To
  7. # Public License, Version 2, as published by Sam Hocevar. See
  8. # http://sam.zoy.org/wtfpl/COPYING for more details.
  9. #
  10. # The latest version of this script can be found at the following place:
  11. # http://sam.zoy.org/autotools/
  12. # Die if an error occurs
  13. set -e
  14. # Guess whether we are using configure.ac or configure.in
  15. if test -f configure.ac; then
  16. conffile="configure.ac"
  17. elif test -f configure.in; then
  18. conffile="configure.in"
  19. else
  20. echo "$0: could not find configure.ac or configure.in"
  21. exit 1
  22. fi
  23. # Check for needed features
  24. auxdir="`sed -ne 's/^[ \t]*A._CONFIG_AUX_DIR *( *\([^ )]*\).*/\1/p' $conffile`"
  25. libtool="`grep -q '^[ \t]*A._PROG_LIBTOOL' $conffile && echo yes || echo no`"
  26. header="`grep -q '^[ \t]*A._CONFIG_HEADER' $conffile && echo yes || echo no`"
  27. # Check for automake
  28. amvers="no"
  29. for n in 10 9 8 7 6 5; do
  30. for v in "-1.${n}" "1${n}"; do
  31. if automake${v} --version >/dev/null 2>&1; then
  32. amvers="${v}"
  33. break
  34. fi
  35. done
  36. done
  37. if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
  38. amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
  39. if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
  40. amvers="no"
  41. else
  42. amvers=""
  43. fi
  44. fi
  45. if test "$amvers" = "no"; then
  46. echo "$0: you need automake version 1.5 or later"
  47. exit 1
  48. fi
  49. # Check for autoconf
  50. acvers="no"
  51. for v in "" "259" "253"; do
  52. if autoconf${v} --version >/dev/null 2>&1; then
  53. acvers="${v}"
  54. break
  55. fi
  56. done
  57. if test "$acvers" = "no"; then
  58. echo "$0: you need autoconf"
  59. exit 1
  60. fi
  61. # Check for libtool
  62. if test "$libtool" = "yes"; then
  63. libtoolize="no"
  64. if glibtoolize --version >/dev/null 2>&1; then
  65. libtoolize="glibtoolize"
  66. else
  67. for v in "16" "15" "" "14"; do
  68. if libtoolize${v} --version >/dev/null 2>&1; then
  69. libtoolize="libtoolize${v}"
  70. break
  71. fi
  72. done
  73. fi
  74. if test "$libtoolize" = "no"; then
  75. echo "$0: you need libtool"
  76. exit 1
  77. fi
  78. fi
  79. # Remove old cruft
  80. for x in aclocal.m4 configure config.guess config.log config.sub config.cache config.h.in config.h compile libtool.m4 ltoptions.m4 ltsugar.m4 ltversion.m4 ltmain.sh libtool ltconfig missing mkinstalldirs depcomp install-sh; do rm -f $x autotools/$x; if test -n "$auxdir"; then rm -f "$auxdir/$x"; fi; done
  81. rm -Rf autom4te.cache
  82. if test -n "$auxdir" -a ! -d "$auxdir"; then mkdir "$auxdir"; fi
  83. # Explain what we are doing from now
  84. set -x
  85. # Bootstrap package
  86. if test "$libtool" = "yes"; then
  87. ${libtoolize} --copy --force
  88. if test -n "$auxdir" -a -f "ltmain.sh"; then
  89. echo "$0: working around a minor libtool issue"
  90. mv ltmain.sh "$auxdir/"
  91. fi
  92. fi
  93. if test -n "$auxdir"; then
  94. aclocal${amvers} -I autotools
  95. else
  96. aclocal${amvers}
  97. fi
  98. autoconf${acvers}
  99. if test "$header" = "yes"; then
  100. autoheader${acvers}
  101. fi
  102. #add --include-deps if you want to bootstrap with any other compiler than gcc
  103. #automake${amvers} --add-missing --copy --include-deps
  104. automake${amvers} --foreign --add-missing --copy
  105. # Remove cruft that we no longer want
  106. rm -Rf autom4te.cache