Julian Marchant
2015-03-02 01:38:21 UTC
I'm trying to replace the hand-made Makefile of Project: Starfighter
with Autoconf and Automake files. This is my first time using Autoconf
and Automake, so I'm kind of learning as I go along.
I'm stuck at one part. Project: Starfighter requires SDL_Image and
SDL_Mixer from SDL2 in order to build, so I'm trying to check for them
by using AC_CHECK_LIB with functions defined by SDL_Image and
SDL_Mixer. These are my checks (you can see the attached file for the
full configure.ac):
AC_CHECK_LIB([SDL2], [SDL_Init], [], [echo "Error: SDL2 not
found." ; exit 1])
AC_CHECK_LIB([SDL2], [IMG_Load], [], [echo "Error: SDL_Image not
found." ; exit 1])
AC_CHECK_LIB([SDL2], [Mix_LoadWAV], [], [echo "Error: SDL_Mixer
not found." ; exit 1])
When I generate and run a configure script, the first check always
passes, but the second and third always fail (I checked the third by
removing the exit call from the second one). But I know I have
SDL_Image and SDL_Mixer for SDL2, because I can compile Project:
Starfighter with the hand-made Makefile (attached) just fine.
So, I suppose I have two questions:
1. Am I doing something I shouldn't be doing? (e.g. is it bad to check
a library more than once?)
2a. If so, what am I supposed to do to check for something like
SDL_Image and SDL_Mixer (where it's in the same library, but
separately packaged)?
2b. If not, how can I figure out what's wrong?
- --
Julian Marchant
https://onpon4.github.io
Protect your privacy with GnuPG:
https://emailselfdefense.fsf.org
with Autoconf and Automake files. This is my first time using Autoconf
and Automake, so I'm kind of learning as I go along.
I'm stuck at one part. Project: Starfighter requires SDL_Image and
SDL_Mixer from SDL2 in order to build, so I'm trying to check for them
by using AC_CHECK_LIB with functions defined by SDL_Image and
SDL_Mixer. These are my checks (you can see the attached file for the
full configure.ac):
AC_CHECK_LIB([SDL2], [SDL_Init], [], [echo "Error: SDL2 not
found." ; exit 1])
AC_CHECK_LIB([SDL2], [IMG_Load], [], [echo "Error: SDL_Image not
found." ; exit 1])
AC_CHECK_LIB([SDL2], [Mix_LoadWAV], [], [echo "Error: SDL_Mixer
not found." ; exit 1])
When I generate and run a configure script, the first check always
passes, but the second and third always fail (I checked the third by
removing the exit call from the second one). But I know I have
SDL_Image and SDL_Mixer for SDL2, because I can compile Project:
Starfighter with the hand-made Makefile (attached) just fine.
So, I suppose I have two questions:
1. Am I doing something I shouldn't be doing? (e.g. is it bad to check
a library more than once?)
2a. If so, what am I supposed to do to check for something like
SDL_Image and SDL_Mixer (where it's in the same library, but
separately packaged)?
2b. If not, how can I figure out what's wrong?
- --
Julian Marchant
https://onpon4.github.io
Protect your privacy with GnuPG:
https://emailselfdefense.fsf.org