Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: ansi2knr configure check and removal from CVS
- X-seq: zsh-workers 16332
- From: Geoff Wing <gcw@xxxxxxx>
- To: Zsh Hackers <zsh-workers@xxxxxxxxxx>
- Subject: PATCH: ansi2knr configure check and removal from CVS
- Date: Fri, 14 Dec 2001 11:40:22 +1100
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author