diff --git a/Makefile.am b/Makefile.am index e83773f9..a674e021 100644 --- a/Makefile.am +++ b/Makefile.am @@ -18,7 +18,7 @@ pixmap_DATA = htop.png appicondir = $(datadir)/icons/hicolor/scalable/apps appicon_DATA = htop.svg -AM_CFLAGS += -pedantic -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"$(sysconfdir)\" -I"$(top_srcdir)/$(my_htop_platform)" +AM_CFLAGS += -pedantic -std=c99 -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR="\"$(sysconfdir)\"" -I"$(top_srcdir)/$(my_htop_platform)" AM_LDFLAGS = myhtopsources = \ diff --git a/Settings.c b/Settings.c index a2bb0962..6c8f8894 100644 --- a/Settings.c +++ b/Settings.c @@ -424,10 +424,7 @@ Settings* Settings_new(int initialCpuCount) { } if (!ok) { this->changed = true; - // TODO: how to get SYSCONFDIR correctly through Autoconf? - char* systemSettings = String_cat(SYSCONFDIR, "/htoprc"); - ok = Settings_read(this, systemSettings, initialCpuCount); - free(systemSettings); + ok = Settings_read(this, SYSCONFDIR "/htoprc", initialCpuCount); } if (!ok) { Settings_defaultMeters(this, initialCpuCount);