views:

135

answers:

2

I would like to rebuild g++ with my own specific settings.

Here is what I did so far:

sudo aptitude install build-dep g++-4.2
mkdir trial && cd trial
apt-get source g++-4.2

Now I want to configure my specific settings. For g++ this is normally done by e.g.

sh configure --prefix=/home/voku/non-productive

But unfortunately I cannot find a configure or configure.ac script inside the download directory.

What I am actually looking for is a way to say:

  • get the source
  • apply all the needed patches
  • become ready to build - but do not build

Are there additional steps that I need to get the configure script?

EDIT: Probably I could run one of the tools that actually create the .deb package for g++.

Afterwards - that's what I assume - there will be the needed configure script.

But that sounds awful:

  • build the g++ .deb package
  • cleanup the whole stuff again
  • then use the generated configure script with my own options
  • then build again
A: 

As always, read the INSTALL file to learn what steps you must take in order to build the code.

Ignacio Vazquez-Abrams
where did you find the `INSTALL` file? I don't have it, neither `README`, `BUILD` nor something that sounds similar.
A: 

Many of Debian's source packages are special packages that build .deb files, which should be built using dpkg-buildpackage. Cf. Apt Howto: Working with source packages.

Charles Stewart
@Charles: yes - you are right. But internally a tool like `dpkg-buildpackage` also runs `configure` somewhere during the .deb package build process.<br>Probably I could run one of the tools that actually create the .deb package for g++. Afterwards - that's what I assume - there will be the needed configure script.<br>But that sounds awful: build the package, then clean up the stuff again. Then configure with my own option. Then build again.
@Vokuhila: Maybe there is something worth looking at in the rules file: cf. http://www.debian.org/doc/maint-guide/ch-dreq.en.html#s-rules
Charles Stewart
+1 for mentioning the "debian rules file".