Restructure dbd driver search path determination

Use pkg-config if available (since libdbi 0.9)
Fall back to old hard-coded paths otherwise
This commit is contained in:
Geert Janssens
2014-02-19 13:03:34 +01:00
parent 6390beb59f
commit 00e3218252

View File

@@ -604,7 +604,14 @@ then
[[GNC_DBD_DIR="$with_dbi_dbd_dir"
EXTRA_SEARCH_LIBS=$GNC_DBD_DIR]],
[[GNC_DBD_DIR=""
EXTRA_SEARCH_LIBS="/usr/lib/dbd:/usr/lib64/dbd:${libdir}/dbd:$(pkg-config --variable=libdir dbi)/dbd"]]
# pkg-config is new in libdbi 0.9. Use it if avaiable
# Otherwise fall back to our previous hard coded values
pkg-config --exists dbi
if test $? -eq 0; then
EXTRA_SEARCH_LIBS="$(pkg-config --variable=libdir dbi)/dbd"
else
EXTRA_SEARCH_LIBS="/usr/lib/dbd:/usr/lib64/dbd:${libdir}/dbd"
fi]]
)
case $host_os in
win32*|mingw*)