diff --git a/ax_check_qt.m4 b/ax_check_qt.m4 index 21c8104..fc245fb 100644 --- a/ax_check_qt.m4 +++ b/ax_check_qt.m4 @@ -100,6 +100,8 @@ AC_DEFUN([AX_CHECK_QT], [ PKG_CHECK_MODULES([$1]5, [${qt_modules//Qt/Qt5}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) + QTDIR=$(pkg-config --variable=prefix Qt5Core) + QT_PLUGIN_PATH=${QTDIR}/share/qt5/plugins CPPFLAGS+=" ${[$1]5_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}" CXXFLAGS+=" ${[$1]5_CFLAGS}" @@ -120,6 +122,8 @@ AC_DEFUN([AX_CHECK_QT], [ PKG_CHECK_MODULES([$1], [${qt_modules}], [ HAVE_$1=1 AC_DEFINE([HAVE_$1]) + QTDIR=$(pkg-config --variable=prefix QtCore) + QT_PLUGIN_PATH=${QTDIR}/share/qt/plugins CPPFLAGS+=" ${$1_CFLAGS}" MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}" CXXFLAGS+=" ${$1_CFLAGS}" @@ -140,6 +144,8 @@ 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(QTDIR) + AC_SUBST(QT_PLUGIN_PATH) AC_SUBST(CPPFLAGS) AC_SUBST(MOC_FLAGS) AC_SUBST(CXXFLAGS) diff --git a/ax_init_standard_project.m4 b/ax_init_standard_project.m4 index b771569..e5b2d83 100644 --- a/ax_init_standard_project.m4 +++ b/ax_init_standard_project.m4 @@ -134,6 +134,21 @@ AC_DEFUN([AX_INIT_STANDARD_PROJECT], [ PROJECT_ICON="${PROJECT_NAME}-icon.png" fi AX_SUBST(PROJECT_ICON) + + AC_ARG_ENABLE(pedantic, + [AS_HELP_STRING([--enable-pedantic], + [enable all warnings and checks, abort on warnings])], + [have_pedantic="$enableval"; test "$enableval" = "yes" && \ + AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) + dnl problem in libs: -Wshadow -Wcast-qual + dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) + AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") + if test "$have_pedantic" == "yes"; then + AC_MSG_NOTICE([Pedantic compile mode enabled! + - all warnings for GNU g++ are enabled + - all warnings result in an error + - doxygen warnings are treated as error too]); fi + AC_CONFIG_FILES([makefile]) 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]) @@ -174,20 +189,6 @@ AC_DEFUN([AX_USE_CXX], [ AM_DISTCHECK_CONFIGURE_FLAGS="CXXFLAGS='${CXXFLAGS}' CPPFLAGS='${CPPFLAGS}' CFLAGS='${CFLAGS}' LDFLAGS='${LDFLAGS}'" AC_SUBST(AM_DISTCHECK_CONFIGURE_FLAGS) - AC_ARG_ENABLE(pedantic, - [AS_HELP_STRING([--enable-pedantic], - [enable all warnings and checks, abort on warnings])], - [have_pedantic="$enableval"; test "$enableval" = "yes" && \ - AM_CXXFLAGS="${AM_CXXFLAGS:-} -pedantic-errors -Wall -W -Wfloat-equal -Wundef -Wendif-labels -Wpointer-arith -Wcast-align -Wwrite-strings -Wconversion -Wsign-compare -Wmissing-format-attribute -Wno-multichar -Wpacked -Wredundant-decls -Werror -Wshadow -Wcast-qual -Wno-ctor-dtor-privacy"]) - dnl problem in libs: -Wshadow -Wcast-qual - dnl auto.hpp: -Wno-ctor-dtor-privacy (removed) - AM_CONDITIONAL(PEDANTIC, test "$enableval" = "yes") - if test "$have_pedantic" == "yes"; then - AC_MSG_NOTICE([Pedantic compile mode enabled! - - all warnings for GNU g++ are enabled - - all warnings result in an error - - doxygen warnings are treated as error too]); fi - MINGW32=no MAC=no case $host_os in @@ -203,6 +204,15 @@ AC_DEFUN([AX_USE_CXX], [ AX_ADD_MAKEFILE_TARGET_DEP([maintainer-clean-am], [maintainer-clean-cxx-targets], [src/makefile.in]) test -f src/makefile.in && cat >> src/makefile.in < ${1}/Contents/Info.plist < + + + + CFBundleIdentifier + ${2} + CFBundleExecutable + ${executablefile##/} + + +EOF +fi \ No newline at end of file