Kaydet (Commit) f3f9db6d authored tarafından Andres Gomez's avatar Andres Gomez Kaydeden (comit) David Tardon

postgresql: honor --disable-openssl flag

On --disable-openssl, let's avoid linking the
bundled postgresql to OpenSSL by not passing down
--with-openssl to its configure script.

Also, configure stage will fail if krb5 or gssapi
are enabled as they need OpenSSL and, in any
case, --with-krb5 and --with-gssapi will not be
passed down to postgresql configure script.

Change-Id: Iaf7e944d1d8f6a018e949ece56f6d3881f1e8c46
Reviewed-on: https://gerrit.libreoffice.org/3333Tested-by: 's avatarLibreOffice gerrit bot <gerrit@libreoffice.org>
Reviewed-by: 's avatarDavid Tardon <dtardon@redhat.com>
Tested-by: 's avatarDavid Tardon <dtardon@redhat.com>
üst 3aa14b5a
...@@ -7731,6 +7731,13 @@ dnl =================================================================== ...@@ -7731,6 +7731,13 @@ dnl ===================================================================
if test "x$enable_postgresql_sdbc" != "xno"; then if test "x$enable_postgresql_sdbc" != "xno"; then
SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC" SCPDEFS="$SCPDEFS -DWITH_POSTGRESQL_SDBC"
if test "$with_krb5" = "yes" -a "$enable_openssl" = "no"; then
AC_MSG_ERROR([krb5 needs OpenSSL, but --disable-openssl was given.])
fi
if test "$with_gssapi" = "yes" -a "$enable_openssl" = "no"; then
AC_MSG_ERROR([GSSAPI needs OpenSSL, but --disable-openssl was given.])
fi
AC_MSG_CHECKING([PostgreSQL C interface]) AC_MSG_CHECKING([PostgreSQL C interface])
if test "$with_system_postgresql" = "yes"; then if test "$with_system_postgresql" = "yes"; then
AC_MSG_RESULT([external PostgreSQL]) AC_MSG_RESULT([external PostgreSQL])
......
...@@ -31,13 +31,14 @@ else ...@@ -31,13 +31,14 @@ else
$(call gb_ExternalProject_get_state_target,postgresql,build) : $(call gb_ExternalProject_get_state_target,postgresql,build) :
$(call gb_ExternalProject_run,build,\ $(call gb_ExternalProject_run,build,\
./configure \ ./configure \
--without-readline --disable-shared --with-openssl --with-ldap \ --without-readline --disable-shared --with-ldap \
$(if $(filter-out YES,$(DISABLE_OPENSSL)),--with-openssl) \
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \ $(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
$(if $(filter YES,$(WITH_KRB5)),--with-krb5) \ $(if $(and $(filter YES,$(WITH_KRB5)), $(filter-out YES,$(DISABLE_OPENSSL))),--with-krb5) \
$(if $(filter YES,$(WITH_GSSAPI)),--with-gssapi) \ $(if $(and $(filter YES,$(WITH_GSSAPI)), $(filter-out YES,$(DISABLE_OPENSSL))),--with-gssapi) \
CPPFLAGS="$(if $(filter NO,$(SYSTEM_OPENLDAP)),\ CPPFLAGS="$(if $(filter NO,$(SYSTEM_OPENLDAP)),\
-I$(call gb_UnpackedTarball_get_dir,openldap/include)) \ -I$(call gb_UnpackedTarball_get_dir,openldap/include)) \
$(if $(filter NO,$(SYSTEM_OPENSSL)),\ $(if $(and $(filter NO,$(SYSTEM_OPENSSL)), $(filter-out YES,$(DISABLE_OPENSSL))),\
-I$(call gb_UnpackedTarball_get_dir,openssl/include))" \ -I$(call gb_UnpackedTarball_get_dir,openssl/include))" \
$(if $(filter NO,$(SYSTEM_OPENLDAP)), \ $(if $(filter NO,$(SYSTEM_OPENLDAP)), \
LDFLAGS="-L$(OUTDIR)/lib" \ LDFLAGS="-L$(OUTDIR)/lib" \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment