|
|
|
@ -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" |
|
|
|
|
]) |
|
|
|
|