View Single Post
Old September 20, 2018, 14:55   #9
shirish
Rookie
 
Join Date: Aug 2018
Posts: 22
shirish is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Indeed, since it was never incorporated into Angband. I recall you need to run autoconf with "--disable-sdl" actually (which disables SDL1), and then manually hack the Makefile.std (that's what I did back then)...


You can try to go back futher in this branch and look for something like Makefile.sdl2... although it probably shouldn't be there. If not, I can write the Makefile, but not right now, maybe in several days (also, I still don't know how autoconf works )
Hi,

It actually uses autogen.sh .

When I run ./autogen.sh the following takes place -

Code:
~/games/takkaria-angband$ ./autogen.sh
*info* running aclocal (-I m4)
*info* running autoheader
*info* running autoconf
which forms the .configure script

The Makefile is generated when the .configure script is taken care of . Once it is complete, you get a makefile.

If I just do -

Code:
~/games/takkaria-angband$ ./configure --with-no-install
then a makefile will be generated which has the sdl frontline disabled.

There is a Makefile though but that's in -

Code:
~/games/takkaria-angband/src$ cat Makefile.src | grep sdl
SDLMAINFILES = main-sdl.o
SNDSDLFILES = snd-sdl.o
There is this Q&A on stackoverflow I saw but dunno if its just what is needed

https://stackoverflow.com/questions/...n-linux-ubuntu

Reading it few times it seems it needs the following info. -
Code:
/usr/bin/sdl2-config
/usr/include/SDL2/SDL.h
/usr/lib/x86_64-linux-gnu/libSDL2.so
for libsdl2 and -

Code:
/usr/include/SDL2/SDL_mixer
/usr/lib/x86_64-linux-gnu/libSDL2_mixer.so
Edit - I found what needs to be fixed -

from https://wiki.libsdl.org/FAQLinux#How..._my_project.3F

it seems acinclude.m4 is what needs to be fixed -

it needs https://hg.libsdl.org/SDL/file/default/sdl2.m4

I did try to do a copy and replace but didn't get far.

This is what I did with acinclude.m4

https://paste.debian.net/1043458/

I get the following errors when I try to ./autogen.sh it -

Code:
~/games/takkaria-angband$ ./autogen.sh
*info* running aclocal (-I m4)
acinclude.m4:157: warning: the serial number must appear before any macro definition
configure.ac:269: warning: macro 'AM_PATH_SDL' not found in library
*info* running autoheader
*info* running autoconf
configure.ac:269: error: possibly undefined macro: AM_PATH_SDL
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
*error* autoconf failed. (exit code = 1)

Last edited by shirish; September 20, 2018 at 15:50.
shirish is offline   Reply With Quote