summaryrefslogtreecommitdiff
path: root/twin/twin-0.4.6/cross_compile.patch
blob: 7f8163a78af1352de89f49a8c0aab638b05859f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
diff -urNd ../twin-0.4.6-r0/twin-0.4.6/Makefile.in twin-0.4.6/Makefile.in
--- ../twin-0.4.6-r0/twin-0.4.6/Makefile.in	2003-03-27 08:29:47 +00:00
+++ twin-0.4.6/Makefile.in	2004-07-27 13:04:46 +01:00
@@ -71,33 +71,33 @@
 # to correctly generate include/autoconf.h
 #
 
-ADMIN_LIBTOOLS:=admin/ltmain.sh admin/config.guess admin/config.sub
+#ADMIN_LIBTOOLS:=admin/ltmain.sh admin/config.guess admin/config.sub
 
-$(ADMIN_LIBTOOLS):
-	libtoolize -c
+#$(ADMIN_LIBTOOLS):
+#	libtoolize -c
 
-ADMIN_ACLOCAL:=admin/aclocal.m4
+#ADMIN_ACLOCAL:=admin/aclocal.m4
 
-DISTCLEAN_EMPTY_FILES:=$(ADMIN_ACLOCAL) $(ADMIN_LIBTOOLS)
+#DISTCLEAN_EMPTY_FILES:=$(ADMIN_ACLOCAL) $(ADMIN_LIBTOOLS)
 
-$(ADMIN_ACLOCAL):
-	@if [ -f /usr/share/aclocal/libtool.m4 ]; then \
-	  echo $(LN) /usr/share/aclocal/libtool.m4 $@ ; \
-	  $(LN) /usr/share/aclocal/libtool.m4 $@ ; \
-	else \
-	  echo touch $@; \
-	  touch $@; \
-	fi
+#$(ADMIN_ACLOCAL):
+#	@if [ -f /usr/share/aclocal/libtool.m4 ]; then \
+#	  echo $(LN) /usr/share/aclocal/libtool.m4 $@ ; \
+#	  $(LN) /usr/share/aclocal/libtool.m4 $@ ; \
+#	else \
+#	  echo touch $@; \
+#	  touch $@; \
+#	fi
 
-configure: configure.in $(ADMIN_LIBTOOLS) $(ADMIN_ACLOCAL) include/autoconf.h.in
-	rm -f $@ && autoconf --localdir=admin
+#configure: configure.in $(ADMIN_LIBTOOLS) $(ADMIN_ACLOCAL) include/autoconf.h.in
+#	rm -f $@ && autoconf
 
-include/autoconf.h.in: configure.in
-	rm -f $@ && autoheader
+#include/autoconf.h.in: configure.in
+#	rm -f $@ && autoheader
 
-config.status libtool: configure $(ADMIN_LIBTOOLS)
-	@echo Updating config.status libtool
-	./configure --cache-file=config.cache --no-create
+#config.status libtool: configure $(ADMIN_LIBTOOLS)
+#	@echo Updating config.status libtool
+#	./configure --host --cache-file=config.cache --no-create
 
 #
 # was:
diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure twin-0.4.6/configure
--- ../twin-0.4.6-r0/twin-0.4.6/configure	2003-03-27 08:29:47 +00:00
+++ twin-0.4.6/configure	2004-07-27 13:11:21 +01:00
@@ -1235,7 +1235,7 @@
 
 make_is_good=no
 if test "${MAKE-make}"; then
-  ${MAKE-make} -v | head -1 | cut -d' ' -f1-4 | cut -d, -f1 | \
+  ${MAKE-make} -v | head -n 1 | cut -d' ' -f1-4 | cut -d, -f1 | \
   while read make_GNU make_Make make_version make_numbers
   do
     if test "$make_GNU" = "GNU" -a "$make_Make" = "Make"; then
@@ -2167,7 +2167,7 @@
   lt_cv_file_magic_cmd='/usr/bin/file -L'
   case "$host_os" in
   rhapsody* | darwin1.[012])
-    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
+    lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -n 1`
     ;;
   *) # Darwin 1.3 on
     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
@@ -3670,7 +3670,7 @@
     # If the export-symbols file already is a .def file (1st line
     # is EXPORTS), use it as is.
     # If DATA tags from a recent dlltool are present, honour them!
-    archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+    archive_expsym_cmds='if test "x`head -n 1 $export_symbols`" = xEXPORTS; then
 	cp $export_symbols $output_objdir/$soname-def;
       else
 	echo EXPORTS > $output_objdir/$soname-def;
diff -urNd ../twin-0.4.6-r0/twin-0.4.6/configure.in twin-0.4.6/configure.in
--- ../twin-0.4.6-r0/twin-0.4.6/configure.in	2003-03-27 08:29:47 +00:00
+++ twin-0.4.6/configure.in	2004-07-27 13:18:07 +01:00
@@ -188,7 +188,7 @@
 
 make_is_good=no
 if test "${MAKE-make}"; then
-  ${MAKE-make} -v | head -1 | cut -d' ' -f1-4 | cut -d, -f1 | \
+  ${MAKE-make} -v | head -n 1 | cut -d' ' -f1-4 | cut -d, -f1 | \
   while read make_GNU make_Make make_version make_numbers
   do
     if test "$make_GNU" = "GNU" -a "$make_Make" = "Make"; then
@@ -378,7 +378,16 @@
 	       select strdup strerror strspn strstr scandir alphasort uname \
 	       vprintf vsprintf vsnprintf wait3 wait4 getpt grantpt unlockpt ptsname)
 
-AC_CHECK_FILE(/dev/ptmx)
+AC_SEARCH_LIBS(openpty,util,
+   [
+       AC_DEFINE(HAVE_OPENPTY,1,[define if you have openpty function])
+       no_dev_ptmx=yes
+   ])
+AC_CHECK_FUNCS([_getpty])
+if test -z "$no_dev_ptmx" ; then
+    AC_CHECK_FILE(/dev/ptmx)
+fi
+
 AC_CHECK_FUNC(crypt,,AC_CHECK_LIB(crypt,crypt))
 AC_CHECK_FUNC(dlopen,,AC_CHECK_LIB(dl,dlopen))
 AC_CHECK_LIB(ltdl,lt_dlopen)
diff -urNd ../twin-0.4.6-r0/twin-0.4.6/makerules twin-0.4.6/makerules
--- ../twin-0.4.6-r0/twin-0.4.6/makerules	2003-03-27 08:29:48 +00:00
+++ twin-0.4.6/makerules	2004-07-27 13:04:46 +01:00
@@ -794,7 +794,7 @@
 endif
 
 $(TOPDIR)/scripts/Getsizes: $(TOPDIR)/scripts/getsizes.c $(TOPDIR)/include/Tw/datatypes.h $(TOPDIR)/include/autoconf.h
-	$(CC) $(CC_FLAGS) $(CC_FLAGS_script_getsizes.o) $(LD_FLAGS) $< -o $@
+	$(HOSTCC) $(CC_FLAGS) $(CC_FLAGS_script_getsizes.o) $(LD_FLAGS) $< -o $@
 	@echo "PREVIOUS_CONF__LONG_LONG=$(CONF__LONG_LONG)" > $(TOPDIR)/.long_long.conf
 
 #
@@ -802,10 +802,10 @@
 # but this is the best place to force creating it
 #
 $(TOPDIR)/scripts/Mkdep: $(TOPDIR)/scripts/mkdep.c $(TOPDIR)/include/autoconf.h $(TOPDIR)/include/Tw/datasizes.h
-	$(CC) $(CC_FLAGS) $(LD_FLAGS) $< -o $@
+	$(HOSTCC) $(CC_FLAGS) $(LD_FLAGS) $< -o $@
 
 $(TOPDIR)/scripts/Bitmap: $(TOPDIR)/scripts/bitmap.c
-	$(CC) $(CC_FLAGS) $(LD_FLAGS) $< -o $@
+	$(HOSTCC) $(CC_FLAGS) $(LD_FLAGS) $< -o $@
 	
 
 #
diff -urNd ../twin-0.4.6-r0/twin-0.4.6/scripts/mkdep.c twin-0.4.6/scripts/mkdep.c
--- ../twin-0.4.6-r0/twin-0.4.6/scripts/mkdep.c	2003-03-27 08:29:48 +00:00
+++ twin-0.4.6/scripts/mkdep.c	2004-07-27 13:04:46 +01:00
@@ -172,8 +172,8 @@
 	putchar('\n');
 }
 
-static char str_path[3][512];
-static int  len_path[3];
+static char str_path[20][512];
+static int  len_path[20];
 static int  max_path = 0;
 static int  limit_path = sizeof(len_path)/sizeof(len_path[0]);