Add a way to track configuration failures with CI

Disable it for main as it's expected.

=> GAMBAS_CONFIG_FAILURE=1 ./configure
.....
checking for gb.db.postgresql headers... no
configure: WARNING: Unable to find file: postgres.h
configure: WARNING: Unable to find file: pg_type.h
checking for gb.db.postgresql libraries... /usr/lib64/
configure: error: Failed to configure gb.db.postgresql
configure: error: ./configure failed for gb.db.postgresql
This commit is contained in:
Laurent Carlier 2018-06-12 16:27:31 +02:00
parent 2239e140e5
commit a5a117fd33
2 changed files with 20 additions and 2 deletions

View File

@ -938,7 +938,11 @@ AC_DEFUN([GB_COMPONENT_PKG_CONFIG],
done
else
if test "$gb_enable_$1" = "yes" && test "x${GAMBAS_CONFIG_FAILURE}" != "x" && test "$gb_in_component_search" != "yes"; then
AC_MSG_ERROR([Failed to configure $3])
fi
else
AC_DEFINE(HAVE_$2_COMPONENT, 1, [Have $3 component])
@ -1111,7 +1115,11 @@ AC_DEFUN([GB_COMPONENT],
touch DISABLED
touch DISABLED.$3
fi
if test "$gb_enable_$1" = "yes" && test "x${GAMBAS_CONFIG_FAILURE}" != "x"; then
AC_MSG_ERROR([Failed to configure $3])
fi
fi
if test "$have_$1" = "no"; then

View File

@ -9,6 +9,11 @@ GB_MATH_FUNC
LT_INIT
AM_PROG_CC_C_O
if test "x${GAMBAS_CONFIG_FAILURE}" != "x"; then
SAVE_GAMBAS_CONFIG_FAILURE=${GAMBAS_CONFIG_FAILURE}
GAMBAS_CONFIG_FAILURE=''
fi
dnl ---- Check for internationalization library
GB_COMPONENT(
@ -76,6 +81,11 @@ dnl ---- Remove DISABLED file that could have been generated before
rm -f DISABLED DISABLED.*
if test "x${SAVE_GAMBAS_CONFIG_FAILURE}" != "x"; then
GAMBAS_CONFIG_FAILURE=${SAVE_GAMBAS_CONFIG_FAILURE}
SAVE_GAMBAS_CONFIG_FAILURE=''
fi
dnl ---- Check for the Linux inotify headers
GB_COMPONENT(