summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2002-03-03 03:01:21 +0000
committerOwen Taylor <otaylor@src.gnome.org>2002-03-03 03:01:21 +0000
commit3e1fccd014c609f972bcfe002bb03b904d239e2d (patch)
tree9bb573f167798a80cd39e63d819af3ec87fa7d71
parentcd9e68bea720226c840cdf0babfd3f465f027aed (diff)
downloadpango-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.
-rw-r--r--ChangeLog14
-rw-r--r--ChangeLog.pre-1-014
-rw-r--r--ChangeLog.pre-1-1014
-rw-r--r--ChangeLog.pre-1-214
-rw-r--r--ChangeLog.pre-1-414
-rw-r--r--ChangeLog.pre-1-614
-rw-r--r--ChangeLog.pre-1-814
-rw-r--r--configure.in15
-rw-r--r--examples/Makefile.am2
-rw-r--r--pango/querymodules.c9
10 files changed, 119 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index b2bb6400..e6339b17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-0 b/ChangeLog.pre-1-0
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-0
+++ b/ChangeLog.pre-1-0
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-10 b/ChangeLog.pre-1-10
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-10
+++ b/ChangeLog.pre-1-10
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-2 b/ChangeLog.pre-1-2
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-2
+++ b/ChangeLog.pre-1-2
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-4 b/ChangeLog.pre-1-4
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-4
+++ b/ChangeLog.pre-1-4
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-6 b/ChangeLog.pre-1-6
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-6
+++ b/ChangeLog.pre-1-6
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/ChangeLog.pre-1-8 b/ChangeLog.pre-1-8
index b2bb6400..e6339b17 100644
--- a/ChangeLog.pre-1-8
+++ b/ChangeLog.pre-1-8
@@ -1,3 +1,17 @@
+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.
+
Fri Mar 1 00:46:49 2002 Owen Taylor <otaylor@redhat.com>
* configure: Default to --disable-static.
diff --git a/configure.in b/configure.in
index b18af8f3..c420c7df 100644
--- a/configure.in
+++ b/configure.in
@@ -480,6 +480,21 @@ dnl NOTE: We need to use a separate automake conditional for this
dnl to make this work with the tarballs.
AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes)
+dnl ********************************************************
+dnl * See whether we need to load our modules as .la files *
+dnl ********************************************************
+
+use_la_modules=false
+case $host in
+ *-aix*) use_la_modules=true
+esac
+
+if $use_la_modules ; then
+ AC_DEFINE(USE_LA_MODULES, 1, [Whether to load modules via .la files rather than directly])
+fi
+
+echo ================= $host ==================
+
dnl ******************************************************
dnl * See whether to include shared library dependencies *
dnl ******************************************************
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 8d2fabfb..a17442cc 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -46,7 +46,7 @@ pango.modules:
if find ../modules -name '*.so' | grep 'so' > /dev/null ; then \
echo "Writing a pango.modules file to use when running examples before installing Pango."; \
(cd ../modules && \
- ../pango/pango-querymodules `find . -name '*.so'` > ../examples/pango.modules ) ;\
+ ../pango/pango-querymodules `find . -name '*.la' | grep -v \.libs` > ../examples/pango.modules ) ;\
else \
echo "No dynamic modules found; will use only static modules for uninstalled example programs."; \
touch pango.modules; \
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);
}