diff options
Diffstat (limited to 'configure.in')
-rwxr-xr-x | configure.in | 6962 |
1 files changed, 3526 insertions, 3436 deletions
diff --git a/configure.in b/configure.in index 3926aa249e88..1afc0459d64c 100755 --- a/configure.in +++ b/configure.in @@ -184,11 +184,6 @@ AC_ARG_ENABLE(cups, AS_HELP_STRING([--disable-cups], [Disable cups support in the psprint project.])) -AC_ARG_ENABLE(fontconfig, - AS_HELP_STRING([--disable-fontconfig], - [Disable support for the fontconfig library.]), -,enable_fontconfig=yes) - AC_ARG_ENABLE(directx, AS_HELP_STRING([--disable-directx], [Remove DirectX implementation for the new XCanvas interface. @@ -359,8 +354,8 @@ AC_ARG_ENABLE(kde4, AC_ARG_ENABLE(unix-qstart-libpng, AS_HELP_STRING([--disable-unix-qstart-libpng], [On UNIX systems, we have a faster splash app, that can use libpng to - render its splash, if we can safely link to the system libpng then - enabling this is a good idea (ie. for Linux Distro packaging).]), + render its splash, if we can safely link to the system libpng then + enabling this is a good idea (ie. for Linux Distro packaging).]), ,enable_unix_libpng=yes) AC_ARG_ENABLE(binfilter, @@ -447,27 +442,33 @@ AC_ARG_ENABLE(cl-x64, AC_ARG_ENABLE(extra-gallery, AS_HELP_STRING([--enable-extra-gallery], - [Add extra gallery content.]), + [Add extra gallery content.]), ,) AC_ARG_ENABLE(extra-template, AS_HELP_STRING([--enable-extra-template], - [Add extra template content.]), + [Add extra template content.]), ,) AC_ARG_ENABLE(extra-sample, AS_HELP_STRING([--enable-extra-sample], - [Add extra sample content.]), + [Add extra sample content.]), ,) AC_ARG_ENABLE(extra-font, AS_HELP_STRING([--enable-extra-font], - [Add extra font content.]), + [Add extra font content.]), ,) AC_ARG_ENABLE(lomenubar, AS_HELP_STRING([--enable-lomenubar], - [Enable global menu support.]), + [Enable global menu support.]), +,) + +AC_ARG_ENABLE(online-update, + AS_HELP_STRING([--enable-online-update], + [Enable the online update service that will check for new versions of + LibreOffice. By default, it is on on Windows and Mac, and off on Linux.]), ,) AC_ARG_ENABLE(release-build, @@ -503,8 +504,8 @@ AC_ARG_WITH(external-tar, AC_ARG_WITH(linked-git, AS_HELP_STRING([--with-linked-git=<OTHER_CLONE_DIR>], [Specify another checkout's clonedir to re-use. This makes use of - git-new-workdir, and saves a lot of diskspace when having multiple - trees side-by-side.]), + git-new-workdir, and saves a lot of diskspace when having multiple + trees side-by-side.]), GIT_LINK_SRC=$withval , ) @@ -532,13 +533,13 @@ AC_ARG_WITH(vba-package-format, AC_ARG_WITH(theme, AS_HELP_STRING([--with-theme="theme1 theme2..."], - [Choose which themes to include. By default those themes with an '*' are included. + [Choose which themes to include. By default those themes with an '*' are included. Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]), ,) AC_ARG_WITH(theme, AS_HELP_STRING([--with-theme="theme1 theme2..."], - [Choose which themes to include. By default those themes with an '*' are included. + [Choose which themes to include. By default those themes with an '*' are included. Possible choices: *default, *crystal, *hicontrast, *oxygen, *tango, classic, industrial.]), ,) @@ -578,9 +579,9 @@ AC_ARG_WITH(afms, AC_ARG_WITH(agfa-monotype-fonts, AS_HELP_STRING([--with-agfa-monotype-fonts], - [Do not include the proprietary Agfa Monotype fonts - (even if present) in the LibreOffice installation - set.]) + [This switch should only be enabled for those who have the right + to use or distribute the proprietary Agfa Monotype + fonts.]) ,) AC_ARG_WITH(epm, @@ -1293,16 +1294,17 @@ dnl =================================================================== AC_CANONICAL_SYSTEM if test "$cross_compiling" = "yes"; then - CROSS_COMPILING=YES + CROSS_COMPILING=YES else - CROSS_COMPILING= + CROSS_COMPILING= + BUILD_TYPE="$BUILD_TYPE NATIVE" fi AC_SUBST(CROSS_COMPILING) if test "$build_os" = "cygwin"; then - EXEEXT_FOR_BUILD=.exe + EXEEXT_FOR_BUILD=.exe else - EXEEXT_FOR_BUILD= + EXEEXT_FOR_BUILD= fi AC_SUBST(EXEEXT_FOR_BUILD) @@ -1311,8 +1313,8 @@ dnl check for required programs (grep, awk, sed, bash) dnl =================================================================== cat /dev/null > warn -if test "$EUID" -eq "0" -a "z`uname -o 2>/dev/null`" = "zCygwin" ; then - AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account]) +if test "z$EUID" = "z0" -a "z`uname -o 2>/dev/null`" = "zCygwin"; then + AC_MSG_ERROR([You must build LibreOffice as a normal user - not using an administrative account]) fi save_CC=$CC @@ -1322,27 +1324,27 @@ AC_PROG_EGREP AC_PROG_AWK AC_PATH_PROG( AWK, $AWK) if test -z "$AWK"; then - AC_MSG_ERROR([install awk to run this script]) + AC_MSG_ERROR([install awk to run this script]) fi AC_PATH_PROGS(SED, sed ) if test -z "$SED"; then - AC_MSG_ERROR([install sed to run this script]) + AC_MSG_ERROR([install sed to run this script]) fi AC_PATH_PROG(BASH, bash) if test -z "$BASH"; then - AC_MSG_ERROR([bash not found in \$PATH]) + AC_MSG_ERROR([bash not found in \$PATH]) fi AC_SUBST(BASH) AC_MSG_CHECKING([for GNU or BSD tar]) for a in $GNUTAR gtar gnutar tar; do - $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null - if test $? -eq 0; then - GNUTAR=$a - break - fi + $a --version 2> /dev/null | egrep "GNU|bsdtar" 2>&1 > /dev/null + if test $? -eq 0; then + GNUTAR=$a + break + fi done AC_MSG_RESULT($GNUTAR) if test -z "$GNUTAR"; then @@ -1361,186 +1363,220 @@ test_cups=yes test_fontconfig=yes case "$host_os" in - solaris*) - test_gtk=yes - build_gstreamer=yes - test_kde=yes - test_freetype=yes - test_gstreamer=yes - _os=SunOS - AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin) - if test -z "$GNUTAR"; then - AC_MSG_ERROR([gtar (GNU tar) not found but needed. Install it (Sun Freeware package).]) - fi - AC_SUBST(GNUTAR) - dnl =========================================================== - dnl Check whether we're using Solaris 6,7,8 - SPARC or Intel. - dnl =========================================================== - AC_MSG_CHECKING([the Solaris operating system release]) - _os_release=`echo $host_os | $SED -e s/solaris2\.//` - if test "$_os_release" -lt "6"; then - AC_MSG_ERROR([use Solaris >= 6 to build LibreOffice]) - else - AC_MSG_RESULT([ok ($_os_release)]) - fi +solaris*) + test_gtk=yes + build_gstreamer=yes + test_kde=yes + test_freetype=yes + test_gstreamer=yes + _os=SunOS + AC_PATH_PROG( GNUTAR, gtar,,$PATH:/usr/sfw/bin) + if test -z "$GNUTAR"; then + AC_MSG_ERROR([gtar (GNU tar) not found but needed. Install it (Sun Freeware package).]) + fi + AC_SUBST(GNUTAR) + + dnl =========================================================== + dnl Check whether we're using Solaris 6,7,8 - SPARC or Intel. + dnl =========================================================== + AC_MSG_CHECKING([the Solaris operating system release]) + _os_release=`echo $host_os | $SED -e s/solaris2\.//` + if test "$_os_release" -lt "6"; then + AC_MSG_ERROR([use Solaris >= 6 to build LibreOffice]) + else + AC_MSG_RESULT([ok ($_os_release)]) + fi - dnl Check whether we're using a SPARC or i386 processor - AC_MSG_CHECKING([the processor type]) - if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then - AC_MSG_RESULT([ok ($host_cpu)]) - else - AC_MSG_ERROR([only SPARC and i386 processors are supported]) - fi - ;; - linux-gnu*|k*bsd*-gnu*) - test_gtk=yes - build_gstreamer=yes - test_kde=yes - test_kde4=yes - test_freetype=yes - test_unix_quickstarter=yes - _os=Linux - ;; - gnu) - test_randr=no - test_cups=no - _os=GNU - ;; - cygwin*|interix*|mingw32*) - - # When building on Windows normally with MSVC under Cygwin, - # configure thinks that the host platform (the platform the - # built code will run on) is Cygwin, even if it obviously is - # Windows, which in Autoconf terminology is called - # "mingw32". (Which is misleading as MinGW is the name of the - # tool-chain, not an operating system.) - - # Somewhat confusing, yes. But this configure script doesn't - # look at $host etc that much, it mostly uses its own $_os - # variable, set here in this case statement. - - # When cross-compiling to Windows from Unix, the host platform - # is "mingw32" (because in that case it is the MinGW - # tool-chain that is used). - - test_cups=no - test_randr=no - test_freetype=no - test_fontconfig=no - _os=WINNT - # Confusingly, if the host OS matches "mingw32*", that means - # we are using the MinGW compiler, either natively (unlikely) - # or cross-compiling. We use WITH_MINGW to indicate - # use of MinGW in both cases. - case "$host_os" in - mingw32*) - WITH_MINGW=yes - ;; - esac - ;; - darwin*) # Mac OS X or iOS - test_gtk=yes - test_randr=no - test_freetype=no - test_fontconfig=no - if test "$host_cpu" = "arm"; then - _os=iOS - test_gtk=no - else - _os=Darwin - fi - enable_systray=no - ;; - freebsd*) - test_gtk=yes - build_gstreamer=yes - test_kde=yes - test_kde4=yes - test_freetype=yes - AC_MSG_CHECKING([the FreeBSD operating system release]) - if test -n "$with_os_version"; then - OSVERSION="$with_os_version" - else - OSVERSION=`/sbin/sysctl -n kern.osreldate` - fi - AC_MSG_RESULT([found OSVERSION=$OSVERSION]) - AC_MSG_CHECKING([which thread library to use]) - if test "$OSVERSION" -lt "500016"; then - PTHREAD_CFLAGS="-D_THREAD_SAFE" - PTHREAD_LIBS="-pthread" - elif test "$OSVERSION" -lt "502102"; then - PTHREAD_CFLAGS="-D_THREAD_SAFE" - PTHREAD_LIBS="-lc_r" - else - PTHREAD_CFLAGS="" - PTHREAD_LIBS="-pthread" - fi - AC_MSG_RESULT([$PTHREAD_LIBS]) - _os=FreeBSD - ;; - *netbsd*) - test_gtk=yes - build_gstreamer=yes - test_kde=no - test_kde4=yes - test_freetype=yes - PTHREAD_LIBS="-pthread -lpthread" - _os=NetBSD - ;; - aix*) - test_cups=no - test_randr=no - test_freetype=yes - PTHREAD_LIBS=-pthread - _os=AIX + dnl Check whether we're using a SPARC or i386 processor + AC_MSG_CHECKING([the processor type]) + if test "$host_cpu" = "sparc" -o "$host_cpu" = "i386"; then + AC_MSG_RESULT([ok ($host_cpu)]) + else + AC_MSG_ERROR([only SPARC and i386 processors are supported]) + fi + ;; + +linux-gnu*|k*bsd*-gnu*) + test_gtk=yes + build_gstreamer=yes + test_kde=yes + test_kde4=yes + test_freetype=yes + test_unix_quickstarter=yes + _os=Linux + ;; + +gnu) + test_randr=no + test_cups=no + _os=GNU + ;; + +cygwin*|interix*|mingw32*) + + # When building on Windows normally with MSVC under Cygwin, + # configure thinks that the host platform (the platform the + # built code will run on) is Cygwin, even if it obviously is + # Windows, which in Autoconf terminology is called + # "mingw32". (Which is misleading as MinGW is the name of the + # tool-chain, not an operating system.) + + # Somewhat confusing, yes. But this configure script doesn't + # look at $host etc that much, it mostly uses its own $_os + # variable, set here in this case statement. + + # When cross-compiling to Windows from Unix, the host platform + # is "mingw32" (because in that case it is the MinGW + # tool-chain that is used). + + test_cups=no + test_randr=no + test_freetype=no + test_fontconfig=no + _os=WINNT + # Confusingly, if the host OS matches "mingw32*", that means + # we are using the MinGW compiler, either natively (unlikely) + # or cross-compiling. We use WITH_MINGW to indicate + # use of MinGW in both cases. + case "$host_os" in + + mingw32*) + WITH_MINGW=yes ;; - openbsd*) - test_gtk=yes - test_kde=yes - test_freetype=yes + esac + ;; + +darwin*) # Mac OS X or iOS + test_gtk=yes + test_randr=no + test_freetype=no + test_fontconfig=no + if test "$host_cpu" = "arm"; then + _os=iOS + test_gtk=no + else + _os=Darwin + fi + enable_systray=no +;; + +freebsd*) + test_gtk=yes + build_gstreamer=yes + test_kde=yes + test_kde4=yes + test_freetype=yes + AC_MSG_CHECKING([the FreeBSD operating system release]) + if test -n "$with_os_version"; then + OSVERSION="$with_os_version" + else + OSVERSION=`/sbin/sysctl -n kern.osreldate` + fi + AC_MSG_RESULT([found OSVERSION=$OSVERSION]) + AC_MSG_CHECKING([which thread library to use]) + if test "$OSVERSION" -lt "500016"; then PTHREAD_CFLAGS="-D_THREAD_SAFE" PTHREAD_LIBS="-pthread" - _os=OpenBSD - ;; - dragonfly*) - test_gtk=yes - build_gstreamer=yes - test_kde=yes - test_kde4=yes - test_freetype=yes + elif test "$OSVERSION" -lt "502102"; then + PTHREAD_CFLAGS="-D_THREAD_SAFE" + PTHREAD_LIBS="-lc_r" + else + PTHREAD_CFLAGS="" PTHREAD_LIBS="-pthread" - _os=DragonFly - ;; - androideabi*) - build_gstreamer=no - test_cups=no - test_fontconfig=no - test_freetype=no - test_gtk=no - test_kde=no - test_kde4=no - test_randr=no - test_unix_quickstarter=no - _os=Android - ;; - *) - AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice!]) - ;; + fi + AC_MSG_RESULT([$PTHREAD_LIBS]) + _os=FreeBSD + ;; + +*netbsd*) + test_gtk=yes + build_gstreamer=yes + test_kde=no + test_kde4=yes + test_freetype=yes + PTHREAD_LIBS="-pthread -lpthread" + _os=NetBSD + ;; + +aix*) + test_cups=no + test_randr=no + test_freetype=yes + PTHREAD_LIBS=-pthread + _os=AIX + ;; + +openbsd*) + test_gtk=yes + test_kde=yes + test_freetype=yes + PTHREAD_CFLAGS="-D_THREAD_SAFE" + PTHREAD_LIBS="-pthread" + _os=OpenBSD + ;; + +dragonfly*) + test_gtk=yes + build_gstreamer=yes + test_kde=yes + test_kde4=yes + test_freetype=yes + PTHREAD_LIBS="-pthread" + _os=DragonFly + ;; + +androideabi*) + build_gstreamer=no + test_cups=no + test_fontconfig=no + test_freetype=no + test_gtk=no + test_kde=no + test_kde4=no + test_randr=no + test_unix_quickstarter=no + _os=Android + ;; + +*) + AC_MSG_ERROR([$host_os operating system is not suitable to build LibreOffice!]) + ;; esac +if test "$_os" = "AIX"; then + AC_PATH_PROG(GAWK, gawk) + if test -z "$GAWK"; then + AC_MSG_ERROR([gawk not found in \$PATH]) + fi +fi + AC_SUBST(WITH_MINGW) AC_SUBST(OSVERSION) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_LIBS) +dnl It is useful to have a BUILD_TYPE keyword to distinguish "normal" +dnl desktop OSes from "mobile" ones. + +dnl We assume that a non-DESKTOP build type is also a non-NATIVE one. +dnl In other words, that when building for an OS that is not a +dnl "desktop" one but a "mobile" one, we are always cross-compiling. + +dnl Note the direction of the implication; there is no assumption that +dnl cross-compiling would imply a non-desktop OS. + +if test $_os != iOS -a $_os != Android; then + BUILD_TYPE="$BUILD_TYPE DESKTOP" +fi + if test $build_os = "cygwin"; then - dnl =================================================================== - dnl If $CC is set to a MinGW compiler, set WITH_MINGW - dnl =================================================================== - if test "$WITH_MINGW" != "yes" -a -n "$CC" -a "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then - WITH_MINGW="yes" - fi + dnl =================================================================== + dnl If $CC is set to a MinGW compiler, set WITH_MINGW + dnl =================================================================== + if test "$WITH_MINGW" != "yes" -a -n "$CC" -a "`$CC -dumpmachine 2>/dev/null | $SED -e 's/^.*-//'`" = "mingw32"; then + WITH_MINGW="yes" + fi fi dnl =================================================================== @@ -1549,12 +1585,12 @@ dnl and g++ to build guw.exe although MSVC or MinGW is used to dnl build LibreOffice. dnl =================================================================== if test "build_os" = "cygwin" ; then - AC_MSG_CHECKING([for Cygwin gcc/g++]) - if which gcc > /dev/null && which g++ > /dev/null ; then - AC_MSG_RESULT([found]) - else - AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.]) - fi + AC_MSG_CHECKING([for Cygwin gcc/g++]) + if which gcc > /dev/null && which g++ > /dev/null ; then + AC_MSG_RESULT([found]) + else + AC_MSG_ERROR([Cygwin gcc and g++ are needed, please install them.]) + fi fi dnl =================================================================== @@ -1564,12 +1600,12 @@ dnl =================================================================== GCC_HOME_SET="true" AC_MSG_CHECKING([gcc home]) if test -z "$with_gcc_home"; then - if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then - GCC_HOME="/opt/icecream" - else - GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` - GCC_HOME_SET="false" - fi + if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then + GCC_HOME="/opt/icecream" + else + GCC_HOME=`which gcc | $SED -e s,/bin/gcc,,` + GCC_HOME_SET="false" + fi else GCC_HOME="$with_gcc_home" fi @@ -1577,17 +1613,17 @@ AC_MSG_RESULT($GCC_HOME) AC_SUBST(GCC_HOME) if test "$GCC_HOME_SET" = "true" ; then - if test -z "$CC"; then - CC="$GCC_HOME/bin/gcc" - fi - if test -z "$CXX"; then - CXX="$GCC_HOME/bin/g++" - fi + if test -z "$CC"; then + CC="$GCC_HOME/bin/gcc" + fi + if test -z "$CXX"; then + CXX="$GCC_HOME/bin/g++" + fi fi dnl The following checks for gcc, cc and then cl (if it weren't guarded for win32) if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then - AC_PROG_CC + AC_PROG_CC fi COMPATH=`dirname "$CC"` @@ -1603,52 +1639,45 @@ dnl Test the gcc version, 3 is OK dnl =================================================================== if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) -a "$GCC" = "yes"; then AC_MSG_CHECKING([the GNU C compiler version]) - _gcc_version=`$CC -dumpversion` - _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` - GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - - if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then - if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then - export CC=$GCC_HOME/bin/gcc-4.0 - dnl export CC to have it available in set_soenv -> config.guess - GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then - GCCVER=$GCCVER2 - fi - fi - if test "$GCCVER" -ge "040100" ; then - AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly]) - else - AC_MSG_RESULT([implicitly using CC=$CC]) - fi - else - AC_MSG_RESULT([checked (gcc $_gcc_version)]) - fi - if test "$_os" = "SunOS"; then - AC_MSG_CHECKING([gcc linker]) - if $CC -Wl,--version 2>&1 |head -n 1| grep -v GNU > /dev/null;then - AC_MSG_ERROR([failed (not GNU ld). Use GNU ld instead of Sun ld on Solaris]) - fi - AC_MSG_RESULT([ok (GNU ld)]) - fi + _gcc_version=`$CC -dumpversion` + _gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'` + GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + + if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then + if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then + export CC=$GCC_HOME/bin/gcc-4.0 + dnl export CC to have it available in set_soenv -> config.guess + GCCVER2=`"$CC" -dumpversion | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + if test "$GCCVER2" -ge "040000" -a "$GCCVER2" -lt "040100" ; then + GCCVER=$GCCVER2 + fi + fi + if test "$GCCVER" -ge "040100" ; then + AC_MSG_ERROR([You need to use the gcc-4.0 compiler (gcc $_gcc_version won't work with the MacOSX10.4u.sdk) - set CC accordingly]) + else + AC_MSG_RESULT([implicitly using CC=$CC]) + fi + else + AC_MSG_RESULT([checked (gcc $_gcc_version)]) + fi fi HAVE_LD_BSYMBOLIC_FUNCTIONS= if test "$GCC" = "yes"; then - AC_MSG_CHECKING( for -Bsymbolic-functions linker support ) - bsymbolic_functions_ldflags_save=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - #include <stdio.h> - ],[ - printf ("hello world\n"); - ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, []) - if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then - AC_MSG_RESULT( found ) - else - AC_MSG_RESULT( not found ) - fi - LDFLAGS=$bsymbolic_functions_ldflags_save + AC_MSG_CHECKING( for -Bsymbolic-functions linker support ) + bsymbolic_functions_ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,-Bsymbolic-functions -Wl,--dynamic-list-cpp-new -Wl,--dynamic-list-cpp-typeinfo" + AC_LINK_IFELSE([AC_LANG_PROGRAM([ +#include <stdio.h> + ],[ +printf ("hello world\n"); + ])], HAVE_LD_BSYMBOLIC_FUNCTIONS=TRUE, []) + if test "z$HAVE_LD_BSYMBOLIC_FUNCTIONS" = "zTRUE"; then + AC_MSG_RESULT( found ) + else + AC_MSG_RESULT( not found ) + fi + LDFLAGS=$bsymbolic_functions_ldflags_save fi AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS) @@ -1659,26 +1688,27 @@ dnl =================================================================== m4_pattern_allow([PKG_CONFIG_FOR_BUILD]) if test "$cross_compiling" = "yes"; then - AC_MSG_CHECKING([for BUILD platform configuration]) - echo - rm -rf CONF-FOR-BUILD Env.Build.sh - mkdir CONF-FOR-BUILD - tar cf - \ - configure \ - config.guess \ - oowintool \ - solenv/inc/minor.mk \ - solenv/inc/postset.mk \ - solenv/inc/langlist.mk \ - set_soenv.in \ - bootstrap.1 \ - post_download.in \ - ooo.lst.in \ - Makefile.in \ - bin/repo-list.in | (cd CONF-FOR-BUILD && tar xf -) - ( + AC_MSG_CHECKING([for BUILD platform configuration]) + echo + rm -rf CONF-FOR-BUILD Env.Build.sh + mkdir CONF-FOR-BUILD + tar cf - \ + configure \ + config.guess \ + oowintool \ + solenv/inc/minor.mk \ + solenv/inc/postset.mk \ + solenv/inc/langlist.mk \ + set_soenv.in \ + bootstrap.1 \ + post_download.in \ + ooo.lst.in \ + Makefile.in \ + bin/repo-list.in | (cd CONF-FOR-BUILD && tar xf -) + ( unset COM GUI GUIBASE OS CPU CPUNAME unset CC CXX SYSBASE CFLAGS + unset PYTHON_CFLAGS PYTHON_LIBS unset AR NM OBJDUMP PKG_CONFIG RANLIB STRIP test -n "$CC_FOR_BUILD" && export CC="$CC_FOR_BUILD" test -n "$CXX_FOR_BUILD" && export CXX="$CXX_FOR_BUILD" @@ -1689,42 +1719,43 @@ if test "$cross_compiling" = "yes"; then test $with_junit = no && sub_conf_opts="$sub_conf_opts --without-junit" test -n "$TARFILE_LOCATION" && sub_conf_opts="$sub_conf_opts --with-external-tar=$TARFILE_LOCATION" ./configure \ - --disable-mozilla \ - --disable-build-mozilla \ + --disable-mozilla \ + --disable-build-mozilla \ + --disable-zenity \ $sub_conf_opts \ - 2>&1 | sed -e 's/^/ /' + 2>&1 | sed -e 's/^/ /' test -f ./*Env.Set.sh 2>/dev/null || exit cp *Env.Set.sh ../Env.Build.sh . ./*Env.Set.sh for V in COM GUI GUIBASE OS CPU CPUNAME CC CXX GXX_INCLUDE_PATH MACOSX_DEPLOYMENT_TARGET INPATH OUTPATH \ SYSTEM_LIBXSLT; do - VV='$'$V - VV=`eval "echo $VV"` - if test -n "$VV"; then - line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}' - echo "$line" >>build-config - fi + VV='$'$V + VV=`eval "echo $VV"` + if test -n "$VV"; then + line=${V}_FOR_BUILD='${'${V}_FOR_BUILD:-$VV'}' + echo "$line" >>build-config + fi done for V in OUTDIR PATH SOLARINC SOLARLIB WORKDIR; do - VV='$'$V - VV=`eval "echo $VV"` - VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'` - if test -n "$VV"; then - line="${V}_FOR_BUILD='$VV'" - echo "$line" >>build-config - fi + VV='$'$V + VV=`eval "echo $VV"` + VV=`echo $VV | sed -e 's,/CONF-FOR-BUILD,,g'` + if test -n "$VV"; then + line="${V}_FOR_BUILD='$VV'" + echo "$line" >>build-config + fi done - ) - test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log]) - test -f Env.Build.sh || AC_MSG_ERROR([A file called Env.Build.sh was supposed to have been copied here, but it isn't found]) - perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh - eval `cat CONF-FOR-BUILD/build-config` - AC_MSG_RESULT([checking for BUILD platform configuration... done]) - rm -rf CONF-FOR-BUILD + ) + test -f CONF-FOR-BUILD/build-config || AC_MSG_ERROR([Running configure script for BUILD system failed, see CONF-FOR-BUILD/config.log]) + test -f Env.Build.sh || AC_MSG_ERROR([A file called Env.Build.sh was supposed to have been copied here, but it isn't found]) + perl -pi -e 's,/CONF-FOR-BUILD,,g' Env.Build.sh + eval `cat CONF-FOR-BUILD/build-config` + AC_MSG_RESULT([checking for BUILD platform configuration... done]) + rm -rf CONF-FOR-BUILD else - CC_FOR_BUILD="$CC" - CXX_FOR_BUILD="$CXX" + CC_FOR_BUILD="$CC" + CXX_FOR_BUILD="$CXX" fi AC_SUBST(COM_FOR_BUILD) AC_SUBST(GUI_FOR_BUILD) @@ -1747,13 +1778,13 @@ AC_SUBST(SOLARLIB_FOR_BUILD) AC_SUBST(WORKDIR_FOR_BUILD) if test -e solenv/inc/minor.mk; then - # Get UPD number from ./solenv/inc/minor.mk - UPD="`grep RSCVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" - AC_SUBST(UPD) - SOURCEVERSION="`grep SOURCEVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" - AC_SUBST(SOURCEVERSION) + # Get UPD number from ./solenv/inc/minor.mk + UPD="`grep RSCVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" + AC_SUBST(UPD) + SOURCEVERSION="`grep SOURCEVERSION= solenv/inc/minor.mk | $AWK -F"=" '{ print $2 }'`" + AC_SUBST(SOURCEVERSION) else - AC_MSG_ERROR([solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) + AC_MSG_ERROR([solenv/inc/minor.mk missing but needed for architecture/os detecion and proper environment script generation...]) fi dnl =================================================================== @@ -1761,12 +1792,12 @@ dnl Set the ENABLE_CRASHDUMP variable. dnl =================================================================== AC_MSG_CHECKING([whether to enable crashdump feature]) if test "$enable_crashdump" = "yes"; then - ENABLE_CRASHDUMP="TRUE" - BUILD_TYPE="$BUILD_TYPE CRASHREP" - AC_MSG_RESULT([yes]) + ENABLE_CRASHDUMP="TRUE" + BUILD_TYPE="$BUILD_TYPE CRASHREP" + AC_MSG_RESULT([yes]) else - ENABLE_CRASHDUMP="" - AC_MSG_RESULT([no]) + ENABLE_CRASHDUMP="" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_CRASHDUMP) @@ -1776,64 +1807,71 @@ dnl Windows specific tests and stuff dnl =================================================================== if test "$_os" = "WINNT"; then - dnl Include twain scanners - BUILD_TYPE="$BUILD_TYPE TWAIN" - - dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice. - AC_MSG_CHECKING([whether to build a 64-bit LibreOffice]) - if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then - CL_X64="" - AC_MSG_RESULT([no]) - else - CL_X64="TRUE" - AC_MSG_RESULT([yes]) - fi - AC_SUBST(CL_X64) - - AC_MSG_CHECKING([whether to use DirectX]) - if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then - ENABLE_DIRECTX="TRUE" - AC_MSG_RESULT([yes]) - else - ENABLE_DIRECTX="" - AC_MSG_RESULT([no]) - fi - AC_SUBST(ENABLE_DIRECTX) - - AC_MSG_CHECKING([whether to use ActiveX]) - if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then - DISABLE_ACTIVEX="" - AC_MSG_RESULT([yes]) - else - DISABLE_ACTIVEX="TRUE" - AC_MSG_RESULT([no]) - fi - AC_SUBST(DISABLE_ACTIVEX) - - AC_MSG_CHECKING([whether to use ATL]) - if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE" -o "$enable_atl" = ""; then - DISABLE_ATL="" - AC_MSG_RESULT([yes]) - else - DISABLE_ATL="TRUE" - AC_MSG_RESULT([no]) - fi - AC_SUBST(DISABLE_ATL) + dnl Include twain scanners + BUILD_TYPE="$BUILD_TYPE TWAIN" + + dnl Set the CL_X64 variable if we are building a 64-bit LibreOffice. + AC_MSG_CHECKING([whether to build a 64-bit LibreOffice]) + if test "z$enable_cl_x64" = "z" -o "$enable_cl_x64" = "no"; then + CL_X64="" + AC_MSG_RESULT([no]) + else + CL_X64="TRUE" + AC_MSG_RESULT([yes]) + fi + AC_SUBST(CL_X64) + AC_MSG_CHECKING([whether to use DirectX]) + if test "$enable_directx" = "yes" -o "$enable_directx" = ""; then + ENABLE_DIRECTX="TRUE" + AC_MSG_RESULT([yes]) + else + ENABLE_DIRECTX="" + AC_MSG_RESULT([no]) + fi + AC_SUBST(ENABLE_DIRECTX) + + AC_MSG_CHECKING([whether to use ActiveX]) + if test "$enable_activex" = "yes" -o "$enable_activex" = "TRUE" -o "$enable_activex" = ""; then + DISABLE_ACTIVEX="" + AC_MSG_RESULT([yes]) + else + DISABLE_ACTIVEX="TRUE" + AC_MSG_RESULT([no]) + fi + AC_SUBST(DISABLE_ACTIVEX) + + AC_MSG_CHECKING([whether to use ATL]) + if test "$enable_atl" = "yes" -o "$enable_atl" = "TRUE"; then + DISABLE_ATL="" + AC_MSG_RESULT([yes]) + elif test "$enable_atl" = ""; then + if test "$WITH_MINGW" = "yes"; then + DISABLE_ATL="TRUE" + AC_MSG_RESULT([no]) + else + DISABLE_ATL="" + AC_MSG_RESULT([yes]) + fi + else + DISABLE_ATL="TRUE" + AC_MSG_RESULT([no]) + fi + AC_SUBST(DISABLE_ATL) fi dnl Set the ENABLE_WERROR variable. (Activate --enable-werror) dnl =================================================================== AC_MSG_CHECKING([whether to turn warnings to errors]) if test -n "$enable_werror" && test "$enable_werror" != "no"; then - ENABLE_WERROR="TRUE" - AC_MSG_RESULT([yes]) - AC_MSG_WARN([Turning warnings to errors has no effect in modules or]) - AC_MSG_WARN([on platforms where it has been disabled explicitly]) - echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitly" >> warn + ENABLE_WERROR="TRUE" + AC_MSG_RESULT([yes]) + AC_MSG_WARN([Turning warnings to errors has no effect in modules or]) + AC_MSG_WARN([on platforms where it has been disabled explicitly]) + echo "Turning warnings to errors has no effect in modules or on platforms where it has been disabled explicitly" >> warn else - ENABLE_WERROR="FALSE" - AC_MSG_RESULT([no]) + ENABLE_WERROR="FALSE" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_WERROR) @@ -1841,28 +1879,31 @@ dnl Set the ENABLE_DEBUG variable. (Activate --enable-symbols) dnl =================================================================== AC_MSG_CHECKING([whether to do a debug build]) if test -n "$enable_debug" && test "$enable_debug" != "no"; then - ENABLE_DEBUG="TRUE" - enable_symbols="yes" - AC_MSG_RESULT([yes]) + ENABLE_DEBUG="TRUE" + ENABLE_DEBUG_STL="TRUE" + enable_symbols="yes" + AC_MSG_RESULT([yes]) else - ENABLE_DEBUG="FALSE" - AC_MSG_RESULT([no]) + ENABLE_DEBUG="FALSE" + ENABLE_DEBUG_STL="FALSE" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_DEBUG) +AC_SUBST(ENABLE_DEBUG_STL) dnl Set the ENABLE_DBGUTIL variable dnl =================================================================== AC_MSG_CHECKING([whether to build with additional debug utilities]) if test -n "$enable_dbgutil" && test "$enable_dbgutil" != "no"; then - PROEXT="" - PRODUCT="" - PROFULLSWITCH="" - AC_MSG_RESULT([yes]) + PROEXT="" + PRODUCT="" + PROFULLSWITCH="" + AC_MSG_RESULT([yes]) else - PRODUCT="full" - PROFULLSWITCH="product=full" - PROEXT=".pro" - AC_MSG_RESULT([no, full product build]) + PRODUCT="full" + PROFULLSWITCH="product=full" + PROEXT=".pro" + AC_MSG_RESULT([no, full product build]) fi AC_SUBST(PRODUCT) AC_SUBST(PROFULLSWITCH) @@ -1872,11 +1913,11 @@ dnl whether to include symbols into final build. dnl =================================================================== AC_MSG_CHECKING([whether to include symbols]) if test -n "$enable_symbols" -a "$enable_symbols" != "no"; then - ENABLE_SYMBOLS="TRUE" - AC_MSG_RESULT([yes]) + ENABLE_SYMBOLS="TRUE" + AC_MSG_RESULT([yes]) else - ENABLE_SYMBOLS= - AC_MSG_RESULT([no]) + ENABLE_SYMBOLS= + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_SYMBOLS) @@ -1884,16 +1925,16 @@ dnl Determine if the solver is to be stripped or not. dnl =================================================================== AC_MSG_CHECKING([whether to strip the solver or not.]) if test "z$enable_strip_solver" = "zno"; then - DISABLE_STRIP="TRUE" - AC_MSG_RESULT([no]) + DISABLE_STRIP="TRUE" + AC_MSG_RESULT([no]) else - if test -n "$ENABLE_SYMBOLS"; then - DISABLE_STRIP="TRUE" - AC_MSG_RESULT([no]) - else - DISABLE_STRIP= - AC_MSG_RESULT([yes]) - fi + if test -n "$ENABLE_SYMBOLS"; then + DISABLE_STRIP="TRUE" + AC_MSG_RESULT([no]) + else + DISABLE_STRIP= + AC_MSG_RESULT([yes]) + fi fi AC_SUBST(DISABLE_STRIP) @@ -1901,29 +1942,29 @@ dnl check for cups support dnl =================================================================== AC_MSG_CHECKING([whether to enable native cups support]) if test "$test_cups" = "yes" -a "z$enable_cups" != "zno"; then - ENABLE_CUPS="TRUE" - AC_MSG_RESULT([yes]) - AC_CHECK_LIB(cups, cupsPrintFiles) - AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H)) - if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then + ENABLE_CUPS="TRUE" + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(cups, cupsPrintFiles) + AC_CHECK_HEADER(cups/cups.h, AC_DEFINE(HAVE_CUPS_H)) + if test "$ac_cv_lib_cups_cupsPrintFiles" != "yes" -a "$ac_cv_header_cups_cups_h" != "yes"; then AC_MSG_ERROR([Could not find CUPS. Install libcupsys2-dev or cups???-devel.]) - fi + fi else - ENABLE_CUPS="" - AC_MSG_RESULT([no]) + ENABLE_CUPS="" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_CUPS) # check for fontconfig support -AC_MSG_CHECKING([whether to enable fontconfig support]) -if test "z$test_fontconfig" = "zyes" -a "z$enable_fontconfig" != "no"; then - ENABLE_FONTCONFIG="TRUE" - AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0]) +AC_MSG_CHECKING([whether we need fontconfig]) +if test "z$test_fontconfig" = "zyes"; then + ENABLE_FONTCONFIG="TRUE" + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES([FONTCONFIG], [fontconfig >= 2.2.0]) else - ENABLE_FONTCONFIG="" - AC_MSG_RESULT([no]) + ENABLE_FONTCONFIG="" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_FONTCONFIG) AC_SUBST(FONTCONFIG_CFLAGS) @@ -1932,13 +1973,12 @@ AC_SUBST(FONTCONFIG_LIBS) dnl whether to find & fetch external tarballs? dnl =================================================================== if test -z "$TARFILE_LOCATION"; then - TARFILE_LOCATION="DEFAULT" + TARFILE_LOCATION="DEFAULT" fi AC_SUBST(TARFILE_LOCATION) -if test "z$enable_fetch_external" != "zno" \ - && test -z "$with_system_libs" -a "$with_system_jars" != "no"; then - DO_FETCH_TARBALLS="YES" +if test "z$enable_fetch_external" != "zno" ; then + DO_FETCH_TARBALLS="YES" fi AC_SUBST(DO_FETCH_TARBALLS) @@ -1951,23 +1991,23 @@ dnl Disable legacy binary file formats filters dnl =================================================================== AC_MSG_CHECKING([whether to enable filters for legacy binary file formats (StarOffice 5.2)]) if test "$enable_binfilter" = "no"; then - WITH_BINFILTER="NO" - AC_MSG_RESULT([no]) + WITH_BINFILTER="NO" + AC_MSG_RESULT([no]) else - WITH_BINFILTER="YES" - BUILD_TYPE="$BUILD_TYPE BINFILTER" - AC_MSG_RESULT([yes]) + WITH_BINFILTER="YES" + BUILD_TYPE="$BUILD_TYPE BINFILTER" + AC_MSG_RESULT([yes]) fi AC_SUBST(WITH_BINFILTER) dnl Enable ugly pieces of code we're better off without dnl =================================================================== if test "$enable_ugly" = "yes"; then - BUILD_TYPE="$BUILD_TYPE DICTIONARIES" - SCPDEFS="$SCPDEFS -DWITH_UGLY" - ENABLE_UGLY=YES + BUILD_TYPE="$BUILD_TYPE DICTIONARIES" + SCPDEFS="$SCPDEFS -DWITH_UGLY" + ENABLE_UGLY=YES else - ENABLE_UGLY=NO + ENABLE_UGLY=NO fi AC_SUBST(ENABLE_UGLY) @@ -1976,9 +2016,9 @@ dnl Disable rpath in shared libraries? dnl =================================================================== AC_MSG_CHECKING([whether to use RPATH in shared libraries]) if test "$enable_rpath" = "no"; then - ENABLE_RPATH="no" + ENABLE_RPATH="no" else - ENABLE_RPATH="yes" + ENABLE_RPATH="yes" fi AC_MSG_RESULT([$ENABLE_RPATH]) AC_SUBST(ENABLE_RPATH) @@ -1987,12 +2027,12 @@ dnl Test whether to include MySpell dictionaries dnl =================================================================== AC_MSG_CHECKING([whether to include MySpell dictionaries]) if test -z "$with_myspell_dicts" || test "$with_myspell_dicts" = "yes"; then - AC_MSG_RESULT([yes]) - WITH_MYSPELL_DICTS=YES - BUILD_TYPE="$BUILD_TYPE DICTIONARIES" + AC_MSG_RESULT([yes]) + WITH_MYSPELL_DICTS=YES + BUILD_TYPE="$BUILD_TYPE DICTIONARIES" else - AC_MSG_RESULT([no]) - WITH_MYSPELL_DICTS=NO + AC_MSG_RESULT([no]) + WITH_MYSPELL_DICTS=NO fi AC_SUBST(WITH_MYSPELL_DICTS) @@ -2022,8 +2062,8 @@ if test -n "$with_system_dicts" -a "$with_system_dicts" = "yes"; then fi AC_MSG_RESULT([$THES_SYSTEM_DIR]) else - AC_MSG_RESULT([no]) - SYSTEM_DICTS=NO + AC_MSG_RESULT([no]) + SYSTEM_DICTS=NO fi AC_SUBST(SYSTEM_DICTS) AC_SUBST(DICT_SYSTEM_DIR) @@ -2035,20 +2075,20 @@ dnl Set the ENABLE_PCH variable. (Activate --enable-pch) dnl =================================================================== AC_MSG_CHECKING([whether to enable pch feature]) if test -n "$enable_pch" && test "$enable_pch" != "no"; then - if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then - ENABLE_PCH="TRUE" - AC_MSG_RESULT([yes]) + if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then + ENABLE_PCH="TRUE" + AC_MSG_RESULT([yes]) dnl There is no PCH support in GCC versions prior to this - elif test "$GCC" = "yes"; then - ENABLE_PCH="TRUE" - AC_MSG_RESULT([yes]) - else - ENABLE_PCH="" - AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) - fi -else - ENABLE_PCH="" - AC_MSG_RESULT([no]) + elif test "$GCC" = "yes"; then + ENABLE_PCH="TRUE" + AC_MSG_RESULT([yes]) + else + ENABLE_PCH="" + AC_MSG_WARN([Precompiled header not yet supported for your platform/compiler]) + fi +else + ENABLE_PCH="" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_PCH) @@ -2057,11 +2097,11 @@ dnl Search all the common names for GNU make dnl =================================================================== AC_MSG_CHECKING([for GNU make]) for a in "$MAKE" $GNUMAKE make gmake gnumake; do - $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null - if test $? -eq 0; then - GNUMAKE=$a - break - fi + $a --version 2> /dev/null | grep GNU 2>&1 > /dev/null + if test $? -eq 0; then + GNUMAKE=$a + break + fi done AC_MSG_RESULT($GNUMAKE) if test -z "$GNUMAKE"; then @@ -2074,7 +2114,7 @@ _make_longver=`echo $_make_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` if test "$_make_longver" -ge "038100" ; then AC_MSG_RESULT([$GNUMAKE $_make_version]) else - AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) + AC_MSG_ERROR([failed ($GNUMAKE version >= 3.81 needed]) fi AC_SUBST(GNUMAKE) @@ -2082,64 +2122,65 @@ dnl =================================================================== dnl Test the Solaris compiler version dnl =================================================================== if test "$_os" = "SunOS"; then - if test "$CC" = "cc"; then - AC_PATH_PROGS(_cc, cc) - COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` - AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) - dnl cc -V outputs to standard error!!!! - _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'` - _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` - _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` - if test "$_sunstudio_major" != "5"; then - AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) - else - _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` - if test "$_sunstudio_minor" = "false"; then + if test "$CC" = "cc"; then + AC_PATH_PROGS(_cc, cc) + COMPATH=`echo $_cc | $SED -n "s/\/bin\/cc//p"` + AC_MSG_CHECKING([the SunStudio C/C++ compiler version]) + dnl cc -V outputs to standard error!!!! + _sunstudio_string=`$CC -V 2>&1 | grep '^cc' | $SED -e 's/.* C //'` + _sunstudio_version=`echo $_sunstudio_string | $AWK '{ print $1 }'` + _sunstudio_major=`echo $_sunstudio_version | $AWK -F. '{ print $1 }'` + if test "$_sunstudio_major" != "5"; then AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) - else - dnl compiler will do - AC_MSG_RESULT([checked]) - fi - fi - fi + else + _sunstudio_minor=`echo $_sunstudio_version | $AWK -F. '{ if ($2 == 5) print "true"; else if ($2 == 7) print "true"; else if ($2 == 8) print "true"; else if ($2 == 9) print "true"; else print "false" }'` + if test "$_sunstudio_minor" = "false"; then + AC_MSG_ERROR([found version "$_sunstudio_version", use version 5.5, 5.7, 5.8 or 5.9 of the SunStudio C/C++ compiler]) + else + dnl compiler will do + AC_MSG_RESULT([checked]) + fi + fi + fi fi HAVE_LD_HASH_STYLE=FALSE WITH_LINKER_HASH_STYLE= AC_MSG_CHECKING( for --hash-style gcc linker support ) if test "$GCC" = "yes" ; then - if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then - hash_styles="gnu sysv" - elif test "$with_linker_hash_style" = "no" ; then - hash_styles= - else - hash_styles="$with_linker_hash_style" - fi - - for hash_style in $hash_styles ; do - test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue - hash_style_ldflags_save=$LDFLAGS - LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style" - - AC_LINK_IFELSE([AC_LANG_PROGRAM([ - #include <stdio.h> - ],[ - printf (""); - ])], - [ if ./conftest$EXEEXT; then - HAVE_LD_HASH_STYLE=TRUE - WITH_LINKER_HASH_STYLE=$hash_style - fi], - [HAVE_LD_HASH_STYLE=FALSE]) - LDFLAGS=$hash_style_ldflags_save - done - - if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then - AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE ) - else - AC_MSG_RESULT( no ) - fi - LDFLAGS=$hash_style_ldflags_save + if test -z "$with_linker_hash_style" -o "$with_linker_hash_style" = "yes" ; then + hash_styles="gnu sysv" + elif test "$with_linker_hash_style" = "no" ; then + hash_styles= + else + hash_styles="$with_linker_hash_style" + fi + + for hash_style in $hash_styles ; do + test "$HAVE_LD_HASH_STYLE" = "TRUE" && continue + hash_style_ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -Wl,--hash-style=$hash_style" + + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [ +#include <stdio.h> + ],[ +printf (""); + ])], + [ if ./conftest$EXEEXT; then + HAVE_LD_HASH_STYLE=TRUE + WITH_LINKER_HASH_STYLE=$hash_style + fi], + [HAVE_LD_HASH_STYLE=FALSE]) + LDFLAGS=$hash_style_ldflags_save + done + + if test "$HAVE_LD_HASH_STYLE" = "TRUE"; then + AC_MSG_RESULT( $WITH_LINKER_HASH_STYLE ) + else + AC_MSG_RESULT( no ) + fi + LDFLAGS=$hash_style_ldflags_save else AC_MSG_RESULT( no ) fi @@ -2150,15 +2191,15 @@ dnl =================================================================== dnl Check whether there's a Perl version available. dnl =================================================================== if test -z "$with_perl_home"; then - AC_PATH_PROG(PERL, perl) + AC_PATH_PROG(PERL, perl) else - test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"` - _perl_path="$with_perl_home/bin/perl" - if test -x "$_perl_path"; then - PERL=$_perl_path - else - AC_MSG_ERROR([$_perl_path not found]) - fi + test "$build_os" = "cygwin" && with_perl_home=`cygpath -u "$with_perl_home"` + _perl_path="$with_perl_home/bin/perl" + if test -x "$_perl_path"; then + PERL=$_perl_path + else + AC_MSG_ERROR([$_perl_path not found]) + fi fi dnl =================================================================== @@ -2166,15 +2207,15 @@ dnl Testing for Perl version 5 or greater. dnl $] is the Perl version variable, it is returned as an integer dnl =================================================================== if test "$PERL"; then - AC_MSG_CHECKING([the Perl version]) - ${PERL} -e "exit($]);" - _perl_version=$? - if test "$_perl_version" -lt 5; then - AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) - fi - AC_MSG_RESULT([checked (perl $_perl_version)]) + AC_MSG_CHECKING([the Perl version]) + ${PERL} -e "exit($]);" + _perl_version=$? + if test "$_perl_version" -lt 5; then + AC_MSG_ERROR([found Perl version "$_perl_version", use version 5 of Perl]) + fi + AC_MSG_RESULT([checked (perl $_perl_version)]) else - AC_MSG_ERROR([Perl not found, install version 5 of Perl]) + AC_MSG_ERROR([Perl not found, install version 5 of Perl]) fi AC_SUBST(PERL) @@ -2183,7 +2224,7 @@ dnl Testing for required Perl modules dnl =================================================================== AC_MSG_CHECKING([for required Perl modules]) -if `$PERL -e 'use Archive::Zip;'`; then +if `$PERL -e 'use Archive::Zip; use Cwd;'`; then AC_MSG_RESULT([all modules found]) else AC_MSG_ERROR([Failed to find some modules]) @@ -2284,7 +2325,7 @@ if test "$_os" = "WINNT"; then export INCLUDE=`cygpath -d "$COMPATH/Include"` dnl Check which Microsoft C/C++ compiler is found AC_MSG_CHECKING([the Version of Microsoft C/C++ Compiler]) - # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out. + # The following finds Microsoft, matches nn.nn.nnnn then pulls numbers out. CCNUMVER=`$CC 2>&1 | $AWK "/Microsoft/ && /..\\...\\...../ { x = match( \\\$0, /..\\...\\...../ ) CCversion = substr( \\\$0, RSTART, RLENGTH) @@ -2320,52 +2361,52 @@ if test "$_os" = "WINNT"; then AC_MSG_RESULT(["$SHOWINCLUDES_PREFIX"]) fi - # Check for 64-bit (cross-)compiler to use to build the 64-bit - # version of the Explorer extension (and maybe other small - # bits, too) needed when installing a 32-bit LibreOffice on a - # 64-bit OS. The 64-bit Explorer extension is a feature that - # has been present since long in OOo. Don't confuse it with - # building LibreOffice itself as 64-bit code, which is - # unfished work and highly experimental. - - BUILD_X64= - CC_X64_BINARY= - LINK_X64_BINARY= - LIBMGR_X64_BINARY= - - if test "$CL_X64" = ""; then - AC_MSG_CHECKING([for a x64 compiler]) - - # Prefer native x64 compiler to cross-compiler, in case we are running - # the build on a 64-bit OS. - if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then - BUILD_X64=TRUE - CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe" - CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe" - LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe" - LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe" - elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then - BUILD_X64=TRUE - CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe" - CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe" - LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe" - LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe" - fi - if test "$BUILD_X64" = TRUE; then - AC_MSG_RESULT([found]) - else - AC_MSG_RESULT([not found]) - AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension]) - fi - fi - AC_SUBST(BUILD_X64) - - # These are passed to the environment through set_soenv.in as usual, and then - # used in set_wntx64.mk - AC_SUBST(CC_X64_BINARY) - AC_SUBST(CXX_X64_BINARY) - AC_SUBST(LINK_X64_BINARY) - AC_SUBST(LIBMGR_X64_BINARY) + # Check for 64-bit (cross-)compiler to use to build the 64-bit + # version of the Explorer extension (and maybe other small + # bits, too) needed when installing a 32-bit LibreOffice on a + # 64-bit OS. The 64-bit Explorer extension is a feature that + # has been present since long in OOo. Don't confuse it with + # building LibreOffice itself as 64-bit code, which is + # unfished work and highly experimental. + + BUILD_X64= + CC_X64_BINARY= + LINK_X64_BINARY= + LIBMGR_X64_BINARY= + + if test "$CL_X64" = ""; then + AC_MSG_CHECKING([for a x64 compiler]) + + # Prefer native x64 compiler to cross-compiler, in case we are running + # the build on a 64-bit OS. + if "$with_cl_home/bin/amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then + BUILD_X64=TRUE + CC_X64_BINARY="$with_cl_home/bin/amd64/cl.exe" + CXX_X64_BINARY="$with_cl_home/bin/amd64/cl.exe" + LINK_X64_BINARY="$with_cl_home/bin/amd64/link.exe" + LIBMGR_X64_BINARY="$with_cl_home/bin/amd64/lib.exe" + elif "$with_cl_home/bin/x86_amd64/cl.exe" -? </dev/null >/dev/null 2>&1; then + BUILD_X64=TRUE + CC_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe" + CXX_X64_BINARY="$with_cl_home/bin/x86_amd64/cl.exe" + LINK_X64_BINARY="$with_cl_home/bin/x86_amd64/link.exe" + LIBMGR_X64_BINARY="$with_cl_home/bin/x86_amd64/lib.exe" + fi + if test "$BUILD_X64" = TRUE; then + AC_MSG_RESULT([found]) + else + AC_MSG_RESULT([not found]) + AC_MSG_WARN([Installation set will not contain the 64-bit Explorer extension]) + fi + fi + AC_SUBST(BUILD_X64) + + # These are passed to the environment through set_soenv.in as usual, and then + # used in set_wntx64.mk + AC_SUBST(CC_X64_BINARY) + AC_SUBST(CXX_X64_BINARY) + AC_SUBST(LINK_X64_BINARY) + AC_SUBST(LIBMGR_X64_BINARY) else AC_MSG_CHECKING([the compiler is MinGW]) @@ -2396,19 +2437,19 @@ fi if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then - # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache - # /path/to/compiler/foo-gcc" you need to set the AR etc env vars - # explicitly. Or put /path/to/compiler in PATH yourself. + # If you use CC=/path/to/compiler/foo-gcc or even CC="ccache + # /path/to/compiler/foo-gcc" you need to set the AR etc env vars + # explicitly. Or put /path/to/compiler in PATH yourself. - AC_CHECK_TOOL(AR,ar) - AC_CHECK_TOOL(NM,nm) - AC_CHECK_TOOL(OBJDUMP,objdump) - AC_CHECK_TOOL(RANLIB,ranlib) - AC_CHECK_TOOL(STRIP,strip) - if test "$_os" = "WINNT"; then - AC_CHECK_TOOL(DLLTOOL,dlltool) - AC_CHECK_TOOL(WINDRES,windres) - fi + AC_CHECK_TOOL(AR,ar) + AC_CHECK_TOOL(NM,nm) + AC_CHECK_TOOL(OBJDUMP,objdump) + AC_CHECK_TOOL(RANLIB,ranlib) + AC_CHECK_TOOL(STRIP,strip) + if test "$_os" = "WINNT"; then + AC_CHECK_TOOL(DLLTOOL,dlltool) + AC_CHECK_TOOL(WINDRES,windres) + fi fi AC_SUBST(AR) AC_SUBST(DLLTOOL) @@ -2424,18 +2465,18 @@ dnl pkg-config checks on Mac OS X dnl =================================================================== if test $_os = Darwin; then - AC_MSG_CHECKING([for bogus pkg-config]) - if test -n "$PKG_CONFIG"; then - if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then - AC_MSG_RESULT([yes, from Mono]) - else - AC_MSG_RESULT([yes, from unknown origin]) - fi - AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG]) - echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn - else - AC_MSG_RESULT([no]) - fi + AC_MSG_CHECKING([for bogus pkg-config]) + if test -n "$PKG_CONFIG"; then + if test "$PKG_CONFIG" = /usr/bin/pkg-config && ls -l /usr/bin/pkg-config | grep -q Mono.framework; then + AC_MSG_RESULT([yes, from Mono]) + else + AC_MSG_RESULT([yes, from unknown origin]) + fi + AC_MSG_WARN([This might have unexpected consequences, please consider hiding $PKG_CONFIG]) + echo "Having a $PKG_CONFIG might have unexpected consequences, please consider hiding it" >>warn + else + AC_MSG_RESULT([no]) + fi fi dnl =================================================================== @@ -2461,10 +2502,10 @@ if test "$build_os" = "cygwin"; then MIDL_PATH="$with_cl_home/../Common7/Tools/Bin" fi if test -z "$MIDL_PATH" ; then - vstest=`./oowintool --msvs-productdir`; - if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then - MIDL_PATH="$vstest/Common7/Tools/Bin" - fi + vstest=`./oowintool --msvs-productdir`; + if test -x "$vstest/Common7/Tools/Bin/midl.exe" ; then + MIDL_PATH="$vstest/Common7/Tools/Bin" + fi fi if test -z "$MIDL_PATH" ; then winsdktest=`./oowintool --windows-sdk-home` @@ -2492,7 +2533,7 @@ if test "$build_os" = "cygwin"; then else csctest=`./oowintool --csc-compilerdir`; if test -x "$csctest/csc.exe"; then - CSC_PATH="$csctest" + CSC_PATH="$csctest" fi fi if test ! -x "$CSC_PATH/csc.exe"; then @@ -2503,28 +2544,28 @@ if test "$build_os" = "cygwin"; then CSC_PATH=`cygpath -u "$CSC_PATH"` dnl Check mscoree.lib / .NET Framework dir - AC_MSG_CHECKING(.NET Framework) - if test -n "$with_dotnet_framework_home"; then + AC_MSG_CHECKING(.NET Framework) + if test -n "$with_dotnet_framework_home"; then with_dotnet_framework_home=`cygpath -u "$with_dotnet_framework_home"` - fi - if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then - DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home" - fi - if test -z "$DOTNET_FRAMEWORK_HOME" ; then - frametest=`./oowintool --dotnetsdk-dir` - if test -f "$frametest/lib/mscoree.lib"; then - DOTNET_FRAMEWORK_HOME="$frametest" - else - frametest=`./oowintool --windows-sdk-home` - if test -f "$frametest/lib/mscoree.lib"; then + fi + if test -f "$with_dotnet_framework_home/lib/mscoree.lib"; then + DOTNET_FRAMEWORK_HOME="$with_dotnet_framework_home" + fi + if test -z "$DOTNET_FRAMEWORK_HOME" ; then + frametest=`./oowintool --dotnetsdk-dir` + if test -f "$frametest/lib/mscoree.lib"; then + DOTNET_FRAMEWORK_HOME="$frametest" + else + frametest=`./oowintool --windows-sdk-home` + if test -f "$frametest/lib/mscoree.lib"; then DOTNET_FRAMEWORK_HOME="$frametest" - fi - fi - fi - if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then - AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home]) + fi fi - AC_MSG_RESULT(found) + fi + if test ! -f "$DOTNET_FRAMEWORK_HOME/lib/mscoree.lib"; then + AC_MSG_ERROR([mscoree.lib (.NET Framework) not found. Make sure you use --with-dotnet-framework-home]) + fi + AC_MSG_RESULT(found) # Convert to posix path with 8.3 filename restrictions ( No spaces ) DOTNET_FRAMEWORK_HOME=`cygpath -d "$DOTNET_FRAMEWORK_HOME"` DOTNET_FRAMEWORK_HOME=`cygpath -u "$DOTNET_FRAMEWORK_HOME"` @@ -2537,47 +2578,47 @@ dnl =================================================================== dnl Check if stdc headers are available excluding MSVC. dnl =================================================================== if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then - AC_HEADER_STDC + AC_HEADER_STDC fi if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then - dnl =================================================================== - dnl Find pre-processors. - dnl =================================================================== - - AC_PROG_CXXCPP - - dnl Check whether there's a C pre-processor. - dnl =================================================================== - dnl When using SunStudio compiler, there is a bug with the cc - dnl preprocessor, so use CC preprocessor as the cc preprocessor - dnl See Issuezilla #445. - dnl =================================================================== - if test "$_os" = "SunOS"; then - CPP=$CXXCPP - else - AC_PROG_CPP - fi - - dnl Find integral type sizes and alignments - - AC_CHECK_SIZEOF(long) - AC_CHECK_SIZEOF(short) - AC_CHECK_SIZEOF(int) - AC_CHECK_SIZEOF(long long) - AC_CHECK_SIZEOF(double) - AC_CHECK_SIZEOF(void*) - - SIZEOF_SHORT=$ac_cv_sizeof_short - SIZEOF_INT=$ac_cv_sizeof_int - SIZEOF_LONG=$ac_cv_sizeof_long - SIZEOF_LONGLONG=$ac_cv_sizeof_long_long - SIZEOF_DOUBLE=$ac_cv_sizeof_double - SIZEOF_POINTER=$ac_cv_sizeof_voidp - - dnl Allow build without AC_CHECK_ALIGNOF, grrr - m4_pattern_allow([AC_CHECK_ALIGNOF]) - m4_ifdef([AC_CHECK_ALIGNOF], + dnl =================================================================== + dnl Find pre-processors. + dnl =================================================================== + + AC_PROG_CXXCPP + + dnl Check whether there's a C pre-processor. + dnl =================================================================== + dnl When using SunStudio compiler, there is a bug with the cc + dnl preprocessor, so use CC preprocessor as the cc preprocessor + dnl See Issuezilla #445. + dnl =================================================================== + if test "$_os" = "SunOS"; then + CPP=$CXXCPP + else + AC_PROG_CPP + fi + + dnl Find integral type sizes and alignments + + AC_CHECK_SIZEOF(long) + AC_CHECK_SIZEOF(short) + AC_CHECK_SIZEOF(int) + AC_CHECK_SIZEOF(long long) + AC_CHECK_SIZEOF(double) + AC_CHECK_SIZEOF(void*) + + SIZEOF_SHORT=$ac_cv_sizeof_short + SIZEOF_INT=$ac_cv_sizeof_int + SIZEOF_LONG=$ac_cv_sizeof_long + SIZEOF_LONGLONG=$ac_cv_sizeof_long_long + SIZEOF_DOUBLE=$ac_cv_sizeof_double + SIZEOF_POINTER=$ac_cv_sizeof_voidp + + dnl Allow build without AC_CHECK_ALIGNOF, grrr + m4_pattern_allow([AC_CHECK_ALIGNOF]) + m4_ifdef([AC_CHECK_ALIGNOF], , [ dnl We know that the ALIGNOF_ variables are used only when cross-compiling @@ -2592,44 +2633,44 @@ if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then ]) ]) - AC_CHECK_ALIGNOF(short,[#include <stddef.h>]) - AC_CHECK_ALIGNOF(int,[#include <stddef.h>]) - AC_CHECK_ALIGNOF(long,[#include <stddef.h>]) - AC_CHECK_ALIGNOF(double,[#include <stddef.h>]) - - ALIGNOF_SHORT=$ac_cv_alignof_short - ALIGNOF_INT=$ac_cv_alignof_int - ALIGNOF_LONG=$ac_cv_alignof_long - ALIGNOF_DOUBLE=$ac_cv_alignof_double - - AC_C_BIGENDIAN - WORDS_BIGENDIAN=$ac_cv_c_bigendian - - dnl Check for large file support - AC_SYS_LARGEFILE - if test -n "$ac_cv_sys_file_offset_bits"; then - LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" - fi - if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then - LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" - fi -else - # Hardcode for MSVC - SIZEOF_SHORT=2 - SIZEOF_INT=4 - SIZEOF_LONG=4 - SIZEOF_LONGLONG=8 - if test "$CL_X64" = ""; then - SIZEOF_POINTER=4 - else - SIZEOF_POINTER=8 - fi - ALIGNOF_SHORT=2 - ALIGNOF_INT=4 - ALIGNOF_LONG=4 - ALIGNOF_DOUBLE=8 - WORDS_BIGENDIAN=no - LFS_CFLAGS='' + AC_CHECK_ALIGNOF(short,[#include <stddef.h>]) + AC_CHECK_ALIGNOF(int,[#include <stddef.h>]) + AC_CHECK_ALIGNOF(long,[#include <stddef.h>]) + AC_CHECK_ALIGNOF(double,[#include <stddef.h>]) + + ALIGNOF_SHORT=$ac_cv_alignof_short + ALIGNOF_INT=$ac_cv_alignof_int + ALIGNOF_LONG=$ac_cv_alignof_long + ALIGNOF_DOUBLE=$ac_cv_alignof_double + + AC_C_BIGENDIAN + WORDS_BIGENDIAN=$ac_cv_c_bigendian + + dnl Check for large file support + AC_SYS_LARGEFILE + if test -n "$ac_cv_sys_file_offset_bits"; then + LFS_CFLAGS="-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits" + fi + if test -n "$ac_cv_sys_large_files" && test "$ac_cv_sys_large_files" != "no"; then + LFS_CFLAGS="$LFS_CFLAGS -D_LARGE_FILES" + fi +else + # Hardcode for MSVC + SIZEOF_SHORT=2 + SIZEOF_INT=4 + SIZEOF_LONG=4 + SIZEOF_LONGLONG=8 + if test "$CL_X64" = ""; then + SIZEOF_POINTER=4 + else + SIZEOF_POINTER=8 + fi + ALIGNOF_SHORT=2 + ALIGNOF_INT=4 + ALIGNOF_LONG=4 + ALIGNOF_DOUBLE=8 + WORDS_BIGENDIAN=no + LFS_CFLAGS='' fi AC_SUBST(WORDS_BIGENDIAN) AC_SUBST(LFS_CFLAGS) @@ -2649,23 +2690,23 @@ dnl =================================================================== dnl Check if valgrind.h is available dnl =================================================================== if test "$cross_compiling" != "yes" -a "$enable_dbgutil" != "no"; then - dnl Test $prefix (currently only testing for /usr and /usr/local) - dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind - VALGRIND_CFLAGS="" - prev_cppflags=$CPPFLAGS - if test -z "$VALGRIND_CFLAGS"; then - CPPFLAGS="-I/usr/include/valgrind" - AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) - fi - if test -z "$VALGRIND_CFLAGS"; then - CPPFLAGS="-I/usr/local/include/valgrind" - AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) - fi - if test -n "$VALGRIND_CFLAGS"; then - CPPFLAGS=$VALGRIND_CFLAGS - AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) - fi - CPPFLAGS=$prev_cppflags + dnl Test $prefix (currently only testing for /usr and /usr/local) + dnl so that VALGRIND_CFLAGS = -I$prefix/include/valgrind + VALGRIND_CFLAGS="" + prev_cppflags=$CPPFLAGS + if test -z "$VALGRIND_CFLAGS"; then + CPPFLAGS="-I/usr/include/valgrind" + AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], [unset ac_cv_header_valgrind_h]) + fi + if test -z "$VALGRIND_CFLAGS"; then + CPPFLAGS="-I/usr/local/include/valgrind" + AC_CHECK_HEADER([valgrind.h], [VALGRIND_CFLAGS=$CPPFLAGS], []) + fi + if test -n "$VALGRIND_CFLAGS"; then + CPPFLAGS=$VALGRIND_CFLAGS + AC_CHECK_HEADER([memcheck.h], [], [VALGRIND_CFLAGS=""]) + fi + CPPFLAGS=$prev_cppflags fi AC_SUBST([VALGRIND_CFLAGS]) @@ -2673,65 +2714,64 @@ dnl =================================================================== dnl Testing for C++ compiler and version... dnl =================================================================== if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then - if test -n "$CC" -a -z "$CXX"; then - CXX="$CC" - fi + if test -n "$CC" -a -z "$CXX"; then + CXX="$CC" + fi fi dnl Autoconf 2.53 can do this test for cl.exe, 2.13 can't! if test "$_os" != "WINNT" -o "$WITH_MINGW" = "yes"; then - AC_PROG_CXX + AC_PROG_CXX fi dnl check if we are using a buggy version of g++ (currently 3.4.0, 3.4.1 and trunk) if test "$GXX" = "yes"; then - AC_MSG_CHECKING([the GNU C++ compiler version]) + AC_MSG_CHECKING([the GNU C++ compiler version]) - _gpp_version=`$CXX -dumpversion` - _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` + _gpp_version=`$CXX -dumpversion` + _gpp_majmin=`echo $_gpp_version | $AWK -F. '{ print \$1*100+\$2 }'` - if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then - if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then - CXX=$GCC_HOME/bin/g++-4.0 - _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'` - if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then - _gpp_majmin=$_gpp_majmin_2 - fi - fi - if test "$_gpp_majmin" -ge "401" ; then - AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly]) - else - AC_MSG_RESULT([implicitly using CXX=$CXX]) - fi - else - AC_MSG_RESULT([checked (g++ $_gpp_version)]) - fi - - if test "$_gpp_majmin" = "304"; then - AC_MSG_CHECKING([whether $CXX has the enum bug]) -AC_TRY_RUN([ -extern "C" void abort (void); -extern "C" void exit (int status); - -enum E { E0, E1, E2, E3, E4, E5 }; - -void -test (enum E e) -{ - if (e == E2 || e == E3 || e == E1) - exit (1); -} + if test "$_os" = "Darwin" -a "$_gpp_majmin" -ge "401" ; then + if test -z "$save_CXX" -a -x "$GCC_HOME/bin/g++-4.0" ; then + CXX=$GCC_HOME/bin/g++-4.0 + _gpp_majmin_2=`"$CXX" -dumpversion | $AWK -F. '{ print \$1*100+\$2 }'` + if test "$_gpp_majmin_2" -ge "400" -a "$_gpp_majmin_2" -lt "401" ; then + _gpp_majmin=$_gpp_majmin_2 + fi + fi + if test "$_gpp_majmin" -ge "401" ; then + AC_MSG_ERROR([You need to use the g++-4.0 compiler (g++ $_gpp_version won't work with the MacOSX10.4u.sdk) - set CXX accordingly]) + else + AC_MSG_RESULT([implicitly using CXX=$CXX]) + fi + else + AC_MSG_RESULT([checked (g++ $_gpp_version)]) + fi -int -main (void) -{ - test (E4); - test (E5); - test (E0); - return 0; -} -],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])]) - fi + if test "$_gpp_majmin" = "304"; then + AC_MSG_CHECKING([whether $CXX has the enum bug]) + AC_TRY_RUN([ + extern "C" void abort (void); + extern "C" void exit (int status); + + enum E { E0, E1, E2, E3, E4, E5 }; + + void test (enum E e) + { + if (e == E2 || e == E3 || e == E1) + exit (1); + } + + int main (void) + { + test (E4); + test (E5); + test (E0); + return 0; + } + ], + [AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents LibreOffice from being compiled correctly - please check http://gcc.gnu.org/ml/gcc-patches/2004-07/msg00968.html for details.])], [AC_MSG_RESULT([no])]) + fi fi dnl =================================================================== @@ -2740,31 +2780,31 @@ dnl =================================================================== # Removed the special FreeBSD treatment. The problem was that with_gxx_include_path # often contains an i386 which is expanded as a macro. if test "$GXX" = "yes"; then - AC_MSG_CHECKING([for g++ include path]) - if test -z "$with_gxx_include_path"; then - with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` - if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then - with_gxx_include_path="/usr/include" - fi - if test "$build_os" = "cygwin" -a "$WITH_MINGW" = "yes"; then - with_gxx_include_path=`cygpath -d "$with_gxx_include_path"` - with_gxx_include_path=`cygpath -u "$with_gxx_include_path"` - fi - if echo $with_gxx_include_path | grep -q linux; then - # workaround for Mandriva - issue 100049 - with_gxx_include_path=`cd $with_gxx_include_path && pwd` - fi - fi - dnl This is the original code... - dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include - if test -z "$with_gxx_include_path"; then - with_gxx_include_path="NO_GXX_INCLUDE" - AC_MSG_RESULT([none]) - else - AC_MSG_RESULT([$with_gxx_include_path]) - fi -else - with_gxx_include_path="NO_GXX_INCLUDE" + AC_MSG_CHECKING([for g++ include path]) + if test -z "$with_gxx_include_path"; then + with_gxx_include_path=`echo "#include <cstring>" | $CXX -E -xc++ - | $SED -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` + if test "$with_gxx_include_path" = "/usr/libexec/(null)/include"; then + with_gxx_include_path="/usr/include" + fi + if test "$build_os" = "cygwin" -a "$WITH_MINGW" = "yes"; then + with_gxx_include_path=`cygpath -d "$with_gxx_include_path"` + with_gxx_include_path=`cygpath -u "$with_gxx_include_path"` + fi + if echo $with_gxx_include_path | grep -q linux; then + # workaround for Mandriva - issue 100049 + with_gxx_include_path=`cd $with_gxx_include_path && pwd` + fi + fi + dnl This is the original code... + dnl with_gxx_include_path=`$CXX -print-search-dirs | grep instal |$AWK '{ print \$2 }'`/include + if test -z "$with_gxx_include_path"; then + with_gxx_include_path="NO_GXX_INCLUDE" + AC_MSG_RESULT([none]) + else + AC_MSG_RESULT([$with_gxx_include_path]) + fi +else + with_gxx_include_path="NO_GXX_INCLUDE" fi GXX_INCLUDE_PATH="$with_gxx_include_path" AC_SUBST(GXX_INCLUDE_PATH) @@ -2773,136 +2813,136 @@ dnl =================================================================== dnl Set the MinGW include directories dnl =================================================================== if test "$WITH_MINGW" = "yes"; then - AC_MSG_CHECKING([for MinGW runtime include path]) - cat >conftest.$ac_ext <<_ACEOF + AC_MSG_CHECKING([for MinGW runtime include path]) + cat >conftest.$ac_ext <<_ACEOF #include <stddef.h> #include <bits/c++config.h> _ACEOF - _mingw_lib_include_path=`$CXX -E -xc++ conftest.$ac_ext | $SED -n -e '/.*1*"\(.*\)\/stddef.h".*/s//\1/p' -e '/.*1*"\(.*\)\/bits\/c++config.h".*/s//\1/p' | sort -u | xargs echo` - rm conftest.$ac_ext - if test "$build_os" = "cygwin" -a -n "$_mingw_lib_include_path"; then - _temp="" - for a in $_mingw_lib_include_path - do + _mingw_lib_include_path=`$CXX -E -xc++ conftest.$ac_ext | $SED -n -e '/.*1*"\(.*\)\/stddef.h".*/s//\1/p' -e '/.*1*"\(.*\)\/bits\/c++config.h".*/s//\1/p' | sort -u | xargs echo` + rm conftest.$ac_ext + if test "$build_os" = "cygwin" -a -n "$_mingw_lib_include_path"; then + _temp="" + for a in $_mingw_lib_include_path + do a=`cygpath -d "$a"` _temp="$_temp "`cygpath -u "$a"` - done - _mingw_lib_include_path=$_temp - fi - if test -z "$_mingw_lib_include_path"; then - _mingw_lib_include_path="NO_LIB_INCLUDE" - AC_MSG_RESULT([no MinGW include path]) - else - AC_MSG_RESULT([$_mingw_lib_include_path]) - fi - MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" - AC_SUBST(MINGW_LIB_INCLUDE_PATH) -dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map - AC_MSG_CHECKING([for MinGW C++ backward include path]) - cat >conftest.$ac_ext <<_ACEOF + done + _mingw_lib_include_path=$_temp + fi + if test -z "$_mingw_lib_include_path"; then + _mingw_lib_include_path="NO_LIB_INCLUDE" + AC_MSG_RESULT([no MinGW include path]) + else + AC_MSG_RESULT([$_mingw_lib_include_path]) + fi + MINGW_LIB_INCLUDE_PATH="$_mingw_lib_include_path" + AC_SUBST(MINGW_LIB_INCLUDE_PATH) + dnl mingw gcc 4.4.0 needs backward in include path to use hash_set/hash_map + AC_MSG_CHECKING([for MinGW C++ backward include path]) + cat >conftest.$ac_ext <<_ACEOF #include <hash_set> _ACEOF - _mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo` - rm conftest.$ac_ext - if test "$build_os" = "cygwin" -a -n "$_mingw_backward_include_path"; then - _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` - _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` - AC_MSG_RESULT([$_mingw_backward_include_path]) - else - _mingw_backward_include_path="NO_BACKWARD_INCLUDE" - AC_MSG_RESULT([no MinGW C++ backward includes]) - fi - MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" - AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) - mingw_crtbegin=`$CC -print-file-name=crtbegin.o` - MINGW_CLIB_DIR=`dirname $mingw_crtbegin` - - # How to do this crack when cross-compiling? - AC_MSG_CHECKING([whether to use dynamic libgcc]) - if test "$build_os" = "cygwin" -a -e "$MINGW_CLIB_DIR/libgcc_s.a"; then - AC_MSG_CHECKING([dynamic libgcc name]) - MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | $SED -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | $SED -e 's@_@?@g'` - MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` - if test -n "$MINGW_GCCDLL"; then - MINGW_SHARED_GCCLIB=YES - AC_MSG_RESULT([use $MINGW_GCCDLL]) + _mingw_backward_include_path=`$CXX -E -xc++ -Wno-deprecated conftest.$ac_ext 2>&5| $SED -n -e '/.*1*"\(.*\)\/hash_set".*/s//\1/p' | sort -u | xargs echo` + rm conftest.$ac_ext + if test "$build_os" = "cygwin" -a -n "$_mingw_backward_include_path"; then + _mingw_backward_include_path=`cygpath -d $_mingw_backward_include_path` + _mingw_backward_include_path=`cygpath -u $_mingw_backward_include_path` + AC_MSG_RESULT([$_mingw_backward_include_path]) + else + _mingw_backward_include_path="NO_BACKWARD_INCLUDE" + AC_MSG_RESULT([no MinGW C++ backward includes]) + fi + MINGW_BACKWARD_INCLUDE_PATH="$_mingw_backward_include_path" + AC_SUBST(MINGW_BACKWARD_INCLUDE_PATH) + mingw_crtbegin=`$CC -print-file-name=crtbegin.o` + MINGW_CLIB_DIR=`dirname $mingw_crtbegin` + + # How to do this crack when cross-compiling? + AC_MSG_CHECKING([whether to use dynamic libgcc]) + if test "$build_os" = "cygwin" -a -e "$MINGW_CLIB_DIR/libgcc_s.a"; then + AC_MSG_CHECKING([dynamic libgcc name]) + MINGW_GCCDLL_pattern=`nm $MINGW_CLIB_DIR/libgcc_s.a | $SED -ne 's@.* _libgcc\(.*\)_dll_iname@libgcc\1.dll@p' | uniq | $SED -e 's@_@?@g'` + MINGW_GCCDLL=`cd $COMPATH/bin && ls $MINGW_GCCDLL_pattern 2>/dev/null` + if test -n "$MINGW_GCCDLL"; then + MINGW_SHARED_GCCLIB=YES + AC_MSG_RESULT([use $MINGW_GCCDLL]) + else + AC_MSG_RESULT([no]) + fi else AC_MSG_RESULT([no]) fi - else - AC_MSG_RESULT([no]) - fi - if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then - MINGW_GCCLIB_EH=YES - fi + if test -e "$MINGW_CLIB_DIR/libgcc_eh.a"; then + MINGW_GCCLIB_EH=YES + fi - AC_MSG_CHECKING([whether to use dynamic libstdc++]) - MINGW_SHARED_LIBSTDCPP= - if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then - MINGW_SHARED_LIBSTDCPP=stdc++_s - fi - if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then - MINGW_SHARED_LIBSTDCPP=stdc++.dll - fi - if test "$build_os" = "cygwin" -a -n "$MINGW_SHARED_LIBSTDCPP" ; then - AC_MSG_CHECKING([dynamic libstdc++ name]) - MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` - MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` - if test -n "$MINGW_GXXDLL"; then - MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP - MINGW_SHARED_GXXLIB=YES - AC_MSG_RESULT([use $MINGW_GXXDLL]) + AC_MSG_CHECKING([whether to use dynamic libstdc++]) + MINGW_SHARED_LIBSTDCPP= + if test -e "$MINGW_CLIB_DIR/libstdc++_s.a" ; then + MINGW_SHARED_LIBSTDCPP=stdc++_s + fi + if test -e "$MINGW_CLIB_DIR/libstdc++.dll.a" ; then + MINGW_SHARED_LIBSTDCPP=stdc++.dll + fi + if test "$build_os" = "cygwin" -a -n "$MINGW_SHARED_LIBSTDCPP" ; then + AC_MSG_CHECKING([dynamic libstdc++ name]) + MINGW_GXXDLL_pattern=`nm $MINGW_CLIB_DIR/lib$MINGW_SHARED_LIBSTDCPP.a | sed -ne 's@.* _libstdc__\(.*\)_dll_iname@libstdc++\1.dll@p' | uniq | sed -e 's@_@?@g'` + MINGW_GXXDLL=`cd $COMPATH/bin && ls $MINGW_GXXDLL_pattern 2>/dev/null` + if test -n "$MINGW_GXXDLL"; then + MINGW_SHARED_LIBSTDCPP=-l$MINGW_SHARED_LIBSTDCPP + MINGW_SHARED_GXXLIB=YES + AC_MSG_RESULT([use $MINGW_GXXDLL]) + else + MINGW_SHARED_LIBSTDCPP= + AC_MSG_RESULT([no]) + fi else - MINGW_SHARED_LIBSTDCPP= AC_MSG_RESULT([no]) fi - else - AC_MSG_RESULT([no]) - fi - test "$build_os" = "cygwin" && MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` - AC_SUBST(MINGW_CLIB_DIR) - AC_SUBST(MINGW_SHARED_GCCLIB) - AC_SUBST(MINGW_GCCLIB_EH) - AC_SUBST(MINGW_SHARED_GXXLIB) - AC_SUBST(MINGW_SHARED_LIBSTDCPP) - AC_SUBST(MINGW_GCCDLL) - AC_SUBST(MINGW_GXXDLL) + test "$build_os" = "cygwin" && MINGW_CLIB_DIR=`cygpath $MINGW_CLIB_DIR` + AC_SUBST(MINGW_CLIB_DIR) + AC_SUBST(MINGW_SHARED_GCCLIB) + AC_SUBST(MINGW_GCCLIB_EH) + AC_SUBST(MINGW_SHARED_GXXLIB) + AC_SUBST(MINGW_SHARED_LIBSTDCPP) + AC_SUBST(MINGW_GCCDLL) + AC_SUBST(MINGW_GXXDLL) fi dnl =================================================================== dnl Extra checking for the SunOS compiler dnl =================================================================== if test "$_os" = "SunOS"; then - dnl SunStudio C++ compiler packaged with SunStudio C compiler - if test "$CC" = "cc"; then - AC_MSG_CHECKING([SunStudio C++ Compiler]) - if test "$CXX" != "CC"; then - AC_MSG_WARN([SunStudio C++ was not found]) - echo "SunStudio C++ was not found" >> warn - else - AC_MSG_RESULT([checked]) - fi - fi + dnl SunStudio C++ compiler packaged with SunStudio C compiler + if test "$CC" = "cc"; then + AC_MSG_CHECKING([SunStudio C++ Compiler]) + if test "$CXX" != "CC"; then + AC_MSG_WARN([SunStudio C++ was not found]) + echo "SunStudio C++ was not found" >> warn + else + AC_MSG_RESULT([checked]) + fi + fi fi dnl ************************************************************* dnl Testing for exception handling - dwarf2 or sjlj exceptions... dnl ************************************************************* if test "$WITH_MINGW" = "yes"; then - AC_MSG_CHECKING([exception type]) - AC_LANG_PUSH([C++]) - AC_TRY_LINK( - [#include <iostream> + AC_MSG_CHECKING([exception type]) + AC_LANG_PUSH([C++]) + AC_TRY_LINK( + [#include <iostream> -extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); + extern "C" void _Unwind_SjLj_RaiseException(void) __attribute__ ((__noreturn__)); - ], - [_Unwind_SjLj_RaiseException() ], - [exceptions_type="sjlj"], - [exceptions_type="dwarf2"] - ) - AC_MSG_RESULT($exceptions_type) - AC_LANG_POP([C++]) + ], + [_Unwind_SjLj_RaiseException() ], + [exceptions_type="sjlj"], + [exceptions_type="dwarf2"] + ) + AC_MSG_RESULT($exceptions_type) + AC_LANG_POP([C++]) fi EXCEPTIONS="$exceptions_type" @@ -2914,45 +2954,46 @@ dnl =================================================================== AC_MSG_CHECKING([Whether building STLPort library makes sense]) BUILD_STLPORT="no" if test "$_os" = "Linux"; then - case "$host_cpu" in + case "$host_cpu" in i?86) - case "$host_os" in k*bsd*-gnu*) - BUILD_STLPORT="no" - ;; - *) - BUILD_STLPORT="yes" + case "$host_os" in + k*bsd*-gnu*) + BUILD_STLPORT="no" + ;; + *) + BUILD_STLPORT="yes" + ;; + esac ;; - esac - ;; *) - BUILD_STLPORT="no" - ;; - esac + BUILD_STLPORT="no" + ;; + esac elif test "$_os" = "SunOS"; then - BUILD_STLPORT="yes" + BUILD_STLPORT="yes" elif test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then - BUILD_STLPORT="yes" + BUILD_STLPORT="yes" elif test "$_os" = "FreeBSD"; then - BUILD_STLPORT="yes" + BUILD_STLPORT="yes" fi if test "$BUILD_STLPORT" = "yes" ; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) fi AC_MSG_CHECKING([Whether STLPort library will be actually built]) if test "$with_stlport" = "auto" -o "$BUILD_STLPORT" = "no"; then - with_stlport=$BUILD_STLPORT + with_stlport=$BUILD_STLPORT fi if test "$with_stlport" = "yes" ; then - AC_MSG_RESULT([yes]) - WITH_STLPORT=YES - SCPDEFS="$SCPDEFS -DWITH_STLPORT" - BUILD_TYPE="$BUILD_TYPE STLPORT" + AC_MSG_RESULT([yes]) + WITH_STLPORT=YES + SCPDEFS="$SCPDEFS -DWITH_STLPORT" + BUILD_TYPE="$BUILD_TYPE STLPORT" else - WITH_STLPORT=NO - AC_MSG_RESULT([no]) + WITH_STLPORT=NO + AC_MSG_RESULT([no]) fi AC_SUBST(WITH_STLPORT) @@ -2961,40 +3002,40 @@ dnl =================================================================== dnl visibility and c++0x features dnl =================================================================== if test "$GCC" = "yes"; then - AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -Werror -fvisibility=hidden" - AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) - CFLAGS=$save_CFLAGS - if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - - AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757]) - save_CXXFLAGS=$CFLAGS - CXXFLAGS="$CXXFLAGS -std=c++0x" - AC_LANG_PUSH([C++]) - - AC_TRY_COMPILE([ + AC_MSG_CHECKING([whether $CC supports -fvisibility=hidden]) + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -Werror -fvisibility=hidden" + AC_TRY_LINK([], [ return 0; ], [ HAVE_GCC_VISIBILITY_FEATURE=TRUE ], []) + CFLAGS=$save_CFLAGS + if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + + AC_MSG_CHECKING([whether $CC supports -std=c++0x without Language Defect 757]) + save_CXXFLAGS=$CFLAGS + CXXFLAGS="$CXXFLAGS -std=c++0x" + AC_LANG_PUSH([C++]) + + AC_TRY_COMPILE([ #include <stddef.h> template <typename T, size_t S> char (&sal_n_array_size( T(&)[S] ))[S]; namespace { - struct b - { - int i; - int j; - }; + struct b + { + int i; + int j; + }; } ],[ struct a { - int i; - int j; + int i; + int j; }; a thinga[]={{0,0}, {1,1}}; b thingb[]={{0,0}, {1,1}}; @@ -3003,13 +3044,13 @@ size_t j = sizeof(sal_n_array_size(thingb)); return !(i != 0 && j != 0); ], HAVE_CXX0X=TRUE,) - AC_LANG_POP([C++]) - CXXFLAGS=$save_CXXFLAGS - if test "$HAVE_CXX0X" = "TRUE"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi + AC_LANG_POP([C++]) + CXXFLAGS=$save_CXXFLAGS + if test "$HAVE_CXX0X" = "TRUE"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi fi AC_SUBST(HAVE_CXX0X) @@ -3021,40 +3062,40 @@ dnl need to check for ccache version: otherwise prevents dnl caching of the results (like "-x objective-c++" for Mac) AC_MSG_CHECKING([whether we are able to use --ccache-skip]) if test "$_os" != "Darwin" ; then - AC_MSG_RESULT([only used on Mac currently, skipping]) -else - # checking for ccache presence/version - AC_MSG_RESULT([probing...]) - AC_PATH_PROG([CCACHE],[ccache],[not_found]) - if test "$CCACHE" = "not_found" ; then - AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)]) - else - # check ccache version - AC_MSG_CHECKING([whether version of ccache is suitable]) - CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` - CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then - AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([whether ccache is actually used for the build]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS --ccache-skip -O2" - dnl an empty program will do, we're checking the compiler flags - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], - [use_ccache=yes], [use_ccache=no]) - if test $use_ccache = yes ; then - AC_MSG_RESULT([yes, will enable --ccache-skip]) - AC_SUBST([USE_CCACHE], [YES]) - else - AC_MSG_RESULT([no, will not enable --ccache-skip]) - fi - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) - else - AC_MSG_RESULT([no]) - AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.]) - fi - fi + AC_MSG_RESULT([only used on Mac currently, skipping]) +else + # checking for ccache presence/version + AC_MSG_RESULT([probing...]) + AC_PATH_PROG([CCACHE],[ccache],[not_found]) + if test "$CCACHE" = "not_found" ; then + AC_MSG_NOTICE([not enabling --ccache-skip (ccache not found)]) + else + # check ccache version + AC_MSG_CHECKING([whether version of ccache is suitable]) + CCACHE_VERSION=`"$CCACHE" -V | "$AWK" '/^ccache version/{print $3}'` + CCACHE_NUMVER=`echo $CCACHE_VERSION | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + if test "$CCACHE_VERSION" = "2.4_OOo" -o "$CCACHE_NUMVER" -ge "030100"; then + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([whether ccache is actually used for the build]) + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS --ccache-skip -O2" + dnl an empty program will do, we're checking the compiler flags + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], + [use_ccache=yes], [use_ccache=no]) + if test $use_ccache = yes ; then + AC_MSG_RESULT([yes, will enable --ccache-skip]) + AC_SUBST([USE_CCACHE], [YES]) + else + AC_MSG_RESULT([no, will not enable --ccache-skip]) + fi + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) + else + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([ccache version $CCACHE_VERSION not accepted. ccache will not be used.]) + fi + fi fi dnl =================================================================== @@ -3063,43 +3104,48 @@ dnl =================================================================== HAVE_GCC_VISIBILITY_BROKEN= if test \( "$_os" != "WINNT" -o "$WITH_MINGW" = "yes" \) ; then - AC_LANG_PUSH([C++]) - - if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - AC_MSG_CHECKING([if STL headers are visibility safe]) - AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) - AC_MSG_RESULT([$stlvisok]) - if test "$stlvisok" = "no"; then - AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) - echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn - unset HAVE_GCC_VISIBILITY_FEATURE - fi - fi - - if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - sharedlink_ldflags_save=$LDFLAGS - LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" - - AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) - AC_TRY_LINK([#include <sstream> + AC_LANG_PUSH([C++]) + + if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then + AC_MSG_CHECKING([if STL headers are visibility safe]) + AC_EGREP_HEADER(visibility push, string, stlvisok=yes, stlvisok=no) + AC_MSG_RESULT([$stlvisok]) + if test "$stlvisok" = "no"; then + AC_MSG_WARN([Your gcc STL headers are not visibility safe. Disabling visibility]) + echo "Your gcc STL headers are not visibility safe. Disabling visibility" >> warn + unset HAVE_GCC_VISIBILITY_FEATURE + fi + fi + + if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then + sharedlink_ldflags_save=$LDFLAGS + LDFLAGS="$LDFLAGS -fvisibility-inlines-hidden -fpic -shared" + + AC_MSG_CHECKING([if gcc is -fvisibility-inlines-hidden safe with STL headers]) + AC_TRY_LINK( + [ +#include <sstream> using namespace std; -],[istringstream strm( "test" ); return 0;], - $EGREP -q unresolvable conftest.err; - if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi, - gccvisok=no) - AC_MSG_RESULT([$gccvisok]) - if test "$gccvisok" = "no"; then - AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.]) - echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn - HAVE_GCC_VISIBILITY_BROKEN="TRUE" - fi - - LDFLAGS=$sharedlink_ldflags_save - fi - - if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then - AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) - cat >visibility.cxx <<_ACEOF + ],[ +istringstream strm( "test" ); return 0; + ], + $EGREP -q unresolvable conftest.err; + if test $? -eq 0; then gccvisok=no; else gccvisok=yes; fi, + gccvisok=no + ) + AC_MSG_RESULT([$gccvisok]) + if test "$gccvisok" = "no"; then + AC_MSG_WARN([Your gcc is not -fvisibility-inlines-hidden safe, disabling that.]) + echo "Your gcc is not -fvisibility-inlines-hidden safe, disabling that." >> warn + HAVE_GCC_VISIBILITY_BROKEN="TRUE" + fi + + LDFLAGS=$sharedlink_ldflags_save + fi + + if test "$HAVE_GCC_VISIBILITY_FEATURE" = "TRUE"; then + AC_MSG_CHECKING([if gcc has a visibility bug with class-level attributes (GCC bug 26905)]) + cat >visibility.cxx <<_ACEOF #pragma GCC visibility push(hidden) struct __attribute__ ((visibility ("default"))) TestStruct { static void Init(); @@ -3108,37 +3154,37 @@ __attribute__ ((visibility ("default"))) void TestFunc() { TestStruct::Init(); } _ACEOF - if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then - gccvisbroken=yes - else - case "$host_cpu" in + if ! $CXX $CXXFLAGS $CPPFLAGS -fpic -S visibility.cxx 2>/dev/null > /dev/null; then + gccvisbroken=yes + else + case "$host_cpu" in i?86|x86_64) - if test "$_os" = "Darwin"; then - gccvisbroken=no - else - if $EGREP -q '@PLT' visibility.s; then - gccvisbroken=no - else - gccvisbroken=yes - fi - fi - ;; + if test "$_os" = "Darwin"; then + gccvisbroken=no + else + if $EGREP -q '@PLT' visibility.s; then + gccvisbroken=no + else + gccvisbroken=yes + fi + fi + ;; *) - gccvisbroken=no - ;; - esac - fi - rm -f visibility.s + gccvisbroken=no + ;; + esac + fi + rm -f visibility.s - AC_MSG_RESULT([$gccvisbroken]) - if test "$gccvisbroken" = "yes"; then - AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) - echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn - unset HAVE_GCC_VISIBILITY_FEATURE - fi - fi + AC_MSG_RESULT([$gccvisbroken]) + if test "$gccvisbroken" = "yes"; then + AC_MSG_WARN([Your gcc is not -fvisibility=hidden safe. Disabling visibility]) + echo "Your gcc is not -fvisibility=hidden safe. Disabling visibility" >> warn + unset HAVE_GCC_VISIBILITY_FEATURE + fi + fi - AC_LANG_POP([C++]) + AC_LANG_POP([C++]) fi AC_SUBST(HAVE_GCC_VISIBILITY_FEATURE) @@ -3163,22 +3209,22 @@ if test "$with_alloc" = "tcmalloc"; then ALLOC="TCMALLOC"; fi if test "$with_alloc" = "jemalloc"; then - if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then - AC_MSG_RESULT(jemalloc) - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -pthread" - AC_CHECK_LIB(jemalloc, malloc, [], - [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) - ALLOC="JEMALLOC"; - CFLAGS=$save_CFLAGS - else - AC_MSG_RESULT([system]) - ALLOC="SYS_ALLOC"; - AC_CHECK_FUNCS([malloc realloc calloc free]) - fi + if test "$_os" != "FreeBSD" -o "$_os" != "NetBSD"; then + AC_MSG_RESULT(jemalloc) + save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS -pthread" + AC_CHECK_LIB(jemalloc, malloc, [], + [AC_MSG_ERROR(jemalloc not found or functional. Install the jemalloc allocator.)], []) + ALLOC="JEMALLOC"; + CFLAGS=$save_CFLAGS + else + AC_MSG_RESULT([system]) + ALLOC="SYS_ALLOC"; + AC_CHECK_FUNCS([malloc realloc calloc free]) + fi fi if test "$with_alloc" = "internal" -o -z "$with_alloc"; then - AC_MSG_RESULT([internal]) + AC_MSG_RESULT([internal]) fi AC_SUBST(ALLOC) @@ -3188,11 +3234,11 @@ dnl =================================================================== AC_MSG_CHECKING([whether to add custom build version]) if test "z$with_build_version" != "z"; then - BUILD_VER_STRING=$with_build_version - AC_MSG_RESULT([yes, $BUILD_VER_STRING]) + BUILD_VER_STRING=$with_build_version + AC_MSG_RESULT([yes, $BUILD_VER_STRING]) else - BUILD_VER_STRING= - AC_MSG_RESULT([no]) + BUILD_VER_STRING= + AC_MSG_RESULT([no]) fi AC_SUBST(BUILD_VER_STRING) @@ -3201,33 +3247,29 @@ dnl Java support enable dnl =================================================================== AC_MSG_CHECKING([whether to build with Java support]) if test "$with_java" != "no"; then - AC_MSG_RESULT([yes]) - SOLAR_JAVA="TRUE" + AC_MSG_RESULT([yes]) + SOLAR_JAVA="TRUE" else - AC_MSG_RESULT([no]) - SOLAR_JAVA="" + AC_MSG_RESULT([no]) + SOLAR_JAVA="" fi AC_SUBST(SOLAR_JAVA) -dnl SOLAR_JAVA (yes, silly name, should rename) indicates whether we -dnl want there to be *run-time* support for Java extensions in the -dnl built LibreOffice. We might need a different test for whether -dnl there is Java at *build-time*. - -dnl If we don't have access to Java at build-time we can't have -dnl run-time Java support either. But I think there are some uses of -dnl Java at build-time even if no run-time Java support is wanted. Or -dnl is there? This is a bit unclear to me. +dnl SOLAR_JAVA="YES" (yes, silly name, should rename) indicates whether we +dnl want there to be *run-time* (and build-time) support for Java extensions in the +dnl built LibreOffice. +dnl SOLAR_JAVA="BUILD" indicate build-time only support (no runtime support) +dnl SOLAR_JAVA="" indicate no java support at all if test "$_os" = "Linux" && test "$host_cpu" = "powerpc"; then - # IBMs JDK needs this... - JITC_PROCESSOR_TYPE=6 - export JITC_PROCESSOR_TYPE + # IBMs JDK needs this... + JITC_PROCESSOR_TYPE=6 + export JITC_PROCESSOR_TYPE fi if test $_os = "WINNT"; then - WITH_VC_REDIST="TRUE" + WITH_VC_REDIST="TRUE" fi AC_SUBST(WITH_VC_REDIST) @@ -3236,139 +3278,139 @@ dnl Checks for Java dnl =================================================================== if test "$SOLAR_JAVA" != ""; then - # Windows-specific tests - if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then - if test "$CL_X64" != ""; then - bitness="64-bit" - otherbitness="32-bit" - else - bitness="32-bit" - otherbitness="64-bit" - fi - - if test -z "$with_jdk_home"; then - - # Unfortunately apparently no way to find, if needed, the 64-bit - # JDK in the Registry from the 32-bit Perl oowintool - - _jdk_home=`./oowintool --jdk-home` - if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then - with_jdk_home="$_jdk_home" - howfound="found by oowintool" - else - AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK]) - fi - else - test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"` - howfound="you passed" - fi - fi - - JAVA_HOME=; export JAVA_HOME - if test -z "$with_jdk_home"; then - AC_PATH_PROG(JAVAINTERPRETER, $with_java) - else - _java_path="$with_jdk_home/bin/$with_java" - dnl Check if there is a Java interpreter at all. - if test -x "$_java_path"; then - JAVAINTERPRETER=$_java_path - else - AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home]) - fi - fi - - if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then - # Check that the JDK found is correct architecture - # Why is this necessary, we don't link with any library from the JDK I think, - - shortjdkhome=`cygpath -d "$with_jdk_home"` - if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" = "" >/dev/null; then - AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit]) - AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK]) - elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" != "" >/dev/null; then - AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit]) - AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK]) - fi - - if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then - JAVAINTERPRETER="${JAVAINTERPRETER}.exe" - fi - JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` - JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` - elif test "$_os" = "Darwin"; then - dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X, - dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it - dnl to run in 32 bit mode and be able to load LibreOffice jnilibs: - AC_MSG_CHECKING([whether to pass -d32 to Java interpreter]) - if "$JAVAINTERPRETER" -d32 >&5 2>&5; then - AC_MSG_RESULT([yes]) - JAVAIFLAGS=-d32 - else - AC_MSG_RESULT([no]) - fi - fi + # Windows-specific tests + if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then + if test "$CL_X64" != ""; then + bitness="64-bit" + otherbitness="32-bit" + else + bitness="32-bit" + otherbitness="64-bit" + fi + + if test -z "$with_jdk_home"; then + + # Unfortunately apparently no way to find, if needed, the 64-bit + # JDK in the Registry from the 32-bit Perl oowintool + + _jdk_home=`./oowintool --jdk-home` + if test -f "$_jdk_home/lib/jvm.lib" -a -f "$_jdk_home/bin/java.exe"; then + with_jdk_home="$_jdk_home" + howfound="found by oowintool" + else + AC_MSG_ERROR([No JDK found by oowintool, pass the --with-jdk-home option pointing to a $bitness JDK]) + fi + else + test "$build_os" = "cygwin" && with_jdk_home=`cygpath -u "$with_jdk_home"` + howfound="you passed" + fi + fi + + JAVA_HOME=; export JAVA_HOME + if test -z "$with_jdk_home"; then + AC_PATH_PROG(JAVAINTERPRETER, $with_java) + else + _java_path="$with_jdk_home/bin/$with_java" + dnl Check if there is a Java interpreter at all. + if test -x "$_java_path"; then + JAVAINTERPRETER=$_java_path + else + AC_MSG_ERROR([$_java_path not found, pass --with-jdk-home]) + fi + fi + + if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then + # Check that the JDK found is correct architecture + # Why is this necessary, we don't link with any library from the JDK I think, + + shortjdkhome=`cygpath -d "$with_jdk_home"` + if test "$CL_X64" != "" -a -f "$with_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" = "" >/dev/null; then + AC_MSG_WARN([You are building 64-bit binaries but the JDK $howfound is 32-bit]) + AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a 64-bit JDK]) + elif test "$CL_X64" = "" -a -f "$_jdk_home/bin/java.exe" -a "`$shortjdkhome/bin/java.exe -version 2>&1 | grep -i 64-bit`" != "" >/dev/null; then + AC_MSG_WARN([You are building 32-bit binaries but the JDK $howfound is 64-bit]) + AC_MSG_ERROR([You should pass the --with-jdk-home option pointing to a (32-bit) JDK]) + fi + + if test x`echo "$JAVAINTERPRETER" | grep -i '\.exe$'` = x; then + JAVAINTERPRETER="${JAVAINTERPRETER}.exe" + fi + JAVAINTERPRETER=`cygpath -d "$JAVAINTERPRETER"` + JAVAINTERPRETER=`cygpath -u "$JAVAINTERPRETER"` + elif test "$_os" = "Darwin"; then + dnl HACK: There currently is only a 32 bit version of LibreOffice for Mac OS X, + dnl and Tiger Java complains about -d32 while Snow Leopard Java needs it + dnl to run in 32 bit mode and be able to load LibreOffice jnilibs: + AC_MSG_CHECKING([whether to pass -d32 to Java interpreter]) + if "$JAVAINTERPRETER" -d32 >&5 2>&5; then + AC_MSG_RESULT([yes]) + JAVAIFLAGS=-d32 + else + AC_MSG_RESULT([no]) + fi + fi fi dnl =================================================================== dnl Checks for JDK. dnl =================================================================== if test "$SOLAR_JAVA" != ""; then - _gij_longver=0 - AC_MSG_CHECKING([the installed JDK]) - if test -n "$JAVAINTERPRETER"; then - dnl java -version sends output to stderr! - if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then - AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) - elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then - JDK=gcj - AC_MSG_RESULT([checked (gcj)]) - _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; - _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` - - elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then - AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) - elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then - JDK=ibm - - dnl IBM JDK specific tests - _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` - _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` - - if test "$_jdk_ver" -lt 10500; then - AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5]) - fi + _gij_longver=0 + AC_MSG_CHECKING([the installed JDK]) + if test -n "$JAVAINTERPRETER"; then + dnl java -version sends output to stderr! + if test `$JAVAINTERPRETER -version 2>&1 | grep -c "Kaffe"` -gt 0; then + AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) + elif test `$JAVAINTERPRETER --version 2>&1 | grep -c "GNU libgcj"` -gt 0; then + JDK=gcj + AC_MSG_RESULT([checked (gcj)]) + _gij_version=`$JAVAINTERPRETER --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; + _gij_longver=`echo $_gij_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'` + + elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "BEA"` -gt 0; then + AC_MSG_ERROR([No valid check available. Please check the block for your desired java in configure.in]) + elif test `$JAVAINTERPRETER -version 2>&1 | $AWK '{ print }' | grep -c "IBM"` -gt 0; then + JDK=ibm + + dnl IBM JDK specific tests + _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` + _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` + + if test "$_jdk_ver" -lt 10500; then + AC_MSG_ERROR([IBM JDK is too old, you need at least 1.5]) + fi - AC_MSG_RESULT([checked (IBM JDK $_jdk)]) + AC_MSG_RESULT([checked (IBM JDK $_jdk)]) - if test "$with_jdk_home" = ""; then - AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK, + if test "$with_jdk_home" = ""; then + AC_MSG_ERROR([In order to successfully build LibreOffice using the IBM JDK, you must use the "--with-jdk-home" configure option explicitly]) - fi + fi - JAVA_HOME=$with_jdk_home + JAVA_HOME=$with_jdk_home - else - JDK=sun + else + JDK=sun - dnl Sun JDK specific tests - _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` - _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` + dnl Sun JDK specific tests + _jdk=`$JAVAINTERPRETER -version 2>&1 | $AWK -F'"' '{ print \$2 }' | $SED s/[[-A-Za-z]]*//` + _jdk_ver=`echo "$_jdk" | $AWK -F. '{ print (($1 * 100) + $2) * 100 + $3;}'` - if test "$_jdk_ver" -lt 10500; then - AC_MSG_ERROR([JDK is too old, you need at least 1.5]) - fi - AC_MSG_RESULT([checked (JDK $_jdk)]) - JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` - if test "$_os" = "WINNT"; then - JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` + if test "$_jdk_ver" -lt 10500; then + AC_MSG_ERROR([JDK is too old, you need at least 1.5]) + fi + AC_MSG_RESULT([checked (JDK $_jdk)]) + JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*java,,p"` + if test "$_os" = "WINNT"; then + JAVA_HOME=`echo $JAVA_HOME | $SED "s,\.[[eE]][[xX]][[eE]]$,,"` + fi fi - fi - else - AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4]) - fi + else + AC_MSG_ERROR([Java not found. You need at least jdk-1.5, or gcj-4]) + fi else - dnl Java disabled - JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME + dnl Java disabled + JAVA_HOME=NO_JAVA_HOME ; export JAVA_HOME fi _java_target_ver="1.5" @@ -3390,7 +3432,7 @@ if test "$SOLAR_JAVA" != ""; then _java_target_ver=`echo "$_jdk_ver" | $AWK '{ maj=substr($0,1,1); min=substr($0,2,2); print int(maj)"."int(min) }'` AC_MSG_RESULT([$_java_target_ver]) else - AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!]) + AC_MSG_ERROR([Unable to guess Java bytecode version from Java version!]) fi fi @@ -3428,14 +3470,14 @@ if test "$SOLAR_JAVA" != ""; then fi fi if test -z "$JAVACOMPILER"; then - AC_MSG_ERROR([$javacompiler not found set with_jdk_home]) + AC_MSG_ERROR([$javacompiler not found set with_jdk_home]) fi if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then - if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then - JAVACOMPILER="${JAVACOMPILER}.exe" - fi - JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` - JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` + if test x`echo "$JAVACOMPILER" | grep -i '\.exe$'` = x; then + JAVACOMPILER="${JAVACOMPILER}.exe" + fi + JAVACOMPILER=`cygpath -d "$JAVACOMPILER"` + JAVACOMPILER=`cygpath -u "$JAVACOMPILER"` fi if test `$JAVACOMPILER -version 2>&1 | grep -c "Eclipse Java Compiler"` -gt 0; then @@ -3486,7 +3528,7 @@ if test "$SOLAR_JAVA" != ""; then fi fi if test -z "$JAVADOC"; then - AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home]) + AC_MSG_ERROR([$_javadoc_path not found set with_jdk_home]) fi if test "$build_os" = "cygwin" -a "$_os" = "WINNT"; then if test x`echo "$JAVADOC" | grep -i '\.exe$'` = x; then @@ -3498,47 +3540,46 @@ if test "$SOLAR_JAVA" != ""; then fi if test "$SOLAR_JAVA" != ""; then - # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr - if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then - - if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then - # try to recover first by looking whether we have a alternatives - # system as in Debian or newer SuSEs where following /usr/bin/javac - # over /etc/alternatives/javac leads to the right bindir where we - # just need to strip a bit away to get a valid JAVA_HOME - JAVA_HOME=$(readlink $(readlink $JAVACOMPILER)) - elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then - # maybe only one level of symlink (e.g. on Mac) - JAVA_HOME=$(readlink $JAVACOMPILER) - if test "$(dirname $JAVA_HOME)" = "."; then - # we've got no path to trim back - JAVA_HOME="" - fi - else - # else warn - AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) - AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) - echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn - echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn - fi - dnl now that we have the path to the real javac, make a JAVA_HOME out of it.. - if test "$JAVA_HOME" != "/usr"; then - if test "$_os" = "Darwin"; then - dnl Leopard returns a non-suitable path with readlink - points to "Current" only - JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,) - dnl Tiger already returns a JDK path.. - JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,) - else - JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,) - fi - fi -fi -# as we drop out of this, JAVA_HOME may have been set to the empty string by readlink + # check if JAVA_HOME was (maybe incorrectly?) set automatically to /usr + if test "$JAVA_HOME" = "/usr" -a "x$with_jdk_home" = "x"; then + if basename $(readlink $(readlink $JAVACOMPILER)) >/dev/null 2>/dev/null; then + # try to recover first by looking whether we have a alternatives + # system as in Debian or newer SuSEs where following /usr/bin/javac + # over /etc/alternatives/javac leads to the right bindir where we + # just need to strip a bit away to get a valid JAVA_HOME + JAVA_HOME=$(readlink $(readlink $JAVACOMPILER)) + elif readlink $JAVACOMPILER >/dev/null 2>/dev/null; then + # maybe only one level of symlink (e.g. on Mac) + JAVA_HOME=$(readlink $JAVACOMPILER) + if test "$(dirname $JAVA_HOME)" = "."; then + # we've got no path to trim back + JAVA_HOME="" + fi + else + # else warn + AC_MSG_WARN([JAVA_HOME is set to /usr - this is very likely to be incorrect]) + AC_MSG_WARN([if this is the case, please inform the correct JAVA_HOME with --with-jdk-home]) + echo "JAVA_HOME is set to /usr - this is very likely to be incorrect" >> warn + echo "if this is the case, please inform the correct JAVA_HOME with --with-jdk-home" >> warn + fi + dnl now that we have the path to the real javac, make a JAVA_HOME out of it.. + if test "$JAVA_HOME" != "/usr"; then + if test "$_os" = "Darwin"; then + dnl Leopard returns a non-suitable path with readlink - points to "Current" only + JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/Current/Commands/javac$,/CurrentJDK/Home,) + dnl Tiger already returns a JDK path.. + JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/CurrentJDK/Commands/javac$,/CurrentJDK/Home,) + else + JAVA_HOME=$(echo $JAVA_HOME | $SED -e s,/bin/javac$,,) + fi + fi + fi + # as we drop out of this, JAVA_HOME may have been set to the empty string by readlink -dnl now if JAVA_HOME has been set to empty, then call findhome to find it + dnl now if JAVA_HOME has been set to empty, then call findhome to find it if test -z "$JAVA_HOME"; then - if test "x$with_jdk_home" = "x"; then - cat > findhome.java <<_ACEOF + if test "x$with_jdk_home" = "x"; then + cat > findhome.java <<_ACEOF [import java.io.File; class findhome @@ -3551,96 +3592,98 @@ class findhome } }] _ACEOF - AC_MSG_CHECKING([if javac works]) - javac_cmd="$JAVACOMPILER findhome.java 1>&2" - AC_TRY_EVAL(javac_cmd) - if test $? = 0 && test -f ./findhome.class ; then - AC_MSG_RESULT([javac works]) - else - echo "configure: javac test failed" >&5 - cat findhome.java >&5 - AC_MSG_ERROR([javac does not work - java projects will not build!]) - fi + AC_MSG_CHECKING([if javac works]) + javac_cmd="$JAVACOMPILER findhome.java 1>&2" + AC_TRY_EVAL(javac_cmd) + if test $? = 0 && test -f ./findhome.class ; then + AC_MSG_RESULT([javac works]) + else + echo "configure: javac test failed" >&5 + cat findhome.java >&5 + AC_MSG_ERROR([javac does not work - java projects will not build!]) + fi - AC_MSG_CHECKING([if gij knows its java.home]) - JAVA_HOME=`$JAVAINTERPRETER findhome` - if test $? = 0 && test "$JAVA_HOME" != "" ; then - AC_MSG_RESULT([$JAVA_HOME]) + AC_MSG_CHECKING([if gij knows its java.home]) + JAVA_HOME=`$JAVAINTERPRETER findhome` + if test $? = 0 && test "$JAVA_HOME" != "" ; then + AC_MSG_RESULT([$JAVA_HOME]) + else + echo "configure: java test failed" >&5 + cat findhome.java >&5 + AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home]) + fi else - echo "configure: java test failed" >&5 - cat findhome.java >&5 - AC_MSG_ERROR([gij does not know its java.home - use --with-jdk-home]) + JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"` fi - else - JAVA_HOME=`echo $JAVAINTERPRETER | $SED -n "s,//*bin//*$with_java,,p"` - fi fi dnl second sanity check JAVA_HOME if possible if test "$JDK" != "gcj" -o "$_gij_longver" -ge "40200"; then - # now check if $JAVA_HOME is really valid - if test "$_os" = "Darwin"; then - if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then + # now check if $JAVA_HOME is really valid + if test "$_os" = "Darwin"; then + if test ! -f "$JAVA_HOME/lib/jvm.cfg" -a "x$with_jdk_home" = "x"; then + JAVA_HOME_OK="NO" + fi + elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then JAVA_HOME_OK="NO" - fi - elif test ! -d "$JAVA_HOME/jre" -a "x$with_jdk_home" = "x"; then - JAVA_HOME_OK="NO" - fi - if test "$JAVA_HOME_OK" = "NO"; then - AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) - AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) - AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) - echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn - echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn - echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn - fi + fi + if test "$JAVA_HOME_OK" = "NO"; then + AC_MSG_WARN([JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script]) + AC_MSG_WARN([attempted to find JAVA_HOME automatically, but apparently it failed]) + AC_MSG_WARN([in case JAVA_HOME is incorrectly set, some projects with not be built correctly]) + echo "JAVA_HOME was not explicitly informed with --with-jdk-home. the configure script" >> warn + echo "attempted to find JAVA_HOME automatically, but apparently it failed" >> warn + echo "in case JAVA_HOME is incorrectly set, some projects with not be built correctly" >> warn + fi fi AC_MSG_NOTICE([JAVA_HOME=$JAVA_HOME]) fi + AWTLIB= + if test "$SOLAR_JAVA" != ""; then - AC_MSG_CHECKING([for jawt lib name]) - if test "$JDK" = "gcj"; then - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - CFLAGS="$CFLAGS -I$JAVA_HOME/include" - LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" - exec 6>/dev/null # no output - AC_CHECK_HEADER(jni.h, [], + AC_MSG_CHECKING([for jawt lib name]) + if test "$JDK" = "gcj"; then + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + CFLAGS="$CFLAGS -I$JAVA_HOME/include" + LDFLAGS="$LDFLAGS -L$JAVA_HOME/lib -lgcj" + exec 6>/dev/null # no output + AC_CHECK_HEADER(jni.h, [], [AC_MSG_ERROR([jni.h could not be found. Mismatch between gcc and libgcj or libgcj-devel missing?])], []) - AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) - exec 6>&1 # output on again - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS - fi - # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. - # A workaround is to link also against libpmawt.so - if test "$JDK" = "ibm" ; then - save_CFLAGS=$CFLAGS - save_LDFLAGS=$LDFLAGS - save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH - CFLAGS="$CFLAGS -I$JAVA_HOME/include" - LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" - LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH - export LD_LIBRARY_PATH - exec 6>/dev/null # no output - AC_CHECK_HEADER(jni.h, [], + AC_CHECK_LIB(gcjawt, JAWT_GetAWT, [ AWTLIB="-lgcjawt -lgcj"] ) + exec 6>&1 # output on again + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + fi + # IBM SDK 1.5.0-sr5 includes libjawt.so with unresolved symbols. + # A workaround is to link also against libpmawt.so + if test "$JDK" = "ibm" ; then + save_CFLAGS=$CFLAGS + save_LDFLAGS=$LDFLAGS + save_LD_LIBRARY_PATH=$LD_LIBRARY_PATH + CFLAGS="$CFLAGS -I$JAVA_HOME/include" + LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin" + LD_LIBRARY_PATH=$JAVA_HOME/jre/bin:$JAVA_HOME/jre/bin/classic:$JAVA_HOME/jre/bin/xawt:$LD_LIBRARY_PATH + export LD_LIBRARY_PATH + exec 6>/dev/null # no output + AC_CHECK_HEADER(jni.h, [], [AC_MSG_ERROR([jni.h could not be found.])], []) - AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) - if test -z "$AWTLIB"; then - LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" - AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) - fi - exec 6>&1 # output on again - CFLAGS=$save_CFLAGS - LDFLAGS=$save_LDFLAGS - LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH - fi - if test -z "$AWTLIB"; then - AWTLIB=-ljawt - fi - AC_MSG_RESULT([$AWTLIB]) - AC_SUBST(AWTLIB) + AC_CHECK_LIB(jawt, JAWT_GetAWT, [ AWTLIB="-ljawt"] ) + if test -z "$AWTLIB"; then + LDFLAGS="$LDFLAGS -L$JAVA_HOME/jre/bin/xawt -ljawt" + AC_CHECK_LIB(mawt, JAWT_GetAWT, [ AWTLIB="-L$JAVA_HOME/jre/bin/xawt -ljawt -lmawt"]) + fi + exec 6>&1 # output on again + CFLAGS=$save_CFLAGS + LDFLAGS=$save_LDFLAGS + LD_LIBRARY_PATH=$save_LD_LIBRARY_PATH + fi + if test -z "$AWTLIB"; then + AWTLIB=-ljawt + fi + AC_MSG_RESULT([$AWTLIB]) + AC_SUBST(AWTLIB) fi AC_SUBST(JAVA_HOME) @@ -3677,24 +3720,24 @@ else # (the other) not... $DMAKE -V 2>/dev/null | grep 'dmake .* Version .*' >/dev/null if test $? -eq 0; then - BUILD_DMAKE=NO - AC_MSG_RESULT([yes]) - AC_MSG_CHECKING([the dmake version]) - DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` - if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then - AC_MSG_RESULT([OK, >= 4.11]) - elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ - test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then - AC_MSG_RESULT([OK, >= 4.11]) - else - AC_MSG_RESULT([too old. >= 4.11 is needed]) - echo "A newer dmake will be built on ./bootstrap" - BUILD_DMAKE=YES - fi + BUILD_DMAKE=NO + AC_MSG_RESULT([yes]) + AC_MSG_CHECKING([the dmake version]) + DMAKE_VERSION=`$DMAKE -V | $AWK '$3 == "Version" {print $4}'` + if test "`echo $DMAKE_VERSION | cut -d'.' -f1`" -gt "4"; then + AC_MSG_RESULT([OK, >= 4.11]) + elif test "`echo $DMAKE_VERSION | cut -d'.' -f1`" = "4" && \ + test "`echo $DMAKE_VERSION | cut -d'.' -f2`" -ge "11"; then + AC_MSG_RESULT([OK, >= 4.11]) + else + AC_MSG_RESULT([too old. >= 4.11 is needed]) + echo "A newer dmake will be built on ./bootstrap" + BUILD_DMAKE=YES + fi else - AC_MSG_RESULT([no]) - echo "dmake will be built on ./bootstrap" - BUILD_DMAKE=YES + AC_MSG_RESULT([no]) + echo "dmake will be built on ./bootstrap" + BUILD_DMAKE=YES fi fi AC_SUBST(BUILD_DMAKE) @@ -3702,59 +3745,59 @@ AC_SUBST(BUILD_DMAKE) AC_MSG_CHECKING([whether to enable EPM for packing]) BUILD_EPM=NO if test "$enable_epm" = "yes"; then - AC_MSG_RESULT([yes]) - dnl =================================================================== - dnl Check for epm - not needed for Windows - dnl =================================================================== - if test "$_os" != "WINNT"; then - if test -n "$with_epm"; then - EPM=$with_epm - else - AC_PATH_PROG(EPM, epm, no) - fi - if test "$EPM" = "no" || test "$EPM" = "internal"; then - echo "EPM will be built." - BUILD_EPM=YES - BUILD_TYPE="$BUILD_TYPE EPM" - else - # Gentoo has some epm which is something different... - AC_MSG_CHECKING([whether the found epm is the right epm]) - if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm]) - fi - AC_MSG_CHECKING([epm version]) - EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` - if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ - test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then - AC_MSG_RESULT([OK, >= 3.7]) - BUILD_EPM=NO - if test "$_os" = "Darwin"; then - AC_MSG_CHECKING([which PackageMaker EPM thinks to use]) - _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` - if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then + AC_MSG_RESULT([yes]) + dnl =================================================================== + dnl Check for epm - not needed for Windows + dnl =================================================================== + if test "$_os" != "WINNT"; then + if test -n "$with_epm"; then + EPM=$with_epm + else + AC_PATH_PROG(EPM, epm, no) + fi + if test "$EPM" = "no" || test "$EPM" = "internal"; then + echo "EPM will be built." + BUILD_EPM=YES + BUILD_TYPE="$BUILD_TYPE EPM" + else + # Gentoo has some epm which is something different... + AC_MSG_CHECKING([whether the found epm is the right epm]) + if $EPM | grep "ESP Package Manager" >/dev/null 2>/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([no. Install ESP Package Manager (www.easysw.com/epm) and/or specify the path to the right epm]) + fi + AC_MSG_CHECKING([epm version]) + EPM_VERSION=`$EPM | grep 'ESP Package Manager' | cut -d' ' -f4 | $SED -e s/v//` + if test "`echo $EPM_VERSION | cut -d'.' -f1`" -gt "3" || \ + test "`echo $EPM_VERSION | cut -d'.' -f1`" -eq "3" -a "`echo $EPM_VERSION | cut -d'.' -f2`" -ge "7"; then + AC_MSG_RESULT([OK, >= 3.7]) + BUILD_EPM=NO + if test "$_os" = "Darwin"; then + AC_MSG_CHECKING([which PackageMaker EPM thinks to use]) + _pm=`strings $EPM | grep PackageMaker | cut -d" " -f1` + if test "$_pm" = "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker"; then AC_MSG_ERROR([$_pm; PackageMaker expected in wrong path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)]) - elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then - AC_MSG_RESULT([$_pm, ok]) - else # we never should get here, but go safe - AC_MSG_ERROR([$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)]) - fi - fi - else - AC_MSG_RESULT([too old. epm >= 3.7 is required.]) - echo "EPM will be built." - BUILD_EPM=YES - BUILD_TYPE="$BUILD_TYPE EPM" - fi - fi - fi - - # test which package format to use - AC_MSG_CHECKING([which package format to use]) - - # defaults - case "$_os" in + elif test "$_pm" = "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker"; then + AC_MSG_RESULT([$_pm, ok]) + else # we never should get here, but go safe + AC_MSG_ERROR([$_pm; PackageMaker expected in unknown path. Either patch your epm with the right path (/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker) or use internal patched epm (--with-epm=internal)]) + fi + fi + else + AC_MSG_RESULT([too old. epm >= 3.7 is required.]) + echo "EPM will be built." + BUILD_EPM=YES + BUILD_TYPE="$BUILD_TYPE EPM" + fi + fi + fi + + # test which package format to use + AC_MSG_CHECKING([which package format to use]) + + # defaults + case "$_os" in Darwin) PKGFORMAT=dmg ;; @@ -3762,12 +3805,12 @@ if test "$enable_epm" = "yes"; then PKGFORMAT=pkg ;; Linux) - # if building on Debian, default should be deb... - if test -e /etc/debian_version; then - PKGFORMAT=deb - else - PKGFORMAT=rpm - fi + # if building on Debian, default should be deb... + if test -e /etc/debian_version; then + PKGFORMAT=deb + else + PKGFORMAT=rpm + fi ;; AIX) PKGFORMAT=rpm @@ -3785,14 +3828,14 @@ if test "$enable_epm" = "yes"; then # but go sure... *) AC_MSG_ERROR([unknown system]) - esac - if test -n "$with_package_format"; then - for i in $with_package_format; do - case "$i" in + esac + if test -n "$with_package_format"; then + for i in $with_package_format; do + case "$i" in aix | bsd | deb | inst | tardist | osx | pkg | rpm | setld | native | portable | archive | dmg | installed | msi) - ;; - *) - AC_MSG_ERROR([unsupported format $i. Supported by EPM are: + ;; + *) + AC_MSG_ERROR([unsupported format $i. Supported by EPM are: aix - AIX software distribution bsd - FreeBSD, NetBSD, or OpenBSD software distribution depot or swinstall - HP-UX software distribution @@ -3810,93 +3853,93 @@ dmg - Mac OS X .dmg installed - installation tree msi - Windows .msi ]) - ;; - esac - done - PKGFORMAT="$with_package_format" - fi - AC_MSG_RESULT([$PKGFORMAT]) - if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then - AC_MSG_CHECKING([for rpm]) - for a in "$RPM" rpmbuild rpm; do - $a --usage >/dev/null 2> /dev/null - if test $? -eq 0; then - RPM=$a - break - else - $a --version >/dev/null 2> /dev/null + ;; + esac + done + PKGFORMAT="$with_package_format" + fi + AC_MSG_RESULT([$PKGFORMAT]) + if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null; then + AC_MSG_CHECKING([for rpm]) + for a in "$RPM" rpmbuild rpm; do + $a --usage >/dev/null 2> /dev/null if test $? -eq 0; then - RPM=$a - break + RPM=$a + break + else + $a --version >/dev/null 2> /dev/null + if test $? -eq 0; then + RPM=$a + break + fi + fi + done + if test -z "$RPM" ; then + AC_MSG_ERROR([not found]) + elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then + RPM_PATH=`which $RPM` + AC_MSG_RESULT([$RPM_PATH]) + else + AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) + fi + fi + if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then + AC_PATH_PROG(DPKG, dpkg, no) + if test "$DPKG" = "no"; then + AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) + fi + fi + if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then + if test "$_os" = "Darwin"; then + AC_MSG_CHECKING([for PackageMaker availability]) + if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then + AC_MSG_ERROR([not installed. Please install Apples Dev Tools]) + else + AC_MSG_RESULT([ok]) + fi + else + AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) + fi + fi + if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ + echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then + if test "$EPM" != "no" && test "$EPM" != "internal"; then + if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then + AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs]) + if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + if echo "$PKGFORMAT" | grep -q rpm; then + _pt="rpm" + AC_MSG_WARN([the rpms will need to be installed with --nodeps]) + echo "the rpms will need to be installed with --nodeps" >> warn + else + _pt="pkg" + fi + AC_MSG_WARN([the ${_pt}s will not be relocateable]) + echo "the ${_pt}s will not be relocateable" >> warn + AC_MSG_WARN([if you want to make sure installation without --nodeps and + relocation will work, you need to patch your epm with the + patch in epm/epm-3.7.patch or build with + --with-epm=internal which will build a suitable epm]) + fi fi - fi - done - if test -z "$RPM" ; then - AC_MSG_ERROR([not found]) - elif "$RPM" --help 2>&1 | $EGREP buildroot >/dev/null; then - RPM_PATH=`which $RPM` - AC_MSG_RESULT([$RPM_PATH]) - else - AC_MSG_ERROR([cannot build packages. Try installing rpmbuild.]) - fi - fi - if echo "$PKGFORMAT" | $EGREP deb 2>&1 >/dev/null; then - AC_PATH_PROG(DPKG, dpkg, no) - if test "$DPKG" = "no"; then - AC_MSG_ERROR([dpkg needed for deb creation. Install dpkg.]) - fi - fi - if echo "PKGFORMAT" | $EGREP osx 2>&1 >/dev/null; then - if test "$_os" = "Darwin"; then - AC_MSG_CHECKING([for PackageMaker availability]) - if ! test -x /Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker; then - AC_MSG_ERROR([not installed. Please install Apples Dev Tools]) - else - AC_MSG_RESULT([ok]) - fi - else - AC_MSG_ERROR([PackageMaker needed to build OSX packages and you are not on OSX...]) - fi - fi - if echo "$PKGFORMAT" | $EGREP rpm 2>&1 >/dev/null || \ - echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then - if test "$EPM" != "no" && test "$EPM" != "internal"; then - if test "`echo $EPM_VERSION | cut -d'.' -f1`" -lt "4"; then - AC_MSG_CHECKING([whether epm is patched for LibreOffice's needs]) - if grep "Patched for LibreOffice" $EPM >/dev/null 2>/dev/null; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - if echo "$PKGFORMAT" | grep -q rpm; then - _pt="rpm" - AC_MSG_WARN([the rpms will need to be installed with --nodeps]) - echo "the rpms will need to be installed with --nodeps" >> warn - else - _pt="pkg" - fi - AC_MSG_WARN([the ${_pt}s will not be relocateable]) - echo "the ${_pt}s will not be relocateable" >> warn - AC_MSG_WARN([if you want to make sure installation without --nodeps and - relocation will work, you need to patch your epm with the - patch in epm/epm-3.7.patch or build with - --with-epm=internal which will build a suitable epm]) - fi - fi fi - fi - if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then - AC_PATH_PROG(PKGMK, pkgmk, no) - if test "$PKGMK" = "no"; then - AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) - fi - fi - AC_SUBST(RPM) - AC_SUBST(DPKG) - AC_SUBST(PKGMK) + fi + if echo "$PKGFORMAT" | $EGREP pkg 2>&1 >/dev/null; then + AC_PATH_PROG(PKGMK, pkgmk, no) + if test "$PKGMK" = "no"; then + AC_MSG_ERROR([pkgmk needed for Solaris pkg creation. Install it.]) + fi + fi + AC_SUBST(RPM) + AC_SUBST(DPKG) + AC_SUBST(PKGMK) else - AC_MSG_RESULT([no]) - EPM=NO - PKGFORMAT=native + AC_MSG_RESULT([no]) + EPM=NO + PKGFORMAT=native fi AC_SUBST(EPM) AC_SUBST(BUILD_EPM) @@ -3922,11 +3965,11 @@ dnl Check for building stax dnl =================================================================== AC_MSG_CHECKING([whether to build the stax]) if test -f "./stax/download/jsr173_1.0_api.jar"; then - BUILD_STAX=NO - AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar]) + BUILD_STAX=NO + AC_MSG_RESULT([no, will use the prebuilt stax/download/jsr173_1.0_api.jar]) else - BUILD_STAX=YES - AC_MSG_RESULT([yes]) + BUILD_STAX=YES + AC_MSG_RESULT([yes]) fi AC_SUBST(BUILD_STAX) @@ -3935,51 +3978,51 @@ dnl Check for building ODK dnl =================================================================== AC_MSG_CHECKING([whether to build the ODK]) if test "z$enable_odk" = "z" -o "$enable_odk" != "no"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) - if test "$with_java" != "no"; then - AC_MSG_CHECKING([whether to build unowinreg.dll]) - if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then - # build on Win by default - enable_build_unowinreg=yes - fi - if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then - AC_MSG_RESULT([no]) - BUILD_UNOWINREG=NO - else - AC_MSG_RESULT([yes]) - BUILD_UNOWINREG=YES - fi - if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then - if test -z "$with_mingw_cross_compiler"; then - dnl Guess... - AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false) - elif test -x "$with_mingw_cross_compiler"; then - MINGWCXX="$with_mingw_cross_compiler" - else - AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false) - fi + if test "$with_java" != "no"; then + AC_MSG_CHECKING([whether to build unowinreg.dll]) + if test "$_os" = "WINNT" -a "z$enable_build_unowinreg" = "z" ; then + # build on Win by default + enable_build_unowinreg=yes + fi + if test "z$enable_build_unowinreg" = "z" -o "$enable_build_unowinreg" = "no"; then + AC_MSG_RESULT([no]) + BUILD_UNOWINREG=NO + else + AC_MSG_RESULT([yes]) + BUILD_UNOWINREG=YES + fi + if test "$_os" != "WINNT" -a "$BUILD_UNOWINREG" = "YES"; then + if test -z "$with_mingw_cross_compiler"; then + dnl Guess... + AC_CHECK_PROGS(MINGWCXX,i386-mingw32msvc-g++ i586-pc-mingw32-g++ i686-pc-mingw32-g++ i686-w64-mingw32-g++,false) + elif test -x "$with_mingw_cross_compiler"; then + MINGWCXX="$with_mingw_cross_compiler" + else + AC_CHECK_TOOL(MINGWCXX, "$with_mingw_cross_compiler", false) + fi - if test "$MINGWCXX" = "false"; then - AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.]) - fi + if test "$MINGWCXX" = "false"; then + AC_MSG_ERROR([MinGW32 C++ cross-compiler not found.]) + fi - mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`" - if test -x "$mingwstrip_test"; then - MINGWSTRIP="$mingwstrip_test" - else - AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false) - fi + mingwstrip_test="`echo $MINGWCXX | $SED -e s/g++/strip/`" + if test -x "$mingwstrip_test"; then + MINGWSTRIP="$mingwstrip_test" + else + AC_CHECK_TOOL(MINGWSTRIP, "$mingwstrip_test", false) + fi - if test "$MINGWSTRIP" = "false"; then - AC_MSG_ERROR(MinGW32 binutils not found.) - fi - fi - fi - BUILD_TYPE="$BUILD_TYPE ODK" + if test "$MINGWSTRIP" = "false"; then + AC_MSG_ERROR(MinGW32 binutils not found.) + fi + fi + fi + BUILD_TYPE="$BUILD_TYPE ODK" else - AC_MSG_RESULT([no]) - BUILD_UNOWINREG=NO + AC_MSG_RESULT([no]) + BUILD_UNOWINREG=NO fi AC_SUBST(BUILD_UNOWINREG) AC_SUBST(MINGWCXX) @@ -3990,12 +4033,12 @@ dnl Check for system stdlibs dnl =================================================================== AC_MSG_CHECKING([whether to provide libstdc++/libgcc_s in the installset]) if test -n "$with_system_stdlibs" -o -n "$with_system_libs" && \ - test "$with_system_stdlibs" != "no"; then - AC_MSG_RESULT([no]) - SYSTEM_STDLIBS=YES + test "$with_system_stdlibs" != "no"; then + AC_MSG_RESULT([no]) + SYSTEM_STDLIBS=YES else - AC_MSG_RESULT([yes]) - SYSTEM_STDLIBS=NO + AC_MSG_RESULT([yes]) + SYSTEM_STDLIBS=NO fi AC_SUBST(SYSTEM_STDLIBS) @@ -4004,7 +4047,7 @@ dnl Check for system zlib dnl =================================================================== AC_MSG_CHECKING([which zlib to use]) if test -n "$with_system_zlib" -o -n "$with_system_libs" -o \ - "$_os" != "WINNT" && \ + "$_os" != "WINNT" && \ test "$with_system_zlib" != "no"; then AC_MSG_RESULT([external]) SYSTEM_ZLIB=YES @@ -4098,7 +4141,17 @@ dnl =================================================================== dnl Check for system cppunit dnl =================================================================== AC_MSG_CHECKING([which cppunit to use]) -if test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ +if test -z "$ENABLE_DEBUG_STL"; then + AC_MSG_ERROR([Internal error, debug build check needs to precede cppunit check]) +fi +if test "$ENABLE_DEBUG_STL" = "TRUE"; then + if test "$with_system_cppunit" = "yes"; then + AC_MSG_ERROR([--with-system-cppunit conflicts with debug build]) + fi + AC_MSG_RESULT([internal, needed by debug build]) + SYSTEM_CPPUNIT=NO + BUILD_TYPE="$BUILD_TYPE CPPUNIT" +elif test -n "$with_system_cppunit" -o -n "$with_system_libs" && \ test "$with_system_cppunit" != "no"; then AC_MSG_RESULT([external]) SYSTEM_CPPUNIT=YES @@ -4117,7 +4170,7 @@ dnl =================================================================== dnl Check whether freetype is available dnl =================================================================== if test "$test_freetype" = "yes"; then - AC_MSG_CHECKING([whether freetype is available]) + AC_MSG_CHECKING([whether freetype is available]) PKG_CHECK_MODULES( FREETYPE, freetype2 >= 2.0 ) fi AC_SUBST(FREETYPE_CFLAGS) @@ -4177,23 +4230,23 @@ fi AC_SUBST(USE_FT_EMBOLDEN) if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \ - test "$with_system_libxslt" != "no"; then + test "$with_system_libxslt" != "no"; then if test -z "$with_system_libxml" -a -z "$with_system_libs" || \ - test "$with_system_libxml" = "no"; then - # somehow AC_MSG_WARN won't work... - echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" - echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn - with_system_libxml=yes + test "$with_system_libxml" = "no"; then + # somehow AC_MSG_WARN won't work... + echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" + echo "to prevent incompatibilities between internal libxml2 and libxslt, the office will be build with system-libxml" >> warn + with_system_libxml=yes fi fi if test -n "$with_system_libxml" -o -n "$with_system_libs" && \ - test "$with_system_libxml" != "no"; then + test "$with_system_libxml" != "no"; then if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ - test "$with_system_libxslt" = "no"; then - # somehow AC_MSG_WARN won't work... - echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" - echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn - with_system_libxslt=yes + test "$with_system_libxslt" = "no"; then + # somehow AC_MSG_WARN won't work... + echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" + echo "to prevent incompatibilities between internal libxslt and libxml2, the office will be build with system-libxslt" >> warn + with_system_libxslt=yes fi fi @@ -4203,7 +4256,7 @@ fi AC_MSG_CHECKING([which libxslt to use]) if test -n "$with_system_libxslt" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" && \ - test "$with_system_libxslt" != "no"; then + test "$with_system_libxslt" != "no"; then AC_MSG_RESULT([external]) SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then @@ -4243,7 +4296,7 @@ AC_SUBST(XSLTPROC) AC_MSG_CHECKING([which libxml to use]) if test -n "$with_system_libxml" -o -n "$with_system_libs" -o \ "$_os" = "Darwin" -o $_os = iOS && \ - test "$with_system_libxml" != "no"; then + test "$with_system_libxml" != "no"; then AC_MSG_RESULT([external]) SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then @@ -4277,132 +4330,132 @@ AC_MSG_CHECKING([which Python to use]) case "$enable_python" in no|disable) - enable_python=no - AC_MSG_RESULT([none]) - DISABLE_PYTHON=TRUE - ;; + enable_python=no + AC_MSG_RESULT([none]) + DISABLE_PYTHON=TRUE + ;; ""|yes|auto) - if test $build_os = cygwin; then - dnl When building on Windows we don't attempt to use any installed - dnl "system" Python. - dnl - dnl (When cross-compiling to Windows from Linux using the mingw32-cross - dnl compiler from OBS, use mingw32-python from OBS, and ditto for other - dnl MinGW cross-compilation setups.) - AC_MSG_RESULT([internal]) - enable_python=internal - elif test $_os = Darwin; then - AC_MSG_RESULT([system, MacOSX10.4u.SDK (Python 2.3)]) - enable_python=system - PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3" - PYTHON_LIBS="-framework Python" - else - AC_MSG_RESULT([checking below]) - enable_python=auto - fi - ;; + if test $build_os = cygwin; then + dnl When building on Windows we don't attempt to use any installed + dnl "system" Python. + dnl + dnl (When cross-compiling to Windows from Linux using the mingw32-cross + dnl compiler from OBS, use mingw32-python from OBS, and ditto for other + dnl MinGW cross-compilation setups.) + AC_MSG_RESULT([internal]) + enable_python=internal + elif test $_os = Darwin; then + AC_MSG_RESULT([system, MacOSX10.4u.SDK (Python 2.3)]) + enable_python=system + PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3" + PYTHON_LIBS="-framework Python" + else + AC_MSG_RESULT([checking below]) + enable_python=auto + fi + ;; internal) - AC_MSG_RESULT([internal]) - ;; + AC_MSG_RESULT([internal]) + ;; system) - AC_MSG_RESULT([system]) - ;; + AC_MSG_RESULT([system]) + ;; *) - AC_MSG_ERROR([Incorrect --enable-python option]) - ;; + AC_MSG_ERROR([Incorrect --enable-python option]) + ;; esac AC_SUBST(DISABLE_PYTHON) if test $_os = WINNT -a "$WITH_MINGW" != yes -a $enable_python = system; then - AC_MSG_ERROR([Must use internal Python when building with MSVC]) + AC_MSG_ERROR([Must use internal Python when building with MSVC]) fi if test $enable_python != no; then - BUILD_TYPE="$BUILD_TYPE PYUNO" + BUILD_TYPE="$BUILD_TYPE PYUNO" fi if test "$cross_compiling" != yes; then - if test $enable_python = system; then - dnl This causes an error if no Python found - AM_PATH_PYTHON([2.2]) - elif test $enable_python = auto; then - dnl This allows lack of system Python - AM_PATH_PYTHON([2.2],, [:]) - - if test "$PYTHON" = :; then - enable_python=internal - else - enable_python=system - fi - fi + if test $enable_python = system; then + dnl This causes an error if no Python found + AM_PATH_PYTHON([2.2]) + elif test $enable_python = auto; then + dnl This allows lack of system Python + AM_PATH_PYTHON([2.2],, [:]) + + if test "$PYTHON" = :; then + enable_python=internal + else + enable_python=system + fi + fi fi if test $enable_python = system; then - if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then - dnl Fallback: Accept these in the environment. + if test -n "$PYTHON_CFLAGS" -a -n "$PYTHON_LIBS"; then + dnl Fallback: Accept these in the environment. : - elif test "$cross_compiling" != yes; then - 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_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"` - PYTHON_CFLAGS="-I$python_include" - PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs" - elif test "$cross_compiling" = yes; then - dnl How to find out the cross-compilation Python installation path? - dnl Let's hardocode what we know for different distributions for now... - - for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do - for python_version in 2.6 ; do - if test -f ${python_sysroot}/include/python${python_version}/Python.h; then - PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version" - PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs" - break - fi - done - test -n "$PYTHON_CFLAGS" && break - done - fi + elif test "$cross_compiling" != yes; then + 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_libdir=`$PYTHON -c "import distutils.sysconfig; print(distutils.sysconfig.get_config_var('LIBDIR'));"` + PYTHON_CFLAGS="-I$python_include" + PYTHON_LIBS="-L$python_libdir -lpython$python_version $python_libs" + elif test "$cross_compiling" = yes; then + dnl How to find out the cross-compilation Python installation path? + dnl Let's hardocode what we know for different distributions for now... + + for python_sysroot in /usr/i686-w64-mingw32/sys-root/mingw ; do + for python_version in 2.6 ; do + if test -f ${python_sysroot}/include/python${python_version}/Python.h; then + PYTHON_CFLAGS="-I ${python_sysroot}/include/python$python_version" + PYTHON_LIBS="-L ${python_sysroot}lib -lpython$python_version $python_libs" + break + fi + done + test -n "$PYTHON_CFLAGS" && break + done + fi fi dnl By now enable_python should be "system", "internal" or "no" case $enable_python in system) - SYSTEM_PYTHON=YES + SYSTEM_PYTHON=YES - dnl Check if the headers really work - save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" - AC_CHECK_HEADER(Python.h, [], + dnl Check if the headers really work + save_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS" + AC_CHECK_HEADER(Python.h, [], [AC_MSG_ERROR([Python headers not found. You probably want to set both the PYTHON_CFLAGS and PYTHON_LIBS environment variables.])], []) - CPPFLAGS="$save_CPPFLAGS" + CPPFLAGS="$save_CPPFLAGS" - dnl FIXME Check if the Python library can be linked with, too? - ;; + dnl FIXME Check if the Python library can be linked with, too? + ;; internal) - SYSTEM_PYTHON=NO - BUILD_TYPE="$BUILD_TYPE PYTHON" - # Embedded Python dies without Home set - 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 - ;; + SYSTEM_PYTHON=NO + BUILD_TYPE="$BUILD_TYPE PYTHON" + # Embedded Python dies without Home set + 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 + ;; no) - SYSTEM_PYTHON=NO - ;; + SYSTEM_PYTHON=NO + ;; *) - AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"]) - ;; + AC_MSG_ERROR([Internal configure script error, invalid enable_python value "$enable_python"]) + ;; esac AC_SUBST(SYSTEM_PYTHON) @@ -4432,9 +4485,9 @@ if test "$with_system_translate_toolkit" = "yes" ; then AC_MSG_ERROR([$PO2OO does not support --skipsource; use translate-toolkit >= 1.9 or use --without-system-translate-toolkit]) fi else - AC_MSG_RESULT([internal]) - SYSTEM_TRANSLATE_TOOLKIT=NO - BUILD_TYPE="$BUILD_TYPE TRANSLATE_TOOLKIT" + AC_MSG_RESULT([internal]) + SYSTEM_TRANSLATE_TOOLKIT=NO + BUILD_TYPE="$BUILD_TYPE TRANSLATE_TOOLKIT" fi AC_SUBST(SYSTEM_TRANSLATE_TOOLKIT) @@ -4482,7 +4535,7 @@ if test -n "$with_system_db" -o -n "$with_system_libs" && \ [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ]) AC_CHECK_LIB(db$dash$dbver, __db185_open, [ DB_LIB="db$dash$dbver"; DB_CPPLIB="db_cxx$dash$dbver"; break ]) - done + done test -n "$DB_LIB" && break done @@ -4512,11 +4565,11 @@ dnl Check for system lucene dnl =================================================================== AC_MSG_CHECKING([which lucene to use]) if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ - test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_LUCENE=YES - if test -z $LUCENE_CORE_JAR; then - AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar, + test "$with_system_lucene" != "no" && test "$with_system_jars" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_LUCENE=YES + if test -z $LUCENE_CORE_JAR; then + AC_CHECK_FILE(/usr/share/java/lucene-core-2.3.jar, [ LUCENE_CORE_JAR=/usr/share/java/lucene-core-2.3.jar ], [ AC_CHECK_FILE(/usr/share/java/lucene-core.jar, @@ -4528,14 +4581,14 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ ] ) ] - ) - else - AC_CHECK_FILE($LUCENE_CORE_JAR, [], + ) + else + AC_CHECK_FILE($LUCENE_CORE_JAR, [], [AC_MSG_ERROR(lucene-core.jar not found.)], []) - fi + fi - if test -z $LUCENE_ANALYZERS_JAR; then - AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar, + if test -z $LUCENE_ANALYZERS_JAR; then + AC_CHECK_FILE(/usr/share/java/lucene-analyzers-2.3.jar, [ LUCENE_ANALYZERS_JAR=/usr/share/java/lucene-analyzers-2.3.jar ], [ AC_CHECK_FILE(/usr/share/java/lucene-contrib/lucene-analyzers.jar, @@ -4543,14 +4596,14 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ [ AC_MSG_ERROR(lucene-analyzers.jar replacement not found.)] ) ] - ) - else - AC_CHECK_FILE($LUCENE_CORE_JAR, [], + ) + else + AC_CHECK_FILE($LUCENE_CORE_JAR, [], [ AC_MSG_ERROR(lucene-analyzers.jar not found.)], []) - fi - AC_MSG_CHECKING([whether lucene is version 2.x]) - export LUCENE_CORE_JAR - if $PERL -e 'use Archive::Zip; + fi + AC_MSG_CHECKING([whether lucene is version 2.x]) + export LUCENE_CORE_JAR + if $PERL -e 'use Archive::Zip; my $file = "$ENV{'LUCENE_CORE_JAR'}"; my $zip = Archive::Zip->new( $file ); my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); @@ -4559,10 +4612,10 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \ } else { exit 1; }'; then - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([no, you need lucene 2]) - fi + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([no, you need lucene 2]) + fi else AC_MSG_RESULT([internal]) @@ -4575,92 +4628,92 @@ AC_SUBST(LUCENE_ANALYZERS_JAR) AC_MSG_CHECKING([whether to build the MySQL Connector extension]) if test -n "$enable_ext_mysql_connector" -a "$enable_ext_mysql_connector" != "no"; then - AC_MSG_RESULT([yes]) - ENABLE_MYSQLC=YES - AC_MSG_CHECKING([for mysqlc module]) - if test -d mysqlc; then - AC_MSG_RESULT([OK]) - else - AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) - fi - BUILD_TYPE="$BUILD_TYPE MYSQLC" + AC_MSG_RESULT([yes]) + ENABLE_MYSQLC=YES + AC_MSG_CHECKING([for mysqlc module]) + if test -d mysqlc; then + AC_MSG_RESULT([OK]) + else + AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) + fi + BUILD_TYPE="$BUILD_TYPE MYSQLC" else - AC_MSG_RESULT([no]) - ENABLE_MYSQLC=NO + AC_MSG_RESULT([no]) + ENABLE_MYSQLC=NO fi AC_SUBST(ENABLE_MYSQLC) if test "$ENABLE_MYSQLC" = "YES"; then -SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC" + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_MYSQLC" -dnl =================================================================== -dnl Check for system MySQL -dnl =================================================================== -AC_MSG_CHECKING([for mysql pre-requisites]) -if test -n "$with_system_mysql" -o -n "$with_system_libs" && \ - test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then - AC_MSG_RESULT([external MySQL]) - SYSTEM_MYSQL=YES - AC_PATH_PROG( MYSQLCONFIG, mysql_config) - AC_MSG_CHECKING([MySQL version]) - MYSQL_VERSION=`$MYSQLCONFIG --version` - MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` - if test "$MYSQL_MAJOR" -ge "5"; then - AC_MSG_RESULT([OK]) - else - AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) - fi - AC_MSG_CHECKING([for MySQL Client library]) - MYSQL_INC=`$MYSQLCONFIG --include` - MYSQL_LIB=`$MYSQLCONFIG --libs` - MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,` - AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB]) -else - SYSTEM_MYSQL=NO - if test -n "$with_libmysql_path"; then - AC_MSG_RESULT([external Connector/C (libmysql)]) - LIBMYSQL=libmysql.so - if test "$_os" = "Darwin"; then - LIBMYSQL=libmysql.dylib - elif test "$_os" = "WINNT"; then - LIBMYSQL=libmysql.dll - fi - AC_MSG_CHECKING([for $LIBMYSQL]) - if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then - AC_MSG_RESULT([found.]) - LIBMYSQL_PATH=$with_libmysql_path + dnl =================================================================== + dnl Check for system MySQL + dnl =================================================================== + AC_MSG_CHECKING([for mysql pre-requisites]) + if test -n "$with_system_mysql" -o -n "$with_system_libs" && \ + test "$with_system_mysql" != "no" && test "$with_system_libs" != "no"; then + AC_MSG_RESULT([external MySQL]) + SYSTEM_MYSQL=YES + AC_PATH_PROG( MYSQLCONFIG, mysql_config) + AC_MSG_CHECKING([MySQL version]) + MYSQL_VERSION=`$MYSQLCONFIG --version` + MYSQL_MAJOR=`$MYSQLCONFIG --version | cut -d"." -f1` + if test "$MYSQL_MAJOR" -ge "5"; then + AC_MSG_RESULT([OK]) else - AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) + AC_MSG_ERROR([too old, use 5.0.x or 5.1.x]) fi + AC_MSG_CHECKING([for MySQL Client library]) + MYSQL_INC=`$MYSQLCONFIG --include` + MYSQL_LIB=`$MYSQLCONFIG --libs` + MYSQL_DEFINES=`$MYSQLCONFIG --cflags | $SED -e s,$MYSQL_INC,,` + AC_MSG_RESULT([includes $MYSQL_INC, libraries $MYSQL_LIB]) else - AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) + SYSTEM_MYSQL=NO + if test -n "$with_libmysql_path"; then + AC_MSG_RESULT([external Connector/C (libmysql)]) + LIBMYSQL=libmysql.so + if test "$_os" = "Darwin"; then + LIBMYSQL=libmysql.dylib + elif test "$_os" = "WINNT"; then + LIBMYSQL=libmysql.dll + fi + AC_MSG_CHECKING([for $LIBMYSQL]) + if test -e "$with_libmysql_path/lib/$LIBMYSQL"; then + AC_MSG_RESULT([found.]) + LIBMYSQL_PATH=$with_libmysql_path + else + AC_MSG_ERROR([not found. Please specify proper path in --with-libmysql-path.]) + fi + else + AC_MSG_ERROR([not given. Please specify either --with-system-mysql or --with-libmysql-path]) + fi fi -fi -AC_SUBST(SYSTEM_MYSQL) -AC_SUBST(MYSQL_INC) -AC_SUBST(MYSQL_LIB) -AC_SUBST(MYSQL_DEFINES) -AC_SUBST(LIBMYSQL_PATH) + AC_SUBST(SYSTEM_MYSQL) + AC_SUBST(MYSQL_INC) + AC_SUBST(MYSQL_LIB) + AC_SUBST(MYSQL_DEFINES) + AC_SUBST(LIBMYSQL_PATH) -AC_LANG_PUSH([C++]) -dnl =================================================================== -dnl Check for system MySQL C++ Connector -dnl =================================================================== -# FIXME! -# who thought this too-generic cppconn dir was a good idea? -AC_MSG_CHECKING([MySQL Connector/C++]) -if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ - test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_MYSQL_CPPCONN=YES + AC_LANG_PUSH([C++]) + dnl =================================================================== + dnl Check for system MySQL C++ Connector + dnl =================================================================== + # FIXME! + # who thought this too-generic cppconn dir was a good idea? + AC_MSG_CHECKING([MySQL Connector/C++]) + if test -n "$with_system_mysql_cppconn" -o -n "$with_system_libs" && \ + test "$with_system_mysql_cppconn" != "no" && test "$with_system_libs" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_MYSQL_CPPCONN=YES AC_LANG_PUSH([C++]) - AC_CHECK_HEADER(mysql_driver.h, [], + AC_CHECK_HEADER(mysql_driver.h, [], [AC_MSG_ERROR(mysql_driver.h not found. install MySQL C++ Connectivity)], []) - AC_CHECK_LIB(mysqlcppconn, main, [], + AC_CHECK_LIB(mysqlcppconn, main, [], [AC_MSG_ERROR(MySQL C++ Connectivity lib not found or functional)], []) - AC_MSG_CHECKING([version]) - AC_TRY_RUN([ + AC_MSG_CHECKING([version]) + AC_TRY_RUN([ #include <mysql_driver.h> int main(int argc, char **argv) { @@ -4674,21 +4727,22 @@ int main(int argc, char **argv) { return 1; } ], [AC_MSG_RESULT(OK)], [AC_MSG_ERROR([not suitable, we need >= 1.0.6])]) + AC_LANG_POP([C++]) -else - AC_MSG_RESULT([internal]) + else + AC_MSG_RESULT([internal]) AC_MSG_CHECKING([for mysqlcppconn module]) if test -d mysqlcppconn; then - AC_MSG_RESULT([OK]) + AC_MSG_RESULT([OK]) else - AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) + AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)]) fi - BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN" - SYSTEM_MYSQL_CPPCONN=NO -fi -AC_LANG_POP([C++]) -AC_SUBST(SYSTEM_MYSQL_CPPCONN) + BUILD_TYPE="$BUILD_TYPE MYSQLCPPCONN" + SYSTEM_MYSQL_CPPCONN=NO + fi + AC_LANG_POP([C++]) + AC_SUBST(SYSTEM_MYSQL_CPPCONN) fi dnl =================================================================== @@ -4697,16 +4751,16 @@ dnl =================================================================== AC_MSG_CHECKING([which hsqldb to use]) if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ test "$with_system_hsqldb" != "no" && test "$with_system_jars" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_HSQLDB=YES - if test -z $HSQLDB_JAR; then - HSQLDB_JAR=/usr/share/java/hsqldb.jar - fi - AC_CHECK_FILE($HSQLDB_JAR, [], + AC_MSG_RESULT([external]) + SYSTEM_HSQLDB=YES + if test -z $HSQLDB_JAR; then + HSQLDB_JAR=/usr/share/java/hsqldb.jar + fi + AC_CHECK_FILE($HSQLDB_JAR, [], [AC_MSG_ERROR(hsqldb.jar not found.)], []) - AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) - export HSQLDB_JAR - if $PERL -e 'use Archive::Zip; + AC_MSG_CHECKING([whether hsqldb is 1.8.0.x]) + export HSQLDB_JAR + if $PERL -e 'use Archive::Zip; my $file = "$ENV{'HSQLDB_JAR'}"; my $zip = Archive::Zip->new( $file ); my $mf = $zip->contents ( "META-INF/MANIFEST.MF" ); @@ -4727,10 +4781,10 @@ if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \ } else { exit 1; }'; then - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) - fi + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1]) + fi else AC_MSG_RESULT([internal]) SYSTEM_HSQLDB=NO @@ -4745,12 +4799,12 @@ dnl =================================================================== AC_MSG_CHECKING([which beanshell to use]) if test -n "$with_system_beanshell" -o -n "$with_system_libs" && \ test "$with_system_beanshell" != "no" && test "$with_system_jars" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_BSH=YES - if test -z $BSH_JAR; then - BSH_JAR=/usr/share/java/bsh.jar - fi - AC_CHECK_FILE($BSH_JAR, [], + AC_MSG_RESULT([external]) + SYSTEM_BSH=YES + if test -z $BSH_JAR; then + BSH_JAR=/usr/share/java/bsh.jar + fi + AC_CHECK_FILE($BSH_JAR, [], [AC_MSG_ERROR(bsh.jar not found.)], []) else AC_MSG_RESULT([internal]) @@ -4767,10 +4821,10 @@ dnl =================================================================== AC_MSG_CHECKING([which saxon to use]) if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ test "$with_system_saxon" != "no" && test "$with_system_jars" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_SAXON=YES - if test -z $SAXON_JAR; then - AC_CHECK_FILE(/usr/share/java/saxon9.jar, + AC_MSG_RESULT([external]) + SYSTEM_SAXON=YES + if test -z $SAXON_JAR; then + AC_CHECK_FILE(/usr/share/java/saxon9.jar, [ SAXON_JAR=/usr/share/java/saxon9.jar ], [ AC_CHECK_FILE(/usr/share/java/saxon.jar, @@ -4783,24 +4837,24 @@ if test -n "$with_system_saxon" -o -n "$with_system_libs" && \ ) ] ) - else - AC_CHECK_FILE($SAXON_JAR, [], + else + AC_CHECK_FILE($SAXON_JAR, [], [AC_MSG_ERROR(saxon.jar replacement not found.)], []) - fi - if test -n "$SERIALIZER_JAR"; then - AC_CHECK_FILE($SERIALIZER_JAR, [], + fi + if test -n "$SERIALIZER_JAR"; then + AC_CHECK_FILE($SERIALIZER_JAR, [], [AC_MSG_ERROR(serializer.jar not found.)], []) - AC_SUBST(SERIALIZER_JAR) - fi + AC_SUBST(SERIALIZER_JAR) + fi -dnl Saxon comes in two practically available versions, the out-of-date saxonb which -dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he -dnl "home edition" version, which is crippled to not support those Java extensions. -dnl And as an aside the he one also needs to be tweaked to include -dnl a META-INF/services to broadcast that it supports the jaxp transform factory + dnl Saxon comes in two practically available versions, the out-of-date saxonb which + dnl supports the Java extensions that LibreOffice uses, and the up-to-date saxon he + dnl "home edition" version, which is crippled to not support those Java extensions. + dnl And as an aside the he one also needs to be tweaked to include + dnl a META-INF/services to broadcast that it supports the jaxp transform factory - AC_MSG_CHECKING([if saxon works]) - cat > saxontest.java <<_ACEOF + AC_MSG_CHECKING([if saxon works]) + cat > saxontest.java <<_ACEOF [import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.stream.StreamSource; @@ -4830,7 +4884,8 @@ class saxontest { } ] _ACEOF - cat > saxontest.xsl<<_ACEOF + + cat > saxontest.xsl<<_ACEOF [<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/"> @@ -4839,23 +4894,24 @@ _ACEOF </xsl:stylesheet> ] _ACEOF - javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" - AC_TRY_EVAL(javac_cmd) - if test $? = 0 && test -f ./saxontest.class ; then - java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" - AC_TRY_EVAL(java_cmd) - if test $? = 0; then - AC_MSG_RESULT([yes]) - else - cat saxontest.java >&5 - AC_MSG_RESULT([no]) - AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) - fi + + javac_cmd="$JAVACOMPILER -cp $SAXON_JAR saxontest.java 1>&2" + AC_TRY_EVAL(javac_cmd) + if test $? = 0 && test -f ./saxontest.class ; then + java_cmd="$JAVAINTERPRETER -cp $SAXON_JAR:. saxontest saxontest.xsl 1>&2" + AC_TRY_EVAL(java_cmd) + if test $? = 0; then + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - cat saxontest.java >&5 - AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) + cat saxontest.java >&5 + AC_MSG_RESULT([no]) + AC_MSG_ERROR([Non-functional saxon jar, e.g. crippled saxon-he instead of saxonb]) fi + else + AC_MSG_RESULT([no]) + cat saxontest.java >&5 + AC_MSG_ERROR([saxontest could not be compiled, non-functional saxon jar]) + fi else AC_MSG_RESULT([internal]) SYSTEM_SAXON=NO @@ -4865,57 +4921,58 @@ AC_SUBST(SYSTEM_SAXON) AC_SUBST(SAXON_JAR) if test -n "$NEED_SAXON"; then - BUILD_TYPE="$BUILD_TYPE SAXON" + BUILD_TYPE="$BUILD_TYPE SAXON" fi dnl =================================================================== dnl Check for system curl dnl =================================================================== if test "$_os" = "Darwin" -a "$with_system_curl" != "no"; then - with_system_curl=yes + with_system_curl=yes fi AC_MSG_CHECKING([which libcurl to use]) if test -n "$with_system_curl" -o -n "$with_system_libs" && \ test "$with_system_curl" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_CURL=YES - - curl_version="" - if test "$cross_compiling" = "yes"; then - dnl At least the OBS mingw32-libcurl-devel package - dnl comes with a proper .pc file - PKG_CHECK_MODULES(CURL, libcurl,, [:]) - if test -n "CURL_PKG_ERRORS"; then - AC_MSG_RESULT([no]) - else - curl_version=`$PKG_CONFIG --modversion libcurl` - fi - fi - if test -z "$curl_version"; then - AC_PATH_PROG(CURLCONFIG, curl-config) - if test -z "$CURLCONFIG"; then - AC_MSG_ERROR([install the libcurl development package]) - fi - CURL_LIBS=`$CURLCONFIG --libs` - CURL_CFLAGS=`$CURLCONFIG --cflags` - curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'` - fi - - AC_MSG_CHECKING([whether libcurl is >= 7.13.1]) - case $curl_version in - dnl brackets doubled below because Autoconf uses them as m4 quote characters, - dnl so they need to be doubled to end up in the configure script - 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*) - AC_MSG_RESULT([yes, you have $curl_version]) - ;; - *) - AC_MSG_ERROR([no, you have $curl_version]) - ;; - esac + AC_MSG_RESULT([external]) + SYSTEM_CURL=YES + + curl_version="" + if test "$cross_compiling" = "yes"; then + dnl At least the OBS mingw32-libcurl-devel package + dnl comes with a proper .pc file + PKG_CHECK_MODULES(CURL, libcurl,, [:]) + if test -n "CURL_PKG_ERRORS"; then + AC_MSG_RESULT([no]) + else + curl_version=`$PKG_CONFIG --modversion libcurl` + fi + fi + if test -z "$curl_version"; then + AC_PATH_PROG(CURLCONFIG, curl-config) + if test -z "$CURLCONFIG"; then + AC_MSG_ERROR([install the libcurl development package]) + fi + CURL_LIBS=`$CURLCONFIG --libs` + CURL_CFLAGS=`$CURLCONFIG --cflags` + curl_version=`$CURLCONFIG --version | $SED -e 's/^libcurl //'` + fi + + AC_MSG_CHECKING([whether libcurl is >= 7.13.1]) + + case $curl_version in + dnl brackets doubled below because Autoconf uses them as m4 quote characters, + dnl so they need to be doubled to end up in the configure script + 7.13.1|7.1[[4-9]].*|7.[[2-9]]?.*|7.???.*|[[8-9]].*|[[1-9]][[0-9]].*) + AC_MSG_RESULT([yes, you have $curl_version]) + ;; + *) + AC_MSG_ERROR([no, you have $curl_version]) + ;; + esac else - AC_MSG_RESULT([internal]) - SYSTEM_CURL=NO - BUILD_TYPE="$BUILD_TYPE CURL" + AC_MSG_RESULT([internal]) + SYSTEM_CURL=NO + BUILD_TYPE="$BUILD_TYPE CURL" fi AC_SUBST(SYSTEM_CURL) AC_SUBST(CURL_CFLAGS) @@ -4926,38 +4983,37 @@ dnl Check for system boost dnl =================================================================== AC_MSG_CHECKING([which boost to use]) if test -n "$with_system_boost" -o -n "$with_system_headers" && \ - test "$with_system_boost" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_BOOST=YES - AC_LANG_PUSH([C++]) - AC_CHECK_HEADER(boost/shared_ptr.hpp, [], + test "$with_system_boost" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_BOOST=YES + AC_LANG_PUSH([C++]) + AC_CHECK_HEADER(boost/shared_ptr.hpp, [], [AC_MSG_ERROR(boost/shared_ptr.hpp not found. install boost)], []) - AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], + AC_CHECK_HEADER(boost/spirit/include/classic_core.hpp, [], [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], []) - AC_CHECK_HEADER(boost/function.hpp, [], + AC_CHECK_HEADER(boost/function.hpp, [], [AC_MSG_ERROR(boost/function.hpp not found. install boost)], []) - AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE], + AC_CHECK_HEADER([boost/unordered_map.hpp], [HAVE_BOOST_UNORDERED_MAP=TRUE], [AC_MSG_WARN([boost/unordered_map.hpp not found])], []) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS -fno-exceptions" - AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) - AC_TRY_COMPILE([#include <boost/function.hpp> -], [], - ac_cv_cxx_boost_no_exceptions_broken=no, ac_cv_cxx_boost_no_exceptions_broken=yes) - - if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then - AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131]) - else - AC_MSG_RESULT([yes]) - fi - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) -else - AC_MSG_RESULT([internal]) - BUILD_TYPE="$BUILD_TYPE BOOST" - SYSTEM_BOOST=NO - HAVE_BOOST_UNORDERED_MAP=TRUE + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS -fno-exceptions" + AC_MSG_CHECKING([whether boost/function.hpp compiles with -fno-exceptions]) + AC_TRY_COMPILE([#include <boost/function.hpp> +], [], ac_cv_cxx_boost_no_exceptions_broken=no, ac_cv_cxx_boost_no_exceptions_broken=yes) + + if test "$ac_cv_cxx_boost_no_exceptions_broken" = "yes"; then + AC_MSG_ERROR([no, see https://bugzilla.redhat.com/show_bug.cgi?id=477131]) + else + AC_MSG_RESULT([yes]) + fi + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) +else + AC_MSG_RESULT([internal]) + BUILD_TYPE="$BUILD_TYPE BOOST" + SYSTEM_BOOST=NO + HAVE_BOOST_UNORDERED_MAP=TRUE fi AC_SUBST([HAVE_BOOST_UNORDERED_MAP]) AC_SUBST(SYSTEM_BOOST) @@ -4967,7 +5023,7 @@ dnl Check for system mdds dnl =================================================================== AC_MSG_CHECKING([which mdds to use]) if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ - test "$with_system_mdds" != "no"; then + test "$with_system_mdds" != "no"; then AC_MSG_RESULT([external]) SYSTEM_MDDS=YES @@ -5006,9 +5062,9 @@ if test -n "$with_system_mdds" -o -n "$with_system_headers" && \ ], ac_cv_cxx_mdds_flat_segment_tree_correct=yes, ac_cv_cxx_mdds_flat_segment_tree_correct=no) if test "$ac_cv_cxx_mdds_flat_segment_tree_correct" = "yes"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else - AC_MSG_ERROR([no, install mdds >= 0.5.0]) + AC_MSG_ERROR([no, install mdds >= 0.5.0]) fi CXXFLAGS=$save_CXXFLAGS AC_LANG_POP([C++]) @@ -5032,17 +5088,17 @@ dnl Check for system vigra dnl =================================================================== AC_MSG_CHECKING([which vigra to use]) if test -n "$with_system_vigra" -o -n "$with_system_headers" && \ - test "$with_system_vigra" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_VIGRA=YES - AC_LANG_PUSH([C++]) - AC_CHECK_HEADER(vigra/copyimage.hxx, [], + test "$with_system_vigra" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_VIGRA=YES + AC_LANG_PUSH([C++]) + AC_CHECK_HEADER(vigra/copyimage.hxx, [], [AC_MSG_ERROR(vigra/copyimage.hxx not found. install vigra)], []) - AC_LANG_POP([C++]) + AC_LANG_POP([C++]) else - AC_MSG_RESULT([internal]) - BUILD_TYPE="$BUILD_TYPE VIGRA" - SYSTEM_VIGRA=NO + AC_MSG_RESULT([internal]) + BUILD_TYPE="$BUILD_TYPE VIGRA" + SYSTEM_VIGRA=NO fi AC_SUBST(SYSTEM_VIGRA) @@ -5051,82 +5107,82 @@ dnl Check for system odbc dnl =================================================================== AC_MSG_CHECKING([which odbc headers to use]) if test -n "$with_system_odbc" -o -n "$with_system_headers" && \ - test "$with_system_odbc" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_ODBC_HEADERS=YES + test "$with_system_odbc" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_ODBC_HEADERS=YES - AC_CHECK_HEADER(sqlext.h, [], + AC_CHECK_HEADER(sqlext.h, [], [AC_MSG_ERROR(odbc not found. install odbc)], []) else - AC_MSG_RESULT([internal]) - SYSTEM_ODBC_HEADERS=NO - BUILD_TYPE="$BUILD_TYPE UNIXODBC" + AC_MSG_RESULT([internal]) + SYSTEM_ODBC_HEADERS=NO + BUILD_TYPE="$BUILD_TYPE UNIXODBC" fi AC_SUBST(SYSTEM_ODBC_HEADERS) AC_MSG_CHECKING([whether to enable build of Mozilla/Mozilla NSS-using components]) if test "$enable_mozilla" = "no"; then - AC_MSG_RESULT([no]) - WITH_MOZILLA=NO - ENABLE_NSS_MODULE=NO + AC_MSG_RESULT([no]) + WITH_MOZILLA=NO + ENABLE_NSS_MODULE=NO else - AC_MSG_RESULT([yes]) - WITH_MOZILLA=YES + AC_MSG_RESULT([yes]) + WITH_MOZILLA=YES fi AC_SUBST(WITH_MOZILLA) AC_MSG_CHECKING([whether to build Mozilla addressbook connectivity]) if test "$enable_mozilla" = "no"; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) elif test "$with_system_mozilla" = "yes"; then - AC_MSG_RESULT([no, not possible with system-mozilla]) + AC_MSG_RESULT([no, not possible with system-mozilla]) else - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) fi 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]) + AC_MSG_RESULT([no, since Mozilla (NSS) disabled but needed]) else - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) fi AC_MSG_CHECKING([whether to build LDAP configuration backend]) if test -z "$enable_ldap" || test "$enable_ldap" = "yes"; then - if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then - AC_MSG_RESULT([yes]) - WITH_LDAP=YES - else - AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed]) - WITH_LDAP=NO - fi + if test "$enable_mozilla" = "yes" || test "$with_openldap" = "yes"; then + AC_MSG_RESULT([yes]) + WITH_LDAP=YES + else + AC_MSG_RESULT([no. Either Mozilla or OpenLDAP needed]) + WITH_LDAP=NO + fi else - AC_MSG_RESULT([no]) - WITH_LDAP=NO + AC_MSG_RESULT([no]) + WITH_LDAP=NO fi if test "$WITH_LDAP" = "YES"; then - dnl =================================================================== - dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK - dnl =================================================================== - AC_MSG_CHECKING([which LDAP SDK to use]) - if test -n "$with_openldap" && test "$with_openldap" != "no"; then - AC_MSG_RESULT([OpenLDAP]) - WITH_OPENLDAP=YES - AC_CHECK_HEADERS(ldap.h, [], + dnl =================================================================== + dnl Test whether we want to use the Mozilla or the OpenLDAP LDAP SDK + dnl =================================================================== + AC_MSG_CHECKING([which LDAP SDK to use]) + if test -n "$with_openldap" && test "$with_openldap" != "no"; then + AC_MSG_RESULT([OpenLDAP]) + WITH_OPENLDAP=YES + AC_CHECK_HEADERS(ldap.h, [], [AC_MSG_ERROR(ldap.h not found. install openldap libs)], []) - AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], + AC_CHECK_LIB(ldap, ldap_simple_bind_s, [], [AC_MSG_ERROR(openldap lib not found or functional)], []) - # rumours say that OpenLDAP doesn't have that function. I looked and - # it has it. Test for it to be sure - AC_CHECK_LIB(ldap, ldap_set_option, [], + # rumours say that OpenLDAP doesn't have that function. I looked and + # it has it. Test for it to be sure + AC_CHECK_LIB(ldap, ldap_set_option, [], [AC_MSG_ERROR(openldap lib not found or functional)], []) - else - AC_MSG_RESULT([Netscape/Mozilla]) - # TODO. Actually do a sanity check and check for - # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT - WITH_OPENLDAP=NO - fi + else + AC_MSG_RESULT([Netscape/Mozilla]) + # TODO. Actually do a sanity check and check for + # LDAP_OPT_SIZELIMIT and LDAP_X_OPT_CONNECT_TIMEOUT + WITH_OPENLDAP=NO + fi fi AC_SUBST(WITH_LDAP) AC_SUBST(WITH_OPENLDAP) @@ -5144,17 +5200,17 @@ if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then enable_nss_module=no AC_MSG_CHECKING([which Mozilla flavour to use]) if test -n "$with_system_mozilla" && test "$with_system_mozilla" = "libxul"; then - MOZ_FLAVOUR=libxul + MOZ_FLAVOUR=libxul elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "xulrunner"; then - MOZ_FLAVOUR=xulrunner + MOZ_FLAVOUR=xulrunner elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "seamonkey"; then - MOZ_FLAVOUR=seamonkey + MOZ_FLAVOUR=seamonkey elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "firefox"; then - MOZ_FLAVOUR=firefox + MOZ_FLAVOUR=firefox elif test -n "$with_system_mozilla" && test "$with_system_mozilla" = "mozilla"; then - MOZ_FLAVOUR=mozilla + MOZ_FLAVOUR=mozilla else - MOZ_FLAVOUR=libxul + MOZ_FLAVOUR=libxul fi tmp=`echo $MOZ_FLAVOUR | $PERL -e 'print ucfirst(<STDIN>);'` AC_MSG_RESULT($tmp) @@ -5168,29 +5224,29 @@ if test -n "$with_system_mozilla" && test "$with_system_mozilla" != "no"; then fi if $PKG_CONFIG --exists nspr ; then - PKG_CHECK_MODULES( MOZ_NSPR, nspr ) - NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" - AC_SUBST(NSPR_LIB) + PKG_CHECK_MODULES( MOZ_NSPR, nspr ) + NSPR_LIB="-L`$PKG_CONFIG --variable=libdir nspr`" + AC_SUBST(NSPR_LIB) else - PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr ) + PKG_CHECK_MODULES( MOZ_NSPR, $MOZ_FLAVOUR-nspr ) fi if test "$MOZ_FLAVOUR" != "libxul"; then - PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" ) - MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom` - MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom` + PKG_CHECK_MODULES( MOZILLAXPCOM, $MOZ_FLAVOUR-xpcom, HASXPCOM="TRUE", HASXPCOM="" ) + MOZ_INC=`$PKG_CONFIG --variable=includedir $MOZ_FLAVOUR-xpcom` + MOZ_LIB=`$PKG_CONFIG --variable=libdir $MOZ_FLAVOUR-xpcom` fi if test -z "$HASXPCOM"; then - PKG_CHECK_MODULES( MOZILLAXPCOM, libxul ) - MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` - MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul` - if ! test -e "$MOZ_LIB/libxul.so"; then - MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul` - if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then - MOZ_LIB="$MOZ_LIB/sdk/lib" - fi - fi + PKG_CHECK_MODULES( MOZILLAXPCOM, libxul ) + MOZ_INC=`$PKG_CONFIG --variable=includedir libxul` + MOZ_LIB=`$PKG_CONFIG --variable=libdir libxul` + if ! test -e "$MOZ_LIB/libxul.so"; then + MOZ_LIB=`$PKG_CONFIG --variable=sdkdir libxul` + if test -e "$MOZ_LIB/sdk/lib/libxul.so"; then + MOZ_LIB="$MOZ_LIB/sdk/lib" + fi + fi fi save_CPPFLAGS="$CPPFLAGS" @@ -5208,15 +5264,15 @@ Fixed since nss 3.9.3 (contained by e.g. mozilla >= 1.7.5))], []) MOZ_LIB_XPCOM=$MOZILLAXPCOM_LIBS if test "$WITH_LDAP" != "NO" && test "$WITH_OPENLDAP" != "YES"; then - AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap]) - if test -d "$MOZ_INC/ldap"; then - AC_MSG_RESULT([yes]) - MOZ_LDAP_CFLAGS="-I$MOZ_INC" - else - AC_MSG_ERROR([no. + AC_MSG_CHECKING([whether $tmp was compiled with --enable-ldap]) + if test -d "$MOZ_INC/ldap"; then + AC_MSG_RESULT([yes]) + MOZ_LDAP_CFLAGS="-I$MOZ_INC" + else + AC_MSG_ERROR([no. Could not find LDAP header include files in $MOZ_INC/ldap. Please recompile $tmp with --enable-ldap or use --with-openldap.]) - fi + fi fi #e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges @@ -5235,31 +5291,31 @@ else SYSTEM_MOZILLA=NO BUILD_TYPE="$BUILD_TYPE MOZ" if test -z "$with_mozilla_version"; then - MOZILLA_VERSION= + MOZILLA_VERSION= else - AC_MSG_CHECKING([which Mozilla version to build]) - MOZILLA_VERSION=$with_mozilla_version - enable_build_mozilla=1 - AC_MSG_RESULT([$MOZILLA_VERSION]) + AC_MSG_CHECKING([which Mozilla version to build]) + MOZILLA_VERSION=$with_mozilla_version + enable_build_mozilla=1 + AC_MSG_RESULT([$MOZILLA_VERSION]) fi AC_SUBST(MOZILLA_VERSION) AC_MSG_CHECKING([for toolkit Mozilla should use]) if test -z "$with_mozilla_toolkit"; then - if test "$_os" != "WINNT" ; then - if test "$_os" = "Darwin" ; then - MOZILLA_TOOLKIT=mac - AC_MSG_RESULT([mac]) - else - MOZILLA_TOOLKIT=gtk2 - AC_MSG_RESULT([gtk2]) - fi - fi + if test "$_os" != "WINNT" ; then + if test "$_os" = "Darwin" ; then + MOZILLA_TOOLKIT=mac + AC_MSG_RESULT([mac]) + else + MOZILLA_TOOLKIT=gtk2 + AC_MSG_RESULT([gtk2]) + fi + fi else - MOZILLA_TOOLKIT=$with_mozilla_toolkit - enable_build_mozilla=1 - AC_MSG_RESULT([$MOZILLA_TOOLKIT]) + MOZILLA_TOOLKIT=$with_mozilla_toolkit + enable_build_mozilla=1 + AC_MSG_RESULT([$MOZILLA_TOOLKIT]) fi #if test "$_os" = "Darwin" && test "$MOZILLA_TOOLKIT" != "gtk2"; then # #only gtk2 toolkit supported - xlib or cocoa nees glib1 and libIDL1 - the latter is not @@ -5271,135 +5327,135 @@ AC_SUBST(MOZILLA_TOOLKIT) # default to enabling build mozilla if test "$enable_build_mozilla" != "no"; then - enable_build_mozilla=yes + enable_build_mozilla=yes else - enable_build_mozilla= + enable_build_mozilla= fi AC_MSG_CHECKING([whether to build Mozilla/SeaMonkey]) if test -n "$enable_build_mozilla"; then - BUILD_MOZAB="TRUE" - AC_MSG_RESULT([yes]) + BUILD_MOZAB="TRUE" + AC_MSG_RESULT([yes]) else - BUILD_MOZAB="" - AC_MSG_RESULT([no]) + BUILD_MOZAB="" + AC_MSG_RESULT([no]) fi AC_MSG_CHECKING([whether to build provided NSS module]) if test "$enable_nss_module" != "no"; then - ENABLE_NSS_MODULE="YES" - BUILD_TYPE="$BUILD_TYPE NSS" - AC_MSG_RESULT([yes]) - if test "$build_os" = "cygwin"; then - AC_MSG_CHECKING([for Mozilla build tooling]) - if test -z "$MOZILLABUILD" ; then -AC_MSG_ERROR([Mozilla build tooling not found. + ENABLE_NSS_MODULE="YES" + BUILD_TYPE="$BUILD_TYPE NSS" + AC_MSG_RESULT([yes]) + if test "$build_os" = "cygwin"; then + AC_MSG_CHECKING([for Mozilla build tooling]) + if test -z "$MOZILLABUILD" ; then + AC_MSG_ERROR([Mozilla build tooling not found. Use the --with-mozilla-build option after installing the tools obtained from http://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32]) - else - if test \( "$WITH_MINGW" = "yes" \) ; then - if test ! -d "$MOZILLABUILD" ; then -AC_MSG_ERROR([Mozilla build tooling incomplete!]) - else - AC_MSG_RESULT([ok]) - fi - else - if test ! -d "$MOZILLABUILD/moztools" \ - -o ! -d "$MOZILLABUILD/msys" ; then -AC_MSG_ERROR([Mozilla build tooling incomplete!]) + else + if test \( "$WITH_MINGW" = "yes" \) ; then + if test ! -d "$MOZILLABUILD" ; then + AC_MSG_ERROR([Mozilla build tooling incomplete!]) + else + AC_MSG_RESULT([ok]) + fi else - AC_MSG_RESULT([ok]) + if test ! -d "$MOZILLABUILD/moztools" \ + -o ! -d "$MOZILLABUILD/msys" ; then + AC_MSG_ERROR([Mozilla build tooling incomplete!]) + else + AC_MSG_RESULT([ok]) + fi fi - fi - fi - fi + fi + fi else - ENABLE_NSS_MODULE="NO" - AC_MSG_RESULT([no]) + ENABLE_NSS_MODULE="NO" + AC_MSG_RESULT([no]) fi if test "$BUILD_MOZAB" = "TRUE"; then - if test "$_os" = "WINNT"; then - if test "$WITH_MINGW" != "yes"; then - # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. - if test "$MSVSVER" != "2005"; then - AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.]) - fi - else - AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.]) - echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn + if test "$_os" = "WINNT"; then + if test "$WITH_MINGW" != "yes"; then + # compiling with MSVC. Only supported platform here is MSVS2005 at the moment. + if test "$MSVSVER" != "2005"; then + AC_MSG_ERROR([Building SeaMonkey is supported with Microsoft Visual Studio 2005 only.]) + fi + else + AC_MSG_WARN([Building SeaMonkey with MinGW is not tested, and likely to break.]) + echo "Building SeaMonkey with MinGW is not tested, and likely to break." >> warn + fi fi - fi - if test -z "$MOZILLA_VERSION"; then - MOZILLA_VERSION=1.1.14 - fi - MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" - MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst` - AC_MSG_CHECKING([for Mozilla sources]) - if test -z "$MOZILLA_FETCH_FILE"; then - AC_MSG_RESULT([not found]) - HAVE_MOZILLA_TARBALL=n - else - AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE]) - if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then - if test -z "$DO_FETCH"; then - AC_MSG_RESULT([will be fetched]) + if test -z "$MOZILLA_VERSION"; then + MOZILLA_VERSION=1.1.14 + fi + MOZILLA_SOURCE_VERSION="seamonkey-${MOZILLA_VERSION}.source" + MOZILLA_FETCH_FILE=`grep $MOZILLA_SOURCE_VERSION ooo.lst` + AC_MSG_CHECKING([for Mozilla sources]) + if test -z "$MOZILLA_FETCH_FILE"; then + AC_MSG_RESULT([not found]) + HAVE_MOZILLA_TARBALL=n + else + AC_MSG_CHECKING([for $MOZILLA_FETCH_FILE]) + if test ! -e "$TARFILE_LOCATION/$MOZILLA_FETCH_FILE"; then + if test -z "$DO_FETCH"; then + AC_MSG_RESULT([will be fetched]) + HAVE_MOZILLA_TARBALL=y + else + AC_MSG_RESULT([not found]) + HAVE_MOZILLA_TARBALL=n + fi + else + AC_MSG_RESULT([found]) HAVE_MOZILLA_TARBALL=y - else - AC_MSG_RESULT([not found]) - HAVE_MOZILLA_TARBALL=n - fi - else - AC_MSG_RESULT([found]) - HAVE_MOZILLA_TARBALL=y - fi - fi - if test "$HAVE_MOZILLA_TARBALL" != "y"; then - AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found. + fi + fi + if test "$HAVE_MOZILLA_TARBALL" != "y"; then + AC_MSG_ERROR([Mozilla/SeaMonkey source archive not found. Use "./download" to download.]) - fi - if test "$_os" = "WINNT"; then - AC_MSG_CHECKING([for moztools binaries]) - if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then - AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip + fi + if test "$_os" = "WINNT"; then + AC_MSG_CHECKING([for moztools binaries]) + if test ! -e "$TARFILE_LOCATION/vc8-moztools.zip" ; then + AC_MSG_ERROR([The following file is missing in $TARFILE_LOCATION: vc8-moztools.zip (from ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/historic/vc8/)]) - else - AC_MSG_RESULT([ok]) - fi - elif test "$_os" = "Darwin"; then - if test "$MOZILLA_TOOLKIT" = "gtk2"; then - AC_MSG_NOTICE([checking whether Mozilla can be built...]) - PKG_CHECK_MODULES(MOZGTK2, gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8, AC_MSG_NOTICE([OK - can build Mozilla]), AC_MSG_ERROR([Prerequisites to build Mozilla not met. Either use the precompiled Mozilla binaries or install the missing packages])) - else - PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="") - if test -z "$MOZIDL"; then - AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.]) - fi - fi - else - # Generic Unix/Linux section - if test "$MOZILLA_TOOLKIT" = "gtk2"; then - PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="") - if test -z "$MOZGTK"; then - AC_MSG_ERROR([GTK2 is needed to build Mozilla.]) - fi - PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="") - if test -z "$MOZIDL"; then - AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.]) - fi - else - PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="") - if test -z "$MOZGTK"; then - AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.]) - fi - PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="") - if test -z "$MOZIDL"; then - AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.]) - fi - fi - fi + else + AC_MSG_RESULT([ok]) + fi + elif test "$_os" = "Darwin"; then + if test "$MOZILLA_TOOLKIT" = "gtk2"; then + AC_MSG_NOTICE([checking whether Mozilla can be built...]) + PKG_CHECK_MODULES(MOZGTK2, gtk+-2.0 >= 2.4 libIDL-2.0 >= 0.8, AC_MSG_NOTICE([OK - can build Mozilla]), AC_MSG_ERROR([Prerequisites to build Mozilla not met. Either use the precompiled Mozilla binaries or install the missing packages])) + else + PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.6.3, MOZIDL="TRUE", MOZIDL="") + if test -z "$MOZIDL"; then + AC_MSG_ERROR([libIDL 0.6.3 or newer is needed to build Mozilla with Mac toolkit.]) + fi + fi + else + # Generic Unix/Linux section + if test "$MOZILLA_TOOLKIT" = "gtk2"; then + PKG_CHECK_MODULES(MOZLIBREQ, gtk+-2.0, MOZGTK="TRUE", MOZGTK="") + if test -z "$MOZGTK"; then + AC_MSG_ERROR([GTK2 is needed to build Mozilla.]) + fi + PKG_CHECK_MODULES(MOZLIBREQ, libIDL-2.0 >= 0.8.0, MOZIDL="TRUE", MOZIDL="") + if test -z "$MOZIDL"; then + AC_MSG_ERROR([libIDL >= 0.8.0 is needed when using GTK2 to build Mozilla.]) + fi + else + PKG_CHECK_MODULES(MOZLIBREQ, gtk+ >= 1.2.3, MOZGTK="TRUE", MOZGTK="") + if test -z "$MOZGTK"; then + AC_MSG_ERROR([GTK+ 1.2 is needed when not using GTK2 to build Mozilla.]) + fi + PKG_CHECK_MODULES(MOZLIBREQ, libidl >= 0.6.3 libidl <= 0.6.8, MOZIDL="TRUE", MOZIDL="") + if test -z "$MOZIDL"; then + AC_MSG_ERROR([libIDL 0.6.3 - 0.6.8 is needed when not using GTK2 to build Mozilla.]) + fi + fi + fi fi AC_SUBST(BUILD_MOZAB) @@ -5421,15 +5477,15 @@ dnl Check for system sane dnl =================================================================== AC_MSG_CHECKING([which sane header to use]) if test -n "$with_system_sane_header" -o -n "$with_system_headers" && \ - test "$with_system_sane_header" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_SANE_HEADER=YES - AC_CHECK_HEADER(sane/sane.h, [], + test "$with_system_sane_header" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_SANE_HEADER=YES + AC_CHECK_HEADER(sane/sane.h, [], [AC_MSG_ERROR(sane not found. install sane)], []) else - AC_MSG_RESULT([internal]) - SYSTEM_SANE_HEADER=NO - BUILD_TYPE="$BUILD_TYPE SANE" + AC_MSG_RESULT([internal]) + SYSTEM_SANE_HEADER=NO + BUILD_TYPE="$BUILD_TYPE SANE" fi AC_SUBST(SYSTEM_SANE_HEADER) @@ -5438,38 +5494,38 @@ dnl Check for system icu dnl =================================================================== AC_MSG_CHECKING([which icu to use]) if test -n "$with_system_icu" -o -n "$with_system_libs" && \ - test "$with_system_icu" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_ICU=YES - AC_LANG_PUSH([C++]) - AC_MSG_CHECKING([for unicode/rbbi.h]) - AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) - AC_LANG_POP([C++]) - AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) - 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:/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:/usr/local/sbin]) - if test -z "$SYSTEM_GENCMN"; then - AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn"\]) - fi - - AC_PATH_PROG( ICUCONFIG, icu-config) - AC_MSG_CHECKING([ICU version]) - ICU_VERSION=`$ICUCONFIG --version` - ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` - ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` - ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` - - if test "$ICU_MAJOR" -ge "4"; then - AC_MSG_RESULT([OK]) - else - AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) - fi + test "$with_system_icu" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_ICU=YES + AC_LANG_PUSH([C++]) + AC_MSG_CHECKING([for unicode/rbbi.h]) + AC_TRY_CPP(unicode/rbbi.h, AC_MSG_RESULT([checked.]), AC_MSG_ERROR([icu headers not found.])) + AC_LANG_POP([C++]) + AC_PATH_PROG(SYSTEM_GENBRK, genbrk, [], [$PATH:/usr/sbin:/sbin]) + 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:/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:/usr/local/sbin]) + if test -z "$SYSTEM_GENCMN"; then + AC_MSG_ERROR([\"gencmn\" not found in \$PATH, install the icu development tool \"gencmn\"]) + fi + + AC_PATH_PROG( ICUCONFIG, icu-config) + AC_MSG_CHECKING([ICU version]) + ICU_VERSION=`$ICUCONFIG --version` + ICU_MAJOR=`$ICUCONFIG --version | cut -d"." -f1` + ICU_MINOR=`$ICUCONFIG --version | cut -d"." -f2` + ICU_MICRO=`$ICUCONFIG --version | cut -d"." -f3` + + if test "$ICU_MAJOR" -ge "4"; then + AC_MSG_RESULT([OK]) + else + AC_MSG_ERROR([not suitable, only >= 4.0 supported currently]) + fi else AC_MSG_RESULT([internal]) @@ -5504,7 +5560,7 @@ if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" - BUILD_TYPE="$BUILD_TYPE GRAPHITE" fi else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_GRAPHITE) AC_SUBST(SYSTEM_GRAPHITE) @@ -5518,90 +5574,90 @@ dnl Check for Mac OS X native GUI, which may is now required; the X11 build is n dnl See if we have the AppKit framework for building with Quartz graphics. if test "$_os" = "Darwin"; then - if test "x$with_x" = "xyes"; then - AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) - else - AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) - if test -d "/System/Library/Frameworks/AppKit.framework/"; then - AC_MSG_RESULT([yes]) - x_includes="no_x_includes" - x_libraries="no_x_libraries" - dnl disable some things used on other Unix versions but not on the aqua build - enable_gtk=no - enable_cups=no - ENABLE_CUPS="" - AC_SUBST(ENABLE_CUPS) - else - AC_MSG_ERROR([No AppKit.framewrok found]) - fi - fi + if test "x$with_x" = "xyes"; then + AC_MSG_ERROR([X11 build is no longer supported on MacOSX, please use the native aqua build]) + else + AC_MSG_CHECKING([for /System/Library/Frameworks/AppKit.framework]) + if test -d "/System/Library/Frameworks/AppKit.framework/"; then + AC_MSG_RESULT([yes]) + x_includes="no_x_includes" + x_libraries="no_x_libraries" + dnl disable some things used on other Unix versions but not on the aqua build + enable_gtk=no + enable_cups=no + ENABLE_CUPS="" + AC_SUBST(ENABLE_CUPS) + else + AC_MSG_ERROR([No AppKit.framewrok found]) + fi + fi fi if test $_os = iOS -o $_os = Android; then - enable_gtk=no + enable_gtk=no fi dnl *************************************** dnl testing for X libraries and includes... dnl *************************************** if test "$_os" = "Darwin" -a "x$x_includes" = "xno_x_includes"; then - dnl Mac OS X using Aqua graphics. Don't check for X11. - : + dnl Mac OS X using Aqua graphics. Don't check for X11. + : elif test "$_os" != "WINNT" -a "$_os" != "Android" -a "$_os" != "iOS"; then - AC_PATH_X - AC_PATH_XTRA - CPPFLAGS="$CPPFLAGS $X_CFLAGS" - - if test "x$x_includes" = "x"; then - x_includes="default_x_includes" - fi - if test "x$x_libraries" = "x"; then - x_libraries="default_x_libraries" - fi - dnl The variables $x_libraries and $x_includes are set. - if test -z "$x_libraries"; then - AC_MSG_ERROR([No X libraries found]) # Exit - fi - if test -z "$x_includes"; then - AC_MSG_ERROR([No X includes found]) # Exit - fi - CFLAGS="$CFLAGS $X_CFLAGS" - 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", []) -else - x_includes="no_x_includes" - x_libraries="no_x_libraries" + AC_PATH_X + AC_PATH_XTRA + CPPFLAGS="$CPPFLAGS $X_CFLAGS" + + if test "x$x_includes" = "x"; then + x_includes="default_x_includes" + fi + if test "x$x_libraries" = "x"; then + x_libraries="default_x_libraries" + fi + dnl The variables $x_libraries and $x_includes are set. + if test -z "$x_libraries"; then + AC_MSG_ERROR([No X libraries found]) # Exit + fi + if test -z "$x_includes"; then + AC_MSG_ERROR([No X includes found]) # Exit + fi + CFLAGS="$CFLAGS $X_CFLAGS" + 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", []) +else + x_includes="no_x_includes" + x_libraries="no_x_libraries" fi if test -z "$x_includes"; then - x_includes="no_x_includes" + x_includes="no_x_includes" fi if test -z "$x_libraries"; then - x_libraries="no_x_libraries" + x_libraries="no_x_libraries" fi if test "$x_includes" = "default_x_includes"; then - XINC="/usr/include" + XINC="/usr/include" else - XINC="$x_includes" + XINC="$x_includes" fi AC_SUBST(XINC) if test "$x_libraries" = "default_x_libraries"; then - XLIB=`$PKG_CONFIG --variable=libdir x11` - if test "x$XLIB" = x; then - XLIB="/usr/lib" - fi + XLIB=`$PKG_CONFIG --variable=libdir x11` + if test "x$XLIB" = x; then + XLIB="/usr/lib" + fi else - XLIB="$x_libraries" + XLIB="$x_libraries" fi AC_SUBST(XLIB) AC_SUBST(XAU_LIBS) if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$_os" != "Android" -a "$_os" != "iOS"; then - dnl =================================================================== - dnl Check for Composite.h for Mozilla plugin - dnl =================================================================== - AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])], + dnl =================================================================== + dnl Check for Composite.h for Mozilla plugin + dnl =================================================================== + AC_CHECK_HEADERS(X11/Composite.h,[],[AC_MSG_ERROR([Xt headers not found])], [#include <X11/Intrinsic.h>]) fi @@ -5611,27 +5667,27 @@ dnl Check for system Xrender dnl =================================================================== AC_MSG_CHECKING([whether to link to Xrender]) if test -n "$enable_xrender_link" -a "$enable_xrender_link" != "no"; then - AC_MSG_RESULT([yes]) - XRENDER_LINK=YES - with_system_xrender_headers=yes + AC_MSG_RESULT([yes]) + XRENDER_LINK=YES + with_system_xrender_headers=yes else - AC_MSG_RESULT([no, dynamically open it]) - XRENDER_LINK=NO + AC_MSG_RESULT([no, dynamically open it]) + XRENDER_LINK=NO fi AC_MSG_CHECKING([which Xrender headers to use]) if test -n "$with_system_xrender_headers" -o -n "$with_system_headers" && \ - test "$with_system_xrender_headers" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_XRENDER_HEADERS=YES - AC_CHECK_HEADER(X11/extensions/Xrender.h, [], + test "$with_system_xrender_headers" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_XRENDER_HEADERS=YES + AC_CHECK_HEADER(X11/extensions/Xrender.h, [], [AC_MSG_ERROR(Xrender not found. install X)], []) else - AC_MSG_RESULT([internal]) - SYSTEM_XRENDER_HEADERS=NO - BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" + AC_MSG_RESULT([internal]) + SYSTEM_XRENDER_HEADERS=NO + BUILD_TYPE="$BUILD_TYPE X11_EXTENSIONS" fi if test "$XRENDER_LINK" = "YES"; then - AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], + AC_CHECK_LIB(Xrender, XRenderQueryVersion, [], [AC_MSG_ERROR(libXrender not found or functional)], []) fi AC_SUBST(SYSTEM_XRENDER_HEADERS) @@ -5642,26 +5698,26 @@ dnl Check for XRandr dnl =================================================================== AC_MSG_CHECKING([whether to enable RandR support]) if test "$test_randr" = "yes" -a \( "$enable_randr" = "yes" -o "$enable_randr" = "TRUE" \) ; then - if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then - XRANDR_DLOPEN="TRUE" - AC_MSG_RESULT([configured to dlopen libXrandr at runtime]) - else - AC_MSG_RESULT([yes]) - XRANDR_DLOPEN="FALSE" - PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="") - if test "$ENABLE_RANDR" != "TRUE"; then - AC_CHECK_HEADER(X11/extensions/Xrandr.h, [], + if test -z "$enable_randr_link" -o "$enable_randr_link" = "no"; then + XRANDR_DLOPEN="TRUE" + AC_MSG_RESULT([configured to dlopen libXrandr at runtime]) + else + AC_MSG_RESULT([yes]) + XRANDR_DLOPEN="FALSE" + PKG_CHECK_MODULES(XRANDR, xrandr >= 1.2, ENABLE_RANDR="TRUE", ENABLE_RANDR="") + if test "$ENABLE_RANDR" != "TRUE"; then + AC_CHECK_HEADER(X11/extensions/Xrandr.h, [], [AC_MSG_ERROR([X11/extensions/Xrandr.h could not be found. X11 dev missing?])], []) - XRANDR_CFLAGS=" " - AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], + XRANDR_CFLAGS=" " + AC_CHECK_LIB(Xrandr, XRRQueryExtension, [], [ AC_MSG_ERROR(libXrandr not found or functional) ], []) - XRANDR_LIBS="-lXrandr " - ENABLE_RANDR="TRUE" - fi - fi + XRANDR_LIBS="-lXrandr " + ENABLE_RANDR="TRUE" + fi + fi else - ENABLE_RANDR="" - AC_MSG_RESULT([no]) + ENABLE_RANDR="" + AC_MSG_RESULT([no]) fi AC_SUBST(XRANDR_DLOPEN) AC_SUBST(XRANDR_CFLAGS) @@ -5683,12 +5739,12 @@ dnl Check for system neon dnl =================================================================== AC_MSG_CHECKING([which neon to use]) if test -n "$with_system_neon" -o -n "$with_system_libs" && \ - test "$with_system_neon" != "no"; then - AC_MSG_RESULT([external]) - PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon])) - NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" - NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" - SYSTEM_NEON=YES + test "$with_system_neon" != "no"; then + AC_MSG_RESULT([external]) + PKG_CHECK_MODULES(NEON, neon >= 0.26.0, , AC_MSG_ERROR([you need neon >= 0.26.x for system-neon])) + NEON_VERSION="`$PKG_CONFIG --modversion neon | $SED 's/\.//g'`" + NEON_CFLAGS="$NEON_CFLAGS -DSYSTEM_NEON -DUSE_DAV_LOCKS=1" + SYSTEM_NEON=YES else AC_MSG_RESULT([internal]) SYSTEM_NEON=NO @@ -5707,7 +5763,7 @@ dnl Check for system openssl dnl =================================================================== if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ "$_os" = "DragonFly" && test "$with_system_openssl" != "no"; then - with_system_openssl=yes + with_system_openssl=yes fi AC_MSG_CHECKING([which libssl to use]) if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ @@ -5737,11 +5793,11 @@ dnl Check for system redland dnl =================================================================== AC_MSG_CHECKING([which redland library to use]) if test -n "$with_system_redland" -o -n "$with_system_libs" && \ - test "$with_system_redland" != "no"; then + test "$with_system_redland" != "no"; then AC_MSG_RESULT([external]) SYSTEM_REDLAND=YES - dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) - PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8) + dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) + PKG_CHECK_MODULES(REDLAND, redland >= 1.0.8) else AC_MSG_RESULT([internal]) BUILD_TYPE="$BUILD_TYPE REDLAND" @@ -5756,21 +5812,21 @@ dnl Check for system hunspell dnl =================================================================== AC_MSG_CHECKING([which libhunspell to use]) if test -n "$with_system_hunspell" -o -n "$with_system_libs" && \ - test "$with_system_hunspell" != "no"; then + test "$with_system_hunspell" != "no"; then AC_MSG_RESULT([external]) SYSTEM_HUNSPELL=YES AC_LANG_PUSH([C++]) PKG_CHECK_MODULES(HUNSPELL, hunspell, HUNSPELL_PC="TRUE", HUNSPELL_PC="" ) if test "$HUNSPELL_PC" != "TRUE"; then - AC_CHECK_HEADER(hunspell.hxx, [], - [ - AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], - [AC_MSG_ERROR(hunspell headers not found.)], []) - ], []) - AC_CHECK_LIB(hunspell, main, [], + AC_CHECK_HEADER(hunspell.hxx, [], + [ + AC_CHECK_HEADER(hunspell/hunspell.hxx, [ HUNSPELL_CFLAGS=-I/usr/include/hunspell ], + [AC_MSG_ERROR(hunspell headers not found.)], []) + ], []) + AC_CHECK_LIB(hunspell, main, [], [ AC_MSG_ERROR(hunspell library not found.) ], []) - HUNSPELL_LIBS=-lhunspell - fi + HUNSPELL_LIBS=-lhunspell + fi AC_LANG_POP([C++]) else AC_MSG_RESULT([internal]) @@ -5786,7 +5842,7 @@ dnl Checking for altlinuxhyph dnl =================================================================== AC_MSG_CHECKING([which altlinuxhyph to use]) if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ - test "$with_system_altlinuxhyph" != "no"; then + test "$with_system_altlinuxhyph" != "no"; then AC_MSG_RESULT([external]) SYSTEM_HYPH=YES AC_CHECK_HEADER(hyphen.h, [], @@ -5797,11 +5853,11 @@ if test -n "$with_system_altlinuxhyph" -o -n "$with_system_libs" && \ AC_CHECK_LIB(hyphen, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyphen], [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], []) if test -z "$HYPHEN_LIB"; then - AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], + AC_CHECK_LIB(hyph, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhyph], [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], []) fi if test -z "$HYPHEN_LIB"; then - AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], + AC_CHECK_LIB(hnj, hnj_hyphen_hyphenate2, [HYPHEN_LIB=-lhnj], [ AC_MSG_ERROR(altlinuxhyph library not found or too old.)], []) fi else @@ -5817,7 +5873,7 @@ dnl Checking for mythes dnl =================================================================== AC_MSG_CHECKING([which mythes to use]) if test -n "$with_system_mythes" -o -n "$with_system_libs" && \ - test "$with_system_mythes" != "no"; then + test "$with_system_mythes" != "no"; then AC_MSG_RESULT([external]) SYSTEM_MYTHES=YES AC_LANG_PUSH([C++]) @@ -5827,8 +5883,8 @@ if test -n "$with_system_mythes" -o -n "$with_system_libs" && \ [ AC_MSG_ERROR(mythes.hxx headers not found.)], []) AC_CHECK_LIB(mythes-1.2, main, [], [ MYTHES_FOUND=no], []) - if test "$MYTHES_FOUND" = "no"; then - AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes], + if test "$MYTHES_FOUND" = "no"; then + AC_CHECK_LIB(mythes, main, [MYTHES_FOUND=yes], [ MYTHES_FOUND=no], []) fi if test "$MYTHES_FOUND" = "no"; then @@ -5850,7 +5906,7 @@ dnl Checking for lpsolve dnl =================================================================== AC_MSG_CHECKING([which lpsolve to use]) if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \ - test "$with_system_lpsolve" != "no"; then + test "$with_system_lpsolve" != "no"; then AC_MSG_RESULT([external]) SYSTEM_LPSOLVE=YES AC_CHECK_HEADER(lpsolve/lp_lib.h, [], @@ -5903,27 +5959,27 @@ dnl *************************************** dnl testing libc version for Linux... dnl *************************************** if test "$_os" = "Linux"; then - AC_MSG_CHECKING([whether libc is >= 2.1.1]) - exec 6>/dev/null # no output - AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) - exec 6>&1 # output on again - if test "$HAVE_LIBC"; then - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([no, upgrade libc]) - fi + AC_MSG_CHECKING([whether libc is >= 2.1.1]) + exec 6>/dev/null # no output + AC_CHECK_LIB(c, gnu_get_libc_version, HAVE_LIBC=yes; export HAVE_LIBC) + exec 6>&1 # output on again + if test "$HAVE_LIBC"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([no, upgrade libc]) + fi fi if test "$_os" != "WINNT"; then - AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO]) - AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO]) - if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then - SYSTEM_LIBC=YES - fi + AC_CHECK_FUNCS(getopt, HAVE_GETOPT=YES, [HAVE_GETOPT=NO]) + AC_CHECK_FUNCS(readdir_r, HAVE_READDIR_R=YES, [HAVE_READDIR_R=NO]) + if test "$HAVE_GETOPT" = "YES" -a "$HAVE_READDIR_R" = "YES"; then + SYSTEM_LIBC=YES + fi else - HAVE_GETOPT=NO - HAVE_READDIR_R=NO - SYSTEM_LIBC=YES + HAVE_GETOPT=NO + HAVE_READDIR_R=NO + SYSTEM_LIBC=YES fi AC_SUBST(HAVE_GETOPT) AC_SUBST(HAVE_READDIR_R) @@ -6105,89 +6161,89 @@ dnl Checking for bison and flex dnl *************************************** AC_PATH_PROG(BISON, bison) if test -z "$BISON"; then - AC_MSG_ERROR([no bison found in \$PATH, install it]) + AC_MSG_ERROR([no bison found in \$PATH, install it]) else - AC_MSG_CHECKING([the bison version]) - _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; + AC_MSG_CHECKING([the bison version]) + _bison_version=`$BISON --version | grep GNU | $SED -e 's@^[[^0-9]]*@@' -e 's@ .*@@' -e 's@,.*@@'`; _bison_longver=`echo $_bison_version | $AWK -F. '{ print \$1*1000+\$2}'` # Accept newer than 1.875 or older(equal) than 1.75 if test "$_bison_longver" -ge 1875 -o "$_bison_longver" -le 1075; then - if test "$_bison_version" = "1.875" ; then - AC_MSG_WARN([suspect ($BISON $_bison_version)]) - echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn - else - AC_MSG_RESULT([checked ($BISON $_bison_version)]) - fi + if test "$_bison_version" = "1.875" ; then + AC_MSG_WARN([suspect ($BISON $_bison_version)]) + echo "Suspect ($BISON $_bison_version) suggest upgrade" >> warn + else + AC_MSG_RESULT([checked ($BISON $_bison_version)]) + fi else - AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) + AC_MSG_ERROR([failed ($BISON $_bison_version need 1.875+ (or 1.75 and older))]) fi fi AC_PATH_PROG(FLEX, flex) if test -z "$FLEX"; then - AC_MSG_ERROR([no flex found in \$PATH, install it]) + AC_MSG_ERROR([no flex found in \$PATH, install it]) fi dnl *************************************** dnl Checking for patch dnl *************************************** AC_PATH_PROG(PATCH, patch) if test -z "$PATCH"; then - AC_MSG_ERROR([\"patch\" not found in \$PATH, install it]) + AC_MSG_ERROR([\"patch\" not found in \$PATH, install it]) fi dnl On Solaris, FreeBSD or MacOS X, check if --with-gnu-patch was used if test "$_os" = "SunOS" -o "$_os" = "FreeBSD" -o "$_os" = "Darwin"; then - if test -z "$with_gnu_patch"; then - GNUPATCH=$PATCH - else - if test -x "$with_gnu_patch"; then - GNUPATCH=$with_gnu_patch - else - AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) - fi - fi + if test -z "$with_gnu_patch"; then + GNUPATCH=$PATCH + else + if test -x "$with_gnu_patch"; then + GNUPATCH=$with_gnu_patch + else + AC_MSG_ERROR([--with-gnu-patch did not point to an executable]) + fi + fi - AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) - if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then - AC_MSG_RESULT([yes]) - else - AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) - fi + AC_MSG_CHECKING([whether $GNUPATCH is GNU patch]) + if $GNUPATCH --version | grep "Free Software Foundation" >/dev/null 2>/dev/null; then + AC_MSG_RESULT([yes]) + else + AC_MSG_ERROR([no, GNU patch needed. install or specify with --with-gnu-patch=/path/to/it]) + fi fi dnl We also need to check for --with-gnu-cp if test -z "$with_gnu_cp"; then - # check the place where the good stuff is hidden on Solaris... - if test -x /usr/gnu/bin/cp; then - GNUCP=/usr/gnu/bin/cp - else - AC_PATH_PROGS(GNUCP, gnucp cp) - fi - if test -z $GNUCP; then - AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) - fi -else - if test -x "$with_gnu_cp"; then - GNUCP=$with_gnu_cp - else - AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) - fi + # check the place where the good stuff is hidden on Solaris... + if test -x /usr/gnu/bin/cp; then + GNUCP=/usr/gnu/bin/cp + else + AC_PATH_PROGS(GNUCP, gnucp cp) + fi + if test -z $GNUCP; then + AC_MSG_ERROR([Neither gnucp nor cp found. Install GNU cp and/or specify --with-gnu-cp=/path/to/it]) + fi +else + if test -x "$with_gnu_cp"; then + GNUCP=$with_gnu_cp + else + AC_MSG_ERROR([--with-gnu-cp did not point to an executable]) + fi fi AC_MSG_CHECKING([whether $GNUCP is GNU cp from coreutils with preserve= support]) if $GNUCP --version 2>/dev/null | grep "coreutils" >/dev/null 2>/dev/null; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) elif $GNUCP --version 2>/dev/null | grep "GNU fileutils" >/dev/null 2>/dev/null; then AC_MSG_RESULT([yes]) else case "$build_os" in - darwin*|netbsd*|openbsd*|freebsd*|dragonfly*) - GNUCP='' - AC_MSG_RESULT([no gnucp found - using the system's cp command]) - ;; - *) - AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it]) - ;; + darwin*|netbsd*|openbsd*|freebsd*|dragonfly*|aix*) + GNUCP='' + AC_MSG_RESULT([no gnucp found - using the system's cp command]) + ;; + *) + AC_MSG_ERROR([no, GNU cp needed. install or specify with --with-gnu-cp=/path/to/it]) + ;; esac fi @@ -6198,35 +6254,35 @@ dnl *************************************** dnl testing assembler path dnl *************************************** if test "$_os" = "WINNT" -a "$WITH_MINGW" != "yes"; then - if test "$CL_X64" = ""; then - assembler=ml.exe - assembler_bin=bin - else - assembler=ml64.exe - assembler_bin=bin/amd64 - fi - if test -n "$with_asm_home"; then - with_asm_home=`cygpath -u "$with_asm_home"` - fi - if test -x "$with_asm_home/$assembler"; then - AC_MSG_CHECKING([$assembler assembler path]) - AC_MSG_RESULT([$with_asm_home/$assembler]) - else - AC_PATH_PROG(ML_EXE, $assembler) - if test -z "$ML_EXE"; then - AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler]) - if test -x "$with_cl_home/$assembler_bin/$assembler"; then - with_asm_home=$with_cl_home/$assembler_bin - AC_MSG_RESULT([found]) - else - AC_MSG_ERROR([Configure did not find $assembler assembler.]) - fi + if test "$CL_X64" = ""; then + assembler=ml.exe + assembler_bin=bin else - with_asm_home="ASM_IN_PATH" + assembler=ml64.exe + assembler_bin=bin/amd64 + fi + if test -n "$with_asm_home"; then + with_asm_home=`cygpath -u "$with_asm_home"` + fi + if test -x "$with_asm_home/$assembler"; then + AC_MSG_CHECKING([$assembler assembler path]) + AC_MSG_RESULT([$with_asm_home/$assembler]) + else + AC_PATH_PROG(ML_EXE, $assembler) + if test -z "$ML_EXE"; then + AC_MSG_CHECKING([$with_cl_home/$assembler_bin/$assembler]) + if test -x "$with_cl_home/$assembler_bin/$assembler"; then + with_asm_home=$with_cl_home/$assembler_bin + AC_MSG_RESULT([found]) + else + AC_MSG_ERROR([Configure did not find $assembler assembler.]) + fi + else + with_asm_home="ASM_IN_PATH" + fi fi - fi else - with_asm_home="NO_ASM_HOME" + with_asm_home="NO_ASM_HOME" fi ASM_HOME="$with_asm_home" AC_SUBST(ASM_HOME) @@ -6237,7 +6293,7 @@ dnl =================================================================== AC_PATH_PROG(ZIP, zip) test -z "$ZIP" && AC_MSG_ERROR([zip is required]) AC_PATH_PROG(UNZIP, unzip) -test -z "$ZIP" && AC_MSG_ERROR([unzip is required]) +test -z "$UNZIP" && AC_MSG_ERROR([unzip is required]) if "$ZIP" -FS < /dev/null 2>&1 | $EGREP "no such option: S" > /dev/null; then AC_MSG_ERROR([Zip version 3.0 or newer is required to build, please install or use --with-zip-home],,) fi @@ -6259,13 +6315,13 @@ GTK3_CFLAGS="" GTK3_LIBS="" ENABLE_GTK3="" if test "x$enable_gtk3" = "xyes"; then - if test "$with_system_cairo" != yes; then - echo "System cairo required for gtk3 support, please use --system-cairo" - fi - PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") - if test "x$ENABLE_GTK3" = "xTRUE"; then - R="gtk3" - fi + if test "$with_system_cairo" != yes; then + echo "System cairo required for gtk3 support, please use --system-cairo" + fi + PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.0 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") + if test "x$ENABLE_GTK3" = "xTRUE"; then + R="gtk3" + fi fi AC_SUBST(GTK3_LIBS) AC_SUBST(GTK3_CFLAGS) @@ -6342,38 +6398,38 @@ ENABLE_SYSTRAY_GTK="" ENABLE_DBUS="" if test "$test_gtk" = "yes"; then - if test "$ENABLE_GTK" = "TRUE" ; then - PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) - BUILD_TYPE="$BUILD_TYPE GTK" - - if test "x$enable_systray" = "xyes"; then - PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0, - [ ENABLE_SYSTRAY_GTK="TRUE" ], - [ ENABLE_SYSTRAY_GTK="" ]) - fi - - AC_MSG_CHECKING([whether to enable DBUS support]) - if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then - ENABLE_DBUS="TRUE" - AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) - else - AC_MSG_RESULT([no]) - fi - - AC_MSG_CHECKING([whether to enable GIO support]) - if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then - if test "$ENABLE_GNOMEVFS" = "TRUE" ; then - AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) - fi - ENABLE_GIO="TRUE" - AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES( GIO, gio-2.0 ) - else - AC_MSG_RESULT([no]) - fi - fi + if test "$ENABLE_GTK" = "TRUE" ; then + PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4 gdk-pixbuf-xlib-2.0 >= 2.2 ,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) + PKG_CHECK_MODULES(GTHREAD, gthread-2.0,,AC_MSG_ERROR([requirements to build the gtk-plugin not met. Use --disable-gtk or install the missing packages])) + BUILD_TYPE="$BUILD_TYPE GTK" + + if test "x$enable_systray" = "xyes"; then + PKG_CHECK_MODULES( GTK210, gtk+-2.0 >= 2.10.0, + [ ENABLE_SYSTRAY_GTK="TRUE" ], + [ ENABLE_SYSTRAY_GTK="" ]) + fi + + AC_MSG_CHECKING([whether to enable DBUS support]) + if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_dbus" = "yes"; then + ENABLE_DBUS="TRUE" + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES( DBUS, dbus-glib-1 >= 0.70 ) + else + AC_MSG_RESULT([no]) + fi + + AC_MSG_CHECKING([whether to enable GIO support]) + if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$enable_gio" = "yes"; then + if test "$ENABLE_GNOMEVFS" = "TRUE" ; then + AC_MSG_ERROR([please use --enable-gio only together with --disable-gnome-vfs.]) + fi + ENABLE_GIO="TRUE" + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES( GIO, gio-2.0 ) + else + AC_MSG_RESULT([no]) + fi + fi fi AC_SUBST(ENABLE_GIO) AC_SUBST(ENABLE_DBUS) @@ -6389,71 +6445,20 @@ AC_SUBST(LIBPNG_CFLAGS) AC_MSG_CHECKING([whether to enable libpng linking in quickstarter]) if test "x$enable_unix_libpng" = "xyes"; then - AC_MSG_RESULT([yes]) -else - AC_MSG_RESULT([no]) - ENABLE_QUICKSTART_LIBPNG="" -fi -AC_SUBST(ENABLE_QUICKSTART_LIBPNG) - -dnl =================================================================== -dnl Test whether to build cairo or rely on the system version -dnl =================================================================== - -dnl ENABLE_CAIRO will be set to empty later when necessary -ENABLE_CAIRO="TRUE" - -BUILD_PIXMAN="" -SYSTEM_CAIRO="" - -AC_MSG_CHECKING([whether to use the system cairo]) - -if test "$with_system_cairo" = yes -o \( "$with_system_libs" = yes -a "$with_system_cairo" != no \); then - SYSTEM_CAIRO=YES AC_MSG_RESULT([yes]) - - PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 ) - - if test "$_os" != "WINNT" -a "$_os" != "Darwin" -a "$ENABLE_FONTCONFIG" != "TRUE" ; then - AC_MSG_ERROR([Cairo library requires fontconfig.]) - fi - - if test "$with_system_xrender_headers" = "yes"; then - AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8]) - AC_TRY_RUN([ -#include <X11/extensions/Xrender.h> - -int main(int argc, char **argv) { -#ifdef PictStandardA8 - return 0; -#else - return 1; -#endif -} - ], - [AC_MSG_RESULT([yes])], - [AC_MSG_ERROR([no, X headers too old.])] - ) - fi else AC_MSG_RESULT([no]) - BUILD_TYPE="$BUILD_TYPE CAIRO" - BUILD_PIXMAN=YES + ENABLE_QUICKSTART_LIBPNG="" fi +AC_SUBST(ENABLE_QUICKSTART_LIBPNG) -AC_SUBST(ENABLE_CAIRO) -AC_SUBST(BUILD_PIXMAN) -AC_SUBST(SYSTEM_CAIRO) -AC_SUBST(CAIRO_CFLAGS) -AC_SUBST(CAIRO_LIBS) +dnl =================================================================== ENABLE_CAIRO_CANVAS="FALSE" if test "$enable_cairo_canvas" = "yes" -a "$ENABLE_CAIRO" = "TRUE" ; then ENABLE_CAIRO_CANVAS="TRUE" fi AC_SUBST(ENABLE_CAIRO_CANVAS) - -dnl =================================================================== dnl Check whether the GStreamer libraries are available. dnl =================================================================== @@ -6464,10 +6469,10 @@ if test "$build_gstreamer" = "yes"; then AC_MSG_CHECKING([whether to enable the GStreamer avmedia backend]) if test "x$enable_gstreamer" != "xno" ; then ENABLE_GSTREAMER="TRUE" - AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 ) + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES( GSTREAMER, gstreamer-0.10 gstreamer-plugins-base-0.10 ) else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) fi fi @@ -6481,48 +6486,47 @@ AC_MSG_CHECKING([whether to build the OpenGL Transitions component]) ENABLE_OPENGL= if test "$_os" = "Darwin" ; then - # We use frameworks on Mac OS X, no need for detail checks - ENABLE_OPENGL=TRUE - AC_MSG_RESULT([yes]) + # We use frameworks on Mac OS X, no need for detail checks + ENABLE_OPENGL=TRUE + AC_MSG_RESULT([yes]) else - if test "x$enable_opengl" != "xno" ; then - if test "$_os" != "WINNT"; then - save_LDFLAGS=$LDFLAGS - LDFLAGS="$LDFLAGS -lm" - AC_MSG_RESULT([yes]) - AC_CHECK_LIB(GL, main, [], + if test "x$enable_opengl" != "xno" ; then + if test "$_os" != "WINNT"; then + save_LDFLAGS=$LDFLAGS + LDFLAGS="$LDFLAGS -lm" + AC_MSG_RESULT([yes]) + AC_CHECK_LIB(GL, main, [], [AC_MSG_ERROR(libGL not installed or functional)], []) - AC_CHECK_LIB(GLU, main, [], + AC_CHECK_LIB(GLU, main, [], [AC_MSG_ERROR(libGLU not installed or functional)], []) - ENABLE_OPENGL=TRUE - LDFLAGS=$save_LDFLAGS - - dnl =================================================================== - dnl Check for system Mesa - dnl =================================================================== - AC_MSG_CHECKING([which Mesa headers to use]) - if test -n "$with_system_mesa_headers" -o -n "$with_system_headers" && \ - test "$with_system_mesa_headers" != "no"; then - AC_MSG_RESULT([external]) - SYSTEM_MESA_HEADERS=YES - AC_LANG_PUSH(C) - AC_CHECK_HEADER(GL/glxext.h, [], - [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>]) - AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC]) - AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no)) - AC_LANG_POP(C) - else - AC_MSG_RESULT([internal]) - SYSTEM_MESA_HEADERS=NO - BUILD_TYPE="$BUILD_TYPE MESA" + ENABLE_OPENGL=TRUE + LDFLAGS=$save_LDFLAGS + + dnl =================================================================== + dnl Check for system Mesa + dnl =================================================================== + AC_MSG_CHECKING([which Mesa headers to use]) + if test -n "$with_system_mesa_headers" -o -n "$with_system_headers" && \ + test "$with_system_mesa_headers" != "no"; then + AC_MSG_RESULT([external]) + SYSTEM_MESA_HEADERS=YES + AC_LANG_PUSH(C) + AC_CHECK_HEADER(GL/glxext.h, [], + [ AC_MSG_ERROR(mesa headers not found.)], [#include <GL/glx.h>]) + AC_MSG_CHECKING([whether GL/glxext.h defines PFNGLXBINDTEXIMAGEEXTPROC]) + AC_EGREP_HEADER(PFNGLXBINDTEXIMAGEEXTPROC, GL/glxext.h, [AC_MSG_RESULT([yes])], AC_MSG_ERROR(no)) + AC_LANG_POP(C) + else + AC_MSG_RESULT([internal]) + SYSTEM_MESA_HEADERS=NO + BUILD_TYPE="$BUILD_TYPE MESA" + fi + else + AC_MSG_RESULT([not on Windows]) fi - - else - AC_MSG_RESULT([not on Windows]) - fi - else - AC_MSG_RESULT([no]) - fi + else + AC_MSG_RESULT([no]) + fi fi AC_SUBST(SYSTEM_MESA_HEADERS) @@ -6584,8 +6588,8 @@ AC_SUBST(POPPLER_LIBS) if test "$ENABLE_PRESENTER_SCREEN" = "YES" -o "$ENABLE_MINIMIZER" = "YES" -o "$ENABLE_PDFIMPORT" = "YES"; then - AC_MSG_CHECKING([for sdext module]) - BUILD_TYPE="$BUILD_TYPE SDEXT" + AC_MSG_CHECKING([for sdext module]) + BUILD_TYPE="$BUILD_TYPE SDEXT" fi AC_MSG_CHECKING([whether to build the Wiki Publisher extension]) @@ -6605,202 +6609,202 @@ AS_IF([test "x$enable_ext_wiki_publisher" = "xyes"], [ AC_SUBST(ENABLE_MEDIAWIKI) if test "$ENABLE_MEDIAWIKI" = "YES"; then - AC_MSG_CHECKING([which Servlet API Jar to use]) - if test -n "$with_system_servlet_api"; then - AC_MSG_RESULT([external]) - SYSTEM_SERVLETAPI=YES - if test -z "$SERVLETAPI_JAR"; then - SERVLETAPI_JAR=/usr/share/java/servlet-api.jar - fi - AC_CHECK_FILE($SERVLETAPI_JAR, [], - [AC_MSG_ERROR(servlet-api.jar not found.)], []) - else - AC_MSG_RESULT([internal]) - SYSTEM_SERVLETAPI=NO - BUILD_TYPE="$BUILD_TYPE TOMCAT" - fi + AC_MSG_CHECKING([which Servlet API Jar to use]) + if test -n "$with_system_servlet_api"; then + AC_MSG_RESULT([external]) + SYSTEM_SERVLETAPI=YES + if test -z "$SERVLETAPI_JAR"; then + SERVLETAPI_JAR=/usr/share/java/servlet-api.jar + fi + AC_CHECK_FILE($SERVLETAPI_JAR, [], + [AC_MSG_ERROR(servlet-api.jar not found.)], []) + else + AC_MSG_RESULT([internal]) + SYSTEM_SERVLETAPI=NO + BUILD_TYPE="$BUILD_TYPE TOMCAT" + fi fi AC_SUBST(SYSTEM_SERVLETAPI) AC_SUBST(SERVLETAPI_JAR) AC_MSG_CHECKING([whether to build the Report Builder extension]) if test -n "$enable_ext_report_builder" -a "$enable_ext_report_builder" != "no" && test "$with_java" != "no"; then - AC_MSG_RESULT([yes]) - ENABLE_REPORTBUILDER=YES - AC_MSG_CHECKING([for reportbuilder module]) - AC_MSG_CHECKING([which jfreereport libs to use]) - if test "$with_system_jfreereport" = "yes"; then - SYSTEM_JFREEREPORT=YES - AC_MSG_RESULT([external]) - if test -z $SAC_JAR; then - SAC_JAR=/usr/share/java/sac.jar - fi - AC_CHECK_FILE($SAC_JAR, [], + AC_MSG_RESULT([yes]) + ENABLE_REPORTBUILDER=YES + AC_MSG_CHECKING([for reportbuilder module]) + AC_MSG_CHECKING([which jfreereport libs to use]) + if test "$with_system_jfreereport" = "yes"; then + SYSTEM_JFREEREPORT=YES + AC_MSG_RESULT([external]) + if test -z $SAC_JAR; then + SAC_JAR=/usr/share/java/sac.jar + fi + AC_CHECK_FILE($SAC_JAR, [], [AC_MSG_ERROR(sac.jar not found.)], []) - if test -z $LIBXML_JAR; then - AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar, - [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libxml.jar, - [ LIBXML_JAR=/usr/share/java/libxml.jar ], - [AC_MSG_ERROR(libxml.jar replacement not found.)] + if test -z $LIBXML_JAR; then + AC_CHECK_FILE(/usr/share/java/libxml-1.0.0.jar, + [ LIBXML_JAR=/usr/share/java/libxml-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libxml.jar, + [ LIBXML_JAR=/usr/share/java/libxml.jar ], + [AC_MSG_ERROR(libxml.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBXML_JAR, [], - [AC_MSG_ERROR(libxml.jar not found.)], []) - fi - - if test -z $FLUTE_JAR; then - AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar, - [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/flute.jar, - [ FLUTE_JAR=/usr/share/java/flute.jar ], - [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] + else + AC_CHECK_FILE($LIBXML_JAR, [], + [AC_MSG_ERROR(libxml.jar not found.)], []) + fi + + if test -z $FLUTE_JAR; then + AC_CHECK_FILE(/usr/share/java/flute-1.3.0.jar, + [ FLUTE_JAR=/usr/share/java/flute-1.3.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/flute.jar, + [ FLUTE_JAR=/usr/share/java/flute.jar ], + [ AC_MSG_ERROR(flute-1.3.0.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($FLUTE_JAR, [], - [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) - fi - - if test -z $JFREEREPORT_JAR; then - AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar, - [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ], - [ - AC_CHECK_FILE(/usr/share/java/flow-engine.jar, - [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], - [AC_MSG_ERROR(jfreereport.jar replacement not found.)] + else + AC_CHECK_FILE($FLUTE_JAR, [], + [AC_MSG_ERROR(flute-1.3.0.jar not found.)], []) + fi + + if test -z $JFREEREPORT_JAR; then + AC_CHECK_FILE(/usr/share/java/flow-engine-0.9.2.jar, + [ JFREEREPORT_JAR=/usr/share/java/flow-engine-0.9.2.jar ], + [ + AC_CHECK_FILE(/usr/share/java/flow-engine.jar, + [ JFREEREPORT_JAR=/usr/share/java/flow-engine.jar ], + [AC_MSG_ERROR(jfreereport.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($JFREEREPORT_JAR, [], - [AC_MSG_ERROR(jfreereport.jar not found.)], []) - fi - - if test -z $LIBLAYOUT_JAR; then - AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar, - [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ], - [ - AC_CHECK_FILE(/usr/share/java/liblayout.jar, - [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], - [AC_MSG_ERROR(liblayout.jar replacement not found.)] + else + AC_CHECK_FILE($JFREEREPORT_JAR, [], + [AC_MSG_ERROR(jfreereport.jar not found.)], []) + fi + + if test -z $LIBLAYOUT_JAR; then + AC_CHECK_FILE(/usr/share/java/liblayout-0.2.9.jar, + [ LIBLAYOUT_JAR=/usr/share/java/liblayout-0.2.9.jar ], + [ + AC_CHECK_FILE(/usr/share/java/liblayout.jar, + [ LIBLAYOUT_JAR=/usr/share/java/liblayout.jar ], + [AC_MSG_ERROR(liblayout.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBLAYOUT_JAR, [], - [AC_MSG_ERROR(liblayout.jar not found.)], []) - fi - - if test -z $LIBLOADER_JAR; then - AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar, - [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libloader.jar, - [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], - [AC_MSG_ERROR(libloader.jar replacement not found.)] + else + AC_CHECK_FILE($LIBLAYOUT_JAR, [], + [AC_MSG_ERROR(liblayout.jar not found.)], []) + fi + + if test -z $LIBLOADER_JAR; then + AC_CHECK_FILE(/usr/share/java/libloader-1.0.0.jar, + [ LIBLOADER_JAR=/usr/share/java/libloader-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libloader.jar, + [ LIBLOADER_JAR=/usr/share/java/libloader.jar ], + [AC_MSG_ERROR(libloader.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBLOADER_JAR, [], - [AC_MSG_ERROR(libloader.jar not found.)], []) - fi - - if test -z $LIBFORMULA_JAR; then - AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar, - [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libformula.jar, - [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], - [AC_MSG_ERROR(libformula.jar replacement not found.)] + else + AC_CHECK_FILE($LIBLOADER_JAR, [], + [AC_MSG_ERROR(libloader.jar not found.)], []) + fi + + if test -z $LIBFORMULA_JAR; then + AC_CHECK_FILE(/usr/share/java/libformula-0.2.0.jar, + [ LIBFORMULA_JAR=/usr/share/java/libformula-0.2.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libformula.jar, + [ LIBFORMULA_JAR=/usr/share/java/libformula.jar ], + [AC_MSG_ERROR(libformula.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBFORMULA_JAR, [], - [AC_MSG_ERROR(libformula.jar not found.)], []) - fi - - if test -z $LIBREPOSITORY_JAR; then - AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar, - [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/librepository.jar, - [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], - [AC_MSG_ERROR(librepository.jar replacement not found.)] + else + AC_CHECK_FILE($LIBFORMULA_JAR, [], + [AC_MSG_ERROR(libformula.jar not found.)], []) + fi + + if test -z $LIBREPOSITORY_JAR; then + AC_CHECK_FILE(/usr/share/java/librepository-1.0.0.jar, + [ LIBREPOSITORY_JAR=/usr/share/java/librepository-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/librepository.jar, + [ LIBREPOSITORY_JAR=/usr/share/java/librepository.jar ], + [AC_MSG_ERROR(librepository.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBREPOSITORY_JAR, [], - [AC_MSG_ERROR(librepository.jar not found.)], []) - fi - - if test -z $LIBFONTS_JAR; then - AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar, - [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libfonts.jar, - [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], - [AC_MSG_ERROR(libfonts.jar replacement not found.)] + else + AC_CHECK_FILE($LIBREPOSITORY_JAR, [], + [AC_MSG_ERROR(librepository.jar not found.)], []) + fi + + if test -z $LIBFONTS_JAR; then + AC_CHECK_FILE(/usr/share/java/libfonts-1.0.0.jar, + [ LIBFONTS_JAR=/usr/share/java/libfonts-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libfonts.jar, + [ LIBFONTS_JAR=/usr/share/java/libfonts.jar ], + [AC_MSG_ERROR(libfonts.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBFONTS_JAR, [], - [AC_MSG_ERROR(libfonts.jar not found.)], []) - fi - - if test -z $LIBSERIALIZER_JAR; then - AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar, - [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libserializer.jar, - [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], - [AC_MSG_ERROR(libserializer.jar replacement not found.)] + else + AC_CHECK_FILE($LIBFONTS_JAR, [], + [AC_MSG_ERROR(libfonts.jar not found.)], []) + fi + + if test -z $LIBSERIALIZER_JAR; then + AC_CHECK_FILE(/usr/share/java/libserializer-1.0.0.jar, + [ LIBSERIALIZER_JAR=/usr/share/java/libserializer-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libserializer.jar, + [ LIBSERIALIZER_JAR=/usr/share/java/libserializer.jar ], + [AC_MSG_ERROR(libserializer.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBSERIALIZER_JAR, [], - [AC_MSG_ERROR(libserializer.jar not found.)], []) - fi - - - if test -z $LIBBASE_JAR; then - AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar, - [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ], - [ - AC_CHECK_FILE(/usr/share/java/libbase.jar, - [ LIBBASE_JAR=/usr/share/java/libbase.jar ], - [AC_MSG_ERROR(libbase.jar replacement not found.)] + else + AC_CHECK_FILE($LIBSERIALIZER_JAR, [], + [AC_MSG_ERROR(libserializer.jar not found.)], []) + fi + + + if test -z $LIBBASE_JAR; then + AC_CHECK_FILE(/usr/share/java/libbase-1.0.0.jar, + [ LIBBASE_JAR=/usr/share/java/libbase-1.0.0.jar ], + [ + AC_CHECK_FILE(/usr/share/java/libbase.jar, + [ LIBBASE_JAR=/usr/share/java/libbase.jar ], + [AC_MSG_ERROR(libbase.jar replacement not found.)] + ) + ] ) - ] - ) - else - AC_CHECK_FILE($LIBBASE_JAR, [], - [AC_MSG_ERROR(libbase.jar not found.)], []) - fi + else + AC_CHECK_FILE($LIBBASE_JAR, [], + [AC_MSG_ERROR(libbase.jar not found.)], []) + fi - else - AC_MSG_RESULT([internal]) - AC_MSG_CHECKING([for jfreereport module]) - SYSTEM_JFREEREPORT=NO - BUILD_TYPE="$BUILD_TYPE JFREEREPORT" - fi - BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" + else + AC_MSG_RESULT([internal]) + AC_MSG_CHECKING([for jfreereport module]) + SYSTEM_JFREEREPORT=NO + BUILD_TYPE="$BUILD_TYPE JFREEREPORT" + fi + BUILD_TYPE="$BUILD_TYPE REPORTBUILDER" else - AC_MSG_RESULT([no]) - ENABLE_REPORTBUILDER=NO - SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN" - SYSTEM_JFREEREPORT=NO + AC_MSG_RESULT([no]) + ENABLE_REPORTBUILDER=NO + SCPDEFS="$SCPDEFS -DWITHOUT_EXTENSION_REPORTDESIGN" + SYSTEM_JFREEREPORT=NO fi AC_SUBST(ENABLE_REPORTBUILDER) AC_SUBST(SYSTEM_JFREEREPORT) @@ -6819,77 +6823,77 @@ AC_SUBST(LIBSERIALIZER_JAR) # this has to be here because both the Wiki Publisher and the SRB use # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - AC_MSG_CHECKING([which Apache commons-* libs to use]) - if test "$with_system_apache_commons" = "yes"; then - SYSTEM_APACHE_COMMONS=YES - AC_MSG_RESULT([external]) - if test "$ENABLE_MEDIAWIKI" = "YES"; then - if test -z $COMMONS_CODEC_JAR; then - AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar, - [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ], - [ - AC_CHECK_FILE(/usr/share/java/commons-codec.jar, - [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ], - [AC_MSG_ERROR(commons-codec.jar replacement not found.)] - ) - ] - ) - else - AC_CHECK_FILE($COMMONS_CODEC_JAR, [], - [AC_MSG_ERROR(commons-codec.jar not found.)], []) - fi - - if test -z $COMMONS_LANG_JAR; then - AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar, - [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ], - [ - AC_CHECK_FILE(/usr/share/java/commons-lang.jar, - [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ], - [AC_MSG_ERROR(commons-lang.jar replacement not found.)] - ) - ] - ) - else - AC_CHECK_FILE($COMMONS_LANG_JAR, [], - [AC_MSG_ERROR(commons-lang.jar not found.)], []) - fi - - if test -z $COMMONS_HTTPCLIENT_JAR; then - AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar, - [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ], - [ - AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar, - [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ], - [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)] - ) - ] - ) - else - AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [], - [AC_MSG_ERROR(commons-httpclient.jar not found.)], []) - fi - fi - if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then - if test -z $COMMONS_LOGGING_JAR; then - AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar, - [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ], - [ - AC_CHECK_FILE(/usr/share/java/commons-logging.jar, - [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ], - [AC_MSG_ERROR(commons-logging.jar replacement not found.)] - ) - ] - ) - else - AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], - [AC_MSG_ERROR(commons-logging.jar not found.)], []) - fi + AC_MSG_CHECKING([which Apache commons-* libs to use]) + if test "$with_system_apache_commons" = "yes"; then + SYSTEM_APACHE_COMMONS=YES + AC_MSG_RESULT([external]) + if test "$ENABLE_MEDIAWIKI" = "YES"; then + if test -z $COMMONS_CODEC_JAR; then + AC_CHECK_FILE(/usr/share/java/commons-codec-1.3.jar, + [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec-1.3.jar ], + [ + AC_CHECK_FILE(/usr/share/java/commons-codec.jar, + [ COMMONS_CODEC_JAR=/usr/share/java/commons-codec.jar ], + [AC_MSG_ERROR(commons-codec.jar replacement not found.)] + ) + ] + ) + else + AC_CHECK_FILE($COMMONS_CODEC_JAR, [], + [AC_MSG_ERROR(commons-codec.jar not found.)], []) + fi + + if test -z $COMMONS_LANG_JAR; then + AC_CHECK_FILE(/usr/share/java/commons-lang-2.3.jar, + [ COMMONS_LANG_JAR=/usr/share/java/commons-lang-2.3.jar ], + [ + AC_CHECK_FILE(/usr/share/java/commons-lang.jar, + [ COMMONS_LANG_JAR=/usr/share/java/commons-lang.jar ], + [AC_MSG_ERROR(commons-lang.jar replacement not found.)] + ) + ] + ) + else + AC_CHECK_FILE($COMMONS_LANG_JAR, [], + [AC_MSG_ERROR(commons-lang.jar not found.)], []) + fi + + if test -z $COMMONS_HTTPCLIENT_JAR; then + AC_CHECK_FILE(/usr/share/java/commons-httpclient-3.1.jar, + [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient-3.1.jar ], + [ + AC_CHECK_FILE(/usr/share/java/commons-httpclient.jar, + [ COMMONS_HTTPCLIENT_JAR=/usr/share/java/commons-httpclient.jar ], + [AC_MSG_ERROR(commons-httpclient.jar replacement not found.)] + ) + ] + ) + else + AC_CHECK_FILE($COMMONS_HTTPCLIENT_JAR, [], + [AC_MSG_ERROR(commons-httpclient.jar not found.)], []) + fi + fi + if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then + if test -z $COMMONS_LOGGING_JAR; then + AC_CHECK_FILE(/usr/share/java/commons-logging-1.1.1.jar, + [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging-1.1.1.jar ], + [ + AC_CHECK_FILE(/usr/share/java/commons-logging.jar, + [ COMMONS_LOGGING_JAR=/usr/share/java/commons-logging.jar ], + [AC_MSG_ERROR(commons-logging.jar replacement not found.)] + ) + ] + ) + else + AC_CHECK_FILE($COMMONS_LOGGING_JAR, [], + [AC_MSG_ERROR(commons-logging.jar not found.)], []) + fi + fi + else + AC_MSG_RESULT([internal]) + SYSTEM_APACHE_COMMONS=NO + BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" fi - else - AC_MSG_RESULT([internal]) - SYSTEM_APACHE_COMMONS=NO - BUILD_TYPE="$BUILD_TYPE APACHE_COMMONS TOMCAT" - fi fi AC_SUBST(SYSTEM_APACHE_COMMONS) AC_SUBST(COMMONS_CODEC_JAR) @@ -6924,21 +6928,21 @@ AC_SUBST(ENABLE_SCRIPTING_JAVASCRIPT) dnl Scripting provider for Python extension? dnl We always provide this unless we have disabled Python completely if test $enable_python = no; then - ENABLE_SCRIPTING_PYTHON=NO + ENABLE_SCRIPTING_PYTHON=NO else - ENABLE_SCRIPTING_PYTHON=YES + ENABLE_SCRIPTING_PYTHON=YES fi AC_SUBST(ENABLE_SCRIPTING_PYTHON) supports_multilib= case "$host_cpu" in - x86_64 | powerpc64 | s390x) - if test "$SIZEOF_LONG" = "8"; then - supports_multilib="yes" - fi - ;; - *) - ;; +x86_64 | powerpc64 | s390x) + if test "$SIZEOF_LONG" = "8"; then + supports_multilib="yes" + fi + ;; +*) + ;; esac dnl =================================================================== @@ -7081,134 +7085,134 @@ KDE_GLIB_CFLAGS="" KDE_GLIB_LIBS="" KDE_HAVE_GLIB="" if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then - qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes" - qt_libdirs="$QT4LIB /usr/lib $x_libraries" + qt_incdirs="$QT4INC /usr/include/qt4 /usr/include $x_includes" + qt_libdirs="$QT4LIB /usr/lib $x_libraries" - kde_incdirs="/usr/include /usr/include/kde4 $x_includes" - kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" + kde_incdirs="/usr/include /usr/include/kde4 $x_includes" + kde_libdirs="/usr/lib /usr/lib/kde4 /usr/lib/kde4/devel $x_libraries" - if test -n "$supports_multilib" ; then - qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" - kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" - fi + if test -n "$supports_multilib" ; then + qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64" + kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4 /usr/lib64/kde4/devel" + fi - if test -n "$QTDIR" ; then - qt_incdirs="$QTDIR/include $qt_incdirs" - if test -z "$supports_multilib" ; then - qt_libdirs="$QTDIR/lib $qt_libdirs" - else - qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs" - fi - fi - if test -n "$QT4DIR" ; then - qt_incdirs="$QT4DIR/include $qt_incdirs" - if test -z "$supports_multilib" ; then - qt_libdirs="$QT4DIR/lib $qt_libdirs" - else - qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs" - fi - fi - - if test -n "$KDEDIR" ; then - kde_incdirs="$KDEDIR/include $kde_incdirs" - if test -z "$supports_multilib" ; then - kde_libdirs="$KDEDIR/lib $kde_libdirs" - else - kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" - fi - fi - if test -n "$KDE4DIR" ; then - kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs" - if test -z "$supports_multilib" ; then - kde_libdirs="$KDE4DIR/lib $kde_libdirs" - else - kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" - fi - fi - - qt_test_include="Qt/qobject.h" - qt_test_library="libQtCore.so" - kde_test_include="kwindowsystem.h" - kde_test_library="libsolid.so" - - AC_MSG_CHECKING([for Qt4 headers]) - qt_header_dir="no" - for inc_dir in $qt_incdirs ; do - if test -r "$inc_dir/$qt_test_include" ; then - qt_header_dir="$inc_dir" - break - fi - done - - AC_MSG_RESULT([$qt_header_dir]) - if test "x$qt_header_dir" = "xno" ; then - AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) - fi - - AC_MSG_CHECKING([for Qt4 libraries]) - qt_lib_dir="no" - for lib_dir in $qt_libdirs ; do - if test -r "$lib_dir/$qt_test_library" ; then - qt_lib_dir="$lib_dir" - PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH - break - fi - done - - AC_MSG_RESULT([$qt_lib_dir]) - - if test "x$qt_lib_dir" = "xno" ; then - AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) - fi - - dnl Check for Meta Object Compiler - - AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] ) - MOC4="$MOCQT4" - if test "$MOC4" = "no" ; then - AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] ) - if test "$MOC4" = "no" ; then - AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify + if test -n "$QTDIR" ; then + qt_incdirs="$QTDIR/include $qt_incdirs" + if test -z "$supports_multilib" ; then + qt_libdirs="$QTDIR/lib $qt_libdirs" + else + qt_libdirs="$QTDIR/lib64 $QTDIR/lib $qt_libdirs" + fi + fi + if test -n "$QT4DIR" ; then + qt_incdirs="$QT4DIR/include $qt_incdirs" + if test -z "$supports_multilib" ; then + qt_libdirs="$QT4DIR/lib $qt_libdirs" + else + qt_libdirs="$QT4DIR/lib64 $QT4DIR/lib $qt_libdirs" + fi + fi + + if test -n "$KDEDIR" ; then + kde_incdirs="$KDEDIR/include $kde_incdirs" + if test -z "$supports_multilib" ; then + kde_libdirs="$KDEDIR/lib $kde_libdirs" + else + kde_libdirs="$KDEDIR/lib64 $KDEDIR/lib $kde_libdirs" + fi + fi + if test -n "$KDE4DIR" ; then + kde_incdirs="$KDE4DIR/include $KDE4DIR/include/kde4 $kde_incdirs" + if test -z "$supports_multilib" ; then + kde_libdirs="$KDE4DIR/lib $kde_libdirs" + else + kde_libdirs="$KDE4DIR/lib64 $KDE4DIR/lib $kde_libdirs" + fi + fi + + qt_test_include="Qt/qobject.h" + qt_test_library="libQtCore.so" + kde_test_include="kwindowsystem.h" + kde_test_library="libsolid.so" + + AC_MSG_CHECKING([for Qt4 headers]) + qt_header_dir="no" + for inc_dir in $qt_incdirs ; do + if test -r "$inc_dir/$qt_test_include" ; then + qt_header_dir="$inc_dir" + break + fi + done + + AC_MSG_RESULT([$qt_header_dir]) + if test "x$qt_header_dir" = "xno" ; then + AC_MSG_ERROR([Qt4 headers not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) + fi + + AC_MSG_CHECKING([for Qt4 libraries]) + qt_lib_dir="no" + for lib_dir in $qt_libdirs ; do + if test -r "$lib_dir/$qt_test_library" ; then + qt_lib_dir="$lib_dir" + PKG_CONFIG_PATH="$qt_lib_dir"/pkgconfig:$PKG_CONFIG_PATH + break + fi + done + + AC_MSG_RESULT([$qt_lib_dir]) + + if test "x$qt_lib_dir" = "xno" ; then + AC_MSG_ERROR([Qt4 libraries not found. Please specify the root of your Qt4 installation by exporting QT4DIR before running "configure".]) + fi + + dnl Check for Meta Object Compiler + + AC_PATH_PROG( MOCQT4, moc-qt4, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] ) + MOC4="$MOCQT4" + if test "$MOC4" = "no" ; then + AC_PATH_PROG( MOC4, moc, no, [`dirname $qt_lib_dir`/bin:$QT4DIR/bin:$PATH] ) + if test "$MOC4" = "no" ; then + AC_MSG_ERROR([Qt Meta Object Compiler not found. Please specify the root of your Qt installation by exporting QT4DIR before running "configure".]) - fi - fi - - dnl Check for KDE4 headers - AC_MSG_CHECKING([for KDE4 headers]) - kde_incdir="no" - for kde_check in $kde_incdirs ; do - if test -r "$kde_check/$kde_test_include" ; then - kde_incdir="$kde_check" - break - fi - done - AC_MSG_RESULT([$kde_incdir]) - if test "x$kde_incdir" = "xno" ; then - AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) - fi - - dnl Check for KDE4 libraries - AC_MSG_CHECKING([for KDE4 libraries]) - kde_libdir="no" - for kde_check in $kde_libdirs ; do - if test -r "$kde_check/$kde_test_library" ; then - kde_libdir="$kde_check" - break - fi - done - - AC_MSG_RESULT([$kde_libdir]) - if test "x$kde_libdir" = "xno" ; then - AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) - fi - - KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" - KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui" - - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS" - AC_MSG_CHECKING([whether KDE is >= 4.2]) + fi + fi + + dnl Check for KDE4 headers + AC_MSG_CHECKING([for KDE4 headers]) + kde_incdir="no" + for kde_check in $kde_incdirs ; do + if test -r "$kde_check/$kde_test_include" ; then + kde_incdir="$kde_check" + break + fi + done + AC_MSG_RESULT([$kde_incdir]) + if test "x$kde_incdir" = "xno" ; then + AC_MSG_ERROR([KDE4 headers not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) + fi + + dnl Check for KDE4 libraries + AC_MSG_CHECKING([for KDE4 libraries]) + kde_libdir="no" + for kde_check in $kde_libdirs ; do + if test -r "$kde_check/$kde_test_library" ; then + kde_libdir="$kde_check" + break + fi + done + + AC_MSG_RESULT([$kde_libdir]) + if test "x$kde_libdir" = "xno" ; then + AC_MSG_ERROR([KDE4 libraries not found. Please specify the root of your KDE4 installation by exporting KDE4DIR before running "configure".]) + fi + + KDE4_CFLAGS="`pkg-config --cflags QtCore` `pkg-config --cflags QtGui` -I$kde_incdir -DQT_CLEAN_NAMESPACE -DQT_THREAD_SUPPORT" + KDE4_LIBS="-L$kde_libdir -L$qt_lib_dir -lkdeui -lkdecore -lQtCore -lQtGui" + + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $KDE4_CFLAGS" + AC_MSG_CHECKING([whether KDE is >= 4.2]) AC_TRY_RUN([ #include <kdeversion.h> @@ -7217,13 +7221,13 @@ int main(int argc, char **argv) { else return 1; } ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old])]) - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) # Glib is needed for properly handling Qt event loop with Qt's Glib integration enabled - PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4], - [KDE_HAVE_GLIB=1], - AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]])) + PKG_CHECK_MODULES(KDE_GLIB,[glib-2.0 >= 2.4], + [KDE_HAVE_GLIB=1], + AC_MSG_WARN([[No Glib found, KDE4 support will not integrate with Qt's Glib event loop support]])) fi AC_SUBST(KDE4_CFLAGS) AC_SUBST(KDE4_LIBS) @@ -7238,10 +7242,10 @@ dnl =================================================================== AC_MSG_CHECKING([whether to enable the lockdown pieces]) ENABLE_LOCKDOWN="" if test -n "$enable_lockdown" && test "$enable_lockdown" != "no"; then - ENABLE_LOCKDOWN=YES - AC_MSG_RESULT([yes]) + ENABLE_LOCKDOWN=YES + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_LOCKDOWN) @@ -7250,12 +7254,12 @@ dnl Test whether to include Evolution 2 support dnl =================================================================== AC_MSG_CHECKING([whether to enable evolution 2 support]) if test "$enable_evolution2" = "yes" -o "$enable_evolution2" = "TRUE"; then - AC_MSG_RESULT([yes]) - PKG_CHECK_MODULES(GOBJECT, gobject-2.0) - ENABLE_EVOAB2="TRUE" + AC_MSG_RESULT([yes]) + PKG_CHECK_MODULES(GOBJECT, gobject-2.0) + ENABLE_EVOAB2="TRUE" else - ENABLE_EVOAB2="" - AC_MSG_RESULT([no]) + ENABLE_EVOAB2="" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_EVOAB2) AC_SUBST(GOBJECT_CFLAGS) @@ -7266,11 +7270,11 @@ dnl Test whether to include KDE AB support dnl =================================================================== AC_MSG_CHECKING([whether to enable KDE address book support]) if test "$enable_kdeab" = "yes" && test "$enable_kde" = "yes"; then - AC_MSG_RESULT([yes]) - AC_LANG_PUSH([C++]) - save_CXXFLAGS=$CXXFLAGS - CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" - AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6]) + AC_MSG_RESULT([yes]) + AC_LANG_PUSH([C++]) + save_CXXFLAGS=$CXXFLAGS + CXXFLAGS="$CXXFLAGS $KDE_CFLAGS" + AC_MSG_CHECKING([whether KDE is between 3.2 and 3.6]) AC_TRY_RUN([ #include <kdeversion.h> @@ -7279,12 +7283,12 @@ int main(int argc, char **argv) { else return 1; } ], [AC_MSG_RESULT([yes])], [AC_MSG_ERROR([KDE version too old or too recent, please use another version of KDE or disable KDE address book support])]) - CXXFLAGS=$save_CXXFLAGS - AC_LANG_POP([C++]) - ENABLE_KAB=TRUE + CXXFLAGS=$save_CXXFLAGS + AC_LANG_POP([C++]) + ENABLE_KAB=TRUE else - AC_MSG_RESULT([no]) - ENABLE_KAB= + AC_MSG_RESULT([no]) + ENABLE_KAB= fi AC_SUBST(ENABLE_KAB) @@ -7293,16 +7297,16 @@ dnl Test whether to include MathMLDTD dnl =================================================================== AC_MSG_CHECKING([whether to include MathMLDTD]) if test -n "$enable_mathmldtd"; then - if test "$enable_mathmldtd" = "no"; then + if test "$enable_mathmldtd" = "no"; then + AC_MSG_RESULT([no]) + SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" + else + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE MATHMLDTD" + fi +else AC_MSG_RESULT([no]) SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" - else - AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE MATHMLDTD" - fi -else - AC_MSG_RESULT([no]) - SCPDEFS="$SCPDEFS -DWITHOUT_MATHMLDTD" fi dnl =================================================================== @@ -7311,16 +7315,16 @@ dnl =================================================================== AC_MSG_CHECKING([which themes to include]) # if none given, use all available themes if test "z$enable_theme" = "z" -o "z$enable_theme" = "zyes"; then - enable_theme="default crystal hicontrast oxygen tango" + enable_theme="default crystal hicontrast oxygen tango" fi - WITH_THEMES="" - for theme in $enable_theme - do +WITH_THEMES="" +for theme in $enable_theme +do WITH_THEMES="$WITH_THEMES $theme" SCPDEFS="$SCPDEFS -DTHEME_`echo $theme|tr '[a-z]' '[A-Z]'`" - done - AC_MSG_RESULT([$WITH_THEMES]) +done +AC_MSG_RESULT([$WITH_THEMES]) AC_SUBST(WITH_THEMES) dnl =================================================================== @@ -7328,12 +7332,12 @@ dnl Test whether to integrate helppacks into the product's installer dnl =================================================================== AC_MSG_CHECKING([for helppack integration]) if test "z$with_helppack_integration" = "zno" ; then - WITH_HELPPACK_INTEGRATION=NO - AC_MSG_RESULT([no integration]) + WITH_HELPPACK_INTEGRATION=NO + AC_MSG_RESULT([no integration]) else - WITH_HELPPACK_INTEGRATION=YES - SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION" - AC_MSG_RESULT([integration]) + WITH_HELPPACK_INTEGRATION=YES + SCPDEFS="$SCPDEFS -DWITH_HELPPACK_INTEGRATION" + AC_MSG_RESULT([integration]) fi AC_SUBST(WITH_HELPPACK_INTEGRATION) @@ -7342,12 +7346,12 @@ dnl Test whether to integrate extensions into the product's installer dnl =================================================================== AC_MSG_CHECKING([for extensions integration]) if test "z$with_extension_integration" = "z" -o "z$with_extension_integration" = "zno" ; then - WITH_EXTENSION_INTEGRATION=NO - AC_MSG_RESULT([no integration]) + WITH_EXTENSION_INTEGRATION=NO + AC_MSG_RESULT([no integration]) else - WITH_EXTENSION_INTEGRATION=YES - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION" - AC_MSG_RESULT([integration]) + WITH_EXTENSION_INTEGRATION=YES + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_INTEGRATION" + AC_MSG_RESULT([integration]) fi AC_SUBST(WITH_EXTENSION_INTEGRATION) @@ -7377,13 +7381,13 @@ else LIGHTPROOF_EN_US_PACK= # check whether the langs are requested at all for lang in $wanted_lightproof ; do - if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then - LIGHTPROOF_LANG="$LIGHTPROOF_LANG $lang" - case $lang in - "hu") LIGHTPROOF_HU_PACK="324ddcb9ef45c3bc055fcc002bc4e556-lightproof-hu_1.2.oxt";; - "en-US") LIGHTPROOF_EN_US_PACK="942541da5f5498214518c8b459ae4524-lightproof-en-US_0.1.oxt";; - esac - fi + if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then + LIGHTPROOF_LANG="$LIGHTPROOF_LANG $lang" + case $lang in + "hu") LIGHTPROOF_HU_PACK="324ddcb9ef45c3bc055fcc002bc4e556-lightproof-hu_1.2.oxt";; + "en-US") LIGHTPROOF_EN_US_PACK="942541da5f5498214518c8b459ae4524-lightproof-en-US_0.1.oxt";; + esac + fi done AC_MSG_RESULT([$LIGHTPROOF_LANG]) fi @@ -7396,12 +7400,12 @@ dnl Test whether to include Watch Window extension dnl =================================================================== AC_MSG_CHECKING([for Watch Window extension integration]) if test "z$enable_ext_watch_window" = "z" -o "z$enable_ext_watch_window" = "zno" ; then - AC_MSG_RESULT([no]) - WATCH_WINDOW_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + WATCH_WINDOW_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW" - WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_WATCH_WINDOW" + WATCH_WINDOW_EXTENSION_PACK="23bd75552206dfcd8fd4e29137dcac84-WatchWindow_1.2.0.0.oxt" fi AC_SUBST(WATCH_WINDOW_EXTENSION_PACK) @@ -7410,12 +7414,12 @@ dnl Test whether to include Diagram extension dnl =================================================================== AC_MSG_CHECKING([for Diagram extension integration]) if test "z$enable_ext_diagram" = "z" -o "z$enable_ext_diagram" = "zno" ; then - AC_MSG_RESULT([no]) - DIAGRAM_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + DIAGRAM_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM" - DIAGRAM_EXTENSION_PACK="41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_DIAGRAM" + DIAGRAM_EXTENSION_PACK="41c9b65ad60af4b3255bbecdfef11736-Diagram_1.1.0.0.oxt" fi AC_SUBST(DIAGRAM_EXTENSION_PACK) @@ -7424,12 +7428,12 @@ dnl Test whether to include Validator extension dnl =================================================================== AC_MSG_CHECKING([for Validator extension integration]) if test "z$enable_ext_validator" = "z" -o "z$enable_ext_validator" = "zno" ; then - AC_MSG_RESULT([no]) - VALIDATOR_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + VALIDATOR_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR" - VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_VALIDATOR" + VALIDATOR_EXTENSION_PACK="bbdd5639ada63e3130761daaecae1a10-Validator_1.1.0.0.oxt" fi AC_SUBST(VALIDATOR_EXTENSION_PACK) @@ -7438,12 +7442,12 @@ dnl Test whether to include Barcode extension dnl =================================================================== AC_MSG_CHECKING([for Barcode extension integration]) if test "z$enable_ext_barcode" = "z" -o "z$enable_ext_barcode" = "zno" ; then - AC_MSG_RESULT([no]) - BARCODE_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + BARCODE_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE" - BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_BARCODE" + BARCODE_EXTENSION_PACK="7e7efc5d4a03126bb9ae3ae9aa2c4e87-Barcode_1.3.1.0.oxt" fi AC_SUBST(BARCODE_EXTENSION_PACK) @@ -7452,13 +7456,13 @@ dnl Test whether to include ConvertTextToNumber extension dnl =================================================================== AC_MSG_CHECKING([for ConvertTextToNumber extension integration]) if test "z$enable_ext_ct2n" = "z" -o "z$enable_ext_ct2n" = "zno" ; then - AC_MSG_RESULT([no]) - CT2N_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + CT2N_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE CT2N" - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N" - CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt" + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE CT2N" + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_CT2N" + CT2N_EXTENSION_PACK="451ccf439a36a568653b024534669971-ConvertTextToNumber_1.3.2.oxt" fi AC_SUBST(CT2N_EXTENSION_PACK) @@ -7467,12 +7471,12 @@ dnl Test whether to include Numbertext extension dnl =================================================================== AC_MSG_CHECKING([for Numbertext extension integration]) if test "z$enable_ext_numbertext" = "z" -o "z$enable_ext_numbertext" = "zno" ; then - AC_MSG_RESULT([no]) - NUMBERTEXT_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + NUMBERTEXT_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT" - NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NUMBERTEXT" + NUMBERTEXT_EXTENSION_PACK="b8cbca7b3363e6ca2d02bc0ba2b63904-numbertext_0.9.4.oxt" fi AC_SUBST(NUMBERTEXT_EXTENSION_PACK) @@ -7481,12 +7485,12 @@ dnl Test whether to include Hungarian Cross-reference Toolbar extension dnl =================================================================== AC_MSG_CHECKING([for Hungarian Cross-reference Toolbar extension integration]) if test "z$enable_ext_hunart" = "z" -o "z$enable_ext_hunart" = "zno" ; then - AC_MSG_RESULT([no]) - HUNART_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + HUNART_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART" - HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_HUNART" + HUNART_EXTENSION_PACK="b632bdd25649cc4067bcb410bae23d2b-hunart_0.3.oxt" fi AC_SUBST(HUNART_EXTENSION_PACK) @@ -7495,12 +7499,12 @@ dnl Test whether to include Typography Toolbar extension dnl =================================================================== AC_MSG_CHECKING([for Typography Toolbar extension integration]) if test "z$enable_ext_typo" = "z" -o "z$enable_ext_typo" = "zno" ; then - AC_MSG_RESULT([no]) - TYPO_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + TYPO_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO" - TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_TYPO" + TYPO_EXTENSION_PACK="9d60b6cfa3ef1926848710bbcd11115b-typo_0.4.2.oxt" fi AC_SUBST(TYPO_EXTENSION_PACK) @@ -7509,12 +7513,12 @@ dnl Test whether to include Google Docs extension dnl =================================================================== AC_MSG_CHECKING([for Google Docs extension integration]) if test "z$enable_ext_google_docs" = "z" -o "z$enable_ext_google_docs" = "zno" ; then - AC_MSG_RESULT([no]) - GOOGLE_DOCS_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + GOOGLE_DOCS_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS" - GOOGLE_DOCS_EXTENSION_PACK="dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_GOOGLE_DOCS" + GOOGLE_DOCS_EXTENSION_PACK="dbaafd21de055e582d92d7d32fe9da13-gdocs_2.3.1.oxt" fi AC_SUBST(GOOGLE_DOCS_EXTENSION_PACK) @@ -7523,11 +7527,11 @@ dnl Test whether to include NLPSolver extension dnl =================================================================== AC_MSG_CHECKING([for NLPSolver extension integration]) if test "z$enable_ext_nlpsolver" = "z" -o "z$enable_ext_nlpsolver" = "zno" ; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) else - AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE NLPSOLVER" - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER" + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE NLPSOLVER" + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_NLPSOLVER" fi dnl =================================================================== @@ -7535,11 +7539,11 @@ dnl Test whether to include LanguageTool extension dnl =================================================================== AC_MSG_CHECKING([for LanguageTool extension integration]) if test "z$with_languagetool" = "z" -o "z$with_languagetool" = "zno" ; then - AC_MSG_RESULT([no]) + AC_MSG_RESULT([no]) else - AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL" - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL" + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE LANGUAGETOOL" + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_LANGUAGETOOL" fi dnl =================================================================== @@ -7547,12 +7551,12 @@ dnl Test whether to include oooblogger extension dnl =================================================================== AC_MSG_CHECKING([for oooblogger extension integration]) if test "z$enable_ext_oooblogger" = "z" -o "z$enable_ext_oooblogger" = "zno" ; then - AC_MSG_RESULT([no]) - OOOBLOGGER_EXTENSION_PACK="" + AC_MSG_RESULT([no]) + OOOBLOGGER_EXTENSION_PACK="" else - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER" - OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_EXTENSION_OOOBLOGGER" + OOOBLOGGER_EXTENSION_PACK="b7b2d0e04e142f26dd96119c80757d1f-oooblogger_0.1.oxt" fi AC_SUBST(OOOBLOGGER_EXTENSION_PACK) @@ -7567,15 +7571,15 @@ else SCPDEFS="$SCPDEFS -DWITH_EXTENSION_SUN_TEMPLATE_PACK" sun_supported_langs="en-US de it fr es hu" if test "z$with_sun_templates" = "zyes" ; then - wanted_sun_templates="$sun_supported_langs" + wanted_sun_templates="$sun_supported_langs" else - # check whether the langs are supported by Sun - wanted_sun_templates= - for lang in $with_sun_templates ; do - if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then - wanted_sun_templates="$wanted_sun_templates $lang" - fi - done + # check whether the langs are supported by Sun + wanted_sun_templates= + for lang in $with_sun_templates ; do + if test -n "`echo $sun_supported_langs | grep "$lang"`" ; then + wanted_sun_templates="$wanted_sun_templates $lang" + fi + done fi SUNTEMPLATES_LANG= SUNTEMPLATES_DE_PACK= @@ -7588,14 +7592,14 @@ else for lang in $wanted_sun_templates ; do if test "$with_lang" = "ALL" -o -n "`echo $with_lang | grep "$lang"`" ; then SUNTEMPLATES_LANG="$SUNTEMPLATES_LANG $lang" - case $lang in - "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";; - "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";; - "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";; - "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";; - "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";; - "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";; - esac + case $lang in + "de") SUNTEMPLATES_DE_PACK="53ca5e56ccd4cab3693ad32c6bd13343-Sun-ODF-Template-Pack-de_1.0.0.oxt";; + "en-US") SUNTEMPLATES_EN_US_PACK="472ffb92d82cf502be039203c606643d-Sun-ODF-Template-Pack-en-US_1.0.0.oxt";; + "es") SUNTEMPLATES_ES_PACK="4ad003e7bbda5715f5f38fde1f707af2-Sun-ODF-Template-Pack-es_1.0.0.oxt";; + "fr") SUNTEMPLATES_FR_PACK="a53080dc876edcddb26eb4c3c7537469-Sun-ODF-Template-Pack-fr_1.0.0.oxt";; + "hu") SUNTEMPLATES_HU_PACK="09ec2dac030e1dcd5ef7fa1692691dc0-Sun-ODF-Template-Pack-hu_1.0.0.oxt";; + "it") SUNTEMPLATES_IT_PACK="b33775feda3bcf823cad7ac361fd49a6-Sun-ODF-Template-Pack-it_1.0.0.oxt";; + esac fi done AC_MSG_RESULT([$SUNTEMPLATES_LANG]) @@ -7613,25 +7617,25 @@ dnl Test whether to include fonts dnl =================================================================== AC_MSG_CHECKING([whether to include third-party fonts]) if test "$with_fonts" != "no" ; then - AC_MSG_RESULT([yes]) - WITH_FONTS=YES - BUILD_TYPE="$BUILD_TYPE MORE_FONTS" + AC_MSG_RESULT([yes]) + WITH_FONTS=YES + BUILD_TYPE="$BUILD_TYPE MORE_FONTS" else - AC_MSG_RESULT([no]) - WITH_FONTS=NO - SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" + AC_MSG_RESULT([no]) + WITH_FONTS=NO + SCPDEFS="$SCPDEFS -DWITHOUT_FONTS" fi AC_SUBST(WITH_FONTS) AC_MSG_CHECKING([whether to include Agfa Monotype fonts]) if test "$with_agfa_monotype_fonts" = "yes" ; then - AC_MSG_RESULT([yes]) - WITH_AGFA_MONOTYPE_FONTS=YES - SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS" - BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS" + AC_MSG_RESULT([yes]) + WITH_AGFA_MONOTYPE_FONTS=YES + SCPDEFS="$SCPDEFS -DWITH_AGFA_MONOTYPE_FONTS" + BUILD_TYPE="$BUILD_TYPE AGFA_MONOTYPE_FONTS" else - AC_MSG_RESULT([no]) - WITH_AGFA_MONOTYPE_FONTS=NO + AC_MSG_RESULT([no]) + WITH_AGFA_MONOTYPE_FONTS=NO fi AC_SUBST(WITH_AGFA_MONOTYPE_FONTS) @@ -7640,11 +7644,11 @@ dnl Test whether to include ppds dnl =================================================================== AC_MSG_CHECKING([whether to include PPDs]) if test "$with_ppds" != "no"; then - AC_MSG_RESULT([yes]) + AC_MSG_RESULT([yes]) else - AC_MSG_RESULT([no]) - WITHOUT_PPDS=YES - SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" + AC_MSG_RESULT([no]) + WITHOUT_PPDS=YES + SCPDEFS="$SCPDEFS -DWITHOUT_PPDS" fi AC_SUBST(WITHOUT_PPDS) @@ -7653,12 +7657,12 @@ dnl Test whether to include afms dnl =================================================================== AC_MSG_CHECKING([whether to include AFMs]) if test "$with_afms" != "no"; then - AC_MSG_RESULT([yes]) - BUILD_TYPE="$BUILD_TYPE AFMS" + AC_MSG_RESULT([yes]) + BUILD_TYPE="$BUILD_TYPE AFMS" else - AC_MSG_RESULT([no]) - WITHOUT_AFMS=YES - SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" + AC_MSG_RESULT([no]) + WITHOUT_AFMS=YES + SCPDEFS="$SCPDEFS -DWITHOUT_AFMS" fi AC_SUBST(WITHOUT_AFMS) @@ -7667,15 +7671,15 @@ dnl Test whether to include extra galleries dnl =================================================================== AC_MSG_CHECKING([whether to include extra galleries]) if test "z$enable_extra_gallery" = "z" -o "z$enable_extra_gallery" = "zno" ; then - AC_MSG_RESULT([no]) - WITH_EXTRA_GALLERY=NO - OOOP_GALLERY_PACK="" + AC_MSG_RESULT([no]) + WITH_EXTRA_GALLERY=NO + OOOP_GALLERY_PACK="" else - AC_MSG_RESULT([yes]) - WITH_EXTRA_GALLERY=YES - BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY" - SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY" - OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip" + AC_MSG_RESULT([yes]) + WITH_EXTRA_GALLERY=YES + BUILD_TYPE="$BUILD_TYPE EXTRA_GALLERY" + SCPDEFS="$SCPDEFS -DWITH_EXTRA_GALLERY" + OOOP_GALLERY_PACK="af9314c5972d95a5d6da23ffad818f68-OOOP-gallery-pack-2.8.0.0.zip" fi AC_SUBST(WITH_EXTRA_GALLERY) AC_SUBST(OOOP_GALLERY_PACK) @@ -7685,15 +7689,15 @@ dnl Test whether to include extra templates dnl =================================================================== AC_MSG_CHECKING([whether to include extra templates]) if test "z$enable_extra_template" = "z" -o "z$enable_extra_template" = "zno" ; then - AC_MSG_RESULT([no]) - WITH_EXTRA_TEMPLATE=NO - OOOP_TEMPLATES_PACK="" + AC_MSG_RESULT([no]) + WITH_EXTRA_TEMPLATE=NO + OOOP_TEMPLATES_PACK="" else - AC_MSG_RESULT([yes]) - WITH_EXTRA_TEMPLATE=YES - BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE" - SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE" - OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip" + AC_MSG_RESULT([yes]) + WITH_EXTRA_TEMPLATE=YES + BUILD_TYPE="$BUILD_TYPE EXTRA_TEMPLATE" + SCPDEFS="$SCPDEFS -DWITH_EXTRA_TEMPLATE" + OOOP_TEMPLATES_PACK="1be202fbbbc13f10592a98f70a4a87fb-OOOP-templates-pack-2.9.0.0.zip" fi AC_SUBST(WITH_EXTRA_TEMPLATE) AC_SUBST(OOOP_TEMPLATES_PACK) @@ -7703,15 +7707,15 @@ dnl Test whether to include extra samples dnl =================================================================== AC_MSG_CHECKING([whether to include extra samples]) if test "z$enable_extra_sample" = "z" -o "z$enable_extra_sample" = "zno" ; then - AC_MSG_RESULT([no]) - WITH_EXTRA_SAMPLE=NO - OOOP_SAMPLES_PACK="" + AC_MSG_RESULT([no]) + WITH_EXTRA_SAMPLE=NO + OOOP_SAMPLES_PACK="" else - AC_MSG_RESULT([yes]) - WITH_EXTRA_SAMPLE=YES - BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE" - SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE" - OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip" + AC_MSG_RESULT([yes]) + WITH_EXTRA_SAMPLE=YES + BUILD_TYPE="$BUILD_TYPE EXTRA_SAMPLE" + SCPDEFS="$SCPDEFS -DWITH_EXTRA_SAMPLE" + OOOP_SAMPLES_PACK="a6bccacf44914969e6e7b2f8faf4132c-OOOP-samples-pack-2.7.0.0.zip" fi AC_SUBST(WITH_EXTRA_SAMPLE) AC_SUBST(OOOP_SAMPLES_PACK) @@ -7721,15 +7725,15 @@ dnl Test whether to include extra fonts dnl =================================================================== AC_MSG_CHECKING([whether to include extra fonts]) if test "z$enable_extra_font" = "z" -o "z$enable_extra_font" = "zno" ; then - AC_MSG_RESULT([no]) - WITH_EXTRA_FONT=NO - OOOP_FONTS_PACK="" + AC_MSG_RESULT([no]) + WITH_EXTRA_FONT=NO + OOOP_FONTS_PACK="" else - AC_MSG_RESULT([yes]) - WITH_EXTRA_FONT=YES - BUILD_TYPE="$BUILD_TYPE EXTRA_FONT" - SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT" - OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip" + AC_MSG_RESULT([yes]) + WITH_EXTRA_FONT=YES + BUILD_TYPE="$BUILD_TYPE EXTRA_FONT" + SCPDEFS="$SCPDEFS -DWITH_EXTRA_FONT" + OOOP_FONTS_PACK="a10aa597411643326e27d7fc128af12d-OOOP-fonts-pack-2.9.0.0.zip" fi AC_SUBST(WITH_EXTRA_FONT) AC_SUBST(OOOP_FONTS_PACK) @@ -7739,24 +7743,46 @@ dnl Test whether to build global menu support dnl =================================================================== AC_MSG_CHECKING([whether to build global menu support]) if test "z$enable_lomenubar" = "z" -o "z$enable_lomenubar" = "zno" ; then - AC_MSG_RESULT([no]) - ENABLE_LOMENUBAR="FALSE" + AC_MSG_RESULT([no]) + ENABLE_LOMENUBAR="FALSE" else - AC_MSG_RESULT([yes]) - ENABLE_LOMENUBAR="TRUE" + AC_MSG_RESULT([yes]) + ENABLE_LOMENUBAR="TRUE" fi AC_SUBST(ENABLE_LOMENUBAR) dnl =================================================================== +dnl Test whether to enable online update service +dnl =================================================================== +AC_MSG_CHECKING([whether to enable online update]) +ENABLE_ONLINE_UPDATE= +if test "z$enable_online_update" = "z" ; then + if test "$_os" = "WINNT" -o "$_os" = "Darwin" ; then + AC_MSG_RESULT([yes]) + ENABLE_ONLINE_UPDATE="TRUE" + else + AC_MSG_RESULT([no]) + fi +else + if test "z$enable_online_update" = "zyes" ; then + AC_MSG_RESULT([yes]) + ENABLE_ONLINE_UPDATE="TRUE" + else + AC_MSG_RESULT([no]) + fi +fi +AC_SUBST(ENABLE_ONLINE_UPDATE) + +dnl =================================================================== dnl Test whether build target is Release Build dnl =================================================================== AC_MSG_CHECKING([whether build target is Release Build]) if test "z$enable_release_build" = "z" -o "z$enable_release_build" = "zno" ; then - AC_MSG_RESULT([no]) - ENABLE_RELEASE_BUILD="FALSE" + AC_MSG_RESULT([no]) + ENABLE_RELEASE_BUILD="FALSE" else - AC_MSG_RESULT([yes]) - ENABLE_RELEASE_BUILD="TRUE" + AC_MSG_RESULT([yes]) + ENABLE_RELEASE_BUILD="TRUE" fi AC_SUBST(ENABLE_RELEASE_BUILD) @@ -7764,72 +7790,72 @@ dnl =================================================================== dnl Test whether to enable ActiveX embedding dnl =================================================================== if test "$_os" = "WINNT"; then - AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components]) - if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then - ENABLE_ACTIVEX_COMPONENT="TRUE" - AC_MSG_RESULT([yes]) - SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT" - else - ENABLE_ACTIVEX_COMPONENT="" - AC_MSG_RESULT([no]) - fi - AC_SUBST(ENABLE_ACTIVEX_COMPONENT) - AC_SUBST(SCPDEFS) + AC_MSG_CHECKING([whether to enable ActiveX embedding of LibreOffice components]) + if test "$enable_activex_component" = "yes" -o "$enable_activex_component" = "TRUE" -o "$enable_activex_component" = ""; then + ENABLE_ACTIVEX_COMPONENT="TRUE" + AC_MSG_RESULT([yes]) + SCPDEFS="$SCPDEFS -DWITH_ACTIVEX_COMPONENT" + else + ENABLE_ACTIVEX_COMPONENT="" + AC_MSG_RESULT([no]) + fi + AC_SUBST(ENABLE_ACTIVEX_COMPONENT) + AC_SUBST(SCPDEFS) fi AC_MSG_CHECKING([whether and how to use Xinerama]) if test "$_os" = "Darwin"; then - USE_XINERAMA=YES - XINERAMA_LINK=dynamic - AC_MSG_RESULT([yes]) + USE_XINERAMA=YES + XINERAMA_LINK=dynamic + 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 dynamic one - # per default - USE_XINERAMA=YES - if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then - XINERAMA_LINK=dynamic - else - XINERAMA_LINK=static - fi - elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then - # we have only the dynamic version - USE_XINERAMA=YES - XINERAMA_LINK=dynamic - elif test -e "$XLIB/libXinerama.a"; then - # static version - if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then - USE_XINERAMA=YES - XINERAMA_LINK=static - else - USE_XINERAMA=NO - XINERAMA_LINK=none - fi - else - # no Xinerama - USE_XINERAMA=NO - XINERAMA_LINK=none - fi - if test "$USE_XINERAMA" = "YES"; then - AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) - AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], - [AC_MSG_ERROR(Xinerama header not found.)], []) - XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" - if test "$_os" = "FreeBSD"; then - XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" - fi - if test "$_os" = "Linux"; then - XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" - fi - AC_CHECK_LIB(Xinerama, XineramaIsActive, [], - [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) - else - AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) - fi -else - USE_XINERAMA=NO - XINERAMA_LINK=none - AC_MSG_RESULT([no]) + if test -e "$XLIB/libXinerama.so" -a -e "$XLIB/libXinerama.a"; then + # we have both versions, let the user decide but use the dynamic one + # per default + USE_XINERAMA=YES + if test -z "$with_static_xinerama" -o -n "$with_system_libs"; then + XINERAMA_LINK=dynamic + else + XINERAMA_LINK=static + fi + elif test -e "$XLIB/libXinerama.so" -a ! -e "$XLIB/libXinerama.a"; then + # we have only the dynamic version + USE_XINERAMA=YES + XINERAMA_LINK=dynamic + elif test -e "$XLIB/libXinerama.a"; then + # static version + if echo $host_cpu | grep -E 'i[[3456]]86' 2>/dev/null >/dev/null; then + USE_XINERAMA=YES + XINERAMA_LINK=static + else + USE_XINERAMA=NO + XINERAMA_LINK=none + fi + else + # no Xinerama + USE_XINERAMA=NO + XINERAMA_LINK=none + fi + if test "$USE_XINERAMA" = "YES"; then + AC_MSG_RESULT([yes, with $XINERAMA_LINK linking]) + AC_CHECK_HEADER(X11/extensions/Xinerama.h, [], + [AC_MSG_ERROR(Xinerama header not found.)], []) + XINERAMA_EXTRA_LIBS="-L$XLIB -lXext" + if test "$_os" = "FreeBSD"; then + XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -lXt" + fi + if test "$_os" = "Linux"; then + XINERAMA_EXTRA_LIBS="$XINERAMA_EXTRA_LIBS -ldl" + fi + AC_CHECK_LIB(Xinerama, XineramaIsActive, [], + [AC_MSG_ERROR(Xinerama not functional?)], [$XINERAMA_EXTRA_LIBS]) + else + AC_MSG_RESULT([no, libXinerama not found or wrong architecture.]) + fi +else + USE_XINERAMA=NO + XINERAMA_LINK=none + AC_MSG_RESULT([no]) fi AC_SUBST(USE_XINERAMA) AC_SUBST(XINERAMA_LINK) @@ -7849,79 +7875,78 @@ AC_MSG_CHECKING([what librsvg to use]) case "$enable_librsvg" in no|disable) - AC_MSG_RESULT([none]) - enable_librsvg=no - ;; + AC_MSG_RESULT([none]) + enable_librsvg=no + ;; ""|yes|auto) - if test $build_os = cygwin -o \ + if test $build_os = cygwin -o \ $_os = Darwin; then - dnl When building on/for these OSes always use the internal one, - dnl if at all. Add more OSes above as needed. - AC_MSG_RESULT([internal]) - enable_librsvg=internal - elif test $_os = iOS -o $_os = Android; then - AC_MSG_RESULT([none]) - enable_librsvg=no - else - if test "$with_system_libs" = yes; then - AC_MSG_RESULT([system]) - PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14) - enable_librsvg=system - elif test "$with_system_libs" = no; then - AC_MSG_RESULT([internal]) - enable_librsvg=internal - else - AC_MSG_RESULT([checking further]) - PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:]) - if test -z "$LIBRSVG_PKG_ERRORS"; then + dnl When building on/for these OSes always use the internal one, + dnl if at all. Add more OSes above as needed. + AC_MSG_RESULT([internal]) + enable_librsvg=internal + elif test $_os = iOS -o $_os = Android; then + AC_MSG_RESULT([none]) + enable_librsvg=no + else + if test "$with_system_libs" = yes; then + AC_MSG_RESULT([system]) + PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14) enable_librsvg=system - else + elif test "$with_system_libs" = no; then + AC_MSG_RESULT([internal]) enable_librsvg=internal - fi - fi - fi - ;; + else + AC_MSG_RESULT([checking further]) + PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14,, [:]) + if test -z "$LIBRSVG_PKG_ERRORS"; then + enable_librsvg=system + else + enable_librsvg=internal + fi + fi + fi + ;; internal) - AC_MSG_RESULT([internal]) - ;; + AC_MSG_RESULT([internal]) + ;; system) - if test $_os = WINNT -a "$WITH_MINGW" != yes; then - AC_MSG_ERROR([Must use internal librsvg when building with MSVC]) - fi - AC_MSG_RESULT([system]) - PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14) - ;; + if test $_os = WINNT -a "$WITH_MINGW" != yes; then + AC_MSG_ERROR([Must use internal librsvg when building with MSVC]) + fi + AC_MSG_RESULT([system]) + PKG_CHECK_MODULES(LIBRSVG, librsvg-2.0 >= 2.14) + ;; *) - AC_MSG_ERROR([Incorrect --enable-librsvg option]) - ;; + AC_MSG_ERROR([Incorrect --enable-librsvg option]) + ;; esac dnl By now enable_librsvg should be "system", "internal" or "no" case $enable_librsvg in system) - ENABLE_LIBRSVG=SYSTEM - SYSTEM_LIBRSVG=YES - ;; + ENABLE_LIBRSVG=SYSTEM + SYSTEM_LIBRSVG=YES + ;; internal) - ENABLE_LIBRSVG=INTERNAL - SYSTEM_LIBRSVG=NO - BUILD_TYPE="$BUILD_TYPE LIBRSVG" - ;; + ENABLE_LIBRSVG=INTERNAL + SYSTEM_LIBRSVG=NO + BUILD_TYPE="$BUILD_TYPE LIBRSVG" + ;; no) - ENABLE_LIBRSVG=NO - SYSTEM_LIBRSVG=NO - ENABLE_CAIRO= - ;; + ENABLE_LIBRSVG=NO + SYSTEM_LIBRSVG=NO + ;; *) - AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"]) - ;; + AC_MSG_ERROR([Internal configure script error, invalid enable_librsvg value "$enable_librsvg"]) + ;; esac AC_SUBST(ENABLE_LIBRSVG) @@ -7930,12 +7955,66 @@ AC_SUBST(LIBRSVG_LIBS) AC_SUBST(SYSTEM_LIBRSVG) dnl =================================================================== +dnl Test whether to build cairo or rely on the system version +dnl =================================================================== + +SYSTEM_CAIRO="" + +AC_MSG_CHECKING([whether to use the system cairo]) + +if test "$with_system_cairo" = yes -o \( "$with_system_libs" = yes -a "$with_system_cairo" != no \); then + SYSTEM_CAIRO=YES + AC_MSG_RESULT([yes]) + + PKG_CHECK_MODULES( CAIRO, cairo >= 1.0.2 ) + + if test "$with_system_xrender_headers" = "yes"; then + AC_MSG_CHECKING([whether Xrender.h defines PictStandardA8]) + AC_TRY_RUN([ +#include <X11/extensions/Xrender.h> + +int main(int argc, char **argv) { +#ifdef PictStandardA8 + return 0; +#else + return 1; +#endif +} + ], + [AC_MSG_RESULT([yes])], + [AC_MSG_ERROR([no, X headers too old.])] + ) + fi +else + AC_MSG_RESULT([no]) + + if test $_os = Android; then + dnl For Android cairo isn't + dnl buildable yet. + : + elif test $_os = WINNT; then + dnl We only need cairo for Windows if we + dnl build librsvg + if test "$ENABLE_LIBRSVG" != NO; then + BUILD_TYPE="$BUILD_TYPE CAIRO" + fi + else + BUILD_TYPE="$BUILD_TYPE CAIRO" + fi +fi + +AC_SUBST(SYSTEM_CAIRO) +AC_SUBST(CAIRO_CFLAGS) +AC_SUBST(CAIRO_LIBS) + + +dnl =================================================================== dnl Test whether to build gdk-pixbuf or rely on the system version dnl =================================================================== AC_MSG_CHECKING([whether to use the system gdk-pixbuf]) -dnl As long as the only thing we need gdk-pxbuf for is below +dnl As long as the only thing we need gdk-pixbuf for is below dnl librsvg, use the same --enable-librsvg (possibly implied dnl by --with-system-libs) to override this. @@ -7944,14 +8023,14 @@ if test "$SYSTEM_LIBRSVG" = YES; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_GDKPIXBUF=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_GDKPIXBUF=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_GDKPIXBUF=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_GDKPIXBUF=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_GDKPIXBUF) @@ -7971,14 +8050,14 @@ if test "$SYSTEM_LIBRSVG" = YES; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_GLIB=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_GLIB=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_GLIB=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_GLIB=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_GLIB) @@ -7995,14 +8074,14 @@ if test "$with_system_gettext" = yes -o \( "$with_system_libs" = yes -a "$with_s AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_GETTEXT=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_GETTEXT=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_GETTEXT=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_GETTEXT=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_GETTEXT) @@ -8022,14 +8101,14 @@ if test "$SYSTEM_LIBRSVG" = YES; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_LIBCROCO=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_LIBCROCO=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_LIBCROCO=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_LIBCROCO=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_LIBCROCO) @@ -8049,14 +8128,14 @@ if test "$SYSTEM_LIBRSVG" = YES; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_PANGO=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_PANGO=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_PANGO=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_PANGO=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_PANGO) @@ -8076,14 +8155,14 @@ if test "$SYSTEM_LIBRSVG" = YES; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_LIBGSF=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_LIBGSF=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_LIBGSF=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_LIBGSF=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_LIBGSF) @@ -8103,14 +8182,14 @@ if test "$with_system_libpng" = yes -o \( "$with_system_libs" = yes -a "$with_sy AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_LIBPNG=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_LIBPNG=YES - AC_MSG_RESULT([no]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_LIBPNG=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_LIBPNG=YES + AC_MSG_RESULT([no]) + ;; esac fi AC_SUBST(SYSTEM_LIBPNG) @@ -8129,14 +8208,14 @@ if test "$SYSTEM_JPEG" == "YES"; then AC_MSG_RESULT([yes]) else case "$_os" in - WINNT|Darwin|iOS|Android) - SYSTEM_LIBJPEG=NO - AC_MSG_RESULT([no]) - ;; - *) - SYSTEM_LIBJPEG=YES - AC_MSG_RESULT([yes]) - ;; + WINNT|Darwin|iOS|Android) + SYSTEM_LIBJPEG=NO + AC_MSG_RESULT([no]) + ;; + *) + SYSTEM_LIBJPEG=YES + AC_MSG_RESULT([yes]) + ;; esac fi AC_SUBST(SYSTEM_LIBJPEG) @@ -8145,20 +8224,20 @@ dnl =================================================================== dnl Check for runtime JVM search path dnl =================================================================== if test "$SOLAR_JAVA" != ""; then - AC_MSG_CHECKING([whether to use specific JVM search path at runtime]) - if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then - AC_MSG_RESULT([yes]) - if ! test -d "$with_jvm_path"; then - AC_MSG_ERROR(["$with_jvm_path" not a directory]) - fi - if ! test -d "$with_jvm_path"jvm; then - AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm]) - fi - JVM_ONE_PATH_CHECK="$with_jvm_path" - AC_SUBST(JVM_ONE_PATH_CHECK) - else - AC_MSG_RESULT([no]) - fi + AC_MSG_CHECKING([whether to use specific JVM search path at runtime]) + if test -n "$with_jvm_path" && test "$with_jvm_path" != "no"; then + AC_MSG_RESULT([yes]) + if ! test -d "$with_jvm_path"; then + AC_MSG_ERROR(["$with_jvm_path" not a directory]) + fi + if ! test -d "$with_jvm_path"jvm; then + AC_MSG_ERROR(["$with_jvm_path"jvm not found, point with_jvm_path to \[/path/to/\]jvm]) + fi + JVM_ONE_PATH_CHECK="$with_jvm_path" + AC_SUBST(JVM_ONE_PATH_CHECK) + else + AC_MSG_RESULT([no]) + fi fi dnl =================================================================== @@ -8166,180 +8245,182 @@ dnl Test for the presence of Ant and that it works dnl =================================================================== if test "$SOLAR_JAVA" != ""; then -ANT_HOME=; export ANT_HOME -WITH_ANT_HOME=; export WITH_ANT_HOME -if test -z "$with_ant_home"; then - AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd]) -else - if test "$_os" = "WINNT"; then - with_ant_home=`cygpath -u "$with_ant_home"` - fi - AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) - WITH_ANT_HOME=$with_ant_home - ANT_HOME=$with_ant_home -fi - -if test -z "$ANT"; then - AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) -else - # resolve relative or absolute symlink - while test -h "$ANT"; do - a_cwd=`pwd` - a_basename=`basename "$ANT"` - a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"` - cd "`dirname "$ANT"`" - cd "`dirname "$a_script"`" - ANT="`pwd`"/"`basename "$a_script"`" - cd "$a_cwd" - done - - AC_MSG_CHECKING([if $ANT works]) -cat > conftest.java << EOF - public class conftest { - int testmethod(int a, int b) { - return a + b; - } - } + ANT_HOME=; export ANT_HOME + WITH_ANT_HOME=; export WITH_ANT_HOME + if test -z "$with_ant_home"; then + AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd]) + else + if test "$_os" = "WINNT"; then + with_ant_home=`cygpath -u "$with_ant_home"` + fi + AC_PATH_PROGS(ANT, [jakarta-ant ant ant.sh ant.bat ant.cmd],,$with_ant_home/bin:$PATH) + WITH_ANT_HOME=$with_ant_home + ANT_HOME=$with_ant_home + fi + + if test -z "$ANT"; then + AC_MSG_ERROR([Ant not found - Make sure it's in the path or use --with-ant-home]) + else + # resolve relative or absolute symlink + while test -h "$ANT"; do + a_cwd=`pwd` + a_basename=`basename "$ANT"` + a_script=`ls -l "$ANT" | $SED "s/.*${a_basename} -> //g"` + cd "`dirname "$ANT"`" + cd "`dirname "$a_script"`" + ANT="`pwd`"/"`basename "$a_script"`" + cd "$a_cwd" + done + + AC_MSG_CHECKING([if $ANT works]) + cat > conftest.java << EOF + public class conftest { + int testmethod(int a, int b) { + return a + b; + } + } EOF -cat > conftest.xml << EOF - <project name="conftest" default="conftest"> - <target name="conftest"> + cat > conftest.xml << EOF + <project name="conftest" default="conftest"> + <target name="conftest"> <javac srcdir="." includes="conftest.java"> - </javac> - </target> - </project> + </javac> + </target> + </project> EOF - oldJAVA_HOME=$JAVA_HOME - if test "$JAVACISGCJ" = "yes"; then - JAVA_HOME=; export JAVA_HOME - ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" - else - ant_cmd="$ANT -buildfile conftest.xml 1>&2" - fi - AC_TRY_EVAL(ant_cmd) - if test $? = 0 && test -f ./conftest.class ; then - AC_MSG_RESULT([Ant works]) - if test -z "$WITH_ANT_HOME"; then - ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` - if test -z "$ANT_HOME"; then - ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` + + oldJAVA_HOME=$JAVA_HOME + if test "$JAVACISGCJ" = "yes"; then + JAVA_HOME=; export JAVA_HOME + ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" + else + ant_cmd="$ANT -buildfile conftest.xml 1>&2" fi - else - ANT_HOME="$WITH_ANT_HOME" + AC_TRY_EVAL(ant_cmd) + if test $? = 0 && test -f ./conftest.class ; then + AC_MSG_RESULT([Ant works]) + if test -z "$WITH_ANT_HOME"; then + ANT_HOME=`$ANT -diagnostics | $EGREP "ant.home :" | $SED -e "s#ant.home : ##g"` + if test -z "$ANT_HOME"; then + ANT_HOME=`echo $ANT | $SED -n "s/\/bin\/ant.*\$//p"` + fi + else + ANT_HOME="$WITH_ANT_HOME" + fi + else + echo "configure: Ant test failed" >&5 + cat conftest.java >&5 + cat conftest.xml >&5 + AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) + ANT_HOME="" + echo "Ant does not work - Some Java projects will not build!" >>warn + fi + JAVA_HOME=$oldJAVA_HOME + rm -f conftest* core core.* *.core fi - else - echo "configure: Ant test failed" >&5 - cat conftest.java >&5 - cat conftest.xml >&5 - AC_MSG_WARN([Ant does not work - Some Java projects will not build!]) - ANT_HOME="" - echo "Ant does not work - Some Java projects will not build!" >>warn - fi - JAVA_HOME=$oldJAVA_HOME - rm -f conftest* core core.* *.core -fi -if test -z "$ANT_HOME"; then - ANT_HOME="NO_ANT_HOME" -fi -AC_SUBST(ANT_HOME) - -dnl Checking for ant.jar -if test "$ANT_HOME" != "NO_ANT_HOME"; then - AC_MSG_CHECKING([Ant lib directory]) - if test -f $ANT_HOME/lib/ant.jar; then - ANT_LIB="$ANT_HOME/lib" - else - if test -f $ANT_HOME/ant.jar; then - ANT_LIB="$ANT_HOME" - else - if test -f /usr/share/java/ant.jar; then - ANT_LIB=/usr/share/java - else - if test -f /usr/share/ant-core/lib/ant.jar; then - ANT_LIB=/usr/share/ant-core/lib - else - if test -f $ANT_HOME/lib/ant/ant.jar; then - ANT_LIB="$ANT_HOME/lib/ant" + if test -z "$ANT_HOME"; then + ANT_HOME="NO_ANT_HOME" + fi + AC_SUBST(ANT_HOME) + + dnl Checking for ant.jar + if test "$ANT_HOME" != "NO_ANT_HOME"; then + AC_MSG_CHECKING([Ant lib directory]) + if test -f $ANT_HOME/lib/ant.jar; then + ANT_LIB="$ANT_HOME/lib" + else + if test -f $ANT_HOME/ant.jar; then + ANT_LIB="$ANT_HOME" + else + if test -f /usr/share/java/ant.jar; then + ANT_LIB=/usr/share/java else - if test -f /usr/share/lib/ant/ant.jar; then - ANT_LIB=/usr/share/lib/ant - else - AC_MSG_ERROR([Ant libraries not found!]) - fi + if test -f /usr/share/ant-core/lib/ant.jar; then + ANT_LIB=/usr/share/ant-core/lib + else + if test -f $ANT_HOME/lib/ant/ant.jar; then + ANT_LIB="$ANT_HOME/lib/ant" + else + if test -f /usr/share/lib/ant/ant.jar; then + ANT_LIB=/usr/share/lib/ant + else + AC_MSG_ERROR([Ant libraries not found!]) + fi + fi + fi fi - fi - fi - fi - fi - AC_MSG_RESULT([Ant lib directory found.]) -fi -AC_SUBST(ANT_LIB) - -ant_minver=1.6.0 -ant_minminor1=`echo $ant_minver | cut -d"." -f2` - -AC_MSG_CHECKING([whether Ant is >= $ant_minver]) -ant_version=`$ANT -version | $AWK '{ print $4; }'` -ant_version_major=`echo $ant_version | cut -d. -f1` -ant_version_minor=`echo $ant_version | cut -d. -f2` -echo "configure: ant_version $ant_version " >&5 -echo "configure: ant_version_major $ant_version_major " >&5 -echo "configure: ant_version_minor $ant_version_minor " >&5 -if test "$ant_version_major" -ge "2"; then - AC_MSG_RESULT([yes, $ant_version]) -elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then - AC_MSG_RESULT([yes, $ant_version]) -else - AC_MSG_ERROR([no, you need at least Ant >= $ant_minver]) -fi + fi + fi + AC_MSG_RESULT([Ant lib directory found.]) + fi + AC_SUBST(ANT_LIB) + + ant_minver=1.6.0 + ant_minminor1=`echo $ant_minver | cut -d"." -f2` + + AC_MSG_CHECKING([whether Ant is >= $ant_minver]) + ant_version=`$ANT -version | $AWK '{ print $4; }'` + ant_version_major=`echo $ant_version | cut -d. -f1` + ant_version_minor=`echo $ant_version | cut -d. -f2` + echo "configure: ant_version $ant_version " >&5 + echo "configure: ant_version_major $ant_version_major " >&5 + echo "configure: ant_version_minor $ant_version_minor " >&5 + if test "$ant_version_major" -ge "2"; then + AC_MSG_RESULT([yes, $ant_version]) + elif test "$ant_version_major" = "1" && test "$ant_version_minor" -ge "$ant_minminor1"; then + AC_MSG_RESULT([yes, $ant_version]) + else + AC_MSG_ERROR([no, you need at least Ant >= $ant_minver]) + fi -if test "$ENABLE_MEDIAWIKI" = "YES"; then -AC_MSG_CHECKING([whether Ant supports mapper type="regexp"]) -rm -rf confdir -mkdir confdir -cat > conftest.java << EOF - public class conftest { - int testmethod(int a, int b) { - return a + b; - } - } + if test "$ENABLE_MEDIAWIKI" = "YES"; then + AC_MSG_CHECKING([whether Ant supports mapper type="regexp"]) + rm -rf confdir + mkdir confdir + cat > conftest.java << EOF + public class conftest { + int testmethod(int a, int b) { + return a + b; + } + } EOF -cat > conftest.xml << EOF - <project name="conftest" default="conftest"> - <target name="conftest" depends="copytest"> - <javac srcdir="." includes="conftest.java"> - </javac> - </target> - <target name="copytest"> - <copy todir="confdir"> + cat > conftest.xml << EOF + <project name="conftest" default="conftest"> + <target name="conftest" depends="copytest"> + <javac srcdir="." includes="conftest.java"> + </javac> + </target> + <target name="copytest"> + <copy todir="confdir"> <fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/> <filterset/> <mapper type="regexp" from="^(.*[/\\])foo([/\\].*)" to="\1baa\2"/> - </copy> - </target> - </project> + </copy> + </target> + </project> EOF - if test "$JAVACISGCJ" = "yes"; then - JAVA_HOME=; export JAVA_HOME - ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" - else - ant_cmd="$ANT -buildfile conftest.xml 1>&2" - fi - AC_TRY_EVAL(ant_cmd) - if test $? = 0 && test -f ./conftest.class ; then - AC_MSG_RESULT([yes]) - rm -rf confdir - else - echo "configure: Ant test failed" >&5 - cat conftest.java >&5 - cat conftest.xml >&5 - rm -rf confdir - AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) - fi -fi -rm -f conftest* core core.* *.core + + if test "$JAVACISGCJ" = "yes"; then + JAVA_HOME=; export JAVA_HOME + ant_cmd="$ANT -Dbuild.compiler=gcj -buildfile conftest.xml 1>&2" + else + ant_cmd="$ANT -buildfile conftest.xml 1>&2" + fi + AC_TRY_EVAL(ant_cmd) + if test $? = 0 && test -f ./conftest.class ; then + AC_MSG_RESULT([yes]) + rm -rf confdir + else + echo "configure: Ant test failed" >&5 + cat conftest.java >&5 + cat conftest.xml >&5 + rm -rf confdir + AC_MSG_ERROR([no. Did you install ant-apache-regexp?]) + fi + fi + rm -f conftest* core core.* *.core fi OOO_JUNIT_JAR= @@ -8400,19 +8481,19 @@ ALL_LANGS="en-US $completelangiso" # check the configured localizations WITH_LANG="$with_lang" if test -z "$WITH_LANG"; then - AC_MSG_RESULT([en-US]) + AC_MSG_RESULT([en-US]) else - AC_MSG_RESULT([$WITH_LANG]) - GIT_REPO_NAMES="$GIT_REPO_NAMES translations" + AC_MSG_RESULT([$WITH_LANG]) + GIT_REPO_NAMES="$GIT_REPO_NAMES translations" fi # check that the list is valid for lang in $WITH_LANG ; do - test "$lang" = "ALL" && continue; - test "$lang" = "kid" && continue; - # need to check for the exact string, so add space before and after the list of all languages - all_langs=" $ALL_LANGS " - test `echo "$all_langs" | sed "s|.* $lang .*|found|"` = "found" && continue; - AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS]) + test "$lang" = "ALL" && continue; + test "$lang" = "kid" && continue; + # need to check for the exact string, so add space before and after the list of all languages + all_langs=" $ALL_LANGS " + test `echo "$all_langs" | sed "s|.* $lang .*|found|"` = "found" && continue; + AC_MSG_ERROR([invalid language: $lang; supported languages are: $ALL_LANGS]) done AC_SUBST(ALL_LANGS) AC_SUBST(WITH_LANG) @@ -8421,26 +8502,26 @@ AC_SUBST(GIT_REPO_NAMES) AC_MSG_CHECKING([for another 'intro' bitmap]) INTRO_BITMAP= if test -z "$with_intro_bitmap" -o "$with_intro_bitmap" = "no" ; then - INTRO_BITMAP= - AC_MSG_RESULT([none]) + INTRO_BITMAP= + AC_MSG_RESULT([none]) else - case "$with_intro_bitmap" in - *.png) INTRO_BITMAP="$with_intro_bitmap" ;; - *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;; - esac - AC_MSG_RESULT([$INTRO_BITMAP]) + case "$with_intro_bitmap" in + *.png) INTRO_BITMAP="$with_intro_bitmap" ;; + *) AC_MSG_WARN([Intro bitmap should be a .png file!]) ;; + esac + AC_MSG_RESULT([$INTRO_BITMAP]) fi AC_SUBST(INTRO_BITMAP) AC_MSG_CHECKING([for another 'about' bitmap]) ABOUT_BITMAP= if test -z "$with_about_bitmap" -o "$with_about_bitmap" = "no" ; then - ABOUT_BITMAP= - AC_MSG_RESULT([none]) + ABOUT_BITMAP= + AC_MSG_RESULT([none]) else case "$with_about_bitmap" in - *.png) ABOUT_BITMAP="$with_about_bitmap" ;; - *) AC_MSG_WARN([About bitmap should be a .png file!]) ;; + *.png) ABOUT_BITMAP="$with_about_bitmap" ;; + *) AC_MSG_WARN([About bitmap should be a .png file!]) ;; esac AC_MSG_RESULT([$ABOUT_BITMAP]) fi @@ -8449,40 +8530,40 @@ AC_SUBST(ABOUT_BITMAP) OOO_VENDOR= AC_MSG_CHECKING([for vendor]) if test -z "$with_vendor" -o "$with_vendor" = "no" ; then - AC_MSG_RESULT([not set]) + AC_MSG_RESULT([not set]) else - OOO_VENDOR="$with_vendor" - AC_MSG_RESULT([$OOO_VENDOR]) + OOO_VENDOR="$with_vendor" + AC_MSG_RESULT([$OOO_VENDOR]) fi AC_SUBST(OOO_VENDOR) UNIXWRAPPERNAME= AC_MSG_CHECKING([for UNIX wrapper name]) if test -z "$with_unix_wrapper" -o "$with_unix_wrapper" = "no" -o "$with_unix_wrapper" = "yes" ; then - AC_MSG_RESULT([not set]) + AC_MSG_RESULT([not set]) else - UNIXWRAPPERNAME="$with_unix_wrapper" - AC_MSG_RESULT([$UNIXWRAPPERNAME]) + UNIXWRAPPERNAME="$with_unix_wrapper" + AC_MSG_RESULT([$UNIXWRAPPERNAME]) fi AC_SUBST(UNIXWRAPPERNAME) AC_MSG_CHECKING([whether to statically link to Gtk]) if test -n "$enable_static_gtk" && test "$enable_static_gtk" != "no"; then - ENABLE_STATIC_GTK="TRUE" - AC_MSG_RESULT([yes]) + ENABLE_STATIC_GTK="TRUE" + AC_MSG_RESULT([yes]) else - ENABLE_STATIC_GTK="FALSE" - AC_MSG_RESULT([no]) + ENABLE_STATIC_GTK="FALSE" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_STATIC_GTK) AC_MSG_CHECKING([whether to use layout dialogs]) if test -n "$enable_layout" && test "$enable_layout" != "no"; then - ENABLE_LAYOUT="TRUE" - AC_MSG_RESULT([yes]) + ENABLE_LAYOUT="TRUE" + AC_MSG_RESULT([yes]) else - ENABLE_LAYOUT="FALSE" - AC_MSG_RESULT([no]) + ENABLE_LAYOUT="FALSE" + AC_MSG_RESULT([no]) fi AC_SUBST(ENABLE_LAYOUT) @@ -8491,16 +8572,16 @@ AC_SUBST(ENABLE_LAYOUT) # =================================================================== AC_MSG_CHECKING([build verbosity]) if test -n "$enable_verbose"; then - if test "$enable_verbose" = "yes"; then - VERBOSE="TRUE" - AC_MSG_RESULT([high]) - fi - if test "$enable_verbose" = "no"; then - VERBOSE="FALSE" - AC_MSG_RESULT([low]) - fi + if test "$enable_verbose" = "yes"; then + VERBOSE="TRUE" + AC_MSG_RESULT([high]) + fi + if test "$enable_verbose" = "no"; then + VERBOSE="FALSE" + AC_MSG_RESULT([low]) + fi else - AC_MSG_RESULT([not set]) + AC_MSG_RESULT([not set]) fi AC_SUBST(VERBOSE) @@ -8509,13 +8590,13 @@ dnl Use zenity during build dnl =================================================================== AC_MSG_CHECKING([whether to use zenity during build]) if test "$enable_zenity" = "yes"; then - AC_MSG_RESULT([yes]) - AC_PATH_PROGS( ZNTY, zenity ) - if test -z "$ZNTY"; then - ENABLE_ZENITY=FALSE - else - ENABLE_ZENITY=TRUE - fi + AC_MSG_RESULT([yes]) + AC_PATH_PROGS( ZNTY, zenity ) + if test -z "$ZNTY"; then + ENABLE_ZENITY=FALSE + else + ENABLE_ZENITY=TRUE + fi else ENABLE_ZENITY=FALSE AC_MSG_RESULT([no]) @@ -8540,16 +8621,25 @@ dnl =================================================================== dnl Number of CPUs to use during the build dnl =================================================================== AC_MSG_CHECKING([for number of processors to use]) -if test "z`uname -s`" = "zDarwin" -o "z`uname -s`" = "zNetBSD" -o "z`uname -s`" = "zOpenBSD"; then - BUILD_NCPUS=`sysctl -n hw.ncpu` -else - BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l` -fi -if test "z$with_num_cpus" != "z"; then +if test -n "$with_num_cpus"; then BUILD_NCPUS=$with_num_cpus -fi -if echo "$BUILD_NCPUS" | $EGREP -q '^[[[:space:]]]*0[[[:space:]]]*$' ; then - BUILD_NCPUS=1 +else + case `uname -s` in + + Darwin|FreeBSD|NetBSD|OpenBSD) + BUILD_NCPUS=`sysctl -n hw.ncpu` + ;; + + *) + BUILD_NCPUS=`grep $'^processor\t*:' /proc/cpuinfo | wc -l` + ;; + esac + + # If we hit the catch-all case, but /proc/cpuinfo doesn't exist or has an + # unexpected format, 'wc -l' will have returned 0. + if test "$BUILD_NCPUS" -eq 0; then + BUILD_NCPUS=1 + fi fi AC_MSG_RESULT([$BUILD_NCPUS]) AC_SUBST(BUILD_NCPUS) @@ -8562,9 +8652,9 @@ BUILD_MAX_JOBS="1" if test "z$with_max_jobs" != "z"; then BUILD_MAX_JOBS="$with_max_jobs" else - if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then - BUILD_MAX_JOBS="10" - fi + if test -n "$enable_icecream" && test "$enable_icecream" != "no" ; then + BUILD_MAX_JOBS="10" + fi fi AC_MSG_RESULT([$BUILD_MAX_JOBS]) AC_SUBST(BUILD_MAX_JOBS) @@ -8575,17 +8665,17 @@ dnl =================================================================== echo "setting up the build environment variables..." if test -z "$COMPATH"; then - AC_MSG_ERROR([No compiler found.]) + AC_MSG_ERROR([No compiler found.]) fi AC_SUBST(COMPATH) AC_MSG_CHECKING([solver path]) if test -z "$with_local_solver"; then - LOCAL_SOLVER="DEFAULT" - AC_MSG_RESULT([default]) + LOCAL_SOLVER="DEFAULT" + AC_MSG_RESULT([default]) else - LOCAL_SOLVER=$with_local_solver - AC_MSG_RESULT([$with_local_solver]) + LOCAL_SOLVER=$with_local_solver + AC_MSG_RESULT([$with_local_solver]) fi AC_SUBST(LOCAL_SOLVER) @@ -8604,20 +8694,20 @@ chmod +x post_download # Generate a configuration timestamp we can use for deps if test -f set_soenv; then - mv -f set_soenv set_soenv.last + mv -f set_soenv set_soenv.last else - echo > set_soenv.last + echo > set_soenv.last fi AC_OUTPUT([set_soenv Makefile bin/repo-list]) # touch the config timestamp file set_soenv.stamp if test ! -f set_soenv.stamp; then - echo > set_soenv.stamp + echo > set_soenv.stamp elif diff set_soenv set_soenv.last >/dev/null 2>&1; then - echo "Configuration unchanged - avoiding scp2 stamp update" + echo "Configuration unchanged - avoiding scp2 stamp update" else - echo > set_soenv.stamp + echo > set_soenv.stamp fi dnl Run the set_soenv script to setup the *Env.sh script that sets |