-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
configure.ac
20 lines (16 loc) · 1.02 KB
/
configure.ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
AC_INIT([XOpcodeCalc], 0.05)
AC_PROG_CC
AC_LANG(C++)
PKG_CHECK_MODULES(Qt5Core, [Qt5Core >= 5.2.0], [], [AC_MSG_ERROR([Qt5Core >= 5.2.0] is required.)])
PKG_CHECK_MODULES(Qt5Gui, [Qt5Gui >= 5.2.0], [], [AC_MSG_ERROR([Qt5Gui >= 5.2.0] is required.)])
PKG_CHECK_MODULES(Qt5Widgets, [Qt5Widgets >= 5.2.0], [], [AC_MSG_ERROR([Qt5Widgets >= 5.2.0] is required.)])
PKG_CHECK_EXISTS([Qt5Core >= 5.2.0],[PKG_CHECK_VAR(QT_QMAKE,[Qt5Core >= 5.2.0],[host_bins])])
AS_IF([test -f "$QT_QMAKE/qmake"],[QT_QMAKE="$QT_QMAKE/qmake"],[AS_IF([test -f "$QT_QMAKE/qmake-qt5"],[QT_QMAKE="$QT_QMAKE/qmake-qt5"],[QT_QMAKE=""])])
X_QMAKE_SPEC=$($QT_QMAKE -query QMAKE_SPEC)
X_QT_VERSION=$($QT_QMAKE -query QT_VERSION)
X_QT_PREFIX=${prefix}
AC_MSG_NOTICE([Qt version: $X_QT_VERSION])
AC_MSG_NOTICE([Running qmake to generate the makefile...])
$QT_QMAKE "xopcodecalc_source.pro" -spec $X_QMAKE_SPEC
AC_MSG_NOTICE([The configure finished. Please type "make" to compile the project.])
AS_ECHO()