4.3. Changes to the upstream sources

If changes to the source code are made that are not specific to the needs of the Debian system, they should be sent to the upstream authors in whatever form they prefer so as to be included in the upstream version of the package.

If you need to configure the package differently for Debian or for Linux, and the upstream source doesn’t provide a way to do so, you should add such configuration facilities (for example, a new autoconf test or #define) and send the patch to the upstream authors, with the default set to the way they originally had it. You can then easily override the default in your debian/rules or wherever is appropriate.

You should make sure that the configure utility detects the correct architecture specification string (refer to Architecture specification strings for details).

If your package includes the scripts config.sub and config.guess, you should arrange for the versions provided by the package autotools-dev be used instead (see autotools-dev documentation for details how to achieve that). This ensures that these files can be updated distribution-wide at build time when introducing new architectures.

If you need to edit a Makefile where GNU-style configure scripts are used, you should edit the .in files rather than editing the Makefile directly. This allows the user to reconfigure the package if necessary. You should not configure the package and edit the generated Makefile! This makes it impossible for someone else to later reconfigure the package without losing the changes you made.