Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Using libstemmer_c with an autotools packages: msg#00005

search.snowball

Subject: Re: Using libstemmer_c with an autotools packages

Vegard Nossum wrote:
Hello,

My project is using the GNU autotools (autoconf/automake) for the build
process. We also use the Snowball stemmer. The Snowball's makefile is not
compatible with GNU autotools, and in order to quickly integrate new
Snowball versions into our project without having to rewrite makefiles and
paths, I have written a script which automatically takes the
libstemmer_c.tgz file and "converts" it to a local library which is easy
to use with projects that use the GNU autotools.

Thanks for your submission - it seems to work. However, I'm not convinced that you need to go to the lengths your script does to use libstemmer with autotools (and automake in particular).

I'm using libstemmer with an autotools project, simply by doing the following:

1) Unpack libstemmer_c.tgz so that there is a libstemmer_c subdirectory of the top level directory of my project.

2) Add a file "Makefile.am" to the unpacked libstemmer_c folder, containing:

noinst_LTLIBRARIES = libstemmer.la
include $(srcdir)/mkinc.mak
noinst_HEADERS = $(snowball_headers)
libstemmer_la_SOURCES = $(snowball_sources)

3) Add to the top level makefile the following lines (or modify existing assignments to these variables appropriately):

AUTOMAKE_OPTIONS = subdir-objects
AM_CPPFLAGS = -I$(top_srcdir)/libstemmer_c/include
SUBDIRS=libstemmer_c
<name>_LIBADD = libstemmer_c/libstemmer.la

(Where <name> is the name of the library which links against libstemmer)


Perhaps I should have documented this somewhere...

Is there any reason that the above solution doesn't work for some projects? If there is, I'd be happy to incorporate your solution somehow, but I don't want to make things unnecessarily complicated. I also like the neatness of only adding the public headers of libstemmer (ie, the header files in the include/ subdirectory) to the include paths of the other files in the project.

--
Richard


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
qnx.openqnx.dev...    gcc.libstdc++.c...    solaris.opensol...    information-ret...    misc.misterhous...    web.catalyst.ge...    apache.webservi...    redhat.release....    hardware.lirc/2...    kernel.autofs/2...    technology.sust...    linux.vdr/2003-...    editors.lyx.gen...    org.user-groups...    netbsd.devel.pk...    xdg.devel/2004-...    version-control...    jakarta.slide.d...    debian.packages...    creativecommons...    ports.ppc.embed...    bug-tracking.bu...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe