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