Wrecked Games

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're just that awesome.

Author Topic: Linux autotools issue  (Read 415 times)

Bat

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 8
    • View Profile
Linux autotools issue
« on: May 06, 2010, 04:05:13 AM »

Hi,
I'm trying to build both release and debug versions and install them both into one prefix.
So to not overwrite files I want to suffix installed debug ones with '_d' as on Windows.
I use
Code: [Select]
../../../src/ois/configure CFLAGS="-g3 -gdwarf-2" CXXFLAGS="-g3 -gdwarf-2" CPPFLAGS="-DDEBUG" --prefix=`pwd`/../../../ --program-suffix=_d
opposite to
Code: [Select]
../../../src/ois/configure --prefix=`pwd`/../../../
in release.

Here is the partial diff from release and debug makefiles:
RELEASE
Code: [Select]
prefix = /home/orel/devel/sandbox/dep/build/ois/release/../../..
program_transform_name = s,x,x,
DEBUG
Code: [Select]
prefix = /home/orel/devel/sandbox/dep/build/ois/debug/../../..
program_transform_name = s&$$&_d&

So as you can see there are different sed commands and it's ok.
But 'program_transform_name' var is never used in the makefile later.
And thus my installed files are not suffixed with _d.

Is this an issue with OIS build system or just I'm doing something wrong?

Thanks.
Logged

pjcast

  • Administrator
  • Veteran
  • *****
  • Karma: +0/-0
  • Posts: 2652
    • View Profile
    • http://www.wreckedgames.com
Re: Linux autotools issue
« Reply #1 on: May 08, 2010, 07:11:52 PM »

I've never seen anyone try to attempt that on Linux. The issue on windows, is you cannot link the debug/release C runtimes into the same project. As far as I know, linux does not have this issue, so there is no problem with accidentally linking to a debug library on linux - hence no need for any _d prefix. The worst that happens on linux is usually just larger library size, and perhaps a bit of slowdown - not really relevant for OIS as it is not doing very much calculations where the slow down would matter.

If you are insistent on really building two different builds of OIS, you should just install it to a different path.. then you could also point pkgconfig to find the other path during certain builds.
Logged

Bat

  • Newbie
  • *
  • Karma: +0/-0
  • Posts: 8
    • View Profile
Re: Linux autotools issue
« Reply #2 on: May 11, 2010, 12:52:23 PM »

Thanks, PJ. I already realized I.m going the wrong way. Just thought too much in Windows way.
Logged