From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22935 invoked from network); 14 Dec 2001 00:40:37 -0000 Received: from ns2.primenet.com.au (HELO primenet.com.au) (?9i4TbSWjskbbsNhhdp0c/GxEPJlmdZDw?@203.24.36.3) by ns1.primenet.com.au with SMTP; 14 Dec 2001 00:40:37 -0000 Received: (qmail 406 invoked from network); 14 Dec 2001 00:40:36 -0000 Received: from sunsite.dk (130.225.247.90) by proxy.melb.primenet.com.au with SMTP; 14 Dec 2001 00:40:36 -0000 Received: (qmail 28345 invoked by alias); 14 Dec 2001 00:40:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16332 Received: (qmail 28332 invoked from network); 14 Dec 2001 00:40:28 -0000 Date: Fri, 14 Dec 2001 11:40:22 +1100 From: Geoff Wing To: Zsh Hackers Subject: PATCH: ansi2knr configure check and removal from CVS Message-ID: <20011214004022.GA22852@primenet.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.23.1i Organization: PrimeNet Computer Consultancy Heyla, this implements a basic check for ansi2knr as proposed ages ago. It will cause configure to exit "rudely" if ansi2knr is requested via configure option but not available. Much of the ansi2knr build framework has been deliberately left in place. The corresponding action for the patch is the removal of Src/ansi2knr.c from CVS Regards, Geoff Index: zshconfig.ac =================================================================== RCS file: /cvsroot/zsh/zsh/zshconfig.ac,v retrieving revision 1.21 diff -u -r1.21 zshconfig.ac --- zshconfig.ac 2001/11/15 12:10:22 1.21 +++ zshconfig.ac 2001/12/14 00:32:19 @@ -289,7 +289,7 @@ dnl if the user hasn't specified CFLAGS, then dnl if compiler is gcc, then use -O2 and some warning flags dnl else use -O -if test -n "$auto_cflags"; then +if test -n "$auto_cflags" && test ."$ansi2knr" != .yes; then if test "${enable_zsh_debug}" = yes; then if test -n "$GCC"; then CFLAGS="$CFLAGS -Wall -Wno-implicit -Wmissing-prototypes -ggdb" @@ -462,6 +462,17 @@ AC_PROG_AWK dnl Check for mawk,gawk,nawk, then awk. AC_PROG_LN dnl Check for working ln, for "make install" AC_CHECK_PROGS([YODL], [yodl], [: yodl]) +AC_CHECK_PROGS([ANSI2KNR], [ansi2knr], [: ansi2knr]) + +if test x"$ansi2knr" = xyes && test x"$ANSI2KNR" = x": ansi2knr"; then + echo "----------" + echo "configure fatal error:" + echo "ansi2knr was specified (--enable-ansi2knr) but the program could not be found." + echo "Either remove the configure option if it is not required or build the ansi2knr" + echo "program before reconfiguring Zsh. The source code for ansi2knr is also" + echo "available in the GPL directory on Zsh distribution sites." + exit 1 +fi dnl ------------------ dnl CHECK HEADER FILES Index: Config/defs.mk.in =================================================================== RCS file: /cvsroot/zsh/zsh/Config/defs.mk.in,v retrieving revision 1.7 diff -u -r1.7 defs.mk.in --- Config/defs.mk.in 2001/04/23 19:59:04 1.7 +++ Config/defs.mk.in 2001/12/14 00:32:19 @@ -65,6 +65,7 @@ # utilities AWK = @AWK@ +ANSI2KNR = @ANSI2KNR@ YODL = @YODL@ YODL2TXT = $(YODL)2txt YODL2HTML = $(YODL)2html @@ -86,7 +87,8 @@ DLCFLAGS='$(DLCFLAGS)' DLLDFLAGS='$(DLLDFLAGS)' \ LIBLDFLAGS='$(LIBLDFLAGS)' EXELDFLAGS='$(EXELDFLAGS)' \ LIBS='$(LIBS)' DL_EXT='$(DL_EXT)' DLLD='$(DLLD)' \ -AWK='$(AWK)' YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)' \ +AWK='$(AWK)' ANSI2KNR='$(ANSI2KNR)' \ +YODL='$(YODL)' YODL2TXT='$(YODL2TXT)' YODL2HTML='$(YODL2HTML)' \ FUNCTIONS_INSTALL='$(FUNCTIONS_INSTALL)' tzsh='$(tzsh)' # override built-in suffix list Index: Src/Makefile.in =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Makefile.in,v retrieving revision 1.11 diff -u -r1.11 Makefile.in --- Src/Makefile.in 2001/05/20 10:59:28 1.11 +++ Src/Makefile.in 2001/12/14 00:32:19 @@ -135,20 +135,6 @@ $(ENTRYOBJ): FORCE @$(MAKE) -f Makemod $(MAKEDEFS) $@ -# ========== ANSI TO K&R CONVERSION ========== - -ANSI_KNR = ansi2knr -ANSIKNR = - -Makemod: $(ANSI@U@KNR) - -ansi2knr.o: ansi2knr.c - $(CC) -c $(CPPFLAGS) $(CFLAGS) $(sdir)/ansi2knr.c - -ansi2knr: ansi2knr.o - rm -f $@ - $(CC) $(LDFLAGS) $(EXELDFLAGS) -o $@ ansi2knr.o - # ========== DEPENDENCIES FOR INSTALLING ========== install: install.bin install.modules @@ -203,7 +189,7 @@ .PHONY: mostlyclean-here clean-here: - rm -f modules.stamp zsh$(EXEEXT) ansi2knr.o ansi2knr + rm -f modules.stamp zsh$(EXEEXT) rm -f libzsh-*.$(DL_EXT) .PHONY: clean-here Index: Src/Makemod.in.in =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Makemod.in.in,v retrieving revision 1.4 diff -u -r1.4 Makemod.in.in --- Src/Makemod.in.in 2000/11/26 20:01:03 1.4 +++ Src/Makemod.in.in 2001/12/14 00:32:19 @@ -65,7 +65,7 @@ @rm -f $(dir_src)/stamp-modobjs .c$(KNR@U@OBJ): - $(dir_src)/ansi2knr $< > $@.c + @ANSI2KNR@ $< > $@.c $(COMPILE) -o $@ $@.c rm -f $@.c @rm -f $(dir_src)/stamp-modobjs @@ -74,7 +74,7 @@ $(DLCOMPILE) -o $@ $< .c.$(KNR@U@OBJ): - $(dir_src)/ansi2knr $< > $@.c + @ANSI2KNR@ $< > $@.c $(DLCOMPILE) -o $@ $@.c rm -f $@.c