diff options
author | Owen Taylor <otaylor@redhat.com> | 2002-03-03 03:01:21 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2002-03-03 03:01:21 +0000 |
commit | 3e1fccd014c609f972bcfe002bb03b904d239e2d (patch) | |
tree | 9bb573f167798a80cd39e63d819af3ec87fa7d71 /pango/querymodules.c | |
parent | cd9e68bea720226c840cdf0babfd3f465f027aed (diff) | |
download | pango-3e1fccd014c609f972bcfe002bb03b904d239e2d.tar.gz |
Write examples/pango.modules in terms of .la files rather than direct
Sat Mar 2 21:57:55 2002 Owen Taylor <otaylor@redhat.com>
* examples/Makefile.am (pango.modules): Write
examples/pango.modules in terms of .la files rather than
direct shared objects to avoid having to know soname
extension.
* pango/querymodules.c (main): Use G_MODULE_SUFFIX or
.la to compare with filenames when querying modules,
rather than hardcoded .so/.la.
* configure.in (USE_LA_MODULES): On aix, load .la files
since we can't guess the soname extension.
Diffstat (limited to 'pango/querymodules.c')
-rw-r--r-- | pango/querymodules.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pango/querymodules.c b/pango/querymodules.c index c29c8ed4..bcc02ad3 100644 --- a/pango/querymodules.c +++ b/pango/querymodules.c @@ -35,11 +35,12 @@ #endif #include <stdio.h> -#ifdef G_OS_WIN32 -#define SOEXT ".dll" +#if USE_LA_MODULES +#define SOEXT ".la" #else -#define SOEXT ".so" +#define SOEXT ("." G_MODULE_SUFFIX) #endif +#define SOEXT_LEN (strlen (SOEXT)) void query_module (const char *dir, const char *name) @@ -149,7 +150,7 @@ int main (int argc, char **argv) while ((dent = g_dir_read_name (dir))) { int len = strlen (dent); - if (len > 3 && strcmp (dent + len - strlen (SOEXT), SOEXT) == 0) + if (len > SOEXT_LEN && strcmp (dent + len - SOEXT_LEN, SOEXT) == 0) query_module (dirs[i], dent); } |