patch-configure 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  1. $Id$
  2. --- bogofilter-1.1.3.orig/configure 2006-12-03 05:17:15.000000000 +0100
  3. +++ bogofilter-1.1.3/configure 2007-03-29 19:27:35.000000000 +0200
  4. @@ -13464,238 +13464,55 @@ echo "${ECHO_T}$LIBDB" >&6; }
  5. saveLIBS="$LIBS"
  6. LIBS="$LIBS $LIBDB"
  7. - { echo "$as_me:$LINENO: checking if a program can be linked against Berkeley DB and run" >&5
  8. -echo $ECHO_N "checking if a program can be linked against Berkeley DB and run... $ECHO_C" >&6; }
  9. - if test "$cross_compiling" = yes; then
  10. - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
  11. -See \`config.log' for more details." >&5
  12. -echo "$as_me: error: cannot run test program while cross compiling
  13. -See \`config.log' for more details." >&2;}
  14. - { (exit 1); exit 1; }; }
  15. -else
  16. - cat >conftest.$ac_ext <<_ACEOF
  17. -/* confdefs.h. */
  18. -_ACEOF
  19. -cat confdefs.h >>conftest.$ac_ext
  20. -cat >>conftest.$ac_ext <<_ACEOF
  21. -/* end confdefs.h. */
  22. -
  23. +# AC_MSG_CHECKING(if a program can be linked against Berkeley DB and run)
  24. +# AC_RUN_IFELSE(
  25. +# AC_LANG_PROGRAM([[
  26. #ifdef HAVE_INTTYPES_H
  27. #include <inttypes.h>
  28. #endif
  29. #include <db.h>
  30. +# ]], [[
  31. +#return 0;
  32. +# ]]),,
  33. +# [AC_MSG_RESULT(no)
  34. +# AC_MSG_ERROR([Cannot run a program linked against libdb.
  35. +#Did you adjust your library search path to include your libdb?])],)
  36. +# AC_MSG_RESULT(yes)
  37. -int
  38. -main ()
  39. -{
  40. -
  41. -return 0;
  42. -
  43. - ;
  44. - return 0;
  45. -}
  46. -_ACEOF
  47. -rm -f conftest$ac_exeext
  48. -if { (ac_try="$ac_link"
  49. -case "(($ac_try" in
  50. - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  51. - *) ac_try_echo=$ac_try;;
  52. -esac
  53. -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  54. - (eval "$ac_link") 2>&5
  55. - ac_status=$?
  56. - echo "$as_me:$LINENO: \$? = $ac_status" >&5
  57. - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  58. - { (case "(($ac_try" in
  59. - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  60. - *) ac_try_echo=$ac_try;;
  61. -esac
  62. -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  63. - (eval "$ac_try") 2>&5
  64. - ac_status=$?
  65. - echo "$as_me:$LINENO: \$? = $ac_status" >&5
  66. - (exit $ac_status); }; }; then
  67. - :
  68. -else
  69. - echo "$as_me: program exited with status $ac_status" >&5
  70. -echo "$as_me: failed program was:" >&5
  71. -sed 's/^/| /' conftest.$ac_ext >&5
  72. -
  73. -( exit $ac_status )
  74. -{ echo "$as_me:$LINENO: result: no" >&5
  75. -echo "${ECHO_T}no" >&6; }
  76. - { { echo "$as_me:$LINENO: error: Cannot run a program linked against libdb.
  77. -Did you adjust your library search path to include your libdb?" >&5
  78. -echo "$as_me: error: Cannot run a program linked against libdb.
  79. -Did you adjust your library search path to include your libdb?" >&2;}
  80. - { (exit 1); exit 1; }; }
  81. -fi
  82. -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  83. -fi
  84. -
  85. -
  86. - { echo "$as_me:$LINENO: result: yes" >&5
  87. -echo "${ECHO_T}yes" >&6; }
  88. -
  89. - { echo "$as_me:$LINENO: checking if Berkeley DB header and library versions match" >&5
  90. -echo $ECHO_N "checking if Berkeley DB header and library versions match... $ECHO_C" >&6; }
  91. - rm -r -f bfadtestdir
  92. - mkdir bfadtestdir
  93. - if test "$cross_compiling" = yes; then
  94. - { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
  95. -See \`config.log' for more details." >&5
  96. -echo "$as_me: error: cannot run test program while cross compiling
  97. -See \`config.log' for more details." >&2;}
  98. - { (exit 1); exit 1; }; }
  99. -else
  100. - cat >conftest.$ac_ext <<_ACEOF
  101. -/* confdefs.h. */
  102. -_ACEOF
  103. -cat confdefs.h >>conftest.$ac_ext
  104. -cat >>conftest.$ac_ext <<_ACEOF
  105. -/* end confdefs.h. */
  106. -
  107. - #include <stdlib.h>
  108. - #include <stdio.h>
  109. +# dnl check if header and library of DB library match
  110. +# dnl ignore if cross compiling
  111. +# AC_MSG_CHECKING(if Berkeley DB header and library versions match)
  112. +# rm -r -f bfadtestdir
  113. +# mkdir bfadtestdir
  114. +# AC_RUN_IFELSE(
  115. +# AC_LANG_PROGRAM([[
  116. +# #include <stdlib.h>
  117. +# #include <stdio.h>
  118. #ifdef HAVE_INTTYPES_H
  119. #include <inttypes.h>
  120. #endif
  121. - #include <db.h>
  122. -
  123. -int
  124. -main ()
  125. -{
  126. -
  127. - int maj, min;
  128. - (void)db_version(&maj, &min, 0);
  129. - (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n",
  130. - DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min);
  131. - if (maj != DB_VERSION_MAJOR) exit(1);
  132. - if (min != DB_VERSION_MINOR) exit(1);
  133. - exit(0);
  134. -
  135. - ;
  136. - return 0;
  137. -}
  138. -_ACEOF
  139. -rm -f conftest$ac_exeext
  140. -if { (ac_try="$ac_link"
  141. -case "(($ac_try" in
  142. - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  143. - *) ac_try_echo=$ac_try;;
  144. -esac
  145. -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  146. - (eval "$ac_link") 2>&5
  147. - ac_status=$?
  148. - echo "$as_me:$LINENO: \$? = $ac_status" >&5
  149. - (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
  150. - { (case "(($ac_try" in
  151. - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  152. - *) ac_try_echo=$ac_try;;
  153. -esac
  154. -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  155. - (eval "$ac_try") 2>&5
  156. - ac_status=$?
  157. - echo "$as_me:$LINENO: \$? = $ac_status" >&5
  158. - (exit $ac_status); }; }; then
  159. - :
  160. -else
  161. - echo "$as_me: program exited with status $ac_status" >&5
  162. -echo "$as_me: failed program was:" >&5
  163. -sed 's/^/| /' conftest.$ac_ext >&5
  164. -
  165. -( exit $ac_status )
  166. -{ echo "$as_me:$LINENO: result: no" >&5
  167. -echo "${ECHO_T}no" >&6; }
  168. - { { echo "$as_me:$LINENO: error: db.h header file and db library version do not match." >&5
  169. -echo "$as_me: error: db.h header file and db library version do not match." >&2;}
  170. - { (exit 1); exit 1; }; }
  171. -fi
  172. -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
  173. -fi
  174. -
  175. -
  176. - { echo "$as_me:$LINENO: result: yes" >&5
  177. -echo "${ECHO_T}yes" >&6; }
  178. - { echo "$as_me:$LINENO: checking whether db_create is declared" >&5
  179. -echo $ECHO_N "checking whether db_create is declared... $ECHO_C" >&6; }
  180. -if test "${ac_cv_have_decl_db_create+set}" = set; then
  181. - echo $ECHO_N "(cached) $ECHO_C" >&6
  182. -else
  183. - cat >conftest.$ac_ext <<_ACEOF
  184. -/* confdefs.h. */
  185. -_ACEOF
  186. -cat confdefs.h >>conftest.$ac_ext
  187. -cat >>conftest.$ac_ext <<_ACEOF
  188. -/* end confdefs.h. */
  189. -#ifdef HAVE_INTTYPES_H
  190. +# #include <db.h>
  191. +# ]], [[
  192. +# int maj, min;
  193. +# (void)db_version(&maj, &min, 0);
  194. +# (void)fprintf(stderr, "headers: %d.%d, library: %d.%d\n",
  195. +# DB_VERSION_MAJOR, DB_VERSION_MINOR, maj, min);
  196. +# if (maj != DB_VERSION_MAJOR) exit(1);
  197. +# if (min != DB_VERSION_MINOR) exit(1);
  198. +# exit(0);
  199. +# ]]),,
  200. +# [AC_MSG_RESULT(no)
  201. +# AC_MSG_ERROR(db.h header file and db library version do not match.)],)
  202. +# AC_MSG_RESULT(yes)
  203. +# AC_CHECK_DECLS(db_create,,
  204. +# AC_MSG_ERROR([[Can not locate a suitable Berkeley DB db.h header file.
  205. +#Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
  206. +#You can download Berkeley DB 4.3.x from http://www.sleepycat.com/]]),
  207. +# [[#ifdef HAVE_INTTYPES_H
  208. #include <inttypes.h>
  209. #endif
  210. -#include <db.h>
  211. -
  212. -
  213. -int
  214. -main ()
  215. -{
  216. -#ifndef db_create
  217. - (void) db_create;
  218. -#endif
  219. -
  220. - ;
  221. - return 0;
  222. -}
  223. -_ACEOF
  224. -rm -f conftest.$ac_objext
  225. -if { (ac_try="$ac_compile"
  226. -case "(($ac_try" in
  227. - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
  228. - *) ac_try_echo=$ac_try;;
  229. -esac
  230. -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
  231. - (eval "$ac_compile") 2>conftest.er1
  232. - ac_status=$?
  233. - grep -v '^ *+' conftest.er1 >conftest.err
  234. - rm -f conftest.er1
  235. - cat conftest.err >&5
  236. - echo "$as_me:$LINENO: \$? = $ac_status" >&5
  237. - (exit $ac_status); } && {
  238. - test -z "$ac_c_werror_flag" ||
  239. - test ! -s conftest.err
  240. - } && test -s conftest.$ac_objext; then
  241. - ac_cv_have_decl_db_create=yes
  242. -else
  243. - echo "$as_me: failed program was:" >&5
  244. -sed 's/^/| /' conftest.$ac_ext >&5
  245. -
  246. - ac_cv_have_decl_db_create=no
  247. -fi
  248. -
  249. -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
  250. -fi
  251. -{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_db_create" >&5
  252. -echo "${ECHO_T}$ac_cv_have_decl_db_create" >&6; }
  253. -if test $ac_cv_have_decl_db_create = yes; then
  254. -
  255. -cat >>confdefs.h <<_ACEOF
  256. -#define HAVE_DECL_DB_CREATE 1
  257. -_ACEOF
  258. -
  259. -
  260. -else
  261. - cat >>confdefs.h <<_ACEOF
  262. -#define HAVE_DECL_DB_CREATE 0
  263. -_ACEOF
  264. -
  265. -{ { echo "$as_me:$LINENO: error: Can not locate a suitable Berkeley DB db.h header file.
  266. -Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
  267. -You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&5
  268. -echo "$as_me: error: Can not locate a suitable Berkeley DB db.h header file.
  269. -Use --with-libdb-prefix=PATH to specify the path to a v3+ install directory.
  270. -You can download Berkeley DB 4.3.x from http://www.sleepycat.com/" >&2;}
  271. - { (exit 1); exit 1; }; }
  272. -fi
  273. -
  274. -
  275. +#include <db.h>]]
  276. +# )
  277. { echo "$as_me:$LINENO: checking if Berkeley DB supports shared environments" >&5
  278. echo $ECHO_N "checking if Berkeley DB supports shared environments... $ECHO_C" >&6; }
  279. if test "x$enable_dbshared_test" != xno && test "x$USE_TRANSACTIONS" != xNO ; then