|
|
@ -39,38 +39,55 @@ AC_SUBST(MINOR) |
|
|
|
AC_SUBST(LEAST) |
|
|
|
AC_SUBST(LEAST) |
|
|
|
|
|
|
|
|
|
|
|
# Qt Environment |
|
|
|
# Qt Environment |
|
|
|
CPPFLAGS+=" -DUNICODE -DQT_NO_DEBUG" |
|
|
|
AC_MSG_CHECKING(QT4 directory) |
|
|
|
CPPFLAGS+=" -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WEBKIT_LIB -DQT_CORE_LIB" |
|
|
|
QTDIR="no" |
|
|
|
AC_CHECK_HEADER(QtCore/QString, [found="yes"], [found="no"]) |
|
|
|
AC_ARG_WITH([qt-dir], |
|
|
|
if test "$found" == "no"; then |
|
|
|
AC_HELP_STRING([--with-qt-dir=/path/to/Qt4], |
|
|
|
AC_MSG_CHECKING([looking for qt headers]) |
|
|
|
[to specify the path to the Qt4 directory.]), |
|
|
|
for file in /usr/include/qt4 /usr/local/include/qt4 /opt/include/qt4 \ |
|
|
|
[QTPATHS="$withval"], |
|
|
|
/opt/local/include/qt4 /opt/local/libexec/qt4-mac/include \ |
|
|
|
[QTPATHS="/usr/include/qt4 /usr/local/include/qt4 /opt/include/qt4 /opt/local/include/qt4 /opt/local/libexec/qt4-mac/include /usr/include /usr/local/include /opt/include /opt/local/include"]) |
|
|
|
/usr/include /usr/local/include \ |
|
|
|
for x in $QTPATHS; do |
|
|
|
/opt/include /opt/local/include; do |
|
|
|
if test -d $x/QtCore ; then |
|
|
|
if test -d ${file}/QtCore; then |
|
|
|
QTINCDIR=$x |
|
|
|
CPPFLAGS+=" -I$file" |
|
|
|
QTDIR=${x%/include*} |
|
|
|
found=$file |
|
|
|
if test -d $QTDIR/lib; then |
|
|
|
break; |
|
|
|
QTLIBDIR=$QTDIR/lib |
|
|
|
|
|
|
|
break |
|
|
|
fi |
|
|
|
fi |
|
|
|
done |
|
|
|
|
|
|
|
AC_MSG_RESULT([$found]) |
|
|
|
|
|
|
|
fi |
|
|
|
fi |
|
|
|
if test "$found" == "no"; then |
|
|
|
done |
|
|
|
|
|
|
|
AC_MSG_RESULT($QTDIR) |
|
|
|
|
|
|
|
AM_CONDITIONAL(USE_QT, test -n "$QTLIBDIR") |
|
|
|
|
|
|
|
if test -z "$QTLIBDIR"; then |
|
|
|
|
|
|
|
AC_MSG_WARN(Could not locate QT 4.1) |
|
|
|
case $host in |
|
|
|
case $host in |
|
|
|
*darwin*) |
|
|
|
*darwin*) |
|
|
|
PROXYLIB="" |
|
|
|
LDFLAGS+=" -lproxy" |
|
|
|
;; |
|
|
|
;; |
|
|
|
*mingw*|*win*) |
|
|
|
*mingw*|*win*) |
|
|
|
PROXYLIB="-lwinhttp" |
|
|
|
LDFLAGS+=" -lwinhttp" |
|
|
|
;; |
|
|
|
;; |
|
|
|
*) |
|
|
|
*) |
|
|
|
PROXYLIB="-lproxy" |
|
|
|
LDFLAGS+=" -lproxy" |
|
|
|
;; |
|
|
|
;; |
|
|
|
esac |
|
|
|
esac |
|
|
|
AC_SUBST(PROXYLIB) |
|
|
|
|
|
|
|
AC_MSG_WARN([Qt Headers not found]) |
|
|
|
|
|
|
|
else |
|
|
|
else |
|
|
|
|
|
|
|
# by now, Linux/Unix always uses libproxy |
|
|
|
|
|
|
|
case $host in |
|
|
|
|
|
|
|
*darwin*) |
|
|
|
|
|
|
|
LDFLAGS+=" -L$QTLIBDIR -lQtCore -lQtNetwork -lQtGui" |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
*mingw*|*win*) |
|
|
|
|
|
|
|
LDFLAGS+=" -L$QTLIBDIR -lQtCore4 -lQtNetwork4 -lQtGui4" |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
*) |
|
|
|
|
|
|
|
LDFLAGS+=" -L$QTLIBDIR -lQtCore -lQtNetwork -lQtGui" |
|
|
|
|
|
|
|
LDFLAGS+=" -lproxy" |
|
|
|
|
|
|
|
;; |
|
|
|
|
|
|
|
esac |
|
|
|
|
|
|
|
CPPFLAGS+=" -DUNICODE -DQT_NO_DEBUG" |
|
|
|
|
|
|
|
CPPFLAGS+=" -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_WEBKIT_LIB -DQT_CORE_LIB" |
|
|
|
|
|
|
|
CPPFLAGS+=" -I$QTINCDIR" |
|
|
|
AC_CHECK_PROGS([MOC], [moc-qt4 moc-mac moc]) |
|
|
|
AC_CHECK_PROGS([MOC], [moc-qt4 moc-mac moc]) |
|
|
|
test -n "$MOC" || AC_MSG_ERROR([moc for Qt 4 not found!]) |
|
|
|
test -n "$MOC" || AC_MSG_ERROR([moc for Qt 4 not found!]) |
|
|
|
AC_SUBST(MOC) |
|
|
|
AC_SUBST(MOC) |
|
|
|