]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
configure: Add RPATH for freetype on NetBSD
authorVladimir Serbinenko <phcoder@gmail.com>
Thu, 24 Aug 2023 23:54:09 +0000 (01:54 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 13 Dec 2023 12:07:03 +0000 (13:07 +0100)
Without this build-time mkfont fails dynamic linking. This is not ideal
but improves the situation until a better solution is available.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
configure.ac

index 1fffe996da69145fcbd4e5770b525cb4c64cde67..8e16ce25f5db5e6705177d9641305ec7ad0d89ab 100644 (file)
@@ -1716,6 +1716,9 @@ if test x"$grub_mkfont_excuse" = x ; then
     CPPFLAGS="$SAVED_CPPFLAGS"
     LIBS="$SAVED_LIBS"
   ], [grub_mkfont_excuse=["need freetype2 library"]])
+  if test x"$grub_mkfont_excuse" = x && test x"$host_kernel" = xnetbsd ; then
+      FREETYPE_LIBS="$FREETYPE_LIBS -Wl,-R,/usr/pkg/lib" ;
+  fi
 fi
 
 if test x"$enable_grub_mkfont" = xyes && test x"$grub_mkfont_excuse" != x ; then
@@ -1770,6 +1773,11 @@ if test x"$grub_build_mkfont_excuse" = x ; then
     LIBS="$SAVED_LIBS"
     CPPFLAGS="$SAVED_CPPFLAGS_2"
   ], [grub_build_mkfont_excuse=["need freetype2 library"]])
+  if test x"$grub_build_mkfont_excuse" = x ; then
+    case x"$build_os" in
+      xnetbsd*) BUILD_FREETYPE_LIBS="$BUILD_FREETYPE_LIBS -Wl,-R,/usr/pkg/lib" ;;
+    esac
+  fi
   PKG_CONFIG="$SAVED_PKG_CONFIG"
 fi