Welcome! Log In Create A New Profile

Advanced

[BUG] nginx ./configure --with-cc-opt option hates values with double quotes

agentzh
July 21, 2011 04:36AM
Hello!

I just want to point out using double quotes within ./configure
--with-cc-opt values, for example,

./configure --with-cc-opt=$'-Dfoo=\'"bar"\''

will yield compilation errors like this (with nginx 1.0.4, for example):

gcc -c -pipe -O -W -Wall -Wpointer-arith -Wno-unused-parameter
-Wunused-function -Wunused-variable -Wunused-value -Werror -g
-Dfoo='"bar"' -I src/core -I src/event -I src/event/modules -I
src/os/unix -I objs \
-o objs/src/core/nginx.o \
src/core/nginx.c
src/core/nginx.c: In function ‘main’:
src/core/nginx.c:255: error: expected ‘)’ before ‘bar’

The logic for implementing "nginx -V" does not take into account
special characters like double quotes, it seems.

This is quite inconvenient when 3rd-party modules want to expose
string literal C macros to the end user to configure behaviors without
manually editing the "config" file of that module.

Hopefully it can be fixed in the official version of nginx :)

Regards,
-agentzh

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[BUG] nginx ./configure --with-cc-opt option hates values with double quotes

agentzh 3032 July 21, 2011 04:36AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 149
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready