Next: , Previous: Compilers and Preprocessors, Up: Existing Tests


5.11 System Services

The following macros check for operating system services or capabilities.

— Macro: AC_PATH_X

Try to locate the X Window System include files and libraries. If the user gave the command line options --x-includes=dir and --x-libraries=dir, use those directories.

If either or both were not given, get the missing values by running xmkmf (or an executable pointed to by the XMKMF environment variable) on a trivial Imakefile and examining the makefile that it produces. Setting XMKMF to ‘false’ disables this method.

If this method fails to find the X Window System, configure looks for the files in several directories where they often reside. If either method is successful, set the shell variables x_includes and x_libraries to their locations, unless they are in directories the compiler searches by default.

If both methods fail, or the user gave the command line option --without-x, set the shell variable no_x to ‘yes’; otherwise set it to the empty string.

— Macro: AC_PATH_XTRA

An enhanced version of AC_PATH_X. It adds the C compiler flags that X needs to output variable X_CFLAGS, and the X linker flags to X_LIBS. Define X_DISPLAY_MISSING if X is not available.

This macro also checks for special libraries that some systems need in order to compile X programs. It adds any that the system needs to output variable X_EXTRA_LIBS. And it checks for special X11R6 libraries that need to be linked with before -lX11, and adds any found to the output variable X_PRE_LIBS.

— Macro: AC_SYS_INTERPRETER

Check whether the system supports starting scripts with a line of the form ‘#!/bin/sh’ to select the interpreter to use for the script. After running this macro, shell code in configure.ac can check the shell variable interpval; it is set to ‘yes’ if the system supports ‘#!’, ‘no’ if not.

— Macro: AC_SYS_LARGEFILE

Arrange for large-file support. On some hosts, one must use special compiler options to build programs that can access large files. Append any such options to the output variable CC. Define _FILE_OFFSET_BITS and _LARGE_FILES if necessary.

Large-file support can be disabled by configuring with the --disable-largefile option.

If you use this macro, check that your program works even when off_t is wider than long int, since this is common when large-file support is enabled. For example, it is not correct to print an arbitrary off_t value X with printf ("%ld", (long int) X).

The LFS introduced the fseeko and ftello functions to replace their C counterparts fseek and ftell that do not use off_t. Take care to use AC_FUNC_FSEEKO to make their prototypes available when using them and large-file support is enabled.

— Macro: AC_SYS_LONG_FILE_NAMES

If the system supports file names longer than 14 characters, define HAVE_LONG_FILE_NAMES.

— Macro: AC_SYS_POSIX_TERMIOS

Check to see if the Posix termios headers and functions are available on the system. If so, set the shell variable ac_cv_sys_posix_termios to ‘yes’. If not, set the variable to ‘no’.