25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
 
 
 
 
 
 

124 satır
3.3 KiB

  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. aclocalflags="`sed -ne 's/^[ \t]*ACLOCAL_AMFLAGS[ \t]*=//p' Makefile.am`"
  28. # Check for automake
  29. amvers="no"
  30. for v in "-1.9" "19" "-1.8" "18" "-1.7" "17" "-1.6" "16" "-1.5" "15"; do
  31. if automake${v} --version >/dev/null 2>&1; then
  32. amvers="${v}"
  33. break
  34. fi
  35. done
  36. if test "${amvers}" = "no" && automake --version > /dev/null 2>&1; then
  37. amvers="`automake --version | sed -e '1s/[^0-9]*//' -e q`"
  38. if expr "$amvers" "<" "1.5" > /dev/null 2>&1; then
  39. amvers="no"
  40. else
  41. amvers=""
  42. fi
  43. fi
  44. if test "$amvers" = "no"; then
  45. echo "$0: you need automake version 1.5 or later"
  46. exit 1
  47. fi
  48. # Check for autoconf
  49. acvers="no"
  50. for v in "" "259" "253"; do
  51. if autoconf${v} --version >/dev/null 2>&1; then
  52. acvers="${v}"
  53. break
  54. fi
  55. done
  56. if test "$acvers" = "no"; then
  57. echo "$0: you need autoconf"
  58. exit 1
  59. fi
  60. # Check for libtool
  61. if test "$libtool" = "yes"; then
  62. libtoolize="no"
  63. if glibtoolize --version >/dev/null 2>&1; then
  64. libtoolize="glibtoolize"
  65. else
  66. for v in "16" "15" "" "14"; do
  67. if libtoolize${v} --version >/dev/null 2>&1; then
  68. libtoolize="libtoolize${v}"
  69. break
  70. fi
  71. done
  72. fi
  73. if test "$libtoolize" = "no"; then
  74. echo "$0: you need libtool"
  75. exit 1
  76. fi
  77. fi
  78. # Remove old cruft
  79. 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
  80. rm -Rf autom4te.cache
  81. if test -n "$auxdir"; then
  82. if test ! -d "$auxdir"; then
  83. mkdir "$auxdir"
  84. fi
  85. aclocalflags="${aclocalflags} -I $auxdir"
  86. fi
  87. # Explain what we are doing from now
  88. set -x
  89. # Bootstrap package
  90. if test "$libtool" = "yes"; then
  91. ${libtoolize} --copy --force
  92. if test -n "$auxdir" -a ! "$auxdir" = "." -a -f "ltmain.sh"; then
  93. echo "$0: working around a minor libtool issue"
  94. mv ltmain.sh "$auxdir/"
  95. fi
  96. fi
  97. aclocal${amvers} ${aclocalflags}
  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