From 713b77c70e4228d8c092a7edea13572d9d4ed9be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Tue, 18 Aug 2020 16:31:20 +0200 Subject: [PATCH 1/3] Add missing support for --with-readline=yes By error, ./configure --with-readline would fail, because 'yes' wasn't handled properly in the top level case. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 0418b9fcda..a0a5460b38 100644 --- a/configure.ac +++ b/configure.ac @@ -987,7 +987,7 @@ AC_ARG_WITH([readline], AS_CASE([$with_readline], [no],[], - [auto], + [auto|yes], [PKG_CHECK_MODULES([READLINE], [libedit], [AC_DEFINE([HAVE_READLINE_LIBEDIT], [1], [Build with libedit support])], [PKG_CHECK_MODULES([READLINE], [editline], From bc1c0d2ef48c0fae1d3e7f9769e1076a42880857 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 19 Aug 2020 13:07:40 +0200 Subject: [PATCH 2/3] Make sure readline configuration works --- .gitlab-ci.yml | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9e003bf87a..60f9561efa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,6 +31,12 @@ variables: AM_COLOR_TESTS: always + WITHOUT_READLINE: "--without-readline" + WITH_READLINE: "--with-readline" + WITH_READLINE_EDITLINE: "--with-readline=editline" + WITH_READLINE_LIBEDIT: "--with-readline=libedit" + WITH_READLINE_READLINE: "--with-readline=readline" + stages: - autoconf - precheck @@ -181,6 +187,21 @@ stages: $EXTRA_CONFIGURE \ || cat config.log +.check_readline_setup: &check_readline_setup | + if [[ -n "${WITHOUT_READLINE}" ]]; then \ + ! grep "^#define HAVE_READLINE" config.h; \ + elif [[ -n "${WITH_READLINE}" ]]; then \ + grep -e "^#define HAVE_READLINE_READLINE" \ + -e "^#define HAVE_READLINE_LIBEDIT" \ + -e "^#define HAVE_READLINE_EDITLINE" config.h; \ + elif [[ -n "${WITH_READLINE_EDITLINE}" ]]; then \ + grep "^#define HAVE_READLINE_EDITLINE" config.h; \ + elif [[ -n "${WITH_READLINE_LIBEDIT}" ]]; then \ + grep "^#define HAVE_READLINE_LIBEDIT" config.h; \ + elif [[ -n "${WITH_READLINE_READLINE}" ]]; then \ + grep "^#define HAVE_READLINE_READLINE" config.h; \ + fi + .build: &build_job <<: *default_triggering_rules stage: build @@ -189,6 +210,7 @@ stages: - test -n "${OOT_BUILD_WORKSPACE}" && mkdir "${OOT_BUILD_WORKSPACE}" && cd "${OOT_BUILD_WORKSPACE}" script: - *configure + - *check_readline_setup - make -j${BUILD_PARALLEL_JOBS:-1} -k all V=1 - test -z "${RUN_MAKE_INSTALL}" || make install - test -z "${RUN_MAKE_INSTALL}" || sh util/check-make-install @@ -505,7 +527,7 @@ gcc:alpine3.12:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--enable-dnstap" + EXTRA_CONFIGURE: "--enable-dnstap ${WITHOUT_READLINE}" <<: *alpine_3_12_amd64_image <<: *build_job @@ -600,6 +622,7 @@ gcc:buster:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" + EXTRA_CONFIGURE: "${WITH_READLINE_LIBEDIT}" <<: *debian_buster_amd64_image <<: *build_job @@ -767,7 +790,7 @@ gcc:tumbleweed:amd64: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--with-libidn2 --with-gssapi=/usr/lib/mit/bin/krb5-config" + EXTRA_CONFIGURE: "--with-libidn2 --with-gssapi=/usr/lib/mit/bin/krb5-config ${WITH_READLINE_READLINE}" <<: *tumbleweed_latest_amd64_image <<: *build_job @@ -1045,6 +1068,7 @@ unit:gcc:softhsm2.6: clang:freebsd11:amd64: variables: CFLAGS: "${CFLAGS_COMMON}" + EXTRA_CONFIGURE: "${WITH_READLINE}" USER: gitlab-runner <<: *freebsd_11_amd64_image <<: *build_job @@ -1071,7 +1095,7 @@ unit:clang:freebsd11:amd64: clang:freebsd12:amd64: variables: CFLAGS: "${CFLAGS_COMMON}" - EXTRA_CONFIGURE: "--enable-dnstap" + EXTRA_CONFIGURE: "--enable-dnstap ${WITH_READLINE_EDITLINE}" USER: gitlab-runner <<: *freebsd_12_amd64_image <<: *build_job From 727272934e373999450cb7670069f70e6b921a94 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 19 Aug 2020 17:12:25 +0200 Subject: [PATCH 3/3] editline's pkg-config name is libeditline --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index a0a5460b38..d6836dccd2 100644 --- a/configure.ac +++ b/configure.ac @@ -990,7 +990,7 @@ AS_CASE([$with_readline], [auto|yes], [PKG_CHECK_MODULES([READLINE], [libedit], [AC_DEFINE([HAVE_READLINE_LIBEDIT], [1], [Build with libedit support])], - [PKG_CHECK_MODULES([READLINE], [editline], + [PKG_CHECK_MODULES([READLINE], [libeditline], [AC_DEFINE([HAVE_READLINE_EDITLINE], [1], [Build with editline support.])], [PKG_CHECK_MODULES([READLINE], [readline], [AC_DEFINE([HAVE_READLINE_READLINE], [1], [Build with readline support.])], @@ -1000,7 +1000,7 @@ AS_CASE([$with_readline], [PKG_CHECK_MODULES([READLINE], [libedit], [AC_DEFINE([HAVE_READLINE_LIBEDIT], [1], [Build with libedit support])])], [editline], - [PKG_CHECK_MODULES([READLINE], [editline], + [PKG_CHECK_MODULES([READLINE], [libeditline], [AC_DEFINE([HAVE_READLINE_EDITLINE], [1], [Build with editline support])])], [readline], [PKG_CHECK_MODULES([READLINE], [readline],