g++ -D compiler options



I have some C++ package files, which are currently compiled using a command
line syntax as follows:

g++ -Ddebian -D_GNU_SOURCE -g -O2 -fno-rtti -fno-exceptions -Wall
-Wno-trigraphs -DUSE_TERMIO -DKLUDGELINEMODE foobar.cc -c

What are the effects of the -D options?

-Ddebian
-D_GNU_SOURCE
-DUSE_TERMIO
-DKLUDGELINEMODE

The gcc manual states:

-D name
Predefine name as a macro, with definition 1.

I tried to locate references using:

grep debian *.cc *.h
grep _GNU_SOURCE *.cc *.h

These return nothing.

I did however find #ifdef and #ifndef references for USE_TERMIO and
KLUDGELINEMODE.

Presumably, the -DUSE_TERMIO -DKLUDGELINEMODE options cause inclusion of the
enclosed definitions (or exclusion in the case of #ifndef).

What about the -Ddebian -D_GNU_SOURCE options? Can I just drop these?

FYI, The packages sources are the separated client component of
the netkit-telnet package and am trying to achieve a build using
autotools.

Regards,

Mark.

--
Mark Hobley,
393 Quinton Road West,
Quinton, BIRMINGHAM.
B32 1QE.
.