Update the configuration of CygWin32 to use the new capabilities of
authorRichard Levitte <levitte@openssl.org>
Wed, 13 Feb 2002 14:44:33 +0000 (14:44 +0000)
committerRichard Levitte <levitte@openssl.org>
Wed, 13 Feb 2002 14:44:33 +0000 (14:44 +0000)
CygWin 1.3.x, which includes thread and shared library support.

Submitted by Corinna Vinschen <vinschen@redhat.com> and modified a
little bit.

CHANGES
Configure
Makefile.org
config

diff --git a/CHANGES b/CHANGES
index 4db9aadf877e7d52207a126356ffe6127961dd10..5929f0533679d30bb4604bdd6c496a90c834d724 100644 (file)
--- a/CHANGES
+++ b/CHANGES
          *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
          +) applies to 0.9.7 only
 
          *) applies to 0.9.6a/0.9.6b/0.9.6c and 0.9.7
          +) applies to 0.9.7 only
 
+  *) Add information about CygWin32 1.3 and on, and preserve proper
+     configuration for the versions before that.
+     [Corinna Vinschen <vinschen@redhat.com> and Richard Levitte]
+
   *) Make removal from session cache (SSL_CTX_remove_session()) more robust:
      check whether we deal with a copy of a session and do not delete from
      the cache in this case. Problem reported by "Izhar Shoshani Levi"
   *) Make removal from session cache (SSL_CTX_remove_session()) more robust:
      check whether we deal with a copy of a session and do not delete from
      the cache in this case. Problem reported by "Izhar Shoshani Levi"
index b810cd2fded869cda2f117cecb9585b49218d903..3a421ab4bb4a4feb66025a353f18e5048747bda4 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -504,7 +504,8 @@ my %table=(
 "Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 
 # CygWin32
 "Mingw32", "gcc:-DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
 
 # CygWin32
-"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
+"CygWin32-pre1.3", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall::(unknown):CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32",
+"CygWin32", "gcc:-DTERMIOS -DL_ENDIAN -fomit-frame-pointer -O3 -m486 -Wall:::CYGWIN32::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}::::::::::win32:cygwin-shared::.dll",
 
 # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
 
 # Ultrix from Bernhard Simon <simon@zid.tuwien.ac.at>
 "ultrix-cc","cc:-std1 -O -Olimit 1000 -DL_ENDIAN::(unknown):::::::",
index 669361f88e83a181f5a69e10a524fa09de39fc7f..89f2747b43ad5a6334e4056273dc264a3e3869ab 100644 (file)
@@ -240,6 +240,9 @@ clean-shared:
                        done; \
                fi; \
                ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
                        done; \
                fi; \
                ( set -x; rm -f lib$$i$(SHLIB_EXT) ); \
+               if [ "$(PLATFORM)" = "CygWin32" ]; then \
+                       ( set -x; rm -f cyg$$i$(SHLIB_EXT) lib$$i$(SHLIB_EXT).a ); \
+               fi; \
        done
 
 link-shared:
        done
 
 link-shared:
@@ -286,6 +289,15 @@ do_darwin-shared:
        echo "" ; \
        done
 
        echo "" ; \
        done
 
+do_cygwin-shared:
+       libs='-L. ${SHLIBDEPS}'; for i in ${SHLIBDIRS}; do \
+       ( set -x; ${CC}  -shared -o cyg$$i.dll \
+               -Wl,--whole-archive lib$$i.a \
+               -Wl,--out-implib,lib$$i.dll.a \
+               -Wl,--no-whole-archive $$libs ) || exit 1; \
+       libs="$$libs -l$$i"; \
+       done
+
 # This assumes that GNU utilities are *not* used
 do_alpha-osf1-shared:
        if ${DETECT_GNU_LD}; then \
 # This assumes that GNU utilities are *not* used
 do_alpha-osf1-shared:
        if ${DETECT_GNU_LD}; then \
@@ -689,10 +701,18 @@ install: all install_docs
                tmp="$(SHARED_LIBS)"; \
                for i in $${tmp:-x}; \
                do \
                tmp="$(SHARED_LIBS)"; \
                for i in $${tmp:-x}; \
                do \
-                       if [ -f "$$i" ]; then \
+                       if [ -f "$$i" -o -f "$$i.a" ]; then \
                        (       echo installing $$i; \
                        (       echo installing $$i; \
-                               cp -f $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
-                               chmod 555 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i ); \
+                               if [ "$(PLATFORM)" != "CygWin32" ]; then \
+                                       cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/lib; \
+                                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i; \
+                               else \
+                                       c=`echo $$i | sed 's/^lib/cyg/'`; \
+                                       cp $$c $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
+                                       chmod 755 $(INSTALL_PREFIX)$(INSTALLTOP)/bin/$$c; \
+                                       cp $$i.a $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
+                                       chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/lib/$$i.a; \
+                               fi ); \
                        fi \
                done; \
                (       here="`pwd`"; \
                        fi \
                done; \
                (       here="`pwd`"; \
diff --git a/config b/config
index 74e6f08d934c063c50dea703b9a753d3c0c8c62b..502ca6720fe9e78ded54016fb19c95612ad809b3 100755 (executable)
--- a/config
+++ b/config
@@ -333,7 +333,11 @@ case "${SYSTEM}:${RELEASE}:${VERSION}:${MACHINE}" in
        ;;
 
     CYGWIN*)
        ;;
 
     CYGWIN*)
-       echo "${MACHINE}-whatever-cygwin32"; exit 0
+       case "$RELEASE" in
+           [bB]*|1.0|1.[12].*)
+               echo "${MACHINE}-whatever-cygwin32_pre1.3"; exit 0
+           *)
+               echo "${MACHINE}-whatever-cygwin32"; exit 0
        ;;
 
 esac
        ;;
 
 esac
@@ -670,8 +674,8 @@ EOF
   # *-aix) OUT="aix-$CC" ;;
   # *-dgux) OUT="dgux" ;;
   mips-sony-newsos4) OUT="newsos4-gcc" ;;
   # *-aix) OUT="aix-$CC" ;;
   # *-dgux) OUT="dgux" ;;
   mips-sony-newsos4) OUT="newsos4-gcc" ;;
-  *-*-cygwin32) OUT="CygWin32"
-               options="$options no-threads no-asm" ;;
+  *-*-cygwin32_pre1.3) OUT="CygWin32-pre1.3" ;;
+  *-*-cygwin32) OUT="CygWin32" ;;
   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 esac
 
   *) OUT=`echo $GUESSOS | awk -F- '{print $3}'`;;
 esac