home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / autoconf-2.10-diffs.gz / autoconf-2.10-diffs
Text File  |  1996-10-13  |  394KB  |  10,012 lines

  1. This file contains patches that transform the baseline version into
  2. the amiga version.  Assuming that you have unarchived the baseline
  3. version in the current directory, just run the command:
  4.  
  5.     patch -p1 -E -b .pbak <diff-file
  6.  
  7. where 'diff-file' is this patch file.  After running patch you should
  8. remove all the generated *.pbak files, and look for any *.rej files
  9. that indicate a problem patching the baseline source.
  10.  
  11. diff -rup --new-file baseline/fsf/autoconf/BeOS.diffs amiga/fsf/autoconf/BeOS.diffs
  12. --- baseline/fsf/autoconf/BeOS.diffs    Wed Dec 31 17:00:00 1969
  13. +++ amiga/fsf/autoconf/BeOS.diffs    Tue Sep 24 12:00:00 1996
  14. @@ -0,0 +1,189 @@
  15. +This patch works around current bugs in the BeOS shell that affect
  16. +configure, and also patch up some Makefile targets that are not
  17. +yet fully supported.
  18. +
  19. +============================================================================
  20. +
  21. +diff -rc autoconf-ref/Makefile.in autoconf/Makefile.in
  22. +*** autoconf-ref/Makefile.in    Mon Jun 10 07:00:00 1996
  23. +--- autoconf/Makefile.in    Mon Sep 16 23:46:45 1996
  24. +***************
  25. +*** 87,93 ****
  26. +      's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'
  27. +  editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
  28. +  
  29. +! all: ${SCRIPTS} info guide dvi ps
  30. +  
  31. +  .SUFFIXES:
  32. +  .SUFFIXES: .sh .pl
  33. +--- 87,93 ----
  34. +      's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'
  35. +  editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
  36. +  
  37. +! all: ${SCRIPTS} info guide
  38. +  
  39. +  .SUFFIXES:
  40. +  .SUFFIXES: .sh .pl
  41. +***************
  42. +*** 149,155 ****
  43. +  installdirs:
  44. +      $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(guidedir) $(dvidir) $(psdir) $(acdatadir)
  45. +  
  46. +! install: all $(M4FILES) acconfig.h installdirs install-info install-guide install-dvi install-ps
  47. +      @case `$(M4) --help < /dev/null 2>&1` in \
  48. +      *reload-state*) echo installing frozen m4 files; \
  49. +        $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \
  50. +--- 149,155 ----
  51. +  installdirs:
  52. +      $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(guidedir) $(dvidir) $(psdir) $(acdatadir)
  53. +  
  54. +! install: all $(M4FILES) acconfig.h installdirs install-info install-guide
  55. +      @case `$(M4) --help < /dev/null 2>&1` in \
  56. +      *reload-state*) echo installing frozen m4 files; \
  57. +        $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \
  58. +diff -rc autoconf-ref/acgeneral.m4 autoconf/acgeneral.m4
  59. +*** autoconf-ref/acgeneral.m4    Tue Sep 10 02:18:58 1996
  60. +--- autoconf/acgeneral.m4    Thu Sep 19 00:54:44 1996
  61. +***************
  62. +*** 1039,1047 ****
  63. +  dnl Allow a site initialization script to override cache values.
  64. +  # Ultrix sh set writes to stderr and can't be redirected directly,
  65. +  # and sets the high bit in the cache file unless we assign to the vars.
  66. +! (set) 2>&1 |
  67. +    sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  68. +!   >> confcache
  69. +  changequote([, ])dnl
  70. +  if cmp -s $cache_file confcache; then
  71. +    :
  72. +--- 1039,1047 ----
  73. +  dnl Allow a site initialization script to override cache values.
  74. +  # Ultrix sh set writes to stderr and can't be redirected directly,
  75. +  # and sets the high bit in the cache file unless we assign to the vars.
  76. +! (set) >cache.tmp 2>&1 
  77. +    sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  78. +!   <cache.tmp >> confcache
  79. +  changequote([, ])dnl
  80. +  if cmp -s $cache_file confcache; then
  81. +    :
  82. +***************
  83. +*** 1053,1059 ****
  84. +      echo "not updating unwritable cache $cache_file"
  85. +    fi
  86. +  fi
  87. +! rm -f confcache
  88. +  ])
  89. +  
  90. +  dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
  91. +--- 1053,1059 ----
  92. +      echo "not updating unwritable cache $cache_file"
  93. +    fi
  94. +  fi
  95. +! rm -f confcache cache.tmp
  96. +  ])
  97. +  
  98. +  dnl The name of shell var CACHE-ID must contain `_cv_' in order to get saved.
  99. +***************
  100. +*** 1192,1198 ****
  101. +  dnl AC_TRY_EVAL(VARIABLE)
  102. +  AC_DEFUN(AC_TRY_EVAL,
  103. +  [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
  104. +! (eval [$]$1) 2>&AC_FD_CC; }])
  105. +  
  106. +  dnl AC_TRY_COMMAND(COMMAND)
  107. +  AC_DEFUN(AC_TRY_COMMAND,
  108. +--- 1192,1198 ----
  109. +  dnl AC_TRY_EVAL(VARIABLE)
  110. +  AC_DEFUN(AC_TRY_EVAL,
  111. +  [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl
  112. +! xxx=`(eval [$]$1 2>&AC_FD_CC ; echo [$]?)` ; test "$xxx" = "0" ; }])
  113. +  
  114. +  dnl AC_TRY_COMMAND(COMMAND)
  115. +  AC_DEFUN(AC_TRY_COMMAND,
  116. +***************
  117. +*** 1522,1529 ****
  118. +  EOF
  119. +  dnl eval is necessary to expand ac_cpp.
  120. +  dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
  121. +! if (eval "$ac_cpp conftest.$ac_ext") 2>&AC_FD_CC |
  122. +!   egrep "$1" >/dev/null 2>&1; then
  123. +    ifelse([$3], , :, [rm -rf conftest*
  124. +    $3])
  125. +  ifelse([$4], , , [else
  126. +--- 1522,1529 ----
  127. +  EOF
  128. +  dnl eval is necessary to expand ac_cpp.
  129. +  dnl Ultrix and Pyramid sh refuse to redirect output of eval, so use subshell.
  130. +! eval "$ac_cpp conftest.$ac_ext" 2>&AC_FD_CC >conftest.tmp
  131. +! if egrep "$1" <conftest.tmp >/dev/null 2>&1; then
  132. +    ifelse([$3], , :, [rm -rf conftest*
  133. +    $3])
  134. +  ifelse([$4], , , [else
  135. +***************
  136. +*** 2182,2192 ****
  137. +    *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  138. +    esac
  139. +  
  140. +!   # Make a symlink if possible; otherwise try a hard link.
  141. +!   if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
  142. +!     ln $srcdir/$ac_source $ac_dest; then :
  143. +    else
  144. +!     AC_MSG_ERROR(can not link $ac_dest to $srcdir/$ac_source)
  145. +    fi
  146. +  done
  147. +  ])
  148. +--- 2182,2195 ----
  149. +    *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
  150. +    esac
  151. +  
  152. +!   # Make a symlink if possible; otherwise try a hard link,
  153. +!   # otherwise just copy the damn file.
  154. +!   # HACK - for BeOS, the current bash returns a success code
  155. +!   # when it tries to run programs (like ln) that don't exist.
  156. +!   # so force cp for now.
  157. +!   if cp $srcdir/$ac_source $ac_dest; then :
  158. +    else
  159. +!     AC_MSG_ERROR(can not link or copy $srcdir/$ac_source to $ac_dest)
  160. +    fi
  161. +  done
  162. +  ])
  163. +diff -rc autoconf-ref/configure autoconf/configure
  164. +*** autoconf-ref/configure    Tue Sep 10 02:18:57 1996
  165. +--- autoconf/configure    Thu Sep 19 01:06:28 1996
  166. +***************
  167. +*** 743,751 ****
  168. +  EOF
  169. +  # Ultrix sh set writes to stderr and can't be redirected directly,
  170. +  # and sets the high bit in the cache file unless we assign to the vars.
  171. +! (set) 2>&1 |
  172. +    sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  173. +!   >> confcache
  174. +  if cmp -s $cache_file confcache; then
  175. +    :
  176. +  else
  177. +--- 743,751 ----
  178. +  EOF
  179. +  # Ultrix sh set writes to stderr and can't be redirected directly,
  180. +  # and sets the high bit in the cache file unless we assign to the vars.
  181. +! (set) >cache.tmp 2>&1 
  182. +    sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  183. +!   <cache.tmp >> confcache
  184. +  if cmp -s $cache_file confcache; then
  185. +    :
  186. +  else
  187. +***************
  188. +*** 756,762 ****
  189. +      echo "not updating unwritable cache $cache_file"
  190. +    fi
  191. +  fi
  192. +! rm -f confcache
  193. +  
  194. +  trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  195. +  
  196. +--- 756,762 ----
  197. +      echo "not updating unwritable cache $cache_file"
  198. +    fi
  199. +  fi
  200. +! rm -f confcache cache.tmp
  201. +  
  202. +  trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  203. +  
  204. diff -rup --new-file baseline/fsf/autoconf/ChangeLog amiga/fsf/autoconf/ChangeLog
  205. --- baseline/fsf/autoconf/ChangeLog    Tue May  7 10:21:01 1996
  206. +++ amiga/fsf/autoconf/ChangeLog    Tue Sep 24 12:00:00 1996
  207. @@ -1,3 +1,10 @@
  208. +Sun Sep 29 14:05:34 1996  Fred Fish  <fnf@ninemoons.com>
  209. +
  210. +    * Makefile.in: Changes for guidedir, psdir, dvidir
  211. +    * acconfig.h: Add PACKAGE, PACKAGE_VERSION, VERSION.
  212. +    * acgeneral.m4: Support guidedir, psdir, dvidir.
  213. +    * acspecific.m4: Use -O2 as gcc default rather than -O.
  214. +
  215.  Tue May  7 13:20:33 1996  Roland McGrath  <roland@delasyd.gnu.ai.mit.edu>
  216.  
  217.      * acgeneral.m4: Verion 2.10 released.
  218. @@ -119,6 +126,12 @@ Mon Dec 11 22:12:54 1995  Roland McGrath
  219.  
  220.      * acspecific.m4 (AC_PROG_CC_C_O): Rearrange logic to get the right
  221.      answer for cc.
  222. +
  223. +Thu Nov 30 14:42:29 1995  Fred Fish  <fnf@amigalib.com>
  224. +
  225. +    * acgeneral.m4: Revert change that added extra braces around
  226. +    cache file entries to compensate for pdksh bug that caused
  227. +    one level of braces to be eaten.  The pdksh bug is fixed.
  228.  
  229.  Fri Nov 24 17:26:38 1995  Miles Bader  <miles@gnu.ai.mit.edu>
  230.  
  231. diff -rup --new-file baseline/fsf/autoconf/INSTALL amiga/fsf/autoconf/INSTALL
  232. --- baseline/fsf/autoconf/INSTALL    Fri Nov 17 13:01:53 1995
  233. +++ amiga/fsf/autoconf/INSTALL    Wed Dec 31 17:00:00 1969
  234. @@ -1,181 +0,0 @@
  235. -Basic Installation
  236. -==================
  237. -
  238. -   These are generic installation instructions.
  239. -
  240. -   The `configure' shell script attempts to guess correct values for
  241. -various system-dependent variables used during compilation.  It uses
  242. -those values to create a `Makefile' in each directory of the package.
  243. -It may also create one or more `.h' files containing system-dependent
  244. -definitions.  Finally, it creates a shell script `config.status' that
  245. -you can run in the future to recreate the current configuration, a file
  246. -`config.cache' that saves the results of its tests to speed up
  247. -reconfiguring, and a file `config.log' containing compiler output
  248. -(useful mainly for debugging `configure').
  249. -
  250. -   If you need to do unusual things to compile the package, please try
  251. -to figure out how `configure' could check whether to do them, and mail
  252. -diffs or instructions to the address given in the `README' so they can
  253. -be considered for the next release.  If at some point `config.cache'
  254. -contains results you don't want to keep, you may remove or edit it.
  255. -
  256. -   The file `configure.in' is used to create `configure' by a program
  257. -called `autoconf'.  You only need `configure.in' if you want to change
  258. -it or regenerate `configure' using a newer version of `autoconf'.
  259. -
  260. -The simplest way to compile this package is:
  261. -
  262. -  1. `cd' to the directory containing the package's source code and type
  263. -     `./configure' to configure the package for your system.  If you're
  264. -     using `csh' on an old version of System V, you might need to type
  265. -     `sh ./configure' instead to prevent `csh' from trying to execute
  266. -     `configure' itself.
  267. -
  268. -     Running `configure' takes awhile.  While running, it prints some
  269. -     messages telling which features it is checking for.
  270. -
  271. -  2. Type `make' to compile the package.
  272. -
  273. -  3. Optionally, type `make check' to run any self-tests that come with
  274. -     the package.
  275. -
  276. -  4. Type `make install' to install the programs and any data files and
  277. -     documentation.
  278. -
  279. -  5. You can remove the program binaries and object files from the
  280. -     source code directory by typing `make clean'.  To also remove the
  281. -     files that `configure' created (so you can compile the package for
  282. -     a different kind of computer), type `make distclean'.  There is
  283. -     also a `make maintainer-clean' target, but that is intended mainly
  284. -     for the package's developers.  If you use it, you may have to get
  285. -     all sorts of other programs in order to regenerate files that came
  286. -     with the distribution.
  287. -
  288. -Compilers and Options
  289. -=====================
  290. -
  291. -   Some systems require unusual options for compilation or linking that
  292. -the `configure' script does not know about.  You can give `configure'
  293. -initial values for variables by setting them in the environment.  Using
  294. -a Bourne-compatible shell, you can do that on the command line like
  295. -this:
  296. -     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
  297. -
  298. -Or on systems that have the `env' program, you can do it like this:
  299. -     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
  300. -
  301. -Compiling For Multiple Architectures
  302. -====================================
  303. -
  304. -   You can compile the package for more than one kind of computer at the
  305. -same time, by placing the object files for each architecture in their
  306. -own directory.  To do this, you must use a version of `make' that
  307. -supports the `VPATH' variable, such as GNU `make'.  `cd' to the
  308. -directory where you want the object files and executables to go and run
  309. -the `configure' script.  `configure' automatically checks for the
  310. -source code in the directory that `configure' is in and in `..'.
  311. -
  312. -   If you have to use a `make' that does not supports the `VPATH'
  313. -variable, you have to compile the package for one architecture at a time
  314. -in the source code directory.  After you have installed the package for
  315. -one architecture, use `make distclean' before reconfiguring for another
  316. -architecture.
  317. -
  318. -Installation Names
  319. -==================
  320. -
  321. -   By default, `make install' will install the package's files in
  322. -`/usr/local/bin', `/usr/local/man', etc.  You can specify an
  323. -installation prefix other than `/usr/local' by giving `configure' the
  324. -option `--prefix=PATH'.
  325. -
  326. -   You can specify separate installation prefixes for
  327. -architecture-specific files and architecture-independent files.  If you
  328. -give `configure' the option `--exec-prefix=PATH', the package will use
  329. -PATH as the prefix for installing programs and libraries.
  330. -Documentation and other data files will still use the regular prefix.
  331. -
  332. -   In addition, if you use an unusual directory layout you can give
  333. -options like `--bindir=PATH' to specify different values for particular
  334. -kinds of files.  Run `configure --help' for a list of the directories
  335. -you can set and what kinds of files go in them.
  336. -
  337. -   If the package supports it, you can cause programs to be installed
  338. -with an extra prefix or suffix on their names by giving `configure' the
  339. -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
  340. -
  341. -Optional Features
  342. -=================
  343. -
  344. -   Some packages pay attention to `--enable-FEATURE' options to
  345. -`configure', where FEATURE indicates an optional part of the package.
  346. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE
  347. -is something like `gnu-as' or `x' (for the X Window System).  The
  348. -`README' should mention any `--enable-' and `--with-' options that the
  349. -package recognizes.
  350. -
  351. -   For packages that use the X Window System, `configure' can usually
  352. -find the X include and library files automatically, but if it doesn't,
  353. -you can use the `configure' options `--x-includes=DIR' and
  354. -`--x-libraries=DIR' to specify their locations.
  355. -
  356. -Specifying the System Type
  357. -==========================
  358. -
  359. -   There may be some features `configure' can not figure out
  360. -automatically, but needs to determine by the type of host the package
  361. -will run on.  Usually `configure' can figure that out, but if it prints
  362. -a message saying it can not guess the host type, give it the
  363. -`--host=TYPE' option.  TYPE can either be a short name for the system
  364. -type, such as `sun4', or a canonical name with three fields:
  365. -     CPU-COMPANY-SYSTEM
  366. -
  367. -See the file `config.sub' for the possible values of each field.  If
  368. -`config.sub' isn't included in this package, then this package doesn't
  369. -need to know the host type.
  370. -
  371. -   If you are building compiler tools for cross-compiling, you can also
  372. -use the `--target=TYPE' option to select the type of system they will
  373. -produce code for and the `--build=TYPE' option to select the type of
  374. -system on which you are compiling the package.
  375. -
  376. -Sharing Defaults
  377. -================
  378. -
  379. -   If you want to set default values for `configure' scripts to share,
  380. -you can create a site shell script called `config.site' that gives
  381. -default values for variables like `CC', `cache_file', and `prefix'.
  382. -`configure' looks for `PREFIX/share/config.site' if it exists, then
  383. -`PREFIX/etc/config.site' if it exists.  Or, you can set the
  384. -`CONFIG_SITE' environment variable to the location of the site script.
  385. -A warning: not all `configure' scripts look for a site script.
  386. -
  387. -Operation Controls
  388. -==================
  389. -
  390. -   `configure' recognizes the following options to control how it
  391. -operates.
  392. -
  393. -`--cache-file=FILE'
  394. -     Use and save the results of the tests in FILE instead of
  395. -     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
  396. -     debugging `configure'.
  397. -
  398. -`--help'
  399. -     Print a summary of the options to `configure', and exit.
  400. -
  401. -`--quiet'
  402. -`--silent'
  403. -`-q'
  404. -     Do not print messages saying which checks are being made.
  405. -
  406. -`--srcdir=DIR'
  407. -     Look for the package's source code in directory DIR.  Usually
  408. -     `configure' can determine that directory automatically.
  409. -
  410. -`--version'
  411. -     Print the version of Autoconf used to generate the `configure'
  412. -     script, and exit.
  413. -
  414. -`configure' also accepts some other, not widely useful, options.
  415. -
  416. diff -rup --new-file baseline/fsf/autoconf/Makefile.in amiga/fsf/autoconf/Makefile.in
  417. --- baseline/fsf/autoconf/Makefile.in    Wed Nov 22 11:09:44 1995
  418. +++ amiga/fsf/autoconf/Makefile.in    Tue Sep 24 12:00:00 1996
  419. @@ -25,6 +25,7 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
  420.  INSTALL_DATA = @INSTALL_DATA@
  421.  MAKEINFO = makeinfo
  422.  TEXI2DVI = texi2dvi
  423. +DVIPS = dvips
  424.  M4 = @M4@
  425.  AWK = @AWK@
  426.  PERL = @PERL@
  427. @@ -49,6 +50,15 @@ acdatadir = $(datadir)/autoconf
  428.  # Directory in which to install documentation info files.
  429.  infodir = @infodir@
  430.  
  431. +# Directory in which to install documentation guide files.
  432. +guidedir = @guidedir@
  433. +
  434. +# Directory in which to install documentation dvi files.
  435. +dvidir = $(prefix)/dvi
  436. +
  437. +# Directory in which to install documentation postscript files.
  438. +psdir = $(prefix)/ps
  439. +
  440.  #### End of system configuration section. ####
  441.  
  442.  SHELL = /bin/sh
  443. @@ -58,25 +68,26 @@ SUBDIRS = testsuite
  444.  M4FILES = autoconf.m4 acgeneral.m4 acoldnames.m4 acspecific.m4 autoheader.m4
  445.  
  446.  # Files that can be generated, but should be up to date for a distribution.
  447. -DISTDEP = info Makefile
  448. +DISTDEP = info guide Makefile
  449.  # Files to distribute.
  450.  DISTFILES = COPYING ChangeLog ChangeLog.1 INSTALL \
  451.      Makefile.in NEWS README TODO $(M4FILES) \
  452.      acconfig.h acfunctions acheaders acidentifiers \
  453. -    acmakevars acprograms autoconf.info* \
  454. +    acmakevars acprograms autoconf.info* autoconf.guide\
  455.      autoconf.sh autoconf.texi install.texi \
  456.      autoheader.sh autoscan.pl autoreconf.sh autoupdate.sh ifnames.sh \
  457.      config.guess config.sub configure configure.in \
  458.      install-sh mkinstalldirs texinfo.tex \
  459.      testsuite/Makefile.in testsuite/config/*.exp \
  460.      testsuite/lib/*.exp testsuite/autoconf.[gs]/*.exp \
  461. -    standards.texi make-stds.texi standards.info*
  462. +    standards.texi make-stds.texi standards.info* standards.guide \
  463. +    autoconf.dvi autoconf.ps standards.dvi standards.ps
  464.  
  465.  editsh = sed -e 's,@''datadir''@,$(acdatadir),g' -e \
  466.      's,@''M4''@,$(M4),g'  -e 's,@''AWK''@,$(AWK),g'
  467.  editpl = sed -e 's,@''datadir''@,$(acdatadir),g' -e 's,@''PERL''@,$(PERL),g'
  468.  
  469. -all: ${SCRIPTS} info
  470. +all: ${SCRIPTS} info guide dvi ps
  471.  
  472.  .SUFFIXES:
  473.  .SUFFIXES: .sh .pl
  474. @@ -110,6 +121,22 @@ autoconf.dvi: autoconf.texi
  475.  standards.dvi: standards.texi make-stds.texi
  476.      $(TEXI2DVI) $(srcdir)/standards.texi
  477.  
  478. +guide: autoconf.guide standards.guide
  479. +
  480. +autoconf.guide: autoconf.texi install.texi
  481. +    $(MAKEINFO) -I$(srcdir) $(srcdir)/autoconf.texi --no-split --output=$@ --amiga
  482. +
  483. +standards.guide: standards.texi make-stds.texi
  484. +    $(MAKEINFO) -I$(srcdir) $(srcdir)/standards.texi --no-split --output=$@ --amiga
  485. +
  486. +ps: autoconf.ps standards.ps
  487. +
  488. +autoconf.ps: autoconf.dvi
  489. +    $(DVIPS) -o $@ $?
  490. +
  491. +standards.ps: standards.dvi
  492. +    $(DVIPS) -o $@ $?
  493. +
  494.  check: all
  495.      rootme=`pwd`; srcrootme=`cd $(srcdir); pwd`; \
  496.      test -r install-sh || cp $(srcdir)/install-sh .; \
  497. @@ -120,9 +147,9 @@ installcheck: all install
  498.      cd testsuite && ${MAKE} AUTOCONF=${bindir}/autoconf $@
  499.  
  500.  installdirs:
  501. -    $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(acdatadir)
  502. +    $(SHELL) ${srcdir}/mkinstalldirs $(bindir) $(infodir) $(guidedir) $(dvidir) $(psdir) $(acdatadir)
  503.  
  504. -install: all $(M4FILES) acconfig.h installdirs install-info
  505. +install: all $(M4FILES) acconfig.h installdirs install-info install-guide install-dvi install-ps
  506.      @case `$(M4) --help < /dev/null 2>&1` in \
  507.      *reload-state*) echo installing frozen m4 files; \
  508.        $(M4) -F $(acdatadir)/autoconf.m4f -I${srcdir} ${srcdir}/autoconf.m4 ; \
  509. @@ -156,6 +183,39 @@ install-info: info installdirs
  510.        done; \
  511.      fi
  512.  
  513. +install-guide: guide installdirs
  514. +    if test -f autoconf.guide; then \
  515. +      for i in *.guide; do \
  516. +        $(INSTALL_DATA) $$i $(guidedir)/$$i; \
  517. +      done; \
  518. +    else \
  519. +      for i in $(srcdir)/*.guide; do \
  520. +        $(INSTALL_DATA) $$i $(guidedir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  521. +      done; \
  522. +    fi
  523. +
  524. +install-dvi: dvi installdirs
  525. +    if test -f autoconf.dvi; then \
  526. +      for i in *.dvi; do \
  527. +        $(INSTALL_DATA) $$i $(dvidir)/$$i; \
  528. +      done; \
  529. +    else \
  530. +      for i in $(srcdir)/*.dvi; do \
  531. +        $(INSTALL_DATA) $$i $(dvidir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  532. +      done; \
  533. +    fi
  534. +
  535. +install-ps: ps installdirs
  536. +    if test -f autoconf.ps; then \
  537. +      for i in *.ps; do \
  538. +        $(INSTALL_DATA) $$i $(psdir)/$$i; \
  539. +      done; \
  540. +    else \
  541. +      for i in $(srcdir)/*.ps; do \
  542. +        $(INSTALL_DATA) $$i $(psdir)/`echo $$i | sed 's|^$(srcdir)/||'`; \
  543. +      done; \
  544. +    fi
  545. +
  546.  uninstall:
  547.      for p in $(SCRIPTS); do \
  548.        rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
  549. @@ -164,6 +224,15 @@ uninstall:
  550.      cd $(infodir) && rm -f autoconf.info*
  551.      if test -f standards.info || test -f $(srcdir)/standards.info; \
  552.      then cd $(infodir) && rm -f standards.info*; fi
  553. +    cd $(guidedir) && rm -f autoconf.guide
  554. +    if test -f standards.guide || test -f $(srcdir)/standards.guide; \
  555. +    then cd $(guidedir) && rm -f standards.guide; fi
  556. +    cd $(dvidir) && rm -f autoconf.dvi
  557. +    if test -f standards.dvi || test -f $(srcdir)/standards.dvi; \
  558. +    then cd $(psdir) && rm -f standards.ps; fi
  559. +    cd $(psdir) && rm -f autoconf.ps
  560. +    if test -f standards.ps || test -f $(srcdir)/standards.ps; \
  561. +    then cd $(psdir) && rm -f standards.ps; fi
  562.  
  563.  ${srcdir}/configure: configure.in $(M4FILES)
  564.      cd $(srcdir) && \
  565. @@ -178,7 +247,7 @@ config.status: configure
  566.  maintainer-clean::
  567.      @echo "This command is intended for maintainers to use;"
  568.      @echo "rebuilding the deleted files requires makeinfo."
  569. -    rm -f TAGS *.info* INSTALL
  570. +    rm -f TAGS *.info* INSTALL *.guide *.dvi *.ps
  571.  
  572.  clean mostlyclean distclean maintainer-clean::
  573.      for dir in $(SUBDIRS); do \
  574. diff -rup --new-file baseline/fsf/autoconf/Product-Info amiga/fsf/autoconf/Product-Info
  575. --- baseline/fsf/autoconf/Product-Info    Wed Dec 31 17:00:00 1969
  576. +++ amiga/fsf/autoconf/Product-Info    Tue Sep 24 12:00:00 1996
  577. @@ -0,0 +1,28 @@
  578. +.name
  579. +autoconf
  580. +.fullname
  581. +GNU autoconfig
  582. +.type
  583. +Programmer Tool
  584. +.short
  585. +GNU automatic configuration generator.
  586. +.description
  587. +Autoconf is an extensible package of m4 macros that produce shell
  588. +scripts to automatically configure software source code packages.
  589. +These scripts can adapt the packages to many kinds of UNIX-like
  590. +systems without manual user intervention.  Autoconf creates a
  591. +configuration script for a package from a template file that lists the
  592. +operating system features that the package can use, in the form of m4
  593. +macro calls.
  594. +
  595. +Autoconf requires GNU m4.  The configuration scripts produced by
  596. +Autoconf are independent of Autoconf when they are run, so their users
  597. +do not need to have Autoconf (or GNU m4).
  598. +.version
  599. +2.10
  600. +.author
  601. +Free Software Foundation
  602. +.distribution
  603. +GNU Public License
  604. +.described-by
  605. +Fred Fish (fnf@amigalib.com)
  606. diff -rup --new-file baseline/fsf/autoconf/acconfig.h amiga/fsf/autoconf/acconfig.h
  607. --- baseline/fsf/autoconf/acconfig.h    Thu Feb  9 15:44:35 1995
  608. +++ amiga/fsf/autoconf/acconfig.h    Tue Sep 24 12:00:00 1996
  609. @@ -166,6 +166,12 @@
  610.  /* Define to `long' if <sys/types.h> doesn't define.  */
  611.  #undef off_t
  612.  
  613. +/* Define to the name of the distribution.  */
  614. +#undef PACKAGE
  615. +
  616. +/* The concatenation of the strings PACKAGE, "-", and VERSION.  */
  617. +#undef PACKAGE_VERSION
  618. +
  619.  /* Define to `int' if <sys/types.h> doesn't define.  */
  620.  #undef pid_t
  621.  
  622. @@ -232,6 +238,9 @@
  623.  
  624.  /* Define if you do not have <strings.h>, index, bzero, etc..  */
  625.  #undef USG
  626. +
  627. +/* Define to the version of the distribution.  */
  628. +#undef VERSION
  629.  
  630.  /* Define vfork as fork if vfork does not work.  */
  631.  #undef vfork
  632. diff -rup --new-file baseline/fsf/autoconf/acgeneral.m4 amiga/fsf/autoconf/acgeneral.m4
  633. --- baseline/fsf/autoconf/acgeneral.m4    Tue May  7 10:20:38 1996
  634. +++ amiga/fsf/autoconf/acgeneral.m4    Tue Sep 24 12:00:00 1996
  635. @@ -195,6 +195,9 @@ libdir='${exec_prefix}/lib'
  636.  includedir='${prefix}/include'
  637.  oldincludedir='/usr/include'
  638.  infodir='${prefix}/info'
  639. +guidedir='${prefix}/guide'
  640. +psdir='${prefix}/ps'
  641. +dvidir='${prefix}/dvi'
  642.  mandir='${prefix}/man'
  643.  
  644.  # Initialize some other variables.
  645. @@ -316,6 +319,9 @@ Directory and file names:
  646.    --includedir=DIR        C header files in DIR [PREFIX/include]
  647.    --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  648.    --infodir=DIR           info documentation in DIR [PREFIX/info]
  649. +  --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  650. +  --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  651. +  --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  652.    --mandir=DIR            man documentation in DIR [PREFIX/man]
  653.    --srcdir=DIR            find the sources in DIR [configure dir or ..]
  654.    --program-prefix=PREFIX prepend PREFIX to installed program names
  655. @@ -359,6 +365,18 @@ EOF
  656.    -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  657.      infodir="$ac_optarg" ;;
  658.  
  659. + -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  660. +   ac_prev=guidedir ;;
  661. + -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  662. +
  663. + -psdir | --psdir | --psdi | --psd | --ps)
  664. +   ac_prev=psdir ;;
  665. + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  666. +
  667. + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  668. +   ac_prev=dvidir ;;
  669. + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  670. +
  671.    -libdir | --libdir | --libdi | --libd)
  672.      ac_prev=libdir ;;
  673.    -libdir=* | --libdir=* | --libdi=* | --libd=*)
  674. @@ -697,6 +715,9 @@ AC_SUBST(libdir)dnl
  675.  AC_SUBST(includedir)dnl
  676.  AC_SUBST(oldincludedir)dnl
  677.  AC_SUBST(infodir)dnl
  678. +AC_SUBST(guidedir)dnl
  679. +AC_SUBST(psdir)dnl
  680. +AC_SUBST(dvidir)dnl
  681.  AC_SUBST(mandir)dnl
  682.  ])
  683.  
  684. @@ -1432,7 +1453,7 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_l
  685.    AC_MSG_RESULT(yes)
  686.    ifelse([$3], ,
  687.  [changequote(, )dnl
  688. -  ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  689. +  ac_tr_lib=HAVE_LIB`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz+' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
  690.  changequote([, ])dnl
  691.    AC_DEFINE_UNQUOTED($ac_tr_lib)
  692.    LIBS="-l$1 $LIBS"
  693. @@ -1585,7 +1606,7 @@ dnl [#]line __oline__ "[$]0"
  694.  [#]line __oline__ "configure"
  695.  #include "confdefs.h"
  696.  [$1]
  697. -int main() { return 0; }
  698. +int main() { t(); return 0; }
  699.  int t() {
  700.  [$2]
  701.  ; return 0; }
  702. @@ -1831,7 +1852,9 @@ ifdef([AC_LIST_HEADER], [DEFS=-DHAVE_CON
  703.  : ${CONFIG_STATUS=./config.status}
  704.  
  705.  echo creating $CONFIG_STATUS
  706. -rm -f $CONFIG_STATUS
  707. +# Some systems, like AmigaOS, won't allow you to remove a script that is
  708. +# being executed, so just move it out of the way instead.
  709. +if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  710.  cat > $CONFIG_STATUS <<EOF
  711.  #! /bin/sh
  712.  # Generated automatically by configure.
  713. @@ -1889,6 +1912,7 @@ $2
  714.  exit 0
  715.  EOF
  716.  chmod +x $CONFIG_STATUS
  717. +rm -f CONFIG.STATUS.old
  718.  rm -fr confdefs* $ac_clean_files
  719.  test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  720.  dnl config.status should not do recursion.
  721. diff -rup --new-file baseline/fsf/autoconf/acspecific.m4 amiga/fsf/autoconf/acspecific.m4
  722. --- baseline/fsf/autoconf/acspecific.m4    Thu Mar 21 08:52:58 1996
  723. +++ amiga/fsf/autoconf/acspecific.m4    Thu Oct  3 12:01:02 1996
  724. @@ -102,9 +102,9 @@ fi
  725.  rm -f conftest*
  726.  ])
  727.      if test $ac_cv_prog_gcc_g = yes; then
  728. -      CFLAGS="-g -O"
  729. +      CFLAGS="-g -O2"
  730.      else
  731. -      CFLAGS="-O"
  732. +      CFLAGS="-O2"
  733.      fi
  734.    fi
  735.  else
  736. @@ -143,9 +143,9 @@ rm -f conftest*
  737.  ])
  738.  dnl
  739.      if test $ac_cv_prog_gxx_g = yes; then
  740. -      CXXFLAGS="-g -O"
  741. +      CXXFLAGS="-g -O2"
  742.      else
  743. -      CXXFLAGS="-O"
  744. +      CXXFLAGS="-O2"
  745.      fi
  746.    fi
  747.  else
  748. @@ -371,6 +371,7 @@ AC_DEFUN(AC_PROG_INSTALL,
  749.  # SunOS /usr/etc/install
  750.  # IRIX /sbin/install
  751.  # AIX /bin/install
  752. +# AmigaOS /c/install
  753.  # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  754.  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  755.  # ./install, which can be erroneously created by make from ./install.sh.
  756. @@ -381,7 +382,7 @@ AC_CACHE_VAL(ac_cv_path_install,
  757.    for ac_dir in $PATH; do
  758.      # Account for people who put trailing slashes in PATH elements.
  759.      case "$ac_dir/" in
  760. -    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  761. +    /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  762.      *)
  763.        # OSF1 and SCO ODT 3.0 have their own names for install.
  764.        for ac_prog in ginstall installbsd scoinst install; do
  765. @@ -869,7 +870,11 @@ main()
  766.          if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
  767.                  exit(0);
  768.  
  769. +#ifdef __amigaos__
  770. +        child = vfork();
  771. +#else
  772.          child = fork();
  773. +#endif
  774.          if (child < 0)
  775.                  exit(1);
  776.          else if (child == 0) {
  777. @@ -951,6 +956,12 @@ main() {
  778.  
  779.    sparc_address_test ();
  780.  
  781. +#ifdef __amigaos__
  782. +  /* Force this test to succeed for AmigaOS, which has a fairly good
  783. +     vfork() emulation, but doesn't support fork() at all.  -fnf */
  784. +  exit (0);
  785. +#endif
  786. +
  787.    child = vfork ();
  788.  
  789.    if (child == 0) {
  790. @@ -1007,7 +1018,7 @@ fi
  791.  ])
  792.  
  793.  AC_DEFUN(AC_FUNC_WAIT3,
  794. -[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3,
  795. +[AC_CACHE_CHECK(for wait3 that fills in rusage, ac_cv_func_wait3_rsuage,
  796.  [AC_TRY_RUN([#include <sys/types.h>
  797.  #include <sys/time.h>
  798.  #include <sys/resource.h>
  799. @@ -1024,7 +1035,11 @@ main() {
  800.    r.ru_stime.tv_sec = 0;
  801.    r.ru_stime.tv_usec = 0;
  802.    r.ru_majflt = r.ru_minflt = 0;
  803. +#ifdef __amigaos__
  804. +  switch (vfork()) {
  805. +#else
  806.    switch (fork()) {
  807. +#endif
  808.    case 0: /* Child.  */
  809.      sleep(1); /* Give up the CPU.  */
  810.      _exit(0);
  811. @@ -1035,8 +1050,8 @@ main() {
  812.      exit(r.ru_nvcsw == 0 && r.ru_majflt == 0 && r.ru_minflt == 0
  813.       && r.ru_stime.tv_sec == 0 && r.ru_stime.tv_usec == 0);
  814.    }
  815. -}], ac_cv_func_wait3=yes, ac_cv_func_wait3=no, ac_cv_func_wait3=no)])
  816. -if test $ac_cv_func_wait3 = yes; then
  817. +}], ac_cv_func_wait3_rsuage=yes, ac_cv_func_wait3_rsuage=no, ac_cv_func_wait3_rsuage=no)])
  818. +if test $ac_cv_func_wait3_rsuage = yes; then
  819.    AC_DEFINE(HAVE_WAIT3)
  820.  fi
  821.  ])
  822. @@ -1136,7 +1151,7 @@ AC_CHECK_LIB(util, getloadavg,
  823.  if test $ac_have_func = no; then
  824.    # There is a commonly available library for RS/6000 AIX.
  825.    # Since it is not a standard part of AIX, it might be installed locally.
  826. -  ac_save_LIBS="$LIBS" LIBS="-L/usr/local/lib $LIBS"
  827. +  ac_save_LIBS="$LIBS" LIBS="-L/local/lib $LIBS"
  828.    AC_CHECK_LIB(getloadavg, getloadavg,
  829.      LIBS="-lgetloadavg $LIBS", LIBS="$ac_save_LIBS")
  830.  fi
  831. @@ -1262,6 +1277,13 @@ AC_DEFUN(AC_FUNC_SETVBUF_REVERSED,
  832.  [AC_TRY_RUN([#include <stdio.h>
  833.  /* If setvbuf has the reversed format, exit 0. */
  834.  main () {
  835. +#ifdef __amigaos__
  836. +  /* AmigaOS is a non-reversed system.  Instead of the test program
  837. +     getting a segfault (no memory protection), it causes enforcer hits
  838. +     or other nastiness, so don't run the test program, just exit with
  839. +     status 1 to indicate that it is non-reversed.  -fnf */
  840. +  exit(1);
  841. +#endif
  842.    /* This call has the arguments reversed.
  843.       A reversed system may check and see that the address of main
  844.       is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
  845. @@ -1627,7 +1649,11 @@ AC_DEFUN(AC_SYS_RESTARTABLE_SYSCALLS,
  846.  #include <signal.h>
  847.  ucatch (isig) { }
  848.  main () {
  849. +#ifdef __amigaos__
  850. +  int i = vfork (), status;
  851. +#else
  852.    int i = fork (), status;
  853. +#endif
  854.    if (i == 0) { sleep (3); kill (getppid (), SIGINT); sleep (3); exit (0); }
  855.    signal (SIGINT, ucatch);
  856.    status = wait(&i);
  857. @@ -1712,15 +1738,17 @@ EOF
  858.      done
  859.      # Screen out bogus values from the imake configuration.
  860.      case "$ac_im_incroot" in
  861. -    /usr/include) ;;
  862. +    /ade/include) ;;
  863.      *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  864.      esac
  865.      case "$ac_im_usrlibdir" in
  866. -    /usr/lib | /lib) ;;
  867. +    /ade/lib) ;;
  868.      *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  869.      esac
  870.    fi
  871.    cd ..
  872. +  # AmigaOS hack - give lock on conftestdir time to expire before rm -fr.
  873. +  sleep 2
  874.    rm -fr conftestdir
  875.  fi
  876.  ])
  877. @@ -1738,40 +1766,40 @@ AC_TRY_CPP([#include <$x_direct_test_inc
  878.  ac_x_includes=],
  879.  [# Look for the header file in a standard set of common directories.
  880.    for ac_dir in               \
  881. -    /usr/X11R6/include        \
  882. -    /usr/X11R5/include        \
  883. -    /usr/X11R4/include        \
  884. +    /ade/X11R6/include        \
  885. +    /ade/X11R5/include        \
  886. +    /ade/X11R4/include        \
  887.                                \
  888. -    /usr/include/X11R6        \
  889. -    /usr/include/X11R5        \
  890. -    /usr/include/X11R4        \
  891. +    /ade/include/X11R6        \
  892. +    /ade/include/X11R5        \
  893. +    /ade/include/X11R4        \
  894.                                \
  895. -    /usr/local/X11R6/include  \
  896. -    /usr/local/X11R5/include  \
  897. -    /usr/local/X11R4/include  \
  898. +    /local/X11R6/include  \
  899. +    /local/X11R5/include  \
  900. +    /local/X11R4/include  \
  901.                                \
  902. -    /usr/local/include/X11R6  \
  903. -    /usr/local/include/X11R5  \
  904. -    /usr/local/include/X11R4  \
  905. +    /local/include/X11R6  \
  906. +    /local/include/X11R5  \
  907. +    /local/include/X11R4  \
  908.                                \
  909. -    /usr/X11/include          \
  910. -    /usr/include/X11          \
  911. -    /usr/local/X11/include    \
  912. -    /usr/local/include/X11    \
  913. +    /ade/X11/include          \
  914. +    /ade/include/X11          \
  915. +    /local/X11/include    \
  916. +    /local/include/X11    \
  917.                                \
  918. -    /usr/X386/include         \
  919. -    /usr/x386/include         \
  920. -    /usr/XFree86/include/X11  \
  921. +    /ade/X386/include         \
  922. +    /ade/x386/include         \
  923. +    /ade/XFree86/include/X11  \
  924.                                \
  925. -    /usr/include              \
  926. -    /usr/local/include        \
  927. -    /usr/unsupported/include  \
  928. -    /usr/athena/include       \
  929. -    /usr/local/x11r5/include  \
  930. -    /usr/lpp/Xamples/include  \
  931. +    /ade/include              \
  932. +    /local/include        \
  933. +    /ade/unsupported/include  \
  934. +    /ade/athena/include       \
  935. +    /local/x11r5/include  \
  936. +    /ade/lpp/Xamples/include  \
  937.                                \
  938. -    /usr/openwin/include      \
  939. -    /usr/openwin/share/include \
  940. +    /ade/openwin/include      \
  941. +    /ade/openwin/share/include \
  942.      ; \
  943.    do
  944.      if test -r "$ac_dir/$x_direct_test_include"; then
  945. @@ -1798,40 +1826,40 @@ ac_x_libraries=],
  946.  [LIBS="$ac_save_LIBS"
  947.  # First see if replacing the include by lib works.
  948.  for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  949. -    /usr/X11R6/lib        \
  950. -    /usr/X11R5/lib        \
  951. -    /usr/X11R4/lib        \
  952. +    /ade/X11R6/lib        \
  953. +    /ade/X11R5/lib        \
  954. +    /ade/X11R4/lib        \
  955.                            \
  956. -    /usr/lib/X11R6        \
  957. -    /usr/lib/X11R5        \
  958. -    /usr/lib/X11R4        \
  959. +    /ade/lib/X11R6        \
  960. +    /ade/lib/X11R5        \
  961. +    /ade/lib/X11R4        \
  962.                            \
  963. -    /usr/local/X11R6/lib  \
  964. -    /usr/local/X11R5/lib  \
  965. -    /usr/local/X11R4/lib  \
  966. +    /local/X11R6/lib  \
  967. +    /local/X11R5/lib  \
  968. +    /local/X11R4/lib  \
  969.                            \
  970. -    /usr/local/lib/X11R6  \
  971. -    /usr/local/lib/X11R5  \
  972. -    /usr/local/lib/X11R4  \
  973. +    /local/lib/X11R6  \
  974. +    /local/lib/X11R5  \
  975. +    /local/lib/X11R4  \
  976.                            \
  977. -    /usr/X11/lib          \
  978. -    /usr/lib/X11          \
  979. -    /usr/local/X11/lib    \
  980. -    /usr/local/lib/X11    \
  981. +    /ade/X11/lib          \
  982. +    /ade/lib/X11          \
  983. +    /local/X11/lib    \
  984. +    /local/lib/X11    \
  985.                            \
  986. -    /usr/X386/lib         \
  987. -    /usr/x386/lib         \
  988. -    /usr/XFree86/lib/X11  \
  989. +    /ade/X386/lib         \
  990. +    /ade/x386/lib         \
  991. +    /ade/XFree86/lib/X11  \
  992.                            \
  993. -    /usr/lib              \
  994. -    /usr/local/lib        \
  995. -    /usr/unsupported/lib  \
  996. -    /usr/athena/lib       \
  997. -    /usr/local/x11r5/lib  \
  998. -    /usr/lpp/Xamples/lib  \
  999. +    /ade/lib              \
  1000. +    /local/lib        \
  1001. +    /ade/unsupported/lib  \
  1002. +    /ade/athena/lib       \
  1003. +    /local/x11r5/lib  \
  1004. +    /ade/lpp/Xamples/lib  \
  1005.                            \
  1006. -    /usr/openwin/lib      \
  1007. -    /usr/openwin/share/lib \
  1008. +    /ade/openwin/lib      \
  1009. +    /ade/openwin/share/lib \
  1010.      ; \
  1011.  do
  1012.  dnl XXX Shouldn't this really use AC_TRY_LINK to be portable & robust??
  1013. diff -rup --new-file baseline/fsf/autoconf/autoconf.info amiga/fsf/autoconf/autoconf.info
  1014. --- baseline/fsf/autoconf/autoconf.info    Fri Mar  8 13:10:18 1996
  1015. +++ amiga/fsf/autoconf/autoconf.info    Wed Dec 31 17:00:00 1969
  1016. @@ -1,5459 +0,0 @@
  1017. -This is Info file ../autoconf.info, produced by Makeinfo-1.63 from the
  1018. -input file ../autoconf.texi.
  1019. -
  1020. -START-INFO-DIR-ENTRY
  1021. -* Autoconf: (autoconf).         Create source code configuration scripts.
  1022. -END-INFO-DIR-ENTRY
  1023. -
  1024. -   Autoconf: Creating Automatic Configuration Scripts, by David
  1025. -MacKenzie.
  1026. -
  1027. -   This file documents the GNU Autoconf package for creating scripts to
  1028. -configure source code packages using templates and an `m4' macro
  1029. -package.
  1030. -
  1031. -   Copyright (C) 1992, 1993, 1994, 1995, 1996 Free Software Foundation,
  1032. -Inc.
  1033. -
  1034. -   Permission is granted to make and distribute verbatim copies of this
  1035. -manual provided the copyright notice and this permission notice are
  1036. -preserved on all copies.
  1037. -
  1038. -   Permission is granted to copy and distribute modified versions of
  1039. -this manual under the conditions for verbatim copying, provided that
  1040. -the entire resulting derived work is distributed under the terms of a
  1041. -permission notice identical to this one.
  1042. -
  1043. -   Permission is granted to copy and distribute translations of this
  1044. -manual into another language, under the above conditions for modified
  1045. -versions, except that this permission notice may be stated in a
  1046. -translation approved by the Foundation.
  1047. -
  1048. -
  1049. -File: autoconf.info,  Node: Top,  Next: Introduction,  Up: (dir)
  1050. -
  1051. -   This file documents the GNU Autoconf package for creating scripts to
  1052. -configure source code packages using templates and an `m4' macro
  1053. -package.  This is edition 2.8, for Autoconf version 2.8.
  1054. -
  1055. -* Menu:
  1056. -
  1057. -* Introduction::                Autoconf's purpose, strengths, and weaknesses.
  1058. -* Making configure Scripts::    How to organize and produce Autoconf scripts.
  1059. -* Setup::                       Initialization and output.
  1060. -* Existing Tests::              Macros that check for particular features.
  1061. -* Writing Tests::               How to write new feature checks.
  1062. -* Results::                     What to do with results from feature checks.
  1063. -* Writing Macros::              Adding new macros to Autoconf.
  1064. -* Manual Configuration::        Selecting features that can't be guessed.
  1065. -* Site Configuration::          Local defaults for `configure'.
  1066. -* Invoking configure::          How to use the Autoconf output.
  1067. -* Invoking config.status::      Recreating a configuration.
  1068. -* Questions::                   Questions about Autoconf, with answers.
  1069. -* Upgrading::                   Tips for upgrading from version 1.
  1070. -* History::                     History of Autoconf.
  1071. -* Old Macro Names::        Backward compatibility macros.
  1072. -* Environment Variable Index::  Index of environment variables used.
  1073. -* Output Variable Index::       Index of variables set in output files.
  1074. -* Preprocessor Symbol Index::   Index of C preprocessor symbols defined.
  1075. -* Macro Index::                 Index of Autoconf macros.
  1076. -
  1077. - -- The Detailed Node Listing --
  1078. -
  1079. -Making `configure' Scripts
  1080. -
  1081. -* Writing configure.in::    What to put in an Autoconf input file.
  1082. -* Invoking autoscan::           Semi-automatic `configure.in' writing.
  1083. -* Invoking ifnames::            Listing the conditionals in source code.
  1084. -* Invoking autoconf::        How to create configuration scripts.
  1085. -* Invoking autoreconf::         Remaking multiple `configure' scripts.
  1086. -
  1087. -Initialization and Output Files
  1088. -
  1089. -* Input::                       Where Autoconf should find files.
  1090. -* Output::            Creating output files.
  1091. -* Makefile Substitutions::      Using output variables in `Makefile's.
  1092. -* Configuration Headers::       Creating a configuration header file.
  1093. -* Subdirectories::              Configuring independent packages together.
  1094. -* Default Prefix::              Changing the default installation prefix.
  1095. -* Versions::                    Version numbers in `configure'.
  1096. -
  1097. -Substitutions in Makefiles
  1098. -
  1099. -* Preset Output Variables::    Output variables that are always set.
  1100. -* Build Directories::       Supporting multiple concurrent compiles.
  1101. -* Automatic Remaking::        Makefile rules for configuring.
  1102. -
  1103. -Configuration Header Files
  1104. -
  1105. -* Header Templates::            Input for the configuration headers.
  1106. -* Invoking autoheader::        How to create configuration templates.
  1107. -
  1108. -Existing Tests
  1109. -
  1110. -* Alternative Programs::    Selecting between alternative programs.
  1111. -* Libraries::                   Library archives that might be missing.
  1112. -* Library Functions::        C library functions that might be missing.
  1113. -* Header Files::        Header files that might be missing.
  1114. -* Structures::            Structures or members that might be missing.
  1115. -* Typedefs::            `typedef's that might be missing.
  1116. -* Compiler Characteristics::    C compiler or machine architecture features.
  1117. -* System Services::        Operating system services.
  1118. -* UNIX Variants::        Special kludges for specific UNIX variants.
  1119. -
  1120. -Alternative Programs
  1121. -
  1122. -* Particular Programs::         Special handling to find certain programs.
  1123. -* Generic Programs::            How to find other programs.
  1124. -
  1125. -Library Functions
  1126. -
  1127. -* Particular Functions::        Special handling to find certain functions.
  1128. -* Generic Functions::           How to find other functions.
  1129. -
  1130. -Header Files
  1131. -
  1132. -* Particular Headers::          Special handling to find certain headers.
  1133. -* Generic Headers::             How to find other headers.
  1134. -
  1135. -Typedefs
  1136. -
  1137. -* Particular Typedefs::         Special handling to find certain types.
  1138. -* Generic Typedefs::            How to find other types.
  1139. -
  1140. -Writing Tests
  1141. -
  1142. -* Examining Declarations::    Detecting header files and declarations.
  1143. -* Examining Syntax::            Detecting language syntax features.
  1144. -* Examining Libraries::         Detecting functions and global variables.
  1145. -* Run Time::                Testing for run-time features.
  1146. -* Portable Shell::              Shell script portability pitfalls.
  1147. -* Testing Values and Files::    Checking strings and files.
  1148. -* Multiple Cases::        Tests for several possible values.
  1149. -* Language Choice::             Selecting which language to use for testing.
  1150. -
  1151. -Checking Run Time Behavior
  1152. -
  1153. -* Test Programs::               Running test programs.
  1154. -* Guidelines::            General rules for writing test programs.
  1155. -* Test Functions::        Avoiding pitfalls in test programs.
  1156. -
  1157. -Results of Tests
  1158. -
  1159. -* Defining Symbols::            Defining C preprocessor symbols.
  1160. -* Setting Output Variables::    Replacing variables in output files.
  1161. -* Caching Results::             Speeding up subsequent `configure' runs.
  1162. -* Printing Messages::           Notifying users of progress or problems.
  1163. -
  1164. -Caching Results
  1165. -
  1166. -* Cache Variable Names::        Shell variables used in caches.
  1167. -* Cache Files::                Files `configure' uses for caching.
  1168. -
  1169. -Writing Macros
  1170. -
  1171. -* Macro Definitions::        Basic format of an Autoconf macro.
  1172. -* Macro Names::                 What to call your new macros.
  1173. -* Quoting::            Protecting macros from unwanted expansion.
  1174. -* Dependencies Between Macros::    What to do when macros depend on other macros.
  1175. -
  1176. -Dependencies Between Macros
  1177. -
  1178. -* Prerequisite Macros::        Ensuring required information.
  1179. -* Suggested Ordering::        Warning about possible ordering problems.
  1180. -* Obsolete Macros::             Warning about old ways of doing things.
  1181. -
  1182. -Manual Configuration
  1183. -
  1184. -* Specifying Names::            Specifying the system type.
  1185. -* Canonicalizing::              Getting the canonical system type.
  1186. -* System Type Variables::       Variables containing the system type.
  1187. -* Using System Type::           What to do with the system type.
  1188. -
  1189. -Site Configuration
  1190. -
  1191. -* External Software::           Working with other optional software.
  1192. -* Package Options::             Selecting optional features.
  1193. -* Site Details::                Configuring site details.
  1194. -* Transforming Names::          Changing program names when installing.
  1195. -* Site Defaults::               Giving `configure' local defaults.
  1196. -
  1197. -Transforming Program Names When Installing
  1198. -
  1199. -* Transformation Options::      `configure' options to transform names.
  1200. -* Transformation Examples::     Sample uses of transforming names.
  1201. -* Transformation Rules::        `Makefile' uses of transforming names.
  1202. -
  1203. -Running `configure' Scripts
  1204. -
  1205. -* Basic Installation::          Instructions for typical cases.
  1206. -* Compilers and Options::       Selecting compilers and optimization.
  1207. -* Multiple Architectures::      Compiling for multiple architectures at once.
  1208. -* Installation Names::          Installing in different directories.
  1209. -* Optional Features::           Selecting optional features.
  1210. -* System Type::                 Specifying the system type.
  1211. -* Sharing Defaults::            Setting site-wide defaults for `configure'.
  1212. -* Operation Controls::          Changing how `configure' runs.
  1213. -
  1214. -Questions About Autoconf
  1215. -
  1216. -* Distributing::                Distributing `configure' scripts.
  1217. -* Why GNU m4::                  Why not use the standard `m4'?
  1218. -* Bootstrapping::               Autoconf and GNU `m4' require each other?
  1219. -* Why Not Imake::               Why GNU uses `configure' instead of Imake.
  1220. -
  1221. -Upgrading From Version 1
  1222. -
  1223. -* Changed File Names::          Files you might rename.
  1224. -* Changed Makefiles::           New things to put in `Makefile.in'.
  1225. -* Changed Macros::              Macro calls you might replace.
  1226. -* Invoking autoupdate::         Replacing old macro names in `configure.in'.
  1227. -* Changed Results::             Changes in how to check test results.
  1228. -* Changed Macro Writing::       Better ways to write your own macros.
  1229. -
  1230. -History of Autoconf
  1231. -
  1232. -* Genesis::            Prehistory and naming of `configure'.
  1233. -* Exodus::            The plagues of `m4' and Perl.
  1234. -* Leviticus::            The priestly code of portability arrives.
  1235. -* Numbers::            Growth and contributors.
  1236. -* Deuteronomy::            Approaching the promises of easy configuration.
  1237. -
  1238. -
  1239. -File: autoconf.info,  Node: Introduction,  Next: Making configure Scripts,  Prev: Top,  Up: Top
  1240. -
  1241. -Introduction
  1242. -************
  1243. -
  1244. -     A physicist, an engineer, and a computer scientist were
  1245. -     discussing the nature of God.  Surely a Physicist, said the
  1246. -     physicist, because early in the Creation, God made Light; and you
  1247. -     know, Maxwell's equations, the dual nature of electro-magnetic
  1248. -     waves, the relativist consequences... An Engineer!, said the
  1249. -     engineer, because before making Light, God split the Chaos into
  1250. -     Land and Water; it takes a hell of an engineer to handle that big
  1251. -     amount of mud, and orderly separation of solids from
  1252. -     liquids... The computer scientist shouted: And the Chaos,
  1253. -     where do you think it was coming from, hmm?
  1254. -     
  1255. -     ---Anonymous
  1256. -
  1257. -   Autoconf is a tool for producing shell scripts that automatically
  1258. -configure software source code packages to adapt to many kinds of
  1259. -UNIX-like systems.  The configuration scripts produced by Autoconf are
  1260. -independent of Autoconf when they are run, so their users do not need to
  1261. -have Autoconf.
  1262. -
  1263. -   The configuration scripts produced by Autoconf require no manual user
  1264. -intervention when run; they do not normally even need an argument
  1265. -specifying the system type.  Instead, they test for the presence of each
  1266. -feature that the software package they are for might need individually.
  1267. -(Before each check, they print a one-line message stating what they are
  1268. -checking for, so the user doesn't get too bored while waiting for the
  1269. -script to finish.)  As a result, they deal well with systems that are
  1270. -hybrids or customized from the more common UNIX variants.  There is no
  1271. -need to maintain files that list the features supported by each release
  1272. -of each variant of UNIX.
  1273. -
  1274. -   For each software package that Autoconf is used with, it creates a
  1275. -configuration script from a template file that lists the system
  1276. -features that the package needs or can use.  After the shell code to
  1277. -recognize and respond to a system feature has been written, Autoconf
  1278. -allows it to be shared by many software packages that can use (or need)
  1279. -that feature.  If it later turns out that the shell code needs
  1280. -adjustment for some reason, it needs to be changed in only one place;
  1281. -all of the configuration scripts can be regenerated automatically to
  1282. -take advantage of the updated code.
  1283. -
  1284. -   The Metaconfig package is similar in purpose to Autoconf, but the
  1285. -scripts it produces require manual user intervention, which is quite
  1286. -inconvenient when configuring large source trees.  Unlike Metaconfig
  1287. -scripts, Autoconf scripts can support cross-compiling, if some care is
  1288. -taken in writing them.
  1289. -
  1290. -   There are several jobs related to making portable software packages
  1291. -that Autoconf currently does not do.  Among these are automatically
  1292. -creating `Makefile' files with all of the standard targets, and
  1293. -supplying replacements for standard library functions and header files
  1294. -on systems that lack them.  Work is in progress to add those features in
  1295. -the future.
  1296. -
  1297. -   Autoconf imposes some restrictions on the names of macros used with
  1298. -`#ifdef' in C programs (*note Preprocessor Symbol Index::.).
  1299. -
  1300. -   Autoconf requires GNU `m4' in order to generate the scripts.  It
  1301. -uses features that some UNIX versions of `m4' do not have.  It also
  1302. -overflows internal limits of some versions of `m4', including GNU `m4'
  1303. -1.0.  You must use version 1.1 or later of GNU `m4'.  Using version 1.3
  1304. -or later will be much faster than 1.1 or 1.2.
  1305. -
  1306. -   *Note Upgrading::, for information about upgrading from version 1.
  1307. -*Note History::, for the story of Autoconf's development.  *Note
  1308. -Questions::, for answers to some common questions about Autoconf.
  1309. -
  1310. -   Mail suggestions and bug reports for Autoconf to
  1311. -`bug-gnu-utils@prep.ai.mit.edu'.  Please include the Autoconf version
  1312. -number, which you can get by running `autoconf --version'.
  1313. -
  1314. -
  1315. -File: autoconf.info,  Node: Making configure Scripts,  Next: Setup,  Prev: Introduction,  Up: Top
  1316. -
  1317. -Making `configure' Scripts
  1318. -**************************
  1319. -
  1320. -   The configuration scripts that Autoconf produces are by convention
  1321. -called `configure'.  When run, `configure' creates several files,
  1322. -replacing configuration parameters in them with appropriate values.
  1323. -The files that `configure' creates are:
  1324. -
  1325. -   * one or more `Makefile' files, one in each subdirectory of the
  1326. -     package (*note Makefile Substitutions::.);
  1327. -
  1328. -   * optionally, a C header file, the name of which is configurable,
  1329. -     containing `#define' directives (*note Configuration Headers::.);
  1330. -
  1331. -   * a shell script called `config.status' that, when run, will recreate
  1332. -     the files listed above (*note Invoking config.status::.);
  1333. -
  1334. -   * a shell script called `config.cache' that saves the results of
  1335. -     running many of the tests (*note Cache Files::.);
  1336. -
  1337. -   * a file called `config.log' containing any messages produced by
  1338. -     compilers, to help debugging if `configure' makes a mistake.
  1339. -
  1340. -   To create a `configure' script with Autoconf, you need to write an
  1341. -Autoconf input file `configure.in' and run `autoconf' on it.  If you
  1342. -write your own feature tests to supplement those that come with
  1343. -Autoconf, you might also write files called `aclocal.m4' and
  1344. -`acsite.m4'.  If you use a C header file to contain `#define'
  1345. -directives, you might also write `acconfig.h', and you will distribute
  1346. -the Autoconf-generated file `config.h.in' with the package.
  1347. -
  1348. -   Here is a diagram showing how the files that can be used in
  1349. -configuration are produced.  Programs that are executed are suffixed by
  1350. -`*'.  Optional files are enclosed in square brackets (`[]').
  1351. -`autoconf' and `autoheader' also read the installed Autoconf macro
  1352. -files (by reading `autoconf.m4').
  1353. -
  1354. -Files used in preparing a software package for distribution:
  1355. -     your source files --> [autoscan*] --> [configure.scan] --> configure.in
  1356. -     
  1357. -     configure.in --.   .------> autoconf* -----> configure
  1358. -                    +---+
  1359. -     [aclocal.m4] --+   `---.
  1360. -     [acsite.m4] ---'       |
  1361. -                            +--> [autoheader*] -> [config.h.in]
  1362. -     [acconfig.h] ----.     |
  1363. -                      +-----'
  1364. -     [config.h.top] --+
  1365. -     [config.h.bot] --'
  1366. -     
  1367. -     Makefile.in -------------------------------> Makefile.in
  1368. -
  1369. -Files used in configuring a software package:
  1370. -                            .-------------> config.cache
  1371. -     configure* ------------+-------------> config.log
  1372. -                            |
  1373. -     [config.h.in] -.       v            .-> [config.h] -.
  1374. -                    +--> config.status* -+               +--> make*
  1375. -     Makefile.in ---'                    `-> Makefile ---'
  1376. -
  1377. -* Menu:
  1378. -
  1379. -* Writing configure.in::    What to put in an Autoconf input file.
  1380. -* Invoking autoscan::           Semi-automatic `configure.in' writing.
  1381. -* Invoking ifnames::            Listing the conditionals in source code.
  1382. -* Invoking autoconf::        How to create configuration scripts.
  1383. -* Invoking autoreconf::         Remaking multiple `configure' scripts.
  1384. -
  1385. -
  1386. -File: autoconf.info,  Node: Writing configure.in,  Next: Invoking autoscan,  Up: Making configure Scripts
  1387. -
  1388. -Writing `configure.in'
  1389. -======================
  1390. -
  1391. -   To produce a `configure' script for a software package, create a
  1392. -file called `configure.in' that contains invocations of the Autoconf
  1393. -macros that test the system features your package needs or can use.
  1394. -Autoconf macros already exist to check for many features; see *Note
  1395. -Existing Tests::, for their descriptions.  For most other features, you
  1396. -can use Autoconf template macros to produce custom checks; see *Note
  1397. -Writing Tests::, for information about them.  For especially tricky or
  1398. -specialized features, `configure.in' might need to contain some
  1399. -hand-crafted shell commands.  The `autoscan' program can give you a
  1400. -good start in writing `configure.in' (*note Invoking autoscan::., for
  1401. -more information).
  1402. -
  1403. -   The order in which `configure.in' calls the Autoconf macros is not
  1404. -important, with a few exceptions.  Every `configure.in' must contain a
  1405. -call to `AC_INIT' before the checks, and a call to `AC_OUTPUT' at the
  1406. -end (*note Output::.).  Additionally, some macros rely on other macros
  1407. -having been called first, because they check previously set values of
  1408. -some variables to decide what to do.  These macros are noted in the
  1409. -individual descriptions (*note Existing Tests::.), and they also warn
  1410. -you when creating `configure' if they are called out of order.
  1411. -
  1412. -   To encourage consistency, here is a suggested order for calling the
  1413. -Autoconf macros.  Generally speaking, the things near the end of this
  1414. -list could depend on things earlier in it.  For example, library
  1415. -functions could be affected by typedefs and libraries.
  1416. -
  1417. -     `AC_INIT(FILE)'
  1418. -     checks for programs
  1419. -     checks for libraries
  1420. -     checks for header files
  1421. -     checks for typedefs
  1422. -     checks for structures
  1423. -     checks for compiler characteristics
  1424. -     checks for library functions
  1425. -     checks for system services
  1426. -     `AC_OUTPUT([FILE...])'
  1427. -
  1428. -   It is best to put each macro call on its own line in `configure.in'.
  1429. -Most of the macros don't add extra newlines; they rely on the newline
  1430. -after the macro call to terminate the commands.  This approach makes
  1431. -the generated `configure' script a little easier to read by not
  1432. -inserting lots of blank lines.  It is generally safe to set shell
  1433. -variables on the same line as a macro call, because the shell allows
  1434. -assignments without intervening newlines.
  1435. -
  1436. -   When calling macros that take arguments, there must not be any blank
  1437. -space between the macro name and the open parenthesis.  Arguments can be
  1438. -more than one line long if they are enclosed within the `m4' quote
  1439. -characters `[' and `]'.  If you have a long line such as a list of file
  1440. -names, you can generally use a backslash at the end of a line to
  1441. -continue it logically on the next line (this is implemented by the
  1442. -shell, not by anything special that Autoconf does).
  1443. -
  1444. -   Some macros handle two cases: what to do if the given condition is
  1445. -met, and what to do if the condition is not met.  In some places you
  1446. -might want to do something if a condition is true but do nothing if it's
  1447. -false, or vice versa.  To omit the true case, pass an empty value for
  1448. -the ACTION-IF-FOUND argument to the macro.  To omit the false case,
  1449. -omit the ACTION-IF-NOT-FOUND argument to the macro, including the comma
  1450. -before it.
  1451. -
  1452. -   You can include comments in `configure.in' files by starting them
  1453. -with the `m4' builtin macro `dnl', which discards text up through the
  1454. -next newline.  These comments do not appear in the generated
  1455. -`configure' scripts.  For example, it is helpful to begin
  1456. -`configure.in' files with a line like this:
  1457. -
  1458. -     dnl Process this file with autoconf to produce a configure script.
  1459. -
  1460. -
  1461. -File: autoconf.info,  Node: Invoking autoscan,  Next: Invoking ifnames,  Prev: Writing configure.in,  Up: Making configure Scripts
  1462. -
  1463. -Using `autoscan' to Create `configure.in'
  1464. -=========================================
  1465. -
  1466. -   The `autoscan' program can help you create a `configure.in' file for
  1467. -a software package.  `autoscan' examines source files in the directory
  1468. -tree rooted at a directory given as a command line argument, or the
  1469. -current directory if none is given.  It searches the source files for
  1470. -common portability problems and creates a file `configure.scan' which
  1471. -is a preliminary `configure.in' for that package.
  1472. -
  1473. -   You should manually examine `configure.scan' before renaming it to
  1474. -`configure.in'; it will probably need some adjustments.  Occasionally
  1475. -`autoscan' outputs a macro in the wrong order relative to another
  1476. -macro, so that `autoconf' produces a warning; you need to move such
  1477. -macros manually.  Also, if you want the package to use a configuration
  1478. -header file, you must add a call to `AC_CONFIG_HEADER' (*note
  1479. -Configuration Headers::.).  You might also have to change or add some
  1480. -`#if' directives to your program in order to make it work with Autoconf
  1481. -(*note Invoking ifnames::., for information about a program that can
  1482. -help with that job).
  1483. -
  1484. -   `autoscan' uses several data files, which are installed along with
  1485. -the distributed Autoconf macro files, to determine which macros to
  1486. -output when it finds particular symbols in a package's source files.
  1487. -These files all have the same format.  Each line consists of a symbol,
  1488. -whitespace, and the Autoconf macro to output if that symbol is
  1489. -encountered.  Lines starting with `#' are comments.
  1490. -
  1491. -   `autoscan' is only installed if you already have Perl installed.
  1492. -`autoscan' accepts the following options:
  1493. -
  1494. -`--help'
  1495. -     Print a summary of the command line options and exit.
  1496. -
  1497. -`--macrodir=DIR'
  1498. -     Look for the data files in directory DIR instead of the default
  1499. -     installation directory.  You can also set the `AC_MACRODIR'
  1500. -     environment variable to a directory; this option overrides the
  1501. -     environment variable.
  1502. -
  1503. -`--verbose'
  1504. -     Print the names of the files it examines and the potentially
  1505. -     interesting symbols it finds in them.  This output can be
  1506. -     voluminous.
  1507. -
  1508. -`--version'
  1509. -     Print the version number of Autoconf and exit.
  1510. -
  1511. -
  1512. -File: autoconf.info,  Node: Invoking ifnames,  Next: Invoking autoconf,  Prev: Invoking autoscan,  Up: Making configure Scripts
  1513. -
  1514. -Using `ifnames' to List Conditionals
  1515. -====================================
  1516. -
  1517. -   `ifnames' can help when writing a `configure.in' for a software
  1518. -package.  It prints the identifiers that the package already uses in C
  1519. -preprocessor conditionals.  If a package has already been set up to
  1520. -have some portability, this program can help you figure out what its
  1521. -`configure' needs to check for.  It may help fill in some gaps in a
  1522. -`configure.in' generated by `autoscan' (*note Invoking autoscan::.).
  1523. -
  1524. -   `ifnames' scans all of the C source files named on the command line
  1525. -(or the standard input, if none are given) and writes to the standard
  1526. -output a sorted list of all the identifiers that appear in those files
  1527. -in `#if', `#elif', `#ifdef', or `#ifndef' directives.  It prints each
  1528. -identifier on a line, followed by a space-separated list of the files
  1529. -in which that identifier occurs.
  1530. -
  1531. -`ifnames' accepts the following options:
  1532. -
  1533. -`--help'
  1534. -`-h'
  1535. -     Print a summary of the command line options and exit.
  1536. -
  1537. -`--macrodir=DIR'
  1538. -`-m DIR'
  1539. -     Look for the Autoconf macro files in directory DIR instead of the
  1540. -     default installation directory.  Only used to get the version
  1541. -     number.  You can also set the `AC_MACRODIR' environment variable
  1542. -     to a directory; this option overrides the environment variable.
  1543. -
  1544. -`--version'
  1545. -     Print the version number of Autoconf and exit.
  1546. -
  1547. -
  1548. -File: autoconf.info,  Node: Invoking autoconf,  Next: Invoking autoreconf,  Prev: Invoking ifnames,  Up: Making configure Scripts
  1549. -
  1550. -Using `autoconf' to Create `configure'
  1551. -======================================
  1552. -
  1553. -   To create `configure' from `configure.in', run the `autoconf'
  1554. -program with no arguments.  `autoconf' processes `configure.in' with
  1555. -the `m4' macro processor, using the Autoconf macros.  If you give
  1556. -`autoconf' an argument, it reads that file instead of `configure.in'
  1557. -and writes the configuration script to the standard output instead of
  1558. -to `configure'.  If you give `autoconf' the argument `-', it reads the
  1559. -standard input instead of `configure.in' and writes the configuration
  1560. -script on the standard output.
  1561. -
  1562. -   The Autoconf macros are defined in several files.  Some of the files
  1563. -are distributed with Autoconf; `autoconf' reads them first.  Then it
  1564. -looks for the optional file `acsite.m4' in the directory that contains
  1565. -the distributed Autoconf macro files, and for the optional file
  1566. -`aclocal.m4' in the current directory.  Those files can contain your
  1567. -site's or the package's own Autoconf macro definitions (*note Writing
  1568. -Macros::., for more information).  If a macro is defined in more than
  1569. -one of the files that `autoconf' reads, the last definition it reads
  1570. -overrides the earlier ones.
  1571. -
  1572. -   `autoconf' accepts the following options:
  1573. -
  1574. -`--help'
  1575. -`-h'
  1576. -     Print a summary of the command line options and exit.
  1577. -
  1578. -`--localdir=DIR'
  1579. -`-l DIR'
  1580. -     Look for the package file `aclocal.m4' in directory DIR instead of
  1581. -     in the current directory.
  1582. -
  1583. -`--macrodir=DIR'
  1584. -`-m DIR'
  1585. -     Look for the installed macro files in directory DIR.  You can also
  1586. -     set the `AC_MACRODIR' environment variable to a directory; this
  1587. -     option overrides the environment variable.
  1588. -
  1589. -`--version'
  1590. -     Print the version number of Autoconf and exit.
  1591. -
  1592. -
  1593. -File: autoconf.info,  Node: Invoking autoreconf,  Prev: Invoking autoconf,  Up: Making configure Scripts
  1594. -
  1595. -Using `autoreconf' to Update `configure' Scripts
  1596. -================================================
  1597. -
  1598. -   If you have a lot of Autoconf-generated `configure' scripts, the
  1599. -`autoreconf' program can save you some work.  It runs `autoconf' (and
  1600. -`autoheader', where appropriate) repeatedly to remake the Autoconf
  1601. -`configure' scripts and configuration header templates in the directory
  1602. -tree rooted at the current directory.  By default, it only remakes
  1603. -those files that are older than their `configure.in' or (if present)
  1604. -`aclocal.m4'.  Since `autoheader' does not change the timestamp of its
  1605. -output file if the file wouldn't be changing, this is not necessarily
  1606. -the minimum amount of work.  If you install a new version of Autoconf,
  1607. -you can make `autoreconf' remake *all* of the files by giving it the
  1608. -`--force' option.
  1609. -
  1610. -   If you give `autoreconf' the `--macrodir=DIR' or `--localdir=DIR'
  1611. -options, it passes them down to `autoconf' and `autoheader' (with
  1612. -relative paths adjusted properly).
  1613. -
  1614. -   *Note Automatic Remaking::, for `Makefile' rules to automatically
  1615. -remake `configure' scripts when their source files change.  That method
  1616. -handles the timestamps of configuration header templates properly, but
  1617. -does not pass `--macrodir=DIR' or `--localdir=DIR'.
  1618. -
  1619. -`autoreconf' accepts the following options:
  1620. -
  1621. -`--help'
  1622. -`-h'
  1623. -     Print a summary of the command line options and exit.
  1624. -
  1625. -`--force'
  1626. -`-f'
  1627. -     Remake even `configure' scripts and configuration headers that are
  1628. -     newer than their input files (`configure.in' and, if present,
  1629. -     `aclocal.m4').
  1630. -
  1631. -`--localdir=DIR'
  1632. -`-l DIR'
  1633. -     Look for the package files `aclocal.m4' and `acconfig.h' (but not
  1634. -     `FILE.top' and `FILE.bot') in directory DIR instead of in the
  1635. -     directory containing each `configure.in'.
  1636. -
  1637. -`--macrodir=DIR'
  1638. -`-m DIR'
  1639. -     Look for the Autoconf macro files in directory DIR instead of the
  1640. -     default installation directory.  You can also set the `AC_MACRODIR'
  1641. -     environment variable to a directory; this option overrides the
  1642. -     environment variable.
  1643. -
  1644. -`--verbose'
  1645. -     Print the name of each directory where `autoreconf' runs
  1646. -     `autoconf' (and `autoheader', if appropriate).
  1647. -
  1648. -`--version'
  1649. -     Print the version number of Autoconf and exit.
  1650. -
  1651. -
  1652. -File: autoconf.info,  Node: Setup,  Next: Existing Tests,  Prev: Making configure Scripts,  Up: Top
  1653. -
  1654. -Initialization and Output Files
  1655. -*******************************
  1656. -
  1657. -   Autoconf-generated `configure' scripts need some information about
  1658. -how to initialize, such as how to find the package's source files; and
  1659. -about the output files to produce.  The following sections describe
  1660. -initialization and creating output files.
  1661. -
  1662. -* Menu:
  1663. -
  1664. -* Input::                       Where Autoconf should find files.
  1665. -* Output::            Creating output files.
  1666. -* Makefile Substitutions::      Using output variables in `Makefile's.
  1667. -* Configuration Headers::       Creating a configuration header file.
  1668. -* Subdirectories::              Configuring independent packages together.
  1669. -* Default Prefix::              Changing the default installation prefix.
  1670. -* Versions::                    Version numbers in `configure'.
  1671. -
  1672. -
  1673. -File: autoconf.info,  Node: Input,  Next: Output,  Up: Setup
  1674. -
  1675. -Finding `configure' Input
  1676. -=========================
  1677. -
  1678. -   Every `configure' script must call `AC_INIT' before doing anything
  1679. -else.  The only other required macro is `AC_OUTPUT' (*note Output::.).
  1680. -
  1681. - - Macro: AC_INIT (UNIQUE-FILE-IN-SOURCE-DIR)
  1682. -     Process any command-line arguments and find the source code
  1683. -     directory.  UNIQUE-FILE-IN-SOURCE-DIR is some file that is in the
  1684. -     package's source directory; `configure' checks for this file's
  1685. -     existence to make sure that the directory that it is told contains
  1686. -     the source code in fact does.  Occasionally people accidentally
  1687. -     specify the wrong directory with `--srcdir'; this is a safety
  1688. -     check.  *Note Invoking configure::, for more information.
  1689. -
  1690. -   Packages that do manual configuration or use the `install' program
  1691. -might need to tell `configure' where to find some other shell scripts
  1692. -by calling `AC_CONFIG_AUX_DIR', though the default places it looks are
  1693. -correct for most cases.
  1694. -
  1695. - - Macro: AC_CONFIG_AUX_DIR(DIR)
  1696. -     Use the `install-sh', `config.sub', `config.guess', and Cygnus
  1697. -     `configure' scripts that are in directory DIR.  These are
  1698. -     auxiliary files used in configuration.  DIR can be either absolute
  1699. -     or relative to `SRCDIR'.  The default is `SRCDIR' or `SRCDIR/..' or
  1700. -     `SRCDIR/../..', whichever is the first that contains `install-sh'.
  1701. -     The other files are not checked for, so that using
  1702. -     `AC_PROG_INSTALL' does not automatically require distributing the
  1703. -     other auxiliary files.  It checks for `install.sh' also, but that
  1704. -     name is obsolete because some `make' programs have a rule that
  1705. -     creates `install' from it if there is no `Makefile'.
  1706. -
  1707. -
  1708. -File: autoconf.info,  Node: Output,  Next: Makefile Substitutions,  Prev: Input,  Up: Setup
  1709. -
  1710. -Creating Output Files
  1711. -=====================
  1712. -
  1713. -   Every Autoconf-generated `configure' script must finish by calling
  1714. -`AC_OUTPUT'.  It is the macro that creates the `Makefile's and optional
  1715. -other files resulting from configuration.  The only other required
  1716. -macro is `AC_INIT' (*note Input::.).
  1717. -
  1718. - - Macro: AC_OUTPUT ([FILE...] [,EXTRA-CMDS] [,INIT-CMDS])
  1719. -     Create output files.  The FILE... argument is a
  1720. -     whitespace-separated list of output files; it may be empty.  This
  1721. -     macro creates each file `FILE' by copying an input file (by default
  1722. -     named `FILE.in'), substituting the output variable values.  *Note
  1723. -     Makefile Substitutions::, for more information on using output
  1724. -     variables.  *Note Setting Output Variables::, for more information
  1725. -     on creating them.  This macro creates the directory that the file
  1726. -     is in if it doesn't exist (but not the parents of that directory).
  1727. -     Usually, `Makefile's are created this way, but other files, such
  1728. -     as `.gdbinit', can be specified as well.
  1729. -
  1730. -     If `AC_CONFIG_HEADER', `AC_LINK_FILES', or `AC_CONFIG_SUBDIRS' has
  1731. -     been called, this macro also creates the files named as their
  1732. -     arguments.
  1733. -
  1734. -     A typical call to `AC_OUTPUT' looks like this:
  1735. -          AC_OUTPUT(Makefile src/Makefile man/Makefile X/Imakefile)
  1736. -
  1737. -     You can override an input file name by appending it to FILE,
  1738. -     separated by a colon.  For example,
  1739. -          AC_OUTPUT(Makefile:templates/top.mk lib/Makefile:templates/lib.mk)
  1740. -
  1741. -     If you pass EXTRA-CMDS, those commands will be inserted into
  1742. -     `config.status' to be run after all its other processing.  If
  1743. -     INIT-CMDS are given, they are inserted just before EXTRA-CMDS,
  1744. -     with shell variable, command, and backslash substitutions
  1745. -     performed on them in `configure'.  You can use INIT-CMDS to pass
  1746. -     variables from `configure' to the EXTRA-CMDS.
  1747. -
  1748. -   If you run `make' on subdirectories, you should run it using the
  1749. -`make' variable `MAKE'.  Most versions of `make' set `MAKE' to the name
  1750. -of the `make' program plus any options it was given.  (But many do not
  1751. -include in it the values of any variables set on the command line, so
  1752. -those are not passed on automatically.) Some old versions of `make' do
  1753. -not set this variable.  The following macro allows you to use it even
  1754. -with those versions.
  1755. -
  1756. - - Macro: AC_PROG_MAKE_SET
  1757. -     If `make' predefines the variable `MAKE', define output variable
  1758. -     `SET_MAKE' to be empty.  Otherwise, define `SET_MAKE' to contain
  1759. -     `MAKE=make'.  Calls `AC_SUBST' for `SET_MAKE'.
  1760. -
  1761. -   To use this macro, place a line like this in each `Makefile.in' that
  1762. -runs `MAKE' on other directories:
  1763. -
  1764. -     @SET_MAKE@
  1765. -
  1766. -
  1767. -File: autoconf.info,  Node: Makefile Substitutions,  Next: Configuration Headers,  Prev: Output,  Up: Setup
  1768. -
  1769. -Substitutions in Makefiles
  1770. -==========================
  1771. -
  1772. -   Each subdirectory in a distribution that contains something to be
  1773. -compiled or installed should come with a file `Makefile.in', from which
  1774. -`configure' will create a `Makefile' in that directory.  To create a
  1775. -`Makefile', `configure' performs a simple variable substitution,
  1776. -replacing occurrences of `@VARIABLE@' in `Makefile.in' with the value
  1777. -that `configure' has determined for that variable.  Variables that are
  1778. -substituted into output files in this way are called "output
  1779. -variables".  They are ordinary shell variables that are set in
  1780. -`configure'.  To make `configure' substitute a particular variable into
  1781. -the output files, the macro `AC_SUBST' must be called with that
  1782. -variable name as an argument.  Any occurrences of `@VARIABLE@' for
  1783. -other variables are left unchanged.  *Note Setting Output Variables::,
  1784. -for more information on creating output variables with `AC_SUBST'.
  1785. -
  1786. -   A software package that uses a `configure' script should be
  1787. -distributed with a file `Makefile.in', but no `Makefile'; that way, the
  1788. -user has to properly configure the package for the local system before
  1789. -compiling it.
  1790. -
  1791. -   *Note Makefile Conventions: (standards)Makefile Conventions, for
  1792. -more information on what to put in `Makefile's.
  1793. -
  1794. -* Menu:
  1795. -
  1796. -* Preset Output Variables::    Output variables that are always set.
  1797. -* Build Directories::       Supporting multiple concurrent compiles.
  1798. -* Automatic Remaking::        Makefile rules for configuring.
  1799. -
  1800. -
  1801. -File: autoconf.info,  Node: Preset Output Variables,  Next: Build Directories,  Up: Makefile Substitutions
  1802. -
  1803. -Preset Output Variables
  1804. ------------------------
  1805. -
  1806. -   Some output variables are preset by the Autoconf macros.  Some of the
  1807. -Autoconf macros set additional output variables, which are mentioned in
  1808. -the descriptions for those macros.  *Note Output Variable Index::, for a
  1809. -complete list of output variables.  Here is what each of the preset ones
  1810. -contains.  *Note Variables for Installation Directories:
  1811. -(standards)Directory Variables, for more information about the
  1812. -variables with names that end in `dir'.
  1813. -
  1814. - - Variable: bindir
  1815. -     The directory for installing executables that users run.
  1816. -
  1817. - - Variable: configure_input
  1818. -     A comment saying that the file was generated automatically by
  1819. -     `configure' and giving the name of the input file.  `AC_OUTPUT'
  1820. -     adds a comment line containing this variable to the top of every
  1821. -     `Makefile' it creates.  For other files, you should reference this
  1822. -     variable in a comment at the top of each input file.  For example,
  1823. -     an input shell script should begin like this:
  1824. -
  1825. -          #! /bin/sh
  1826. -          # @configure_input@
  1827. -
  1828. -     The presence of that line also reminds people editing the file
  1829. -     that it needs to be processed by `configure' in order to be used.
  1830. -
  1831. - - Variable: datadir
  1832. -     The directory for installing read-only architecture-independent
  1833. -     data.
  1834. -
  1835. - - Variable: exec_prefix
  1836. -     The installation prefix for architecture-dependent files.
  1837. -
  1838. - - Variable: includedir
  1839. -     The directory for installing C header files.
  1840. -
  1841. - - Variable: infodir
  1842. -     The directory for installing documentation in Info format.
  1843. -
  1844. - - Variable: libdir
  1845. -     The directory for installing object code libraries.
  1846. -
  1847. - - Variable: libexecdir
  1848. -     The directory for installing executables that other programs run.
  1849. -
  1850. - - Variable: localstatedir
  1851. -     The directory for installing modifiable single-machine data.
  1852. -
  1853. - - Variable: mandir
  1854. -     The top-level directory for installing documentation in man format.
  1855. -
  1856. - - Variable: oldincludedir
  1857. -     The directory for installing C header files for non-gcc compilers.
  1858. -
  1859. - - Variable: prefix
  1860. -     The installation prefix for architecture-independent files.
  1861. -
  1862. - - Variable: sbindir
  1863. -     The directory for installing executables that system
  1864. -     administrators run.
  1865. -
  1866. - - Variable: sharedstatedir
  1867. -     The directory for installing modifiable architecture-independent
  1868. -     data.
  1869. -
  1870. - - Variable: srcdir
  1871. -     The directory that contains the source code for that `Makefile'.
  1872. -
  1873. - - Variable: sysconfdir
  1874. -     The directory for installing read-only single-machine data.
  1875. -
  1876. - - Variable: top_srcdir
  1877. -     The top-level source code directory for the package.  In the
  1878. -     top-level directory, this is the same as `srcdir'.
  1879. -
  1880. - - Variable: CFLAGS
  1881. -     Debugging and optimization options for the C compiler.  If it is
  1882. -     not set in the environment when `configure' runs, the default
  1883. -     value is set when you call `AC_PROG_CC' (or empty if you don't).
  1884. -     `configure' uses this variable when compiling programs to test for
  1885. -     C features.
  1886. -
  1887. - - Variable: CPPFLAGS
  1888. -     Header file search directory (`-IDIR') and any other miscellaneous
  1889. -     options for the C preprocessor and compiler.  If it is not set in
  1890. -     the environment when `configure' runs, the default value is empty.
  1891. -     `configure' uses this variable when compiling or preprocessing
  1892. -     programs to test for C features.
  1893. -
  1894. - - Variable: CXXFLAGS
  1895. -     Debugging and optimization options for the C++ compiler.  If it is
  1896. -     not set in the environment when `configure' runs, the default
  1897. -     value is set when you call `AC_PROG_CXX' (or empty if you don't).
  1898. -     `configure' uses this variable when compiling programs to test for
  1899. -     C++ features.
  1900. -
  1901. - - Variable: DEFS
  1902. -     `-D' options to pass to the C compiler.  If `AC_CONFIG_HEADER' is
  1903. -     called, `configure' replaces `@DEFS@' with `-DHAVE_CONFIG_H'
  1904. -     instead (*note Configuration Headers::.).  This variable is not
  1905. -     defined while `configure' is performing its tests, only when
  1906. -     creating the output files.  *Note Setting Output Variables::, for
  1907. -     how to check the results of previous tests.
  1908. -
  1909. - - Variable: LDFLAGS
  1910. -     Stripping (`-s') and any other miscellaneous options for the
  1911. -     linker.  If it is not set in the environment when `configure' runs,
  1912. -     the default value is empty.  `configure' uses this variable when
  1913. -     linking programs to test for C features.
  1914. -
  1915. - - Variable: LIBS
  1916. -     `-l' and `-L' options to pass to the linker.
  1917. -
  1918. -
  1919. -File: autoconf.info,  Node: Build Directories,  Next: Automatic Remaking,  Prev: Preset Output Variables,  Up: Makefile Substitutions
  1920. -
  1921. -Build Directories
  1922. ------------------
  1923. -
  1924. -   You can support compiling a software package for several
  1925. -architectures simultaneously from the same copy of the source code.
  1926. -The object files for each architecture are kept in their own directory.
  1927. -
  1928. -   To support doing this, `make' uses the `VPATH' variable to find the
  1929. -files that are in the source directory.  GNU `make' and most other
  1930. -recent `make' programs can do this.  Older `make' programs do not
  1931. -support `VPATH'; when using them, the source code must be in the same
  1932. -directory as the object files.
  1933. -
  1934. -   To support `VPATH', each `Makefile.in' should contain two lines that
  1935. -look like:
  1936. -
  1937. -     srcdir = @srcdir@
  1938. -     VPATH = @srcdir@
  1939. -
  1940. -   Do not set `VPATH' to the value of another variable, for example
  1941. -`VPATH = $(srcdir)', because some versions of `make' do not do variable
  1942. -substitutions on the value of `VPATH'.
  1943. -
  1944. -   `configure' substitutes in the correct value for `srcdir' when it
  1945. -produces `Makefile'.
  1946. -
  1947. -   Do not use the `make' variable `$<', which expands to the pathname
  1948. -of the file in the source directory (found with `VPATH'), except in
  1949. -implicit rules.  (An implicit rule is one such as `.c.o', which tells
  1950. -how to create a `.o' file from a `.c' file.)  Some versions of `make'
  1951. -do not set `$<' in explicit rules; they expand it to an empty value.
  1952. -
  1953. -   Instead, `Makefile' command lines should always refer to source
  1954. -files by prefixing them with `$(srcdir)/'.  For example:
  1955. -
  1956. -     time.info: time.texinfo
  1957. -             $(MAKEINFO) $(srcdir)/time.texinfo
  1958. -
  1959. -
  1960. -File: autoconf.info,  Node: Automatic Remaking,  Prev: Build Directories,  Up: Makefile Substitutions
  1961. -
  1962. -Automatic Remaking
  1963. -------------------
  1964. -
  1965. -   You can put rules like the following in the top-level `Makefile.in'
  1966. -for a package to automatically update the configuration information when
  1967. -you change the configuration files.  This example includes all of the
  1968. -optional files, such as `aclocal.m4' and those related to configuration
  1969. -header files.  Omit from the `Makefile.in' rules any of these files
  1970. -that your package does not use.
  1971. -
  1972. -   The `${srcdir}/' prefix is included because of limitations in the
  1973. -`VPATH' mechanism.
  1974. -
  1975. -   The `stamp-' files are necessary because the timestamps of
  1976. -`config.h.in' and `config.h' will not be changed if remaking them does
  1977. -not change their contents.  This feature avoids unnecessary
  1978. -recompilation.  You should include the file `stamp-h.in' your package's
  1979. -distribution, so `make' will consider `config.h.in' up to date.  On
  1980. -some old BSD systems, `touch' or any command that results in an empty
  1981. -file does not update the timestamps, so use a command like `echo' as a
  1982. -workaround.
  1983. -
  1984. -     ${srcdir}/configure: configure.in aclocal.m4
  1985. -             cd ${srcdir} && autoconf
  1986. -     
  1987. -     # autoheader might not change config.h.in, so touch a stamp file.
  1988. -     ${srcdir}/config.h.in: stamp-h.in
  1989. -     ${srcdir}/stamp-h.in: configure.in aclocal.m4 acconfig.h \
  1990. -         config.h.top config.h.bot
  1991. -             cd ${srcdir} && autoheader
  1992. -             echo timestamp > ${srcdir}/stamp-h.in
  1993. -     
  1994. -     config.h: stamp-h
  1995. -     stamp-h: config.h.in config.status
  1996. -             ./config.status
  1997. -     
  1998. -     Makefile: Makefile.in config.status
  1999. -             ./config.status
  2000. -     
  2001. -     config.status: configure
  2002. -             ./config.status --recheck
  2003. -
  2004. -   In addition, you should pass `echo timestamp > stamp-h' in the
  2005. -EXTRA-CMDS argument to `AC_OUTPUT', so `config.status' will ensure that
  2006. -`config.h' is considered up to date.  *Note Output::, for more
  2007. -information about `AC_OUTPUT'.
  2008. -
  2009. -   *Note Invoking config.status::, for more examples of handling
  2010. -configuration-related dependencies.
  2011. -
  2012. -
  2013. -File: autoconf.info,  Node: Configuration Headers,  Next: Subdirectories,  Prev: Makefile Substitutions,  Up: Setup
  2014. -
  2015. -Configuration Header Files
  2016. -==========================
  2017. -
  2018. -   When a package tests more than a few C preprocessor symbols, the
  2019. -command lines to pass `-D' options to the compiler can get quite long.
  2020. -This causes two problems.  One is that the `make' output is hard to
  2021. -visually scan for errors.  More seriously, the command lines can exceed
  2022. -the length limits of some operating systems.  As an alternative to
  2023. -passing `-D' options to the compiler, `configure' scripts can create a
  2024. -C header file containing `#define' directives.  The `AC_CONFIG_HEADER'
  2025. -macro selects this kind of output.  It should be called right after
  2026. -`AC_INIT'.
  2027. -
  2028. -   The package should `#include' the configuration header file before
  2029. -any other header files, to prevent inconsistencies in declarations (for
  2030. -example, if it redefines `const').  Use `#include <config.h>' instead
  2031. -of `#include "config.h"', and pass the C compiler a `-I.' option (or
  2032. -`-I..'; whichever directory contains `config.h').  That way, even if
  2033. -the source directory is configured itself (perhaps to make a
  2034. -distribution), other build directories can also be configured without
  2035. -finding the `config.h' from the source directory.
  2036. -
  2037. - - Macro: AC_CONFIG_HEADER (HEADER-TO-CREATE ...)
  2038. -     Make `AC_OUTPUT' create the file(s) in the whitespace-separated
  2039. -     list HEADER-TO-CREATE containing C preprocessor `#define'
  2040. -     statements, and replace `@DEFS@' in generated files with
  2041. -     `-DHAVE_CONFIG_H' instead of the value of `DEFS'.  The usual name
  2042. -     for HEADER-TO-CREATE is `config.h'.
  2043. -
  2044. -     If HEADER-TO-CREATE already exists and its contents are identical
  2045. -     to what `AC_OUTPUT' would put in it, it is left alone.  Doing this
  2046. -     allows some changes in configuration without needlessly causing
  2047. -     object files that depend on the header file to be recompiled.
  2048. -
  2049. -     Usually the input file is named `HEADER-TO-CREATE.in'; however,
  2050. -     you can override the input file name by appending it to
  2051. -     HEADER-TO-CREATE, separated by a colon.  For example,
  2052. -          AC_CONFIG_HEADER(defines.h:defines.hin)
  2053. -
  2054. -     Doing this allows you to keep your filenames acceptable to MS-DOS.
  2055. -
  2056. -* Menu:
  2057. -
  2058. -* Header Templates::            Input for the configuration headers.
  2059. -* Invoking autoheader::        How to create configuration templates.
  2060. -
  2061. -
  2062. -File: autoconf.info,  Node: Header Templates,  Next: Invoking autoheader,  Up: Configuration Headers
  2063. -
  2064. -Configuration Header Templates
  2065. -------------------------------
  2066. -
  2067. -   Your distribution should contain a template file that looks as you
  2068. -want the final header file to look, including comments, with default
  2069. -values in the `#define' statements.  For example, suppose your
  2070. -`configure.in' makes these calls:
  2071. -
  2072. -     AC_CONFIG_HEADER(conf.h)
  2073. -     AC_CHECK_HEADERS(unistd.h)
  2074. -
  2075. -Then you could have code like the following in `conf.h.in'.  On systems
  2076. -that have `unistd.h', `configure' will change the 0 to a 1.  On other
  2077. -systems, it will leave the line unchanged.
  2078. -
  2079. -     /* Define as 1 if you have unistd.h.  */
  2080. -     #define HAVE_UNISTD_H 0
  2081. -
  2082. -   Alternately, if your code tests for configuration options using
  2083. -`#ifdef' instead of `#if', a default value can be to `#undef' the
  2084. -variable instead of to define it to a value.  On systems that have
  2085. -`unistd.h', `configure' will change the second line to read `#define
  2086. -HAVE_UNISTD_H 1'.  On other systems, it will comment that line out (in
  2087. -case the system predefines that symbol).
  2088. -
  2089. -     /* Define if you have unistd.h.  */
  2090. -     #undef HAVE_UNISTD_H
  2091. -
  2092. -
  2093. -File: autoconf.info,  Node: Invoking autoheader,  Prev: Header Templates,  Up: Configuration Headers
  2094. -
  2095. -Using `autoheader' to Create `config.h.in'
  2096. -------------------------------------------
  2097. -
  2098. -   The `autoheader' program can create a template file of C `#define'
  2099. -statements for `configure' to use.  If `configure.in' invokes
  2100. -`AC_CONFIG_HEADER(FILE)', `autoheader' creates `FILE.in'; if multiple
  2101. -file arguments are given, the first one is used.  Otherwise,
  2102. -`autoheader' creates `config.h.in'.
  2103. -
  2104. -   If you give `autoheader' an argument, it uses that file instead of
  2105. -`configure.in' and writes the header file to the standard output
  2106. -instead of to `config.h.in'.  If you give `autoheader' an argument of
  2107. -`-', it reads the standard input instead of `configure.in' and writes
  2108. -the header file to the standard output.
  2109. -
  2110. -   `autoheader' scans `configure.in' and figures out which C
  2111. -preprocessor symbols it might define.  It copies comments and `#define'
  2112. -and `#undef' statements from a file called `acconfig.h', which comes
  2113. -with and is installed with Autoconf.  It also uses a file called
  2114. -`acconfig.h' in the current directory, if present.  If you `AC_DEFINE'
  2115. -any additional symbols, you must create that file with entries for
  2116. -them.  For symbols defined by `AC_CHECK_HEADERS', `AC_CHECK_FUNCS',
  2117. -`AC_CHECK_SIZEOF', or `AC_CHECK_LIB', `autoheader' generates comments
  2118. -and `#undef' statements itself rather than copying them from a file,
  2119. -since the possible symbols are effectively limitless.
  2120. -
  2121. -   The file that `autoheader' creates contains mainly `#define' and
  2122. -`#undef' statements and their accompanying comments.  If `./acconfig.h'
  2123. -contains the string `@TOP@', `autoheader' copies the lines before the
  2124. -line containing `@TOP@' into the top of the file that it generates.
  2125. -Similarly, if `./acconfig.h' contains the string `@BOTTOM@',
  2126. -`autoheader' copies the lines after that line to the end of the file it
  2127. -generates.  Either or both of those strings may be omitted.
  2128. -
  2129. -   An alternate way to produce the same effect is to create the files
  2130. -`FILE.top' (typically `config.h.top') and/or `FILE.bot' in the current
  2131. -directory.  If they exist, `autoheader' copies them to the beginning
  2132. -and end, respectively, of its output.  Their use is discouraged because
  2133. -they have file names that contain two periods, and so can not be stored
  2134. -on MS-DOS; also, they are two more files to clutter up the directory.
  2135. -But if you use the `--localdir=DIR' option to use an `acconfig.h' in
  2136. -another directory, they give you a way to put custom boilerplate in each
  2137. -individual `config.h.in'.
  2138. -
  2139. -   `autoheader' accepts the following options:
  2140. -
  2141. -`--help'
  2142. -`-h'
  2143. -     Print a summary of the command line options and exit.
  2144. -
  2145. -`--localdir=DIR'
  2146. -`-l DIR'
  2147. -     Look for the package files `aclocal.m4' and `acconfig.h' (but not
  2148. -     `FILE.top' and `FILE.bot') in directory DIR instead of in the
  2149. -     current directory.
  2150. -
  2151. -`--macrodir=DIR'
  2152. -`-m DIR'
  2153. -     Look for the installed macro files and `acconfig.h' in directory
  2154. -     DIR.  You can also set the `AC_MACRODIR' environment variable to a
  2155. -     directory; this option overrides the environment variable.
  2156. -
  2157. -`--version'
  2158. -     Print the version number of Autoconf and exit.
  2159. -
  2160. -
  2161. -File: autoconf.info,  Node: Subdirectories,  Next: Default Prefix,  Prev: Configuration Headers,  Up: Setup
  2162. -
  2163. -Configuring Other Packages in Subdirectories
  2164. -============================================
  2165. -
  2166. -   In most situations, calling `AC_OUTPUT' is sufficient to produce
  2167. -`Makefile's in subdirectories.  However, `configure' scripts that
  2168. -control more than one independent package can use `AC_CONFIG_SUBDIRS'
  2169. -to run `configure' scripts for other packages in subdirectories.
  2170. -
  2171. - - Macro: AC_CONFIG_SUBDIRS (DIR ...)
  2172. -     Make `AC_OUTPUT' run `configure' in each subdirectory DIR in the
  2173. -     given whitespace-separated list.  If a given DIR is not found, no
  2174. -     error is reported, so a `configure' script can configure whichever
  2175. -     parts of a large source tree are present.  If a given DIR contains
  2176. -     `configure.in' but no `configure', the Cygnus `configure' script
  2177. -     found by `AC_CONFIG_AUXDIR' is used.  The subdirectory `configure'
  2178. -     scripts are given the same command line options that were given to
  2179. -     this `configure' script, with minor changes if needed (e.g., to
  2180. -     adjust a relative path for the cache file or source directory).
  2181. -     This macro also sets the output variable `subdirs' to the list of
  2182. -     directories `DIR ...'.  `Makefile' rules can use this variable to
  2183. -     determine which subdirectories to recurse into.
  2184. -
  2185. -
  2186. -File: autoconf.info,  Node: Default Prefix,  Next: Versions,  Prev: Subdirectories,  Up: Setup
  2187. -
  2188. -Default Prefix
  2189. -==============
  2190. -
  2191. -   By default, `configure' sets the prefix for files it installs to
  2192. -`/usr/local'.  The user of `configure' can select a different prefix
  2193. -using the `--prefix' and `--exec-prefix' options.  There are two ways
  2194. -to change the default: when creating `configure', and when running it.
  2195. -
  2196. -   Some software packages might want to install in a directory besides
  2197. -`/usr/local' by default.  To accomplish that, use the
  2198. -`AC_PREFIX_DEFAULT' macro.
  2199. -
  2200. - - Macro: AC_PREFIX_DEFAULT (PREFIX)
  2201. -     Set the default installation prefix to PREFIX instead of
  2202. -     `/usr/local'.
  2203. -
  2204. -   It may be convenient for users to have `configure' guess the
  2205. -installation prefix from the location of a related program that they
  2206. -have already installed.  If you wish to do that, you can call
  2207. -`AC_PREFIX_PROGRAM'.
  2208. -
  2209. - - Macro: AC_PREFIX_PROGRAM (PROGRAM)
  2210. -     If the user did not specify an installation prefix (using the
  2211. -     `--prefix' option), guess a value for it by looking for PROGRAM in
  2212. -     `PATH', the way the shell does.  If PROGRAM is found, set the
  2213. -     prefix to the parent of the directory containing PROGRAM;
  2214. -     otherwise leave the prefix specified in `Makefile.in' unchanged.
  2215. -     For example, if PROGRAM is `gcc' and the `PATH' contains
  2216. -     `/usr/local/gnu/bin/gcc', set the prefix to `/usr/local/gnu'.
  2217. -
  2218. -
  2219. -File: autoconf.info,  Node: Versions,  Prev: Default Prefix,  Up: Setup
  2220. -
  2221. -Version Numbers in `configure'
  2222. -==============================
  2223. -
  2224. -   The following macros manage version numbers for `configure' scripts.
  2225. -Using them is optional.
  2226. -
  2227. - - Macro: AC_PREREQ (VERSION)
  2228. -     Ensure that a recent enough version of Autoconf is being used.  If
  2229. -     the version of Autoconf being used to create `configure' is earlier
  2230. -     than VERSION, print an error message on the standard error output
  2231. -     and do not create `configure'.  For example:
  2232. -
  2233. -          AC_PREREQ(1.8)
  2234. -
  2235. -     This macro is useful if your `configure.in' relies on non-obvious
  2236. -     behavior that changed between Autoconf releases.  If it merely
  2237. -     needs recently added macros, then `AC_PREREQ' is less useful,
  2238. -     because the `autoconf' program already tells the user which macros
  2239. -     are not found.  The same thing happens if `configure.in' is
  2240. -     processed by a version of Autoconf older than when `AC_PREREQ' was
  2241. -     added.
  2242. -
  2243. - - Macro: AC_REVISION (REVISION-INFO)
  2244. -     Copy revision stamp REVISION-INFO into the `configure' script,
  2245. -     with any dollar signs or double-quotes removed.  This macro lets
  2246. -     you put a revision stamp from `configure.in' into `configure'
  2247. -     without RCS or CVS changing it when you check in `configure'.  That
  2248. -     way, you can determine easily which revision of `configure.in' a
  2249. -     particular `configure' corresponds to.
  2250. -
  2251. -     It is a good idea to call this macro before `AC_INIT' so that the
  2252. -     revision number is near the top of both `configure.in' and
  2253. -     `configure'.  To support doing that, the `AC_REVISION' output
  2254. -     begins with `#! /bin/sh', like the normal start of a `configure'
  2255. -     script does.
  2256. -
  2257. -     For example, this line in `configure.in':
  2258. -
  2259. -          AC_REVISION($Revision: 1.30 $)dnl
  2260. -
  2261. -     produces this in `configure':
  2262. -
  2263. -          #! /bin/sh
  2264. -          # From configure.in Revision: 1.30
  2265. -
  2266. -
  2267. -File: autoconf.info,  Node: Existing Tests,  Next: Writing Tests,  Prev: Setup,  Up: Top
  2268. -
  2269. -Existing Tests
  2270. -**************
  2271. -
  2272. -   These macros test for particular system features that packages might
  2273. -need or want to use.  If you need to test for a kind of feature that
  2274. -none of these macros check for, you can probably do it by calling
  2275. -primitive test macros with appropriate arguments (*note Writing
  2276. -Tests::.).
  2277. -
  2278. -   These tests print messages telling the user which feature they're
  2279. -checking for, and what they find.  They cache their results for future
  2280. -`configure' runs (*note Caching Results::.).
  2281. -
  2282. -   Some of these macros set output variables.  *Note Makefile
  2283. -Substitutions::, for how to get their values.  The phrase "define NAME"
  2284. -is used below as a shorthand to mean "define C preprocessor symbol NAME
  2285. -to the value 1".  *Note Defining Symbols::, for how to get those symbol
  2286. -definitions into your program.
  2287. -
  2288. -* Menu:
  2289. -
  2290. -* Alternative Programs::    Selecting between alternative programs.
  2291. -* Libraries::                   Library archives that might be missing.
  2292. -* Library Functions::        C library functions that might be missing.
  2293. -* Header Files::        Header files that might be missing.
  2294. -* Structures::            Structures or members that might be missing.
  2295. -* Typedefs::            `typedef's that might be missing.
  2296. -* Compiler Characteristics::    C compiler or machine architecture features.
  2297. -* System Services::        Operating system services.
  2298. -* UNIX Variants::        Special kludges for specific UNIX variants.
  2299. -
  2300. -
  2301. -File: autoconf.info,  Node: Alternative Programs,  Next: Libraries,  Up: Existing Tests
  2302. -
  2303. -Alternative Programs
  2304. -====================
  2305. -
  2306. -   These macros check for the presence or behavior of particular
  2307. -programs.  They are used to choose between several alternative programs
  2308. -and to decide what to do once one has been chosen.  If there is no
  2309. -macro specifically defined to check for a program you need, and you
  2310. -don't need to check for any special properties of it, then you can use
  2311. -one of the general program check macros.
  2312. -
  2313. -* Menu:
  2314. -
  2315. -* Particular Programs::         Special handling to find certain programs.
  2316. -* Generic Programs::            How to find other programs.
  2317. -
  2318. -
  2319. -File: autoconf.info,  Node: Particular Programs,  Next: Generic Programs,  Up: Alternative Programs
  2320. -
  2321. -Particular Program Checks
  2322. --------------------------
  2323. -
  2324. -   These macros check for particular programs--whether they exist, and
  2325. -in some cases whether they support certain features.
  2326. -
  2327. - - Macro: AC_DECL_YYTEXT
  2328. -     Define `YYTEXT_POINTER' if `yytext' is a `char *' instead of a
  2329. -     `char []'.  Also set output variable `LEX_OUTPUT_ROOT' to the base
  2330. -     of the file name that the lexer generates; usually `lex.yy', but
  2331. -     sometimes something else.  These results vary according to whether
  2332. -     `lex' or `flex' is being used.
  2333. -
  2334. - - Macro: AC_PROG_AWK
  2335. -     Check for `mawk', `gawk', `nawk', and `awk', in that order, and
  2336. -     set output variable `AWK' to the first one that it finds.  It
  2337. -     tries `mawk' first because that is reported to be the fastest
  2338. -     implementation.
  2339. -
  2340. - - Macro: AC_PROG_CC
  2341. -     Determine a C compiler to use.  If `CC' is not already set in the
  2342. -     environment, check for `gcc', and use `cc' if it's not found.  Set
  2343. -     output variable `CC' to the name of the compiler found.
  2344. -
  2345. -     If using the GNU C compiler, set shell variable `GCC' to `yes',
  2346. -     empty otherwise.  If output variable `CFLAGS' was not already set,
  2347. -     set it to `-g -O' for the GNU C compiler (`-O' on systems where
  2348. -     GCC does not accept `-g'), or `-g' for other compilers.
  2349. -
  2350. - - Macro: AC_PROG_CC_C_O
  2351. -     If the C compiler does not accept the `-c' and `-o' options
  2352. -     simultaneously, define `NO_MINUS_C_MINUS_O'.
  2353. -
  2354. - - Macro: AC_PROG_CPP
  2355. -     Set output variable `CPP' to a command that runs the C
  2356. -     preprocessor.  If `$CC -E' doesn't work, it uses `/lib/cpp'.  It
  2357. -     is only portable to run `CPP' on files with a `.c' extension.
  2358. -
  2359. -     If the current language is C (*note Language Choice::.), many of
  2360. -     the specific test macros use the value of `CPP' indirectly by
  2361. -     calling `AC_TRY_CPP', `AC_CHECK_HEADER', `AC_EGREP_HEADER', or
  2362. -     `AC_EGREP_CPP'.
  2363. -
  2364. - - Macro: AC_PROG_CXX
  2365. -     Determine a C++ compiler to use.  Check if the environment variable
  2366. -     `CXX' or `CCC' (in that order) is set; if so, set output variable
  2367. -     `CXX' to its value.  Otherwise search for a C++ compiler under
  2368. -     likely names (`c++', `g++', `gcc', `CC', and `cxx').  If none of
  2369. -     those checks succeed, as a last resort set `CXX' to `gcc'.
  2370. -
  2371. -     If using the GNU C++ compiler, set shell variable `GXX' to `yes',
  2372. -     empty otherwise.  If output variable `CXXFLAGS' was not already
  2373. -     set, set it to `-g -O' for the GNU C++ compiler (`-O' on systems
  2374. -     where G++ does not accept `-g'), or `-g' for other compilers.
  2375. -
  2376. - - Macro: AC_PROG_CXXCPP
  2377. -     Set output variable `CXXCPP' to a command that runs the C++
  2378. -     preprocessor.  If `$CXX -E' doesn't work, it uses `/lib/cpp'.  It
  2379. -     is only portable to run `CXXCPP' on files with a `.c', `.C', or
  2380. -     `.cc' extension.
  2381. -
  2382. -     If the current language is C++ (*note Language Choice::.), many of
  2383. -     the specific test macros use the value of `CXXCPP' indirectly by
  2384. -     calling `AC_TRY_CPP', `AC_CHECK_HEADER', `AC_EGREP_HEADER', or
  2385. -     `AC_EGREP_CPP'.
  2386. -
  2387. - - Macro: AC_PROG_GCC_TRADITIONAL
  2388. -     Add `-traditional' to output variable `CC' if using the GNU C
  2389. -     compiler and `ioctl' does not work properly without
  2390. -     `-traditional'.  That usually happens when the fixed header files
  2391. -     have not been installed on an old system.  Since recent versions
  2392. -     of the GNU C compiler fix the header files automatically when
  2393. -     installed, this is becoming a less prevalent problem.
  2394. -
  2395. - - Macro: AC_PROG_INSTALL
  2396. -     Set output variable `INSTALL' to the path of a BSD compatible
  2397. -     `install' program, if one is found in the current `PATH'.
  2398. -     Otherwise, set `INSTALL' to `DIR/install-sh -c', checking the
  2399. -     directories specified to `AC_CONFIG_AUX_DIR' (or its default
  2400. -     directories) to determine DIR (*note Output::.).  Also set the
  2401. -     variable `INSTALL_PROGRAM' to `${INSTALL}' and `INSTALL_DATA' to
  2402. -     `${INSTALL} -m 644'.
  2403. -
  2404. -     This macro screens out various instances of `install' known to not
  2405. -     work.  It prefers to find a C program rather than a shell script,
  2406. -     for speed.  Instead of `install-sh', it can also use `install.sh',
  2407. -     but that name is obsolete because some `make' programs have a rule
  2408. -     that creates `install' from it if there is no `Makefile'.
  2409. -
  2410. -     A copy of `install-sh' which you may use comes with Autoconf.  If
  2411. -     you use `AC_PROG_INSTALL', you must include either `install-sh' or
  2412. -     `install.sh' in your distribution, or `configure' will produce an
  2413. -     error message saying it can't find them--even if the system you're
  2414. -     on has a good `install' program.  This check is a safety measure
  2415. -     to prevent you from accidentally leaving that file out, which
  2416. -     would prevent your package from installing on systems that don't
  2417. -     have a BSD-compatible `install' program.
  2418. -
  2419. -     If you need to use your own installation program because it has
  2420. -     features not found in standard `install' programs, there is no
  2421. -     reason to use `AC_PROG_INSTALL'; just put the pathname of your
  2422. -     program into your `Makefile.in' files.
  2423. -
  2424. - - Macro: AC_PROG_LEX
  2425. -     If `flex' is found, set output variable `LEX' to `flex' and
  2426. -     `LEXLIB' to `-lfl', if that library is in a standard place.
  2427. -     Otherwise set `LEX' to `lex' and `LEXLIB' to `-ll'.
  2428. -
  2429. - - Macro: AC_PROG_LN_S
  2430. -     If `ln -s' works on the current filesystem (the operating system
  2431. -     and filesystem support symbolic links), set output variable `LN_S'
  2432. -     to `ln -s', otherwise set it to `ln'.
  2433. -
  2434. - - Macro: AC_PROG_RANLIB
  2435. -     Set output variable `RANLIB' to `ranlib' if `ranlib' is found,
  2436. -     otherwise to `:' (do nothing).
  2437. -
  2438. - - Macro: AC_PROG_YACC
  2439. -     If `bison' is found, set output variable `YACC' to `bison -y'.
  2440. -     Otherwise, if `byacc' is found, set `YACC' to `byacc'.  Otherwise
  2441. -     set `YACC' to `yacc'.
  2442. -
  2443. -
  2444. -File: autoconf.info,  Node: Generic Programs,  Prev: Particular Programs,  Up: Alternative Programs
  2445. -
  2446. -Generic Program Checks
  2447. -----------------------
  2448. -
  2449. -   These macros are used to find programs not covered by the particular
  2450. -test macros.  If you need to check the behavior of a program as well as
  2451. -find out whether it is present, you have to write your own test for it
  2452. -(*note Writing Tests::.).  By default, these macros use the environment
  2453. -variable `PATH'.  If you need to check for a program that might not be
  2454. -in the user's `PATH', you can pass a modified path to use instead, like
  2455. -this:
  2456. -
  2457. -     AC_PATH_PROG(INETD, inetd, /usr/libexec/inetd,
  2458. -       $PATH:/usr/libexec:/usr/sbin:/usr/etc:etc)
  2459. -
  2460. - - Macro: AC_CHECK_PROG (VARIABLE, PROG-TO-CHECK-FOR, VALUE-IF-FOUND [,
  2461. -          VALUE-IF-NOT-FOUND [, PATH, [ REJECT ]]])
  2462. -     Check whether program PROG-TO-CHECK-FOR exists in `PATH'.  If it
  2463. -     is found, set VARIABLE to VALUE-IF-FOUND, otherwise to
  2464. -     VALUE-IF-NOT-FOUND, if given.  Always pass over REJECT (an
  2465. -     absolute file name) even if it is the first found in the search
  2466. -     path; in that case, set VARIABLE using the absolute file name of
  2467. -     the PROG-TO-CHECK-FOR found that is not REJECT.  If VARIABLE was
  2468. -     already set, do nothing.  Calls `AC_SUBST' for VARIABLE.
  2469. -
  2470. - - Macro: AC_CHECK_PROGS (VARIABLE, PROGS-TO-CHECK-FOR [,
  2471. -          VALUE-IF-NOT-FOUND [, PATH]])
  2472. -     Check for each program in the whitespace-separated list
  2473. -     PROGS-TO-CHECK-FOR exists in `PATH'.  If it is found, set VARIABLE
  2474. -     to the name of that program.  Otherwise, continue checking the
  2475. -     next program in the list.  If none of the programs in the list are
  2476. -     found, set VARIABLE to VALUE-IF-NOT-FOUND; if VALUE-IF-NOT-FOUND
  2477. -     is not specified, the value of VARIABLE is not changed.  Calls
  2478. -     `AC_SUBST' for VARIABLE.
  2479. -
  2480. - - Macro: AC_CHECK_TOOL (VARIABLE, PROG-TO-CHECK-FOR [,
  2481. -          VALUE-IF-NOT-FOUND [, PATH]])
  2482. -     Like `AC_CHECK_PROG', but first looks for PROG-TO-CHECK-FOR with a
  2483. -     prefix of the host type as determined by `AC_CANONICAL_HOST',
  2484. -     followed by a dash (*note Canonicalizing::.).  For example, if the
  2485. -     user runs `configure --host=i386-gnu', then this call:
  2486. -          AC_CHECK_TOOL(RANLIB, ranlib, :)
  2487. -
  2488. -     sets `RANLIB' to `i386-gnu-ranlib' if that program exists in
  2489. -     `PATH', or to `ranlib' if that program exists in `PATH', or to `:'
  2490. -     if neither program exists.
  2491. -
  2492. - - Macro: AC_PATH_PROG (VARIABLE, PROG-TO-CHECK-FOR [,
  2493. -          VALUE-IF-NOT-FOUND [, PATH]])
  2494. -     Like `AC_CHECK_PROG', but set VARIABLE to the entire path of
  2495. -     PROG-TO-CHECK-FOR if found.
  2496. -
  2497. - - Macro: AC_PATH_PROGS (VARIABLE, PROGS-TO-CHECK-FOR [,
  2498. -          VALUE-IF-NOT-FOUND [, PATH]])
  2499. -     Like `AC_CHECK_PROGS', but if any of PROGS-TO-CHECK-FOR are found,
  2500. -     set VARIABLE to the entire path of the program found.
  2501. -
  2502. -
  2503. -File: autoconf.info,  Node: Libraries,  Next: Library Functions,  Prev: Alternative Programs,  Up: Existing Tests
  2504. -
  2505. -Library Files
  2506. -=============
  2507. -
  2508. -   The following macros check for the presence of certain C library
  2509. -archive files.
  2510. -
  2511. - - Macro: AC_CHECK_LIB (LIBRARY, FUNCTION [, ACTION-IF-FOUND [,
  2512. -          ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
  2513. -     Try to ensure that C function FUNCTION is available by checking
  2514. -     whether a test C program can be linked with the library LIBRARY to
  2515. -     get the function.  LIBRARY is the base name of the library; e.g.,
  2516. -     to check for `-lmp', use `mp' as the LIBRARY argument.
  2517. -
  2518. -     ACTION-IF-FOUND is a list of shell commands to run if the link
  2519. -     with the library succeeds; ACTION-IF-NOT-FOUND is a list of shell
  2520. -     commands to run if the link fails.  If ACTION-IF-FOUND and
  2521. -     ACTION-IF-NOT-FOUND are not specified, the default action is to
  2522. -     add `-lLIBRARY' to `LIBS' and define `HAVE_LIBLIBRARY' (in all
  2523. -     capitals).
  2524. -
  2525. -     If linking with LIBRARY results in unresolved symbols, which would
  2526. -     be resolved by linking with additional libraries, give those
  2527. -     libraries as the OTHER-LIBRARIES argument, separated by spaces:
  2528. -     `-lXt -lX11'.  Otherwise this macro will fail to detect that
  2529. -     LIBRARY is present, because linking the test program will always
  2530. -     fail with unresolved symbols.
  2531. -
  2532. - - Macro: AC_HAVE_LIBRARY (LIBRARY, [, ACTION-IF-FOUND [,
  2533. -          ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES]]])
  2534. -     This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
  2535. -     argument of `main'.  In addition, LIBRARY can be written as any of
  2536. -     `foo', `-lfoo', or `libfoo.a'.  In all of those cases, the
  2537. -     compiler is passed `-lfoo'.  However, LIBRARY can not be a shell
  2538. -     variable; it must be a literal name.  This macro is considered
  2539. -     obsolete.
  2540. -
  2541. -
  2542. -File: autoconf.info,  Node: Library Functions,  Next: Header Files,  Prev: Libraries,  Up: Existing Tests
  2543. -
  2544. -Library Functions
  2545. -=================
  2546. -
  2547. -   The following macros check for particular C library functions.  If
  2548. -there is no macro specifically defined to check for a function you need,
  2549. -and you don't need to check for any special properties of it, then you
  2550. -can use one of the general function check macros.
  2551. -
  2552. -* Menu:
  2553. -
  2554. -* Particular Functions::        Special handling to find certain functions.
  2555. -* Generic Functions::           How to find other functions.
  2556. -
  2557. -
  2558. -File: autoconf.info,  Node: Particular Functions,  Next: Generic Functions,  Up: Library Functions
  2559. -
  2560. -Particular Function Checks
  2561. ---------------------------
  2562. -
  2563. -   These macros check for particular C functions--whether they exist,
  2564. -and in some cases how they respond when given certain arguments.
  2565. -
  2566. - - Macro: AC_FUNC_ALLOCA
  2567. -     Check how to get `alloca'.  Tries to get a builtin version by
  2568. -     checking for `alloca.h' or the predefined C preprocessor macros
  2569. -     `__GNUC__' and `_AIX'.  If this macro finds `alloca.h', it defines
  2570. -     `HAVE_ALLOCA_H'.
  2571. -
  2572. -     If those attempts fail, it looks for the function in the standard C
  2573. -     library.  If any of those methods succeed, it defines
  2574. -     `HAVE_ALLOCA'.  Otherwise, it sets the output variable `ALLOCA' to
  2575. -     `alloca.o' and defines `C_ALLOCA' (so programs can periodically
  2576. -     call `alloca(0)' to garbage collect).  This variable is separate
  2577. -     from `LIBOBJS' so multiple programs can share the value of
  2578. -     `ALLOCA' without needing to create an actual library, in case only
  2579. -     some of them use the code in `LIBOBJS'.
  2580. -
  2581. -     This macro does not try to get `alloca' from the System V R3
  2582. -     `libPW' or the System V R4 `libucb' because those libraries
  2583. -     contain some incompatible functions that cause trouble.  Some
  2584. -     versions do not even contain `alloca' or contain a buggy version.
  2585. -     If you still want to use their `alloca', use `ar' to extract
  2586. -     `alloca.o' from them instead of compiling `alloca.c'.
  2587. -
  2588. -     Source files that use `alloca' should start with a piece of code
  2589. -     like the following, to declare it properly.  In some versions of
  2590. -     AIX, the declaration of `alloca' must precede everything else
  2591. -     except for comments and preprocessor directives.  The `#pragma'
  2592. -     directive is indented so that pre-ANSI C compilers will ignore it,
  2593. -     rather than choke on it.
  2594. -
  2595. -          /* AIX requires this to be the first thing in the file.  */
  2596. -          #ifdef __GNUC__
  2597. -          # define alloca __builtin_alloca
  2598. -          #else
  2599. -          # if HAVE_ALLOCA_H
  2600. -          #  include <alloca.h>
  2601. -          # else
  2602. -          #  ifdef _AIX
  2603. -           #pragma alloca
  2604. -          #  else
  2605. -          #   ifndef alloca /* predefined by HP cc +Olibcalls */
  2606. -          char *alloca ();
  2607. -          #   endif
  2608. -          #  endif
  2609. -          # endif
  2610. -          #endif
  2611. -
  2612. - - Macro: AC_FUNC_CLOSEDIR_VOID
  2613. -     If the `closedir' function does not return a meaningful value,
  2614. -     define `CLOSEDIR_VOID'.  Otherwise, callers ought to check its
  2615. -     return value for an error indicator.
  2616. -
  2617. - - Macro: AC_FUNC_GETLOADAVG
  2618. -     Check how to get the system load averages.  If the system has the
  2619. -     `getloadavg' function, this macro defines `HAVE_GETLOADAVG', and
  2620. -     adds to `LIBS' any libraries needed to get that function.
  2621. -
  2622. -     Otherwise, it adds `getloadavg.o' to the output variable
  2623. -     `LIBOBJS', and possibly defines several other C preprocessor
  2624. -     macros and output variables:
  2625. -
  2626. -       1. It defines `SVR4', `DGUX', `UMAX', or `UMAX4_3' if on those
  2627. -          systems.
  2628. -
  2629. -       2. If it finds `nlist.h', it defines `NLIST_STRUCT'.
  2630. -
  2631. -       3. If `struct nlist' has an `n_un' member, it defines
  2632. -          `NLIST_NAME_UNION'.
  2633. -
  2634. -       4. If compiling `getloadavg.c' defines `LDAV_PRIVILEGED',
  2635. -          programs need to be installed specially on this system for
  2636. -          `getloadavg' to work, and this macro defines
  2637. -          `GETLOADAVG_PRIVILEGED'.
  2638. -
  2639. -       5. This macro sets the output variable `NEED_SETGID'.  The value
  2640. -          is `true' if special installation is required, `false' if not.
  2641. -          If `NEED_SETGID' is `true', this macro sets `KMEM_GROUP' to
  2642. -          the name of the group that should own the installed program.
  2643. -
  2644. - - Macro: AC_FUNC_GETMNTENT
  2645. -     Check for `getmntent' in the `sun', `seq', and `gen' libraries,
  2646. -     for Irix 4, PTX, and Unixware, respectively.  Then, if `getmntent'
  2647. -     is available, define `HAVE_GETMNTENT'.
  2648. -
  2649. - - Macro: AC_FUNC_GETPGRP
  2650. -     If `getpgrp' takes no argument (the POSIX.1 version), define
  2651. -     `GETPGRP_VOID'.  Otherwise, it is the BSD version, which takes a
  2652. -     process ID as an argument.  This macro does not check whether
  2653. -     `getpgrp' exists at all; if you need to work in that situation,
  2654. -     first call `AC_CHECK_FUNC' for `getpgrp'.
  2655. -
  2656. - - Macro: AC_FUNC_MEMCMP
  2657. -     If the `memcmp' function is not available, or does not work on
  2658. -     8-bit data (like the one on SunOS 4.1.3), add `memcmp.o' to output
  2659. -     variable `LIBOBJS'.
  2660. -
  2661. - - Macro: AC_FUNC_MMAP
  2662. -     If the `mmap' function exists and works correctly on memory mapped
  2663. -     files, define `HAVE_MMAP'.
  2664. -
  2665. - - Macro: AC_FUNC_SETVBUF_REVERSED
  2666. -     If `setvbuf' takes the buffering type as its second argument and
  2667. -     the buffer pointer as the third, instead of the other way around,
  2668. -     define `SETVBUF_REVERSED'.  This is the case on System V before
  2669. -     release 3.
  2670. -
  2671. - - Macro: AC_FUNC_STRCOLL
  2672. -     If the `strcoll' function exists and works correctly, define
  2673. -     `HAVE_STRCOLL'.  This does a bit more than
  2674. -     `AC_CHECK_FUNCS(strcoll)', because some systems have incorrect
  2675. -     definitions of `strcoll', which should not be used.
  2676. -
  2677. - - Macro: AC_FUNC_STRFTIME
  2678. -     Check for `strftime' in the `intl' library, for SCO UNIX.  Then,
  2679. -     if `strftime' is available, define `HAVE_STRFTIME'.
  2680. -
  2681. - - Macro: AC_FUNC_UTIME_NULL
  2682. -     If `utime(FILE, NULL)' sets FILE's timestamp to the present,
  2683. -     define `HAVE_UTIME_NULL'.
  2684. -
  2685. - - Macro: AC_FUNC_VFORK
  2686. -     If `vfork.h' is found, define `HAVE_VFORK_H'.  If a working
  2687. -     `vfork' is not found, define `vfork' to be `fork'.  This macro
  2688. -     checks for several known errors in implementations of `vfork' and
  2689. -     considers the system to not have a working `vfork' if it detects
  2690. -     any of them.  It is not considered to be an implementation error
  2691. -     if a child's invocation of `signal' modifies the parent's signal
  2692. -     handler, since child processes rarely change their signal handlers.
  2693. -
  2694. - - Macro: AC_FUNC_VPRINTF
  2695. -     If `vprintf' is found, define `HAVE_VPRINTF'.  Otherwise, if
  2696. -     `_doprnt' is found, define `HAVE_DOPRNT'.  (If `vprintf' is
  2697. -     available, you may assume that `vfprintf' and `vsprintf' are also
  2698. -     available.)
  2699. -
  2700. - - Macro: AC_FUNC_WAIT3
  2701. -     If `wait3' is found and fills in the contents of its third argument
  2702. -     (a `struct rusage *'), which HP-UX does not do, define
  2703. -     `HAVE_WAIT3'.
  2704. -
  2705. -
  2706. -File: autoconf.info,  Node: Generic Functions,  Prev: Particular Functions,  Up: Library Functions
  2707. -
  2708. -Generic Function Checks
  2709. ------------------------
  2710. -
  2711. -   These macros are used to find functions not covered by the particular
  2712. -test macros.  If the functions might be in libraries other than the
  2713. -default C library, first call `AC_CHECK_LIB' for those libraries.  If
  2714. -you need to check the behavior of a function as well as find out
  2715. -whether it is present, you have to write your own test for it (*note
  2716. -Writing Tests::.).
  2717. -
  2718. - - Macro: AC_CHECK_FUNC (FUNCTION, [ACTION-IF-FOUND [,
  2719. -          ACTION-IF-NOT-FOUND]])
  2720. -     If C function FUNCTION is available, run shell commands
  2721. -     ACTION-IF-FOUND, otherwise ACTION-IF-NOT-FOUND.  If you just want
  2722. -     to define a symbol if the function is available, consider using
  2723. -     `AC_CHECK_FUNCS' instead.  This macro checks for functions with C
  2724. -     linkage even when `AC_LANG_CPLUSPLUS' has been called, since C++ is
  2725. -     more standardized than C is.  (*note Language Choice::., for more
  2726. -     information about selecting the language for checks.)
  2727. -
  2728. - - Macro: AC_CHECK_FUNCS (FUNCTION... [, ACTION-IF-FOUND [,
  2729. -          ACTION-IF-NOT-FOUND]])
  2730. -     For each given FUNCTION in the whitespace-separated argument list
  2731. -     that is available, define `HAVE_FUNCTION' (in all capitals).  If
  2732. -     ACTION-IF-FOUND is given, it is additional shell code to execute
  2733. -     when one of the functions is found.  You can give it a value of
  2734. -     `break' to break out of the loop on the first match.  If
  2735. -     ACTION-IF-NOT-FOUND is given, it is executed when one of the
  2736. -     functions is not found.
  2737. -
  2738. - - Macro: AC_REPLACE_FUNCS (FUNCTION-NAME...)
  2739. -     For each given FUNCTION-NAME in the whitespace-separated argument
  2740. -     list that is not in the C library, add `FUNCTION-NAME.o' to the
  2741. -     value of the output variable `LIBOBJS'.
  2742. -
  2743. -
  2744. -File: autoconf.info,  Node: Header Files,  Next: Structures,  Prev: Library Functions,  Up: Existing Tests
  2745. -
  2746. -Header Files
  2747. -============
  2748. -
  2749. -   The following macros check for the presence of certain C header
  2750. -files.  If there is no macro specifically defined to check for a header
  2751. -file you need, and you don't need to check for any special properties of
  2752. -it, then you can use one of the general header file check macros.
  2753. -
  2754. -* Menu:
  2755. -
  2756. -* Particular Headers::          Special handling to find certain headers.
  2757. -* Generic Headers::             How to find other headers.
  2758. -
  2759. -
  2760. -File: autoconf.info,  Node: Particular Headers,  Next: Generic Headers,  Up: Header Files
  2761. -
  2762. -Particular Header Checks
  2763. -------------------------
  2764. -
  2765. -   These macros check for particular system header files--whether they
  2766. -exist, and in some cases whether they declare certain symbols.
  2767. -
  2768. - - Macro: AC_DECL_SYS_SIGLIST
  2769. -     Define `SYS_SIGLIST_DECLARED' if the variable `sys_siglist' is
  2770. -     declared in a system header file, either `signal.h' or `unistd.h'.
  2771. -
  2772. - - Macro: AC_DIR_HEADER
  2773. -     Like calling `AC_HEADER_DIRENT' and `AC_FUNC_CLOSEDIR_VOID', but
  2774. -     defines a different set of C preprocessor macros to indicate which
  2775. -     header file is found.  This macro and the names it defines are
  2776. -     considered obsolete.  The names it defines are:
  2777. -
  2778. -    `dirent.h'
  2779. -          `DIRENT'
  2780. -
  2781. -    `sys/ndir.h'
  2782. -          `SYSNDIR'
  2783. -
  2784. -    `sys/dir.h'
  2785. -          `SYSDIR'
  2786. -
  2787. -    `ndir.h'
  2788. -          `NDIR'
  2789. -
  2790. -     In addition, if the `closedir' function does not return a
  2791. -     meaningful value, define `VOID_CLOSEDIR'.
  2792. -
  2793. - - Macro: AC_HEADER_DIRENT
  2794. -     Check for the following header files, and for the first one that is
  2795. -     found and defines `DIR', define the listed C preprocessor macro:
  2796. -
  2797. -    `dirent.h'
  2798. -          `HAVE_DIRENT_H'
  2799. -
  2800. -    `sys/ndir.h'
  2801. -          `HAVE_SYS_NDIR_H'
  2802. -
  2803. -    `sys/dir.h'
  2804. -          `HAVE_SYS_DIR_H'
  2805. -
  2806. -    `ndir.h'
  2807. -          `HAVE_NDIR_H'
  2808. -
  2809. -     The directory library declarations in the source code should look
  2810. -     something like the following:
  2811. -
  2812. -          #if HAVE_DIRENT_H
  2813. -          # include <dirent.h>
  2814. -          # define NAMLEN(dirent) strlen((dirent)->d_name)
  2815. -          #else
  2816. -          # define dirent direct
  2817. -          # define NAMLEN(dirent) (dirent)->d_namlen
  2818. -          # if HAVE_SYS_NDIR_H
  2819. -          #  include <sys/ndir.h>
  2820. -          # endif
  2821. -          # if HAVE_SYS_DIR_H
  2822. -          #  include <sys/dir.h>
  2823. -          # endif
  2824. -          # if HAVE_NDIR_H
  2825. -          #  include <ndir.h>
  2826. -          # endif
  2827. -          #endif
  2828. -
  2829. -     Using the above declarations, the program would declare variables
  2830. -     to be type `struct dirent', not `struct direct', and would access
  2831. -     the length of a directory entry name by passing a pointer to a
  2832. -     `struct dirent' to the `NAMLEN' macro.
  2833. -
  2834. -     This macro also checks for the SCO Xenix `dir' and `x' libraries.
  2835. -
  2836. - - Macro: AC_HEADER_MAJOR
  2837. -     If `sys/types.h' does not define `major', `minor', and `makedev',
  2838. -     but `sys/mkdev.h' does, define `MAJOR_IN_MKDEV'; otherwise, if
  2839. -     `sys/sysmacros.h' does, define `MAJOR_IN_SYSMACROS'.
  2840. -
  2841. - - Macro: AC_HEADER_STDC
  2842. -     Define `STDC_HEADERS' if the system has ANSI C header files.
  2843. -     Specifically, this macro checks for `stdlib.h', `stdarg.h',
  2844. -     `string.h', and `float.h'; if the system has those, it probably
  2845. -     has the rest of the ANSI C header files.  This macro also checks
  2846. -     whether `string.h' declares `memchr' (and thus presumably the
  2847. -     other `mem' functions), whether `stdlib.h' declare `free' (and
  2848. -     thus presumably `malloc' and other related functions), and whether
  2849. -     the `ctype.h' macros work on characters with the high bit set, as
  2850. -     ANSI C requires.
  2851. -
  2852. -     Use `STDC_HEADERS' instead of `__STDC__' to determine whether the
  2853. -     system has ANSI-compliant header files (and probably C library
  2854. -     functions) because many systems that have GCC do not have ANSI C
  2855. -     header files.
  2856. -
  2857. -     On systems without ANSI C headers, there is so much variation that
  2858. -     it is probably easier to declare the functions you use than to
  2859. -     figure out exactly what the system header files declare.  Some
  2860. -     systems contain a mix of functions ANSI and BSD; some are mostly
  2861. -     ANSI but lack `memmove'; some define the BSD functions as macros in
  2862. -     `string.h' or `strings.h'; some have only the BSD functions but
  2863. -     `string.h'; some declare the memory functions in `memory.h', some
  2864. -     in `string.h'; etc.  It is probably sufficient to check for one
  2865. -     string function and one memory function; if the library has the
  2866. -     ANSI versions of those then it probably has most of the others.
  2867. -     If you put the following in `configure.in':
  2868. -
  2869. -          AC_HEADER_STDC
  2870. -          AC_CHECK_FUNCS(strchr memcpy)
  2871. -
  2872. -     then, in your code, you can put declarations like this:
  2873. -
  2874. -          #if STDC_HEADERS
  2875. -          # include <string.h>
  2876. -          #else
  2877. -          # ifndef HAVE_STRCHR
  2878. -          #  define strchr index
  2879. -          #  define strrchr rindex
  2880. -          # endif
  2881. -          char *strchr (), *strrchr ();
  2882. -          # ifndef HAVE_MEMCPY
  2883. -          #  define memcpy(d, s, n) bcopy ((s), (d), (n))
  2884. -          #  define memmove(d, s, n) bcopy ((s), (d), (n))
  2885. -          # endif
  2886. -          #endif
  2887. -
  2888. -     If you use a function like `memchr', `memset', `strtok', or
  2889. -     `strspn', which have no BSD equivalent, then macros won't suffice;
  2890. -     you must provide an implementation of each function.  An easy way
  2891. -     to incorporate your implementations only when needed (since the
  2892. -     ones in system C libraries may be hand optimized) is to, taking
  2893. -     `memchr' for example, put it in `memchr.c' and use
  2894. -     `AC_REPLACE_FUNCS(memchr)'.
  2895. -
  2896. - - Macro: AC_HEADER_SYS_WAIT
  2897. -     If `sys/wait.h' exists and is compatible with POSIX.1, define
  2898. -     `HAVE_SYS_WAIT_H'.  Incompatibility can occur if `sys/wait.h' does
  2899. -     not exist, or if it uses the old BSD `union wait' instead of `int'
  2900. -     to store a status value.  If `sys/wait.h' is not POSIX.1
  2901. -     compatible, then instead of including it, define the POSIX.1
  2902. -     macros with their usual interpretations.  Here is an example:
  2903. -
  2904. -          #include <sys/types.h>
  2905. -          #if HAVE_SYS_WAIT_H
  2906. -          # include <sys/wait.h>
  2907. -          #endif
  2908. -          #ifndef WEXITSTATUS
  2909. -          # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  2910. -          #endif
  2911. -          #ifndef WIFEXITED
  2912. -          # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  2913. -          #endif
  2914. -
  2915. - - Macro: AC_MEMORY_H
  2916. -     Define `NEED_MEMORY_H' if `memcpy', `memcmp', etc. are not
  2917. -     declared in `string.h' and `memory.h' exists.  This macro is
  2918. -     obsolete; instead, use `AC_CHECK_HEADERS(memory.h)'.  See the
  2919. -     example for `AC_HEADER_STDC'.
  2920. -
  2921. - - Macro: AC_UNISTD_H
  2922. -     Define `HAVE_UNISTD_H' if the system has `unistd.h'.  This macro
  2923. -     is obsolete; instead, use `AC_CHECK_HEADERS(unistd.h)'.
  2924. -
  2925. -     The way to check if the system supports POSIX.1 is:
  2926. -
  2927. -          #if HAVE_UNISTD_H
  2928. -          # include <sys/types.h>
  2929. -          # include <unistd.h>
  2930. -          #endif
  2931. -          
  2932. -          #ifdef _POSIX_VERSION
  2933. -          /* Code for POSIX.1 systems.  */
  2934. -          #endif
  2935. -
  2936. -     `_POSIX_VERSION' is defined when `unistd.h' is included on POSIX.1
  2937. -     systems.  If there is no `unistd.h', it is definitely not a
  2938. -     POSIX.1 system.  However, some non-POSIX.1 systems do have
  2939. -     `unistd.h'.
  2940. -
  2941. - - Macro: AC_USG
  2942. -     Define `USG' if the system does not have `strings.h', `rindex',
  2943. -     `bzero', etc.  This implies that it has `string.h', `strrchr',
  2944. -     `memset', etc.
  2945. -
  2946. -     The symbol `USG' is obsolete.  Instead of this macro, see the
  2947. -     example for `AC_HEADER_STDC'.
  2948. -
  2949. -
  2950. -File: autoconf.info,  Node: Generic Headers,  Prev: Particular Headers,  Up: Header Files
  2951. -
  2952. -Generic Header Checks
  2953. ----------------------
  2954. -
  2955. -   These macros are used to find system header files not covered by the
  2956. -particular test macros.  If you need to check the contents of a header
  2957. -as well as find out whether it is present, you have to write your own
  2958. -test for it (*note Writing Tests::.).
  2959. -
  2960. - - Macro: AC_CHECK_HEADER (HEADER-FILE, [ACTION-IF-FOUND [,
  2961. -          ACTION-IF-NOT-FOUND]])
  2962. -     If the system header file HEADER-FILE exists, execute shell
  2963. -     commands ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND.
  2964. -     If you just want to define a symbol if the header file is
  2965. -     available, consider using `AC_CHECK_HEADERS' instead.
  2966. -
  2967. - - Macro: AC_CHECK_HEADERS (HEADER-FILE... [, ACTION-IF-FOUND [,
  2968. -          ACTION-IF-NOT-FOUND]])
  2969. -     For each given system header file HEADER-FILE in the
  2970. -     whitespace-separated argument list that exists, define
  2971. -     `HAVE_HEADER-FILE' (in all capitals).  If ACTION-IF-FOUND is
  2972. -     given, it is additional shell code to execute when one of the
  2973. -     header files is found.  You can give it a value of `break' to
  2974. -     break out of the loop on the first match.  If ACTION-IF-NOT-FOUND
  2975. -     is given, it is executed when one of the header files is not found.
  2976. -
  2977. -
  2978. -File: autoconf.info,  Node: Structures,  Next: Typedefs,  Prev: Header Files,  Up: Existing Tests
  2979. -
  2980. -Structures
  2981. -==========
  2982. -
  2983. -   The following macros check for certain structures or structure
  2984. -members.  To check structures not listed here, use `AC_EGREP_CPP'
  2985. -(*note Examining Declarations::.) or `AC_TRY_COMPILE' (*note Examining
  2986. -Syntax::.).
  2987. -
  2988. - - Macro: AC_HEADER_STAT
  2989. -     If the macros `S_ISDIR', `S_ISREG' et al. defined in `sys/stat.h'
  2990. -     do not work properly (returning false positives), define
  2991. -     `STAT_MACROS_BROKEN'.  This is the case on Tektronix UTekV, Amdahl
  2992. -     UTS and Motorola System V/88.
  2993. -
  2994. - - Macro: AC_HEADER_TIME
  2995. -     If a program may include both `time.h' and `sys/time.h', define
  2996. -     `TIME_WITH_SYS_TIME'.  On some older systems, `sys/time.h'
  2997. -     includes `time.h', but `time.h' is not protected against multiple
  2998. -     inclusion, so programs should not explicitly include both files.
  2999. -     This macro is useful in programs that use, for example, `struct
  3000. -     timeval' or `struct timezone' as well as `struct tm'.  It is best
  3001. -     used in conjunction with `HAVE_SYS_TIME_H', which can be checked
  3002. -     for using `AC_CHECK_HEADERS(sys/time.h)'.
  3003. -
  3004. -          #if TIME_WITH_SYS_TIME
  3005. -          # include <sys/time.h>
  3006. -          # include <time.h>
  3007. -          #else
  3008. -          # if HAVE_SYS_TIME_H
  3009. -          #  include <sys/time.h>
  3010. -          # else
  3011. -          #  include <time.h>
  3012. -          # endif
  3013. -          #endif
  3014. -
  3015. - - Macro: AC_STRUCT_ST_BLKSIZE
  3016. -     If `struct stat' contains an `st_blksize' member, define
  3017. -     `HAVE_ST_BLKSIZE'.
  3018. -
  3019. - - Macro: AC_STRUCT_ST_BLOCKS
  3020. -     If `struct stat' contains an `st_blocks' member, define
  3021. -     `HAVE_ST_BLOCKS'.  Otherwise, add `fileblocks.o' to the output
  3022. -     variable `LIBOBJS'.
  3023. -
  3024. - - Macro: AC_STRUCT_ST_RDEV
  3025. -     If `struct stat' contains an `st_rdev' member, define
  3026. -     `HAVE_ST_RDEV'.
  3027. -
  3028. - - Macro: AC_STRUCT_TM
  3029. -     If `time.h' does not define `struct tm', define `TM_IN_SYS_TIME',
  3030. -     which means that including `sys/time.h' had better define `struct
  3031. -     tm'.
  3032. -
  3033. - - Macro: AC_STRUCT_TIMEZONE
  3034. -     Figure out how to get the current timezone.  If `struct tm' has a
  3035. -     `tm_zone' member, define `HAVE_TM_ZONE'.  Otherwise, if the
  3036. -     external array `tzname' is found, define `HAVE_TZNAME'.
  3037. -
  3038. -
  3039. -File: autoconf.info,  Node: Typedefs,  Next: Compiler Characteristics,  Prev: Structures,  Up: Existing Tests
  3040. -
  3041. -Typedefs
  3042. -========
  3043. -
  3044. -   The following macros check for C typedefs.  If there is no macro
  3045. -specifically defined to check for a typedef you need, and you don't need
  3046. -to check for any special properties of it, then you can use a general
  3047. -typedef check macro.
  3048. -
  3049. -* Menu:
  3050. -
  3051. -* Particular Typedefs::         Special handling to find certain types.
  3052. -* Generic Typedefs::            How to find other types.
  3053. -
  3054. -
  3055. -File: autoconf.info,  Node: Particular Typedefs,  Next: Generic Typedefs,  Up: Typedefs
  3056. -
  3057. -Particular Typedef Checks
  3058. --------------------------
  3059. -
  3060. -   These macros check for particular C typedefs in `sys/types.h' and
  3061. -`stdlib.h' (if it exists).
  3062. -
  3063. - - Macro: AC_TYPE_GETGROUPS
  3064. -     Define `GETGROUPS_T' to be whichever of `gid_t' or `int' is the
  3065. -     base type of the array argument to `getgroups'.
  3066. -
  3067. - - Macro: AC_TYPE_MODE_T
  3068. -     If `mode_t' is not defined, define `mode_t' to be `int'.
  3069. -
  3070. - - Macro: AC_TYPE_OFF_T
  3071. -     If `off_t' is not defined, define `off_t' to be `long'.
  3072. -
  3073. - - Macro: AC_TYPE_PID_T
  3074. -     If `pid_t' is not defined, define `pid_t' to be `int'.
  3075. -
  3076. - - Macro: AC_TYPE_SIGNAL
  3077. -     If `signal.h' declares `signal' as returning a pointer to a
  3078. -     function returning `void', define `RETSIGTYPE' to be `void';
  3079. -     otherwise, define it to be `int'.
  3080. -
  3081. -     Define signal handlers as returning type `RETSIGTYPE':
  3082. -
  3083. -          RETSIGTYPE
  3084. -          hup_handler ()
  3085. -          {
  3086. -          ...
  3087. -          }
  3088. -
  3089. - - Macro: AC_TYPE_SIZE_T
  3090. -     If `size_t' is not defined, define `size_t' to be `unsigned'.
  3091. -
  3092. - - Macro: AC_TYPE_UID_T
  3093. -     If `uid_t' is not defined, define `uid_t' to be `int' and `gid_t'
  3094. -     to be `int'.
  3095. -
  3096. -
  3097. -File: autoconf.info,  Node: Generic Typedefs,  Prev: Particular Typedefs,  Up: Typedefs
  3098. -
  3099. -Generic Typedef Checks
  3100. -----------------------
  3101. -
  3102. -   This macro is used to check for typedefs not covered by the
  3103. -particular test macros.
  3104. -
  3105. - - Macro: AC_CHECK_TYPE (TYPE, DEFAULT)
  3106. -     If the type TYPE is not defined in `sys/types.h' or `stdlib.h' (if
  3107. -     it exists), define it to be the C (or C++) builtin type DEFAULT;
  3108. -     e.g., `short' or `unsigned'.
  3109. -
  3110. -
  3111. -File: autoconf.info,  Node: Compiler Characteristics,  Next: System Services,  Prev: Typedefs,  Up: Existing Tests
  3112. -
  3113. -Compiler Characteristics
  3114. -========================
  3115. -
  3116. -   The following macros check for C compiler or machine architecture
  3117. -features.  To check for characteristics not listed here, use
  3118. -`AC_TRY_COMPILE' (*note Examining Syntax::.) or `AC_TRY_RUN' (*note Run
  3119. -Time::.)
  3120. -
  3121. - - Macro: AC_C_BIGENDIAN
  3122. -     If words are stored with the most significant byte first (like
  3123. -     Motorola and SPARC, but not Intel and VAX, CPUs), define
  3124. -     `WORDS_BIGENDIAN'.
  3125. -
  3126. - - Macro: AC_C_CONST
  3127. -     If the C compiler does not fully support the keyword `const',
  3128. -     define `const' to be empty.  Some C compilers that do not define
  3129. -     `__STDC__' do support `const'; some compilers that define
  3130. -     `__STDC__' do not completely support `const'.  Programs can simply
  3131. -     use `const' as if every C compiler supported it; for those that
  3132. -     don't, the `Makefile' or configuration header file will define it
  3133. -     as empty.
  3134. -
  3135. - - Macro: AC_C_INLINE
  3136. -     If the C compiler supports the keyword `inline', do nothing.
  3137. -     Otherwise define `inline' to `__inline__' or `__inline' if it
  3138. -     accepts one of those, otherwise define `inline' to be empty.
  3139. -
  3140. - - Macro: AC_C_CHAR_UNSIGNED
  3141. -     If the C type `char' is unsigned, define `__CHAR_UNSIGNED__',
  3142. -     unless the C compiler predefines it.
  3143. -
  3144. - - Macro: AC_C_LONG_DOUBLE
  3145. -     If the C compiler supports the `long double' type, define
  3146. -     `HAVE_LONG_DOUBLE'.  Some C compilers that do not define
  3147. -     `__STDC__' do support the `long double' type; some compilers that
  3148. -     define `__STDC__' do not support `long double'.
  3149. -
  3150. - - Macro: AC_CHECK_SIZEOF (TYPE [, CROSS-SIZE])
  3151. -     Define `SIZEOF_UCTYPE' to be the size in bytes of the C (or C++)
  3152. -     builtin type TYPE, e.g. `int' or `char *'.  If `type' is unknown
  3153. -     to the compiler, it gets a size of 0.  UCTYPE is TYPE, with
  3154. -     lowercase converted to uppercase, spaces changed to underscores,
  3155. -     and asterisks changed to `P'.  If cross-compiling, the value
  3156. -     CROSS-SIZE is used if given, otherwise `configure' exits with an
  3157. -     error message.
  3158. -
  3159. -     For example, the call
  3160. -          AC_CHECK_SIZEOF(int *)
  3161. -
  3162. -     defines `SIZEOF_INT_P' to be 8 on DEC Alpha AXP systems.
  3163. -
  3164. - - Macro: AC_INT_16_BITS
  3165. -     If the C type `int' is 16 bits wide, define `INT_16_BITS'.  This
  3166. -     macro is obsolete; it is more general to use
  3167. -     `AC_CHECK_SIZEOF(int)' instead.
  3168. -
  3169. - - Macro: AC_LONG_64_BITS
  3170. -     If the C type `long int' is 64 bits wide, define `LONG_64_BITS'.
  3171. -     This macro is obsolete; it is more general to use
  3172. -     `AC_CHECK_SIZEOF(long)' instead.
  3173. -
  3174. -
  3175. -File: autoconf.info,  Node: System Services,  Next: UNIX Variants,  Prev: Compiler Characteristics,  Up: Existing Tests
  3176. -
  3177. -System Services
  3178. -===============
  3179. -
  3180. -   The following macros check for operating system services or
  3181. -capabilities.
  3182. -
  3183. - - Macro: AC_SYS_INTERPRETER
  3184. -     Check whether the system supports starting scripts with a line of
  3185. -     the form `#! /bin/csh' to select the interpreter to use for the
  3186. -     script.  After running this macro, shell code in `configure.in'
  3187. -     can check the variable `ac_cv_sys_interpreter'; it will be set to
  3188. -     `yes' if the system supports `#!', `no' if not.
  3189. -
  3190. - - Macro: AC_PATH_X
  3191. -     Try to locate the X Window System include files and libraries.  If
  3192. -     the user gave the command line options `--x-includes=DIR' and
  3193. -     `--x-libraries=DIR', use those directories.  If either or both
  3194. -     were not given, get the missing values by running `xmkmf' on a
  3195. -     trivial `Imakefile' and examining the `Makefile' that it produces.
  3196. -     If that fails (such as if `xmkmf' is not present), look for them
  3197. -     in several directories where they often reside.  If either method
  3198. -     is successful, set the shell variables `x_includes' and
  3199. -     `x_libraries' to their locations, unless they are in directories
  3200. -     the compiler searches by default.
  3201. -
  3202. -     If both methods fail, or the user gave the command line option
  3203. -     `--without-x', set the shell variable `no_x' to `yes'; otherwise
  3204. -     set it to the empty string.
  3205. -
  3206. - - Macro: AC_PATH_XTRA
  3207. -     An enhanced version of `AC_PATH_X'.  It adds the C compiler flags
  3208. -     that X needs to output variable `X_CFLAGS', and the X linker flags
  3209. -     to `X_LIBS'.  If X is not available, adds `-DX_DISPLAY_MISSING' to
  3210. -     `X_CFLAGS'.
  3211. -
  3212. -     This macro also checks for special libraries that some systems
  3213. -     need in order to compile X programs.  It adds any that the system
  3214. -     needs to output variable `X_EXTRA_LIBS'.  And it checks for
  3215. -     special X11R6 libraries that need to be linked with before
  3216. -     `-lX11', and adds any found to the output variable `X_PRE_LIBS'.
  3217. -
  3218. -
  3219. - - Macro: AC_SYS_LONG_FILE_NAMES
  3220. -     If the system supports file names longer than 14 characters, define
  3221. -     `HAVE_LONG_FILE_NAMES'.
  3222. -
  3223. - - Macro: AC_SYS_RESTARTABLE_SYSCALLS
  3224. -     If the system automatically restarts a system call that is
  3225. -     interrupted by a signal, define `HAVE_RESTARTABLE_SYSCALLS'.
  3226. -
  3227. -
  3228. -File: autoconf.info,  Node: UNIX Variants,  Prev: System Services,  Up: Existing Tests
  3229. -
  3230. -UNIX Variants
  3231. -=============
  3232. -
  3233. -   The following macros check for certain operating systems that need
  3234. -special treatment for some programs, due to exceptional oddities in
  3235. -their header files or libraries.  These macros are warts; they will be
  3236. -replaced by a more systematic approach, based on the functions they make
  3237. -available or the environments they provide.
  3238. -
  3239. - - Macro: AC_AIX
  3240. -     If on AIX, define `_ALL_SOURCE'.  Allows the use of some BSD
  3241. -     functions.  Should be called before any macros that run the C
  3242. -     compiler.
  3243. -
  3244. - - Macro: AC_DYNIX_SEQ
  3245. -     If on Dynix/PTX (Sequent UNIX), add `-lseq' to output variable
  3246. -     `LIBS'.  This macro is obsolete; instead, use `AC_FUNC_GETMNTENT'.
  3247. -
  3248. - - Macro: AC_IRIX_SUN
  3249. -     If on IRIX (Silicon Graphics UNIX), add `-lsun' to output variable
  3250. -     `LIBS'.  This macro is obsolete.  If you were using it to get
  3251. -     `getmntent', use `AC_FUNC_GETMNTENT' instead.  If you used it for
  3252. -     the NIS versions of the password and group functions, use
  3253. -     `AC_CHECK_LIB(sun, getpwnam)'.
  3254. -
  3255. - - Macro: AC_ISC_POSIX
  3256. -     If on a POSIXized ISC UNIX, define `_POSIX_SOURCE' and add
  3257. -     `-posix' (for the GNU C compiler) or `-Xp' (for other C compilers)
  3258. -     to output variable `CC'.  This allows the use of POSIX facilities.
  3259. -     Must be called after `AC_PROG_CC' and before any other macros
  3260. -     that run the C compiler.
  3261. -
  3262. - - Macro: AC_MINIX
  3263. -     If on Minix, define `_MINIX' and `_POSIX_SOURCE' and define
  3264. -     `_POSIX_1_SOURCE' to be 2.  This allows the use of POSIX
  3265. -     facilities.  Should be called before any macros that run the C
  3266. -     compiler.
  3267. -
  3268. - - Macro: AC_SCO_INTL
  3269. -     If on SCO UNIX, add `-lintl' to output variable `LIBS'.  This
  3270. -     macro is obsolete; instead, use `AC_FUNC_STRFTIME'.
  3271. -
  3272. - - Macro: AC_XENIX_DIR
  3273. -     If on Xenix, add `-lx' to output variable `LIBS'.  Also, if
  3274. -     `dirent.h' is being used, add `-ldir' to `LIBS'.  This macro is
  3275. -     obsolete; use `AC_HEADER_DIRENT' instead.
  3276. -
  3277. -
  3278. -File: autoconf.info,  Node: Writing Tests,  Next: Results,  Prev: Existing Tests,  Up: Top
  3279. -
  3280. -Writing Tests
  3281. -*************
  3282. -
  3283. -   If the existing feature tests don't do something you need, you have
  3284. -to write new ones.  These macros are the building blocks.  They provide
  3285. -ways for other macros to check whether various kinds of features are
  3286. -available and report the results.
  3287. -
  3288. -   This chapter contains some suggestions and some of the reasons why
  3289. -the existing tests are written the way they are.  You can also learn a
  3290. -lot about how to write Autoconf tests by looking at the existing ones.
  3291. -If something goes wrong in one or more of the Autoconf tests, this
  3292. -information can help you understand the assumptions behind them, which
  3293. -might help you figure out how to best solve the problem.
  3294. -
  3295. -   These macros check the output of the C compiler system.  They do not
  3296. -cache the results of their tests for future use (*note Caching
  3297. -Results::.), because they don't know enough about the information they
  3298. -are checking for to generate a cache variable name.  They also do not
  3299. -print any messages, for the same reason.  The checks for particular
  3300. -kinds of C features call these macros and do cache their results and
  3301. -print messages about what they're checking for.
  3302. -
  3303. -   When you write a feature test that could be applicable to more than
  3304. -one software package, the best thing to do is encapsulate it in a new
  3305. -macro.  *Note Writing Macros::, for how to do that.
  3306. -
  3307. -* Menu:
  3308. -
  3309. -* Examining Declarations::    Detecting header files and declarations.
  3310. -* Examining Syntax::            Detecting language syntax features.
  3311. -* Examining Libraries::         Detecting functions and global variables.
  3312. -* Run Time::                Testing for run-time features.
  3313. -* Portable Shell::              Shell script portability pitfalls.
  3314. -* Testing Values and Files::    Checking strings and files.
  3315. -* Multiple Cases::        Tests for several possible values.
  3316. -* Language Choice::             Selecting which language to use for testing.
  3317. -
  3318. -
  3319. -File: autoconf.info,  Node: Examining Declarations,  Next: Examining Syntax,  Up: Writing Tests
  3320. -
  3321. -Examining Declarations
  3322. -======================
  3323. -
  3324. -   The macro `AC_TRY_CPP' is used to check whether particular header
  3325. -files exist.  You can check for one at a time, or more than one if you
  3326. -need several header files to all exist for some purpose.
  3327. -
  3328. - - Macro: AC_TRY_CPP (INCLUDES, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
  3329. -     INCLUDES is C or C++ `#include' statements and declarations, on
  3330. -     which shell variable, backquote, and backslash substitutions are
  3331. -     performed.  (Actually, it can be any C program, but other
  3332. -     statements are probably not useful.)  If the preprocessor produces
  3333. -     no error messages while processing it, run shell commands
  3334. -     ACTION-IF-TRUE.  Otherwise run shell commands ACTION-IF-FALSE.
  3335. -
  3336. -     This macro uses `CPPFLAGS', but not `CFLAGS', because `-g', `-O',
  3337. -     etc. are not valid options to many C preprocessors.
  3338. -
  3339. -   Here is how to find out whether a header file contains a particular
  3340. -declaration, such as a typedef, a structure, a structure member, or a
  3341. -function.  Use `AC_EGREP_HEADER' instead of running `grep' directly on
  3342. -the header file; on some systems the symbol might be defined in another
  3343. -header file that the file you are checking `#include's.
  3344. -
  3345. - - Macro: AC_EGREP_HEADER (PATTERN, HEADER-FILE, ACTION-IF-FOUND [,
  3346. -          ACTION-IF-NOT-FOUND])
  3347. -     If the output of running the preprocessor on the system header file
  3348. -     HEADER-FILE matches the `egrep' regular expression PATTERN,
  3349. -     execute shell commands ACTION-IF-FOUND, otherwise execute
  3350. -     ACTION-IF-NOT-FOUND.
  3351. -
  3352. -   To check for C preprocessor symbols, either defined by header files
  3353. -or predefined by the C preprocessor, use `AC_EGREP_CPP'.  Here is an
  3354. -example of the latter:
  3355. -
  3356. -     AC_EGREP_CPP(yes,
  3357. -     [#ifdef _AIX
  3358. -       yes
  3359. -     #endif
  3360. -     ], is_aix=yes, is_aix=no)
  3361. -
  3362. - - Macro: AC_EGREP_CPP (PATTERN, PROGRAM, [ACTION-IF-FOUND [,
  3363. -          ACTION-IF-NOT-FOUND]])
  3364. -     PROGRAM is the text of a C or C++ program, on which shell
  3365. -     variable, backquote, and backslash substitutions are performed.
  3366. -     If the output of running the preprocessor on PROGRAM matches the
  3367. -     `egrep' regular expression PATTERN, execute shell commands
  3368. -     ACTION-IF-FOUND, otherwise execute ACTION-IF-NOT-FOUND.
  3369. -
  3370. -     This macro calls `AC_PROG_CPP' or `AC_PROG_CXXCPP' (depending on
  3371. -     which language is current, *note Language Choice::.), if it hasn't
  3372. -     been called already.
  3373. -
  3374. -
  3375. -File: autoconf.info,  Node: Examining Syntax,  Next: Examining Libraries,  Prev: Examining Declarations,  Up: Writing Tests
  3376. -
  3377. -Examining Syntax
  3378. -================
  3379. -
  3380. -   To check for a syntax feature of the C or C++ compiler, such as
  3381. -whether it recognizes a certain keyword, use `AC_TRY_COMPILE' to try to
  3382. -compile a small program that uses that feature.  You can also use it to
  3383. -check for structures and structure members that are not present on all
  3384. -systems.
  3385. -
  3386. - - Macro: AC_TRY_COMPILE (INCLUDES, FUNCTION-BODY, [ACTION-IF-FOUND [,
  3387. -          ACTION-IF-NOT-FOUND]])
  3388. -     Create a test C program to see whether a function whose body
  3389. -     consists of FUNCTION-BODY can be compiled; INCLUDES is any
  3390. -     `#include' statements needed by the code in FUNCTION-BODY.  If the
  3391. -     file compiles successfully, run shell commands ACTION-IF-FOUND,
  3392. -     otherwise run ACTION-IF-NOT-FOUND.  This macro uses `CFLAGS' or
  3393. -     `CXXFLAGS', and `CPPFLAGS', when compiling.  It does not try to
  3394. -     link; use `AC_TRY_LINK' if you need to do that (*note Examining
  3395. -     Libraries::.).
  3396. -
  3397. -
  3398. -File: autoconf.info,  Node: Examining Libraries,  Next: Run Time,  Prev: Examining Syntax,  Up: Writing Tests
  3399. -
  3400. -Examining Libraries
  3401. -===================
  3402. -
  3403. -   To check for a library, a function, or a global variable, Autoconf
  3404. -`configure' scripts try to compile and link a small program that uses
  3405. -it.  This is unlike Metaconfig, which by default uses `nm' or `ar' on
  3406. -the C library to try to figure out which functions are available.
  3407. -Trying to link with the function is usually a more reliable approach
  3408. -because it avoids dealing with the variations in the options and output
  3409. -formats of `nm' and `ar' and in the location of the standard libraries.
  3410. -It also allows configuring for cross-compilation or checking a
  3411. -function's runtime behavior if needed.  On the other hand, it can be
  3412. -slower than scanning the libraries once.
  3413. -
  3414. -   A few systems have linkers that do not return a failure exit status
  3415. -when there are unresolved functions in the link.  This bug makes the
  3416. -configuration scripts produced by Autoconf unusable on those systems.
  3417. -However, some of them can be given options that make the exit status
  3418. -correct.  This is a problem that Autoconf does not currently handle
  3419. -automatically.  If users encounter this problem, they might be able to
  3420. -solve it by setting `LDFLAGS' in the environment to pass whatever
  3421. -options the linker needs (for example, `-Wl,-dn' on MIPS RISC/OS).
  3422. -
  3423. -   `AC_TRY_LINK' is used to compile test programs to test for functions
  3424. -and global variables.  It is also used (by `AC_CHECK_LIB') to check for
  3425. -libraries, by adding the library being checked for to `LIBS'
  3426. -temporarily and trying to link a small program.
  3427. -
  3428. - - Macro: AC_TRY_LINK (INCLUDES, FUNCTION-BODY, [ACTION-IF-FOUND [,
  3429. -          ACTION-IF-NOT-FOUND]])
  3430. -     Create a test C program to see whether a function whose body
  3431. -     consists of FUNCTION-BODY can be compiled and linked; INCLUDES is
  3432. -     any `#include' statements needed by the code in FUNCTION-BODY.  If
  3433. -     the file compiles and links successfully, run shell commands
  3434. -     ACTION-IF-FOUND, otherwise run ACTION-IF-NOT-FOUND.  This macro
  3435. -     uses `CFLAGS' or `CXXFLAGS', `CPPFLAGS', `LDFLAGS', and `LIBS'
  3436. -     when compiling.
  3437. -
  3438. - - Macro: AC_COMPILE_CHECK (ECHO-TEXT, INCLUDES, FUNCTION-BODY,
  3439. -          ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
  3440. -     This is an obsolete version of `AC_TRY_LINK', with the addition
  3441. -     that it prints `checking for ECHO-TEXT' to the standard output
  3442. -     first, if ECHO-TEXT is non-empty.  Use `AC_MSG_CHECKING' and
  3443. -     `AC_MSG_RESULT' instead to print messages (*note Printing
  3444. -     Messages::.).
  3445. -
  3446. -
  3447. -File: autoconf.info,  Node: Run Time,  Next: Portable Shell,  Prev: Examining Libraries,  Up: Writing Tests
  3448. -
  3449. -Checking Run Time Behavior
  3450. -==========================
  3451. -
  3452. -   Sometimes you need to find out how a system performs at run time,
  3453. -such as whether a given function has a certain capability or bug.  If
  3454. -you can, make such checks when your program runs instead of when it is
  3455. -configured.  You can check for things like the machine's endianness when
  3456. -your program initializes itself.
  3457. -
  3458. -   If you really need to test for a run-time behavior while configuring,
  3459. -you can write a test program to determine the result, and compile and
  3460. -run it using `AC_TRY_RUN'.  Avoid running test programs if possible,
  3461. -because using them prevents people from configuring your package for
  3462. -cross-compiling.
  3463. -
  3464. -* Menu:
  3465. -
  3466. -* Test Programs::               Running test programs.
  3467. -* Guidelines::            General rules for writing test programs.
  3468. -* Test Functions::        Avoiding pitfalls in test programs.
  3469. -
  3470. -
  3471. -File: autoconf.info,  Node: Test Programs,  Next: Guidelines,  Up: Run Time
  3472. -
  3473. -Running Test Programs
  3474. ----------------------
  3475. -
  3476. -   Use the following macro if you need to test run-time behavior of the
  3477. -system while configuring.
  3478. -
  3479. - - Macro: AC_TRY_RUN (PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE [,
  3480. -          ACTION-IF-CROSS-COMPILING]]])
  3481. -     PROGRAM is the text of a C program, on which shell variable and
  3482. -     backquote substitutions are performed.  If it compiles and links
  3483. -     successfully and returns an exit status of 0 when executed, run
  3484. -     shell commands ACTION-IF-TRUE.  Otherwise run shell commands
  3485. -     ACTION-IF-FALSE; the exit status of the program is available in
  3486. -     the shell variable `$?'.  This macro uses `CFLAGS' or `CXXFLAGS',
  3487. -     `CPPFLAGS', `LDFLAGS', and `LIBS' when compiling.
  3488. -
  3489. -     If the C compiler being used does not produce executables that run
  3490. -     on the system where `configure' is being run, then the test
  3491. -     program is not run.  If the optional shell commands
  3492. -     ACTION-IF-CROSS-COMPILING are given, they are run instead and this
  3493. -     macro calls `AC_C_CROSS' if it has not already been called.
  3494. -     Otherwise, `configure' prints an error message and exits.
  3495. -
  3496. -   Try to provide a pessimistic default value to use when
  3497. -cross-compiling makes run-time tests impossible.  You do this by
  3498. -passing the optional last argument to `AC_TRY_RUN'.  `autoconf' prints
  3499. -a warning message when creating `configure' each time it encounters a
  3500. -call to `AC_TRY_RUN' with no ACTION-IF-CROSS-COMPILING argument given.
  3501. -You may ignore the warning, though users will not be able to configure
  3502. -your package for cross-compiling.  A few of the macros distributed with
  3503. -Autoconf produce this warning message.
  3504. -
  3505. -   To configure for cross-compiling you can also choose a value for
  3506. -those parameters based on the canonical system name (*note Manual
  3507. -Configuration::.).  Alternatively, set up a test results cache file with
  3508. -the correct values for the target system (*note Caching Results::.).
  3509. -
  3510. -   To provide a default for calls of `AC_TRY_RUN' that are embedded in
  3511. -other macros, including a few of the ones that come with Autoconf, you
  3512. -can call `AC_C_CROSS' before running them.  Then, if the shell variable
  3513. -`cross_compiling' is set to `yes', use an alternate method to get the
  3514. -results instead of calling the macros.
  3515. -
  3516. - - Macro: AC_C_CROSS
  3517. -     If the C compiler being used does not produce executables that can
  3518. -     run on the system where `configure' is being run, set the shell
  3519. -     variable `cross_compiling' to `yes', otherwise `no'.
  3520. -
  3521. -
  3522. -File: autoconf.info,  Node: Guidelines,  Next: Test Functions,  Prev: Test Programs,  Up: Run Time
  3523. -
  3524. -Guidelines for Test Programs
  3525. -----------------------------
  3526. -
  3527. -   Test programs should not write anything to the standard output.  They
  3528. -should return 0 if the test succeeds, nonzero otherwise, so that success
  3529. -can be distinguished easily from a core dump or other failure;
  3530. -segmentation violations and other failures produce a nonzero exit
  3531. -status.  Test programs should `exit', not `return', from `main',
  3532. -because on some systems (old Suns, at least) the argument to `return'
  3533. -in `main' is ignored.
  3534. -
  3535. -   Test programs can use `#if' or `#ifdef' to check the values of
  3536. -preprocessor macros defined by tests that have already run.  For
  3537. -example, if you call `AC_HEADER_STDC', then later on in `configure.in'
  3538. -you can have a test program that includes an ANSI C header file
  3539. -conditionally:
  3540. -
  3541. -     #if STDC_HEADERS
  3542. -     # include <stdlib.h>
  3543. -     #endif
  3544. -
  3545. -   If a test program needs to use or create a data file, give it a name
  3546. -that starts with `conftest', such as `conftestdata'.  The `configure'
  3547. -script cleans up by running `rm -rf conftest*' after running test
  3548. -programs and if the script is interrupted.
  3549. -
  3550. -
  3551. -File: autoconf.info,  Node: Test Functions,  Prev: Guidelines,  Up: Run Time
  3552. -
  3553. -Test Functions
  3554. ---------------
  3555. -
  3556. -   Function declarations in test programs should have a prototype
  3557. -conditionalized for C++.  In practice, though, test programs rarely need
  3558. -functions that take arguments.
  3559. -
  3560. -     #ifdef __cplusplus
  3561. -     foo(int i)
  3562. -     #else
  3563. -     foo(i) int i;
  3564. -     #endif
  3565. -
  3566. -   Functions that test programs declare should also be conditionalized
  3567. -for C++, which requires `extern "C"' prototypes.  Make sure to not
  3568. -include any header files containing clashing prototypes.
  3569. -
  3570. -     #ifdef __cplusplus
  3571. -     extern "C" void *malloc(size_t);
  3572. -     #else
  3573. -     char *malloc();
  3574. -     #endif
  3575. -
  3576. -   If a test program calls a function with invalid parameters (just to
  3577. -see whether it exists), organize the program to ensure that it never
  3578. -invokes that function.  You can do this by calling it in another
  3579. -function that is never invoked.  You can't do it by putting it after a
  3580. -call to `exit', because GCC version 2 knows that `exit' never returns
  3581. -and optimizes out any code that follows it in the same block.
  3582. -
  3583. -   If you include any header files, make sure to call the functions
  3584. -relevant to them with the correct number of arguments, even if they are
  3585. -just 0, to avoid compilation errors due to prototypes.  GCC version 2
  3586. -has internal prototypes for several functions that it automatically
  3587. -inlines; for example, `memcpy'.  To avoid errors when checking for
  3588. -them, either pass them the correct number of arguments or redeclare them
  3589. -with a different return type (such as `char').
  3590. -
  3591. -
  3592. -File: autoconf.info,  Node: Portable Shell,  Next: Testing Values and Files,  Prev: Run Time,  Up: Writing Tests
  3593. -
  3594. -Portable Shell Programming
  3595. -==========================
  3596. -
  3597. -   When writing your own checks, there are some shell script programming
  3598. -techniques you should avoid in order to make your code portable.  The
  3599. -Bourne shell and upward-compatible shells like Bash and the Korn shell
  3600. -have evolved over the years, but to prevent trouble, do not take
  3601. -advantage of features that were added after UNIX version 7, circa 1977.
  3602. -You should not use shell functions, aliases, negated character classes,
  3603. -or other features that are not found in all Bourne-compatible shells;
  3604. -restrict yourself to the lowest common denominator.  Even `unset' is
  3605. -not supported by all shells!  Also, include a space after the
  3606. -exclamation point in interpreter specifications, like this:
  3607. -     #! /usr/bin/perl
  3608. -   If you omit the space before the path, then 4.2BSD based systems
  3609. -(such as Sequent DYNIX) will ignore the line, because they interpret
  3610. -`#! /' as a 4-byte magic number.
  3611. -
  3612. -   The set of external programs you should run in a `configure' script
  3613. -is fairly small.  *Note Utilities in Makefiles: (standards)Utilities in
  3614. -Makefiles, for the list.  This restriction allows users to start out
  3615. -with a fairly small set of programs and build the rest, avoiding too
  3616. -many interdependencies between packages.
  3617. -
  3618. -   Some of these external utilities have a portable subset of features,
  3619. -as well; for example, don't rely on `ln' having a `-f' option or `cat'
  3620. -having any options.  `sed' scripts should not contain comments or use
  3621. -branch labels longer than 8 characters.  Don't use `grep -s' to
  3622. -suppress output, because `grep -s' on System V does not suppress
  3623. -output, only error messages.  Instead, redirect the standard output and
  3624. -standard error (in case the file doesn't exist) of `grep' to
  3625. -`/dev/null'.  Check the exit status of `grep' to determine whether it
  3626. -found a match.
  3627. -
  3628. -
  3629. -File: autoconf.info,  Node: Testing Values and Files,  Next: Multiple Cases,  Prev: Portable Shell,  Up: Writing Tests
  3630. -
  3631. -Testing Values and Files
  3632. -========================
  3633. -
  3634. -   `configure' scripts need to test properties of many files and
  3635. -strings.  Here are some portability problems to watch out for when doing
  3636. -those tests.
  3637. -
  3638. -   The `test' program is the way to perform many file and string tests.
  3639. -It is often invoked by the alternate name `[', but using that name in
  3640. -Autoconf code is asking for trouble since it is an `m4' quote character.
  3641. -
  3642. -   If you need to make multiple checks using `test', combine them with
  3643. -the shell operators `&&' and `||' instead of using the `test' operators
  3644. -`-a' and `-o'.  On System V, the precedence of `-a' and `-o' is wrong
  3645. -relative to the unary operators; consequently, POSIX does not specify
  3646. -them, so using them is nonportable.  If you combine `&&' and `||' in
  3647. -the same statement, keep in mind that they have equal precedence.
  3648. -
  3649. -   To enable `configure' scripts to support cross-compilation, they
  3650. -shouldn't do anything that tests features of the host system instead of
  3651. -the target system.  But occasionally you may find it necessary to check
  3652. -whether some arbitrary file exists.  To do so, use `test -f' or `test
  3653. --r'.  Do not use `test -x', because 4.3BSD does not have it.
  3654. -
  3655. -   Another nonportable shell programming construction is
  3656. -     VAR=${VAR:-VALUE}
  3657. -
  3658. -The intent is to set VAR to VALUE only if it is not already set, but if
  3659. -VAR has any value, even the empty string, to leave it alone.  Old BSD
  3660. -shells, including the Ultrix `sh', don't accept the colon, and complain
  3661. -and die.  A portable equivalent is
  3662. -     : ${VAR=VALUE}
  3663. -
  3664. -
  3665. -File: autoconf.info,  Node: Multiple Cases,  Next: Language Choice,  Prev: Testing Values and Files,  Up: Writing Tests
  3666. -
  3667. -Multiple Cases
  3668. -==============
  3669. -
  3670. -   Some operations are accomplished in several possible ways, depending
  3671. -on the UNIX variant.  Checking for them essentially requires a "case
  3672. -statement".  Autoconf does not directly provide one; however, it is
  3673. -easy to simulate by using a shell variable to keep track of whether a
  3674. -way to perform the operation has been found yet.
  3675. -
  3676. -   Here is an example that uses the shell variable `fstype' to keep
  3677. -track of whether the remaining cases need to be checked.
  3678. -
  3679. -     AC_MSG_CHECKING(how to get filesystem type)
  3680. -     fstype=no
  3681. -     # The order of these tests is important.
  3682. -     AC_TRY_CPP([#include <sys/statvfs.h>
  3683. -     #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_STATVFS) fstype=SVR4)
  3684. -     if test $fstype = no; then
  3685. -     AC_TRY_CPP([#include <sys/statfs.h>
  3686. -     #include <sys/fstyp.h>], AC_DEFINE(FSTYPE_USG_STATFS) fstype=SVR3)
  3687. -     fi
  3688. -     if test $fstype = no; then
  3689. -     AC_TRY_CPP([#include <sys/statfs.h>
  3690. -     #include <sys/vmount.h>], AC_DEFINE(FSTYPE_AIX_STATFS) fstype=AIX)
  3691. -     fi
  3692. -     # (more cases omitted here)
  3693. -     AC_MSG_RESULT($fstype)
  3694. -
  3695. -
  3696. -File: autoconf.info,  Node: Language Choice,  Prev: Multiple Cases,  Up: Writing Tests
  3697. -
  3698. -Language Choice
  3699. -===============
  3700. -
  3701. -   Packages that use both C and C++ need to test features of both
  3702. -compilers.  Autoconf-generated `configure' scripts check for C features
  3703. -by default.  The following macros determine which language's compiler
  3704. -is used in tests that follow in `configure.in'.
  3705. -
  3706. - - Macro: AC_LANG_C
  3707. -     Do compilation tests using `CC' and `CPP' and use extension `.c'
  3708. -     for test programs.
  3709. -
  3710. - - Macro: AC_LANG_CPLUSPLUS
  3711. -     Do compilation tests using `CXX' and `CXXCPP' and use extension
  3712. -     `.C' for test programs.
  3713. -
  3714. - - Macro: AC_LANG_SAVE
  3715. -     Remember the current language (as set by `AC_LANG_C' or
  3716. -     `AC_LANG_CPLUSPLUS') on a stack.  Does not change which language is
  3717. -     current.  Use this macro and `AC_LANG_RESTORE' in macros that need
  3718. -     to temporarily switch to a particular language.
  3719. -
  3720. - - Macro: AC_LANG_RESTORE
  3721. -     Select the language that is saved on the top of the stack, as set
  3722. -     by `AC_LANG_SAVE', and remove it from the stack.  This macro is
  3723. -     equivalent to either `AC_LANG_C' or `AC_LANG_CPLUSPLUS', whichever
  3724. -     had been run most recently when `AC_LANG_SAVE' was last called.
  3725. -
  3726. -     Do not call this macro more times than `AC_LANG_SAVE'.
  3727. -
  3728. - - Macro: AC_REQUIRE_CPP
  3729. -     Ensure that whichever preprocessor would currently be used for
  3730. -     tests has been found.  Calls `AC_REQUIRE' (*note Prerequisite
  3731. -     Macros::.) with an argument of either `AC_PROG_CPP' or
  3732. -     `AC_PROG_CXXCPP', depending on which language is current.
  3733. -
  3734. -
  3735. -File: autoconf.info,  Node: Results,  Next: Writing Macros,  Prev: Writing Tests,  Up: Top
  3736. -
  3737. -Results of Tests
  3738. -****************
  3739. -
  3740. -   Once `configure' has determined whether a feature exists, what can
  3741. -it do to record that information?  There are four sorts of things it can
  3742. -do: define a C preprocessor symbol, set a variable in the output files,
  3743. -save the result in a cache file for future `configure' runs, and print
  3744. -a message letting the user know the result of the test.
  3745. -
  3746. -* Menu:
  3747. -
  3748. -* Defining Symbols::            Defining C preprocessor symbols.
  3749. -* Setting Output Variables::    Replacing variables in output files.
  3750. -* Caching Results::             Speeding up subsequent `configure' runs.
  3751. -* Printing Messages::           Notifying users of progress or problems.
  3752. -
  3753. -
  3754. -File: autoconf.info,  Node: Defining Symbols,  Next: Setting Output Variables,  Up: Results
  3755. -
  3756. -Defining C Preprocessor Symbols
  3757. -===============================
  3758. -
  3759. -   A common action to take in response to a feature test is to define a
  3760. -C preprocessor symbol indicating the results of the test.  That is done
  3761. -by calling `AC_DEFINE' or `AC_DEFINE_UNQUOTED'.
  3762. -
  3763. -   By default, `AC_OUTPUT' places the symbols defined by these macros
  3764. -into the output variable `DEFS', which contains an option
  3765. -`-DSYMBOL=VALUE' for each symbol defined.  Unlike in Autoconf version
  3766. -1, there is no variable `DEFS' defined while `configure' is running.
  3767. -To check whether Autoconf macros have already defined a certain C
  3768. -preprocessor symbol, test the value of the appropriate cache variable,
  3769. -as in this example:
  3770. -
  3771. -     AC_CHECK_FUNC(vprintf, AC_DEFINE(HAVE_VPRINTF))
  3772. -     if test "$ac_cv_func_vprintf" != yes; then
  3773. -     AC_CHECK_FUNC(_doprnt, AC_DEFINE(HAVE_DOPRNT))
  3774. -     fi
  3775. -
  3776. -   If `AC_CONFIG_HEADER' has been called, then instead of creating
  3777. -`DEFS', `AC_OUTPUT' creates a header file by substituting the correct
  3778. -values into `#define' statements in a template file.  *Note
  3779. -Configuration Headers::, for more information about this kind of output.
  3780. -
  3781. - - Macro: AC_DEFINE (VARIABLE [, VALUE])
  3782. -     Define C preprocessor variable VARIABLE.  If VALUE is given, set
  3783. -     VARIABLE to that value (verbatim), otherwise set it to 1.  VALUE
  3784. -     should not contain literal newlines, and if you are not using
  3785. -     `AC_CONFIG_HEADER' it should not contain any `#' characters, as
  3786. -     `make' tends to eat them.  To use a shell variable (which you need
  3787. -     to do in order to define a value containing the `m4' quote
  3788. -     characters `[' or `]'), use `AC_DEFINE_UNQUOTED' instead.  The
  3789. -     following example defines the C preprocessor variable `EQUATION'
  3790. -     to be the string constant `"$a > $b"':
  3791. -
  3792. -          AC_DEFINE(EQUATION, "$a > $b")
  3793. -
  3794. - - Macro: AC_DEFINE_UNQUOTED (VARIABLE [, VALUE])
  3795. -     Like `AC_DEFINE', but three shell expansions are
  3796. -     performed--once--on VARIABLE and VALUE: variable expansion (`$'),
  3797. -     command substitution (``'), and backslash escaping (`\').  Single
  3798. -     and double quote characters in the value have no special meaning.
  3799. -     Use this macro instead of `AC_DEFINE' when VARIABLE or VALUE is a
  3800. -     shell variable.  Examples:
  3801. -
  3802. -          AC_DEFINE_UNQUOTED(config_machfile, "${machfile}")
  3803. -          AC_DEFINE_UNQUOTED(GETGROUPS_T, $ac_cv_type_getgroups)
  3804. -          AC_DEFINE_UNQUOTED(${ac_tr_hdr})
  3805. -
  3806. -   Due to the syntactical bizarreness of the Bourne shell, do not use
  3807. -semicolons to separate `AC_DEFINE' or `AC_DEFINE_UNQUOTED' calls from
  3808. -other macro calls or shell code; that can cause syntax errors in the
  3809. -resulting `configure' script.  Use either spaces or newlines.  That is,
  3810. -do this:
  3811. -
  3812. -     AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4) LIBS="$LIBS -lelf")
  3813. -
  3814. -or this:
  3815. -
  3816. -     AC_CHECK_HEADER(elf.h,
  3817. -       AC_DEFINE(SVR4)
  3818. -       LIBS="$LIBS -lelf")
  3819. -
  3820. -instead of this:
  3821. -
  3822. -     AC_CHECK_HEADER(elf.h, AC_DEFINE(SVR4); LIBS="$LIBS -lelf")
  3823. -
  3824. -
  3825. -File: autoconf.info,  Node: Setting Output Variables,  Next: Caching Results,  Prev: Defining Symbols,  Up: Results
  3826. -
  3827. -Setting Output Variables
  3828. -========================
  3829. -
  3830. -   One way to record the results of tests is to set "output variables",
  3831. -which are shell variables whose values are substituted into files that
  3832. -`configure' outputs.  The two macros below create new output variables.
  3833. -*Note Preset Output Variables::, for a list of output variables that
  3834. -are always available.
  3835. -
  3836. - - Macro: AC_SUBST (VARIABLE)
  3837. -     Create an output variable from a shell variable.  Make `AC_OUTPUT'
  3838. -     substitute the variable VARIABLE into output files (typically one
  3839. -     or more `Makefile's).  This means that `AC_OUTPUT' will replace
  3840. -     instances of `@VARIABLE@' in input files with the value that the
  3841. -     shell variable VARIABLE has when `AC_OUTPUT' is called.  The value
  3842. -     of VARIABLE should not contain literal newlines.
  3843. -
  3844. - - Macro: AC_SUBST_FILE (VARIABLE)
  3845. -     Another way to create an output variable from a shell variable.
  3846. -     Make `AC_OUTPUT' insert (without substitutions) the contents of
  3847. -     the file named by shell variable VARIABLE into output files.  This
  3848. -     means that `AC_OUTPUT' will replace instances of `@VARIABLE@' in
  3849. -     output files (such as `Makefile.in') with the contents of the file
  3850. -     that the shell variable VARIABLE names when `AC_OUTPUT' is called.
  3851. -     Set the variable to `/dev/null' for cases that do not have a file
  3852. -     to insert.
  3853. -
  3854. -     This macro is useful for inserting `Makefile' fragments containing
  3855. -     special dependencies or other `make' directives for particular host
  3856. -     or target types into `Makefile's.  For example, `configure.in'
  3857. -     could contain:
  3858. -
  3859. -          AC_SUBST_FILE(host_frag)dnl
  3860. -          host_frag=$srcdir/conf/sun4.mh
  3861. -
  3862. -     and then a `Makefile.in' could contain:
  3863. -
  3864. -          @host_frag@
  3865. -
  3866. -
  3867. -File: autoconf.info,  Node: Caching Results,  Next: Printing Messages,  Prev: Setting Output Variables,  Up: Results
  3868. -
  3869. -Caching Results
  3870. -===============
  3871. -
  3872. -   To avoid checking for the same features repeatedly in various
  3873. -`configure' scripts (or repeated runs of one script), `configure' saves
  3874. -the results of many of its checks in a "cache file".  If, when a
  3875. -`configure' script runs, it finds a cache file, it reads from it the
  3876. -results from previous runs and avoids rerunning those checks.  As a
  3877. -result, `configure' can run much faster than if it had to perform all
  3878. -of the checks every time.
  3879. -
  3880. - - Macro: AC_CACHE_VAL (CACHE-ID, COMMANDS-TO-SET-IT)
  3881. -     Ensure that the results of the check identified by CACHE-ID are
  3882. -     available.  If the results of the check were in the cache file
  3883. -     that was read, and `configure' was not given the `--quiet' or
  3884. -     `--silent' option, print a message saying that the result was
  3885. -     cached; otherwise, run the shell commands COMMANDS-TO-SET-IT.
  3886. -     Those commands should have no side effects except for setting the
  3887. -     variable CACHE-ID.  In particular, they should not call
  3888. -     `AC_DEFINE'; the code that follows the call to `AC_CACHE_VAL'
  3889. -     should do that, based on the cached value.  Also, they should not
  3890. -     print any messages, for example with `AC_MSG_CHECKING'; do that
  3891. -     before calling `AC_CACHE_VAL', so the messages are printed
  3892. -     regardless of whether the results of the check are retrieved from
  3893. -     the cache or determined by running the shell commands.  If the
  3894. -     shell commands are run to determine the value, the value will be
  3895. -     saved in the cache file just before `configure' creates its output
  3896. -     files.  *Note Cache Variable Names::, for how to choose the name
  3897. -     of the CACHE-ID variable.
  3898. -
  3899. - - Macro: AC_CACHE_CHECK (MESSAGE, CACHE-ID, COMMANDS)
  3900. -     A wrapper for `AC_CACHE_VAL' that takes care of printing the
  3901. -     messages.  This macro provides a convenient shorthand for the most
  3902. -     common way to use these macros.  It calls `AC_MSG_CHECKING' for
  3903. -     MESSAGE, then `AC_CACHE_VAL' with the CACHE-ID and COMMANDS
  3904. -     arguments, and `AC_MSG_RESULT' with CACHE-ID.
  3905. -
  3906. -* Menu:
  3907. -
  3908. -* Cache Variable Names::        Shell variables used in caches.
  3909. -* Cache Files::                Files `configure' uses for caching.
  3910. -
  3911. -
  3912. -File: autoconf.info,  Node: Cache Variable Names,  Next: Cache Files,  Up: Caching Results
  3913. -
  3914. -Cache Variable Names
  3915. ---------------------
  3916. -
  3917. -   The names of cache variables should have the following format:
  3918. -
  3919. -     PACKAGE-PREFIX_cv_VALUE-TYPE_SPECIFIC-VALUE[_ADDITIONAL-OPTIONS]
  3920. -
  3921. -for example, `ac_cv_header_stat_broken' or
  3922. -`ac_cv_prog_gcc_traditional'.  The parts of the variable name are:
  3923. -
  3924. -PACKAGE-PREFIX
  3925. -     An abbreviation for your package or organization; the same prefix
  3926. -     you begin local Autoconf macros with, except lowercase by
  3927. -     convention.  For cache values used by the distributed Autoconf
  3928. -     macros, this value is `ac'.
  3929. -
  3930. -`_cv_'
  3931. -     Indicates that this shell variable is a cache value.
  3932. -
  3933. -VALUE-TYPE
  3934. -     A convention for classifying cache values, to produce a rational
  3935. -     naming system.  The values used in Autoconf are listed in *Note
  3936. -     Macro Names::.
  3937. -
  3938. -SPECIFIC-VALUE
  3939. -     Which member of the class of cache values this test applies to.
  3940. -     For example, which function (`alloca'), program (`gcc'), or output
  3941. -     variable (`INSTALL').
  3942. -
  3943. -ADDITIONAL-OPTIONS
  3944. -     Any particular behavior of the specific member that this test
  3945. -     applies to.  For example, `broken' or `set'.  This part of the
  3946. -     name may be omitted if it does not apply.
  3947. -
  3948. -   Like their names, the values that may be assigned to cache variables
  3949. -have a few restrictions.  The values may not contain single quotes or
  3950. -curly braces.  Usually, their values will be boolean (`yes' or `no') or
  3951. -the names of files or functions; so this is not an important
  3952. -restriction.
  3953. -
  3954. -
  3955. -File: autoconf.info,  Node: Cache Files,  Prev: Cache Variable Names,  Up: Caching Results
  3956. -
  3957. -Cache Files
  3958. ------------
  3959. -
  3960. -   A cache file is a shell script that caches the results of configure
  3961. -tests run on one system so they can be shared between configure scripts
  3962. -and configure runs.  It is not useful on other systems.  If its contents
  3963. -are invalid for some reason, the user may delete or edit it.
  3964. -
  3965. -   By default, configure uses `./config.cache' as the cache file,
  3966. -creating it if it does not exist already.  `configure' accepts the
  3967. -`--cache-file=FILE' option to use a different cache file; that is what
  3968. -`configure' does when it calls `configure' scripts in subdirectories,
  3969. -so they share the cache.  *Note Subdirectories::, for information on
  3970. -configuring subdirectories with the `AC_CONFIG_SUBDIRS' macro.
  3971. -
  3972. -   Giving `--cache-file=/dev/null' disables caching, for debugging
  3973. -`configure'.  `config.status' only pays attention to the cache file if
  3974. -it is given the `--recheck' option, which makes it rerun `configure'.
  3975. -If you are anticipating a long debugging period, you can also disable
  3976. -cache loading and saving for a `configure' script by redefining the
  3977. -cache macros at the start of `configure.in':
  3978. -
  3979. -     define([AC_CACHE_LOAD], )dnl
  3980. -     define([AC_CACHE_SAVE], )dnl
  3981. -     AC_INIT(whatever)
  3982. -      ... rest of configure.in ...
  3983. -
  3984. -   It is wrong to try to distribute cache files for particular system
  3985. -types.  There is too much room for error in doing that, and too much
  3986. -administrative overhead in maintaining them.  For any features that
  3987. -can't be guessed automatically, use the standard method of the canonical
  3988. -system type and linking files (*note Manual Configuration::.).
  3989. -
  3990. -   The cache file on a particular system will gradually accumulate
  3991. -whenever someone runs a `configure' script; it will be initially
  3992. -nonexistent.  Running `configure' merges the new cache results with the
  3993. -existing cache file.  The site initialization script can specify a
  3994. -site-wide cache file to use instead of the default, to make it work
  3995. -transparently, as long as the same C compiler is used every time (*note
  3996. -Site Defaults::.).
  3997. -
  3998. -
  3999. -File: autoconf.info,  Node: Printing Messages,  Prev: Caching Results,  Up: Results
  4000. -
  4001. -Printing Messages
  4002. -=================
  4003. -
  4004. -   `configure' scripts need to give users running them several kinds of
  4005. -information.  The following macros print messages in ways appropriate
  4006. -for each kind.  The arguments to all of them get enclosed in shell
  4007. -double quotes, so the shell performs variable and backquote substitution
  4008. -on them.
  4009. -
  4010. -   These macros are all wrappers around the `echo' shell command.
  4011. -`configure' scripts should rarely need to run `echo' directly to print
  4012. -messages for the user.  Using these macros makes it easy to change how
  4013. -and when each kind of message is printed; such changes need only be
  4014. -made to the macro definitions, and all of the callers change
  4015. -automatically.
  4016. -
  4017. - - Macro: AC_MSG_CHECKING (FEATURE-DESCRIPTION)
  4018. -     Notify the user that `configure' is checking for a particular
  4019. -     feature.  This macro prints a message that starts with `checking '
  4020. -     and ends with `...' and no newline.  It must be followed by a call
  4021. -     to `AC_MSG_RESULT' to print the result of the check and the
  4022. -     newline.  The FEATURE-DESCRIPTION should be something like
  4023. -     `whether the Fortran compiler accepts C++ comments' or `for c89'.
  4024. -
  4025. -     This macro prints nothing if `configure' is run with the `--quiet'
  4026. -     or `--silent' option.
  4027. -
  4028. - - Macro: AC_MSG_RESULT (RESULT-DESCRIPTION)
  4029. -     Notify the user of the results of a check.  RESULT-DESCRIPTION is
  4030. -     almost always the value of the cache variable for the check,
  4031. -     typically `yes', `no', or a file name.  This macro should follow a
  4032. -     call to `AC_MSG_CHECKING', and the RESULT-DESCRIPTION should be
  4033. -     the completion of the message printed by the call to
  4034. -     `AC_MSG_CHECKING'.
  4035. -
  4036. -     This macro prints nothing if `configure' is run with the `--quiet'
  4037. -     or `--silent' option.
  4038. -
  4039. - - Macro: AC_MSG_ERROR (ERROR-DESCRIPTION)
  4040. -     Notify the user of an error that prevents `configure' from
  4041. -     completing.  This macro prints an error message on the standard
  4042. -     error output and exits `configure' with a nonzero status.
  4043. -     ERROR-DESCRIPTION should be something like `invalid value $HOME
  4044. -     for \$HOME'.
  4045. -
  4046. - - Macro: AC_MSG_WARN (PROBLEM-DESCRIPTION)
  4047. -     Notify the `configure' user of a possible problem.  This macro
  4048. -     prints the message on the standard error output; `configure'
  4049. -     continues running afterward, so macros that call `AC_MSG_WARN'
  4050. -     should provide a default (back-up) behavior for the situations
  4051. -     they warn about.  PROBLEM-DESCRIPTION should be something like `ln
  4052. -     -s seems to make hard links'.
  4053. -
  4054. -   The following two macros are an obsolete alternative to
  4055. -`AC_MSG_CHECKING' and `AC_MSG_RESULT'.
  4056. -
  4057. - - Macro: AC_CHECKING (FEATURE-DESCRIPTION)
  4058. -     This macro is similar to `AC_MSG_CHECKING', except that it prints a
  4059. -     newline after the FEATURE-DESCRIPTION.  It is useful mainly to
  4060. -     print a general description of the overall purpose of a group of
  4061. -     feature checks, e.g.,
  4062. -
  4063. -          AC_CHECKING(if stack overflow is detectable)
  4064. -
  4065. - - Macro: AC_VERBOSE (RESULT-DESCRIPTION)
  4066. -     This macro is similar to `AC_MSG_RESULT', except that it is meant
  4067. -     to follow a call to `AC_CHECKING' instead of `AC_MSG_CHECKING'; it
  4068. -     starts the message it prints with a tab.  It is considered
  4069. -     obsolete.
  4070. -
  4071. -
  4072. -File: autoconf.info,  Node: Writing Macros,  Next: Manual Configuration,  Prev: Results,  Up: Top
  4073. -
  4074. -Writing Macros
  4075. -**************
  4076. -
  4077. -   When you write a feature test that could be applicable to more than
  4078. -one software package, the best thing to do is encapsulate it in a new
  4079. -macro.  Here are some instructions and guidelines for writing Autoconf
  4080. -macros.
  4081. -
  4082. -* Menu:
  4083. -
  4084. -* Macro Definitions::        Basic format of an Autoconf macro.
  4085. -* Macro Names::                 What to call your new macros.
  4086. -* Quoting::            Protecting macros from unwanted expansion.
  4087. -* Dependencies Between Macros::    What to do when macros depend on other macros.
  4088. -
  4089. -
  4090. -File: autoconf.info,  Node: Macro Definitions,  Next: Macro Names,  Up: Writing Macros
  4091. -
  4092. -Macro Definitions
  4093. -=================
  4094. -
  4095. -   Autoconf macros are defined using the `AC_DEFUN' macro, which is
  4096. -similar to the `m4' builtin `define' macro.  In addition to defining a
  4097. -macro, `AC_DEFUN' adds to it some code which is used to constrain the
  4098. -order in which macros are called (*note Prerequisite Macros::.).
  4099. -
  4100. -   An Autoconf macro definition looks like this:
  4101. -
  4102. -     AC_DEFUN(MACRO-NAME, [MACRO-BODY])
  4103. -
  4104. -The square brackets here do not indicate optional text: they should
  4105. -literally be present in the macro definition to avoid macro expansion
  4106. -problems (*note Quoting::.).  You can refer to any arguments passed to
  4107. -the macro as `$1', `$2', etc.
  4108. -
  4109. -   To introduce comments in `m4', use the `m4' builtin `dnl'; it causes
  4110. -`m4' to discard the text through the next newline.  It is not needed
  4111. -between macro definitions in `acsite.m4' and `aclocal.m4', because all
  4112. -output is discarded until `AC_INIT' is called.
  4113. -
  4114. -   *Note How to define new macros: (m4.info)Definitions, for more
  4115. -complete information on writing `m4' macros.
  4116. -
  4117. -
  4118. -File: autoconf.info,  Node: Macro Names,  Next: Quoting,  Prev: Macro Definitions,  Up: Writing Macros
  4119. -
  4120. -Macro Names
  4121. -===========
  4122. -
  4123. -   All of the Autoconf macros have all-uppercase names starting with
  4124. -`AC_' to prevent them from accidentally conflicting with other text.
  4125. -All shell variables that they use for internal purposes have
  4126. -mostly-lowercase names starting with `ac_'.  To ensure that your macros
  4127. -don't conflict with present or future Autoconf macros, you should
  4128. -prefix your own macro names and any shell variables they use with some
  4129. -other sequence.  Possibilities include your initials, or an abbreviation
  4130. -for the name of your organization or software package.
  4131. -
  4132. -   Most of the Autoconf macros' names follow a structured naming
  4133. -convention that indicates the kind of feature check by the name.  The
  4134. -macro names consist of several words, separated by underscores, going
  4135. -from most general to most specific.   The names of their cache
  4136. -variables use the same convention (*note Cache Variable Names::., for
  4137. -more information on them).
  4138. -
  4139. -   The first word of the name after `AC_' usually tells the category of
  4140. -feature being tested.  Here are the categories used in Autoconf for
  4141. -specific test macros, the kind of macro that you are more likely to
  4142. -write.  They are also used for cache variables, in all-lowercase.  Use
  4143. -them where applicable; where they're not, invent your own categories.
  4144. -
  4145. -`C'
  4146. -     C language builtin features.
  4147. -
  4148. -`DECL'
  4149. -     Declarations of C variables in header files.
  4150. -
  4151. -`FUNC'
  4152. -     Functions in libraries.
  4153. -
  4154. -`GROUP'
  4155. -     UNIX group owners of files.
  4156. -
  4157. -`HEADER'
  4158. -     Header files.
  4159. -
  4160. -`LIB'
  4161. -     C libraries.
  4162. -
  4163. -`PATH'
  4164. -     The full path names to files, including programs.
  4165. -
  4166. -`PROG'
  4167. -     The base names of programs.
  4168. -
  4169. -`STRUCT'
  4170. -     Definitions of C structures in header files.
  4171. -
  4172. -`SYS'
  4173. -     Operating system features.
  4174. -
  4175. -`TYPE'
  4176. -     C builtin or declared types.
  4177. -
  4178. -`VAR'
  4179. -     C variables in libraries.
  4180. -
  4181. -   After the category comes the name of the particular feature being
  4182. -tested.  Any further words in the macro name indicate particular aspects
  4183. -of the feature.  For example, `AC_FUNC_UTIME_NULL' checks the behavior
  4184. -of the `utime' function when called with a `NULL' pointer.
  4185. -
  4186. -   A macro that is an internal subroutine of another macro should have a
  4187. -name that starts with the name of that other macro, followed by one or
  4188. -more words saying what the internal macro does.  For example,
  4189. -`AC_PATH_X' has internal macros `AC_PATH_X_XMKMF' and
  4190. -`AC_PATH_X_DIRECT'.
  4191. -
  4192. -
  4193. -File: autoconf.info,  Node: Quoting,  Next: Dependencies Between Macros,  Prev: Macro Names,  Up: Writing Macros
  4194. -
  4195. -Quoting
  4196. -=======
  4197. -
  4198. -   Macros that are called by other macros are evaluated by `m4' several
  4199. -times; each evaluation might require another layer of quotes to prevent
  4200. -unwanted expansions of macros or `m4' builtins, such as `define' and
  4201. -`$1'.  Quotes are also required around macro arguments that contain
  4202. -commas, since commas separate the arguments from each other.  It's a
  4203. -good idea to quote any macro arguments that contain newlines or calls
  4204. -to other macros, as well.
  4205. -
  4206. -   Autoconf changes the `m4' quote characters from the default ``' and
  4207. -`'' to `[' and `]', because many of the macros use ``' and `'',
  4208. -mismatched.  However, in a few places the macros need to use brackets
  4209. -(usually in C program text or regular expressions).  In those places,
  4210. -they use the `m4' builtin command `changequote' to temporarily change
  4211. -the quote characters to `<<' and `>>'.  (Sometimes, if they don't need
  4212. -to quote anything, they disable quoting entirely instead by setting the
  4213. -quote characters to empty strings.)  Here is an example:
  4214. -
  4215. -     AC_TRY_LINK(
  4216. -     changequote(<<, >>)dnl
  4217. -     <<#include <time.h>
  4218. -     #ifndef tzname /* For SGI.  */
  4219. -     extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
  4220. -     #endif>>,
  4221. -     changequote([, ])dnl
  4222. -     [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)
  4223. -
  4224. -   When you create a `configure' script using newly written macros,
  4225. -examine it carefully to check whether you need to add more quotes in
  4226. -your macros.  If one or more words have disappeared in the `m4' output,
  4227. -you need more quotes.  When in doubt, quote.
  4228. -
  4229. -   However, it's also possible to put on too many layers of quotes.  If
  4230. -this happens, the resulting `configure' script will contain unexpanded
  4231. -macros.  The `autoconf' program checks for this problem by doing `grep
  4232. -AC_ configure'.
  4233. -
  4234. -
  4235. -File: autoconf.info,  Node: Dependencies Between Macros,  Prev: Quoting,  Up: Writing Macros
  4236. -
  4237. -Dependencies Between Macros
  4238. -===========================
  4239. -
  4240. -   Some Autoconf macros depend on other macros having been called first
  4241. -in order to work correctly.  Autoconf provides a way to ensure that
  4242. -certain macros are called if needed and a way to warn the user if
  4243. -macros are called in an order that might cause incorrect operation.
  4244. -
  4245. -* Menu:
  4246. -
  4247. -* Prerequisite Macros::        Ensuring required information.
  4248. -* Suggested Ordering::        Warning about possible ordering problems.
  4249. -* Obsolete Macros::             Warning about old ways of doing things.
  4250. -
  4251. -
  4252. -File: autoconf.info,  Node: Prerequisite Macros,  Next: Suggested Ordering,  Up: Dependencies Between Macros
  4253. -
  4254. -Prerequisite Macros
  4255. --------------------
  4256. -
  4257. -   A macro that you write might need to use values that have previously
  4258. -been computed by other macros.  For example, `AC_DECL_YYTEXT' examines
  4259. -the output of `flex' or `lex', so it depends on `AC_PROG_LEX' having
  4260. -been called first to set the shell variable `LEX'.
  4261. -
  4262. -   Rather than forcing the user of the macros to keep track of the
  4263. -dependencies between them, you can use the `AC_REQUIRE' macro to do it
  4264. -automatically.  `AC_REQUIRE' can ensure that a macro is only called if
  4265. -it is needed, and only called once.
  4266. -
  4267. - - Macro: AC_REQUIRE (MACRO-NAME)
  4268. -     If the `m4' macro MACRO-NAME has not already been called, call it
  4269. -     (without any arguments).  Make sure to quote MACRO-NAME with
  4270. -     square brackets.  MACRO-NAME must have been defined using
  4271. -     `AC_DEFUN' or else contain a call to `AC_PROVIDE' to indicate that
  4272. -     it has been called.
  4273. -
  4274. -   An alternative to using `AC_DEFUN' is to use `define' and call
  4275. -`AC_PROVIDE'.  Because this technique does not prevent nested messages,
  4276. -it is considered obsolete.
  4277. -
  4278. - - Macro: AC_PROVIDE (THIS-MACRO-NAME)
  4279. -     Record the fact that THIS-MACRO-NAME has been called.
  4280. -     THIS-MACRO-NAME should be the name of the macro that is calling
  4281. -     `AC_PROVIDE'.  An easy way to get it is from the `m4' builtin
  4282. -     variable `$0', like this:
  4283. -
  4284. -          AC_PROVIDE([$0])
  4285. -
  4286. -
  4287. -File: autoconf.info,  Node: Suggested Ordering,  Next: Obsolete Macros,  Prev: Prerequisite Macros,  Up: Dependencies Between Macros
  4288. -
  4289. -Suggested Ordering
  4290. -------------------
  4291. -
  4292. -   Some macros should be run before another macro if both are called,
  4293. -but neither *requires* that the other be called.  For example, a macro
  4294. -that changes the behavior of the C compiler should be called before any
  4295. -macros that run the C compiler.  Many of these dependencies are noted in
  4296. -the documentation.
  4297. -
  4298. -   Autoconf provides the `AC_BEFORE' macro to warn users when macros
  4299. -with this kind of dependency appear out of order in a `configure.in'
  4300. -file.  The warning occurs when creating `configure' from
  4301. -`configure.in', not when running `configure'.  For example,
  4302. -`AC_PROG_CPP' checks whether the C compiler can run the C preprocessor
  4303. -when given the `-E' option.  It should therefore be called after any
  4304. -macros that change which C compiler is being used, such as
  4305. -`AC_PROG_CC'.  So `AC_PROG_CC' contains:
  4306. -
  4307. -     AC_BEFORE([$0], [AC_PROG_CPP])dnl
  4308. -
  4309. -This warns the user if a call to `AC_PROG_CPP' has already occurred
  4310. -when `AC_PROG_CC' is called.
  4311. -
  4312. - - Macro: AC_BEFORE (THIS-MACRO-NAME, CALLED-MACRO-NAME)
  4313. -     Make `m4' print a warning message on the standard error output if
  4314. -     CALLED-MACRO-NAME has already been called.  THIS-MACRO-NAME should
  4315. -     be the name of the macro that is calling `AC_BEFORE'.  The macro
  4316. -     CALLED-MACRO-NAME must have been defined using `AC_DEFUN' or else
  4317. -     contain a call to `AC_PROVIDE' to indicate that it has been called.
  4318. -
  4319. -
  4320. -File: autoconf.info,  Node: Obsolete Macros,  Prev: Suggested Ordering,  Up: Dependencies Between Macros
  4321. -
  4322. -Obsolete Macros
  4323. ----------------
  4324. -
  4325. -   Configuration and portability technology has evolved over the years.
  4326. -Often better ways of solving a particular problem are developed, or
  4327. -ad-hoc approaches are systematized.  This process has occurred in many
  4328. -parts of Autoconf.  One result is that some of the macros are now
  4329. -considered "obsolete"; they still work, but are no longer considered
  4330. -the best thing to do.  Autoconf provides the `AC_OBSOLETE' macro to
  4331. -warn users producing `configure' scripts when they use obsolete macros,
  4332. -to encourage them to modernize.  A sample call is:
  4333. -
  4334. -     AC_OBSOLETE([$0], [; use AC_CHECK_HEADERS(unistd.h) instead])dnl
  4335. -
  4336. - - Macro: AC_OBSOLETE (THIS-MACRO-NAME [, SUGGESTION])
  4337. -     Make `m4' print a message on the standard error output warning that
  4338. -     THIS-MACRO-NAME is obsolete, and giving the file and line number
  4339. -     where it was called.  THIS-MACRO-NAME should be the name of the
  4340. -     macro that is calling `AC_OBSOLETE'.  If SUGGESTION is given, it
  4341. -     is printed at the end of the warning message; for example, it can
  4342. -     be a suggestion for what to use instead of THIS-MACRO-NAME.
  4343. -
  4344. -
  4345. -File: autoconf.info,  Node: Manual Configuration,  Next: Site Configuration,  Prev: Writing Macros,  Up: Top
  4346. -
  4347. -Manual Configuration
  4348. -********************
  4349. -
  4350. -   A few kinds of features can't be guessed automatically by running
  4351. -test programs.  For example, the details of the object file format, or
  4352. -special options that need to be passed to the compiler or linker.  You
  4353. -can check for such features using ad-hoc means, such as having
  4354. -`configure' check the output of the `uname' program, or looking for
  4355. -libraries that are unique to particular systems.  However, Autoconf
  4356. -provides a uniform method for handling unguessable features.
  4357. -
  4358. -* Menu:
  4359. -
  4360. -* Specifying Names::            Specifying the system type.
  4361. -* Canonicalizing::              Getting the canonical system type.
  4362. -* System Type Variables::       Variables containing the system type.
  4363. -* Using System Type::           What to do with the system type.
  4364. -
  4365. -
  4366. -File: autoconf.info,  Node: Specifying Names,  Next: Canonicalizing,  Up: Manual Configuration
  4367. -
  4368. -Specifying the System Type
  4369. -==========================
  4370. -
  4371. -   Like other GNU `configure' scripts, Autoconf-generated `configure'
  4372. -scripts can make decisions based on a canonical name for the system
  4373. -type, which has the form:
  4374. -
  4375. -     CPU-COMPANY-SYSTEM
  4376. -
  4377. -   `configure' can usually guess the canonical name for the type of
  4378. -system it's running on.  To do so it runs a script called
  4379. -`config.guess', which derives the name using the `uname' command or
  4380. -symbols predefined by the C preprocessor.
  4381. -
  4382. -   Alternately, the user can specify the system type with command line
  4383. -arguments to `configure'.  Doing so is necessary when cross-compiling.
  4384. -In the most complex case of cross-compiling, three system types are
  4385. -involved.  The options to specify them are:
  4386. -
  4387. -`--build=BUILD-TYPE'
  4388. -     the type of system on which the package is being configured and
  4389. -     compiled (rarely needed);
  4390. -
  4391. -`--host=HOST-TYPE'
  4392. -     the type of system on which the package will run;
  4393. -
  4394. -`--target=TARGET-TYPE'
  4395. -     the type of system for which any compiler tools in the package will
  4396. -     produce code.
  4397. -
  4398. -If the user gives `configure' a non-option argument, it is used as the
  4399. -default for the host, target, and build system types if the user does
  4400. -not specify them explicitly with options.  The target and build types
  4401. -default to the host type if it is given and they are not.  If you are
  4402. -cross-compiling, you still have to specify the names of the cross-tools
  4403. -you use, in particular the C compiler, on the `configure' command line,
  4404. -e.g.,
  4405. -
  4406. -     CC=m68k-coff-gcc configure --target=m68k-coff
  4407. -
  4408. -   `configure' recognizes short aliases for many system types; for
  4409. -example, `decstation' can be given on the command line instead of
  4410. -`mips-dec-ultrix4.2'.  `configure' runs a script called `config.sub' to
  4411. -canonicalize system type aliases.
  4412. -
  4413. -
  4414. -File: autoconf.info,  Node: Canonicalizing,  Next: System Type Variables,  Prev: Specifying Names,  Up: Manual Configuration
  4415. -
  4416. -Getting the Canonical System Type
  4417. -=================================
  4418. -
  4419. -   The following macros make the system type available to `configure'
  4420. -scripts.  They run the shell script `config.guess' to determine any
  4421. -values for the host, target, and build types that they need and the user
  4422. -did not specify on the command line.  They run `config.sub' to
  4423. -canonicalize any aliases the user gave.  If you use these macros, you
  4424. -must distribute those two shell scripts along with your source code.
  4425. -*Note Output::, for information about the `AC_CONFIG_AUX_DIR' macro
  4426. -which you can use to control which directory `configure' looks for
  4427. -those scripts in.  If you do not use either of these macros,
  4428. -`configure' ignores any `--host', `--target', and `--build' options
  4429. -given to it.
  4430. -
  4431. - - Macro: AC_CANONICAL_SYSTEM
  4432. -     Determine the system type and set output variables to the names of
  4433. -     the canonical system types.  *Note System Type Variables::, for
  4434. -     details about the variables this macro sets.
  4435. -
  4436. - - Macro: AC_CANONICAL_HOST
  4437. -     Perform only the subset of `AC_CANONICAL_SYSTEM' relevant to the
  4438. -     host type.  This is all that is needed for programs that are not
  4439. -     part of a compiler toolchain.
  4440. -
  4441. -
  4442. -File: autoconf.info,  Node: System Type Variables,  Next: Using System Type,  Prev: Canonicalizing,  Up: Manual Configuration
  4443. -
  4444. -System Type Variables
  4445. -=====================
  4446. -
  4447. -   After calling `AC_CANONICAL_SYSTEM', the following output variables
  4448. -contain the system type information.  After `AC_CANONICAL_HOST', only
  4449. -the `host' variables below are set.
  4450. -
  4451. -``build', `host', `target''
  4452. -     the canonical system names;
  4453. -
  4454. -``build_alias', `host_alias', `target_alias''
  4455. -     the names the user specified, or the canonical names if
  4456. -     `config.guess' was used;
  4457. -
  4458. -``build_cpu', `build_vendor', `build_os''
  4459. -``host_cpu', `host_vendor', `host_os''
  4460. -``target_cpu', `target_vendor', `target_os''
  4461. -     the individual parts of the canonical names (for convenience).
  4462. -
  4463. -
  4464. -File: autoconf.info,  Node: Using System Type,  Prev: System Type Variables,  Up: Manual Configuration
  4465. -
  4466. -Using the System Type
  4467. -=====================
  4468. -
  4469. -   How do you use a canonical system type?  Usually, you use it in one
  4470. -or more `case' statements in `configure.in' to select system-specific C
  4471. -files.  Then link those files, which have names based on the system
  4472. -name, to generic names, such as `host.h' or `target.c'.  The `case'
  4473. -statement patterns can use shell wildcards to group several cases
  4474. -together, like in this fragment:
  4475. -
  4476. -     case "$target" in
  4477. -     i386-*-mach* | i386-*-gnu*) obj_format=aout emulation=mach bfd_gas=yes ;;
  4478. -     i960-*-bout) obj_format=bout ;;
  4479. -     esac
  4480. -
  4481. - - Macro: AC_LINK_FILES (SOURCE..., DEST...)
  4482. -     Make `AC_OUTPUT' link each of the existing files SOURCE to the
  4483. -     corresponding link name DEST.  Makes a symbolic link if possible,
  4484. -     otherwise a hard link.  The DEST and SOURCE names should be
  4485. -     relative to the top level source or build directory.
  4486. -
  4487. -     For example, this call:
  4488. -
  4489. -          AC_LINK_FILES(config/${machine}.h config/${obj_format}.h, host.h object.h)
  4490. -
  4491. -     creates in the current directory `host.h', which is a link to
  4492. -     `SRCDIR/config/${machine}.h', and `object.h', which is a link to
  4493. -     `SRCDIR/config/${obj_format}.h'.
  4494. -
  4495. -   You can also use the host system type to find cross-compilation
  4496. -tools.  *Note Generic Programs::, for information about the
  4497. -`AC_CHECK_TOOL' macro which does that.
  4498. -
  4499. -
  4500. -File: autoconf.info,  Node: Site Configuration,  Next: Invoking configure,  Prev: Manual Configuration,  Up: Top
  4501. -
  4502. -Site Configuration
  4503. -******************
  4504. -
  4505. -   `configure' scripts support several kinds of local configuration
  4506. -decisions.  There are ways for users to specify where external software
  4507. -packages are, include or exclude optional features, install programs
  4508. -under modified names, and set default values for `configure' options.
  4509. -
  4510. -* Menu:
  4511. -
  4512. -* External Software::           Working with other optional software.
  4513. -* Package Options::             Selecting optional features.
  4514. -* Site Details::                Configuring site details.
  4515. -* Transforming Names::          Changing program names when installing.
  4516. -* Site Defaults::               Giving `configure' local defaults.
  4517. -
  4518. -
  4519. -File: autoconf.info,  Node: External Software,  Next: Package Options,  Up: Site Configuration
  4520. -
  4521. -Working With External Software
  4522. -==============================
  4523. -
  4524. -   Some packages require, or can optionally use, other software packages
  4525. -which are already installed.  The user can give `configure' command
  4526. -line options to specify which such external software to use.  The
  4527. -options have one of these forms:
  4528. -
  4529. -     --with-PACKAGE[=ARG]
  4530. -     --without-PACKAGE
  4531. -
  4532. -   For example, `--with-gnu-ld' means work with the GNU linker instead
  4533. -of some other linker.  `--with-x' means work with The X Window System.
  4534. -
  4535. -   The user can give an argument by following the package name with `='
  4536. -and the argument.  Giving an argument of `no' is for packages that are
  4537. -used by default; it says to *not* use the package.  An argument that is
  4538. -neither `yes' nor `no' could include a name or number of a version of
  4539. -the other package, to specify more precisely which other package this
  4540. -program is supposed to work with.  If no argument is given, it defaults
  4541. -to `yes'.  `--without-PACKAGE' is equivalent to `--with-PACKAGE=no'.
  4542. -
  4543. -   For each external software package that may be used, `configure.in'
  4544. -should call `AC_ARG_WITH' to detect whether the `configure' user asked
  4545. -to use it.  Whether each package is used or not by default, and which
  4546. -arguments are valid, is up to you.
  4547. -
  4548. - - Macro: AC_ARG_WITH (PACKAGE, HELP-STRING [, ACTION-IF-GIVEN [,
  4549. -          ACTION-IF-NOT-GIVEN]])
  4550. -     If the user gave `configure' the option `--with-PACKAGE' or
  4551. -     `--without-PACKAGE', run shell commands ACTION-IF-GIVEN.  If
  4552. -     neither option was given, run shell commands ACTION-IF-NOT-GIVEN.
  4553. -     The name PACKAGE indicates another software package that this
  4554. -     program should work with.  It should consist only of alphanumeric
  4555. -     characters and dashes.
  4556. -
  4557. -     The option's argument is available to the shell commands
  4558. -     ACTION-IF-GIVEN in the shell variable `withval', which is actually
  4559. -     just the value of the shell variable `with_PACKAGE', with any `-'
  4560. -     characters changed into `_'.  You may use that variable instead,
  4561. -     if you wish.
  4562. -
  4563. -     The argument HELP-STRING is a description of the option which
  4564. -     looks like this:
  4565. -            --with-readline         support fancy command line editing
  4566. -
  4567. -     HELP-STRING may be more than one line long, if more detail is
  4568. -     needed.  Just make sure the columns line up in `configure --help'.
  4569. -     Avoid tabs in the help string.  You'll need to enclose it in `['
  4570. -     and `]' in order to produce the leading spaces.
  4571. -
  4572. - - Macro: AC_WITH (PACKAGE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN])
  4573. -     This is an obsolete version of `AC_ARG_WITH' that does not support
  4574. -     providing a help string.
  4575. -
  4576. -
  4577. -File: autoconf.info,  Node: Package Options,  Next: Site Details,  Prev: External Software,  Up: Site Configuration
  4578. -
  4579. -Choosing Package Options
  4580. -========================
  4581. -
  4582. -   If a software package has optional compile-time features, the user
  4583. -can give `configure' command line options to specify whether to compile
  4584. -them.  The options have one of these forms:
  4585. -
  4586. -     --enable-FEATURE[=ARG]
  4587. -     --disable-FEATURE
  4588. -
  4589. -   These options allow users to choose which optional features to build
  4590. -and install.  `--enable-FEATURE' options should never make a feature
  4591. -behave differently or cause one feature to replace another.  They
  4592. -should only cause parts of the program to be built rather than left out.
  4593. -
  4594. -   The user can give an argument by following the feature name with `='
  4595. -and the argument.  Giving an argument of `no' requests that the feature
  4596. -*not* be made available.  A feature with an argument looks like
  4597. -`--enable-debug=stabs'.  If no argument is given, it defaults to `yes'.
  4598. -`--disable-FEATURE' is equivalent to `--enable-FEATURE=no'.
  4599. -
  4600. -   For each optional feature, `configure.in' should call
  4601. -`AC_ARG_ENABLE' to detect whether the `configure' user asked to include
  4602. -it.  Whether each feature is included or not by default, and which
  4603. -arguments are valid, is up to you.
  4604. -
  4605. - - Macro: AC_ARG_ENABLE (FEATURE, HELP-STRING [, ACTION-IF-GIVEN [,
  4606. -          ACTION-IF-NOT-GIVEN]])
  4607. -     If the user gave `configure' the option `--enable-FEATURE' or
  4608. -     `--disable-FEATURE', run shell commands ACTION-IF-GIVEN.  If
  4609. -     neither option was given, run shell commands ACTION-IF-NOT-GIVEN.
  4610. -     The name FEATURE indicates an optional user-level facility.  It
  4611. -     should consist only of alphanumeric characters and dashes.
  4612. -
  4613. -     The option's argument is available to the shell commands
  4614. -     ACTION-IF-GIVEN in the shell variable `enableval', which is
  4615. -     actually just the value of the shell variable `enable_PACKAGE',
  4616. -     with any `-' characters changed into `_'.  You may use that
  4617. -     variable instead, if you wish.  The HELP-STRING argument is like
  4618. -     that of `AC_ARG_WITH' (*note External Software::.).
  4619. -
  4620. - - Macro: AC_ENABLE (FEATURE, ACTION-IF-GIVEN [, ACTION-IF-NOT-GIVEN])
  4621. -     This is an obsolete version of `AC_ARG_ENABLE' that does not
  4622. -     support providing a help string.
  4623. -
  4624. -
  4625. -File: autoconf.info,  Node: Site Details,  Next: Transforming Names,  Prev: Package Options,  Up: Site Configuration
  4626. -
  4627. -Configuring Site Details
  4628. -========================
  4629. -
  4630. -   Some software packages require complex site-specific information.
  4631. -Some examples are host names to use for certain services, company
  4632. -names, and email addresses to contact.  Since some configuration
  4633. -scripts generated by Metaconfig ask for such information interactively,
  4634. -people sometimes wonder how to get that information in
  4635. -Autoconf-generated configuration scripts, which aren't interactive.
  4636. -
  4637. -   Such site configuration information should be put in a file that is
  4638. -edited *only by users*, not by programs.  The location of the file can
  4639. -either be based on the `prefix' variable, or be a standard location
  4640. -such as the user's home directory.  It could even be specified by an
  4641. -environment variable.  The programs should examine that file at run
  4642. -time, rather than at compile time.  Run time configuration is more
  4643. -convenient for users and makes the configuration process simpler than
  4644. -getting the information while configuring.  *Note Variables for
  4645. -Installation Directories: (standards)Directory Variables, for more
  4646. -information on where to put data files.
  4647. -
  4648. -
  4649. -File: autoconf.info,  Node: Transforming Names,  Next: Site Defaults,  Prev: Site Details,  Up: Site Configuration
  4650. -
  4651. -Transforming Program Names When Installing
  4652. -==========================================
  4653. -
  4654. -   Autoconf supports changing the names of programs when installing
  4655. -them.  In order to use these transformations, `configure.in' must call
  4656. -the macro `AC_ARG_PROGRAM'.
  4657. -
  4658. - - Macro: AC_ARG_PROGRAM
  4659. -     Place in output variable `program_transform_name' a sequence of
  4660. -     `sed' commands for changing the names of installed programs.
  4661. -
  4662. -     If any of the options described below are given to `configure',
  4663. -     program names are transformed accordingly.  Otherwise, if
  4664. -     `AC_CANONICAL_SYSTEM' has been called and a `--target' value is
  4665. -     given that differs from the host type (specified with `--host' or
  4666. -     defaulted by `config.sub'), the target type followed by a dash is
  4667. -     used as a prefix.  Otherwise, no program name transformation is
  4668. -     done.
  4669. -
  4670. -* Menu:
  4671. -
  4672. -* Transformation Options::      `configure' options to transform names.
  4673. -* Transformation Examples::     Sample uses of transforming names.
  4674. -* Transformation Rules::        `Makefile' uses of transforming names.
  4675. -
  4676. -
  4677. -File: autoconf.info,  Node: Transformation Options,  Next: Transformation Examples,  Up: Transforming Names
  4678. -
  4679. -Transformation Options
  4680. -----------------------
  4681. -
  4682. -   You can specify name transformations by giving `configure' these
  4683. -command line options:
  4684. -
  4685. -`--program-prefix=PREFIX'
  4686. -     prepend PREFIX to the names;
  4687. -
  4688. -`--program-suffix=SUFFIX'
  4689. -     append SUFFIX to the names;
  4690. -
  4691. -`--program-transform-name=EXPRESSION'
  4692. -     perform `sed' substitution EXPRESSION on the names.
  4693. -
  4694. -
  4695. -File: autoconf.info,  Node: Transformation Examples,  Next: Transformation Rules,  Prev: Transformation Options,  Up: Transforming Names
  4696. -
  4697. -Transformation Examples
  4698. ------------------------
  4699. -
  4700. -   These transformations are useful with programs that can be part of a
  4701. -cross-compilation development environment.  For example, a
  4702. -cross-assembler running on a Sun 4 configured with
  4703. -`--target=i960-vxworks' is normally installed as `i960-vxworks-as',
  4704. -rather than `as', which could be confused with a native Sun 4 assembler.
  4705. -
  4706. -   You can force a program name to begin with `g', if you don't want
  4707. -GNU programs installed on your system to shadow other programs with the
  4708. -same name.  For example, if you configure GNU `diff' with
  4709. -`--program-prefix=g', then when you run `make install' it is installed
  4710. -as `/usr/local/bin/gdiff'.
  4711. -
  4712. -   As a more sophisticated example, you could use
  4713. -     --program-transform-name='s/^/g/; s/^gg/g/; s/^gless/less/'
  4714. -
  4715. -to prepend `g' to most of the program names in a source tree, excepting
  4716. -those like `gdb' that already have one and those like `less' and
  4717. -`lesskey' that aren't GNU programs.  (That is assuming that you have a
  4718. -source tree containing those programs that is set up to use this
  4719. -feature.)
  4720. -
  4721. -   One way to install multiple versions of some programs simultaneously
  4722. -is to append a version number to the name of one or both.  For example,
  4723. -if you want to keep Autoconf version 1 around for awhile, you can
  4724. -configure Autoconf version 2 using `--program-suffix=2' to install the
  4725. -programs as `/usr/local/bin/autoconf2', `/usr/local/bin/autoheader2',
  4726. -etc.
  4727. -
  4728. -
  4729. -File: autoconf.info,  Node: Transformation Rules,  Prev: Transformation Examples,  Up: Transforming Names
  4730. -
  4731. -Transformation Rules
  4732. ---------------------
  4733. -
  4734. -   Here is how to use the variable `program_transform_name' in a
  4735. -`Makefile.in':
  4736. -
  4737. -     transform=@program_transform_name@
  4738. -     install: all
  4739. -             $(INSTALL_PROGRAM) myprog $(bindir)/`echo myprog|sed '$(transform)'`
  4740. -     
  4741. -     uninstall:
  4742. -             rm -f $(bindir)/`echo myprog|sed '$(transform)'`
  4743. -
  4744. -If you have more than one program to install, you can do it in a loop:
  4745. -
  4746. -     PROGRAMS=cp ls rm
  4747. -     install:
  4748. -             for p in $(PROGRAMS); do \
  4749. -               $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
  4750. -             done
  4751. -     
  4752. -     uninstall:
  4753. -             for p in $(PROGRAMS); do \
  4754. -               rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \
  4755. -             done
  4756. -
  4757. -   Whether to do the transformations on documentation files (Texinfo or
  4758. -`man') is a tricky question; there seems to be no perfect answer, due
  4759. -to the several reasons for name transforming.  Documentation is not
  4760. -usually particular to a specific architecture, and Texinfo files do not
  4761. -conflict with system documentation.  But they might conflict with
  4762. -earlier versions of the same files, and `man' pages sometimes do
  4763. -conflict with system documentation.  As a compromise, it is probably
  4764. -best to do name transformations on `man' pages but not on Texinfo
  4765. -manuals.
  4766. -
  4767. -
  4768. -File: autoconf.info,  Node: Site Defaults,  Prev: Transforming Names,  Up: Site Configuration
  4769. -
  4770. -Setting Site Defaults
  4771. -=====================
  4772. -
  4773. -   Autoconf-generated `configure' scripts allow your site to provide
  4774. -default values for some configuration values.  You do this by creating
  4775. -site- and system-wide initialization files.
  4776. -
  4777. -   If the environment variable `CONFIG_SITE' is set, `configure' uses
  4778. -its value as the name of a shell script to read.  Otherwise, it reads
  4779. -the shell script `PREFIX/share/config.site' if it exists, then
  4780. -`PREFIX/etc/config.site' if it exists.  Thus, settings in
  4781. -machine-specific files override those in machine-independent ones in
  4782. -case of conflict.
  4783. -
  4784. -   Site files can be arbitrary shell scripts, but only certain kinds of
  4785. -code are really appropriate to be in them.  Because `configure' reads
  4786. -any cache file after it has read any site files, a site file can define
  4787. -a default cache file to be shared between all Autoconf-generated
  4788. -`configure' scripts run on that system.  If you set a default cache
  4789. -file in a site file, it is a good idea to also set the output variable
  4790. -`CC' in that site file, because the cache file is only valid for a
  4791. -particular compiler, but many systems have several available.
  4792. -
  4793. -   You can examine or override the value set by a command line option to
  4794. -`configure' in a site file; options set shell variables that have the
  4795. -same names as the options, with any dashes turned into underscores.
  4796. -The exceptions are that `--without-' and `--disable-' options are like
  4797. -giving the corresponding `--with-' or `--enable-' option and the value
  4798. -`no'.  Thus, `--cache-file=localcache' sets the variable `cache_file'
  4799. -to the value `localcache'; `--enable-warnings=no' or
  4800. -`--disable-warnings' sets the variable `enable_warnings' to the value
  4801. -`no'; `--prefix=/usr' sets the variable `prefix' to the value `/usr';
  4802. -etc.
  4803. -
  4804. -   Site files are also good places to set default values for other
  4805. -output variables, such as `CFLAGS', if you need to give them non-default
  4806. -values: anything you would normally do, repetitively, on the command
  4807. -line.  If you use non-default values for PREFIX or EXEC_PREFIX
  4808. -(wherever you locate the site file), you can set them in the site file
  4809. -if you specify it with the `CONFIG_SITE' environment variable.
  4810. -
  4811. -   You can set some cache values in the site file itself.  Doing this is
  4812. -useful if you are cross-compiling, so it is impossible to check features
  4813. -that require running a test program.  You could "prime the cache" by
  4814. -setting those values correctly for that system in
  4815. -`PREFIX/etc/config.site'.  To find out the names of the cache variables
  4816. -you need to set, look for shell variables with `_cv_' in their names in
  4817. -the affected `configure' scripts, or in the Autoconf `m4' source code
  4818. -for those macros.
  4819. -
  4820. -   The cache file is careful to not override any variables set in the
  4821. -site files.  Similarly, you should not override command-line options in
  4822. -the site files.  Your code should check that variables such as `prefix'
  4823. -and `cache_file' have their default values (as set near the top of
  4824. -`configure') before changing them.
  4825. -
  4826. -   Here is a sample file `/usr/share/local/gnu/share/config.site'.  The
  4827. -command `configure --prefix=/usr/share/local/gnu' would read this file
  4828. -(if `CONFIG_SITE' is not set to a different file).
  4829. -
  4830. -     # config.site for configure
  4831. -     #
  4832. -     # Default --prefix and --exec-prefix.
  4833. -     test "$prefix" = NONE && prefix=/usr/share/local/gnu
  4834. -     test "$exec_prefix" = NONE && exec_prefix=/usr/local/gnu
  4835. -     #
  4836. -     # Give Autoconf 2.x generated configure scripts a shared default
  4837. -     # cache file for feature test results, architecture-specific.
  4838. -     if test "$cache_file" = ./config.cache; then
  4839. -       cache_file="$prefix/var/config.cache"
  4840. -       # A cache file is only valid for one C compiler.
  4841. -       CC=gcc
  4842. -     fi
  4843. -
  4844. -
  4845. -File: autoconf.info,  Node: Invoking configure,  Next: Invoking config.status,  Prev: Site Configuration,  Up: Top
  4846. -
  4847. -Running `configure' Scripts
  4848. -***************************
  4849. -
  4850. -   Below are instructions on how to configure a package that uses a
  4851. -`configure' script, suitable for inclusion as an `INSTALL' file in the
  4852. -package.  A plain-text version of `INSTALL' which you may use comes
  4853. -with Autoconf.
  4854. -
  4855. -* Menu:
  4856. -
  4857. -* Basic Installation::          Instructions for typical cases.
  4858. -* Compilers and Options::       Selecting compilers and optimization.
  4859. -* Multiple Architectures::      Compiling for multiple architectures at once.
  4860. -* Installation Names::          Installing in different directories.
  4861. -* Optional Features::           Selecting optional features.
  4862. -* System Type::                 Specifying the system type.
  4863. -* Sharing Defaults::            Setting site-wide defaults for `configure'.
  4864. -* Operation Controls::          Changing how `configure' runs.
  4865. -
  4866. -
  4867. -File: autoconf.info,  Node: Basic Installation,  Next: Compilers and Options,  Up: Invoking configure
  4868. -
  4869. -Basic Installation
  4870. -==================
  4871. -
  4872. -   These are generic installation instructions.
  4873. -
  4874. -   The `configure' shell script attempts to guess correct values for
  4875. -various system-dependent variables used during compilation.  It uses
  4876. -those values to create a `Makefile' in each directory of the package.
  4877. -It may also create one or more `.h' files containing system-dependent
  4878. -definitions.  Finally, it creates a shell script `config.status' that
  4879. -you can run in the future to recreate the current configuration, a file
  4880. -`config.cache' that saves the results of its tests to speed up
  4881. -reconfiguring, and a file `config.log' containing compiler output
  4882. -(useful mainly for debugging `configure').
  4883. -
  4884. -   If you need to do unusual things to compile the package, please try
  4885. -to figure out how `configure' could check whether to do them, and mail
  4886. -diffs or instructions to the address given in the `README' so they can
  4887. -be considered for the next release.  If at some point `config.cache'
  4888. -contains results you don't want to keep, you may remove or edit it.
  4889. -
  4890. -   The file `configure.in' is used to create `configure' by a program
  4891. -called `autoconf'.  You only need `configure.in' if you want to change
  4892. -it or regenerate `configure' using a newer version of `autoconf'.
  4893. -
  4894. -The simplest way to compile this package is:
  4895. -
  4896. -  1. `cd' to the directory containing the package's source code and type
  4897. -     `./configure' to configure the package for your system.  If you're
  4898. -     using `csh' on an old version of System V, you might need to type
  4899. -     `sh ./configure' instead to prevent `csh' from trying to execute
  4900. -     `configure' itself.
  4901. -
  4902. -     Running `configure' takes awhile.  While running, it prints some
  4903. -     messages telling which features it is checking for.
  4904. -
  4905. -  2. Type `make' to compile the package.
  4906. -
  4907. -  3. Optionally, type `make check' to run any self-tests that come with
  4908. -     the package.
  4909. -
  4910. -  4. Type `make install' to install the programs and any data files and
  4911. -     documentation.
  4912. -
  4913. -  5. You can remove the program binaries and object files from the
  4914. -     source code directory by typing `make clean'.  To also remove the
  4915. -     files that `configure' created (so you can compile the package for
  4916. -     a different kind of computer), type `make distclean'.  There is
  4917. -     also a `make maintainer-clean' target, but that is intended mainly
  4918. -     for the package's developers.  If you use it, you may have to get
  4919. -     all sorts of other programs in order to regenerate files that came
  4920. -     with the distribution.
  4921. -
  4922. -
  4923. -File: autoconf.info,  Node: Compilers and Options,  Next: Multiple Architectures,  Prev: Basic Installation,  Up: Invoking configure
  4924. -
  4925. -Compilers and Options
  4926. -=====================
  4927. -
  4928. -   Some systems require unusual options for compilation or linking that
  4929. -the `configure' script does not know about.  You can give `configure'
  4930. -initial values for variables by setting them in the environment.  Using
  4931. -a Bourne-compatible shell, you can do that on the command line like
  4932. -this:
  4933. -     CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
  4934. -
  4935. -Or on systems that have the `env' program, you can do it like this:
  4936. -     env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
  4937. -
  4938. -
  4939. -File: autoconf.info,  Node: Multiple Architectures,  Next: Installation Names,  Prev: Compilers and Options,  Up: Invoking configure
  4940. -
  4941. -Compiling For Multiple Architectures
  4942. -====================================
  4943. -
  4944. -   You can compile the package for more than one kind of computer at the
  4945. -same time, by placing the object files for each architecture in their
  4946. -own directory.  To do this, you must use a version of `make' that
  4947. -supports the `VPATH' variable, such as GNU `make'.  `cd' to the
  4948. -directory where you want the object files and executables to go and run
  4949. -the `configure' script.  `configure' automatically checks for the
  4950. -source code in the directory that `configure' is in and in `..'.
  4951. -
  4952. -   If you have to use a `make' that does not supports the `VPATH'
  4953. -variable, you have to compile the package for one architecture at a time
  4954. -in the source code directory.  After you have installed the package for
  4955. -one architecture, use `make distclean' before reconfiguring for another
  4956. -architecture.
  4957. -
  4958. -
  4959. -File: autoconf.info,  Node: Installation Names,  Next: Optional Features,  Prev: Multiple Architectures,  Up: Invoking configure
  4960. -
  4961. -Installation Names
  4962. -==================
  4963. -
  4964. -   By default, `make install' will install the package's files in
  4965. -`/usr/local/bin', `/usr/local/man', etc.  You can specify an
  4966. -installation prefix other than `/usr/local' by giving `configure' the
  4967. -option `--prefix=PATH'.
  4968. -
  4969. -   You can specify separate installation prefixes for
  4970. -architecture-specific files and architecture-independent files.  If you
  4971. -give `configure' the option `--exec-prefix=PATH', the package will use
  4972. -PATH as the prefix for installing programs and libraries.
  4973. -Documentation and other data files will still use the regular prefix.
  4974. -
  4975. -   In addition, if you use an unusual directory layout you can give
  4976. -options like `--bindir=PATH' to specify different values for particular
  4977. -kinds of files.  Run `configure --help' for a list of the directories
  4978. -you can set and what kinds of files go in them.
  4979. -
  4980. -   If the package supports it, you can cause programs to be installed
  4981. -with an extra prefix or suffix on their names by giving `configure' the
  4982. -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
  4983. -
  4984. -
  4985. -File: autoconf.info,  Node: Optional Features,  Next: System Type,  Prev: Installation Names,  Up: Invoking configure
  4986. -
  4987. -Optional Features
  4988. -=================
  4989. -
  4990. -   Some packages pay attention to `--enable-FEATURE' options to
  4991. -`configure', where FEATURE indicates an optional part of the package.
  4992. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE
  4993. -is something like `gnu-as' or `x' (for the X Window System).  The
  4994. -`README' should mention any `--enable-' and `--with-' options that the
  4995. -package recognizes.
  4996. -
  4997. -   For packages that use the X Window System, `configure' can usually
  4998. -find the X include and library files automatically, but if it doesn't,
  4999. -you can use the `configure' options `--x-includes=DIR' and
  5000. -`--x-libraries=DIR' to specify their locations.
  5001. -
  5002. -
  5003. -File: autoconf.info,  Node: System Type,  Next: Sharing Defaults,  Prev: Optional Features,  Up: Invoking configure
  5004. -
  5005. -Specifying the System Type
  5006. -==========================
  5007. -
  5008. -   There may be some features `configure' can not figure out
  5009. -automatically, but needs to determine by the type of host the package
  5010. -will run on.  Usually `configure' can figure that out, but if it prints
  5011. -a message saying it can not guess the host type, give it the
  5012. -`--host=TYPE' option.  TYPE can either be a short name for the system
  5013. -type, such as `sun4', or a canonical name with three fields:
  5014. -     CPU-COMPANY-SYSTEM
  5015. -
  5016. -See the file `config.sub' for the possible values of each field.  If
  5017. -`config.sub' isn't included in this package, then this package doesn't
  5018. -need to know the host type.
  5019. -
  5020. -   If you are building compiler tools for cross-compiling, you can also
  5021. -use the `--target=TYPE' option to select the type of system they will
  5022. -produce code for and the `--build=TYPE' option to select the type of
  5023. -system on which you are compiling the package.
  5024. -
  5025. -
  5026. -File: autoconf.info,  Node: Sharing Defaults,  Next: Operation Controls,  Prev: System Type,  Up: Invoking configure
  5027. -
  5028. -Sharing Defaults
  5029. -================
  5030. -
  5031. -   If you want to set default values for `configure' scripts to share,
  5032. -you can create a site shell script called `config.site' that gives
  5033. -default values for variables like `CC', `cache_file', and `prefix'.
  5034. -`configure' looks for `PREFIX/share/config.site' if it exists, then
  5035. -`PREFIX/etc/config.site' if it exists.  Or, you can set the
  5036. -`CONFIG_SITE' environment variable to the location of the site script.
  5037. -A warning: not all `configure' scripts look for a site script.
  5038. -
  5039. -
  5040. -File: autoconf.info,  Node: Operation Controls,  Prev: Sharing Defaults,  Up: Invoking configure
  5041. -
  5042. -Operation Controls
  5043. -==================
  5044. -
  5045. -   `configure' recognizes the following options to control how it
  5046. -operates.
  5047. -
  5048. -`--cache-file=FILE'
  5049. -     Use and save the results of the tests in FILE instead of
  5050. -     `./config.cache'.  Set FILE to `/dev/null' to disable caching, for
  5051. -     debugging `configure'.
  5052. -
  5053. -`--help'
  5054. -     Print a summary of the options to `configure', and exit.
  5055. -
  5056. -`--quiet'
  5057. -`--silent'
  5058. -`-q'
  5059. -     Do not print messages saying which checks are being made.
  5060. -
  5061. -`--srcdir=DIR'
  5062. -     Look for the package's source code in directory DIR.  Usually
  5063. -     `configure' can determine that directory automatically.
  5064. -
  5065. -`--version'
  5066. -     Print the version of Autoconf used to generate the `configure'
  5067. -     script, and exit.
  5068. -
  5069. -`configure' also accepts some other, not widely useful, options.
  5070. -
  5071. -
  5072. -File: autoconf.info,  Node: Invoking config.status,  Next: Questions,  Prev: Invoking configure,  Up: Top
  5073. -
  5074. -Recreating a Configuration
  5075. -**************************
  5076. -
  5077. -   The `configure' script creates a file named `config.status' which
  5078. -describes which configuration options were specified when the package
  5079. -was last configured.  This file is a shell script which, if run, will
  5080. -recreate the same configuration.
  5081. -
  5082. -   You can give `config.status' the `--recheck' option to update
  5083. -itself.  This option is useful if you change `configure', so that the
  5084. -results of some tests might be different from the previous run.  The
  5085. -`--recheck' option re-runs `configure' with the same arguments you used
  5086. -before, plus the `--no-create' option, which prevent `configure' from
  5087. -running `config.status' and creating `Makefile' and other files, and
  5088. -the `--no-recursion' option, which prevents `configure' from running
  5089. -other `configure' scripts in subdirectories.  (This is so other
  5090. -`Makefile' rules can run `config.status' when it changes; *note
  5091. -Automatic Remaking::., for an example).
  5092. -
  5093. -   `config.status' also accepts the options `--help', which prints a
  5094. -summary of the options to `config.status', and `--version', which
  5095. -prints the version of Autoconf used to create the `configure' script
  5096. -that generated `config.status'.
  5097. -
  5098. -   `config.status' checks several optional environment variables that
  5099. -can alter its behavior:
  5100. -
  5101. - - Variable: CONFIG_SHELL
  5102. -     The shell with which to run `configure' for the `--recheck'
  5103. -     option.  It must be Bourne-compatible.  The default is `/bin/sh'.
  5104. -
  5105. - - Variable: CONFIG_STATUS
  5106. -     The file name to use for the shell script that records the
  5107. -     configuration.  The default is `./config.status'.  This variable is
  5108. -     useful when one package uses parts of another and the `configure'
  5109. -     scripts shouldn't be merged because they are maintained separately.
  5110. -
  5111. -   The following variables provide one way for separately distributed
  5112. -packages to share the values computed by `configure'.  Doing so can be
  5113. -useful if some of the packages need a superset of the features that one
  5114. -of them, perhaps a common library, does.  These variables allow a
  5115. -`config.status' file to create files other than the ones that its
  5116. -`configure.in' specifies, so it can be used for a different package.
  5117. -
  5118. - - Variable: CONFIG_FILES
  5119. -     The files in which to perform `@VARIABLE@' substitutions.  The
  5120. -     default is the arguments given to `AC_OUTPUT' in `configure.in'.
  5121. -
  5122. - - Variable: CONFIG_HEADERS
  5123. -     The files in which to substitute C `#define' statements.  The
  5124. -     default is the arguments given to `AC_CONFIG_HEADER'; if that
  5125. -     macro was not called, `config.status' ignores this variable.
  5126. -
  5127. -   These variables also allow you to write `Makefile' rules that
  5128. -regenerate only some of the files.  For example, in the dependencies
  5129. -given above (*note Automatic Remaking::.), `config.status' is run twice
  5130. -when `configure.in' has changed.  If that bothers you, you can make
  5131. -each run only regenerate the files for that rule:
  5132. -
  5133. -     config.h: stamp-h
  5134. -     stamp-h: config.h.in config.status
  5135. -             CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
  5136. -             echo > stamp-h
  5137. -     
  5138. -     Makefile: Makefile.in config.status
  5139. -             CONFIG_FILES=Makefile CONFIG_HEADERS= ./config.status
  5140. -
  5141. -(If `configure.in' does not call `AC_CONFIG_HEADER', there is no need
  5142. -to set `CONFIG_HEADERS' in the `make' rules.)
  5143. -
  5144. -
  5145. -File: autoconf.info,  Node: Questions,  Next: Upgrading,  Prev: Invoking config.status,  Up: Top
  5146. -
  5147. -Questions About Autoconf
  5148. -************************
  5149. -
  5150. -   Several questions about Autoconf come up occasionally.  Here some of
  5151. -them are addressed.
  5152. -
  5153. -* Menu:
  5154. -
  5155. -* Distributing::                Distributing `configure' scripts.
  5156. -* Why GNU m4::                  Why not use the standard `m4'?
  5157. -* Bootstrapping::               Autoconf and GNU `m4' require each other?
  5158. -* Why Not Imake::               Why GNU uses `configure' instead of Imake.
  5159. -
  5160. -
  5161. -File: autoconf.info,  Node: Distributing,  Next: Why GNU m4,  Up: Questions
  5162. -
  5163. -Distributing `configure' Scripts
  5164. -================================
  5165. -
  5166. -     What are the restrictions on distributing `configure'
  5167. -     scripts that Autoconf generates?  How does that affect my
  5168. -     programs that use them?
  5169. -
  5170. -   There are no restrictions on how the configuration scripts that
  5171. -Autoconf produces may be distributed or used.  In Autoconf version 1,
  5172. -they were covered by the GNU General Public License.  We still
  5173. -encourage software authors to distribute their work under terms like
  5174. -those of the GPL, but doing so is not required to use Autoconf.
  5175. -
  5176. -   Of the other files that might be used with `configure',
  5177. -`config.h.in' is under whatever copyright you use for your
  5178. -`configure.in', since it is derived from that file and from the public
  5179. -domain file `acconfig.h'.  `config.sub' and `config.guess' have an
  5180. -exception to the GPL when they are used with an Autoconf-generated
  5181. -`configure' script, which permits you to distribute them under the same
  5182. -terms as the rest of your package.  `install-sh' is from the X
  5183. -Consortium and is not copyrighted.
  5184. -
  5185. -
  5186. -File: autoconf.info,  Node: Why GNU m4,  Next: Bootstrapping,  Prev: Distributing,  Up: Questions
  5187. -
  5188. -Why Require GNU `m4'?
  5189. -=====================
  5190. -
  5191. -     Why does Autoconf require GNU `m4'?
  5192. -
  5193. -   Many `m4' implementations have hard-coded limitations on the size
  5194. -and number of macros, which Autoconf exceeds.  They also lack several
  5195. -builtin macros that it would be difficult to get along without in a
  5196. -sophisticated application like Autoconf, including:
  5197. -
  5198. -     builtin
  5199. -     indir
  5200. -     patsubst
  5201. -     __file__
  5202. -     __line__
  5203. -
  5204. -   Since only software maintainers need to use Autoconf, and since GNU
  5205. -`m4' is simple to configure and install, it seems reasonable to require
  5206. -GNU `m4' to be installed also.  Many maintainers of GNU and other free
  5207. -software already have most of the GNU utilities installed, since they
  5208. -prefer them.
  5209. -
  5210. -
  5211. -File: autoconf.info,  Node: Bootstrapping,  Next: Why Not Imake,  Prev: Why GNU m4,  Up: Questions
  5212. -
  5213. -How Can I Bootstrap?
  5214. -====================
  5215. -
  5216. -     If Autoconf requires GNU `m4' and GNU `m4' has an
  5217. -     Autoconf `configure' script, how do I bootstrap?  It seems
  5218. -     like a chicken and egg problem!
  5219. -
  5220. -   This is a misunderstanding.  Although GNU `m4' does come with a
  5221. -`configure' script produced by Autoconf, Autoconf is not required in
  5222. -order to run the script and install GNU `m4'.  Autoconf is only
  5223. -required if you want to change the `m4' `configure' script, which few
  5224. -people have to do (mainly its maintainer).
  5225. -
  5226. -
  5227. -File: autoconf.info,  Node: Why Not Imake,  Prev: Bootstrapping,  Up: Questions
  5228. -
  5229. -Why Not Imake?
  5230. -==============
  5231. -
  5232. -     Why not use Imake instead of `configure' scripts?
  5233. -
  5234. -   Several people have written addressing this question, so I include
  5235. -adaptations of their explanations here.
  5236. -
  5237. -   The following answer is based on one written by Richard Pixley:
  5238. -
  5239. -   Autoconf generated scripts frequently work on machines which it has
  5240. -never been set up to handle before.  That is, it does a good job of
  5241. -inferring a configuration for a new system.  Imake cannot do this.
  5242. -
  5243. -   Imake uses a common database of host specific data.  For X11, this
  5244. -makes sense because the distribution is made as a collection of tools,
  5245. -by one central authority who has control over the database.
  5246. -
  5247. -   GNU tools are not released this way.  Each GNU tool has a maintainer;
  5248. -these maintainers are scattered across the world.  Using a common
  5249. -database would be a maintenance nightmare.  Autoconf may appear to be
  5250. -this kind of database, but in fact it is not.  Instead of listing host
  5251. -dependencies, it lists program requirements.
  5252. -
  5253. -   If you view the GNU suite as a collection of native tools, then the
  5254. -problems are similar.  But the GNU development tools can be configured
  5255. -as cross tools in almost any host+target permutation.  All of these
  5256. -configurations can be installed concurrently.  They can even be
  5257. -configured to share host independent files across hosts.  Imake doesn't
  5258. -address these issues.
  5259. -
  5260. -   Imake templates are a form of standardization.  The GNU coding
  5261. -standards address the same issues without necessarily imposing the same
  5262. -restrictions.
  5263. -
  5264. -   Here is some further explanation, written by Per Bothner:
  5265. -
  5266. -   One of the advantages of Imake is that it easy to generate large
  5267. -Makefiles using `cpp''s `#include' and macro mechanisms.  However,
  5268. -`cpp' is not programmable: it has limited conditional facilities, and
  5269. -no looping.  And `cpp' cannot inspect its environment.
  5270. -
  5271. -   All of these problems are solved by using `sh' instead of `cpp'.
  5272. -The shell is fully programmable, has macro substitution, can execute
  5273. -(or source) other shell scripts, and can inspect its environment.
  5274. -
  5275. -   Paul Eggert elaborates more:
  5276. -
  5277. -   With Autoconf, installers need not assume that Imake itself is
  5278. -already installed and working well.  This may not seem like much of an
  5279. -advantage to people who are accustomed to Imake.  But on many hosts
  5280. -Imake is not installed or the default installation is not working well,
  5281. -and requiring Imake to install a package hinders the acceptance of that
  5282. -package on those hosts.  For example, the Imake template and
  5283. -configuration files might not be installed properly on a host, or the
  5284. -Imake build procedure might wrongly assume that all source files are in
  5285. -one big directory tree, or the Imake configuration might assume one
  5286. -compiler whereas the package or the installer needs to use another, or
  5287. -there might be a version mismatch between the Imake expected by the
  5288. -package and the Imake supported by the host.  These problems are much
  5289. -rarer with Autoconf, where each package comes with its own independent
  5290. -configuration processor.
  5291. -
  5292. -   Also, Imake often suffers from unexpected interactions between
  5293. -`make' and the installer's C preprocessor.  The fundamental problem
  5294. -here is that the C preprocessor was designed to preprocess C programs,
  5295. -not `Makefile's.  This is much less of a problem with Autoconf, which
  5296. -uses the general-purpose preprocessor `m4', and where the package's
  5297. -author (rather than the installer) does the preprocessing in a standard
  5298. -way.
  5299. -
  5300. -   Finally, Mark Eichin notes:
  5301. -
  5302. -   Imake isn't all that extensible, either.  In order to add new
  5303. -features to Imake, you need to provide your own project template, and
  5304. -duplicate most of the features of the existing one.  This means that
  5305. -for a sophisticated project, using the vendor-provided Imake templates
  5306. -fails to provide any leverage--since they don't cover anything that
  5307. -your own project needs (unless it is an X11 program).
  5308. -
  5309. -   On the other side, though:
  5310. -
  5311. -   The one advantage that Imake has over `configure': `Imakefile's tend
  5312. -to be much shorter (likewise, less redundant) than `Makefile.in's.
  5313. -There is a fix to this, however--at least for the Kerberos V5 tree,
  5314. -we've modified things to call in common `post.in' and `pre.in'
  5315. -`Makefile' fragments for the entire tree.  This means that a lot of
  5316. -common things don't have to be duplicated, even though they normally
  5317. -are in `configure' setups.
  5318. -
  5319. -
  5320. -File: autoconf.info,  Node: Upgrading,  Next: History,  Prev: Questions,  Up: Top
  5321. -
  5322. -Upgrading From Version 1
  5323. -************************
  5324. -
  5325. -   Autoconf version 2 is mostly backward compatible with version 1.
  5326. -However, it introduces better ways to do some things, and doesn't
  5327. -support some of the ugly things in version 1.  So, depending on how
  5328. -sophisticated your `configure.in' files are, you might have to do some
  5329. -manual work in order to upgrade to version 2.  This chapter points out
  5330. -some problems to watch for when upgrading.  Also, perhaps your
  5331. -`configure' scripts could benefit from some of the new features in
  5332. -version 2; the changes are summarized in the file `NEWS' in the
  5333. -Autoconf distribution.
  5334. -
  5335. -   First, make sure you have GNU `m4' version 1.1 or higher installed,
  5336. -preferably 1.3 or higher.  Versions before 1.1 have bugs that prevent
  5337. -them from working with Autoconf version 2.  Versions 1.3 and later are
  5338. -much faster than earlier versions, because as of version 1.3, GNU `m4'
  5339. -has a more efficient implementation of diversions and can freeze its
  5340. -internal state in a file that it can read back quickly.
  5341. -
  5342. -* Menu:
  5343. -
  5344. -* Changed File Names::          Files you might rename.
  5345. -* Changed Makefiles::           New things to put in `Makefile.in'.
  5346. -* Changed Macros::              Macro calls you might replace.
  5347. -* Invoking autoupdate::         Replacing old macro names in `configure.in'.
  5348. -* Changed Results::             Changes in how to check test results.
  5349. -* Changed Macro Writing::       Better ways to write your own macros.
  5350. -
  5351. -
  5352. -File: autoconf.info,  Node: Changed File Names,  Next: Changed Makefiles,  Up: Upgrading
  5353. -
  5354. -Changed File Names
  5355. -==================
  5356. -
  5357. -   If you have an `aclocal.m4' installed with Autoconf (as opposed to
  5358. -in a particular package's source directory), you must rename it to
  5359. -`acsite.m4'.  *Note Invoking autoconf::.
  5360. -
  5361. -   If you distribute `install.sh' with your package, rename it to
  5362. -`install-sh' so `make' builtin rules won't inadvertently create a file
  5363. -called `install' from it.  `AC_PROG_INSTALL' looks for the script under
  5364. -both names, but it is best to use the new name.
  5365. -
  5366. -   If you were using `config.h.top' or `config.h.bot', you still can,
  5367. -but you will have less clutter if you merge them into `acconfig.h'.
  5368. -*Note Invoking autoheader::.
  5369. -
  5370. -
  5371. -File: autoconf.info,  Node: Changed Makefiles,  Next: Changed Macros,  Prev: Changed File Names,  Up: Upgrading
  5372. -
  5373. -Changed Makefiles
  5374. -=================
  5375. -
  5376. -   Add `@CFLAGS@', `@CPPFLAGS@', and `@LDFLAGS@' in your `Makefile.in'
  5377. -files, so they can take advantage of the values of those variables in
  5378. -the environment when `configure' is run.  Doing this isn't necessary,
  5379. -but it's a convenience for users.
  5380. -
  5381. -   Also add `@configure_input@' in a comment to each non-`Makefile'
  5382. -input file for `AC_OUTPUT', so that the output files will contain a
  5383. -comment saying they were produced by `configure'.  Automatically
  5384. -selecting the right comment syntax for all the kinds of files that
  5385. -people call `AC_OUTPUT' on became too much work.
  5386. -
  5387. -   Add `config.log' and `config.cache' to the list of files you remove
  5388. -in `distclean' targets.
  5389. -
  5390. -   If you have the following in `Makefile.in':
  5391. -
  5392. -     prefix = /usr/local
  5393. -     exec_prefix = ${prefix}
  5394. -
  5395. -you must change it to:
  5396. -
  5397. -     prefix = @prefix@
  5398. -     exec_prefix = @exec_prefix@
  5399. -
  5400. -The old behavior of replacing those variables without `@' characters
  5401. -around them has been removed.
  5402. -
  5403. -
  5404. -File: autoconf.info,  Node: Changed Macros,  Next: Invoking autoupdate,  Prev: Changed Makefiles,  Up: Upgrading
  5405. -
  5406. -Changed Macros
  5407. -==============
  5408. -
  5409. -   Many of the macros were renamed in Autoconf version 2.  You can still
  5410. -use the old names, but the new ones are clearer, and it's easier to find
  5411. -the documentation for them.  *Note Old Macro Names::, for a table
  5412. -showing the new names for the old macros.  Use the `autoupdate' program
  5413. -to convert your `configure.in' to using the new macro names.  *Note
  5414. -Invoking autoupdate::.
  5415. -
  5416. -   Some macros have been superseded by similar ones that do the job
  5417. -better, but are not call-compatible.  If you get warnings about calling
  5418. -obsolete macros while running `autoconf', you may safely ignore them,
  5419. -but your `configure' script will generally work better if you follow
  5420. -the advice it prints about what to replace the obsolete macros with.  In
  5421. -particular, the mechanism for reporting the results of tests has
  5422. -changed.  If you were using `echo' or `AC_VERBOSE' (perhaps via
  5423. -`AC_COMPILE_CHECK'), your `configure' script's output will look better
  5424. -if you switch to `AC_MSG_CHECKING' and `AC_MSG_RESULT'.  *Note Printing
  5425. -Messages::.  Those macros work best in conjunction with cache
  5426. -variables.  *Note Caching Results::.
  5427. -
  5428. -
  5429. -File: autoconf.info,  Node: Invoking autoupdate,  Next: Changed Results,  Prev: Changed Macros,  Up: Upgrading
  5430. -
  5431. -Using `autoupdate' to Modernize `configure'
  5432. -===========================================
  5433. -
  5434. -   The `autoupdate' program updates a `configure.in' file that calls
  5435. -Autoconf macros by their old names to use the current macro names.  In
  5436. -version 2 of Autoconf, most of the macros were renamed to use a more
  5437. -uniform and descriptive naming scheme.  *Note Macro Names::, for a
  5438. -description of the new scheme.  Although the old names still work
  5439. -(*note Old Macro Names::., for a list of the old macro names and the
  5440. -corresponding new names), you can make your `configure.in' files more
  5441. -readable and make it easier to use the current Autoconf documentation
  5442. -if you update them to use the new macro names.
  5443. -
  5444. -   If given no arguments, `autoupdate' updates `configure.in', backing
  5445. -up the original version with the suffix `~' (or the value of the
  5446. -environment variable `SIMPLE_BACKUP_SUFFIX', if that is set).  If you
  5447. -give `autoupdate' an argument, it reads that file instead of
  5448. -`configure.in' and writes the updated file to the standard output.
  5449. -
  5450. -`autoupdate' accepts the following options:
  5451. -
  5452. -`--help'
  5453. -`-h'
  5454. -     Print a summary of the command line options and exit.
  5455. -
  5456. -`--macrodir=DIR'
  5457. -`-m DIR'
  5458. -     Look for the Autoconf macro files in directory DIR instead of the
  5459. -     default installation directory.  You can also set the `AC_MACRODIR'
  5460. -     environment variable to a directory; this option overrides the
  5461. -     environment variable.
  5462. -
  5463. -`--version'
  5464. -     Print the version number of `autoupdate' and exit.
  5465. -
  5466. -
  5467. -File: autoconf.info,  Node: Changed Results,  Next: Changed Macro Writing,  Prev: Invoking autoupdate,  Up: Upgrading
  5468. -
  5469. -Changed Results
  5470. -===============
  5471. -
  5472. -   If you were checking the results of previous tests by examining the
  5473. -shell variable `DEFS', you need to switch to checking the values of the
  5474. -cache variables for those tests.  `DEFS' no longer exists while
  5475. -`configure' is running; it is only created when generating output
  5476. -files.  This difference from version 1 is because properly quoting the
  5477. -contents of that variable turned out to be too cumbersome and
  5478. -inefficient to do every time `AC_DEFINE' is called.  *Note Cache
  5479. -Variable Names::.
  5480. -
  5481. -   For example, here is a `configure.in' fragment written for Autoconf
  5482. -version 1:
  5483. -
  5484. -     AC_HAVE_FUNCS(syslog)
  5485. -     case "$DEFS" in
  5486. -     *-DHAVE_SYSLOG*) ;;
  5487. -     *) # syslog is not in the default libraries.  See if it's in some other.
  5488. -       saved_LIBS="$LIBS"
  5489. -       for lib in bsd socket inet; do
  5490. -         AC_CHECKING(for syslog in -l$lib)
  5491. -         LIBS="$saved_LIBS -l$lib"
  5492. -         AC_HAVE_FUNCS(syslog)
  5493. -         case "$DEFS" in
  5494. -         *-DHAVE_SYSLOG*) break ;;
  5495. -         *) ;;
  5496. -         esac
  5497. -         LIBS="$saved_LIBS"
  5498. -       done ;;
  5499. -     esac
  5500. -
  5501. -   Here is a way to write it for version 2:
  5502. -
  5503. -     AC_CHECK_FUNCS(syslog)
  5504. -     if test $ac_cv_func_syslog = no; then
  5505. -       # syslog is not in the default libraries.  See if it's in some other.
  5506. -       for lib in bsd socket inet; do
  5507. -         AC_CHECK_LIB($lib, syslog, [AC_DEFINE(HAVE_SYSLOG)
  5508. -           LIBS="$LIBS $lib"; break])
  5509. -       done
  5510. -     fi
  5511. -
  5512. -   If you were working around bugs in `AC_DEFINE_UNQUOTED' by adding
  5513. -backslashes before quotes, you need to remove them.  It now works
  5514. -predictably, and does not treat quotes (except backquotes) specially.
  5515. -*Note Setting Output Variables::.
  5516. -
  5517. -   All of the boolean shell variables set by Autoconf macros now use
  5518. -`yes' for the true value.  Most of them use `no' for false, though for
  5519. -backward compatibility some use the empty string instead.  If you were
  5520. -relying on a shell variable being set to something like 1 or `t' for
  5521. -true, you need to change your tests.
  5522. -
  5523. -
  5524. -File: autoconf.info,  Node: Changed Macro Writing,  Prev: Changed Results,  Up: Upgrading
  5525. -
  5526. -Changed Macro Writing
  5527. -=====================
  5528. -
  5529. -   When defining your own macros, you should now use `AC_DEFUN' instead
  5530. -of `define'.  `AC_DEFUN' automatically calls `AC_PROVIDE' and ensures
  5531. -that macros called via `AC_REQUIRE' do not interrupt other macros, to
  5532. -prevent nested `checking...' messages on the screen.  There's no actual
  5533. -harm in continuing to use the older way, but it's less convenient and
  5534. -attractive.  *Note Macro Definitions::.
  5535. -
  5536. -   You probably looked at the macros that came with Autoconf as a guide
  5537. -for how to do things.  It would be a good idea to take a look at the new
  5538. -versions of them, as the style is somewhat improved and they take
  5539. -advantage of some new features.
  5540. -
  5541. -   If you were doing tricky things with undocumented Autoconf internals
  5542. -(macros, variables, diversions), check whether you need to change
  5543. -anything to account for changes that have been made.  Perhaps you can
  5544. -even use an officially supported technique in version 2 instead of
  5545. -kludging.  Or perhaps not.
  5546. -
  5547. -   To speed up your locally written feature tests, add caching to them.
  5548. -See whether any of your tests are of general enough usefulness to
  5549. -encapsulate into macros that you can share.
  5550. -
  5551. -
  5552. -File: autoconf.info,  Node: History,  Next: Old Macro Names,  Prev: Upgrading,  Up: Top
  5553. -
  5554. -History of Autoconf
  5555. -*******************
  5556. -
  5557. -   You may be wondering, Why was Autoconf originally written?  How did
  5558. -it get into its present form?  (Why does it look like gorilla spit?)  If
  5559. -you're not wondering, then this chapter contains no information useful
  5560. -to you, and you might as well skip it.  If you *are* wondering, then
  5561. -let there be light...
  5562. -
  5563. -* Menu:
  5564. -
  5565. -* Genesis::            Prehistory and naming of `configure'.
  5566. -* Exodus::            The plagues of `m4' and Perl.
  5567. -* Leviticus::            The priestly code of portability arrives.
  5568. -* Numbers::            Growth and contributors.
  5569. -* Deuteronomy::            Approaching the promises of easy configuration.
  5570. -
  5571. -
  5572. -File: autoconf.info,  Node: Genesis,  Next: Exodus,  Up: History
  5573. -
  5574. -Genesis
  5575. -=======
  5576. -
  5577. -   In June 1991 I was maintaining many of the GNU utilities for the Free
  5578. -Software Foundation.  As they were ported to more platforms and more
  5579. -programs were added, the number of `-D' options that users had to
  5580. -select in the `Makefile' (around 20) became burdensome.  Especially for
  5581. -me--I had to test each new release on a bunch of different systems.  So
  5582. -I wrote a little shell script to guess some of the correct settings for
  5583. -the fileutils package, and released it as part of fileutils 2.0.  That
  5584. -`configure' script worked well enough that the next month I adapted it
  5585. -(by hand) to create similar `configure' scripts for several other GNU
  5586. -utilities packages.  Brian Berliner also adapted one of my scripts for
  5587. -his CVS revision control system.
  5588. -
  5589. -   Later that summer, I learned that Richard Stallman and Richard Pixley
  5590. -were developing similar scripts to use in the GNU compiler tools; so I
  5591. -adapted my `configure' scripts to support their evolving interface:
  5592. -using the file name `Makefile.in' as the templates; adding `+srcdir',
  5593. -the first option (of many); and creating `config.status' files.
  5594. -
  5595. -
  5596. -File: autoconf.info,  Node: Exodus,  Next: Leviticus,  Prev: Genesis,  Up: History
  5597. -
  5598. -Exodus
  5599. -======
  5600. -
  5601. -   As I got feedback from users, I incorporated many improvements, using
  5602. -Emacs to search and replace, cut and paste, similar changes in each of
  5603. -the scripts.  As I adapted more GNU utilities packages to use
  5604. -`configure' scripts, updating them all by hand became impractical.
  5605. -Rich Murphey, the maintainer of the GNU graphics utilities, sent me mail
  5606. -saying that the `configure' scripts were great, and asking if I had a
  5607. -tool for generating them that I could send him.  No, I thought, but I
  5608. -should!  So I started to work out how to generate them.  And the
  5609. -journey from the slavery of hand-written `configure' scripts to the
  5610. -abundance and ease of Autoconf began.
  5611. -
  5612. -   Cygnus `configure', which was being developed at around that time,
  5613. -is table driven; it is meant to deal mainly with a discrete number of
  5614. -system types with a small number of mainly unguessable features (such as
  5615. -details of the object file format).  The automatic configuration system
  5616. -that Brian Fox had developed for Bash takes a similar approach.  For
  5617. -general use, it seems to me a hopeless cause to try to maintain an
  5618. -up-to-date database of which features each variant of each operating
  5619. -system has.  It's easier and more reliable to check for most features on
  5620. -the fly--especially on hybrid systems that people have hacked on
  5621. -locally or that have patches from vendors installed.
  5622. -
  5623. -   I considered using an architecture similar to that of Cygnus
  5624. -`configure', where there is a single `configure' script that reads
  5625. -pieces of `configure.in' when run.  But I didn't want to have to
  5626. -distribute all of the feature tests with every package, so I settled on
  5627. -having a different `configure' made from each `configure.in' by a
  5628. -preprocessor.  That approach also offered more control and flexibility.
  5629. -
  5630. -   I looked briefly into using the Metaconfig package, by Larry Wall,
  5631. -Harlan Stenn, and Raphael Manfredi, but I decided not to for several
  5632. -reasons.  The `Configure' scripts it produces are interactive, which I
  5633. -find quite inconvenient; I didn't like the ways it checked for some
  5634. -features (such as library functions); I didn't know that it was still
  5635. -being maintained, and the `Configure' scripts I had seen didn't work on
  5636. -many modern systems (such as System V R4 and NeXT); it wasn't very
  5637. -flexible in what it could do in response to a feature's presence or
  5638. -absence; I found it confusing to learn; and it was too big and complex
  5639. -for my needs (I didn't realize then how much Autoconf would eventually
  5640. -have to grow).
  5641. -
  5642. -   I considered using Perl to generate my style of `configure' scripts,
  5643. -but decided that `m4' was better suited to the job of simple textual
  5644. -substitutions: it gets in the way less, because output is implicit.
  5645. -Plus, everyone already has it.  (Initially I didn't rely on the GNU
  5646. -extensions to `m4'.)  Also, some of my friends at the University of
  5647. -Maryland had recently been putting `m4' front ends on several programs,
  5648. -including `tvtwm', and I was interested in trying out a new language.
  5649. -
  5650. -
  5651. -File: autoconf.info,  Node: Leviticus,  Next: Numbers,  Prev: Exodus,  Up: History
  5652. -
  5653. -Leviticus
  5654. -=========
  5655. -
  5656. -   Since my `configure' scripts determine the system's capabilities
  5657. -automatically, with no interactive user intervention, I decided to call
  5658. -the program that generates them Autoconfig.  But with a version number
  5659. -tacked on, that name would be too long for old UNIX file systems, so I
  5660. -shortened it to Autoconf.
  5661. -
  5662. -   In the fall of 1991 I called together a group of fellow questers
  5663. -after the Holy Grail of portability (er, that is, alpha testers) to
  5664. -give me feedback as I encapsulated pieces of my handwritten scripts in
  5665. -`m4' macros and continued to add features and improve the techniques
  5666. -used in the checks.  Prominent among the testers were Franc,ois Pinard,
  5667. -who came up with the idea of making an `autoconf' shell script to run
  5668. -`m4' and check for unresolved macro calls; Richard Pixley, who
  5669. -suggested running the compiler instead of searching the file system to
  5670. -find include files and symbols, for more accurate results; Karl Berry,
  5671. -who got Autoconf to configure TeX and added the macro index to the
  5672. -documentation; and Ian Taylor, who added support for creating a C
  5673. -header file as an alternative to putting `-D' options in a `Makefile',
  5674. -so he could use Autoconf for his UUCP package.  The alpha testers
  5675. -cheerfully adjusted their files again and again as the names and
  5676. -calling conventions of the Autoconf macros changed from release to
  5677. -release.  They all contributed many specific checks, great ideas, and
  5678. -bug fixes.
  5679. -
  5680. -
  5681. -File: autoconf.info,  Node: Numbers,  Next: Deuteronomy,  Prev: Leviticus,  Up: History
  5682. -
  5683. -Numbers
  5684. -=======
  5685. -
  5686. -   In July 1992, after months of alpha testing, I released Autoconf 1.0,
  5687. -and converted many GNU packages to use it.  I was surprised by how
  5688. -positive the reaction to it was.  More people started using it than I
  5689. -could keep track of, including people working on software that wasn't
  5690. -part of the GNU Project (such as TCL, FSP, and Kerberos V5).  Autoconf
  5691. -continued to improve rapidly, as many people using the `configure'
  5692. -scripts reported problems they encountered.
  5693. -
  5694. -   Autoconf turned out to be a good torture test for `m4'
  5695. -implementations.  UNIX `m4' started to dump core because of the length
  5696. -of the macros that Autoconf defined, and several bugs showed up in GNU
  5697. -`m4' as well.  Eventually, we realized that we needed to use some
  5698. -features that only GNU `m4' has.  4.3BSD `m4', in particular, has an
  5699. -impoverished set of builtin macros; the System V version is better, but
  5700. -still doesn't provide everything we need.
  5701. -
  5702. -   More development occurred as people put Autoconf under more stresses
  5703. -(and to uses I hadn't anticipated).  Karl Berry added checks for X11.
  5704. -david zuhn contributed C++ support.  Franc,ois Pinard made it diagnose
  5705. -invalid arguments.  Jim Blandy bravely coerced it into configuring GNU
  5706. -Emacs, laying the groundwork for several later improvements.  Roland
  5707. -McGrath got it to configure the GNU C Library, wrote the `autoheader'
  5708. -script to automate the creation of C header file templates, and added a
  5709. -`--verbose' option to `configure'.  Noah Friedman added the
  5710. -`--macrodir' option and `AC_MACRODIR' environment variable.  (He also
  5711. -coined the term "autoconfiscate" to mean "adapt a software package to
  5712. -use Autoconf".)  Roland and Noah improved the quoting protection in
  5713. -`AC_DEFINE' and fixed many bugs, especially when I got sick of dealing
  5714. -with portability problems from February through June, 1993.
  5715. -
  5716. -
  5717. -File: autoconf.info,  Node: Deuteronomy,  Prev: Numbers,  Up: History
  5718. -
  5719. -Deuteronomy
  5720. -===========
  5721. -
  5722. -   A long wish list for major features had accumulated, and the effect
  5723. -of several years of patching by various people had left some residual
  5724. -cruft.  In April 1994, while working for Cygnus Support, I began a major
  5725. -revision of Autoconf.  I added most of the features of the Cygnus
  5726. -`configure' that Autoconf had lacked, largely by adapting the relevant
  5727. -parts of Cygnus `configure' with the help of david zuhn and Ken
  5728. -Raeburn.  These features include support for using `config.sub',
  5729. -`config.guess', `--host', and `--target'; making links to files; and
  5730. -running `configure' scripts in subdirectories.  Adding these features
  5731. -enabled Ken to convert GNU `as', and Rob Savoye to convert DejaGNU, to
  5732. -using Autoconf.
  5733. -
  5734. -   I added more features in response to other peoples' requests.  Many
  5735. -people had asked for `configure' scripts to share the results of the
  5736. -checks between runs, because (particularly when configuring a large
  5737. -source tree, like Cygnus does) they were frustratingly slow.  Mike
  5738. -Haertel suggested adding site-specific initialization scripts.  People
  5739. -distributing software that had to unpack on MS-DOS asked for a way to
  5740. -override the `.in' extension on the file names, which produced file
  5741. -names like `config.h.in' containing two dots.  Jim Avera did an
  5742. -extensive examination of the problems with quoting in `AC_DEFINE' and
  5743. -`AC_SUBST'; his insights led to significant improvements.  Richard
  5744. -Stallman asked that compiler output be sent to `config.log' instead of
  5745. -`/dev/null', to help people debug the Emacs `configure' script.
  5746. -
  5747. -   I made some other changes because of my dissatisfaction with the
  5748. -quality of the program.  I made the messages showing results of the
  5749. -checks less ambiguous, always printing a result.  I regularized the
  5750. -names of the macros and cleaned up coding style inconsistencies.  I
  5751. -added some auxiliary utilities that I had developed to help convert
  5752. -source code packages to use Autoconf.  With the help of Franc,ois
  5753. -Pinard, I made the macros not interrupt each others' messages.  (That
  5754. -feature revealed some performance bottlenecks in GNU `m4', which he
  5755. -hastily corrected!) I reorganized the documentation around problems
  5756. -people want to solve.  And I began a testsuite, because experience had
  5757. -shown that Autoconf has a pronounced tendency to regress when we change
  5758. -it.
  5759. -
  5760. -   Again, several alpha testers gave invaluable feedback, especially
  5761. -Franc,ois Pinard, Jim Meyering, Karl Berry, Rob Savoye, Ken Raeburn,
  5762. -and Mark Eichin.
  5763. -
  5764. -   Finally, version 2.0 was ready.  And there was much rejoicing.  (And
  5765. -I have free time again.  I think.  Yeah, right.)
  5766. -
  5767. -
  5768. -File: autoconf.info,  Node: Old Macro Names,  Next: Environment Variable Index,  Prev: History,  Up: Top
  5769. -
  5770. -Old Macro Names
  5771. -***************
  5772. -
  5773. -   In version 2 of Autoconf, most of the macros were renamed to use a
  5774. -more uniform and descriptive naming scheme.  Here are the old names of
  5775. -the macros that were renamed, followed by the current names of those
  5776. -macros.  Although the old names are still accepted by the `autoconf'
  5777. -program for backward compatibility, the old names are considered
  5778. -obsolete.  *Note Macro Names::, for a description of the new naming
  5779. -scheme.
  5780. -
  5781. -`AC_ALLOCA'
  5782. -     `AC_FUNC_ALLOCA'
  5783. -
  5784. -`AC_ARG_ARRAY'
  5785. -     removed because of limited usefulness
  5786. -
  5787. -`AC_CHAR_UNSIGNED'
  5788. -     `AC_C_CHAR_UNSIGNED'
  5789. -
  5790. -`AC_CONST'
  5791. -     `AC_C_CONST'
  5792. -
  5793. -`AC_CROSS_CHECK'
  5794. -     `AC_C_CROSS'
  5795. -
  5796. -`AC_ERROR'
  5797. -     `AC_MSG_ERROR'
  5798. -
  5799. -`AC_FIND_X'
  5800. -     `AC_PATH_X'
  5801. -
  5802. -`AC_FIND_XTRA'
  5803. -     `AC_PATH_XTRA'
  5804. -
  5805. -`AC_FUNC_CHECK'
  5806. -     `AC_CHECK_FUNC'
  5807. -
  5808. -`AC_GCC_TRADITIONAL'
  5809. -     `AC_PROG_GCC_TRADITIONAL'
  5810. -
  5811. -`AC_GETGROUPS_T'
  5812. -     `AC_TYPE_GETGROUPS'
  5813. -
  5814. -`AC_GETLOADAVG'
  5815. -     `AC_FUNC_GETLOADAVG'
  5816. -
  5817. -`AC_HAVE_FUNCS'
  5818. -     `AC_CHECK_FUNCS'
  5819. -
  5820. -`AC_HAVE_HEADERS'
  5821. -     `AC_CHECK_HEADERS'
  5822. -
  5823. -`AC_HAVE_POUNDBANG'
  5824. -     `AC_SYS_INTERPRETER' (different calling convention)
  5825. -
  5826. -`AC_HEADER_CHECK'
  5827. -     `AC_CHECK_HEADER'
  5828. -
  5829. -`AC_HEADER_EGREP'
  5830. -     `AC_EGREP_HEADER'
  5831. -
  5832. -`AC_INLINE'
  5833. -     `AC_C_INLINE'
  5834. -
  5835. -`AC_LN_S'
  5836. -     `AC_PROG_LN_S'
  5837. -
  5838. -`AC_LONG_DOUBLE'
  5839. -     `AC_C_LONG_DOUBLE'
  5840. -
  5841. -`AC_LONG_FILE_NAMES'
  5842. -     `AC_SYS_LONG_FILE_NAMES'
  5843. -
  5844. -`AC_MAJOR_HEADER'
  5845. -     `AC_HEADER_MAJOR'
  5846. -
  5847. -`AC_MINUS_C_MINUS_O'
  5848. -     `AC_PROG_CC_C_O'
  5849. -
  5850. -`AC_MMAP'
  5851. -     `AC_FUNC_MMAP'
  5852. -
  5853. -`AC_MODE_T'
  5854. -     `AC_TYPE_MODE_T'
  5855. -
  5856. -`AC_OFF_T'
  5857. -     `AC_TYPE_OFF_T'
  5858. -
  5859. -`AC_PID_T'
  5860. -     `AC_TYPE_PID_T'
  5861. -
  5862. -`AC_PREFIX'
  5863. -     `AC_PREFIX_PROGRAM'
  5864. -
  5865. -`AC_PROGRAMS_CHECK'
  5866. -     `AC_CHECK_PROGS'
  5867. -
  5868. -`AC_PROGRAMS_PATH'
  5869. -     `AC_PATH_PROGS'
  5870. -
  5871. -`AC_PROGRAM_CHECK'
  5872. -     `AC_CHECK_PROG'
  5873. -
  5874. -`AC_PROGRAM_EGREP'
  5875. -     `AC_EGREP_CPP'
  5876. -
  5877. -`AC_PROGRAM_PATH'
  5878. -     `AC_PATH_PROG'
  5879. -
  5880. -`AC_REMOTE_TAPE'
  5881. -     removed because of limited usefulness
  5882. -
  5883. -`AC_RESTARTABLE_SYSCALLS'
  5884. -     `AC_SYS_RESTARTABLE_SYSCALLS'
  5885. -
  5886. -`AC_RETSIGTYPE'
  5887. -     `AC_TYPE_SIGNAL'
  5888. -
  5889. -`AC_RSH'
  5890. -     removed because of limited usefulness
  5891. -
  5892. -`AC_SETVBUF_REVERSED'
  5893. -     `AC_FUNC_SETVBUF_REVERSED'
  5894. -
  5895. -`AC_SET_MAKE'
  5896. -     `AC_PROG_MAKE_SET'
  5897. -
  5898. -`AC_SIZEOF_TYPE'
  5899. -     `AC_CHECK_SIZEOF'
  5900. -
  5901. -`AC_SIZE_T'
  5902. -     `AC_TYPE_SIZE_T'
  5903. -
  5904. -`AC_STAT_MACROS_BROKEN'
  5905. -     `AC_HEADER_STAT'
  5906. -
  5907. -`AC_STDC_HEADERS'
  5908. -     `AC_HEADER_STDC'
  5909. -
  5910. -`AC_STRCOLL'
  5911. -     `AC_FUNC_STRCOLL'
  5912. -
  5913. -`AC_ST_BLKSIZE'
  5914. -     `AC_STRUCT_ST_BLKSIZE'
  5915. -
  5916. -`AC_ST_BLOCKS'
  5917. -     `AC_STRUCT_ST_BLOCKS'
  5918. -
  5919. -`AC_ST_RDEV'
  5920. -     `AC_STRUCT_ST_RDEV'
  5921. -
  5922. -`AC_SYS_SIGLIST_DECLARED'
  5923. -     `AC_DECL_SYS_SIGLIST'
  5924. -
  5925. -`AC_TEST_CPP'
  5926. -     `AC_TRY_CPP'
  5927. -
  5928. -`AC_TEST_PROGRAM'
  5929. -     `AC_TRY_RUN'
  5930. -
  5931. -`AC_TIMEZONE'
  5932. -     `AC_STRUCT_TIMEZONE'
  5933. -
  5934. -`AC_TIME_WITH_SYS_TIME'
  5935. -     `AC_HEADER_TIME'
  5936. -
  5937. -`AC_UID_T'
  5938. -     `AC_TYPE_UID_T'
  5939. -
  5940. -`AC_UTIME_NULL'
  5941. -     `AC_FUNC_UTIME_NULL'
  5942. -
  5943. -`AC_VFORK'
  5944. -     `AC_FUNC_VFORK'
  5945. -
  5946. -`AC_VPRINTF'
  5947. -     `AC_FUNC_VPRINTF'
  5948. -
  5949. -`AC_WAIT3'
  5950. -     `AC_FUNC_WAIT3'
  5951. -
  5952. -`AC_WARN'
  5953. -     `AC_MSG_WARN'
  5954. -
  5955. -`AC_WORDS_BIGENDIAN'
  5956. -     `AC_C_BIGENDIAN'
  5957. -
  5958. -`AC_YYTEXT_POINTER'
  5959. -     `AC_DECL_YYTEXT'
  5960. -
  5961. -
  5962. -File: autoconf.info,  Node: Environment Variable Index,  Next: Output Variable Index,  Prev: Old Macro Names,  Up: Top
  5963. -
  5964. -Environment Variable Index
  5965. -**************************
  5966. -
  5967. -   This is an alphabetical list of the environment variables that
  5968. -Autoconf checks.
  5969. -
  5970. -* Menu:
  5971. -
  5972. -* AC_MACRODIR <1>:                      Invoking autoupdate.
  5973. -* AC_MACRODIR <1>:                      Invoking autoheader.
  5974. -* AC_MACRODIR <1>:                      Invoking autoreconf.
  5975. -* AC_MACRODIR <1>:                      Invoking autoconf.
  5976. -* AC_MACRODIR <1>:                      Invoking ifnames.
  5977. -* AC_MACRODIR:                          Invoking autoscan.
  5978. -* CONFIG_FILES:                         Invoking config.status.
  5979. -* CONFIG_HEADERS:                       Invoking config.status.
  5980. -* CONFIG_SHELL:                         Invoking config.status.
  5981. -* CONFIG_SITE:                          Site Defaults.
  5982. -* CONFIG_STATUS:                        Invoking config.status.
  5983. -* SIMPLE_BACKUP_SUFFIX:                 Invoking autoupdate.
  5984. -
  5985. -
  5986. -File: autoconf.info,  Node: Output Variable Index,  Next: Preprocessor Symbol Index,  Prev: Environment Variable Index,  Up: Top
  5987. -
  5988. -Output Variable Index
  5989. -*********************
  5990. -
  5991. -   This is an alphabetical list of the variables that Autoconf can
  5992. -substitute into files that it creates, typically one or more
  5993. -`Makefile's.  *Note Setting Output Variables::, for more information on
  5994. -how this is done.
  5995. -
  5996. -* Menu:
  5997. -
  5998. -* ALLOCA:                               Particular Functions.
  5999. -* AWK:                                  Particular Programs.
  6000. -* bindir:                               Preset Output Variables.
  6001. -* build:                                System Type Variables.
  6002. -* build_alias:                          System Type Variables.
  6003. -* build_cpu:                            System Type Variables.
  6004. -* build_os:                             System Type Variables.
  6005. -* build_vendor:                         System Type Variables.
  6006. -* CC <1>:                               UNIX Variants.
  6007. -* CC:                                   Particular Programs.
  6008. -* CFLAGS <1>:                           Particular Programs.
  6009. -* CFLAGS:                               Preset Output Variables.
  6010. -* configure_input:                      Preset Output Variables.
  6011. -* CPP:                                  Particular Programs.
  6012. -* CPPFLAGS:                             Preset Output Variables.
  6013. -* CXX:                                  Particular Programs.
  6014. -* CXXCPP:                               Particular Programs.
  6015. -* CXXFLAGS <1>:                         Particular Programs.
  6016. -* CXXFLAGS:                             Preset Output Variables.
  6017. -* datadir:                              Preset Output Variables.
  6018. -* DEFS:                                 Preset Output Variables.
  6019. -* exec_prefix:                          Preset Output Variables.
  6020. -* host:                                 System Type Variables.
  6021. -* host_alias:                           System Type Variables.
  6022. -* host_cpu:                             System Type Variables.
  6023. -* host_os:                              System Type Variables.
  6024. -* host_vendor:                          System Type Variables.
  6025. -* includedir:                           Preset Output Variables.
  6026. -* infodir:                              Preset Output Variables.
  6027. -* INSTALL:                              Particular Programs.
  6028. -* INSTALL_DATA:                         Particular Programs.
  6029. -* INSTALL_PROGRAM:                      Particular Programs.
  6030. -* KMEM_GROUP:                           Particular Functions.
  6031. -* LDFLAGS:                              Preset Output Variables.
  6032. -* LEX:                                  Particular Programs.
  6033. -* LEX_OUTPUT_ROOT:                      Particular Programs.
  6034. -* LEXLIB:                               Particular Programs.
  6035. -* libdir:                               Preset Output Variables.
  6036. -* libexecdir:                           Preset Output Variables.
  6037. -* LIBOBJS <1>:                          Structures.
  6038. -* LIBOBJS <1>:                          Generic Functions.
  6039. -* LIBOBJS:                              Particular Functions.
  6040. -* LIBS <1>:                             UNIX Variants.
  6041. -* LIBS:                                 Preset Output Variables.
  6042. -* LN_S:                                 Particular Programs.
  6043. -* localstatedir:                        Preset Output Variables.
  6044. -* mandir:                               Preset Output Variables.
  6045. -* NEED_SETGID:                          Particular Functions.
  6046. -* oldincludedir:                        Preset Output Variables.
  6047. -* prefix:                               Preset Output Variables.
  6048. -* program_transform_name:               Transforming Names.
  6049. -* RANLIB:                               Particular Programs.
  6050. -* sbindir:                              Preset Output Variables.
  6051. -* SET_MAKE:                             Output.
  6052. -* sharedstatedir:                       Preset Output Variables.
  6053. -* srcdir:                               Preset Output Variables.
  6054. -* subdirs:                              Subdirectories.
  6055. -* sysconfdir:                           Preset Output Variables.
  6056. -* target:                               System Type Variables.
  6057. -* target_alias:                         System Type Variables.
  6058. -* target_cpu:                           System Type Variables.
  6059. -* target_os:                            System Type Variables.
  6060. -* target_vendor:                        System Type Variables.
  6061. -* top_srcdir:                           Preset Output Variables.
  6062. -* X_CFLAGS:                             System Services.
  6063. -* X_EXTRA_LIBS:                         System Services.
  6064. -* X_LIBS:                               System Services.
  6065. -* X_PRE_LIBS:                           System Services.
  6066. -* YACC:                                 Particular Programs.
  6067. -
  6068. -
  6069. -File: autoconf.info,  Node: Preprocessor Symbol Index,  Next: Macro Index,  Prev: Output Variable Index,  Up: Top
  6070. -
  6071. -Preprocessor Symbol Index
  6072. -*************************
  6073. -
  6074. -   This is an alphabetical list of the C preprocessor symbols that the
  6075. -Autoconf macros define.  To work with Autoconf, C source code needs to
  6076. -use these names in `#if' directives.
  6077. -
  6078. -* Menu:
  6079. -
  6080. -* __CHAR_UNSIGNED__:                    Compiler Characteristics.
  6081. -* _ALL_SOURCE:                          UNIX Variants.
  6082. -* _MINIX:                               UNIX Variants.
  6083. -* _POSIX_1_SOURCE:                      UNIX Variants.
  6084. -* _POSIX_SOURCE:                        UNIX Variants.
  6085. -* _POSIX_VERSION:                       Particular Headers.
  6086. -* C_ALLOCA:                             Particular Functions.
  6087. -* CLOSEDIR_VOID:                        Particular Functions.
  6088. -* const:                                Compiler Characteristics.
  6089. -* DGUX:                                 Particular Functions.
  6090. -* DIRENT:                               Particular Headers.
  6091. -* GETGROUPS_T:                          Particular Typedefs.
  6092. -* GETLODAVG_PRIVILEGED:                 Particular Functions.
  6093. -* GETPGRP_VOID:                         Particular Functions.
  6094. -* gid_t:                                Particular Typedefs.
  6095. -* HAVE_FUNCTION:                        Generic Functions.
  6096. -* HAVE_HEADER:                          Generic Headers.
  6097. -* HAVE_ALLOCA_H:                        Particular Functions.
  6098. -* HAVE_CONFIG_H:                        Configuration Headers.
  6099. -* HAVE_DIRENT_H:                        Particular Headers.
  6100. -* HAVE_DOPRNT:                          Particular Functions.
  6101. -* HAVE_GETMNTENT:                       Particular Functions.
  6102. -* HAVE_LONG_DOUBLE:                     Compiler Characteristics.
  6103. -* HAVE_LONG_FILE_NAMES:                 System Services.
  6104. -* HAVE_MMAP:                            Particular Functions.
  6105. -* HAVE_NDIR_H:                          Particular Headers.
  6106. -* HAVE_RESTARTABLE_SYSCALLS:            System Services.
  6107. -* HAVE_ST_BLKSIZE:                      Structures.
  6108. -* HAVE_ST_BLOCKS:                       Structures.
  6109. -* HAVE_ST_RDEV:                         Structures.
  6110. -* HAVE_STRCOLL:                         Particular Functions.
  6111. -* HAVE_STRFTIME:                        Particular Functions.
  6112. -* HAVE_SYS_DIR_H:                       Particular Headers.
  6113. -* HAVE_SYS_NDIR_H:                      Particular Headers.
  6114. -* HAVE_SYS_WAIT_H:                      Particular Headers.
  6115. -* HAVE_TM_ZONE:                         Structures.
  6116. -* HAVE_TZNAME:                          Structures.
  6117. -* HAVE_UNISTD_H:                        Particular Headers.
  6118. -* HAVE_UTIME_NULL:                      Particular Functions.
  6119. -* HAVE_VFORK_H:                         Particular Functions.
  6120. -* HAVE_VPRINTF:                         Particular Functions.
  6121. -* HAVE_WAIT3:                           Particular Functions.
  6122. -* inline:                               Compiler Characteristics.
  6123. -* INT_16_BITS:                          Compiler Characteristics.
  6124. -* LONG_64_BITS:                         Compiler Characteristics.
  6125. -* MAJOR_IN_MKDEV:                       Particular Headers.
  6126. -* MAJOR_IN_SYSMACROS:                   Particular Headers.
  6127. -* mode_t:                               Particular Typedefs.
  6128. -* NDIR:                                 Particular Headers.
  6129. -* NEED_MEMORY_H:                        Particular Headers.
  6130. -* NEED_SETGID:                          Particular Functions.
  6131. -* NLIST_NAME_UNION:                     Particular Functions.
  6132. -* NLIST_STRUCT:                         Particular Functions.
  6133. -* NO_MINUS_C_MINUS_O:                   Particular Programs.
  6134. -* off_t:                                Particular Typedefs.
  6135. -* pid_t:                                Particular Typedefs.
  6136. -* RETSIGTYPE:                           Particular Typedefs.
  6137. -* SETVBUF_REVERSED:                     Particular Functions.
  6138. -* size_t:                               Particular Typedefs.
  6139. -* STDC_HEADERS:                         Particular Headers.
  6140. -* SVR4:                                 Particular Functions.
  6141. -* SYS_SIGLIST_DECLARED:                 Particular Headers.
  6142. -* SYSDIR:                               Particular Headers.
  6143. -* SYSNDIR:                              Particular Headers.
  6144. -* TIME_WITH_SYS_TIME:                   Structures.
  6145. -* TM_IN_SYS_TIME:                       Structures.
  6146. -* uid_t:                                Particular Typedefs.
  6147. -* UMAX:                                 Particular Functions.
  6148. -* UMAX4_3:                              Particular Functions.
  6149. -* USG:                                  Particular Headers.
  6150. -* vfork:                                Particular Functions.
  6151. -* VOID_CLOSEDIR:                        Particular Headers.
  6152. -* WORDS_BIGENDIAN:                      Compiler Characteristics.
  6153. -* YYTEXT_POINTER:                       Particular Programs.
  6154. -
  6155. -
  6156. -File: autoconf.info,  Node: Macro Index,  Prev: Preprocessor Symbol Index,  Up: Top
  6157. -
  6158. -Macro Index
  6159. -***********
  6160. -
  6161. -   This is an alphabetical list of the Autoconf macros.  To make the
  6162. -list easier to use, the macros are listed without their preceding `AC_'.
  6163. -
  6164. -* Menu:
  6165. -
  6166. -* AIX:                                  UNIX Variants.
  6167. -* ALLOCA:                               Old Macro Names.
  6168. -* ARG_ARRAY:                            Old Macro Names.
  6169. -* ARG_ENABLE:                           Package Options.
  6170. -* ARG_PROGRAM:                          Transforming Names.
  6171. -* ARG_WITH:                             External Software.
  6172. -* BEFORE:                               Suggested Ordering.
  6173. -* C_BIGENDIAN:                          Compiler Characteristics.
  6174. -* C_CHAR_UNSIGNED:                      Compiler Characteristics.
  6175. -* C_CONST:                              Compiler Characteristics.
  6176. -* C_CROSS:                              Test Programs.
  6177. -* C_INLINE:                             Compiler Characteristics.
  6178. -* C_LONG_DOUBLE:                        Compiler Characteristics.
  6179. -* CACHE_CHECK:                          Caching Results.
  6180. -* CACHE_VAL:                            Caching Results.
  6181. -* CANONICAL_HOST:                       Canonicalizing.
  6182. -* CANONICAL_SYSTEM:                     Canonicalizing.
  6183. -* CHAR_UNSIGNED:                        Old Macro Names.
  6184. -* CHECK_FUNC:                           Generic Functions.
  6185. -* CHECK_FUNCS:                          Generic Functions.
  6186. -* CHECK_HEADER:                         Generic Headers.
  6187. -* CHECK_HEADERS:                        Generic Headers.
  6188. -* CHECK_LIB:                            Libraries.
  6189. -* CHECK_PROG:                           Generic Programs.
  6190. -* CHECK_PROGS:                          Generic Programs.
  6191. -* CHECK_SIZEOF:                         Compiler Characteristics.
  6192. -* CHECK_TOOL:                           Generic Programs.
  6193. -* CHECK_TYPE:                           Generic Typedefs.
  6194. -* CHECKING:                             Printing Messages.
  6195. -* COMPILE_CHECK:                        Examining Libraries.
  6196. -* CONFIG_AUX_DIR:                       Input.
  6197. -* CONFIG_HEADER:                        Configuration Headers.
  6198. -* CONFIG_SUBDIRS:                       Subdirectories.
  6199. -* CONST:                                Old Macro Names.
  6200. -* CROSS_CHECK:                          Old Macro Names.
  6201. -* DECL_SYS_SIGLIST:                     Particular Headers.
  6202. -* DECL_YYTEXT:                          Particular Programs.
  6203. -* DEFINE:                               Defining Symbols.
  6204. -* DEFINE_UNQUOTED:                      Defining Symbols.
  6205. -* DEFUN:                                Macro Definitions.
  6206. -* DIR_HEADER:                           Particular Headers.
  6207. -* DYNIX_SEQ:                            UNIX Variants.
  6208. -* EGREP_CPP:                            Examining Declarations.
  6209. -* EGREP_HEADER:                         Examining Declarations.
  6210. -* ENABLE:                               Package Options.
  6211. -* ERROR:                                Old Macro Names.
  6212. -* FIND_X:                               Old Macro Names.
  6213. -* FIND_XTRA:                            Old Macro Names.
  6214. -* FUNC_ALLOCA:                          Particular Functions.
  6215. -* FUNC_CHECK:                           Old Macro Names.
  6216. -* FUNC_CLOSEDIR_VOID:                   Particular Functions.
  6217. -* FUNC_GETLOADAVG:                      Particular Functions.
  6218. -* FUNC_GETMNTENT:                       Particular Functions.
  6219. -* FUNC_GETPGRP:                         Particular Functions.
  6220. -* FUNC_MEMCMP:                          Particular Functions.
  6221. -* FUNC_MMAP:                            Particular Functions.
  6222. -* FUNC_SETVBUF_REVERSED:                Particular Functions.
  6223. -* FUNC_STRCOLL:                         Particular Functions.
  6224. -* FUNC_STRFTIME:                        Particular Functions.
  6225. -* FUNC_UTIME_NULL:                      Particular Functions.
  6226. -* FUNC_VFORK:                           Particular Functions.
  6227. -* FUNC_VPRINTF:                         Particular Functions.
  6228. -* FUNC_WAIT3:                           Particular Functions.
  6229. -* GCC_TRADITIONAL:                      Old Macro Names.
  6230. -* GETGROUPS_T:                          Old Macro Names.
  6231. -* GETLOADAVG:                           Old Macro Names.
  6232. -* HAVE_FUNCS:                           Old Macro Names.
  6233. -* HAVE_HEADERS:                         Old Macro Names.
  6234. -* HAVE_LIBRARY:                         Libraries.
  6235. -* HAVE_POUNDBANG:                       Old Macro Names.
  6236. -* HEADER_CHECK:                         Old Macro Names.
  6237. -* HEADER_DIRENT:                        Particular Headers.
  6238. -* HEADER_EGREP:                         Old Macro Names.
  6239. -* HEADER_MAJOR:                         Particular Headers.
  6240. -* HEADER_STAT:                          Structures.
  6241. -* HEADER_STDC:                          Particular Headers.
  6242. -* HEADER_SYS_WAIT:                      Particular Headers.
  6243. -* HEADER_TIME:                          Structures.
  6244. -* INIT:                                 Input.
  6245. -* INLINE:                               Old Macro Names.
  6246. -* INT_16_BITS:                          Compiler Characteristics.
  6247. -* IRIX_SUN:                             UNIX Variants.
  6248. -* ISC_POSIX:                            UNIX Variants.
  6249. -* LANG_C:                               Language Choice.
  6250. -* LANG_CPLUSPLUS:                       Language Choice.
  6251. -* LANG_RESTORE:                         Language Choice.
  6252. -* LANG_SAVE:                            Language Choice.
  6253. -* LINK_FILES:                           Using System Type.
  6254. -* LN_S:                                 Old Macro Names.
  6255. -* LONG_64_BITS:                         Compiler Characteristics.
  6256. -* LONG_DOUBLE:                          Old Macro Names.
  6257. -* LONG_FILE_NAMES:                      Old Macro Names.
  6258. -* MAJOR_HEADER:                         Old Macro Names.
  6259. -* MEMORY_H:                             Particular Headers.
  6260. -* MINIX:                                UNIX Variants.
  6261. -* MINUS_C_MINUS_O:                      Old Macro Names.
  6262. -* MMAP:                                 Old Macro Names.
  6263. -* MODE_T:                               Old Macro Names.
  6264. -* MSG_CHECKING:                         Printing Messages.
  6265. -* MSG_ERROR:                            Printing Messages.
  6266. -* MSG_RESULT:                           Printing Messages.
  6267. -* MSG_WARN:                             Printing Messages.
  6268. -* OBSOLETE:                             Obsolete Macros.
  6269. -* OFF_T:                                Old Macro Names.
  6270. -* OUTPUT:                               Output.
  6271. -* PATH_PROG:                            Generic Programs.
  6272. -* PATH_PROGS:                           Generic Programs.
  6273. -* PATH_X:                               System Services.
  6274. -* PATH_XTRA:                            System Services.
  6275. -* PID_T:                                Old Macro Names.
  6276. -* PREFIX:                               Old Macro Names.
  6277. -* PREFIX_PROGRAM:                       Default Prefix.
  6278. -* PREREQ:                               Versions.
  6279. -* PROG_AWK:                             Particular Programs.
  6280. -* PROG_CC:                              Particular Programs.
  6281. -* PROG_CC_C_O:                          Particular Programs.
  6282. -* PROG_CPP:                             Particular Programs.
  6283. -* PROG_CXX:                             Particular Programs.
  6284. -* PROG_CXXCPP:                          Particular Programs.
  6285. -* PROG_GCC_TRADITIONAL:                 Particular Programs.
  6286. -* PROG_INSTALL:                         Particular Programs.
  6287. -* PROG_LEX:                             Particular Programs.
  6288. -* PROG_LN_S:                            Particular Programs.
  6289. -* PROG_MAKE_SET:                        Output.
  6290. -* PROG_RANLIB:                          Particular Programs.
  6291. -* PROG_YACC:                            Particular Programs.
  6292. -* PROGRAM_CHECK:                        Old Macro Names.
  6293. -* PROGRAM_EGREP:                        Old Macro Names.
  6294. -* PROGRAM_PATH:                         Old Macro Names.
  6295. -* PROGRAMS_CHECK:                       Old Macro Names.
  6296. -* PROGRAMS_PATH:                        Old Macro Names.
  6297. -* PROVIDE:                              Prerequisite Macros.
  6298. -* REMOTE_TAPE:                          Old Macro Names.
  6299. -* REPLACE_FUNCS:                        Generic Functions.
  6300. -* REQUIRE:                              Prerequisite Macros.
  6301. -* REQUIRE_CPP:                          Language Choice.
  6302. -* RESTARTABLE_SYSCALLS:                 Old Macro Names.
  6303. -* RETSIGTYPE:                           Old Macro Names.
  6304. -* REVISION:                             Versions.
  6305. -* RSH:                                  Old Macro Names.
  6306. -* SCO_INTL:                             UNIX Variants.
  6307. -* SET_MAKE:                             Old Macro Names.
  6308. -* SETVBUF_REVERSED:                     Old Macro Names.
  6309. -* SIZE_T:                               Old Macro Names.
  6310. -* SIZEOF_TYPE:                          Old Macro Names.
  6311. -* ST_BLKSIZE:                           Old Macro Names.
  6312. -* ST_BLOCKS:                            Old Macro Names.
  6313. -* ST_RDEV:                              Old Macro Names.
  6314. -* STAT_MACROS_BROKEN <1>:               Old Macro Names.
  6315. -* STAT_MACROS_BROKEN:                   Structures.
  6316. -* STDC_HEADERS:                         Old Macro Names.
  6317. -* STRCOLL:                              Old Macro Names.
  6318. -* STRUCT_ST_BLKSIZE:                    Structures.
  6319. -* STRUCT_ST_BLOCKS:                     Structures.
  6320. -* STRUCT_ST_RDEV:                       Structures.
  6321. -* STRUCT_TIMEZONE:                      Structures.
  6322. -* STRUCT_TM:                            Structures.
  6323. -* SUBST:                                Setting Output Variables.
  6324. -* SUBST_FILE:                           Setting Output Variables.
  6325. -* SYS_INTERPRETER:                      System Services.
  6326. -* SYS_LONG_FILE_NAMES:                  System Services.
  6327. -* SYS_RESTARTABLE_SYSCALLS:             System Services.
  6328. -* SYS_SIGLIST_DECLARED:                 Old Macro Names.
  6329. -* TEST_CPP:                             Old Macro Names.
  6330. -* TEST_PROGRAM:                         Old Macro Names.
  6331. -* TIME_WITH_SYS_TIME:                   Old Macro Names.
  6332. -* TIMEZONE:                             Old Macro Names.
  6333. -* TRY_COMPILE:                          Examining Syntax.
  6334. -* TRY_CPP:                              Examining Declarations.
  6335. -* TRY_LINK:                             Examining Libraries.
  6336. -* TRY_RUN:                              Test Programs.
  6337. -* TYPE_GETGROUPS:                       Particular Typedefs.
  6338. -* TYPE_MODE_T:                          Particular Typedefs.
  6339. -* TYPE_OFF_T:                           Particular Typedefs.
  6340. -* TYPE_PID_T:                           Particular Typedefs.
  6341. -* TYPE_SIGNAL:                          Particular Typedefs.
  6342. -* TYPE_SIZE_T:                          Particular Typedefs.
  6343. -* TYPE_UID_T:                           Particular Typedefs.
  6344. -* UID_T:                                Old Macro Names.
  6345. -* UNISTD_H:                             Particular Headers.
  6346. -* USG:                                  Particular Headers.
  6347. -* UTIME_NULL:                           Old Macro Names.
  6348. -* VERBOSE:                              Printing Messages.
  6349. -* VFORK:                                Old Macro Names.
  6350. -* VPRINTF:                              Old Macro Names.
  6351. -* WAIT3:                                Old Macro Names.
  6352. -* WARN:                                 Old Macro Names.
  6353. -* WITH:                                 External Software.
  6354. -* WORDS_BIGENDIAN:                      Old Macro Names.
  6355. -* XENIX_DIR:                            UNIX Variants.
  6356. -* YYTEXT_POINTER:                       Old Macro Names.
  6357. -
  6358. -
  6359. -
  6360. -Tag Table:
  6361. -Node: Top1177
  6362. -Node: Introduction9316
  6363. -Node: Making configure Scripts13156
  6364. -Node: Writing configure.in16221
  6365. -Node: Invoking autoscan19921
  6366. -Node: Invoking ifnames22226
  6367. -Node: Invoking autoconf23716
  6368. -Node: Invoking autoreconf25554
  6369. -Node: Setup27874
  6370. -Node: Input28760
  6371. -Node: Output30483
  6372. -Node: Makefile Substitutions33233
  6373. -Node: Preset Output Variables34817
  6374. -Node: Build Directories39319
  6375. -Node: Automatic Remaking40952
  6376. -Node: Configuration Headers43038
  6377. -Node: Header Templates45405
  6378. -Node: Invoking autoheader46584
  6379. -Node: Subdirectories49732
  6380. -Node: Default Prefix51075
  6381. -Node: Versions52479
  6382. -Node: Existing Tests54383
  6383. -Node: Alternative Programs55848
  6384. -Node: Particular Programs56512
  6385. -Node: Generic Programs62362
  6386. -Node: Libraries65188
  6387. -Node: Library Functions67017
  6388. -Node: Particular Functions67575
  6389. -Node: Generic Functions73878
  6390. -Node: Header Files75721
  6391. -Node: Particular Headers76280
  6392. -Node: Generic Headers83251
  6393. -Node: Structures84553
  6394. -Node: Typedefs86790
  6395. -Node: Particular Typedefs87294
  6396. -Node: Generic Typedefs88494
  6397. -Node: Compiler Characteristics88937
  6398. -Node: System Services91562
  6399. -Node: UNIX Variants93911
  6400. -Node: Writing Tests95930
  6401. -Node: Examining Declarations97896
  6402. -Node: Examining Syntax100366
  6403. -Node: Examining Libraries101423
  6404. -Node: Run Time103982
  6405. -Node: Test Programs104943
  6406. -Node: Guidelines107480
  6407. -Node: Test Functions108669
  6408. -Node: Portable Shell110212
  6409. -Node: Testing Values and Files112144
  6410. -Node: Multiple Cases113799
  6411. -Node: Language Choice114997
  6412. -Node: Results116555
  6413. -Node: Defining Symbols117314
  6414. -Node: Setting Output Variables120323
  6415. -Node: Caching Results122169
  6416. -Node: Cache Variable Names124450
  6417. -Node: Cache Files125999
  6418. -Node: Printing Messages128097
  6419. -Node: Writing Macros131384
  6420. -Node: Macro Definitions132003
  6421. -Node: Macro Names133108
  6422. -Node: Quoting135559
  6423. -Node: Dependencies Between Macros137461
  6424. -Node: Prerequisite Macros138093
  6425. -Node: Suggested Ordering139548
  6426. -Node: Obsolete Macros141078
  6427. -Node: Manual Configuration142302
  6428. -Node: Specifying Names143201
  6429. -Node: Canonicalizing145073
  6430. -Node: System Type Variables146387
  6431. -Node: Using System Type147134
  6432. -Node: Site Configuration148581
  6433. -Node: External Software149354
  6434. -Node: Package Options152052
  6435. -Node: Site Details154319
  6436. -Node: Transforming Names155542
  6437. -Node: Transformation Options156720
  6438. -Node: Transformation Examples157186
  6439. -Node: Transformation Rules158754
  6440. -Node: Site Defaults160163
  6441. -Node: Invoking configure163947
  6442. -Node: Basic Installation164896
  6443. -Node: Compilers and Options167476
  6444. -Node: Multiple Architectures168125
  6445. -Node: Installation Names169111
  6446. -Node: Optional Features170295
  6447. -Node: System Type171065
  6448. -Node: Sharing Defaults172087
  6449. -Node: Operation Controls172711
  6450. -Node: Invoking config.status173586
  6451. -Node: Questions176974
  6452. -Node: Distributing177506
  6453. -Node: Why GNU m4178632
  6454. -Node: Bootstrapping179445
  6455. -Node: Why Not Imake180061
  6456. -Node: Upgrading184470
  6457. -Node: Changed File Names185991
  6458. -Node: Changed Makefiles186727
  6459. -Node: Changed Macros187823
  6460. -Node: Invoking autoupdate189070
  6461. -Node: Changed Results190661
  6462. -Node: Changed Macro Writing192763
  6463. -Node: History194026
  6464. -Node: Genesis194733
  6465. -Node: Exodus195906
  6466. -Node: Leviticus198955
  6467. -Node: Numbers200478
  6468. -Node: Deuteronomy202394
  6469. -Node: Old Macro Names205058
  6470. -Node: Environment Variable Index208107
  6471. -Node: Output Variable Index209109
  6472. -Node: Preprocessor Symbol Index213792
  6473. -Node: Macro Index218607
  6474. -
  6475. -End Tag Table
  6476. diff -rup --new-file baseline/fsf/autoconf/autoconf.sh amiga/fsf/autoconf/autoconf.sh
  6477. --- baseline/fsf/autoconf/autoconf.sh    Tue Jan 16 15:07:41 1996
  6478. +++ amiga/fsf/autoconf/autoconf.sh    Tue Sep 24 12:00:00 1996
  6479. @@ -137,7 +137,7 @@ if grep "^[^#]*${pattern}" $tmpout > /de
  6480.  fi
  6481.  
  6482.  if test $# -eq 0; then
  6483. -  exec 4> configure; chmod +x configure
  6484. +  exec 4> configure #; chmod +x configure (AmigaOS hack -fnf)
  6485.  else
  6486.    exec 4>&1
  6487.  fi
  6488. diff -rup --new-file baseline/fsf/autoconf/config.sub amiga/fsf/autoconf/config.sub
  6489. --- baseline/fsf/autoconf/config.sub    Thu Jun 22 19:59:56 1995
  6490. +++ amiga/fsf/autoconf/config.sub    Tue Sep 24 12:00:00 1996
  6491. @@ -176,11 +176,11 @@ case $basic_machine in
  6492.          os=-sysv
  6493.          ;;
  6494.      amiga | amiga-*)
  6495. -        basic_machine=m68k-cbm
  6496. +        basic_machine=m68k-unknown
  6497.          ;;
  6498. -    amigados)
  6499. -        basic_machine=m68k-cbm
  6500. -        os=-amigados
  6501. +    amigaos)
  6502. +        basic_machine=m68k-unknown
  6503. +        os=-amigaos
  6504.          ;;
  6505.      amigaunix | amix)
  6506.          basic_machine=m68k-cbm
  6507. @@ -635,7 +635,7 @@ case $os in
  6508.      -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  6509.            | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
  6510.            | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  6511. -          | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  6512. +          | -amigaos* | -msdos* | -newsos* | -unicos* | -aos* \
  6513.            | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
  6514.            | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  6515.            | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
  6516. @@ -761,7 +761,7 @@ case $basic_machine in
  6517.          os=-sysv
  6518.          ;;
  6519.      *-cbm)
  6520. -        os=-amigados
  6521. +        os=-amigaos
  6522.          ;;
  6523.      *-dg)
  6524.          os=-dgux
  6525. diff -rup --new-file baseline/fsf/autoconf/configure amiga/fsf/autoconf/configure
  6526. --- baseline/fsf/autoconf/configure    Tue May  7 10:21:16 1996
  6527. +++ amiga/fsf/autoconf/configure    Mon Sep 30 22:35:38 1996
  6528. @@ -44,6 +44,9 @@ libdir='${exec_prefix}/lib'
  6529.  includedir='${prefix}/include'
  6530.  oldincludedir='/usr/include'
  6531.  infodir='${prefix}/info'
  6532. +guidedir='${prefix}/guide'
  6533. +psdir='${prefix}/ps'
  6534. +dvidir='${prefix}/dvi'
  6535.  mandir='${prefix}/man'
  6536.  
  6537.  # Initialize some other variables.
  6538. @@ -158,6 +161,9 @@ Directory and file names:
  6539.    --includedir=DIR        C header files in DIR [PREFIX/include]
  6540.    --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
  6541.    --infodir=DIR           info documentation in DIR [PREFIX/info]
  6542. +  --guidedir=DIR          Amigaguide documentation in DIR [PREFIX/guide]
  6543. +  --psdir=DIR             postscript documentation in DIR [PREFIX/ps]
  6544. +  --dvidir=DIR            TeX dvi documentation in DIR [PREFIX/dvi]
  6545.    --mandir=DIR            man documentation in DIR [PREFIX/man]
  6546.    --srcdir=DIR            find the sources in DIR [configure dir or ..]
  6547.    --program-prefix=PREFIX prepend PREFIX to installed program names
  6548. @@ -200,6 +206,18 @@ EOF
  6549.    -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  6550.      infodir="$ac_optarg" ;;
  6551.  
  6552. + -guidedir | --guidedir | --guidedi | --guided | --guide | --gui)
  6553. +   ac_prev=guidedir ;;
  6554. + -guidedir=* | --guidedir=* | --guidedi=* | --guided=* | --guide=* |--gui=*)+    guidedir="$ac_optarg" ;;
  6555. +
  6556. + -psdir | --psdir | --psdi | --psd | --ps)
  6557. +   ac_prev=psdir ;;
  6558. + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)+    psdir="$ac_optarg" ;;
  6559. +
  6560. + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
  6561. +   ac_prev=dvidir ;;
  6562. + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* |--dv=*)+    dvidir="$ac_optarg" ;;
  6563. +
  6564.    -libdir | --libdir | --libdi | --libd)
  6565.      ac_prev=libdir ;;
  6566.    -libdir=* | --libdir=* | --libdi=* | --libd=*)
  6567. @@ -665,6 +683,7 @@ ac_configure=$ac_aux_dir/configure # Thi
  6568.  # SunOS /usr/etc/install
  6569.  # IRIX /sbin/install
  6570.  # AIX /bin/install
  6571. +# AmigaOS /c/install
  6572.  # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  6573.  # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  6574.  # ./install, which can be erroneously created by make from ./install.sh.
  6575. @@ -677,7 +696,7 @@ else
  6576.    for ac_dir in $PATH; do
  6577.      # Account for people who put trailing slashes in PATH elements.
  6578.      case "$ac_dir/" in
  6579. -    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  6580. +    /|./|.//|/etc/*|/c/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  6581.      *)
  6582.        # OSF1 and SCO ODT 3.0 have their own names for install.
  6583.        for ac_prog in ginstall installbsd scoinst install; do
  6584. @@ -790,7 +809,9 @@ rm -f conftest.defs
  6585.  : ${CONFIG_STATUS=./config.status}
  6586.  
  6587.  echo creating $CONFIG_STATUS
  6588. -rm -f $CONFIG_STATUS
  6589. +# Some systems, like AmigaOS, won't allow you to remove a script that is
  6590. +# being executed, so just move it out of the way instead.
  6591. +if test -f $CONFIG_STATUS; then mv $CONFIG_STATUS $CONFIG_STATUS.old; else true; fi
  6592.  cat > $CONFIG_STATUS <<EOF
  6593.  #! /bin/sh
  6594.  # Generated automatically by configure.
  6595. @@ -851,6 +872,9 @@ s%@libdir@%$libdir%g
  6596.  s%@includedir@%$includedir%g
  6597.  s%@oldincludedir@%$oldincludedir%g
  6598.  s%@infodir@%$infodir%g
  6599. +s%@guidedir@%$guidedir%g
  6600. +s%@psdir@%$psdir%g
  6601. +s%@dvidir@%$dvidir%g
  6602.  s%@mandir@%$mandir%g
  6603.  s%@M4@%$M4%g
  6604.  s%@AWK@%$AWK%g
  6605. @@ -926,6 +950,7 @@ rm -f conftest.subs
  6606.  exit 0
  6607.  EOF
  6608.  chmod +x $CONFIG_STATUS
  6609. +rm -f CONFIG.STATUS.old
  6610.  rm -fr confdefs* $ac_clean_files
  6611.  test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  6612.  
  6613. diff -rup --new-file baseline/fsf/autoconf/manifests/bin amiga/fsf/autoconf/manifests/bin
  6614. --- baseline/fsf/autoconf/manifests/bin    Wed Dec 31 17:00:00 1969
  6615. +++ amiga/fsf/autoconf/manifests/bin    Sat Sep 28 00:00:00 1996
  6616. @@ -0,0 +1,29 @@
  6617. +COPYING
  6618. +COPYING.info
  6619. +bin/autoconf
  6620. +bin/autoheader
  6621. +bin/autoreconf
  6622. +bin/autoscan
  6623. +bin/autoupdate
  6624. +bin/ifnames
  6625. +dvi/autoconf.dvi
  6626. +dvi/standards.dvi
  6627. +guide/autoconf.guide
  6628. +guide/standards.guide
  6629. +info/autoconf.info
  6630. +info/standards.info
  6631. +ps/autoconf.ps
  6632. +ps/standards.ps
  6633. +share/autoconf/acconfig.h
  6634. +share/autoconf/acfunctions
  6635. +share/autoconf/acgeneral.m4
  6636. +share/autoconf/acheaders
  6637. +share/autoconf/acidentifiers
  6638. +share/autoconf/acmakevars
  6639. +share/autoconf/acoldnames.m4
  6640. +share/autoconf/acprograms
  6641. +share/autoconf/acspecific.m4
  6642. +share/autoconf/autoconf.m4
  6643. +share/autoconf/autoconf.m4f
  6644. +share/autoconf/autoheader.m4
  6645. +share/autoconf/autoheader.m4f
  6646. diff -rup --new-file baseline/fsf/autoconf/manifests/src amiga/fsf/autoconf/manifests/src
  6647. --- baseline/fsf/autoconf/manifests/src    Wed Dec 31 17:00:00 1969
  6648. +++ amiga/fsf/autoconf/manifests/src    Sat Sep 28 00:00:00 1996
  6649. @@ -0,0 +1,46 @@
  6650. +fsf/autoconf/BeOS.diffs
  6651. +fsf/autoconf/COPYING
  6652. +fsf/autoconf/ChangeLog
  6653. +fsf/autoconf/ChangeLog.1
  6654. +fsf/autoconf/Makefile.in
  6655. +fsf/autoconf/NEWS
  6656. +fsf/autoconf/Product-Info
  6657. +fsf/autoconf/README
  6658. +fsf/autoconf/TODO
  6659. +fsf/autoconf/acconfig.h
  6660. +fsf/autoconf/acfunctions
  6661. +fsf/autoconf/acgeneral.m4
  6662. +fsf/autoconf/acheaders
  6663. +fsf/autoconf/acidentifiers
  6664. +fsf/autoconf/acmakevars
  6665. +fsf/autoconf/acoldnames.m4
  6666. +fsf/autoconf/acprograms
  6667. +fsf/autoconf/acspecific.m4
  6668. +fsf/autoconf/autoconf.m4
  6669. +fsf/autoconf/autoconf.sh
  6670. +fsf/autoconf/autoconf.texi
  6671. +fsf/autoconf/autoheader.m4
  6672. +fsf/autoconf/autoheader.sh
  6673. +fsf/autoconf/autoreconf.sh
  6674. +fsf/autoconf/autoscan.pl
  6675. +fsf/autoconf/autoupdate.sh
  6676. +fsf/autoconf/config.guess
  6677. +fsf/autoconf/config.sub
  6678. +fsf/autoconf/configure
  6679. +fsf/autoconf/configure.in
  6680. +fsf/autoconf/ifnames.sh
  6681. +fsf/autoconf/install-sh
  6682. +fsf/autoconf/install.texi
  6683. +fsf/autoconf/make-stds.texi
  6684. +fsf/autoconf/manifests/bin
  6685. +fsf/autoconf/manifests/src
  6686. +fsf/autoconf/mkinstalldirs
  6687. +fsf/autoconf/standards.texi
  6688. +fsf/autoconf/testsuite/Makefile.in
  6689. +fsf/autoconf/testsuite/autoconf.g/init.exp
  6690. +fsf/autoconf/testsuite/autoconf.g/sizeof_type.exp
  6691. +fsf/autoconf/testsuite/autoconf.s/defines.exp
  6692. +fsf/autoconf/testsuite/autoconf.s/syntax.exp
  6693. +fsf/autoconf/testsuite/config/unix.exp
  6694. +fsf/autoconf/testsuite/lib/common.exp
  6695. +fsf/autoconf/texinfo.tex
  6696. diff -rup --new-file baseline/fsf/autoconf/standards.info amiga/fsf/autoconf/standards.info
  6697. --- baseline/fsf/autoconf/standards.info    Tue May  7 10:24:46 1996
  6698. +++ amiga/fsf/autoconf/standards.info    Wed Dec 31 17:00:00 1969
  6699. @@ -1,3301 +0,0 @@
  6700. -This is Info file standards.info, produced by Makeinfo-1.63 from the
  6701. -input file ./standards.texi.
  6702. -
  6703. -START-INFO-DIR-ENTRY
  6704. -* Standards: (standards).        GNU coding standards.
  6705. -END-INFO-DIR-ENTRY
  6706. -
  6707. -   GNU Coding Standards Copyright (C) 1992, 1993, 1994, 1995, 1996 Free
  6708. -Software Foundation, Inc.
  6709. -
  6710. -   Permission is granted to make and distribute verbatim copies of this
  6711. -manual provided the copyright notice and this permission notice are
  6712. -preserved on all copies.
  6713. -
  6714. -   Permission is granted to copy and distribute modified versions of
  6715. -this manual under the conditions for verbatim copying, provided that
  6716. -the entire resulting derived work is distributed under the terms of a
  6717. -permission notice identical to this one.
  6718. -
  6719. -   Permission is granted to copy and distribute translations of this
  6720. -manual into another language, under the above conditions for modified
  6721. -versions, except that this permission notice may be stated in a
  6722. -translation approved by the Free Software Foundation.
  6723. -
  6724. -
  6725. -File: standards.info,  Node: Top,  Next: Preface,  Prev: (dir),  Up: (dir)
  6726. -
  6727. -Version
  6728. -*******
  6729. -
  6730. -   Last updated 27 February 1996.
  6731. -
  6732. -* Menu:
  6733. -
  6734. -* Preface::            About the GNU Coding Standards
  6735. -* Intellectual Property::       Keeping Free Software Free
  6736. -* Design Advice::               General Program Design
  6737. -* Program Behavior::            Program Behavior for All Programs
  6738. -* Writing C::                   Making The Best Use of C
  6739. -* Documentation::        Documenting Programs
  6740. -* Managing Releases::           The Release Process
  6741. -
  6742. -
  6743. -File: standards.info,  Node: Preface,  Next: Intellectual Property,  Prev: Top,  Up: Top
  6744. -
  6745. -About the GNU Coding Standards
  6746. -******************************
  6747. -
  6748. -   The GNU Coding Standards were written by Richard Stallman and other
  6749. -GNU Project volunteers.  Their purpose is to make the GNU system clean,
  6750. -consistent, and easy to install.  This document can also be read as a
  6751. -guide to writing portable, robust and reliable programs.  It focuses on
  6752. -programs written in C, but many of the rules and principles are useful
  6753. -even if you write in another programming language.  The rules often
  6754. -state reasons for writing in a certain way.
  6755. -
  6756. -   Corrections or suggestions regarding this document should be sent to
  6757. -`gnu@prep.ai.mit.edu'.  If you make a suggestion, please include a
  6758. -suggested new wording for it; our time is limited.  We prefer a context
  6759. -diff to the `standards.texi' or `make-stds.texi' files, but if you
  6760. -don't have those files, please mail your suggestion anyway.
  6761. -
  6762. -   This release of the GNU Coding Standards was last updated 27
  6763. -February 1996.
  6764. -
  6765. -
  6766. -File: standards.info,  Node: Intellectual Property,  Next: Design Advice,  Prev: Preface,  Up: Top
  6767. -
  6768. -Keeping Free Software Free
  6769. -**************************
  6770. -
  6771. -   This node discusses how you can make sure that GNU software remains
  6772. -unencumbered.
  6773. -
  6774. -* Menu:
  6775. -
  6776. -* Reading Non-Free Code::    Referring to Proprietary Programs
  6777. -* Contributions::        Accepting Contributions
  6778. -
  6779. -
  6780. -File: standards.info,  Node: Reading Non-Free Code,  Next: Contributions,  Up: Intellectual Property
  6781. -
  6782. -Referring to Proprietary Programs
  6783. -=================================
  6784. -
  6785. -   Don't in any circumstances refer to Unix source code for or during
  6786. -your work on GNU!  (Or to any other proprietary programs.)
  6787. -
  6788. -   If you have a vague recollection of the internals of a Unix program,
  6789. -this does not absolutely mean you can't write an imitation of it, but
  6790. -do try to organize the imitation internally along different lines,
  6791. -because this is likely to make the details of the Unix version
  6792. -irrelevant and dissimilar to your results.
  6793. -
  6794. -   For example, Unix utilities were generally optimized to minimize
  6795. -memory use; if you go for speed instead, your program will be very
  6796. -different.  You could keep the entire input file in core and scan it
  6797. -there instead of using stdio.  Use a smarter algorithm discovered more
  6798. -recently than the Unix program.  Eliminate use of temporary files.  Do
  6799. -it in one pass instead of two (we did this in the assembler).
  6800. -
  6801. -   Or, on the contrary, emphasize simplicity instead of speed.  For some
  6802. -applications, the speed of today's computers makes simpler algorithms
  6803. -adequate.
  6804. -
  6805. -   Or go for generality.  For example, Unix programs often have static
  6806. -tables or fixed-size strings, which make for arbitrary limits; use
  6807. -dynamic allocation instead.  Make sure your program handles NULs and
  6808. -other funny characters in the input files.  Add a programming language
  6809. -for extensibility and write part of the program in that language.
  6810. -
  6811. -   Or turn some parts of the program into independently usable
  6812. -libraries.  Or use a simple garbage collector instead of tracking
  6813. -precisely when to free memory, or use a new GNU facility such as
  6814. -obstacks.
  6815. -
  6816. -
  6817. -File: standards.info,  Node: Contributions,  Prev: Reading Non-Free Code,  Up: Intellectual Property
  6818. -
  6819. -Accepting Contributions
  6820. -=======================
  6821. -
  6822. -   If someone else sends you a piece of code to add to the program you
  6823. -are working on, we need legal papers to use it--the same sort of legal
  6824. -papers we will need to get from you.  *Each* significant contributor to
  6825. -a program must sign some sort of legal papers in order for us to have
  6826. -clear title to the program.  The main author alone is not enough.
  6827. -
  6828. -   So, before adding in any contributions from other people, tell us so
  6829. -we can arrange to get the papers.  Then wait until we tell you that we
  6830. -have received the signed papers, before you actually use the
  6831. -contribution.
  6832. -
  6833. -   This applies both before you release the program and afterward.  If
  6834. -you receive diffs to fix a bug, and they make significant changes, we
  6835. -need legal papers for it.
  6836. -
  6837. -   You don't need papers for changes of a few lines here or there, since
  6838. -they are not significant for copyright purposes.  Also, you don't need
  6839. -papers if all you get from the suggestion is some ideas, not actual code
  6840. -which you use.  For example, if you write a different solution to the
  6841. -problem, you don't need to get papers.
  6842. -
  6843. -   We know this is frustrating; it's frustrating for us as well.  But if
  6844. -you don't wait, you are going out on a limb--for example, what if the
  6845. -contributor's employer won't sign a disclaimer?  You might have to take
  6846. -that code out again!
  6847. -
  6848. -   The very worst thing is if you forget to tell us about the other
  6849. -contributor.  We could be very embarrassed in court some day as a
  6850. -result.
  6851. -
  6852. -
  6853. -File: standards.info,  Node: Design Advice,  Next: Program Behavior,  Prev: Intellectual Property,  Up: Top
  6854. -
  6855. -General Program Design
  6856. -**********************
  6857. -
  6858. -   This node discusses some of the issues you should take into account
  6859. -when designing your program.
  6860. -
  6861. -* Menu:
  6862. -
  6863. -* Compatibility::        Compatibility with other implementations
  6864. -* Using Extensions::        Using non-standard features
  6865. -* ANSI C::                      Using ANSI C features
  6866. -* Source Language::        Using languages other than C
  6867. -
  6868. -
  6869. -File: standards.info,  Node: Compatibility,  Next: Using Extensions,  Up: Design Advice
  6870. -
  6871. -Compatibility with Other Implementations
  6872. -========================================
  6873. -
  6874. -   With occasional exceptions, utility programs and libraries for GNU
  6875. -should be upward compatible with those in Berkeley Unix, and upward
  6876. -compatible with ANSI C if ANSI C specifies their behavior, and upward
  6877. -compatible with POSIX if POSIX specifies their behavior.
  6878. -
  6879. -   When these standards conflict, it is useful to offer compatibility
  6880. -modes for each of them.
  6881. -
  6882. -   ANSI C and POSIX prohibit many kinds of extensions.  Feel free to
  6883. -make the extensions anyway, and include a `--ansi', `--posix', or
  6884. -`--compatible' option to turn them off.  However, if the extension has
  6885. -a significant chance of breaking any real programs or scripts, then it
  6886. -is not really upward compatible.  Try to redesign its interface.
  6887. -
  6888. -   Many GNU programs suppress extensions that conflict with POSIX if the
  6889. -environment variable `POSIXLY_CORRECT' is defined (even if it is
  6890. -defined with a null value).  Please make your program recognize this
  6891. -variable if appropriate.
  6892. -
  6893. -   When a feature is used only by users (not by programs or command
  6894. -files), and it is done poorly in Unix, feel free to replace it
  6895. -completely with something totally different and better.  (For example,
  6896. -`vi' is replaced with Emacs.)  But it is nice to offer a compatible
  6897. -feature as well.  (There is a free `vi' clone, so we offer it.)
  6898. -
  6899. -   Additional useful features not in Berkeley Unix are welcome.
  6900. -Additional programs with no counterpart in Unix may be useful, but our
  6901. -first priority is usually to duplicate what Unix already has.
  6902. -
  6903. -
  6904. -File: standards.info,  Node: Using Extensions,  Next: ANSI C,  Prev: Compatibility,  Up: Design Advice
  6905. -
  6906. -Using Non-standard Features
  6907. -===========================
  6908. -
  6909. -   Many GNU facilities that already exist support a number of convenient
  6910. -extensions over the comparable Unix facilities.  Whether to use these
  6911. -extensions in implementing your program is a difficult question.
  6912. -
  6913. -   On the one hand, using the extensions can make a cleaner program.
  6914. -On the other hand, people will not be able to build the program unless
  6915. -the other GNU tools are available.  This might cause the program to
  6916. -work on fewer kinds of machines.
  6917. -
  6918. -   With some extensions, it might be easy to provide both alternatives.
  6919. -For example, you can define functions with a "keyword" `INLINE' and
  6920. -define that as a macro to expand into either `inline' or nothing,
  6921. -depending on the compiler.
  6922. -
  6923. -   In general, perhaps it is best not to use the extensions if you can
  6924. -straightforwardly do without them, but to use the extensions if they
  6925. -are a big improvement.
  6926. -
  6927. -   An exception to this rule are the large, established programs (such
  6928. -as Emacs) which run on a great variety of systems.  Such programs would
  6929. -be broken by use of GNU extensions.
  6930. -
  6931. -   Another exception is for programs that are used as part of
  6932. -compilation: anything that must be compiled with other compilers in
  6933. -order to bootstrap the GNU compilation facilities.  If these require
  6934. -the GNU compiler, then no one can compile them without having them
  6935. -installed already.  That would be no good.
  6936. -
  6937. -
  6938. -File: standards.info,  Node: ANSI C,  Next: Source Language,  Prev: Using Extensions,  Up: Design Advice
  6939. -
  6940. -ANSI C and pre-ANSI C
  6941. -=====================
  6942. -
  6943. -   Do not ever use the "trigraph" feature of ANSI C.
  6944. -
  6945. -   ANSI C is widespread enough now that it is ok to write new programs
  6946. -that use ANSI C features (and therefore will not work in non-ANSI
  6947. -compilers).  And if a program is already written in ANSI C, there's no
  6948. -need to convert it to support non-ANSI compilers.
  6949. -
  6950. -   However, it is easy to support non-ANSI compilers in most programs,
  6951. -so you might still consider doing so when you write a program.  Instead
  6952. -of writing function definitions in ANSI prototype form,
  6953. -
  6954. -     int
  6955. -     foo (int x, int y)
  6956. -     ...
  6957. -
  6958. -write the definition in pre-ANSI style like this,
  6959. -
  6960. -     int
  6961. -     foo (x, y)
  6962. -          int x, y;
  6963. -     ...
  6964. -
  6965. -and use a separate declaration to specify the argument prototype:
  6966. -
  6967. -     int foo (int, int);
  6968. -
  6969. -   You need such a declaration anyway, in a header file, to get the
  6970. -benefit of ANSI C prototypes in all the files where the function is
  6971. -called.  And once you have it, you lose nothing by writing the function
  6972. -definition in the pre-ANSI style.
  6973. -
  6974. -   If you don't know non-ANSI C, there's no need to learn it; just
  6975. -write in ANSI C.
  6976. -
  6977. -
  6978. -File: standards.info,  Node: Source Language,  Prev: ANSI C,  Up: Design Advice
  6979. -
  6980. -Using Languages Other Than C
  6981. -============================
  6982. -
  6983. -   Using a language other than C is like using a non-standard feature:
  6984. -it will cause trouble for users.  Even if GCC supports the other
  6985. -language, users may find it inconvenient to have to install the
  6986. -compiler for that other language in order to build your program.  So
  6987. -please write in C.
  6988. -
  6989. -   There are three exceptions for this rule:
  6990. -
  6991. -   * It is okay to use a special language if the same program contains
  6992. -     an interpreter for that language.
  6993. -
  6994. -     For example, if your program links with GUILE, it is ok to write
  6995. -     part of the program in Scheme or another language supported by
  6996. -     GUILE.
  6997. -
  6998. -   * It is okay to use another language in a tool specifically intended
  6999. -     for use with that language.
  7000. -
  7001. -     This is okay because the only people who want to build the tool
  7002. -     will be those who have installed the other language anyway.
  7003. -
  7004. -   * If an application is not of extremely widespread interest, then
  7005. -     perhaps it's not important if the application is inconvenient to
  7006. -     install.
  7007. -
  7008. -
  7009. -File: standards.info,  Node: Program Behavior,  Next: Writing C,  Prev: Design Advice,  Up: Top
  7010. -
  7011. -Program Behavior for All Programs
  7012. -*********************************
  7013. -
  7014. -   This node describes how to write robust software. It also describes
  7015. -general standards for error messages, the command line interface, and
  7016. -how libraries should behave.
  7017. -
  7018. -* Menu:
  7019. -
  7020. -* Semantics::            Writing robust programs
  7021. -* Libraries::            Library behavior
  7022. -* Errors::            Formatting error messages
  7023. -* User Interfaces::        Standards for command line interfaces
  7024. -* Memory Usage::                When and how to care about memory needs
  7025. -
  7026. -
  7027. -File: standards.info,  Node: Semantics,  Next: Libraries,  Up: Program Behavior
  7028. -
  7029. -Writing Robust Programs
  7030. -=======================
  7031. -
  7032. -   Avoid arbitrary limits on the length or number of *any* data
  7033. -structure, including file names, lines, files, and symbols, by
  7034. -allocating all data structures dynamically.  In most Unix utilities,
  7035. -"long lines are silently truncated".  This is not acceptable in a GNU
  7036. -utility.
  7037. -
  7038. -   Utilities reading files should not drop NUL characters, or any other
  7039. -nonprinting characters *including those with codes above 0177*.  The
  7040. -only sensible exceptions would be utilities specifically intended for
  7041. -interface to certain types of printers that can't handle those
  7042. -characters.
  7043. -
  7044. -   Check every system call for an error return, unless you know you
  7045. -wish to ignore errors.  Include the system error text (from `perror' or
  7046. -equivalent) in *every* error message resulting from a failing system
  7047. -call, as well as the name of the file if any and the name of the
  7048. -utility.  Just "cannot open foo.c" or "stat failed" is not sufficient.
  7049. -
  7050. -   Check every call to `malloc' or `realloc' to see if it returned
  7051. -zero.  Check `realloc' even if you are making the block smaller; in a
  7052. -system that rounds block sizes to a power of 2, `realloc' may get a
  7053. -different block if you ask for less space.
  7054. -
  7055. -   In Unix, `realloc' can destroy the storage block if it returns zero.
  7056. -GNU `realloc' does not have this bug: if it fails, the original block
  7057. -is unchanged.  Feel free to assume the bug is fixed.  If you wish to
  7058. -run your program on Unix, and wish to avoid lossage in this case, you
  7059. -can use the GNU `malloc'.
  7060. -
  7061. -   You must expect `free' to alter the contents of the block that was
  7062. -freed.  Anything you want to fetch from the block, you must fetch before
  7063. -calling `free'.
  7064. -
  7065. -   If `malloc' fails in a noninteractive program, make that a fatal
  7066. -error.  In an interactive program (one that reads commands from the
  7067. -user), it is better to abort the command and return to the command
  7068. -reader loop.  This allows the user to kill other processes to free up
  7069. -virtual memory, and then try the command again.
  7070. -
  7071. -   Use `getopt_long' to decode arguments, unless the argument syntax
  7072. -makes this unreasonable.
  7073. -
  7074. -   When static storage is to be written in during program execution, use
  7075. -explicit C code to initialize it.  Reserve C initialized declarations
  7076. -for data that will not be changed.
  7077. -
  7078. -   Try to avoid low-level interfaces to obscure Unix data structures
  7079. -(such as file directories, utmp, or the layout of kernel memory), since
  7080. -these are less likely to work compatibly.  If you need to find all the
  7081. -files in a directory, use `readdir' or some other high-level interface.
  7082. -These will be supported compatibly by GNU.
  7083. -
  7084. -   By default, the GNU system will provide the signal handling
  7085. -functions of BSD and of POSIX.  So GNU software should be written to use
  7086. -these.
  7087. -
  7088. -   In error checks that detect "impossible" conditions, just abort.
  7089. -There is usually no point in printing any message.  These checks
  7090. -indicate the existence of bugs.  Whoever wants to fix the bugs will have
  7091. -to read the source code and run a debugger.  So explain the problem with
  7092. -comments in the source.  The relevant data will be in variables, which
  7093. -are easy to examine with the debugger, so there is no point moving them
  7094. -elsewhere.
  7095. -
  7096. -   Do not use a count of errors as the exit status for a program.
  7097. -*That does not work*, because exit status values are limited to 8 bits
  7098. -(0 through 255).  A single run of the program might have 256 errors; if
  7099. -you try to return 256 as the exit status, the parent process will see 0
  7100. -as the status, and it will appear that the program succeeded.
  7101. -
  7102. -   If you make temporary files, check the `TMPDIR' environment
  7103. -variable; if that variable is defined, use the specified directory
  7104. -instead of `/tmp'.
  7105. -
  7106. -
  7107. -File: standards.info,  Node: Libraries,  Next: Errors,  Prev: Semantics,  Up: Program Behavior
  7108. -
  7109. -Library Behavior
  7110. -================
  7111. -
  7112. -   Try to make library functions reentrant.  If they need to do dynamic
  7113. -storage allocation, at least try to avoid any nonreentrancy aside from
  7114. -that of `malloc' itself.
  7115. -
  7116. -   Here are certain name conventions for libraries, to avoid name
  7117. -conflicts.
  7118. -
  7119. -   Choose a name prefix for the library, more than two characters long.
  7120. -All external function and variable names should start with this prefix.
  7121. -In addition, there should only be one of these in any given library
  7122. -member.  This usually means putting each one in a separate source file.
  7123. -
  7124. -   An exception can be made when two external symbols are always used
  7125. -together, so that no reasonable program could use one without the
  7126. -other; then they can both go in the same file.
  7127. -
  7128. -   External symbols that are not documented entry points for the user
  7129. -should have names beginning with `_'.  They should also contain the
  7130. -chosen name prefix for the library, to prevent collisions with other
  7131. -libraries.  These can go in the same files with user entry points if
  7132. -you like.
  7133. -
  7134. -   Static functions and variables can be used as you like and need not
  7135. -fit any naming convention.
  7136. -
  7137. -
  7138. -File: standards.info,  Node: Errors,  Next: User Interfaces,  Prev: Libraries,  Up: Program Behavior
  7139. -
  7140. -Formatting Error Messages
  7141. -=========================
  7142. -
  7143. -   Error messages from compilers should look like this:
  7144. -
  7145. -     SOURCE-FILE-NAME:LINENO: MESSAGE
  7146. -
  7147. -   Error messages from other noninteractive programs should look like
  7148. -this:
  7149. -
  7150. -     PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE
  7151. -
  7152. -when there is an appropriate source file, or like this:
  7153. -
  7154. -     PROGRAM: MESSAGE
  7155. -
  7156. -when there is no relevant source file.
  7157. -
  7158. -   In an interactive program (one that is reading commands from a
  7159. -terminal), it is better not to include the program name in an error
  7160. -message.  The place to indicate which program is running is in the
  7161. -prompt or with the screen layout.  (When the same program runs with
  7162. -input from a source other than a terminal, it is not interactive and
  7163. -would do best to print error messages using the noninteractive style.)
  7164. -
  7165. -   The string MESSAGE should not begin with a capital letter when it
  7166. -follows a program name and/or file name.  Also, it should not end with
  7167. -a period.
  7168. -
  7169. -   Error messages from interactive programs, and other messages such as
  7170. -usage messages, should start with a capital letter.  But they should not
  7171. -end with a period.
  7172. -
  7173. -
  7174. -File: standards.info,  Node: User Interfaces,  Next: Memory Usage,  Prev: Errors,  Up: Program Behavior
  7175. -
  7176. -Standards for Command Line Interfaces
  7177. -=====================================
  7178. -
  7179. -   Please don't make the behavior of a utility depend on the name used
  7180. -to invoke it.  It is useful sometimes to make a link to a utility with
  7181. -a different name, and that should not change what it does.
  7182. -
  7183. -   Instead, use a run time option or a compilation switch or both to
  7184. -select among the alternate behaviors.
  7185. -
  7186. -   Likewise, please don't make the behavior of the program depend on the
  7187. -type of output device it is used with.  Device independence is an
  7188. -important principle of the system's design; do not compromise it merely
  7189. -to save someone from typing an option now and then.
  7190. -
  7191. -   If you think one behavior is most useful when the output is to a
  7192. -terminal, and another is most useful when the output is a file or a
  7193. -pipe, then it is usually best to make the default behavior the one that
  7194. -is useful with output to a terminal, and have an option for the other
  7195. -behavior.
  7196. -
  7197. -   Compatibility requires certain programs to depend on the type of
  7198. -output device.  It would be disastrous if `ls' or `sh' did not do so in
  7199. -the way all users expect.  In some of these cases, we supplement the
  7200. -program with a preferred alternate version that does not depend on the
  7201. -output device type.  For example, we provide a `dir' program much like
  7202. -`ls' except that its default output format is always multi-column
  7203. -format.
  7204. -
  7205. -   It is a good idea to follow the POSIX guidelines for the
  7206. -command-line options of a program.  The easiest way to do this is to use
  7207. -`getopt' to parse them.  Note that the GNU version of `getopt' will
  7208. -normally permit options anywhere among the arguments unless the special
  7209. -argument `--' is used.  This is not what POSIX specifies; it is a GNU
  7210. -extension.
  7211. -
  7212. -   Please define long-named options that are equivalent to the
  7213. -single-letter Unix-style options.  We hope to make GNU more user
  7214. -friendly this way.  This is easy to do with the GNU function
  7215. -`getopt_long'.
  7216. -
  7217. -   One of the advantages of long-named options is that they can be
  7218. -consistent from program to program.  For example, users should be able
  7219. -to expect the "verbose" option of any GNU program which has one, to be
  7220. -spelled precisely `--verbose'.  To achieve this uniformity, look at the
  7221. -table of common long-option names when you choose the option names for
  7222. -your program.  The table appears below.
  7223. -
  7224. -   If you use names not already in the table, please send
  7225. -`gnu@prep.ai.mit.edu' a list of them, with their meanings, so we can
  7226. -update the table.
  7227. -
  7228. -   It is usually a good idea for file names given as ordinary arguments
  7229. -to be input files only; any output files would be specified using
  7230. -options (preferably `-o').  Even if you allow an output file name as an
  7231. -ordinary argument for compatibility, try to provide a suitable option
  7232. -as well.  This will lead to more consistency among GNU utilities, so
  7233. -that there are fewer idiosyncracies for users to remember.
  7234. -
  7235. -   Programs should support an option `--version' which prints the
  7236. -program's version number on standard output and exits successfully, and
  7237. -an option `--help' which prints option usage information on standard
  7238. -output and exits successfully.  These options should inhibit the normal
  7239. -function of the command; they should do nothing except print the
  7240. -requested information.
  7241. -
  7242. -   Here is the table of long options used by GNU programs.
  7243. -
  7244. -`after-date'
  7245. -     `-N' in `tar'.
  7246. -
  7247. -`all'
  7248. -     `-a' in `du', `ls', `nm', `stty', `uname', and `unexpand'.
  7249. -
  7250. -`all-text'
  7251. -     `-a' in `diff'.
  7252. -
  7253. -`almost-all'
  7254. -     `-A' in `ls'.
  7255. -
  7256. -`append'
  7257. -     `-a' in `etags', `tee', `time'; `-r' in `tar'.
  7258. -
  7259. -`archive'
  7260. -     `-a' in `cp'.
  7261. -
  7262. -`archive-name'
  7263. -     `-n' in `shar'.
  7264. -
  7265. -`arglength'
  7266. -     `-l' in `m4'.
  7267. -
  7268. -`ascii'
  7269. -     `-a' in `diff'.
  7270. -
  7271. -`assign'
  7272. -     `-v' in `gawk'.
  7273. -
  7274. -`assume-new'
  7275. -     `-W' in Make.
  7276. -
  7277. -`assume-old'
  7278. -     `-o' in Make.
  7279. -
  7280. -`auto-check'
  7281. -     `-a' in `recode'.
  7282. -
  7283. -`auto-pager'
  7284. -     `-a' in `wdiff'.
  7285. -
  7286. -`auto-reference'
  7287. -     `-A' in `ptx'.
  7288. -
  7289. -`avoid-wraps'
  7290. -     `-n' in `wdiff'.
  7291. -
  7292. -`backward-search'
  7293. -     `-B' in `ctags'.
  7294. -
  7295. -`basename'
  7296. -     `-f' in `shar'.
  7297. -
  7298. -`batch'
  7299. -     Used in GDB.
  7300. -
  7301. -`baud'
  7302. -     Used in GDB.
  7303. -
  7304. -`before'
  7305. -     `-b' in `tac'.
  7306. -
  7307. -`binary'
  7308. -     `-b' in `cpio' and `diff'.
  7309. -
  7310. -`bits-per-code'
  7311. -     `-b' in `shar'.
  7312. -
  7313. -`block-size'
  7314. -     Used in `cpio' and `tar'.
  7315. -
  7316. -`blocks'
  7317. -     `-b' in `head' and `tail'.
  7318. -
  7319. -`break-file'
  7320. -     `-b' in `ptx'.
  7321. -
  7322. -`brief'
  7323. -     Used in various programs to make output shorter.
  7324. -
  7325. -`bytes'
  7326. -     `-c' in `head', `split', and `tail'.
  7327. -
  7328. -`c++'
  7329. -     `-C' in `etags'.
  7330. -
  7331. -`catenate'
  7332. -     `-A' in `tar'.
  7333. -
  7334. -`cd'
  7335. -     Used in various programs to specify the directory to use.
  7336. -
  7337. -`changes'
  7338. -     `-c' in `chgrp' and `chown'.
  7339. -
  7340. -`classify'
  7341. -     `-F' in `ls'.
  7342. -
  7343. -`colons'
  7344. -     `-c' in `recode'.
  7345. -
  7346. -`command'
  7347. -     `-c' in `su'; `-x' in GDB.
  7348. -
  7349. -`compare'
  7350. -     `-d' in `tar'.
  7351. -
  7352. -`compat'
  7353. -     Used in `gawk'.
  7354. -
  7355. -`compress'
  7356. -     `-Z' in `tar' and `shar'.
  7357. -
  7358. -`concatenate'
  7359. -     `-A' in `tar'.
  7360. -
  7361. -`confirmation'
  7362. -     `-w' in `tar'.
  7363. -
  7364. -`context'
  7365. -     Used in `diff'.
  7366. -
  7367. -`copyleft'
  7368. -     `-W copyleft' in `gawk'.
  7369. -
  7370. -`copyright'
  7371. -     `-C' in `ptx', `recode', and `wdiff'; `-W copyright' in `gawk'.
  7372. -
  7373. -`core'
  7374. -     Used in GDB.
  7375. -
  7376. -`count'
  7377. -     `-q' in `who'.
  7378. -
  7379. -`count-links'
  7380. -     `-l' in `du'.
  7381. -
  7382. -`create'
  7383. -     Used in `tar' and `cpio'.
  7384. -
  7385. -`cut-mark'
  7386. -     `-c' in `shar'.
  7387. -
  7388. -`cxref'
  7389. -     `-x' in `ctags'.
  7390. -
  7391. -`date'
  7392. -     `-d' in `touch'.
  7393. -
  7394. -`debug'
  7395. -     `-d' in Make and `m4'; `-t' in Bison.
  7396. -
  7397. -`define'
  7398. -     `-D' in `m4'.
  7399. -
  7400. -`defines'
  7401. -     `-d' in Bison and `ctags'.
  7402. -
  7403. -`delete'
  7404. -     `-D' in `tar'.
  7405. -
  7406. -`dereference'
  7407. -     `-L' in `chgrp', `chown', `cpio', `du', `ls', and `tar'.
  7408. -
  7409. -`dereference-args'
  7410. -     `-D' in `du'.
  7411. -
  7412. -`diacritics'
  7413. -     `-d' in `recode'.
  7414. -
  7415. -`dictionary-order'
  7416. -     `-d' in `look'.
  7417. -
  7418. -`diff'
  7419. -     `-d' in `tar'.
  7420. -
  7421. -`digits'
  7422. -     `-n' in `csplit'.
  7423. -
  7424. -`directory'
  7425. -     Specify the directory to use, in various programs.  In `ls', it
  7426. -     means to show directories themselves rather than their contents.
  7427. -     In `rm' and `ln', it means to not treat links to directories
  7428. -     specially.
  7429. -
  7430. -`discard-all'
  7431. -     `-x' in `strip'.
  7432. -
  7433. -`discard-locals'
  7434. -     `-X' in `strip'.
  7435. -
  7436. -`dry-run'
  7437. -     `-n' in Make.
  7438. -
  7439. -`ed'
  7440. -     `-e' in `diff'.
  7441. -
  7442. -`elide-empty-files'
  7443. -     `-z' in `csplit'.
  7444. -
  7445. -`end-delete'
  7446. -     `-x' in `wdiff'.
  7447. -
  7448. -`end-insert'
  7449. -     `-z' in `wdiff'.
  7450. -
  7451. -`entire-new-file'
  7452. -     `-N' in `diff'.
  7453. -
  7454. -`environment-overrides'
  7455. -     `-e' in Make.
  7456. -
  7457. -`eof'
  7458. -     `-e' in `xargs'.
  7459. -
  7460. -`epoch'
  7461. -     Used in GDB.
  7462. -
  7463. -`error-limit'
  7464. -     Used in `makeinfo'.
  7465. -
  7466. -`error-output'
  7467. -     `-o' in `m4'.
  7468. -
  7469. -`escape'
  7470. -     `-b' in `ls'.
  7471. -
  7472. -`exclude-from'
  7473. -     `-X' in `tar'.
  7474. -
  7475. -`exec'
  7476. -     Used in GDB.
  7477. -
  7478. -`exit'
  7479. -     `-x' in `xargs'.
  7480. -
  7481. -`exit-0'
  7482. -     `-e' in `unshar'.
  7483. -
  7484. -`expand-tabs'
  7485. -     `-t' in `diff'.
  7486. -
  7487. -`expression'
  7488. -     `-e' in `sed'.
  7489. -
  7490. -`extern-only'
  7491. -     `-g' in `nm'.
  7492. -
  7493. -`extract'
  7494. -     `-i' in `cpio'; `-x' in `tar'.
  7495. -
  7496. -`faces'
  7497. -     `-f' in `finger'.
  7498. -
  7499. -`fast'
  7500. -     `-f' in `su'.
  7501. -
  7502. -`fatal-warnings'
  7503. -     `-E' in `m4'.
  7504. -
  7505. -`file'
  7506. -     `-f' in `info', `gawk', Make, `mt', and `tar'; `-n' in `sed'; `-r'
  7507. -     in `touch'.
  7508. -
  7509. -`field-separator'
  7510. -     `-F' in `gawk'.
  7511. -
  7512. -`file-prefix'
  7513. -     `-b' in Bison.
  7514. -
  7515. -`file-type'
  7516. -     `-F' in `ls'.
  7517. -
  7518. -`files-from'
  7519. -     `-T' in `tar'.
  7520. -
  7521. -`fill-column'
  7522. -     Used in `makeinfo'.
  7523. -
  7524. -`flag-truncation'
  7525. -     `-F' in `ptx'.
  7526. -
  7527. -`fixed-output-files'
  7528. -     `-y' in Bison.
  7529. -
  7530. -`follow'
  7531. -     `-f' in `tail'.
  7532. -
  7533. -`footnote-style'
  7534. -     Used in `makeinfo'.
  7535. -
  7536. -`force'
  7537. -     `-f' in `cp', `ln', `mv', and `rm'.
  7538. -
  7539. -`force-prefix'
  7540. -     `-F' in `shar'.
  7541. -
  7542. -`format'
  7543. -     Used in `ls', `time', and `ptx'.
  7544. -
  7545. -`freeze-state'
  7546. -     `-F' in `m4'.
  7547. -
  7548. -`fullname'
  7549. -     Used in GDB.
  7550. -
  7551. -`gap-size'
  7552. -     `-g' in `ptx'.
  7553. -
  7554. -`get'
  7555. -     `-x' in `tar'.
  7556. -
  7557. -`graphic'
  7558. -     `-i' in `ul'.
  7559. -
  7560. -`graphics'
  7561. -     `-g' in `recode'.
  7562. -
  7563. -`group'
  7564. -     `-g' in `install'.
  7565. -
  7566. -`gzip'
  7567. -     `-z' in `tar' and `shar'.
  7568. -
  7569. -`hashsize'
  7570. -     `-H' in `m4'.
  7571. -
  7572. -`header'
  7573. -     `-h' in `objdump' and `recode'
  7574. -
  7575. -`heading'
  7576. -     `-H' in `who'.
  7577. -
  7578. -`help'
  7579. -     Used to ask for brief usage information.
  7580. -
  7581. -`here-delimiter'
  7582. -     `-d' in `shar'.
  7583. -
  7584. -`hide-control-chars'
  7585. -     `-q' in `ls'.
  7586. -
  7587. -`idle'
  7588. -     `-u' in `who'.
  7589. -
  7590. -`ifdef'
  7591. -     `-D' in `diff'.
  7592. -
  7593. -`ignore'
  7594. -     `-I' in `ls'; `-x' in `recode'.
  7595. -
  7596. -`ignore-all-space'
  7597. -     `-w' in `diff'.
  7598. -
  7599. -`ignore-backups'
  7600. -     `-B' in `ls'.
  7601. -
  7602. -`ignore-blank-lines'
  7603. -     `-B' in `diff'.
  7604. -
  7605. -`ignore-case'
  7606. -     `-f' in `look' and `ptx'; `-i' in `diff' and `wdiff'.
  7607. -
  7608. -`ignore-errors'
  7609. -     `-i' in Make.
  7610. -
  7611. -`ignore-file'
  7612. -     `-i' in `ptx'.
  7613. -
  7614. -`ignore-indentation'
  7615. -     `-I' in `etags'.
  7616. -
  7617. -`ignore-init-file'
  7618. -     `-f' in Oleo.
  7619. -
  7620. -`ignore-interrupts'
  7621. -     `-i' in `tee'.
  7622. -
  7623. -`ignore-matching-lines'
  7624. -     `-I' in `diff'.
  7625. -
  7626. -`ignore-space-change'
  7627. -     `-b' in `diff'.
  7628. -
  7629. -`ignore-zeros'
  7630. -     `-i' in `tar'.
  7631. -
  7632. -`include'
  7633. -     `-i' in `etags'; `-I' in `m4'.
  7634. -
  7635. -`include-dir'
  7636. -     `-I' in Make.
  7637. -
  7638. -`incremental'
  7639. -     `-G' in `tar'.
  7640. -
  7641. -`info'
  7642. -     `-i', `-l', and `-m' in Finger.
  7643. -
  7644. -`initial'
  7645. -     `-i' in `expand'.
  7646. -
  7647. -`initial-tab'
  7648. -     `-T' in `diff'.
  7649. -
  7650. -`inode'
  7651. -     `-i' in `ls'.
  7652. -
  7653. -`interactive'
  7654. -     `-i' in `cp', `ln', `mv', `rm'; `-e' in `m4'; `-p' in `xargs';
  7655. -     `-w' in `tar'.
  7656. -
  7657. -`intermix-type'
  7658. -     `-p' in `shar'.
  7659. -
  7660. -`jobs'
  7661. -     `-j' in Make.
  7662. -
  7663. -`just-print'
  7664. -     `-n' in Make.
  7665. -
  7666. -`keep-going'
  7667. -     `-k' in Make.
  7668. -
  7669. -`keep-files'
  7670. -     `-k' in `csplit'.
  7671. -
  7672. -`kilobytes'
  7673. -     `-k' in `du' and `ls'.
  7674. -
  7675. -`language'
  7676. -     `-l' in `etags'.
  7677. -
  7678. -`less-mode'
  7679. -     `-l' in `wdiff'.
  7680. -
  7681. -`level-for-gzip'
  7682. -     `-g' in `shar'.
  7683. -
  7684. -`line-bytes'
  7685. -     `-C' in `split'.
  7686. -
  7687. -`lines'
  7688. -     Used in `split', `head', and `tail'.
  7689. -
  7690. -`link'
  7691. -     `-l' in `cpio'.
  7692. -
  7693. -`lint'
  7694. -`lint-old'
  7695. -     Used in `gawk'.
  7696. -
  7697. -`list'
  7698. -     `-t' in `cpio'; `-l' in `recode'.
  7699. -
  7700. -`list'
  7701. -     `-t' in `tar'.
  7702. -
  7703. -`literal'
  7704. -     `-N' in `ls'.
  7705. -
  7706. -`load-average'
  7707. -     `-l' in Make.
  7708. -
  7709. -`login'
  7710. -     Used in `su'.
  7711. -
  7712. -`machine'
  7713. -     No listing of which programs already use this; someone should
  7714. -     check to see if any actually do and tell `gnu@prep.ai.mit.edu'.
  7715. -
  7716. -`macro-name'
  7717. -     `-M' in `ptx'.
  7718. -
  7719. -`mail'
  7720. -     `-m' in `hello' and `uname'.
  7721. -
  7722. -`make-directories'
  7723. -     `-d' in `cpio'.
  7724. -
  7725. -`makefile'
  7726. -     `-f' in Make.
  7727. -
  7728. -`mapped'
  7729. -     Used in GDB.
  7730. -
  7731. -`max-args'
  7732. -     `-n' in `xargs'.
  7733. -
  7734. -`max-chars'
  7735. -     `-n' in `xargs'.
  7736. -
  7737. -`max-lines'
  7738. -     `-l' in `xargs'.
  7739. -
  7740. -`max-load'
  7741. -     `-l' in Make.
  7742. -
  7743. -`max-procs'
  7744. -     `-P' in `xargs'.
  7745. -
  7746. -`mesg'
  7747. -     `-T' in `who'.
  7748. -
  7749. -`message'
  7750. -     `-T' in `who'.
  7751. -
  7752. -`minimal'
  7753. -     `-d' in `diff'.
  7754. -
  7755. -`mixed-uuencode'
  7756. -     `-M' in `shar'.
  7757. -
  7758. -`mode'
  7759. -     `-m' in `install', `mkdir', and `mkfifo'.
  7760. -
  7761. -`modification-time'
  7762. -     `-m' in `tar'.
  7763. -
  7764. -`multi-volume'
  7765. -     `-M' in `tar'.
  7766. -
  7767. -`name-prefix'
  7768. -     `-a' in Bison.
  7769. -
  7770. -`nesting-limit'
  7771. -     `-L' in `m4'.
  7772. -
  7773. -`net-headers'
  7774. -     `-a' in `shar'.
  7775. -
  7776. -`new-file'
  7777. -     `-W' in Make.
  7778. -
  7779. -`no-builtin-rules'
  7780. -     `-r' in Make.
  7781. -
  7782. -`no-character-count'
  7783. -     `-w' in `shar'.
  7784. -
  7785. -`no-check-existing'
  7786. -     `-x' in `shar'.
  7787. -
  7788. -`no-common'
  7789. -     `-3' in `wdiff'.
  7790. -
  7791. -`no-create'
  7792. -     `-c' in `touch'.
  7793. -
  7794. -`no-defines'
  7795. -     `-D' in `etags'.
  7796. -
  7797. -`no-deleted'
  7798. -     `-1' in `wdiff'.
  7799. -
  7800. -`no-dereference'
  7801. -     `-d' in `cp'.
  7802. -
  7803. -`no-inserted'
  7804. -     `-2' in `wdiff'.
  7805. -
  7806. -`no-keep-going'
  7807. -     `-S' in Make.
  7808. -
  7809. -`no-lines'
  7810. -     `-l' in Bison.
  7811. -
  7812. -`no-piping'
  7813. -     `-P' in `shar'.
  7814. -
  7815. -`no-prof'
  7816. -     `-e' in `gprof'.
  7817. -
  7818. -`no-regex'
  7819. -     `-R' in `etags'.
  7820. -
  7821. -`no-sort'
  7822. -     `-p' in `nm'.
  7823. -
  7824. -`no-split'
  7825. -     Used in `makeinfo'.
  7826. -
  7827. -`no-static'
  7828. -     `-a' in `gprof'.
  7829. -
  7830. -`no-time'
  7831. -     `-E' in `gprof'.
  7832. -
  7833. -`no-timestamp'
  7834. -     `-m' in `shar'.
  7835. -
  7836. -`no-validate'
  7837. -     Used in `makeinfo'.
  7838. -
  7839. -`no-warn'
  7840. -     Used in various programs to inhibit warnings.
  7841. -
  7842. -`node'
  7843. -     `-n' in `info'.
  7844. -
  7845. -`nodename'
  7846. -     `-n' in `uname'.
  7847. -
  7848. -`nonmatching'
  7849. -     `-f' in `cpio'.
  7850. -
  7851. -`nstuff'
  7852. -     `-n' in `objdump'.
  7853. -
  7854. -`null'
  7855. -     `-0' in `xargs'.
  7856. -
  7857. -`number'
  7858. -     `-n' in `cat'.
  7859. -
  7860. -`number-nonblank'
  7861. -     `-b' in `cat'.
  7862. -
  7863. -`numeric-sort'
  7864. -     `-n' in `nm'.
  7865. -
  7866. -`numeric-uid-gid'
  7867. -     `-n' in `cpio' and `ls'.
  7868. -
  7869. -`nx'
  7870. -     Used in GDB.
  7871. -
  7872. -`old-archive'
  7873. -     `-o' in `tar'.
  7874. -
  7875. -`old-file'
  7876. -     `-o' in Make.
  7877. -
  7878. -`one-file-system'
  7879. -     `-l' in `tar', `cp', and `du'.
  7880. -
  7881. -`only-file'
  7882. -     `-o' in `ptx'.
  7883. -
  7884. -`only-prof'
  7885. -     `-f' in `gprof'.
  7886. -
  7887. -`only-time'
  7888. -     `-F' in `gprof'.
  7889. -
  7890. -`output'
  7891. -     In various programs, specify the output file name.
  7892. -
  7893. -`output-prefix'
  7894. -     `-o' in `shar'.
  7895. -
  7896. -`override'
  7897. -     `-o' in `rm'.
  7898. -
  7899. -`overwrite'
  7900. -     `-c' in `unshar'.
  7901. -
  7902. -`owner'
  7903. -     `-o' in `install'.
  7904. -
  7905. -`paginate'
  7906. -     `-l' in `diff'.
  7907. -
  7908. -`paragraph-indent'
  7909. -     Used in `makeinfo'.
  7910. -
  7911. -`parents'
  7912. -     `-p' in `mkdir' and `rmdir'.
  7913. -
  7914. -`pass-all'
  7915. -     `-p' in `ul'.
  7916. -
  7917. -`pass-through'
  7918. -     `-p' in `cpio'.
  7919. -
  7920. -`port'
  7921. -     `-P' in `finger'.
  7922. -
  7923. -`portability'
  7924. -     `-c' in `cpio' and `tar'.
  7925. -
  7926. -`posix'
  7927. -     Used in `gawk'.
  7928. -
  7929. -`prefix-builtins'
  7930. -     `-P' in `m4'.
  7931. -
  7932. -`prefix'
  7933. -     `-f' in `csplit'.
  7934. -
  7935. -`preserve'
  7936. -     Used in `tar' and `cp'.
  7937. -
  7938. -`preserve-environment'
  7939. -     `-p' in `su'.
  7940. -
  7941. -`preserve-modification-time'
  7942. -     `-m' in `cpio'.
  7943. -
  7944. -`preserve-order'
  7945. -     `-s' in `tar'.
  7946. -
  7947. -`preserve-permissions'
  7948. -     `-p' in `tar'.
  7949. -
  7950. -`print'
  7951. -     `-l' in `diff'.
  7952. -
  7953. -`print-chars'
  7954. -     `-L' in `cmp'.
  7955. -
  7956. -`print-data-base'
  7957. -     `-p' in Make.
  7958. -
  7959. -`print-directory'
  7960. -     `-w' in Make.
  7961. -
  7962. -`print-file-name'
  7963. -     `-o' in `nm'.
  7964. -
  7965. -`print-symdefs'
  7966. -     `-s' in `nm'.
  7967. -
  7968. -`printer'
  7969. -     `-p' in `wdiff'.
  7970. -
  7971. -`prompt'
  7972. -     `-p' in `ed'.
  7973. -
  7974. -`query-user'
  7975. -     `-X' in `shar'.
  7976. -
  7977. -`question'
  7978. -     `-q' in Make.
  7979. -
  7980. -`quiet'
  7981. -     Used in many programs to inhibit the usual output.  *Note:* every
  7982. -     program accepting `--quiet' should accept `--silent' as a synonym.
  7983. -
  7984. -`quiet-unshar'
  7985. -     `-Q' in `shar'
  7986. -
  7987. -`quote-name'
  7988. -     `-Q' in `ls'.
  7989. -
  7990. -`rcs'
  7991. -     `-n' in `diff'.
  7992. -
  7993. -`re-interval'
  7994. -     Used in `gawk'.
  7995. -
  7996. -`read-full-blocks'
  7997. -     `-B' in `tar'.
  7998. -
  7999. -`readnow'
  8000. -     Used in GDB.
  8001. -
  8002. -`recon'
  8003. -     `-n' in Make.
  8004. -
  8005. -`record-number'
  8006. -     `-R' in `tar'.
  8007. -
  8008. -`recursive'
  8009. -     Used in `chgrp', `chown', `cp', `ls', `diff', and `rm'.
  8010. -
  8011. -`reference-limit'
  8012. -     Used in `makeinfo'.
  8013. -
  8014. -`references'
  8015. -     `-r' in `ptx'.
  8016. -
  8017. -`regex'
  8018. -     `-r' in `tac' and `etags'.
  8019. -
  8020. -`release'
  8021. -     `-r' in `uname'.
  8022. -
  8023. -`reload-state'
  8024. -     `-R' in `m4'.
  8025. -
  8026. -`relocation'
  8027. -     `-r' in `objdump'.
  8028. -
  8029. -`rename'
  8030. -     `-r' in `cpio'.
  8031. -
  8032. -`replace'
  8033. -     `-i' in `xargs'.
  8034. -
  8035. -`report-identical-files'
  8036. -     `-s' in `diff'.
  8037. -
  8038. -`reset-access-time'
  8039. -     `-a' in `cpio'.
  8040. -
  8041. -`reverse'
  8042. -     `-r' in `ls' and `nm'.
  8043. -
  8044. -`reversed-ed'
  8045. -     `-f' in `diff'.
  8046. -
  8047. -`right-side-defs'
  8048. -     `-R' in `ptx'.
  8049. -
  8050. -`same-order'
  8051. -     `-s' in `tar'.
  8052. -
  8053. -`same-permissions'
  8054. -     `-p' in `tar'.
  8055. -
  8056. -`save'
  8057. -     `-g' in `stty'.
  8058. -
  8059. -`se'
  8060. -     Used in GDB.
  8061. -
  8062. -`sentence-regexp'
  8063. -     `-S' in `ptx'.
  8064. -
  8065. -`separate-dirs'
  8066. -     `-S' in `du'.
  8067. -
  8068. -`separator'
  8069. -     `-s' in `tac'.
  8070. -
  8071. -`sequence'
  8072. -     Used by `recode' to chose files or pipes for sequencing passes.
  8073. -
  8074. -`shell'
  8075. -     `-s' in `su'.
  8076. -
  8077. -`show-all'
  8078. -     `-A' in `cat'.
  8079. -
  8080. -`show-c-function'
  8081. -     `-p' in `diff'.
  8082. -
  8083. -`show-ends'
  8084. -     `-E' in `cat'.
  8085. -
  8086. -`show-function-line'
  8087. -     `-F' in `diff'.
  8088. -
  8089. -`show-tabs'
  8090. -     `-T' in `cat'.
  8091. -
  8092. -`silent'
  8093. -     Used in many programs to inhibit the usual output.  *Note:* every
  8094. -     program accepting `--silent' should accept `--quiet' as a synonym.
  8095. -
  8096. -`size'
  8097. -     `-s' in `ls'.
  8098. -
  8099. -`sort'
  8100. -     Used in `ls'.
  8101. -
  8102. -`source'
  8103. -     `-W source' in `gawk'.
  8104. -
  8105. -`sparse'
  8106. -     `-S' in `tar'.
  8107. -
  8108. -`speed-large-files'
  8109. -     `-H' in `diff'.
  8110. -
  8111. -`split-at'
  8112. -     `-E' in `unshar'.
  8113. -
  8114. -`split-size-limit'
  8115. -     `-L' in `shar'.
  8116. -
  8117. -`squeeze-blank'
  8118. -     `-s' in `cat'.
  8119. -
  8120. -`start-delete'
  8121. -     `-w' in `wdiff'.
  8122. -
  8123. -`start-insert'
  8124. -     `-y' in `wdiff'.
  8125. -
  8126. -`starting-file'
  8127. -     Used in `tar' and `diff' to specify which file within a directory
  8128. -     to start processing with.
  8129. -
  8130. -`statistics'
  8131. -     `-s' in `wdiff'.
  8132. -
  8133. -`stdin-file-list'
  8134. -     `-S' in `shar'.
  8135. -
  8136. -`stop'
  8137. -     `-S' in Make.
  8138. -
  8139. -`strict'
  8140. -     `-s' in `recode'.
  8141. -
  8142. -`strip'
  8143. -     `-s' in `install'.
  8144. -
  8145. -`strip-all'
  8146. -     `-s' in `strip'.
  8147. -
  8148. -`strip-debug'
  8149. -     `-S' in `strip'.
  8150. -
  8151. -`submitter'
  8152. -     `-s' in `shar'.
  8153. -
  8154. -`suffix'
  8155. -     `-S' in `cp', `ln', `mv'.
  8156. -
  8157. -`suffix-format'
  8158. -     `-b' in `csplit'.
  8159. -
  8160. -`sum'
  8161. -     `-s' in `gprof'.
  8162. -
  8163. -`summarize'
  8164. -     `-s' in `du'.
  8165. -
  8166. -`symbolic'
  8167. -     `-s' in `ln'.
  8168. -
  8169. -`symbols'
  8170. -     Used in GDB and `objdump'.
  8171. -
  8172. -`synclines'
  8173. -     `-s' in `m4'.
  8174. -
  8175. -`sysname'
  8176. -     `-s' in `uname'.
  8177. -
  8178. -`tabs'
  8179. -     `-t' in `expand' and `unexpand'.
  8180. -
  8181. -`tabsize'
  8182. -     `-T' in `ls'.
  8183. -
  8184. -`terminal'
  8185. -     `-T' in `tput' and `ul'.  `-t' in `wdiff'.
  8186. -
  8187. -`text'
  8188. -     `-a' in `diff'.
  8189. -
  8190. -`text-files'
  8191. -     `-T' in `shar'.
  8192. -
  8193. -`time'
  8194. -     Used in `ls' and `touch'.
  8195. -
  8196. -`to-stdout'
  8197. -     `-O' in `tar'.
  8198. -
  8199. -`total'
  8200. -     `-c' in `du'.
  8201. -
  8202. -`touch'
  8203. -     `-t' in Make, `ranlib', and `recode'.
  8204. -
  8205. -`trace'
  8206. -     `-t' in `m4'.
  8207. -
  8208. -`traditional'
  8209. -     `-t' in `hello'; `-W traditional' in `gawk'; `-G' in `ed', `m4',
  8210. -     and `ptx'.
  8211. -
  8212. -`tty'
  8213. -     Used in GDB.
  8214. -
  8215. -`typedefs'
  8216. -     `-t' in `ctags'.
  8217. -
  8218. -`typedefs-and-c++'
  8219. -     `-T' in `ctags'.
  8220. -
  8221. -`typeset-mode'
  8222. -     `-t' in `ptx'.
  8223. -
  8224. -`uncompress'
  8225. -     `-z' in `tar'.
  8226. -
  8227. -`unconditional'
  8228. -     `-u' in `cpio'.
  8229. -
  8230. -`undefine'
  8231. -     `-U' in `m4'.
  8232. -
  8233. -`undefined-only'
  8234. -     `-u' in `nm'.
  8235. -
  8236. -`update'
  8237. -     `-u' in `cp', `ctags', `mv', `tar'.
  8238. -
  8239. -`usage'
  8240. -     Used in `gawk'; same as `--help'.
  8241. -
  8242. -`uuencode'
  8243. -     `-B' in `shar'.
  8244. -
  8245. -`vanilla-operation'
  8246. -     `-V' in `shar'.
  8247. -
  8248. -`verbose'
  8249. -     Print more information about progress.  Many programs support this.
  8250. -
  8251. -`verify'
  8252. -     `-W' in `tar'.
  8253. -
  8254. -`version'
  8255. -     Print the version number.
  8256. -
  8257. -`version-control'
  8258. -     `-V' in `cp', `ln', `mv'.
  8259. -
  8260. -`vgrind'
  8261. -     `-v' in `ctags'.
  8262. -
  8263. -`volume'
  8264. -     `-V' in `tar'.
  8265. -
  8266. -`what-if'
  8267. -     `-W' in Make.
  8268. -
  8269. -`whole-size-limit'
  8270. -     `-l' in `shar'.
  8271. -
  8272. -`width'
  8273. -     `-w' in `ls' and `ptx'.
  8274. -
  8275. -`word-regexp'
  8276. -     `-W' in `ptx'.
  8277. -
  8278. -`writable'
  8279. -     `-T' in `who'.
  8280. -
  8281. -`zeros'
  8282. -     `-z' in `gprof'.
  8283. -
  8284. -
  8285. -File: standards.info,  Node: Memory Usage,  Prev: User Interfaces,  Up: Program Behavior
  8286. -
  8287. -Memory Usage
  8288. -============
  8289. -
  8290. -   If it typically uses just a few meg of memory, don't bother making
  8291. -any effort to reduce memory usage.  For example, if it is impractical
  8292. -for other reasons to operate on files more than a few meg long, it is
  8293. -reasonable to read entire input files into core to operate on them.
  8294. -
  8295. -   However, for programs such as `cat' or `tail', that can usefully
  8296. -operate on very large files, it is important to avoid using a technique
  8297. -that would artificially limit the size of files it can handle.  If a
  8298. -program works by lines and could be applied to arbitrary user-supplied
  8299. -input files, it should keep only a line in memory, because this is not
  8300. -very hard and users will want to be able to operate on input files that
  8301. -are bigger than will fit in core all at once.
  8302. -
  8303. -   If your program creates complicated data structures, just make them
  8304. -in core and give a fatal error if `malloc' returns zero.
  8305. -
  8306. -
  8307. -File: standards.info,  Node: Writing C,  Next: Documentation,  Prev: Program Behavior,  Up: Top
  8308. -
  8309. -Making The Best Use of C
  8310. -************************
  8311. -
  8312. -   This node provides advice on how best to use the C language when
  8313. -writing GNU software.
  8314. -
  8315. -* Menu:
  8316. -
  8317. -* Formatting::            Formatting Your Source Code
  8318. -* Comments::            Commenting Your Work
  8319. -* Syntactic Conventions::    Clean Use of C Constructs
  8320. -* Names::            Naming Variables and Functions
  8321. -* System Portability::        Portability between different operating systems
  8322. -* CPU Portability::             Supporting the range of CPU types
  8323. -* System Functions::            Portability and "standard" library functions
  8324. -
  8325. -
  8326. -File: standards.info,  Node: Formatting,  Next: Comments,  Up: Writing C
  8327. -
  8328. -Formatting Your Source Code
  8329. -===========================
  8330. -
  8331. -   It is important to put the open-brace that starts the body of a C
  8332. -function in column zero, and avoid putting any other open-brace or
  8333. -open-parenthesis or open-bracket in column zero.  Several tools look
  8334. -for open-braces in column zero to find the beginnings of C functions.
  8335. -These tools will not work on code not formatted that way.
  8336. -
  8337. -   It is also important for function definitions to start the name of
  8338. -the function in column zero.  This helps people to search for function
  8339. -definitions, and may also help certain tools recognize them.  Thus, the
  8340. -proper format is this:
  8341. -
  8342. -     static char *
  8343. -     concat (s1, s2)        /* Name starts in column zero here */
  8344. -          char *s1, *s2;
  8345. -     {                     /* Open brace in column zero here */
  8346. -       ...
  8347. -     }
  8348. -
  8349. -or, if you want to use ANSI C, format the definition like this:
  8350. -
  8351. -     static char *
  8352. -     concat (char *s1, char *s2)
  8353. -     {
  8354. -       ...
  8355. -     }
  8356. -
  8357. -   In ANSI C, if the arguments don't fit nicely on one line, split it
  8358. -like this:
  8359. -
  8360. -     int
  8361. -     lots_of_args (int an_integer, long a_long, short a_short,
  8362. -                   double a_double, float a_float)
  8363. -     ...
  8364. -
  8365. -   For the body of the function, we prefer code formatted like this:
  8366. -
  8367. -     if (x < foo (y, z))
  8368. -       haha = bar[4] + 5;
  8369. -     else
  8370. -       {
  8371. -         while (z)
  8372. -           {
  8373. -             haha += foo (z, z);
  8374. -             z--;
  8375. -           }
  8376. -         return ++x + bar ();
  8377. -       }
  8378. -
  8379. -   We find it easier to read a program when it has spaces before the
  8380. -open-parentheses and after the commas.  Especially after the commas.
  8381. -
  8382. -   When you split an expression into multiple lines, split it before an
  8383. -operator, not after one.  Here is the right way:
  8384. -
  8385. -     if (foo_this_is_long && bar > win (x, y, z)
  8386. -         && remaining_condition)
  8387. -
  8388. -   Try to avoid having two operators of different precedence at the same
  8389. -level of indentation.  For example, don't write this:
  8390. -
  8391. -     mode = (inmode[j] == VOIDmode
  8392. -             || GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])
  8393. -             ? outmode[j] : inmode[j]);
  8394. -
  8395. -   Instead, use extra parentheses so that the indentation shows the
  8396. -nesting:
  8397. -
  8398. -     mode = ((inmode[j] == VOIDmode
  8399. -              || (GET_MODE_SIZE (outmode[j]) > GET_MODE_SIZE (inmode[j])))
  8400. -             ? outmode[j] : inmode[j]);
  8401. -
  8402. -   Insert extra parentheses so that Emacs will indent the code properly.
  8403. -For example, the following indentation looks nice if you do it by hand,
  8404. -but Emacs would mess it up:
  8405. -
  8406. -     v = rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
  8407. -         + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000;
  8408. -
  8409. -   But adding a set of parentheses solves the problem:
  8410. -
  8411. -     v = (rup->ru_utime.tv_sec*1000 + rup->ru_utime.tv_usec/1000
  8412. -          + rup->ru_stime.tv_sec*1000 + rup->ru_stime.tv_usec/1000);
  8413. -
  8414. -   Format do-while statements like this:
  8415. -
  8416. -     do
  8417. -       {
  8418. -         a = foo (a);
  8419. -       }
  8420. -     while (a > 0);
  8421. -
  8422. -   Please use formfeed characters (control-L) to divide the program into
  8423. -pages at logical places (but not within a function).  It does not matter
  8424. -just how long the pages are, since they do not have to fit on a printed
  8425. -page.  The formfeeds should appear alone on lines by themselves.
  8426. -
  8427. -
  8428. -File: standards.info,  Node: Comments,  Next: Syntactic Conventions,  Prev: Formatting,  Up: Writing C
  8429. -
  8430. -Commenting Your Work
  8431. -====================
  8432. -
  8433. -   Every program should start with a comment saying briefly what it is
  8434. -for.  Example: `fmt - filter for simple filling of text'.
  8435. -
  8436. -   Please put a comment on each function saying what the function does,
  8437. -what sorts of arguments it gets, and what the possible values of
  8438. -arguments mean and are used for.  It is not necessary to duplicate in
  8439. -words the meaning of the C argument declarations, if a C type is being
  8440. -used in its customary fashion.  If there is anything nonstandard about
  8441. -its use (such as an argument of type `char *' which is really the
  8442. -address of the second character of a string, not the first), or any
  8443. -possible values that would not work the way one would expect (such as,
  8444. -that strings containing newlines are not guaranteed to work), be sure
  8445. -to say so.
  8446. -
  8447. -   Also explain the significance of the return value, if there is one.
  8448. -
  8449. -   Please put two spaces after the end of a sentence in your comments,
  8450. -so that the Emacs sentence commands will work.  Also, please write
  8451. -complete sentences and capitalize the first word.  If a lower-case
  8452. -identifier comes at the beginning of a sentence, don't capitalize it!
  8453. -Changing the spelling makes it a different identifier.  If you don't
  8454. -like starting a sentence with a lower case letter, write the sentence
  8455. -differently (e.g., "The identifier lower-case is ...").
  8456. -
  8457. -   The comment on a function is much clearer if you use the argument
  8458. -names to speak about the argument values.  The variable name itself
  8459. -should be lower case, but write it in upper case when you are speaking
  8460. -about the value rather than the variable itself.  Thus, "the inode
  8461. -number NODE_NUM" rather than "an inode".
  8462. -
  8463. -   There is usually no purpose in restating the name of the function in
  8464. -the comment before it, because the reader can see that for himself.
  8465. -There might be an exception when the comment is so long that the
  8466. -function itself would be off the bottom of the screen.
  8467. -
  8468. -   There should be a comment on each static variable as well, like this:
  8469. -
  8470. -     /* Nonzero means truncate lines in the display;
  8471. -        zero means continue them.  */
  8472. -     int truncate_lines;
  8473. -
  8474. -   Every `#endif' should have a comment, except in the case of short
  8475. -conditionals (just a few lines) that are not nested.  The comment should
  8476. -state the condition of the conditional that is ending, *including its
  8477. -sense*.  `#else' should have a comment describing the condition *and
  8478. -sense* of the code that follows.  For example:
  8479. -
  8480. -     #ifdef foo
  8481. -       ...
  8482. -     #else /* not foo */
  8483. -       ...
  8484. -     #endif /* not foo */
  8485. -
  8486. -but, by contrast, write the comments this way for a `#ifndef':
  8487. -
  8488. -     #ifndef foo
  8489. -       ...
  8490. -     #else /* foo */
  8491. -       ...
  8492. -     #endif /* foo */
  8493. -
  8494. -
  8495. -File: standards.info,  Node: Syntactic Conventions,  Next: Names,  Prev: Comments,  Up: Writing C
  8496. -
  8497. -Clean Use of C Constructs
  8498. -=========================
  8499. -
  8500. -   Please explicitly declare all arguments to functions.  Don't omit
  8501. -them just because they are `int's.
  8502. -
  8503. -   Declarations of external functions and functions to appear later in
  8504. -the source file should all go in one place near the beginning of the
  8505. -file (somewhere before the first function definition in the file), or
  8506. -else should go in a header file.  Don't put `extern' declarations inside
  8507. -functions.
  8508. -
  8509. -   It used to be common practice to use the same local variables (with
  8510. -names like `tem') over and over for different values within one
  8511. -function.  Instead of doing this, it is better declare a separate local
  8512. -variable for each distinct purpose, and give it a name which is
  8513. -meaningful.  This not only makes programs easier to understand, it also
  8514. -facilitates optimization by good compilers.  You can also move the
  8515. -declaration of each local variable into the smallest scope that includes
  8516. -all its uses.  This makes the program even cleaner.
  8517. -
  8518. -   Don't use local variables or parameters that shadow global
  8519. -identifiers.
  8520. -
  8521. -   Don't declare multiple variables in one declaration that spans lines.
  8522. -Start a new declaration on each line, instead.  For example, instead of
  8523. -this:
  8524. -
  8525. -     int    foo,
  8526. -            bar;
  8527. -
  8528. -write either this:
  8529. -
  8530. -     int foo, bar;
  8531. -
  8532. -or this:
  8533. -
  8534. -     int foo;
  8535. -     int bar;
  8536. -
  8537. -(If they are global variables, each should have a comment preceding it
  8538. -anyway.)
  8539. -
  8540. -   When you have an `if'-`else' statement nested in another `if'
  8541. -statement, always put braces around the `if'-`else'.  Thus, never write
  8542. -like this:
  8543. -
  8544. -     if (foo)
  8545. -       if (bar)
  8546. -         win ();
  8547. -       else
  8548. -         lose ();
  8549. -
  8550. -always like this:
  8551. -
  8552. -     if (foo)
  8553. -       {
  8554. -         if (bar)
  8555. -           win ();
  8556. -         else
  8557. -           lose ();
  8558. -       }
  8559. -
  8560. -   If you have an `if' statement nested inside of an `else' statement,
  8561. -either write `else if' on one line, like this,
  8562. -
  8563. -     if (foo)
  8564. -       ...
  8565. -     else if (bar)
  8566. -       ...
  8567. -
  8568. -with its `then'-part indented like the preceding `then'-part, or write
  8569. -the nested `if' within braces like this:
  8570. -
  8571. -     if (foo)
  8572. -       ...
  8573. -     else
  8574. -       {
  8575. -         if (bar)
  8576. -           ...
  8577. -       }
  8578. -
  8579. -   Don't declare both a structure tag and variables or typedefs in the
  8580. -same declaration.  Instead, declare the structure tag separately and
  8581. -then use it to declare the variables or typedefs.
  8582. -
  8583. -   Try to avoid assignments inside `if'-conditions.  For example, don't
  8584. -write this:
  8585. -
  8586. -     if ((foo = (char *) malloc (sizeof *foo)) == 0)
  8587. -       fatal ("virtual memory exhausted");
  8588. -
  8589. -instead, write this:
  8590. -
  8591. -     foo = (char *) malloc (sizeof *foo);
  8592. -     if (foo == 0)
  8593. -       fatal ("virtual memory exhausted");
  8594. -
  8595. -   Don't make the program ugly to placate `lint'.  Please don't insert
  8596. -any casts to `void'.  Zero without a cast is perfectly fine as a null
  8597. -pointer constant.
  8598. -
  8599. -
  8600. -File: standards.info,  Node: Names,  Next: System Portability,  Prev: Syntactic Conventions,  Up: Writing C
  8601. -
  8602. -Naming Variables and Functions
  8603. -==============================
  8604. -
  8605. -   Please use underscores to separate words in a name, so that the Emacs
  8606. -word commands can be useful within them.  Stick to lower case; reserve
  8607. -upper case for macros and `enum' constants, and for name-prefixes that
  8608. -follow a uniform convention.
  8609. -
  8610. -   For example, you should use names like `ignore_space_change_flag';
  8611. -don't use names like `iCantReadThis'.
  8612. -
  8613. -   Variables that indicate whether command-line options have been
  8614. -specified should be named after the meaning of the option, not after
  8615. -the option-letter.  A comment should state both the exact meaning of
  8616. -the option and its letter.  For example,
  8617. -
  8618. -     /* Ignore changes in horizontal whitespace (-b).  */
  8619. -     int ignore_space_change_flag;
  8620. -
  8621. -   When you want to define names with constant integer values, use
  8622. -`enum' rather than `#define'.  GDB knows about enumeration constants.
  8623. -
  8624. -   Use file names of 14 characters or less, to avoid creating gratuitous
  8625. -problems on older System V systems.  You can use the program `doschk'
  8626. -to test for this.  `doschk' also tests for potential name conflicts if
  8627. -the files were loaded onto an MS-DOS file system--something you may or
  8628. -may not care about.
  8629. -
  8630. -
  8631. -File: standards.info,  Node: System Portability,  Next: CPU Portability,  Prev: Names,  Up: Writing C
  8632. -
  8633. -Portability between System Types
  8634. -================================
  8635. -
  8636. -   In the Unix world, "portability" refers to porting to different Unix
  8637. -versions.  For a GNU program, this kind of portability is desirable, but
  8638. -not paramount.
  8639. -
  8640. -   The primary purpose of GNU software is to run on top of the GNU
  8641. -kernel, compiled with the GNU C compiler, on various types of CPU.  The
  8642. -amount and kinds of variation among GNU systems on different CPUs will
  8643. -be comparable to the variation among Linux-based GNU systems or among
  8644. -BSD systems today.  So the kinds of portability that are absolutely
  8645. -necessary are quite limited.
  8646. -
  8647. -   But many users do run GNU software on non-GNU Unix or Unix-like
  8648. -systems.  So supporting a variety of Unix-like systems is desirable,
  8649. -although not paramount.
  8650. -
  8651. -   The easiest way to achieve portability to most Unix-like systems is
  8652. -to use Autoconf.  It's unlikely that your program needs to know more
  8653. -information about the host platform than Autoconf can provide, simply
  8654. -because most of the programs that need such knowledge have already been
  8655. -written.
  8656. -
  8657. -   Avoid using the format of semi-internal data bases (e.g.,
  8658. -directories) when there is a higher-level alternative (`readdir').
  8659. -
  8660. -   As for systems that are not like Unix, such as MSDOS, Windows, the
  8661. -Macintosh, VMS, and MVS, supporting them is usually so much work that it
  8662. -is better if you don't.
  8663. -
  8664. -   The planned GNU kernel is not finished yet, but you can tell which
  8665. -facilities it will provide by looking at the GNU C Library Manual.  The
  8666. -GNU kernel is based on Mach, so the features of Mach will also be
  8667. -available.  However, if you use Mach features, you'll probably have
  8668. -trouble debugging your program today.
  8669. -
  8670. -
  8671. -File: standards.info,  Node: CPU Portability,  Next: System Functions,  Prev: System Portability,  Up: Writing C
  8672. -
  8673. -Portability between CPUs
  8674. -========================
  8675. -
  8676. -   Even GNU systems will differ because of differences among CPU
  8677. -types--for example, difference in byte ordering and alignment
  8678. -requirements.  It is absolutely essential to handle these differences.
  8679. -However, don't make any effort to cater to the possibility that an
  8680. -`int' will be less than 32 bits.  We don't support 16-bit machines in
  8681. -GNU.
  8682. -
  8683. -   Don't assume that the address of an `int' object is also the address
  8684. -of its least-significant byte.  This is false on big-endian machines.
  8685. -Thus, don't make the following mistake:
  8686. -
  8687. -     int c;
  8688. -     ...
  8689. -     while ((c = getchar()) != EOF)
  8690. -       write(file_descriptor, &c, 1);
  8691. -
  8692. -   When calling functions, you need not worry about the difference
  8693. -between pointers of various types, or between pointers an integers.  On
  8694. -most machines, there's no difference anyway.  As for the few machines
  8695. -where there is a difference, all of them support ANSI C, so you can use
  8696. -prototypes (conditionalized to be active only in ANSI C) to make the
  8697. -code work on those systems.
  8698. -
  8699. -   In certain cases, it is ok to pass integer and pointer arguments
  8700. -indiscriminately to the same function, and use no prototype on any
  8701. -system.  For example, many GNU programs have error-reporting functions
  8702. -that pass their arguments along to `printf' and friends:
  8703. -
  8704. -     error (s, a1, a2, a3)
  8705. -          char *s;
  8706. -          int a1, a2, a3;
  8707. -     {
  8708. -       fprintf (stderr, "error: ");
  8709. -       fprintf (stderr, s, a1, a2, a3);
  8710. -     }
  8711. -
  8712. -In practice, this works on all machines, and it is much simpler than any
  8713. -"correct" alternative.
  8714. -
  8715. -   However, avoid casting pointers to integers unless you really need
  8716. -to.  These assumptions really reduce portability, and in most programs
  8717. -they are easy to avoid.  In the cases where casting pointers to
  8718. -integers is essential--such as, a Lisp interpreter which stores type
  8719. -information as well as an address in one word--it is ok to do so, but
  8720. -you'll have to make explicit provisions to handle different word sizes.
  8721. -
  8722. -
  8723. -File: standards.info,  Node: System Functions,  Prev: CPU Portability,  Up: Writing C
  8724. -
  8725. -Calling System Functions
  8726. -========================
  8727. -
  8728. -   C implementations differ substantially.  ANSI C reduces but does not
  8729. -eliminate the incompatibilities; meanwhile, many users wish to compile
  8730. -GNU software with pre-ANSI compilers.  This chapter gives
  8731. -recommendations for how to use the more or less standard C library
  8732. -functions to avoid unnecessary loss of portability.
  8733. -
  8734. -   * Don't use the value of `sprintf'.  It returns the number of
  8735. -     characters written on some systems, but not on all systems.
  8736. -
  8737. -   * Don't declare system functions explicitly.
  8738. -
  8739. -     Almost any declaration for a system function is wrong on some
  8740. -     system.  To minimize conflicts, leave it to the system header
  8741. -     files to declare system functions.  If the headers don't declare a
  8742. -     function, let it remain undeclared.
  8743. -
  8744. -     While it may seem unclean to use a function without declaring it,
  8745. -     in practice this works fine for most system library functions on
  8746. -     the systems where this really happens; thus, the disadvantage is
  8747. -     only theoretical.  By contrast, actual declarations have
  8748. -     frequently caused actual conflicts.
  8749. -
  8750. -   * If you must declare a system function, don't specify the argument
  8751. -     types.  Use an old-style declaration, not an ANSI prototype.  The
  8752. -     more you specify about the function, the more likely a conflict.
  8753. -
  8754. -   * In particular, don't unconditionally declare `malloc' or `realloc'.
  8755. -
  8756. -     Most GNU programs use those functions just once, in functions
  8757. -     conventionally named `xmalloc' and `xrealloc'.  These functions
  8758. -     call `malloc' and `realloc', respectively, and check the results.
  8759. -
  8760. -     Because `xmalloc' and `xrealloc' are defined in your program, you
  8761. -     can declare them in other files without any risk of type conflict.
  8762. -
  8763. -     On most systems, `int' is the same length as a pointer; thus, the
  8764. -     calls to `malloc' and `realloc' work fine.  For the few
  8765. -     exceptional systems (mostly 64-bit machines), you can use
  8766. -     *conditionalized* declarations of `malloc' and `realloc'--or put
  8767. -     these declarations in configuration files specific to those
  8768. -     systems.
  8769. -
  8770. -   * The string functions require special treatment.  Some Unix systems
  8771. -     have a header file `string.h'; others have `strings.h'.  Neither
  8772. -     file name is portable.  There are two things you can do: use
  8773. -     Autoconf to figure out which file to include, or don't include
  8774. -     either file.
  8775. -
  8776. -   * If you don't include either strings file, you can't get
  8777. -     declarations for the string functions from the header file in the
  8778. -     usual way.
  8779. -
  8780. -     That causes less of a problem than you might think.  The newer ANSI
  8781. -     string functions should be avoided anyway because many systems
  8782. -     still don't support them.  The string functions you can use are
  8783. -     these:
  8784. -
  8785. -          strcpy   strncpy   strcat   strncat
  8786. -          strlen   strcmp    strncmp
  8787. -          strchr   strrchr
  8788. -
  8789. -     The copy and concatenate functions work fine without a declaration
  8790. -     as long as you don't use their values.  Using their values without
  8791. -     a declaration fails on systems where the width of a pointer
  8792. -     differs from the width of `int', and perhaps in other cases.  It
  8793. -     is trivial to avoid using their values, so do that.
  8794. -
  8795. -     The compare functions and `strlen' work fine without a declaration
  8796. -     on most systems, possibly all the ones that GNU software runs on.
  8797. -     You may find it necessary to declare them *conditionally* on a few
  8798. -     systems.
  8799. -
  8800. -     The search functions must be declared to return `char *'.  Luckily,
  8801. -     there is no variation in the data type they return.  But there is
  8802. -     variation in their names.  Some systems give these functions the
  8803. -     names `index' and `rindex'; other systems use the names `strchr'
  8804. -     and `strrchr'.  Some systems support both pairs of names, but
  8805. -     neither pair works on all systems.
  8806. -
  8807. -     You should pick a single pair of names and use it throughout your
  8808. -     program.  (Nowadays, it is better to choose `strchr' and `strrchr'
  8809. -     for new programs, since those are the standard ANSI names.)
  8810. -     Declare both of those names as functions returning `char *'.  On
  8811. -     systems which don't support those names, define them as macros in
  8812. -     terms of the other pair.  For example, here is what to put at the
  8813. -     beginning of your file (or in a header) if you want to use the
  8814. -     names `strchr' and `strrchr' throughout:
  8815. -
  8816. -          #ifndef HAVE_STRCHR
  8817. -          #define strchr index
  8818. -          #endif
  8819. -          #ifndef HAVE_STRRCHR
  8820. -          #define strrchr rindex
  8821. -          #endif
  8822. -          
  8823. -          char *strchr ();
  8824. -          char *strrchr ();
  8825. -
  8826. -   Here we assume that `HAVE_STRCHR' and `HAVE_STRRCHR' are macros
  8827. -defined in systems where the corresponding functions exist.  One way to
  8828. -get them properly defined is to use Autoconf.
  8829. -
  8830. -
  8831. -File: standards.info,  Node: Documentation,  Next: Managing Releases,  Prev: Writing C,  Up: Top
  8832. -
  8833. -Documenting Programs
  8834. -********************
  8835. -
  8836. -* Menu:
  8837. -
  8838. -* GNU Manuals::                 Writing proper manuals.
  8839. -* Manual Structure Details::    Specific structure conventions.
  8840. -* NEWS File::                   NEWS files supplement manuals.
  8841. -* Change Logs::            Recording Changes
  8842. -* Man Pages::                   Man pages are secondary.
  8843. -* Reading other Manuals::       How far you can go in learning
  8844. -                                from other manuals.
  8845. -
  8846. -
  8847. -File: standards.info,  Node: GNU Manuals,  Next: Manual Structure Details,  Up: Documentation
  8848. -
  8849. -GNU Manuals
  8850. -===========
  8851. -
  8852. -   The preferred way to document part of the GNU system is to write a
  8853. -manual in the Texinfo formatting language.  See the Texinfo manual,
  8854. -either the hardcopy, or the on-line version available through `info' or
  8855. -the Emacs Info subsystem (`C-h i').
  8856. -
  8857. -   The manual should document all of the program's command-line options
  8858. -and all of its commands.  It should give examples of their use.  But
  8859. -don't organize the manual as a list of features.  Instead, organize it
  8860. -logically, by subtopics.  Address the goals that a user will have in
  8861. -mind, and explain how to accomplish them.
  8862. -
  8863. -   In general, a GNU manual should serve both as tutorial and reference.
  8864. -It should be set up for convenient access to each topic through Info,
  8865. -and for reading straight through (appendixes aside).  A GNU manual
  8866. -should give a good introduction to a beginner reading through from the
  8867. -start, and should also provide all the details that hackers want.
  8868. -
  8869. -   That is not as hard as it first sounds.  Arrange each chapter as a
  8870. -logical breakdown of its topic, but order the sections, and write their
  8871. -text, so that reading the chapter straight through makes sense.  Do
  8872. -likewise when structuring the book into chapters, and when structuring a
  8873. -section into paragraphs.  The watchword is, *at each point, address the
  8874. -most fundamental and important issue raised by the preceding text.*
  8875. -
  8876. -   If necessary, add extra chapters at the beginning of the manual which
  8877. -are purely tutorial and cover the basics of the subject.  These provide
  8878. -the framework for a beginner to understand the rest of the manual.  The
  8879. -Bison manual provides a good example of how to do this.
  8880. -
  8881. -   Don't use Unix man pages as a model for how to write GNU
  8882. -documentation; they are a bad example to follow.
  8883. -
  8884. -   Please do not use the term "pathname" that is used in Unix
  8885. -documentation; use "file name" (two words) instead.  We use the term
  8886. -"path" only for search paths, which are lists of file names.
  8887. -
  8888. -
  8889. -File: standards.info,  Node: Manual Structure Details,  Next: NEWS File,  Prev: GNU Manuals,  Up: Documentation
  8890. -
  8891. -Manual Structure Details
  8892. -========================
  8893. -
  8894. -   The title page of the manual should state the version of the program
  8895. -to which the manual applies.  The Top node of the manual should also
  8896. -contain this information.  If the manual is changing more frequently
  8897. -than or independent of the program, also state a version number for the
  8898. -manual in both of these places.
  8899. -
  8900. -   The manual should have a node named `PROGRAM Invocation' or
  8901. -`Invoking PROGRAM', where PROGRAM stands for the name of the program
  8902. -being described, as you would type it in the shell to run the program.
  8903. -This node (together with its subnodes, if any) should describe the
  8904. -program's command line arguments and how to run it (the sort of
  8905. -information people would look in a man page for).  Start with an
  8906. -`@example' containing a template for all the options and arguments that
  8907. -the program uses.
  8908. -
  8909. -   Alternatively, put a menu item in some menu whose item name fits one
  8910. -of the above patterns.  This identifies the node which that item points
  8911. -to as the node for this purpose, regardless of the node's actual name.
  8912. -
  8913. -   There will be automatic features for specifying a program name and
  8914. -quickly reading just this part of its manual.
  8915. -
  8916. -   If one manual describes several programs, it should have such a node
  8917. -for each program described.
  8918. -
  8919. -
  8920. -File: standards.info,  Node: NEWS File,  Next: Change Logs,  Prev: Manual Structure Details,  Up: Documentation
  8921. -
  8922. -The NEWS File
  8923. -=============
  8924. -
  8925. -   In addition to its manual, the package should have a file named
  8926. -`NEWS' which contains a list of user-visible changes worth mentioning.
  8927. -In each new release, add items to the front of the file and identify
  8928. -the version they pertain to.  Don't discard old items; leave them in
  8929. -the file after the newer items.  This way, a user upgrading from any
  8930. -previous version can see what is new.
  8931. -
  8932. -   If the `NEWS' file gets very long, move some of the older items into
  8933. -a file named `ONEWS' and put a note at the end referring the user to
  8934. -that file.
  8935. -
  8936. -
  8937. -File: standards.info,  Node: Change Logs,  Next: Man Pages,  Prev: NEWS File,  Up: Documentation
  8938. -
  8939. -Change Logs
  8940. -===========
  8941. -
  8942. -   Keep a change log for each directory, describing the changes made to
  8943. -source files in that directory.  The purpose of this is so that people
  8944. -investigating bugs in the future will know about the changes that might
  8945. -have introduced the bug.  Often a new bug can be found by looking at
  8946. -what was recently changed.  More importantly, change logs can help
  8947. -eliminate conceptual inconsistencies between different parts of a
  8948. -program; they can give you a history of how the conflicting concepts
  8949. -arose.
  8950. -
  8951. -   Use the Emacs command `M-x add-change-log-entry' to start a new
  8952. -entry in the change log.  An entry should have an asterisk, the name of
  8953. -the changed file, and then in parentheses the name of the changed
  8954. -functions, variables or whatever, followed by a colon.  Then describe
  8955. -the changes you made to that function or variable.
  8956. -
  8957. -   Separate unrelated entries with blank lines.  When two entries
  8958. -represent parts of the same change, so that they work together, then
  8959. -don't put blank lines between them.  Then you can omit the file name
  8960. -and the asterisk when successive entries are in the same file.
  8961. -
  8962. -   Here are some examples:
  8963. -
  8964. -     * register.el (insert-register): Return nil.
  8965. -     (jump-to-register): Likewise.
  8966. -     
  8967. -     * sort.el (sort-subr): Return nil.
  8968. -     
  8969. -     * tex-mode.el (tex-bibtex-file, tex-file, tex-region):
  8970. -     Restart the tex shell if process is gone or stopped.
  8971. -     (tex-shell-running): New function.
  8972. -     
  8973. -     * expr.c (store_one_arg): Round size up for move_block_to_reg.
  8974. -     (expand_call): Round up when emitting USE insns.
  8975. -     * stmt.c (assign_parms): Round size up for move_block_from_reg.
  8976. -
  8977. -   It's important to name the changed function or variable in full.
  8978. -Don't abbreviate function or variable names, and don't combine them.
  8979. -Subsequent maintainers will often search for a function name to find
  8980. -all the change log entries that pertain to it; if you abbreviate the
  8981. -name, they won't find it when they search.  For example, some people
  8982. -are tempted to abbreviate groups of function names by writing `*
  8983. -register.el ({insert,jump-to}-register)'; this is not a good idea,
  8984. -since searching for `jump-to-register' or `insert-register' would not
  8985. -find the entry.
  8986. -
  8987. -   There's no need to describe the full purpose of the changes or how
  8988. -they work together.  It is better to put such explanations in comments
  8989. -in the code.  That's why just "New function" is enough; there is a
  8990. -comment with the function in the source to explain what it does.
  8991. -
  8992. -   However, sometimes it is useful to write one line to describe the
  8993. -overall purpose of a large batch of changes.
  8994. -
  8995. -   You can think of the change log as a conceptual "undo list" which
  8996. -explains how earlier versions were different from the current version.
  8997. -People can see the current version; they don't need the change log to
  8998. -tell them what is in it.  What they want from a change log is a clear
  8999. -explanation of how the earlier version differed.
  9000. -
  9001. -   When you change the calling sequence of a function in a simple
  9002. -fashion, and you change all the callers of the function, there is no
  9003. -need to make individual entries for all the callers.  Just write in the
  9004. -entry for the function being called, "All callers changed."
  9005. -
  9006. -   When you change just comments or doc strings, it is enough to write
  9007. -an entry for the file, without mentioning the functions.  Write just,
  9008. -"Doc fix."  There's no need to keep a change log for documentation
  9009. -files.  This is because documentation is not susceptible to bugs that
  9010. -are hard to fix.  Documentation does not consist of parts that must
  9011. -interact in a precisely engineered fashion; to correct an error, you
  9012. -need not know the history of the erroneous passage.
  9013. -
  9014. -
  9015. -File: standards.info,  Node: Man Pages,  Next: Reading other Manuals,  Prev: Change Logs,  Up: Documentation
  9016. -
  9017. -Man Pages
  9018. -=========
  9019. -
  9020. -   In the GNU project, man pages are secondary.  It is not necessary or
  9021. -expected for every GNU program to have a man page, but some of them do.
  9022. -It's your choice whether to include a man page in your program.
  9023. -
  9024. -   When you make this decision, consider that supporting a man page
  9025. -requires continual effort each time the program is changed.  The time
  9026. -you spend on the man page is time taken away from more useful work.
  9027. -
  9028. -   For a simple program which changes little, updating the man page may
  9029. -be a small job.  Then there is little reason not to include a man page,
  9030. -if you have one.
  9031. -
  9032. -   For a large program that changes a great deal, updating a man page
  9033. -may be a substantial burden.  If a user offers to donate a man page,
  9034. -you may find this gift costly to accept.  It may be better to refuse
  9035. -the man page unless the same person agrees to take full responsibility
  9036. -for maintaining it--so that you can wash your hands of it entirely.  If
  9037. -this volunteer later ceases to do the job, then don't feel obliged to
  9038. -pick it up yourself; it may be better to withdraw the man page from the
  9039. -distribution until someone else agrees to update it.
  9040. -
  9041. -   When a program changes only a little, you may feel that the
  9042. -discrepancies are small enough that the man page remains useful without
  9043. -updating.  If so, put a prominent note near the beginning of the man
  9044. -page explaining that you don't maintain it and that the Texinfo manual
  9045. -is more authoritative.  The note should say how to access the Texinfo
  9046. -documentation.
  9047. -
  9048. -
  9049. -File: standards.info,  Node: Reading other Manuals,  Prev: Man Pages,  Up: Documentation
  9050. -
  9051. -Reading other Manuals
  9052. -=====================
  9053. -
  9054. -   There may be non-free books or documentation files that describe the
  9055. -program you are documenting.
  9056. -
  9057. -   It is ok to use these documents for reference, just as the author of
  9058. -a new algebra textbook can read other books on algebra.  A large portion
  9059. -of any non-fiction book consists of facts, in this case facts about how
  9060. -a certain program works, and these facts are necessarily the same for
  9061. -everyone who writes about the subject.  But be careful not to copy your
  9062. -outline structure, wording, tables or examples from preexisting non-free
  9063. -documentation.  Copying from free documentation may be ok; please check
  9064. -with the FSF about the individual case.
  9065. -
  9066. -
  9067. -File: standards.info,  Node: Managing Releases,  Prev: Documentation,  Up: Top
  9068. -
  9069. -The Release Process
  9070. -*******************
  9071. -
  9072. -   Making a release is more than just bundling up your source files in a
  9073. -tar file and putting it up for FTP.  You should set up your software so
  9074. -that it can be configured to run on a variety of systems.  Your Makefile
  9075. -should conform to the GNU standards described below, and your directory
  9076. -layout should also conform to the standards discussed below.  Doing so
  9077. -makes it easy to include your package into the larger framework of all
  9078. -GNU software.
  9079. -
  9080. -* Menu:
  9081. -
  9082. -* Configuration::        How Configuration Should Work
  9083. -* Makefile Conventions::    Makefile Conventions
  9084. -* Releases::            Making Releases
  9085. -
  9086. -
  9087. -File: standards.info,  Node: Configuration,  Next: Makefile Conventions,  Up: Managing Releases
  9088. -
  9089. -How Configuration Should Work
  9090. -=============================
  9091. -
  9092. -   Each GNU distribution should come with a shell script named
  9093. -`configure'.  This script is given arguments which describe the kind of
  9094. -machine and system you want to compile the program for.
  9095. -
  9096. -   The `configure' script must record the configuration options so that
  9097. -they affect compilation.
  9098. -
  9099. -   One way to do this is to make a link from a standard name such as
  9100. -`config.h' to the proper configuration file for the chosen system.  If
  9101. -you use this technique, the distribution should *not* contain a file
  9102. -named `config.h'.  This is so that people won't be able to build the
  9103. -program without configuring it first.
  9104. -
  9105. -   Another thing that `configure' can do is to edit the Makefile.  If
  9106. -you do this, the distribution should *not* contain a file named
  9107. -`Makefile'.  Instead, it should include a file `Makefile.in' which
  9108. -contains the input used for editing.  Once again, this is so that people
  9109. -won't be able to build the program without configuring it first.
  9110. -
  9111. -   If `configure' does write the `Makefile', then `Makefile' should
  9112. -have a target named `Makefile' which causes `configure' to be rerun,
  9113. -setting up the same configuration that was set up last time.  The files
  9114. -that `configure' reads should be listed as dependencies of `Makefile'.
  9115. -
  9116. -   All the files which are output from the `configure' script should
  9117. -have comments at the beginning explaining that they were generated
  9118. -automatically using `configure'.  This is so that users won't think of
  9119. -trying to edit them by hand.
  9120. -
  9121. -   The `configure' script should write a file named `config.status'
  9122. -which describes which configuration options were specified when the
  9123. -program was last configured.  This file should be a shell script which,
  9124. -if run, will recreate the same configuration.
  9125. -
  9126. -   The `configure' script should accept an option of the form
  9127. -`--srcdir=DIRNAME' to specify the directory where sources are found (if
  9128. -it is not the current directory).  This makes it possible to build the
  9129. -program in a separate directory, so that the actual source directory is
  9130. -not modified.
  9131. -
  9132. -   If the user does not specify `--srcdir', then `configure' should
  9133. -check both `.' and `..' to see if it can find the sources.  If it finds
  9134. -the sources in one of these places, it should use them from there.
  9135. -Otherwise, it should report that it cannot find the sources, and should
  9136. -exit with nonzero status.
  9137. -
  9138. -   Usually the easy way to support `--srcdir' is by editing a
  9139. -definition of `VPATH' into the Makefile.  Some rules may need to refer
  9140. -explicitly to the specified source directory.  To make this possible,
  9141. -`configure' can add to the Makefile a variable named `srcdir' whose
  9142. -value is precisely the specified directory.
  9143. -
  9144. -   The `configure' script should also take an argument which specifies
  9145. -the type of system to build the program for.  This argument should look
  9146. -like this:
  9147. -
  9148. -     CPU-COMPANY-SYSTEM
  9149. -
  9150. -   For example, a Sun 3 might be `m68k-sun-sunos4.1'.
  9151. -
  9152. -   The `configure' script needs to be able to decode all plausible
  9153. -alternatives for how to describe a machine.  Thus, `sun3-sunos4.1'
  9154. -would be a valid alias.  For many programs, `vax-dec-ultrix' would be
  9155. -an alias for `vax-dec-bsd', simply because the differences between
  9156. -Ultrix and BSD are rarely noticeable, but a few programs might need to
  9157. -distinguish them.
  9158. -
  9159. -   There is a shell script called `config.sub' that you can use as a
  9160. -subroutine to validate system types and canonicalize aliases.
  9161. -
  9162. -   Other options are permitted to specify in more detail the software
  9163. -or hardware present on the machine, and include or exclude optional
  9164. -parts of the package:
  9165. -
  9166. -`--enable-FEATURE[=PARAMETER]'
  9167. -     Configure the package to build and install an optional user-level
  9168. -     facility called FEATURE.  This allows users to choose which
  9169. -     optional features to include.  Giving an optional PARAMETER of
  9170. -     `no' should omit FEATURE, if it is built by default.
  9171. -
  9172. -     No `--enable' option should *ever* cause one feature to replace
  9173. -     another.  No `--enable' option should ever substitute one useful
  9174. -     behavior for another useful behavior.  The only proper use for
  9175. -     `--enable' is for questions of whether to build part of the program
  9176. -     or exclude it.
  9177. -
  9178. -`--with-PACKAGE'
  9179. -     The package PACKAGE will be installed, so configure this package
  9180. -     to work with PACKAGE.
  9181. -
  9182. -     Possible values of PACKAGE include `x', `x-toolkit', `gnu-as' (or
  9183. -     `gas'), `gnu-ld', `gnu-libc', and `gdb'.
  9184. -
  9185. -     Do not use a `--with' option to specify the file name to use to
  9186. -     find certain files.  That is outside the scope of what `--with'
  9187. -     options are for.
  9188. -
  9189. -`--nfp'
  9190. -     The target machine has no floating point processor.
  9191. -
  9192. -`--gas'
  9193. -     The target machine assembler is GAS, the GNU assembler.  This is
  9194. -     obsolete; users should use `--with-gnu-as' instead.
  9195. -
  9196. -`--x'
  9197. -     The target machine has the X Window System installed.  This is
  9198. -     obsolete; users should use `--with-x' instead.
  9199. -
  9200. -   All `configure' scripts should accept all of these "detail" options,
  9201. -whether or not they make any difference to the particular package at
  9202. -hand.  In particular, they should accept any option that starts with
  9203. -`--with-' or `--enable-'.  This is so users will be able to configure
  9204. -an entire GNU source tree at once with a single set of options.
  9205. -
  9206. -   You will note that the categories `--with-' and `--enable-' are
  9207. -narrow: they *do not* provide a place for any sort of option you might
  9208. -think of.  That is deliberate.  We want to limit the possible
  9209. -configuration options in GNU software.  We do not want GNU programs to
  9210. -have idiosyncratic configuration options.
  9211. -
  9212. -   Packages that perform part of the compilation process may support
  9213. -cross-compilation.  In such a case, the host and target machines for
  9214. -the program may be different.  The `configure' script should normally
  9215. -treat the specified type of system as both the host and the target,
  9216. -thus producing a program which works for the same type of machine that
  9217. -it runs on.
  9218. -
  9219. -   The way to build a cross-compiler, cross-assembler, or what have
  9220. -you, is to specify the option `--host=HOSTTYPE' when running
  9221. -`configure'.  This specifies the host system without changing the type
  9222. -of target system.  The syntax for HOSTTYPE is the same as described
  9223. -above.
  9224. -
  9225. -   Bootstrapping a cross-compiler requires compiling it on a machine
  9226. -other than the host it will run on.  Compilation packages accept a
  9227. -configuration option `--build=HOSTTYPE' for specifying the
  9228. -configuration on which you will compile them, in case that is different
  9229. -from the host.
  9230. -
  9231. -   Programs for which cross-operation is not meaningful need not accept
  9232. -the `--host' option, because configuring an entire operating system for
  9233. -cross-operation is not a meaningful thing.
  9234. -
  9235. -   Some programs have ways of configuring themselves automatically.  If
  9236. -your program is set up to do this, your `configure' script can simply
  9237. -ignore most of its arguments.
  9238. -
  9239. -
  9240. -File: standards.info,  Node: Makefile Conventions,  Next: Releases,  Prev: Configuration,  Up: Managing Releases
  9241. -
  9242. -Makefile Conventions
  9243. -====================
  9244. -
  9245. -   This node describes conventions for writing the Makefiles for GNU
  9246. -programs.
  9247. -
  9248. -* Menu:
  9249. -
  9250. -* Makefile Basics::        General Conventions for Makefiles
  9251. -* Utilities in Makefiles::    Utilities in Makefiles
  9252. -* Command Variables::        Variables for Specifying Commands
  9253. -* Directory Variables::        Variables for Installation Directories
  9254. -* Standard Targets::        Standard Targets for Users
  9255. -
  9256. -
  9257. -File: standards.info,  Node: Makefile Basics,  Next: Utilities in Makefiles,  Up: Makefile Conventions
  9258. -
  9259. -General Conventions for Makefiles
  9260. ----------------------------------
  9261. -
  9262. -   Every Makefile should contain this line:
  9263. -
  9264. -     SHELL = /bin/sh
  9265. -
  9266. -to avoid trouble on systems where the `SHELL' variable might be
  9267. -inherited from the environment.  (This is never a problem with GNU
  9268. -`make'.)
  9269. -
  9270. -   Different `make' programs have incompatible suffix lists and
  9271. -implicit rules, and this sometimes creates confusion or misbehavior.  So
  9272. -it is a good idea to set the suffix list explicitly using only the
  9273. -suffixes you need in the particular Makefile, like this:
  9274. -
  9275. -     .SUFFIXES:
  9276. -     .SUFFIXES: .c .o
  9277. -
  9278. -The first line clears out the suffix list, the second introduces all
  9279. -suffixes which may be subject to implicit rules in this Makefile.
  9280. -
  9281. -   Don't assume that `.' is in the path for command execution.  When
  9282. -you need to run programs that are a part of your package during the
  9283. -make, please make sure that it uses `./' if the program is built as
  9284. -part of the make or `$(srcdir)/' if the file is an unchanging part of
  9285. -the source code.  Without one of these prefixes, the current search
  9286. -path is used.
  9287. -
  9288. -   The distinction between `./' and `$(srcdir)/' is important when
  9289. -using the `--srcdir' option to `configure'.  A rule of the form:
  9290. -
  9291. -     foo.1 : foo.man sedscript
  9292. -             sed -e sedscript foo.man > foo.1
  9293. -
  9294. -will fail when the current directory is not the source directory,
  9295. -because `foo.man' and `sedscript' are not in the current directory.
  9296. -
  9297. -   When using GNU `make', relying on `VPATH' to find the source file
  9298. -will work in the case where there is a single dependency file, since
  9299. -the `make' automatic variable `$<' will represent the source file
  9300. -wherever it is.  (Many versions of `make' set `$<' only in implicit
  9301. -rules.)  A Makefile target like
  9302. -
  9303. -     foo.o : bar.c
  9304. -             $(CC) -I. -I$(srcdir) $(CFLAGS) -c bar.c -o foo.o
  9305. -
  9306. -should instead be written as
  9307. -
  9308. -     foo.o : bar.c
  9309. -             $(CC) -I. -I$(srcdir) $(CFLAGS) -c $< -o $@
  9310. -
  9311. -in order to allow `VPATH' to work correctly.  When the target has
  9312. -multiple dependencies, using an explicit `$(srcdir)' is the easiest way
  9313. -to make the rule work well.  For example, the target above for `foo.1'
  9314. -is best written as:
  9315. -
  9316. -     foo.1 : foo.man sedscript
  9317. -             sed -e $(srcdir)/sedscript $(srcdir)/foo.man > $@
  9318. -
  9319. -   Try to make the build and installation targets, at least (and all
  9320. -their subtargets) work correctly with a parallel `make'.
  9321. -
  9322. -
  9323. -File: standards.info,  Node: Utilities in Makefiles,  Next: Command Variables,  Prev: Makefile Basics,  Up: Makefile Conventions
  9324. -
  9325. -Utilities in Makefiles
  9326. -----------------------
  9327. -
  9328. -   Write the Makefile commands (and any shell scripts, such as
  9329. -`configure') to run in `sh', not in `csh'.  Don't use any special
  9330. -features of `ksh' or `bash'.
  9331. -
  9332. -   The `configure' script and the Makefile rules for building and
  9333. -installation should not use any utilities directly except these:
  9334. -
  9335. -     cat cmp cp echo egrep expr false grep
  9336. -     ln mkdir mv pwd rm rmdir sed test touch true
  9337. -
  9338. -   Stick to the generally supported options for these programs.  For
  9339. -example, don't use `mkdir -p', convenient as it may be, because most
  9340. -systems don't support it.
  9341. -
  9342. -   It is a good idea to avoid creating symbolic links in makefiles,
  9343. -since a few systems don't support them.
  9344. -
  9345. -   The Makefile rules for building and installation can also use
  9346. -compilers and related programs, but should do so via `make' variables
  9347. -so that the user can substitute alternatives.  Here are some of the
  9348. -programs we mean:
  9349. -
  9350. -     ar bison cc flex install ld lex
  9351. -     make makeinfo ranlib texi2dvi yacc
  9352. -
  9353. -   Use the following `make' variables:
  9354. -
  9355. -     $(AR) $(BISON) $(CC) $(FLEX) $(INSTALL) $(LD) $(LEX)
  9356. -     $(MAKE) $(MAKEINFO) $(RANLIB) $(TEXI2DVI) $(YACC)
  9357. -
  9358. -   When you use `ranlib', you should make sure nothing bad happens if
  9359. -the system does not have `ranlib'.  Arrange to ignore an error from
  9360. -that command, and print a message before the command to tell the user
  9361. -that failure of the `ranlib' command does not mean a problem.  (The
  9362. -Autoconf `AC_PROG_RANLIB' macro can help with this.)
  9363. -
  9364. -   If you use symbolic links, you should implement a fallback for
  9365. -systems that don't have symbolic links.
  9366. -
  9367. -   It is ok to use other utilities in Makefile portions (or scripts)
  9368. -intended only for particular systems where you know those utilities
  9369. -exist.
  9370. -
  9371. -
  9372. -File: standards.info,  Node: Command Variables,  Next: Directory Variables,  Prev: Utilities in Makefiles,  Up: Makefile Conventions
  9373. -
  9374. -Variables for Specifying Commands
  9375. ----------------------------------
  9376. -
  9377. -   Makefiles should provide variables for overriding certain commands,
  9378. -options, and so on.
  9379. -
  9380. -   In particular, you should run most utility programs via variables.
  9381. -Thus, if you use Bison, have a variable named `BISON' whose default
  9382. -value is set with `BISON = bison', and refer to it with `$(BISON)'
  9383. -whenever you need to use Bison.
  9384. -
  9385. -   File management utilities such as `ln', `rm', `mv', and so on, need
  9386. -not be referred to through variables in this way, since users don't
  9387. -need to replace them with other programs.
  9388. -
  9389. -   Each program-name variable should come with an options variable that
  9390. -is used to supply options to the program.  Append `FLAGS' to the
  9391. -program-name variable name to get the options variable name--for
  9392. -example, `BISONFLAGS'.  (The name `CFLAGS' is an exception to this
  9393. -rule, but we keep it because it is standard.)  Use `CPPFLAGS' in any
  9394. -compilation command that runs the preprocessor, and use `LDFLAGS' in
  9395. -any compilation command that does linking as well as in any direct use
  9396. -of `ld'.
  9397. -
  9398. -   If there are C compiler options that *must* be used for proper
  9399. -compilation of certain files, do not include them in `CFLAGS'.  Users
  9400. -expect to be able to specify `CFLAGS' freely themselves.  Instead,
  9401. -arrange to pass the necessary options to the C compiler independently
  9402. -of `CFLAGS', by writing them explicitly in the compilation commands or
  9403. -by defining an implicit rule, like this:
  9404. -
  9405. -     CFLAGS = -g
  9406. -     ALL_CFLAGS = -I. $(CFLAGS)
  9407. -     .c.o:
  9408. -             $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $<
  9409. -
  9410. -   Do include the `-g' option in `CFLAGS', because that is not
  9411. -*required* for proper compilation.  You can consider it a default that
  9412. -is only recommended.  If the package is set up so that it is compiled
  9413. -with GCC by default, then you might as well include `-O' in the default
  9414. -value of `CFLAGS' as well.
  9415. -
  9416. -   Put `CFLAGS' last in the compilation command, after other variables
  9417. -containing compiler options, so the user can use `CFLAGS' to override
  9418. -the others.
  9419. -
  9420. -   Every Makefile should define the variable `INSTALL', which is the
  9421. -basic command for installing a file into the system.
  9422. -
  9423. -   Every Makefile should also define the variables `INSTALL_PROGRAM'
  9424. -and `INSTALL_DATA'.  (The default for each of these should be
  9425. -`$(INSTALL)'.)  Then it should use those variables as the commands for
  9426. -actual installation, for executables and nonexecutables respectively.
  9427. -Use these variables as follows:
  9428. -
  9429. -     $(INSTALL_PROGRAM) foo $(bindir)/foo
  9430. -     $(INSTALL_DATA) libfoo.a $(libdir)/libfoo.a
  9431. -
  9432. -Always use a file name, not a directory name, as the second argument of
  9433. -the installation commands.  Use a separate command for each file to be
  9434. -installed.
  9435. -
  9436. -
  9437. -File: standards.info,  Node: Directory Variables,  Next: Standard Targets,  Prev: Command Variables,  Up: Makefile Conventions
  9438. -
  9439. -Variables for Installation Directories
  9440. ---------------------------------------
  9441. -
  9442. -   Installation directories should always be named by variables, so it
  9443. -is easy to install in a nonstandard place.  The standard names for these
  9444. -variables are described below.  They are based on a standard filesystem
  9445. -layout; variants of it are used in SVR4, 4.4BSD, Linux, Ultrix v4, and
  9446. -other modern operating systems.
  9447. -
  9448. -   These two variables set the root for the installation.  All the other
  9449. -installation directories should be subdirectories of one of these two,
  9450. -and nothing should be directly installed into these two directories.
  9451. -
  9452. -`prefix'
  9453. -     A prefix used in constructing the default values of the variables
  9454. -     listed below.  The default value of `prefix' should be
  9455. -     `/usr/local'.  When building the complete GNU system, the prefix
  9456. -     will be empty and `/usr' will be a symbolic link to `/'.  (If you
  9457. -     are using Autoconf, write it as `@prefix@'.)
  9458. -
  9459. -`exec_prefix'
  9460. -     A prefix used in constructing the default values of some of the
  9461. -     variables listed below.  The default value of `exec_prefix' should
  9462. -     be `$(prefix)'.  (If you are using Autoconf, write it as
  9463. -     `@exec_prefix@'.)
  9464. -
  9465. -     Generally, `$(exec_prefix)' is used for directories that contain
  9466. -     machine-specific files (such as executables and subroutine
  9467. -     libraries), while `$(prefix)' is used directly for other
  9468. -     directories.
  9469. -
  9470. -   Executable programs are installed in one of the following
  9471. -directories.
  9472. -
  9473. -`bindir'
  9474. -     The directory for installing executable programs that users can
  9475. -     run.  This should normally be `/usr/local/bin', but write it as
  9476. -     `$(exec_prefix)/bin'.  (If you are using Autoconf, write it as
  9477. -     `@bindir@'.)
  9478. -
  9479. -`sbindir'
  9480. -     The directory for installing executable programs that can be run
  9481. -     from the shell, but are only generally useful to system
  9482. -     administrators.  This should normally be `/usr/local/sbin', but
  9483. -     write it as `$(exec_prefix)/sbin'.  (If you are using Autoconf,
  9484. -     write it as `@sbindir@'.)
  9485. -
  9486. -`libexecdir'
  9487. -     The directory for installing executable programs to be run by other
  9488. -     programs rather than by users.  This directory should normally be
  9489. -     `/usr/local/libexec', but write it as `$(exec_prefix)/libexec'.
  9490. -     (If you are using Autoconf, write it as `@libexecdir@'.)
  9491. -
  9492. -   Data files used by the program during its execution are divided into
  9493. -categories in two ways.
  9494. -
  9495. -   * Some files are normally modified by programs; others are never
  9496. -     normally modified (though users may edit some of these).
  9497. -
  9498. -   * Some files are architecture-independent and can be shared by all
  9499. -     machines at a site; some are architecture-dependent and can be
  9500. -     shared only by machines of the same kind and operating system;
  9501. -     others may never be shared between two machines.
  9502. -
  9503. -   This makes for six different possibilities.  However, we want to
  9504. -discourage the use of architecture-dependent files, aside from object
  9505. -files and libraries.  It is much cleaner to make other data files
  9506. -architecture-independent, and it is generally not hard.
  9507. -
  9508. -   Therefore, here are the variables Makefiles should use to specify
  9509. -directories:
  9510. -
  9511. -`datadir'
  9512. -     The directory for installing read-only architecture independent
  9513. -     data files.  This should normally be `/usr/local/share', but write
  9514. -     it as `$(prefix)/share'.  (If you are using Autoconf, write it as
  9515. -     `@datadir@'.) As a special exception, see `$(infodir)' and
  9516. -     `$(includedir)' below.
  9517. -
  9518. -`sysconfdir'
  9519. -     The directory for installing read-only data files that pertain to a
  9520. -     single machine-that is to say, files for configuring a host.
  9521. -     Mailer and network configuration files, `/etc/passwd', and so
  9522. -     forth belong here.  All the files in this directory should be
  9523. -     ordinary ASCII text files.  This directory should normally be
  9524. -     `/usr/local/etc', but write it as `$(prefix)/etc'.  (If you are
  9525. -     using Autoconf, write it as `@sysconfdir@'.)
  9526. -
  9527. -     Do not install executables in this directory (they probably belong
  9528. -     in `$(libexecdir)' or `$(sbindir)').  Also do not install files
  9529. -     that are modified in the normal course of their use (programs
  9530. -     whose purpose is to change the configuration of the system
  9531. -     excluded).  Those probably belong in `$(localstatedir)'.
  9532. -
  9533. -`sharedstatedir'
  9534. -     The directory for installing architecture-independent data files
  9535. -     which the programs modify while they run.  This should normally be
  9536. -     `/usr/local/com', but write it as `$(prefix)/com'.  (If you are
  9537. -     using Autoconf, write it as `@sharedstatedir@'.)
  9538. -
  9539. -`localstatedir'
  9540. -     The directory for installing data files which the programs modify
  9541. -     while they run, and that pertain to one specific machine.  Users
  9542. -     should never need to modify files in this directory to configure
  9543. -     the package's operation; put such configuration information in
  9544. -     separate files that go in `$(datadir)' or `$(sysconfdir)'.
  9545. -     `$(localstatedir)' should normally be `/usr/local/var', but write
  9546. -     it as `$(prefix)/var'.  (If you are using Autoconf, write it as
  9547. -     `@localstatedir@'.)
  9548. -
  9549. -`libdir'
  9550. -     The directory for object files and libraries of object code.  Do
  9551. -     not install executables here, they probably ought to go in
  9552. -     `$(libexecdir)' instead.  The value of `libdir' should normally be
  9553. -     `/usr/local/lib', but write it as `$(exec_prefix)/lib'.  (If you
  9554. -     are using Autoconf, write it as `@libdir@'.)
  9555. -
  9556. -`infodir'
  9557. -     The directory for installing the Info files for this package.  By
  9558. -     default, it should be `/usr/local/info', but it should be written
  9559. -     as `$(prefix)/info'.  (If you are using Autoconf, write it as
  9560. -     `@infodir@'.)
  9561. -
  9562. -`includedir'
  9563. -     The directory for installing header files to be included by user
  9564. -     programs with the C `#include' preprocessor directive.  This
  9565. -     should normally be `/usr/local/include', but write it as
  9566. -     `$(prefix)/include'.  (If you are using Autoconf, write it as
  9567. -     `@includedir@'.)
  9568. -
  9569. -     Most compilers other than GCC do not look for header files in
  9570. -     `/usr/local/include'.  So installing the header files this way is
  9571. -     only useful with GCC.  Sometimes this is not a problem because some
  9572. -     libraries are only really intended to work with GCC.  But some
  9573. -     libraries are intended to work with other compilers.  They should
  9574. -     install their header files in two places, one specified by
  9575. -     `includedir' and one specified by `oldincludedir'.
  9576. -
  9577. -`oldincludedir'
  9578. -     The directory for installing `#include' header files for use with
  9579. -     compilers other than GCC.  This should normally be `/usr/include'.
  9580. -     (If you are using Autoconf, you can write it as `@oldincludedir@'.)
  9581. -
  9582. -     The Makefile commands should check whether the value of
  9583. -     `oldincludedir' is empty.  If it is, they should not try to use
  9584. -     it; they should cancel the second installation of the header files.
  9585. -
  9586. -     A package should not replace an existing header in this directory
  9587. -     unless the header came from the same package.  Thus, if your Foo
  9588. -     package provides a header file `foo.h', then it should install the
  9589. -     header file in the `oldincludedir' directory if either (1) there
  9590. -     is no `foo.h' there or (2) the `foo.h' that exists came from the
  9591. -     Foo package.
  9592. -
  9593. -     To tell whether `foo.h' came from the Foo package, put a magic
  9594. -     string in the file--part of a comment--and `grep' for that string.
  9595. -
  9596. -   Unix-style man pages are installed in one of the following:
  9597. -
  9598. -`mandir'
  9599. -     The top-level directory for installing the man pages (if any) for
  9600. -     this package.  It will normally be `/usr/local/man', but you should
  9601. -     write it as `$(prefix)/man'.  (If you are using Autoconf, write it
  9602. -     as `@mandir@'.)
  9603. -
  9604. -`man1dir'
  9605. -     The directory for installing section 1 man pages.  Write it as
  9606. -     `$(mandir)/man1'.
  9607. -
  9608. -`man2dir'
  9609. -     The directory for installing section 2 man pages.  Write it as
  9610. -     `$(mandir)/man2'
  9611. -
  9612. -`...'
  9613. -     *Don't make the primary documentation for any GNU software be a
  9614. -     man page.  Write a manual in Texinfo instead.  Man pages are just
  9615. -     for the sake of people running GNU software on Unix, which is a
  9616. -     secondary application only.*
  9617. -
  9618. -`manext'
  9619. -     The file name extension for the installed man page.  This should
  9620. -     contain a period followed by the appropriate digit; it should
  9621. -     normally be `.1'.
  9622. -
  9623. -`man1ext'
  9624. -     The file name extension for installed section 1 man pages.
  9625. -
  9626. -`man2ext'
  9627. -     The file name extension for installed section 2 man pages.
  9628. -
  9629. -`...'
  9630. -     Use these names instead of `manext' if the package needs to
  9631. -     install man pages in more than one section of the manual.
  9632. -
  9633. -   And finally, you should set the following variable:
  9634. -
  9635. -`srcdir'
  9636. -     The directory for the sources being compiled.  The value of this
  9637. -     variable is normally inserted by the `configure' shell script.
  9638. -     (If you are using Autconf, use `srcdir = @srcdir@'.)
  9639. -
  9640. -   For example:
  9641. -
  9642. -     # Common prefix for installation directories.
  9643. -     # NOTE: This directory must exist when you start the install.
  9644. -     prefix = /usr/local
  9645. -     exec_prefix = $(prefix)
  9646. -     # Where to put the executable for the command `gcc'.
  9647. -     bindir = $(exec_prefix)/bin
  9648. -     # Where to put the directories used by the compiler.
  9649. -     libexecdir = $(exec_prefix)/libexec
  9650. -     # Where to put the Info files.
  9651. -     infodir = $(prefix)/info
  9652. -
  9653. -   If your program installs a large number of files into one of the
  9654. -standard user-specified directories, it might be useful to group them
  9655. -into a subdirectory particular to that program.  If you do this, you
  9656. -should write the `install' rule to create these subdirectories.
  9657. -
  9658. -   Do not expect the user to include the subdirectory name in the value
  9659. -of any of the variables listed above.  The idea of having a uniform set
  9660. -of variable names for installation directories is to enable the user to
  9661. -specify the exact same values for several different GNU packages.  In
  9662. -order for this to be useful, all the packages must be designed so that
  9663. -they will work sensibly when the user does so.
  9664. -
  9665. -
  9666. -File: standards.info,  Node: Standard Targets,  Prev: Directory Variables,  Up: Makefile Conventions
  9667. -
  9668. -Standard Targets for Users
  9669. ---------------------------
  9670. -
  9671. -   All GNU programs should have the following targets in their
  9672. -Makefiles:
  9673. -
  9674. -`all'
  9675. -     Compile the entire program.  This should be the default target.
  9676. -     This target need not rebuild any documentation files; Info files
  9677. -     should normally be included in the distribution, and DVI files
  9678. -     should be made only when explicitly asked for.
  9679. -
  9680. -     By default, the Make rules should compile and link with `-g', so
  9681. -     that executable programs have debugging symbols.  Users who don't
  9682. -     mind being helpless can strip the executables later if they wish.
  9683. -
  9684. -`install'
  9685. -     Compile the program and copy the executables, libraries, and so on
  9686. -     to the file names where they should reside for actual use.  If
  9687. -     there is a simple test to verify that a program is properly
  9688. -     installed, this target should run that test.
  9689. -
  9690. -     Do not strip executables when installing them.  Devil-may-care
  9691. -     users can use the `install-strip' target to do that.
  9692. -
  9693. -     If possible, write the `install' target rule so that it does not
  9694. -     modify anything in the directory where the program was built,
  9695. -     provided `make all' has just been done.  This is convenient for
  9696. -     building the program under one user name and installing it under
  9697. -     another.
  9698. -
  9699. -     The commands should create all the directories in which files are
  9700. -     to be installed, if they don't already exist.  This includes the
  9701. -     directories specified as the values of the variables `prefix' and
  9702. -     `exec_prefix', as well as all subdirectories that are needed.  One
  9703. -     way to do this is by means of an `installdirs' target as described
  9704. -     below.
  9705. -
  9706. -     Use `-' before any command for installing a man page, so that
  9707. -     `make' will ignore any errors.  This is in case there are systems
  9708. -     that don't have the Unix man page documentation system installed.
  9709. -
  9710. -     The way to install Info files is to copy them into `$(infodir)'
  9711. -     with `$(INSTALL_DATA)' (*note Command Variables::.), and then run
  9712. -     the `install-info' program if it is present.  `install-info' is a
  9713. -     program that edits the Info `dir' file to add or update the menu
  9714. -     entry for the given Info file; it is part of the Texinfo package.
  9715. -     Here is a sample rule to install an Info file:
  9716. -
  9717. -          $(infodir)/foo.info: foo.info
  9718. -          # There may be a newer info file in . than in srcdir.
  9719. -                  -if test -f foo.info; then d=.; \
  9720. -                   else d=$(srcdir); fi; \
  9721. -                  $(INSTALL_DATA) $$d/foo.info $@; \
  9722. -          # Run install-info only if it exists.
  9723. -          # Use `if' instead of just prepending `-' to the
  9724. -          # line so we notice real errors from install-info.
  9725. -          # We use `$(SHELL) -c' because some shells do not
  9726. -          # fail gracefully when there is an unknown command.
  9727. -                  if $(SHELL) -c 'install-info --version' \
  9728. -                     >/dev/null 2>&1; then \
  9729. -                    install-info --dir-file=$(infodir)/dir \
  9730. -                                 $(infodir)/foo.info; \
  9731. -                  else true; fi
  9732. -
  9733. -`uninstall'
  9734. -     Delete all the installed files that the `install' target would
  9735. -     create (but not the noninstalled files such as `make all' would
  9736. -     create).
  9737. -
  9738. -     This rule should not modify the directories where compilation is
  9739. -     done, only the directories where files are installed.
  9740. -
  9741. -`install-strip'
  9742. -     Like `install', but strip the executable files while installing
  9743. -     them.  The definition of this target can be very simple:
  9744. -
  9745. -          install-strip:
  9746. -                  $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
  9747. -                          install
  9748. -
  9749. -     Normally we do not recommend stripping an executable unless you
  9750. -     are sure the program has no bugs.  However, it can be reasonable
  9751. -     to install a stripped executable for actual execution while saving
  9752. -     the unstripped executable elsewhere in case there is a bug.
  9753. -
  9754. -`clean'
  9755. -     Delete all files from the current directory that are normally
  9756. -     created by building the program.  Don't delete the files that
  9757. -     record the configuration.  Also preserve files that could be made
  9758. -     by building, but normally aren't because the distribution comes
  9759. -     with them.
  9760. -
  9761. -     Delete `.dvi' files here if they are not part of the distribution.
  9762. -
  9763. -`distclean'
  9764. -     Delete all files from the current directory that are created by
  9765. -     configuring or building the program.  If you have unpacked the
  9766. -     source and built the program without creating any other files,
  9767. -     `make distclean' should leave only the files that were in the
  9768. -     distribution.
  9769. -
  9770. -`mostlyclean'
  9771. -     Like `clean', but may refrain from deleting a few files that people
  9772. -     normally don't want to recompile.  For example, the `mostlyclean'
  9773. -     target for GCC does not delete `libgcc.a', because recompiling it
  9774. -     is rarely necessary and takes a lot of time.
  9775. -
  9776. -`maintainer-clean'
  9777. -     Delete almost everything from the current directory that can be
  9778. -     reconstructed with this Makefile.  This typically includes
  9779. -     everything deleted by `distclean', plus more: C source files
  9780. -     produced by Bison, tags tables, Info files, and so on.
  9781. -
  9782. -     The reason we say "almost everything" is that running the command
  9783. -     `make maintainer-clean' should not delete `configure' even if
  9784. -     `configure' can be remade using a rule in the Makefile.  More
  9785. -     generally, `make maintainer-clean' should not delete anything that
  9786. -     needs to exist in order to run `configure' and then begin to build
  9787. -     the program.  This is the only exception; `maintainer-clean' should
  9788. -     delete everything else that can be rebuilt.
  9789. -
  9790. -     The `maintainer-clean' target is intended to be used by a
  9791. -     maintainer of the package, not by ordinary users.  You may need
  9792. -     special tools to reconstruct some of the files that `make
  9793. -     maintainer-clean' deletes.  Since these files are normally
  9794. -     included in the distribution, we don't take care to make them easy
  9795. -     to reconstruct.  If you find you need to unpack the full
  9796. -     distribution again, don't blame us.
  9797. -
  9798. -     To help make users aware of this, the commands for the special
  9799. -     `maintainer-clean' target should start with these two:
  9800. -
  9801. -          @echo 'This command is intended for maintainers to use; it'
  9802. -          @echo 'deletes files that may need special tools to rebuild.'
  9803. -
  9804. -`TAGS'
  9805. -     Update a tags table for this program.
  9806. -
  9807. -`info'
  9808. -     Generate any Info files needed.  The best way to write the rules
  9809. -     is as follows:
  9810. -
  9811. -          info: foo.info
  9812. -          
  9813. -          foo.info: foo.texi chap1.texi chap2.texi
  9814. -                  $(MAKEINFO) $(srcdir)/foo.texi
  9815. -
  9816. -     You must define the variable `MAKEINFO' in the Makefile.  It should
  9817. -     run the `makeinfo' program, which is part of the Texinfo
  9818. -     distribution.
  9819. -
  9820. -`dvi'
  9821. -     Generate DVI files for all Texinfo documentation.  For example:
  9822. -
  9823. -          dvi: foo.dvi
  9824. -          
  9825. -          foo.dvi: foo.texi chap1.texi chap2.texi
  9826. -                  $(TEXI2DVI) $(srcdir)/foo.texi
  9827. -
  9828. -     You must define the variable `TEXI2DVI' in the Makefile.  It should
  9829. -     run the program `texi2dvi', which is part of the Texinfo
  9830. -     distribution.(1)  Alternatively, write just the dependencies, and
  9831. -     allow GNU `make' to provide the command.
  9832. -
  9833. -`dist'
  9834. -     Create a distribution tar file for this program.  The tar file
  9835. -     should be set up so that the file names in the tar file start with
  9836. -     a subdirectory name which is the name of the package it is a
  9837. -     distribution for.  This name can include the version number.
  9838. -
  9839. -     For example, the distribution tar file of GCC version 1.40 unpacks
  9840. -     into a subdirectory named `gcc-1.40'.
  9841. -
  9842. -     The easiest way to do this is to create a subdirectory
  9843. -     appropriately named, use `ln' or `cp' to install the proper files
  9844. -     in it, and then `tar' that subdirectory.
  9845. -
  9846. -     Compress the tar file file with `gzip'.  For example, the actual
  9847. -     distribution file for GCC version 1.40 is called `gcc-1.40.tar.gz'.
  9848. -
  9849. -     The `dist' target should explicitly depend on all non-source files
  9850. -     that are in the distribution, to make sure they are up to date in
  9851. -     the distribution.  *Note Making Releases: Releases.
  9852. -
  9853. -`check'
  9854. -     Perform self-tests (if any).  The user must build the program
  9855. -     before running the tests, but need not install the program; you
  9856. -     should write the self-tests so that they work when the program is
  9857. -     built but not installed.
  9858. -
  9859. -   The following targets are suggested as conventional names, for
  9860. -programs in which they are useful.
  9861. -
  9862. -`installcheck'
  9863. -     Perform installation tests (if any).  The user must build and
  9864. -     install the program before running the tests.  You should not
  9865. -     assume that `$(bindir)' is in the search path.
  9866. -
  9867. -`installdirs'
  9868. -     It's useful to add a target named `installdirs' to create the
  9869. -     directories where files are installed, and their parent
  9870. -     directories.  There is a script called `mkinstalldirs' which is
  9871. -     convenient for this; you can find it in the Texinfo package.  You
  9872. -     can use a rule like this:
  9873. -
  9874. -          # Make sure all installation directories (e.g. $(bindir))
  9875. -          # actually exist by making them if necessary.
  9876. -          installdirs: mkinstalldirs
  9877. -                  $(srcdir)/mkinstalldirs $(bindir) $(datadir) \
  9878. -                                          $(libdir) $(infodir) \
  9879. -                                          $(mandir)
  9880. -
  9881. -     This rule should not modify the directories where compilation is
  9882. -     done.  It should do nothing but create installation directories.
  9883. -
  9884. -   ---------- Footnotes ----------
  9885. -
  9886. -   (1)  `texi2dvi' uses TeX to do the real work of formatting. TeX is
  9887. -not distributed with Texinfo.
  9888. -
  9889. -
  9890. -File: standards.info,  Node: Releases,  Prev: Makefile Conventions,  Up: Managing Releases
  9891. -
  9892. -Making Releases
  9893. -===============
  9894. -
  9895. -   Package the distribution of Foo version 69.96 in a gzipped tar file
  9896. -named `foo-69.96.tar.gz'.  It should unpack into a subdirectory named
  9897. -`foo-69.96'.
  9898. -
  9899. -   Building and installing the program should never modify any of the
  9900. -files contained in the distribution.  This means that all the files
  9901. -that form part of the program in any way must be classified into "source
  9902. -files" and "non-source files".  Source files are written by humans and
  9903. -never changed automatically; non-source files are produced from source
  9904. -files by programs under the control of the Makefile.
  9905. -
  9906. -   Naturally, all the source files must be in the distribution.  It is
  9907. -okay to include non-source files in the distribution, provided they are
  9908. -up-to-date and machine-independent, so that building the distribution
  9909. -normally will never modify them.  We commonly include non-source files
  9910. -produced by Bison, `lex', TeX, and `makeinfo'; this helps avoid
  9911. -unnecessary dependencies between our distributions, so that users can
  9912. -install whichever packages they want to install.
  9913. -
  9914. -   Non-source files that might actually be modified by building and
  9915. -installing the program should *never* be included in the distribution.
  9916. -So if you do distribute non-source files, always make sure they are up
  9917. -to date when you make a new distribution.
  9918. -
  9919. -   Make sure that the directory into which the distribution unpacks (as
  9920. -well as any subdirectories) are all world-writable (octal mode 777).
  9921. -This is so that old versions of `tar' which preserve the ownership and
  9922. -permissions of the files from the tar archive will be able to extract
  9923. -all the files even if the user is unprivileged.
  9924. -
  9925. -   Make sure that all the files in the distribution are world-readable.
  9926. -
  9927. -   Make sure that no file name in the distribution is more than 14
  9928. -characters long.  Likewise, no file created by building the program
  9929. -should have a name longer than 14 characters.  The reason for this is
  9930. -that some systems adhere to a foolish interpretation of the POSIX
  9931. -standard, and refuse to open a longer name, rather than truncating as
  9932. -they did in the past.
  9933. -
  9934. -   Don't include any symbolic links in the distribution itself.  If the
  9935. -tar file contains symbolic links, then people cannot even unpack it on
  9936. -systems that don't support symbolic links.  Also, don't use multiple
  9937. -names for one file in different directories, because certain file
  9938. -systems cannot handle this and that prevents unpacking the distribution.
  9939. -
  9940. -   Try to make sure that all the file names will be unique on MS-DOS.  A
  9941. -name on MS-DOS consists of up to 8 characters, optionally followed by a
  9942. -period and up to three characters.  MS-DOS will truncate extra
  9943. -characters both before and after the period.  Thus, `foobarhacker.c'
  9944. -and `foobarhacker.o' are not ambiguous; they are truncated to
  9945. -`foobarha.c' and `foobarha.o', which are distinct.
  9946. -
  9947. -   Include in your distribution a copy of the `texinfo.tex' you used to
  9948. -test print any `*.texinfo' or `*.texi' files.
  9949. -
  9950. -   Likewise, if your program uses small GNU software packages like
  9951. -regex, getopt, obstack, or termcap, include them in the distribution
  9952. -file.  Leaving them out would make the distribution file a little
  9953. -smaller at the expense of possible inconvenience to a user who doesn't
  9954. -know what other files to get.
  9955. -
  9956. -
  9957. -
  9958. -Tag Table:
  9959. -Node: Top968
  9960. -Node: Preface1482
  9961. -Node: Intellectual Property2525
  9962. -Node: Reading Non-Free Code2881
  9963. -Node: Contributions4613
  9964. -Node: Design Advice6211
  9965. -Node: Compatibility6694
  9966. -Node: Using Extensions8338
  9967. -Node: ANSI C9840
  9968. -Node: Source Language11076
  9969. -Node: Program Behavior12210
  9970. -Node: Semantics12802
  9971. -Node: Libraries16556
  9972. -Node: Errors17791
  9973. -Node: User Interfaces19014
  9974. -Node: Memory Usage36015
  9975. -Node: Writing C37012
  9976. -Node: Formatting37654
  9977. -Node: Comments40926
  9978. -Node: Syntactic Conventions43719
  9979. -Node: Names46617
  9980. -Node: System Portability47929
  9981. -Node: CPU Portability49705
  9982. -Node: System Functions51812
  9983. -Node: Documentation56684
  9984. -Node: GNU Manuals57228
  9985. -Node: Manual Structure Details59270
  9986. -Node: NEWS File60675
  9987. -Node: Change Logs61356
  9988. -Node: Man Pages65109
  9989. -Node: Reading other Manuals66728
  9990. -Node: Managing Releases67512
  9991. -Node: Configuration68218
  9992. -Node: Makefile Conventions75158
  9993. -Node: Makefile Basics75682
  9994. -Node: Utilities in Makefiles78153
  9995. -Node: Command Variables80027
  9996. -Node: Directory Variables82863
  9997. -Node: Standard Targets92968
  9998. -Node: Releases102716
  9999. -
  10000. -End Tag Table
  10001. diff -rup --new-file baseline/fsf/autoconf/testsuite/Makefile.in amiga/fsf/autoconf/testsuite/Makefile.in
  10002. --- baseline/fsf/autoconf/testsuite/Makefile.in    Tue Feb  7 15:41:14 1995
  10003. +++ amiga/fsf/autoconf/testsuite/Makefile.in    Sat Sep 28 00:00:00 1996
  10004. @@ -38,6 +38,7 @@ SHELL = /bin/sh
  10005.  
  10006.  all:
  10007.  info:
  10008. +guide:
  10009.  dvi:
  10010.  
  10011.  check: site.exp all
  10012.