From 0e1fdf32ac31f6e1f549524e3d53d430bea9305a Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Thu, 14 Jul 2005 13:05:43 +0000 Subject: [PATCH] 2003-02-15 Havoc Pennington Author: hp Date: 2003-02-15 15:37:04 GMT 2003-02-15 Havoc Pennington * pkg.c (verify_package): patch from Nalin to use /usr/lib64 as the system libdir on systems where that's appropriate --- ChangeLog | 5 +++++ configure.in | 5 +++++ pkg.c | 14 ++++++++++---- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 648cd1d..151b341 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-02-15 Havoc Pennington + + * pkg.c (verify_package): patch from Nalin to use /usr/lib64 as + the system libdir on systems where that's appropriate + 2003-02-15 Havoc Pennington Fixes suggested by Werner Trobin diff --git a/configure.in b/configure.in index c7d865b..4344d17 100644 --- a/configure.in +++ b/configure.in @@ -24,6 +24,11 @@ AC_MSG_RESULT([$native_win32]) AM_CONDITIONAL(USE_INSTALLED_GLIB, test x$native_win32 = xyes) +case "$libdir" in +*lib64) AC_DEFINE(PREFER_LIB64,1,[Define if your native architecture defines libdir to be $prefix/lib64 instead of $prefix/lib.]) ;; +*) : ;; +esac + if test x$native_win32 = xyes; then # On Win32, use the normal installed GLib. Yes, this is a circular # dependency. But then, only experienced hackers that presumably can diff --git a/pkg.c b/pkg.c index 3314891..6fd9362 100644 --- a/pkg.c +++ b/pkg.c @@ -851,25 +851,31 @@ verify_package (Package *pkg) g_slist_foreach (system_directories, (GFunc) g_free, NULL); g_slist_free (system_directories); +#ifdef PREFER_LIB64 +#define SYSTEM_LIBDIR "/usr/lib64" +#else +#define SYSTEM_LIBDIR "/usr/lib" +#endif count = 0; iter = pkg->L_libs; while (iter != NULL) { - if (strcmp (iter->data, "-L/usr/lib") == 0 || - strcmp (iter->data, "-L /usr/lib") == 0) + if (strcmp (iter->data, "-L" SYSTEM_LIBDIR) == 0 || + strcmp (iter->data, "-L " SYSTEM_LIBDIR) == 0) { - debug_spew ("Package %s has -L/usr/lib in Libs\n", + debug_spew ("Package %s has -L" SYSTEM_LIBDIR " in Libs\n", pkg->name); if (g_getenv ("PKG_CONFIG_ALLOW_SYSTEM_LIBS") == NULL) { iter->data = NULL; ++count; - debug_spew ("Removing -L/usr/lib from libs for %s\n", pkg->key); + debug_spew ("Removing -L" SYSTEM_LIBDIR " from libs for %s\n", pkg->key); } } iter = iter->next; } +#undef SYSTEM_LIBDIR while (count) { -- 2.39.5