Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(37411)

Side by Side Diff: configure.ac

Issue 16754: Incorrect shared library extension on linux
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | Lib/distutils/command/build_ext.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dnl *********************************************** 1 dnl ***********************************************
2 dnl * Please run autoreconf to test your changes! * 2 dnl * Please run autoreconf to test your changes! *
3 dnl *********************************************** 3 dnl ***********************************************
4 4
5 # Set VERSION so we only need to edit in one place (i.e., here) 5 # Set VERSION so we only need to edit in one place (i.e., here)
6 m4_define(PYTHON_VERSION, 3.4) 6 m4_define(PYTHON_VERSION, 3.4)
7 7
8 AC_PREREQ(2.65) 8 AC_PREREQ(2.65)
9 9
10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/) 10 AC_INIT(python, PYTHON_VERSION, http://bugs.python.org/)
(...skipping 1880 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 dynamic linker (dyld) instead of the old-style (NextStep) dynamic 1891 dynamic linker (dyld) instead of the old-style (NextStep) dynamic
1892 linker (rld). Dyld is necessary to support frameworks.]) 1892 linker (rld). Dyld is necessary to support frameworks.])
1893 AC_MSG_RESULT(always on for Darwin) 1893 AC_MSG_RESULT(always on for Darwin)
1894 ;; 1894 ;;
1895 *) 1895 *)
1896 AC_MSG_RESULT(no) 1896 AC_MSG_RESULT(no)
1897 ;; 1897 ;;
1898 esac 1898 esac
1899 1899
1900 # Set info about shared libraries. 1900 # Set info about shared libraries.
1901 AC_SUBST(SO) 1901 AC_SUBST(SHLIB_SUFFIX)
1902 AC_SUBST(LDSHARED) 1902 AC_SUBST(LDSHARED)
1903 AC_SUBST(LDCXXSHARED) 1903 AC_SUBST(LDCXXSHARED)
1904 AC_SUBST(BLDSHARED) 1904 AC_SUBST(BLDSHARED)
1905 AC_SUBST(CCSHARED) 1905 AC_SUBST(CCSHARED)
1906 AC_SUBST(LINKFORSHARED) 1906 AC_SUBST(LINKFORSHARED)
1907 1907
1908 # SHLIB_SUFFIX is the extension of shared libraries `(including the dot!)
1909 # -- usually .so, .sl on HP-UX, .dll on Cygwin
1910 AC_MSG_CHECKING(the extension of shared libraries)
1911 if test -z "$SHLIB_SUFFIX"; then
1912 case $ac_sys_system in
1913 hp*|HP*)
1914 case `uname -m` in
1915 ia64) SHLIB_SUFFIX=.so;;
1916 *) SHLIB_SUFFIX=.sl;;
1917 esac
1918 ;;
1919 CYGWIN*) SHLIB_SUFFIX=.dll;;
1920 *) SHLIB_SUFFIX=.so;;
1921 esac
1922 else
1923 # this might also be a termcap variable, see #610332
1924 echo
1925 echo '================================================================== ==='
1926 echo '+ +'
1927 echo '+ WARNING: You have set SO in your environment. +'
1928 echo '+ Do you really mean to change the extension for shared libraries? +'
1929 echo '+ Continuing in 10 seconds to let you to ponder. +'
1930 echo '+ +'
1931 echo '================================================================== ==='
1932 sleep 10
1933 fi
1934 AC_MSG_RESULT($SHLIB_SUFFIX)
1935
1908 # LDSHARED is the ld *command* used to create shared library 1936 # LDSHARED is the ld *command* used to create shared library
1909 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5 1937 # -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
1910 # (Shared libraries in this instance are shared modules to be loaded into 1938 # (Shared libraries in this instance are shared modules to be loaded into
1911 # Python, as opposed to building Python itself as a shared library.) 1939 # Python, as opposed to building Python itself as a shared library.)
1912 AC_MSG_CHECKING(LDSHARED) 1940 AC_MSG_CHECKING(LDSHARED)
1913 if test -z "$LDSHARED" 1941 if test -z "$LDSHARED"
1914 then 1942 then
1915 case $ac_sys_system/$ac_sys_release in 1943 case $ac_sys_system/$ac_sys_release in
1916 AIX*) 1944 AIX*)
1917 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Mo dules/python.exp" 1945 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:\$(srcdir)/Mo dules/python.exp"
(...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after
3919 # 3947 #
3920 # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc, 3948 # Thus for example, Python 3.2 built with wide unicode, pydebug, and pymalloc,
3921 # would get a shared library ABI version tag of 'cpython-32dmu' and shared 3949 # would get a shared library ABI version tag of 'cpython-32dmu' and shared
3922 # libraries would be named 'foo.cpython-32dmu.so'. 3950 # libraries would be named 'foo.cpython-32dmu.so'.
3923 AC_SUBST(SOABI) 3951 AC_SUBST(SOABI)
3924 AC_MSG_CHECKING(ABIFLAGS) 3952 AC_MSG_CHECKING(ABIFLAGS)
3925 AC_MSG_RESULT($ABIFLAGS) 3953 AC_MSG_RESULT($ABIFLAGS)
3926 AC_MSG_CHECKING(SOABI) 3954 AC_MSG_CHECKING(SOABI)
3927 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS} 3955 SOABI='cpython-'`echo $VERSION | tr -d .`${ABIFLAGS}
3928 AC_MSG_RESULT($SOABI) 3956 AC_MSG_RESULT($SOABI)
3957
3958 AC_SUBST(EXT_SUFFIX)
3959 case $ac_sys_system in
3960 Linux*|GNU*)
3961 EXT_SUFFIX=.${SOABI}${SHLIB_SUFFIX};;
3962 *)
3963 EXT_SUFFIX=${SHLIB_SUFFIX};;
3964 esac
3929 3965
3930 AC_MSG_CHECKING(LDVERSION) 3966 AC_MSG_CHECKING(LDVERSION)
3931 LDVERSION='$(VERSION)$(ABIFLAGS)' 3967 LDVERSION='$(VERSION)$(ABIFLAGS)'
3932 AC_MSG_RESULT($LDVERSION) 3968 AC_MSG_RESULT($LDVERSION)
3933 3969
3934 dnl define LIBPL after ABIFLAGS and LDVERSION is defined. 3970 dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
3935 AC_SUBST(PY_ENABLE_SHARED) 3971 AC_SUBST(PY_ENABLE_SHARED)
3936 LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}" 3972 LIBPL="${prefix}/lib/python${VERSION}/config-${LDVERSION}"
3937 AC_SUBST(LIBPL) 3973 AC_SUBST(LIBPL)
3938
3939 # SO is the extension of shared libraries `(including the dot!)
3940 # -- usually .so, .sl on HP-UX, .dll on Cygwin
3941 AC_MSG_CHECKING(SO)
3942 if test -z "$SO"
3943 then
3944 case $ac_sys_system in
3945 hp*|HP*)
3946 case `uname -m` in
3947 ia64) SO=.so;;
3948 *) SO=.sl;;
3949 esac
3950 ;;
3951 CYGWIN*) SO=.dll;;
3952 Linux*|GNU*)
3953 SO=.${SOABI}.so;;
3954 *) SO=.so;;
3955 esac
3956 else
3957 # this might also be a termcap variable, see #610332
3958 echo
3959 echo '================================================================== ==='
3960 echo '+ +'
3961 echo '+ WARNING: You have set SO in your environment. +'
3962 echo '+ Do you really mean to change the extension for shared libraries? +'
3963 echo '+ Continuing in 10 seconds to let you to ponder. +'
3964 echo '+ +'
3965 echo '================================================================== ==='
3966 sleep 10
3967 fi
3968 AC_MSG_RESULT($SO)
3969
3970 AC_DEFINE_UNQUOTED(SHLIB_EXT, "$SO", [Define this to be extension of shared libr aries (including the dot!).])
3971 3974
3972 # Check whether right shifting a negative integer extends the sign bit 3975 # Check whether right shifting a negative integer extends the sign bit
3973 # or fills with zeros (like the Cray J90, according to Tim Peters). 3976 # or fills with zeros (like the Cray J90, according to Tim Peters).
3974 AC_MSG_CHECKING(whether right shift extends the sign bit) 3977 AC_MSG_CHECKING(whether right shift extends the sign bit)
3975 AC_CACHE_VAL(ac_cv_rshift_extends_sign, [ 3978 AC_CACHE_VAL(ac_cv_rshift_extends_sign, [
3976 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 3979 AC_RUN_IFELSE([AC_LANG_SOURCE([[
3977 int main() 3980 int main()
3978 { 3981 {
3979 exit(((-1)>>3 == -1) ? 0 : 1); 3982 exit(((-1)>>3 == -1) ? 0 : 1);
3980 } 3983 }
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
4662 if test ! -f Modules/Setup.local 4665 if test ! -f Modules/Setup.local
4663 then 4666 then
4664 echo "# Edit this file for local setup changes" >Modules/Setup.local 4667 echo "# Edit this file for local setup changes" >Modules/Setup.local
4665 fi 4668 fi
4666 4669
4667 echo "creating Makefile" 4670 echo "creating Makefile"
4668 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \ 4671 $SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
4669 -s Modules Modules/Setup.config \ 4672 -s Modules Modules/Setup.config \
4670 Modules/Setup.local Modules/Setup 4673 Modules/Setup.local Modules/Setup
4671 mv config.c Modules 4674 mv config.c Modules
OLDNEW
« no previous file with comments | « no previous file | Lib/distutils/command/build_ext.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+