Define
SIZEOF_type-or-expr (see Standard Symbols) to be the size in bytes of type-or-expr, which may be either a type or an expression returning a value that has a size. If the expression ‘sizeof (type-or-expr)’ is invalid, the result is 0. includes is a series of include directives, defaulting toAC_INCLUDES_DEFAULT(see Default Includes), which are used prior to the expression under test.This macro now works even when cross-compiling. The unused argument was used when cross-compiling.
For example, the call
AC_CHECK_SIZEOF([int *])defines
SIZEOF_INT_Pto be 8 on DEC Alpha AXP systems.This macro caches its result in the
ac_cv_sizeof_type-or-expr variable, with ‘*’ mapped to ‘p’ and other characters not suitable for a variable name mapped to underscores.
Define
ALIGNOF_type (see Standard Symbols) to be the alignment in bytes of type. ‘type y;’ must be valid as a structure member declaration. If ‘type’ is unknown, the result is 0. If no includes are specified, the default includes are used (see Default Includes).This macro caches its result in the
ac_cv_alignof_type-or-expr variable, with ‘*’ mapped to ‘p’ and other characters not suitable for a variable name mapped to underscores.
Store into the shell variable var the value of the integer expression. The value should fit in an initializer in a C variable of type
signed long. To support cross compilation (in which case, the macro only works on hosts that use twos-complement arithmetic), it should be possible to evaluate the expression at compile-time. If no includes are specified, the default includes are used (see Default Includes).Execute action-if-fails if the value cannot be determined correctly.
Normally Autoconf ignores warnings generated by the compiler, linker, and preprocessor. If this macro is used, warnings count as fatal errors for the current language. This macro is useful when the results of configuration are used where warnings are unacceptable; for instance, if parts of a program are built with the GCC -Werror option. If the whole program is built using -Werror it is often simpler to put -Werror in the compiler flags (
CFLAGS, etc.).
OpenMP specifies extensions of C, C++, and Fortran that simplify optimization of shared memory parallelism, which is a common problem on multicore CPUs.
If the current language is C, the macro
AC_OPENMPsets the variableOPENMP_CFLAGSto the C compiler flags needed for supporting OpenMP.OPENMP_CFLAGSis set to empty if the compiler already supports OpenMP, if it has no way to activate OpenMP support, or if the user rejects OpenMP support by invoking ‘configure’ with the ‘--disable-openmp’ option.
OPENMP_CFLAGSneeds to be used when compiling programs, when preprocessing program source, and when linking programs. Therefore you need to add$(OPENMP_CFLAGS)to theCFLAGSof C programs that use OpenMP. If you preprocess OpenMP-specific C code, you also need to add$(OPENMP_CFLAGS)toCPPFLAGS. The presence of OpenMP support is revealed at compile time by the preprocessor macro_OPENMP.Linking a program with
OPENMP_CFLAGStypically adds one more shared library to the program's dependencies, so its use is recommended only on programs that actually require OpenMP.If the current language is C++,
AC_OPENMPsets the variableOPENMP_CXXFLAGS, suitably for the C++ compiler. The same remarks hold as for C.If the current language is Fortran 77 or Fortran,
AC_OPENMPsets the variableOPENMP_FFLAGSorOPENMP_FCFLAGS, respectively. Similar remarks as for C hold, except thatCPPFLAGSis not used for Fortran, and no preprocessor macro signals OpenMP support.For portability, it is best to avoid spaces between ‘#’ and ‘pragma omp’. That is, write ‘#pragma omp’, not ‘# pragma omp’. The Sun WorkShop 6.2 C compiler chokes on the latter.
This macro caches its result in the
ac_cv_prog_c_openmp,ac_cv_prog_cxx_openmp,ac_cv_prog_f77_openmp, orac_cv_prog_fc_openmpvariable, depending on the current language.