Ticket #5612: transmission-02-fix-cxx-check-with-ccache.patch

File transmission-02-fix-cxx-check-with-ccache.patch, 1.2 KB (added by patrickdepinguin, 8 years ago)

Patch fixing the issue

  • configure.ac

    transmission: fix incorrect check of CXX when ccache is enabled
    
    When ccache is enabled, the configure script is called with
    CXX="/path/to/ccache /path/to/cxx". The AC_PROG_CXX correctly deals with
    this, but the transmission-specific extra checks on CXX do not. It uses
    AC_CHECK_PROG, which takes the first word of CXX (ccache) only.
    
    This patch removes the seemingly unneeded extra checks, and additionally
    replaces HAVE_CXX=yes/no with a direct check on CXX, as it is only used in
    one place.
    
    Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
    
    ---
    
    diff --git a/configure.ac b/configure.ac
    a b AC_SUBST(LIBAPPINDICATOR_MINIMUM) 
    6969
    7070AC_PROG_CC
    7171AC_PROG_CXX
    72 if test "x$CXX" != "x"; then # CXX is set...
    73   if test -f "$CXX"; then # maybe it's an absolute path passed in env variables...
    74     AC_MSG_CHECKING([for $CXX])
    75     HAVE_CXX="yes"
    76     AC_MSG_RESULT([$HAVE_CXX])
    77   else
    78     AC_CHECK_PROG([HAVE_CXX],[$CXX],[yes],[no])
    79   fi
    80 fi
    8172AC_C_INLINE
    8273if test "x$GCC" = "xyes" ; then
    8374
    AC_CHECK_LIB([rt], 
    216207
    217208AC_MSG_CHECKING([µTP])
    218209build_utp="no"
    219 if test "x$HAVE_CXX" = "xyes" ; then
     210if test "x$CXX" != "x" ; then
    220211    have_utp="yes"
    221212else
    222213    have_utp="no"