From 10f6d13da36e075169a45bf9172ae02dca51821b Mon Sep 17 00:00:00 2001
From: Alexander Schwinn <alexxcons@xfce.org>
Date: Tue, 10 May 2022 22:36:43 +0200
Subject: [PATCH] Add configure option to set thunarx default dirs

Related: #771
---
 configure.ac.in     | 10 ++++++++++
 thunarx/Makefile.am |  2 +-
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/configure.ac.in b/configure.ac.in
index 09efbfe6d..f89172c0c 100644
--- a/configure.ac.in
+++ b/configure.ac.in
@@ -106,6 +106,16 @@ AC_ARG_WITH([helper-path-prefix],
             [HELPER_PATH_PREFIX="$libdir"])
 AC_SUBST([HELPER_PATH_PREFIX])
 
+dnl ***************************************
+dnl *** Set default thunarx directories ***
+dnl ***************************************
+AC_ARG_WITH([thunarx-dirs],
+            [AS_HELP_STRING([--with-thunarx-dirs=PATH],
+                            [Used to set different default paths (separated by colon) for thunarx plugin lookup])],
+            [DEFAULT_THUNARX_DIRS="$withval"],
+            [DEFAULT_THUNARX_DIRS="$libdir/thunarx-$THUNARX_VERSION_API"])
+AC_SUBST([DEFAULT_THUNARX_DIRS])
+
 dnl *******************************************************
 dnl *** Optional support for custom thunarx directories ***
 dnl *******************************************************
diff --git a/thunarx/Makefile.am b/thunarx/Makefile.am
index 8af6a80a7..462fc2ed8 100644
--- a/thunarx/Makefile.am
+++ b/thunarx/Makefile.am
@@ -2,7 +2,7 @@ AM_CPPFLAGS =								\
 	-I$(top_srcdir)							\
 	-DG_LOG_DOMAIN=\"thunarx\"					\
 	-DTHUNARX_COMPILATION						\
-	-DTHUNARX_DIRECTORY=\"$(libdir)/thunarx-$(THUNARX_VERSION_API)\"	\
+	-DTHUNARX_DIRECTORY=\"$(DEFAULT_THUNARX_DIRS)\"	\
 	-DTHUNARX_ENABLE_CUSTOM_DIRS=\"$(CUSTOM_THUNARX_DIRS_ENABLED)\"	\
 	$(PLATFORM_CPPFLAGS)
 
-- 
GitLab