Building trunk on OS X

Hello guys. I’ve got a problem trying build trunk on OS X 10.8.2.
I have build latest SDL library and installed it with “make install” ( first step turing your os in to slackware~ ), but when i’m running “./configure” for vcmi i have this error in the output:

checking for sdl-config... /usr/local/bin/sdl-config
checking for SDL - version >= 1.2.0... no
*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /usr/local/bin/sdl-config
configure: error: *** SDL version  not found!

Full output: gist.github.com/3926509

Actual Error:

configure:16609: checking for sdl-config
configure:16627: found /usr/local/bin/sdl-config
configure:16640: result: /usr/local/bin/sdl-config
configure:16650: checking for SDL - version >= 1.2.0
configure:16737: g++ -o conftest -g -O2 -O0 -ggdb -std=c++0x -Wall -Wextra -Wcast-align -Wpointer-arith -Wno-switch -Wno-sign-compare -Wno-unused-parameter -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE   conftest.cpp  -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa >&5
cc1plus: error: unrecognized command line option "-std=c++0x"
configure:16737: $? = 1
configure: program exited with status 1

config.log: gist.github.com/3926524

SDL Version:

$ sdl-config --version
1.2.15

Seems like GCC bundled with XCode CLI Tools compiled w/o C++0x support. Does VCMI actually use new standard? And can i pass any flags to configure/make for backward compatibility? So if anyone got suggestions, I would be glad to hear them.

This is problem with compiler - sdl looks to be fine.
According to log you’re using llvm-gcc-4.2. You need at least gcc-4.5 to compile vcmi. In case of Mac OS you may want to install clang-3.1 instead.

After this run configure specifying you compiler:

CC=clang CXX=clang++ <path to source>/configure

Please note that autotools (and as result - configure script) will be removed before next release. Because of this you may want to use cmake instead:

CC=clang CXX=clang++ cmake <path to source>