diff --git a/Makefile.am b/Makefile.am index 9e37d93102..1b631b93fe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,10 +9,10 @@ NULL = # which have makefiles with distribution information. # - intl should come before modules and . because all the code uses gettext # - 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 # - 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 EXTRA_DIST = \ @@ -292,13 +292,10 @@ DISTCLEANFILES = $(BUILT_SOURCES_distclean) vlc-config.in if HAVE_WIN32 lib_LIBRARIES = lib/libvlc.a else -if BUILD_SHARED -lib_LIBRARIES = lib/libvlc_pic.a -else lib_LIBRARIES = lib/libvlc.a -if BUILD_MOZILLA +if BUILD_PIC lib_LIBRARIES += lib/libvlc_pic.a -endif +else endif endif diff --git a/bindings/Makefile.am b/bindings/Makefile.am new file mode 100644 index 0000000000..96fcb3e253 --- /dev/null +++ b/bindings/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = python diff --git a/bindings/python/Makefile b/bindings/python/Makefile deleted file mode 100644 index f057af74e0..0000000000 --- a/bindings/python/Makefile +++ /dev/null @@ -1,15 +0,0 @@ -ifdef HOMEDRIVE - COMPILERARG = --compiler=mingw32 -else - COMPILERARG = -endif - -all: - python setup.py build $(COMPILERARG) - -install: - python setup.py install - -clean: - $(RM) -rf build - diff --git a/bindings/python/Makefile.am b/bindings/python/Makefile.am new file mode 100644 index 0000000000..18c600772e --- /dev/null +++ b/bindings/python/Makefile.am @@ -0,0 +1,22 @@ +############################################################################## +# 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 diff --git a/bindings/python/vlcglue.c b/bindings/python/vlcglue.c index 3d7cffefe4..87283b1b5c 100644 --- a/bindings/python/vlcglue.c +++ b/bindings/python/vlcglue.c @@ -669,9 +669,9 @@ static PyMethodDef vlcObject_methods[] = { "set", vlcObject_var_set, METH_VARARGS, "set(str, value) Set a variable value" }, { "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, - "set(str, value) Set an option value" }, + "config_set(str, value) Set a configuration option" }, { "type", vlcObject_var_type, METH_VARARGS, "type(str) -> str Get a variable type" }, { "list", vlcObject_var_list, METH_VARARGS, diff --git a/configure.ac b/configure.ac index 8f6d2a6315..b6293f7d84 100644 --- a/configure.ac +++ b/configure.ac @@ -1326,6 +1326,15 @@ AC_ARG_ENABLE(release, [ --enable-release activate extra optimizations (default disabled)]) 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 Stream output dnl @@ -4594,14 +4603,6 @@ then 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 corba (ORBit) plugin @@ -4805,6 +4806,23 @@ AS_IF([test "${MOZILLA_CONFIG}"], [ fi ]) 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 test plugins @@ -4918,20 +4936,18 @@ then fi] AM_CONDITIONAL(HAVE_BUILTINS, ${builtin_support}) -AC_ARG_ENABLE(shared-libvlc, - [ --enable-shared-libvlc shared libvlc (default disabled EXPERIMENTAL)], - ,[shared_libvlc=no]) - +dnl +dnl Pic and shared libvlc stuff +dnl 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"], [ AC_DEFINE(HAVE_SHARED_LIBVLC, 1, [Define to 1 if libvlc is built as a shared library.]) ]) pic=no -AS_IF([test "${shared_libvlc}" != "no"], [pic=pic]) -AS_IF([${mozilla}], [pic=pic]) +AS_IF([test "${shared_libvlc}" != "no" -o "${build_pic}" = "yes"], [pic=pic]) AS_IF([test "${SYS}" = "mingw32"], [pic=no]) - AS_IF([test "${pic}" = "no"], [pic=]) AC_SUBST(pic) @@ -5016,6 +5032,8 @@ AC_CONFIG_FILES([ Makefile activex/Makefile activex/axvlc.inf + bindings/Makefile + bindings/python/Makefile debian/Makefile doc/Makefile intl/Makefile @@ -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 rm -f 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 printf "