emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Difficult compilation setup for nonstandard paths


From: Eli Zaretskii
Subject: Re: Difficult compilation setup for nonstandard paths
Date: Thu, 4 Jan 2001 09:58:22 +0200 (IST)

On 3 Jan 2001, Kai =?iso-8859-1?q?Gro=DFjohann?= wrote:

> Obviously, there are two alternatives: either, extend the
> configure script to provide options --with-png-includes and
> --with-png-libraries (or similar), or, mention in the INSTALL file how
> to set ${CPPFLAGS} and ${LDFLAGS} so that the include files and
> libraries can be found.

I vote for the second option (especially since it is already done ;-).
I think that changing configure at this stage should be restricted to
grave problems only.

Here's the relevant snippet from the current INSTALL:

    Some tests might fail because the compiler should look in special
    directories for some header files, or link against optional
    libraries, or use special compilation options.  You can force
    `configure' and the build process which follows it to do that by
    setting the variables CPPFLAGS, CFLAGS, LDFLAGS, LIBS, and CC before
    running `configure'.  CPPFLAGS lists the options passed to the
    preprocessor, CFLAGS are compilation options, LDFLAGS are options used
    when linking, LIBS are libraries to link against, and CC is the
    command which invokes the compiler.

    Here's an example of a `configure' invocation which uses these
    variables:

     CPPFLAGS='-I/foo/myinclude' LDFLAGS='-L/bar/mylib' \
      CFLAGS='-O3' LIBS='-lfoo -lbar' ./configure

    (this is all one long line).  This tells `configure' to instruct the
    preprocessor to look in the `/foo/myinclude' directory for header
    files (in addition to the standard directories), instruct the linker
    to look in `/bar/mylib' for libraries, pass the -O3 optimization
    switch to the compiler, and link against libfoo.a and libbar.a
    libraries in addition to the standard ones.

I think I added this after I saw your original report and recalled
that I, too, needed to fight this problem.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]