diff options
-rw-r--r-- | chickadee/config.scm.in | 33 |
1 files changed, 28 insertions, 5 deletions
diff --git a/chickadee/config.scm.in b/chickadee/config.scm.in index 81b0f3e..2a43918 100644 --- a/chickadee/config.scm.in +++ b/chickadee/config.scm.in @@ -52,11 +52,34 @@ (define %chickadee-version "@PACKAGE_VERSION@") -(define %libopenal '("@OPENAL_LIBDIR@/libopenal" "libopenal")) -(define %libvorbisfile '("@VORBIS_LIBDIR@/libvorbisfile" "libvorbisfile")) -(define %libmpg123 '("@MPG123_LIBDIR@/libmpg123" "libmpg123")) -(define %libfreetype '("@FREETYPE_LIBDIR@/libfreetype" "libfreetype")) -(define %libreadline '("@READLINE_LIBDIR@/libreadline" "libreadline")) +;; When LD_LIBRARY_PATH is set, we *don't* want to use the absolute +;; file name of the library that pkgconfig found. Instead, we want to +;; use the library name itself so the search path is used. +(define-syntax-rule (define-library-name name + (absolute ...) + (relative ...)) + (define name + (cond + ((getenv "LD_LIBRARY_PATH") + '(relative ...)) + (else + '(absolute ...))))) + +(define-library-name %libopenal + ("@OPENAL_LIBDIR@/libopenal") + ("libopenal")) +(define-library-name %libvorbisfile + ("@VORBIS_LIBDIR@/libvorbisfile") + ("libvorbisfile")) +(define-library-name %libmpg123 + ("@MPG123_LIBDIR@/libmpg123") + ("libmpg123")) +(define-library-name %libfreetype + ("@FREETYPE_LIBDIR@/libfreetype") + ("libfreetype")) +(define-library-name %libreadline + ("@READLINE_LIBDIR@/libreadline") + ("libreadline")) (define (scope-datadir file) "Append the Chickadee data directory to FILE." |