Commit b47b15f6 authored by Owen Taylor's avatar Owen Taylor Committed by Owen Taylor

Fixes for uninstalled operation with module suffixes other than .so and in

Sat Mar  2 23:08:23 2002  Owen Taylor  <otaylor@redhat.com>

        Fixes for uninstalled operation with module suffixes
        other than .so and in general for platforms like AIX where
        the module suffix isn't predictable. (#72185, problems
        reported by Miroslaw Dobrzanski-Neumann)

        * modules/input/Makefile.am (gtk.immodules): Query .la
        files rather than shared objects in .libs when creating the
        uninstalled gtk.immodules file.

        * gtk/gtkmain.c (_gtk_find_module): Look for .la files
        after looking for the normal soname extension to handle
        cases where the soname extension isn't predictable,
        like AIX.

        * gtk/gtkthemes.c (gtk_theme_engine_load): Don't
        call g_module_build_path... leave that to
        gtk_rc_find_module_in_path.

        * demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
        tests/testgtk.c (test_init): tests/testtext.c (test_init)
        tests/testdnd.c (test_init): Point gdk-pixbuf to .la
        files rather than poking in .libs for .so files.

        * gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
        .libs from GDK_PIXBUF_MODULEDIR.
parent b3c0813b
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
Sat Mar 2 23:08:23 2002 Owen Taylor <otaylor@redhat.com>
Fixes for uninstalled operation with module suffixes
other than .so and in general for platforms like AIX where
the module suffix isn't predictable. (#72185, problems
reported by Miroslaw Dobrzanski-Neumann)
* modules/input/Makefile.am (gtk.immodules): Query .la
files rather than shared objects in .libs when creating the
uninstalled gtk.immodules file.
* gtk/gtkmain.c (_gtk_find_module): Look for .la files
after looking for the normal soname extension to handle
cases where the soname extension isn't predictable,
like AIX.
* gtk/gtkthemes.c (gtk_theme_engine_load): Don't
call g_module_build_path... leave that to
gtk_rc_find_module_in_path.
* demos/gtk-demo/main.c (main) demos/pixbuf-init.c (pixbuf_init):
tests/testgtk.c (test_init): tests/testtext.c (test_init)
tests/testdnd.c (test_init): Point gdk-pixbuf to .la
files rather than poking in .libs for .so files.
* gtk/stock-icons/Makefile.am (gtkstockpixbufs.h): Remove
.libs from GDK_PIXBUF_MODULEDIR.
Sat Mar 2 20:58:30 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c (gtk_widget_reparent): Handle NO_WINDOW
widgets with windows that are children of widget->window.
(#50279)
* tests/testgtk.c: Add eventboxes to the example so that
we are reparenting between different GdkWindows.
Sat Mar 2 20:39:38 2002 Owen Taylor <otaylor@redhat.com>
* gtk/gtkimagemenuitem.c (gtk_image_menu_item_new_from_stock):
......
......@@ -808,10 +808,10 @@ main (int argc, char **argv)
* these few lines, which are just a hack so gtk-demo will work
* in the GTK tree without installing it.
*/
if (g_file_test ("../../gdk-pixbuf/.libs/libpixbufloader-pnm.so",
if (g_file_test ("../../gdk-pixbuf/libpixbufloader-pnm.la",
G_FILE_TEST_EXISTS))
{
putenv ("GDK_PIXBUF_MODULEDIR=../../gdk-pixbuf/.libs");
putenv ("GDK_PIXBUF_MODULEDIR=../../gdk-pixbuf");
putenv ("GTK_IM_MODULE_FILE=../../modules/input/gtk.immodules");
}
/* -- End of hack -- */
......
......@@ -14,6 +14,6 @@ file_exists (const char *filename)
void
pixbuf_init ()
{
if (file_exists ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so"))
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf");
}
......@@ -377,6 +377,31 @@ _gtk_get_module_path (const gchar *type)
return result;
}
/* Like g_module_path, but use .la as the suffix
*/
static gchar*
module_build_la_path (const gchar *directory,
const gchar *module_name)
{
gchar *filename;
gchar *result;
if (strncmp (module_name, "lib", 3) == 0)
filename = (gchar *)module_name;
else
filename = g_strconcat ("lib", module_name, ".la", NULL);
if (directory && *directory)
result = g_build_filename (directory, filename, NULL);
else
result = g_strdup (filename);
if (filename != module_name)
g_free (filename);
return result;
}
/**
* _gtk_find_module:
* @name: the name of the module
......@@ -402,15 +427,23 @@ _gtk_find_module (const gchar *name,
paths = _gtk_get_module_path (type);
for (path = paths; *path; path++)
{
gchar *tmp_name = g_module_build_path (*path, name);
gchar *tmp_name;
tmp_name = g_module_build_path (*path, name);
if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
{
module_name = tmp_name;
goto found;
}
else
g_free(tmp_name);
g_free(tmp_name);
tmp_name = module_build_la_path (*path, name);
if (g_file_test (tmp_name, G_FILE_TEST_EXISTS))
{
module_name = tmp_name;
goto found;
}
g_free(tmp_name);
}
g_strfreev (paths);
......
......@@ -60,23 +60,17 @@ gtk_theme_engine_load (GTypeModule *module)
{
GtkThemeEngine *engine = GTK_THEME_ENGINE (module);
gchar *fullname;
gchar *engine_path;
fullname = g_module_build_path (NULL, engine->name);
engine_path = gtk_rc_find_module_in_path (fullname);
engine_path = gtk_rc_find_module_in_path (engine->name);
if (!engine_path)
{
g_warning (_("Unable to locate theme engine in module_path: \"%s\","),
fullname);
g_free (fullname);
engine->name);
return FALSE;
}
g_free (fullname);
/* load the lib */
GTK_NOTE (MISC, g_message ("Loading Theme %s\n", engine_path));
......
......@@ -254,17 +254,17 @@ CLEANFILES = $(noinst_DATA)
pixbuf_dir = $(top_builddir)/gdk-pixbuf
gtkstockpixbufs.h: $(pixbuf_dir)/gdk-pixbuf-csource $(IMAGES)
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES1) >$(srcdir)/gtkstockpixbufs.h
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES2) >>$(srcdir)/gtkstockpixbufs.h
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES3) >>$(srcdir)/gtkstockpixbufs.h
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES4) >>$(srcdir)/gtkstockpixbufs.h
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES5) >>$(srcdir)/gtkstockpixbufs.h
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir)/.libs \
GDK_PIXBUF_MODULEDIR=$(pixbuf_dir) \
$(pixbuf_dir)/gdk-pixbuf-csource --raw --build-list $(VARIABLES6) >>$(srcdir)/gtkstockpixbufs.h
EXTRA_DIST = $(IMAGES) gtkstockpixbufs.h
......@@ -2,9 +2,6 @@
if PLATFORM_WIN32
no_undefined = -no-undefined
SOSUFFIX=dll
else
SOSUFFIX=so
endif
INCLUDES = @STRIP_BEGIN@ \
......@@ -98,6 +95,6 @@ module_LTLIBRARIES = \
im-viqr.la
gtk.immodules: Makefile.am $(module_LTLIBRARIES)
$(top_builddir)/gtk/gtk-query-immodules-2.0 .libs/*.$(SOSUFFIX) > gtk.immodules
$(top_builddir)/gtk/gtk-query-immodules-2.0 *.la > gtk.immodules
all-local: gtk.immodules
......@@ -555,10 +555,10 @@ source_drag_data_delete (GtkWidget *widget,
void
test_init ()
{
if (g_file_test ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so",
if (g_file_test ("../gdk-pixbuf/libpixbufloader-pnm.la",
G_FILE_TEST_EXISTS))
{
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/");
putenv ("GTK_IM_MODULE_FILE=./gtk.immodules");
}
}
......
......@@ -11592,9 +11592,9 @@ create_main_window (void)
static void
test_init ()
{
if (file_exists ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so"))
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
{
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf");
putenv ("GTK_IM_MODULE_FILE=../modules/input/gtk.immodules");
}
}
......
......@@ -2536,7 +2536,7 @@ file_exists (const char *filename)
void
test_init ()
{
if (file_exists ("../gdk-pixbuf/.libs/libpixbufloader-pnm.so"))
if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
{
putenv ("GDK_PIXBUF_MODULEDIR=../gdk-pixbuf/.libs");
putenv ("GTK_IM_MODULE_FILE=../modules/input/gtk.immodules");
......
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