- Oh, well. I wasn't so good ;-) This fixes compilation. Now xmlsave is ready to be
implemented. Enjoy it, while it lasts. :-D git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@629 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
4f9a12003a
commit
94c0b563c7
12
configure.ac
12
configure.ac
|
@ -152,16 +152,12 @@ AC_CONFIG_HEADERS([config.h:config.h.in])
|
||||||
|
|
||||||
dnl configure plugin directories
|
dnl configure plugin directories
|
||||||
dnl TODO: make this conditional
|
dnl TODO: make this conditional
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([plugins/pyloader/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
|
||||||
plugins/pyloader/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in
|
AC_CONFIG_FILES([plugins/xmlsave/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in])
|
||||||
plugins/xmlsave/config/sgpemv2-uninstalled.pc:config/sgpemv2-uninstalled.pc.in
|
|
||||||
])
|
|
||||||
AC_CONFIG_SUBDIRS([
|
|
||||||
plugins/pyloader
|
|
||||||
plugins/xmlsave
|
|
||||||
])
|
|
||||||
|
|
||||||
|
AC_CONFIG_SUBDIRS([plugins/pyloader plugins/xmlsave])
|
||||||
|
|
||||||
|
# Now, output this very package Makefiles:
|
||||||
AC_CONFIG_FILES([
|
AC_CONFIG_FILES([
|
||||||
Makefile
|
Makefile
|
||||||
po/Makefile.in
|
po/Makefile.in
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
// src/backend/pyloader/hook.cc - Copyright 2005, 2006, University
|
// src/hook.cc - Copyright 2005, 2006, University
|
||||||
// of Padova, dept. of Pure and Applied
|
// of Padova, dept. of Pure and Applied
|
||||||
// Mathematics
|
// Mathematics
|
||||||
//
|
//
|
||||||
|
@ -30,6 +30,8 @@
|
||||||
|
|
||||||
#include "python_policy_manager.hh"
|
#include "python_policy_manager.hh"
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -60,32 +60,32 @@ EXTRA_DIST += \
|
||||||
|
|
||||||
# ############################################################
|
# ############################################################
|
||||||
#
|
#
|
||||||
# source : libpyloader.la
|
# source : libxmlsave.la
|
||||||
#
|
#
|
||||||
# ############################################################
|
# ############################################################
|
||||||
|
|
||||||
plugin_LTLIBRARIES += libxmlsave.la
|
plugin_LTLIBRARIES += libxmlsave.la
|
||||||
|
|
||||||
libpyloader_la_CPPFLAGS = \
|
libxmlsave_la_CPPFLAGS = \
|
||||||
-I@top_srcdir@ \
|
-I@top_srcdir@ \
|
||||||
-DSHAREDIR="\"$(sharedir)\"" \
|
-DSHAREDIR="\"$(sharedir)\"" \
|
||||||
-DLOCALEDIR="\"$(localedir)\"" \
|
-DLOCALEDIR="\"$(localedir)\"" \
|
||||||
$(LIBXML2_CFLAGS) \
|
$(LIBXML2_CFLAGS) \
|
||||||
$(GLIBMM_CFLAGS) \
|
$(GLIBMM_CFLAGS) \
|
||||||
$(SGPEMV2_CFLAGS)
|
$(SGPEMV2_CFLAGS)
|
||||||
libpyloader_la_CXXFLAGS = \
|
libxmlsave_la_CXXFLAGS = \
|
||||||
$(VISIB_HIDDEN)
|
$(VISIB_HIDDEN)
|
||||||
libpyloader_la_LIBADD = \
|
libxmlsave_la_LIBADD = \
|
||||||
$(LIBXML2_LIBS) \
|
$(LIBXML2_LIBS) \
|
||||||
$(GLIBMM_LIBS) \
|
$(GLIBMM_LIBS) \
|
||||||
$(SGPEMV2_LIBS)
|
$(SGPEMV2_LIBS)
|
||||||
libpyloader_la_LDFLAGS = \
|
libxmlsave_la_LDFLAGS = \
|
||||||
$(LT_LDFLAGS) \
|
$(LT_LDFLAGS) \
|
||||||
-version-info 0:0:0 \
|
-version-info 0:0:0 \
|
||||||
-module
|
-module
|
||||||
|
|
||||||
# Please keep this in sorted order:
|
# Please keep this in sorted order:
|
||||||
libpyloader_la_SOURCES = \
|
libxmlsave_la_SOURCES = \
|
||||||
src/hook.cc
|
src/hook.cc
|
||||||
|
|
||||||
noinst_HEADERS +=
|
noinst_HEADERS +=
|
||||||
|
@ -103,25 +103,25 @@ if COND_TESTS
|
||||||
#noinst_PROGRAMS = \
|
#noinst_PROGRAMS = \
|
||||||
# src/testsuite/test-xmlsave
|
# src/testsuite/test-xmlsave
|
||||||
|
|
||||||
src_testsuite_test_xmlsave_CPPFLAGS = \
|
#src_testsuite_test_xml_save_CPPFLAGS = \
|
||||||
-I@top_srcdir@ \
|
# -I@top_srcdir@ \
|
||||||
-DSHAREDIR="\"$(sharedir)\"" \
|
# -DSHAREDIR="\"$(sharedir)\"" \
|
||||||
$(LIBXML2_CFLAGS) \
|
# $(LIBXML2_CFLAGS) \
|
||||||
$(GLIBMM_CFLAGS) \
|
# $(GLIBMM_CFLAGS) \
|
||||||
$(SGPEMV2_CFLAGS)
|
# $(SGPEMV2_CFLAGS)
|
||||||
src_testsuite_test_xmlsave_DEPENDENCIES = \
|
#src_testsuite_test_xml_save_DEPENDENCIES = \
|
||||||
libxmlsave.la
|
# libxmlsave.la
|
||||||
src_testsuite_test_xmlsave_LDFLAGS = \
|
#src_testsuite_test_xml_save_LDFLAGS = \
|
||||||
$(SGPEMV2_LIBS) \
|
# $(SGPEMV2_LIBS) \
|
||||||
$(GLIBMM_LIBS) \
|
# $(GLIBMM_LIBS) \
|
||||||
$(LIBXML2_LIBS)
|
# $(LIBXML2_LIBS)
|
||||||
src_testsuite_test_xmlsave_SOURCES = \
|
#src_testsuite_test_xml_save_SOURCES = \
|
||||||
src/testsuite/test-xml_save.cc
|
# src/testsuite/test-xml_save.cc
|
||||||
|
|
||||||
# Workaround an automake bug that leaves behind some files
|
# Workaround an automake bug that leaves behind some files
|
||||||
# while it's finishing the distcheck target
|
# while it's finishing the distcheck target
|
||||||
CLEANFILES += \
|
#CLEANFILES += \
|
||||||
src/testsuite/.libs/test-xml_save
|
# src/testsuite/.libs/test-xml_save
|
||||||
|
|
||||||
endif #~ if COND_TESTS
|
endif #~ if COND_TESTS
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
// src/hook.cc - Copyright 2005, 2006, University
|
||||||
|
// of Padova, dept. of Pure and Applied
|
||||||
|
// Mathematics
|
||||||
|
//
|
||||||
|
// This file is part of SGPEMv2.
|
||||||
|
//
|
||||||
|
// This 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 2 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// SGPEMv2 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 SGPEMv2; if not, write to the Free Software
|
||||||
|
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
// The idea of this file is to provide a static function to execute
|
||||||
|
// when the plugin (this library) is loaded. Thus the name "hook".
|
||||||
|
|
||||||
|
// For the moment, instead of a function hook to be called by the
|
||||||
|
// libbackend.so module, we have a static PythonPolicyManager object.
|
||||||
|
// This is a risk.
|
||||||
|
#warning FIXME : this code is quite a bad idea. Replace me with \
|
||||||
|
a hookable structure, and execute a pointer to function stored \
|
||||||
|
therein. See "info libtool": "dlopened modules"
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
|
#define SG_CONSTRUCTOR __attribute__ ((constructor))
|
||||||
|
#define SG_DESTRUCTOR __attribute__ ((destructor))
|
||||||
|
|
||||||
|
void SG_DLLEXPORT SG_CONSTRUCTOR hook_ctor(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SG_DLLEXPORT SG_DESTRUCTOR hook_dtor(void)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
Loading…
Reference in New Issue