aboutsummaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2011-05-02 16:39:02 -0400
committerColin Walters <walters@verbum.org>2011-05-02 16:44:12 -0400
commit4f4ae94cf96e38190b432923a9825ac527c1cfd8 (patch)
treea6066e9897f95adc73169082aa282695087a0985 /configure
parent0f9228c73bac3ce91066e2e948c12dafac47d459 (diff)
downloadpseudo-4f4ae94cf96e38190b432923a9825ac527c1cfd8.tar.gz
pseudo-4f4ae94cf96e38190b432923a9825ac527c1cfd8.tar.bz2
pseudo-4f4ae94cf96e38190b432923a9825ac527c1cfd8.zip
Accept --libdir
The way multilib works on at least Fedora is that --libdir=$prefix/lib64 is passed to configure. The source build system should not attempt to guess at architecture or take other configure flags (like --bits); instead it should default to whatever the given $(CC) does. This patch preserves the ability to specify --bits however.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 15 insertions, 1 deletions
diff --git a/configure b/configure
index ea89d0b..02778fc 100755
--- a/configure
+++ b/configure
@@ -19,14 +19,16 @@
#
# not a real configure script...
opt_prefix=
+opt_libdir=
opt_suffix=
-opt_bits=32
+opt_bits=
opt_sqlite=/usr
usage()
{
echo >&2 "usage:"
echo >&2 " configure --prefix=..."
+ echo >&2 " [--libdir=...]"
echo >&2 " [--suffix=...]"
echo >&2 " [--with-sqlite=...]"
echo >&2 " [--with-rpath=...|--without-rpath]"
@@ -41,6 +43,9 @@ do
--prefix=*)
opt_prefix=${arg#--prefix=}
;;
+ --libdir=*)
+ opt_libdir=${arg#--libdir=}
+ ;;
--with-sqlite=*)
opt_sqlite=${arg#--with-sqlite=}
# assign new value if unset
@@ -75,6 +80,14 @@ if [ -z "$opt_prefix" ]; then
usage
fi
+if [ -n "$opt_bits" ] && [ -n "$opt_libdir" ]; then
+ echo >&2 "Can not specify both --libdir and --bits"
+ exit 1
+fi
+if [ -z "$opt_libdir" ]; then
+ opt_libdir=$opt_prefix/lib$opt_mark64
+fi
+
if [ ! -f "${opt_sqlite}/include/sqlite3.h" ]; then
echo >&2 "SQLite3 headers not found in at ${opt_sqlite}/include/sqlite3.h. Please check that SQLite3 and SQLite3 headers are installed."
exit 1
@@ -93,6 +106,7 @@ fi
sed -e '
s,@PREFIX@,'"$opt_prefix"',g
+ s,@LIBDIR@,'"$opt_libdir"',g
s,@SUFFIX@,'"$opt_suffix"',g
s,@SQLITE@,'"$opt_sqlite"',g
s!@RPATH@!'"$opt_rpath"'!g