delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/08/21/17:52:38

From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Organization: Darmstadt University of Technology
To: djgpp-workers AT delorie DOT com
Date: Mon, 21 Aug 2000 23:48:47 +0200
MIME-Version: 1.0
Subject: Re: Sh-utils 2.0j sources uploaded
CC: eliz AT is DOT elta DOT co DOT il, tr AT eth DOT net
X-mailer: Pegasus Mail for Windows (v2.54DE)
Message-ID: <D0DE2F9521F@HRZ1.hrz.tu-darmstadt.de>
Reply-To: djgpp-workers AT delorie DOT com

Some comments and suggestions about shl20j.zip.

I have downloaded the shl20js.zip package from some simtel mirror.
I have tried to configure and compile it on MSDOS 6.22 with
4DOS, CWSDPMI, bash-2.03, gcc-2.95.2 and binutils-2.10.
I have only tried to configure and compile in the source dir.
I have only tried to configure and compile "out-of-the-box"
running the commands:
  djgpp\config
  make
as the readme file tells.


1) IMHO, the following code from config.bat is wrong:

:userdone
set HOSTNAME=%HOSTNAME%, %OS%
if not "%HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
:hostdone
set OS=

   Lets assume that HOSTNAME is set to "my-pc" and OS is set to "MSDOS".
   The line with the set-command will set HOSTNAME to:
      HOSTNAME = "my-pc, MSDOS"
   The if-command line will performe the string comparation. First the
   comparation:
      "%HOSTNAME%" == "%HOSTNAME%, %OS%"
   The left hand side is:
      my-pc, MSDOS
   and the right hand side is:
      my-pc, MSDOS, MSDOS
   This comparation is *always* FALSE no matter if HOSTNAME and/or OS
   is set or not. After the comparation the result will be negated.
   This implies that the if-command will always get a TRUE result from
   the *hole* string comparation and will jump to the SmallEnv label.
   After I had substituted the above code by the following:

:userdone
set _HOSTNAME=%HOSTNAME%, %OS%
if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
set HOSTNAME=%_HOSTNAME%
:hostdone
set _HOSTNAME=
set OS=

   I was able to run config.bat without failures and comfigure the package.
   To make the point clear: I am using 4DOS and the above code does not work
   at all for me. I get always the error message:
      Your environment size is too small.  Enlarge it and run me again.
      Configuration NOT done!
   no matter how large I choose the environment. I have never tested this with
   command.com but from a logical point of view the original code should fail
   using command.com too.


2) When the configure shell script finished, no config.cache file has been
   created. This is a bug somewhere in the configure script. I had not the
   time to fix it.


3) After the package has been configured, I tried to compile it.
   The compilation breakes with the first file with the following
   error message:

f:/bin/make.exe  all-recursive
make.exe[1]: Entering directory `d:/0/gnu/sh-util2.0j'
Making all in lib
make.exe[2]: Entering directory `d:/0/gnu/sh-util2.0j/lib'
source='getdate.c' object='getdate.o' libtool=no \
depfile='.deps/getdate.Po' tmpdepfile='.deps/getdate.TPo' \
depmode=gcc f:/bin/sh.exe ../depcomp \
gcc -DLIBDIR=\"f:/lib\" -DHAVE_CONFIG_H -I.. -I. -I../intl    -g -O2 -c -o getdate.o `test -f getdate.c || echo './'`getdate.c
depcomp: Variables source, object and depmode must be set
make.exe[2]: *** [getdate.o] Error 1
make.exe[2]: Leaving directory `d:/0/gnu/sh-util2.0j/lib'
make.exe[1]: *** [all-recursive] Error 1
make.exe[1]: Leaving directory `d:/0/gnu/sh-util2.0j'
make.exe: *** [all-recursive-am] Error 2

   Unfortunately I have not completely followed the
   "Sh-utils 2.0j sources uploaded" thread. If this has already been fixed then
   ingnore this point and excuse the inconveniences.


4) I have downloaded GNU sh-utils-2.0j.tar.gz from alpha.gnu.org
   and tried to apply the diffs from shl20js.zip.
   It should be noticed that the patch for "lib/quotearg.c" is
   rejected. All other files are patched O.K.


5) Date: Sun, 13 Aug 2000 10:49:33 +0530
   From: Prashant TR <tr AT eth DOT net>

   >   Date: Fri, 11 Aug 2000 12:51:40 +0200
   >   From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>
   >
   >   In any case, I think that the DJGPP source distribution should
   >   come with the files under `tests/' already edited and converted
   >   to the DOS-style CRLF EOL format (where appropriate).  (If you
   >   decide to accept this advice, you need to take into consideration
   >   that someone might run config.bat again, so the conversion Sed
   >   scripts should be prepared for multiple editing.)
   >
   > Yes, it actually does. It checks for *.orig files and always runs
   > "sed" on them. The only problem here is that the *.orig will have to
   > be distributed which increase the package size a bit.

   IMO there is not needed to include the *.orig files. This can be avoided
   if code similar to this one is added to config.bat (please inspect the patch):

:ScriptEditing
Rem DJGPP specific editing of test scripts.
test -f %XSRC%/tests/stamp-test
if not errorlevel 1 goto End
call djgpp\edtests.bat
goto End

   At the end of edtest.bat the following line must be added:

touch  ./tests/stamp-test

   Now config.bat will check every time it runs if tests/stamp-test
   exists or not. If tests/stamp-test does not exist then edtest.bat
   must be started. This would be the case when the user downloads
   a GNU distribution. If tests/stamp-test exists then edtest.bat
   will never be re-started because the tests directory has already
   been modified. This is the case of a DJGPP distribution.


6) I supply a patch with the files:
     config.bat, config.site, config.sed,
     edtest.bat, tscript.sed and recodepo.sh
   that can replace the following files from shl20js.zip
     config.bat, config.site, config.sed,
     edtest.bat, tscript.sed and pscript.sed

   This files will allow the user to:
   a: configure from inside the source directory (inplace),
      configure from an arbitrary choosen directory on the same
      partition.
      configure from an arbitrary choosen directory on a different
      partition.
   b: config.bat will check if edtest.bat must be executed or not
      no matter where the package will be configured.
      This means: if config.bat is started it will change from the
      working directory into the source directory, it will check
      if the file: tests/stamp-test exist and it will start or not
      start edtest.bat. After finishing the task it will return
      to the working directory. This implies that the user does not
      need to know and care about the unix to dos-EOL issue.
 
   The files have been tested on plain DOS and WIN95 with 4DOS.COM
   and COMMAND.COM. I would suggest to inspect config.sed to see
   if all the issues that have appeared in this thread have been
   fixed. It fixes the y.tab.[ch] issue, it makes that the configure shell script
   works internally with "/dev/x" syntax instead of the "x:" syntax (this should
   solve the difficullties with depcomp), etc, etc, etc.
I hope that something I am reporting here is of some use for you.

Regards,
Guerrero, Juan Manuel


diff -acprNC5 sh-utils-2.0j.orig/djgpp/config.bat sh-utils-2.0j/djgpp/config.bat
*** sh-utils-2.0j.orig/djgpp/config.bat Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/config.bat      Fri Aug 11 16:55:54 2000
***************
*** 0 ****
--- 1,193 ----
+ @echo off
+ echo Configuring GNU Sh-utils for DJGPP v2.x...
+ 
+ Rem The SmallEnv tests protect against fixed and too small size
+ Rem of the environment in stock DOS shell.
+ 
+ Rem Find out if NLS is wanted or not
+ Rem and where the sources are.
+ Rem We always default to NLS support
+ Rem and to in place configuration.
+ set NLS=enabled
+ if not "%NLS%" == "enabled" goto SmallEnv
+ set XSRC=.
+ if not "%XSRC%" == "." goto SmallEnv
+ 
+ Rem This checks the case:
+ Rem   %1 contains the NLS option.
+ Rem   %2 contains the src path option.
+ if "%1" == "" goto InPlace
+ if "%1" == "NLS" goto SrcDir2
+ if not "%1" == "no-NLS" goto SrcDir1
+ set NLS=disabled
+ if not "%NLS%" == "disabled" goto SmallEnv
+ :SrcDir2
+ Rem Find out where the sources are
+ if "%2" == "" goto InPlace
+ set XSRC=%2
+ if not "%XSRC%" == "%2" goto SmallEnv
+ goto NotInPlace
+ 
+ Rem This checks the case:
+ Rem   %1 contains the src path option.
+ Rem   %2 contains the NLS option.
+ :SrcDir1
+ Rem Find out where the sources are
+ if "%1" == "" goto InPlace
+ set XSRC=%1
+ if not "%XSRC%" == "%1" goto SmallEnv
+ if "%2" == "" goto NotInPlace
+ if "%2" == "NLS" goto NotInPlace
+ if not "%2" == "no-NLS" goto NotInPlace
+ set NLS=disabled
+ if not "%NLS%" == "disabled" goto SmallEnv
+ 
+ :NotInPlace
+ redir -e /dev/null update %XSRC%/configure.orig ./configure
+ test -f ./configure
+ if errorlevel 1 update %XSRC%/configure ./configure
+ 
+ :InPlace
+ Rem Update configuration files
+ echo Updating configuration scripts...
+ test -f ./configure.orig
+ if errorlevel 1 update configure configure.orig
+ sed -f %XSRC%/djgpp/config.sed configure.orig > configure
+ if errorlevel 1 goto SedError
+ 
+ Rem Make sure they have a config.site file
+ set CONFIG_SITE=%XSRC%/djgpp/config.site
+ if not "%CONFIG_SITE%" == "%XSRC%/djgpp/config.site" goto SmallEnv
+ 
+ Rem Make sure crucial file names are not munged by unpacking
+ test -f %XSRC%/config.h.in
+ if not errorlevel 1 mv -f %XSRC%/config.h.in %XSRC%/config.h-in
+ test -f %XSRC%/intl/po2tbl.sed.in
+ if not errorlevel 1 mv -f %XSRC%/intl/po2tbl.sed.in %XSRC%/intl/po2tblsed.in
+ test -f %XSRC%/intl/po2tbl.sed
+ if not errorlevel 1 mv -f %XSRC%/intl/po2tbl.sed %XSRC%/intl/po2tblsed.in
+ test -f %XSRC%/intl/po2tbl-sed.in
+ if not errorlevel 1 mv -f %XSRC%/intl/po2tbl-sed.in %XSRC%/intl/po2tblsed.in
+ test -f %XSRC%/po/Makefile.in.in
+ if not errorlevel 1 mv -f %XSRC%/po/Makefile.in.in %XSRC%/po/Makefile.in-in
+ test -f %XSRC%/po/Makefile.am.in
+ if not errorlevel 1 mv -f %XSRC%/po/Makefile.am.in %XSRC%/po/Makefile.am-in
+ 
+ Rem This is required because DOS/Windows are case-insensitive
+ Rem to file names, and "make install" will do nothing if Make
+ Rem finds a file called `install'.
+ if exist INSTALL ren INSTALL INSTALL.txt
+ 
+ Rem Set HOSTNAME so it shows in config.status
+ if not "%HOSTNAME%" == "" goto hostdone
+ if "%windir%" == "" goto msdos
+ set OS=MS-Windows
+ if not "%OS%" == "MS-Windows" goto SmallEnv
+ goto haveos
+ :msdos
+ set OS=MS-DOS
+ if not "%OS%" == "MS-DOS" goto SmallEnv
+ :haveos
+ if not "%USERNAME%" == "" goto haveuname
+ if not "%USER%" == "" goto haveuser
+ echo No USERNAME and no USER found in the environment, using default values
+ set HOSTNAME=Unknown PC
+ if not "%HOSTNAME%" == "Unknown PC" goto SmallEnv
+ goto userdone
+ :haveuser
+ set HOSTNAME=%USER%'s PC
+ if not "%HOSTNAME%" == "%USER%'s PC" goto SmallEnv
+ goto userdone
+ :haveuname
+ set HOSTNAME=%USERNAME%'s PC
+ if not "%HOSTNAME%" == "%USERNAME%'s PC" goto SmallEnv
+ :userdone
+ set _HOSTNAME=%HOSTNAME%, %OS%
+ if not "%_HOSTNAME%" == "%HOSTNAME%, %OS%" goto SmallEnv
+ set HOSTNAME=%_HOSTNAME%
+ :hostdone
+ set _HOSTNAME=
+ set OS=
+ 
+ Rem install-sh is required by the configure script but clashes with the
+ Rem various Makefile install-foo targets, so we MUST have it before the
+ Rem script runs and rename it afterwards
+ test -f %XSRC%/install-sh
+ if not errorlevel 1 goto NoRen0
+ test -f %XSRC%/install-sh.sh
+ if not errorlevel 1 mv -f %XSRC%/install-sh.sh %XSRC%/install-sh
+ :NoRen0
+ 
+ if "%NLS%" == "disabled" goto WithoutNLS
+ 
+ Rem If NLS is wanted we will probably have to
+ Rem recode the .po files. For these purpose
+ Rem we will run recodepo.sh that will check for
+ Rem needed libs, headers and binaries and return
+ Rem with one of the following return codes:
+ Rem errorlevel 2 : package has no po directory (no NLS support)
+ Rem                and will be configured with --disable-nls.
+ Rem errorlevel 1 : recode, msgfmt and/or xgettext can not be found,
+ Rem                package will be configured with --disable-nls.
+ Rem errorlevel 0 : .po files have/have not been recoded. They will
+ Rem                be recoded by recodepo.sh if needed, and the
+ Rem                package will be configured with --enable-nls.
+ sh %XSRC%/djgpp/recodepo.sh
+ if errorlevel 1 goto WithoutNLS
+ 
+ :WithNLS
+ Rem We prefer without-included-gettext because libintl.a from gettext package
+ Rem is the only one that is garanteed to have been ported to DJGPP.
+ echo Running the ./configure script...
+ sh ./configure --src=%XSRC% --enable-nls --without-included-gettext --cache-file=./config.cache
+ if errorlevel 1 goto CfgError
+ echo Done.
+ goto ScriptEditing
+ 
+ :WithoutNLS
+ echo Running the ./configure script...
+ sh ./configure --src=%XSRC% --disable-nls --cache-file=./config.cache
+ if errorlevel 1 goto CfgError
+ echo Done.
+ 
+ :ScriptEditing
+ Rem DJGPP specific editing of test scripts.
+ test -f %XSRC%/tests/stamp-test
+ if not errorlevel 1 goto End
+ if "%XSRC%" == "." goto NoDirChange
+ cd | sed "s|:.*$|:|" > cd_BuildDir.bat
+ cd | sed "s|^.:|cd |" >> cd_BuildDir.bat
+ mv -f cd_BuildDir.bat %XSRC%/cd_BuildDir.bat
+ echo %XSRC% | sed -e "s|^/dev/||" -e "s|/|:|" -e "s|:.*$|:|g" > cd_SrcDir.bat
+ echo %XSRC% | sed -e "s|^/dev/||" -e "s|/|:/|" -e "s|^.*:|cd |" -e "s|^\.\.|cd &|" -e "s|/|\\|g" >> cd_SrcDir.bat
+ call cd_SrcDir.bat
+ call djgpp\edtests.bat
+ call cd_BuildDir.bat
+ rm -f cd_SrcDir.bat cd_BuildDir.bat %XSRC%/cd_BuildDir.bat
+ goto End
+ :NoDirChange
+ call djgpp\edtests.bat
+ goto End
+ 
+ :SedError
+ echo ./configure script editing failed!
+ goto End
+ 
+ :CfgError
+ echo ./configure script exited abnormally!
+ goto End
+ 
+ :SmallEnv
+ echo Your environment size is too small.  Enlarge it and run me again.
+ echo Configuration NOT done!
+ 
+ :End
+ test -f %XSRC%/install-sh.sh
+ if not errorlevel 1 goto NoRen1
+ test -f %XSRC%/install-sh
+ if not errorlevel 1 mv -f %XSRC%/install-sh %XSRC%/install-sh.sh
+ :NoRen1
+ set CONFIG_SITE=
+ set HOSTNAME=
+ set NLS=
+ set XSRC=
diff -acprNC5 sh-utils-2.0j.orig/djgpp/config.sed sh-utils-2.0j/djgpp/config.sed
*** sh-utils-2.0j.orig/djgpp/config.sed Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/config.sed      Fri Aug 18 17:30:28 2000
***************
*** 0 ****
--- 1,139 ----
+ # po2tbl.sed.in is invalid on MSDOS.
+ s|po2tbl\.sed\.in|po2tblsed.in|g
+ 
+ # .deps is invalid on MSDOS.
+ s|\.deps|_deps|g
+ 
+ # Additional editing of Makefiles
+ /^ *(echo ':t/ c\
+       (echo '\
+ #  DJGPP specific Makefile changes.\
+   /^aliaspath *       *=/s,:,";",g\
+   /^lispdir * *=/ c\\\
+ lispdir = $(prefix)/gnu/emacs/site-lisp\
+   /TEXINPUTS=/s,:,";",g\
+   /PATH=/s,:,";",g\
+   s,\\.old\\.,_old.,g\
+   s,po2tbl\\.sed\\.in,po2tblsed.in,g\
+   s,config\\.h\\.in,config.h-in,g\
+   s,\\.tab\\.c,_tab.c,g\
+   s,\\.tab\\.h,_tab.h,g\
+   s,Makefile\\.in\\.in,Makefile.in-in,g\
+   s,Makefile\\.am\\.in,Makefile.am-in,g\
+   s,\\.env-warn,_env-warn,g\
+   s,jm-winsz\\([12]\\)\\.m4,jm\\1-winsz.m4,g\
+   s,NN-strne-\\([12]\\)\\.,NN\\1-strne.,g\
+   s,N-strne-\\([12]\\)\\.,N\\1-strne.,g\
+   s,NN-streq-\\([12]\\)\\.,NN\\1q-stre.,g\
+   s,N-streq-\\([12]\\)\\.,N\\1q-stre.,g\
+   s,date2sec-\\([01]\\)\\.,d2sec-\\1.,g\
+   s,date2sec-0a\\.,d2sec-0a.,g\
+   s,ref-add\\.sed\\.in,ref-add-sed.in,g\
+   s,ref-del\\.sed\\.in,ref-del-sed.in,g\
+   s,relative-\\([12]\\)\\.X,relat-\\1.X,g\
+   s,charset\\.alias,charset.al,g\
+   /^\\.c\\.o:/,/^$/ s,`test -f .*`,,\
+   /^\\.sin\\.sed:/,/^$/ s,\\$@-t,t-$@,\
+   /^MANS *=.*$/ s,=.*$,=,\
+   /^install-info-am:/,/^$/ {\
+     /@list=/ s,\\\$(INFO_DEPS),& sh-utils.i,\
+     /@for *file/ s,\\\$(INFO_DEPS),& sh-utils.i,\
+     s,file-\\[0-9\\]\\[0-9\\],& $$file[0-9] $$file[0-9][0-9],\
+   }\
+   /^\\.y\\.c:/,/^$/ {\
+     /\\\$(YACC)/ {\
+       s,[     ]*&&.*$,,\
+       a\\\
+       -@test -f y_tab.c && mv -f y_tab.c $*.c\\\
+       -@test -f y.tab.c && mv -f y.tab.c $*.c\\\
+       -@test -f y.tab.h && mv -f y.tab.h y_tab.h\
+     }\
+   }\
+   /^ *bin_PROGRAMS *=/,/stty/ {\
+     s/ *stty//\
+   }\
+   s/^\\( *bin_SCRIPTS *=\\).*/\\1 /\
+   /^bin_PROGRAMS[     ]*=.*$/,/^$/ s,yes,& su,\
+   /^install-exec-am:.*$/,/^$/ {\
+     s,[       ]\\+\\\\$,,\
+     /install-exec-local$/ d\
+   }\
+   s/^check[   ]*:[    ]*\\\$(maint_gen)$/check: #\$(maint_gen)/\
+ :t
+ 
+ # Makefile.in.in is renamed to Makefile.in-in...
+ /config_files="/,/^$/ {
+   s|po/Makefile\.in|&:po/Makefile.in-in|
+ }
+ 
+ # ...and config.h.in into config.h-in
+ /config_headers="/,/^$/ {
+   s|config\.h|&:config.h-in|
+ }
+ 
+ # Makefile.in.in is renamed to Makefile.in-in
+ # and config.h.in into config.h-in
+ /# Handling of arguments./,/^$/ {
+   s|po/Makefile\.in|&:po/Makefile.in-in|2
+   s|config\.h|&:config.h-in|2
+ }
+ 
+ # Replace (command) > /dev/null with `command > /dev/null`, since
+ # parenthesized commands always return zero status in the ported Bash,
+ # even if the named command doesn't exist
+ /if ([^|;]*null/{
+   s,(,`,
+   s,),,
+   s,;  *then,`; then,
+ }
+ 
+ # Rename `conftest.defines.hdr' and `conftest.undefs.hdr' in
+ # `conftest.defines_hdr' and `conftest.undefs_hdr'.
+ s|\$ac_cs_root\.hdr|${ac_cs_root}_hdr|g
+ 
+ # DOS-style absolute file names should be supported as well
+ /\*) srcdir=/s,/\*,[\\\\/]* | [A-z]:[\\\\/]*,
+ /\$]\*) INSTALL=/s,\[/\$\]\*,[\\\\/$]* | [A-z]:[\\\\/]*,
+ /\$]\*) ac_rel_source=/s,\[/\$\]\*,[\\\\/$]* | [A-z]:[\\\\/]*,
+ 
+ # Switch the order of the two Sed commands, since DOS path names
+ # could include a colon
+ # This matches the configure script produced by Autoconf 2.12
+ /ac_file_inputs=/s,\( -e "s%\^%\$ac_given_srcdir/%"\)\( -e "s%:% $ac_given_srcdir/%g"\),\2\1,
+ # This matches the configure script produced by Autoconf 2.14a
+ /ac_file_inputs=/,/^EOF/s,\(s%\^%\$ac_given_srcdir/%\);\(s%:% \$ac_given_srcdir/%g\),\2;\1,
+ 
+ # Prevent the spliting of conftest.subs.
+ # The sed script: conftest.subs or $ac_cs_root.subs is split into 90 or 48 lines long files.
+ # This will produce sed scripts called conftest.s1, conftest.s2, etc. or similar
+ # that will not work if conftest.subs contains a multi line sed command
+ # at line #90. In this case the first part of the sed command will be the
+ # last line of conftest.s1 and the rest of the command will be the first lines
+ # of conftest.s2. So both script will not work properly. For GNU sed and GNU bash
+ # this splitting is not needed at all and will be suppresed.
+ # This matches the configure script produced by Autoconf 2.14a
+ /ac_max_sed_lines=[0-9]/ s,=.*$,=`sed -n "$=" $tmp/subs.sed`,
+ 
+ # We prefer gettext__ instead of gettext.
+ /checking for gettext in -lintl/,/^EOF$/ s,gettext[   ]*(,gettext__(,g
+ 
+ # The following two items are changes needed for configuring
+ # and compiling across partitions.
+ # 1) The given srcdir value is always translated from the
+ #    "x:" syntax into "/dev/x" syntax while we run configure.
+ /^[   ]*-srcdir=\*.*$/ a\
+     ac_optarg=`echo "$ac_optarg" | sed "s,^\\([A-Za-z]\\):,/dev/\\1,"`
+ /set X `ls -Lt \$srcdir/ i\
+    if `echo $srcdir | grep "^/dev/" - > /dev/null`; then\
+      srcdir=`echo "$srcdir" | sed -e "s%^/dev/%%" -e "s%/%:/%"`\
+    fi
+ 
+ #  2) We need links across partitions, so we will use "cp -pf" instead of "ln".
+ /# Make a symlink if possible; otherwise try a hard link./,/EOF/ {
+   s,;.*then, 2>/dev/null || cp -pf \$srcdir/\$ac_source \$ac_dest&,
+ }
+ 
+ # DJGPP symbolik links always appends an .exe extension.
+ # This cause difficulties on plain DOS so we remove the .sym extension.
+ /ln -s conftest.file conftest.sym/ s|\.sym||
+ /lstat ("conftest.sym\/", &sbuf) ? 0 : 1/ s|\.sym|.exe|
diff -acprNC5 sh-utils-2.0j.orig/djgpp/config.site sh-utils-2.0j/djgpp/config.site
*** sh-utils-2.0j.orig/djgpp/config.site        Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/config.site     Sat Jul  1 23:58:50 2000
***************
*** 0 ****
--- 1,47 ----
+ #! /bin/sh
+ 
+ # This is the config.site file for configuring GNU packages
+ # which are to be built with DJGPP tools.
+ 
+ # Include the djgpp subdirectory in PATH, so that getconf is found
+ PATH="$srcdir/djgpp;$PATH"
+ 
+ # These two variables are required, otherwise looking for
+ # programs along the PATH will not work.
+ PATH_SEPARATOR=:
+ PATH_EXPAND=y
+ 
+ # This is required in for "test -f foo" to find foo.exe
+ export TEST_FINDS_EXE=y
+ 
+ # The root of the DJGPP tree serves as the default prefix
+ test "x$prefix" = xNONE && prefix='/dev/env/DJDIR'
+ 
+ # This is required for config.status script to be run, since
+ # ./configure runs it by invoking ${CONFIG_SHELL-/bin/sh}
+ CONFIG_SHELL=${CONFIG_SHELL='sh'}
+ 
+ # A sane defualt for emacs.
+ ac_cv_path_EMACS=${EMACS='/dev/env/DJDIR/gnu/emacs/bin/emacs'}
+ 
+ # These are set here so the generated Makefile's will be good
+ # for every DJGPP installation, not only the one where the
+ # package was configured.
+ # $INSTALL must be an absolute path name, otherwise config.status
+ # will try to prepend ./ and ../ to it when it goes into subdirs.
+ INSTALL=${INSTALL='/dev/env/DJDIR/bin/ginstall -c'}
+ RANLIB=${RANLIB='ranlib'}
+ NM=${NM='nm'}
+ LD=${LD='ld'}
+ GMSGFMT=${GMSGFMT='/dev/env/DJDIR/bin/msgfmt'}
+ MSGFMT=${MSGFMT='/dev/env/DJDIR/bin/msgfmt'}
+ XGETTEXT=${XGETTEXT='/dev/env/DJDIR/bin/xgettext'}
+ ACLOCAL=${ACLOCAL='/dev/env/DJDIR/bin/aclocal'}
+ AUTOCONF=${AUTOCONF='/dev/env/DJDIR/bin/autoconf'}
+ AUTOMAKE=${AUTOMAKE='/dev/env/DJDIR/bin/automake'}
+ AUTOHEADER=${AUTOHEADER='/dev/env/DJDIR/bin/autoheader'}
+ MAKEINFO=${MAKEINFO='/dev/env/DJDIR/bin/makeinfo'}
+ AMTAR=${AMTAR='/dev/env/DJDIR/bin/tar'}
+ 
+ # Force the test for 'ln -s' to report 'cp -pf'.
+ ac_cv_prog_LN_S='cp -pf'
diff -acprNC5 sh-utils-2.0j.orig/djgpp/edtests.bat sh-utils-2.0j/djgpp/edtests.bat
*** sh-utils-2.0j.orig/djgpp/edtests.bat        Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/edtests.bat     Wed Aug 16 11:22:20 2000
***************
*** 0 ****
--- 1,51 ----
+ @echo off
+ rem Change all unix-type text files to dos-type using utod.
+ cd tests\date
+ utod 1.X 3.X 4.X 5.X 6.X 7.X 8.X 9.X leap-1.X U95-1.X U95-2.X
+ utod U95-3.X U92-1.X U92-2.X U92-3.X V92-1.X V92-2.X V92-3.X W92-1.X W92-2.X
+ utod W92-3.X millen-1.X rel-0.X rel-1a.X rel-1b.X rel-2a.X rel-2b.X rel-2c.X
+ utod rel-2d.X rel-2e.X rel-2f.X rel-2g.X rel-3a.X next-s.X next-m.X next-h.X
+ utod next-d.X next-w.X next-mo.X next-y.X utc-0.X utc-0a.X utc-1.I utc-1.X
+ utod utc-1a.I utc-1a.X d2sec-0.X d2sec-0a.X d2sec-1.X sec2date-0.X
+ utod this-m.X this-h.X this-w.X this-mo.X this-y.X risks-1.X regress-1.X
+ utod datevtime-1.X rfc822-1.X relat-1.X relat-2.X
+ cd ..\..
+ rem
+ echo Editing the scripts in various subdirectories for DJGPP...
+ echo    tests/date...
+ sed -f djgpp/tscript.sed tests/date/date-tests > date-tests
+ update date-tests tests/date/date-tests
+ rm -f date-tests
+ echo    tests/test...
+ sed -f djgpp/tscript.sed tests/test/test-tests > test-tests
+ update test-tests tests/test/test-tests
+ rm -f test-tests
+ echo    missing...
+ sed -f djgpp/tscript.sed missing > missing.tmp
+ update missing.tmp missing
+ rm -f missing.tmp
+ rem
+ rem Edit the Perl scripts to get "make check" working.
+ sed -f djgpp/tscript.sed tests/basename/basic > basic
+ update basic tests/basename/basic
+ rm -f basic
+ rem
+ sed -f djgpp/tscript.sed tests/factor/basic > basic
+ update basic tests/factor/basic
+ rm -f basic
+ rem
+ sed -f djgpp/tscript.sed tests/seq/basic > basic
+ update basic tests/seq/basic
+ rm -f basic
+ rem
+ sed -f djgpp/tscript.sed tests/stty/basic-1 > basic-1
+ update basic-1 tests/stty/basic-1
+ rm -f basic-1
+ rem
+ sed -f djgpp/tscript.sed tests/stty/row-col-1 > row-col-1
+ update row-col-1 tests/stty/row-col-1
+ rm -f row-col-1
+ sed -f djgpp/tscript.sed tests/nice > nice
+ update nice tests/nice
+ rm -f nice
+ touch tests/stamp-test
diff -acprNC5 sh-utils-2.0j.orig/djgpp/recodepo.sh sh-utils-2.0j/djgpp/recodepo.sh
*** sh-utils-2.0j.orig/djgpp/recodepo.sh        Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/recodepo.sh     Fri Aug  4 15:52:08 2000
***************
*** 0 ****
--- 1,101 ----
+ #! /bin/sh
+ 
+ #
+ # This script recodes .po files from unix charsets to MSDOS code pages.
+ # 1) It checks for .po files in the po directory.
+ # 2) It checks if the .po files have already been recoded.
+ # 3) It checks for recode version 3.5 or later, if the .po files need to be recoded.
+ #
+ 
+ declare -i i iMax
+ 
+ # Known country codes and MSDOS code pages.
+ # The ISO 639 language codes have been taken from:
+ #   gettext.info 
+ # The MSDOS code pages have been taken from:
+ #   MS-DOS 6.22 COUNTRY.TXT file
+ # available from:
+ #   ftp://ftp.microsoft.com/peropsys/msdos/kb/q117/8/50.txt
+ # Please note that the ISO language codes are *NOT* the same
+ # as the MSDOS country codes.
+ LanguageCode=(ar bg  cs  da  de  de_AT el  en  en_UK en_US eo  es  et  fa  fi  fr  ga  he  hi  hr  hu  id  is  it  ja  ko  la  mk  nl  no  no AT nynor  no AT nynorsk pl  pt  pt_BR ro  ru  sh  sk  sl  sq 
 sr  sv  tr  zh)
+ DosCodePage=(864 855 852 865 850 850   869 437 850   437   852 850 850 864 850 850 850 862 000 852 852 850 861 850 932 934 850 855 850 865 865       865        852 850 850   852 855 852 852 852 852
 855 850 857 936)
+ iMax=${#LanguageCode[@]}-1
+ 
+ PATH_SEPARATOR=:
+ PATH=$PATH:.
+ 
+ # A sane default for XSRC.
+ if [ "x$XSRC" = x ]; then
+   XSRC=.
+ fi
+  
+ # Find the .po files.
+ if [ -d "$XSRC"/po ]; then
+   po_directory=po
+ elif [ -d "$XSRC"/i18n ]; then
+   po_directory=i18n
+ else
+   exit 2             # This package has no NLS.
+ fi
+ 
+ # Ckeck if .po files have already been recoded
+ # and the required programs are available.
+ if [ -f "$XSRC"/${po_directory}/stamp-po ]; then
+ # Package has been recoded.
+ # Check for msgfmt and xgettext.
+   for program in msgfmt xgettext; do
+     $program >/dev/null 2>&1
+     if [ $? -eq 127 ]; then
+       echo Warning: $program.exe is required for NLS but it can not be found.
+       echo Configuring with --disable-nls...
+       exit 1   # One of the programs is not installed
+     fi
+   done
+   exit 0       # .po files have been already recoded and msgfmt and xgettext are available.
+ else
+ # Package has not been recoded.
+ # Check for msgfmt, xgettext and recode.
+   for program in msgfmt xgettext recode; do
+     $program >/dev/null 2>&1
+     if [ $? -eq 127 ]; then
+       echo Warning: $program.exe is required for NLS but it can not be found.
+       echo Configuring with --disable-nls...
+       exit 1   # One of the programs needed is not installed
+     elif [ $program = recode ]; then
+       version=`recode 2>/dev/null | sed "1 s/^.* \([1-9]\.[0-9][0-9]*\)$/\1/"`
+       if [ "$version" = 3.4 ]; then
+         echo Warning: recode.exe 3.5 or later is required for NLS.
+         echo Configuring with --disable-nls...
+         exit 1   # recode 3.5 or later is not installed
+       fi
+     fi
+   done
+ fi
+ 
+ # Recode the .po files.
+ echo Recoding the .po files...
+ po_files=`echo "$XSRC"/${po_directory}/*.po \
+           | sed -e "s%$XSRC/${po_directory}/%%g" -e "s%\\.po%%g"`
+ for file in ${po_files}; do
+   i=0
+   while [ $i -le $iMax ]; do
+     if [ ${LanguageCode[$i]} = $file ]; then
+       charset=`cat "$XSRC"/${po_directory}/${file}.po | \
+                sed -e "/charset=/ !d" \
+                    -e "s/^.*=//" -e "s/\\\\\\\\n.*$//" \
+                    -e "s/^8859/ISO-8859/" -e "s/ISO-Latin/Latin/"`
+       recode -vSpo "${charset}..${DosCodePage[$i]}/" "$XSRC"/${po_directory}/${file}.po
+       if [ $? -eq 0 ]; then
+         sed "/charset=/ s/=.*\\\\n/=cp${DosCodePage[$i]}\\\\n/" \
+             "$XSRC"/${po_directory}/${file}.po > "$XSRC"/${po_directory}/${file}.tmp
+         mv -f "$XSRC"/${po_directory}/${file}.tmp "$XSRC"/${po_directory}/${file}.po
+       fi
+       break
+     fi
+     i=i+1
+   done
+ done
+ 
+ touch "$XSRC"/${po_directory}/stamp-po  # Do not recode the .po files any more.
+ exit 0
diff -acprNC5 sh-utils-2.0j.orig/djgpp/tscript.sed sh-utils-2.0j/djgpp/tscript.sed
*** sh-utils-2.0j.orig/djgpp/tscript.sed        Thu Jan  1 00:00:00 1970
--- sh-utils-2.0j/djgpp/tscript.sed     Fri Aug 18 17:23:50 2000
***************
*** 0 ****
--- 1,41 ----
+ # Used to modify the perl and test scripts
+ # so that "make check" works.
+ 
+ #Perl script specific changes.
+ # Change !/bin/sh to !/dev/env/DJDIR/bin/sh
+ # s/! *\/bin\/sh/\!\/dev\/env\/DJDIR\/bin\/sh/g
+ 
+ # We require the perl script to change the backward slashes to forward in $PWD.
+ s/\(my $prog =.*\)/\1 \
+ my $cwd = $ENV{PWD}; \
+ $cwd =\~ s\/\\\\\/\\\/\/g;/g
+ 
+ # Change the $prog: and $prog --help so that they show their full paths.
+ s/\$prog:/$cwd\/..\/..\/src\/$prog.exe:\1/g
+ s/\$prog --help/$cwd\/..\/..\/src\/$prog.exe --help/g
+ 
+ # Test script specific changes.
+ # Change to valid 8.3 filenames.
+ s/NN-strne-\([12]\)/NN\1-strne/g
+ s/N-strne-\([12]\)/N\1-strne/g
+ s/NN-streq-\([12]\)/NN\1q-stre/g
+ s/N-streq-\([12]\)/N\1q-stre/g
+ s/date2sec-/d2sec-/g
+ s/relative-\([12]\).X/relat-\1.X/g
+ s/\.saved-s/_saved-s/g
+ 
+ # We still have no perl programm that understands the "/dev/x" syntax
+ # so we must translate "/dev/x/" into "x:/"
+ # This is needed for the following files:
+ #   tests/basename/basic
+ #   tests/factor/basic
+ #   tests/seq/basic
+ /^d=\$srcdir\/\.\.$/ i\
+ srcdir=`echo "$srcdir" | sed "s,^/dev/\\([A-Za-z]\\)/,\\1:/,"`
+ 
+ # The raw-col-1 test does not work.
+ /^# .*`stty size'$/ i\
+ if test -n "$DJDIR"; then\
+   echo "$0: cannot test \\`stty size' on DJGPP" >&2\
+   exit 77\
+ fi

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019