📄 aclocal_bugfix.m4
字号:
dnldnl Fixes to bugs in AC_xxx macrosdnl dnl (AC_TRY_COMPILE is missing a newline after the end in the Fortrandnl branch; that has been fixed in-place)dnldnl (AC_PROG_CC makes many dubious assumptions. One is that -O is safednl with -g, even with gcc. This isn't true; gcc will eliminate dead codednl when -O is used, even if you added code explicitly for debugging dnl purposes. -O shouldn't do dead code elimination when -g is selected, dnl unless a specific option is selected. Unfortunately, there is nodnl documented option to turn off dead code elimination.dnldnldnl (AC_CHECK_HEADER and AC_CHECK_HEADERS both make the erroneous assumptiondnl that the C-preprocessor and the C (or C++) compilers are the same programdnl and have the same search paths. In addition, CHECK_HEADER looks for dnl error messages to decide that the file is not available; unfortunately,dnl it also interprets messages such as "evaluation copy" and warning messagesdnl from broken CPP programs (such as IBM's xlc -E, which often warns about dnl "lm not a valid option"). Instead, we try a compilation step with the dnl C compiler.dnldnl AC_CONFIG_AUX_DIRS only checks for install-sh, but assumes otherdnl values are present. Also doesn't provide a way to override thednl sources of the various configure scripts. This replacementdnl version of AC_CONFIG_AUX_DIRS overcomes this.dnl Internal subroutine.dnl Search for the configuration auxiliary files in directory list $1.dnl We look only for install-sh, so users of AC_PROG_INSTALLdnl do not automatically need to distribute the other auxiliary files.dnl AC_CONFIG_AUX_DIRS(DIR ...)dnl Also note that since AC_CONFIG_AUX_DIR_DEFAULT calls this, therednl isn't a easy way to fix it other than replacing it completely.dnl This fix applies to 2.13dnl/*Ddnl AC_CONFIG_AUX_DIRS - Find the directory containing auxillery scriptsdnl for configurednldnl Synopsis:dnl AC_CONFIG_AUX_DIRS( [ directories to search ] )dnldnl Output Effect:dnl Sets 'ac_config_guess' to location of 'config.guess', 'ac_config_sub'dnl to location of 'config.sub', 'ac_install_sh' to the location ofdnl 'install-sh' or 'install.sh', and 'ac_configure' to the location of adnl Cygnus-style 'configure'. Only 'install-sh' is guaranteed to exist,dnl since the other scripts are needed only by some special macros.dnldnl The environment variable 'CONFIG_AUX_DIR', if set, overrides thednl directories listed. This is an extension to the 'autoconf' version ofdnl this macro. dnlD*/undefine([AC_CONFIG_AUX_DIRS])AC_DEFUN(AC_CONFIG_AUX_DIRS,[if test -f $CONFIG_AUX_DIR/install-sh ; then ac_aux_dir=$CONFIG_AUX_DIR elseac_aux_dir=for ac_dir in $1; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fidonefiif test -z "$ac_aux_dir"; then AC_MSG_ERROR([can not find install-sh or install.sh in $1])fiac_config_guess=$ac_aux_dir/config.guessac_config_sub=$ac_aux_dir/config.subac_configure=$ac_aux_dir/configure # This should be Cygnus configure.AC_PROVIDE([AC_CONFIG_AUX_DIR_DEFAULT])dnl])undefine([AC_CHECK_HEADER])AC_DEFUN(AC_CHECK_HEADER,[dnl Do the transliteration at runtime so arg 1 can be a shell variable.ac_safe=`echo "$1" | sed 'y%./+-%__p_%'`AC_MSG_CHECKING([for $1])AC_CACHE_VAL(ac_cv_header_$ac_safe,[cat >conftest.c<<EOF[#]line __oline__ "configure"#include "confdefs.h"#include <$1>int conftest() {return 0;}EOFac_compile_for_cpp='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.c 1>&AC_FD_CC'if AC_TRY_EVAL(ac_compile_for_cpp); then eval "ac_cv_header_$ac_safe=yes"else eval "ac_cv_header_$ac_safe=no" echo "configure: failed program was:" >&AC_FD_CC cat conftest.c >&AC_FD_CCfirm -f conftest*])dnlif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2])else AC_MSG_RESULT(no)ifelse([$3], , , [$3])dnlfi])
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -