From 18a34d78737374627f1128be3b66c8ddd95bdb0e Mon Sep 17 00:00:00 2001 From: rbuj Date: Mon, 25 Jan 2021 23:12:55 +0100 Subject: build: Use config.h which defines GETTEXT_PACKAGE & VERSION --- configure.ac | 5 ++++- src/Makefile.am | 2 -- src/mate-calc.c | 4 ++++ src/math-window.c | 4 ++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 616f28c..c1c7203 100644 --- a/configure.ac +++ b/configure.ac @@ -52,7 +52,10 @@ dnl ########################################################################### AM_GNU_GETTEXT_VERSION([0.19.8]) AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.8]) AM_GNU_GETTEXT([external]) -AC_SUBST(GETTEXT_PACKAGE, mate-calc) + +GETTEXT_PACKAGE=AC_PACKAGE_NAME +AC_SUBST(GETTEXT_PACKAGE) +AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE",[the gettext translation domain]) # ********************** # GLIB_COMPILE_RESOURCES diff --git a/src/Makefile.am b/src/Makefile.am index 24b8a2e..4ef161a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -4,9 +4,7 @@ noinst_PROGRAMS = test-mp test-mp-equation TESTS = test-mp test-mp-equation AM_CPPFLAGS = \ - -DVERSION=\""$(VERSION)"\" \ -DLOCALE_DIR=\""$(localedir)"\" \ - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ $(WARN_CFLAGS) \ $(MATE_CALC_CFLAGS) diff --git a/src/mate-calc.c b/src/mate-calc.c index b12ab79..99224ba 100644 --- a/src/mate-calc.c +++ b/src/mate-calc.c @@ -9,6 +9,10 @@ * license. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include diff --git a/src/math-window.c b/src/math-window.c index f627c65..9dc8f67 100644 --- a/src/math-window.c +++ b/src/math-window.c @@ -9,6 +9,10 @@ * license. */ +#ifdef HAVE_CONFIG_H +#include +#endif + #include #include #include -- cgit v1.2.1