html2text icon indicating copy to clipboard operation
html2text copied to clipboard

commit "configure: accept/ignore --foo=bar arguments" broken for some cases

Open manfredsc opened this issue 3 years ago • 0 comments

In my rpm build, configure options are quite detailed, and some of them fail to be treated by the custom configure script:

./configure --host=x86_64-suse-linux-gnu --build=x86_64-suse-linux-gnu --program-prefix= --disable-dependency-tracking --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info
[   20s] ./configure: line 25: program-prefix=: command not found
[   20s] ./configure: line 25: exec-prefix=/usr: No such file or directory

I would suggest something like the following patch:

--- html2text-2.1.1/configure.orig	2022-06-20 21:47:38.000000000 +0200
+++ html2text-2.1.1/configure	2022-07-31 00:46:53.122854804 +0200
@@ -22,6 +22,7 @@
 # line, while also accepting options
 for arg in "$@" ; do
 	case "${arg}" in
+		--*-*=*)  ;;  # arguments with "-" can't be used as variable names
 		--*=*)  eval `echo "${arg}" | sed -e 's/^--//'`  ;;
 		*=*)    eval "${arg}"  ;;
 	esac

manfredsc avatar Aug 02 '22 10:08 manfredsc