Commit d3ad746f authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #19682: gnome: update autotools/build system

parent 1b354fa4
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
SUBDIRS = src pixmaps tests man po doc data
CFLAGS=-Wall -Werror -Wextra
ACLOCAL_AMFLAGS = -I m4
GNOME_DOC=gnome-doc-utils.make
uidir=$(datadir)/sflphone/ui
ui_DATA=src/ui.xml
dist_noinst_DATA = $(gsettings_in_file)
EXTRA_DIST = sflphone.desktop.in $(GNOME_DOC) m4 $(ui_DATA) $(apps_DATA)
EXTRA_DIST = sflphone.desktop.in gnome-doc-utils.make m4 $(ui_DATA) $(apps_DATA)
appsdir = $(datadir)/applications
apps_in_files = sflphone.desktop.in
apps_DATA = $(apps_in_files:.desktop.in=.desktop)
DISTCLEANFILES= sflphone.desktop $(GNOME_DOC)
DISTCLEANFILES= sflphone.desktop gnome-doc-utils.make
#!/bin/sh -e
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
# Workaround for http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=565663
[ ! -e m4 ] && mkdir m4
test -n "$srcdir" || srcdir=`dirname "$0"`
test -n "$srcdir" || srcdir=.
command -v gnome-doc-prepare >/dev/null 2>&1 || { echo >&2 "Please install gnome-doc-utils. Aborting."; exit 1; }
OLDDIR=`pwd`
cd $srcdir
gnome-doc-prepare --force
autoreconf --force --install --verbose -Wall -I m4
AUTORECONF=`which autoreconf`
if test -z $AUTORECONF; then
echo "*** No autoreconf found, please intall it ***"
exit 1
fi
INTLTOOLIZE=`which intltoolize`
if test -z $INTLTOOLIZE; then
echo "*** No intltoolize found, please install the intltool package ***"
exit 1
fi
GNOMEDOC=`which yelp-build`
if test -z $GNOMEDOC; then
echo "*** The tools to build the documentation are not found,"
echo " please intall the yelp-tools package ***"
exit 1
fi
autopoint --force || exit $?
AUTOPOINT='intltoolize --automake --copy' autoreconf --force --install --verbose
cd $OLDDIR
test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"
AC_INIT([sflphone],[1.2.2],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
AC_CONFIG_HEADERS([config.h])
AM_INIT_AUTOMAKE
AC_PREREQ([2.64])
GNOME_DOC_INIT
AC_INIT([sflphone],[1.2.2],[sflphoneteam@savoirfairelinux.com],[sflphone-client-gnome])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_SRCDIR([configure.ac])
AC_CONFIG_MACRO_DIR([m4])
dnl Silent build by default. Use make V=1 to increase verbosity
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
AM_INIT_AUTOMAKE([1.11 -Wall -Wno-portability dist-xz no-define no-dist-gzip subdir-objects])
AM_SILENT_RULES([yes])
AM_MAINTAINER_MODE([enable])
GNOME_MAINTAINER_MODE_DEFINES
GNOME_COMPILE_WARNINGS([maximum])
AC_PROG_CC_C99
AM_PROG_CC_C_O dnl for per target flags, i.e. test_program_CFLAGS
AC_PROG_INSTALL
AC_HEADER_STDC
LT_INIT
# init libtool
LT_PREREQ([2.2.6])
LT_INIT(disable-static)
CFLAGS="$CFLAGS -Wall -Wextra -Wshadow"
......@@ -44,6 +52,10 @@ PKG_CHECK_MODULES(GTK, gtk+-3.0, [AC_MSG_NOTICE(Using gtk+-3.0)],
AC_SUBST([GETTEXT_PACKAGE], [$PACKAGE_TARNAME])
AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [GETTEXT package name])
IT_PROG_INTLTOOL([0.40.0])
AM_GNU_GETTEXT_VERSION([0.18])
AM_GNU_GETTEXT([external])
PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.24)
PKG_CHECK_MODULES(X11, x11)
......@@ -69,9 +81,9 @@ pixmaps/Makefile
sflphone.desktop
tests/Makefile
man/Makefile
po/Makefile
doc/Makefile
data/Makefile
po/Makefile.in
])
AC_OUTPUT
include $(top_srcdir)/gnome-doc-utils.make
dist-hook: doc-dist-hook
DOC_MODULE = sflphone
DOC_ENTITIES = legal.xml
......
ab
ar
ast
ca
da
de
el
es
fr
hu
it
ja
ko
nl
oc
pl
pt_BR
pt
ru
sv
te
tr
zh_CN
zh_HK
zh_TW
# loction of installation directories
locale_installdir=$(DESTDIR)$(datadir)/locale
DOMAIN=sflphone-client-gnome
POFILES=\
ab.po \
ar.po \
ast.po \
ca.po \
da.po \
de.po \
el.po \
es.po \
fr.po \
hu.po \
it.po \
ja.po \
ko.po \
nl.po \
oc.po \
pl.po \
pt_BR.po \
pt.po \
ru.po \
sv.po \
te.po \
tr.po \
zh_CN.po \
zh_HK.po \
zh_TW.po
MOFILES=\
ar.mo \
ast.mo \
ca.mo \
da.mo \
de.mo \
el.mo \
es.mo \
fr.mo \
hu.mo \
it.mo \
ja.mo \
ko.mo \
nl.mo \
oc.mo \
pl.mo \
pt_BR.mo \
pt.mo \
ru.mo \
sv.mo \
te.mo \
tr.mo \
zh_CN.mo \
zh_HK.mo \
zh_TW.mo
MSGFMT=msgfmt
# necessary files
EXTRA_DIST= $(POFILES) $(MOFILES)
all: $(MOFILES)
# tells automake that toto.po makes toto.mo
SUFFIXES=.po .mo
.po.mo:
$(MSGFMT) -o $@ $<
install-data-local: $(MOFILES)
catalogs='$(MOFILES)'; \
for i in $$catalogs; do \
destdir=$(locale_installdir); \
lang=`echo $$i | sed 's/\.mo//'`; \
$(mkinstalldirs) $(locale_installdir)/$$lang/LC_MESSAGES; \
$(INSTALL_DATA) $$i $(locale_installdir)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
echo "installing $$i as $(locale_installdir)/$$lang/LC_MESSAGES/$(DOMAIN).mo"; \
done
uninstall-local:
@catalogs='$(MOFILES)'; \
for i in $$catalogs; do \
destdir=$(locale_installdir); \
lang=`echo $$i | sed 's/\.mo//'`; \
rm -f $(locale_installdir)/$$lang/LC_MESSAGES/$(DOMAIN).mo; \
echo "removing $$i as $(locale_installdir)/$$lang/LC_MESSAGES/$(DOMAIN).mo"; \
done
clean-local:
rm -f $(MOFILES)
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns@gmail.com>
#
# This file may be copied and used freely without restrictions. It may
# be used in projects which are not available under a GNU Public License,
# but which still want to provide support for the GNU gettext functionality.
#
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
# instead of PACKAGE and to look for po2tbl in ./ not in intl/
#
# - Modified by jacob berkman <jacob@ximian.com> to install
# Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
#
# - Modified by Rodney Dawes <dobey.pwns@gmail.com> for use with intltool
#
# We have the following line for use by intltoolize:
# INTLTOOL_MAKEFILE
GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
SHELL = @SHELL@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = @top_builddir@
VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = @datadir@
datarootdir = @datarootdir@
libdir = @libdir@
DATADIRNAME = @DATADIRNAME@
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
subdir = po
install_sh = @install_sh@
# Automake >= 1.8 provides @mkdir_p@.
# Until it can be supposed, use the safe fallback:
mkdir_p = $(install_sh) -d
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
GENPOT = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
ALL_LINGUAS = @ALL_LINGUAS@
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
POTFILES = \
# This comment gets stripped out
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
.SUFFIXES:
.SUFFIXES: .po .pox .gmo .mo .msg .cat
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
INTLTOOL_V_MSGFMT = $(INTLTOOL__v_MSGFMT_$(V))
INTLTOOL__v_MSGFMT_= $(INTLTOOL__v_MSGFMT_$(AM_DEFAULT_VERBOSITY))
INTLTOOL__v_MSGFMT_0 = @echo " MSGFMT" $@;
.po.pox:
$(MAKE) $(GETTEXT_PACKAGE).pot
$(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
.po.mo:
$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
.po.gmo:
$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && gencat $@ $*.msg
all: all-@USE_NLS@
all-yes: $(CATALOGS)
all-no:
$(GETTEXT_PACKAGE).pot: $(POTFILES)
$(GENPOT)
install: install-data
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
$(mkdir_p) $$dir; \
if test -r $$lang.gmo; then \
$(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
echo "installing $(srcdir)/$$lang.gmo as" \
"$$dir/$(GETTEXT_PACKAGE).mo"; \
fi; \
if test -r $$lang.gmo.m; then \
$(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
if test -r $(srcdir)/$$lang.gmo.m ; then \
$(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
$$dir/$(GETTEXT_PACKAGE).mo.m; \
echo "installing $(srcdir)/$$lang.gmo.m as" \
"$$dir/$(GETTEXT_PACKAGE).mo.m"; \
else \
true; \
fi; \
fi; \
done
# Empty stubs to satisfy archaic automake needs
dvi info ctags tags CTAGS TAGS ID:
# Define this as empty until I found a useful application.
install-exec installcheck:
uninstall:
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
done
check: all $(GETTEXT_PACKAGE).pot
rm -f missing notexist
srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
if [ -r missing -o -r notexist ]; then \
exit 1; \
fi
mostlyclean:
rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
rm -f .intltool-merge-cache
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES stamp-it
rm -f *.mo *.msg *.cat *.cat.m *.gmo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f Makefile.in.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: $(DISTFILES)
dists="$(DISTFILES)"; \
extra_dists="$(EXTRA_DISTFILES)"; \
for file in $$extra_dists; do \
test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
done; \
for file in $$dists; do \
test -f $$file || file="$(srcdir)/$$file"; \
ln $$file $(distdir) 2> /dev/null \
|| cp -p $$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(GETTEXT_PACKAGE).pot
tmpdir=`pwd`; \
linguas="$(USE_LINGUAS)"; \
for lang in $$linguas; do \
echo "$$lang:"; \
result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
if $$result; then \
if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
rm -f $$tmpdir/$$lang.new.po; \
else \
if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
:; \
else \
echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
rm -f $$tmpdir/$$lang.new.po; \
exit 1; \
fi; \
fi; \
else \
echo "msgmerge for $$lang.gmo failed!"; \
rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
Makefile POTFILES: stamp-it
@if test ! -f $@; then \
rm -f stamp-it; \
$(MAKE) stamp-it; \
fi
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
$(SHELL) ./config.status
# Tell versions [3.59,3.63) of GNU make not to export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
# List of source files containing translatable strings.
# Please keep this file sorted alphabetically.
[encoding: UTF-8]
src/accountlist.c
src/actions.c
src/callable_obj.c
src/config/accountconfigdialog.c
src/config/accountlistconfigdialog.c
src/config/addressbook-config.c
src/config/assistant.c
src/config/audioconf.c
src/config/hooks-config.c
src/config/preferencesdialog.c
src/config/shortcuts-config.c
src/config/tlsadvanceddialog.c
src/config/zrtpadvanceddialog.c
src/contacts/searchbar.c
src/dbus/dbus.c
src/eel-gconf-extensions.c
src/main.c
src/mainwindow.c
src/sflnotify.c
src/sliders.c
src/statusicon.c
src/uimanager.c
......@@ -96,7 +96,7 @@ main(int argc, char *argv[])
// Start GTK application
gtk_init(&argc, &argv);
g_print("%s %s\n", PACKAGE, VERSION);
g_print("%s %s\n", PACKAGE_NAME, PACKAGE_VERSION);
g_print("\nCopyright (c) 2005 - 2012 Savoir-faire Linux Inc.\n\n");
g_print("This is free software. You may redistribute copies of it under the terms of\n" \
"the GNU General Public License Version 3 <http://www.gnu.org/licenses/gpl.html>.\n" \
......@@ -114,8 +114,8 @@ main(int argc, char *argv[])
srand(time(NULL));
// Internationalization
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
bindtextdomain(PACKAGE_NAME, LOCALEDIR);
textdomain(PACKAGE_NAME);
g_set_application_name("SFLphone");
SFLPhoneClient *client = sflphone_client_new();
......
......@@ -61,7 +61,6 @@ sflphone_client_new()
static void
sflphone_client_init(SFLPhoneClient *self)
{
g_print("init baby!");
self->settings = g_settings_new(SFLPHONE_GSETTINGS_SCHEMA);
self->win = 0;
}
......
......@@ -561,9 +561,9 @@ help_about(SFLPhoneClient *client)
"authors", authors,
"comments", _("SFLphone is a VoIP client compatible with SIP and IAX2 protocols."),
"copyright", "Copyright © 2004-2012 Savoir-faire Linux Inc.",
"name", PACKAGE,
"name", PACKAGE_NAME,
"title", _("About SFLphone"),
"version", VERSION,
"version", PACKAGE_VERSION,
"website", "http://www.sflphone.org",
NULL);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment