Improve error reporting when libmysqlclient or libpq are missing

fixes #7882
This commit is contained in:
Gunnar Beutner 2014-12-11 08:50:28 +01:00
parent 665ce8077f
commit a5a45ae891
3 changed files with 8 additions and 6 deletions

View File

@ -27,10 +27,10 @@ parentheses):
* GNU flex (flex) >= 2.5.35 * GNU flex (flex) >= 2.5.35
* recommended: libexecinfo on FreeBSD (automatically used when Icinga 2 is * recommended: libexecinfo on FreeBSD (automatically used when Icinga 2 is
installed via port or package) installed via port or package)
* optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian) set CMake * optional: MySQL (mysql-devel on RHEL, libmysqlclient-dev on Debian); set CMake
variable `ICINGA2_WITH_MYSQL` to enable variable `ICINGA2_WITH_MYSQL` to disable this module
* optional: PostgreSQL (postgresql-devel on RHEL, libpq-dev on Debian) set CMake * optional: PostgreSQL (postgresql-devel on RHEL, libpq-dev on Debian); set CMake
variable `ICINGA2_WITH_PGSQL` to enable variable `ICINGA2_WITH_PGSQL` to disable this module
* optional: YAJL (yajl-devel on RHEL, libyajl-dev on Debian) * optional: YAJL (yajl-devel on RHEL, libyajl-dev on Debian)
Note: RHEL5 ships an ancient flex version. Updated packages are available for Note: RHEL5 ships an ancient flex version. Updated packages are available for
@ -153,6 +153,8 @@ defaults to `CMAKE_INSTALL_PREFIX/etc/sysconfig/icinga2`
and the SysV initscript in parallel, regardless of how `USE_SYSTEMD` is set. and the SysV initscript in parallel, regardless of how `USE_SYSTEMD` is set.
Only use this for special packaging purposes and if you know what you are doing. Only use this for special packaging purposes and if you know what you are doing.
Defaults to `OFF`. Defaults to `OFF`.
- `ICINGA2_WITH_MYSQL`: Determines whether the MySQL IDO module is built; defaults to `ON`
- `ICINGA2_WITH_PGSQL`: Determines whether the PostgreSQL IDO module is built; defaults to `ON`
### Building Icinga 2 RPMs ### Building Icinga 2 RPMs

View File

@ -59,5 +59,5 @@ if(MYSQL_FOUND)
FILES_MATCHING PATTERN "*.sql" FILES_MATCHING PATTERN "*.sql"
) )
else() else()
message( FATAL_ERROR "You have selected MySQL support, but MySQL could not be found." ) message(FATAL_ERROR "You have selected MySQL support, but MySQL could not be found. You can disable the MySQL IDO module using -DICINGA2_WITH_MYSQL=OFF.")
endif() endif()

View File

@ -61,5 +61,5 @@ if(PostgreSQL_FOUND)
FILES_MATCHING PATTERN "*.sql" FILES_MATCHING PATTERN "*.sql"
) )
else() else()
message( FATAL_ERROR "You have selected PostgreSQL support, but PostgreSQL could not be found." ) message(FATAL_ERROR "You have selected PostgreSQL support, but PostgreSQL could not be found. You can disable the PostgreSQL IDO module using -DICINGA2_WITH_PGSQL=OFF.")
endif() endif()