Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
alberta3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ians-nmh-siebert
alberta
alberta3
Commits
6ed05bf3
Commit
6ed05bf3
authored
22 years ago
by
Claus-Justus Heine
Browse files
Options
Downloads
Patches
Plain Diff
Make QGL optional.
parent
35b6bc64
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
m4/check-qt.m4
+19
-5
19 additions, 5 deletions
m4/check-qt.m4
with
19 additions
and
5 deletions
m4/check-qt.m4
+
19
−
5
View file @
6ed05bf3
dnl
dnl $1 == required: bail out on error
dnl $1 == optional: just issue a warning.
dnl
AC_DEFUN([ALBERT_CHECK_QT],
AC_DEFUN([ALBERT_CHECK_QT],
[AC_ARG_WITH([qtdir],
[AC_ARG_WITH([qtdir],
[ --with-qtdir=QTDIR Attempt to use the QT toolkit located in QTDIR.
[ --with-qtdir=QTDIR Attempt to use the QT toolkit located in QTDIR.
...
@@ -6,7 +10,7 @@ AC_DEFUN([ALBERT_CHECK_QT],
...
@@ -6,7 +10,7 @@ AC_DEFUN([ALBERT_CHECK_QT],
yes)
yes)
;;
;;
no)
no)
AC_MSG_ERROR([Nope, we _need_ QT])
test "$1" = required &&
AC_MSG_ERROR([Nope, we _need_ QT])
;;
;;
*)
*)
QTDIR=${withval}
QTDIR=${withval}
...
@@ -21,7 +25,7 @@ done
...
@@ -21,7 +25,7 @@ done
])
])
AC_LANG_PUSH([C++])
AC_LANG_PUSH([C++])
ALBERT_CHECK_PACKAGE(Qt, qt-mt, ${QTDIR}/lib, ${X_LIBS} -lX11,
ALBERT_CHECK_PACKAGE(Qt, qt-mt, ${QTDIR}/lib, ${X_LIBS} -lX11,
qgl.h, ${QTDIR}/include,
required
)
qgl.h, ${QTDIR}/include,
$1
)
AC_LANG_POP
AC_LANG_POP
dnl
dnl
dnl check for QGLWidget
dnl check for QGLWidget
...
@@ -37,7 +41,11 @@ AC_CACHE_CHECK([whether class QGLWidget compiles and links],
...
@@ -37,7 +41,11 @@ AC_CACHE_CHECK([whether class QGLWidget compiles and links],
#endif]],
#endif]],
[[QGLWidget qgl;]])],
[[QGLWidget qgl;]])],
[ac_cv_qglwidget_links=yes],
[ac_cv_qglwidget_links=yes],
[AC_MSG_FAILURE([Unable to compile and link a "QGLWidget"])
[if test "$1" = required; then
AC_MSG_FAILURE([Unable to compile and link a "QGLWidget"])
else
AC_MSG_RESULT([Unable to compile and link a "QGLWidget"])
fi
])
])
AC_LANG_POP
AC_LANG_POP
LDFLAGS="${ac_save_LDFLAGS}"
LDFLAGS="${ac_save_LDFLAGS}"
...
@@ -51,13 +59,19 @@ AC_ARG_WITH([moc],
...
@@ -51,13 +59,19 @@ AC_ARG_WITH([moc],
yes)
yes)
;;
;;
no)
no)
AC_MSG_ERROR([Nope, we need moc])
test "$1" = required &&
AC_MSG_ERROR([Nope, we need moc])
;;
;;
*)
*)
MOCPATH=${withval}
MOCPATH=${withval}
;;
;;
esac],
esac],
[MOCPATH=${QTDIR}/bin])
[MOCPATH=${QTDIR}/bin])
AC_PATH_PROG([MOC], moc, , [$MOCPATH:$QTDIR/bin:$PATH])
AC_PATH_PROG([MOC], moc,
[test "$1" == required && AC_MSG_ERROR(["moc" not found])],
[$MOCPATH:$QTDIR/bin:$PATH])
if test -n "$Qt_LIB" -a -n "$MOC" -a "$ac_cv_qglwidget_links" = yes; then
AC_DEFINE([HAVE_QGL_WIDGET], 1,
[Define to "1" if Qt's QGLWidget is present and compiles])
fi
])
])
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment