Browse Source

* Added configure options that allow building universal binaries.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@889 e378c898-3ddf-0310-93e7-cc216c733640
pull/30/head
rakshasa 19 years ago
parent
commit
4a449bae67
  1. 3
      configure.ac
  2. 46
      scripts/common.m4
  3. 3
      src/rpc/xmlrpc.cc

3
configure.ac

@ -17,6 +17,9 @@ AC_SYS_LARGEFILE
TORRENT_CHECK_EXECINFO()
TORRENT_OTFD()
TORRENT_ENABLE_ARCH
TORRENT_WITH_SYSROOT
TORRENT_WITHOUT_VARIABLE_FDSET()
TORRENT_WITHOUT_NCURSESW()
TORRENT_WITHOUT_STATVFS()

46
scripts/common.m4

@ -48,6 +48,52 @@ AC_DEFUN([TORRENT_ENABLE_EXTRA_DEBUG], [
])
AC_DEFUN([TORRENT_WITH_SYSROOT], [
AC_ARG_WITH(sysroot,
[ --with-sysroot=PATH compile and link with a specific sysroot.],
[
AC_MSG_CHECKING(for sysroot)
if test "$withval" = "no"; then
AC_MSG_RESULT(no)
elif test "$withval" = "yes"; then
AC_MSG_RESULT(not a path)
AC_MSG_ERROR(The sysroot option must point to a directory, like f.ex "/Developer/SDKs/MacOSX10.4u.sdk".)
else
AC_MSG_RESULT($withval)
CXXFLAGS="$CXXFLAGS -isysroot $withval"
LDFLAGS="$LDFLAGS -Wl,-syslibroot,$withval"
fi
])
])
AC_DEFUN([TORRENT_ENABLE_ARCH], [
AC_ARG_ENABLE(arch,
[ --enable-arch=ARCH comma seprated list of architectures to compile for.],
[
AC_MSG_CHECKING(for target architectures)
if test "$enableval" = "yes"; then
AC_MSG_ERROR(no arch supplied)
elif test "$enableval" = "no"; then
AC_MSG_RESULT(using default)
else
AC_MSG_RESULT($enableval)
for i in `IFS=,; echo $enableval`; do
CXXFLAGS="$CXXFLAGS -arch $i"
LDFLAGS="$LDFLAGS -arch $i"
done
fi
])
])
AC_DEFUN([TORRENT_OTFD], [
AC_LANG_PUSH(C++)
AC_MSG_CHECKING(for proper overloaded template function disambiguation)

3
src/rpc/xmlrpc.cc

@ -72,6 +72,7 @@ xmlrpc_call_command(xmlrpc_env* env, xmlrpc_value* args, void* voidServerInfo) {
if (env->fault_occurred)
return NULL;
// Move this into a helper function.
for (unsigned int i = 0; i != last; i++) {
xmlrpc_value* value;
xmlrpc_array_read_item(env, args, i, &value);
@ -154,6 +155,8 @@ XmlRpc::XmlRpc() : m_env(new xmlrpc_env) {
xmlrpc_env_init(m_env);
m_registry = xmlrpc_registry_new(m_env);
// Add a helper function for this...
xmlrpc_registry_add_method_w_doc(m_env, m_registry, NULL, "call.set_upload_rate", &xmlrpc_call_command, new server_info_t("upload_rate", &m_slotSet), "i:i", "");
xmlrpc_registry_add_method_w_doc(m_env, m_registry, NULL, "call.get_upload_rate", &xmlrpc_call_command, new server_info_t("upload_rate", &m_slotGet), "i:", "");

Loading…
Cancel
Save