Changeset 14407 for trunk/configure.ac


Ignore:
Timestamp:
Dec 27, 2014, 11:21:01 PM (7 years ago)
Author:
mikedld
Message:

#5805: Allow building against system libutp (patch by jbeich)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r14383 r14407  
    212212AC_MSG_CHECKING([µTP])
    213213build_utp="no"
    214 if test "x$CXX" != "x" ; then
    215     have_utp="yes"
    216 else
    217     have_utp="no"
    218 fi
     214
     215ac_save_LIBS="$LIBS"
     216LIBS="-lutp"
     217AC_LINK_IFELSE(
     218  [AC_LANG_PROGRAM([#include <libutp/utp.h>],
     219                   [struct UTPFunctionTable func;])],
     220  [have_utp="yes"],
     221  [have_utp="no"]
     222)
     223LIBS=$ac_save_LIBS
     224
    219225AC_ARG_ENABLE([utp],
    220226              AS_HELP_STRING([--enable-utp],[build µTP support]),
    221227              [want_utp=${enableval}],
    222228              [want_utp=${have_utp}])
    223 if test "x$want_utp" = "xyes" ; then
     229if test "x$want_utp" = "xyes"; then
    224230    if test "x$have_utp" = "xyes"; then
     231        dnl Would be lovely if it had pkgconfig
     232        LIBUTP_CFLAGS=""
     233        LIBUTP_LIBS="-lutp $libutp_extra_libs"
     234        LIBUTP_LIBS_QT="-lutp $libutp_extra_libs"
     235        AC_DEFINE([WITH_UTP],[1])
     236        build_utp="system"
     237    elif test "x$CXX" != "x"; then
    225238        LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
    226239        LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a"
Note: See TracChangeset for help on using the changeset viewer.