From 6197fb76b05bb9086e39076dda1b71f4096d0b49 Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Mon, 16 Jul 2018 15:54:20 +0100 Subject: [PATCH] dump configure errors if configure fails --- nginx.spec | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/nginx.spec b/nginx.spec index 225ff6e..15ea513 100644 --- a/nginx.spec +++ b/nginx.spec @@ -203,7 +203,9 @@ sed -i -e 's#PROFILE=SYSTEM#HIGH:!aNULL:!MD5#' nginx.conf # to error out. This is is also the reason for the DESTDIR environment # variable. export DESTDIR=%{buildroot} -./configure \ +# So the perl module finds its symbols: +nginx_ldopts="$RPM_LD_FLAGS -Wl,-E" +if ! ./configure \ --prefix=%{_datadir}/nginx \ --sbin-path=%{_sbindir}/nginx \ --modules-path=%{_libdir}/nginx/modules \ @@ -254,7 +256,11 @@ export DESTDIR=%{buildroot} %endif --with-debug \ --with-cc-opt="%{optflags} $(pcre-config --cflags)" \ - --with-ld-opt="$RPM_LD_FLAGS -Wl,-E" # so the perl module finds its symbols + --with-ld-opt="$nginx_ldopts"; then + : configure failed + cat objs/autoconf.err + exit 1 +fi make %{?_smp_mflags}