|
From: | Julian Marchant |
Subject: | Having trouble using AC_CHECK_LIB |
Date: | Sun, 01 Mar 2015 20:38:21 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.4.0 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJU878NAAoJELP1a+89AVMCXrIH/Am5k2iyuvedRsknWfqSNzqD it7cfDRXlaKb9Akbla1CWu98/IuueT8JTLxrsRyMMiRDSO9owD97vCfvvsye9o3+ RflG6vn62Ex76wg0voxIM5oKrpe7jut9RzHXTA+Won5CNohQ7kiF3e341PrYAZcq GT4OxwRmabhOssyxtJfZroRVrttZmhBaUDJNO0XKMR9hk8cX+YdOscbqO9gOw4Wo 40eRtz/DjIDGpQWmormcY/huH3iNlpLwPlQXiP7vF7VNE3RX3rS4ZiKMFpCuZN2Z nIqjAu7uMTzCYtLKJZlDllASP34KYK37mBd33Eapofn3cHY9TOn9pVeB/vaN+as= =4GIi -----END PGP SIGNATURE-----
configure.ac
Description: Text document
Makefile-old
Description: Text document
configure.ac.sig
Description: PGP signature
Makefile-old.sig
Description: PGP signature
[Prev in Thread] | Current Thread | [Next in Thread] |