From f8d64ffd4a2ee3f6b3340a2bbac21eb7d2b4551c Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Mon, 7 Nov 2011 16:58:52 +0100 Subject: [PATCH] configure: refactor system-libs checks: * initialze with_system variables in AC_ARG_WITH * do not interpret --without-system-libs as --with-system-libs --- configure.in | 377 ++++++++++++++++++++++++++------------------------- 1 file changed, 196 insertions(+), 181 deletions(-) diff --git a/configure.in b/configure.in index 1a9f331ef8ba..0f81959800c7 100644 --- a/configure.in +++ b/configure.in @@ -800,11 +800,6 @@ AC_ARG_WITH(gnu-cp, [Specify location of GNU cp on Solaris or FreeBSD.]), ,) -AC_ARG_WITH(system-graphite, - AS_HELP_STRING([--with-system-graphite], - [Use graphite library already installed on system.]), -,) - AC_ARG_WITH(external-tar, AS_HELP_STRING([--with-external-tar=], [Specify path to tarfiles manually.]), @@ -897,20 +892,45 @@ AC_ARG_WITH(package-format, installed, msi. Example: --with-package-format="deb dmg"]), ,) +AC_ARG_WITH(system-libs, + AS_HELP_STRING([--with-system-libs], + [Use libraries already on system -- enables all --with-system-* flags except + mozilla.]), +,) + +AC_ARG_WITH(system-headers, + AS_HELP_STRING([--with-system-headers], + [Use headers already on system -- enables all --with-system-* flags for + external packages whose headers are the only entities used i.e. + boost/vigra/odbc/sane/xrender-header(s).]), +,) + +AC_ARG_WITH(system-jars, + AS_HELP_STRING([--without-system-jars], + [When building with --with-system-libs, also the needed jars are expected + on the system. Use this to disable that (except for the db case where + --with-system-db *has to* imply using the db.jar from there, too).]), +,) + AC_ARG_WITH(system-stdlibs, AS_HELP_STRING([--with-system-stdlibs], - [Use libstdc++/libgcc_s already on system.]), -,) + [Use libstdc++/libgcc_s already on system.]),, + [test -n "$with_system_libs" && with_system_stdlibs="$with_system_libs"]) AC_ARG_WITH(system-cairo, AS_HELP_STRING([--with-system-cairo], - [Use Cairo libraries already on system.]), -,) + [Use Cairo libraries already on system.]),, + [test -n "$with_system_libs" && with_system_cairo="$with_system_libs"]) + +AC_ARG_WITH(system-graphite, + AS_HELP_STRING([--with-system-graphite], + [Use graphite library already installed on system.]),, + [test -n "$with_system_libs" && with_system_graphite="$with_system_libs"]) AC_ARG_WITH(system-nss, AS_HELP_STRING([--with-system-nss], - [Use NSS/nspr libraries already on system.]), -,) + [Use NSS/nspr libraries already on system.]),, + [test -n "$with_system_libs" && with_system_nss="$with_system_libs"]) AC_ARG_WITH(mozilla-version, AS_HELP_STRING([--with-mozilla-version], @@ -951,95 +971,98 @@ AC_ARG_WITH(external-thes-dir, [Specify external thesaurus dir.]), ,) -AC_ARG_WITH(system-libs, - AS_HELP_STRING([--with-system-libs], - [Use libraries already on system -- enables all --with-system-* flags except - mozilla.]), -,) - -AC_ARG_WITH(system-headers, - AS_HELP_STRING([--with-system-headers], - [Use headers already on system -- enables all --with-system-* flags for - external packages whose headers are the only entities used i.e. - boost/vigra/odbc/sane/xrender-header(s).]), -,) - -AC_ARG_WITH(system-jars, - AS_HELP_STRING([--without-system-jars], - [When building with --with-system-libs, also the needed jars are expected - on the system. Use this to disable that (except for the db case where - --with-system-db *has to* imply using the db.jar from there, too).]), -,) - AC_ARG_WITH(system-zlib, AS_HELP_STRING([--with-system-zlib], - [Use zlib already on system.]), -,) + [Use zlib already on system.]),, + [if test "$_os" != "WINNT"; then + with_system_zlib=yes + else + if test -n "$with_system_libs"; then + with_system_zlib="$with_system_libs"; + fi + fi]) AC_ARG_WITH(system-openssl, AS_HELP_STRING([--with-system-openssl], - [Use OpenSSL already on system.]), -,) + [Use OpenSSL already on system.]),, + [test -n "$with_system_libs" && with_system_openssl="$with_system_libs"]) AC_ARG_WITH(system-jpeg, AS_HELP_STRING([--with-system-jpeg], - [Use jpeg already on system.]), -,) + [Use jpeg already on system.]),, + [if test "$_os" = "Linux"; then + with_system_jpeg=yes + else + if test -n "$with_system_libs"; then + with_system_jpeg="$with_system_libs"; + fi + fi]) AC_ARG_WITH(system-expat, AS_HELP_STRING([--with-system-expat], - [Use expat already on system.]), -,) + [Use expat already on system.]),, + [test -n "$with_system_libs" && with_system_expat="$with_system_libs"]) AC_ARG_WITH(system-libcmis, AS_HELP_STRING([--with-system-libcmis], - [Use libcmis already on system.]), -,) + [Use libcmis already on system.]),, + [test -n "$with_system_libs" && with_system_libcmis="$with_system_libs"]) AC_ARG_WITH(system-libvisio, AS_HELP_STRING([--with-system-libvisio], - [Use libvisio already on system.]), -,) + [Use libvisio already on system.]),, + [test -n "$with_system_libs" && with_system_libvisio="$with_system_libs"]) AC_ARG_WITH(system-libwpd, AS_HELP_STRING([--with-system-libwpd], - [Use libwpd already on system.]), -,) + [Use libwpd already on system.]),, + [test -n "$with_system_libs" && with_system_libwpd="$with_system_libs"]) AC_ARG_WITH(system-libwps, AS_HELP_STRING([--with-system-libwps], - [Use libwps already on system.]), -,) + [Use libwps already on system.]),, + [test -n "$with_system_libs" && with_system_libwps="$with_system_libs"]) AC_ARG_WITH(system-libwpg, AS_HELP_STRING([--with-system-libwpg], - [Use libwpg already on system.]), -,) + [Use libwpg already on system.]),, + [test -n "$with_system_libs" && with_system_libwpg="$with_system_libs"]) AC_ARG_WITH(system-libxml, AS_HELP_STRING([--with-system-libxml], - [Use libxml already on system.]), -,) + [Use libxml already on system.]),, + [if test "$_os" = "Darwin" -o $_os = "iOS"; then + with_system_libxml=yes + else + if test -n "$with_system_libs"; then + with_system_libxml="$with_system_libs"; + fi + fi]) AC_ARG_WITH(system-icu, AS_HELP_STRING([--with-system-icu], - [Use icu already on system.])) + [Use icu already on system.]),, + [test -n "$with_system_libs" && with_system_icu="$with_system_libs"]) AC_ARG_WITH(system-poppler, AS_HELP_STRING([--with-system-poppler], - [Use system poppler. (only needed for pdfimport extension)])) + [Use system poppler. (only needed for pdfimport extension)]),, + [test -n "$with_system_libs" && with_system_poppler="$with_system_libs"]) AC_ARG_WITH(system-db, AS_HELP_STRING([--with-system-db], - [Use Berkeley db already on system.])) + [Use Berkeley db already on system.]),, + [test -n "$with_system_libs" && with_system_db="$with_system_libs"]) AC_ARG_WITH(system-lucene, AS_HELP_STRING([--with-system-lucene], - [Use Lucene already on system.])) + [Use Lucene already on system.]),, + [test -n "$with_system_jars" && with_system_lucene="$with_system_jars"]) AC_ARG_WITH(system-apache-commons, AS_HELP_STRING([--with-system-apache-commons], - [Use Apache commons libraries already on system.])) + [Use Apache commons libraries already on system.]),, + [test -n "$with_system_jars" && with_system_apache_commons="$with_system_jars"]) AC_ARG_WITH(lucene-core-jar, AS_HELP_STRING([--with-lucene-core-jar=JARFILE], @@ -1054,7 +1077,8 @@ AC_ARG_WITH(lucene-analyzers-jar, AC_ARG_WITH(system-mysql, AS_HELP_STRING([--with-system-mysql], [Use MySQL libraries already on system, for building the MySQL Connector/LibreOffice - extension. Requires MYSQLCONFIG to point to the mysql_config executable.])) + extension. Requires MYSQLCONFIG to point to the mysql_config executable.]),, + [test -n "$with_system_libs" && with_system_mysql="$with_system_libs"]) AC_ARG_WITH(libmysql-path, AS_HELP_STRING([--with-libmysql-path], @@ -1068,11 +1092,13 @@ AC_ARG_WITH(libmysql-path, AC_ARG_WITH(system-mysql-cppconn, AS_HELP_STRING([--with-system-mysql-cppconn], - [Use MySQL C++ Connector libraries already on system.])) + [Use MySQL C++ Connector libraries already on system.]),, + [test -n "$with_system_libs" && with_system_mysql_cppconn="$with_system_libs"]) AC_ARG_WITH(system-hsqldb, AS_HELP_STRING([--with-system-hsqldb], - [Use hsqldb already on system.])) + [Use hsqldb already on system.]),, + [test -n "$with_system_jars" && with_system_hsqldb="$with_system_jars"]) AC_ARG_WITH(hsqldb-jar, AS_HELP_STRING([--with-hsqldb-jar=JARFILE], @@ -1081,7 +1107,8 @@ AC_ARG_WITH(hsqldb-jar, AC_ARG_WITH(system-beanshell, AS_HELP_STRING([--with-system-beanshell], - [Use beanshell already on system.])) + [Use beanshell already on system.]),, + [test -n "$with_system_jars" && with_system_beanshell="$with_system_jars"]) AC_ARG_WITH(beanshell-jar, AS_HELP_STRING([--with-beanshell-jar=JARFILE], @@ -1108,6 +1135,11 @@ AC_ARG_WITH(commons-logging-jar, [Specify path to jarfile manually.]), COMMONS_LOGGING_JAR=$withval) +AC_ARG_WITH(system-servlet-api, + AS_HELP_STRING([--with-system-servlet-api], + [Use servlet-api already on system.]),, + [test -n "$with_system_jars" && with_system_servlet_api="$with_system_jars"]) + AC_ARG_WITH(servlet-api-jar, AS_HELP_STRING([--with-servlet-api-jar=JARFILE], [Specify path to jarfile manually.]), @@ -1115,7 +1147,8 @@ AC_ARG_WITH(servlet-api-jar, AC_ARG_WITH(system-jfreereport, AS_HELP_STRING([--with-system-jfreereport], - [Use JFreeReport already on system.])) + [Use JFreeReport already on system.]),, + [test -n "$with_system_jars" && with_system_jfreereport="$with_system_jars"]) AC_ARG_WITH(sac-jar, AS_HELP_STRING([--with-sac-jar=JARFILE], @@ -1179,7 +1212,8 @@ AC_ARG_WITH(libbase-jar, AC_ARG_WITH(system-saxon, AS_HELP_STRING([--with-system-saxon], - [Use saxon already on system.])) + [Use saxon already on system.]),, + [test -n "$with_system_jars" && with_system_saxon="$with_system_jars"]) AC_ARG_WITH(saxon-jar, AS_HELP_STRING([--with-saxon-jar=JARFILE], @@ -1188,71 +1222,100 @@ AC_ARG_WITH(saxon-jar, AC_ARG_WITH(system-libxslt, AS_HELP_STRING([--with-system-libxslt], - [Use libxslt already on system.])) + [Use libxslt already on system.]), + [if test "$_os" = "Darwin"; then + with_system_libxslt=yes + else + if test -n "$with_system_libs"; then + with_system_libxslt="$with_system_libs"; + fi + fi]) AC_ARG_WITH(system-odbc, AS_HELP_STRING([--with-system-odbc], - [Use the odbc headers already on system.])) + [Use the odbc headers already on system.]),, + [test -n "$with_system_headers" && with_system_odbc="$with_system_headers"]) AC_ARG_WITH(system-sane, AS_HELP_STRING([--with-system-sane], - [Use sane.h already on system.])) + [Use sane.h already on system.]),, + [test -n "$with_system_headers" && with_system_sane="$with_system_headers"]) AC_ARG_WITH(system-xrender-headers, AS_HELP_STRING([--with-system-xrender-headers], - [Use XRender headers already on system.])) + [Use XRender headers already on system.]), + [test -n "$with_system_headers" && with_system_xrender_headers="$with_system_headers"]) AC_ARG_WITH(system-mesa-headers, AS_HELP_STRING([--with-system-mesa-headers], - [Use Mesa headers already on system.])) + [Use Mesa headers already on system.]),, + [test -n "$with_system_headers" && with_system_mesa_headers="$with_system_headers"]) AC_ARG_WITH(system-curl, AS_HELP_STRING([--with-system-curl], - [Use curl already on system.])) + [Use curl already on system.]),, + [if test "$_os" = "Darwin"; then + with_system_curl=yes + else + if test -n "$with_system_libs"; then + with_system_curl="$with_system_libs"; + fi + fi]) AC_ARG_WITH(system-boost, AS_HELP_STRING([--with-system-boost], - [Use boost already on system.])) + [Use boost already on system.]),, + [test -n "$with_system_headers" && with_system_boost="$with_system_headers"]) AC_ARG_WITH(system-mdds, AS_HELP_STRING([--with-system-mdds], - [Use mdds already on system.])) + [Use mdds already on system.]),, + [test -n "$with_system_headers" && with_system_mdds="$with_system_headers"]) AC_ARG_WITH(system-vigra, AS_HELP_STRING([--with-system-vigra], - [Use vigra already on system.])) + [Use vigra already on system.]),, + [test -n "$with_system_headers" && with_system_vigra="$with_system_headers"]) AC_ARG_WITH(system-neon, AS_HELP_STRING([--with-system-neon], - [Use neon already on system.])) + [Use neon already on system.]),, + [test -n "$with_system_libs" && with_system_neon="$with_system_libs"]) AC_ARG_WITH(system-hunspell, AS_HELP_STRING([--with-system-hunspell], - [Use libhunspell already on system.])) + [Use libhunspell already on system.]),, + [test -n "$with_system_libs" && with_system_hunspell="$with_system_libs"]) AC_ARG_WITH(system-mythes, AS_HELP_STRING([--with-system-mythes], - [Use mythes already on system.])) + [Use mythes already on system.]),, + [test -n "$with_system_libs" && with_system_mythes="$with_system_libs"]) AC_ARG_WITH(system-altlinuxhyph, AS_HELP_STRING([--with-system-altlinuxhyph], - [Use ALTLinuxhyph already on system.])) + [Use ALTLinuxhyph already on system.]),, + [test -n "$with_system_libs" && with_system_altlinuxhyph="$with_system_libs"]) AC_ARG_WITH(system-lpsolve, AS_HELP_STRING([--with-system-lpsolve], - [Use lpsolve already on system.])) + [Use lpsolve already on system.]),, + [test -n "$with_system_libs" && with_system_lpsolve="$with_system_libs"]) AC_ARG_WITH(system-libexttextcat, AS_HELP_STRING([--with-system-libexttextcat], - [Use libexttextcat already on system.])) + [Use libexttextcat already on system.]),, + [test -n "$with_system_libs" && with_system_libexttextcat="$with_system_libs"]) AC_ARG_WITH(system-cppunit, AS_HELP_STRING([--with-system-cppunit], - [Use cppunit already on system.])) + [Use cppunit already on system.]),, + [test -n "$with_system_libs" && with_system_cppunit="$with_system_libs"]) AC_ARG_WITH(system-redland, AS_HELP_STRING([--with-system-redland], - [Use redland library already on system.])) + [Use redland library already on system.]),, + [test -n "$with_system_libs" && with_system_redland="$with_system_libs"]) AC_ARG_WITH(system-mozilla, AS_HELP_STRING([--with-system-mozilla], @@ -1265,11 +1328,13 @@ WITH_SYSTEM_MOZILLA=no) AC_ARG_WITH(system-gettext, AS_HELP_STRING([--with-system-gettext], - [Use gettext runtime library already on system.])) + [Use gettext runtime library already on system.]),, + [test -n "$with_system_libs" && with_system_gettext="$with_system_libs"]) AC_ARG_WITH(system-libpng, AS_HELP_STRING([--with-system-libpng], - [Use libpng already on system.])) + [Use libpng already on system.]),, + [test -n "$with_system_libs" && with_system_libpng="$with_system_libs"]) AC_ARG_WITH(linker-hash-style, AS_HELP_STRING([--with-linker-hash-style], @@ -4569,8 +4634,7 @@ dnl =================================================================== 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 +if test "$with_system_stdlibs" = "yes"; then AC_MSG_RESULT([no]) SYSTEM_STDLIBS=YES else @@ -4583,9 +4647,7 @@ dnl =================================================================== 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" && \ - test "$with_system_zlib" != "no"; then +if test "$with_system_zlib" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_ZLIB=YES AC_CHECK_HEADER(zlib.h, [], @@ -4603,9 +4665,7 @@ dnl =================================================================== dnl Check for system jpeg dnl =================================================================== AC_MSG_CHECKING([which jpeg to use]) -if test -n "$with_system_jpeg" -o -n "$with_system_libs" -o \ - "$_os" = "Linux" && \ - test "$with_system_jpeg" != "no"; then +if test "$with_system_jpeg" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_JPEG=YES AC_CHECK_HEADER(jpeglib.h, [], @@ -4623,8 +4683,7 @@ dnl =================================================================== dnl Check for system expat dnl =================================================================== AC_MSG_CHECKING([which expat to use]) -if test -n "$with_system_expat" -o -n "$with_system_libs" && \ - test "$with_system_expat" != "no"; then +if test "$with_system_expat" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_EXPAT=YES AC_CHECK_HEADER(expat.h, [], @@ -4643,8 +4702,7 @@ dnl =================================================================== dnl Check for system libvisio dnl =================================================================== AC_MSG_CHECKING([which libvisio to use]) -if test -n "$with_system_libvisio" -o -n "$with_system_libs" && \ - test "$with_system_libvisio" != "no"; then +if test "$with_system_libvisio" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBVISIO=YES PKG_CHECK_MODULES( VISIO, libvisio-0.0 ) @@ -4661,8 +4719,7 @@ dnl =================================================================== dnl Check for system libcmis dnl =================================================================== AC_MSG_CHECKING([which libcmis to use]) -if test -n "$with_system_libcmis" -o -n "$with_system_libs" && \ - test "$with_system_libcmis" != "no"; then +if test "$with_system_libcmis" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBCMIS=YES PKG_CHECK_MODULES( LIBCMIS, libcmis-0.2 ) @@ -4680,8 +4737,7 @@ dnl =================================================================== dnl Check for system libwpd dnl =================================================================== AC_MSG_CHECKING([which libwpd to use]) -if test -n "$with_system_libwpd" -o -n "$with_system_libs" && \ - test "$with_system_libwpd" != "no"; then +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 ) @@ -4698,8 +4754,7 @@ 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" && \ - test "$with_system_cppunit" != "no"; then +if test "$with_system_cppunit" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_CPPUNIT=YES # might work for earlier, too but go sure: @@ -4727,8 +4782,7 @@ dnl =================================================================== dnl Check for system libwps dnl =================================================================== AC_MSG_CHECKING([which libwps to use]) -if test -n "$with_system_libwps" -o -n "$with_system_libs" && \ - test "$with_system_libwps" != "no"; then +if test "$with_system_libwps" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBWPS=YES PKG_CHECK_MODULES( WPS, libwps-0.2 ) @@ -4745,8 +4799,7 @@ dnl =================================================================== dnl Check for system libwpg dnl =================================================================== AC_MSG_CHECKING([which libwpg to use]) -if test -n "$with_system_libwpg" -o -n "$with_system_libs" && \ - test "$with_system_libwpg" != "no"; then +if test "$with_system_libwpg" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBWPG=YES PKG_CHECK_MODULES( WPG, libwpg-0.2 ) @@ -4776,20 +4829,16 @@ if test "$test_freetype" = "yes"; then fi 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 +if test "$with_system_libxslt" = "yes"; then + if test "$with_system_libxml" != "yes"; 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 - if test -z "$with_system_libxslt" -a -z "$with_system_libs" || \ - test "$with_system_libxslt" = "no"; then +if test "$with_system_libxml" = "yes"; then + if test "$with_system_libxslt" != "yes"; 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 @@ -4801,9 +4850,7 @@ fi # Check for system libxslt # =================================================================== 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 +if test "$with_system_libxslt" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBXSLT=YES if test "$_os" = "Darwin"; then @@ -4843,9 +4890,7 @@ AC_SUBST(XSLTPROC) # Check for system libxml # =================================================================== 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 +if test "$with_system_libxml" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBXML=YES if test "$_os" = "Darwin"; then @@ -5050,8 +5095,7 @@ dnl =================================================================== dnl Check for system Berkeley db dnl =================================================================== AC_MSG_CHECKING([which db to use]) -if test -n "$with_system_db" -o -n "$with_system_libs" && \ - test "$with_system_db" != "no"; then +if test "$with_system_db" = "yes"; then SYSTEM_DB=YES AC_MSG_RESULT([external]) @@ -5114,8 +5158,7 @@ dnl Check for system lucene dnl =================================================================== if test "$with_java" != "no"; then 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 +if test "$with_system_lucene" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LUCENE=YES if test -z $LUCENE_CORE_JAR; then @@ -5196,8 +5239,7 @@ if test "$ENABLE_MYSQLC" = "YES"; then 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 + if test "$with_system_mysql" = "yes"; then AC_MSG_RESULT([external MySQL]) SYSTEM_MYSQL=YES AC_PATH_PROG( MYSQLCONFIG, mysql_config) @@ -5248,8 +5290,7 @@ if test "$ENABLE_MYSQLC" = "YES"; then # 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 + if test "$with_system_mysql_cppconn" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_MYSQL_CPPCONN=YES AC_LANG_PUSH([C++]) @@ -5295,8 +5336,7 @@ dnl Check for system hsqldb dnl =================================================================== if test "$with_java" != "no"; then 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 +if test "$with_system_hsqldb" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_HSQLDB=YES if test -z $HSQLDB_JAR; then @@ -5345,8 +5385,7 @@ dnl Check for system beanshell dnl =================================================================== if test "$with_java" != "no"; then 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 +if test "$with_system_beanshell" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_BSH=YES if test -z $BSH_JAR; then @@ -5369,8 +5408,7 @@ dnl Check for system saxon dnl =================================================================== if test "$with_java" != "no"; then 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 +if test "$with_system_saxon" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_SAXON=YES if test -z $SAXON_JAR; then @@ -5478,12 +5516,8 @@ fi dnl =================================================================== dnl Check for system curl dnl =================================================================== -if test "$_os" = "Darwin" -a "$with_system_curl" != "no"; then - 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 +if test "$with_system_curl" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_CURL=YES @@ -5535,8 +5569,7 @@ dnl =================================================================== 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 +if test "$with_system_boost" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_BOOST=YES AC_LANG_PUSH([C++]) @@ -5575,8 +5608,7 @@ dnl =================================================================== 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 +if test "$with_system_mdds" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_MDDS=YES @@ -5640,8 +5672,7 @@ dnl =================================================================== 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 +if test "$with_system_vigra" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_VIGRA=YES AC_LANG_PUSH([C++]) @@ -5659,8 +5690,7 @@ dnl =================================================================== 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 +if test "$with_system_odbc" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_ODBC_HEADERS=YES @@ -5951,8 +5981,7 @@ dnl Check for system NSS only with xmlsec or mozilla build enabled dnl =================================================================== if test "x$enable_xmlsec" != "xno" -o "x$enable_mozilla" = "xyes"; then AC_MSG_CHECKING([which NSS to use]) -if test -n "$with_system_nss" -o -n "$with_system_headers" && \ - test "$with_system_nss" != "no"; then +if test "$with_system_nss" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_NSS="YES" PKG_CHECK_MODULES(NSS, nss >= 3.9.3 nspr >= 4.8) @@ -5993,8 +6022,7 @@ dnl =================================================================== dnl Check for system sane dnl =================================================================== AC_MSG_CHECKING([which sane header to use]) -if test -n "$with_system_sane" -o -n "$with_system_headers" && \ - test "$with_system_sane" != "no"; then +if test "$with_system_sane" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_SANE_HEADER=YES AC_CHECK_HEADER(sane/sane.h, [], @@ -6017,8 +6045,7 @@ ICU_MINOR= ICU_MICRO= ICU_RECLASSIFIED_CLOSE_PARENTHESIS= AC_MSG_CHECKING([which icu to use]) -if test -n "$with_system_icu" -o -n "$with_system_libs" && \ - test "$with_system_icu" != "no"; then +if test "$with_system_icu" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_ICU=YES AC_LANG_PUSH([C++]) @@ -6089,8 +6116,7 @@ if test "$_os" = "WINNT" -o "$_os" = "Linux" && test "z$enable_graphite" = "z" - AC_MSG_RESULT([yes]) ENABLE_GRAPHITE="TRUE" AC_MSG_CHECKING([which graphite to use]) - if test -n "$with_system_graphite" -o -n "$with_system_libs" && \ - test "$with_system_graphite" != "no"; then + if test "$with_system_graphite" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_GRAPHITE=YES PKG_CHECK_MODULES( GRAPHITE, graphite2 >= 0.9.3 ) @@ -6213,8 +6239,7 @@ else 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 +if test "$with_system_xrender_headers" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_XRENDER_HEADERS=YES AC_CHECK_HEADER(X11/extensions/Xrender.h, [], @@ -6276,8 +6301,7 @@ dnl =================================================================== 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 +if test "$with_system_neon" = "yes"; 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'`" @@ -6305,8 +6329,7 @@ if test "$_os" = "Darwin" -o "$_os" = "NetBSD" -o "$_os" = "OpenBSD" -o \ with_system_openssl=yes fi AC_MSG_CHECKING([which libssl to use]) -if test -n "$with_system_openssl" -o -n "$with_system_libs" && \ - test "$with_system_openssl" != "no"; then +if test "$with_system_openssl" = "yes"; then AC_MSG_RESULT([external]) # Mac OS builds should get out without extra stuff is the Mac porters' # wish. And pkg-config is although Xcode ships a .pc for openssl @@ -6332,8 +6355,7 @@ dnl =================================================================== 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 +if test "$with_system_redland" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_REDLAND=YES dnl versions before 1.0.8 write RDF/XML that is useless for ODF (@xml:base) @@ -6352,8 +6374,7 @@ dnl =================================================================== 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 +if test "$with_system_hunspell" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_HUNSPELL=YES AC_LANG_PUSH([C++]) @@ -6383,8 +6404,7 @@ dnl =================================================================== 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 +if test "$with_system_altlinuxhyph" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_HYPH=YES AC_CHECK_HEADER(hyphen.h, [], @@ -6415,8 +6435,7 @@ dnl =================================================================== 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 +if test "$with_system_mythes" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_MYTHES=YES AC_LANG_PUSH([C++]) @@ -6449,8 +6468,7 @@ dnl =================================================================== 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 +if test "$with_system_lpsolve" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LPSOLVE=YES AC_CHECK_HEADER(lpsolve/lp_lib.h, [], @@ -6472,8 +6490,7 @@ dnl =================================================================== dnl Checking for libexttextcat dnl =================================================================== AC_MSG_CHECKING([which libexttextcat to use]) -if test -n "$with_system_libexttextcat" -o -n "$with_system_libs" && \ - test "$with_system_libexttextcat" != "no"; then +if test "$with_system_libexttextcat" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_LIBEXTTEXTCAT=YES PKG_CHECK_MODULES([LIBEXTTEXTCAT], [libexttextcat >= 3.1.1]) @@ -6855,7 +6872,7 @@ 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" + echo "System cairo required for gtk3 support, please use --with-system-cairo" fi PKG_CHECK_MODULES(GTK3, gtk+-3.0 >= 3.2 cairo, ENABLE_GTK3="TRUE", ENABLE_GTK3="") if test "x$ENABLE_GTK3" = "xTRUE"; then @@ -7061,8 +7078,7 @@ else 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 + if test "$with_system_mesa_headers" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_MESA_HEADERS=YES AC_LANG_PUSH(C) @@ -7121,8 +7137,7 @@ if test "x$enable_ext_pdfimport" != "xno" -a "x$enable_extension_integration" != dnl Check for system poppler dnl =================================================================== AC_MSG_CHECKING([which pdf backend to use]) - if test -n "$with_system_poppler" -o -n "$with_system_libs" && \ - test "$with_system_poppler" != "no"; then + if test "$with_system_poppler" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_POPPLER=YES PKG_CHECK_MODULES( POPPLER, poppler >= 0.8.0 ) @@ -7175,7 +7190,7 @@ 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 + if test "$with_system_servlet_api" = "yes"; then AC_MSG_RESULT([external]) SYSTEM_SERVLETAPI=YES if test -z "$SERVLETAPI_JAR"; then @@ -7198,7 +7213,7 @@ if test "$enable_ext_report_builder" != "no" -a "x$enable_extension_integration" ENABLE_REPORTBUILDER=YES AC_MSG_CHECKING([for reportbuilder module]) AC_MSG_CHECKING([which jfreereport libs to use]) - if test "$with_system_jfreereport" = "yes" -o "x$with_system_jars" = "xyes"; then + if test "$with_system_jfreereport" = "yes"; then SYSTEM_JFREEREPORT=YES AC_MSG_RESULT([external]) if test -z $SAC_JAR; then @@ -7389,7 +7404,7 @@ AC_SUBST(LIBSERIALIZER_JAR) # commons-logging if test "$ENABLE_MEDIAWIKI" = "YES" -o "$ENABLE_REPORTBUILDER" = "YES"; then AC_MSG_CHECKING([which Apache commons-* libs to use]) - if test "x$with_system_apache_commons" = "xyes" -o "x$with_system_jars" = "xyes"; then + if test "$with_system_apache_commons" = "yes"; then SYSTEM_APACHE_COMMONS=YES AC_MSG_RESULT([external]) if test "$ENABLE_MEDIAWIKI" = "YES"; then @@ -8537,7 +8552,7 @@ 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 +if test "$with_system_cairo" = "yes"; then SYSTEM_CAIRO=YES AC_MSG_RESULT([yes]) @@ -8643,7 +8658,7 @@ dnl =================================================================== AC_MSG_CHECKING([whether to use the system gettext runtime]) -if test "$with_system_gettext" = yes -o \( "$with_system_libs" = yes -a "$with_system_gettext" != no \); then +if test "$with_system_gettext" = yes; then SYSTEM_GETTEXT=YES AC_MSG_RESULT([yes]) else @@ -8751,7 +8766,7 @@ dnl How should and does this interact with the checks for libpng dnl related to use of libpng in the quickstarter above? This needs to dnl be unified. -if test "$with_system_libpng" = yes -o \( "$with_system_libs" = yes -a "$with_system_libpng" != no \); then +if test "$with_system_libpng" = yes; then SYSTEM_LIBPNG=YES AC_MSG_RESULT([yes]) else