summaryrefslogtreecommitdiffstats
path: root/patches/libpaper-1.1.24+nmu5/0001-Make-the-default-paper-configurable.patch
blob: aad9f5a80344d834d21930717fd46983ef2da198 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Juergen Borleis <juergen@kreuzholzen.de>
Date: Tue, 1 Jan 2019 22:12:43 +0100
Subject: [PATCH] Make the default paper configurable

For embedded systems it makes sense to be able to configure the default
paper name at build-time instead of run-time via environment variable.

Signed-off-by: Juergen Borleis <juergen@kreuzholzen.de>
---
 configure.ac | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index b6e937163775..34342d1f9295 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,14 @@ AC_SUBST(PAPERCONFVAR)
 AH_TEMPLATE(PAPERCONFVAR, [Environment variable that overrides the default configuration file location])
 AC_DEFINE_UNQUOTED(PAPERCONFVAR, "$PAPERCONFVAR")
 
-PAPERSIZE=letter
+AC_MSG_CHECKING([which paper format name is the default one])
+AC_ARG_WITH([default-paper],
+	[AS_HELP_STRING([--with-default-paper=@<:@name@:>@], [build with default paper name @<:@default=letter@:>@])],
+	[],
+	[with_default_paper=letter])
+AC_MSG_RESULT([${with_default_paper}])
+
+PAPERSIZE=${with_default_paper}
 AC_SUBST(PAPERSIZE)
 AH_TEMPLATE(PAPERSIZE, [Default paper size])
 AC_DEFINE_UNQUOTED(PAPERSIZE, "$PAPERSIZE")