Changeset 12040


Ignore:
Timestamp:
Feb 25, 2011, 1:44:32 AM (12 years ago)
Author:
jordan
Message:

(trunk) #2338 "Add uTP support" -- have the autoconf system default to build uTP support iff a C++ compiler can be found by AC_PROG_CXX

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure.ac

    r11985 r12040  
    220220dnl  utp
    221221
     222AC_MSG_CHECKING([µTP])
     223build_utp="no"
     224if test "x$CXX" = "x" ; then
     225    have_utp="no"
     226else
     227    have_utp="yes"
     228fi
    222229AC_ARG_ENABLE([utp],
    223230              AS_HELP_STRING([--enable-utp],[build µTP support]),
    224               [build_utp=${enableval}],
    225               [build_utp=no])
    226 if test "x$build_utp" = "xyes" ; then
    227     LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
    228     LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a -lrt"
    229     AC_DEFINE([WITH_UTP],[1])
    230 fi
     231              [want_utp=${enableval}],
     232              [want_utp=${have_utp}])
     233if test "x$want_utp" = "xyes" ; then
     234    if test "x$have_utp" = "xyes"; then
     235        LIBUTP_CFLAGS="-I\$(top_srcdir)/third-party/"
     236        LIBUTP_LIBS="\$(top_builddir)/third-party/libutp/libutp.a -lrt"
     237        AC_DEFINE([WITH_UTP],[1])
     238        build_utp="yes"
     239    else
     240      AC_MSG_ERROR("Unable to build uTP support -- C++ compiler not found")
     241    fi
     242fi
    231243AC_SUBST(LIBUTP_CFLAGS)
    232244AC_SUBST(LIBUTP_LIBS)
    233245AM_CONDITIONAL([BUILD_UTP],[test "x$build_utp" = "xyes"])
     246AC_MSG_RESULT([$build_utp])
    234247
    235248
Note: See TracChangeset for help on using the changeset viewer.