When --enable-relocatable was passed to "configure", "make check" failed
while building datasheet-test:
tests/data/datasheet-test.c: In function 'main':
tests/data/datasheet-test.c:880: error: 'INSTALLDIR' undeclared (first use in this function)
Line 880 of that file is:
set_program_name (argv[0]);
which is a little mysterious until one realizes that --enable-relocatable
defines set_program_name() as a macro that expands to a value that includes
INSTALLDIR.
So this commit fixes the problem by making sure that INSTALLDIR is defined
as part of CPPFLAGS for all compiles.
DISTCLEANFILES = ./po/stamp-po xconfigure
BUILT_SOURCES =
-AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_builddir)/gl
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/gl \
+ -I$(top_builddir)/gl \
+ -DINSTALLDIR=\"$(bindir)\" \
+ -DDOCDIR=\"$(docdir)\"
AM_CFLAGS=
bin_PROGRAMS += src/ui/gui/psppire
-src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) -Wall \
- -DINSTALLDIR=\"$(bindir)\" \
- -DDOCDIR=\"$(docdir)\" \
- -DGDK_MULTIHEAD_SAFE=1
+src_ui_gui_psppire_CFLAGS = $(GTK_CFLAGS) -Wall -DGDK_MULTIHEAD_SAFE=1
src_ui_gui_psppire_LDFLAGS = \
src/ui/terminal/terminal-opts.h
-src_ui_terminal_libui_la_CFLAGS = -DINSTALLDIR=\"$(bindir)\" $(NCURSES_CFLAGS)
+src_ui_terminal_libui_la_CFLAGS = $(NCURSES_CFLAGS)
bin_PROGRAMS += src/ui/terminal/pspp
src/libpspp/float-format.c \
tests/dissect-sysfile.c
tests_dissect_sysfile_LDADD = gl/libgl.la @LIBINTL@
-tests_dissect_sysfile_CPPFLAGS = $(AM_CPPFLAGS) -DINSTALLDIR=\"$(bindir)\"
EXTRA_DIST += \
$(dist_TESTS) \