aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Seebach <peter.seebach@windriver.com>2013-01-30 16:58:46 -0600
committerPeter Seebach <peter.seebach@windriver.com>2013-01-30 17:00:43 -0600
commit956747636125cfe95d841c162d5411df22efb29e (patch)
tree46b2b69ac52b7579118cad206ca13fb0ebb253cb
parenta14fe9df8a7eefdb9b82dcefd5960a8a86e53738 (diff)
downloadpseudo-956747636125cfe95d841c162d5411df22efb29e.tar.gz
pseudo-956747636125cfe95d841c162d5411df22efb29e.tar.bz2
pseudo-956747636125cfe95d841c162d5411df22efb29e.zip
Add sqlite-lib setting.pseudo-1.4.2PSEUDO_1_4_2
There's a few circumstances where sqlite's libdir isn't the same as the directory name we want to use for libpseudo.so, so make it a separate setting. This may obviate the need for --with-static-sqlite. Signed-off-by: seebs <peter.seebach@windriver.com>
-rw-r--r--ChangeLog.txt4
-rw-r--r--Makefile.in3
-rwxr-xr-xconfigure17
3 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index cafdeba..75ba2d0 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,6 +1,10 @@
2013-01-30:
* (seebs) Subtle tweaks to avoid GLIBC_2.7 dependencies which
can cause trouble trying to copy libpseudo.so to older hosts.
+ * (seebs) add "with-sqlite-lib" to simplify cases where sqlite's
+ libdir computation differs from what we otherwise want; for
+ instance, with bitbake, we often end up wanting $lib = lib64,
+ but $sqlite_lib = lib.
2012-12-13:
* (seebs) tag 1.4.2.
diff --git a/Makefile.in b/Makefile.in
index c76e82e..f79d64b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -22,6 +22,7 @@ PREFIX=@PREFIX@
LIBDIR=@LIBDIR@
SUFFIX=@SUFFIX@
SQLITE=@SQLITE@
+SQLITE_LIB=@SQLITE_LIB@
BITS=@BITS@
ARCH_FLAGS=@ARCH_FLAGS@
MARK64=@MARK64@
@@ -38,7 +39,7 @@ CFLAGS_BASE=-pipe -std=gnu99 -Wall -W -Wextra
CFLAGS_CODE=-fPIC -D_LARGEFILE64_SOURCE -D_ATFILE_SOURCE $(ARCH_FLAGS)
CFLAGS_DEFS=-DPSEUDO_PREFIX='"$(PREFIX)"' -DPSEUDO_SUFFIX='"$(SUFFIX)"' -DPSEUDO_BINDIR='"$(BIN)"' -DPSEUDO_LIBDIR='"$(LIB)"' -DPSEUDO_LOCALSTATEDIR='"$(LOCALSTATE)"' -DPSEUDO_VERSION='"$(VERSION)"'
CFLAGS_DEBUG=-O2 -g
-CFLAGS_SQL=-L$(SQLITE)/$(LIB) -I$(SQLITE)/include $(RPATH)
+CFLAGS_SQL=-L$(SQLITE)/$(SQLITE_LIB) -I$(SQLITE)/include $(RPATH)
CFLAGS_PSEUDO=$(CFLAGS_BASE) $(CFLAGS_CODE) $(CFLAGS_DEFS) \
$(CFLAGS_DEBUG) $(CFLAGS_SQL)
diff --git a/configure b/configure
index c536f58..9cb7804 100755
--- a/configure
+++ b/configure
@@ -2,7 +2,7 @@
#
# configure, simulation of autoconf script, much simplified
#
-# Copyright (c) 2008-2012 Wind River Systems, Inc.
+# Copyright (c) 2008-2013 Wind River Systems, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the Lesser GNU General Public License version 2.1 as
@@ -36,6 +36,7 @@ usage()
echo >&2 " [--libdir=...]"
echo >&2 " [--suffix=...]"
echo >&2 " [--with-sqlite=...]"
+ echo >&2 " [--with-sqlite-lib=...]"
echo >&2 " [--enable-static-sqlite]"
echo >&2 " [--with-static-sqlite=...]"
echo >&2 " [--with-rpath=...|--without-rpath]"
@@ -65,13 +66,18 @@ do
use_maybe_rpath=false
;;
--enable-static-sqlite)
- sqlite_ldarg='$(SQLITE)/$(LIB)/libsqlite3.a'
+ sqlite_ldarg='$(SQLITE)/$(SQLITE_LIB)/libsqlite3.a'
use_maybe_rpath=false
;;
--with-sqlite=*)
opt_sqlite=${arg#--with-sqlite=}
# assign new value if unset
- maybe_rpath='-Wl,-R$(SQLITE)/$(LIB)'
+ maybe_rpath='-Wl,-R$(SQLITE)/$(SQLITE_LIB)'
+ ;;
+ --with-sqlite-lib=*)
+ opt_sqlite_lib=${arg#--with-sqlite-lib=}
+ # assign new value if unset
+ maybe_rpath='-Wl,-R$(SQLITE)/$(SQLITE_LIB)'
;;
--without-rpath)
opt_rpath=''
@@ -144,6 +150,10 @@ if [ "$opt_lib" = "$opt_libdir" ]; then
exit 1
fi
+if [ -z "$opt_sqlite_lib" ]; then
+ opt_sqlite_lib=$opt_lib
+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
@@ -168,6 +178,7 @@ sed -e '
s,@SQLITE@,'"$opt_sqlite"',g
s,@ARCH_FLAGS@,'"$arch_flags"',g
s,@SQLITE_LDARG@,'"$sqlite_ldarg"',g
+ s,@SQLITE_LIB@,'"$opt_sqlite_lib"',g
s!@RPATH@!'"$opt_rpath"'!g
s,@MARK64@,'"$opt_mark64"',g
s,@ARCH@,'"$opt_arch"',g