Skip to content

Wrap CXXFLAGS test with double quotes in configure.ac#160

Merged
gansm merged 1 commit intogansm:mainfrom
frankdean:fix-configure
Feb 17, 2026
Merged

Wrap CXXFLAGS test with double quotes in configure.ac#160
gansm merged 1 commit intogansm:mainfrom
frankdean:fix-configure

Conversation

@frankdean
Copy link
Contributor

Without the quotes when configuring with CXXFLAGS;

./configure CXXFLAGS='-g -O0' CPPFLAGS='-I$(top_srcdir)'

The test is interpreted as:

test -z -g -O0

resulting in an error amongst the output like:

. . .
checking whether gcc understands -c and -o together... (cached) yes
./configure: line 6360: test: -g: binary operator expected
checking for g++... g++
checking whether the compiler supports GNU C++... yes
. . .

Without the quotes when configuring with CXXFLAGS;

    ./configure CXXFLAGS='-g -O0' CPPFLAGS='-I$(top_srcdir)'

The test is interpreted as:

    test -z -g -O0

resulting in an error amongst the output like:

. . .
checking whether gcc understands -c and -o together... (cached) yes
./configure: line 6360: test: -g: binary operator expected
checking for g++... g++
checking whether the compiler supports GNU C++... yes
. . .
@gansm
Copy link
Owner

gansm commented Feb 17, 2026

Hi Frank, thanks for your pull request. I added this line on October 15, 2021, which was four years, four months, and two days ago. So your fix is just two days too early 😄. Your patch now clearly prevents the word-splitting problem.

@gansm gansm merged commit 33d808b into gansm:main Feb 17, 2026
15 of 18 checks passed
@frankdean
Copy link
Contributor Author

Hi Markus, it's funny how long things can go unnoticed. I must admit it was a while before I noticed the warning message whizzing up the screen, so I'm not surprised!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants