aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Roehrich <roehrich@sgi.com>2001-07-31 21:29:24 +0000
committerDean Roehrich <roehrich@sgi.com>2001-07-31 21:29:24 +0000
commitc647a675429d0c384a632954c9f6ad144bd89f61 (patch)
treeacd3c02b7546f1f3b976c8a34869369dba8fdbab
parentdfc081b6f85a3601e92869ca3e2ba3dee2c5c077 (diff)
downloaddmapi-dev-c647a675429d0c384a632954c9f6ad144bd89f61.tar.gz
I noticed that my programs were not linking with the shared libs. Apparently
if you say something like (from the dmapi tests stuff): gcc -g -O2 -o dm_handle dm_handle.o libdmtest.a -ldm -lhandle it will link with whatever it finds in /usr/lib. If there are no shared libs there then it'll link with the static libs. When I add a symlink to make libdm.so and libhandle.so appear in /usr/lib then I am able to link to the shared libs. No Message Supplied
-rw-r--r--include/builddefs.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/builddefs.in b/include/builddefs.in
index 9d9946d..0ee8d1b 100644
--- a/include/builddefs.in
+++ b/include/builddefs.in
@@ -134,6 +134,9 @@ endif
# Libtool thinks the static and shared libs should be in the same dir, so
# make the static lib appear in the place we chose as rpath (using the two
# symlinks below).
+# Other things want the shared libs to appear in /usr/lib, else they'll
+# link with the static libs there. So, another symlink to get the .so into
+# /usr/lib.
ifeq ($(ENABLE_SHARED),yes)
INSTALL_LTLIB_DEV = \
cd $(TOPDIR)/$(LIBNAME)/.libs; \
@@ -143,7 +146,8 @@ INSTALL_LTLIB_DEV = \
../$(INSTALL) -m 755 -d $(PKG_SLIB_DIR); \
../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_SLIB_DIR); \
../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).a $(PKG_SLIB_DIR)/$(LIBNAME).a; \
- ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_SLIB_DIR)/$(LIBNAME).la
+ ../$(INSTALL) -S $(PKG_LIB_DIR)/$(LIBNAME).la $(PKG_SLIB_DIR)/$(LIBNAME).la; \
+ ../$(INSTALL) -S $(PKG_SLIB_DIR)/$(LIBNAME).so $(PKG_LIB_DIR)/$(LIBNAME).so
else
INSTALL_LTLIB_DEV = $(INSTALL_LTLIB_STATIC)
endif