Use AC_LINK_IFELSE() rather than AC_RUN_IFELSE() in JE_COMPILABLE().

Reported by Mike Hommey.
This commit is contained in:
Jason Evans 2012-03-19 09:54:20 -07:00
parent 7091b415bb
commit f3e139a1ef

View File

@ -27,16 +27,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
dnl JE_COMPILABLE(label, hcode, mcode, rvar) dnl JE_COMPILABLE(label, hcode, mcode, rvar)
dnl dnl
dnl Use AC_RUN_IFELSE() rather than AC_COMPILE_IFELSE() so that linker errors dnl Use AC_LINK_IFELSE() rather than AC_COMPILE_IFELSE() so that linker errors
dnl cause failure. dnl cause failure.
AC_DEFUN([JE_COMPILABLE], AC_DEFUN([JE_COMPILABLE],
[ [
AC_CACHE_CHECK([whether $1 is compilable], AC_CACHE_CHECK([whether $1 is compilable],
[$4], [$4],
[AC_RUN_IFELSE([AC_LANG_PROGRAM([$2], [AC_LINK_IFELSE([AC_LANG_PROGRAM([$2],
[$3])], [$3])],
[$4=yes], [$4=yes],
[$4=no])]) [$4=no])])
]) ])
dnl ============================================================================ dnl ============================================================================