gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] gnash macros/boost.m4 extensions/Makefile.am Ma...


From: Rob Savoye
Subject: [Gnash-commit] gnash macros/boost.m4 extensions/Makefile.am Ma...
Date: Mon, 22 Oct 2007 15:58:41 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/10/22 15:58:41

Modified files:
        macros         : boost.m4 
        extensions     : Makefile.am 
        .              : Makefile.am configure.ac ChangeLog 
Added files:
        extensions/metome: Makefile.am metome_ext.cpp metome_ext.h 

Log message:
                * configure.ac: Build Makefiles in cygnal/ACT sub dirs, add 
metome
                extension. Also display proper values for Boost libs.
                * Makefile.am: Dispplay boost values correctly for missing
                libraries, both required and optional.
                * macros/boost.m4: Make extra libraries used for testing it's 
own
                BOOST_EXTRA_LIBS variable to avoid linking problems.
                * extensions/metome: New directory for the soon-to-be-available
                metome SDK.
                * extensions/metome/Makefile.am, metome_ext.{h,cpp}: New support
                for Metome SDK.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/macros/boost.m4?cvsroot=gnash&r1=1.69&r2=1.70
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/Makefile.am?cvsroot=gnash&r1=1.14&r2=1.15
http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.91&r2=1.92
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.431&r2=1.432
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4667&r2=1.4668
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/metome/Makefile.am?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/metome/metome_ext.cpp?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/metome/metome_ext.h?cvsroot=gnash&rev=1.1

Patches:
Index: macros/boost.m4
===================================================================
RCS file: /sources/gnash/gnash/macros/boost.m4,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -b -r1.69 -r1.70
--- macros/boost.m4     22 Oct 2007 14:50:32 -0000      1.69
+++ macros/boost.m4     22 Oct 2007 15:58:40 -0000      1.70
@@ -14,7 +14,7 @@
 dnl  along with this program; if not, write to the Free Software
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-dnl $Id: boost.m4,v 1.69 2007/10/22 14:50:32 rsavoye Exp $
+dnl $Id: boost.m4,v 1.70 2007/10/22 15:58:40 rsavoye Exp $
 
 dnl Boost modules are:
 dnl date-time, filesystem. graph. iostreams, program options, python,
@@ -146,7 +146,7 @@
       dirs=`ls -dr ${dirname}/libboost_${j}*.${shlibext} 
${dirname}/libboost_${j}*.a 2>/dev/null`
       if test -n "${dirs}"; then
         libname=`echo ${dirs} | sed -e 's:\..*$::' -e 's:^.*/lib::'`
-        ac_cv_path_boost_lib="${ac_cv_path_boost_lib} -l${libname}"
+        ac_cv_path_boost_extra_lib="${ac_cv_path_boost_extra_lib} -l${libname}"
       else
         extra_missing_libs="${extra_missing_libs} $j"
       fi
@@ -166,12 +166,17 @@
     BOOST_LIBS="$ac_cv_path_boost_lib" 
   fi
 
+  if test x"${ac_cv_path_boost_extra_lib}" != x; then
+    BOOST_EXTRA_LIBS="$ac_cv_path_boost_extra_lib" 
+  fi
+
   dnl ------------------------------------------------------------------
   dnl Set HAVE_BOOST conditional, BOOST_CFLAGS and BOOST_LIBS variables
   dnl ------------------------------------------------------------------
 
   AC_SUBST(BOOST_CFLAGS)
   AC_SUBST(BOOST_LIBS)
+  AC_SUBST(BOOST_EXTRA_LIBS)
 
   dnl This isn't right: you don't need boot date-time installed unless u build
   dnl cygnal, and it is sometimes a separate package from Boost core and 
thread.

Index: extensions/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/extensions/Makefile.am,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- extensions/Makefile.am      27 Sep 2007 00:34:44 -0000      1.14
+++ extensions/Makefile.am      22 Oct 2007 15:58:40 -0000      1.15
@@ -39,9 +39,9 @@
 OTHER_DIRS += dbus
 endif
 
-# if BUILD_DBUS_EXT
-# OTHER_DIRS += dbus
-# endif
+if BUILD_METOME_EXT
+OTHER_DIRS += metome
+endif
 
 if BUILD_GTK_EXT
 if BUILD_GTK_GUI

Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/Makefile.am,v
retrieving revision 1.91
retrieving revision 1.92
diff -u -b -r1.91 -r1.92
--- Makefile.am 27 Sep 2007 23:59:50 -0000      1.91
+++ Makefile.am 22 Oct 2007 15:58:40 -0000      1.92
@@ -15,7 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # 
 
-# $Id: Makefile.am,v 1.91 2007/09/27 23:59:50 tgc Exp $
+# $Id: Makefile.am,v 1.92 2007/10/22 15:58:40 rsavoye Exp $
 
 ## Process this file with automake to produce Makefile.in
 AUTOMAKE_OPTIONS = 1.6.0
@@ -31,7 +31,6 @@
        backend \
        utilities \
        gui \
-       extensions \
        plugin \
        testsuite \
        po \
@@ -47,9 +46,13 @@
 
 SUBDIRS      = $(STD_DIRS) $(CYGNAL_DIRS) $(DOC_DIRS)
 
+if BUILD_EXTENSIONS
+SUBDIRS += extensions
+endif
+
 man_MANS = doc/gnash.1
 
-DIST_SUBDIRS = $(STD_DIRS) cygnal doc
+DIST_SUBDIRS = $(STD_DIRS) cygnal doc extensions
 
 EXTRA_DIST = config.rpath $(man_MANS) macros/incllist macros/libslist 
ChangeLog-0.8.0 ChangeLog-0.8.1
 
@@ -91,7 +94,6 @@
 
 # Set a few variables to what features we selected so we can dump it with the
 # test of the config
-
 dumpconfig:
        @echo ""
        @echo "Building in directories: $(SUBDIRS)"
@@ -164,10 +166,6 @@
        @echo "MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
        @echo "MYSQL_LIBS is $(MYSQL_LIBS)"
 endif
-if BUILD_LIRC_EXT
-       @echo " LIRC_CFLAGS is $(LIRC_CFLAGS)"
-       @echo " LIRC_LIBS is $(LIRC_LIBS)"
-endif
 if USE_MAD_ENGINE
        @echo " MAD_CFLAGS is $(MAD_CFLAGS)"
        @echo " MAD_LIBS is $(MAD_LIBS)"
@@ -178,6 +176,9 @@
        @echo " CURL_LIBS is $(CURL_LIBS)"
        @echo " BOOST_CFLAGS is $(BOOST_CFLAGS)"
        @echo " BOOST_LIBS is $(BOOST_LIBS)"
+       @if test -n $(BOOST_EXTRA_LIBS); then \
+         echo "        BOOST_EXTRA_LIBS is $(BOOST_EXTRA_LIBS)"; \
+       fi
 if ENABLE_MING
        @echo " MING_VERSION_CODE $(MING_VERSION_CODE) "
        @echo " MING_LIBS $(MING_LIBS) "
@@ -221,6 +222,7 @@
        @echo " Media handler: $(MEDIA_CONFIG)"
        @echo " Renderer engine: $(RENDERER_CONFIG)"
 
+
 if BUILD_GTK_GUI
        @echo " Supported GUI: GTK"
 endif
@@ -251,6 +253,9 @@
 else
        @echo " Firefox (NSAPI) plugin disabled"
 endif
+       @if test -n "$(EXTENSIONS_LIST)" ; then \
+         echo "        Extensions added are: $(EXTENSIONS_LIST)"; \
+       fi
 
 check: check-recursive anal
 

Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -b -r1.431 -r1.432
--- configure.ac        22 Oct 2007 10:28:27 -0000      1.431
+++ configure.ac        22 Oct 2007 15:58:40 -0000      1.432
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.431 2007/10/22 10:28:27 strk Exp $
+dnl $Id: configure.ac,v 1.432 2007/10/22 15:58:40 rsavoye Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -490,6 +490,7 @@
 ext_gtk=no
 ext_lirc=no
 ext_dbus=no
+ext_metome=no
 ext_all=no
 AC_ARG_WITH(extensions,
   AC_HELP_STRING([--with-extensions=], [Specify which extensions to build]),
@@ -540,18 +541,24 @@
         ext_dbus=yes
         nextensions=$((nextensions+1))
         ;;
+      metome|METOME)
+        AC_DEFINE(USE_METOME_EXT, [1], [Build the METOME extension])
+        ext_metome=yes
+        nextensions=$((nextensions+1))
+        ;;
       all|ALL)
         AC_DEFINE(USE_GTK_EXT, [1], [Build all the extensions])
         ext_dejagnu=yes
         ext_mysql=yes
         ext_fileio=yes
         ext_gtk=yes
-        ext_lirc=no
-        ext_dbus=no
+        ext_lirc=yes
+        ext_dbus=yes
+        ext_metome=yes
         ext_all=yes
-        nextensions=5
+        nextensions=8
         ;;
-      *) AC_MSG_ERROR([invalid extension specified: ${withval} given (accept: 
MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|ALL)])
+      *) AC_MSG_ERROR([invalid extension specified: ${withval} given (accept: 
MYSQL|DEJAGNU|FILEIO|GTK|LIRC|DBUS|METOME|ALL)])
          ;;
       esac]
     withval=`echo ${withval} | cut -d ' ' -f 2-6`
@@ -572,6 +579,8 @@
 AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
 AM_CONDITIONAL(BUILD_LIRC_EXT, [ test x$ext_lirc = xyes ])
 AM_CONDITIONAL(BUILD_DBUS_EXT, [ test x$ext_dbus = xyes ])
+AM_CONDITIONAL(BUILD_METOME_EXT, [ test x$ext_metome = xyes ])
+AM_CONDITIONAL(BUILD_EXTENSIONS, [ test -n $extensions_list])
 
 AC_LIBLTDL_INSTALLABLE
 AC_LIBTOOL_DLOPEN
@@ -1509,10 +1518,13 @@
 extensions/gtk2/Makefile
 extensions/lirc/Makefile
 extensions/dbus/Makefile
+extensions/metome/Makefile
 plugin/Makefile
 plugin/klash/Makefile
 cygnal/Makefile
 cygnal/ACT/Makefile
+cygnal/ACT/test_support/Makefile
+cygnal/ACT/unit_tests/Makefile
 cygnal/IO/Makefile
 cygnal/HTTP/Makefile
 cygnal/Net/Makefile
@@ -2081,6 +2093,7 @@
     dnl if test x"$cygnal" = xno; then
        echo "        BOOST flags are: $BOOST_CFLAGS"
        echo "        BOOST libs are: $BOOST_LIBS"
+       echo "        BOOST Extra libs are: $BOOST_EXTRA_LIBS"
     dnl fi
     if test x"${missing_headers}" != x; then
       for i in ${missing_headers}; do
@@ -2091,6 +2104,14 @@
        nogo=true
       done
     fi
+    if test x"${extra_missing_libs}" != x; then
+      for i in ${extra_missing_libs}; do
+             echo "        WARNING: The BOOST $i library is recommended!"
+        echo "               Install it from http://www.boost.org";
+        echo "               or .deb users: apt-get install libboost-${i}-dev"
+        echo "               Gnash will compile anyway, but not all tests will 
work."
+      done
+    fi
     if test x"${missing_libs}" != x; then
       for i in ${missing_libs}; do
        # They have some boost libs but no date_time and want to compile cygnal.

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4667
retrieving revision 1.4668
diff -u -b -r1.4667 -r1.4668
--- ChangeLog   22 Oct 2007 14:50:32 -0000      1.4667
+++ ChangeLog   22 Oct 2007 15:58:40 -0000      1.4668
@@ -1,5 +1,16 @@
 2007-10-22  Rob Savoye  <address@hidden>
 
+       * configure.ac: Build Makefiles in cygnal/ACT sub dirs, add metome
+       extension. Also display proper values for Boost libs.
+       * Makefile.am: Dispplay boost values correctly for missing
+       libraries, both required and optional.
+       * macros/boost.m4: Make extra libraries used for testing it's own
+       BOOST_EXTRA_LIBS variable to avoid linking problems.
+       * extensions/metome: New directory for the soon-to-be-available
+       metome SDK.
+       * extensions/metome/Makefile.am, metome_ext.{h,cpp}: New support
+       for Metome SDK.
+       
        * configure.ac: Print out a warning for missing boost libraries
        that are only recommended, and not required.
        * macros/boost.m4: Look for some libraries that are only needed

Index: extensions/metome/Makefile.am
===================================================================
RCS file: extensions/metome/Makefile.am
diff -N extensions/metome/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ extensions/metome/Makefile.am       22 Oct 2007 15:58:41 -0000      1.1
@@ -0,0 +1,48 @@
+## Process this file with automake to generate Makefile.in
+# 
+#   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
+# 
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+# 
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+AUTOMAKE_OPTIONS = 
+
+# this is where Gnash plugins get installed
+pluginsdir = $(libdir)/gnash/plugins
+
+plugins_LTLIBRARIES = metome_ext.la
+
+INCLUDES = -I$(srcdir)  \
+            -I$(top_srcdir)/libbase \
+            -I$(top_srcdir)/server \
+            -I$(top_srcdir)/server/vm \
+           -I$(top_srcdir)/asobjs \
+           $(INCLTDL)
+
+metome_ext_la_SOURCES = metome_ext.cpp metome_ext.h
+metome_ext_la_LDFLAGS = -module -avoid-version -no-undefined
+metome_ext_la_LIBDADD = $(LIBADD_DL) $(LIBLTDL) \
+       $(top_builddir)/libbase/libgnashbase.la \
+       $(top_builddir)/backend/libgnashbackend.la \
+       $(top_builddir)/server/libgnashserver.la \
+       $(PTHREAD_LIBS) \
+       $(NULL)
+
+check_PROGRAMS = # SharedTest
+CLEANFILES = \
+      gnash-dbg.log
+
+install-pluginsLTLIBRARIES: $(plugins_LTLIBRARIES)
+       test -d "$(DESTDIR)$(pluginsdir)" || $(mkinstalldirs) 
"$(DESTDIR)$(pluginsdir)"
+       $(LIBTOOL) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) 
$(plugins_LTLIBRARIES) "$(DESTDIR)$(pluginsdir)/$(plugins_LTLIBRARIES)"
+       $(RM) $(DESTDIR)$(pluginsdir)/*.a 

Index: extensions/metome/metome_ext.cpp
===================================================================
RCS file: extensions/metome/metome_ext.cpp
diff -N extensions/metome/metome_ext.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ extensions/metome/metome_ext.cpp    22 Oct 2007 15:58:41 -0000      1.1
@@ -0,0 +1,142 @@
+// 
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <iostream>
+
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+
+#include <string>
+#include "log.h"
+#include "metome_ext.h"
+#include "fn_call.h"
+#include "as_object.h"
+#include "builtin_function.h" // need builtin_function
+
+using namespace std;
+
+namespace gnash
+{
+
+as_value metome_ext_connect(const fn_call& fn);
+
+Metome::Metome() 
+    : _name(0)
+{
+    GNASH_REPORT_FUNCTION;
+}
+
+
+Metome::~Metome() 
+{
+    GNASH_REPORT_FUNCTION;
+}
+
+void
+Metome::connect(const char *sock)
+{
+    GNASH_REPORT_FUNCTION;
+    _name = sock;
+}
+
+class metome_as_object : public as_object
+{
+public:
+    Metome obj;
+};
+
+static void
+attachInterface(as_object *obj)
+{
+    GNASH_REPORT_FUNCTION;
+    obj->init_member("connect", new builtin_function(metome_ext_connect));
+}
+
+static as_object*
+getInterface()
+{
+    GNASH_REPORT_FUNCTION;
+    static boost::intrusive_ptr<as_object> o;
+    if (o == NULL) {
+       o = new as_object();
+    }
+    return o.get();
+}
+
+static as_value
+metome_ctor(const fn_call& /* fn */)
+{
+    GNASH_REPORT_FUNCTION;
+    metome_as_object* obj = new metome_as_object();
+
+    attachInterface(obj);
+    return as_value(obj); // will keep alive
+//    printf ("Hello World from %s !!!\n", __PRETTY_FUNCTION__);
+}
+
+as_value
+metome_ext_setsockname(const fn_call& fn)
+{
+    GNASH_REPORT_FUNCTION;
+    boost::intrusive_ptr<metome_as_object> ptr = 
ensureType<metome_as_object>(fn.this_ptr);
+    
+    if (fn.nargs > 0) {
+       string text = fn.arg(0).to_string();
+       ptr->obj.connect(text.c_str());
+       return as_value(true);
+    }
+    return as_value(false);
+}
+
+std::auto_ptr<as_object>
+init_metome_instance()
+{
+    return std::auto_ptr<as_object>(new metome_as_object());
+}
+
+// const char *metome_setmode(struct metome_config *config, const char *mode);
+extern "C" {
+    void
+    metome_class_init(as_object &obj)
+    {
+//     GNASH_REPORT_FUNCTION;
+       // This is going to be the global "class"/"function"
+       static boost::intrusive_ptr<builtin_function> cl;
+       if (cl == NULL) {
+           cl = new builtin_function(&metome_ctor, getInterface());
+//         // replicate all interface to class, to be able to access
+//         // all methods as static functions
+           attachInterface(cl.get());
+       }
+       
+       obj.init_member("Metome", cl.get());
+    }
+} // end of extern C
+
+
+} // end of gnash namespace
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:

Index: extensions/metome/metome_ext.h
===================================================================
RCS file: extensions/metome/metome_ext.h
diff -N extensions/metome/metome_ext.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ extensions/metome/metome_ext.h      22 Oct 2007 15:58:41 -0000      1.1
@@ -0,0 +1,55 @@
+// 
+//   Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef __METOME_PLUGIN_H__
+#define __METOME_PLUGIN_H__
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <memory> // for auto_ptr
+#include "as_object.h"
+
+namespace gnash
+{
+
+class Metome {
+public:
+    Metome();
+    ~Metome();
+    void connect(const char *sock);
+private:
+    const char *_name;
+};
+
+extern "C" {
+    void metome_class_init(as_object &obj);  
+    /// Return an  instance
+}
+
+std::auto_ptr<as_object> init_metome_instance();
+
+} // end of gnash namespace
+
+// __METOME_PLUGIN_H__
+#endif
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: t
+// End:




reply via email to

[Prev in Thread] Current Thread [Next in Thread]