[Asterisk-cvs] asterisk/editline Makefile.in, 1.4, 1.5 config.h.in, 1.1, 1.2 configure, 1.2, 1.3 configure.in, 1.2, 1.3

kpfleming at lists.digium.com kpfleming at lists.digium.com
Tue Jul 5 15:31:04 CDT 2005


Update of /usr/cvsroot/asterisk/editline
In directory mongoose.digium.com:/tmp/cvs-serv1019/editline

Modified Files:
	Makefile.in config.h.in configure configure.in 
Log Message:
make editline build properly on cygwin (bug #4624)


Index: Makefile.in
===================================================================
RCS file: /usr/cvsroot/asterisk/editline/Makefile.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- Makefile.in	14 Dec 2004 23:36:30 -0000	1.4
+++ Makefile.in	5 Jul 2005 19:30:18 -0000	1.5
@@ -3,6 +3,13 @@
 #
 
 OSTYPE=$(shell uname -s)
+cygx="$(shell uname -s | sed -e c\cygwin | tr [:upper:] [:lower:])"
+define cyg_subst_sys
+	if [ $(cygx) = "cygwin" ]; then \
+	cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \
+	mv --force $@.copy $@; \
+	fi
+endef
 
 SHELL = /bin/sh
 
@@ -184,7 +191,7 @@
 	$(RANLIB) $@
 
 $(LIB_S) : $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s)
-	$(CC) $(S_LDFLAGS) -o $@ $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s)
+	$(CC) $(S_LDFLAGS) -o $@ $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s) $(LIBS)
 
 $(TEST) : $(TCSRCS:.c=.o) $(LIB_A)
 	$(CC) -o $@ $(TCSRCS:.c=.o) $(LIB_A) $(LIBS)
@@ -203,12 +210,14 @@
 
 fcns.c : $(AGHDRS) fcns.h
 	$(SHELL) makelist -fc $(AGHDRS) > $@
+	$(cyg_subst_sys)
 
 help.h : $(ACSRCS)
 	$(SHELL) makelist -bh $(ACSRCS) > $@
 
 help.c : $(ACSRCS) help.h
 	$(SHELL) makelist -bc $(ACSRCS) > $@
+	$(cyg_subst_sys)
 
 editline.c : $(ACSRCS) $(BCSRCS) $(AGCSRCS)
 	$(SHELL) makelist -e $(ACSRCS) $(BCSRCS) $(AGCSRCS) > $@

Index: config.h.in
===================================================================
RCS file: /usr/cvsroot/asterisk/editline/config.h.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- config.h.in	27 Nov 2002 05:04:06 -0000	1.1
+++ config.h.in	5 Jul 2005 19:30:18 -0000	1.2
@@ -1,4 +1,5 @@
 #undef SUNOS
+#undef CYGWIN
 
 #undef HAVE_SYS_CDEFS_H
 #undef HAVE_TERMCAP_H
@@ -15,3 +16,6 @@
 #undef HAVE_STRUNVIS
 
 #include "sys.h"
+#ifdef CYGWIN
+# include "cygdef.h"
+#endif

Index: configure
===================================================================
RCS file: /usr/cvsroot/asterisk/editline/configure,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- configure	27 Apr 2003 18:13:11 -0000	1.2
+++ configure	5 Jul 2005 19:30:18 -0000	1.3
@@ -894,7 +894,26 @@
   *-*-freebsd*)
 	ABI="elf"
 	;;
-  *-*-linux*)
+  *-*-linux* | *cygwin*)
+	cyg="$(echo ${host} | sed -e c\cygwin)"
+	if [ ${cyg} = cygwin ]; then \
+		echo "cygwin detected"; \
+		S_CFLAGS=""; \
+		echo "/* cygdef.h. Generated automatically by configure. */ 
+#ifndef _CYGDEF_H_
+#define _CYGDEF_H_ 1
+#include <sys/ioctl.h>
+#define __linux__ 1
+ 
+
+typedef void (*sig_t)(int);
+ 
+
+#endif /* _CYGDEF_H_ */" > cygdef.h; \
+	echo "
+ #define CYGWIN 1
+" > confdefs.h; \
+	fi
 	ABI="elf"
 	;;
   *-*-netbsd*)

Index: configure.in
===================================================================
RCS file: /usr/cvsroot/asterisk/editline/configure.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- configure.in	27 Apr 2003 18:13:11 -0000	1.2
+++ configure.in	5 Jul 2005 19:30:18 -0000	1.3
@@ -31,7 +31,26 @@
   *-*-freebsd*)
 	ABI="elf"
 	;;
-  *-*-linux*)
+  *-*-linux* | *cygwin*)
+	cyg="$(echo ${host} | sed -e c\cygwin)"
+	if [ ${cyg} = cygwin ]; then \
+		echo "cygwin detected"; \
+		S_CFLAGS=""; \
+		echo "/* cygdef.h. Generated automatically by configure. */ 
+#ifndef _CYGDEF_H_
+#define _CYGDEF_H_ 1
+#include <sys/ioctl.h>
+#define __linux__ 1
+ 
+
+typedef void (*sig_t)(int);
+ 
+
+#endif /* _CYGDEF_H_ */" > cygdef.h; \
+	echo "
+ #define CYGWIN 1
+" > confdefs.h; \
+	fi
 	ABI="elf"
 	;;
   *-*-netbsd*)




More information about the svn-commits mailing list