Changeset 1684c3 in git for m4/ax_python_embed.m4


Ignore:
Timestamp:
Nov 15, 2013, 5:09:41 PM (10 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
bbeddf73180e5a0b82609d4054f2cf3d3de40a27
Parents:
c6f0451f6fc744c2dac1401c4d9346c784f6b28b
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:09:41+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2013-11-15 17:17:40+01:00
Message:
Fix BS to use python-config

fix: more default python base-names
add: extra python compiler flags
File:
1 edited

Legend:

Unmodified
Added
Removed
  • m4/ax_python_embed.m4

    rc6f0451 r1684c3  
    224224    if test -n "$PYTHON"
    225225    then
    226         ax_python_prefix=`${PYTHON} -c "import sys; print sys.prefix"`
     226        ax_python_prefix=`${PYTHON}-config --prefix`
    227227        if test -z "$ax_python_prefix"
    228228        then
    229229            AC_MSG_ERROR([Python Prefix is not known])
    230230        fi
    231         ax_python_execprefix=`${PYTHON} -c "import sys; print sys.exec_prefix"`
    232         ax_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`
    233         ax_python_includespec="-I${ax_python_prefix}/include/python${ax_python_version}"
    234         if test x"$python_prefix" != x"$python_execprefix"; then
    235             ax_python_execspec="-I${ax_python_execprefix}/include/python${ax_python_version}"
    236             ax_python_includespec="${ax_python_includespec} $ax_python_execspec"
    237         fi
    238         ax_python_ccshared=`${PYTHON} -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('CFLAGSFORSHARED')"`
    239         ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}"
     231#        ax_python_execprefix=`${PYTHON}-config --exec-prefix`
     232#        ax_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`
     233#        ax_python_includespec="-I${ax_python_prefix}/include/python${ax_python_version}"
     234#        if test x"$python_prefix" != x"$python_execprefix"; then
     235#            ax_python_execspec="-I${ax_python_execprefix}/include/python${ax_python_version}"
     236#            ax_python_includespec="${ax_python_includespec} $ax_python_execspec"
     237#        fi
     238        ax_python_cspec=`${PYTHON}-config --cflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g' -e 's@ -mno-fused-madd@@g'`
     239        #   or -Qunused-arguments / clang :(
     240#        ax_python_cspec="${ax_python_ccshared} ${ax_python_includespec}"
    240241        AC_SUBST([PYTHON_CSPEC], [${ax_python_cspec}])
    241242        AC_MSG_NOTICE([PYTHON_CSPEC=${ax_python_cspec}])
     
    269270AC_DEFUN([AX_PYTHON_LSPEC],
    270271[
     272
    271273    AC_ARG_VAR( [PYTHON], [Python Executable Path] )
    272274    if test -n "$PYTHON"
    273275    then
     276
    274277        AX_PYTHON_RUN([
    275278import sys
     
    308311print strLinkSpec
    309312        ])
    310         AC_SUBST([PYTHON_LSPEC], [${ax_python_output}])
    311         AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}])
     313       
     314#        AC_SUBST([PYTHON_LSPEC], [${ax_python_output}])
     315#        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_output}])
     316
     317        ax_python_lspec=`${PYTHON}-config --ldflags | sed -e "s@ -arch i386@@" -e "s@ -arch x86_64@@" -e 's@ -g@@g'`
     318        AC_SUBST([PYTHON_LSPEC], [${ax_python_lspec}])
     319        AC_MSG_NOTICE([PYTHON_LSPEC=${ax_python_lspec}])
     320
    312321    fi
    313322])
Note: See TracChangeset for help on using the changeset viewer.