Linux configure/make, --prefix?

Xleedos picture Xleedos · Jan 17, 2012 · Viewed 109.6k times · Source

Bear with me, this one's not very easy to explain...

I'm trying to configure, make and make install Xfce into my buildroot build directory. When configuring I'm using

--prefix=/home/me/somefolder/mybuild/output/target

so that it builds to the right folder, however when it's compressed and run I get errors from various config files where it's looking for files in

/home/me/somefolder/mybuild/output/target

(which of course doesn't exist.)

How do I set what folder to build into, yet set a different root directory for the config files to use?

Answer

user405725 picture user405725 · Jan 17, 2012

Do configure --help and see what other options are available.

It is very common to provide different options to override different locations. By standard, --prefix overrides all of them, so you need to override config location after specifying the prefix. This course of actions usually works for every automake-based project.

The worse case scenario is when you need to modify the configure script, or even worse, generated makefiles and config.h headers. But yeah, for Xfce you can try something like this:

./configure --prefix=/home/me/somefolder/mybuild/output/target --sysconfdir=/etc 

I believe that should do it.