Browse Source

For the linker test (for checking flags) make sure it has
some code to link with.


git-svn-id: svn://bind10.isc.org/svn/bind10/trunk@3888 e5f2f494-b856-4b98-b285-d166d9295462

Jeremy C. Reed 14 years ago
parent
commit
d1ac56213c
1 changed files with 3 additions and 2 deletions
  1. 3 2
      configure.ac

+ 3 - 2
configure.ac

@@ -195,14 +195,15 @@ fi
 # specify the default warning flags in CXXFLAGS and let specific modules
 # "override" the default.
 
-# This may be used to try compiler flags.
+# This may be used to try linker flags.
 AC_DEFUN([BIND10_CXX_TRY_FLAG], [
   AC_MSG_CHECKING([whether $CXX supports $1])
 
   bind10_save_CXXFLAGS="$CXXFLAGS"
   CXXFLAGS="$CXXFLAGS $1"
 
-  AC_LINK_IFELSE([ ], [bind10_cxx_flag=yes], [bind10_cxx_flag=no])
+  AC_LINK_IFELSE([int main(void){ return 0;} ],
+                 [bind10_cxx_flag=yes], [bind10_cxx_flag=no])
   CXXFLAGS="$bind10_save_CXXFLAGS"
 
   if test "x$bind10_cxx_flag" = "xyes"; then