Re: include files and statically linked libraries

2002-10-24 Thread Tom Tromey
> "Eric" == Eric Anderson <[EMAIL PROTECTED]> writes:

Eric> Makefile:225: *** missing separator.  Stop.
Eric> and line 225 of the Makefile is:
Eric> @SET_MAKE@

This means that whatever configure is building this Makefile doesn't
invoke AC_PROG_MAKE_SET.  AM_INIT_AUTOMAKE invokes this, so it
is probably some weird problem.  Maybe not running aclocal?

Tom





Re: include files and statically linked libraries

2002-10-24 Thread Tom Tromey
>> AC_CONFIG_SUBDIRS(libghttp-1.0.9-mod)

Eric> Where does this go in the configure.in file? Above the AC_OUTPUT
Eric> command? From what I have read there has to be an order to the script,
Eric> so I want to make sure I put it in the right place

Anyplace before AC_OUTPUT is fine.
 
>> SUBDIRS = libghttp-1.0.9-mod

Eric> I assume this goes at the top of the Makefile.am file?

Anyplace in Makefile.am is fine.
At the top is typical though.

Tom





Re: include files and statically linked libraries

2002-10-21 Thread Eric Anderson
On Sun, 2002-10-20 at 14:40, Tom Tromey wrote:
> Why your approach failed, I don't know.  I assume you re-ran autoconf,
> automake, and configure?

OK, I have done things as you have suggested, but I am still stuck at
that error. I have narrowed it down to the fact that when I put the

SUBDIRS = libghttp-1.0.9-mod

line in the top of Makefile.am the error is caused. For reference the
error is:

Makefile:225: *** missing separator.  Stop.

and line 225 of the Makefile is:

@SET_MAKE@

I stuck the terms "@SET_MAKE@" and "missing separator" into google and
found a couple of other people reporting this, but no solution is ever
listed. I checked both the webs and Google Groups. No solution. Any help
is greatly appreciated.

-- 
Eric Anderson





Re: include files and statically linked libraries

2002-10-21 Thread Eric Anderson
On Sun, 2002-10-20 at 14:40, Tom Tromey wrote:
> Does libghttp have its own configure script?

Yes

> If so it is probably even cleaner to run that.  Put this in
> configure.in:
> 
> AC_CONFIG_SUBDIRS(libghttp-1.0.9-mod)
>

Where does this go in the configure.in file? Above the AC_OUTPUT
command? From what I have read there has to be an order to the script,
so I want to make sure I put it in the right place
 
> Then put this in your Makefile.am:
> 
> SUBDIRS = libghttp-1.0.9-mod
> 

I assume this goes at the top of the Makefile.am file?

Thanks for your help on this.

-- 
Eric Anderson





include files and statically linked libraries

2002-10-20 Thread Eric Anderson
I recently found a nifty little program called hotwayd, which is a
hotmail-pop3 gateway. I noticed when installing it that the internal
include files for the program are installed also. I do not believe that
it should do this (since it is not a library or anything). I looked at
the Makefile.am file and I see the following in it:

include_HEADERS = \
hotwayd.h \
httpmail.h \
ghttp.h \
ghttp_constants.h

I am guessing this is what is causing them to get installed so I want to
change this, but I am not exactly sure how. My gut feeling is to stick
these files up in the hotwayd_SOURCES directive but not being an expert
at Automake I wanted to run that by you guys before I made the change.
What is the proper way to specify internal .h files in Automake?

My next question is not really one of correct functionality, but of
style. In this same package a modified version of libghttp is included.
The program simply statically links the library to the hotwayd binary.
It is located in a subdirectory called libghttp-1.0.9-mod/ and is
specified in the Automake.am file as:

hotwayd_LDADD = \
libghttp-1.0.9-mod/ghttp.c \
libghttp-1.0.9-mod/http_date.c \
libghttp-1.0.9-mod/http_hdrs.c \
libghttp-1.0.9-mod/http_req.c \
libghttp-1.0.9-mod/http_resp.c \
libghttp-1.0.9-mod/http_trans.c \
libghttp-1.0.9-mod/http_uri.c \
libghttp-1.0.9-mod/http_base64.c \
libghttp-1.0.9-mod/http_digest.c \
libghttp-1.0.9-mod/md5c.c

libghttp also uses Automake so I was wondering if this would be better
done using the SUBDIRS directive and then having something like the
following:

hotwayd_LDADD = libghttp-1.0.9-mod/libghttp.a

But I was not exactly sure how to specify this. When I tried to put a
SUBDIRS directive in the Makefile.am, and add
libghttp-1.0.9-mod/Makefile to the output list in the configure file (I
also had to change the configure file to check for libtool) it gave me
the below error when I tried to "make":

Makefile:226: *** missing separator.  Stop.

If I look at the Makefile at line 226 I see the following:

@SET_MAKE@

This looks to me like some variable is not getting substituted, but I am
not sure why or how to fix it. Am I making this too hard on myself and
should just leave the SUBDIRS directive out? It seems to me that the
dependencies would be reduced by having it in. Then all hotwayd has to
know is that the libghttp library is in the subdirectory of
libghttp-1.0.9-mod and that the resulting library file is libghttp.a. It
would not have to know the names of all the source files in libghttp
(which might change in future versions). What is the general method of
including a static library in a program (or a modified version of a
standard library)?

Any help is greatly appreciated.

-- 
Eric Anderson