[sane-devel] autoconf/configure and debug

Reinhold Kainhofer reinhold at kainhofer.com
Tue Jun 14 20:57:01 UTC 2011

Am Dienstag, 14. Juni 2011, 22:32:25 schrieb Chris Bagwell:
> configure will not default to CFLAGS="-g -O2" if you specify your own
> value.  But if your getting two -O2 then something else may be adding
> it as well.

Yes, the culprit is the net-snmp library...
To get the include path for the net-snmp library, the binary "net-snmp-config" 
is called with --cflags and the result is appended to CFLAGS. Unfortunately,

reinhold at einstein:~$ net-snmp-config --cflags
-g -O2 -Ulinux -Dlinux=linux -Wall -Wstrict-prototypes -Wwrite-strings -Wcast-
qual -I. -I/home/reinhold/.build/include

Judging from the output of net-snmp-config --help, there is no other way to get 
the correct include pathes / libraries to link to net-snmp without dragging in 
all unneeded compiler flags...


Reinhold Kainhofer, reinhold at kainhofer.com, http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org

More information about the sane-devel mailing list