[libdbi-drivers] fix "ld: cannot find -lsqlite" - try No. 3
Jan Pacner
jpacner at fedoraproject.org
Thu Jan 23 14:24:32 UTC 2014
commit bba97dc85bffae03eb2db6575a25ba284da66d2f
Author: Jan Pacner <jpacner at redhat.com>
Date: Thu Jan 23 15:24:48 2014 +0100
fix "ld: cannot find -lsqlite" - try No. 3
libdbi-drivers.spec | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libdbi-drivers.spec b/libdbi-drivers.spec
index 2443ac3..2c94095 100644
--- a/libdbi-drivers.spec
+++ b/libdbi-drivers.spec
@@ -58,16 +58,16 @@ does not require recompilation or rewriting source code.
%prep
%setup -q -n %{name}-%{version}
-
%patch1 -p1
+autoconf
# mariadb provides headers in a subfolder <mysql/mysql.h>
sed -i -r 's|<(mysql\.h)>|<mysql/\1>|' drivers/mysql/dbd_mysql.c
-
-autoconf
+# exporting LDFLAGS or LIBS or SQLITE3_LIBS before running autoconf or
+# ./configure doesn't help => hardcode it
+sed -i -r "s|(SQLITE3_LIBS=)-lsqlite[^[:space:]]*|\1$(pkg-config --libs-only-l sqlite3)|" \
+ configure
%build
-LIBS="$(pkg-config --libs-only-l sqlite3)"
-export LIBS
# configure is broken, must pass both --with-*sql-libdir _AND_
# --with-*sql-incdir in order for --with-*sql-libdir to be used
%configure --with-mysql --with-pgsql --with-sqlite3 \
More information about the scm-commits
mailing list