diff --git a/ax_check_qt.m4 b/ax_check_qt.m4 index def2d92..21c8104 100644 --- a/ax_check_qt.m4 +++ b/ax_check_qt.m4 @@ -75,19 +75,19 @@ AC_DEFUN([AX_CXX_QT_TOOLS], [ AC_DEFUN([AX_CHECK_VALID_FLAG], [ AC_MSG_CHECKING([m4_default([$2], [for valid flag in "$1"])]) - save_cxxflags="$CXXFLAGS" + save_cppflags="$CPPFLAGS" newflag="no" for test_flag in $1; do - CXXFLAGS+=" ${test_flag}" + CPPFLAGS+=" ${test_flag}" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], [ newflag="$test_flag" - AM_CXXFLAGS+=" ${test_flag}" - CXXFLAGS="$save_cxxflags" + CPPFLAGS="$save_cppflags" + CPPFLAGS+=" ${test_flag}" break; ]) - CXXFLAGS="$save_cxxflags" + CPPFLAGS="$save_cppflags" done - AC_SUBST(AM_CXXFLAGS) + AC_SUBST(CPPFLAGS) AC_MSG_RESULT([$newflag]) ]) @@ -100,16 +100,16 @@ AC_DEFUN([AX_CHECK_QT], [ PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) - AM_CPPFLAGS+=" ${[$1]5_CFLAGS}" + CPPFLAGS+=" ${[$1]5_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" - AM_CXXFLAGS+=" ${[$1]5_CFLAGS}" + CXXFLAGS+=" ${[$1]5_CFLAGS}" LIBS+=" ${[$1]5_LIBS}" PKG_REQUIREMENTS+=" ${qt_modules//Qt/Qt5}" if test -n "${qt_modules_optional}"; then PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [ - AM_CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" + CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" - AM_CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" + CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}" LIBS+=" ${[$1]5_OPTIONAL_LIBS}" PKG_REQUIREMENTS+=" ${qt_modules_optional//Qt/Qt5}" ], [ @@ -120,16 +120,16 @@ AC_DEFUN([AX_CHECK_QT], [ PKG_CHECK_MODULES([$1], [${qt_modules}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) - AM_CPPFLAGS+=" ${$1_CFLAGS}" + CPPFLAGS+=" ${$1_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" - AM_CXXFLAGS+=" ${$1_CFLAGS}" + CXXFLAGS+=" ${$1_CFLAGS}" LIBS+=" ${$1_LIBS}" PKG_REQUIREMENTS+=" ${qt_modules}" if test -n "$3"; then PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [ - AM_CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}" + CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}" MOC_FLAGS+=" ${$1_OPTIONAL_CFLAGS}" - AM_CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}" + CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}" LIBS+=" ${$1_OPTIONAL_LIBS}" PKG_REQUIREMENTS+=" ${qt_modules_optional}" ], [ @@ -140,9 +140,9 @@ AC_DEFUN([AX_CHECK_QT], [ ]) AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) AX_CHECK_VALID_FLAG([-fPIC -fPIE], [position independent code flag]) - AC_SUBST(AM_CPPFLAGS) + AC_SUBST(CPPFLAGS) AC_SUBST(MOC_FLAGS) - AC_SUBST(AM_CXXFLAGS) + AC_SUBST(CXXFLAGS) AC_SUBST(PKG_REQUIREMENTS) AX_ADDITIONAL_QT_RULES_HACK=' @@ -158,8 +158,8 @@ qrc_%.cxx: %.qrc $(RCC) -o [$][@] -name ${<:%.qrc=%} $< AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK) -%.qrc: % - cwd=$(shell pwd) && cd $< && $(RCC) --project -o ${cwd}/[$][@] +#%.qrc: % +# cwd=$$(pwd) && cd $< && $(RCC) -project -o $${cwd}/[$][@] %.qm: %.ts ${LRELEASE} $< -qm [$][@] @@ -217,5 +217,5 @@ AC_DEFUN([AX_REQUIRE_QT], [ # AX_QT_NO_KEYWORDS AC_DEFUN([AX_QT_NO_KEYWORDS], [ - AM_CPPFLAGS+=" -DQT_NO_KEYWORDS" + CPPFLAGS+=" -DQT_NO_KEYWORDS" ]) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index d53b195..9bfa33e 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -108,7 +108,7 @@ AC_DEFUN([AX_SUBST], [ # # configures the basic environment AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ - AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_NAME}'" + AM_CPPFLAGS+=" '-DMAKE_STRING(X)=\#X' '-DNAMESPACE=${PACKAGE_NAME//-/_}'" AX_SUBST(NUMBERS) AX_SUBST(HOME) README=$(tail -n +3 README) @@ -403,8 +403,8 @@ AC_DEFUN([AX_PKG_REQUIRE], [ done fi ]) - AC_SUBST(AM_CPPFLAGS) - AC_SUBST(AM_CXXFLAGS) + AC_SUBST(CPPFLAGS) + AC_SUBST(CXXFLAGS) AC_SUBST(PKG_REQUIREMENTS) if test -n "$3"; then tmp_package=${$1_found} @@ -459,8 +459,8 @@ AC_DEFUN([AX_PKG_REQUIRE], [ AC_MSG_ERROR([Feature $1 not found please install module $secondpar]) fi fi - AM_CPPFLAGS+=" ${$1_CFLAGS}" - AM_CXXFLAGS+=" ${$1_CFLAGS}" + CPPFLAGS+=" ${$1_CFLAGS}" + CXXFLAGS+=" ${$1_CFLAGS}" LIBS+=" ${$1_LIBS}" ]) @@ -476,8 +476,8 @@ AC_DEFUN([AX_PKG_CHECK], [ PKG_PROG_PKG_CONFIG PKG_CHECK_MODULES([$1], [m4_default([$2], [$1])], [ HAVE_$1=1 - AM_CPPFLAGS+=" ${$1_CFLAGS}" - AM_CXXFLAGS+=" ${$1_CFLAGS}" + CPPFLAGS+=" ${$1_CFLAGS}" + CXXFLAGS+=" ${$1_CFLAGS}" LIBS+=" ${$1_LIBS}" if test -z "$PKG_REQUIREMENTS"; then PKG_REQUIREMENTS="m4_default([$2], [$1])" @@ -489,7 +489,32 @@ AC_DEFUN([AX_PKG_CHECK], [ ]) AM_CONDITIONAL(HAVE_$1, test $HAVE_$1 -eq 1) AC_SUBST(HAVE_$1) - AC_SUBST(AM_CPPFLAGS) - AC_SUBST(AM_CXXFLAGS) + AC_SUBST(CPPFLAGS) + AC_SUBST(CXXFLAGS) AC_SUBST(PKG_REQUIREMENTS) ]) + +# make sure, a specific header exists +# - parameter: +# $1 = header name +AC_DEFUN([AX_REQUIRE_HEADER], [ + AC_CHECK_HEADER($1, [], [ + if test -n "$2"; then + found=0 + for d in $2; do + if test -f "${d}/$1"; then + AC_MSG_NOTICE([found file ${d}/$1]) + CPPFLAGS+=" -I${d}" + found=1 + break; + else + AC_MSG_NOTICE([not found file ${d}/$1]) + fi + done + fi + if test $found -eq 0; then + AC_MSG_ERROR([Header $1 not found]) + fi + ], []) + ], []) +]) diff --git a/bootstrap.sh b/bootstrap.sh index 33d488b..df01652 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -601,7 +601,8 @@ 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"; echo; fi)Architecture: any +Section: $(if testtag AX_USE_LIBTOOL; then echo "libs"; fi) +Architecture: any Depends: \${shlibs:Depends}, \${misc:Depends} Description: @DESCRIPTION@ @README_DEB@