Changeset c1e7a6 in git for m4


Ignore:
Timestamp:
Dec 13, 2012, 4:14:38 PM (11 years ago)
Author:
Alexander Dreyer <adreyer@…>
Branches:
(u'spielwiese', 'fe61d9c35bf7c61f2b6cbf1b56e25e2f08d536cc')
Children:
f4399e865a8d7da06b4d0e0a3d19e4c3acc2d8dc
Parents:
57dcd6dcce5b13d67c7a17d1b1dc57c9b4de98c9
git-author:
Alexander Dreyer <adreyer@gmx.de>2012-12-13 16:14:38+01:00
git-committer:
Alexander Dreyer <adreyer@gmx.de>2012-12-14 14:04:50+01:00
Message:
Optionally supporting python embedding
File:
1 edited

Legend:

Unmodified
Added
Removed
  • m4/ax_python_with_version.m4

    r57dcd6 rc1e7a6  
    2828        AC_ARG_WITH(
    2929            python,
    30             AS_HELP_STRING([--with-python@<:@=PYTHON@:>@],
     30            AS_HELP_STRING([--with-python@<:@=@<:@embed,@:>@PYTHON@:>@],
    3131                [absolute path name of Python executable]
    3232            ),
    3333            [],[withval="yes"]
    3434        )
     35        py_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
     36        for elt in $withval; do
     37          IFS="$py_save_ifs"
     38          case $elt in
     39            embed|embedding)
     40              si_try_embed=true
     41            ;;
     42            static|dynamic|shared|module)
     43            ;;
     44            *)
     45            si_withval=$elt
     46          esac
     47        done
     48        IFS="$py_save_ifs"
     49        if test x"$si_withval" = x""
     50        then
     51           withval="yes"
     52        else
     53           withval="$si_withval"
     54        fi
     55
    3556        AC_MSG_RESULT($withval)
    3657        if test "$withval" = "no"
     
    5980                AX_PYTHON_VERSION_CHECK([$1],
    6081                                        [ ax_python_use=true
     82                                          si_embed_python=$si_try_embed
    6183                                          AC_MSG_RESULT(yes)
    6284                                          AX_PYTHON_PREFIX( )
     
    6486                                          AX_PYTHON_CSPEC( )
    6587                                        ],
    66                                         [ax_python_use=false; AC_MSG_RESULT([too old, skipping python interface!])]
     88                                        [ax_python_use=false
     89                                         AC_MSG_RESULT([too old, skipping python interface!])]
    6790                )
    6891            fi
    6992        fi   
    7093        AM_CONDITIONAL(PYTHON_USE, test x"$ax_python_use" = x"true")
     94        AM_CONDITIONAL(SI_EMBED_PYTHON, test x"$si_embed_python" = x"true")
     95
     96        if  test x"$si_embed_python" = x"true"
     97        then
     98          AC_DEFINE(EMBED_PYTHON,1,integrate python)
     99          AC_SUBST(EMBED_PYOBJECT_CFLAGS,"\${PYTHON_CSPEC}")
     100          AC_SUBST(EMBED_PYOBJECT_LDFLAGS,"\${PYTHON_LSPEC}")
     101        fi
     102
     103        AM_CONDITIONAL(PYTHON_MODULE, test x"$si_embed_python" != x"true")
    71104    fi
    72105
Note: See TracChangeset for help on using the changeset viewer.