summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in98
1 files changed, 55 insertions, 43 deletions
diff --git a/configure.in b/configure.in
index 91ff5806fbe5..928e08275213 100644
--- a/configure.in
+++ b/configure.in
@@ -550,6 +550,9 @@ AC_ARG_WITH(system-lpsolve,
AC_ARG_WITH(system-cppunit,
[ --with-system-cppunit Use cppunit already on system
],,)
+AC_ARG_WITH(system-redland,
+[ --with-system-redland Use redland library already on system
+],,)
AC_ARG_WITH(system-mozilla,
[ --with-system-mozilla Use mozilla already on system. Note that some
components cannot be built against a contemporary
@@ -1404,6 +1407,9 @@ fi
AC_MSG_RESULT($GCC_HOME)
AC_SUBST(GCC_HOME)
+save_CC=$CC
+save_CXX=$CXX
+
if test -n "$with_gcc_home"; then
if test -z "$CC"; then
CC="$with_gcc_home/bin/gcc"
@@ -1431,7 +1437,6 @@ if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; th
AC_MSG_CHECKING([the GNU gcc compiler version])
_gcc_version=`$CC -dumpversion`
_gcc_major=`echo $_gcc_version | $AWK -F. '{ print \$1 }'`
- _gcc_longver=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
GCCVER=`echo $_gcc_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
if test "$_gcc_major" -lt "3"; then
@@ -1443,7 +1448,22 @@ if test \( "$_os" != "WINNT" -o "$WITH_MINGWIN" = "yes" \) -a "$GCC" = "yes"; th
fi
fi
fi
- AC_MSG_RESULT([checked (gcc $_gcc_version)])
+ if test "$_os" = "Darwin" -a "$GCCVER" -ge "040100" ; then
+ if test -z "$save_CC" -a -x "$GCC_HOME/bin/gcc-4.0" ; then
+ CC=$GCC_HOME/bin/gcc-4.0
+ 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
@@ -2048,14 +2068,27 @@ if test "$GXX" = "yes"; then
AC_MSG_CHECKING([the GNU C++ compiler version])
_gpp_version=`$CXX -dumpversion`
- _gpp_major=`echo $_gpp_version | $AWK -F. '{ print \$1 }'`
- _gpp_minor=`echo $_gpp_version | $AWK -F. '{ print \$2 }'`
-
- AC_MSG_RESULT([checked (g++ $_gpp_version)])
+ _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_major" = "3"; then
- if test "$_gpp_minor" = "4"; then
- AC_MSG_CHECKING([whether $CXX has the enum bug])
+ 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);
@@ -2078,7 +2111,6 @@ main (void)
return 0;
}
],[AC_MSG_ERROR([your version of the GNU C++ compile has a bug which prevents OpenOffice.org 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
fi
@@ -2218,21 +2250,6 @@ if test "$_os" = "SunOS"; then
fi
fi
dnl ===================================================================
-dnl Extra checking for the DARWIN compiler
-dnl ===================================================================
-if test "$_os" = "Darwin"; then
- dnl c++ packaged with cc (gcc) for Macosx
- if test "$CC" = "cc"; then
- AC_MSG_CHECKING([Macosx c++ Compiler])
- if test "$CXX" != "c++"; then
- AC_MSG_WARN([Macosx C++ was not found])
- echo "Macosx C++ was not found" >> warn
- else
- AC_MSG_RESULT([checked])
- fi
- fi
-fi
-dnl ===================================================================
dnl Extra checking for the OSF compiler
dnl ===================================================================
if test "$_os" = "OSF1"; then
@@ -3726,26 +3743,25 @@ AC_SUBST(LIBXML_LIBS)
dnl ===================================================================
dnl Check for system python
dnl ===================================================================
+AC_MSG_CHECKING([which python to use])
if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
with_system_python=yes
-fi
-AC_MSG_CHECKING([which python to use])
-if test -n "$with_system_python" -o -n "$with_system_libs" && \
+ AC_MSG_RESULT([compiling against MacOSX10.4u.sdk (python version 2.3)])
+ PYTHON_CFLAGS="-I/Developer/SDKs/MacOSX10.4u.sdk/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3"
+ PYTHON_LIBS="-framework Python"
+elif test -n "$with_system_python" -o -n "$with_system_libs" && \
test "$with_system_python" != "no"; then
- SYSTEM_PYTHON=YES
+ with_system_python=yes
AC_MSG_RESULT([external])
AM_PATH_PYTHON([2.2])
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_CFLAGS="-I$python_include"
-
- if test "$_os" = "Darwin"; then
- PYTHON_LIBS="-framework Python"
- else
- PYTHON_LIBS="-lpython$python_version"
- fi
-
+ PYTHON_LIBS="-lpython$python_version"
+fi
+if test "$with_system_python" = "yes" ; then
+ SYSTEM_PYTHON=YES
dnl check if the headers really work:
save_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $PYTHON_CFLAGS"
@@ -5004,16 +5020,12 @@ dnl ===================================================================
dnl Check for system redland
dnl ===================================================================
AC_MSG_CHECKING([which redland library to use])
-dnl if test -n "$with_system_redland" -o -n "$with_system_libs" && \
-dnl test "$with_system_redland" != "no"; then
-dnl mst: NOTE: right now we need patches against redland
-dnl so we only enable system redland if explicitly requested
-dnl if next version includes patches, insert version check here
-if test -n "$with_system_redland" && \
+if test -n "$with_system_redland" -o -n "$with_system_libs" && \
test "$with_system_redland" != "no"; then
AC_MSG_RESULT([external])
SYSTEM_REDLAND=YES
- PKG_CHECK_MODULES(REDLAND, redland)
+ 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"