cebix / macemu

Basilisk II and SheepShaver Macintosh emulators
1.37k stars 285 forks source link

failure to build on Arch — unnecessary ‘AM_GNU_GETTEXT’ in ‘configure.ac’ #233

Closed zamfofex closed 2 years ago

zamfofex commented 3 years ago

It seems this is currently failing to build on Arch Linux. A friend of mine who uses Arch brought the problem up to me, and I decided to start trying to investigate through Docker.

The effect is that you’ll get an error complaining about a missing config.rpath file when running ./configure (during or after ./autogen.sh).

After investigating for a couple of hours, it seems the problem is in the configure.ac file. It has a line using the AM_GNU_GETTEXT macro, which in turn requires the config.rpath file to exist in the root of the project (which, from what I gathered, is a file that should be automatically generated with gettextize).

However, it seems that the line (introduced in f40f7ab91f70c7f31a567f47efbb5fd577b5f4e9, later modified in a46759990d33d7d1e2c7bac01459747d6180eb76), was only placed there as a means of working around an issue with GTK at the time — “<gnome-i18n.h> would redefine gettext() to nothing if ENABLE_NLS is not set”. Since then, the issue has been resolved, as GTK does not support disabling NLS, and the mentioned header (which has since been renamed to glib/gi18n.h) does not actually redefine gettext anymore at all.

Simply removing those lines has fixed the issue for me.

patch ~~~ diff - dnl somehow, would redefine gettext() to nothing if - dnl ENABLE_NLS is not set, thusly conflicting with C++ which - dnl includes - AM_GNU_GETTEXT([external]) ~~~

After removing those lines, I was able to build it successfully on Arch (through Docker) with the following commands:

./autogen.sh \
    --prefix=/usr \
    --enable-sdl-video \
    --enable-sdl-audio \
    --enable-jit-compiler \
    --with-bincue \
    --with-vdeplug
make

Thanks in advance for the attention!

schinkelg commented 3 years ago

Thank you from a fellow Arch user. This helped me getting Macemu to compile. Still can't get sound to work, but that's a different issue.