diff --git a/src/Makefile.am b/src/Makefile.am index be9d9a9..736b956 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,3 +1,5 @@ +AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' + sbin_PROGRAMS=hdapsd hdapsd_SOURCES=hdapsd.c hdapsd.h input-helper.c input-helper.h hdapsd_CFLAGS=$(LIBCONFIG_CFLAGS) diff --git a/src/hdapsd.c b/src/hdapsd.c index 970b403..5d79dbb 100644 --- a/src/hdapsd.c +++ b/src/hdapsd.c @@ -398,6 +398,7 @@ void usage () printf("\n"); #ifdef HAVE_LIBCONFIG printf(" -c --cfgfile= Load configuration from .\n"); + printf(" By default, configuration is read from "CONFIG_FILE"\n"); #endif printf(" -d --device= is likely to be hda or sda.\n"); printf(" Can be given multiple times\n"); diff --git a/src/hdapsd.h b/src/hdapsd.h index 0fd3c5b..c7ceba1 100644 --- a/src/hdapsd.h +++ b/src/hdapsd.h @@ -1,7 +1,7 @@ #include #define PID_FILE "/var/run/hdapsd.pid" -#define CONFIG_FILE "/etc/hdapsd.conf" +#define CONFIG_FILE SYSCONFDIR"/hdapsd.conf" #define HDAPS_POSITION_FILE "/sys/devices/platform/hdaps/position" #define MOUSE_ACTIVITY_FILE "/sys/devices/platform/hdaps/keyboard_activity" #define KEYBD_ACTIVITY_FILE "/sys/devices/platform/hdaps/mouse_activity"