configure does not make use of CFLAGS correctly.
if I try CFLAGS='-march=i686' ./configure, I fail early in make:
/usr/bin/make all-recursive
make[1]: Entering directory `/usr/src/gpa-0.8.0'
Making all in m4
make[2]: Entering directory `/usr/src/gpa-0.8.0/m4'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/gpa-0.8.0/m4'
Making all in src
make[2]: Entering directory `/usr/src/gpa-0.8.0/src'
/usr/bin/make all-am
make[3]: Entering directory `/usr/src/gpa-0.8.0/src'
gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -I../pixmaps -D_REENTRANT
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12 -march=i686 -pipe -mtune=core2
-Wall -MT get-path.o -MD -MP -MF .deps/get-path.Tpo -c -o get-path.o get-path.c
mv -f .deps/get-path.Tpo .deps/get-path.Po
gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -I../pixmaps -D_REENTRANT
-I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0
-I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2
-I/usr/include/directfb -I/usr/include/libpng12 -march=i686 -pipe -mtune=core2
-Wall -MT gpa.o -MD -MP -MF .deps/gpa.Tpo -c-o gpa.o gpa.c
gpa.c: In function 'main':
gpa.c:342: error: 'LC_CTYPE' undeclared (first use in this function)
gpa.c:342: error: (Each undeclared identifier is reported only once
gpa.c:342: error: for each function it appears in.)
gpa.c:342: warning: implicit declaration of function 'setlocale'
gpa.c:342: warning: passing argument 3 of 'gpgme_set_locale' makes pointer from
integer without a cast
gpa.c:343: error: 'LC_MESSAGES' undeclared (first use in this function)
gpa.c:343: warning: passing argument 3 of 'gpgme_set_locale' makes pointer from
integer without a cast
make[3]: * [gpa.o] Error 1
make[2]: * [all] Error 2
make[1]: * [all-recursive] Error 1
make[3]: Leaving directory `/usr/src/gpa-0.8.0/src'
make[2]: Leaving directory `/usr/src/gpa-0.8.0/src'
make[1]: Leaving directory `/usr/src/gpa-0.8.0'
make: * [all] Error 2
but if I merely run ./configure then manually modify CFLAGS in Makefile,
everything's fine.