How to build SDL2 for mac m1?
I execute these commands on Mac M1:
- I get stable SDL2 source from SDL site
- I enter the dir of SDL2 source, and run autoconf.sh
- run ./configure --prefix=xxxxxxx
- make -j 4
but, I get some errors when I run make -j 4:
/Users/lichao/Downloads/SDL2-2.0.20/src/video/x11/SDL_x11events.c:721:27: error: use of undeclared identifier 'XkbEvent'
XkbEvent* xkbEvent = (XkbEvent*) xevent;
^
/Users/lichao/Downloads/SDL2-2.0.20/src/video/x11/SDL_x11events.c:721:5: error: use of undeclared identifier 'XkbEvent'
XkbEvent* xkbEvent = (XkbEvent*) xevent;
^
/Users/lichao/Downloads/SDL2-2.0.20/src/video/x11/SDL_x11events.c:721:15: error: use of undeclared identifier 'xkbEvent'
XkbEvent* xkbEvent = (XkbEvent*) xevent;
^
/Users/lichao/Downloads/SDL2-2.0.20/src/video/x11/SDL_x11events.c:812:61: error: use of undeclared identifier 'xkbEvent'
(xevent->type == videodata->xkb_event && xkbEvent->any.xkb_type == XkbStateNotify)) {
^
/Users/lichao/Downloads/SDL2-2.0.20/src/video/x11/SDL_x11events.c:812:87: error: use of undeclared identifier 'XkbStateNotify'
(xevent->type == videodata->xkb_event && xkbEvent->any.xkb_type == XkbStateNotify)) {
Why will it report these error? How should I do?