[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] nmh configure.in Makefile.in
From: |
Peter Maydell |
Subject: |
[Nmh-commits] nmh configure.in Makefile.in |
Date: |
Sun, 29 Apr 2007 22:05:02 +0000 |
CVSROOT: /cvsroot/nmh
Module name: nmh
Changes by: Peter Maydell <pm215> 07/04/29 22:05:02
Modified files:
. : configure.in Makefile.in
Log message:
On Linux, define _GNU_SOURCE so that GNU libc exposes the wcwidth()
prototype in wchar.h.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/configure.in?cvsroot=nmh&r1=1.80&r2=1.81
http://cvs.savannah.gnu.org/viewcvs/nmh/Makefile.in?cvsroot=nmh&r1=1.13&r2=1.14
Patches:
Index: configure.in
===================================================================
RCS file: /cvsroot/nmh/nmh/configure.in,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -b -r1.80 -r1.81
--- configure.in 29 Apr 2007 19:36:14 -0000 1.80
+++ configure.in 29 Apr 2007 22:05:02 -0000 1.81
@@ -1,7 +1,7 @@
dnl
dnl configure.in -- autoconf template for nmh
dnl
-dnl $Id: configure.in,v 1.80 2007/04/29 19:36:14 pm215 Exp $
+dnl $Id: configure.in,v 1.81 2007/04/29 22:05:02 pm215 Exp $
dnl
dnl 2.13 definitely chokes; 2.53 is the earliest version I've tested.
@@ -444,6 +444,25 @@
dnl ------------------
dnl CHECK HEADER FILES
dnl ------------------
+
+dnl On glibc we need to define at least the '_XOPEN_SOURCE' level of features,
+dnl or wchar.h doesn't declare a prototype for wcwidth(). But if we only define
+dnl that level then db.h won't compile. So we define _GNU_SOURCE which turns
+dnl on everything. Perhaps other OSes need some feature switch set to get
wcwidth()
+dnl declared; if so they should have an entry added to this case statement.
+dnl NB that we must define this on the compiler command line, not in config.h,
+dnl because it must be set before any system header is included and there's no
+dnl portable way to make sure that files generated by lex include config.h
+dnl before system header files.
+
+case "$target_os" in
+ linux*)
+ # Like DEFS, but doesn't get stomped on by configure when using config.h:
+ OURDEFS="$OURDEFS -D_GNU_SOURCE"
+ ;;
+esac
+AC_SUBST(OURDEFS)
+
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_TIME
@@ -984,6 +1003,7 @@
compiler : ${CC}
compiler flags : ${CFLAGS}
linker flags : ${LDFLAGS}
+definitions : ${OURDEFS}
source code location : ${srcdir}
binary install path : ${nmhbin2}
libary install path : ${nmhlib2}
Index: Makefile.in
===================================================================
RCS file: /cvsroot/nmh/nmh/Makefile.in,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- Makefile.in 13 Nov 2005 19:27:37 -0000 1.13
+++ Makefile.in 29 Apr 2007 22:05:02 -0000 1.14
@@ -1,7 +1,7 @@
#
# Makefile for top level of nmh distribution
#
-# $Id: Makefile.in,v 1.13 2005/11/13 19:27:37 opk Exp $
+# $Id: Makefile.in,v 1.14 2007/04/29 22:05:02 pm215 Exp $
#
# nmh version
@@ -48,7 +48,7 @@
CC = @CC@
CPPFLAGS = @CPPFLAGS@
-DEFS = @DEFS@
+DEFS = @DEFS@ @OURDEFS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] nmh configure.in Makefile.in,
Peter Maydell <=