Subject: Re: pthread.h and tclhttpd3.0.2
To: admin) <bbogart@acs.ryerson.ca (Ben Bogart>
From: Berndt Josef Wulf <wulf@ping.net.au>
List: port-i386
Date: 06/09/2000 11:25:49
I quickly downloaded the required packages and built it using the
packages system which seems to be working... it is currently running
on

http://hotdog.ping.net.au:8015/

It will be taken offline soon as currently I have no use for it... so
you need to hurry if you like to check it out.

To compile tclhttpd succesfully you need tcl8.x, tk8.x, tcllib0.4 installed
and working...

I won't release the pkgsrc as it was only quickly assembled in order
to verify it working.... but basically what you need to do is the
following in the top directory of the tclhttpd source tree.

setenv LOCALBASE /usr/pkg
setenv CFLAGS -I${LOCALBASE}/include
setenv LDFLAGS -L${LOCALBASE}/lib

./configure --with-tclinclude=${LOCALBASE}/include/tcl8.0   \
                --with-tcl=${LOCALBASE}/lib/tcl8.0 \
		--enable-threads --prefix=${LOCALBASE}

with the following result
[...]
checking for building with threads... checking for pthread_mutex_init
in -lpthread... yes 
[...]

I am using pth-current, but it should work with mit-pthread too...

NOTE: This tclhttpd will install itself into ${LOCALBASE}/tclhttpd
where LOCALBASE is the installation directory e.g. /usr/pkg. 

Good luck

cheerio Berndt

Ben Bogart (admin) wrote
> > Ben Bogart (admin) wrote
> > > I've got the MIT-pthreads package, now how do I modify the Thread2.0
> > > Makefile to use it? ./configure does not seem to find it. Forgive my lack
> > > of Makefile understanding. Is anyone on the NetBSD side using thread2.0 in
> > > tcl? if so how did you compile?
> > 
> > You may need to set a environment variable in order to tell the
> > configure script to include /usr/pkg/include and /usr/pkg/lib in its
> > search path.
> > 
> > I take it that you are trying to build this package manually (not using
> > the packages system). In this case try "./configure --help" and look
> > for the options --with-extra-includes and --with-extra-libs. If they
> > exists issue the follwoing command
> > 
> > 	./configure --with-extra-includes=/usr/pkg/include \
> > 			--with-extra-libs=/usr/pkg/lib
> 
> tclhttpd is not availible in the package system. I looked at the help but
> extra libs and includes are not availible in this configure. The script
> suggested I edit LIBS in the Makefile, but I am not familiar enough with
> Makefiles to know how to change them, not as if there is just a list of
> searching paths that i can find... I can't tell what entries are pointing 
> at libs and includes within the distribution and ones that it looks for
> in the system. I beleive that it should go somewhere in here: 
> 
> #========================================================================
> # Change the name of the variable "thread_LIB_FILE" to match the one
> # used in the configure script.  This is the parameterized name of the
> # library that we are building.
> #========================================================================
> 
> lib_BINARIES=$(thread_LIB_FILE)
> BINARIES=$(lib_BINARIES)
> 
> #========================================================================
> # Enumerate the names of the source files included in this package.
> # This will be used when a dist target is added to the Makefile.
> #========================================================================
> 
> thread_SOURCES = threadCmd.c
> SOURCES = $(thread_SOURCES)
> 
> #========================================================================
> # Enumerate the names of the object files included in this package.
> # These objects are created and linked into the final library.  In
> # most cases these object files will correspond to the source files
> # above.
> #
> #========================================================================
> 
> thread_OBJECTS =  threadCmd.$(OBJEXT)
> OBJECTS = $(thread_OBJECTS)
> 
> #========================================================================
> # The substitution of "thread_LIB_FILE" into the variable name below
> # allows us to refer to the objects for the library without knowing the
> name
> # of the library in advance.  It also lets us use the "$@" variable in
> # the rule for building the library, so we can refer to both the list of 
> # objects and the library itself in a platform-independent manner.
> #========================================================================
> 
> thread_LIB_FILE = libthread20.so.1.0
> $(thread_LIB_FILE)_OBJECTS = $(thread_OBJECTS)
> 
> #========================================================================
> # This is a list of header files to be installed
> #========================================================================
> 
> GENERIC_HDRS= $(srcdir)/generic/thread.h
> 
> 
> Thanks for any help anyone can offer.
> 
> 
> 


-- 
Name    : Berndt Josef Wulf            | +++ With BSD on Packet Radio +++
E-Mail  : wulf@ping.net.au             |    tfkiss, tnt, dpbox, wampes
ICQ     : 18196098                     |  VK5ABN, Nairne, South Australia 
URL     : http://www.ping.net.au/~wulf | MBOX : vk5abn@vk5abn.#lmr.#sa.au.oc
Sysinfo : DEC AXPpci33+, NetBSD-1.4.2  | BBS  : vk5abn.#lmr.#sa.aus.oc