2022-03-31  Juan Manuel Guerrero  <juan.guerrero@gmx.de>


	* configure: prefix default set to /dev/env/DJDIR.

	* gzguts.h [HAVE_VSNPRINTF]:  DJGPP provides vsnprintf.

	* Makefile.in: Set VPATH to SRCDIR.






diff -aprNU5 zlib-1.2.13.orig/configure zlib-1.2.13/configure
--- zlib-1.2.13.orig/configure	2022-10-10 18:11:12 +0000
+++ zlib-1.2.13/configure	2023-03-31 19:33:46 +0000
@@ -72,11 +72,11 @@ fi
 
 # set defaults before processing command line options
 LDCONFIG=${LDCONFIG-"ldconfig"}
 LDSHAREDLIBC="${LDSHAREDLIBC--lc}"
 ARCHS=
-prefix=${prefix-/usr/local}
+prefix=${prefix-'/dev/env/DJDIR'}
 exec_prefix=${exec_prefix-'${prefix}'}
 libdir=${libdir-'${exec_prefix}/lib'}
 sharedlibdir=${sharedlibdir-'${libdir}'}
 includedir=${includedir-'${prefix}/include'}
 mandir=${mandir-'${prefix}/share/man'}
@@ -229,11 +229,11 @@ if test "$gcc" -eq 1 && ($cc -c $test.c)
         esac
         LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"} ;;
   *BSD | *bsd* | DragonFly)
         LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1,--version-script,${SRCDIR}zlib.map"}
         LDCONFIG="ldconfig -m" ;;
-  CYGWIN* | Cygwin* | cygwin* | *-cygwin* | OS/2*)
+  CYGWIN* | Cygwin* | cygwin* | *-cygwin* | MS-DOS* | OS/2*)
         EXE='.exe' ;;
   MINGW* | mingw* | *-mingw*)
         rm -f $test.[co] $test $test$shared_ext
         echo "If this doesn't work for you, try win32/Makefile.gcc." | tee -a configure.log
         LDSHARED=${LDSHARED-"$cc -shared"}
diff -aprNU5 zlib-1.2.13.orig/gzguts.h zlib-1.2.13/gzguts.h
--- zlib-1.2.13.orig/gzguts.h	2022-03-27 23:05:02 +0000
+++ zlib-1.2.13/gzguts.h	2023-03-31 19:35:38 +0000
@@ -71,11 +71,11 @@
 #    define HAVE_VSNPRINTF
 #  endif
 #endif
 
 #ifndef HAVE_VSNPRINTF
-#  ifdef MSDOS
+#  if defined(MSDOS) && !defined(__DJGPP__)
 /* vsnprintf may exist on some MS-DOS compilers (DJGPP?),
    but for now we just assume it doesn't. */
 #    define NO_vsnprintf
 #  endif
 #  ifdef __TURBOC__
diff -aprNU5 zlib-1.2.13.orig/Makefile.in zlib-1.2.13/Makefile.in
--- zlib-1.2.13.orig/Makefile.in	2022-10-13 05:06:54 +0000
+++ zlib-1.2.13/Makefile.in	2023-03-31 19:36:32 +0000
@@ -18,10 +18,12 @@ CFLAGS=-O
 #CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
 #CFLAGS=-g -DZLIB_DEBUG
 #CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
 #           -Wstrict-prototypes -Wmissing-prototypes
 
+VPATH = $(SRCDIR)
+
 SFLAGS=-O
 LDFLAGS=
 TEST_LDFLAGS=$(LDFLAGS) -L. libz.a
 LDSHARED=$(CC)
 CPP=$(CC) -E
