Skip to content
Snippets Groups Projects
Commit 35b6bc64 authored by Claus-Justus Heine's avatar Claus-Justus Heine
Browse files

Initial revision.

parent b7d3ea72
No related branches found
No related tags found
No related merge requests found
AC_DEFUN([ALBERT_CHECK_QT],
[AC_ARG_WITH([qtdir],
[ --with-qtdir=QTDIR Attempt to use the QT toolkit located in QTDIR.
Default: ${QTDIR}.],
[case "$withval" in
yes)
;;
no)
AC_MSG_ERROR([Nope, we _need_ QT])
;;
*)
QTDIR=${withval}
;;
esac],
[for i in /usr/lib/qt3 /usr/qt/3; do
if test -d $i; then
QTDIR=$i
break
fi
done
])
AC_LANG_PUSH([C++])
ALBERT_CHECK_PACKAGE(Qt, qt-mt, ${QTDIR}/lib, ${X_LIBS} -lX11,
qgl.h, ${QTDIR}/include, required)
AC_LANG_POP
dnl
dnl check for QGLWidget
dnl
AC_CACHE_CHECK([whether class QGLWidget compiles and links],
[ac_cv_qglwidget_links],
[ac_cv_qglwidget_links=no
ac_save_LDFLAGS=${LDFLAGS}
LDFLAGS="${Qt_LIB} ${OpenGL_LIB} ${LDFLAGS}"
AC_LANG_PUSH([C++])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_QGL_H
# include <qgl.h>
#endif]],
[[QGLWidget qgl;]])],
[ac_cv_qglwidget_links=yes],
[AC_MSG_FAILURE([Unable to compile and link a "QGLWidget"])
])
AC_LANG_POP
LDFLAGS="${ac_save_LDFLAGS}"
])
dnl
dnl the meta-object compiler
dnl
AC_ARG_WITH([moc],
[ --with-moc=PATH_TO_MOC Path to the "moc" program. Default: ${QTDIR}/bin/],
[case "$withval" in
yes)
;;
no)
AC_MSG_ERROR([Nope, we need moc])
;;
*)
MOCPATH=${withval}
;;
esac],
[MOCPATH=${QTDIR}/bin])
AC_PATH_PROG([MOC], moc, , [$MOCPATH:$QTDIR/bin:$PATH])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment