From e84c7d825739db4e24c1bef107c1c234f6e37efd Mon Sep 17 00:00:00 2001 From: hasufell Date: Fri, 23 Aug 2013 07:53:38 +0200 Subject: imrove LIBDIR detection in binreloc use the LIBDIR we get from GNUInstallDirs module instead of this ifdef, it should be more robust and is distro dependant --- config.h.cmake | 1 + hardinfo/binreloc.c | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/config.h.cmake b/config.h.cmake index 455da69a..1621a890 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -10,6 +10,7 @@ #define HOSTNAME "" #define ARCH_@HARDINFO_ARCH@ +#define LIBDIR "@CMAKE_INSTALL_LIBDIR@" #define LIBPREFIX "@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@/hardinfo" #define PREFIX "@CMAKE_INSTALL_PREFIX@/share/hardinfo" diff --git a/hardinfo/binreloc.c b/hardinfo/binreloc.c index 1d1acfe6..f47a3fae 100644 --- a/hardinfo/binreloc.c +++ b/hardinfo/binreloc.c @@ -593,11 +593,7 @@ gchar *gbr_find_lib_dir(const gchar * default_lib_dir) return NULL; } -#ifdef ARCH_x86_64 - dir = g_build_filename(prefix, "lib64", NULL); -#else - dir = g_build_filename(prefix, "lib", NULL); -#endif + dir = g_build_filename(prefix, LIBDIR, NULL); g_free(prefix); return dir; -- cgit v1.2.3