Hi,

I finally took the time and built mod_dtcl on my Windows XP box. Following
Craigs Readme I got through it very well. Some things that came up I want to
share with you:

        o newer versions of GCC (I used gcc version 3.2 (mingw special
20020817-1))
          replace the switch "-fnative-struct" by "-mms-bitfields"
        o using MinGW 2.0 for me using the UNIX like pathnames worked better
          (e.g. /c/TEMP instead of C:\\TEMP)
        o I build from a binary distribution of Apache 1.3.26, so I had to
          change some directories

Best regards
Holger

see below the makefile working for me...
__________________________________________________________________________
tcl-moddtcl/win32/makefile:
vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
# 
# makefile for mod_dtcl and MingW32
# 

# 
# Global settings
#
# Tweak these as needed to match your environment
# Most of these variables can be set from the shell or command line
# 

# GCC 2.x:
#NATIVESTRUCT = -fnative-struct
# GCC 3.x: (e.g. gcc version 3.2 (mingw special 20020817-1))
NATIVESTRUCT = -mms-bitfields

#
# I use this as a pointer to a good temporary location. 
# The default works for most people
#
TEMP_LIBS = /c/TEMP

#
# Set this to your TCL version
#
# TCL_VERSION ?= 83
TCL_VERSION = 84

# 
# Set TCL_HOME to where you have installed Tcl
#
TCL_HOME = /c/Programme/Tcl

#
# Set this to where you have installed Apache - used for the install step.
#
APACHE_HOME = /c/Programme/"Apache Group"/Apache

#
# Set APACHE_SRC to where your APACHE sources live.
# NOTE: You must apply the diff to the os.h file as described in the
# readme, and this directory must contain built sources, e.g. object files
#
#APACHE_SRC ?= ../../apache

#
# Set APACHE_INC to where the APACHE source include files live. This default
# should be OK.
#
#APACHE_INC ?= -I $(APACHE_SRC)/src/include -I $(APACHE_SRC)/src/os/win32
APACHE_INC = -I $(APACHE_HOME)/include


#
# Set APACHE_LIB and APACHE_DEF to where you'd like a MingW32 compatible
# APACHE library file and DLL DEF file put.  You normally only need these
# during a build, so a temporary location is OK
#
#APACHE_LIB = $(TEMP_LIBS) 
APACHE_LIB = $(APACHE_HOME)/libexec
APACHE_DEF = $(TEMP_LIBS)/ApacheCore.def

#
# You shouldn't have to change anything below this
#
ROOT_DIR = ../
TCL_INC = $(TCL_HOME)/include
TCL_LIB = $(TCL_HOME)/lib

CC = gcc -O3 $(NATIVESTRUCT) -shared -mwindows -DSHARED_MODULE
-DDTCL_VERSION="\"`cat $(ROOT_DIR)/VERSION`\""

INCLUDES = -I$(TCL_INC) $(APACHE_INC)
LIBS = $(TCL_LIB)/tcl$(TCL_VERSION).lib -L$(APACHE_LIB) -lapachecore 

APREQ_OBJECTS = apache_cookie.o apache_multipart_buffer.o apache_request.o
OBJECTS = tcl_commands.o parser.o channel.o $(APREQ_OBJECTS)

DLL_CFLAGS = -DEAPI=1

DLL_EXP_LIB = libmod_dtcl.a
DLL_EXP_DEF = mod_dtcl.def
DLL_DYNAMIC = ApacheModuleDtcl.dll 
DLL_SO  = mod_dtcl.so
DLL_OBJS = mod_dtcl.o $(OBJECTS) 

DLLWRAP_FLAGS = --def $(DLL_EXP_DEF) \
        --implib $(DLL_EXP_LIB) \
        --driver-name $(CC)

#
# By default we build a .so file (Apache > 1.3.14)
#
all : so_style 

dll_style:      APACHE_EXP=$(APACHE_HOME)/libexex/ApacheCore.exp 
dll_style:      DLL_BUILD=$(DLL_DYNAMIC)
dll_style:      apache_libs $(DLL_DYNAMIC)

so_style:       APACHE_EXP=$(APACHE_HOME)/libexex/ApacheCore.exp
so_style:       DLL_BUILD=$(DLL_SO)     
so_style:       apache_libs $(DLL_SO)

$(DLL_DYNAMIC): $(DLL_OBJS) makefile
        $(CC) --dll --kill-at --disable-stdcall-fixup \
                -o $(DLL_DYNAMIC) $(DLL_OBJS) $(LIBS)

# 
# This does the same thing as the above, yet names the output file
# with a .so extension to match the "new" Apache style.
#
$(DLL_SO):      $(DLL_OBJS) makefile
        $(CC) --dll --kill-at --disable-stdcall-fixup \
                -o $(DLL_SO) $(DLL_OBJS) $(LIBS)

apache_cookie.o: $(ROOT_DIR)apache_cookie.c $(ROOT_DIR)apache_cookie.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<
apache_multipart_buffer.o: $(ROOT_DIR)apache_multipart_buffer.c
$(ROOT_DIR)apache_multipart_buffer.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<
apache_request.o: $(ROOT_DIR)apache_request.c $(ROOT_DIR)apache_request.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<
mod_dtcl.o: $(ROOT_DIR)mod_dtcl.c $(ROOT_DIR)mod_dtcl.h
$(ROOT_DIR)tcl_commands.h $(ROOT_DIR)apache_request.h $(ROOT_DIR)parser.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -o $@ $<
tcl_commands.o: $(ROOT_DIR)tcl_commands.c $(ROOT_DIR)tcl_commands.h
$(ROOT_DIR)mod_dtcl.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<
parser.o: $(ROOT_DIR)parser.c $(ROOT_DIR)mod_dtcl.h $(ROOT_DIR)parser.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<
channel.o: $(ROOT_DIR)channel.c $(ROOT_DIR)mod_dtcl.h $(ROOT_DIR)channel.h
        $(CC) -c $(DLL_CFLAGS) $(INCLUDES) -D_AP_OS_IS_PATH_ABS_ -o $@ $<

clean:
        -@rm -f $(DLL_OBJS) $(DLL_DYNAMIC) $(DLL_SO) $(DLL_EXP_LIB)

install: $(DLL_BUILD) $(DLL_EXP_LIB)
        echo Installing mod_dtcl...
        -cp $(DLL_BUILD) $(APACHE_HOME)/modules

apache_libs:
        -@mkdir $(TEMP_LIBS)
        -@rm $(APACHE_DEF)
        echo EXPORTS > $(APACHE_DEF)
        nm $(APACHE_EXP) |grep " U _" | sed "s/.* U _//" >> $(APACHE_DEF)
        dlltool --def $(APACHE_DEF) --dllname ApacheCore.dll \
                --output-lib $(TEMP_LIBS)\libapachecore.a -k
        

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 ____________________________________________________________________
|
| Holger Zeinert   -   Development Manager CAE Division
|____________________________________________________________________
| LMS Deutschland GmbH      -      tel +49 631 4166-180, fax -166
| Luxemburger Str. 7, 67657 Kaiserslautern, GERMANY
| mailto:[EMAIL PROTECTED]     http://www.lmsintl.com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to