Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

bootstrap 3.5 KiB

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