summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-07-13 13:58:14 +0200
committerKurt Zenker <kz@openoffice.org>2010-07-13 13:58:14 +0200
commit38521b81c68fc4e9eca535e5a6dfe82435f3fd5e (patch)
tree81056761cecdaf3b578fa06d34d5c72f96703f08 /configure.in
parent09834f7dbd7086e6bf1c360c443fe5cf12c55b53 (diff)
parent414a031eb9de5375ee55eaa204d09a8d5b8bfb5b (diff)
CWS-TOOLING: integrate CWS configure25_OOO330
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in186
1 files changed, 118 insertions, 68 deletions
diff --git a/configure.in b/configure.in
index 00a5d5dde8b5..d47a9fff448f 100644
--- a/configure.in
+++ b/configure.in
@@ -810,7 +810,9 @@ AC_ARG_WITH(build-version,
],with_build_version=$withval)
AC_ARG_WITH(alloc,
[ --with-alloc Define which allocator to build with
- (choices are oo, system, tcmalloc)
+ (choices are oo, system, tcmalloc, jemalloc)
+
+ Note that on FreeBSD/NetBSD system==jemalloc
],,)
AC_ARG_ENABLE(verbose,
[ --enable-verbose Increase build verbosity.
@@ -1430,7 +1432,7 @@ if test "$COMPATH" = "." ; then
COMPATH=`echo $COMPATH | $SED "s@/[[^/:]]*\\\$@@"`;
fi
COMPATH=`echo $COMPATH | $SED "s@/[[Bb]][[Ii]][[Nn]]\\\$@@"`;
-echo $COMPATH
+
dnl ===================================================================
dnl Test the gcc version, 3 is OK
dnl ===================================================================
@@ -2683,6 +2685,21 @@ if test "$with_alloc" = "tcmalloc"; then
[AC_MSG_ERROR(tcmalloc not found or functional. Install the Google Profiling Tools)], [])
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
+fi
if test "$with_alloc" = "internal" -o -z "$with_alloc"; then
AC_MSG_RESULT([internal])
fi
@@ -2974,7 +2991,7 @@ fi
if test "$SOLAR_JAVA" != ""; then
dnl first check if we have been asked to autodetect JAVA_HOME with a recent gij
- if test "$JDK" == "gcj" -a -z "$JAVA_HOME"; then
+ if test "$JDK" = "gcj" -a -z "$JAVA_HOME"; then
if test "x$with_jdk_home" = "x" -a "$_gij_longver" -ge "40200"; then
cat > findhome.java <<_ACEOF
[import java.io.File;
@@ -3062,7 +3079,7 @@ _ACEOF
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
-# if test "$JDK" == "gcj"; then
+# if test "$JDK" = "gcj"; then
# echo "e.g. install java-1.4.2-gcj-compat-devel and use --with-jdk-home=/usr/lib/jvm/java-1.4.2-gcj" >> warn
# fi
fi
@@ -3337,9 +3354,11 @@ msi - Windows .msi
done
if test -z "$RPM" ; then
AC_MSG_ERROR([not found])
- else
- RPM_PATH=`which $RPM`
+ elif "$RPM" --usage 2>&1 | $EGREP -- -bb >/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
@@ -3418,6 +3437,19 @@ else
fi
dnl ===================================================================
+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])
+else
+ BUILD_STAX=YES
+ AC_MSG_RESULT([yes])
+fi
+AC_SUBST(BUILD_STAX)
+
+dnl ===================================================================
dnl Check for building ODK
dnl ===================================================================
AC_MSG_CHECKING([whether to build the ODK])
@@ -3652,7 +3684,7 @@ AC_SUBST(USE_FT_EMBOLDEN)
if test -n "$with_system_libxslt" -o -n "$with_system_libs" && \
test "$with_system_libxslt" != "no"; then
if test -z "$with_system_libxml" -a -z "$with_system_libs" || \
- test "$with_system_libxml" == "no"; then
+ 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
@@ -3662,7 +3694,7 @@ fi
if test -n "$with_system_libxml" -o -n "$with_system_libs" && \
test "$with_system_libxml" != "no"; then
if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \
- test "$with_system_libxslt" == "no"; then
+ 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
@@ -3817,8 +3849,8 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
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.jar,
- [ LUCENE_CORE_JAR=/usr/share/java/lucene.jar ],
+ AC_CHECK_FILE(/usr/share/java/lucene-core.jar,
+ [ LUCENE_CORE_JAR=/usr/share/java/lucene-core.jar ],
[ AC_MSG_ERROR(lucene-core.jar replacement not found)]
)
]
@@ -3842,6 +3874,22 @@ if test -n "$with_system_lucene" -o -n "$with_system_libs" && \
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;
+ my $file = "$ENV{'LUCENE_CORE_JAR'}";
+ my $zip = Archive::Zip->new( $file );
+ my $mf = $zip->contents ( "META-INF/MANIFEST.MF" );
+ if ( $mf =~ m/Specification-Version: 2.*/ ) {
+ exit 0;
+ } else {
+ exit 1;
+ }'; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_ERROR([no, you need lucene 2])
+ fi
+
else
AC_MSG_RESULT([internal])
SYSTEM_LUCENE=NO
@@ -3979,32 +4027,32 @@ if test -n "$with_system_hsqldb" -o -n "$with_system_libs" && \
fi
AC_CHECK_FILE($HSQLDB_JAR, [],
[AC_MSG_ERROR(hsqldb.jar not found.)], [])
- AC_MSG_CHECKING([whether hsqldb is >= 1.8.0.9])
+ 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" );
- if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
- push @l, split(/\n/, $mf);
- foreach my $line (@l) {
- if ($line =~ m/Specification-Version:/) {
- ($t, $version) = split (/:/,$line);
- $version =~ s/^\s//;
- ($a, $b, $c, $d) = split (/\./,$version);
- if (($c == "0" && $d > "8") || $c > 0) {
- exit 0;
- } else {
- exit 1;
- }
- }
- }
- } else {
- exit 1;
+ if ( $mf =~ m/Specification-Version: 1.8.*/ ) {
+ push @l, split(/\n/, $mf);
+ foreach my $line (@l) {
+ if ($line =~ m/Specification-Version:/) {
+ ($t, $version) = split (/:/,$line);
+ $version =~ s/^\s//;
+ ($a, $b, $c, $d) = split (/\./,$version);
+ if ($c == "0" && $d > "8") {
+ exit 0;
+ } else {
+ exit 1;
+ }
+ }
+ }
+ } else {
+ exit 1;
}'; then
AC_MSG_RESULT([yes])
else
- AC_MSG_ERROR([no, hsqldb >= 1.8.0.9 is needed])
+ AC_MSG_ERROR([no, you need hsqldb >= 1.8.0.9 but < 1.8.1])
fi
else
AC_MSG_RESULT([internal])
@@ -4211,7 +4259,7 @@ if test -n "$with_system_boost" -o -n "$with_system_headers" && \
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_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.38)], [])
+ [AC_MSG_ERROR(boost/spirit/include/classic_core.hpp not found. install boost >= 1.36)], [])
AC_CHECK_HEADER(boost/function.hpp, [],
[AC_MSG_ERROR(boost/function.hpp not found. install boost)], [])
@@ -4428,7 +4476,7 @@ Please recompile $tmp with --enable-ldap or use --with-openldap.])
#e.g. http://fedoraproject.org/wiki/Releases/FeatureXULRunnerAPIChanges
#the plugin pkg-config etc. reverts to "mozilla-plugin" with libxul
- if test "$MOZ_FLAVOUR" == "libxul"; then
+ if test "$MOZ_FLAVOUR" = "libxul"; then
MOZ_FLAVOUR="mozilla"
fi
@@ -4689,7 +4737,7 @@ dnl Graphite
dnl ===================================================================
AC_MSG_CHECKING([whether to enable graphite support])
-if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" == "z" -o "$enable_graphite" != "no" ; then
+if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" -o "$enable_graphite" != "no" ; then
AC_MSG_RESULT([yes])
ENABLE_GRAPHITE="TRUE"
AC_MSG_CHECKING([which graphite to use])
@@ -5133,6 +5181,9 @@ if test -n "$with_system_lpsolve" -o -n "$with_system_libs" && \
SYSTEM_LPSOLVE=YES
AC_CHECK_HEADER(lpsolve/lp_lib.h, [],
[ AC_MSG_ERROR(lpsolve headers not found.)], [])
+ # some systems need this. Like Ubuntu....
+ AC_CHECK_LIB(m, floor)
+ AC_CHECK_LIB(dl, dlopen)
AC_CHECK_LIB(lpsolve55, make_lp, ,
[ AC_MSG_ERROR(lpsolve library not found or too old.)], [])
else
@@ -5446,13 +5497,11 @@ if test "$_os" = "WINNT" -a "$WITH_MINGWIN" != "yes"; then
with_asm_home="ASM_IN_PATH"
fi
fi
+ AC_MSG_RESULT([$ASM_HOME])
else
- with_asm_home="NO_ASM_HOME"
+ with_asm_home="NO_ASM_HOME"
fi
ASM_HOME="$with_asm_home"
-if test -n "$ASM_HOME"; then
- AC_MSG_RESULT([$ASM_HOME])
-fi
AC_SUBST(ASM_HOME)
dnl ===================================================================
@@ -5869,7 +5918,7 @@ else
fi
AC_SUBST(ENABLE_MEDIAWIKI)
-if test "$ENABLE_MEDIAWIKI" == "YES"; then
+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])
@@ -5899,9 +5948,9 @@ if test -n "$enable_report_builder" -a "$enable_report_builder" != "no" && test
AC_MSG_ERROR([not existing. get it (did you get the -extensions tarball?)])
fi
AC_MSG_CHECKING([which jfreereport libs to use])
- if test "$with_system_jfreereport" == "yes"; then
- SYSTEM_JFREEREPORT=YES
- AC_MSG_RESULT([external])
+ 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
@@ -6306,7 +6355,7 @@ if test "$test_kde4" = "yes" -a "$ENABLE_KDE4" = "TRUE" ; then
kde_incdirs="/usr/include $x_includes"
kde_libdirs="/usr/lib $x_libraries"
- if test "$build_cpu" == "x86_64" ; then
+ if test "$build_cpu" = "x86_64" ; then
qt_libdirs="$qt_libdirs /usr/lib64/qt4 /usr/lib64/qt /usr/lib64"
kde_libdirs="$kde_libdirs /usr/lib64 /usr/lib64/kde4"
fi
@@ -6605,27 +6654,6 @@ else
export ANT_HOME
fi
- ant_minver=1.6.0
- # update for more extensions...
- if test "$ENABLE_MEDIAWIKI" = "YES"; then
- ant_minver=1.7.0
- fi
- 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
AC_MSG_CHECKING([if $ANT works])
cat > conftest.java << EOF
public class conftest {
@@ -6706,24 +6734,46 @@ fi
AC_SUBST(ANT_LIB)
fi
+ant_minver=1.6.0
+# update for more extensions...
+if test "$ENABLE_MEDIAWIKI" = "YES"; then
+ ant_minver=1.7.0
+fi
+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) {
+ int testmethod(int a, int b) {
return a + b;
- }
+ }
}
EOF
cat > conftest.xml << EOF
<project name="conftest" default="conftest">
- <target name="conftest" depends="copytest">
+ <target name="conftest" depends="copytest">
<javac srcdir="." includes="conftest.java">
- </javac>
- </target>
+ </javac>
+ </target>
<target name="copytest">
<copy todir="confdir">
<fileset dir="confdir" includes="**/*.abc" casesensitive="yes"/>
@@ -6892,11 +6942,11 @@ AC_SUBST(ENABLE_LAYOUT)
# ===================================================================
AC_MSG_CHECKING([build verbosity])
if test -n "$enable_verbose"; then
- if test "$enable_verbose" == "yes"; then
+ if test "$enable_verbose" = "yes"; then
VERBOSE="TRUE"
AC_MSG_RESULT([high])
fi
- if test "$enable_verbose" == "no"; then
+ if test "$enable_verbose" = "no"; then
VERBOSE="FALSE"
AC_MSG_RESULT([low])
fi