The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: ArthurDenture on October 19, 2014, 04:40:01 PM

Title: Two patches to fix compilation on mac
Post by: ArthurDenture on October 19, 2014, 04:40:01 PM
I just noticed the new configure.ac. This is a great idea: I always thought it was unfortunate that when a new user tries to compile simutrans from source, the first thing they have to do is learn about a custom build scheme, edit a config file, etc. I hope that this mode becomes the default!

Anyhow, here are two short patches related to compilation on OS X.

1. Autoconf didn't quite work out of the box on my macbook, since it tried to compile an Objective-C++ header file without switching to objc++ mode. (See patch file or Github for full commit message.)
Link: https://github.com/artdent/simutrans/commit/2fd964e56f914d4665fc4717ad26f66376905664
Also attached.

2. Compilation didn't succeed with multithreading enabled. I think this is only a problem on Lion and above. (Again, patch for full commit message.)
Link: https://github.com/artdent/simutrans/commit/7658f6f431ba03c9aeeae5039739a91b71451489
Also attached.

Edit: just noticed I used "and" instead of "&&" in patch #2. Bizarrely, the preprocessor seemed to accept it? Anyhow, patch and link updated.
Title: Re: Two patches to fix compilation on mac
Post by: Ters on October 19, 2014, 07:35:18 PM
Quote from: ArthurDenture on October 19, 2014, 04:40:01 PM
Edit: just noticed I used "and" instead of "&&" in patch #2. Bizarrely, the preprocessor seemed to accept it? Anyhow, patch and link updated.

and is a valid C++ keyword, with the same meaning as &&. I don't remember if it is valid C as well, and I don't know about Objective-C.
Title: Re: Two patches to fix compilation on mac
Post by: prissi on October 19, 2014, 11:00:50 PM
THank you, incorporated