This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dilyan.palauzov
Recipients dilyan.palauzov
Date 2017-08-12.18:04:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1502561049.05.0.30023365478.issue31190@psf.upfronthosting.co.za>
In-reply-to
Content
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -578,7 +578,7 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o
 
 # Build static library
 # avoid long command lines, same as LIBRARY_OBJS
-$(LIBRARY): $(LIBRARY_OBJS)
+libpython$(LDVERSION).a: $(LIBRARY_OBJS)
        -rm -f $@
        $(AR) $(ARFLAGS) $@ Modules/getbuildinfo.o
        $(AR) $(ARFLAGS) $@ $(PARSER_OBJS)
diff --git a/configure.ac b/configure.ac
--- a/configure.ac
+++ b/configure.ac
@@ -987,9 +987,9 @@ esac
 
 AC_SUBST(LIBRARY)
 AC_MSG_CHECKING(LIBRARY)
-if test -z "$LIBRARY"
+if test -z "$LIBRARY" -a "x$enable_static" != "xno"
 then
-       LIBRARY='libpython$(VERSION)$(ABIFLAGS).a'
+       LIBRARY='libpython$(LDVERSION).a'
 fi
 AC_MSG_RESULT($LIBRARY)
 
@@ -1086,6 +1086,16 @@ then
 fi
 AC_MSG_RESULT($enable_shared)
 
+AC_MSG_CHECKING(for --disable-static)
+AC_ARG_ENABLE(static,
+              AS_HELP_STRING([--disable-static], [disable building static python library]))
+AC_MSG_RESULT($enable_static)
+
+if test "x$enable_static" == "xno" -a "x$enable_shared" == "xno"
+then
+       AC_MSG_ERROR(["Both static and shared library disabled"])
+fi
+
 AC_MSG_CHECKING(for --enable-profiling)
 AC_ARG_ENABLE(profiling,
               AS_HELP_STRING([--enable-profiling], [enable C-level code profiling]))
History
Date User Action Args
2017-08-12 18:04:09dilyan.palauzovsetrecipients: + dilyan.palauzov
2017-08-12 18:04:09dilyan.palauzovsetmessageid: <1502561049.05.0.30023365478.issue31190@psf.upfronthosting.co.za>
2017-08-12 18:04:09dilyan.palauzovlinkissue31190 messages
2017-08-12 18:04:08dilyan.palauzovcreate