Fix warnings from autoconf about "...no AC_LANG_SOURCE call detected..." by adding that call within the AC_LINK_IFELSE call.

This commit is contained in:
Eric Haszlakiewicz
2014-03-22 19:15:01 -04:00
parent 05da316b9c
commit 9f26d96f09

View File

@@ -40,12 +40,12 @@ AC_CHECK_DECLS([_finite], [], [], [[#include <float.h>]])
AC_LANG_PUSH([C])
AC_MSG_CHECKING([if .gnu.warning accepts long strings])
AC_LINK_IFELSE([[
AC_LINK_IFELSE([AC_LANG_SOURCE([[
extern void json_object_get();
__asm__(".section .gnu.json_object_get,\n\t.ascii \"Please link against libjson-c instead of libjson\"\n\t.text");
int main(int c,char* v) {return 0;}
]], [
]])], [
AC_DEFINE(HAS_GNU_WARNING_LONG, 1, [Define if .gnu.warning accepts long strings.])
AC_MSG_RESULT(yes)
], [