Commit b65f5041 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Fix some boneheadedly simple errors with plugins and begin to adopt a standard

convention to avoid such sillyness in the future.

1999-12-27  Jody Goldberg <jgoldberg@home.com>

	* configure.in : Re-enable the python plugin by default.

	* src/plugin.c (load_all_plugins) : Search in a version specific
	  directory.

	* plugins/*/Makefile.am : Install in
	      <prefix>/lib/gnumeric/plugins/${VERSION}
	  to decrease the number of silly version problems.
	  Adjust the plugin names to follow the convention
	      libgnum_<name>.so
	  to avoid problems like the python plugin 'libpython.so'
	  depending on the python libraries with the same name.
parent 3aa7a628
1999-12-27 Jody Goldberg <jgoldberg@home.com>
* configure.in : Re-enable the python plugin by default.
* src/plugin.c (load_all_plugins) : Search in a version specific
directory.
* plugins/*/Makefile.am : Install in
<prefix>/lib/gnumeric/plugins/${VERSION}
to decrease the number of silly version problems.
Adjust the plugin names to follow the convention
libgnum_<name>.so
to avoid problems like the python plugin 'libpython.so'
depending on the python libraries with the same name.
* src/cell.c (cell_get_formatted_val) : Make public.
1999-12-23 JP Rosevear <jpr@arcavia.com>
......
1999-12-27 Jody Goldberg <jgoldberg@home.com>
* configure.in : Re-enable the python plugin by default.
* src/plugin.c (load_all_plugins) : Search in a version specific
directory.
* plugins/*/Makefile.am : Install in
<prefix>/lib/gnumeric/plugins/${VERSION}
to decrease the number of silly version problems.
Adjust the plugin names to follow the convention
libgnum_<name>.so
to avoid problems like the python plugin 'libpython.so'
depending on the python libraries with the same name.
* src/cell.c (cell_get_formatted_val) : Make public.
1999-12-23 JP Rosevear <jpr@arcavia.com>
......
......@@ -103,10 +103,7 @@ AM_CONDITIONAL(WITH_PERL, $perl_val)
dnl **************************************************
dnl * Check for Python
dnl **************************************************
dnl
dnl Someone need to find out why PyExc_TypeError is undefined when we dl the
dnl plugin. Until then, no Python support.
AC_CHECK_PROG(python_val, DISABLED_python_DISABLED, true, false)
AC_CHECK_PROG(python_val, python, true, false)
if $python_val; then
PY_PREFIX=`python -c 'import sys ; print sys.prefix'`
PY_EXEC_PREFIX=`python -c 'import sys ; print sys.exec_prefix'`
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libdif.la
plugin_LTLIBRARIES = libgnum_dif.la
libdif_la_SOURCES = dif.h dif.c
libgnum_dif_la_SOURCES = dif.h dif.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libcsv.la
plugin_LTLIBRARIES = libgnum_csv.la
libcsv_la_SOURCES = csv-io.h csv-io.c
libgnum_csv_la_SOURCES = csv-io.h csv-io.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -7,12 +7,12 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
hack=$(shell gnome-config --includedir)
plugin_LTLIBRARIES = libgdaif.la
plugin_LTLIBRARIES = libgnum_gdaif.la
libgdaif_la_SOURCES = plugin-gda.c
libgnum_gdaif_la_SOURCES = plugin-gda.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......@@ -21,4 +21,4 @@ INCLUDES = \
$(GNOME_INCLUDEDIR) \
-I$(hack)/gda
libgdaif_la_LIBADD = -L$(hack)/lib -lgda-client $(GNORBA_LIBS)
libgnum_gdaif_la_LIBADD = -L$(hack)/lib -lgda-client $(GNORBA_LIBS)
......@@ -10,9 +10,9 @@ GNUMERIC_SRC_DIR = $(srcdir)/../../src
#
plugindir = $(libdir)/gnumeric/plugins
plugin_LTLIBRARIES = libgnumguile.la
plugin_LTLIBRARIES = libgnum_guile.la
libgnumguile_la_SOURCES = plugin.c
libgnum_guile_la_SOURCES = plugin.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......@@ -22,7 +22,7 @@ INCLUDES = \
$(GNOME_INCLUDEDIR)
#libguile_la_LDFLAGS = $(PYTHON_LIB_LOC)
libgnumguile_la_LIBADD = $(GUILE_LIBS)
libgnum_guile_la_LIBADD = $(GUILE_LIBS)
Guilescriptsdir = $(datadir)/gnumeric/guile
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libhtml.la
plugin_LTLIBRARIES = libgnum_html.la
libhtml_la_SOURCES = boot.h boot.c html.h html.c latex.h latex.c \
libgnum_html_la_SOURCES = boot.h boot.c html.h html.c latex.h latex.c \
roff.h roff.c font.h font.c epsf.h epsf.c ps.h ps.c
INCLUDES = \
......
......@@ -7,11 +7,11 @@ INCLUDES = \
-I$(top_srcdir)/src \
$(GNOME_INCLUDEDIR)
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = liblotus.la
plugin_LTLIBRARIES = libgnum_lotus.la
liblotus_la_SOURCES = \
libgnum_lotus_la_SOURCES = \
boot.c \
config.h \
lotus.c \
......
......@@ -7,11 +7,11 @@ INCLUDES = \
-I$(top_srcdir)/src \
$(GNOME_INCLUDEDIR)
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = liboleo.la
plugin_LTLIBRARIES = libgnum_oleo.la
liboleo_la_SOURCES = \
libgnum_oleo_la_SOURCES = \
boot.c \
oleo.c \
oleo.h
......@@ -10,7 +10,7 @@ GNUMERIC_SRC_DIR = $(srcdir)/../../src
#
# Where to install the plugin
#
execplugindir = $(libdir)/gnumeric/plugins
execplugindir = $(libdir)/gnumeric/plugins/$(VERSION)
gnperldir = $(datadir)/gnumeric/perl/lib
PERL_CFLAGS = $(PERL_CCCDLFLAGS) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libpln.la
plugin_LTLIBRARIES = libgnum_pln.la
libpln_la_SOURCES = pln.h pln.c
libgnum_pln_la_SOURCES = pln.h pln.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(srcdir)/../../src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libpython.la
plugin_LTLIBRARIES = libgnum_python.la
libpython_la_SOURCES = python.c
libgnum_python_la_SOURCES = python.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......@@ -21,8 +21,8 @@ INCLUDES = \
$(PY_CFLAGS) \
$(GNOME_INCLUDEDIR)
libpython_la_LDFLAGS = $(PY_LIB_LOC)
libpython_la_LIBADD = -l$(PY_LIBS) $(PY_EXTRA_LIBS)
libgnum_python_la_LDFLAGS = $(PY_LIB_LOC)
libgnum_python_la_LIBADD = -l$(PY_LIBS) $(PY_EXTRA_LIBS)
Pythonscriptsdir = $(datadir)/gnumeric/python
......
......@@ -8,11 +8,18 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libsample.la
# NOTE :
# The naming convention is very intentional
# We are forced to use the prefix 'lib' by automake and libtool
# There is probably a way to avoid it but it is not worth to effort
# to find out.
# The 'gnum_' prfix is a safety measure to avoid conflicts where the
# plugin 'libpython.so' needs to link with the real 'libpython.so'
plugin_LTLIBRARIES = libgnum_sample.la
libsample_la_SOURCES = plugin-sample.c
libgnum_sample_la_SOURCES = plugin-sample.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libsc.la
plugin_LTLIBRARIES = libgnum_sc.la
libsc_la_SOURCES = sc.c
libgnum_sc_la_SOURCES = sc.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libstat.la
plugin_LTLIBRARIES = libgnum_stat.la
libstat_la_SOURCES = stat.c stat.h
libgnum_stat_la_SOURCES = stat.c stat.h
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libsylk.la
plugin_LTLIBRARIES = libgnum_sylk.la
libsylk_la_SOURCES = sylk.c
libgnum_sylk_la_SOURCES = sylk.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -8,11 +8,11 @@ GNUMERIC_SRC_DIR = $(top_srcdir)/src
#
# Where to install the plugin
#
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libtext.la
plugin_LTLIBRARIES = libgnum_text.la
libtext_la_SOURCES = text-io.h text-io.c
libgnum_text_la_SOURCES = text-io.h text-io.c
INCLUDES = \
-I$(GNUMERIC_SRC_DIR) \
......
......@@ -7,11 +7,11 @@ INCLUDES = \
-I$(top_srcdir)/src \
$(GNOME_INCLUDEDIR)
plugindir = $(libdir)/gnumeric/plugins
plugindir = $(libdir)/gnumeric/plugins/$(VERSION)
plugin_LTLIBRARIES = libxbase.la
plugin_LTLIBRARIES = libgnum_xbase.la
libxbase_la_SOURCES = \
libgnum_xbase_la_SOURCES = \
boot.c \
xbase.c \
xbase.h
......@@ -113,15 +113,17 @@ static void
load_all_plugins (void)
{
char *plugin_dir;
char *home_dir = getenv ("HOME");
char const * const home_dir = getenv ("HOME");
/* Load the user plugins */
plugin_dir = g_strconcat (home_dir ? home_dir : "", "/.gnumeric/plugins/", NULL);
plugin_load_plugins_in_dir (plugin_dir);
g_free (plugin_dir);
if (home_dir != NULL) {
plugin_dir = g_strconcat (home_dir, "/.gnumeric/plugins/" GNUMERIC_VERSION "/", NULL);
plugin_load_plugins_in_dir (plugin_dir);
g_free (plugin_dir);
}
/* Load the system plugins */
plugin_dir = gnome_unconditional_libdir_file ("gnumeric/plugins/");
plugin_dir = gnome_unconditional_libdir_file ("gnumeric/plugins/" GNUMERIC_VERSION "/");
plugin_load_plugins_in_dir (plugin_dir);
g_free (plugin_dir);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment