Index: src/doxygen.cpp
===================================================================
--- src/doxygen.cpp	(revision 838)
+++ src/doxygen.cpp	(working copy)
@@ -8406,6 +8406,7 @@
   g_outputList->disable(OutputGenerator::Man);
   PageSDict::Iterator pdi(*Doxygen::exampleSDict);
   PageDef *pd=0;
+  bool withLineNumbers = Config_getBool("EXAMPLE_LINE_NUMBERS");
   for (pdi.toFirst();(pd=pdi.current());++pdi)
   {
     msg("Generating docs for example %s...\n",pd->name().data());
@@ -8420,7 +8421,7 @@
                          pd->docLine(),                            // startLine
                          pd,                                       // context
                          0,                                        // memberDef
-                         pd->documentation()+"\n\n\\include "+pd->name(),          // docs
+                         pd->documentation()+ (withLineNumbers ? "\n\n\\includelineno " : "\n\n\\include ")+pd->name(),          // docs
                          TRUE,                                     // index words
                          TRUE,                                     // is example
                          pd->name()
Index: src/config.xml
===================================================================
--- src/config.xml	(revision 838)
+++ src/config.xml	(working copy)
@@ -722,6 +722,11 @@
 commands irrespective of the value of the RECURSIVE tag. 
 Possible values are YES and NO. If left blank NO is used. 
 ' defval='0'/>
+    <option type='bool' id='EXAMPLE_LINE_NUMBERS' docs='
+If the EXAMPLE_LINE_NUMBERS tag is set to YES, then line numbers
+will be printed in the example listings.
+Possible values are YES and NO. If left blank NO is used. 
+' defval='0'/>
     <option type='list' id='IMAGE_PATH' format='dir' docs='
 The IMAGE_PATH tag can be used to specify one or more files or 
 directories that contain image that are included in the documentation (see 
Index: src/configoptions.cpp
===================================================================
--- src/configoptions.cpp	(revision 838)
+++ src/configoptions.cpp	(working copy)
@@ -1016,6 +1016,14 @@
                  FALSE
                 );
   //----
+  cb = cfg->addBool(
+                 "EXAMPLE_LINE_NUMBERS",
+                 "If the EXAMPLE_LINE_NUMBERS tag is set to YES, then line numbers\n"
+                 "will be printed in the example listings.\n"
+                 "Possible values are YES and NO. If left blank NO is used.",
+                 FALSE
+                );
+  //----
   cl = cfg->addList(
                  "IMAGE_PATH",
                  "The IMAGE_PATH tag can be used to specify one or more files or\n"
