From e8afce4d2db73800639a11a957502963150253c2 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Wed, 22 Jun 2022 15:12:06 +0800 Subject: [PATCH] bc: enable readline Using readline can improve line editing feature of bc, but it's not enabled by default. As readline is already installed before bc, let's pick up this improvement with no cost. --- appendices/dependencies.xml | 4 ++-- chapter08/bc.xml | 16 ++++++++++++---- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml index 3398a2950..7103c3250 100644 --- a/appendices/dependencies.xml +++ b/appendices/dependencies.xml @@ -244,7 +244,7 @@ &dependencies; - Bash, Binutils, Coreutils, GCC, Glibc, Grep, and Make + Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Readline @@ -2652,7 +2652,7 @@ &before; - Bash and Gawk + Bash, Bc, and Gawk diff --git a/chapter08/bc.xml b/chapter08/bc.xml index 9678ddd54..4493f8219 100644 --- a/chapter08/bc.xml +++ b/chapter08/bc.xml @@ -43,7 +43,7 @@ Prepare Bc for compilation: -CC=gcc ./configure --prefix=/usr -G -O3 +CC=gcc ./configure --prefix=/usr -G -O3 -r The meaning of the configure options: @@ -55,6 +55,14 @@ + + -G + + Omit parts of the test suite that won't work + without a GNU bc present. + + + -O3 @@ -63,10 +71,10 @@ - -G + -r - Omit parts of the test suite that won't work - without a GNU bc present. + Enable the use of Readline to + improve the line editing feature of bc.