--- configure.in.orig.port Fri Oct 29 12:14:08 2010 +++ configure.in Mon Nov 8 23:57:18 2010 @@ -1047,6 +1047,18 @@ 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 + test_freetype=yes + test_randr=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!]) ;; @@ -2422,6 +2434,8 @@ dnl ================================================== DEFAULT_TO_STLPORT="yes" elif test "$_os" = "FreeBSD"; then DEFAULT_TO_STLPORT="yes" + elif test "$_os" = "OpenBSD"; then + DEFAULT_TO_STLPORT="no" fi if test "$DEFAULT_TO_STLPORT" = "yes"; then AC_MSG_RESULT([stlport]) @@ -3293,6 +3307,9 @@ if test "$enable_epm" = "yes"; then AIX) PKGFORMAT=aix ;; + OpenBSD) + PKGFORMAT=portable + ;; *BSD) PKGFORMAT=bsd ;; @@ -3767,8 +3784,9 @@ elif test -n "$with_system_python" -o -n "$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" - PYTHON_LIBS="-lpython$python_version" + PYTHON_LIBS="-lpython$python_version $python_libs" fi if test "$with_system_python" = "yes" ; then SYSTEM_PYTHON=YES @@ -3808,15 +3826,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_CPPFLAGS=$CPPFLAGS + CPPFLAGS=-I$DB_INCLUDES AC_TRY_RUN([ #include @@ -3825,6 +3840,7 @@ int main(int argc, char **argv) { else return 1; } ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([no. you need at least db 4.1])]) + CPPFLAGS=$save_CPPFLAGS AC_HAVE_LIBRARY(db, [], [AC_MSG_ERROR([db not installed or functional])], []) SCPDEFS="$SCPDEFS -DSYSTEM_DB" @@ -4703,11 +4719,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 @@ -4816,7 +4832,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", []) @@ -4994,7 +5010,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 @@ -6230,42 +6246,25 @@ 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/q +t3/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 /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/X11R6/lib /usr/local/lib /opt/kde3/lib /opt/kde/lib /usr/X11R6/kde/lib /usr/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 /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/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 /usr/lib64 $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]) @@ -6286,7 +6285,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 @@ -6323,7 +6322,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 @@ -6564,7 +6563,7 @@ AC_SUBST(WITHOUT_AFMS) AC_SUBST(SCPDEFS) AC_MSG_CHECKING([whether and how to use Xinerama]) -if test "$_os" = "Darwin"; then +if test "$_os" = "Darwin" -o "$_os" = "OpenBSD"; then USE_XINERAMA=YES XINERAMA_LINK=dynamic AC_MSG_RESULT([yes]) @@ -6733,7 +6732,6 @@ if test "$ANT_HOME" != "NO_ANT_HOME"; then AC_MSG_RESULT([Ant lib directory found.]) fi AC_SUBST(ANT_LIB) -fi ant_minver=1.6.0 # update for more extensions... @@ -6831,6 +6829,7 @@ location (/usr/share/java), specify its pathname via fi fi AC_SUBST(OOO_JUNIT_JAR) +fi AC_MSG_CHECKING([which languages to be built]) WITH_LANG="$with_lang"