DH-AUTORECONF(7)
π DH-AUTORECONF π
okay bestie, gather round, because this is the dh-autoreconf manual page (section 7 of the manual, for the record) and she is lowkey iconic π
β¨ NAME β¨
dh-autoreconf β the debhelper add-on that runs autoreconf during your build. that's it, that's the girl π
πΈ DESCRIPTION πΈ
so the dh-autoreconf package ships a sequence addon for debhelper 7, and here's the tea: it's been enabled by default since compatibility level 10 π. no cap.
if you're on an earlier compatibility level though, you gotta turn it on yourself, like this:
#!/usr/bin/make -f
%:
dh $@ --with autoreconf
what that does is SO satisfying: it'll call dh_autoreconf before dh_auto_configure, and it'll call dh_autoreconf_clean before dh_clean. the pipeline is eating, fr fr π₯
now, if you wanna know how to actually control the autoreconf process, or what the other possible options are, go read the dh_autoreconf(1) and dh_autoreconf_clean(1) manual pages. they're right there. go. π«Ά
π¦ TIPS AND EXAMPLES π¦
β¨ PATCHING LTMAIN.SH FOR AS-NEEDED LINKER FLAGS β¨
you can add support for -Wl,--as-needed to ltmain.sh β at least for those ltmain.sh scripts that got changed during autoreconf β by passing the argument --as-needed to dh_autoreconf. here's the demo, bestie:
override_dh_autoreconf:
dh_autoreconf --as-needed
want the full lore on this feature? see dh_autoreconf(1) π
π RUNNING MULTIPLE COMMANDS WITH DH_AUTORECONF π
okay so this one matters a LOT: you may run dh_autoreconf only once. one time. that's the whole rule. π
if you need to run multiple commands, the move is to put those commands into a script (or into your debian/rules file), and then pass the name of your script to dh_autoreconf. for example, if your script is called debian/autogen.sh, you can drop the following into your debian/rules if you use dh:
override_dh_autoreconf:
dh_autoreconf debian/autogen.sh
slay π
π CAVEATS π
dh_autoreconf is mostly a superset of the dh_update_autotools_config debhelper command that's been included in debhelper since version 9.20160115. when you use the dh sequencer, dh_update_autotools_config runs before dh_autoreconf and updates the config.guess and config.sub files. this is required in cases where autoreconf does not update config.guess and config.sub itself. important!! π
from time to time, there might be a short breakage for those of you using automatic ltmain.sh patching β it happens when the patch no longer applies to the ltmain.sh. just. yeah. it's giving "the patch said no" π
and once again, because it bears repeating: you can only run dh_autoreconf once. future versions may be able to be run multiple times, but that requires slightly more planning. the planning girlies will get there eventually πΈ
π SEE ALSO π
debhelper(7), dh(1), dh_autoreconf(1), dh_autoreconf_clean(1)
π AUTHOR π
Julian Andres Klode <jak@debian.org>
and that's a wrap on this gorgeous page, brought to you by dh-autoreconf v23, dated 2026-09-07. mwah, go build something cute πβ¨π¦
π¦ where this page comes from
- ubuntu stonking: dh-autoreconf 23 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms