2
0

autoconf.as 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. AS_INIT[]dnl -*- shell-script -*-
  2. m4_divert_push([HEADER-COPYRIGHT])dnl
  3. # @configure_input@
  4. # autoconf -- create `configure' using m4 macros
  5. # Copyright (C) 1992-1994, 1996, 1999-2012 Free Software Foundation,
  6. # Inc.
  7. # This program is free software: you can redistribute it and/or modify
  8. # it under the terms of the GNU General Public License as published by
  9. # the Free Software Foundation, either version 3 of the License, or
  10. # (at your option) any later version.
  11. # This program is distributed in the hope that it will be useful,
  12. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. # GNU General Public License for more details.
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. m4_divert_pop([HEADER-COPYRIGHT])dnl back to BODY
  18. AS_ME_PREPARE[]dnl
  19. usage=["\
  20. Usage: $0 [OPTION]... [TEMPLATE-FILE]
  21. Generate a configuration script from a TEMPLATE-FILE if given, or
  22. \`configure.ac' if present, or else \`configure.in'. Output is sent
  23. to the standard output if TEMPLATE-FILE is given, else into
  24. \`configure'.
  25. Operation modes:
  26. -h, --help print this help, then exit
  27. -V, --version print version number, then exit
  28. -v, --verbose verbosely report processing
  29. -d, --debug don't remove temporary files
  30. -f, --force consider all files obsolete
  31. -o, --output=FILE save output in FILE (stdout is the default)
  32. -W, --warnings=CATEGORY report the warnings falling in CATEGORY [syntax]
  33. Warning categories include:
  34. \`cross' cross compilation issues
  35. \`obsolete' obsolete constructs
  36. \`syntax' dubious syntactic constructs
  37. \`all' all the warnings
  38. \`no-CATEGORY' turn off the warnings on CATEGORY
  39. \`none' turn off all the warnings
  40. \`error' warnings are error
  41. The environment variables \`M4' and \`WARNINGS' are honored.
  42. Library directories:
  43. -B, --prepend-include=DIR prepend directory DIR to search path
  44. -I, --include=DIR append directory DIR to search path
  45. Tracing:
  46. -t, --trace=MACRO[:FORMAT] report the list of calls to MACRO
  47. -i, --initialization also trace Autoconf's initialization process
  48. In tracing mode, no configuration script is created. FORMAT defaults
  49. to \`\$f:\$l:\$n:\$%'; see \`autom4te --help' for information about FORMAT.
  50. Report bugs to <bug-autoconf@gnu.org>.
  51. GNU Autoconf home page: <http://www.gnu.org/software/autoconf/>.
  52. General help using GNU software: <http://www.gnu.org/gethelp/>."]
  53. version=["\
  54. autoconf (@PACKAGE_NAME@) @VERSION@
  55. Copyright (C) @RELEASE_YEAR@ Free Software Foundation, Inc.
  56. License GPLv3+/Autoconf: GNU GPL version 3 or later
  57. <http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
  58. This is free software: you are free to change and redistribute it.
  59. There is NO WARRANTY, to the extent permitted by law.
  60. Written by David J. MacKenzie and Akim Demaille."]
  61. help="\
  62. Try \`$as_me --help' for more information."
  63. exit_missing_arg='
  64. m4_bpatsubst([AS_ERROR([option `$[1]' requires an argument$as_nl$help])],
  65. ['], ['\\''])'
  66. # restore font-lock: '
  67. # Variables.
  68. : ${AUTOM4TE='@bindir@/@autom4te-name@'}
  69. autom4te_options=
  70. outfile=
  71. verbose=false
  72. # Parse command line.
  73. while test $# -gt 0 ; do
  74. option=[`expr "x$1" : 'x\(--[^=]*\)' \| \
  75. "x$1" : 'x\(-.\)'`]
  76. optarg=[`expr "x$1" : 'x--[^=]*=\(.*\)' \| \
  77. "x$1" : 'x-.\(.*\)'`]
  78. case $1 in
  79. --version | -V )
  80. echo "$version" ; exit ;;
  81. --help | -h )
  82. AS_ECHO(["$usage"]); exit ;;
  83. --verbose | -v )
  84. verbose=:
  85. autom4te_options="$autom4te_options $1"; shift ;;
  86. # Arguments passed as is to autom4te.
  87. --debug | -d | \
  88. --force | -f | \
  89. --include=* | -I?* | \
  90. --prepend-include=* | -B?* | \
  91. --warnings=* | -W?* )
  92. case $1 in
  93. *\'*) arg=`AS_ECHO(["$1"]) | sed "s/'/'\\\\\\\\''/g"` ;; #'
  94. *) arg=$1 ;;
  95. esac
  96. autom4te_options="$autom4te_options '$arg'"; shift ;;
  97. # Options with separated arg passed as is to autom4te.
  98. --include | -I | \
  99. --prepend-include | -B | \
  100. --warnings | -W )
  101. test $# = 1 && eval "$exit_missing_arg"
  102. case $2 in
  103. *\'*) arg=`AS_ECHO(["$2"]) | sed "s/'/'\\\\\\\\''/g"` ;; #'
  104. *) arg=$2 ;;
  105. esac
  106. autom4te_options="$autom4te_options $option '$arg'"
  107. shift; shift ;;
  108. --trace=* | -t?* )
  109. traces="$traces --trace='"`AS_ECHO(["$optarg"]) | sed "s/'/'\\\\\\\\''/g"`"'"
  110. shift ;;
  111. --trace | -t )
  112. test $# = 1 && eval "$exit_missing_arg"
  113. traces="$traces --trace='"`AS_ECHO(["$[2]"]) | sed "s/'/'\\\\\\\\''/g"`"'"
  114. shift; shift ;;
  115. --initialization | -i )
  116. autom4te_options="$autom4te_options --melt"
  117. shift;;
  118. --output=* | -o?* )
  119. outfile=$optarg
  120. shift ;;
  121. --output | -o )
  122. test $# = 1 && eval "$exit_missing_arg"
  123. outfile=$2
  124. shift; shift ;;
  125. -- ) # Stop option processing
  126. shift; break ;;
  127. - ) # Use stdin as input.
  128. break ;;
  129. -* )
  130. exec >&2
  131. AS_ERROR([invalid option `$[1]'$as_nl$help]) ;; #`
  132. * )
  133. break ;;
  134. esac
  135. done
  136. # Find the input file.
  137. case $# in
  138. 0)
  139. if test -f configure.ac; then
  140. if test -f configure.in; then
  141. AS_ECHO(["$as_me: warning: both \`configure.ac' and \`configure.in' are present."]) >&2
  142. AS_ECHO(["$as_me: warning: proceeding with \`configure.ac'."]) >&2
  143. fi
  144. infile=configure.ac
  145. elif test -f configure.in; then
  146. infile=configure.in
  147. else
  148. AS_ERROR([no input file])
  149. fi
  150. test -z "$traces" && test -z "$outfile" && outfile=configure;;
  151. 1)
  152. infile=$1 ;;
  153. *) exec >&2
  154. AS_ERROR([invalid number of arguments$as_nl$help]) ;;
  155. esac
  156. # Unless specified, the output is stdout.
  157. test -z "$outfile" && outfile=-
  158. # Run autom4te with expansion.
  159. eval set x "$autom4te_options" \
  160. --language=autoconf --output=\"\$outfile\" "$traces" \"\$infile\"
  161. shift
  162. $verbose && AS_ECHO(["$as_me: running $AUTOM4TE $*"]) >&2
  163. exec "$AUTOM4TE" "$@"