aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2010-09-15 10:47:42 -0500
committerPeter Seebach <peter.seebach@windriver.com>2010-09-15 11:07:36 -0500
commite5c82673805290747db3607bc0e2645dcff105f6 (patch)
tree7347a4914e78078f570124c9fd9515f717fa139f /configure
parente3765ee9c9c2bccaa32fbe6426d4eb1bbcd214e7 (diff)
downloadpseudo-e5c82673805290747db3607bc0e2645dcff105f6.tar.gz
pseudo-e5c82673805290747db3607bc0e2645dcff105f6.tar.bz2
pseudo-e5c82673805290747db3607bc0e2645dcff105f6.zip
In the WR Linux build system, we build host tools (including pseudo)
in one place, but then often reuse them in other project directories. As a result, the --with-sqlite path is no longer the right path to use for RPATH later in the program's life. In the past, we were using chrpath to change the path to something more suitable, but this doesn't work if the new path is longer. Instead, allow an explicit --with-rpath setting which our build system can use. The logic is: * If you don't specify --with-sqlite or --with-rpath, you get no -Wl,-R * If you specify an empty path in --with-rpath, or --without-rpath, you get no -Wl,-R * If you specify --with-rpath with a non-empty path, you get -Wl,-R<path> * If you specify --with-sqlite, but not --with-rpath, you get -Wl,-R$(SQLITE)/lib
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure b/configure
index 08e2283..ea89d0b 100755
--- a/configure
+++ b/configure
@@ -26,7 +26,11 @@ opt_sqlite=/usr
usage()
{
echo >&2 "usage:"
- echo >&2 " configure --prefix=... [--suffix=...] [--with-sqlite=...] [--bits=32|64]"
+ echo >&2 " configure --prefix=..."
+ echo >&2 " [--suffix=...]"
+ echo >&2 " [--with-sqlite=...]"
+ echo >&2 " [--with-rpath=...|--without-rpath]"
+ echo >&2 " [--bits=32|64]"
exit 1
}
@@ -39,6 +43,15 @@ do
;;
--with-sqlite=*)
opt_sqlite=${arg#--with-sqlite=}
+ # assign new value if unset
+ : ${opt_rpath=-Wl,-R\$(SQLITE)/lib}
+ ;;
+ --without-rpath)
+ opt_rpath=''
+ ;;
+ --with-rpath=*)
+ rpath=${arg#--with-rpath=}
+ opt_rpath=${rpath:+-Wl,-R$rpath}
;;
--suffix=*)
opt_suffix=${arg#--suffix=}
@@ -82,6 +95,7 @@ sed -e '
s,@PREFIX@,'"$opt_prefix"',g
s,@SUFFIX@,'"$opt_suffix"',g
s,@SQLITE@,'"$opt_sqlite"',g
+ s!@RPATH@!'"$opt_rpath"'!g
s,@MARK64@,'"$opt_mark64"',g
s,@BITS@,'"$opt_bits"',g
' < Makefile.in > Makefile