build fixes

master
Marc Wäckerlin 9 years ago
parent b84f834f8f
commit 6c80c84db6
  1. 45
      ChangeLog
  2. 121
      ax_check_qt.m4
  3. 113
      ax_init_standard_project.m4
  4. 7
      bootstrap.sh
  5. 2
      resolve-debbuilddeps.sh

@ -1,3 +1,48 @@
2015-10-20 12:54 marc
* doc/doxyfile.in, resolve-rpmbuilddeps.sh: no search engine for
redmine embedding
2015-09-11 11:10 marc
* resolve-rpmbuilddeps.sh: new feature resolve-rpmbuilddeps.sh
2015-09-11 10:42 marc
* ax_check_qt.m4, ax_init_standard_project.m4, bootstrap.sh,
build-resource-file.sh, resolve-debbuilddeps.sh,
resolve-rpmbuilddeps.sh: new feature resolve-rpmbuilddeps.sh
2015-09-01 09:22 marc
* debian/control.in: binutils-dev is always needed
2015-09-01 09:12 marc
* debian/control.in: build depends on libiberty-dev or binutils-dev
and libz-dev
2015-09-01 09:04 marc
* debian.changelog.in, debian.control.in, debian.rules.in,
debian/control.in: build depends on libiberty-dev
2015-08-17 12:18 marc
* ax_init_standard_project.m4, bootstrap.sh: Debian sid is mor
restrictive in time format
2015-07-31 10:45 marc
* ax_check_qt.m4, ax_init_standard_project.m4, bootstrap.sh,
mrw-c++.spec.in: fixed version number
2015-07-29 14:35 marc
* ChangeLog, debian, debian/changelog.in, debian/compat,
debian/control.in, debian/docs, debian/mrw-c++-dev.install,
debian/mrw-c++.install, debian/rules: new debian build
2015-07-29 12:27 marc 2015-07-29 12:27 marc
* ax_init_standard_project.m4, bootstrap.sh, mrw-c++.spec.in: build * ax_init_standard_project.m4, bootstrap.sh, mrw-c++.spec.in: build

@ -1,10 +1,10 @@
# SYNOPSIS # SYNOPSIS
# #
# Check if a module exists: # Check if a module exists:
# AX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) # AX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules] [flags])
# #
# Abort if a module does not exist: # Abort if a module does not exist:
# AX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules]) # AX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules] [flags])
# #
# DESCRIPTIONS # DESCRIPTIONS
# #
@ -35,6 +35,18 @@
# Optional list of more, optional modules, e.g. modules that # Optional list of more, optional modules, e.g. modules that
# exist only in Qt5, but not in Qt4, such as QtWidgets or # exist only in Qt5, but not in Qt4, such as QtWidgets or
# QtWebKitWidgets # QtWebKitWidgets
#
# flags
#
# Optional flages, space separated from this list:
#
# manualflags
#
# CXXFLAGS, CPPFLAGS and LIBS variables are not
# automatically expanded, but you need to add the
# qt_prefix_CXXFLAGS, qt_prefix_CPPFLAGS and qt_prefix_LIBS
# variables manually where you need them. This is useful,
# if some build targets need a feature and some don't.
AC_DEFUN([AX_CXX_QT_TOOL], [ AC_DEFUN([AX_CXX_QT_TOOL], [
@ -83,6 +95,7 @@ AC_DEFUN([AX_CXX_QT_TOOLS], [
AC_DEFUN([AX_CHECK_QT], [ AC_DEFUN([AX_CHECK_QT], [
qt_modules="$2" qt_modules="$2"
qt_modules_optional="$3" qt_modules_optional="$3"
qt_flags="$4"
AX_CXX_QT_TOOLS AX_CXX_QT_TOOLS
HAVE_$1=0 HAVE_$1=0
PKG_PROG_PKG_CONFIG PKG_PROG_PKG_CONFIG
@ -91,17 +104,37 @@ AC_DEFUN([AX_CHECK_QT], [
AC_DEFINE([HAVE_$1]) AC_DEFINE([HAVE_$1])
QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core) QTDIR=$(${PKG_CONFIG} --variable=prefix Qt5Core)
QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins
CPPFLAGS+=" ${[$1]5_CFLAGS}"
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
CXXFLAGS+=" ${[$1]5_CFLAGS}" [$1]_CPPFLAGS="${[$1]5_CFLAGS}"
LIBS+=" ${[$1]5_LIBS}" [$1]_CXXFLAGS="${[$1]5_CFLAGS}"
[$1]_LIBS="${[$1]5_LIBS}"
AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${qt_flags/manualflags/}" = "${qt_flags}"; then
CPPFLAGS+=" ${[$1]_CPPFLAGS}"
CXXFLAGS+=" ${[$1]_CXXFLAGS}"
LIBS+=" ${[$1]_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
PKG_REQUIREMENTS+=" ${qt_modules//Qt/Qt5}" PKG_REQUIREMENTS+=" ${qt_modules//Qt/Qt5}"
if test -n "${qt_modules_optional}"; then if test -n "${qt_modules_optional}"; then
PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [ PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [
CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" [$1]_CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
LIBS+=" ${[$1]5_OPTIONAL_LIBS}" [$1]_CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
[$1]_LIBS+=" ${[$1]5_OPTIONAL_LIBS}"
AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${qt_flags/manualflags/}" = "${qt_flags}"; then
CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
LIBS+=" ${[$1]5_OPTIONAL_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
PKG_REQUIREMENTS+=" ${qt_modules_optional//Qt/Qt5}" PKG_REQUIREMENTS+=" ${qt_modules_optional//Qt/Qt5}"
], [ ], [
AC_MSG_NOTICE([Not found: ${qt_modules_optional//Qt/Qt5}]) AC_MSG_NOTICE([Not found: ${qt_modules_optional//Qt/Qt5}])
@ -113,17 +146,36 @@ AC_DEFUN([AX_CHECK_QT], [
AC_DEFINE([HAVE_$1]) AC_DEFINE([HAVE_$1])
QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore) QTDIR=$(${PKG_CONFIG} --variable=prefix QtCore)
QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins
CPPFLAGS+=" ${$1_CFLAGS}"
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
CXXFLAGS+=" ${$1_CFLAGS}" [$1]_CPPFLAGS="${[$1]_CFLAGS}"
LIBS+=" ${$1_LIBS}" [$1]_CXXFLAGS="${[$1]_CFLAGS}"
AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${qt_flags/manualflags/}" = "${qt_flags}"; then
CPPFLAGS+=" ${[$1]_CPPFLAGS}"
CXXFLAGS+=" ${[$1]_CXXFLAGS}"
LIBS+=" ${[$1]_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
PKG_REQUIREMENTS+=" ${qt_modules}" PKG_REQUIREMENTS+=" ${qt_modules}"
if test -n "$3"; then if test -n "$3"; then
PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [ PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [
CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}" MOC_FLAGS+="${$1_OPTIONAL_CFLAGS}"
MOC_FLAGS+=" ${$1_OPTIONAL_CFLAGS}" [$1]_CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}" [$1]_CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
LIBS+=" ${$1_OPTIONAL_LIBS}" [$1]_LIBS+=" ${$1_OPTIONAL_LIBS}"
AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${qt_flags/manualflags/}" = "${qt_flags}"; then
CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
LIBS+=" ${$1_OPTIONAL_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
PKG_REQUIREMENTS+=" ${qt_modules_optional}" PKG_REQUIREMENTS+=" ${qt_modules_optional}"
], [ ], [
AC_MSG_NOTICE([Not found: ${qt_modules_optional}]) AC_MSG_NOTICE([Not found: ${qt_modules_optional}])
@ -133,7 +185,7 @@ AC_DEFUN([AX_CHECK_QT], [
]) ])
AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1) AM_CONDITIONAL(HAVE_$1, test $HAVE_[$1] -eq 1)
AX_CHECK_VALID_CXX_FLAG([-fPIC -fPIE], [position independent code flag]) AX_CHECK_VALID_CXX_FLAG([-fPIC -fPIE], [position independent code flag])
if test "${MINGW}" != "no"; then if test -n "${MINGW}"; then
AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag]) AX_CHECK_VALID_CXX_FLAG([-Wl,-subsystem,windows], [windows console flag])
fi fi
AC_SUBST(QTDIR) AC_SUBST(QTDIR)
@ -169,42 +221,8 @@ qrc_%.cxx: %.qrc
']) '])
# SYNOPSIS
#
# AX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
#
# DESCRIPTIONS
#
# qt_prefix
#
# Each call to AX_CHECK_QT should have a different prefix
# value (with a few exceptions discussed later on). This value,
# usually provided in uppercase, is used as prefix to the
# variables holding the compiler flags and libraries reported by
# pkg-config.
#
# For instance, if your prefix was to be FOO you'll be provided
# two variables FOO_CFLAGS and FOO_LIBS.
#
# This will also be used as message during the configure checks:
# checking for FOO....
#
# list-of-modules
#
# A single call to the macro can check for the presence of one or
# more qt modules; you'll see later how to make good use of this
# feature. Each entry in the list can have a version comparison
# specifier, with the same syntax as the Requires keyword in the
# data files themselves.
#
# optional-modules
#
# Optional list of more, optional modules, e.g. modules that
# exist only in Qt5, but not in Qt4, such as QtWidgets or
# QtWebKitWidgets
AC_DEFUN([AX_REQUIRE_QT], [ AC_DEFUN([AX_REQUIRE_QT], [
AX_CHECK_QT([$1], [$2], [$3]) AX_CHECK_QT([$1], [$2], [$3], [$4])
if ! test "$HAVE_$1" -eq 1; then if ! test "$HAVE_$1" -eq 1; then
AC_MSG_ERROR([Required Qt modules not found: $2]) AC_MSG_ERROR([Required Qt modules not found: $2])
fi fi
@ -213,7 +231,6 @@ AC_DEFUN([AX_REQUIRE_QT], [
# Omit Qt Keywords # Omit Qt Keywords
# AX_QT_NO_KEYWORDS # AX_QT_NO_KEYWORDS
AC_DEFUN([AX_QT_NO_KEYWORDS], [ AC_DEFUN([AX_QT_NO_KEYWORDS], [
CPPFLAGS+=" -DQT_NO_KEYWORDS" CPPFLAGS+=" -DQT_NO_KEYWORDS"
]) ])

@ -8,7 +8,16 @@ m4_define([mrw_esyscmd_s], [m4_normalize(m4_esyscmd([$1]))])
# define least version number from subversion's revision number: # define least version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX # it is taken modulo 256 due to a bug on Apple's MacOSX
m4_define(x_least, mrw_esyscmd_s([ m4_define(x_least, m4_ifdef([x_least_diff], mrw_esyscmd_s([
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then
SVN_REVISION=$(LANG= svn info $path | sed -n 's/Last Changed Rev: //p')
break;
fi
done
echo $ECHO_N $(($SVN_REVISION))
]), mrw_esyscmd_s([
SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout" SVN_REVISION="ERROR-UNDEFINED-REVISION-to-be-built-in-subdirectory-of-svn-checkout"
for path in . .. ../..; do for path in . .. ../..; do
if svn info $path 2>&1 > /dev/null; then if svn info $path 2>&1 > /dev/null; then
@ -18,7 +27,7 @@ m4_define(x_least, mrw_esyscmd_s([
done done
# Mac does not support LEAST > 255 # Mac does not support LEAST > 255
echo $ECHO_N $(($SVN_REVISION%256)) echo $ECHO_N $(($SVN_REVISION%256))
])) ])))
# define version number from subversion's revision number: # define version number from subversion's revision number:
# it is taken modulo 256 due to a bug on Apple's MacOSX # it is taken modulo 256 due to a bug on Apple's MacOSX
# add to x_minor if revision number is > 256 # add to x_minor if revision number is > 256
@ -34,7 +43,7 @@ m4_define(x_minor_diff, mrw_esyscmd_s([
echo $ECHO_N $(($SVN_REVISION/256)) echo $ECHO_N $(($SVN_REVISION/256))
])) ]))
# setup version number # setup version number
m4_define(x_version, [x_major.m4_eval(x_minor+x_minor_diff).x_least]) m4_define(x_version, [x_major.m4_ifdef([x_least_diff], x_minor, m4_eval(x_minor+x_minor_diff)).m4_eval(m4_ifdef([x_least_diff], [x_least-x_least_diff], [x_least]))])
## bugreport mail address is taken from <user@host> in first line of AUTHORS ## bugreport mail address is taken from <user@host> in first line of AUTHORS
m4_define(x_bugreport, mrw_esyscmd_s([ m4_define(x_bugreport, mrw_esyscmd_s([
@ -107,14 +116,27 @@ AC_DEFUN([AX_SUBST], [
# #
# configures the basic environment # configures the basic environment
AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
MINGW=no AC_MSG_CHECKING([target platfrom])
MAC=no UNIX=1
case $host in MINGW=
*mingw*) MINGW=yes;; MACOSX=
*darwin* | *rhapsody* | *macosx*) MAC=yes;; for h in ${target} ${target_os} ${host} ${host_os} \
esac ${build} ${build_os} $(uname -s 2> /dev/null); do
AM_CONDITIONAL(MINGW, test "$MINGW" = "yes") p="$h is generic Unix"
AM_CONDITIONAL(MAC, test "$MAC" = "yes") case "$h" in
(*mingw*)
UNIX=; MINGW=1; p="MinGW"; break;;
(*Darwin*|*darwin*|*rhapsody*|*macosx*)
UNIX=; MACOSX=1; p="MacOSX"; break;;
esac
done
AC_MSG_RESULT($p)
AM_CONDITIONAL(UNIX, test "$UNIX" = "1")
AM_CONDITIONAL(MINGW, test "$MINGW" = "1")
AM_CONDITIONAL(MACOSX, test "$MACOSX" = "1")
AX_SUBST(UNIX)
AX_SUBST(MINGW)
AX_SUBST(MACOSX)
AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'" AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_TARNAME//[^a-zA-Z0-9]/_}'"
AX_SUBST(NUMBERS) AX_SUBST(NUMBERS)
AX_SUBST(HOME) AX_SUBST(HOME)
@ -127,8 +149,17 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
AUTHOR=$(head -1 AUTHORS) AUTHOR=$(head -1 AUTHORS)
AX_SUBST(AUTHOR) AX_SUBST(AUTHOR)
_AM_SUBST_NOTMAKE([AUTHOR]) _AM_SUBST_NOTMAKE([AUTHOR])
DISTRO=$(lsb_release -sc) DISTRO=$(lsb_release -sc 2>/dev/null || uname -s 2>/dev/null)
AX_SUBST(DISTRO) AX_SUBST(DISTRO)
DISTRIBUTOR=$(lsb_release -si 2>/dev/null || uname -s 2>/dev/null)
case "${DISTRIBUTOR// /-}" in
(Ubuntu) UBUNTU=1; AX_SUBST(UBUNTU);;
(Debian) DEBIAN=1; AX_SUBST(DEBIAN);;
(SUSE-LINUX) SUSE=1; AX_SUBST(SUSE);;
(Fedora) FEDORA=1; AX_SUBST(FEDORA);;
(Centos) CENTOS=1; AX_SUBST(CENTOS);;
esac
AX_SUBST(DISTRIBUTOR)
BUILD_NUMBER=${BUILD_NUMBER:-1} BUILD_NUMBER=${BUILD_NUMBER:-1}
AX_SUBST(BUILD_NUMBER) AX_SUBST(BUILD_NUMBER)
BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z") BUILD_DATE=$(LANG= date +"%a, %d %b %Y %H:%M:%S %z")
@ -156,20 +187,36 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [
- all warnings result in an error - all warnings result in an error
- doxygen warnings are treated as error too]); fi - doxygen warnings are treated as error too]); fi
AC_ARG_ENABLE(debug,
[AS_HELP_STRING([--enable-debug],
[compile for debugger])],
[have_debug="$enableval"], [have_debug="no"])
AM_CONDITIONAL(DEBUG, test "$enableval" = "yes")
if test "$have_debug" == "yes"; then
AC_MSG_NOTICE([Debug compile mode enabled]);
AM_CPPFLAGS="${AM_CPPFLAGS} -DDEBUG"
AM_CXXFLAGS="${AM_CXXFLAGS:-} -ggdb3 -O0"
AM_LDFLAGS="${AM_LDFLAGS} -ggdb3 -O0"
else
AM_CPPFLAGS="${AM_CPPFLAGS} -DQT_NO_DEBUG_OUTPUT -DQT_NO_DEBUG"
fi
AC_CONFIG_FILES([makefile]) AC_CONFIG_FILES([makefile])
AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in]) AX_ADD_MAKEFILE_TARGET_DEP([clean-am], [clean-standard-project-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in]) AX_ADD_MAKEFILE_TARGET_DEP([distclean-am], [distclean-standard-project-targets], [makefile.in])
AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in]) AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-standard-project-targets], [makefile.in])
test -f makefile.in && sed -i '1iEXTRA_DIST = ' makefile.in
test -f makefile.in && cat >> makefile.in <<EOF test -f makefile.in && cat >> makefile.in <<EOF
#### Begin: Appended by $0 #### Begin: Appended by $0
EXTRA_DIST += bootstrap.sh EXTRA_DIST += bootstrap.sh ax_init_standard_project.m4 ax_cxx_compile_stdcxx_11.m4 \
ax_check_qt.m4 resolve-debbuilddeps.sh resolve-rpmbuilddeps.sh \
build-resource-file.sh mac-create-app-bundle.sh
clean-standard-project-targets: clean-standard-project-targets:
-rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION} -rm -rf \${PACKAGE_NAME}-\${PACKAGE_VERSION}
-rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz -rm \${PACKAGE_TARNAME}-\${PACKAGE_VERSION}.tar.gz
distclean-standard-project-targets: distclean-standard-project-targets:
-rm -r autom4te.cache -rm -r autom4te.cache
-rm aclocal.m4 config.guess config.sub configure depcomp compile install-sh ltmain.sh makefile missing mkinstalldirs -rm aclocal.m4 config.guess config.sub configure depcomp compile install-sh ltmain.sh makefile missing mkinstalldirs test-driver
maintainer-clean-standard-project-targets: maintainer-clean-standard-project-targets:
-rm makefile.in -rm makefile.in
#### End: $0 #### End: $0
@ -387,6 +434,8 @@ EOF
# $2 = module name (optional, if different from id) # $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)
# $5 = optional flags:
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged
# #
# uses PKG_CHECK_MODULES to test for a module # uses PKG_CHECK_MODULES to test for a module
# then, if given, looks for the header file # then, if given, looks for the header file
@ -395,6 +444,7 @@ EOF
# fails if not found # fails if not found
AC_DEFUN([AX_PKG_REQUIRE], [ AC_DEFUN([AX_PKG_REQUIRE], [
PKG_PROG_PKG_CONFIG PKG_PROG_PKG_CONFIG
optional_flags="$5"
$1_found=no $1_found=no
secondpar="m4_default([$2], [$1])" secondpar="m4_default([$2], [$1])"
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
@ -474,26 +524,47 @@ AC_DEFUN([AX_PKG_REQUIRE], [
AC_MSG_ERROR([Feature $1 not found please install module $secondpar]) AC_MSG_ERROR([Feature $1 not found please install module $secondpar])
fi fi
fi fi
CPPFLAGS+=" ${$1_CFLAGS}" [$1]_CPPFLAGS="${$1_CFLAGS}"
CXXFLAGS+=" ${$1_CFLAGS}" [$1]_CXXFLAGS="${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}" AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${optional_flags/manualflags/}" = "${optional_flags}"; then
CPPFLAGS+=" ${$1_CPPFLAGS}"
CXXFLAGS+=" ${$1_CXXFLAGS}"
LIBS+=" ${$1_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
]) ])
# check if a specific package exists # check if a specific package exists
# - parameter: # - parameter:
# $1 = unique id (no special characters) # $1 = unique id (no special characters)
# $2 = module name (optional, if different from id) # $2 = module name (optional, if different from id)
# $3 = optional flags:
# manualflags if CXXFLAGS, CPPFLAGS, LIBS should remain unchanged
# #
# uses PKG_CHECK_MODULES to test for a module # uses PKG_CHECK_MODULES to test for a module
# sets automake conditional HAVE_$1 to 0 (not found) or 1 (found) # sets automake conditional HAVE_$1 to 0 (not found) or 1 (found)
# sets all flags, so that the module can be used everywhere # sets all flags, so that the module can be used everywhere
AC_DEFUN([AX_PKG_CHECK], [ AC_DEFUN([AX_PKG_CHECK], [
optional_flags="$3"
PKG_PROG_PKG_CONFIG PKG_PROG_PKG_CONFIG
PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [
HAVE_$1=1 HAVE_$1=1
CPPFLAGS+=" ${$1_CFLAGS}" [$1]_CPPFLAGS="${$1_CFLAGS}"
CXXFLAGS+=" ${$1_CFLAGS}" [$1]_CXXFLAGS="${$1_CFLAGS}"
LIBS+=" ${$1_LIBS}" AC_SUBST([$1]_CPPFLAGS)
AC_SUBST([$1]_CXXFLAGS)
if test "${optional_flags/manualflags/}" = "${optional_flags}"; then
CPPFLAGS+=" ${$1_CPPFLAGS}"
CXXFLAGS+=" ${$1_CXXFLAGS}"
LIBS+=" ${$1_LIBS}"
AC_MSG_NOTICE([Adding flags for $1])
else
AC_MSG_NOTICE([To enable $1, add $1_CPPFLAGS, $1_CXXFLAGS and $1_LIBS])
fi
if test -z "$PKG_REQUIREMENTS"; then if test -z "$PKG_REQUIREMENTS"; then
PKG_REQUIREMENTS="m4_default([$2], [$1])" PKG_REQUIREMENTS="m4_default([$2], [$1])"
else else

@ -672,7 +672,7 @@ if testtag AX_USE_DOXYGEN; then
doxyreplace INLINE_SOURCES YES doxyreplace INLINE_SOURCES YES
doxyreplace GENERATE_TESTLIST YES doxyreplace GENERATE_TESTLIST YES
doxyreplace GENERATE_TREEVIEW NO doxyreplace GENERATE_TREEVIEW NO
doxyreplace SEARCHENGINE YES doxyreplace SEARCHENGINE NO
doxyreplace GENERATE_HTML YES doxyreplace GENERATE_HTML YES
doxyreplace GENERATE_LATEX NO doxyreplace GENERATE_LATEX NO
doxyreplace LATEX_BATCHMODE YES doxyreplace LATEX_BATCHMODE YES
@ -698,11 +698,12 @@ if testtag AX_USE_DEBIAN_PACKAGING; then
-- @AUTHOR@ @BUILD_DATE@ -- @AUTHOR@ @BUILD_DATE@
EOF EOF
BUILD_DEPENDS="debhelper, subversion, pkg-config, automake, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi)"
to debian/control.in <<EOF to debian/control.in <<EOF
Source: @PACKAGE_NAME@ Source: @PACKAGE_NAME@
Priority: extra Priority: extra
Maintainer: @AUTHOR@ Maintainer: @AUTHOR@
Build-Depends: debhelper, subversion, pkg-config, autotools-dev, lsb-release $(if testtag AX_USE_DOXYGEN; then echo -n ", doxygen, graphviz, mscgen"; fi; if testtag AX_USE_CPPUNIT; then echo -n ", libcppunit-dev"; fi; if testtag AX_CXX_QT || testtag AX_CHECK_QT AX_REQUIRE_QT; then echo -n ", qt5-default | qt4-default | qt5-qmake | qt4-qmake, qtbase5-dev | libqt4-dev, qtbase5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools, qttools5-dev-tools | qt4-dev-tools"; fi) Build-Depends: ${BUILD-DEPENDS}
Package: @PACKAGE_NAME@ Package: @PACKAGE_NAME@
Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi) Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi)
@ -716,7 +717,7 @@ $( if testtag AX_USE_LIBTOOL; then
Package: @PACKAGE_NAME@-dev Package: @PACKAGE_NAME@-dev
Section: libdevel Section: libdevel
Architecture: any Architecture: any
Depends: @PACKAGE_NAME@ (= \${binary:Version}) Depends: @PACKAGE_NAME@ (= \${binary:Version}), ${BUILD-DEPENDS}
Description: @DESCRIPTION@ - Development Package Description: @DESCRIPTION@ - Development Package
@README_DEB@ @README_DEB@
EOF2 EOF2

@ -15,8 +15,10 @@ SCHROOTNAME="$1"
sed 's,@[^@]*@, dummytext,g' debian/control.in > debian/control sed 's,@[^@]*@, dummytext,g' debian/control.in > debian/control
if test -n "${SCHROOTNAME}"; then if test -n "${SCHROOTNAME}"; then
schroot -c "${SCHROOTNAME}" -- apt-get install -y dpkg-dev
DEPS=$(schroot -c "${SCHROOTNAME}" -- dpkg-checkbuilddeps 2>&1 || true) DEPS=$(schroot -c "${SCHROOTNAME}" -- dpkg-checkbuilddeps 2>&1 || true)
else else
apt-get install -y dpkg-dev
DEPS=$(dpkg-checkbuilddeps 2>&1 || true) DEPS=$(dpkg-checkbuilddeps 2>&1 || true)
fi fi
DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}') DEPS=$(echo "$DEPS" | sed -n '/Unmet build dependencies/ { s,.*Unmet build dependencies: ,,g; s, ([^)]*),,g; s, *| *,|,g; p}')

Loading…
Cancel
Save