mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-05 17:52:29 +00:00
81de60e0ae
Changes to CFLAGS/CXXFLAGS/LIBS affect following lines in configure.ac. As originally written, this would cause random libraries, such as libtorrent, to be linked into the autoconf test program. Occasionally, this would cause the things like the pkgconfig checks to fail with mysterious linker errors (e.g. rakshasa/rtorrent#156). Instead, only populate these global flags with the additional flags for dependencies at the very end, before the invocation of AC_OUTPUT.
79 lines
2.0 KiB
Plaintext
79 lines
2.0 KiB
Plaintext
AC_INIT(rtorrent, 0.9.7, sundell.software@gmail.com)
|
|
|
|
AC_DEFINE(API_VERSION, 9, api version)
|
|
|
|
AM_INIT_AUTOMAKE
|
|
AC_CONFIG_HEADERS(config.h)
|
|
|
|
AC_PROG_RANLIB
|
|
AC_PROG_CXX
|
|
AC_PROG_LIBTOOL
|
|
|
|
RAK_CHECK_CFLAGS
|
|
RAK_CHECK_CXXFLAGS
|
|
RAK_ENABLE_DEBUG
|
|
RAK_ENABLE_EXTRA_DEBUG
|
|
RAK_ENABLE_WERROR
|
|
|
|
RAK_CHECK_CXX11
|
|
RAK_CHECK_TR1_LIB
|
|
|
|
TORRENT_DISABLE_IPV6
|
|
|
|
AC_SYS_LARGEFILE
|
|
|
|
TORRENT_CHECK_EXECINFO
|
|
|
|
TORRENT_ENABLE_ARCH
|
|
TORRENT_WITH_SYSROOT
|
|
|
|
TORRENT_WITHOUT_VARIABLE_FDSET
|
|
TORRENT_WITHOUT_STATVFS
|
|
TORRENT_WITHOUT_STATFS
|
|
|
|
AX_PTHREAD([], AC_MSG_ERROR([requires pthread]))
|
|
AX_WITH_CURSES
|
|
|
|
if test "x$ax_cv_ncursesw" != xyes && test "x$ax_cv_ncurses" != xyes; then
|
|
AC_MSG_ERROR([requires either NcursesW or Ncurses library])
|
|
fi
|
|
|
|
PKG_CHECK_MODULES([LIBCURL], [libcurl], , [LIBCURL_CHECK_CONFIG])
|
|
PKG_CHECK_MODULES([CPPUNIT], [cppunit],, [no_cppunit="yes"])
|
|
PKG_CHECK_MODULES([DEPENDENCIES], [libtorrent >= 0.13.7])
|
|
|
|
AC_LANG_PUSH(C++)
|
|
TORRENT_WITH_XMLRPC_C
|
|
AC_LANG_POP(C++)
|
|
|
|
AC_DEFINE(HAVE_CONFIG_H, 1, true if config.h was included)
|
|
AC_DEFINE(USER_AGENT, [std::string(PACKAGE "/" VERSION "/") + torrent::version()], Http user agent)
|
|
|
|
AC_CHECK_FUNCS(posix_memalign)
|
|
TORRENT_CHECK_CACHELINE()
|
|
TORRENT_CHECK_POPCOUNT()
|
|
|
|
CC_ATTRIBUTE_UNUSED(
|
|
AC_DEFINE([__UNUSED], [__attribute__((unused))], [Wrapper around unused attribute]),
|
|
AC_DEFINE([__UNUSED], [], [Null-wrapper if unused attribute is unsupported])
|
|
)
|
|
|
|
dnl Only update global build variables immediately before generating the output,
|
|
dnl to avoid affecting the global build environment for other autoconf checks.
|
|
LIBS="$PTHREAD_LIBS $CURSES_LIB $CPPUNIT_LIBS $LIBCURL $LIBCURL_LIBS $DEPENDENCIES_LIBS $LIBS"
|
|
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $LIBCURL_CPPFLAGS $LIBCURL_CFLAGS $DEPENDENCIES_CFLAGS $CURSES_CFLAGS"
|
|
CXXFLAGS="$CXXFLAGS $PTHREAD_CFLAGS $CPPUNIT_CFLAGS $LIBCURL_CPPFLAGS $LIBCURL_CFLAGS $DEPENDENCIES_CFLAGS $CURSES_CFLAGS"
|
|
|
|
AC_OUTPUT([
|
|
Makefile
|
|
doc/Makefile
|
|
src/Makefile
|
|
src/core/Makefile
|
|
src/display/Makefile
|
|
src/input/Makefile
|
|
src/rpc/Makefile
|
|
src/ui/Makefile
|
|
src/utils/Makefile
|
|
test/Makefile
|
|
])
|