Merge branch 'tmp'
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 14 Jan 2011 15:19:18 +0000 (15:19 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 14 Jan 2011 15:19:23 +0000 (15:19 +0000)
Reviewed-by: Will Thompson <will.thompson@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32854

1  2 
configure.in

diff --combined configure.in
@@@ -1038,7 -1038,7 +1038,7 @@@ AC_SUBST(DBUS_CLIENT_CFLAGS
  AC_SUBST(DBUS_CLIENT_LIBS)
  
  DBUS_BUS_CFLAGS="$XML_CFLAGS"
 -DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $INTLLIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs"
 +DBUS_BUS_LIBS="$XML_LIBS $SELINUX_LIBS $THREAD_LIBS $ADT_LIBS $NETWORK_libs"
  AC_SUBST(DBUS_BUS_CFLAGS)
  AC_SUBST(DBUS_BUS_LIBS)
  
  #### gcc warning flags
  
  cc_supports_flag() {
-   AC_MSG_CHECKING(whether $CC supports "$@")
-   Cfile=/tmp/foo${$}
-   touch ${Cfile}.c
-   $CC -c "$@" ${Cfile}.c -o ${Cfile}.o >/dev/null 2>&1
-   rc=$?
-   rm -f ${Cfile}.c ${Cfile}.o
-   case $rc in
-     0) AC_MSG_RESULT(yes);;
-     *) AC_MSG_RESULT(no);;
-   esac
-   return $rc
+   AC_MSG_CHECKING(whether $CC supports "$*")
+   save_CFLAGS="$CFLAGS"
+   CFLAGS="$*"
+   AC_TRY_COMPILE([], [], [rc=yes], [rc=no])
+   CFLAGS="$save_CFLAGS"
+   AC_MSG_RESULT([$rc])
+   test "x$rc" = xyes
  }
  
  ld_supports_flag() {
@@@ -1174,7 -1170,7 +1170,7 @@@ if test "x$GCC" = "xyes"; the
  
    case " $CFLAGS " in
    *[\ \       ]-Wfloat-equal[\ \      ]*) ;;
-   *) if cc_supports_flag -Wfloat-equals; then
+   *) if cc_supports_flag -Wfloat-equal; then
          CFLAGS="$CFLAGS -Wfloat-equal"
       fi
       ;;
@@@ -1697,6 -1693,7 +1693,6 @@@ echo 
          Building XML docs:        ${enable_xml_docs}
          Building cache support:   ${enable_userdb_cache}
          Building launchd support: ${have_launchd}
 -        Gettext libs (empty OK):  ${INTLLIBS}
          Using XML parser:         ${with_xml}
          Init scripts style:       ${with_init_scripts}
          Abstract socket names:    ${ac_cv_have_abstract_sockets}