[Top][All Lists]

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

Re: Difficult compilation setup for nonstandard paths

From: Kai Großjohann
Subject: Re: Difficult compilation setup for nonstandard paths
Date: 03 Jan 2001 16:45:06 +0100
User-agent: Gnus/5.090001 (Oort Gnus v0.01) Emacs/21.0.95

On Mon, 1 Jan 2001, Eli Zaretskii wrote:

> [This probably should have been sent to emacs-pretest-bug, unless
> you don't think v21.1 should bother about these problems.]

Oops.  Sorry.  Hm.  I thought if it's a question, don't send it to the
bug reports list.

> How do you compile and link applications which need these libraries,
> on that machine?  Do you also need to set those *_PATH variables and
> use -I, -L and -R?

I'm fairly sure it is sufficient to provide the right -I flags to the
compiler and the -L and -R flags to the linker.  (It's a Solaris 2.6
box with gcc 2.95.2, and except for the strangs paths there is nothing
unusual about this box I think.)

I think I needed the C_INCLUDE_PATH and LD_LIBRARY_PATH variables only
so that ./configure finds the libraries, because ./configure doesn't
use CFLAGS and LDFLAGS from its environment.

That is, when "LDFLAGS='-L/bla/lib' ./configure --with-foo" tries to
find libfoo, it does not call the linker with the "-L/bla/lib" command
line argument.


Yes.  The following works:

| # Libraries used by Emacs 21
| xpm_include=/app/unido-inf/sun4_56/libxpm/.std/include
| xpm_lib=/app/unido-inf/sun4_56/libxpm/.std/lib
| # for jpg, png, tiff
| jpg_include=/app/unido-inf/sun4_56/graphicenv/.std/include
| jpg_lib=/app/unido-inf/sun4_56/graphicenv/.std/lib
| # tiff
| tiff_include=/app/unido-inf/sun4_56/libtiff/3.5.1/include
| tiff_lib=/app/unido-inf/sun4_56/libtiff/3.5.1/lib
| #tiff_include=/app/unido-inf/sun4_56/img/.std/include
| #tiff_lib=/app/unido-inf/sun4_56/img/.std/lib
| # gif
| gif_include=/app/unido-inf/sun4_56/libgif/.std/include
| gif_lib=/app/unido-inf/sun4_56/libgif/.std/lib
| C_INCLUDE_PATH="${xpm_include}:${tiff_include}:${jpg_include}"
| LD_LIBRARY_PATH="${xpm_lib}:${tiff_lib}:${jpg_lib}"
| # Where to install
| prefix=/app/unido-i06/sun4_56/edit/emacs/21.0
| echo "==> Running configure"
| CFLAGS="-I${xpm_include} -I${tiff_include} -I${jpg_include}" \
| LDFLAGS="-L${xpm_lib} -R${xpm_lib} -L${tiff_lib} -R${tiff_lib} \
| -L${jpg_lib} -R${jpg_lib}" \
| ./configure --with-xpm --with-jpeg --with-tiff --with-gif --with-png \
| --prefix=${prefix}
| echo "==> Running make"
| make

"./configure" needs C_INCLUDE_PATH and LD_LIBRARY_PATH, but for "make
all", the CFLAGS and LDFLAGS setting is sufficient.


reply via email to

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