Skip to content

Commit

Permalink
Allow building extensions out of tree by installing the needed headers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomeu Vizoso committed Apr 28, 2009
1 parent 5a1b049 commit d621fe0
Show file tree
Hide file tree
Showing 8 changed files with 71 additions and 44 deletions.
5 changes: 5 additions & 0 deletions Makefile.am
Expand Up @@ -471,3 +471,8 @@ install-plugins install-plugin uninstall-plugins install-pkglib:
apidoc: apidoc:
$(MAKE) -C doc $@ $(MAKE) -C doc $@


pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = \
gnash.pc \
$(NULL)

5 changes: 2 additions & 3 deletions configure.ac
Expand Up @@ -824,9 +824,6 @@ AC_ARG_ENABLE(extensions,
break; break;
fi fi
done done
if test "${nextensions}" -gt 0; then
AC_DEFINE(USE_EXTENSIONS, [1], [Use extensions])
fi
EXTENSIONS_LIST="$extensions_list" EXTENSIONS_LIST="$extensions_list"
AC_SUBST(EXTENSIONS_LIST) AC_SUBST(EXTENSIONS_LIST)
) )
Expand Down Expand Up @@ -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:testsuite/libbase/gnashrc.in)
AC_CONFIG_LINKS(testsuite/libbase/gnashrc-local:testsuite/libbase/gnashrc-local.in) AC_CONFIG_LINKS(testsuite/libbase/gnashrc-local:testsuite/libbase/gnashrc-local.in)


AC_CONFIG_FILES(gnash.pc:gnash.pc.in)

AC_OUTPUT(Makefile AC_OUTPUT(Makefile
po/Makefile po/Makefile
libmedia/Makefile libmedia/Makefile
Expand Down
11 changes: 11 additions & 0 deletions gnash.pc.in
@@ -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}

29 changes: 19 additions & 10 deletions libbase/Makefile.am
Expand Up @@ -137,23 +137,15 @@ noinst_HEADERS = \
SimpleBuffer.h \ SimpleBuffer.h \
extension.h \ extension.h \
GnashNumeric.h \ GnashNumeric.h \
GnashException.h \
gettext.h \
jemtree.h \ jemtree.h \
GnashImage.h \ GnashImage.h \
GnashImageJpeg.h \ GnashImageJpeg.h \
GnashSleep.h \ GnashSleep.h \
gmemory.h \ gmemory.h \
log.h \
ogl.h \ ogl.h \
rc.h \
ref_counted.h \
shm.h \ shm.h \
smart_ptr.h \
sharedlib.h \ sharedlib.h \
string_table.h \
tree.hh \ tree.hh \
dsodefs.h \
tu_file.h \ tu_file.h \
IOChannel.h \ IOChannel.h \
tu_opengl_includes.h \ tu_opengl_includes.h \
Expand All @@ -165,13 +157,11 @@ noinst_HEADERS = \
ClockTime.h \ ClockTime.h \
WallClockTimer.h \ WallClockTimer.h \
utf8.h \ utf8.h \
utility.h \
NetworkAdapter.h \ NetworkAdapter.h \
noseek_fd_adapter.h \ noseek_fd_adapter.h \
zlib_adapter.h \ zlib_adapter.h \
URL.h \ URL.h \
LoadThread.h \ LoadThread.h \
GC.h \
BitsReader.h \ BitsReader.h \
arg_parser.h \ arg_parser.h \
getclocktime.hpp \ getclocktime.hpp \
Expand All @@ -188,6 +178,25 @@ if USE_GIF
noinst_HEADERS += GnashImageGif.h noinst_HEADERS += GnashImageGif.h
endif 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) libgnashbase_la_LDFLAGS = -release $(VERSION)


Expand Down
32 changes: 21 additions & 11 deletions libcore/Makefile.am
Expand Up @@ -125,28 +125,18 @@ libgnashcore_la_SOURCES = \
$(NULL) $(NULL)


noinst_HEADERS = \ noinst_HEADERS = \
Property.h \
PropertyList.h \
StreamProvider.h \ StreamProvider.h \
StringPredicates.h \
URLAccessManager.h \ URLAccessManager.h \
VirtualClock.h \ VirtualClock.h \
SystemClock.h \ SystemClock.h \
ManualClock.h \ ManualClock.h \
RunInfo.h \ RunInfo.h \
as_environment.h \
as_function.h \
as_object.h \
as_prop_flags.h \
as_value.h \
asClass.h \ asClass.h \
Bitmap.h \ Bitmap.h \
BitmapInfo.h \ BitmapInfo.h \
BitmapMovie.h \ BitmapMovie.h \
builtin_function.h \
Button.h \ Button.h \
DisplayObject.h \ DisplayObject.h \
CharacterProxy.h \
cxform.h \ cxform.h \
debugger.h \ debugger.h \
DynamicShape.h \ DynamicShape.h \
Expand Down Expand Up @@ -180,7 +170,6 @@ noinst_HEADERS = \
SWFMovie.h \ SWFMovie.h \
Movie.h \ Movie.h \
movie_root.h \ movie_root.h \
namedStrings.h \
rect.h \ rect.h \
render.h \ render.h \
ExportableResource.h \ ExportableResource.h \
Expand Down Expand Up @@ -225,6 +214,27 @@ noinst_HEADERS = \
Video.h \ Video.h \
$(NULL) $(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 = \ libgnashcore_la_LIBADD = \
$(top_builddir)/libbase/libgnashbase.la \ $(top_builddir)/libbase/libgnashbase.la \
$(top_builddir)/libamf/libgnashamf.la \ $(top_builddir)/libamf/libgnashamf.la \
Expand Down
12 changes: 0 additions & 12 deletions libcore/asobj/Global.cpp
Expand Up @@ -148,12 +148,7 @@ Global::Global(VM& vm, ClassHierarchy *ch)
init_member("clearTimeout", new builtin_function(global_clearInterval)); init_member("clearTimeout", new builtin_function(global_clearInterval));


ch->setGlobal(this); ch->setGlobal(this);

// If extensions aren't used, then no extensions will be loaded.
#ifdef USE_EXTENSIONS
ch->setExtension(&_et); ch->setExtension(&_et);
#endif

ch->massDeclare(); ch->massDeclare();


object_class_init(*this); object_class_init(*this);
Expand Down Expand Up @@ -209,14 +204,9 @@ Global::Global(VM& vm, ClassHierarchy *ch)
break; break;
} }


#ifdef USE_EXTENSIONS
loadExtensions(); loadExtensions();
#endif

} }


#ifdef USE_EXTENSIONS

//----------------------- //-----------------------
// Extensions // Extensions
//----------------------- //-----------------------
Expand All @@ -240,8 +230,6 @@ Global::loadExtensions()


} }


#endif



namespace { namespace {


Expand Down
7 changes: 1 addition & 6 deletions libcore/asobj/Global.h
Expand Up @@ -22,10 +22,7 @@
#define GNASH_GLOBAL_H #define GNASH_GLOBAL_H


#include "as_object.h" // for inheritance #include "as_object.h" // for inheritance

#include "extension.h" // for composition
#ifdef USE_EXTENSIONS
# include "extension.h" // for composition
#endif


// Forward declarations // Forward declarations
namespace gnash { namespace gnash {
Expand All @@ -45,10 +42,8 @@ class Global: public as_object


private: private:


#ifdef USE_EXTENSIONS
void loadExtensions(); void loadExtensions();
Extension _et; Extension _et;
#endif


}; };


Expand Down
14 changes: 12 additions & 2 deletions libcore/vm/Makefile.am
Expand Up @@ -50,18 +50,28 @@ libgnashvm_la_SOURCES = \
noinst_HEADERS = \ noinst_HEADERS = \
ASHandlers.h \ ASHandlers.h \
CodeStream.h \ CodeStream.h \
SafeStack.h \
Machine.h \ Machine.h \
asName.h \ asName.h \
ActionExec.h \ ActionExec.h \
ExecutableCode.h \ ExecutableCode.h \
VM.h \ VM.h \
action.h \ action.h \
with_stack_entry.h \
$(NULL)

EXTENSIONS_API = \
fn_call.h \ fn_call.h \
CallStack.h \ CallStack.h \
with_stack_entry.h \ SafeStack.h \
$(NULL) $(NULL)


if SDKINSTALL
noinst_HEADERS += $(EXTENSIONS_API)
else
instdir = $(includedir)/gnash
inst_HEADERS = $(EXTENSIONS_API)
endif

libgnashvm_la_LIBADD = \ libgnashvm_la_LIBADD = \
$(top_builddir)/libbase/libgnashbase.la $(top_builddir)/libbase/libgnashbase.la


Expand Down

0 comments on commit d621fe0

Please sign in to comment.