shared: remove weston_config_get_libexec_dir()

Now that WESTON_MODULE_MAP supersedes WESTON_BUILD_DIR for libexec
binaries, we don't need to check in WESTON_BUILD_DIR anymore.

There was only one user of weston_config_get_libexec_dir(), so remove
the whole function. There is no reason to export it.

Due to libshared.la being pulled into libweston, this probably was
libweston ABI unintended. Regardless, libweston major has already been
bumped.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Reviewed-by: Emre Ucan <eucan@de.adit-jv.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
diff --git a/compositor/main.c b/compositor/main.c
index a801be8..2cb50c1 100644
--- a/compositor/main.c
+++ b/compositor/main.c
@@ -738,8 +738,7 @@
 	if (len > 0)
 		return strdup(path);
 
-	len = snprintf(path, sizeof path, "%s/%s",
-		       weston_config_get_libexec_dir(), name);
+	len = snprintf(path, sizeof path, "%s/%s", LIBEXECDIR, name);
 	if (len >= sizeof path)
 		return NULL;
 
diff --git a/shared/config-parser.c b/shared/config-parser.c
index 2a595b1..ae5f803 100644
--- a/shared/config-parser.c
+++ b/shared/config-parser.c
@@ -330,18 +330,6 @@
 	return 0;
 }
 
-WL_EXPORT
-const char *
-weston_config_get_libexec_dir(void)
-{
-	const char *path = getenv("WESTON_BUILD_DIR");
-
-	if (path)
-		return path;
-
-	return LIBEXECDIR;
-}
-
 const char *
 weston_config_get_name_from_env(void)
 {
diff --git a/shared/config-parser.h b/shared/config-parser.h
index af3f66a..5cb0bca 100644
--- a/shared/config-parser.h
+++ b/shared/config-parser.h
@@ -103,8 +103,6 @@
 weston_config_section_get_bool(struct weston_config_section *section,
 			       const char *key,
 			       int *value, int default_value);
-const char *
-weston_config_get_libexec_dir(void);
 
 const char *
 weston_config_get_name_from_env(void);