new qt features: language and resources

master
Marc Wäckerlin 9 years ago
parent 919f975c61
commit 024ea7cdfa
  1. 19
      ax_check_qt.m4
  2. 17
      ax_init_standard_project.m4
  3. 4
      bootstrap.sh

@ -145,6 +145,9 @@ AC_DEFUN([AX_CHECK_QT], [
AC_SUBST(AM_CXXFLAGS)
AC_SUBST(PKG_REQUIREMENTS)
AX_ADDITIONAL_QT_RULES_HACK='
LANGUAGE_FILE_BASE ?= translations
ui_%.hxx: %.ui
$(UIC) -o [$][@] $<
@ -152,9 +155,21 @@ moc_%.cxx: %.hxx
$(MOC) $(MOC_FLAGS) -o [$][@] $<
qrc_%.cxx: %.qrc
$(RCC) -o [$][@] $<'
$(RCC) -o [$][@] -name ${<:%.qrc=%} $<
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
#

@ -373,7 +373,7 @@ EOF
# require a specific package, with fallback: test for a header
# - parameter:
# $1 = unique id (no special characters)
# $2 = module name
# $2 = module name (optional, if different from id)
# $3 = a header file to find (optional)
# $4 = alternative module names (space separated, optional)
#
@ -385,12 +385,13 @@ EOF
AC_DEFUN([AX_PKG_REQUIRE], [
PKG_PROG_PKG_CONFIG
$1_found=no
PKG_CHECK_MODULES([$1], [$2], [
$1_found=$2
PKG_REQUIREMENTS+=" $2"
secondpar="m4_default([$2], [$1])"
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
$1_found=$secondpar
PKG_REQUIREMENTS+=" $secondpar"
], [
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
PKG_CHECK_MODULES([$1], [$pkg], [
PKG_REQUIREMENTS+=" $pkg"
@ -450,12 +451,12 @@ AC_DEFUN([AX_PKG_REQUIRE], [
if test "${$1_found}" = "no"; then
if test -n "$3"; 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
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
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
AM_CPPFLAGS+=" ${$1_CFLAGS}"

@ -307,7 +307,7 @@ to() {
esac
shift;
done
if checkfile "$1" && test $rebuild -eq 0 \
if checkfile "$1" && test $rebuild -eq 0 -o "$1" = "configure.ac" \
&& ! contains "$1" "${rebuildfiles[@]}"; then
# file already exists and must not be rebuilt
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)
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}
Description: @DESCRIPTION@
@README_DEB@

Loading…
Cancel
Save