[Aptitude-svn-commit] r4428 - in branches/aptitude-0.3/aptitude: .
src
Daniel Burrows
dburrows at costa.debian.org
Sat Oct 1 20:49:05 UTC 2005
Author: dburrows
Date: Sat Oct 1 20:49:01 2005
New Revision: 4428
Modified:
branches/aptitude-0.3/aptitude/ChangeLog
branches/aptitude-0.3/aptitude/configure.ac
branches/aptitude-0.3/aptitude/src/aptitude.h
Log:
Test for locale.h and setlocale in configure.ac
Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog (original)
+++ branches/aptitude-0.3/aptitude/ChangeLog Sat Oct 1 20:49:01 2005
@@ -1,5 +1,13 @@
2005-10-01 Daniel Burrows <dburrows at debian.org>
+ * configure.ac, src/aptitude.h:
+
+ Deal with the fact that the old gettext/autoools generated a
+ test for locale.h and setlocale but the new one doesn't. I
+ could stop using the test, but instead I decided to just test
+ explicitly for them and define the appropriate variables if
+ they're found.
+
* src/aptitude.h:
Instead of using #define to empty setlocale, inline it. This
Modified: branches/aptitude-0.3/aptitude/configure.ac
==============================================================================
--- branches/aptitude-0.3/aptitude/configure.ac (original)
+++ branches/aptitude-0.3/aptitude/configure.ac Sat Oct 1 20:49:01 2005
@@ -47,6 +47,10 @@
AC_CHECK_HEADER(execinfo.h, [AC_DEFINE([HAVE_EXECINFO_H], [], [Define if the execinfo file (for self-backtracing) is available])])
+AC_CHECK_HEADER(locale.h, [AC_DEFINE([HAVE_LOCALE_H], [], [Define if locale.h is available])])
+
+AC_CHECK_DECL(setlocale, [AC_DEFINE([HAVE_SETLOCALE], [], [Define if setlocale is available in locale.h])], , [#include <locale.h>])
+
HASH_INC=""
HASH_CLS=""
Modified: branches/aptitude-0.3/aptitude/src/aptitude.h
==============================================================================
--- branches/aptitude-0.3/aptitude/src/aptitude.h (original)
+++ branches/aptitude-0.3/aptitude/src/aptitude.h Sat Oct 1 20:49:01 2005
@@ -14,10 +14,10 @@
/* Take care of NLS matters. */
-#if HAVE_LOCALE_H
+#ifdef HAVE_LOCALE_H
# include <locale.h>
#endif
-#if !HAVE_SETLOCALE
+#ifndef HAVE_SETLOCALE
inline void setlocale(int, const char *)
{
}
More information about the Aptitude-svn-commit
mailing list