Home | History | Annotate | Download | only in m4
      1 dnl builtin_expect is used in module we can't add that in config.h
      2 AC_DEFUN([AX_BUILTIN_EXPECT],
      3 [
      4 AC_MSG_CHECKING([whether __builtin_expect is understood])
      5 SAVE_CFLAGS=$CFLAGS
      6 CFLAGS="-Werror $CFLAGS"
      7 AC_TRY_LINK(,[
      8 int i;
      9 if (__builtin_expect(i, 0)) { }
     10 ],
     11 AC_MSG_RESULT([yes]); EXTRA_CFLAGS_MODULE="$EXTRA_CFLAGS_MODULE -DEXPECT_OK",
     12 AC_MSG_RESULT([no]);)
     13 CFLAGS=$SAVE_CFLAGS 
     14 ]
     15 ) 
     16