diff options
author | doko@ubuntu.com <doko@ubuntu.com> | 2013-03-21 13:31:41 -0700 |
---|---|---|
committer | doko@ubuntu.com <doko@ubuntu.com> | 2013-03-21 13:31:41 -0700 |
commit | 1621d77fc8fb2385d26c7de39f55df60426ec6ec (patch) | |
tree | 0a31742c8b8aed6453b95f92a77f50f66d5085cd /configure.ac | |
parent | bd2d30cf31c61843645a96a377aa0573052c4972 (diff) | |
parent | d5537d071cc2acada7220431a0eea5931c2e8a2d (diff) | |
download | cpython-git-1621d77fc8fb2385d26c7de39f55df60426ec6ec.tar.gz |
- 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 | 60 |
1 files changed, 26 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac index b555f2726c..8cf0e9251b 100644 --- a/configure.ac +++ b/configure.ac @@ -1896,13 +1896,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) +# 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 @@ -3925,43 +3942,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) - -AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libraries (including the dot!).]) - # 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) |