Blob Blame History Raw
--- shared/usmisc.cpp.orig	2008-06-23 13:17:32.000000000 +0200
+++ shared/usmisc.cpp	2008-06-23 13:19:16.000000000 +0200
@@ -318,12 +318,17 @@
 	//find the absolute path
 	//very long paths might cause segfaults
 	CString absdir = getAbsDir(DataDir);
+#if 0
+	CString localedir = absdir + "lang";
+#else
+	CString localedir = LOCALE_DIR;
+#endif
 
 	//select the Ultimate Stunts domain
 	//We can only use ISO 8859-1 because of the font texture
-	printf("  Package %s, directory %s\n", PACKAGE, (absdir + "lang").c_str());
+	printf("  Package %s, directory %s\n", PACKAGE, localedir.c_str());
 	printf("  bindtextdomain returns %s\n",
-	    bindtextdomain(PACKAGE, (absdir + "lang").c_str())
+	    bindtextdomain(PACKAGE, localedir.c_str())
 	    );
 	printf("  bind_textdomain_codeset returns %s\n",
 	    bind_textdomain_codeset(PACKAGE, "ISO-8859-1")
--- shared/Makefile.am.orig	2008-06-23 13:15:08.000000000 +0200
+++ shared/Makefile.am	2008-06-23 13:46:21.000000000 +0200
@@ -2,6 +2,7 @@
 
 libshared_a_SOURCES = binbuffer.cpp bthread.cpp cfile.cpp cstring.cpp datafile.cpp datamanager.cpp dataobject.cpp generalmatrix.cpp generalvector.cpp glbfile.cpp hello.cpp ipnumber.cpp lconfig.cpp matrix.cpp timer.cpp usmisc.cpp vector.cpp
 INCLUDES = -I$(top_srcdir)/intl $(all_includes)
+AM_CXXFLAGS = -DLOCALE_DIR=\"$(datadir)/locale\"
 
 EXTRA_DIST = binbuffer.cpp binbuffer.h bthread.cpp bthread.h cfile.cpp cfile.h cstring.cpp cstring.h datafile.cpp datafile.h datamanager.cpp datamanager.h dataobject.cpp dataobject.h filecontrol.h generalmatrix.cpp generalmatrix.h generalvector.cpp generalvector.h glbfile.cpp glbfile.h hello.cpp hello.h lconfig.cpp lconfig.h matrix.cpp matrix.h pi.h timer.cpp timer.h usmisc.cpp usmisc.h vector.cpp vector.h
 
--- shared/Makefile.in.orig	2008-06-23 13:15:08.000000000 +0200
+++ shared/Makefile.in	2008-06-23 13:49:18.000000000 +0200
@@ -230,6 +230,7 @@
 noinst_LIBRARIES = libshared.a
 libshared_a_SOURCES = binbuffer.cpp bthread.cpp cfile.cpp cstring.cpp datafile.cpp datamanager.cpp dataobject.cpp generalmatrix.cpp generalvector.cpp glbfile.cpp hello.cpp ipnumber.cpp lconfig.cpp matrix.cpp timer.cpp usmisc.cpp vector.cpp
 INCLUDES = -I$(top_srcdir)/intl $(all_includes)
+AM_CXXFLAGS = -DLOCALE_DIR=\"$(datadir)/locale\"
 EXTRA_DIST = binbuffer.cpp binbuffer.h bthread.cpp bthread.h cfile.cpp cfile.h cstring.cpp cstring.h datafile.cpp datafile.h datamanager.cpp datamanager.h dataobject.cpp dataobject.h filecontrol.h generalmatrix.cpp generalmatrix.h generalvector.cpp generalvector.h glbfile.cpp glbfile.h hello.cpp hello.h lconfig.cpp lconfig.h matrix.cpp matrix.h pi.h timer.cpp timer.h usmisc.cpp usmisc.h vector.cpp vector.h
 all: all-am