gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, npapi, updated. release_0_8_9_start-1


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, npapi, updated. release_0_8_9_start-163-gec337c0
Date: Sat, 05 Mar 2011 08:30:47 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, npapi has been updated
       via  ec337c05cb2efd2b6fd07f5827c45099f83d8f71 (commit)
      from  bba1c13c14b891277e0e4309ebfa528ec2088ce8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=ec337c05cb2efd2b6fd07f5827c45099f83d8f71


commit ec337c05cb2efd2b6fd07f5827c45099f83d8f71
Author: Hicham HAOUARI <address@hidden>
Date:   Fri Mar 4 12:34:16 2011 +0000

    Create GNASH_PATH_NPAPI and use it

diff --git a/configure.ac b/configure.ac
index 1167947..191da0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1948,7 +1948,7 @@ AC_ARG_ENABLE(npapi,
 )
 
 if test x"$npapi" = x"yes"; then
-  
PKG_CHECK_MODULES([MOZPLUGIN],[mozilla-plugin],[have_mozplugin=yes],[have_mozplugin=no])
+  GNASH_PATH_NPAPI
 fi
 
 dnl -----------------------------------------------------------------
@@ -3861,8 +3861,8 @@ if test x"$ac_cv_gcc_visibility" != xyes; then
 fi
 
 if test x"$npapi" = xyes; then
-  if test x"$have_mozplugin" = xyes; then
-    echo "        MOZILLA PLUGIN flags are: $MOZPLUGIN_CFLAGS"
+  if test x"$has_npapi" = xyes; then
+    echo "        NPAPI flags are: $NPAPI_CFLAGS"
   else
     echo "        ERROR : No xulrunner development package is installed" >&3
     echo "                Install it from 
http://releases.mozilla.org/pub/mozilla.org/xulrunner"; >&3
diff --git a/macros/npapi.m4 b/macros/npapi.m4
new file mode 100644
index 0000000..c2c0824
--- /dev/null
+++ b/macros/npapi.m4
@@ -0,0 +1,80 @@
+dnl  
+dnl    Copyright (C) 2005, 2006, 2009, 2010, 2011 Free Software Foundation, 
Inc.
+dnl  
+dnl  This program is free software; you can redistribute it and/or modify
+dnl  it under the terms of the GNU General Public License as published by
+dnl  the Free Software Foundation; either version 3 of the License, or
+dnl  (at your option) any later version.
+dnl  
+dnl  This program is distributed in the hope that it will be useful,
+dnl  but WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+dnl  GNU General Public License for more details.
+dnl  You should have received a copy of the GNU General Public License
+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
+
+
+
+AC_DEFUN([GNASH_PATH_NPAPI],
+[
+
+  dnl Look for npapi.h
+  AC_ARG_WITH(npapi_incl, AC_HELP_STRING([--with-npapi-incl], [directory where 
npapi headers are]), with_npapi_incl=${withval})
+    AC_CACHE_VAL(ac_cv_path_npapi_incl,[
+    if test x"${with_npapi_incl}" != x ; then
+      if test -f ${with_npapi_incl}/npapi.h; then
+       ac_cv_path_npapi_incl="-I`(cd ${with_npapi_incl}; pwd)`"
+      else
+       AC_MSG_ERROR([${with_npapi_incl} directory doesn't contain npapi.h])
+      fi
+    fi
+  ])
+
+
+  if test x$cross_compiling = xno; then
+    if test x"$PKG_CONFIG" != x -a x"${ac_cv_path_npapi_incl}" = x; then
+      $PKG_CONFIG --exists mozilla-plugin && 
ac_cv_path_npapi_incl="`$PKG_CONFIG --cflags mozilla-plugin`"
+    fi
+  fi
+
+  dnl Attempt to find the top level directory, which unfortunately has a
+  dnl version number attached. At least on Debain based systems, this
+  dnl doesn't seem to get a directory that is unversioned.
+
+  AC_MSG_CHECKING([for npapi.h])
+  if test x"${ac_cv_path_npapi_incl}" = x; then
+    gnash_npapi_topdir=""
+    for i in $incllist; do
+      for j in `ls -dr $i/xulrunner-* 2>/dev/null`; do
+        if test -f $j/npapi.h; then
+          gnash_npapi_topdir="`basename $j`"
+         ac_cv_path_npapi_incl="-I$i/${gnash_npapi_topdir}"
+          break 2
+        fi
+      done
+    done
+  fi
+  if test x"${ac_cv_path_npapi_incl}" = x; then
+    AC_MSG_RESULT([not found])
+    has_npapi=no
+    NPAPI_CFLAGS=""
+  else
+    AC_MSG_RESULT($ac_cv_path_npapi_incl)
+    has_npapi=yes
+    NPAPI_CFLAGS="${ac_cv_path_npapi_incl}"
+    if test x"`echo $NPAPI_CFLAGS | grep "\-DXP_UNIX"`" != x"-DXP_UNIX";then
+      if test x"$linux" = x"yes" -o x"$bsd" = x"yes" -o x"$solaris" = 
x"yes";then
+        NPAPI_CFLAGS="$NPAPI_CFLAGS -DXP_UNIX"
+      fi
+    fi
+  fi
+
+  AC_SUBST(NPAPI_CFLAGS)
+])
+
+# Local Variables:
+# c-basic-offset: 2
+# tab-width: 2
+# indent-tabs-mode: nil
+# End:
diff --git a/plugin/npapi/Makefile.am b/plugin/npapi/Makefile.am
index 891be3f..d93c873 100644
--- a/plugin/npapi/Makefile.am
+++ b/plugin/npapi/Makefile.am
@@ -44,7 +44,7 @@ AM_CPPFLAGS = -DPLUGIN_TRACE -DGNASHBINDIR=\"$(GNASHBINDIR)\" 
\
         -I$(top_srcdir)/libbase \
         -I$(top_srcdir)/librender \
        -I$(srcdir)/mozilla-sdk \
-       $(MOZPLUGIN_CFLAGS) \
+       $(NPAPI_CFLAGS) \
        $(X11_CFLAGS) \
         $(GLIB_CFLAGS) \
        $(NULL)

-----------------------------------------------------------------------

Summary of changes:
 configure.ac             |    6 ++--
 macros/npapi.m4          |   80 ++++++++++++++++++++++++++++++++++++++++++++++
 plugin/npapi/Makefile.am |    2 +-
 3 files changed, 84 insertions(+), 4 deletions(-)
 create mode 100644 macros/npapi.m4


hooks/post-receive
-- 
Gnash



reply via email to

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