[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Locating/Linking against Qt
From: |
Ralf Wildenhues |
Subject: |
Re: Locating/Linking against Qt |
Date: |
Sun, 28 Aug 2005 07:51:20 +0200 |
User-agent: |
Mutt/1.5.9i |
Hi Brian, Tommy,
I haven't been following this thread closely, but this code snippet
below needs more quoting to be safe:
* Brian wrote on Sun, Aug 28, 2005 at 05:34:57AM CEST:
>
> dnl Check for AWT related Qt4
> if test "x${COMPILE_QT_PEER}" = xyes; then
> PKG_CHECK_MODULES(QT, QtGui >= 4.0.1)
> dnl Check needed because in some cases the QtGui includedir
> dnl doesn't contain the subsystem dir.
>
> QT_INCLUDE_DIR=$($PKG_CONFIG --variable=includedir QtGui)
> EXTRA_QT_INCLUDE_DIR="$QT_INCLUDE_DIR/Qt"
> AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
> AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed]),
>
> AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
> QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
> AC_MSG_WARN([QWidget not found])))
If an argument to a macro contains macros itself, you _need_ to quote it
once. (If not, i.e. it's a literal m4-wise, you could even quote it
twice..) Like this here:
AC_CHECK_FILE([$QT_INCLUDE_DIR/QWidget],
[AC_MSG_NOTICE([No extra QT_INCLUDE_DIR needed])],
[AC_CHECK_FILE([$EXTRA_QT_INCLUDE_DIR/QWidget],
[QT_CFLAGS="$QT_CFLAGS -I$EXTRA_QT_INCLUDE_DIR",
AC_MSG_WARN([QWidget not found])])])
> AC_MSG_NOTICE([Set QT_CFLAGS... $QT_CFLAGS])
> AC_CHECK_PROG(MOC, [moc], [moc])
>
> AC_SUBST(QT_CFLAGS)
> AC_SUBST(QT_LIBS)
> fi
Cheers,
Ralf