Ethereal-dev: Re: [Ethereal-dev] -ansi vs. configure question

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxxxx>
Date: Tue, 20 Jan 2004 12:14:43 -0800

On Jan 20, 2004, at 11:38 AM, Joerg Mayer wrote:

So, back to my intended question: Is there a way to make configure use certain
compiler flags *during* its checks?

Put them in CFLAGS before the checks are run. That worked when I tried it here - I added "-ansi" to the "--with-extra-gcc-checks" list, and ran configure with that option after rebuilding with the version of autoconf 2.57 that comes with Mac OS X 10.3.2, and the tests used "-ansi" when compiling.

I guess -ansi doesn't disable its use to a sufficient extent on 10.3.2, because the test compile succeeded:

configure:25574: checking for snprintf
configure:25624: gcc -o conftest -DINET6 -no-cpp-precomp -D_U_="__attribute__((unused))" -Wall -W -Wcast-qual -Wcast-align -Wbad-function-cast -pedantic -Wstrict-prototypes -ansi -g -O2 -I/usr/local/include -I/usr/local/include/gtk-1.2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/local/include -L/usr/local/lib -L/usr/local/lib conftest.c -lz >&5
configure:25643: warning: function declaration isn't a prototype
configure:25650: warning: function declaration isn't a prototype
configure:25658: warning: function declaration isn't a prototype
configure:25627: $? = 0
configure:25630: test -s conftest
configure:25633: $? = 0
configure:25644: result: yes