List:General Discussion« Previous MessageNext Message »
From:Jeff Hill Date:April 11 1999 9:17pm
Subject:Re: mod_auth_mysql-2.20 not making libauth_mysql.a
View as plain text  
I very much appreciate the direction, and maybe it shoudl be apparent,
but I'm still a little lost. I have no "LIBEXT=o" in Makefile.tmpl (I
have no "Makefile" without extension).  My makefile.tmpl in
/usr/src/apache_1.3.6/src/modules/auth_mysql is:

##
##  Apache 1.3 Makefile template for MySQL Auth Module
##  [src/modules/mysql_auth/Makefile.tmpl]
##

#   the parametrized target
LIB=libauth_mysql.$(LIBEXT)

#   objects for building the static library
OBJS=mod_auth_mysql.o

#   objects for building the shared object library
SHLIB_OBJS=mod_auth_mysql.so-o

#   the general targets
all: lib
lib: $(LIB)

#   build the static library by merging the object files
libauth_mysql.a: $(OBJS)
        ar r $@ $(OBJS)
        $(RANLIB) $@

#   ugly hack to support older Apache-1.3 betas that don't set $LIBEXT
libauth_mysql.: $(OBJS)
        ar r $(OBJS)
        $(RANLIB) $@
        cp libauthmysqk. libauth_mysql.a

#   build the shared object library by linking the object files
libauth_mysql.so: $(SHLIB_OBJS)
        rm -f $@
        $(LD_SHLIB) $(LDFLAGS_SHLIB) -o $@ $(SHLIB_OBJS) $(LIBS)

# 1. extension .o for shared objects cannot be used here because
#    first these files aren't still shared objects and second we
#    have to use a different name to trigger the different
#    implicit Make rule
# 2. extension -so.o (as used elsewhere) cannot be used because
#    the suffix feature of Make really wants just .x, so we use
#    extension .so-o
.SUFFIXES: .o .so-o
.c.o:
        $(CC) -c $(INCLUDES) $(CFLAGS) $(SPACER) $<
.c.so-o:
        $(CC) -c $(INCLUDES) $(CFLAGS) $(CFLAGS_SHLIB) $(SPACER) $< &&
mv $*.o $*.so-o

#   cleanup
clean:
        -rm -f $(OBJS) $(SHLIB_OBJS) $(LIB)

# We really don't expect end users to use this rule.  It works only with
# gcc, and rebuilds Makefile.tmpl.  You have to re-run Configure after
# using it.
depend:
        cp Makefile.tmpl Makefile.tmpl.bak \
            && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.tmpl >
Makefile.new \
            && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
            && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new \
                > Makefile.tmpl \
            && rm Makefile.new

#Dependencies

$(OBJS): Makefile

# DO NOT REMOVE
mod_auth_mysql.o: mod_auth_mysql.c $(INCDIR)/httpd.h $(INCDIR)/conf.h \
 $(INCDIR)/alloc.h $(INCDIR)/buff.h \
 $(INCDIR)/http_config.h \
 $(INCDIR)/http_core.h $(INCDIR)/http_main.h \
 $(INCDIR)/http_protocol.h $(INCDIR)/http_request.h \
 $(INCDIR)/http_log.h $(INCDIR)/util_script.h

----------------------------------------------------------------------------
Tin Le wrote:
> 
> It's a bug in the Configure script.  I've never bothered to track it down,
> but have run into this problem for the past 6 months or longer.
> 
> In your Apache source tree, go to src/modules/auth_mysql, edit Makefile and
> search for "LIBEXT".  The bug is that Configure sets it to "LIBEXT=o" which
> is wrong.  You want to change it to "LIBEXT=a", then rerun make to get your
> libauth_mysql.a
> 
> Tin Le
Thread
mod_auth_mysql-2.20 not making libauth_mysql.aJeff Hill12 Apr
  • Re: mod_auth_mysql-2.20 not making libauth_mysql.aTin Le12 Apr
    • Re: mod_auth_mysql-2.20 not making libauth_mysql.aJeff Hill12 Apr
      • Re: mod_auth_mysql-2.20 not making libauth_mysql.aTin Le13 Apr