Index: config_office/configure.in
===================================================================
RCS file: /cvs/tools/config_office/configure.in,v
retrieving revision 1.232
retrieving revision 1.221.4.23
diff -u -u -r1.232 -r1.221.4.23
--- config_office/configure.in	26 Nov 2007 18:03:39 -0000	1.232
+++ config_office/configure.in	4 Dec 2007 23:46:26 -0000	1.221.4.23
@@ -1706,7 +1790,7 @@
     AC_CHECK_HEADER(security/pam_appl.h, [],
                     [AC_MSG_ERROR([pam_appl.h could not be found. libpam-dev or pam-devel missing?])], [])
     AC_MSG_CHECKING([whether to link to libpam])
-    if test -n "$enable_pam_link"; then
+    if test -n "$enable_pam_link" -a "$enable_pam_link" != "no"; then
       AC_MSG_RESULT([yes])
       PAM_LINK=YES
       AC_CHECK_LIB(pam, pam_start, [],
@@ -1729,7 +1813,7 @@
 
 if test "$_os" = "Linux"; then
     AC_MSG_CHECKING([whether to link to libcrypt])
-    if test -n "$enable_crypt_link"; then
+    if test -n "$enable_crypt_link" -a "$enable_crypt_link" != "no"; then
         AC_MSG_RESULT([yes])
         CRYPT_LINK=YES
         AC_CHECK_LIB(crypt, crypt, [],
@@ -3240,6 +3302,13 @@
    if test "z$HOME" = "z"; then
       export HOME="";
    fi
+   # bz2 tarball and bzip2 is not standard
+   if test -z "$BZIP2"; then
+	AC_PATH_PROG( BZIP2, bzip2)
+	if test -z "$BZIP2"; then
+   		AC_MSG_ERROR([the internal Python module has a .tar.bz2. You need bzip2])
+   	fi
+   fi
 fi
 AC_SUBST(SYSTEM_PYTHON)
 AC_SUBST(PYTHON_CFLAGS)
@@ -3263,7 +3332,7 @@
         ], []
     )
     AC_MSG_CHECKING([whether db is at least 4.1])
-    for v in 1 2 3 4 5; do
+    for v in 1 2 3 4 5 6; do
        AC_TRY_RUN([
 #include <db.h>
 
@@ -3578,7 +3645,7 @@
 AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity])
 if test "$enable_mozilla" = "no"; then
    AC_MSG_RESULT([no])
-elif test -n "$with_system_mozilla"; then
+elif test "$with_system_mozilla" = "yes"; then
    AC_MSG_RESULT([no, not possible with system-mozilla])
 else
    AC_MSG_RESULT([yes])
@@ -3587,8 +3654,6 @@
 AC_MSG_CHECKING([whether to build XML Security support])
 if test "$enable_mozilla" = "no"; then
    AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed])
-elif test "$with_system_mozilla" = "yes"; then
-   AC_MSG_RESULT([yes])
 else
    AC_MSG_RESULT([yes])
 fi
@@ -4021,7 +4087,7 @@
 dnl Check for system Xrender
 dnl ===================================================================
 AC_MSG_CHECKING([whether to link to Xrender])
-if test -n "$enable_xrender_link"; then
+if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then
    AC_MSG_RESULT([yes])
    XRENDER_LINK=YES
    with_system_xrender_headers=yes
@@ -5206,10 +5427,10 @@
    AC_MSG_RESULT([yes])
 elif test "$_os" = "Linux" -o "$_os" = "FreeBSD"; then
    if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then
-      # we have both versions, let the user decide but use the static one
+      # we have both versions, let the user decide but use the dynamic one
       # per default
       USE_XINERAMA=YES
-      if test -n "$with_dynamic_xinerama" -o -n "$with_system_libs"; then
+      if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then
          XINERAMA_LINK=dynamic
       else
          XINERAMA_LINK=static
