diff --git a/ChangeLog b/ChangeLog index 965e3a3..c2f3fcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2015-06-24 09:26 marc + + * ChangeLog, ax_init_standard_project.m4: even more support for + weird and sloppy packages + 2015-06-23 09:02 marc * ax_init_standard_project.m4, configure.ac: even more improved way diff --git a/ax_check_qt.m4 b/ax_check_qt.m4 index 3d5ab67..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,11 +140,14 @@ 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=' + +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=$$(pwd) && cd $< && $(RCC) -project -o $${cwd}/[$][@] + +%.qm: %.ts + ${LRELEASE} $< -qm [$][@] + +#%.ts: ${LANGUAGE_FILES} +# ${LUPDATE} -no-obsolete \ +# -target-language ${@:${LANGUAGE_FILE_BASE}_%.ts=%} \ +# -ts [$][@] $< + +']) # SYNOPSIS # @@ -202,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 1b48313..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) @@ -239,6 +239,18 @@ maintainer-clean-example-targets: EOF ]) +# use this in configure.ac to support HTML data for webservers +AC_DEFUN([AX_BUILD_HTML], [ + AC_CONFIG_FILES([html/makefile]) + AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-example-targets], [html/makefile.in]) + test -f html/makefile.in && cat >> examples/html.in <