* configure.in: Test for libintl.h.
Phil Edwards
phil@jaj.com
Tue Apr 29 19:16:00 GMT 2003
On Tue, Apr 29, 2003 at 01:21:11PM -0400, Phil Edwards wrote:
> On Tue, Apr 29, 2003 at 06:26:11AM -0500, Loren James Rittle wrote:
>
> > I have confirmed that if I merely add: -lintl to the end of the
> > command line, then it works as expected.
>
> Standalone libintl hadn't occurred to me. I'll do this shortly.
Pesky FreeBSD users, keepin' me on my toes. :-)
If we can manage to use AC_CHECK_LIB, then the rest of configury will
all happen automatically. I'm worried that testing for a function which
can also be found in libc (e.g., under Linux) will give false positives,
so checking for gettext or binddomain, etc, won't work.
Opinions on this patch? Under Linux it avoids changing anything:
checking for libintl_gettext in -lintl... no
% grep -w ^LIBS */Makefile
libio/Makefile:LIBS = -lm
libmath/Makefile:LIBS = -lm
libsupc++/Makefile:LIBS = -lm
src/Makefile:LIBS = -lm
testsuite/Makefile:LIBS = -lm
This of course may still leave other systems out in the cold, if -lintl
needs to be supplied but "libintl_gettext" isn't a function used by their
implementation.
(Don't forget to run aclocal and autoconf after applying.)
Index: acinclude.m4
===================================================================
RCS file: /home/pme/Repositories/GCC/gcc/libstdc++-v3/acinclude.m4,v
retrieving revision 1.234
diff -u -3 -r1.234 acinclude.m4
--- acinclude.m4 17 Apr 2003 03:26:53 -0000 1.234
+++ acinclude.m4 29 Apr 2003 19:07:14 -0000
@@ -1290,6 +1291,11 @@
glibcpp_localedir=${glibcpp_builddir}/po/share/locale
AC_SUBST(glibcpp_localedir)
+ # A standalone libintl (e.g., GNU libintl) may be in use.
+ if test $USE_NLS = yes; then
+ AC_CHECK_LIB(intl, libintl_gettext)
+ fi
+
AC_SUBST(USE_NLS)
AC_SUBST(CLOCALE_H)
AC_SUBST(CCODECVT_H)
More information about the Libstdc++
mailing list