You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

186 lines
7.6 KiB

  1. diff -rupN libzdb-3.1.orig/configure.ac libzdb-3.1/configure.ac
  2. --- libzdb-3.1.orig/configure.ac 2015-08-31 14:46:02.000000000 +0200
  3. +++ libzdb-3.1/configure.ac 2016-04-18 19:43:13.836937134 +0200
  4. @@ -196,15 +196,6 @@ AC_SEARCH_LIBS([pthread_create], [pthrea
  5. # Database Libraries
  6. mysql="yes"
  7. -check_mysql_config()
  8. -{
  9. - AC_PATH_PROG([MYSQLCONFIG], [mysql_config], [no], [$PATH:/usr/local/bin:/usr/local/mysql/bin])
  10. - if test "x$MYSQLCONFIG" = "xno"
  11. - then
  12. - AC_MSG_WARN([mysql_config is required to build libzdb with mysql])
  13. - mysql="no"
  14. - fi
  15. -}
  16. AC_MSG_CHECKING(for mysql)
  17. AC_ARG_WITH([mysql],
  18. AS_HELP_STRING([--with-mysql(=<path>)],
  19. @@ -216,22 +207,20 @@ AC_ARG_WITH([mysql],
  20. mysql="no"
  21. else
  22. AC_MSG_RESULT([yes])
  23. - AC_CHECK_FILE([$with_mysql], [MYSQLCONFIG=$with_mysql], [check_mysql_config])
  24. fi
  25. ],
  26. [
  27. AC_MSG_RESULT([yes])
  28. - check_mysql_config
  29. ])
  30. if test "xyes" = "x$mysql"; then
  31. svd_CPPFLAGS=$CPPFLAGS
  32. svd_LDFLAGS=$LDFLAGS
  33. - CPPFLAGS="`$MYSQLCONFIG --include` $CPPFLAGS"
  34. - LDFLAGS="`$MYSQLCONFIG --libs` $LDFLAGS"
  35. + CPPFLAGS="-I$STAGING_DIR/usr/include/mysql $CPPFLAGS"
  36. + LDFLAGS="-L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib $LDFLAGS"
  37. AC_CHECK_HEADERS([mysql.h], [], [mysql="no"])
  38. if test "xyes" = "x$mysql"; then
  39. - DBCPPFLAGS="$DBCPPFLAGS `$MYSQLCONFIG --include`"
  40. - DBLDFLAGS="$DBLDFLAGS `$MYSQLCONFIG --libs`"
  41. + DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/mysql"
  42. + DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib/mysql -L$STAGING_DIR/usr/lib -lmysqlclient -liconv -lz -lcrypt -lm"
  43. AC_DEFINE([HAVE_LIBMYSQLCLIENT], 1, [Define to 1 to enable mysql])
  44. else
  45. CPPFLAGS=$svd_CPPFLAGS
  46. @@ -241,15 +230,6 @@ fi
  47. AM_CONDITIONAL([WITH_MYSQL], test "xyes" = "x$mysql")
  48. postgresql="yes"
  49. -check_postgres_config()
  50. -{
  51. - AC_PATH_PROG([PGCONFIG], [pg_config], [no], [$PATH:/usr/local/bin:/usr/local/pgsql/bin])
  52. - if test "x$PGCONFIG" = "xno"
  53. - then
  54. - AC_MSG_WARN([pg_config is required to build libzdb with postgresql])
  55. - postgresql="no"
  56. - fi
  57. -}
  58. AC_MSG_CHECKING(for postgresql)
  59. AC_ARG_WITH([postgresql],
  60. AS_HELP_STRING([--with-postgresql(=<path>)],
  61. @@ -261,22 +241,20 @@ AC_ARG_WITH([postgresql],
  62. postgresql="no"
  63. else
  64. AC_MSG_RESULT([yes])
  65. - AC_CHECK_FILE([$with_postgresql], [PGCONFIG=$with_postgresql],[check_postgres_config])
  66. fi
  67. ],
  68. [
  69. AC_MSG_RESULT([yes])
  70. - check_postgres_config
  71. ])
  72. if test "xyes" = "x$postgresql"; then
  73. svd_CPPFLAGS=$CPPFLAGS
  74. svd_LDFLAGS=$LDFLAGS
  75. - CPPFLAGS="-I`$PGCONFIG --includedir` $CPPFLAGS"
  76. - LDFLAGS="-L`$PGCONFIG --libdir` $LDFLAGS"
  77. + CPPFLAGS="-I$STAGING_DIR/usr/include/postgresql -I$STAGING_DIR/usr/include $CPPFLAGS"
  78. + LDFLAGS="-L$STAGING_DIR/usr/lib $LDFLAGS"
  79. AC_CHECK_HEADERS([libpq-fe.h], [], [postgresql="no"])
  80. if test "xyes" = "x$postgresql"; then
  81. - DBCPPFLAGS="$DBCPPFLAGS -I`$PGCONFIG --includedir`"
  82. - DBLDFLAGS="$DBLDFLAGS -L`$PGCONFIG --libdir` -lpq"
  83. + DBCPPFLAGS="$DBCPPFLAGS -I$STAGING_DIR/usr/include/postgresql -I$STAGING_DIR/usr/include"
  84. + DBLDFLAGS="$DBLDFLAGS -L$STAGING_DIR/usr/lib -lpq"
  85. AC_DEFINE([HAVE_LIBPQ], 1, [Define to 1 to enable postgresql])
  86. else
  87. CPPFLAGS=$svd_CPPFLAGS
  88. @@ -298,22 +276,7 @@ AC_ARG_WITH([sqlite],
  89. sqlite="no"
  90. else
  91. AC_MSG_RESULT([yes])
  92. - AC_CHECK_FILE([$with_sqlite],
  93. - [
  94. - svd_LDFLAGS=$LDFLAGS
  95. - svd_CPPFLAGS=$CPPFLAGS
  96. - LDFLAGS="-L$with_sqlite/lib $LDFLAGS"
  97. - CPPFLAGS="-I$with_sqlite/include $CPPFLAGS"
  98. - AC_SEARCH_LIBS([sqlite3_open], [sqlite3],
  99. - [
  100. - DBCPPFLAGS="$DBCPPFLAGS -I$with_sqlite/include"
  101. - DBLDFLAGS="$DBLDFLAGS -L$with_sqlite/lib/ -lsqlite3"
  102. - ],[sqlite="no"],[-ldl])
  103. - LDFLAGS=$svd_LDFLAGS
  104. - CPPFLAGS=$svd_CPPFLAGS
  105. -
  106. - ],
  107. - AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"], [-ldl]))
  108. + AC_SEARCH_LIBS([sqlite3_open], [sqlite3], [], [sqlite="no"])
  109. fi
  110. ],
  111. [
  112. @@ -328,20 +291,8 @@ if test "xyes" = "x$sqlite"; then
  113. fi
  114. AM_CONDITIONAL([WITH_SQLITE], test "xyes" = "x$sqlite")
  115. -oracle="yes"
  116. -AC_MSG_CHECKING(for oracle)
  117. -AX_LIB_ORACLE_OCI
  118. -if test -n "$ORACLE_OCI_CFLAGS" -a -n "$ORACLE_OCI_LDFLAGS"; then
  119. - DBCPPFLAGS="$DBCPPFLAGS $ORACLE_OCI_CFLAGS"
  120. - DBLDFLAGS="$DBLDFLAGS $ORACLE_OCI_LDFLAGS"
  121. - AC_DEFINE([HAVE_ORACLE], 1, [Define to 1 to enable oracle])
  122. -else
  123. - oracle="no"
  124. -fi
  125. -AM_CONDITIONAL([WITH_ORACLE], test "xyes" = "x$oracle")
  126. -
  127. # Test if any database system was found
  128. -if test "xno" = "x$postgresql" -a "xno" = "x$mysql" -a "xno" = "x$sqlite" -a "xno" = "x$oracle"; then
  129. +if test "xno" = "x$postgresql" -a "xno" = "x$mysql" -a "xno" = "x$sqlite"; then
  130. AC_MSG_ERROR([No available database found or selected. Try configure --help])
  131. fi
  132. @@ -358,23 +309,6 @@ AC_HEADER_STDC
  133. # Functions
  134. # ------------------------------------------------------------------------
  135. -# Require a working setjmp
  136. -AC_RUN_IFELSE([AC_LANG_PROGRAM([[
  137. - #include <setjmp.h>
  138. - ]],
  139. - [[jmp_buf env; setjmp(env);]])],
  140. - [], [AC_MSG_FAILURE([setjmp is required])]
  141. -)
  142. -
  143. -# Require that we have vsnprintf that conforms to c99. I.e. does bounds check
  144. -AC_RUN_IFELSE([AC_LANG_PROGRAM([[
  145. - #include <stdarg.h>
  146. - #include <stdio.h>
  147. - ]],
  148. - [[char t[1]; va_list ap; int n = vsnprintf(t, 1, "hello", ap); if(n == 5) return 0;return 1;]])],
  149. - [], [AC_MSG_FAILURE([vsnprintf does not conform to c99])]
  150. -)
  151. -
  152. AC_CHECK_FUNCS([timegm])
  153. @@ -516,11 +450,6 @@ echo "| PostgreSQL:
  154. else
  155. echo "| PostgreSQL: DISABLED |"
  156. fi
  157. -if test "xyes" = "x$oracle"; then
  158. -echo "| Oracle: ENABLED |"
  159. -else
  160. -echo "| Oracle: DISABLED |"
  161. -fi
  162. echo "+------------------------------------------------------------+"
  163. diff -rupN libzdb-3.1.orig/Makefile.am libzdb-3.1/Makefile.am
  164. --- libzdb-3.1.orig/Makefile.am 2015-08-31 14:55:18.000000000 +0200
  165. +++ libzdb-3.1/Makefile.am 2016-04-18 19:43:42.215769551 +0200
  166. @@ -45,11 +45,6 @@ libzdb_la_SOURCES += src/db/sqlite/SQLit
  167. src/db/sqlite/SQLiteResultSet.c \
  168. src/db/sqlite/SQLitePreparedStatement.c
  169. endif
  170. -if WITH_ORACLE
  171. -libzdb_la_SOURCES += src/db/oracle/OracleConnection.c \
  172. - src/db/oracle/OracleResultSet.c \
  173. - src/db/oracle/OraclePreparedStatement.c
  174. -endif
  175. API_INTERFACES = src/zdb.h src/db/ConnectionPool.h src/db/Connection.h \
  176. src/db/ResultSet.h src/net/URL.h src/db/PreparedStatement.h \