sqlite-3.6.12.dlsym.patch 9.9 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316
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,