diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2013-03-21 20:21:49 (GMT) |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2013-03-21 20:21:49 (GMT) |
commit | d5537d071cc2acada7220431a0eea5931c2e8a2d (patch) | |
tree | eba2ec8207b84f178068d4f86942e962113d7689 /configure.ac | |
parent | 03b0116c781f8b2b530c2452d25d9a372c8f3635 (diff) | |
download | cpython-d5537d071cc2acada7220431a0eea5931c2e8a2d.zip cpython-d5537d071cc2acada7220431a0eea5931c2e8a2d.tar.gz cpython-d5537d071cc2acada7220431a0eea5931c2e8a2d.tar.bz2 |
- Issue #16754: Fix the incorrect shared library extension on linux. Introduce
two makefile macros SHLIB_SUFFIX and EXT_SUFFIX. SO now has the value of
SHLIB_SUFFIX again (as in 2.x and 3.1). The SO macro is removed in 3.4.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac index 19cf1ae..0ab4430 100644 --- a/configure.ac +++ b/configure.ac @@ -1721,14 +1721,30 @@ case $ac_sys_system/$ac_sys_release in esac # Set info about shared libraries. -AC_SUBST(SO) +AC_SUBST(SHLIB_SUFFIX) AC_SUBST(LDSHARED) AC_SUBST(LDCXXSHARED) AC_SUBST(BLDSHARED) AC_SUBST(CCSHARED) AC_SUBST(LINKFORSHARED) -AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).]) +# SHLIB_SUFFIX is the extension of shared libraries `(including the dot!) +# -- usually .so, .sl on HP-UX, .dll on Cygwin +AC_MSG_CHECKING(the extension of shared libraries) +if test -z "$SHLIB_SUFFIX"; then + case $ac_sys_system in + hp*|HP*) + case `uname -m` in + ia64) SHLIB_SUFFIX=.so;; + *) SHLIB_SUFFIX=.sl;; + esac + ;; + CYGWIN*) SHLIB_SUFFIX=.dll;; + *) SHLIB_SUFFIX=.so;; + esac +fi +AC_MSG_RESULT($SHLIB_SUFFIX) + # LDSHARED is the ld *command* used to create shared library # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 # (Shared libraries in this instance are shared modules to be loaded into @@ -3754,41 +3770,18 @@ AC_MSG_CHECKING(SOABI) SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS} AC_MSG_RESULT($SOABI) +AC_SUBST(EXT_SUFFIX) +case $ac_sys_system in + Linux*|GNU*) + EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};; + *) + EXT_SUFFIX=${SHLIB_SUFFIX};; +esac + AC_MSG_CHECKING(LDVERSION) LDVERSION='$(VERSION)$(ABIFLAGS)' AC_MSG_RESULT($LDVERSION) -# SO is the extension of shared libraries `(including the dot!) -# -- usually .so, .sl on HP-UX, .dll on Cygwin -AC_MSG_CHECKING(SO) -if test -z "$SO" -then - case $ac_sys_system in - hp*|HP*) - case `uname -m` in - ia64) SO=.so;; - *) SO=.sl;; - esac - ;; - CYGWIN*) SO=.dll;; - Linux*|GNU*) - SO=.${SOABI}.so;; - *) SO=.so;; - esac -else - # this might also be a termcap variable, see #610332 - echo - echo '=====================================================================' - echo '+ +' - echo '+ WARNING: You have set SO in your environment. +' - echo '+ Do you really mean to change the extension for shared libraries? +' - echo '+ Continuing in 10 seconds to let you to ponder. +' - echo '+ +' - echo '=====================================================================' - sleep 10 -fi -AC_MSG_RESULT($SO) - # Check whether right shifting a negative integer extends the sign bit # or fills with zeros (like the Cray J90, according to Tim Peters). AC_MSG_CHECKING(whether right shift extends the sign bit) |