From cdb1a88ba117d92991298445e5db51b6e1f5ce3c Mon Sep 17 00:00:00 2001 From: Alon Bar-Lev Date: Sat, 27 Jul 2013 20:22:00 +0000 Subject: do not assume dead code existence in autoconf checks when compiler optimize source, it removes dead code so a linkage error in these cases are not visisble. Signed-off-by: Alon Bar-Lev https://bugs.freedesktop.org/show_bug.cgi?id=67413 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 64f39c6..e57272b 100644 --- a/configure.ac +++ b/configure.ac @@ -100,9 +100,9 @@ if test "$os_unix" = "yes"; then AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_CHECK_DECLS([__progname]) - AC_LINK_IFELSE([AC_LANG_SOURCE([extern char *__progname; void main() { }])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern char *__progname;]], [[__progname=(char*)0;]])], [AC_DEFINE(HAVE___PROGNAME, [1], [Whether __progname available])]) - AC_LINK_IFELSE([AC_LANG_SOURCE([extern int __libc_enable_secure; void main() { }])], + AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern int __libc_enable_secure;]], [[__libc_enable_secure = 0;]])], [AC_DEFINE(HAVE___LIBC_ENABLE_SECURE, [1], [Whether __libc_enable_secure available])]) fi -- cgit v1.1