From: Kevin K. <kev...@ch...> - 2006-09-22 23:53:46
|
> > Usage: > > cross-MinGW: qmake-qt4 -win32 -spec win32-cross-g++ > > MSYS: /c/qt4/bin/qmake -spec win32-msys-g++ > > (The MSYS line assumes Qt 4 is in C:\qt4, please adjust.) > > In this case, is Qmake -foo -bar -.... -... easier than ./configure with > no args? In the cross-MinGW case, the alternative is: ./configure --host=i386-mingw32 which is pretty much the same thing. In the MSYS case, well, QMake defaults to the native mingw32-make, and that may well just work. (You'll need to use mingw32-make instead of make if you go that route though.) If you want QMake to default to using the MSYS make, then that's something you can change in your QMake configuration. What make to configure for is really something for the user to decide. > > tilibs public headers shouldn't require the client program to run > > autoconf tests. stdint.h is included with GCC in all current versions > > I agree but stdint.h does not exist under Windows (at least MSVC) thus it > _needs_ to be detected. That's what __GNUC__ is for. Note that the header _does_ exist on MinGW, and in fact you _must_ use it on MinGW, or MinGW's stdint.h will conflict with the windows.h-based definitions in your stdints?.h, which is how I discovered this problem in the first place! > > (assuming the GCC-provided headers are shipped, but I think TIGCC is the > > only > > port which doesn't do that ;-) ), so I think it's safe to assume that > > __GNUC__ implies HAVE_STDINT_H. Incidentally, this is also what the QMake > > project now does: > > *-g++:CFLAGS += -DHAVE_STDINT_H > > you are replacing autoconf probing by hand-written specs. Is this > normal/better? I could probe it (Qt itself uses QMake to probe a lot of things), but I don't see the point. I've found one target which needs it (MinGW), I've found a superset which allows it (GCC), so this is a valid fix. (I could define HAVE_STDINT_H only for MinGW too, but as all GCCs provide it, I think this way is better. Maybe on other GCC targets your hack also conflicts with the real stdint.h.) That said, I think the proper fix would be to write: #if defined(__GNUC__) || defined(HAVE_STDINT_H) in the header file in the first place. > > tilibs.h should just: > > #include <ticonv.h> > > #include <ticables.h> > > #include <tifiles.h> > > #include <ticalcs.h> > > and be done with it, no crazy #ifdefs. > > This is currently this, isn't it? No (as you have noticed by the fact that my change broke M$VC ;-) ). There were at least 3 different methods: #include "ticonv.h" #include <tilp2/ticonv.h> #include <libticonv/ticonv.h> depending on the target. The right way to include installed headers is of course to use angle brackets, and the extra path is not needed because that's what pkg-config is for (or for M$VC, the project file should take care of the include paths, at least in theory...). Kevin Kofler |