Make stack-protector check use AC_LINK_IFELSE.
authorGregory Maxwell <greg@xiph.org>
Sat, 7 Jul 2012 06:29:56 +0000 (02:29 -0400)
committerGregory Maxwell <greg@xiph.org>
Sat, 7 Jul 2012 06:29:56 +0000 (02:29 -0400)
configure.ac

index 4a2499f..330cfde 100644 (file)
@@ -224,7 +224,7 @@ if test "x$ac_cv_c_compiler_gnu" = "xyes" ; then
 saved_CFLAGS="$CFLAGS"
 CFLAGS="$CFLAGS -fstack-protector-all"
 AC_MSG_CHECKING([if ${CC} supports -fstack-protector-all])
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([char foo;])],
+AC_LINK_IFELSE([AC_LANG_SOURCE([void main(void){char foo;}])],
       [ AC_MSG_RESULT([yes])
         STACK_PROTECTOR="-fstack-protector-all" ],
         AC_MSG_RESULT([no]))