[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
lynx-dev Patch for DOS using configure script
From: |
Doug Kaufman |
Subject: |
lynx-dev Patch for DOS using configure script |
Date: |
Thu, 2 Aug 2001 08:10:42 -0700 (PDT) |
This is a revised patch to get the DJGPP port to use the configure
script. It seems to work well in the variations I have tried,
including both PDCurses and SLang. I know that configure should be
regenerated, but I have never learned to use autoconfigure. I hope
Tom can make the appropriate adjustments. This also corrects some
missing headers for DOS. I also suggested changing the order of
random and rand48. I know that this has been discussed before, but
as far as I can tell, it seems that random gives less predictable
"random" numbers. If we don't include this part, can we make a
configure option that allows choice of preferred randomization
function? I revised INSTALLATION for DOS, giving a URL for my DOS
patch to openssl. I dropped the reference to goto URL of the form
file:///dev/c/path/filename, since this only works in certain parts of
lynx (such as lynx.cfg). I'll try to get this working in the future.
In fixing makefile.in, I patched the sed script for converting the
path to docdir. As far as I can tell, however, from my examination of
lynx.cfg, this isn't used for any platform. Does this part of the sed
script do anything?
I haven't seen any feedback to the original patch for using the
configure script with DOS. Has anyone else tried this?
Things still needing fixing for DOS:
1. Support for both forms of file addressing, [a-zA-Z]:[/\\] and
/dev/[a-zA-z]/.
2. Support for gzipped help files. This works with long file names in
a DOS box under Windows, but not in plain DOS, which doesn't allow
double extensions.
3. Better handling of local files in root directory. "file:///c:/"
takes a long time to work, but "file:///c:/." works fine. I haven't
really looked to see why.
4. No ability to break out of hung nameserver lookups or http requests
without closing lynx with SIGINT. This is the biggest complaint I get
by email.
Doug
--- lynx2.8.4rel.1/lynx2-8-4/INSTALLATION.ori Tue Jul 17 13:04:36 2001
+++ lynx2.8.4rel.1/lynx2-8-4/INSTALLATION Wed Aug 1 23:01:16 2001
@@ -761,25 +761,35 @@
V. Compile instructions -- 386 DOS
- Compiling for DOS with DJGPP is a multistep procedure. First install
- the C compiler and its libraries (see readme.1st from DJGPP distribution).
-
- Originally, lynx makefiles come with the initial -O2 optimization level.
- If you experience compilation process too slow due to paging to the disk
- (DPMI server provide virtual memory, when in lack of RAM), you may change
- optimization to -O1 or turn the optimization off entirely.
-
- Alternatively, to get the last bit of run-time performance you may try
- -O2 or -O3, in this case you may need to "stubedit" your "cc1.exe" file
- to enlarge compiler stack size. If using DJGPP 2.02 and GCC 2.8.1,
- to compile with -O3 optimization, the stub needs to be edited to give
- a larger stack. To do this go into djgpp\lib\gcc-lib\djgpp\2.81
- and either type the command:
+ Compiling for DOS with DJGPP has traditionally been a multistep
+ procedure. Now, if you have a full installation of DJGPP you can
+ also install using the configure script, just as in the UNIX
+ section. This needs to be done under a BASH shell. Use a shell
+ script to run configure as in the example at the end of this
+ section. Otherwise you can follow the below instructions. The
+ multistep procedure for DOS may not be supported in the future
+ and use of the configure script is recommended. The information
+ about required libraries and unpacking applies to both methods of
+ compiling.
+
+ First install the C compiler and its libraries (see readme.1st from
+ DJGPP distribution).
+
+ Originally, lynx makefiles come with the initial -O2 optimization
+ level. If you experience compilation process too slow due to paging
+ to the disk (DPMI server provide virtual memory, when in lack of
+ RAM), you may change optimization to -O1 or turn the optimization
+ off entirely.
+
+ If using optimization level -O2 or -O3 with older versions of DJGPP
+ and GCC, you may need to "stubedit" your "cc1.exe" file to enlarge
+ compiler stack size. For instance, if using DJGPP 2.02 and GCC 2.8.1,
+ to compile with -O3 optimization, the stub needs to be edited to give
+ a larger stack. To do this go into djgpp\lib\gcc-lib\djgpp\2.81 and
+ either type the command:
"stubedit cc1.exe bufsize=63k minstack=2M",
- or edit interactively with: "stubedit cc1.exe".
- The requirements for compiling with optimization using DJGPP 2.03
- and GCC 2.95.2 have not yet been fully investigated. The above
- should serve as a guide.
+ or edit interactively with: "stubedit cc1.exe". Current versions of
+ DJGPP and GCC generally work with the standard stack.
Unpack the source code using a DOS program like UNZIP386. If you are
using PKUNZIP to unpack the .zip archive, you must use the -d command
@@ -827,12 +837,20 @@
setcbrk(setting);
# else
- If you have trouble applying the patch, try using the "patch" program,
+ If you wish to compile with SSL enabled, you need to get and
+ compile openssl. The DJGPP port has been successfully compiled with
+ openssl-0.9.6b. After obtaining the source file, unpack it with
+ DJTARX, then apply the patch for DOS before compiling. This will
+ create a file "install.djgpp" which gives further details. The patch
+ can be obtained from the openssl-dev archives at:
+ "http://www.mail-archive.com/address@hidden/msg09104/096b.pch.gz"
+
+ If you have trouble applying the patches, try using the "patch" program,
("ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/pat253b.zip").
To read the Unix man style documentation, use, for example, "less"
("ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/lss358b.zip").
- Compile or place your compiled PDCurses library in lynx2-*/curses, and
- compile or place your compiled WATT-32 library in lynx2-*/djgpp/watt32. If
+ Compile or place your compiled PDCurses library in /djgpp/pdcur24, and
+ compile or place your compiled WATT-32 library in /djgpp/watt32. If
using the SLANG library, put libslang.a in your DJGPP/lib directory and put
slang.h and slcurses.h in your DJGPP/include directory, or in the
appropriate directories specified by LIBRARY_PATH and INCLUDE_PATH in your
@@ -894,7 +912,6 @@
file://localhost/c:/
file://localhost/c:/dos
file://localhost/c:/dos/command.com
- file://localhost/dev/c/dos/command.com
See "http://www.fdisk.com/doslynx/lynxport.htm" for more hints and
some precompiled libraries. One problem you can encounter is editing
@@ -924,9 +941,38 @@
complete batch file with error checking and annotation can be found at:
"http://www.flora.org/lynx-dev/html/month111997/msg00250.html".
+ If you use the configure method, remember that if you configure with
+ the option "--enable-nls", you also need to set LIBS="-liconv". A
+ sample shell script to run configure using PDCurses follows. If you
+ compile to use SLANG, note that the DJGPP keyhandler will be used
+ instead of the SLANG keyhandler unless you define "NO_DJ_KEYHANDLER".
+
+ #!/bin/sh
+ CFLAGS="-O2 -I/djgpp/pdcur24 -I/djgpp/watt32/inc" \
+ LIBS="-L/djgpp/pdcur24/lib -L/djgpp/watt32/lib -liconv" \
+ ./configure --prefix=d:/djgpp/lynx-rel/lynx-cnf \
+ --with-screen=curses \
+ --disable-full-paths \
+ --enable-addrlist-page \
+ --enable-change-exec \
+ --enable-cgi-links \
+ --enable-charset-choice \
+ --enable-default-colors \
+ --enable-exec-links \
+ --enable-externs \
+ --enable-file-upload \
+ --enable-nls \
+ --enable-prettysrc \
+ --enable-read-eta \
+ --enable-source-cache \
+ --enable-nested-tables \
+ --libdir=d:/djgpp/lynx-rel/lynx-cnf \
+ --with-zlib \
+ --with-ssl
+
-- 1997/9/29 - D. Kaufman <address@hidden>
-- 1997/10/3 - B. Schiavo <address@hidden>
--- Last update - 2001/07/12
+-- Last update - 2001/08/01
VI. General installation instructions
--- lynx2.8.4rel.1/lynx2-8-4/src/LYCurses.h.ori Sat Jul 7 17:30:12 2001
+++ lynx2.8.4rel.1/lynx2-8-4/src/LYCurses.h Sat Jul 28 09:10:36 2001
@@ -236,7 +236,7 @@
/*
* If we have pads, use them to implement left/right scrolling.
*/
-#if defined(HAVE_NEWPAD) && defined(HAVE_PNOUTREFRESH)
+#if defined(HAVE_NEWPAD) && defined(HAVE_PNOUTREFRESH) && !defined(PDCURSES)
#define USE_CURSES_PADS 1
#endif
--- lynx2.8.4rel.1/lynx2-8-4/configure.ori Tue Jul 17 13:04:36 2001
+++ lynx2.8.4rel.1/lynx2-8-4/configure Sat Jul 28 09:10:36 2001
@@ -1715,6 +1715,11 @@
linux*)
TRY_CFLAGS="$TRY_CFLAGS -DLINUX"
;;
+msdosdjgpp*)
+ PROG_EXT=".exe"
+ LIBS="$LIBS -lwatt"
+ TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS -DWATT32"
+ ;;
next*)
TRY_CFLAGS="$TRY_CFLAGS -DNEXT -DXMOSAIC_HACK"
;;
@@ -3060,7 +3065,7 @@
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
gt_save_LIBS="$LIBS"
- LIBS="$gt_save_LIBS -lintl"
+ LIBS="-lintl $gt_save_LIBS"
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
echo "configure:3066: checking for gettext in libintl" >&5
if eval "test \"`echo '$''{'gt_cv_func_gettext_libintl'+set}'`\" = set"; then
@@ -3095,7 +3100,7 @@
fi
if test "$gt_cv_func_gettext_libintl" = yes; then
- LIBS="$LIBS -lintl"
+ LIBS="-lintl $LIBS"
fi
if test "$gt_cv_func_gettext_libc" = "yes" \
@@ -10572,7 +10577,7 @@
else
cf_cv_srand_func=unknown
-for cf_func in srand48/lrand48 srandom/random srand/rand
+for cf_func in srandom/random srand48/lrand48 srand/rand
do
cf_srand_func=`echo $cf_func | sed -e 's@/.*@@'`
cf_rand_func=`echo $cf_func | sed -e 'address@hidden/@@'`
@@ -16277,6 +16282,7 @@
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+ ?:/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir"
;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
@@ -16284,6 +16290,7 @@
esac
case "$ac_given_INSTALL" in
+ ?:/*) INSTALL="$ac_given_INSTALL" ;;
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
--- lynx2.8.4rel.1/lynx2-8-4/makefile.in.ori Sat Jul 7 17:30:12 2001
+++ lynx2.8.4rel.1/lynx2-8-4/makefile.in Sat Jul 28 20:36:46 2001
@@ -54,10 +54,12 @@
## Where you want the doc-files installed
docdir= @libdir@/lynx_doc
DOCDIR= $(DESTDIR)$(docdir)
+docdir1= $(shell echo "$(docdir)"|sed -e 's!^/!!')
## Where you want the help-files installed
helpdir= @libdir@/lynx_help
HELPDIR= $(DESTDIR)$(helpdir)
+helpdir1= $(shell echo "$(helpdir)"|sed -e 's!^/!!')
##set the relative location of the WWW library Implementation directory,
##from this directory
@@ -394,8 +396,8 @@
@echo Updating $(libdir)/lynx.cfg to point to installed help-files
@address@hidden -e '/^HELPFILE:http/s!^!#!' \
-e '/^#HELPFILE:file/s!#!!' \
- -e '/^HELPFILE:file/s!/PATH_TO/lynx_help!$(helpdir)!' \
- -e '/^[A-Z_]*:/s!/PATH_TO/lynx_doc!$(docdir)!' \
+ -e '/^HELPFILE:file/s!PATH_TO/lynx_help!$(helpdir1)!' \
+ -e '/^[A-Z_]*:/s!PATH_TO/lynx_doc!$(docdir1)!' \
-e '/^HELPFILE:file/s!$$!$(COMPRESS_EXT)!' \
-e
'/^HELPFILE:file/s!$(COMPRESS_EXT)$(COMPRESS_EXT)$$!$(COMPRESS_EXT)!' \
$(LIBDIR)/lynx.tmp >$(LIBDIR)/lynx.cfg
--- lynx2.8.4rel.1/lynx2-8-4/userdefs.h.ori Sun Jun 3 11:58:00 2001
+++ lynx2.8.4rel.1/lynx2-8-4/userdefs.h Sat Jul 28 09:17:42 2001
@@ -1409,6 +1410,9 @@
#endif
#else
/* have to define something... */
+#ifdef SYSTEM_MAIL
+#undef SYSTEM_MAIL
+#endif /* SYSTEM_MAIL */`
#define SYSTEM_MAIL "sendmail"
#define SYSTEM_MAIL_FLAGS "-t -oi"
#endif
@@ -1432,6 +1436,7 @@
** WINDOWS/DOS
** ===========
*/
+#ifndef HAVE_CONFIG_H
#define COMPRESS_PATH "compress"
#define UNCOMPRESS_PATH "uncompress"
#define UUDECODE_PATH "uudecode"
@@ -1452,6 +1457,7 @@
#define TELNET_PATH "telnet"
#define TN3270_PATH "tn3270"
#define RLOGIN_PATH "rlogin"
+#endif /* HAVE_CONFIG_H */
#else /* Unix */
/* Standard locations are defined via the configure script. When
--- lynx2.8.4rel.1/lynx2-8-4/WWW/Library/Implementation/www_tcp.h.ori Sun Jun
10 17:04:20 2001
+++ lynx2.8.4rel.1/lynx2-8-4/WWW/Library/Implementation/www_tcp.h Wed Aug
1 23:10:58 2001
@@ -553,15 +553,17 @@
#define DECL_ERRNO
#include <errno.h>
#include <sys/types.h>
-#include <socket.h>
#include <io.h>
#ifdef WATT32
+#include <sys/socket.h>
#include <arpa/inet.h>
#include <tcp.h>
#ifdef word
#undef word
#endif /* word */
#define select select_s
+#else
+#include <socket.h>
#endif /* WATT32 */
#undef NETWRITE
@@ -570,12 +572,21 @@
#define NETREAD read_s
#undef NETCLOSE
#define NETCLOSE close_s
+#ifdef UNIX
+#undef UNIX
+#endif /* UNIX */
#ifndef WATT32
#define getsockname getsockname_s
#endif /* !WATT32 */
#ifdef HAVE_GETTEXT
#define gettext gettext__
#endif
+#if !defined(NCURSES) && !defined(USE_SLANG)
+#define HAVE_CBREAK 1
+#endif /* !NCURSES && !USE_SLANG */
+#if defined(USE_SLANG) && !defined(NO_DJ_KEYHANDLER) && defined(HAVE_CONFIG_H)
+#define DJGPP_KEYHANDLER
+#endif /* USE_SLANG && !NO_DJ_KEYHANDLER && HAVE_CONFIG_H */
#endif /* DJGPP */
#ifdef HAVE_UNISTD_H
--- lynx2.8.4rel.1/lynx2-8-4/WWW/Library/Implementation/HTTelnet.c.ori Wed Oct
25 08:35:28 2000
+++ lynx2.8.4rel.1/lynx2-8-4/WWW/Library/Implementation/HTTelnet.c Sat Jul
28 23:29:32 2001
@@ -33,6 +33,10 @@
#include <LYStrings.h>
#include <LYLeaks.h>
+#ifdef __DJGPP__
+#include <sys/exceptn.h>
+#include <go32.h>
+#endif /* __DJGPP__ */
PRIVATE void do_system ARGS1(char *, command)
{
--- lynx2.8.4rel1/lynx2-8-4/src/LYCurses.c.ori Sat Jul 7 17:30:12 2001
+++ lynx2.8.4rel1/lynx2-8-4/src/LYCurses.c Sat Jul 28 23:53:08 2001
@@ -1,5 +1,8 @@
#include <HTUtils.h>
#include <HTAlert.h>
+#ifdef __DJGPP__
+#include <conio.h>
+#endif /* __DJGPP__ */
#include <LYCurses.h>
#include <LYStyle.h>
#include <LYUtils.h>
__
Doug Kaufman
Internet: address@hidden
; To UNSUBSCRIBE: Send "unsubscribe lynx-dev" to address@hidden
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- lynx-dev Patch for DOS using configure script,
Doug Kaufman <=