OS X Support

Developers
M Gagnon
2007-10-11
2013-04-23
  • M Gagnon
    M Gagnon
    2007-10-11

    Hi,
    i tried compiling U.S. 0721 on mac OS X and i might like to help you add mac support (unfortunately i cannot do everything myself and would need your collaboration, for instance i know nothing about autotools)

    1) i got lots of cast errors, expecially with glGenTexture IIRC. Have you tried building U.S. wih gcc 4? I don't think the errors i was getting were mac-specific.
    2) The linking flags for OpenAL and OpenGL are different on mac. It would be needed to replace "-lGL" and -"lAL" by "-framework OpenGL" and "-framework OpenAL".

    If you can get fix the build system, i'm pretty sure i could do the packaging and code changes if any are necessary.

     
    • CJP
      CJP
      2007-10-25

      Hi,
      People have contacted me in a lot of different ways about their attempts to build an OS X version. In the Open Discussion forum you can find some more succesful attempts that used a more UNIX-like "framework". Someone else contacted me by email, and he had the same cast errors (mainly unsigned int vs. GLuint). I'll see if I can put everyone at one place together, so that you can help each other.

      About the build system: for the things you're trying to do, you need to modify "configure.ac". The contents of this file are basically a shell script with lots of convenience macros. You can use all kinds of macros for typical configure tasks, and besides that you can also use all the shell script commands. After modifying "configure.ac" you need to run autoconf. Autoconf "fills in" all the macros, and generates the configure script. The configure script is executed by the user, and it determines e.g. which build flags need to be used.

      I think simply changing (and saving) configure.ac and then executing "make" will also do the trick. Make will detect that configure.ac was changed, and it will execute autoconf and other commands necessary to update the build tree. Of course you need all the autotools installed (autoconf, automake (I think 1.7) etc.)

      The autoconf documentation will provide you with a huge list of macros that can be used. But it's probably easier to download other (autotool-based, open source) applications that use OpenGL/AL, and see how they solved the OS X case. Copying a good idea is always better than re-inventing everything, and this is exactly the kind of thing where open source becomes useful.

       
      • CJP
        CJP
        2007-10-25

        I mean the "Help" forum.

         
    • M Gagnon
      M Gagnon
      2007-10-26

      Hi,

      i got it compiling. I will post patches in the tracker.