3929bf3799
fixes: CVE-2008-2152: Different kinds of manipulated files may lead to heap overflows and arbitrary code execution
184 lines
9.1 KiB
Plaintext
184 lines
9.1 KiB
Plaintext
--- config_office/configure.in.orig.port Thu Jun 12 11:08:28 2008
|
|
+++ config_office/configure.in Thu Jun 12 11:08:29 2008
|
|
@@ -931,6 +931,16 @@ case "$build_os" in
|
|
echo "AIX is an alpha port --- Use at own risk" >> warn
|
|
_os=AIX
|
|
;;
|
|
+ openbsd*)
|
|
+ test_x=yes
|
|
+ test_gtk=yes
|
|
+ build_cairo=yes
|
|
+ test_kde=yes
|
|
+ test_cups=yes
|
|
+ PTHREAD_CFLAGS="-pthread -D_THREAD_SAFE"
|
|
+ PTHREAD_LIBS="-pthread"
|
|
+ _os=OpenBSD
|
|
+ ;;
|
|
*)
|
|
AC_MSG_ERROR([$_os operating system is not suitable to build OpenOffice.org!])
|
|
;;
|
|
@@ -2978,6 +2988,9 @@ if test "$_os" != "WINNT" -a \( "z$enable_epm" = "z" -
|
|
AIX)
|
|
PKGFORMAT=aix
|
|
;;
|
|
+ OpenBSD)
|
|
+ PKGFORMAT=portable
|
|
+ ;;
|
|
*BSD)
|
|
PKGFORMAT=bsd
|
|
;;
|
|
@@ -3306,7 +3319,7 @@ if test -n "$with_system_libwpd" -o -n "$with_system_l
|
|
test "$with_system_libwpd" != "no"; then
|
|
AC_MSG_RESULT([external])
|
|
SYSTEM_LIBWPD=YES
|
|
- PKG_CHECK_MODULES( LIBWPD, libwpd-0.8 )
|
|
+ PKG_CHECK_MODULES( LIBWPD, libwpd )
|
|
else
|
|
AC_MSG_RESULT([internal])
|
|
SYSTEM_LIBWPD=NO
|
|
@@ -3417,12 +3430,14 @@ if test -n "$with_system_python" && test "$with_system
|
|
|
|
python_include=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('INCLUDEPY');"`
|
|
python_version=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('VERSION');"`
|
|
+ python_libs=`$PYTHON -c "import distutils.sysconfig; print distutils.sysconfig.get_config_var('LIBS');"`
|
|
+
|
|
PYTHON_CFLAGS="-I$python_include"
|
|
|
|
if test "$_os" = "Darwin"; then
|
|
PYTHON_LIBS="-framework Python"
|
|
else
|
|
- PYTHON_LIBS="-lpython$python_version"
|
|
+ PYTHON_LIBS="-lpython$python_version $python_libs"
|
|
fi
|
|
|
|
dnl check if the headers really work:
|
|
@@ -3460,15 +3475,12 @@ if test -n "$with_system_db" -o -n "$with_system_libs"
|
|
test "$with_system_db" != "no"; then
|
|
SYSTEM_DB=YES
|
|
AC_MSG_RESULT([external])
|
|
- AC_CHECK_HEADER(db.h, [ DB_INCLUDES=/usr/include ],
|
|
- [
|
|
- CFLAGS=-I/usr/include/db4
|
|
- AC_CHECK_HEADER(db4/db.h,
|
|
- [ DB_INCLUDES=/usr/include/db4 ],
|
|
- [ AC_MSG_ERROR(no. install the db4 libraries) ], []+ )
|
|
- ], []
|
|
+ AC_CHECK_HEADER(db4/db.h, [ DB_INCLUDES=${prefix}/include/db4 ],
|
|
+ [ AC_MSG_ERROR(no. install the db4 libraries) ], []
|
|
)
|
|
AC_MSG_CHECKING([whether db is at least 4.1])
|
|
+ save_CXXFLAGS=$CXXFLAGS
|
|
+ CXXFLAGS=-I$DB_INCLUDES
|
|
for v in 1 2 3 4 5 6; do
|
|
AC_TRY_RUN([
|
|
#include <db.h>
|
|
@@ -3479,6 +3491,7 @@ int main(int argc, char **argv) {
|
|
}
|
|
], [DB_VERSION_MINOR=$v], [])
|
|
done
|
|
+ CXXFLAGS=$save_CXXFLAGS
|
|
if test "$DB_VERSION_MINOR" -gt "1"; then
|
|
AC_MSG_RESULT([OK])
|
|
DB_VERSION=4.$DB_VERSION_MINOR
|
|
@@ -4065,11 +4078,11 @@ if test -n "$with_system_icu" -o -n "$with_system_libs
|
|
if test -z "$SYSTEM_GENBRK"; then
|
|
AC_MSG_ERROR([\"genbrk\" not found in \$PATH, install the icu development tool \"genbrk"\])
|
|
fi
|
|
- AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin])
|
|
+ AC_PATH_PROG(SYSTEM_GENCCODE, genccode, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
|
|
if test -z "$SYSTEM_GENCCODE"; then
|
|
AC_MSG_ERROR([\"genccode\" not found in \$PATH, install the icu development tool \"genccode"\])
|
|
fi
|
|
- AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin])
|
|
+ AC_PATH_PROG(SYSTEM_GENCMN, gencmn, [], [$PATH:/usr/sbin:/sbin:/usr/local/sbin])
|
|
if test -z "$SYSTEM_GENCMN"; then
|
|
AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\])
|
|
fi
|
|
@@ -4162,7 +4175,7 @@ elif test "$_os" != "WINNT" ; then
|
|
AC_MSG_ERROR([No X includes found]) # Exit
|
|
fi
|
|
CFLAGS=$X_CFLAGS
|
|
- LDFLAGS="$X_LDFLAGS $X_LIBS"
|
|
+ LDFLAGS="$LDFLAGS $X_LDFLAGS $X_LIBS"
|
|
AC_CHECK_LIB(X11, XOpenDisplay, x_libs="-lX11 $X_EXTRA_LIBS", [AC_MSG_ERROR([X Development libraries not found])])
|
|
dnl Check if the XauDisposeAuth symbol is provided by libXau.
|
|
AC_CHECK_LIB(Xau, XauDisposeAuth, XAU_LIBS="-lXau", [])
|
|
@@ -4379,7 +4392,7 @@ if test -n "$with_system_openssl" -o -n "$with_system_
|
|
AC_MSG_RESULT([external])
|
|
# Mac OS builds should get out without extra stuff is the Mac porters'
|
|
# wish. And pkg-config is although Xcode ships a .pc for openssl
|
|
- if test "$_os" = "Darwin"; then
|
|
+ if test "$_os" = "Darwin" || test "$_os" = "OpenBSD"; then
|
|
OPENSSL_CFLAGS=
|
|
OPENSSL_LIBS="-lssl -lcrypto"
|
|
else
|
|
@@ -5261,42 +5274,23 @@ KDE_LIBS=""
|
|
MOC="moc"
|
|
if test "$test_kde" = "yes" -a "$ENABLE_KDE" = "TRUE" ; then
|
|
dnl Search paths for Qt and KDE
|
|
- if test "$build_cpu" != "x86_64" ; then
|
|
- qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include $x_includes"
|
|
- qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries"
|
|
- else
|
|
- qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib64/qt3/include /usr/lib64/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include $x_includes"
|
|
- qt_libdirs="$QTLIB /usr/local/qt/lib64 /usr/lib64/qt /usr/lib64 /usr/X11R6/lib64/X11/qt /usr/X11R6/lib64/qt /usr/lib64/qt3/lib64 /usr/lib64/qt/lib64 /usr/share/qt3/lib64 /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries"
|
|
- fi
|
|
+ qt_incdirs="$QTINC /usr/local/qt/include /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt3/include /usr/lib/qt/include /usr/share/qt3/include /usr/lib/qt3/include /usr/lib/qt/include $x_includes"
|
|
+ qt_libdirs="$QTLIB /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib /usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt3/lib /usr/lib/qt/lib /usr/share/qt3/lib $x_libraries"
|
|
if test -n "$QTDIR" ; then
|
|
qt_incdirs="$QTDIR/include $qt_incdirs"
|
|
- if test "$build_cpu" != "x86_64" ; then
|
|
- qt_libdirs="$QTDIR/lib $qt_libdirs"
|
|
- else
|
|
- qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs"
|
|
- fi
|
|
+ qt_libdirs="$QTDIR/lib $qt_libdirs"
|
|
fi
|
|
- if test "$build_cpu" != "x86_64" ; then
|
|
- kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
|
|
- kde_libdirs="/usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries"
|
|
- else
|
|
- kde_incdirs="/usr/lib64/kde/include /usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
|
|
- kde_libdirs="/usr/lib64/kde/lib64 /usr/local/kde/lib64 /usr/kde/lib64 /usr/lib64/kde /usr/lib64/kde3 /usr/lib64 /usr/X11R6/lib64 /usr/local/lib64 /opt/kde3/lib64 /opt/kde/lib64 /usr/X11R6/kde/lib64 /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries"
|
|
- fi
|
|
+ kde_incdirs="/usr/lib/kde/include /usr/local/kde/include /usr/local/include /usr/kde/include /usr/include/kde /usr/include /opt/kde3/include /opt/kde/include $x_includes"
|
|
+ kde_libdirs="/usr/local/lib /usr/lib/kde/lib /usr/local/kde/lib /usr/kde/lib /usr/lib/kde /usr/lib/kde3 /usr/lib /usr/X11R6/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib $x_libraries"
|
|
if test -n "$KDEDIR" ; then
|
|
- kde_incdirs="$KDEDIR/include $kde_incdirs"
|
|
- if test "$build_cpu" != "x86_64" ; then
|
|
- kde_libdirs="$KDEDIR/lib $kde_libdirs"
|
|
- else
|
|
- kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs"
|
|
- fi
|
|
+ kde_libdirs="$KDEDIR/lib $kde_libdirs"
|
|
fi
|
|
|
|
dnl What to test
|
|
qt_test_include="qstyle.h"
|
|
- qt_test_library="libqt-mt.so"
|
|
+ qt_test_library="libqt-mt.so*"
|
|
kde_test_include="ksharedptr.h"
|
|
- kde_test_library="libkdeui.so"
|
|
+ kde_test_library="libkdeui.so*"
|
|
|
|
dnl Check for Qt headers
|
|
AC_MSG_CHECKING([for Qt headers])
|
|
@@ -5317,7 +5311,7 @@ your Qt installation by exporting QTDIR before running
|
|
AC_MSG_CHECKING([for Qt libraries])
|
|
qt_libdir="no"
|
|
for qt_check in $qt_libdirs ; do
|
|
- if test -r "$qt_check/$qt_test_library" ; then
|
|
+ if test -r "`ls $qt_check/$qt_test_library | head -1`" ; then
|
|
qt_libdir="$qt_check"
|
|
break
|
|
fi
|
|
@@ -5353,7 +5347,7 @@ your KDE installation by exporting KDEDIR before runni
|
|
AC_MSG_CHECKING([for KDE libraries])
|
|
kde_libdir="no"
|
|
for kde_check in $kde_libdirs ; do
|
|
- if test -r "$kde_check/$kde_test_library" ; then
|
|
+ if test -r "`ls $kde_check/$kde_test_library | head -1`" ; then
|
|
kde_libdir="$kde_check"
|
|
break
|
|
fi
|