]> granicus.if.org Git - apache/commitdiff
Correct use of libtool: libtool convenience libraries which are to be
authorJoe Orton <jorton@apache.org>
Mon, 19 Jan 2004 22:58:41 +0000 (22:58 +0000)
committerJoe Orton <jorton@apache.org>
Mon, 19 Jan 2004 22:58:41 +0000 (22:58 +0000)
linked directly into a program must be linked using -static and not
-module.  Fixes build issues with libtool HEAD.

* acinclude.m4 (APACHE_MODPATH_ADD): For a static module, use a
filename with a lib prefix.

* build/rules.mk.in (MOD_LINK): Use -static not -module.

* build/special.mk (install-modules): Adjust special-case for
installation of shared modules to look for libso.la not mod_so.la.

* build/library.mk: Link libraries using -static.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102381 13f79535-47bb-0310-9956-ffa450edef68

acinclude.m4
build/library.mk
build/rules.mk.in
build/special.mk

index 3c02af532c60d7b940426cf185f7ebf03d03af8f..8c620e83093499c5728368a4e8bd7aa90da12489 100644 (file)
@@ -170,7 +170,8 @@ AC_DEFUN(APACHE_MODPATH_ADD,[
 
   if test -z "$module_standalone"; then
     if test -z "$2"; then
-      libname="mod_$1.la"
+      # The filename of a convenience library must have a "lib" prefix:
+      libname="lib$1.la"
       BUILTIN_LIBS="$BUILTIN_LIBS $modpath_current/$libname"
       modpath_static="$modpath_static $libname"
       cat >>$modpath_current/modules.mk<<EOF
index 3171723b4e56d488ee5de36fff7d39cb03a1e091..bcd498f29aba0aa48da0fd10b58ea39f24933922 100644 (file)
@@ -57,4 +57,4 @@
 LTLIBRARY_OBJECTS = $(LTLIBRARY_SOURCES:.c=.lo) $(LTLIBRARY_OBJECTS_X)
 
 $(LTLIBRARY_NAME): $(LTLIBRARY_OBJECTS) $(LTLIBRARY_DEPENDENCIES)
-       $(LINK) $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
+       $(LINK) -static $(LTLIBRARY_LDFLAGS) $(LTLIBRARY_OBJECTS) $(LTLIBRARY_LIBADD)
index 434d7c3c645c9e86cfc7bd9957e92de077105317..343582521f0cd0e32cdd5b00ace6b27dca00f1ba 100644 (file)
@@ -83,7 +83,7 @@ LT_CXX_COMPILE = $(LIBTOOL) --mode=compile $(CXX_COMPILE) @LTCFLAGS@ -c $< && to
 
 LINK     = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
 SH_LINK  = $(SH_LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) $(LT_LDFLAGS) $(ALL_LDFLAGS) $(SH_LDFLAGS) $(CORE_IMPLIB) $(SH_LIBS) -o $@
-MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -module $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
+MOD_LINK = $(LIBTOOL) --mode=link $(CC) $(ALL_CFLAGS) -static $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@
 
 # Cross compile commands
 
index 7689079f2bfde7605e1e60a4a333bb68c7fe2025..43c279aace7ac654e38a6ca817bea5de06f6176e 100644 (file)
@@ -64,7 +64,7 @@ INSTALL_TARGETS = install-modules
 install-modules:
        @test -d $(DESTDIR)$(libexecdir) || $(MKINSTALLDIRS) $(DESTDIR)$(libexecdir)
        @builtin='$(BUILTIN_LIBS)'; \
-       has_mod_so=`echo $$builtin|sed 's/^.*mod_so.*$$/has_mod_so/'`; \
+       has_mod_so=`echo $$builtin|sed 's/^.*libso.*$$/has_mod_so/'`; \
        if [ "x$$has_mod_so" = "xhas_mod_so" ]; then \
                list='$(shared)'; \
                for i in $$list; do \