new qt features: language and resources
This commit is contained in:
@@ -145,6 +145,9 @@ AC_DEFUN([AX_CHECK_QT], [
|
|||||||
AC_SUBST(AM_CXXFLAGS)
|
AC_SUBST(AM_CXXFLAGS)
|
||||||
AC_SUBST(PKG_REQUIREMENTS)
|
AC_SUBST(PKG_REQUIREMENTS)
|
||||||
AX_ADDITIONAL_QT_RULES_HACK='
|
AX_ADDITIONAL_QT_RULES_HACK='
|
||||||
|
|
||||||
|
LANGUAGE_FILE_BASE ?= translations
|
||||||
|
|
||||||
ui_%.hxx: %.ui
|
ui_%.hxx: %.ui
|
||||||
$(UIC) -o [$][@] $<
|
$(UIC) -o [$][@] $<
|
||||||
|
|
||||||
@@ -152,9 +155,21 @@ moc_%.cxx: %.hxx
|
|||||||
$(MOC) $(MOC_FLAGS) -o [$][@] $<
|
$(MOC) $(MOC_FLAGS) -o [$][@] $<
|
||||||
|
|
||||||
qrc_%.cxx: %.qrc
|
qrc_%.cxx: %.qrc
|
||||||
$(RCC) -o [$][@] $<'
|
$(RCC) -o [$][@] -name ${<:%.qrc=%} $<
|
||||||
AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK)
|
AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK)
|
||||||
])
|
|
||||||
|
%.qrc: %
|
||||||
|
cwd=$(shell pwd) && cd $< && $(RCC) --project -o ${cwd}/[$][@]
|
||||||
|
|
||||||
|
%.qm: %.ts
|
||||||
|
${LRELEASE} $< -qm [$][@]
|
||||||
|
|
||||||
|
#%.ts: ${LANGUAGE_FILES}
|
||||||
|
# ${LUPDATE} -no-obsolete \
|
||||||
|
# -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \
|
||||||
|
# -ts [$][@] $<
|
||||||
|
|
||||||
|
'])
|
||||||
|
|
||||||
# SYNOPSIS
|
# SYNOPSIS
|
||||||
#
|
#
|
||||||
|
@@ -373,7 +373,7 @@ EOF
|
|||||||
# require a specific package, with fallback: test for a header
|
# require a specific package, with fallback: test for a header
|
||||||
# - parameter:
|
# - parameter:
|
||||||
# $1 = unique id (no special characters)
|
# $1 = unique id (no special characters)
|
||||||
# $2 = module name
|
# $2 = module name (optional, if different from id)
|
||||||
# $3 = a header file to find (optional)
|
# $3 = a header file to find (optional)
|
||||||
# $4 = alternative module names (space separated, optional)
|
# $4 = alternative module names (space separated, optional)
|
||||||
#
|
#
|
||||||
@@ -385,12 +385,13 @@ EOF
|
|||||||
AC_DEFUN([AX_PKG_REQUIRE], [
|
AC_DEFUN([AX_PKG_REQUIRE], [
|
||||||
PKG_PROG_PKG_CONFIG
|
PKG_PROG_PKG_CONFIG
|
||||||
$1_found=no
|
$1_found=no
|
||||||
PKG_CHECK_MODULES([$1], [$2], [
|
secondpar="m4_default([$2], [$1])"
|
||||||
$1_found=$2
|
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
|
||||||
PKG_REQUIREMENTS+=" $2"
|
$1_found=$secondpar
|
||||||
|
PKG_REQUIREMENTS+=" $secondpar"
|
||||||
], [
|
], [
|
||||||
if test -n "$4"; then
|
if test -n "$4"; then
|
||||||
AC_MSG_WARN([Recommended package $2 for feature $1 not installed, trying $4])
|
AC_MSG_WARN([Recommended package $secondpar for feature $1 not installed, trying $4])
|
||||||
for pkg in $4; do
|
for pkg in $4; do
|
||||||
PKG_CHECK_MODULES([$1], [$pkg], [
|
PKG_CHECK_MODULES([$1], [$pkg], [
|
||||||
PKG_REQUIREMENTS+=" $pkg"
|
PKG_REQUIREMENTS+=" $pkg"
|
||||||
@@ -450,12 +451,12 @@ AC_DEFUN([AX_PKG_REQUIRE], [
|
|||||||
if test "${$1_found}" = "no"; then
|
if test "${$1_found}" = "no"; then
|
||||||
if test -n "$3"; then
|
if test -n "$3"; then
|
||||||
if test -n "$4"; then
|
if test -n "$4"; then
|
||||||
AC_MSG_ERROR([Feature $1 not found, need header $3 in modules $2 or $4])
|
AC_MSG_ERROR([Feature $1 not found, need header $3 in modules $secondpar or $4])
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([Feature $1 not found, need header $3 in module $2])
|
AC_MSG_ERROR([Feature $1 not found, need header $3 in module $secondpar])
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([Feature $1 not found please install module $2])
|
AC_MSG_ERROR([Feature $1 not found please install module $secondpar])
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
AM_CPPFLAGS+=" ${$1_CFLAGS}"
|
AM_CPPFLAGS+=" ${$1_CFLAGS}"
|
||||||
|
@@ -307,7 +307,7 @@ to() {
|
|||||||
esac
|
esac
|
||||||
shift;
|
shift;
|
||||||
done
|
done
|
||||||
if checkfile "$1" && test $rebuild -eq 0 \
|
if checkfile "$1" && test $rebuild -eq 0 -o "$1" = "configure.ac" \
|
||||||
&& ! contains "$1" "${rebuildfiles[@]}"; then
|
&& ! contains "$1" "${rebuildfiles[@]}"; then
|
||||||
# file already exists and must not be rebuilt
|
# file already exists and must not be rebuilt
|
||||||
return 1
|
return 1
|
||||||
@@ -601,7 +601,7 @@ Maintainer: @AUTHOR@
|
|||||||
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi)
|
Build-Depends: debhelper, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CXX_CHECK_QT; then echo -n ", qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools"; fi)
|
||||||
|
|
||||||
Package: @PACKAGE_NAME@
|
Package: @PACKAGE_NAME@
|
||||||
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; fi)Architecture: any
|
$(if testtag AX_USE_LIBTOOL; then echo "Section: libs"; echo; fi)Architecture: any
|
||||||
Depends: \${shlibs:Depends}, \${misc:Depends}
|
Depends: \${shlibs:Depends}, \${misc:Depends}
|
||||||
Description: @DESCRIPTION@
|
Description: @DESCRIPTION@
|
||||||
@README_DEB@
|
@README_DEB@
|
||||||
|
Reference in New Issue
Block a user