Permalink
Browse files

Allow building extensions out of tree by installing the needed headers.

  • Loading branch information...
1 parent 5a1b049 commit d621fe0171df48684e1b9cb81d4510c1284e5aa2 Tomeu Vizoso committed Apr 28, 2009
Showing with 71 additions and 44 deletions.
  1. +5 −0 Makefile.am
  2. +2 −3 configure.ac
  3. +11 −0 gnash.pc.in
  4. +19 −10 libbase/Makefile.am
  5. +21 −11 libcore/Makefile.am
  6. +0 −12 libcore/asobj/Global.cpp
  7. +1 −6 libcore/asobj/Global.h
  8. +12 −2 libcore/vm/Makefile.am
View
@@ -471,3 +471,8 @@ install-plugins install-plugin uninstall-plugins install-pkglib:
apidoc:
$(MAKE) -C doc $@
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = \
+ gnash.pc \
+ $(NULL)
+
View
@@ -824,9 +824,6 @@ AC_ARG_ENABLE(extensions,
break;
fi
done
- if test "${nextensions}" -gt 0; then
- AC_DEFINE(USE_EXTENSIONS, [1], [Use extensions])
- fi
EXTENSIONS_LIST="$extensions_list"
AC_SUBST(EXTENSIONS_LIST)
)
@@ -2210,6 +2207,8 @@ AC_CONFIG_LINKS(cygnal/testsuite/cygnal.all/cygnalrc:cygnal/testsuite/cygnal.all
AC_CONFIG_LINKS(testsuite/libbase/gnashrc:testsuite/libbase/gnashrc.in)
AC_CONFIG_LINKS(testsuite/libbase/gnashrc-local:testsuite/libbase/gnashrc-local.in)
+AC_CONFIG_FILES(gnash.pc:gnash.pc.in)
+
AC_OUTPUT(Makefile
po/Makefile
libmedia/Makefile
View
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@/gnash
+includedir=@includedir@/gnash/
+
+Name: Gnash
+Description: Flash (shockwave) player
+Version: @VERSION@
+Libs: -L${libdir} -lgnashcore
+Cflags: -I${includedir}
+
View
@@ -137,23 +137,15 @@ noinst_HEADERS = \
SimpleBuffer.h \
extension.h \
GnashNumeric.h \
- GnashException.h \
- gettext.h \
jemtree.h \
GnashImage.h \
GnashImageJpeg.h \
GnashSleep.h \
gmemory.h \
- log.h \
ogl.h \
- rc.h \
- ref_counted.h \
shm.h \
- smart_ptr.h \
sharedlib.h \
- string_table.h \
tree.hh \
- dsodefs.h \
tu_file.h \
IOChannel.h \
tu_opengl_includes.h \
@@ -165,13 +157,11 @@ noinst_HEADERS = \
ClockTime.h \
WallClockTimer.h \
utf8.h \
- utility.h \
NetworkAdapter.h \
noseek_fd_adapter.h \
zlib_adapter.h \
URL.h \
LoadThread.h \
- GC.h \
BitsReader.h \
arg_parser.h \
getclocktime.hpp \
@@ -188,6 +178,25 @@ if USE_GIF
noinst_HEADERS += GnashImageGif.h
endif
+EXTENSIONS_API = \
+ smart_ptr.h \
+ string_table.h \
+ ref_counted.h \
+ GC.h \
+ GnashException.h \
+ dsodefs.h \
+ utility.h \
+ log.h \
+ rc.h \
+ gettext.h \
+ $(NULL)
+
+if SDKINSTALL
+noinst_HEADERS += $(EXTENSIONS_API)
+else
+instdir = $(includedir)/gnash
+inst_HEADERS = $(EXTENSIONS_API)
+endif
libgnashbase_la_LDFLAGS = -release $(VERSION)
View
@@ -125,28 +125,18 @@ libgnashcore_la_SOURCES = \
$(NULL)
noinst_HEADERS = \
- Property.h \
- PropertyList.h \
StreamProvider.h \
- StringPredicates.h \
URLAccessManager.h \
VirtualClock.h \
SystemClock.h \
ManualClock.h \
RunInfo.h \
- as_environment.h \
- as_function.h \
- as_object.h \
- as_prop_flags.h \
- as_value.h \
asClass.h \
Bitmap.h \
BitmapInfo.h \
BitmapMovie.h \
- builtin_function.h \
Button.h \
DisplayObject.h \
- CharacterProxy.h \
cxform.h \
debugger.h \
DynamicShape.h \
@@ -180,7 +170,6 @@ noinst_HEADERS = \
SWFMovie.h \
Movie.h \
movie_root.h \
- namedStrings.h \
rect.h \
render.h \
ExportableResource.h \
@@ -225,6 +214,27 @@ noinst_HEADERS = \
Video.h \
$(NULL)
+EXTENSIONS_API = \
+ as_object.h \
+ Property.h \
+ PropertyList.h \
+ as_value.h \
+ as_prop_flags.h \
+ CharacterProxy.h \
+ StringPredicates.h \
+ builtin_function.h \
+ as_function.h \
+ namedStrings.h \
+ as_environment.h \
+ $(NULL)
+
+if SDKINSTALL
+noinst_HEADERS += $(EXTENSIONS_API)
+else
+instdir = $(includedir)/gnash
+inst_HEADERS = $(EXTENSIONS_API)
+endif
+
libgnashcore_la_LIBADD = \
$(top_builddir)/libbase/libgnashbase.la \
$(top_builddir)/libamf/libgnashamf.la \
View
@@ -148,12 +148,7 @@ Global::Global(VM& vm, ClassHierarchy *ch)
init_member("clearTimeout", new builtin_function(global_clearInterval));
ch->setGlobal(this);
-
-// If extensions aren't used, then no extensions will be loaded.
-#ifdef USE_EXTENSIONS
ch->setExtension(&_et);
-#endif
-
ch->massDeclare();
object_class_init(*this);
@@ -209,14 +204,9 @@ Global::Global(VM& vm, ClassHierarchy *ch)
break;
}
-#ifdef USE_EXTENSIONS
loadExtensions();
-#endif
-
}
-#ifdef USE_EXTENSIONS
-
//-----------------------
// Extensions
//-----------------------
@@ -240,8 +230,6 @@ Global::loadExtensions()
}
-#endif
-
namespace {
View
@@ -22,10 +22,7 @@
#define GNASH_GLOBAL_H
#include "as_object.h" // for inheritance
-
-#ifdef USE_EXTENSIONS
-# include "extension.h" // for composition
-#endif
+#include "extension.h" // for composition
// Forward declarations
namespace gnash {
@@ -45,10 +42,8 @@ class Global: public as_object
private:
-#ifdef USE_EXTENSIONS
void loadExtensions();
Extension _et;
-#endif
};
View
@@ -50,18 +50,28 @@ libgnashvm_la_SOURCES = \
noinst_HEADERS = \
ASHandlers.h \
CodeStream.h \
- SafeStack.h \
Machine.h \
asName.h \
ActionExec.h \
ExecutableCode.h \
VM.h \
action.h \
+ with_stack_entry.h \
+ $(NULL)
+
+EXTENSIONS_API = \
fn_call.h \
CallStack.h \
- with_stack_entry.h \
+ SafeStack.h \
$(NULL)
+if SDKINSTALL
+noinst_HEADERS += $(EXTENSIONS_API)
+else
+instdir = $(includedir)/gnash
+inst_HEADERS = $(EXTENSIONS_API)
+endif
+
libgnashvm_la_LIBADD = \
$(top_builddir)/libbase/libgnashbase.la

0 comments on commit d621fe0

Please sign in to comment.