diff -aurp gmp-6.3.0-orig/gmp-h.in gmp-6.3.0/gmp-h.in
--- gmp-6.3.0-orig/gmp-h.in	2023-09-13 19:30:34.000000000 +0200
+++ gmp-6.3.0/gmp-h.in	2023-09-13 19:32:29.000000000 +0200
@@ -59,8 +59,12 @@ see https://www.gnu.org/licenses/.  */
 /* Instantiated by configure. */
 #if ! defined (__GMP_WITHIN_CONFIGURE)
 @DEFN_LONG_LONG_LIMB@
+#ifdef GMP_STATICLIB
+#define __GMP_LIBGMP_DLL  0
+#else
 #define __GMP_LIBGMP_DLL  @LIBGMP_DLL@
 #endif
+#endif
 
 
 /* __GMP_DECLSPEC supports Windows DLL versions of libgmp, and is empty in
diff -aurp gmp-6.3.0-orig/gmp.pc.in gmp-6.3.0/gmp.pc.in
--- gmp-6.3.0-orig/gmp.pc.in	2023-09-13 19:30:34.000000000 +0200
+++ gmp-6.3.0/gmp.pc.in	2023-09-14 00:10:14.000000000 +0200
@@ -8,4 +8,5 @@ Description: GNU Multiple Precision Arit
 URL: https://gmplib.org
 Version: @PACKAGE_VERSION@
 Cflags: -I${includedir}
+Cflags.private: -DGMP_STATICLIB
 Libs: -L${libdir} -lgmp
