build should work now
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_CHECK_QT([qt_prefix], [list-of-qt-modules])
|
||||
# Check if a module exists:
|
||||
# AX_CXX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
|
||||
#
|
||||
# Abort if a module does not exist:
|
||||
# AX_CXX_REQUIRE_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
|
||||
#
|
||||
# DESCRIPTIONS
|
||||
#
|
||||
@@ -25,6 +29,13 @@
|
||||
# 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_CXX_QT_TOOL], [
|
||||
if test -z "$HAVE_$1"; then
|
||||
@@ -93,12 +104,24 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
MOC_FLAGS+=" -DHAVE_$1=1 ${[$1]5_CFLAGS}"
|
||||
AM_CXXFLAGS+=" ${[$1]5_CFLAGS}"
|
||||
LIBS+=" ${[$1]5_LIBS}"
|
||||
modules=${qt_modules//Qt/Qt5}
|
||||
if test -z "$PKG_REQUIREMENTS"; then
|
||||
PKG_REQUIREMENTS="${modules// /, }"
|
||||
else
|
||||
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
|
||||
fi
|
||||
if test -n "${qt_modules_optional}"; then
|
||||
PKG_CHECK_MODULES([$1]5_OPTIONAL, [${qt_modules_optional//Qt/Qt5}], [
|
||||
AM_CPPFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
|
||||
MOC_FLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
|
||||
AM_CXXFLAGS+=" ${[$1]5_OPTIONAL_CFLAGS}"
|
||||
LIBS+=" ${[$1]5_OPTIONAL_LIBS}"
|
||||
modules=${qt_modules_optional//Qt/Qt5}
|
||||
if test -z "$PKG_REQUIREMENTS"; then
|
||||
PKG_REQUIREMENTS="${modules// /, }"
|
||||
else
|
||||
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
|
||||
fi
|
||||
], [
|
||||
AC_MSG_NOTICE([Not found: ${qt_modules_optional//Qt/Qt5}])
|
||||
])
|
||||
@@ -111,12 +134,24 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
MOC_FLAGS+=" -DHAVE_$1=1 ${$1_CFLAGS}"
|
||||
AM_CXXFLAGS+=" ${$1_CFLAGS}"
|
||||
LIBS+=" ${$1_LIBS}"
|
||||
modules=${qt_modules}
|
||||
if test -z "$PKG_REQUIREMENTS"; then
|
||||
PKG_REQUIREMENTS="${modules// /, }"
|
||||
else
|
||||
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
|
||||
fi
|
||||
if test -n "$3"; then
|
||||
PKG_CHECK_MODULES($1_OPTIONAL, [${qt_modules_optional}], [
|
||||
AM_CPPFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
|
||||
MOC_FLAGS+=" ${$1_OPTIONAL_CFLAGS}"
|
||||
AM_CXXFLAGS+=" ${$1_OPTIONAL_CFLAGS}"
|
||||
LIBS+=" ${$1_OPTIONAL_LIBS}"
|
||||
modules=${qt_modules_optional}
|
||||
if test -z "$PKG_REQUIREMENTS"; then
|
||||
PKG_REQUIREMENTS="${modules// /, }"
|
||||
else
|
||||
PKG_REQUIREMENTS="${PKG_REQUIREMENTS}, ${modules// /, }"
|
||||
fi
|
||||
], [
|
||||
AC_MSG_NOTICE([Not found: ${qt_modules_optional}])
|
||||
])
|
||||
@@ -128,6 +163,7 @@ AC_DEFUN([AX_CHECK_QT], [
|
||||
AC_SUBST(AM_CPPFLAGS)
|
||||
AC_SUBST(MOC_FLAGS)
|
||||
AC_SUBST(AM_CXXFLAGS)
|
||||
AC_SUBST(PKG_REQUIREMENTS)
|
||||
AX_ADDITIONAL_QT_RULES_HACK='
|
||||
ui_%.hxx: %.ui
|
||||
$(UIC) -o [$][@] $<
|
||||
@@ -140,9 +176,51 @@ qrc_%.cxx: %.qrc
|
||||
AC_SUBST(AX_ADDITIONAL_QT_RULES_HACK)
|
||||
])
|
||||
|
||||
# SYNOPSIS
|
||||
#
|
||||
# AX_CXX_CHECK_QT([qt_prefix], [list-of-qt-modules], [optional-modules])
|
||||
#
|
||||
# DESCRIPTIONS
|
||||
#
|
||||
# qt_prefix
|
||||
#
|
||||
# Each call to AX_CXX_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], [
|
||||
AX_CHECK_QT([$1], [$2], [$3])
|
||||
if ! test "$HAVE_$1" -eq 1; then
|
||||
AC_MSG_ERROR([Required Qt modules not found: $2])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
# Omit Qt Keywords
|
||||
# AX_QT_NO_KEYWORDS
|
||||
|
||||
AC_DEFUN([AX_QT_NO_KEYWORDS], [
|
||||
AM_CPPFLAGS+=" -DQT_NO_KEYWORDS"
|
||||
])
|
||||
|
Reference in New Issue
Block a user