[Pkg-wmaker-commits] [wmclock] 11/66: wmclock: Choose language with ./configure.
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Thu Aug 20 10:52:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository wmclock.
commit 1ca356a77a0f54c5e42ffd13939b7decf5c068ee
Author: Doug Torrance <dtorrance at monmouthcollege.edu>
Date: Thu Dec 11 09:18:13 2014 -0600
wmclock: Choose language with ./configure.
This is a feature that was present in the pre-autotools configure script.
Note a syntax change:
./configure --lang foo
is now
./configure --with-lang=foo
Also remove the .xpm files in the root directory, as they are created during
configuration.
---
Makefile.am | 2 +-
configure.ac | 20 ++++++++++++++++++++
month.xpm | 1 -
weekday.xpm | 1 -
4 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f3a9e55..52b18db 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
bin_PROGRAMS = wmclock
-wmclock_SOURCES = dynlist.c dynlist.h wmclock.c month.xpm weekday.xpm \
+wmclock_SOURCES = dynlist.c dynlist.h wmclock.c \
xpm/date.xpm xpm/led.xpm xpm/mask.xbm xpm/mask.xbm
AM_CFLAGS = $(x11_CFLAGS) $(xpm_CFLAGS) $(xext_CFLAGS)
LIBS += $(x11_LIBS) $(xpm_LIBS) $(xext_LIBS)
diff --git a/configure.ac b/configure.ac
index 9e3a682..b24bc23 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,26 @@ AC_INIT([wmclock], [1.0.14])
AM_INIT_AUTOMAKE([foreign subdir-objects])
AC_CONFIG_SRCDIR([configure.ac])
AC_PROG_CC
+
+define([langlist], esyscmd([ls -d lang.* | sed 's/lang.//']))
+AC_ARG_WITH([lang],
+ AS_HELP_STRING([--with-lang],
+ [Configure wmclock to use day and month names for the specified
+ language. Defaults to 'english'. Choices are: ]
+ langlist),
+ [],
+ [with_lang=english])
+
+LangDir="lang.${with_lang}"
+if test ! -d "${LangDir}"; then
+ AC_MSG_ERROR([Cannot find language directory '${LangDir}'.])
+fi
+
+echo "configuring for ${with_lang} day-of-week and month names..."
+rm -f month.xpm weekday.xpm
+ln -s "./${LangDir}/month.xpm" .
+ln -s "./${LangDir}/weekday.xpm" .
+
PKG_CHECK_MODULES([x11], [x11])
PKG_CHECK_MODULES([xpm], [xpm])
PKG_CHECK_MODULES([xext], [xext])
diff --git a/month.xpm b/month.xpm
deleted file mode 120000
index 9d65086..0000000
--- a/month.xpm
+++ /dev/null
@@ -1 +0,0 @@
-./lang.english/month.xpm
\ No newline at end of file
diff --git a/weekday.xpm b/weekday.xpm
deleted file mode 120000
index f7e9add..0000000
--- a/weekday.xpm
+++ /dev/null
@@ -1 +0,0 @@
-./lang.english/weekday.xpm
\ No newline at end of file
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmclock.git
More information about the Pkg-wmaker-commits
mailing list