From a13a6fbb4eaeab2dfa6806efb30a17b4e484d453 Mon Sep 17 00:00:00 2001 From: Josh Elsasser Date: Fri, 10 Feb 2006 20:52:44 +0000 Subject: [PATCH] Improve libintl.h search and add a --gettext-prefix configure option. Update a couple copyright dates that slipped through earlier. Spell GTK as GTK+ in a couple of places. --- NEWS | 2 +- README | 2 +- configure | 19 ++++++++++++++++--- gtk/dialogs.h | 2 +- gtk/util.c | 2 +- gtk/util.h | 2 +- 6 files changed, 21 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 612274452..7ec6e58ff 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,7 @@ NEWS file for Transmission - Only uses one port for all torrents - Rewritten choking algorithm - Remembers download and upload sizes from one launch to another - - New GTK interface + - New GTK+ interface - New BeOS interface - OS X: Dock badging - OS X: Shows the file icon in the list diff --git a/README b/README index 20598c962..2a5fc98ef 100644 --- a/README +++ b/README @@ -6,7 +6,7 @@ simple, intuitive interface on top on an efficient, cross-platform back-end. Transmission is open source (MIT license) and runs on Mac OS X (Cocoa -interface), Linux/NetBSD/FreeBSD/OpenBSD (GTK interface) and BeOS +interface), Linux/NetBSD/FreeBSD/OpenBSD (GTK+ interface) and BeOS (native interface). For more information (including build instructions), please consult the diff --git a/configure b/configure index 4989fdee9..d22ff8015 100755 --- a/configure +++ b/configure @@ -10,6 +10,7 @@ usage() OpenSSL options: --disable-openssl Disable OpenSSL, use built-in SHA1 implementation --openssl-prefix=PATH Location of OpenSSL headers and library + --gettext-prefix=PATH Location of the Gettext header and library --disable-gtk Don't build the GTK+ GUI --prefix=PATH Install here instead of $INSTALL_PREFIX @@ -53,14 +54,23 @@ gettext_test() gettext(""); } EOF + + if [ -n "$GETTEXT_PREFIX" ] && $CC "-I$GETTEXT_PREFIX/include" "-Wl,-R$GETTEXT_PREFIX/lib" "-L$GETTEXT_PREFIX/lib" -lintl -liconv -o testconf testconf.c >/dev/null 2>&1 + then + GTKCCFLAGS="-I$GETTEXT_PREFIX/include $GTKCCFLAGS" + GTKLINKLIBS="-Wl,-R$GETTEXT_PREFIX/lib -L$GETTEXT_PREFIX/lib -lintl -liconv $GTKLINKLIBS" + rm -f testconf.c testconf + return 0 + fi + if $CC $GTKCCFLAGS $GTKLINKLIBS -o testconf testconf.c > /dev/null 2>&1 then rm -f testconf.c testconf return 0 fi - # XXX there has to be a better way than this - for intl_testdir in /usr/local/include /usr/X11R6/include /usr/pkg/include + for intl_testdir in $INSTALL_PREFIX/include \ + /usr/local/include /usr/X11R6/include /usr/pkg/include do if $CC $GTKCCFLAGS -I$intl_testdir $GTKLINKLIBS -o testconf testconf.c > /dev/null 2>&1 then @@ -98,7 +108,7 @@ EOF else GTKCCFLAGS= GTKLINKLIBS= - echo "GTK+: no, could not find libintl.h" + echo "GTK+: no, could not find gettext libintl.h" GTK=no fi else @@ -150,6 +160,9 @@ while [ $# -ne 0 ]; do x--openssl-prefix=*) OPENSSL_PREFIX="$param"; ;; + x--gettext-prefix=*) + GETTEXT_PREFIX="$param"; + ;; x--disable-gtk) gtk_disable="1"; ;; diff --git a/gtk/dialogs.h b/gtk/dialogs.h index 37506917a..0f6cfdb3b 100644 --- a/gtk/dialogs.h +++ b/gtk/dialogs.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005 Joshua Elsasser. All rights reserved. + Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/gtk/util.c b/gtk/util.c index b2423cb64..2141f3281 100644 --- a/gtk/util.c +++ b/gtk/util.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2005 Joshua Elsasser. All rights reserved. + Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff --git a/gtk/util.h b/gtk/util.h index 6ba940a0b..83372cc4e 100644 --- a/gtk/util.h +++ b/gtk/util.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2005 Joshua Elsasser. All rights reserved. + Copyright (c) 2005-2006 Joshua Elsasser. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions