Skip to content

Commit

Permalink
autotools updates
Browse files Browse the repository at this point in the history
Run autoupdate.
Follow recommended practices.
Out with the old macros and in with the new.
Heed autoreconf --warn all.

Update po/Makevars from po/Makevars.template per strident autotools warning.

Simplify autogen.sh and squash autoconf by adding
AM_GNU_GETTEXT_VERSION to configure.ac.
  • Loading branch information
Barak A. Pearlmutter committed Feb 18, 2015
1 parent 65687c3 commit b452452
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 35 deletions.
22 changes: 4 additions & 18 deletions autogen.sh
@@ -1,23 +1,9 @@
#!/bin/sh

echo "Running libtoolize..."
libtoolize --copy --force --automake
set -e

echo "Running gettextize..."
gettextize --copy --force --no-changelog
mv Makefile.am~ Makefile.am
echo "Running autoreconf..."
autoreconf --install $*

echo "Running intltoolize..."
intltoolize --copy --force --automake
sed -e "s|\@INSTOBJEXT\@|.mo|" -i po/Makefile.in.in
sed -e "s|\@CATOBJEXT\@|.gmo|" -i po/Makefile.in.in
sed -e "s|\@GENCAT\@|gencat|" -i po/Makefile.in.in

echo "Running aclocal..."
aclocal -I m4

echo "Running autoconf..."
autoconf

echo "Running automake..."
automake -a --copy
intltoolize --force
22 changes: 10 additions & 12 deletions configure.ac
@@ -1,26 +1,24 @@
AC_INIT([DDC/CI control tool], [0.4.2],
[DDCControl users list <ddccontrol-users@lists.sourceforge.net>],
[ddccontrol])
AM_CONFIG_HEADER(src/config.h)
AM_INIT_AUTOMAKE

# Avoid automatic *.in file regeneration
AM_MAINTAINER_MODE
AC_INIT([DDC/CI control tool],[0.4.2],[DDCControl users list <ddccontrol-users@lists.sourceforge.net>],[ddccontrol])
AC_CONFIG_SRCDIR([src/ddccontrol/main.c])
AC_CONFIG_HEADERS([src/config.h])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([subdir-objects -Wall])

IT_PROG_INTLTOOL
AM_GNU_GETTEXT([external])
AM_GNU_GETTEXT_VERSION([0.19])
GETTEXT_PACKAGE=ddccontrol
AC_SUBST([GETTEXT_PACKAGE])

AC_PROG_RANLIB
AC_PROG_CC
AM_PROG_AR
AC_PROG_INSTALL
AC_PROG_LIBTOOL
AC_PROG_INTLTOOL
LT_INIT
PKG_PROG_PKG_CONFIG

AC_LANG([C])

AC_STDC_HEADERS
AC_HEADER_STDC
AC_CHECK_HEADERS([stdio.h unistd.h sys/time.h stdlib.h errno.h unistd.h string.h sys/types.h sys/stat.h fcntl.h sys/ioctl.h dirent.h], [], [AC_MSG_ERROR([Important header not found, please install it.], [1])], [])

check_xsltproc=yes
Expand Down
37 changes: 37 additions & 0 deletions po/Makevars
Expand Up @@ -20,6 +20,13 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# their copyright.
COPYRIGHT_HOLDER = Oleg I. Vdovikin and Nicolas Boichat

# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU = no

# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
Expand All @@ -39,3 +46,33 @@ MSGID_BUGS_ADDRESS = ddccontrol-devel@lists.sourceforge.net
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =

# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no

# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS =

# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =

# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = yes

# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = yes
2 changes: 1 addition & 1 deletion src/ddccontrol/Makefile.am
@@ -1,5 +1,5 @@
localedir = $(datadir)/locale
INCLUDES = -I@top_srcdir@/src/lib -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I@top_srcdir@/src/lib -DLOCALEDIR=\"$(localedir)\"

LDADD = ../lib/libddccontrol.la

Expand Down
2 changes: 1 addition & 1 deletion src/ddcpci/Makefile.am
@@ -1,4 +1,4 @@
INCLUDES = -I@top_srcdir@/src -I@top_srcdir@/src/lib -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I@top_srcdir@/src -I@top_srcdir@/src/lib -DLOCALEDIR=\"$(localedir)\"

bin_PROGRAMS = ddcpci
ddcpci_LDFLAGS = -Wl,-z,now
Expand Down
2 changes: 1 addition & 1 deletion src/gddccontrol/Makefile.am
@@ -1,5 +1,5 @@
localedir = $(datadir)/locale
INCLUDES = -I@top_srcdir@/src/lib -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I@top_srcdir@/src/lib -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"

EXTRA_DIST = gddccontrol.desktop.in gddccontrol.png gddccontrol-bluecurve.png

Expand Down
2 changes: 1 addition & 1 deletion src/gnome-ddcc-applet/Makefile.am
@@ -1,6 +1,6 @@

localedir = $(datadir)/locale
INCLUDES = -I@top_srcdir@/src/lib -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I@top_srcdir@/src/lib -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"

DDCC_LDADD = ../lib/libddccontrol.la

Expand Down
2 changes: 1 addition & 1 deletion src/lib/Makefile.am
@@ -1,5 +1,5 @@
localedir = $(datadir)/locale
INCLUDES = -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"
AM_CPPFLAGS = -I@top_srcdir@/src -DLOCALEDIR=\"$(localedir)\"

pkginclude_HEADERS = conf.h monitor_db.h ddcci.h ddcpci-ipc.h

Expand Down

0 comments on commit b452452

Please sign in to comment.