Commit a525a715 authored by Clément Stenac's avatar Clément Stenac

* Integrate python bindings in make process

New --enable-python-bindings option
Pic libs will be built if something needing them (shared libvlc, python, mozilla) is built.
* Fix a description in vlcObject
parent 747ed7c6
...@@ -9,10 +9,10 @@ NULL = ...@@ -9,10 +9,10 @@ NULL =
# which have makefiles with distribution information. # which have makefiles with distribution information.
# - intl should come before modules and . because all the code uses gettext # - intl should come before modules and . because all the code uses gettext
# - modules should come before . because vlc needs the builtins # - modules should come before . because vlc needs the builtins
# - . should come before mozilla because the plugin needs libvlc_pic.a # - . should come before mozilla/bindings because the plugin needs libvlc_pic.a
# - po should come before . because VLC.app needs the pofiles # - po should come before . because VLC.app needs the pofiles
# - loader should come before modules because some plugins need it # - loader should come before modules because some plugins need it
SUBDIRS = intl loader modules po . mozilla activex share m4 doc SUBDIRS = intl loader modules po . mozilla bindings activex share m4 doc
DIST_SUBDIRS = $(SUBDIRS) debian ipkg lib DIST_SUBDIRS = $(SUBDIRS) debian ipkg lib
EXTRA_DIST = \ EXTRA_DIST = \
...@@ -292,13 +292,10 @@ DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in ...@@ -292,13 +292,10 @@ DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in
if HAVE_WIN32 if HAVE_WIN32
lib_LIBRARIES = lib/libvlc.a lib_LIBRARIES = lib/libvlc.a
else else
if BUILD_SHARED
lib_LIBRARIES = lib/libvlc_pic.a
else
lib_LIBRARIES = lib/libvlc.a lib_LIBRARIES = lib/libvlc.a
if BUILD_MOZILLA if BUILD_PIC
lib_LIBRARIES += lib/libvlc_pic.a lib_LIBRARIES += lib/libvlc_pic.a
endif else
endif endif
endif endif
......
SUBDIRS = python
ifdef HOMEDRIVE
COMPILERARG = --compiler=mingw32
else
COMPILERARG =
endif
all:
python setup.py build $(COMPILERARG)
install:
python setup.py install
clean:
$(RM) -rf build
##############################################################################
# Building the Python binding
###############################################################################
# FIXME
#ifdef HOMEDRIVE
# COMPILERARG = --compiler=mingw32
#else
# COMPILERARG =
#endif
if BUILD_PYTHON
all:
python setup.py build $(COMPILERARG)
install:
python setup.py install
clean:
$(RM) -rf build
endif
...@@ -669,9 +669,9 @@ static PyMethodDef vlcObject_methods[] = ...@@ -669,9 +669,9 @@ static PyMethodDef vlcObject_methods[] =
{ "set", vlcObject_var_set, METH_VARARGS, { "set", vlcObject_var_set, METH_VARARGS,
"set(str, value) Set a variable value" }, "set(str, value) Set a variable value" },
{ "config_get", vlcObject_config_get, METH_VARARGS, { "config_get", vlcObject_config_get, METH_VARARGS,
"get(str) -> value Get an option value." }, "config_get(str) -> value Get a configuration option." },
{ "config_set", vlcObject_config_set, METH_VARARGS, { "config_set", vlcObject_config_set, METH_VARARGS,
"set(str, value) Set an option value" }, "config_set(str, value) Set a configuration option" },
{ "type", vlcObject_var_type, METH_VARARGS, { "type", vlcObject_var_type, METH_VARARGS,
"type(str) -> str Get a variable type" }, "type(str) -> str Get a variable type" },
{ "list", vlcObject_var_list, METH_VARARGS, { "list", vlcObject_var_list, METH_VARARGS,
......
...@@ -1326,6 +1326,15 @@ AC_ARG_ENABLE(release, ...@@ -1326,6 +1326,15 @@ AC_ARG_ENABLE(release,
[ --enable-release activate extra optimizations (default disabled)]) [ --enable-release activate extra optimizations (default disabled)])
test "${enable_release}" != "yes" && enable_release="no" test "${enable_release}" != "yes" && enable_release="no"
dnl
dnl Is the shared libvlc forced ?
dnl
build_pic=no
AC_ARG_ENABLE(shared-libvlc,
[ --enable-shared-libvlc shared libvlc (default disabled EXPERIMENTAL)],
,[shared_libvlc=no])
dnl dnl
dnl Stream output dnl Stream output
dnl dnl
...@@ -4594,14 +4603,6 @@ then ...@@ -4594,14 +4603,6 @@ then
fi fi
fi fi
dnl
dnl Joystick plugin
dnl
AC_ARG_ENABLE(joystick,
[ --enable-joystick joystick control (default enabled)])
if test "${enable_joystick}" = "yes"; then
AC_CHECK_HEADER(linux/joystick.h, [VLC_ADD_PLUGINS([joystick])])
fi
dnl dnl
dnl corba (ORBit) plugin dnl corba (ORBit) plugin
...@@ -4805,6 +4806,23 @@ AS_IF([test "${MOZILLA_CONFIG}"], [ ...@@ -4805,6 +4806,23 @@ AS_IF([test "${MOZILLA_CONFIG}"], [
fi fi
]) ])
AM_CONDITIONAL(BUILD_MOZILLA,${mozilla}) AM_CONDITIONAL(BUILD_MOZILLA,${mozilla})
if test "${mozilla}" != "false"
then
build_pic=yes
fi
dnl
dnl Python bindings
dnl
AC_ARG_ENABLE(python-bindings,
[ --enable-python-bindings Enable Python bindings (default disabled)])
dnl TODO: look for python dev headers
AM_CONDITIONAL( BUILD_PYTHON, [test "${enable_python_bindings}" = "yes"] )
if test "${enable_python_bindings}" = "yes"
then
build_pic=yes
fi
dnl dnl
dnl test plugins dnl test plugins
...@@ -4918,20 +4936,18 @@ then ...@@ -4918,20 +4936,18 @@ then
fi] fi]
AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support}) AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support})
AC_ARG_ENABLE(shared-libvlc, dnl
[ --enable-shared-libvlc shared libvlc (default disabled EXPERIMENTAL)], dnl Pic and shared libvlc stuff
,[shared_libvlc=no]) dnl
AM_CONDITIONAL(BUILD_SHARED, [test "${shared_libvlc}" != "no"]) AM_CONDITIONAL(BUILD_SHARED, [test "${shared_libvlc}" != "no"])
AM_CONDITIONAL(BUILD_PIC, [test "${build_pic}" = "yes" -o "${shared_libvlc}" != "no"] )
AS_IF([test "${shared_libvlc}" != "no"], [ AS_IF([test "${shared_libvlc}" != "no"], [
AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.])
]) ])
pic=no pic=no
AS_IF([test "${shared_libvlc}" != "no"], [pic=pic]) AS_IF([test "${shared_libvlc}" != "no" -o "${build_pic}" = "yes"], [pic=pic])
AS_IF([${mozilla}], [pic=pic])
AS_IF([test "${SYS}" = "mingw32"], [pic=no]) AS_IF([test "${SYS}" = "mingw32"], [pic=no])
AS_IF([test "${pic}" = "no"], [pic=]) AS_IF([test "${pic}" = "no"], [pic=])
AC_SUBST(pic) AC_SUBST(pic)
...@@ -5016,6 +5032,8 @@ AC_CONFIG_FILES([ ...@@ -5016,6 +5032,8 @@ AC_CONFIG_FILES([
Makefile Makefile
activex/Makefile activex/Makefile
activex/axvlc.inf activex/axvlc.inf
bindings/Makefile
bindings/python/Makefile
debian/Makefile debian/Makefile
doc/Makefile doc/Makefile
intl/Makefile intl/Makefile
...@@ -5114,7 +5132,7 @@ dnl for a in `./vlc-config --target plugin` ; do echo $a; done | sed -e 's,modul ...@@ -5114,7 +5132,7 @@ dnl for a in `./vlc-config --target plugin` ; do echo $a; done | sed -e 's,modul
dnl Shortcut to nice compile message dnl Shortcut to nice compile message
rm -f compile rm -f compile
echo '#! /bin/sh' >compile echo '#! /bin/sh' >compile
echo "PATH=$PATH LANG=C make $* 2>&1| ${srcdir}/extras/make.pl" >>compile echo "PATH=$PATH LANG=C make \$\* 2>&1| ${srcdir}/extras/make.pl" >>compile
chmod a+x compile chmod a+x compile
printf " printf "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment