gprofng/ChangeLog
2022-06-28 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/29191
* src/Makefile.am: Use $(sysconfdir) instead $(prefix)/etc.
* src/Settings.cc: Likewise.
* src/Makefile.in: Rebuild.
ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
-AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"@localedir@\" -I.. -I$(srcdir) \
+LOCALEDIR = @localedir@
+SYSCONFDIR = @sysconfdir@
+
+AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
+ -DSYSCONFDIR=\"$(SYSCONFDIR)\" \
+ -I.. -I$(srcdir) \
-I$(srcdir)/../common \
-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
-I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
$(GPROFNG_LIBADD) \
$(PTHREAD_LIBS) -ldl
-dbedir = $(prefix)/etc
+dbedir = $(SYSCONFDIR)
dbe_DATA = $(srcdir)/gprofng.rc
# case both are empty.
ZLIB = @zlibdir@ -lz
ZLIBINC = @zlibinc@
-AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"@localedir@\" -I.. -I$(srcdir) \
+LOCALEDIR = @localedir@
+SYSCONFDIR = @sysconfdir@
+AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
+ -DSYSCONFDIR=\"$(SYSCONFDIR)\" \
+ -I.. -I$(srcdir) \
-I$(srcdir)/../common \
-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
-I../../bfd -I$(srcdir)/../../bfd $(ZLIBINC)
$(GPROFNG_LIBADD) \
$(PTHREAD_LIBS) -ldl
-dbedir = $(prefix)/etc
+dbedir = $(SYSCONFDIR)
dbe_DATA = $(srcdir)/gprofng.rc
gp_archive_SOURCES = gp-archive.cc ArchiveExp.cc
gp_archive_LDADD = $(LIBGPROFNG) $(CLOCK_GETTIME_LINK) $(ZLIB)
free (rc_path);
// Read system-wide file
- rc_path = dbe_sprintf (NTXT ("%s/../etc/gprofng.rc"), app->get_run_dir ());
+ rc_path = dbe_sprintf (NTXT ("%s/gprofng.rc"), SYSCONFDIR);
if (access (rc_path, R_OK | F_OK) != 0)
{
StringBuilder sb;