Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#840 closed Bug (fixed)

bencode.c (and others) does not compile without libintl.h

Reported by: KyleK Owned by: charles
Priority: Normal Milestone: 1.20
Component: libtransmission Version: 1.11
Severity: Normal Keywords:


Compilation of libtransmission/bencode.c (and possibly other files as well) fails if libintl.h is not present on the system. The dependency sits in libtransmission/utils.h, which expects libintl.h to be available on non-OSX systems.

The configure script performs checks to find libintl.h, but does nothing if it cannot locate the header file. As a result, the configure script completes successfully, even though compilation will ultimately fail.

I propose 2 solutions:

  1. let configure fail if it cannot find libintl.h (and the build system is not OSX)

This requires additional configure options to specify the location of gettext headers and libraries. The currently implemented tests in configure ignore any LIBS or *_FLAGS parameters.

  1. make gettext/libintl requirement optional and only use gettext() in utils.h if the header file is present on the system.

I strongly prefer the 2nd case. Of the Transmission project I only use the daemon, which is cross-compiled for my NAS. In my opinion gettext() functionality is not required in this case.

Change History (2)

comment:1 Changed 14 years ago by charles

  • Milestone changed from None Set to 1.20
  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 14 years ago by charles

I went with the second case. r5520

Note: See TracTickets for help on using tickets.