Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 645432 | Differences between
and this patch

Collapse All | Expand All

(-)pgl-2.3.1.old/configure.ac (-15 / +14 lines)
Lines 212-240 Link Here
212
212
213
##
213
##
214
# initial QT_flags
214
# initial QT_flags
215
QT_CXXFLAGS=""
215
QT_CXXFLAGS="-fPIC"
216
QT_CPPFLAGS="-DVERSION=\\\"$VERSION\\\" -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED"
216
QT_CPPFLAGS="-DVERSION=\\\"$VERSION\\\" -D_REENTRANT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED"
217
QT_LDFLAGS=""
217
QT_LDFLAGS=""
218
QT_LIBS=""
218
QT_LIBS=""
219
QT_MODULES="Qt5Core Qt5Gui Qt5Widgets"
219
220
220
# configure-switch for qt4
221
# configure-switch for qt5
221
AC_ARG_WITH([qt4],
222
AC_ARG_WITH([qt5],
222
    [AS_HELP_STRING([--without-qt4],
223
    [AS_HELP_STRING([--without-qt5],
223
        [build without gui])],
224
        [build without gui])],
224
    [with_qt4="$withval"],
225
    [with_qt5="$withval"],
225
    [with_qt4="yes"]) # this only reflects the default ("if not given")
226
    [with_qt5="yes"]) # this only reflects the default ("if not given")
226
227
227
# modify QT4_flags if qt4 enabled and
228
# modify QT5_flags if qt5 enabled and
228
# include pglgui as subdir in Makefile.am (QT_SUB)
229
# include pglgui as subdir in Makefile.am (QT_SUB)
229
AS_IF([test "x$with_qt4" = "xyes"],
230
AS_IF([test "x$with_qt5" = "xyes"],
230
    [AS_IF([test "x$enable_dbus" = "xyes"],
231
    [AS_IF([test "x$enable_dbus" = "xyes"],
231
        [PKG_CHECK_MODULES([QT4DBUS], [QtDBus])],
232
        [QT_MODULES="$QT_MODULES Qt5DBus"])]
232
        [AC_MSG_ERROR([qt4 needs dbus!])])]
233
    [AC_CHECK_QT5(["5.0.0"], ["$QT_MODULES"])] #from qt5.m4
233
    [AC_CHECK_QT4(["4.3.0"])] # from qt4.m4
234
    [PKG_CHECK_MODULES([QT4], [QtCore QtGui])]
235
    [AC_SEARCH_LIBS([pthread_create], [pthread])] # adds -lpthread to LIBS
234
    [AC_SEARCH_LIBS([pthread_create], [pthread])] # adds -lpthread to LIBS
236
    [QT_CPPFLAGS="$QT_CPPFLAGS $QT4_CFLAGS $QT4DBUS_CFLAGS"]
235
    [QT_CPPFLAGS="$QT_CPPFLAGS $QT_CFLAGS"]
237
    [QT_LIBS="$QT_LIBS $QT4_LIBS $QT4DBUS_LIBS"]
236
    [QT_LIBS="$QT_LIBS"]
238
    [QT_SUB="pglgui"])
237
    [QT_SUB="pglgui"])
239
238
240
# targets
239
# targets
Lines 315-321 Link Here
315
else
314
else
316
echo lowmem....................................... : no
315
echo lowmem....................................... : no
317
fi
316
fi
318
if test "x$with_qt4" = "xyes"; then
317
if test "x$with_qt5" = "xyes"; then
319
echo QT-gui....................................... : yes
318
echo QT-gui....................................... : yes
320
else
319
else
321
echo QT-gui....................................... : no
320
echo QT-gui....................................... : no
(-)pgl-2.3.1.old/debian/control (-3 / +3 lines)
Lines 11-18 Link Here
11
 libdbus-1-dev,
11
 libdbus-1-dev,
12
 libnetfilter-queue-dev (>= 1.0~),
12
 libnetfilter-queue-dev (>= 1.0~),
13
 libnfnetlink-dev,
13
 libnfnetlink-dev,
14
 libqt4-dev,
15
 po-debconf,
14
 po-debconf,
15
 qtbase5-dev,
16
 zlib1g-dev,
16
 zlib1g-dev,
17
Build-Conflicts:
17
Build-Conflicts:
18
 autoconf2.13,
18
 autoconf2.13,
Lines 131-137 Link Here
131
 .
131
 .
132
 pgl is based on the Linux kernel netfilter framework and iptables.
132
 pgl is based on the Linux kernel netfilter framework and iptables.
133
 .
133
 .
134
 This is the pgl Graphical User Interface pglgui (C++, Qt4).
134
 This is the pgl Graphical User Interface pglgui (C++, Qt).
135
135
136
Package: pglgui-dbg
136
Package: pglgui-dbg
137
Section: debug
137
Section: debug
Lines 152-157 Link Here
152
 .
152
 .
153
 pgl is based on the Linux kernel netfilter framework and iptables.
153
 pgl is based on the Linux kernel netfilter framework and iptables.
154
 .
154
 .
155
 This is the pgl Graphical User Interface pglgui (C++, Qt4).
155
 This is the pgl Graphical User Interface pglgui (C++, Qt).
156
 .
156
 .
157
 This package contains the debugging symbols for pglgui.
157
 This package contains the debugging symbols for pglgui.
(-)pgl-2.3.1.old/debian/copyright (-1 / +1 lines)
Lines 138-144 Link Here
138
 Manually added ar-lib and config.h.in.
138
 Manually added ar-lib and config.h.in.
139
 See http://www.gnu.org/licenses/exceptions.html
139
 See http://www.gnu.org/licenses/exceptions.html
140
140
141
Files:     m4/qt4.m4
141
Files:     m4/qt5.m4
142
Copyright: 2004, 2007-2009, Juergen Heinemann, http://www.hjcms.de
142
Copyright: 2004, 2007-2009, Juergen Heinemann, http://www.hjcms.de
143
License:   GPL-2+
143
License:   GPL-2+
144
 This program is free software; you can redistribute it and/or modify
144
 This program is free software; you can redistribute it and/or modify
(-)pgl-2.3.1.old/debian/rules (+4 lines)
Lines 5-10 Link Here
5
# Uncomment this to turn on verbose mode.
5
# Uncomment this to turn on verbose mode.
6
#export DH_VERBOSE=1
6
#export DH_VERBOSE=1
7
7
8
# Build with Qt5:
9
# See http://pkg-kde.alioth.debian.org/packagingqtbasedstuff.html
10
export QT_SELECT=5
11
8
%:
12
%:
9
	dh $@ --with autoreconf
13
	dh $@ --with autoreconf
10
14
(-)pgl-2.3.1.old/INSTALL (-5 / +13 lines)
Lines 51-57 Link Here
51
  autoreconf
51
  autoreconf
52
52
53
53
54
Step 3.1: Configure
54
Step 3.1: Set correct Qt version.
55
---------------------------------
56
57
If you have multiple Qt versions installed on your system you might have to use
58
qtchooser to select Qt5:
59
   export QT_SELECT=5
60
61
62
Step 3.2: Configure
55
-------------------
63
-------------------
56
64
57
Pgl uses autotools which comes with several configure-switches you have
65
Pgl uses autotools which comes with several configure-switches you have
Lines 76-82 Link Here
76
84
77
For a slick installation you can build without the GUI and turn off dbus
85
For a slick installation you can build without the GUI and turn off dbus
78
support:
86
support:
79
  --without-qt4
87
  --without-qt5
80
  --disable-dbus
88
  --disable-dbus
81
89
82
Especially for embedded devices (like router or NAS box) you might disable
90
Especially for embedded devices (like router or NAS box) you might disable
Lines 106-112 Link Here
106
    --enable-logrotate \
114
    --enable-logrotate \
107
    --enable-networkmanager \
115
    --enable-networkmanager \
108
    --enable-zlib \
116
    --enable-zlib \
109
    --with-qt4 \
117
    --with-qt5 \
110
    --disable-lowmem
118
    --disable-lowmem
111
119
112
Minimal example line for a complete build and full system integration (on a
120
Minimal example line for a complete build and full system integration (on a
Lines 195-201 Link Here
195
- libnetfilter-queue development files (>= 1.0, or use the git pgl_backport
203
- libnetfilter-queue development files (>= 1.0, or use the git pgl_backport
196
  branch if you have a lower version)
204
  branch if you have a lower version)
197
- libdbus development files (optional, required for the GUI)
205
- libdbus development files (optional, required for the GUI)
198
- Qt4 development files including Qt4 dbus (optional, required for the GUI)
206
- Qt5 development files including Qt dbus (optional, required for the GUI)
199
- zlib development files (optional, for loading gz compressed blocklists
207
- zlib development files (optional, for loading gz compressed blocklists
200
  directly)
208
  directly)
201
209
Lines 243-249 Link Here
243
 Runtime environment pglgui:
251
 Runtime environment pglgui:
244
- pgld
252
- pgld
245
- pglcmd
253
- pglcmd
246
- Qt4
254
- Qt5
247
- dbus
255
- dbus
248
- whois
256
- whois
249
257
(-)pgl-2.3.1.old/m4/qt4.m4 (-209 lines)
Lines 1-209 Link Here
1
dnl file://qt4.m4
2
dnl -----------------------------------------------------------------------
3
dnl Author: Juergen Heinemann http://www.hjcms.de, (C) 2007-2009         dnl
4
dnl                                                                      dnl
5
dnl Copyright (C) 2004 by Juergen Heinemann                              dnl
6
dnl                                     nospam __AT__ hjcms (DOT) de     dnl
7
dnl                                                                      dnl
8
dnl This program is free software; you can redistribute it and/or modify dnl
9
dnl it under the terms of the GNU General Public License as published by dnl
10
dnl the Free Software Foundation; either version 2 of the License, or    dnl
11
dnl (at your option) any later version.                                  dnl
12
dnl                                                                      dnl
13
dnl This program is distributed in the hope that it will be useful,      dnl
14
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of       dnl
15
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        dnl
16
dnl GNU General Public License for more details.                         dnl
17
dnl                                                                      dnl
18
dnl You should have received a copy of the GNU General Public License    dnl
19
dnl along with this program; if not, write to the                        dnl
20
dnl Free Software Foundation, Inc.,                                      dnl
21
dnl 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.            dnl
22
dnl ------------------------------------------------------------------------
23
24
dnl -----------------------------------------------
25
dnl Phonon >= 4.2* http://www.kde.org
26
dnl -----------------------------------------------
27
28
AC_DEFUN([AC_CHECK_PHONON],
29
[
30
AC_REQUIRE([AC_PROG_MAKE_SET]) dnl
31
AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl
32
33
dnl -----------------------------------------------
34
dnl Minimal Version
35
dnl -----------------------------------------------
36
PHONON_REQUIRED_VERSION=m4_default([$1], [4.2.70])
37
AC_SUBST(PHONON_REQUIRED_VERSION) dnl
38
39
PKG_CHECK_MODULES([PHONON],[phonon >= $PHONON_REQUIRED_VERSION],
40
  AC_DEFINE(HAVE_PHONON,[1],[phonon exists]),
41
  AC_MSG_ERROR([phonon >= $QT_REQUIRED_VERSION not found!])
42
)
43
44
])
45
46
dnl -----------------------------------------------
47
dnl Qt >= 4.* and gettext Dependeces
48
dnl -----------------------------------------------
49
AC_DEFUN([FUN_TYPE_BOOL],
50
[
51
  AC_REQUIRE([AC_PROG_CXX]) dnl
52
  AC_LANG_PUSH(C++) dnl
53
  AC_CHECK_TYPE(bool, ac_check_bool=yes, ac_check_bool=no) 
54
  AC_LANG_POP(C++) dnl
55
  if test "x$ac_check_bool" = "xyes" ; then
56
    AC_DEFINE(HAVE_BOOL,[],[define if bool is a built-in type])
57
  fi
58
59
  AH_BOTTOM([#ifndef HAVE_BOOL])
60
  AH_BOTTOM([enum booltyp { false, true }; typedef enum booltyp bool;])
61
  AH_BOTTOM([#endif])
62
]) dnl FUN_TYPE_BOOL
63
64
dnl -----------------------------------------------
65
dnl Find Qt4 Program
66
dnl @example AC_CHECK_QT4_PROG([qhelpconverter])
67
dnl @generate QHELPCONVERTER = qhelpconverter
68
dnl -----------------------------------------------
69
m4_define([_QT_PROG_DEFUN],[m4_toupper([$1])])
70
71
AC_DEFUN([AC_CHECK_QT4_PROG],
72
[
73
  AC_REQUIRE([AC_ARG_PROGRAM]) dnl
74
  AC_CHECK_PROGS(_QT_PROG_DEFUN($1),[$1 $14 $1-qt4]) dnl
75
  test -n "$_QT_PROG_DEFUN($1)" || AC_MSG_WARN([can not find $1 for build subs])
76
])
77
78
dnl -----------------------------------------------
79
dnl Qt >= 4.* http://www.trolltech.com
80
dnl -----------------------------------------------
81
82
AC_DEFUN([AC_CHECK_QT4],
83
[
84
AC_REQUIRE([AC_PROG_AWK]) dnl
85
AC_REQUIRE([AC_PROG_MAKE_SET]) dnl
86
AC_REQUIRE([AC_ARG_PROGRAM]) dnl
87
AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl
88
AC_REQUIRE([FUN_TYPE_BOOL]) dnl
89
90
dnl -----------------------------------------------
91
dnl Minimal Version
92
dnl -----------------------------------------------
93
QT_REQUIRED_VERSION=m4_default([$1], [4.4.0])
94
AC_SUBST(QT_REQUIRED_VERSION) dnl
95
96
dnl -----------------------------------------------
97
dnl Required pkg-config Files
98
dnl -----------------------------------------------
99
QT_REQUIRED_CONFIG=m4_default([$2], ["QtCore"])
100
AC_SUBST(QT_REQUIRED_CONFIG) dnl
101
102
dnl -----------------------------------------------
103
dnl error if fail Section
104
dnl -----------------------------------------------
105
PKG_CHECK_MODULES([QT],[$QT_REQUIRED_CONFIG >= $QT_REQUIRED_VERSION],
106
  AC_DEFINE(HAVE_QT,[1],[$QT_REQUIRED_CONFIG exists]),
107
  AC_MSG_ERROR([$QT_REQUIRED_CONFIG >= $QT_REQUIRED_VERSION not found!])
108
)
109
110
dnl -----------------------------------------------
111
dnl check for moc compiler
112
dnl -----------------------------------------------
113
AC_CHECK_PROGS([MOC],[moc moc4 moc-qt4])
114
if test ! -n "$MOC" ; then
115
  MOC="`$PKG_CONFIG --variable=moc_location QtCore`"
116
  test -x "$MOC" || AC_MSG_ERROR([Qt moc MOC::Compiler not found!])
117
  AC_SUBST([MOC]) dnl
118
fi
119
120
dnl -----------------------------------------------
121
dnl check for uic
122
dnl -----------------------------------------------
123
AC_CHECK_PROGS([UIC],[uic uic4 uic-qt4])
124
if test ! -n "$UIC" ; then
125
  UIC="`$PKG_CONFIG --variable=uic_location QtCore`"
126
  test -x "$UIC" ||  AC_MSG_ERROR([Qt uic UI::Compiler not found!])
127
  AC_SUBST([UIC]) dnl
128
fi
129
130
dnl -----------------------------------------------
131
dnl check for rcc
132
dnl -----------------------------------------------
133
AC_CHECK_PROGS([RCC],[rcc rcc4 rcc-qt4])
134
if test ! -n "$RCC" ; then
135
  RCC="rcc"
136
  test -x "$RCC" ||  AC_MSG_ERROR([Qt rcc QRC::Compiler not found!])
137
  AC_SUBST([RCC]) dnl
138
fi
139
140
dnl -----------------------------------------------
141
dnl check for lupdate
142
dnl -----------------------------------------------
143
AC_CHECK_PROGS([LUPDATE],[lupdate lupdate4 lupdate-qt4])
144
test -n "$LUPDATE" || AC_MSG_ERROR([Qt lupdate Compiler not found!])
145
146
dnl -----------------------------------------------
147
dnl check for lrelease
148
dnl -----------------------------------------------
149
AC_CHECK_PROGS([LRELEASE],[lrelease lrelease4 lrelease-qt4])
150
test -n "$LRELEASE" || AC_MSG_ERROR([Qt lrelease Compiler not found!])
151
152
dnl -----------------------------------------------
153
dnl check for qmake
154
dnl -----------------------------------------------
155
AC_CHECK_PROGS([QMAKE],[qmake qmake4 qmake-qt4])
156
test -n "$QMAKE" || AC_MSG_ERROR([No QT3 to QT4 Support on this System]) dnl
157
158
dnl -----------------------------------------------
159
dnl set include dir
160
dnl -----------------------------------------------
161
Q_INCLUDE_DIR="`$QMAKE -query QT_INSTALL_HEADERS`"
162
AC_SUBST(Q_INCLUDE_DIR) dnl
163
164
dnl -----------------------------------------------
165
dnl set include dir
166
dnl -----------------------------------------------
167
Q_LIB_DIR="`$QMAKE -query QT_INSTALL_LIBS`"
168
AC_SUBST(Q_LIB_DIR) dnl
169
170
dnl -----------------------------------------------
171
dnl set plugin dir
172
dnl -----------------------------------------------
173
Q_PLUGIN_DIR="`$QMAKE -query QT_INSTALL_PLUGINS`"
174
AC_SUBST(Q_PLUGIN_DIR) dnl
175
176
dnl -----------------------------------------------
177
dnl set tr locale dir
178
dnl -----------------------------------------------
179
Q_LOCALE_DIR="`$QMAKE -query QT_INSTALL_TRANSLATIONS`"
180
AC_SUBST(Q_LOCALE_DIR) dnl
181
182
dnl -----------------------------------------------
183
dnl set tr locale dir
184
dnl -----------------------------------------------
185
Q_DATA_DIR="`$QMAKE -query QT_INSTALL_DATA`"
186
AC_SUBST(Q_DATA_DIR) dnl
187
188
dnl -----------------------------------------------
189
dnl set mkspecs dir
190
dnl -----------------------------------------------
191
Q_MKSPEC_DIR="`$QMAKE -query QT_INSTALL_DATA`/mkspecs"
192
AC_SUBST(Q_MKSPEC_DIR) dnl
193
194
])
195
196
dnl -----------------------------------------------
197
dnl Find Qt4 Library with pkg-config
198
dnl @example AC_CHECK_QT4_PKG([QtXml])
199
dnl @generate QTXML_CFLAGS and QTXML_LIBS
200
dnl -----------------------------------------------
201
AC_DEFUN([AC_CHECK_QT4_PKG],
202
[
203
AC_REQUIRE([AC_CHECK_QT4]) dnl
204
PKG_CHECK_MODULES(_QT_PROG_DEFUN($1),[$1 >= $QT_REQUIRED_VERSION])
205
])
206
207
dnl -----------------------------------------------
208
dnl eof
209
(-)pgl-2.3.1.old/m4/qt5.m4 (+187 lines)
Line 0 Link Here
1
dnl file://qt5.m4
2
dnl -----------------------------------------------------------------------
3
dnl Author: Juergen Heinemann http://www.hjcms.de, (C) 2007-2009         dnl
4
dnl                                                                      dnl
5
dnl Copyright (C) 2004 by Juergen Heinemann                              dnl
6
dnl                                     nospam __AT__ hjcms (DOT) de     dnl
7
dnl                                                                      dnl
8
dnl This program is free software; you can redistribute it and/or modify dnl
9
dnl it under the terms of the GNU General Public License as published by dnl
10
dnl the Free Software Foundation; either version 2 of the License, or    dnl
11
dnl (at your option) any later version.                                  dnl
12
dnl                                                                      dnl
13
dnl This program is distributed in the hope that it will be useful,      dnl
14
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of       dnl
15
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        dnl
16
dnl GNU General Public License for more details.                         dnl
17
dnl                                                                      dnl
18
dnl You should have received a copy of the GNU General Public License    dnl
19
dnl along with this program; if not, write to the                        dnl
20
dnl Free Software Foundation, Inc.,                                      dnl
21
dnl 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.            dnl
22
dnl ------------------------------------------------------------------------
23
24
dnl -----------------------------------------------
25
dnl Qt >= 5.* and gettext Dependeces
26
dnl -----------------------------------------------
27
AC_DEFUN([FUN_TYPE_BOOL],
28
[
29
  AC_REQUIRE([AC_PROG_CXX]) dnl
30
  AC_LANG_PUSH(C++) dnl
31
  AC_CHECK_TYPE(bool, ac_check_bool=yes, ac_check_bool=no) 
32
  AC_LANG_POP(C++) dnl
33
  if test "x$ac_check_bool" = "xyes" ; then
34
    AC_DEFINE(HAVE_BOOL,[],[define if bool is a built-in type])
35
  fi
36
37
  AH_BOTTOM([#ifndef HAVE_BOOL])
38
  AH_BOTTOM([enum booltyp { false, true }; typedef enum booltyp bool;])
39
  AH_BOTTOM([#endif])
40
]) dnl FUN_TYPE_BOOL
41
42
dnl -----------------------------------------------
43
dnl Find Qt5 Program
44
dnl @example AC_CHECK_QT5_PROG([qhelpconverter])
45
dnl @generate QHELPCONVERTER = qhelpconverter
46
dnl -----------------------------------------------
47
m4_define([_QT_PROG_DEFUN],[m4_toupper([$1])])
48
49
AC_DEFUN([AC_CHECK_QT5_PROG],
50
[
51
  AC_REQUIRE([AC_ARG_PROGRAM]) dnl
52
  AC_CHECK_PROGS(_QT_PROG_DEFUN($1),[$1 $14 $1-qt5]) dnl
53
  test -n "$_QT_PROG_DEFUN($1)" || AC_MSG_WARN([can not find $1 for build subs])
54
])
55
56
dnl -----------------------------------------------
57
dnl Qt >= 5.* http://www.trolltech.com
58
dnl -----------------------------------------------
59
60
AC_DEFUN([AC_CHECK_QT5],
61
[
62
AC_REQUIRE([AC_PROG_AWK]) dnl
63
AC_REQUIRE([AC_PROG_MAKE_SET]) dnl
64
AC_REQUIRE([AC_ARG_PROGRAM]) dnl
65
AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl
66
AC_REQUIRE([FUN_TYPE_BOOL]) dnl
67
68
dnl -----------------------------------------------
69
dnl Minimal Version
70
dnl -----------------------------------------------
71
QT_REQUIRED_VERSION=m4_default([$1], [5.0.0])
72
AC_SUBST(QT_REQUIRED_VERSION) dnl
73
74
dnl -----------------------------------------------
75
dnl Required pkg-config Files
76
dnl -----------------------------------------------
77
QT_REQUIRED_CONFIG=m4_default([$2], ["Qt5Core"])
78
AC_SUBST(QT_REQUIRED_CONFIG) dnl
79
80
dnl -----------------------------------------------
81
dnl error if fail Section
82
dnl -----------------------------------------------
83
PKG_CHECK_MODULES([QT],[$QT_REQUIRED_CONFIG >= $QT_REQUIRED_VERSION],
84
  AC_DEFINE(HAVE_QT,[1],[$QT_REQUIRED_CONFIG exists]),
85
  AC_MSG_ERROR([$QT_REQUIRED_CONFIG >= $QT_REQUIRED_VERSION not found!])
86
)
87
88
dnl -----------------------------------------------
89
dnl check for moc compiler
90
dnl -----------------------------------------------
91
AC_CHECK_PROGS([MOC],[moc moc5 moc-qt5])
92
if test ! -n "$MOC" ; then
93
  MOC="`$PKG_CONFIG --variable=moc_location Qt5Core`"
94
  test -x "$MOC" || AC_MSG_ERROR([Qt moc MOC::Compiler not found!])
95
  AC_SUBST([MOC]) dnl
96
fi
97
98
dnl -----------------------------------------------
99
dnl check for uic
100
dnl -----------------------------------------------
101
AC_CHECK_PROGS([UIC],[uic uic5 uic-qt5])
102
if test ! -n "$UIC" ; then
103
  UIC="`$PKG_CONFIG --variable=uic_location QtCore`"
104
  test -x "$UIC" ||  AC_MSG_ERROR([Qt uic UI::Compiler not found!])
105
  AC_SUBST([UIC]) dnl
106
fi
107
108
dnl -----------------------------------------------
109
dnl check for rcc
110
dnl -----------------------------------------------
111
AC_CHECK_PROGS([RCC],[rcc rcc5 rcc-qt5])
112
if test ! -n "$RCC" ; then
113
  RCC="rcc"
114
  test -x "$RCC" ||  AC_MSG_ERROR([Qt rcc QRC::Compiler not found!])
115
  AC_SUBST([RCC]) dnl
116
fi
117
118
dnl -----------------------------------------------
119
dnl check for lupdate
120
dnl -----------------------------------------------
121
AC_CHECK_PROGS([LUPDATE],[lupdate lupdate5 lupdate-qt5])
122
test -n "$LUPDATE" || AC_MSG_ERROR([Qt lupdate Compiler not found!])
123
124
dnl -----------------------------------------------
125
dnl check for lrelease
126
dnl -----------------------------------------------
127
AC_CHECK_PROGS([LRELEASE],[lrelease lrelease5 lrelease-qt5])
128
test -n "$LRELEASE" || AC_MSG_ERROR([Qt lrelease Compiler not found!])
129
130
dnl -----------------------------------------------
131
dnl check for qmake
132
dnl -----------------------------------------------
133
AC_CHECK_PROGS([QMAKE],[qmake qmake5 qmake-qt5])
134
test -n "$QMAKE" || AC_MSG_ERROR([No QT3 to QT4 Support on this System]) dnl
135
136
dnl -----------------------------------------------
137
dnl set include dir
138
dnl -----------------------------------------------
139
Q_INCLUDE_DIR="`$QMAKE -query QT_INSTALL_HEADERS`"
140
AC_SUBST(Q_INCLUDE_DIR) dnl
141
142
dnl -----------------------------------------------
143
dnl set include dir
144
dnl -----------------------------------------------
145
Q_LIB_DIR="`$QMAKE -query QT_INSTALL_LIBS`"
146
AC_SUBST(Q_LIB_DIR) dnl
147
148
dnl -----------------------------------------------
149
dnl set plugin dir
150
dnl -----------------------------------------------
151
Q_PLUGIN_DIR="`$QMAKE -query QT_INSTALL_PLUGINS`"
152
AC_SUBST(Q_PLUGIN_DIR) dnl
153
154
dnl -----------------------------------------------
155
dnl set tr locale dir
156
dnl -----------------------------------------------
157
Q_LOCALE_DIR="`$QMAKE -query QT_INSTALL_TRANSLATIONS`"
158
AC_SUBST(Q_LOCALE_DIR) dnl
159
160
dnl -----------------------------------------------
161
dnl set tr locale dir
162
dnl -----------------------------------------------
163
Q_DATA_DIR="`$QMAKE -query QT_INSTALL_DATA`"
164
AC_SUBST(Q_DATA_DIR) dnl
165
166
dnl -----------------------------------------------
167
dnl set mkspecs dir
168
dnl -----------------------------------------------
169
Q_MKSPEC_DIR="`$QMAKE -query QT_INSTALL_DATA`/mkspecs"
170
AC_SUBST(Q_MKSPEC_DIR) dnl
171
172
])
173
174
dnl -----------------------------------------------
175
dnl Find Qt5 Library with pkg-config
176
dnl @example AC_CHECK_QT5_PKG([QtXml])
177
dnl @generate QTXML_CFLAGS and QTXML_LIBS
178
dnl -----------------------------------------------
179
AC_DEFUN([AC_CHECK_QT5_PKG],
180
[
181
AC_REQUIRE([AC_CHECK_QT5]) dnl
182
PKG_CHECK_MODULES(_QT_PROG_DEFUN($1),[$1 >= $QT_REQUIRED_VERSION])
183
])
184
185
dnl -----------------------------------------------
186
dnl eof
187
(-)pgl-2.3.1.old/pglgui/src/main.cpp (-7 / +8 lines)
Lines 32-43 Link Here
32
#include "pglgui.h"
32
#include "pglgui.h"
33
#include "command.h"
33
#include "command.h"
34
34
35
void customOutput( QtMsgType type, const char *msg );
35
void customOutput(QtMsgType, const QMessageLogContext &, const QString &);
36
36
37
int main(int argc, char *argv[])
37
int main(int argc, char *argv[])
38
{
38
{
39
39
40
        qInstallMsgHandler( customOutput );
40
        qInstallMessageHandler( customOutput );
41
41
42
        //Start the real application
42
        //Start the real application
43
        QApplication app(argc, argv);
43
        QApplication app(argc, argv);
Lines 61-80 Link Here
61
61
62
}
62
}
63
63
64
void customOutput( QtMsgType type, const char *msg ) {
64
void customOutput(QtMsgType type, const QMessageLogContext & context, const QString & msg) {
65
65
66
        QByteArray localMsg = msg.toLocal8Bit();
66
        switch( type ) {
67
        switch( type ) {
67
                case QtDebugMsg:
68
                case QtDebugMsg:
68
                        fprintf( stderr, "** Debug: %s\n", msg );
69
                        fprintf( stderr, "** Debug: %s\n", localMsg.constData() );
69
                        break;
70
                        break;
70
                case QtWarningMsg:
71
                case QtWarningMsg:
71
                        fprintf( stderr, "** Warning: %s\n", msg );
72
                        fprintf( stderr, "** Warning: %s\n", localMsg.constData() );
72
                        break;
73
                        break;
73
                case QtCriticalMsg:
74
                case QtCriticalMsg:
74
                        fprintf( stderr, "** Critical: %s\n", msg );
75
                        fprintf( stderr, "** Critical: %s\n", localMsg.constData() );
75
                        break;
76
                        break;
76
                case QtFatalMsg:
77
                case QtFatalMsg:
77
                        fprintf( stderr, "** Fatal: %s\n", msg );
78
                        fprintf( stderr, "** Fatal: %s\n", localMsg.constData() );
78
                        break;
79
                        break;
79
        }
80
        }
80
81

Return to bug 645432