project-navigation
Personal tools

Author Topic: 2.3 release compilation issues  (Read 5374 times)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
2.3 release compilation issues
« on: June 30, 2010, 11:49:14 pm »
In an attempt to check the SDL issues by using the official release versions of SDL instead of the MacPorts versions, I'm getting an error from configure.

The problem turns out to be simple

gcc -o conftest  -I/opt/local/include -arch i386 -arch ppc   -L/opt/local/lib -arch i386 -arch ppc conftest.c -lSDL_image

Macports puts the SDL_image as a library in /opt/local/lib.
The official release puts it as a framework in /Library/Frameworks.

Changing that "-lSDL_image" into "-FSDL_image" makes it work.
But I can't figure out how to modify either configure.ac or configure to test for that.

This is probably going to affect all of SDL -- SDL_mixer, SDL_ttf, etc.
(actually, are those the only SDL parts that UfoAi uses?)

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: 2.3 release compilation issues
« Reply #1 on: July 02, 2010, 08:12:22 am »
Now that 2.3 does not have an intro movie, does it still need either DivX or libtheora?

2.3's configure checks for both of these.

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: 2.3 release compilation issues
« Reply #2 on: July 04, 2010, 06:26:17 am »
Mattn? Any answers?

Btw: To produce a .dmg now, you also need the p7zip port installed.

Offline geever

  • Project Coder
  • PHALANX Commander
  • ***
  • Posts: 2561
    • View Profile
Re: 2.3 release compilation issues
« Reply #3 on: July 04, 2010, 08:49:31 am »
Now that 2.3 does not have an intro movie, does it still need either DivX or libtheora?

2.3's configure checks for both of these.

Xvid or theora. The OGM support is in 2.3 so, yes, needed.

-geever

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: 2.3 release compilation issues
« Reply #4 on: July 26, 2010, 08:04:04 pm »
Bumping

In an attempt to check the SDL issues by using the official release versions of SDL instead of the MacPorts versions, I'm getting an error from configure.

The problem turns out to be simple

gcc -o conftest  -I/opt/local/include -arch i386 -arch ppc   -L/opt/local/lib -arch i386 -arch ppc conftest.c -lSDL_image

Macports puts the SDL_image as a library in /opt/local/lib.
The official release puts it as a framework in /Library/Frameworks.

Changing that "-lSDL_image" into "-FSDL_image" makes it work.
But I can't figure out how to modify either configure.ac or configure to test for that.

This is probably going to affect all of SDL -- SDL_mixer, SDL_ttf, etc.
(actually, are those the only SDL parts that UfoAi uses?)


Does anyone know autoconfig well enough to alter these? As I said, my goal is to get the official release versions of SDL (frameworks) used, to see if this fixes anything.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: 2.3 release compilation issues
« Reply #5 on: July 31, 2010, 04:41:56 pm »
in configure.ac are already some mac specific hacks

modify configure.ac, run autoconf and ./configure again

Offline keybounce

  • Sergeant
  • *****
  • Posts: 330
    • View Profile
Re: 2.3 release compilation issues
« Reply #6 on: August 03, 2010, 08:57:49 pm »
This is fun.
Code: [Select]
        # fix this darn SDL stuff....
        with_sdl_config=/opt/local/bin/sdl-config

Except that this doesn't exist in the official SDL release :-).

Later,
Code: [Select]
if test $TARGET_OS != "darwin"
then
        PKG_CHECK_MODULES(SDL, sdl, HAVE_SDL="yes", HAVE_SDL="no")
else
        HAVE_SDL=no
fi

if test "x$HAVE_SDL" = "xno" ; then
        sdl_config=$with_sdl_config
        AC_CHECK_PROG(HAVE_SDL_CONFIG,$sdl_config,yes)
So if we're "darwin", then we assume we don't have SDL (without checking /Library/Frameworks), and then look for the macports version.

<Sigh>.

I don't see how to "fix" it properly, but I think I can see how to hard-code what will work.

Offline Mattn

  • Administrator
  • PHALANX Commander
  • *****
  • Posts: 4831
  • https://github.com/mgerhardy/vengi
    • View Profile
    • Vengi Voxel Tools
Re: 2.3 release compilation issues
« Reply #7 on: August 03, 2010, 09:46:48 pm »
yes - i don't know whether there is framework support in the autotools - that's why all those hacks are needed.