1 --------------------------------------------------------------------
2 > François Pinard mailto:pinard@iro.umontreal.ca
3 > I have a collection of DOS-abling patches for Autoconf which came from
4 > Eli, I think, and which you may fetch from:
6 > http://www.iro.umontreal.ca/contrib/paxutils/dist/PATCHES-AC
8 > if I'm not mistaken. There are a few other mods not related to DOS ports.
9 --------------------------------------------------------------------
10 > On Sun, 22 Nov 1998, Tim Rice(tim@trr.metro.net wrote:
11 > Here is a patch for Autoconf version 2.12 to address a couple of
12 > issues on SVR4.2 machines.
14 > It was failing the test for opendir() because opendir() is in libc
15 > not in libdir. The patch now checks libc first then libdir.
17 > It was failing on gethostbyname(). I added a third test for gethostbynane()
20 --------------------------------------------------------------------
22 * acgeneral.m4: added support for DJGPP
23 - "test -f" should be replaced by "test -x" where the script
24 looks for an executable binary which will be called gcc.exe
25 etc. on DOS/Windows. A simple test for $COMSPEC being not
26 defined is suggested as a means to determine which option is
27 required. (You cannot use "test -x" on all systems because some
28 variants of Unix shell don't support -x.)
30 - File patterns used to distinguish between absolute and relative
31 file names need to be changed as follows:
34 [/$]* --> [/$]*/[A-z]:/*)
36 This is because absolute file names on DOS/Windows may include a
37 drive letter and a colon before the leading slash. Note that the
38 lower-case `z' in [A-z] is intentional, since some network
39 clients allow filesystems to be identified by the six letters
40 between the uppercase `Z' and lowercase `a', and because the
41 drive letter can come in either letter-case.
43 - The line which computes ac_file_inputs by replacing the colon in
44 foo:foo.in needs its two Sed commands to be swapped, because
45 once you put in the $ac_given_srcdir part, the colon after the
46 drive letter in it will be replaced instead of the original
50 * acspecific.m4: check opendir in libc before -ldir
51 gethosbyname/connect check in -lsocket also
54 diff -ur ../autoconf-2.13.orig/acgeneral.m4 ./acgeneral.m4
55 --- ../autoconf-2.13.orig/acgeneral.m4 Tue Jan 5 08:27:37 1999
56 +++ ./acgeneral.m4 Tue Feb 9 22:27:34 1999
61 +# Support of DJGPP port of bash.
62 +if test -n "$COMSPEC$ComSpec"; then ac_x=-x; else ac_x=-f; fi
65 # Only set these to C if already set. These must not be set unconditionally
66 # because not all systems understand e.g. LANG=C (notably SCO).
69 dnl AC_MSG_WARN(PROBLEM-DESCRIPTION)
71 -[echo "configure: warning: $1" 1>&2])
72 +[echo "configure: WARNING: $1" 1>&2])
74 dnl AC_MSG_ERROR(ERROR-DESCRIPTION)
78 dnl AC_OBSOLETE(THIS-MACRO-NAME [, SUGGESTION])
80 -[errprint(__file__:__line__: warning: [$1] is obsolete[$2]
81 +[errprint(__file__:__line__: WARNING: [$1] is obsolete[$2]
86 ac_dummy="ifelse([$5], , $PATH, [$5])"
87 for ac_dir in $ac_dummy; do
88 test -z "$ac_dir" && ac_dir=.
89 - if test -f $ac_dir/$ac_word; then
90 + if test $ac_x $ac_dir/$ac_word; then
92 [ if test "[$ac_dir/$ac_word]" = "$6"; then
95 AC_MSG_CHECKING([for $ac_word])
96 AC_CACHE_VAL(ac_cv_path_$1,
101 +changequote([, ])dnl
102 ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
105 @@ -1398,7 +1403,7 @@
106 ac_dummy="ifelse([$4], , $PATH, [$4])"
107 for ac_dir in $ac_dummy; do
108 test -z "$ac_dir" && ac_dir=.
109 - if test -f $ac_dir/$ac_word; then
110 + if test $ac_x $ac_dir/$ac_word; then
111 ac_cv_path_$1="$ac_dir/$ac_word"
114 @@ -1802,7 +1807,7 @@
116 [if test "$cross_compiling" = yes; then
118 - [errprint(__file__:__line__: warning: [AC_TRY_RUN] called without default to allow cross compiling
119 + [errprint(__file__:__line__: WARNING: [AC_TRY_RUN] called without default to allow cross compiling
121 AC_MSG_ERROR(can not run test program while cross compiling)],
123 @@ -2267,7 +2272,10 @@
125 if test -z "$ac_dots"; then top_srcdir=.
126 else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
127 - /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
130 +changequote([, ])dnl
131 + srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
133 srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
134 top_srcdir="$ac_dots$ac_given_srcdir" ;;
135 @@ -2276,7 +2284,7 @@
136 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
137 [ case "$ac_given_INSTALL" in
139 - [/$]*) INSTALL="$ac_given_INSTALL" ;;
140 + [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;;
142 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
144 @@ -2291,7 +2299,7 @@
148 - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
149 + ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"`
151 s%@configure_input@%$configure_input%g
153 @@ -2359,7 +2367,7 @@
154 echo creating $ac_file
156 rm -f conftest.frag conftest.in conftest.out
157 - ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
158 + ac_file_inputs=`echo $ac_file_in|sed -e "s%:% $ac_given_srcdir/%g" -e "s%^%$ac_given_srcdir/%"`
159 cat $ac_file_inputs > conftest.in
162 @@ -2483,7 +2491,7 @@
166 - [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
167 + [/$]*|[A-z]:/*) ac_rel_source="$srcdir/$ac_source" ;;
169 *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
171 @@ -2558,7 +2566,9 @@
173 .) # No --srcdir option. We are building in place.
174 ac_sub_srcdir=$srcdir ;;
175 - /*) # Absolute path.
177 + /*|[A-z]:/*) # Absolute path.
178 +changequote([, ])dnl
179 ac_sub_srcdir=$srcdir/$ac_config_dir ;;
181 ac_sub_srcdir=$ac_dots$srcdir/$ac_config_dir ;;
182 @@ -2579,14 +2589,16 @@
184 # Make the cache file name correct relative to the subdirectory.
185 case "$cache_file" in
186 - /*) ac_sub_cache_file=$cache_file ;;
188 + /*|[A-z]:/*) ac_sub_cache_file=$cache_file ;;
189 +changequote([, ])dnl
191 ac_sub_cache_file="$ac_dots$cache_file" ;;
193 ifdef([AC_PROVIDE_AC_PROG_INSTALL],
194 [ case "$ac_given_INSTALL" in
196 - [/$]*) INSTALL="$ac_given_INSTALL" ;;
197 + [/$]*|[A-z]:/*) INSTALL="$ac_given_INSTALL" ;;
199 *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
201 diff -ur ../autoconf-2.13.orig/acspecific.m4 ./acspecific.m4
202 --- ../autoconf-2.13.orig/acspecific.m4 Tue Jan 5 08:27:52 1999
203 +++ ./acspecific.m4 Thu Jan 28 23:01:41 1999
205 # Don't use installbsd from OSF since it installs stuff as root
207 for ac_prog in ginstall scoinst install; do
208 - if test -f $ac_dir/$ac_prog; then
209 + if test $ac_x $ac_dir/$ac_prog; then
210 if test $ac_prog = install &&
211 grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
212 # AIX install. It has an incompatible calling convention.
214 [ac_header_dirent=$ac_hdr; break])
215 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
216 if test $ac_header_dirent = dirent.h; then
217 -AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
218 +AC_CHECK_FUNC(opendir)
219 +if test $ac_cv_func_opendir = no; then
220 + AC_CHECK_LIB(dir, opendir, LIBS="$LIBS -ldir")
223 AC_CHECK_LIB(x, opendir, LIBS="$LIBS -lx")
225 @@ -2564,6 +2567,9 @@
226 AC_CHECK_FUNC(gethostbyname)
227 if test $ac_cv_func_gethostbyname = no; then
228 AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
229 + if test $ac_cv_func_gethostbyname = no; then
230 + AC_CHECK_LIB(socket, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lsocket -lnsl", , -lnsl)
234 # lieder@skyler.mavd.honeywell.com says without -lsocket,
235 @@ -2575,7 +2581,7 @@
236 # We assume that if connect needs -lnsl, so does gethostbyname.
237 AC_CHECK_FUNC(connect)
238 if test $ac_cv_func_connect = no; then
239 - AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
240 + AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket -lnsl $X_EXTRA_LIBS", ,