autogen_back

AutoGen-erating an Autoconf Configure Test

Main
AutoGen
Pages

Home
Announce
FAQ
docs
XML Defs
testimonials
downloads

Automated
Options

AutoOpts
Comparison
Man example
Redistribute
Licensing
local use
using getopt

GCC's
Fixincludes

fixincludes

Automated
FSM

description
example
usagefsm

Addons
addon

Autoconf
Config
Tests

create form
M4 Quoting

Automated
XDR

xdr project

i On this and a following page, you can fill out a form describing a configure test, and AutoGen will be invoked to construct a well-formed Autoconf macro.

On this page, you will just specify a few names and the type of test you need to perform. The type of test will affect the information we need to obtain on the next page. Your personal name is optional and simply affects some attribution documentation. If you omit a prefix, it will default to "AC".

BEWARE: There are some obnoxious people around who know how to clobber or render unmodifiable a database used by this function. If that happens, this form may fail. Please let me know so I can fix permissions:



Your name: (with optional email address)
Prefix: (prefixes external names)
Name of test: (use C syntax for names, this entry is required)
Type of test:
     
compile You type in a program and the test is successful if it compiles cleanly.
link You type in a program and the test is successful if it both compiles and links cleanly.
run You type in a program and the test is successful if it compiles and links cleanly then, when run with no arguments, it exits with a zero status code. If you are concerned about cross platform builds, then you should avoid "run" tests because they do not work in a cross-build environment.
with This form allows you to specify how to handle the presence of the ``--with-<test-name>'' command line option, where ``test-name'' is the ``name of test'' you provide above. The option defaults to disabled (without) state.
without This form allows you to specify how to handle the presence of the ``--without-<test-name>'' command line option. This differs from ``with'' only in that it defaults to enabled (with).
withlib This form combines several ``with'' options with a library existence or functionality test. The ``test-name'' should correspond to what you would use in the ``-ltest-name'' link option. The ``with'' options provided are:
  • --with-libtest-name=/install/prefix
  • --with-libtest-name-include=/path/to/inc/dir
  • --with-libtest-name-lib="-L/path/to/lib [ -lname ]"

The first of these is equivalent to:

  • --with-libtest-name-include=/install/prefix/include
  • --with-libtest-name-lib="-L/install/prefix/lib -ltest-name"
withconf This form combines ``withlib'' with a library config script test. The ``test-name'' should correspond to what you would use in the ``-ltest-name'' link option, and there should be an associated config script for this library named, ``test-name-config''. You will be prompted for the options to provide.

If the user provides the configure option,

   --with-libtest-name=/install/prefix

then this macro will search for ``test-name-config'' in both the bin directory under that directory as well as in the ``PATH'' variable.

enable This is identical to ``with'', except that it uses ``enable/disable'' instead of ``with/without''.
disable This is identical to ``without'', except that it uses ``enable/disable'' instead of ``with/without''.
test This is an arbitrary shell script test. It will run in a subshell, so do not set variables you intend to use later. This script should ``exit 0'' to indicate success and ``exit 1'' for failure.

For example, to test to see if the "C" compiler accepts the ``--mumble'' option, you might code a test thus:

  echo "int foo;" > conftest.c
  ${CC-cc} --mumble -c conftest.c
  res=$?
  rm -f conftest.*
  exit $res

top  Viewable With Any Browser  SourceForge Logo   Support This Project   Valid XHTML 1.0!


AutoGen, AutoOpts, columns, getdefs, AutoFSM, AutoXDR and these web pages copyright (c) 1999-2012 Bruce Korb, all rights reserved.
Last modified: Sun Sep 8 12:15:18 PDT 2013