]> git.sesse.net Git - vlc/commitdiff
* Integrate python bindings in make process
authorClément Stenac <zorglub@videolan.org>
Sat, 26 Nov 2005 15:36:28 +0000 (15:36 +0000)
committerClément Stenac <zorglub@videolan.org>
Sat, 26 Nov 2005 15:36:28 +0000 (15:36 +0000)
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

Makefile.am
bindings/Makefile.am [new file with mode: 0644]
bindings/python/Makefile [deleted file]
bindings/python/Makefile.am [new file with mode: 0644]
bindings/python/vlcglue.c
configure.ac

index 9e37d93102d34918d3938257dd5ff37f9e71789e..1b631b93feb92901144e01857475eae0c6ae4e26 100644 (file)
@@ -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 (file)
index 0000000..96fcb3e
--- /dev/null
@@ -0,0 +1 @@
+SUBDIRS = python
diff --git a/bindings/python/Makefile b/bindings/python/Makefile
deleted file mode 100644 (file)
index f057af7..0000000
+++ /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 (file)
index 0000000..18c6007
--- /dev/null
@@ -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
index 3d7cffefe45ebb23f2c5e23e3ff316886f0ae12c..87283b1b5c5926d7be83075f55dc1127903b556f 100644 (file)
@@ -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,
index 8f6d2a6315b05f084594941de055d8858898b06d..b6293f7d84b6f0aaf82e30b998d9cd5cfaa13edd 100644 (file)
@@ -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 "