(autoconf.info)Particular Programs


Next: Generic Programs Prev: Alternative Programs Up: Alternative Programs
Enter node , (file) or (file)node

4.1.1 Particular Program Checks
-------------------------------

These macros check for particular programs--whether they exist, and in
some cases whether they support certain features.

 -- Macro: AC_DECL_YYTEXT
     Define 'YYTEXT_POINTER' if 'yytext' is a 'char *' instead of a
     'char []'.  Also set output variable 'LEX_OUTPUT_ROOT' to the base
     of the file name that the lexer generates; usually 'lex.yy', but
     sometimes something else.  These results vary according to whether
     'lex' or 'flex' is being used.

 -- Macro: AC_PROG_AWK
     Check for 'mawk', 'gawk', 'nawk', and 'awk', in that order, and set
     output variable 'AWK' to the first one that it finds.  It tries
     'mawk' first because that is reported to be the fastest
     implementation.

 -- Macro: AC_PROG_CC
     Determine a C compiler to use.  If 'CC' is not already set in the
     environment, check for 'gcc', and use 'cc' if that's not found.
     Set output variable 'CC' to the name of the compiler found.

     If using the GNU C compiler, set shell variable 'GCC' to 'yes',
     empty otherwise.  If output variable 'CFLAGS' was not already set,
     set it to '-g -O2' for the GNU C compiler ('-O2' on systems where
     GCC does not accept '-g'), or '-g' for other compilers.

     If the C compiler being used does not produce executables that can
     run on the system where 'configure' is being run, set the shell
     variable 'cross_compiling' to 'yes', otherwise 'no'.  In other
     words, this tests whether the build system type is different from
     the host system type (the target system type is irrelevant to this
     test).  Note: Manual Configuration, for more on support for cross
     compiling.

 -- Macro: AC_PROG_CC_C_O
     If the C compiler does not accept the '-c' and '-o' options
     simultaneously, define 'NO_MINUS_C_MINUS_O'.

 -- Macro: AC_PROG_CPP
     Set output variable 'CPP' to a command that runs the C
     preprocessor.  If '$CC -E' doesn't work, it uses '/lib/cpp'.  It is
     only portable to run 'CPP' on files with a '.c' extension.

     If the current language is C (Note: Language Choice), many of the
     specific test macros use the value of 'CPP' indirectly by calling
     'AC_TRY_CPP', 'AC_CHECK_HEADER', 'AC_EGREP_HEADER', or
     'AC_EGREP_CPP'.

 -- Macro: AC_PROG_CXX
     Determine a C++ compiler to use.  Check if the environment variable
     'CXX' or 'CCC' (in that order) is set; if so, set output variable
     'CXX' to its value.  Otherwise search for a C++ compiler under
     likely names ('c++', 'g++', 'gcc', 'CC', 'cxx', and 'cc++').  If
     none of those checks succeed, as a last resort set 'CXX' to 'gcc'.

     If using the GNU C++ compiler, set shell variable 'GXX' to 'yes',
     empty otherwise.  If output variable 'CXXFLAGS' was not already
     set, set it to '-g -O2' for the GNU C++ compiler ('-O2' on systems
     where G++ does not accept '-g'), or '-g' for other compilers.

     If the C++ compiler being used does not produce executables that
     can run on the system where 'configure' is being run, set the shell
     variable 'cross_compiling' to 'yes', otherwise 'no'.  In other
     words, this tests whether the build system type is different from
     the host system type (the target system type is irrelevant to this
     test).  Note: Manual Configuration, for more on support for cross
     compiling.

 -- Macro: AC_PROG_CXXCPP
     Set output variable 'CXXCPP' to a command that runs the C++
     preprocessor.  If '$CXX -E' doesn't work, it uses '/lib/cpp'.  It
     is only portable to run 'CXXCPP' on files with a '.c', '.C', or
     '.cc' extension.

     If the current language is C++ (Note: Language Choice), many of
     the specific test macros use the value of 'CXXCPP' indirectly by
     calling 'AC_TRY_CPP', 'AC_CHECK_HEADER', 'AC_EGREP_HEADER', or
     'AC_EGREP_CPP'.

 -- Macro: AC_PROG_F77
     Determine a Fortran 77 compiler to use.  If 'F77' is not already
     set in the environment, check for 'g77', 'f77' and 'f2c', in that
     order.  Set the output variable 'F77' to the name of the compiler
     found.

     If using 'g77' (the GNU Fortran 77 compiler), then 'AC_PROG_F77'
     will set the shell variable 'G77' to 'yes', and empty otherwise.
     If the output variable 'FFLAGS' was not already set in the
     environment, then set it to '-g -02' for 'g77' (or '-O2' where
     'g77' does not accept '-g').  Otherwise, set 'FFLAGS' to '-g' for
     all other Fortran 77 compilers.

 -- Macro: AC_PROG_F77_C_O
     Test if the Fortran 77 compiler accepts the options '-c' and '-o'
     simultaneously, and define 'F77_NO_MINUS_C_MINUS_O' if it does not.

 -- Macro: AC_PROG_GCC_TRADITIONAL
     Add '-traditional' to output variable 'CC' if using the GNU C
     compiler and 'ioctl' does not work properly without '-traditional'.
     That usually happens when the fixed header files have not been
     installed on an old system.  Since recent versions of the GNU C
     compiler fix the header files automatically when installed, this is
     becoming a less prevalent problem.

 -- Macro: AC_PROG_INSTALL
     Set output variable 'INSTALL' to the path of a BSD compatible
     'install' program, if one is found in the current 'PATH'.
     Otherwise, set 'INSTALL' to 'DIR/install-sh -c', checking the
     directories specified to 'AC_CONFIG_AUX_DIR' (or its default
     directories) to determine DIR (Note: Output).  Also set the
     variables 'INSTALL_PROGRAM' and 'INSTALL_SCRIPT' to '${INSTALL}'
     and 'INSTALL_DATA' to '${INSTALL} -m 644'.

     This macro screens out various instances of 'install' known to not
     work.  It prefers to find a C program rather than a shell script,
     for speed.  Instead of 'install-sh', it can also use 'install.sh',
     but that name is obsolete because some 'make' programs have a rule
     that creates 'install' from it if there is no 'Makefile'.

     A copy of 'install-sh' which you may use comes with Automake.  If
     you use 'AC_PROG_INSTALL', you must include either 'install-sh' or
     'install.sh' in your distribution, or 'configure' will produce an
     error message saying it can't find them--even if the system you're
     on has a good 'install' program.  This check is a safety measure to
     prevent you from accidentally leaving that file out, which would
     prevent your package from installing on systems that don't have a
     BSD-compatible 'install' program.

     If you need to use your own installation program because it has
     features not found in standard 'install' programs, there is no
     reason to use 'AC_PROG_INSTALL'; just put the pathname of your
     program into your 'Makefile.in' files.

 -- Macro: AC_PROG_LEX
     If 'flex' is found, set output variable 'LEX' to 'flex' and
     'LEXLIB' to '-lfl', if that library is in a standard place.
     Otherwise set 'LEX' to 'lex' and 'LEXLIB' to '-ll'.

 -- Macro: AC_PROG_LN_S
     If 'ln -s' works on the current filesystem (the operating system
     and filesystem support symbolic links), set output variable 'LN_S'
     to 'ln -s', otherwise set it to 'ln'.

     If the link is put in a directory other than the current directory,
     its meaning depends on whether 'ln' or 'ln -s' is used.  To safely
     create links using '$(LN_S)', either find out which form is used
     and adjust the arguments, or always invoke 'ln' in the directory
     where the link is to be created.

     In other words, it does not work to do
          $(LN_S) foo /x/bar

     Instead, do

          (cd /x && $(LN_S) foo bar)

 -- Macro: AC_PROG_RANLIB
     Set output variable 'RANLIB' to 'ranlib' if 'ranlib' is found,
     otherwise to ':' (do nothing).

 -- Macro: AC_PROG_YACC
     If 'bison' is found, set output variable 'YACC' to 'bison -y'.
     Otherwise, if 'byacc' is found, set 'YACC' to 'byacc'.  Otherwise
     set 'YACC' to 'yacc'.


automatically generated by info2www version 1.2.2.9