bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch for gettext.m4 for better included intl support


From: Claudio Fontana
Subject: patch for gettext.m4 for better included intl support
Date: Fri, 27 Jan 2006 12:24:47 -0800 (PST)

Hello,

I send this small patch for better 'included libintl'
support in gettext.m4 for review.

DESCRIPTION:
when writing code that should be portable to systems
that do not happen to 
have a working libintl, the current situation is in my
opinion suboptimal.

running gettextize --intl creates the necessary intl/
subdirectory (the INTLDIR) in the to-be-distributed
package.

Then, assuming full autotools and gnulib support,
lib/, and lib/Makefile.am are completely handled by
gnulib.

lib/ itself and any other intl-aware code needs to
[indirectly] include libintl.h, so it would be handy
(and orthogonal to what happens in the [external]
case) if AM_GNU_GETTEXT, when using the included
libintl, automatically added -I $INTLDIR to the
CPPFLAGS.

This patch does exactly that: adds INTLDIR to the
CPPFLAGS when using the internal libintl.

Bye,

CLaudio

--- gettext.m4.old      2006-01-02 19:33:06.000000000
+0100
+++ gettext.m4  2006-01-02 19:44:58.000000000 +0100
@@ -234,9 +234,11 @@
         dnl Mark actions used to generate GNU NLS
library.
         BUILD_INCLUDED_LIBINTL=yes
         USE_INCLUDED_LIBINTL=yes
-       
LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
$LIBICONV"
-       
LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a
$LTLIBICONV"
+       
INTLDIR="ifelse([$3],[],\${top_builddir}/intl,[$3])"
+       
LIBINTL="${INTLDIR}/libintl.[]gt_libtool_suffix_prefix[]a
$LIBICONV"
+       
LTLIBINTL="${INTLDIR}/libintl.[]gt_libtool_suffix_prefix[]a
$LTLIBICONV"
         LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /'
-e 's/^ //' -e 's/ $//'`
+        CPPFLAGS="$CPPFLAGS -I${INTLDIR}"
       fi
 
       CATOBJEXT=



        

        
                
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it




reply via email to

[Prev in Thread] Current Thread [Next in Thread]