AC_SUBST([DRIVER_NAME])
AC_SUBST([moduledir])
AC_DEFINE_DIR([PREFIX_PATH], prefix, [installation prefix])
+AC_DEFINE_DIR([LIBEXEC_PATH], libexecdir, [libexec directory])
AC_CONFIG_FILES([
Makefile
* Either way, we have to trust that it is our backlight-helper
* that is run and that we have scrutinised it carefully.
*/
- if (stat(PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper", &st))
+ if (stat(LIBEXEC_PATH "/xf86-video-intel-backlight-helper", &st))
return 0;
if ((st.st_mode & (S_IFREG | S_ISUID | S_IXUSR)) != (S_IFREG | S_ISUID | S_IXUSR)) {
close(fds[0]);
if (use_pkexec) {
execlp("pkexec", "pkexec",
- PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper",
+ LIBEXEC_PATH "/xf86-video-intel-backlight-helper",
iface, (char *)0);
} else {
- execle(PREFIX_PATH "/libexec/xf86-video-intel-backlight-helper",
+ execle(LIBEXEC_PATH "/xf86-video-intel-backlight-helper",
"xf86-video-intel-backlight-helper",
iface, (char *)0, env);
}
$(NULL)
drivermandir = $(DRIVER_MAN_DIR)
-backlight_helperdir = $(prefix)/libexec
policydir = $(datarootdir)/polkit-1/actions
if BUILD_TOOLS
endif
if BUILD_BACKLIGHT_HELPER
-backlight_helper_PROGRAMS = xf86-video-intel-backlight-helper
+libexec_PROGRAMS = xf86-video-intel-backlight-helper
nodist_policy_DATA = org.x.xf86-video-intel.backlight-helper.policy
-backlight_helper = $(backlight_helperdir)/xf86-video-intel-backlight-helper
-install-data-hook:
- -chown root $(backlight_helper) && chmod u+s $(backlight_helper)
+backlight_helper = $(libexecdir)/xf86-video-intel-backlight-helper
+install-exec-hook:
+ -chown root $(DESTDIR)$(backlight_helper) && chmod u+s $(DESTDIR)$(backlight_helper)
endif
intel_virtual_output_CFLAGS = \
<allow_inactive>no</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
- <annotate key="org.freedesktop.policykit.exec.path">@prefix@/libexec/xf86-video-intel-backlight-helper</annotate>
+ <annotate key="org.freedesktop.policykit.exec.path">@LIBEXEC_PATH@/xf86-video-intel-backlight-helper</annotate>
</action>
</policyconfig>