[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
cross-compiling, RPATH, and DESTDIR vs. AC_ARG_WITH
From: |
Ray Lehtiniemi |
Subject: |
cross-compiling, RPATH, and DESTDIR vs. AC_ARG_WITH |
Date: |
Tue, 11 Jan 2005 12:52:47 -0700 |
User-agent: |
Mutt/1.5.6i |
greeting
i am having difficulty with my cross-development setup. i am
using:
crosstool-0.28-rc37 (i686-linux targetting arm-linux)
automake (GNU automake) 1.8.3
autoconf (GNU Autoconf) 2.59
ltmain.sh (GNU libtool) 1.5.2 (1.1220.2.60 2004/01/25 12:25:08)
and i use:
DESTDIR=/tmp/XXX
PREFIX=/home/foo
if i build a lib_LTLIBRARIES target (libprog1.la) in a package
(prog1) and install it into DESTDIR, it seems that i cannot use
that .la file to (properly) create a bin_PROGRAMS target (prog2)
in a second package (also called prog2).
the prog2 package has this scrap of m4 in the configure.ac:
AC_ARG_WITH([prog1],
AS_HELP_STRING([--with-prog1],
[use a particular prog1 tree]),
[ac_cv_use_prog1=$withval],
[ac_cv_use_prog1=.])
AC_SUBST(PROG1_DIR, $ac_cv_use_prog1)
and this Makefile.am:
bin_PROGRAMS = prog2
prog2_SOURCES = prog2.c
prog2_CPPFLAGS = -I$(PROG1_DIR)/include
prog2_LDFLAGS = $(PROG1_DIR)/lib/libprog1.la
if i then configure the prog2 package with '--with-prog1=${DESTDIR}/${PREFIX}',
the build works, and my executable gets installed into $DESTDIR/bin.
however, the final executable has this:
# armv5b-softfloat-linux-objdump -p /tmp/XXX/home/foo/bin/prog2
Dynamic Section:
NEEDED libprog1.so.0
NEEDED libc.so.6
RPATH /tmp/XXX//home/foo/lib
it seems to me that this RPATH entry in the final executable should
be "RPATH /home/foo/lib", no? how do i get rid of the DESTDIR in my
RPATH? how do i tell configure that libprog1.la just happens to be
sitting in DESTDIR at the moment, so build against PREFIX, not
DESTDIR/PREFIX?
please cc, as i'm not subscribed, thanks.
--
----------------------------------------------------------------------
Ray L <address@hidden>
- cross-compiling, RPATH, and DESTDIR vs. AC_ARG_WITH,
Ray Lehtiniemi <=