]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-150311: Fix minor issues in configure.ac for Cygwin (#150328)
authorArmaan Sandhu <74664101+Ar-maan05@users.noreply.github.com>
Thu, 28 May 2026 12:38:39 +0000 (18:08 +0530)
committerGitHub <noreply@github.com>
Thu, 28 May 2026 12:38:39 +0000 (14:38 +0200)
- Use 'CYGWIN' (uppercase) for ac_sys_system to match the casing used
  in all case-pattern references throughout configure.ac.
- Fix LDLIBRARY for static builds: use '.a' extension instead of
  '.dll.a' when shared libraries are disabled.
- Replace hardcoded 'gcc' and 'g++' with '$(CC)' and '$(CXX)' in
  LDSHARED/LDCXXSHARED for Cygwin.

Co-authored-by: Victor Stinner <vstinner@python.org>
configure
configure.ac

index 0690e97b142f01cc505bc4b776774154b1b6d481..81862372f7d7774f51b9834de7b57f70a08d2f2f 100755 (executable)
--- a/configure
+++ b/configure
@@ -4157,7 +4157,7 @@ then
                ac_sys_system=Linux
                ;;
        *-*-cygwin*)
-               ac_sys_system=Cygwin
+               ac_sys_system=CYGWIN
                ;;
        *-apple-ios*)
                ac_sys_system=iOS
@@ -7848,7 +7848,7 @@ else # shared is disabled
   case $ac_sys_system in
     CYGWIN*)
       BLDLIBRARY='$(LIBRARY)'
-      LDLIBRARY='libpython$(LDVERSION).dll.a'
+      LDLIBRARY='libpython$(LDVERSION).a'
       ;;
   esac
 fi
@@ -14232,8 +14232,8 @@ then :
 
 fi;;
        CYGWIN*)
-               LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
-               LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
+               LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
+               LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base';;
        *)      LDSHARED="ld";;
        esac
 fi
index f2fca52c8f3dfc3b17c33a3a23b6d35cba9fc831..c8dce3fd49bda16af9f9000954b97015d4f7a7bd 100644 (file)
@@ -334,7 +334,7 @@ then
                ac_sys_system=Linux
                ;;
        *-*-cygwin*)
-               ac_sys_system=Cygwin
+               ac_sys_system=CYGWIN
                ;;
        *-apple-ios*)
                ac_sys_system=iOS
@@ -1650,7 +1650,7 @@ else # shared is disabled
   case $ac_sys_system in
     CYGWIN*)
       BLDLIBRARY='$(LIBRARY)'
-      LDLIBRARY='libpython$(LDVERSION).dll.a'
+      LDLIBRARY='libpython$(LDVERSION).a'
       ;;
   esac
 fi
@@ -3694,8 +3694,8 @@ then
                        dnl not implemented yet
                ]);;
        CYGWIN*)
-               LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
-               LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
+               LDSHARED='$(CC) -shared -Wl,--enable-auto-image-base'
+               LDCXXSHARED='$(CXX) -shared -Wl,--enable-auto-image-base';;
        *)      LDSHARED="ld";;
        esac
 fi