Finally got a somewhat clean first version for my DAOGen. The code is here. Basically is a Perl program using templates which connects to a database, extract all the metadata from the selected schema and generates the Data Transport Classes for all the tables. The script also generates a directory following the GNU projects specification, and the necessary autotools scripts in order to obtain a configure/make/make install project.
Remember to read de README and be happy.