comparison m4/m4_ax_have_qt.m4 @ 267:09c5bd74fe93

win32: make builds work again
author Paper <paper@paper.us.eu.org>
date Thu, 11 Apr 2024 23:39:18 -0400
parents 9a04802848c0
children f01b6e9c8fa2
comparison
equal deleted inserted replaced
266:1a6a5d3a94cd 267:09c5bd74fe93
86 cat > $am_have_qt_pro << EOF 86 cat > $am_have_qt_pro << EOF
87 win32 { 87 win32 {
88 CONFIG -= debug_and_release 88 CONFIG -= debug_and_release
89 CONFIG += release 89 CONFIG += release
90 } 90 }
91 QMAKE_PROJECT_DEPTH = 0
91 qtHaveModule(core): QT += core 92 qtHaveModule(core): QT += core
92 qtHaveModule(gui): QT += gui 93 qtHaveModule(gui): QT += gui
93 qtHaveModule(widgets): QT += widgets 94 qtHaveModule(widgets): QT += widgets
94 EOF 95 EOF
95 cat > "$am_have_qt_makefile_vars" << EOF 96 cat > "$am_have_qt_makefile_vars" << EOF
103 @echo \$(LIBS) 104 @echo \$(LIBS)
104 EOF 105 EOF
105 $QMAKE $am_have_qt_pro -o $am_have_qt_makefile 106 $QMAKE $am_have_qt_pro -o $am_have_qt_makefile
106 QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile_vars CXXFLAGS` 107 QT_CXXFLAGS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile_vars CXXFLAGS`
107 QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile_vars LIBS` 108 QT_LIBS=`cd $am_have_qt_dir; make -s -f $am_have_qt_makefile_vars LIBS`
108 rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile 109 rm $am_have_qt_pro $am_have_qt_stash $am_have_qt_makefile $am_have_qt_makefile_vars
109 rmdir $am_have_qt_dir 110 rmdir $am_have_qt_dir
110 111
111 # Look for specific tools in $PATH 112 # Look for specific tools in $PATH
112 QT_MOC=`which moc$am_have_qt_qmexe_suff` 113 QT_MOC=`which moc$am_have_qt_qmexe_suff`
113 QT_UIC=`which uic$am_have_qt_qmexe_suff` 114 QT_UIC=`which uic$am_have_qt_qmexe_suff`
169 signals: 170 signals:
170 void send(); 171 void send();
171 }; 172 };
172 EOF 173 EOF
173 174
174 cat > ax_qt_main.$ac_ext << EOF 175 cat > ax_qt_main.cc << EOF
175 #include "ax_qt_test.h" 176 #include "ax_qt_test.h"
176 #include <qapplication.h> 177 #include <qapplication.h>
177 int main( int argc, char **argv ) 178 int main( int argc, char **argv )
178 { 179 {
179 QApplication app( argc, argv ); 180 QApplication app( argc, argv );
181 QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) ); 182 QObject::connect( &t, SIGNAL(send()), &t, SLOT(receive()) );
182 } 183 }
183 EOF 184 EOF
184 185
185 ax_cv_qt_test_result="failure" 186 ax_cv_qt_test_result="failure"
186 ax_try_1="$QT_MOC ax_qt_test.h -o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" 187 ax_try_1="$QT_MOC ax_qt_test.h -o moc_ax_qt_test.cc >/dev/null 2>/dev/null"
187 AC_TRY_EVAL(ax_try_1) 188 AC_TRY_EVAL(ax_try_1)
188 if test x"$ac_status" != x0; then 189 if test x"$ac_status" != x0; then
189 echo "$ax_err_1" >&AS_MESSAGE_LOG_FD 190 echo "$ax_err_1" >&AS_MESSAGE_LOG_FD
190 echo "configure: could not run $QT_MOC on:" >&AS_MESSAGE_LOG_FD 191 echo "configure: could not run $QT_MOC on:" >&AS_MESSAGE_LOG_FD
191 cat ax_qt_test.h >&AS_MESSAGE_LOG_FD 192 cat ax_qt_test.h >&AS_MESSAGE_LOG_FD
192 else 193 else
193 ax_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_ax_qt_test.o moc_ax_qt_test.$ac_ext >/dev/null 2>/dev/null" 194 ax_try_2="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o moc_ax_qt_test.o moc_ax_qt_test.cc >/dev/null 2>/dev/null"
194 AC_TRY_EVAL(ax_try_2) 195 AC_TRY_EVAL(ax_try_2)
195 if test x"$ac_status" != x0; then 196 if test x"$ac_status" != x0; then
196 echo "$ax_err_2" >&AS_MESSAGE_LOG_FD 197 echo "$ax_err_2" >&AS_MESSAGE_LOG_FD
197 echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD 198 echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD
198 cat moc_ax_qt_test.$ac_ext >&AS_MESSAGE_LOG_FD 199 cat moc_ax_qt_test.cc >&AS_MESSAGE_LOG_FD
199 else 200 else
200 ax_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o ax_qt_main.o ax_qt_main.$ac_ext >/dev/null 2>/dev/null" 201 ax_try_3="$CXX $QT_CXXFLAGS -c $CXXFLAGS -o ax_qt_main.o ax_qt_main.cc >/dev/null 2>/dev/null"
201 AC_TRY_EVAL(ax_try_3) 202 AC_TRY_EVAL(ax_try_3)
202 if test x"$ac_status" != x0; then 203 if test x"$ac_status" != x0; then
203 echo "$ax_err_3" >&AS_MESSAGE_LOG_FD 204 echo "$ax_err_3" >&AS_MESSAGE_LOG_FD
204 echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD 205 echo "configure: could not compile:" >&AS_MESSAGE_LOG_FD
205 cat ax_qt_main.$ac_ext >&AS_MESSAGE_LOG_FD 206 cat ax_qt_main.cc >&AS_MESSAGE_LOG_FD
206 else 207 else
207 ax_try_4="$CXX -o ax_qt_main ax_qt_main.o moc_ax_qt_test.o $QT_LIBS $LIBS >/dev/null 2>/dev/null" 208 ax_try_4="$CXX -o ax_qt_main ax_qt_main.o moc_ax_qt_test.o $QT_LIBS $LIBS >/dev/null 2>/dev/null"
208 AC_TRY_EVAL(ax_try_4) 209 AC_TRY_EVAL(ax_try_4)
209 if test x"$ac_status" != x0; then 210 if test x"$ac_status" != x0; then
210 echo "$ax_err_4" >&AS_MESSAGE_LOG_FD 211 echo "$ax_err_4" >&AS_MESSAGE_LOG_FD