Fixed problems when building with --enable-relocatable
authorJohn Darrington <john@darrington.wattle.id.au>
Tue, 7 Oct 2008 11:40:56 +0000 (19:40 +0800)
committerBen Pfaff <blp@gnu.org>
Fri, 10 Oct 2008 04:09:16 +0000 (21:09 -0700)
Added the INSTALLDIR macro to tests/dissect-sysfile.
Relocated the pathname of the splash screen graphic.

src/ui/gui/main.c
tests/automake.mk

index a3d394618c5e4662113863915fb47e6db16eb090..eca3f98f6866d9ddeb1a44133914c427f4bfad14 100644 (file)
@@ -20,6 +20,7 @@
 #include "progname.h"
 #include <stdlib.h>
 #include <getopt.h>
+#include <gl/relocatable.h>
 
 #include <libpspp/version.h>
 #include <libpspp/copyleft.h>
@@ -45,7 +46,7 @@ create_splash_window (void)
   gtk_window_set_type_hint (GTK_WINDOW (splash),
                            GDK_WINDOW_TYPE_HINT_SPLASHSCREEN);
 
-  image = gtk_image_new_from_file (PKGDATADIR "/splash.png");
+  image = gtk_image_new_from_file (relocate (PKGDATADIR "/splash.png"));
 
   gtk_container_add (GTK_CONTAINER (splash), image);
 
index 6fb11d02e46d12735160bf74754c4b38b71cf6a0..bfca93d4b90218fc00bcb57ad65e17fd5e22b15d 100644 (file)
@@ -270,6 +270,7 @@ tests_dissect_sysfile_SOURCES = \
        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) \