* [Patch] correctly configure wcwidth in readline
@ 2003-02-26 16:47 Kris Warkentin
2003-02-26 16:54 ` Daniel Jacobowitz
0 siblings, 1 reply; 17+ messages in thread
From: Kris Warkentin @ 2003-02-26 16:47 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
I have attached a patch that correctly deals with the absence of a wcwidth()
function by building support/wcwidth.c and linking it into libreadline.
Oddly enough, the HAVE_WCWIDTH check fails on other systems too (ie. Cygwin)
but causes no problem since wcwidth() gets picked up elsewhere. On QNX
Neutrino, however, we're actually missing wcwidth() so we get undefined
references. What is the procedure for regenerating configure scripts?
Should I regenerate it here and commit it or do you have a certain person
who does it under a specific environment?
cheers,
Kris
Changelog
* aclocal.m4: Cause wcwidth check to substitute HAVE_WCWIDTH for
building.
* Makefile.in: Add wcwidth object to lib if required.
* shlib/Makefile.in: Likewise.
* configure: Regenerate.
[-- Attachment #2: readline_diff.txt --]
[-- Type: text/plain, Size: 6430 bytes --]
Index: Makefile.in
===================================================================
RCS file: /cvs/src/src/readline/Makefile.in,v
retrieving revision 1.4
diff -c -r1.4 Makefile.in
*** Makefile.in 8 Dec 2002 22:31:37 -0000 1.4
--- Makefile.in 26 Feb 2003 16:36:15 -0000
***************
*** 86,91 ****
--- 86,98 ----
LIBRARY_NAME = libreadline.a
STATIC_LIBS = libreadline.a libhistory.a
+ HAVE_WCWIDTH = @HAVE_WCWIDTH@
+
+ ifeq ($(HAVE_WCWIDTH), no)
+ WCWIDTH_SRC = $(srcdir)/support/wcwidth.c
+ WCWIDTH_OBJ = wcwidth.o
+ endif
+
# The C code source files for this library.
CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
$(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
***************
*** 98,104 ****
$(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
$(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
$(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
! $(srcdir)/mbutil.c
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
--- 105,111 ----
$(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
$(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \
$(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
! $(srcdir)/mbutil.c $(WCWIDTH_SRC)
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
***************
*** 111,117 ****
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
rltty.o complete.o bind.o isearch.o display.o signals.o \
util.o kill.o undo.o macro.o input.o callback.o terminal.o \
! text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ)
# The texinfo files which document this library.
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
--- 118,125 ----
OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
rltty.o complete.o bind.o isearch.o display.o signals.o \
util.o kill.o undo.o macro.o input.o callback.o terminal.o \
! text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \
! $(WCWIDTH_OBJ)
# The texinfo files which document this library.
DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
***************
*** 146,151 ****
--- 154,165 ----
$(RM) $@
$(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
-test -n "$(RANLIB)" && $(RANLIB) $@
+
+ ifeq ($(HAVE_WCWIDTH), no)
+ $(WCWIDTH_OBJ): $(WCWIDTH_SRC)
+ $(RM) $@
+ $(CC) $(CCFLAGS) -c $(WCWIDTH_SRC)
+ endif
# Since tilde.c is shared between readline and bash, make sure we compile
# it with the right flags when it's built as part of readline
Index: aclocal.m4
===================================================================
RCS file: /cvs/src/src/readline/aclocal.m4,v
retrieving revision 1.4
diff -c -r1.4 aclocal.m4
*** aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4
--- aclocal.m4 26 Feb 2003 16:36:15 -0000
***************
*** 1653,1659 ****
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
! AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
[AC_TRY_RUN([
--- 1653,1659 ----
AC_CHECK_HEADERS(langinfo.h)
AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
! AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH), AC_SUBST(HAVE_WCWIDTH,no))
AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t,
[AC_TRY_RUN([
Index: shlib/Makefile.in
===================================================================
RCS file: /cvs/src/src/readline/shlib/Makefile.in,v
retrieving revision 1.4
diff -c -r1.4 Makefile.in
*** shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4
--- shlib/Makefile.in 26 Feb 2003 16:36:15 -0000
***************
*** 103,108 ****
--- 103,115 ----
SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION)
SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY)
+ HAVE_WCWIDTH = @HAVE_WCWIDTH@
+
+ ifeq ($(HAVE_WCWIDTH), no)
+ WCWIDTH_SRC = $(srcdir)/support/wcwidth.c
+ WCWIDTH_OBJ = wcwidth.so
+ endif
+
# The C code source files for this library.
CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \
$(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \
***************
*** 115,121 ****
$(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \
$(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \
$(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \
! $(topdir)/mbutil.c
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
--- 122,128 ----
$(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \
$(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \
$(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \
! $(topdir)/mbutil.c $(WCWIDTH_SRC)
# The header files for this library.
HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
***************
*** 129,135 ****
rltty.so complete.so bind.so isearch.so display.so signals.so \
util.so kill.so undo.so macro.so input.so callback.so terminal.so \
text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \
! compat.so
##########################################################################
--- 136,142 ----
rltty.so complete.so bind.so isearch.so display.so signals.so \
util.so kill.so undo.so macro.so input.so callback.so terminal.so \
text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \
! compat.so $(WCWIDTH_OBJ)
##########################################################################
***************
*** 152,157 ****
--- 159,171 ----
$(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so
$(RM) $@
$(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS)
+
+ ifeq ($(HAVE_WCWIDTH), no)
+ $(WCWIDTH_OBJ): $(WCWIDTH_SRC)
+ $(RM) $@
+ $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) -o wcwidth.o $(WCWIDTH_SRC)
+ $(MV) wcwidth.o $@
+ endif
# Since tilde.c is shared between readline and bash, make sure we compile
# it with the right flags when it's built as part of readline
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 16:47 [Patch] correctly configure wcwidth in readline Kris Warkentin @ 2003-02-26 16:54 ` Daniel Jacobowitz 0 siblings, 0 replies; 17+ messages in thread From: Daniel Jacobowitz @ 2003-02-26 16:54 UTC (permalink / raw) To: Kris Warkentin; +Cc: gdb-patches On Wed, Feb 26, 2003 at 11:47:07AM -0500, Kris Warkentin wrote: > I have attached a patch that correctly deals with the absence of a wcwidth() > function by building support/wcwidth.c and linking it into libreadline. > Oddly enough, the HAVE_WCWIDTH check fails on other systems too (ie. Cygwin) > but causes no problem since wcwidth() gets picked up elsewhere. On QNX > Neutrino, however, we're actually missing wcwidth() so we get undefined > references. What is the procedure for regenerating configure scripts? > Should I regenerate it here and commit it or do you have a certain person > who does it under a specific environment? Kris, from MAINTAINERS: readline/ Master version: ftp://ftp.cwru.edu/pub/bash/ Elena Zannoni ezannoni@redhat.com Host maintainers (host dependant parts) (but get your changes into the master version) Something like this needs to go through the maintainers of bash/readline first. Yes, normally you regenerate any generated files when checking in a patch. > + HAVE_WCWIDTH = @HAVE_WCWIDTH@ > + > + ifeq ($(HAVE_WCWIDTH), no) > + WCWIDTH_SRC = $(srcdir)/support/wcwidth.c > + WCWIDTH_OBJ = wcwidth.o > + endif > + Can't do that. It's a GNU-make-ism. You have to move more of the logic to configure. > + > + ifeq ($(HAVE_WCWIDTH), no) > + $(WCWIDTH_OBJ): $(WCWIDTH_SRC) > + $(RM) $@ > + $(CC) $(CCFLAGS) -c $(WCWIDTH_SRC) > + endif That should probably be an unconditional rule, a la: wcwidth.o: $(srcdir)/support/wcwidth.c $(RM) $@ $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline
@ 2003-02-26 16:57 Michael Elizabeth Chastain
2003-02-26 18:23 ` Andrew Cagney
0 siblings, 1 reply; 17+ messages in thread
From: Michael Elizabeth Chastain @ 2003-02-26 16:57 UTC (permalink / raw)
To: gdb-patches, kewarken
Hi Kris,
> What is the procedure for regenerating configure scripts?
> Should I regenerate it here and commit it or do you have a certain person
> who does it under a specific environment?
I just finished my first configure patch so I just went through this.
You should build autoconf 2.13 from ftp.gnu.org and use that to regenerate
'configure'. Diff 'configure' afterwards to make sure that the only
differences are the changes you made + a couple of thousand lines of
silly line-number differences.
Don't include the configure diffs in your patch message, but do check
them into CVS when you commit.
As far as the patch goes, it's up to Elena Z to say what to do.
I'll volunteer to help out if she would like.
Michael C
^ permalink raw reply [flat|nested] 17+ messages in thread* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 16:57 Michael Elizabeth Chastain @ 2003-02-26 18:23 ` Andrew Cagney 0 siblings, 0 replies; 17+ messages in thread From: Andrew Cagney @ 2003-02-26 18:23 UTC (permalink / raw) To: Michael Elizabeth Chastain; +Cc: gdb-patches, kewarken > > I just finished my first configure patch so I just went through this. > > You should build autoconf 2.13 from ftp.gnu.org and use that to regenerate > 'configure'. Er, for GDB and binutils, you use autoconf-000227. Andrew ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline @ 2003-02-26 17:35 Kris Warkentin 2003-02-26 18:06 ` Daniel Jacobowitz 0 siblings, 1 reply; 17+ messages in thread From: Kris Warkentin @ 2003-02-26 17:35 UTC (permalink / raw) To: gdb-patches; +Cc: Daniel Jacobowitz > Something like this needs to go through the maintainers of > bash/readline first. The problem is that I couldn't get any response from the bash/readline maintainers. I mailed the mailing lists and the owner and got no response. I also noticed that there is a readline/ChangeLog.gdb file with local changes so I figured if I wasn't getting any lovin' from readline, I might at least get it merged into the gdb tree. > Yes, normally you regenerate any generated files when checking in a > patch. Okay. Thanks. Kris ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 17:35 Kris Warkentin @ 2003-02-26 18:06 ` Daniel Jacobowitz 2003-02-26 17:44 ` Kris Warkentin 0 siblings, 1 reply; 17+ messages in thread From: Daniel Jacobowitz @ 2003-02-26 18:06 UTC (permalink / raw) To: Kris Warkentin; +Cc: gdb-patches On Wed, Feb 26, 2003 at 12:35:16PM -0500, Kris Warkentin wrote: > > Something like this needs to go through the maintainers of > > bash/readline first. > > The problem is that I couldn't get any response from the bash/readline > maintainers. I mailed the mailing lists and the owner and got no response. > I also noticed that there is a readline/ChangeLog.gdb file with local > changes so I figured if I wasn't getting any lovin' from readline, I might > at least get it merged into the gdb tree. Blech. Yeah, in that case I think this sort of patch is acceptable (that's not a comment on the actual patch - I don't know much about readline, I leave that to Elena :) -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 18:06 ` Daniel Jacobowitz @ 2003-02-26 17:44 ` Kris Warkentin 2003-02-26 17:51 ` Daniel Jacobowitz 0 siblings, 1 reply; 17+ messages in thread From: Kris Warkentin @ 2003-02-26 17:44 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches Here's what seems to me to be a more elegant solution. In aclocal.m4, I just define the obj as wcwidth.o and then the Makefile will either have it or not. cheers, Kris $ cvs diff Makefile.in aclocal.m4 Index: Makefile.in =================================================================== RCS file: /cvs/src/src/readline/Makefile.in,v retrieving revision 1.4 diff -r1.4 Makefile.in 88a89,90 > WCWIDTH_OBJ = @WCWIDTH_OBJ@ > 101c103 < $(srcdir)/mbutil.c --- > $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c 114c116,117 < text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) --- > text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ > $(WCWIDTH_OBJ) 148a152,155 > > wcwidth.o: $(srcdir)/support/wcwidth.c > $(RM) $@ > $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c Index: aclocal.m4 =================================================================== RCS file: /cvs/src/src/readline/aclocal.m4,v retrieving revision 1.4 diff -r1.4 aclocal.m4 1656c1656 < AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) --- > AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH), AC_SUBST(WCWIDTH_OBJ,wcwidth.o)) ----- Original Message ----- From: "Daniel Jacobowitz" <drow@mvista.com> To: "Kris Warkentin" <kewarken@qnx.com> Cc: <gdb-patches@sources.redhat.com> Sent: Wednesday, February 26, 2003 12:37 PM Subject: Re: [Patch] correctly configure wcwidth in readline > On Wed, Feb 26, 2003 at 12:35:16PM -0500, Kris Warkentin wrote: > > > Something like this needs to go through the maintainers of > > > bash/readline first. > > > > The problem is that I couldn't get any response from the bash/readline > > maintainers. I mailed the mailing lists and the owner and got no response. > > I also noticed that there is a readline/ChangeLog.gdb file with local > > changes so I figured if I wasn't getting any lovin' from readline, I might > > at least get it merged into the gdb tree. > > Blech. Yeah, in that case I think this sort of patch is acceptable > (that's not a comment on the actual patch - I don't know much about > readline, I leave that to Elena :) > > -- > Daniel Jacobowitz > MontaVista Software Debian GNU/Linux Developer > ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 17:44 ` Kris Warkentin @ 2003-02-26 17:51 ` Daniel Jacobowitz [not found] ` <00fd01c2ddc0$28ab75e0$0202040a@catdog> 2003-02-26 21:26 ` Andreas Schwab 0 siblings, 2 replies; 17+ messages in thread From: Daniel Jacobowitz @ 2003-02-26 17:51 UTC (permalink / raw) To: Kris Warkentin; +Cc: gdb-patches On Wed, Feb 26, 2003 at 12:44:22PM -0500, Kris Warkentin wrote: > Here's what seems to me to be a more elegant solution. In aclocal.m4, I > just define the obj as wcwidth.o and then the Makefile will either have it > or not. > > cheers, > < AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) > --- > > AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH), > AC_SUBST(WCWIDTH_OBJ,wcwidth.o)) [Always use unified or context diffs, please] Did you try this on a host with wcwidth? I don't think it'll work right; I have the feeling that a conditional AC_SUBST can leave @WCWIDTH_OBJ@ in the makefile. > ----- Original Message ----- > From: "Daniel Jacobowitz" <drow@mvista.com> > To: "Kris Warkentin" <kewarken@qnx.com> > Cc: <gdb-patches@sources.redhat.com> > Sent: Wednesday, February 26, 2003 12:37 PM > Subject: Re: [Patch] correctly configure wcwidth in readline > > > > On Wed, Feb 26, 2003 at 12:35:16PM -0500, Kris Warkentin wrote: > > > > Something like this needs to go through the maintainers of > > > > bash/readline first. > > > > > > The problem is that I couldn't get any response from the bash/readline > > > maintainers. I mailed the mailing lists and the owner and got no > response. > > > I also noticed that there is a readline/ChangeLog.gdb file with local > > > changes so I figured if I wasn't getting any lovin' from readline, I > might > > > at least get it merged into the gdb tree. > > > > Blech. Yeah, in that case I think this sort of patch is acceptable > > (that's not a comment on the actual patch - I don't know much about > > readline, I leave that to Elena :) > > > > -- > > Daniel Jacobowitz > > MontaVista Software Debian GNU/Linux Developer > > > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 17+ messages in thread
[parent not found: <00fd01c2ddc0$28ab75e0$0202040a@catdog>]
[parent not found: <20030226175915.GA15700@nevyn.them.org>]
* Re: [Patch] correctly configure wcwidth in readline [not found] ` <20030226175915.GA15700@nevyn.them.org> @ 2003-02-26 18:43 ` Kris Warkentin 2003-02-26 20:14 ` Daniel Jacobowitz 0 siblings, 1 reply; 17+ messages in thread From: Kris Warkentin @ 2003-02-26 18:43 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches > Try: > AC_CHECK_FUNC(wcwidth, have_wcwidth=yes, have_wcwidth=no) > if test $have_wcwidth = yes; then > AC_DEFINE(HAVE_WCWIDTH) > AC_SUBST(WCWIDTH_OBJ,wcwidth.o) > else > AC_SUBST(WCWIDTH_OBJ,) > fi > > You'd have to test it though. Okay. This works great on systems with and without wcwidth. Kris Index: Makefile.in =================================================================== RCS file: /cvs/src/src/readline/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- Makefile.in 8 Dec 2002 22:31:37 -0000 1.4 +++ Makefile.in 26 Feb 2003 18:41:35 -0000 @@ -86,6 +86,8 @@ LIBRARY_NAME = libreadline.a STATIC_LIBS = libreadline.a libhistory.a +WCWIDTH_OBJ = @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ @@ -98,7 +100,7 @@ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ - $(srcdir)/mbutil.c + $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -111,7 +113,8 @@ OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ - text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) + text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ + $(WCWIDTH_OBJ) # The texinfo files which document this library. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo @@ -146,6 +149,10 @@ $(RM) $@ $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o -test -n "$(RANLIB)" && $(RANLIB) $@ + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline Index: aclocal.m4 =================================================================== RCS file: /cvs/src/src/readline/aclocal.m4,v retrieving revision 1.4 diff -u -r1.4 aclocal.m4 --- aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4 +++ aclocal.m4 26 Feb 2003 18:41:35 -0000 @@ -1653,7 +1653,13 @@ AC_CHECK_HEADERS(langinfo.h) AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) +AC_CHECK_FUNC(wcwidth, have_wcwidth=yes) +if test "$have_wcwidth" = yes; then + AC_DEFINE(HAVE_WCWIDTH) + AC_SUBST(WCWIDTH_OBJ,) +else + AC_SUBST(WCWIDTH_OBJ,wcwidth.o) +fi AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, [AC_TRY_RUN([ Index: shlib/Makefile.in =================================================================== RCS file: /cvs/src/src/readline/shlib/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4 +++ shlib/Makefile.in 26 Feb 2003 18:41:36 -0000 @@ -103,6 +103,8 @@ SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION) SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY) +WCWIDTH_OBJ = @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ @@ -115,7 +117,7 @@ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ - $(topdir)/mbutil.c + $(topdir)/mbutil.c $(WCWIDTH_SRC) # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -129,7 +131,7 @@ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ - compat.so + compat.so $(WCWIDTH_OBJ) ########################################################################## @@ -152,6 +154,10 @@ $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so $(RM) $@ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS) + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) $(srcdir)/support/wcwidth.c # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 18:43 ` Kris Warkentin @ 2003-02-26 20:14 ` Daniel Jacobowitz 2003-02-26 20:40 ` Kris Warkentin 0 siblings, 1 reply; 17+ messages in thread From: Daniel Jacobowitz @ 2003-02-26 20:14 UTC (permalink / raw) To: gdb-patches On Wed, Feb 26, 2003 at 01:43:48PM -0500, Kris Warkentin wrote: > > Try: > > AC_CHECK_FUNC(wcwidth, have_wcwidth=yes, have_wcwidth=no) > > if test $have_wcwidth = yes; then > > AC_DEFINE(HAVE_WCWIDTH) > > AC_SUBST(WCWIDTH_OBJ,wcwidth.o) > > else > > AC_SUBST(WCWIDTH_OBJ,) > > fi > > > > You'd have to test it though. > > Okay. This works great on systems with and without wcwidth. Good thing you tested it, since I got the logic backwards above :) And your mailer ate the tabs but I assume you had them in the right places. Elena, I recommend this patch. [Kris: changelog!] > > Kris > > Index: Makefile.in > =================================================================== > RCS file: /cvs/src/src/readline/Makefile.in,v > retrieving revision 1.4 > diff -u -r1.4 Makefile.in > --- Makefile.in 8 Dec 2002 22:31:37 -0000 1.4 > +++ Makefile.in 26 Feb 2003 18:41:35 -0000 > @@ -86,6 +86,8 @@ > LIBRARY_NAME = libreadline.a > STATIC_LIBS = libreadline.a libhistory.a > > +WCWIDTH_OBJ = @WCWIDTH_OBJ@ > + > # The C code source files for this library. > CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ > $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ > @@ -98,7 +100,7 @@ > $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ > $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ > $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ > - $(srcdir)/mbutil.c > + $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c > > # The header files for this library. > HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ > @@ -111,7 +113,8 @@ > OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ > rltty.o complete.o bind.o isearch.o display.o signals.o \ > util.o kill.o undo.o macro.o input.o callback.o terminal.o \ > - text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) > + text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ > + $(WCWIDTH_OBJ) > > # The texinfo files which document this library. > DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo > @@ -146,6 +149,10 @@ > $(RM) $@ > $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o > -test -n "$(RANLIB)" && $(RANLIB) $@ > + > +wcwidth.o: $(srcdir)/support/wcwidth.c > + $(RM) $@ > + $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c > > # Since tilde.c is shared between readline and bash, make sure we compile > # it with the right flags when it's built as part of readline > Index: aclocal.m4 > =================================================================== > RCS file: /cvs/src/src/readline/aclocal.m4,v > retrieving revision 1.4 > diff -u -r1.4 aclocal.m4 > --- aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4 > +++ aclocal.m4 26 Feb 2003 18:41:35 -0000 > @@ -1653,7 +1653,13 @@ > AC_CHECK_HEADERS(langinfo.h) > > AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) > -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) > +AC_CHECK_FUNC(wcwidth, have_wcwidth=yes) > +if test "$have_wcwidth" = yes; then > + AC_DEFINE(HAVE_WCWIDTH) > + AC_SUBST(WCWIDTH_OBJ,) > +else > + AC_SUBST(WCWIDTH_OBJ,wcwidth.o) > +fi > > AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, > [AC_TRY_RUN([ > Index: shlib/Makefile.in > =================================================================== > RCS file: /cvs/src/src/readline/shlib/Makefile.in,v > retrieving revision 1.4 > diff -u -r1.4 Makefile.in > --- shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4 > +++ shlib/Makefile.in 26 Feb 2003 18:41:36 -0000 > @@ -103,6 +103,8 @@ > SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION) > SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY) > > +WCWIDTH_OBJ = @WCWIDTH_OBJ@ > + > # The C code source files for this library. > CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ > $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ > @@ -115,7 +117,7 @@ > $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ > $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ > $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ > - $(topdir)/mbutil.c > + $(topdir)/mbutil.c $(WCWIDTH_SRC) > > # The header files for this library. > HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ > @@ -129,7 +131,7 @@ > rltty.so complete.so bind.so isearch.so display.so signals.so \ > util.so kill.so undo.so macro.so input.so callback.so terminal.so \ > text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ > - compat.so > + compat.so $(WCWIDTH_OBJ) > > ########################################################################## > > @@ -152,6 +154,10 @@ > $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so > $(RM) $@ > $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) > xmalloc.so $(SHLIB_LIBS) > + > +wcwidth.o: $(srcdir)/support/wcwidth.c > + $(RM) $@ > + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) $(srcdir)/support/wcwidth.c > > # Since tilde.c is shared between readline and bash, make sure we compile > # it with the right flags when it's built as part of readline > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 20:14 ` Daniel Jacobowitz @ 2003-02-26 20:40 ` Kris Warkentin 2003-02-26 20:49 ` Daniel Jacobowitz 0 siblings, 1 reply; 17+ messages in thread From: Kris Warkentin @ 2003-02-26 20:40 UTC (permalink / raw) To: Daniel Jacobowitz, gdb-patches > Good thing you tested it, since I got the logic backwards above :) > And your mailer ate the tabs but I assume you had them in the right > places. Elena, I recommend this patch. > > [Kris: changelog!] The changelog is unchanged from the original post. cheers, Kris ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 20:40 ` Kris Warkentin @ 2003-02-26 20:49 ` Daniel Jacobowitz 2003-02-26 20:52 ` Kris Warkentin 0 siblings, 1 reply; 17+ messages in thread From: Daniel Jacobowitz @ 2003-02-26 20:49 UTC (permalink / raw) To: Kris Warkentin; +Cc: gdb-patches On Wed, Feb 26, 2003 at 03:40:33PM -0500, Kris Warkentin wrote: > > Good thing you tested it, since I got the logic backwards above :) > > And your mailer ate the tabs but I assume you had them in the right > > places. Elena, I recommend this patch. > > > > [Kris: changelog!] > > The changelog is unchanged from the original post. Please always include it with the patch, even if it hasn't changed. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 20:49 ` Daniel Jacobowitz @ 2003-02-26 20:52 ` Kris Warkentin 2003-03-03 2:55 ` Elena Zannoni 0 siblings, 1 reply; 17+ messages in thread From: Kris Warkentin @ 2003-02-26 20:52 UTC (permalink / raw) To: Daniel Jacobowitz; +Cc: gdb-patches [-- Attachment #1: Type: text/plain, Size: 408 bytes --] > > > [Kris: changelog!] > > > > The changelog is unchanged from the original post. > > Please always include it with the patch, even if it hasn't changed. Okay. Here is is with the patch: * aclocal.m4: Cause wcwidth check to substitute HAVE_WCWIDTH for building. * Makefile.in: Add wcwidth object to lib if required. * shlib/Makefile.in: Likewise. * configure: Regenerate. cheers, Kris [-- Attachment #2: readline_diff.txt --] [-- Type: text/plain, Size: 4438 bytes --] Index: Makefile.in =================================================================== RCS file: /cvs/src/src/readline/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- Makefile.in 8 Dec 2002 22:31:37 -0000 1.4 +++ Makefile.in 26 Feb 2003 18:41:35 -0000 @@ -86,6 +86,8 @@ LIBRARY_NAME = libreadline.a STATIC_LIBS = libreadline.a libhistory.a +WCWIDTH_OBJ = @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ @@ -98,7 +100,7 @@ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ - $(srcdir)/mbutil.c + $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -111,7 +113,8 @@ OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ rltty.o complete.o bind.o isearch.o display.o signals.o \ util.o kill.o undo.o macro.o input.o callback.o terminal.o \ - text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) + text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ + $(WCWIDTH_OBJ) # The texinfo files which document this library. DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo @@ -146,6 +149,10 @@ $(RM) $@ $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o -test -n "$(RANLIB)" && $(RANLIB) $@ + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline Index: aclocal.m4 =================================================================== RCS file: /cvs/src/src/readline/aclocal.m4,v retrieving revision 1.4 diff -u -r1.4 aclocal.m4 --- aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4 +++ aclocal.m4 26 Feb 2003 18:41:35 -0000 @@ -1653,7 +1653,13 @@ AC_CHECK_HEADERS(langinfo.h) AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) +AC_CHECK_FUNC(wcwidth, have_wcwidth=yes) +if test "$have_wcwidth" = yes; then + AC_DEFINE(HAVE_WCWIDTH) + AC_SUBST(WCWIDTH_OBJ,) +else + AC_SUBST(WCWIDTH_OBJ,wcwidth.o) +fi AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, [AC_TRY_RUN([ Index: shlib/Makefile.in =================================================================== RCS file: /cvs/src/src/readline/shlib/Makefile.in,v retrieving revision 1.4 diff -u -r1.4 Makefile.in --- shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4 +++ shlib/Makefile.in 26 Feb 2003 18:41:36 -0000 @@ -103,6 +103,8 @@ SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION) SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY) +WCWIDTH_OBJ = @WCWIDTH_OBJ@ + # The C code source files for this library. CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ @@ -115,7 +117,7 @@ $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ - $(topdir)/mbutil.c + $(topdir)/mbutil.c $(WCWIDTH_SRC) # The header files for this library. HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ @@ -129,7 +131,7 @@ rltty.so complete.so bind.so isearch.so display.so signals.so \ util.so kill.so undo.so macro.so input.so callback.so terminal.so \ text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ - compat.so + compat.so $(WCWIDTH_OBJ) ########################################################################## @@ -152,6 +154,10 @@ $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so $(RM) $@ $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS) + +wcwidth.o: $(srcdir)/support/wcwidth.c + $(RM) $@ + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) $(srcdir)/support/wcwidth.c # Since tilde.c is shared between readline and bash, make sure we compile # it with the right flags when it's built as part of readline ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 20:52 ` Kris Warkentin @ 2003-03-03 2:55 ` Elena Zannoni 2003-03-03 14:46 ` Kris Warkentin 0 siblings, 1 reply; 17+ messages in thread From: Elena Zannoni @ 2003-03-03 2:55 UTC (permalink / raw) To: Kris Warkentin; +Cc: Daniel Jacobowitz, gdb-patches Kris Warkentin writes: > > > > [Kris: changelog!] > > > > > > The changelog is unchanged from the original post. > > > > Please always include it with the patch, even if it hasn't changed. > > Okay. Here is is with the patch: > > * aclocal.m4: Cause wcwidth check to substitute HAVE_WCWIDTH for > building. > * Makefile.in: Add wcwidth object to lib if required. > * shlib/Makefile.in: Likewise. > * configure: Regenerate. > OK, yes. elena > cheers, > > Kris > Index: Makefile.in > =================================================================== > RCS file: /cvs/src/src/readline/Makefile.in,v > retrieving revision 1.4 > diff -u -r1.4 Makefile.in > --- Makefile.in 8 Dec 2002 22:31:37 -0000 1.4 > +++ Makefile.in 26 Feb 2003 18:41:35 -0000 > @@ -86,6 +86,8 @@ > LIBRARY_NAME = libreadline.a > STATIC_LIBS = libreadline.a libhistory.a > > +WCWIDTH_OBJ = @WCWIDTH_OBJ@ > + > # The C code source files for this library. > CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \ > $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \ > @@ -98,7 +100,7 @@ > $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \ > $(srcdir)/shell.c $(srcdir)/savestring.c $(srcdir)/tilde.c \ > $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \ > - $(srcdir)/mbutil.c > + $(srcdir)/mbutil.c $(srcdir)/support/wcwidth.c > > # The header files for this library. > HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ > @@ -111,7 +113,8 @@ > OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \ > rltty.o complete.o bind.o isearch.o display.o signals.o \ > util.o kill.o undo.o macro.o input.o callback.o terminal.o \ > - text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) > + text.o nls.o misc.o compat.o xmalloc.o $(HISTOBJ) $(TILDEOBJ) \ > + $(WCWIDTH_OBJ) > > # The texinfo files which document this library. > DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo > @@ -146,6 +149,10 @@ > $(RM) $@ > $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o > -test -n "$(RANLIB)" && $(RANLIB) $@ > + > +wcwidth.o: $(srcdir)/support/wcwidth.c > + $(RM) $@ > + $(CC) $(CCFLAGS) -c $(srcdir)/support/wcwidth.c > > # Since tilde.c is shared between readline and bash, make sure we compile > # it with the right flags when it's built as part of readline > Index: aclocal.m4 > =================================================================== > RCS file: /cvs/src/src/readline/aclocal.m4,v > retrieving revision 1.4 > diff -u -r1.4 aclocal.m4 > --- aclocal.m4 8 Dec 2002 22:31:37 -0000 1.4 > +++ aclocal.m4 26 Feb 2003 18:41:35 -0000 > @@ -1653,7 +1653,13 @@ > AC_CHECK_HEADERS(langinfo.h) > > AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS)) > -AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) > +AC_CHECK_FUNC(wcwidth, have_wcwidth=yes) > +if test "$have_wcwidth" = yes; then > + AC_DEFINE(HAVE_WCWIDTH) > + AC_SUBST(WCWIDTH_OBJ,) > +else > + AC_SUBST(WCWIDTH_OBJ,wcwidth.o) > +fi > > AC_CACHE_CHECK([for mbstate_t], bash_cv_have_mbstate_t, > [AC_TRY_RUN([ > Index: shlib/Makefile.in > =================================================================== > RCS file: /cvs/src/src/readline/shlib/Makefile.in,v > retrieving revision 1.4 > diff -u -r1.4 Makefile.in > --- shlib/Makefile.in 8 Dec 2002 22:31:38 -0000 1.4 > +++ shlib/Makefile.in 26 Feb 2003 18:41:36 -0000 > @@ -103,6 +103,8 @@ > SHARED_HISTORY = libhistory.$(SHLIB_LIBVERSION) > SHARED_LIBS = $(SHARED_READLINE) $(SHARED_HISTORY) > > +WCWIDTH_OBJ = @WCWIDTH_OBJ@ > + > # The C code source files for this library. > CSOURCES = $(topdir)/readline.c $(topdir)/funmap.c $(topdir)/keymaps.c \ > $(topdir)/vi_mode.c $(topdir)/parens.c $(topdir)/rltty.c \ > @@ -115,7 +117,7 @@ > $(topdir)/histfile.c $(topdir)/nls.c $(topdir)/search.c \ > $(topdir)/shell.c $(topdir)/savestring.c $(topdir)/tilde.c \ > $(topdir)/text.c $(topdir)/misc.c $(topdir)/compat.c \ > - $(topdir)/mbutil.c > + $(topdir)/mbutil.c $(WCWIDTH_SRC) > > # The header files for this library. > HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \ > @@ -129,7 +131,7 @@ > rltty.so complete.so bind.so isearch.so display.so signals.so \ > util.so kill.so undo.so macro.so input.so callback.so terminal.so \ > text.so nls.so misc.so xmalloc.so $(SHARED_HISTOBJ) $(SHARED_TILDEOBJ) \ > - compat.so > + compat.so $(WCWIDTH_OBJ) > > ########################################################################## > > @@ -152,6 +154,10 @@ > $(SHARED_HISTORY): $(SHARED_HISTOBJ) xmalloc.so > $(RM) $@ > $(SHOBJ_LD) ${SHOBJ_LDFLAGS} ${SHLIB_XLDFLAGS} -o $@ $(SHARED_HISTOBJ) xmalloc.so $(SHLIB_LIBS) > + > +wcwidth.o: $(srcdir)/support/wcwidth.c > + $(RM) $@ > + $(SHOBJ_CC) -c $(CCFLAGS) $(SHOBJ_FLAGS) $(srcdir)/support/wcwidth.c > > # Since tilde.c is shared between readline and bash, make sure we compile > # it with the right flags when it's built as part of readline ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-03-03 2:55 ` Elena Zannoni @ 2003-03-03 14:46 ` Kris Warkentin 0 siblings, 0 replies; 17+ messages in thread From: Kris Warkentin @ 2003-03-03 14:46 UTC (permalink / raw) To: Elena Zannoni; +Cc: Daniel Jacobowitz, gdb-patches > > * aclocal.m4: Cause wcwidth check to substitute HAVE_WCWIDTH for > > building. > > * Makefile.in: Add wcwidth object to lib if required. > > * shlib/Makefile.in: Likewise. > > * configure: Regenerate. > > > > > OK, yes. > > elena Committed. Kris ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline 2003-02-26 17:51 ` Daniel Jacobowitz [not found] ` <00fd01c2ddc0$28ab75e0$0202040a@catdog> @ 2003-02-26 21:26 ` Andreas Schwab 1 sibling, 0 replies; 17+ messages in thread From: Andreas Schwab @ 2003-02-26 21:26 UTC (permalink / raw) To: Kris Warkentin; +Cc: gdb-patches Daniel Jacobowitz <drow@mvista.com> writes: |> On Wed, Feb 26, 2003 at 12:44:22PM -0500, Kris Warkentin wrote: |> > Here's what seems to me to be a more elegant solution. In aclocal.m4, I |> > just define the obj as wcwidth.o and then the Makefile will either have it |> > or not. |> > |> > cheers, |> |> > < AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH)) |> > --- |> > > AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH), |> > AC_SUBST(WCWIDTH_OBJ,wcwidth.o)) |> |> [Always use unified or context diffs, please] |> |> Did you try this on a host with wcwidth? I don't think it'll work |> right; I have the feeling that a conditional AC_SUBST can leave |> @WCWIDTH_OBJ@ in the makefile. AC_SUBST is a kind of declaration, it's mere existence (as long as it is expanded by autoconf) causes the variable to be substituted. Only the assignment of the value happens at runtime. Andreas. -- Andreas Schwab, SuSE Labs, schwab@suse.de SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [Patch] correctly configure wcwidth in readline @ 2003-02-26 20:14 Michael Elizabeth Chastain 0 siblings, 0 replies; 17+ messages in thread From: Michael Elizabeth Chastain @ 2003-02-26 20:14 UTC (permalink / raw) To: ac131313; +Cc: gdb-patches Whoops. I just committed a configure script built with autoconf 2.13. I'll regenerate with 000227, diff, test, commit. Michael C ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2003-03-03 14:46 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 16:47 [Patch] correctly configure wcwidth in readline Kris Warkentin
2003-02-26 16:54 ` Daniel Jacobowitz
2003-02-26 16:57 Michael Elizabeth Chastain
2003-02-26 18:23 ` Andrew Cagney
2003-02-26 17:35 Kris Warkentin
2003-02-26 18:06 ` Daniel Jacobowitz
2003-02-26 17:44 ` Kris Warkentin
2003-02-26 17:51 ` Daniel Jacobowitz
[not found] ` <00fd01c2ddc0$28ab75e0$0202040a@catdog>
[not found] ` <20030226175915.GA15700@nevyn.them.org>
2003-02-26 18:43 ` Kris Warkentin
2003-02-26 20:14 ` Daniel Jacobowitz
2003-02-26 20:40 ` Kris Warkentin
2003-02-26 20:49 ` Daniel Jacobowitz
2003-02-26 20:52 ` Kris Warkentin
2003-03-03 2:55 ` Elena Zannoni
2003-03-03 14:46 ` Kris Warkentin
2003-02-26 21:26 ` Andreas Schwab
2003-02-26 20:14 Michael Elizabeth Chastain
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox