Opened 12 years ago
Closed 12 years ago
#1441 closed Bug (fixed)
configure doesn't work on FreeBSD, because of bashism in PEERID_PREFIX.
Reported by: | mezz | Owned by: | charles |
---|---|---|---|
Priority: | Normal | Milestone: | 1.40 |
Component: | Transmission | Version: | 1.34+ |
Severity: | Normal | Keywords: | |
Cc: |
Description
The configure does not work on FreeBSD, because of bashism in PEERID_PREFIX looks like this:
if test "x${PEERID_PREFIX: -2:1}" = "xZ"; then AC_DEFINE(TR_UNSTABLE, 1, [Define to 1 if this is an unstable version of Transmission]) TR_UNSTABLE=yes fi
The ': -2:1' part is what caused not work on FreeBSD. I won't be surpised if we install bash and it will working. The bash does not include in all of *BSD. The error looks like this:
(cached) (cached) checking how to hardcode library paths into programs... immediate appending configuration tag "F77" to libtool ./configure: ${PEERID_PREFIX: ...}: Bad substitution
I am not sure what we are supposed to replace it to... Maybe using awk?
# echo "-TR133Z-" | awk '{print substr($0, 7, length-7)}' Z
or grep?
if grep -Eq 'Z' ${PEERID_PREFIX} 2>/dev/null; then AC_DEFINE(TR_UNSTABLE, 1, [Define to 1 if this is an unstable version of Transmission]) TR_UNSTABLE=yes fi
Or some different method...
Change History (2)
comment:1 Changed 12 years ago by charles
- Milestone changed from None Set to 1.40
- Owner set to charles
- Status changed from new to assigned
- Version changed from 1.34 to 1.34+
comment:2 Changed 12 years ago by mezz
- Resolution set to fixed
- Status changed from assigned to closed
Cool, something new to me and it's even better. :-) Fixed, thanks!
Note: See
TracTickets for help on using
tickets.
Probably simplest to use m4, since that's guaranteed to be everywhere autoconf is.
Please give r7076 a spin and see if it works for you