Commit 8e513ce5 authored by Frederic Peters's avatar Frederic Peters

[2.28] patch against sqlite for dlsym issue

SQLite when compiled with --enable-load-extension needs dlsym and
friends, but is not linked against libdl; add a patch (from Debian
bug #520466) to fix the issue. (GNOME #581262)
parent 2c5a26fb
......@@ -611,6 +611,7 @@
<branch module="sqlite-3.6.12.tar.gz" version="3.6.12"
repo="sqlite.org"
md5sum="13600865a69a3f54d2ac42a0d6b743db" size="2769510">
<patch file="sqlite-3.6.12.dlsym.patch" strip="1"/>
</branch>
</autotools>
......
diff -Naur sqlite-3.6.12.orig/configure sqlite-3.6.12/configure
--- sqlite-3.6.12.orig/configure 2009-04-01 01:48:57.000000000 +0200
+++ sqlite-3.6.12/configure 2009-05-04 09:12:45.815333164 +0200
@@ -910,6 +910,7 @@
enable_libtool_lock
enable_largefile
with_hints
+enable_load_extension
enable_threadsafe
enable_cross_thread_connections
enable_threads_override_locks
@@ -922,7 +923,6 @@
with_readline_inc
enable_debug
enable_amalgamation
-enable_load_extension
enable_gcov
'
ac_precious_vars='build_alias
@@ -1566,6 +1566,8 @@
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--disable-largefile omit support for large files
+ --enable-load-extension Include SQL functions for loading extension
+ libraries
--enable-threadsafe Support threadsafe operation
--enable-cross-thread-connections
Allow connection sharing across threads
@@ -2054,7 +2056,7 @@
# The following RCS revision string applies to configure.in
-# $Revision: 1.69 $
+# $Revision: 1.54 $
#########
# Programs needed
@@ -3725,13 +3727,13 @@
else
lt_cv_nm_interface="BSD nm"
echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:3728: $ac_compile\"" >&5)
+ (eval echo "\"\$as_me:3730: $ac_compile\"" >&5)
(eval "$ac_compile" 2>conftest.err)
cat conftest.err >&5
- (eval echo "\"\$as_me:3731: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval echo "\"\$as_me:3733: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
(eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
cat conftest.err >&5
- (eval echo "\"\$as_me:3734: output\"" >&5)
+ (eval echo "\"\$as_me:3736: output\"" >&5)
cat conftest.out >&5
if $GREP 'External.*some_variable' conftest.out > /dev/null; then
lt_cv_nm_interface="MS dumpbin"
@@ -4937,7 +4939,7 @@
;;
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 4940 "configure"' > conftest.$ac_ext
+ echo '#line 4942 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@@ -6790,11 +6792,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:6793: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:6795: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:6797: \$? = $ac_status" >&5
+ echo "$as_me:6799: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7129,11 +7131,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7132: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7134: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
- echo "$as_me:7136: \$? = $ac_status" >&5
+ echo "$as_me:7138: \$? = $ac_status" >&5
if (exit $ac_status) && test -s "$ac_outfile"; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings other than the usual output.
@@ -7234,11 +7236,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7237: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7239: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7241: \$? = $ac_status" >&5
+ echo "$as_me:7243: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -7289,11 +7291,11 @@
-e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
-e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
-e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7292: $lt_compile\"" >&5)
+ (eval echo "\"\$as_me:7294: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
- echo "$as_me:7296: \$? = $ac_status" >&5
+ echo "$as_me:7298: \$? = $ac_status" >&5
if (exit $ac_status) && test -s out/conftest2.$ac_objext
then
# The compiler can only warn and ignore the option if not recognized
@@ -10102,7 +10104,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10105 "configure"
+#line 10107 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10198,7 +10200,7 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10201 "configure"
+#line 10203 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12400,6 +12402,136 @@
##########
+# Do we want to support load_extension()?
+#
+# Check whether --enable-load-extension was given.
+if test "${enable_load_extension+set}" = set; then
+ enableval=$enable_load_extension;
+else
+ enable_load_extension=auto
+fi
+
+
+if test "x$enable_load_extension" = xyes ||
+ test "x$enable_load_extension" = xauto; then
+
+ can_load_extension=yes
+ # libtool will already have looked for <dlfcn.h>
+ if test $ac_cv_header_dlfcn_h = no; then
+ can_load_extension=no
+ else
+ { $as_echo "$as_me:$LINENO: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_dlopen=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then
+ :
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+else
+ can_load_extension=no
+fi
+
+ fi
+elif test "x$enable_load_extension" = xno; then
+ can_load_extension=no
+else
+ { { $as_echo "$as_me:$LINENO: error: invalid argument to --enable-load-extension" >&5
+$as_echo "$as_me: error: invalid argument to --enable-load-extension" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+if test $can_load_extension = no; then
+ if test "x$enable_load_extension" = xyes; then
+ { { $as_echo "$as_me:$LINENO: error: <dlfcn.h> routines missing, load_extension() not supported" >&5
+$as_echo "$as_me: error: <dlfcn.h> routines missing, load_extension() not supported" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+cat >>confdefs.h <<\_ACEOF
+#define SQLITE_OMIT_LOAD_EXTENSION 1
+_ACEOF
+
+fi
+
+##########
# Do we want to support multithreaded use of sqlite
#
# Check whether --enable-threadsafe was given.
diff -Naur sqlite-3.6.12.orig/configure.ac sqlite-3.6.12/configure.ac
--- sqlite-3.6.12.orig/configure.ac 2009-02-15 14:07:08.000000000 +0100
+++ sqlite-3.6.12/configure.ac 2009-05-04 09:12:22.277336345 +0200
@@ -224,6 +224,38 @@
AC_SUBST(BUILD_CC)
##########
+# Do we want to support load_extension()?
+#
+AC_ARG_ENABLE(load-extension,
+AC_HELP_STRING([--enable-load-extension],
+ [Include SQL functions for loading extension libraries]),,
+ enable_load_extension=auto)
+
+if test "x$enable_load_extension" = xyes ||
+ test "x$enable_load_extension" = xauto; then
+
+ can_load_extension=yes
+ # libtool will already have looked for <dlfcn.h>
+ if test $ac_cv_header_dlfcn_h = no; then
+ can_load_extension=no
+ else
+ AC_SEARCH_LIBS(dlopen, dl, , [can_load_extension=no])
+ fi
+elif test "x$enable_load_extension" = xno; then
+ can_load_extension=no
+else
+ AC_MSG_ERROR([invalid argument to --enable-load-extension])
+fi
+
+if test $can_load_extension = no; then
+ if test "x$enable_load_extension" = xyes; then
+ AC_MSG_ERROR([<dlfcn.h> routines missing, load_extension() not supported])
+ fi
+ AC_DEFINE(SQLITE_OMIT_LOAD_EXTENSION, 1,
+ [Define if the load_extension() sql function should be omitted.])
+fi
+
+##########
# Do we want to support multithreaded use of sqlite
#
AC_ARG_ENABLE(threadsafe,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment