diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-02-19 13:00:58 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2013-02-19 13:23:04 +0100 |
commit | 43682489c18c707bc0d5701f7f6a2df2511eeb0c (patch) | |
tree | 29577aa108839fb8b61b7f9e57c4fe10e633389b /configure.ac | |
parent | fdo#38838, ::rtl::OUString to OUString, String to OUString (diff) | |
download | core-43682489c18c707bc0d5701f7f6a2df2511eeb0c.tar.gz core-43682489c18c707bc0d5701f7f6a2df2511eeb0c.zip |
Re-Revert "simplify external module check with macro" modulo expat/clucene
This reverts commit 324d2f94749dfd94c7f09d1923310e145bb64deb.
Change-Id: I0c1c3412554de2093c9c94de89ff74a89869fa6d
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 186 |
1 files changed, 57 insertions, 129 deletions
diff --git a/configure.ac b/configure.ac index 7e7406c97670..002b24f3b509 100644 --- a/configure.ac +++ b/configure.ac @@ -7135,6 +7135,10 @@ if test "$with_system_zlib" = "auto"; then esac fi +dnl we want to use libo_CHECK_SYSTEM_MODULE here too, but OS X is too stupid +dnl and has no pkg-config for it at least on some tinderboxes, +dnl so leaving that out for now +dnl libo_CHECK_SYSTEM_MODULE([zlib],[ZLIB],[zlib]) AC_MSG_CHECKING([which zlib to use]) if test "$with_system_zlib" = "yes"; then AC_MSG_RESULT([external]) @@ -7185,15 +7189,18 @@ fi AC_SUBST(SYSTEM_JPEG) AC_SUBST([MINGW_JPEG_DLL]) + dnl =================================================================== dnl Check for system clucene dnl =================================================================== +dnl we should rather be using +dnl libo_CHECK_SYSTEM_MODULE([clucence],[CLUCENE],[liblucence-core]) here +dnl but the contibs-lib check seems tricky AC_MSG_CHECKING([which clucene to use]) if test "$with_system_clucene" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_CLUCENE=YES PKG_CHECK_MODULES(CLUCENE, libclucene-core) - AC_LANG_PUSH([C++]) save_CXXFLAGS=$CXXFLAGS save_CPPFLAGS=$CPPFLAGS @@ -7220,6 +7227,8 @@ AC_SUBST(CLUCENE_LIBS) dnl =================================================================== dnl Check for system expat dnl =================================================================== +dnl we should use libo_CHECK_SYSTEM_MODULE, but e.g. the mingw tinderbox has no +dnl proper pkg-config for it. It should really be fixed on the tinderbox though. AC_MSG_CHECKING([which expat to use]) if test "$with_system_expat" = "yes"; then AC_MSG_RESULT([external]) @@ -7227,7 +7236,7 @@ if test "$with_system_expat" = "yes"; then AC_CHECK_HEADER(expat.h, [], [AC_MSG_ERROR(expat.h not found. install expat)], []) AC_CHECK_LIB([expat], [XML_ParserCreate], [:], - [AC_MSG_RESULT(expat library not found or functional.)], []) + [AC_MSG_RESULT(expat library not found or functional.)], []) libo_MINGW_CHECK_DLL([EXPAT], [libexpat]) else AC_MSG_RESULT([internal]) @@ -7240,143 +7249,82 @@ AC_SUBST([MINGW_EXPAT_DLL]) dnl =================================================================== dnl Check for system libcdr dnl =================================================================== -AC_MSG_CHECKING([which libcdr to use]) -if test "$with_system_libcdr" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBCDR=YES - PKG_CHECK_MODULES( CDR, libcdr-0.0 >= 0.0.5 ) -elif test $_os = iOS; then - # libcdr depends on libwpd and libwpg and those are LGPL - AC_MSG_RESULT([none]) +if test $_os = iOS; then + # libcdr depends on libwpd and libwpg and those are LGPL, publishing empty flags + libo_PUBLISH_MODULE([CDR]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBCDR=NO - BUILD_TYPE="$BUILD_TYPE CDR" + libo_CHECK_SYSTEM_MODULE([libcdr],[CDR],[libcdr-0.0 >= 0.0.5]) fi +SYSTEM_LIBCDR=$SYSTEM_CDR AC_SUBST(SYSTEM_LIBCDR) -AC_SUBST(CDR_CFLAGS) -AC_SUBST(CDR_LIBS) dnl =================================================================== dnl Check for system libmspub dnl =================================================================== -AC_MSG_CHECKING([which libmspub to use]) -if test "$with_system_libmspub" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBMSPUB=YES - PKG_CHECK_MODULES( MSPUB, libmspub-0.0 ) -elif test $_os = iOS; then - # libmspub depends on libwpd and libwpg and those are LGPL - AC_MSG_RESULT([none]) +if test $_os = iOS; then + # libmspub depends on libwpd and libwpg and those are LGPL, publishing empty flags + libo_PUBLISH_MODULE([MSPUB]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBMSPUB=NO - BUILD_TYPE="$BUILD_TYPE MSPUB" + libo_CHECK_SYSTEM_MODULE([libmspub],[MSPUB],[libmspub-0.0]) fi +SYSTEM_LIBMSPUB=$SYSTEM_MSPUB AC_SUBST(SYSTEM_LIBMSPUB) -AC_SUBST(MSPUB_CFLAGS) -AC_SUBST(MSPUB_LIBS) dnl =================================================================== dnl Check for system libvisio dnl =================================================================== -AC_MSG_CHECKING([which libvisio to use]) -if test "$with_system_libvisio" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBVISIO=YES - PKG_CHECK_MODULES( VISIO, libvisio-0.0 ) -elif test $_os = iOS; then - # libvisio depends on libwpd and libwpg and those are LGPL - AC_MSG_RESULT([none]) +if test $_os = iOS; then + # libvisio depends on libwpd and libwpg and those are LGPL, publishing empty flags + libo_PUBLISH_MODULE([VISIO]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBVISIO=NO - BUILD_TYPE="$BUILD_TYPE VISIO" + libo_CHECK_SYSTEM_MODULE([libvisio],[VISIO],[libvisio-0.0]) fi +SYSTEM_LIBVISIO=$SYSTEM_VISIO AC_SUBST(SYSTEM_LIBVISIO) -AC_SUBST(VISIO_CFLAGS) -AC_SUBST(VISIO_LIBS) dnl =================================================================== dnl Check for system libcmis dnl =================================================================== -AC_MSG_CHECKING([which libcmis to use]) -if test "$with_system_libcmis" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBCMIS=YES - PKG_CHECK_MODULES( CMIS, libcmis-0.3 >= 0.3.0 ) -else - AC_MSG_RESULT([internal]) - SYSTEM_LIBCMIS=NO - BUILD_TYPE="$BUILD_TYPE CMIS" -fi +libo_CHECK_SYSTEM_MODULE([libcmis],[CMIS],[libcmis-0.3 >= 0.3.0]) +SYSTEM_LIBCMIS=$SYSTEM_CMIS AC_SUBST(SYSTEM_LIBCMIS) -AC_SUBST(CMIS_CFLAGS) -AC_SUBST(CMIS_LIBS) dnl =================================================================== dnl Check for system libwpd dnl =================================================================== -AC_MSG_CHECKING([which libwpd to use]) -if test "$with_system_libwpd" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBWPD=YES - PKG_CHECK_MODULES( WPD, libwpd-0.9 libwpd-stream-0.9 ) -elif test $_os = iOS; then - AC_MSG_RESULT([none]) +if test $_os = iOS; then + libo_PUBLISH_MODULE([WPD]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBWPD=NO - WPD_CFLAGS="-I${OUTDIR}/inc/external" - WPD_LIBS="-L${OUTDIR}/lib -lwpdlib" - BUILD_TYPE="$BUILD_TYPE WPD" + if test "$with_system_libwpd" = "no"; then + WPD_CFLAGS="-I${OUTDIR}/inc/external" + WPD_LIBS="-L${OUTDIR}/lib -lwpdlib" + fi + libo_CHECK_SYSTEM_MODULE([libwpd],[WPD],[libwpd-0.9 libwpd-stream-0.9]) fi +SYSTEM_LIBWPD=$SYSTEM_WPD AC_SUBST(SYSTEM_LIBWPD) -AC_SUBST(WPD_CFLAGS) -AC_SUBST(WPD_LIBS) dnl =================================================================== dnl Check for system lcms2 dnl =================================================================== -AC_MSG_CHECKING([which littlecms v2 to use]) if test "$with_system_lcms2" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LCMS2=YES - PKG_CHECK_MODULES( LCMS2, lcms2 ) libo_MINGW_CHECK_DLL([LCMS2], [liblcms2]) else - AC_MSG_RESULT([internal]) SYSTEM_LCMS2=NO LCMS2_LIBS="-L${OUTDIR}/lib -llcms2" LCMS2_CFLAGS="-I${WORKDIR}/UnpackedTarball/lcms2/include" if test "$GCC" = "yes"; then LCMS2_CFLAGS="${LCMS2_CFLAGS} -Wno-long-long" fi - BUILD_TYPE="$BUILD_TYPE LCMS2" fi -AC_SUBST(SYSTEM_LCMS2) -AC_SUBST(LCMS2_CFLAGS) -AC_SUBST(LCMS2_LIBS) +libo_CHECK_SYSTEM_MODULE([lcms2],[LCMS2],[lcms2]) AC_SUBST([MINGW_LCMS2_DLL]) dnl =================================================================== dnl Check for system cppunit dnl =================================================================== -AC_MSG_CHECKING([which cppunit to use]) -if test "$with_system_cppunit" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_CPPUNIT=YES - # might work for earlier, too but go sure: - PKG_CHECK_MODULES( CPPUNIT, cppunit >= 1.12.0 ) -else - AC_MSG_RESULT([internal]) - SYSTEM_CPPUNIT=NO - BUILD_TYPE="$BUILD_TYPE CPPUNIT" -fi -AC_SUBST(SYSTEM_CPPUNIT) -AC_SUBST(CPPUNIT_CFLAGS) -AC_SUBST(CPPUNIT_LIBS) +libo_CHECK_SYSTEM_MODULE([cppunit],[CPPUNIT],[cppunit >= 1.12.0]) dnl =================================================================== dnl Check whether freetype is available @@ -7397,44 +7345,32 @@ AC_SUBST(FREETYPE_LIBS) dnl =================================================================== dnl Check for system libwps dnl =================================================================== -AC_MSG_CHECKING([which libwps to use]) -if test "$with_system_libwps" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBWPS=YES - PKG_CHECK_MODULES( WPS, libwps-0.2 ) -elif test $_os = iOS; then - AC_MSG_RESULT([none]) +if test $_os = iOS; then + libo_PUBLISH_MODULE([WPS]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBWPS=NO - WPS_CFLAGS="-I${OUTDIR}/inc/external" - WPS_LIBS="-L${OUTDIR}/lib -lwpslib" - BUILD_TYPE="$BUILD_TYPE WPS" + if test "$with_system_libwps" = "no"; then + WPS_CFLAGS="-I${OUTDIR}/inc/external" + WPS_LIBS="-L${OUTDIR}/lib -lwpslib" + fi + libo_CHECK_SYSTEM_MODULE([libwps],[WPS],[libwps-0.2]) fi +SYSTEM_LIBWPS=$SYSTEM_WPS AC_SUBST(SYSTEM_LIBWPS) -AC_SUBST(WPS_CFLAGS) -AC_SUBST(WPS_LIBS) dnl =================================================================== dnl Check for system libwpg dnl =================================================================== -AC_MSG_CHECKING([which libwpg to use]) -if test "$with_system_libwpg" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBWPG=YES - PKG_CHECK_MODULES( WPG, libwpg-0.2 ) -elif test $_os = iOS; then - AC_MSG_RESULT([none]) +if test $_os = iOS; then + libo_PUBLISH_MODULE([WPD]) else - AC_MSG_RESULT([internal]) - SYSTEM_LIBWPG=NO - WPG_CFLAGS="-I${OUTDIR}/inc/external" - WPG_LIBS="-L${OUTDIR}/lib -lwpglib" - BUILD_TYPE="$BUILD_TYPE WPG" + if test "$with_system_libwpg" = "no"; then + WPG_CFLAGS="-I${OUTDIR}/inc/external" + WPG_LIBS="-L${OUTDIR}/lib -lwpglib" + fi + libo_CHECK_SYSTEM_MODULE([libwpg],[WPG],[libwpg-0.2]) fi +SYSTEM_LIBWPG=$SYSTEM_WPG AC_SUBST(SYSTEM_LIBWPG) -AC_SUBST(WPG_CFLAGS) -AC_SUBST(WPG_LIBS) dnl =================================================================== dnl Check whether freetype2 supports emboldening @@ -9117,24 +9053,16 @@ fi AC_SUBST(SYSTEM_LPSOLVE) AC_SUBST([MINGW_LPSOLVE_DLL]) + + dnl =================================================================== dnl Checking for libexttextcat dnl =================================================================== -AC_MSG_CHECKING([which libexttextcat to use]) +libo_CHECK_SYSTEM_MODULE([libexttextcat],[LIBEXTTEXTCAT],[libexttextcat >= 3.1.1]) if test "$with_system_libexttextcat" = "yes"; then - AC_MSG_RESULT([external]) - SYSTEM_LIBEXTTEXTCAT=YES - PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1]) SYSTEM_LIBEXTTEXTCAT_DATA=file://`$PKG_CONFIG --variable=pkgdatadir libexttextcat` -else - AC_MSG_RESULT([internal]) - SYSTEM_LIBEXTTEXTCAT=NO - BUILD_TYPE="$BUILD_TYPE LIBEXTTEXTCAT" fi -AC_SUBST(SYSTEM_LIBEXTTEXTCAT) AC_SUBST(SYSTEM_LIBEXTTEXTCAT_DATA) -AC_SUBST(LIBEXTTEXTCAT_CFLAGS) -AC_SUBST(LIBEXTTEXTCAT_LIBS) dnl *************************************** dnl testing libc version for Linux... |