gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] gnash configure.ac Makefile.am ChangeLog extens...


From: Rob Savoye
Subject: [Gnash-commit] gnash configure.ac Makefile.am ChangeLog extens...
Date: Tue, 24 Apr 2007 17:52:48 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Rob Savoye <rsavoye>    07/04/24 17:52:47

Modified files:
        .              : configure.ac Makefile.am ChangeLog 
        extensions     : Makefile.am 
        extensions/fileio: fileio.cpp 
        cygnal         : cygnal.cpp 

Log message:
                * configure.ac: Remove --enable-extension. Add 
--with-extensions=
                that takes a comma delimited list of extension so you can 
seclect
                with ones you want to build.
                * Makefile.am: Always add the extensions directory.
                * extensions/Makefile.am: Use new conditionals to select builds
                directories.
                * cygnal/cygnal.cpp: Include posix_time.hpp.
                * extensions/fileio/fileio.cpp: Use intrusive pointers instead 
of
                explicit pointers.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/configure.ac?cvsroot=gnash&r1=1.292&r2=1.293
http://cvs.savannah.gnu.org/viewcvs/gnash/Makefile.am?cvsroot=gnash&r1=1.67&r2=1.68
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.2984&r2=1.2985
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/Makefile.am?cvsroot=gnash&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/gnash/extensions/fileio/fileio.cpp?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/cygnal/cygnal.cpp?cvsroot=gnash&r1=1.8&r2=1.9

Patches:
Index: configure.ac
===================================================================
RCS file: /sources/gnash/gnash/configure.ac,v
retrieving revision 1.292
retrieving revision 1.293
diff -u -b -r1.292 -r1.293
--- configure.ac        19 Apr 2007 14:39:13 -0000      1.292
+++ configure.ac        24 Apr 2007 17:52:47 -0000      1.293
@@ -15,7 +15,7 @@
 dnl  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 dnl  
 
-dnl $Id: configure.ac,v 1.292 2007/04/19 14:39:13 bjacques Exp $
+dnl $Id: configure.ac,v 1.293 2007/04/24 17:52:47 rsavoye Exp $
 
 AC_PREREQ(2.50)
 AC_INIT(gnash, cvs)
@@ -85,6 +85,8 @@
 
 CFLAGS="$save_CFLAGS";
 
+AC_ARG_WITH(top_level, AC_HELP_STRING([--with-top-level], [top level directory 
for cross compiling files]), with_top_level=${withval})
+
 AC_ARG_ENABLE(debugger,
   AC_HELP_STRING([--disable-debugger],[Disable the Flash debugger]),
 [case "${enableval}" in
@@ -124,17 +126,6 @@
   AC_DEFINE([WRITE_FILE], [], [Write files while streaming])
 fi
 
-dnl Don't build the extensions if specified.
-AC_ARG_ENABLE(extensions,
-  AC_HELP_STRING([--enable-extensions], [Enable support for Gnash EXTENSIONS]),
-[case "${enableval}" in
-  yes) extensions=yes ;;
-  no)  extensions=no ;;
-  *)   AC_MSG_ERROR([bad value ${enableval} for enable-extensions option]) ;;
-esac],extensions=no)
-
-AM_CONDITIONAL(EXTENSIONS, test x$extensions = xyes)
-
 dnl Don't build the cygnal server if specified.
 AC_ARG_ENABLE(cygnal,
   AC_HELP_STRING([--disable-cygnal], [Disable support for the Cygnal server]),
@@ -307,6 +298,71 @@
 )
 
 dnl --------------------------------------------------------
+dnl Figure out which extensions to build.
+dnl --------------------------------------------------------
+
+extensions_list=
+ext_dejagnu=no
+ext_mysql=no
+ext_fileio=no
+ext_gtk=no
+ext_all=no
+AC_ARG_WITH(extensions,
+  AC_HELP_STRING([--with-extensions=], [Specify which extensions to build]),
+  if test -n ${withval}; then
+    extlist="${withval}"
+    withval=`echo ${withval} | tr '\054' ' ' `
+  fi
+  while test -n "${withval}" ; do
+    val=`echo ${withval} | cut -d ' ' -f 1`
+    extensions_list="${extensions_list} ${val}"
+    [case "${val}" in
+      dejagnu|DEJAGNU|dj|DJ)
+        AC_DEFINE(USE_DEJAGNU_EXT, [1], [Build the DejaGnu extension])
+        AC_MSG_NOTICE([Adding DejaGnu extension])
+        ext_dejagnu=yes
+        ;;
+      mysql|MYSQL|sql|SQL)
+        AC_DEFINE(USE_MYSQL_EXT, [1], [Build the MySQL extension])
+        AC_MSG_NOTICE([Adding MySql extension])
+        ext_mysql=yes
+        ;;
+      fileio|FILEIO|io|IO)
+        AC_DEFINE(USE_FILEIO_EXT, [1], [Build the FileIO extension])
+        AC_MSG_NOTICE([Adding FileIO extension])
+        ext_fileio=yes
+        ;;
+      gtk|GTK|gtk2|GTK2)
+        AC_DEFINE(USE_GTK_EXT, [1], [Build the FileIO extension])
+        ext_gtk=yes
+        ;;
+      all|ALL)
+        AC_DEFINE(USE_GTK_EXT, [1], [Build the FileIO extension])
+        ext_dejagnu=yes
+        ext_mysql=yes
+        ext_fileio=yes
+        ext_gtk=yes
+        ext_all=yes
+        ;;
+      *) AC_MSG_ERROR([invalid extension specified: ${withval} given (accept: 
MYSQL|DEJAGNU|FILEIO|GTK|ALL)])
+         ;;
+      esac]
+    withval=`echo ${withval} | cut -d ' ' -f 2-6`
+    if test x$val = x$withval; then
+      break;
+    fi
+  done
+)
+
+AM_CONDITIONAL(BUILD_DEJAGNU_EXT, [ test x$ext_dejagnu = xyes ])
+AM_CONDITIONAL(BUILD_FILEIO_EXT, [ test x$ext_fileio = xyes ])
+AM_CONDITIONAL(BUILD_MYSQL_EXT, [ test x$ext_mysql = xyes ])
+AM_CONDITIONAL(BUILD_GTK_EXT, [ test x$ext_gtk = xyes ])
+if test x$ext_mysql = xyes; then
+  GNASH_PATH_MYSQL
+fi
+
+dnl --------------------------------------------------------
 dnl Figure out development tool stuff
 dnl --------------------------------------------------------
 
@@ -348,8 +404,8 @@
 if test x$cross_compiling = xyes; then
   AC_MSG_NOTICE([Configuring Gnash for cross compilation])
   export pkgroot=`$CXX -print-search-dirs | grep "install:" | sed -e 
's/install: //' -e 's:/lib/gcc/.*::'`
-  export incllist="${pkgroot}/${host_alias}/include ${pkgroot}/include"
-  export libslist="${pkgroot}/${host_alias}/lib ${pkgroot}/lib64 
${pkgroot}/lib32 ${pkgroot}/lib"
+  export incllist="${with_top_level}/include ${pkgroot}/${host_alias}/include 
${pkgroot}/include"
+  export libslist="${with_top_level}/lib ${pkgroot}/${host_alias}/lib 
${pkgroot}/lib64 ${pkgroot}/lib32 ${pkgroot}/lib"
   export pathlist="${pkgroot}/${host_alias}/bin:${pkgroot}/bin"
   LDFLAGS="${LDFLAGS} -Wl,--as-needed"
   plugin=no
@@ -547,6 +603,7 @@
 AC_CHECK_FUNCS(strlcat, AC_DEFINE(HAVE_STRLCAT_PROTO, [1],[Define if you have 
the strlcat prototype]))
 dnl Look for Win32 networking stuff
 AC_CHECK_HEADERS(winsock.h)
+AC_CHECK_HEADERS(winsock2.h)
 AC_CHECK_HEADERS(sys/endian.h)
 AC_CHECK_HEADERS(machine/endian.h)
 AC_CHECK_HEADERS(endian.h)
@@ -573,15 +630,6 @@
 GNASH_PKG_FIND(jpeg, [jpeglib.h], [jpeg images], jpeg_mem_init)
 GNASH_PKG_INCLUDES([dejagnu], [dejagnu.h])
 
-dnl if we're not building the extensions, then the _FLAGS and _LIBS settings
-dnl found in these tests are blank. This way they can be used in
-dnl Makefiles, but won't add bloat to the Makefiles.
-if test x$extensions = xyes; then
-  GNASH_PATH_MYSQL
-  AC_DEFINE(USE_EXTENSIONS, [], [Defined if you enable building the 
exetensions])
-fi
-AM_CONDITIONAL(ENABLE_MYSQL, [ test x"$mysql" = xyes ])
-
 AC_PATH_MING
 AM_CONDITIONAL(ENABLE_MING, [ test x"$MAKESWF" != x ])
 AM_CONDITIONAL(MAKESWF_SUPPORTS_PREBUILT_CLIPS,
@@ -1041,11 +1089,11 @@
   echo "        GNOME help disabled (default). Use --enable-ghelp to enable."
 fi
 
-if test x"$extensions" = x"yes"; then
-  echo "        Building extensions enabled (default). Use 
--disable-extensions to disable."
-else
-  echo "        Building Gnash extensions disabled."
-fi
+dnl if test x"$extensions" = x"yes"; then
+dnl   echo "        Building extensions enabled (default). Use 
--disable-extensions to disable."
+dnl else
+dnl   echo "        Building Gnash extensions disabled."
+dnl fi
 
 if test x"$cygnal" = x"yes"; then
   echo "        Building Cygnal media server enabled (default). Use 
--disable-cygnal to disable."
@@ -1059,11 +1107,19 @@
   echo "        Building the Flash debugger is disabled."
 fi
 
+if test x"$with-top_level" != x; then
+  echo "        Top level for cross compiling support files is: 
$with_top_level"
+fi
+
 if test x"$gui" = xgtk -a x"$pixelformat" = xrgb565; then
   echo "        WARNING: Pixel format RGB565 selected in combination with the"
   echo "        GTK GUI. Only a hacked GTK will work (e.g. on the OLPC)."
 fi
 
+if test x"$extensions_list" != x; then
+  echo "        Building extensions: ${extensions_list}"
+fi
+
 echo "        Renderer engine: "$renderer
 echo "        GUI: "$gui
 echo "        Media handler: "$media_handler
@@ -1100,7 +1156,7 @@
   fi
 fi
 
-if test x$extensions = xyes; then
+if test x$ext_mysql = xyes; then
   if test x$mysql != xno; then
     if test x"$MYSQL_LIBS" != x; then
       echo "        MYSQL flags are: $MYSQC_CFLAGS"
@@ -1564,19 +1620,23 @@
  to play compressed SWF (most of them from version 6 up). "
 fi
 
-if test x$extensions = xyes; then
+if test x$ext_mysql = xyes; then
   if test x$mysql != xno; then
     if test x"$MYSQL_LIBS" != x; then
       echo "        MYSQL flags are: $MYSQC_CFLAGS"
       echo "        MYSQL libs are: $MYSQL_LIBS"
     else
       echo "        ERROR: No MySQL development package is installed."
-      echo "               Either reconfigure with --disable-extensions, or 
install"
+      echo "               Either reconfigure with --with-extensions=mysql, or 
install"
       echo "               libmysqlclient-dev (using apt-get) or 
something-else (using yum)"
     fi
   fi
 fi
 
+if test x$cross_compiling = xyes; then
+  AC_MSG_NOTICE([This build is setup for cross compiling])
+fi
+
 # If anything critical is missing, don't bother to continue
 if test x"$nogo" = x"true"; then
 echo ""

Index: Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/Makefile.am,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -b -r1.67 -r1.68
--- Makefile.am 6 Apr 2007 07:58:15 -0000       1.67
+++ Makefile.am 24 Apr 2007 17:52:47 -0000      1.68
@@ -15,7 +15,7 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 # 
 
-# $Id: Makefile.am,v 1.67 2007/04/06 07:58:15 jgilmore Exp $
+# $Id: Makefile.am,v 1.68 2007/04/24 17:52:47 rsavoye Exp $
 
 ## Process this file with automake to produce Makefile.in
 AUTOMAKE_OPTIONS = 1.6.0
@@ -53,9 +53,7 @@
 CYGNAL_DIRS = cygnal
 endif
 
-if EXTENSIONS
 EXTEND_DIRS = extensions
-endif
 
 SUBDIRS      = $(STD_DIRS) $(DOC_DIRS) $(PLUGIN_DIRS) $(EXTEND_DIRS) 
$(CYGNAL_DIRS)
 
@@ -205,7 +203,7 @@
        @echo " DMALLOC_CFLAGS is $(DMALLOC_CFLAGS)"
        @echo " DMALLOC_LIBS is $(DMALLOC_LIBS)"
 endif
-if EXTENSIONS
+if BUILD_MYSQL_EXT
        @echo "MYSQL_CFLAGS is $(MYSQL_CFLAGS)"
        @echo "MYSQL_LIBS is $(MYSQL_LIBS)"
 endif

Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.2984
retrieving revision 1.2985
diff -u -b -r1.2984 -r1.2985
--- ChangeLog   24 Apr 2007 12:26:30 -0000      1.2984
+++ ChangeLog   24 Apr 2007 17:52:47 -0000      1.2985
@@ -1,3 +1,15 @@
+2007-04-24  Rob Savoye  <address@hidden>
+
+       * configure.ac: Remove --enable-extension. Add --with-extensions=
+       that takes a comma delimited list of extension so you can seclect
+       with ones you want to build.
+       * Makefile.am: Always add the extensions directory.
+       * extensions/Makefile.am: Use new conditionals to select builds
+       directories.
+       * cygnal/cygnal.cpp: Include posix_time.hpp.
+       * extensions/fileio/fileio.cpp: Use intrusive pointers instead of
+       explicit pointers.
+
 2007-04-24 Udo Giacomozzi <address@hidden>
 
        * libgeometry/Range2d.h: added expandToCircle()

Index: extensions/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/extensions/Makefile.am,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- extensions/Makefile.am      27 Feb 2007 09:10:20 -0000      1.5
+++ extensions/Makefile.am      24 Apr 2007 17:52:47 -0000      1.6
@@ -18,9 +18,27 @@
 AUTOMAKE_OPTIONS = 
 
 # Don't try to build the MySQL extension unless MySQL is actually installed.
-if ENABLE_MYSQL
-MYSQL_DIR = mysql
+OTHER_DIRS =
+if BUILD_MYSQL_EXT
+OTHER_DIRS += mysql
 endif
 
-DISTSUBDIRS = dejagnu fileio mysql gtk2
-SUBDIRS = dejagnu fileio $(MYSQL_DIR)
+if BUILD_DEJAGNU_EXT
+OTHER_DIRS += dejagnu
+endif
+
+if BUILD_FILEIO_EXT
+OTHER_DIRS += fileio
+endif
+
+if USE_GUI_FLTK
+OTHER_DIRS += fltk2
+endif
+
+if BUILD_GTK_EXT
+if USE_GUI_GTK
+OTHER_DIRS += gtk2
+endif
+endif
+DIST_SUBDIRS = dejagnu fileio mysql gtk2
+SUBDIRS = $(OTHER_DIRS)

Index: extensions/fileio/fileio.cpp
===================================================================
RCS file: /sources/gnash/gnash/extensions/fileio/fileio.cpp,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- extensions/fileio/fileio.cpp        22 Mar 2007 22:37:45 -0000      1.10
+++ extensions/fileio/fileio.cpp        24 Apr 2007 17:52:47 -0000      1.11
@@ -317,7 +317,7 @@
 fileio_fopen(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio *)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     
     if (fn.nargs > 0) {
@@ -331,7 +331,7 @@
 fileio_fclose(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio *)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     
     return as_value(ptr->fclose());
@@ -341,7 +341,7 @@
 fileio_fread(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
                
                string str;
@@ -357,7 +357,7 @@
 fileio_fgetc(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     int i = ptr->fgetc();
     char *c = reinterpret_cast<char *>(&i);
@@ -368,7 +368,7 @@
 fileio_fgets(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     string str; 
     str = ptr->fgets(str);
@@ -379,7 +379,7 @@
 fileio_gets(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     char buf[BUFSIZE];
     memset(buf, 0, BUFSIZE);
@@ -392,7 +392,7 @@
 fileio_getchar(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     int i = ::getchar();
     char *c = reinterpret_cast<char *>(&i);
@@ -403,7 +403,7 @@
 fileio_fwrite(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     string str = fn.arg(0).to_string();
     return as_value(ptr->fputs(str));
@@ -413,7 +413,7 @@
 fileio_fputc(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     int c = (int) fn.arg(0).to_number();
     return as_value(ptr->fputc(c));
@@ -423,7 +423,7 @@
 fileio_fputs(const fn_call& fn)
 {
     //   GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     string str = fn.arg(0).to_string();
     return as_value(ptr->fputs(str));
@@ -442,7 +442,7 @@
 fileio_putchar(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     string x = fn.arg(0).to_string();
     return as_value(::putchar(x[0]));
@@ -452,7 +452,7 @@
 fileio_fflush(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     return as_value(ptr->fflush());
 }
@@ -461,7 +461,7 @@
 fileio_fseek(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);    
     long c = (long) fn.arg(0).to_number();
     return as_value(ptr->fseek(c));
@@ -471,7 +471,7 @@
 fileio_ftell(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     int i = ptr->ftell();
     return as_value(i);
@@ -481,7 +481,7 @@
 fileio_unlink(const fn_call& fn)
 {
 //    GNASH_REPORT_FUNCTION;
-    Fileio *ptr = (Fileio*)fn.this_ptr;
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
     assert(ptr);
     string str = fn.arg(0).to_string();
     return as_value(ptr->unlink(str));
@@ -494,11 +494,13 @@
 
                // TODO: Check optional second parameter and sort array if it's 
true
                // or missing.
+    boost::intrusive_ptr<Fileio> ptr = ensureType<Fileio>(fn.this_ptr);
 
-    Fileio *ptr = (Fileio*)fn.this_ptr;
     assert(ptr);    
     string str = fn.arg(0).to_string();
-    ptr->scandir(str, fn.result);
+    as_value val;
+    ptr->scandir(str, &val);
+    return val;
 }
 
 std::auto_ptr<as_object>

Index: cygnal/cygnal.cpp
===================================================================
RCS file: /sources/gnash/gnash/cygnal/cygnal.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- cygnal/cygnal.cpp   8 Apr 2007 23:06:16 -0000       1.8
+++ cygnal/cygnal.cpp   24 Apr 2007 17:52:47 -0000      1.9
@@ -15,7 +15,7 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 // 
 
-/* $Id: cygnal.cpp,v 1.8 2007/04/08 23:06:16 rsavoye Exp $ */
+/* $Id: cygnal.cpp,v 1.9 2007/04/24 17:52:47 rsavoye Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -57,6 +57,8 @@
 #include <locale.h>
 #endif
 
+#include <boost/date_time/posix_time/posix_time.hpp>
+
 #include <boost/thread/thread.hpp>
 #include <boost/bind.hpp>
 




reply via email to

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