~robert-ancell/lightdm/unity-sys-comp-release-vt

« back to all changes in this revision

Viewing changes to configure.ac

  • Committer: Michael Terry
  • Date: 2013-02-06 14:08:25 UTC
  • mto: (1576.1.12 trunk)
  • mto: This revision was merged to the branch mainline in revision 1586.
  • Revision ID: michael.terry@canonical.com-20130206140825-ukfrhafpofnzlq0j
initial build support for Qt5

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_GOBJECT, test x"$compile_liblightdm_gobject" != "xno")
78
78
 
79
79
AC_ARG_ENABLE(liblightdm-qt,
80
 
        AS_HELP_STRING([--enable-liblightdm-qt],[Enable LightDM client QT libraries [[default=auto]]]),
81
 
        [enable_liblightdm_qt=$enableval],
82
 
        [enable_liblightdm_qt="auto"])
83
 
compile_liblightdm_qt=no
84
 
if test x"$enable_liblightdm_qt" = "xauto"; then
85
 
    PKG_CHECK_MODULES(LIBLIGHTDM_QT, [
 
80
        AS_HELP_STRING([--enable-liblightdm-qt],[Enable LightDM client Qt4 libraries [[default=auto]]]),
 
81
        [enable_liblightdm_qt4=$enableval],
 
82
        [enable_liblightdm_qt4="auto"])
 
83
compile_liblightdm_qt4=no
 
84
if test x"$enable_liblightdm_qt4" != "xno"; then
 
85
    PKG_CHECK_MODULES(LIBLIGHTDM_QT4, [
86
86
        QtCore
87
87
        QtDBus
88
88
        QtGui
89
 
    ], compile_liblightdm_qt=yes, compile_liblightdm_qt=no)
90
 
    QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir`
91
 
    AC_CHECK_TOOLS(MOC, [moc-qt4 moc],, [$QT4_BINDIR:$PATH])
92
 
elif test x"$enable_liblightdm_qt" = "xyes"; then
93
 
    PKG_CHECK_MODULES(LIBLIGHTDM_QT, [
94
 
        QtCore
95
 
        QtDBus
96
 
    ])
97
 
    QT4_BINDIR=`$PKG_CONFIG Qt --variable bindir`
98
 
    AC_CHECK_TOOLS(MOC, [moc-qt4 moc],, [$QT4_BINDIR:$PATH])
99
 
    compile_liblightdm_qt=yes
100
 
fi
101
 
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT, test x"$compile_liblightdm_qt" != "xno")
 
89
    ],
 
90
    [compile_liblightdm_qt4=yes
 
91
     AC_CHECK_TOOLS(MOC4, [moc-qt4 moc])
 
92
     if test x"$(readlink $(which $MOC4))" = xqtchooser; then
 
93
         MOC4="$MOC4 --qt=qt4"
 
94
     fi
 
95
    ],
 
96
    [if test "x$enable_liblightdm_qt4" != xauto; then
 
97
        AC_MSG_FAILURE(
 
98
          [--enable-liblightdm-qt was given, but test for Qt4 failed])
 
99
      fi
 
100
    ])
 
101
fi
 
102
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT4, test x"$compile_liblightdm_qt4" != "xno")
 
103
 
 
104
AC_ARG_ENABLE(liblightdm-qt5,
 
105
        AS_HELP_STRING([--enable-liblightdm-qt5],[Enable LightDM client Qt5 libraries [[default=auto]]]),
 
106
        [enable_liblightdm_qt5=$enableval],
 
107
        [enable_liblightdm_qt5="auto"])
 
108
compile_liblightdm_qt5=no
 
109
if test x"$enable_liblightdm_qt5" != "xno"; then
 
110
    PKG_CHECK_MODULES(LIBLIGHTDM_QT5, [
 
111
        Qt5Core
 
112
        Qt5DBus
 
113
        Qt5Gui
 
114
    ],
 
115
    [compile_liblightdm_qt5=yes
 
116
     AC_CHECK_TOOLS(MOC5, [moc])
 
117
     if test x"$(readlink $(which $MOC5))" = xqtchooser; then
 
118
         MOC5="$MOC5 --qt=qt5"
 
119
     fi
 
120
    ],
 
121
    [if test "x$enable_liblightdm_qt5" != xauto; then
 
122
        AC_MSG_FAILURE(
 
123
          [--enable-liblightdm-qt5 was given, but test for Qt5 failed])
 
124
      fi
 
125
    ])
 
126
fi
 
127
AM_CONDITIONAL(COMPILE_LIBLIGHTDM_QT5, test x"$compile_liblightdm_qt5" != "xno")
102
128
 
103
129
AC_MSG_CHECKING(whether to build tests)
104
130
AC_ARG_ENABLE(tests,
174
200
liblightdm-gobject/Makefile
175
201
liblightdm-qt/Makefile
176
202
liblightdm-qt/liblightdm-qt-2.pc
 
203
liblightdm-qt/liblightdm-qt5-2.pc
177
204
po/Makefile.in
178
205
src/Makefile
179
206
tests/Makefile
196
223
        User session:             $USER_SESSION
197
224
        liblightdm-gobject:       $compile_liblightdm_gobject
198
225
        GObject introspection:    $found_introspection
199
 
        liblightdm-qt:            $compile_liblightdm_qt
 
226
        liblightdm-qt:            $compile_liblightdm_qt4
 
227
        liblightdm-qt5:           $compile_liblightdm_qt5
200
228
        Enable tests:             $enable_tests
201
229
"