home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / gnu / lib / autoconf / acgeneral.m4 < prev    next >
Encoding:
M4 Source File  |  1994-12-23  |  59.5 KB  |  2,023 lines

  1. dnl Parameterized macros.
  2. dnl Requires GNU m4.
  3. dnl This file is part of Autoconf.
  4. dnl Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  5. dnl
  6. dnl This program is free software; you can redistribute it and/or modify
  7. dnl it under the terms of the GNU General Public License as published by
  8. dnl the Free Software Foundation; either version 2, or (at your option)
  9. dnl any later version.
  10. dnl
  11. dnl This program is distributed in the hope that it will be useful,
  12. dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14. dnl GNU General Public License for more details.
  15. dnl
  16. dnl You should have received a copy of the GNU General Public License
  17. dnl along with this program; if not, write to the Free Software
  18. dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. dnl
  20. dnl As a special exception, the Free Software Foundation gives unlimited
  21. dnl permission to copy, distribute and modify the configure scripts that
  22. dnl are the output of Autoconf.  You need not follow the terms of the GNU
  23. dnl General Public License when using or distributing such scripts, even
  24. dnl though portions of the text of Autoconf appear in them.  The GNU
  25. dnl General Public License (GPL) does govern all other use of the material
  26. dnl that constitutes the Autoconf program.
  27. dnl
  28. dnl Certain portions of the Autoconf source text are designed to be copied
  29. dnl (in certain cases, depending on the input) into the output of
  30. dnl Autoconf.  We call these the "data" portions.  The rest of the Autoconf
  31. dnl source text consists of comments plus executable code that decides which
  32. dnl of the data portions to output in any given case.  We call these
  33. dnl comments and executable code the "non-data" portions.  Autoconf never
  34. dnl copies any of the non-data portions into its output.
  35. dnl
  36. dnl This special exception to the GPL applies to versions of Autoconf
  37. dnl released by the Free Software Foundation.  When you make and
  38. dnl distribute a modified version of Autoconf, you may extend this special
  39. dnl exception to the GPL to apply to your modified version as well, *unless*
  40. dnl your modified version has the potential to copy into its output some
  41. dnl of the text that was the non-data portion of the version that you started
  42. dnl with.  (In other words, unless your change moves or copies text from
  43. dnl the non-data portions to the data portions.)  If your modification has
  44. dnl such potential, you must delete any notice of this special exception
  45. dnl to the GPL from your modified version.
  46. dnl
  47. dnl Written by David MacKenzie, with help from
  48. dnl Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
  49. dnl Roland McGrath, Noah Friedman, david d zuhn, and many others.
  50. dnl
  51. divert(-1)dnl Throw away output until AC_INIT is called.
  52. changequote([, ])
  53.  
  54. define(AC_ACVERSION, 2.1)
  55.  
  56. dnl Some old m4's don't support m4exit.  But they provide
  57. dnl equivalent functionality by core dumping because of the
  58. dnl long macros we define.
  59. ifdef([__gnu__], , [errprint(Autoconf requires GNU m4.
  60. Install it before installing Autoconf or set the
  61. M4 environment variable to its path name.
  62. )m4exit(2)])
  63.  
  64. undefine([eval])
  65. undefine([include])
  66. undefine([shift])
  67. undefine([format])
  68.  
  69.  
  70. dnl ### Defining macros
  71.  
  72.  
  73. dnl m4 output diversions.  We let m4 output them all in order at the end,
  74. dnl except that we explicitly undivert AC_DIVERSION_SED.
  75.  
  76. dnl AC_DIVERSION_NOTICE - 1 (= 0)    AC_REQUIRE'd #!/bin/sh line
  77. define(AC_DIVERSION_NOTICE, 1)dnl    copyright notice & option help strings
  78. define(AC_DIVERSION_INIT, 2)dnl        initialization code
  79. define(AC_DIVERSION_SED, 3)dnl        variable substitutions in config.status
  80. define(AC_DIVERSION_NORMAL_4, 4)dnl    AC_REQUIRE'd code, 4 level deep
  81. define(AC_DIVERSION_NORMAL_3, 5)dnl    AC_REQUIRE'd code, 3 level deep
  82. define(AC_DIVERSION_NORMAL_2, 6)dnl    AC_REQUIRE'd code, 2 level deep
  83. define(AC_DIVERSION_NORMAL_1, 7)dnl    AC_REQUIRE'd code, 1 level deep
  84. define(AC_DIVERSION_NORMAL, 8)dnl    the tests and output code
  85.  
  86. dnl Change the diversion stream to STREAM, while stacking old values.
  87. dnl AC_DIVERT_PUSH(STREAM)
  88. define(AC_DIVERT_PUSH,
  89. [pushdef([AC_DIVERSION_CURRENT], $1)dnl
  90. divert(AC_DIVERSION_CURRENT)dnl
  91. ])
  92.  
  93. dnl Change the diversion stream to its previous value, unstacking it.
  94. dnl AC_DIVERT_POP()
  95. define(AC_DIVERT_POP,
  96. [popdef([AC_DIVERSION_CURRENT])dnl
  97. divert(AC_DIVERSION_CURRENT)dnl
  98. ])
  99.  
  100. dnl Initialize the diversion setup.
  101. define([AC_DIVERSION_CURRENT], AC_DIVERSION_NORMAL)
  102. dnl This will be popped by AC_REQUIRE in AC_INIT.
  103. pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_NOTICE)
  104.  
  105. dnl The prologue for Autoconf macros.
  106. dnl AC_PRO(MACRO-NAME)
  107. define(AC_PRO,
  108. [define([AC_PROVIDE_$1], )dnl
  109. ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
  110. [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))],
  111. [pushdef([AC_DIVERSION_CURRENT], AC_DIVERSION_CURRENT)])dnl
  112. ])
  113.  
  114. dnl The Epilogue for Autoconf macros.
  115. dnl AC_EPI()
  116. define(AC_EPI,
  117. [AC_DIVERT_POP()dnl
  118. ifelse(AC_DIVERSION_CURRENT, AC_DIVERSION_NORMAL,
  119. [undivert(AC_DIVERSION_NORMAL_4)dnl
  120. undivert(AC_DIVERSION_NORMAL_3)dnl
  121. undivert(AC_DIVERSION_NORMAL_2)dnl
  122. undivert(AC_DIVERSION_NORMAL_1)dnl
  123. ])dnl
  124. ])
  125.  
  126. dnl Define a macro which automatically provides itself.  Add machinery
  127. dnl so the macro automatically switches expansion to the diversion
  128. dnl stack if it is not already using it.  In this case, once finished,
  129. dnl it will bring back all the code accumulated in the diversion stack.
  130. dnl This, combined with AC_REQUIRE, achieves the topological ordering of
  131. dnl macros.  We don't use this macro to define some frequently called
  132. dnl macros that are not involved in ordering constraints, to save m4
  133. dnl processing. 
  134. dnl AC_DEFUN(NAME, EXPANSION)
  135. define([AC_DEFUN],
  136. [define($1, [AC_PRO([$1])$2[]AC_EPI()])])
  137.  
  138.  
  139. dnl ### Initialization
  140.  
  141.  
  142. dnl AC_INIT_NOTICE()
  143. AC_DEFUN(AC_INIT_NOTICE,
  144. [# Guess values for system-dependent variables and create Makefiles.
  145. # Generated automatically using autoconf version] AC_ACVERSION [
  146. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  147. #
  148. # This configure script is free software; the Free Software Foundation
  149. # gives unlimited permission to copy, distribute and modify it.
  150.  
  151. # Defaults:
  152. ac_help=
  153. ac_default_prefix=/gnu
  154. [#] Any additions from configure.in:])
  155.  
  156. dnl AC_PREFIX_DEFAULT(PREFIX)
  157. AC_DEFUN(AC_PREFIX_DEFAULT,
  158. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
  159. ac_default_prefix=$1
  160. AC_DIVERT_POP()])
  161.  
  162. dnl AC_INIT_PARSE_ARGS()
  163. AC_DEFUN(AC_INIT_PARSE_ARGS,
  164. [
  165. # Initialize some variables set by options.
  166. # The variables have the same names as the options, with
  167. # dashes changed to underlines.
  168. build=NONE
  169. cache_file=./config.cache
  170. exec_prefix=NONE
  171. host=NONE
  172. no_create=
  173. nonopt=NONE
  174. no_recursion=
  175. prefix=NONE
  176. program_prefix=NONE
  177. program_suffix=NONE
  178. program_transform_name=s,x,x,
  179. silent=
  180. site=
  181. srcdir=
  182. target=NONE
  183. verbose=
  184. x_includes=NONE
  185. x_libraries=NONE
  186.  
  187. # Initialize some other variables.
  188. subdirs=
  189.  
  190. ac_prev=
  191. for ac_option
  192. do
  193.  
  194.   # If the previous option needs an argument, assign it.
  195.   if test -n "$ac_prev"; then
  196.     eval "$ac_prev=\$ac_option"
  197.     ac_prev=
  198.     continue
  199.   fi
  200.  
  201.   case "$ac_option" in
  202. changequote(, )dnl
  203.   -*=*) ac_optarg=`/bin/echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  204. changequote([, ])dnl
  205.   *) ac_optarg= ;;
  206.   esac
  207.  
  208.   # Accept the important Cygnus configure options, so we can diagnose typos.
  209.  
  210.   case "$ac_option" in
  211.  
  212.   -build | --build | --buil | --bui | --bu | --b)
  213.     ac_prev=build ;;
  214.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  215.     build="$ac_optarg" ;;
  216.  
  217.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  218.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  219.     ac_prev=cache_file ;;
  220.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  221.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  222.     cache_file="$ac_optarg" ;;
  223.  
  224.   -disable-* | --disable-*)
  225.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*disable-//'`
  226.     # Reject names that are not valid shell variable names.
  227. changequote(, )dnl
  228.     if test -n "`/bin/echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  229. changequote([, ])dnl
  230.       AC_MSG_ERROR($ac_feature: invalid feature name)
  231.     fi
  232.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  233.     eval "enable_${ac_feature}=no" ;;
  234.  
  235.   -enable-* | --enable-*)
  236.     ac_feature=`/bin/echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  237.     # Reject names that are not valid shell variable names.
  238. changequote(, )dnl
  239.     if test -n "`/bin/echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  240. changequote([, ])dnl
  241.       AC_MSG_ERROR($ac_feature: invalid feature name)
  242.     fi
  243.     ac_feature=`/bin/echo $ac_feature| sed 's/-/_/g'`
  244.     case "$ac_option" in
  245.       *=*) ;;
  246.       *) ac_optarg=yes ;;
  247.     esac
  248.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  249.  
  250.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  251.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  252.   | --exec | --exe | --ex)
  253.     ac_prev=exec_prefix ;;
  254.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  255.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  256.   | --exec=* | --exe=* | --ex=*)
  257.     exec_prefix="$ac_optarg" ;;
  258.  
  259.   -gas | --gas | --ga | --g)
  260.     # Obsolete; use --with-gas.
  261.     with_gas=yes ;;
  262.  
  263.   -help | --help | --hel | --he)
  264.     # Omit some internal or obsolete options to make the list less imposing.
  265.     # This message is too long to be a string in the A/UX 3.1 sh.
  266.     cat << EOF
  267. changequote(, )dnl
  268. Usage: configure [options] [host]
  269. Options: [defaults in brackets after descriptions]
  270. Configuration:
  271.   --cache-file=FILE       cache test results in FILE
  272.   --help                  print this message
  273.   --no-create             do not create output files
  274.   --quiet, --silent       do not print \`checking...' messages
  275.   --version               print the version of autoconf that created configure
  276. Directory and file names:
  277.   --prefix=PREFIX         install architecture-independent files in PREFIX
  278.                           [$ac_default_prefix]
  279.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  280.                           [same as prefix]
  281.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  282.   --program-prefix=PREFIX prepend PREFIX to installed program names
  283.   --program-suffix=SUFFIX append SUFFIX to installed program names
  284.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  285. Host type:
  286.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  287.   --host=HOST             configure for HOST [guessed]
  288.   --target=TARGET         configure for TARGET [TARGET=HOST]
  289. Features and packages:
  290.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  291.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  292.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  293.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  294.   --x-includes=DIR        X include files are in DIR
  295.   --x-libraries=DIR       X library files are in DIR
  296. --enable and --with options recognized:$ac_help
  297. changequote([, ])dnl
  298. EOF
  299.     exit 0 ;;
  300.  
  301.   -host | --host | --hos | --ho)
  302.     ac_prev=host ;;
  303.   -host=* | --host=* | --hos=* | --ho=*)
  304.     host="$ac_optarg" ;;
  305.  
  306.   -nfp | --nfp | --nf)
  307.     # Obsolete; use --without-fp.
  308.     with_fp=no ;;
  309.  
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c)
  312.     no_create=yes ;;
  313.  
  314.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  315.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  316.     no_recursion=yes ;;
  317.  
  318.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  319.     ac_prev=prefix ;;
  320.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  321.     prefix="$ac_optarg" ;;
  322.  
  323.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  324.   | --program-pre | --program-pr | --program-p)
  325.     ac_prev=program_prefix ;;
  326.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  327.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  328.     program_prefix="$ac_optarg" ;;
  329.  
  330.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  331.   | --program-suf | --program-su | --program-s)
  332.     ac_prev=program_suffix ;;
  333.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  334.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  335.     program_suffix="$ac_optarg" ;;
  336.  
  337.   -program-transform-name | --program-transform-name \
  338.   | --program-transform-nam | --program-transform-na \
  339.   | --program-transform-n | --program-transform- \
  340.   | --program-transform | --program-transfor \
  341.   | --program-transfo | --program-transf \
  342.   | --program-trans | --program-tran \
  343.   | --progr-tra | --program-tr | --program-t)
  344.     ac_prev=program_transform_name ;;
  345.   -program-transform-name=* | --program-transform-name=* \
  346.   | --program-transform-nam=* | --program-transform-na=* \
  347.   | --program-transform-n=* | --program-transform-=* \
  348.   | --program-transform=* | --program-transfor=* \
  349.   | --program-transfo=* | --program-transf=* \
  350.   | --program-trans=* | --program-tran=* \
  351.   | --progr-tra=* | --program-tr=* | --program-t=*)
  352.     program_transform_name="$ac_optarg" ;;
  353.  
  354.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  355.   | -silent | --silent | --silen | --sile | --sil)
  356.     silent=yes ;;
  357.  
  358.   -site | --site | --sit)
  359.     ac_prev=site ;;
  360.   -site=* | --site=* | --sit=*)
  361.     site="$ac_optarg" ;;
  362.  
  363.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  364.     ac_prev=srcdir ;;
  365.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  366.     srcdir="$ac_optarg" ;;
  367.  
  368.   -target | --target | --targe | --targ | --tar | --ta | --t)
  369.     ac_prev=target ;;
  370.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  371.     target="$ac_optarg" ;;
  372.  
  373.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  374.     verbose=yes ;;
  375.  
  376.   -version | --version | --versio | --versi | --vers)
  377.     echo "configure generated by autoconf version AC_ACVERSION"
  378.     exit 0 ;;
  379.  
  380.   -with-* | --with-*)
  381.     ac_package=`/bin/echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  382.     # Reject names that are not valid shell variable names.
  383. changequote(, )dnl
  384.     if test -n "`/bin/echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  385. changequote([, ])dnl
  386.       AC_MSG_ERROR($ac_package: invalid package name)
  387.     fi
  388.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  389.     case "$ac_option" in
  390.       *=*) ;;
  391.       *) ac_optarg=yes ;;
  392.     esac
  393.     eval "with_${ac_package}='$ac_optarg'" ;;
  394.  
  395.   -without-* | --without-*)
  396.     ac_package=`/bin/echo $ac_option|sed -e 's/-*without-//'`
  397.     # Reject names that are not valid shell variable names.
  398. changequote(, )dnl
  399.     if test -n "`/bin/echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  400. changequote([, ])dnl
  401.       AC_MSG_ERROR($ac_package: invalid package name)
  402.     fi
  403.     ac_package=`/bin/echo $ac_package| sed 's/-/_/g'`
  404.     eval "with_${ac_package}=no" ;;
  405.  
  406.   --x)
  407.     # Obsolete; use --with-x.
  408.     with_x=yes ;;
  409.  
  410.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  411.   | --x-incl | --x-inc | --x-in | --x-i)
  412.     ac_prev=x_includes ;;
  413.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  414.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  415.     x_includes="$ac_optarg" ;;
  416.  
  417.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  418.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  419.     ac_prev=x_libraries ;;
  420.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  421.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  422.     x_libraries="$ac_optarg" ;;
  423.  
  424.   -*) AC_MSG_ERROR([$ac_option: invalid option; use --help to show usage])
  425.     ;;
  426.  
  427.   *) 
  428. changequote(, )dnl
  429.     if test -n "`/bin/echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  430. changequote([, ])dnl
  431.       AC_MSG_WARN($ac_option: invalid host type)
  432.     fi
  433.     if test "x$nonopt" != xNONE; then
  434.       AC_MSG_ERROR(can only configure for one host and one target at a time)
  435.     fi
  436.     nonopt="$ac_option"
  437.     ;;
  438.  
  439.   esac
  440. done
  441.  
  442. if test -n "$ac_prev"; then
  443.   AC_MSG_ERROR(missing argument to --`/bin/echo $ac_prev | sed 's/_/-/g'`)
  444. fi
  445. ])
  446.  
  447. dnl Try to have only one #! line, so the script doesn't look funny
  448. dnl for users of AC_REVISION.
  449. dnl AC_INIT_BINSH()
  450. AC_DEFUN(AC_INIT_BINSH,
  451. [#!/bin/sh
  452. ])
  453.  
  454. dnl AC_INIT(UNIQUE-FILE-IN-SOURCE-DIR)
  455. AC_DEFUN(AC_INIT,
  456. [sinclude(acsite.m4)dnl
  457. sinclude(./aclocal.m4)dnl
  458. AC_REQUIRE([AC_INIT_BINSH])dnl
  459. AC_INIT_NOTICE
  460. AC_DIVERT_POP()dnl to NORMAL
  461. AC_DIVERT_PUSH(AC_DIVERSION_INIT)dnl
  462. AC_INIT_PARSE_ARGS
  463. AC_INIT_PREPARE($1)dnl
  464. AC_DIVERT_POP()dnl to NORMAL
  465. ])
  466.  
  467. dnl AC_INIT_PREPARE(UNIQUE-FILE-IN-SOURCE-DIR)
  468. AC_DEFUN(AC_INIT_PREPARE,
  469. [trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  470.  
  471. # File descriptor usage:
  472. # 0 unused; standard input
  473. # 1 file creation
  474. # 2 errors and warnings
  475. # 3 unused; some systems may open it to /dev/tty
  476. define(AC_FD_MSG, 4)dnl
  477. [#] AC_FD_MSG checking for... messages and results
  478. define(AC_FD_CC, 5)dnl
  479. [#] AC_FD_CC compiler messages saved in config.log
  480. if test "$silent" = yes; then
  481.   exec AC_FD_MSG>/dev/null
  482. else
  483.   exec AC_FD_MSG>&1
  484. fi
  485. exec AC_FD_CC>./config.log
  486.  
  487. echo "\
  488. This file contains any messages produced by compilers while
  489. running configure, to aid debugging if configure makes a mistake.
  490. " 1>&AC_FD_CC
  491.  
  492. # Strip out --no-create and --no-recursion so they do not pile up.
  493. # Also quote any args containing shell metacharacters.
  494. ac_configure_args=
  495. for ac_arg
  496. do
  497.   case "$ac_arg" in
  498.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  499.   | --no-cr | --no-c) ;;
  500.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  501.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  502. changequote(<<, >>)dnl
  503. dnl If you change this globbing pattern, test it on an old shell --
  504. dnl it's sensitive.  Putting any kind of quote in it causes syntax errors.
  505.   *" "*|*"    "*|*[\[\]\~\<<#>>\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  506.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  507. changequote([, ])dnl
  508.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  509.   esac
  510. done
  511.  
  512. # NLS nuisances.
  513. # Only set LANG and LC_ALL to C if already set.
  514. # These must not be set unconditionally because not all systems understand
  515. # e.g. LANG=C (notably SCO).
  516. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  517. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  518.  
  519. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  520. rm -rf conftest* confdefs.h
  521. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  522. /bin/echo > confdefs.h
  523.  
  524. # A filename unique to this package, relative to the directory that
  525. # configure is in, which we can look for to find out if srcdir is correct.
  526. ac_unique_file=$1
  527.  
  528. # Find the source files, if location was not specified.
  529. if test -z "$srcdir"; then
  530.   ac_srcdir_defaulted=yes
  531.   # Try the directory containing this script, then its parent.
  532.   ac_prog=[$]0
  533. changequote(, )dnl
  534.   ac_confdir=`/bin/echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  535. changequote([, ])dnl
  536.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  537.   srcdir=$ac_confdir
  538.   if test ! -r $srcdir/$ac_unique_file; then
  539.     srcdir=..
  540.   fi
  541. else
  542.   ac_srcdir_defaulted=no
  543. fi
  544. if test ! -r $srcdir/$ac_unique_file; then
  545.   if test "$ac_srcdir_defaulted" = yes; then
  546.     AC_MSG_ERROR(can not find sources in $ac_confdir or ..)
  547.   else
  548.     AC_MSG_ERROR(can not find sources in $srcdir)
  549.   fi
  550. fi
  551. dnl Double slashes in pathnames in object file debugging info
  552. dnl mess up M-x gdb in Emacs.
  553. changequote(, )dnl
  554. srcdir=`/bin/echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  555. changequote([, ])dnl
  556.  
  557. dnl Let the site file select an alternate cache file if it wants to.
  558. AC_SITE_LOAD
  559. AC_CACHE_LOAD
  560. AC_LANG_C
  561. AC_PROG_ECHO_N
  562. dnl Substitute for predefined variables.
  563. AC_SUBST(CFLAGS)dnl
  564. AC_SUBST(CPPFLAGS)dnl
  565. AC_SUBST(CXXFLAGS)dnl
  566. AC_SUBST(DEFS)dnl
  567. AC_SUBST(LDFLAGS)dnl
  568. AC_SUBST(LIBS)dnl
  569. AC_SUBST(exec_prefix)dnl
  570. AC_SUBST(prefix)dnl
  571. AC_SUBST(program_transform_name)dnl
  572. ])
  573.  
  574.  
  575. dnl ### Selecting optional features
  576.  
  577.  
  578. dnl AC_ARG_ENABLE(FEATURE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
  579. AC_DEFUN(AC_ARG_ENABLE,
  580. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
  581. ac_help="$ac_help
  582. [$2]"
  583. AC_DIVERT_POP()dnl
  584. [#] Check whether --enable-$1 or --disable-$1 was given.
  585. enableval="[$enable_]patsubst($1, -, _)"
  586. if test -n "$enableval"; then
  587.   ifelse([$3], , :, [$3])
  588. ifelse([$4], , , [else
  589.   $4
  590. ])dnl
  591. fi
  592. ])
  593.  
  594. AC_DEFUN(AC_ENABLE,
  595. [AC_OBSOLETE([$0], [; instead use AC_ARG_ENABLE])dnl
  596. AC_ARG_ENABLE([$1], [  --enable-$1], [$2], [$3])dnl
  597. ])
  598.  
  599.  
  600. dnl ### Working with optional software
  601.  
  602.  
  603. dnl AC_ARG_WITH(PACKAGE, HELP-STRING, ACTION-IF-TRUE [, ACTION-IF-FALSE])
  604. AC_DEFUN(AC_ARG_WITH,
  605. [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)dnl
  606. ac_help="$ac_help
  607. [$2]"
  608. AC_DIVERT_POP()dnl
  609. [#] Check whether --with-$1 or --without-$1 was given.
  610. withval="[$with_]patsubst($1, -, _)"
  611. if test -n "$withval"; then
  612.   ifelse([$3], , :, [$3])
  613. ifelse([$4], , , [else
  614.   $4
  615. ])dnl
  616. fi
  617. ])
  618.  
  619. AC_DEFUN(AC_WITH,
  620. [AC_OBSOLETE([$0], [; instead use AC_ARG_WITH])dnl
  621. AC_ARG_WITH([$1], [  --with-$1], [$2], [$3])dnl
  622. ])
  623.  
  624.  
  625. dnl ### Transforming program names.
  626.  
  627.  
  628. dnl AC_ARG_PROGRAM()
  629. AC_DEFUN(AC_ARG_PROGRAM,
  630. [if test "$program_transform_name" = s,x,x,; then
  631.   program_transform_name=
  632. else
  633.   # Double any \ or $.
  634.   echo 's,\\,\\\\,g; s,\$,$$,g' > conftestsed
  635.   program_transform_name="`/bin/echo $program_transform_name|sed -f conftestsed`"
  636.   rm -f conftestsed
  637. fi
  638. test "$program_prefix" != NONE &&
  639.   program_transform_name="s,^,${program_prefix},; $program_transform_name"
  640. # Use a double $ so make ignores it.
  641. test "$program_suffix" != NONE &&
  642.   program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
  643.  
  644. # sed with no file args requires a program.
  645. test "$program_transform_name" = "" && program_transform_name="s,x,x,"
  646. ])
  647.  
  648.  
  649. dnl ### Version numbers
  650.  
  651.  
  652. dnl AC_REVISION(REVISION-INFO)
  653. AC_DEFUN(AC_REVISION,
  654. [AC_REQUIRE([AC_INIT_BINSH])dnl
  655. [# From configure.in] translit([$1], $")])
  656.  
  657. dnl Subroutines of AC_PREREQ.
  658.  
  659. dnl Change the dots in NUMBER into commas.
  660. dnl AC_PREREQ_SPLIT(NUMBER)
  661. define(AC_PREREQ_SPLIT,
  662. [translit($1, ., [, ])])
  663.  
  664. dnl Default the ternary version number to 0 (e.g., 1, 7 -> 1, 7, 0).
  665. dnl AC_PREREQ_CANON(MAJOR, MINOR [,TERNARY])
  666. define(AC_PREREQ_CANON,
  667. [$1, $2, ifelse([$3], , 0, [$3])])
  668.  
  669. dnl Complain and exit if version number 1 is less than version number 2.
  670. dnl PRINTABLE2 is the printable version of version number 2.
  671. dnl AC_PREREQ_COMPARE(MAJOR1, MINOR1, TERNARY1, MAJOR2, MINOR2, TERNARY2,
  672. dnl                   PRINTABLE2)
  673. define(AC_PREREQ_COMPARE,
  674. [ifelse(builtin([eval],
  675. [$3 + $2 * 1000 + $1 * 1000000 < $6 + $5 * 1000 + $4 * 1000000]), 1,
  676. [errprint(Autoconf version $7 or higher is required for this script
  677. )m4exit(3)])])
  678.  
  679. dnl Complain and exit if the Autoconf version is less than VERSION.
  680. dnl AC_PREREQ(VERSION)
  681. define(AC_PREREQ,
  682. [AC_PREREQ_COMPARE(AC_PREREQ_CANON(AC_PREREQ_SPLIT(AC_ACVERSION)),
  683. AC_PREREQ_CANON(AC_PREREQ_SPLIT([$1])), [$1])])
  684.  
  685.  
  686. dnl ### Getting the canonical system type
  687.  
  688.  
  689. dnl Find install-sh, config.sub, config.guess, and Cygnus configure
  690. dnl in directory DIR.  These are auxiliary files used in configuration.
  691. dnl DIR can be either absolute or relative to $srcdir.
  692. dnl AC_CONFIG_AUX_DIR(DIR)
  693. AC_DEFUN(AC_CONFIG_AUX_DIR,
  694. [AC_CONFIG_AUX_DIRS($1 $srcdir/$1)])
  695.  
  696. dnl The default is `$srcdir' or `$srcdir/..' or `$srcdir/../..'.
  697. dnl There's no need to call this macro explicitly; just AC_REQUIRE it.
  698. AC_DEFUN(AC_CONFIG_AUX_DIR_DEFAULT,
  699. [AC_CONFIG_AUX_DIRS($srcdir $srcdir/.. $srcdir/../..)])
  700.  
  701. dnl Internal subroutine.
  702. dnl Search for the configuration auxiliary files in directory list $1.
  703. dnl We look only for install-sh, so users of AC_PROG_INSTALL
  704. dnl do not automatically need to distribute the other auxiliary files.
  705. dnl AC_CONFIG_AUX_DIRS(DIR ...)
  706. AC_DEFUN(AC_CONFIG_AUX_DIRS,
  707. [ac_aux_dir=
  708. for ac_dir in $1; do
  709.   if test -f $ac_dir/install-sh; then
  710.     ac_aux_dir=$ac_dir
  711.     ac_install_sh="$ac_aux_dir/install-sh -c"
  712.     break
  713.   elif test -f $ac_dir/install.sh; then
  714.     ac_aux_dir=$ac_dir
  715.     ac_install_sh="$ac_aux_dir/install.sh -c"
  716.     break
  717.   fi
  718. done
  719. if test -z "$ac_aux_dir"; then
  720.   AC_MSG_ERROR([can not find install-sh or install.sh in $1])
  721. fi
  722. ac_config_guess=$ac_aux_dir/config.guess
  723. ac_config_sub=$ac_aux_dir/config.sub
  724. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  725. AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  726. ])
  727.  
  728. dnl Canonicalize the host, target, and build system types.
  729. AC_DEFUN(AC_CANONICAL_SYSTEM,
  730. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  731. AC_BEFORE([$0], [AC_ARG_PROGRAM])
  732. # Do some error checking and defaulting for the host and target type.
  733. # The inputs are:
  734. #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
  735. #
  736. # The rules are:
  737. # 1. You are not allowed to specify --host, --target, and nonopt at the
  738. #    same time. 
  739. # 2. Host defaults to nonopt.
  740. # 3. If nonopt is not specified, then host defaults to the current host,
  741. #    as determined by config.guess.
  742. # 4. Target and build default to nonopt.
  743. # 5. If nonopt is not specified, then target and build default to host.
  744.  
  745. # The aliases save the names the user supplied, while $host etc.
  746. # will get canonicalized.
  747. case $host---$target---$nonopt in
  748. NONE---*---* | *---NONE---* | *---*---NONE) ;;
  749. *) AC_MSG_ERROR(can only configure for one host and one target at a time) ;;
  750. esac
  751.  
  752. AC_CANONICAL_HOST
  753. AC_CANONICAL_TARGET
  754. AC_CANONICAL_BUILD
  755. test "$host_alias" != "$target_alias" &&
  756.   test "$program_prefix$program_suffix$program_transform_name" = \
  757.     NONENONEs,x,x, && program_prefix=${target_alias}-
  758. ])
  759.  
  760. dnl Subroutines of AC_CANONICAL_SYSTEM.
  761.  
  762. AC_DEFUN(AC_CANONICAL_HOST,
  763. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  764.  
  765. # Make sure we can run config.sub.
  766. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  767. else AC_MSG_ERROR(can not run $ac_config_sub)
  768. fi
  769.  
  770. AC_MSG_CHECKING(host system type)
  771.  
  772. host_alias=$host
  773. case "$host_alias" in
  774. NONE)
  775.   case $nonopt in
  776.   NONE)
  777.     if host_alias=`$ac_config_guess`; then :
  778.     else AC_MSG_ERROR(can not guess host type; you must specify one)
  779.     fi ;;
  780.   *) host_alias=$nonopt ;;
  781.   esac ;;
  782. esac
  783.  
  784. host=`$ac_config_sub $host_alias`
  785. host_cpu=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  786. host_vendor=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  787. host_os=`/bin/echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  788. AC_MSG_RESULT($host)
  789. AC_SUBST(host)dnl
  790. AC_SUBST(host_alias)dnl
  791. AC_SUBST(host_cpu)dnl
  792. AC_SUBST(host_vendor)dnl
  793. AC_SUBST(host_os)dnl
  794. ])
  795.  
  796. dnl Internal use only.
  797. AC_DEFUN(AC_CANONICAL_TARGET,
  798. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  799. AC_MSG_CHECKING(target system type)
  800.  
  801. target_alias=$target
  802. case "$target_alias" in
  803. NONE)
  804.   case $nonopt in
  805.   NONE) target_alias=$host_alias ;;
  806.   *) target_alias=$nonopt ;;
  807.   esac ;;
  808. esac
  809.  
  810. target=`$ac_config_sub $target_alias`
  811. target_cpu=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  812. target_vendor=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  813. target_os=`/bin/echo $target | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  814. AC_MSG_RESULT($target)
  815. AC_SUBST(target)dnl
  816. AC_SUBST(target_alias)dnl
  817. AC_SUBST(target_cpu)dnl
  818. AC_SUBST(target_vendor)dnl
  819. AC_SUBST(target_os)dnl
  820. ])
  821.  
  822. dnl Internal use only.
  823. AC_DEFUN(AC_CANONICAL_BUILD,
  824. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  825. AC_MSG_CHECKING(build system type)
  826.  
  827. build_alias=$build
  828. case "$build_alias" in
  829. NONE)
  830.   case $nonopt in
  831.   NONE) build_alias=$host_alias ;;
  832.   *) build_alias=$nonopt ;;
  833.   esac ;;
  834. esac
  835.  
  836. build=`$ac_config_sub $build_alias`
  837. build_cpu=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  838. build_vendor=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  839. build_os=`/bin/echo $build | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  840. AC_MSG_RESULT($build)
  841. AC_SUBST(build)dnl
  842. AC_SUBST(build_alias)dnl
  843. AC_SUBST(build_cpu)dnl
  844. AC_SUBST(build_vendor)dnl
  845. AC_SUBST(build_os)dnl
  846. ])
  847.  
  848.  
  849. dnl ### Caching test results
  850.  
  851.  
  852. dnl Look for site or system specific initialization scripts.
  853. dnl AC_SITE_LOAD()
  854. define(AC_SITE_LOAD,
  855. [# Prefer explicitly selected file to automatically selected ones.
  856. if test -z "$CONFIG_SITE"; then
  857.   if test "x$prefix" != xNONE; then
  858.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  859.   else
  860.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  861.   fi
  862. fi
  863. for ac_site_file in $CONFIG_SITE; do
  864.   if test -r "$ac_site_file"; then
  865.     echo "loading site script $ac_site_file"
  866.     . "$ac_site_file"
  867.   fi
  868. done
  869. ])
  870.  
  871. dnl AC_CACHE_LOAD()
  872. define(AC_CACHE_LOAD,
  873. [if test -r "$cache_file"; then
  874.   echo "loading cache $cache_file"
  875.   . $cache_file
  876. else
  877.   echo "creating cache $cache_file"
  878.   > $cache_file
  879. fi
  880. ])
  881.  
  882. dnl AC_CACHE_SAVE()
  883. define(AC_CACHE_SAVE,
  884. [if test -w $cache_file; then
  885. echo "updating cache $cache_file"
  886. cat > $cache_file <<\EOF
  887. # This file is a shell script that caches the results of configure
  888. # tests run on this system so they can be shared between configure
  889. # scripts and configure runs.  It is not useful on other systems.
  890. # If it contains results you don't want to keep, you may remove or edit it.
  891. #
  892. # By default, configure uses ./config.cache as the cache file,
  893. # creating it if it does not exist already.  You can give configure
  894. # the --cache-file=FILE option to use a different cache file; that is
  895. # what configure does when it calls configure scripts in
  896. # subdirectories, so they share the cache.
  897. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  898. # config.status only pays attention to the cache file if you give it the
  899. # --recheck option to rerun configure.
  900. #
  901. EOF
  902. changequote(, )dnl
  903. dnl Allow a site initialization script to override cache values.
  904. # Ultrix sh set writes to stderr and can't be redirected directly.
  905. (set) 2>&1 |
  906.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/: \${\1='\2'}/p" \
  907.   >> $cache_file
  908. changequote([, ])dnl
  909. else
  910. echo "not updating unwritable cache $cache_file"
  911. fi
  912. ])
  913.  
  914. dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
  915. dnl AC_CACHE_VAL(CACHE-ID, COMMANDS-TO-SET-IT)
  916. define(AC_CACHE_VAL,
  917. [dnl We used to use the below line, but it fails if the 1st arg is a
  918. dnl shell variable, so we need the eval.
  919. dnl if test "${$1+set}" = set; then
  920. if eval "test \"`echo '${'$1'+set}'`\" = set"; then
  921.   /bin/echo $ac_n "(cached) $ac_c" 1>&AC_FD_MSG
  922. else
  923.   $2
  924. fi
  925. ])
  926.  
  927.  
  928. dnl ### Defining symbols
  929.  
  930.  
  931. dnl Set VARIABLE to VALUE, verbatim, or 1.
  932. dnl AC_DEFINE(VARIABLE [, VALUE])
  933. define(AC_DEFINE,
  934. [cat >> confdefs.h <<\EOF
  935. [#define] $1 ifelse($#, 2, [$2], 1)
  936. EOF
  937. ])
  938.  
  939. dnl Similar, but perform shell substitutions $ ` \ once on VALUE.
  940. define(AC_DEFINE_UNQUOTED,
  941. [cat >> confdefs.h <<EOF
  942. [#define] $1 ifelse($#, 2, [$2], 1)
  943. EOF
  944. ])
  945.  
  946.  
  947. dnl ### Setting output variables
  948.  
  949.  
  950. dnl This macro protects VARIABLE from being diverted twice
  951. dnl if this macro is called twice for it.
  952. dnl AC_SUBST(VARIABLE)
  953. define(AC_SUBST,
  954. [ifdef([AC_SUBST_$1], ,
  955. [define([AC_SUBST_$1], )dnl
  956. AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
  957. s%@$1@%[$]$1%g
  958. AC_DIVERT_POP()dnl
  959. ])])
  960.  
  961. dnl AC_SUBST_FILE(VARIABLE)
  962. define(AC_SUBST_FILE,
  963. [ifdef([AC_SUBST_$1], ,
  964. [define([AC_SUBST_$1], )dnl
  965. AC_DIVERT_PUSH(AC_DIVERSION_SED)dnl
  966. /@$1@/r [$]$1
  967. s%@$1@%%g
  968. AC_DIVERT_POP()dnl
  969. ])])
  970.  
  971.  
  972. dnl ### Printing messages
  973.  
  974.  
  975. dnl AC_MSG_CHECKING(FEATURE-DESCRIPTION)
  976. define(AC_MSG_CHECKING,
  977. [/bin/echo $ac_n "checking $1""... $ac_c" 1>&AC_FD_MSG])
  978.  
  979. dnl AC_CHECKING(FEATURE-DESCRIPTION)
  980. define(AC_CHECKING,
  981. [echo "checking $1" 1>&AC_FD_MSG])
  982.  
  983. dnl AC_MSG_RESULT(RESULT-DESCRIPTION)
  984. define(AC_MSG_RESULT,
  985. [/bin/echo "$ac_t""$1" 1>&AC_FD_MSG])
  986.  
  987. dnl AC_VERBOSE(RESULT-DESCRIPTION)
  988. define(AC_VERBOSE,
  989. [AC_OBSOLETE([$0], [; instead use AC_MSG_RESULT])dnl
  990. echo "    $1" 1>&AC_FD_MSG])
  991.  
  992. dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
  993. define(AC_MSG_WARN,
  994. [echo "configure: warning: $1" 1>&2])
  995.  
  996. dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
  997. define(AC_MSG_ERROR,
  998. [{ echo "configure: error: $1" 1>&2; exit 1; }])
  999.  
  1000.  
  1001. dnl ### Selecting which language to use for testing
  1002.  
  1003.  
  1004. dnl AC_LANG_C()
  1005. AC_DEFUN(AC_LANG_C,
  1006. [define([AC_LANG], [C])dnl
  1007. ac_ext=c
  1008. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1009. ac_cpp='$CPP $CPPFLAGS'
  1010. ac_compile='${CC-cc} $CFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC'
  1011. ac_link='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
  1012. ])
  1013.  
  1014. dnl AC_LANG_CPLUSPLUS()
  1015. AC_DEFUN(AC_LANG_CPLUSPLUS,
  1016. [define([AC_LANG], [CPLUSPLUS])dnl
  1017. ac_ext=C
  1018. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  1019. ac_cpp='$CXXCPP $CPPFLAGS'
  1020. ac_compile='${CXX-g++} $CXXFLAGS $CPPFLAGS conftest.$ac_ext -c 1>&AC_FD_CC 2>&AC_FD_CC'
  1021. ac_link='${CXX-g++} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext -o conftest $LIBS 1>&AC_FD_CC 2>&AC_FD_CC'
  1022. ])
  1023.  
  1024. dnl Push the current language on a stack.
  1025. dnl AC_LANG_SAVE()
  1026. define(AC_LANG_SAVE,
  1027. [pushdef([AC_LANG_STACK], AC_LANG)])
  1028.  
  1029. dnl Restore the current language from the stack.
  1030. dnl AC_LANG_RESTORE()
  1031. define(AC_LANG_RESTORE,
  1032. [ifelse(AC_LANG_STACK, C, [ifelse(AC_LANG, C, , [AC_LANG_C])], [ifelse(AC_LANG, CPLUSPLUS, , [AC_LANG_CPLUSPLUS])])[]popdef([AC_LANG_STACK])])
  1033.  
  1034.  
  1035. dnl ### Dependencies between macros
  1036.  
  1037.  
  1038. dnl AC_BEFORE(THIS-MACRO-NAME, CALLED-MACRO-NAME)
  1039. define(AC_BEFORE,
  1040. [ifdef([AC_PROVIDE_$2], [errprint(__file__:__line__: [$2 was called before $1
  1041. ])])])
  1042.  
  1043. dnl AC_REQUIRE(MACRO-NAME)
  1044. define(AC_REQUIRE,
  1045. [ifdef([AC_PROVIDE_$1], ,
  1046. [AC_DIVERT_PUSH(builtin(eval, AC_DIVERSION_CURRENT - 1))dnl
  1047. indir([$1])
  1048. AC_DIVERT_POP()dnl
  1049. ])])
  1050.  
  1051. dnl AC_PROVIDE(MACRO-NAME)
  1052. define(AC_PROVIDE,
  1053. [define([AC_PROVIDE_$1], )])
  1054.  
  1055. dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
  1056. define(AC_OBSOLETE,
  1057. [errprint(__file__:__line__: warning: [$1] is obsolete[$2]
  1058. )])
  1059.  
  1060.  
  1061. dnl ### Checking for programs
  1062.  
  1063.  
  1064. dnl AC_CHECK_PROG(VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND
  1065. dnl               [, VALUE-IF-NOT-FOUND])
  1066. AC_DEFUN(AC_CHECK_PROG,
  1067. [# Extract the first word of "$2", so it can be a program name with args.
  1068. set dummy $2; ac_word=[$]2
  1069. AC_MSG_CHECKING([for $ac_word])
  1070. AC_CACHE_VAL(ac_cv_prog_$1,
  1071. [if test -n "[$]$1"; then
  1072.   ac_cv_prog_$1="[$]$1" # Let the user override the test.
  1073. else
  1074.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1075.   for ac_dir in $PATH; do
  1076.     test -z "$ac_dir" && ac_dir=.
  1077.     if test -f $ac_dir/$ac_word; then
  1078.       ac_cv_prog_$1="$3"
  1079.       break
  1080.     fi
  1081.   done
  1082.   IFS="$ac_save_ifs"
  1083. dnl If no 4th arg is given, leave the cache variable unset,
  1084. dnl so AC_CHECK_PROGS will keep looking.
  1085. ifelse([$4], , , [  test -z "[$]ac_cv_prog_$1" && ac_cv_prog_$1="$4"
  1086. ])dnl
  1087. fi])dnl
  1088. $1="$ac_cv_prog_$1"
  1089. if test -n "[$]$1"; then
  1090.   AC_MSG_RESULT([$]$1)
  1091. else
  1092.   AC_MSG_RESULT(no)
  1093. fi
  1094. AC_SUBST($1)dnl
  1095. ])
  1096.  
  1097. dnl AC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
  1098. AC_DEFUN(AC_PATH_PROG,
  1099. [# Extract the first word of "$2", so it can be a program name with args.
  1100. set dummy $2; ac_word=[$]2
  1101. AC_MSG_CHECKING([for $ac_word])
  1102. AC_CACHE_VAL(ac_cv_path_$1,
  1103. [case "[$]$1" in
  1104.   /*)
  1105.   ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
  1106.   ;;
  1107.   *)
  1108.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  1109.   for ac_dir in $PATH; do
  1110.     test -z "$ac_dir" && ac_dir=.
  1111.     if test -f $ac_dir/$ac_word; then
  1112.       ac_cv_path_$1="$ac_dir/$ac_word"
  1113.       break
  1114.     fi
  1115.   done
  1116.   IFS="$ac_save_ifs"
  1117. dnl If no 3rd arg is given, leave the cache variable unset,
  1118. dnl so AC_PATH_PROGS will keep looking.
  1119. ifelse([$3], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$3"
  1120. ])dnl
  1121.   ;;
  1122. esac])dnl
  1123. $1="$ac_cv_path_$1"
  1124. if test -n "[$]$1"; then
  1125.   AC_MSG_RESULT([$]$1)
  1126. else
  1127.   AC_MSG_RESULT(no)
  1128. fi
  1129. AC_SUBST($1)dnl
  1130. ])
  1131.  
  1132. dnl AC_CHECK_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
  1133. AC_DEFUN(AC_CHECK_PROGS,
  1134. [for ac_prog in $2
  1135. do
  1136. AC_CHECK_PROG($1, [$]ac_prog, [$]ac_prog, )
  1137. test -n "[$]$1" && break
  1138. done
  1139. ifelse([$3], , , [test -n "[$]$1" || $1="$3"
  1140. ])])
  1141.  
  1142. dnl AC_PATH_PROGS(VARIABLE, PROGS-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND])
  1143. AC_DEFUN(AC_PATH_PROGS,
  1144. [for ac_prog in $2
  1145. do
  1146. AC_PATH_PROG($1, [$]ac_prog)
  1147. test -n "[$]$1" && break
  1148. done
  1149. ifelse([$3], , , [test -n "[$]$1" || $1="$3"
  1150. ])])
  1151.  
  1152. dnl Guess the value for the `prefix' variable by looking for
  1153. dnl the argument program along PATH and taking its parent.
  1154. dnl Example: if the argument is `gcc' and we find /usr/local/gnu/bin/gcc,
  1155. dnl set `prefix' to /usr/local/gnu.
  1156. dnl This comes too late to find a site file based on the prefix,
  1157. dnl and it might use a cached value for the path.
  1158. dnl No big loss, I think, since most configures don't use this macro anyway.
  1159. dnl AC_PREFIX_PROGRAM(PROGRAM)
  1160. AC_DEFUN(AC_PREFIX_PROGRAM,
  1161. [if test "x$prefix" = xNONE; then
  1162. changequote(<<, >>)dnl
  1163. define(<<AC_VAR_NAME>>, translit($1, [a-z], [A-Z]))dnl
  1164. changequote([, ])dnl
  1165. AC_PATH_PROG(AC_VAR_NAME, $1)
  1166. changequote(<<, >>)dnl
  1167.   if test -n "$ac_cv_path_<<>>AC_VAR_NAME"; then
  1168.     prefix=`/bin/echo $ac_cv_path_<<>>AC_VAR_NAME|sed 's%/[^/][^/]*/[^/][^/]*$%%'`
  1169. changequote([, ])dnl
  1170.   fi
  1171. fi
  1172. undefine([AC_VAR_NAME])dnl
  1173. ])
  1174.  
  1175.  
  1176. dnl ### Checking for libraries
  1177.  
  1178.  
  1179. dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
  1180. dnl              [, OTHER-LIBRARIES]]])
  1181. AC_DEFUN(AC_CHECK_LIB,
  1182. [AC_MSG_CHECKING([for -l$1])
  1183. AC_CACHE_VAL(ac_cv_lib_$1,
  1184. [ac_save_LIBS="$LIBS"
  1185. LIBS="$LIBS -l$1 $5"
  1186. AC_TRY_LINK(, [$2()], eval "ac_cv_lib_$1=yes", eval "ac_cv_lib_$1=no")dnl
  1187. LIBS="$ac_save_LIBS"
  1188. ])dnl
  1189. if eval "test \"`echo '$ac_cv_lib_'$1`\" = yes"; then
  1190.   AC_MSG_RESULT(yes)
  1191.   ifelse([$3], , 
  1192. [changequote(, )dnl
  1193.   ac_tr_lib=HAVE_LIB`/bin/echo $1 | tr '[a-z]' '[A-Z]'`
  1194. changequote([, ])dnl
  1195.   AC_DEFINE_UNQUOTED($ac_tr_lib)
  1196.   LIBS="$LIBS -l$1"
  1197. ], [$3])
  1198. else
  1199.   AC_MSG_RESULT(no)
  1200. ifelse([$4], , , [$4
  1201. ])dnl
  1202. fi
  1203. ])
  1204.  
  1205. dnl AC_HAVE_LIBRARY(LIBRARY, [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
  1206. dnl                 [, OTHER-LIBRARIES]]])
  1207. AC_DEFUN(AC_HAVE_LIBRARY,
  1208. [AC_OBSOLETE([$0], [; instead use AC_CHECK_LIB])dnl
  1209. changequote(<<, >>)dnl
  1210. define(<<AC_LIB_NAME>>, dnl
  1211. patsubst(patsubst($1, <<lib\([^\.]*\)\.a>>, <<\1>>), <<-l>>, <<>>))dnl
  1212. define(<<AC_CV_NAME>>, ac_cv_lib_<<>>AC_LIB_NAME)dnl
  1213. changequote([, ])dnl
  1214. AC_MSG_CHECKING([for -l[]AC_LIB_NAME])
  1215. AC_CACHE_VAL(AC_CV_NAME,
  1216. [ac_save_LIBS="$LIBS"
  1217. LIBS="$LIBS -l[]AC_LIB_NAME[] $4"
  1218. AC_TRY_LINK( , [main()], AC_CV_NAME=yes, AC_CV_NAME=no)dnl
  1219. LIBS="$ac_save_LIBS"
  1220. ])dnl
  1221. AC_MSG_RESULT($AC_CV_NAME)
  1222. if test "$AC_CV_NAME" = yes; then
  1223.   ifelse([$2], , 
  1224. [AC_DEFINE([HAVE_LIB]translit(AC_LIB_NAME, [a-z], [A-Z]))
  1225.   LIBS="$LIBS -l[]AC_LIB_NAME[]"
  1226. ], [$2])
  1227. ifelse([$3], , , [else
  1228.   $3
  1229. ])dnl
  1230. fi
  1231. undefine([AC_LIB_NAME])dnl
  1232. undefine([AC_CV_NAME])dnl
  1233. ])
  1234.  
  1235.  
  1236. dnl ### Examining declarations
  1237.  
  1238.  
  1239. dnl AC_TRY_CPP(INCLUDES, ACTION-IF-TRUE [, ACTION-IF-FALSE])
  1240. AC_DEFUN(AC_TRY_CPP,
  1241. [AC_REQUIRE_CPP()dnl
  1242. cat > conftest.$ac_ext <<EOF
  1243. [#]line __oline__ "configure"
  1244. #include "confdefs.h"
  1245. [$1]
  1246. EOF
  1247. dnl Capture the stderr of cpp.  eval is necessary to expand ac_cpp.
  1248. dnl We used to copy stderr to stdout and capture it in a variable, but
  1249. dnl that breaks under sh -x, which writes compile commands starting
  1250. dnl with ` +' to stderr in eval and subshells.
  1251. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1252. ac_err=`grep -v '^ *+' conftest.out`
  1253. if test -z "$ac_err"; then
  1254.   ifelse([$2], , :, [rm -rf conftest*
  1255.   $2])
  1256. else
  1257.   /bin/echo "$ac_err" >&AC_FD_CC
  1258. ifelse([$3], , , [  rm -rf conftest*
  1259.   $3
  1260. ])dnl
  1261. fi
  1262. rm -f conftest*])
  1263.  
  1264. dnl AC_EGREP_HEADER(PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
  1265. dnl                 ACTION-IF-NOT-FOUND])
  1266. AC_DEFUN(AC_EGREP_HEADER,
  1267. [AC_EGREP_CPP([$1], [#include <$2>], [$3], [$4])])
  1268.  
  1269. dnl Because this macro is used by AC_PROG_GCC_TRADITIONAL, which must
  1270. dnl come early, it is not included in AC_BEFORE checks.
  1271. dnl AC_EGREP_CPP(PATTERN, PROGRAM, ACTION-IF-FOUND [,
  1272. dnl              ACTION-IF-NOT-FOUND])
  1273. AC_DEFUN(AC_EGREP_CPP,
  1274. [AC_REQUIRE_CPP()dnl
  1275. cat > conftest.$ac_ext <<EOF
  1276. [#]line __oline__ "configure"
  1277. #include "confdefs.h"
  1278. [$2]
  1279. EOF
  1280. dnl eval is necessary to expand ac_cpp.
  1281. dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
  1282. if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
  1283.   egrep "$1" >/dev/null 2>&1; then
  1284.   ifelse([$3], , :, [rm -rf conftest*
  1285.   $3])
  1286. ifelse([$4], , , [else
  1287.   rm -rf conftest*
  1288.   $4
  1289. ])dnl
  1290. fi
  1291. rm -f conftest*
  1292. ])
  1293.  
  1294.  
  1295. dnl ### Examining syntax
  1296.  
  1297.  
  1298. dnl AC_TRY_COMPILE(INCLUDES, FUNCTION-BODY,
  1299. dnl             ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  1300. AC_DEFUN(AC_TRY_COMPILE,
  1301. [cat > conftest.$ac_ext <<EOF
  1302. dnl This sometimes fails to find confdefs.h, for some reason.
  1303. dnl [#]line __oline__ "[$]0"
  1304. [#]line __oline__ "configure"
  1305. #include "confdefs.h"
  1306. [$1]
  1307. int main() { return 0; }
  1308. int t() {
  1309. [$2]
  1310. ; return 0; }
  1311. EOF
  1312. if eval $ac_compile; then
  1313.   ifelse([$3], , :, [rm -rf conftest*
  1314.   $3])
  1315. ifelse([$4], , , [else
  1316.   rm -rf conftest*
  1317.   $4
  1318. ])dnl
  1319. fi
  1320. rm -f conftest*]
  1321. )
  1322.  
  1323.  
  1324. dnl ### Examining libraries
  1325.  
  1326.  
  1327. dnl AC_COMPILE_CHECK(ECHO-TEXT, INCLUDES, FUNCTION-BODY,
  1328. dnl                  ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  1329. AC_DEFUN(AC_COMPILE_CHECK,
  1330. [AC_OBSOLETE([$0], [; instead use AC_TRY_COMPILE or AC_TRY_LINK, and AC_MSG_CHECKING and AC_MSG_RESULT])dnl
  1331. ifelse([$1], , , [AC_CHECKING([for $1])
  1332. ])dnl
  1333. AC_TRY_LINK([$2], [$3], [$4], [$5])dnl
  1334. ])
  1335.  
  1336. dnl AC_TRY_LINK(INCLUDES, FUNCTION-BODY,
  1337. dnl             ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  1338. AC_DEFUN(AC_TRY_LINK,
  1339. [cat > conftest.$ac_ext <<EOF
  1340. dnl This sometimes fails to find confdefs.h, for some reason.
  1341. dnl [#]line __oline__ "[$]0"
  1342. [#]line __oline__ "configure"
  1343. #include "confdefs.h"
  1344. [$1]
  1345. int main() { return 0; }
  1346. int t() {
  1347. [$2]
  1348. ; return 0; }
  1349. EOF
  1350. if eval $ac_link; then
  1351.   ifelse([$3], , :, [rm -rf conftest*
  1352.   $3])
  1353. ifelse([$4], , , [else
  1354.   rm -rf conftest*
  1355.   $4
  1356. ])dnl
  1357. fi
  1358. rm -f conftest*]
  1359. )
  1360.  
  1361.  
  1362. dnl ### Checking for run-time features
  1363.  
  1364.  
  1365. dnl AC_TRY_RUN(PROGRAM, ACTION-IF-TRUE [, ACTION-IF-FALSE
  1366. dnl            [, ACTION-IF-CROSS-COMPILING]])
  1367. AC_DEFUN(AC_TRY_RUN,
  1368. [AC_REQUIRE([AC_C_CROSS])dnl
  1369. if test "$cross_compiling" = yes; then
  1370.   ifelse([$4], ,
  1371.     [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
  1372. )dnl
  1373.   AC_MSG_ERROR(can not run test program while cross compiling)],
  1374.   [$4])
  1375. else
  1376. cat > conftest.$ac_ext <<EOF
  1377. [#]line __oline__ "configure"
  1378. #include "confdefs.h"
  1379. ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
  1380. extern "C" void exit(int);
  1381. #endif
  1382. ])dnl
  1383. [$1]
  1384. EOF
  1385. eval $ac_link
  1386. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  1387.   ifelse([$2], , :, [$2])
  1388. ifelse([$3], , , [else
  1389.   $3
  1390. ])dnl
  1391. fi
  1392. fi
  1393. rm -fr conftest*])
  1394.  
  1395.  
  1396. dnl ### Checking for header files
  1397.  
  1398.  
  1399. dnl AC_CHECK_HEADER(HEADER-FILE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  1400. AC_DEFUN(AC_CHECK_HEADER,
  1401. [dnl Do the transliteration at runtime so arg 1 can be a shell variable.
  1402. ac_safe=`/bin/echo "$1" | tr './\055' '___'`
  1403. AC_MSG_CHECKING([for $1])
  1404. AC_CACHE_VAL(ac_cv_header_$ac_safe,
  1405. [AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes",
  1406.   eval "ac_cv_header_$ac_safe=no")])dnl
  1407. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1408.   AC_MSG_RESULT(yes)
  1409.   ifelse([$2], , :, [$2])
  1410. else
  1411.   AC_MSG_RESULT(no)
  1412. ifelse([$3], , , [$3
  1413. ])dnl
  1414. fi
  1415. ])
  1416.  
  1417. dnl AC_CHECK_HEADERS(HEADER-FILE... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  1418. AC_DEFUN(AC_CHECK_HEADERS,
  1419. [for ac_hdr in $1
  1420. do
  1421. AC_CHECK_HEADER($ac_hdr,
  1422. [changequote(, )dnl
  1423.   ac_tr_hdr=HAVE_`/bin/echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1424. changequote([, ])dnl
  1425.   AC_DEFINE_UNQUOTED($ac_tr_hdr) $2], $3)dnl
  1426. done
  1427. ])
  1428.  
  1429.  
  1430. dnl ### Checking for library functions
  1431.  
  1432.  
  1433. dnl AC_CHECK_FUNC(FUNCTION, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  1434. AC_DEFUN(AC_CHECK_FUNC,
  1435. [AC_MSG_CHECKING([for $1])
  1436. AC_CACHE_VAL(ac_cv_func_$1,
  1437. [AC_TRY_LINK(
  1438. [#include <ctype.h> /* Arbitrary system header to define __stub macros. */
  1439. /* Override any gcc2 internal prototype to avoid an error.  */
  1440. ]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
  1441. extern "C"
  1442. #endif
  1443. ])dnl
  1444. [char $1(); 
  1445. ], [
  1446. /* The GNU C library defines this for functions which it implements
  1447.     to always fail with ENOSYS.  Some functions are actually named
  1448.     something starting with __ and the normal name is an alias.  */
  1449. #if defined (__stub_$1) || defined (__stub___$1)
  1450. choke me
  1451. #else
  1452. $1();
  1453. #endif
  1454. ], eval "ac_cv_func_$1=yes", eval "ac_cv_func_$1=no")])dnl
  1455. if eval "test \"`echo '$ac_cv_func_'$1`\" = yes"; then
  1456.   AC_MSG_RESULT(yes)
  1457.   ifelse([$2], , :, [$2])
  1458. else
  1459.   AC_MSG_RESULT(no)
  1460. ifelse([$3], , , [$3
  1461. ])dnl
  1462. fi
  1463. ])
  1464.  
  1465. dnl AC_CHECK_FUNCS(FUNCTION... [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  1466. AC_DEFUN(AC_CHECK_FUNCS,
  1467. [for ac_func in $1
  1468. do
  1469. AC_CHECK_FUNC($ac_func,
  1470. [changequote(, )dnl
  1471.   ac_tr_func=HAVE_`/bin/echo $ac_func | tr '[a-z]' '[A-Z]'`
  1472. changequote([, ])dnl
  1473.   AC_DEFINE_UNQUOTED($ac_tr_func) $2], $3)dnl
  1474. done
  1475. ])
  1476.  
  1477. dnl AC_REPLACE_FUNCS(FUNCTION-NAME...)
  1478. AC_DEFUN(AC_REPLACE_FUNCS,
  1479. [for ac_func in $1
  1480. do
  1481. AC_CHECK_FUNC($ac_func, , [LIBOBJS="$LIBOBJS ${ac_func}.o"])
  1482. done
  1483. AC_SUBST(LIBOBJS)dnl
  1484. ])
  1485.  
  1486.  
  1487. dnl ### Checking compiler characteristics
  1488.  
  1489.  
  1490. dnl AC_CHECK_SIZEOF(TYPE)
  1491. AC_DEFUN(AC_CHECK_SIZEOF,
  1492. [changequote(<<, >>)dnl
  1493. dnl The name to #define.
  1494. define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
  1495. dnl The cache variable name.
  1496. define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
  1497. changequote([, ])dnl
  1498. AC_MSG_CHECKING(size of $1)
  1499. AC_CACHE_VAL(AC_CV_NAME,
  1500. [AC_TRY_RUN([#include <stdio.h>
  1501. main()
  1502. {
  1503.   FILE *f=fopen("conftestval", "w");
  1504.   if (!f) exit(1);
  1505.   fprintf(f, "%d\n", sizeof($1));
  1506.   exit(0);
  1507. }], AC_CV_NAME=`cat conftestval`)])dnl
  1508. AC_MSG_RESULT($AC_CV_NAME)
  1509. AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
  1510. undefine([AC_TYPE_NAME])dnl
  1511. undefine([AC_CV_NAME])dnl
  1512. ])
  1513.  
  1514.  
  1515. dnl ### Checking for typedefs
  1516.  
  1517.  
  1518. dnl AC_CHECK_TYPE(TYPE, DEFAULT)
  1519. AC_DEFUN(AC_CHECK_TYPE,
  1520. [AC_REQUIRE([AC_HEADER_STDC])dnl
  1521. AC_MSG_CHECKING(for $1)
  1522. AC_CACHE_VAL(ac_cv_type_$1,
  1523. [AC_EGREP_CPP($1, [#include <sys/types.h>
  1524. #if STDC_HEADERS
  1525. #include <stdlib.h>
  1526. #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
  1527. AC_MSG_RESULT($ac_cv_type_$1)
  1528. if test $ac_cv_type_$1 = no; then
  1529.   AC_DEFINE($1, $2)
  1530. fi
  1531. ])
  1532.  
  1533.  
  1534. dnl ### Creating output files
  1535.  
  1536.  
  1537. dnl AC_CONFIG_HEADER(HEADER-TO-CREATE ...)
  1538. AC_DEFUN(AC_CONFIG_HEADER,
  1539. [define(AC_LIST_HEADER, $1)])
  1540.  
  1541. dnl Link each of the existing files SOURCE... to the corresponding
  1542. dnl link name in DEST...
  1543. dnl AC_LINK_FILES(SOURCE..., DEST...)
  1544. AC_DEFUN(AC_LINK_FILES,
  1545. [define([AC_LIST_FILES], [$1])define([AC_LIST_LINKS], [$2])])
  1546.  
  1547. dnl AC_CONFIG_SUBDIRS(DIR ...)
  1548. AC_DEFUN(AC_CONFIG_SUBDIRS,
  1549. [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
  1550. define([AC_LIST_SUBDIRS], [$1])dnl
  1551. subdirs="AC_LIST_SUBDIRS"
  1552. AC_SUBST(subdirs)dnl
  1553. ])
  1554.  
  1555. dnl The big finish.
  1556. dnl Produce config.status, config.h, and links, and configure subdirs.
  1557. dnl AC_OUTPUT([FILE...] [, EXTRA-CMDS] [, INIT-CMDS])
  1558. define(AC_OUTPUT,
  1559. [trap '' 1 2 15
  1560. AC_CACHE_SAVE
  1561. trap 'rm -fr conftest* confdefs* core $ac_clean_files; exit 1' 1 2 15
  1562.  
  1563. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1564. # Let make expand exec_prefix.
  1565. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1566.  
  1567. # Any assignment to VPATH causes Sun make to only execute
  1568. # the first set of double-colon rules, so remove it if not needed.
  1569. # If there is a colon in the path, we need to keep it.
  1570. if test "x$srcdir" = x.; then
  1571. changequote(, )dnl
  1572.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1573. changequote([, ])dnl
  1574. fi
  1575.  
  1576. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1577.  
  1578. ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEFS()])
  1579.  
  1580. # Without the "./", some shells look in PATH for config.status.
  1581. : ${CONFIG_STATUS=./config.status}
  1582.  
  1583. echo creating $CONFIG_STATUS
  1584. # Some systems, like AmigaDOS, won't allow you to remove a script that is
  1585. # being executed, so just move it out of the way instead.
  1586. if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  1587. cat > $CONFIG_STATUS <<EOF
  1588. #!/bin/sh
  1589. # Generated automatically by configure.
  1590. # Run this file to recreate the current configuration.
  1591. # This directory was configured as follows,
  1592. dnl hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
  1593. dnl so uname gets run too.
  1594. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1595. #
  1596. [#] [$]0 [$]ac_configure_args
  1597. #
  1598. # Compiler output produced by configure, useful for debugging
  1599. # configure, is in ./config.log if it exists.
  1600.  
  1601. changequote(, )dnl
  1602. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1603. changequote([, ])dnl
  1604. for ac_option
  1605. do
  1606.   case "[\$]ac_option" in
  1607.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1608.     echo "running [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion"
  1609.     exec [\$]{CONFIG_SHELL-/bin/sh} [$]0 [$]ac_configure_args --no-create --no-recursion ;;
  1610.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1611.     /bin/echo "$CONFIG_STATUS generated by autoconf version AC_ACVERSION"
  1612.     exit 0 ;;
  1613.   -help | --help | --hel | --he | --h)
  1614.     echo "[\$]ac_cs_usage"; exit 0 ;;
  1615.   *) echo "[\$]ac_cs_usage"; exit 1 ;;
  1616.   esac
  1617. done
  1618.  
  1619. ac_given_srcdir=$srcdir
  1620. ifdef([AC_PROVIDE_AC_PROG_INSTALL], [ac_given_INSTALL="$INSTALL"
  1621. ])dnl
  1622.  
  1623. ifdef([AC_LIST_HEADER],
  1624. [trap 'rm -fr $1 AC_LIST_HEADER conftest*; exit 1' 1 2 15],
  1625. [trap 'rm -f $1; exit 1' 1 2 15])
  1626.  
  1627. AC_OUTPUT_FILES($1)
  1628. ifdef([AC_LIST_HEADER], [AC_OUTPUT_HEADER(AC_LIST_HEADER)])dnl
  1629. ifdef([AC_LIST_LINKS], [AC_OUTPUT_LINKS(AC_LIST_FILES, AC_LIST_LINKS)])dnl
  1630. ifelse([$3], , , 
  1631. [EOF
  1632. cat >> $CONFIG_STATUS <<EOF
  1633. $3
  1634. EOF
  1635. cat >> $CONFIG_STATUS <<\EOF])
  1636. $2
  1637. exit 0
  1638. EOF
  1639. chmod +x $CONFIG_STATUS
  1640. rm -fr confdefs* $ac_clean_files
  1641. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS
  1642. dnl config.status should not do recursion.
  1643. ifdef([AC_LIST_SUBDIRS], [AC_OUTPUT_SUBDIRS(AC_LIST_SUBDIRS)])dnl
  1644. ])dnl
  1645.  
  1646. dnl This is a subroutine of AC_OUTPUT.
  1647. dnl It is called inside configure, outside of config.status.
  1648. dnl AC_OUTPUT_MAKE_DEFS()
  1649. define(AC_OUTPUT_MAKE_DEFS,
  1650. [# Transform confdefs.h into DEFS.
  1651. dnl Using a here document instead of a string reduces the quoting nightmare.
  1652. # Protect against shell expansion while executing Makefile rules.
  1653. # Protect against Makefile macro expansion.
  1654. cat > conftest.defs <<\EOF
  1655. changequote(<<, >>)dnl
  1656. s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%-D\1=\2%g
  1657. s%[     `~<<#>>$^&*(){}\\|;'"<>?]%\\&%g
  1658. s%\[%\\&%g
  1659. s%\]%\\&%g
  1660. s%\$%$$%g
  1661. changequote([, ])dnl
  1662. EOF
  1663. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  1664. rm -f conftest.defs
  1665. ])
  1666.  
  1667. dnl This is a subroutine of AC_OUTPUT.  It is called inside an unquoted
  1668. dnl here document whose contents are going into config.status.
  1669. dnl AC_OUTPUT_FILES(FILE...)
  1670. define(AC_OUTPUT_FILES,
  1671. [# Protect against being on the right side of a sed subst in config.status. 
  1672. changequote(, )dnl
  1673. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1674.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1675. changequote([, ])dnl
  1676. dnl These here document variables are unquoted when configure runs
  1677. dnl but quoted when config.status runs, so variables are expanded once.
  1678. $ac_vpsub
  1679. dnl Shell code in configure.in might set extrasub.
  1680. $extrasub
  1681. dnl Insert the sed substitutions of variables.
  1682. undivert(AC_DIVERSION_SED)
  1683. CEOF
  1684. EOF
  1685. cat >> $CONFIG_STATUS <<EOF
  1686.  
  1687. CONFIG_FILES=\${CONFIG_FILES-"$1"}
  1688. EOF
  1689. cat >> $CONFIG_STATUS <<\EOF
  1690. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1691. dnl Specifying an input file breaks the trap to clean up on interrupt,
  1692. dnl but that's not a huge problem.
  1693.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1694.   case "$ac_file" in
  1695.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  1696.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  1697.   *) ac_file_in="${ac_file}.in" ;;
  1698.   esac
  1699.  
  1700.   # Adjust relative srcdir, etc. for subdirectories.
  1701.  
  1702.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1703. changequote(, )dnl
  1704.   ac_dir=`/bin/echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1705. changequote([, ])dnl
  1706.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1707.     # The file is in a subdirectory.
  1708.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1709.     ac_dir_suffix="/$ac_dir"
  1710.     # A "../" for each directory in $ac_dir_suffix.
  1711. changequote(, )dnl
  1712.     ac_dots=`/bin/echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1713. changequote([, ])dnl
  1714.   else
  1715.     ac_dir_suffix= ac_dots=
  1716.   fi
  1717.  
  1718.   case "$ac_given_srcdir" in
  1719.   .)  srcdir=.
  1720.       if test -z "$ac_dots"; then top_srcdir=.
  1721.       else top_srcdir=`/bin/echo $ac_dots|sed 's%/$%%'`; fi ;;
  1722.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1723.   *) # Relative path.
  1724.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1725.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1726.   esac
  1727.  
  1728. ifdef([AC_PROVIDE_AC_PROG_INSTALL],
  1729. [  case "$ac_given_INSTALL" in
  1730. changequote(, )dnl
  1731.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1732. changequote([, ])dnl
  1733.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1734.   esac
  1735. ])dnl
  1736.   echo creating "$ac_file"
  1737.   rm -f "$ac_file"
  1738.   configure_input="Generated automatically from `/bin/echo $ac_file_in|sed 's%.*/%%'` by configure."
  1739.   case "$ac_file" in
  1740.   *Makefile*) ac_comsub="1i\\
  1741. # $configure_input" ;;
  1742.   *) ac_comsub= ;;
  1743.   esac
  1744.   sed -e "$ac_comsub
  1745. s%@configure_input@%$configure_input%g
  1746. s%@srcdir@%$srcdir%g
  1747. s%@top_srcdir@%$top_srcdir%g
  1748. ifdef([AC_PROVIDE_AC_PROG_INSTALL], [s%@INSTALL@%$INSTALL%g
  1749. ])dnl
  1750. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1751. fi; done
  1752. rm -f conftest.subs
  1753. ])
  1754.  
  1755. dnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
  1756. dnl here document whose contents are going into config.status.
  1757. dnl AC_OUTPUT_HEADER(HEADER-FILE...)
  1758. define(AC_OUTPUT_HEADER,
  1759. [changequote(<<, >>)dnl
  1760. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1761. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1762. #
  1763. # ac_d sets the value in "#define NAME VALUE" lines.
  1764. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1765. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1766. ac_dC='\3'
  1767. ac_dD='%g'
  1768. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  1769. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1770. ac_uB='\([     ]\)%\1#\2define\3'
  1771. ac_uC=' '
  1772. ac_uD='\4%g'
  1773. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  1774. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  1775. ac_eB='<<$>>%\1#\2define\3'
  1776. ac_eC=' '
  1777. ac_eD='%g'
  1778. changequote([, ])dnl
  1779.  
  1780. CONFIG_HEADERS=${CONFIG_HEADERS-"$1"}
  1781. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  1782.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1783.   case "$ac_file" in
  1784.   *:*) ac_file_in=`/bin/echo "$ac_file"|sed 's%.*:%%'`
  1785.        ac_file=`/bin/echo "$ac_file"|sed 's%:.*%%'` ;;
  1786.   *) ac_file_in="${ac_file}.in" ;;
  1787.   esac
  1788.  
  1789.   echo creating $ac_file
  1790.  
  1791.   rm -f conftest.frag conftest.in conftest.out
  1792.   cp $ac_given_srcdir/$ac_file_in conftest.in
  1793.  
  1794. EOF
  1795.  
  1796. # Transform confdefs.h into a sed script conftest.vals that substitutes
  1797. # the proper values into config.h.in to produce config.h.  And first:
  1798. # Protect against being on the right side of a sed subst in config.status. 
  1799. # Protect against being in an unquoted here document in config.status.
  1800. rm -f conftest.vals
  1801. dnl Using a here document instead of a string reduces the quoting nightmare.
  1802. dnl Putting comments in sed scripts is not portable.
  1803. cat > conftest.hdr <<\EOF
  1804. changequote(<<, >>)dnl
  1805. s/[\\&%]/\\&/g
  1806. s%[\\$`]%\\&%g
  1807. s%<<#define>> \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  1808. s%ac_d%ac_u%gp
  1809. s%ac_u%ac_e%gp
  1810. changequote([, ])dnl
  1811. EOF
  1812. sed -n -f conftest.hdr confdefs.h > conftest.vals
  1813. rm -f conftest.hdr
  1814.  
  1815. # This sed command replaces #undef with comments.  This is necessary, for
  1816. # example, in the case of _POSIX_SOURCE, which is predefined and required
  1817. # on some systems where configure will not decide to define it.
  1818. cat >> conftest.vals <<\EOF
  1819. changequote(, )dnl
  1820. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  1821. changequote([, ])dnl
  1822. EOF
  1823.  
  1824. # Break up conftest.vals because some shells have a limit on
  1825. # the size of here documents, and old seds have small limits too.
  1826. # Maximum number of lines to put in a single here document.
  1827. ac_max_here_lines=12
  1828.  
  1829. rm -f conftest.tail
  1830. while :
  1831. do
  1832.   ac_lines=`grep -c . conftest.vals`
  1833.   # grep -c gives empty output for an empty file on some AIX systems.
  1834.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  1835.   # Write a limited-size here document to conftest.frag.
  1836.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  1837.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  1838.   echo 'CEOF
  1839.   sed -f conftest.frag conftest.in > conftest.out
  1840.   rm -f conftest.in
  1841.   mv conftest.out conftest.in
  1842. ' >> $CONFIG_STATUS
  1843.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  1844.   rm -f conftest.vals
  1845.   mv conftest.tail conftest.vals
  1846. done
  1847. rm -f conftest.vals
  1848.  
  1849. dnl Now back to your regularly scheduled config.status.
  1850. cat >> $CONFIG_STATUS <<\EOF
  1851.   rm -f conftest.frag conftest.h
  1852.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  1853.   cat conftest.in >> conftest.h
  1854.   rm -f conftest.in
  1855.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  1856.     /bin/echo "$ac_file is unchanged"
  1857.     rm -f conftest.h
  1858.   else
  1859.     rm -f $ac_file
  1860.     mv conftest.h $ac_file
  1861.   fi
  1862. fi; done
  1863.  
  1864. ])
  1865.  
  1866. dnl This is a subroutine of AC_OUTPUT.  It is called inside a quoted
  1867. dnl here document whose contents are going into config.status.
  1868. dnl AC_OUTPUT_LINKS(SOURCE..., DEST...)
  1869. define(AC_OUTPUT_LINKS,
  1870. [EOF
  1871.  
  1872. cat >> $CONFIG_STATUS <<EOF
  1873. ac_sources="$1"
  1874. ac_dests="$2"
  1875. EOF
  1876.  
  1877. cat >> $CONFIG_STATUS <<\EOF
  1878. srcdir=$ac_given_srcdir
  1879. while test -n "$ac_sources"; do
  1880.   set $ac_dests; ac_dest=[$]1; shift; ac_dests=[$]*
  1881.   set $ac_sources; ac_source=[$]1; shift; ac_sources=[$]*
  1882.  
  1883.   echo "linking $srcdir/$ac_source to $ac_dest"
  1884.  
  1885.   if test ! -r $srcdir/$ac_source; then
  1886.     AC_MSG_ERROR($srcdir/$ac_source: File not found)
  1887.   fi
  1888.   rm -f $ac_dest
  1889.  
  1890.   # Make relative symlinks.
  1891.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1892. changequote(, )dnl
  1893.   ac_dest_dir=`/bin/echo $ac_dest|sed 's%/[^/][^/]*$%%'`
  1894. changequote([, ])dnl
  1895.   if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
  1896.     # The dest file is in a subdirectory.
  1897.     test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
  1898.     ac_dest_dir_suffix="/$ac_dest_dir"
  1899.     # A "../" for each directory in $ac_dest_dir_suffix.
  1900. changequote(, )dnl
  1901.     ac_dots=`/bin/echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
  1902. changequote([, ])dnl
  1903.   else
  1904.     ac_dest_dir_suffix= ac_dots=
  1905.   fi
  1906.  
  1907.   case "$srcdir" in
  1908. changequote(, )dnl
  1909.   [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
  1910. changequote([, ])dnl
  1911.   *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  1912.   esac
  1913.  
  1914.   # Make a symlink if possible; otherwise try a hard link.
  1915.   # On the Amiga, we instead try a hard link first and then
  1916.   # just do a cp, since symbolic links still have rough edges.
  1917.   if ln $ac_rel_source $ac_dest 2>/dev/null ||
  1918.     cp -p $srcdir/$ac_source $ac_dest; then :
  1919.   else
  1920.     AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
  1921.   fi
  1922. done
  1923. ])
  1924.  
  1925. This is a subroutine of AC_OUTPUT.  It is called after running config.status.
  1926. dnl AC_OUTPUT_SUBDIRS(DIRECTORY...)
  1927. define(AC_OUTPUT_SUBDIRS,
  1928. [
  1929. if test "$no_recursion" != yes; then
  1930.  
  1931.   # Remove --cache-file and --srcdir arguments so they do not pile up.
  1932.   ac_sub_configure_args=
  1933.   ac_prev=
  1934.   for ac_arg in $ac_configure_args; do
  1935.     if test -n "$ac_prev"; then
  1936.       ac_prev=
  1937.       continue
  1938.     fi
  1939.     case "$ac_arg" in
  1940.     -cache-file | --cache-file | --cache-fil | --cache-fi \
  1941.     | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  1942.       ac_prev=cache_file ;;
  1943.     -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  1944.     | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  1945.       ;;
  1946.     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  1947.       ac_prev=srcdir ;;
  1948.     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  1949.       ;;
  1950.     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
  1951.     esac
  1952.   done
  1953.  
  1954.   for ac_config_dir in $1; do
  1955.  
  1956.     # Do not complain, so a configure script can configure whichever
  1957.     # parts of a large source tree are present.
  1958.     if test ! -d $srcdir/$ac_config_dir; then
  1959.       continue
  1960.     fi
  1961.  
  1962.     echo configuring in $ac_config_dir
  1963.  
  1964.     case "$srcdir" in
  1965.     .) ;;
  1966.     *)
  1967.       if test -d ./$ac_config_dir || mkdir ./$ac_config_dir; then :;
  1968.       else
  1969.         AC_MSG_ERROR(can not create `pwd`/$ac_config_dir)
  1970.       fi
  1971.       ;;
  1972.     esac
  1973.  
  1974.     ac_popdir=`pwd`
  1975.     cd $ac_config_dir
  1976.  
  1977.     case "$srcdir" in
  1978.     .) # No --srcdir option.  We are building in place.
  1979.       ac_sub_srcdir=$srcdir ;;
  1980.     /*) # Absolute path.
  1981.       ac_sub_srcdir=$srcdir/$ac_config_dir ;;
  1982.     *) # Relative path.
  1983.       ac_sub_srcdir=../$srcdir/$ac_config_dir ;;
  1984.     esac
  1985.  
  1986.     # Check for guested configure; otherwise get Cygnus style configure.
  1987.     if test -f $ac_sub_srcdir/configure; then
  1988.       ac_sub_configure=$ac_sub_srcdir/configure
  1989.     elif test -f $ac_sub_srcdir/configure.in; then
  1990.       ac_sub_configure=$ac_configure
  1991.     else
  1992.       AC_MSG_WARN(no configuration information is in $ac_config_dir)
  1993.       ac_sub_configure=
  1994.     fi
  1995.  
  1996.     # The recursion is here.
  1997.     if test -n "$ac_sub_configure"; then
  1998.  
  1999.       # Make the cache file name correct relative to the subdirectory.
  2000. changequote(, )dnl
  2001.       # A "../" for each directory in /$ac_config_dir.
  2002.       ac_dots=`echo /$ac_config_dir|sed 's%/[^/]*%../%g'`
  2003. changequote([, ])dnl
  2004.       case "$cache_file" in
  2005.       /*) ac_sub_cache_file=$cache_file ;;
  2006.       *) # Relative path.
  2007.         ac_sub_cache_file="$ac_dots$cache_file" ;;
  2008.       esac
  2009.  
  2010.       echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
  2011.       # The eval makes quoting arguments work.
  2012.       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_sub_srcdir
  2013.       then :
  2014.       else
  2015.         AC_MSG_ERROR($ac_sub_configure failed for $ac_config_dir)
  2016.       fi
  2017.     fi
  2018.  
  2019.     cd $ac_popdir
  2020.   done
  2021. fi
  2022. ])
  2023.