~ubuntu-branches/ubuntu/karmic/psi/karmic

« back to all changes in this revision

Viewing changes to configure

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2008-08-28 18:46:52 UTC
  • mfrom: (1.2.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20080828184652-iiik12dl91nq7cdi
Tags: 0.12-2
Uploading to unstable (Closes: Bug#494352)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
#
3
 
# Generated by qconf 1.4-dev ( http://delta.affinix.com/qconf/ )
 
3
# Generated by qconf 1.5 ( http://delta.affinix.com/qconf/ )
4
4
#
5
5
 
6
6
show_usage() {
31
31
  --with-zlib-inc=[path]       Path to zlib include files
32
32
  --with-zlib-lib=[path]       Path to zlib library files
33
33
  --enable-universal           Enable use of Mac OS X universal binary support
 
34
  --disable-qdbus              Disable use of QDBUS
34
35
  --disable-growl              Disable use of Growl
35
36
  --with-growl=[path]          Path to the Growl framework
36
37
  --disable-xss                Disable use of the XScreenSaver extension
37
 
  --disable-dnotify            Disable use of Linux Directory Notification
38
38
  --disable-ghbnr              Disable use of gethostbyname_r()
39
39
  --disable-aspell             Disable use of ASPELL
40
40
  --with-aspell-inc=[path]     Path to Aspell include files
41
41
  --with-aspell-lib=[path]     Path to Aspell library files
 
42
  --enable-tests               Enable use of Tests
42
43
  --enable-debug               Enable debugging support
43
44
 
44
45
EOT
196
197
                        shift
197
198
                        ;;
198
199
 
 
200
                --disable-qdbus)
 
201
                        QC_DISABLE_qdbus="Y"
 
202
                        shift
 
203
                        ;;
 
204
 
199
205
                --disable-growl)
200
206
                        QC_DISABLE_growl="Y"
201
207
                        shift
211
217
                        shift
212
218
                        ;;
213
219
 
214
 
                --disable-dnotify)
215
 
                        QC_DISABLE_dnotify="Y"
216
 
                        shift
217
 
                        ;;
218
 
 
219
220
                --disable-ghbnr)
220
221
                        QC_DISABLE_ghbnr="Y"
221
222
                        shift
236
237
                        shift
237
238
                        ;;
238
239
 
 
240
                --enable-tests)
 
241
                        QC_ENABLE_tests="Y"
 
242
                        shift
 
243
                        ;;
 
244
 
239
245
                --enable-debug)
240
246
                        QC_ENABLE_DEBUG="Y"
241
247
                        shift
270
276
echo QC_WITH_ZLIB_INC=$QC_WITH_ZLIB_INC
271
277
echo QC_WITH_ZLIB_LIB=$QC_WITH_ZLIB_LIB
272
278
echo QC_ENABLE_universal=$QC_ENABLE_universal
 
279
echo QC_DISABLE_qdbus=$QC_DISABLE_qdbus
273
280
echo QC_DISABLE_growl=$QC_DISABLE_growl
274
281
echo QC_WITH_GROWL=$QC_WITH_GROWL
275
282
echo QC_DISABLE_xss=$QC_DISABLE_xss
276
 
echo QC_DISABLE_dnotify=$QC_DISABLE_dnotify
277
283
echo QC_DISABLE_ghbnr=$QC_DISABLE_ghbnr
278
284
echo QC_DISABLE_aspell=$QC_DISABLE_aspell
279
285
echo QC_WITH_ASPELL_INC=$QC_WITH_ASPELL_INC
280
286
echo QC_WITH_ASPELL_LIB=$QC_WITH_ASPELL_LIB
 
287
echo QC_ENABLE_tests=$QC_ENABLE_tests
281
288
echo QC_ENABLE_DEBUG=$QC_ENABLE_DEBUG
282
289
echo
283
290
fi
378
385
        echo qmake found in $qm
379
386
fi
380
387
 
 
388
# try to determine the active makespec
 
389
defmakespec=$QMAKESPEC
 
390
if [ -z "$defmakespec" ]; then
 
391
        if $WHICH readlink >/dev/null 2>&1; then
 
392
                READLINK=`$WHICH readlink`
 
393
        fi
 
394
        if [ ! -z "$READLINK" ]; then
 
395
                qt_mkspecsdir=`$qm -query QT_INSTALL_DATA`/mkspecs
 
396
                if [ -d "$qt_mkspecsdir" ] && [ -h "$qt_mkspecsdir/default" ]; then
 
397
                        defmakespec=`$READLINK $qt_mkspecsdir/default`
 
398
                fi
 
399
        fi
 
400
fi
 
401
 
 
402
if [ "$QC_VERBOSE" = "Y" ]; then
 
403
        echo makespec is $defmakespec
 
404
fi
 
405
 
 
406
qm_spec=""
 
407
# if the makespec is macx-xcode, force macx-g++
 
408
if [ "$defmakespec" = "macx-xcode" ]; then
 
409
        qm_spec=macx-g++
 
410
        QMAKESPEC=$qm_spec
 
411
        export QMAKESPEC
 
412
        if [ "$QC_VERBOSE" = "Y" ]; then
 
413
                echo overriding makespec to $qm_spec
 
414
        fi
 
415
fi
 
416
 
381
417
gen_files() {
382
418
cat >$1/modules.cpp <<EOT
383
419
#line 1 "qt4.qcm"
419
455
                // FIXME: Check QCA version number
420
456
                if (QFile::exists("third-party/qca/qca")) {
421
457
                        conf->addExtra("CONFIG += qca-static");
422
 
                        conf->addExtra("CONFIG -= link_prl");
423
458
                        conf->addDefine("QCA_NO_PLUGINS");
424
459
                        return true;
425
460
                }
462
497
 
463
498
                QString proextra =
464
499
                "CONFIG += qt crypto\n"
465
 
                "CONFIG -= link_prl\n"
466
500
                "QT -= gui\n";
467
501
 
468
502
                QString str =
471
505
                "int main()\n"
472
506
                "{\n"
473
507
                "       unsigned long x = QCA_VERSION;\n"
474
 
                "       if(x >= 0x016363) return 0; else return 1;\n"
 
508
                "       if(x >= 0x020000 && x < 0x030000) return 0; else return 1;\n"
475
509
                "}\n";
476
510
 
477
511
                int ret;
778
812
        QString path;
779
813
        bool bundled;
780
814
};
 
815
#line 1 "qdbus.qcm"
 
816
/*
 
817
-----BEGIN QCMOD-----
 
818
name: QDBUS
 
819
-----END QCMOD-----
 
820
*/
 
821
 
 
822
//----------------------------------------------------------------------------
 
823
// qc_qdbus
 
824
//----------------------------------------------------------------------------
 
825
class qc_qdbus : public ConfObj
 
826
{
 
827
public:
 
828
        qc_qdbus(Conf *c) : ConfObj(c) {}
 
829
        QString name() const { return "QDBUS"; }
 
830
        QString shortname() const { return "qdbus"; }
 
831
        bool exec()
 
832
        {
 
833
                if (!conf->getenv("QC_DISABLE_qdbus").isEmpty())
 
834
                        return false;
 
835
 
 
836
                // test for "qdbus" feature
 
837
 
 
838
                QString proextra =
 
839
                "CONFIG += qt qdbus\n"
 
840
                "QT -= gui\n";
 
841
 
 
842
                QString str =
 
843
                "\n"
 
844
                "int main()\n"
 
845
                "{\n"
 
846
                "       return 0;\n"
 
847
                "}\n";
 
848
 
 
849
                int ret;
 
850
                if(!conf->doCompileAndLink(str, QStringList(), QString(), proextra, &ret))
 
851
                        return false;
 
852
                if(ret != 0)
 
853
                        return false;
 
854
                
 
855
                conf->addExtra("CONFIG += dbus");
 
856
                return true;
 
857
        }
 
858
};
781
859
#line 1 "growl.qcm"
782
860
/*
783
861
-----BEGIN QCMOD-----
872
950
                        "    XScreenSaverQueryExtension(NULL, NULL, NULL);\n"
873
951
                        "    return 0;\n"
874
952
                        "}\n";
875
 
                QString proextra = "CONFIG += x11\n"
876
 
                                   "CONFIG -= link_prl\n";
 
953
                QString proextra = "CONFIG += x11\n";
877
954
 
878
955
                if (!conf->doCompileAndLink(str, QStringList(), "-lXss", proextra, NULL)) {
879
956
                        if (!conf->doCompileAndLink(str, QStringList(), QString(), proextra, NULL)) {
888
965
                return true;
889
966
        }
890
967
};
891
 
#line 1 "dnotify.qcm"
892
 
/*
893
 
-----BEGIN QCMOD-----
894
 
name: Linux Directory Notification
895
 
-----END QCMOD-----
896
 
*/
897
 
 
898
 
#include<unistd.h>
899
 
#include<fcntl.h>
900
 
#include<signal.h>
901
 
#include<sys/utsname.h>
902
 
 
903
 
//----------------------------------------------------------------------------
904
 
// qc_dnotify
905
 
//----------------------------------------------------------------------------
906
 
class qc_dnotify : public ConfObj
907
 
{
908
 
public:
909
 
        qc_dnotify(Conf *c) : ConfObj(c) { }
910
 
 
911
 
        QString name() const { return "Linux Directory Notification"; }
912
 
        QString shortname() const { return "dnotify"; }
913
 
 
914
 
        bool exec()
915
 
        {
916
 
                QString str =
917
 
                        "#define _GNU_SOURCE\n"
918
 
                        "#include<unistd.h>\n"
919
 
                        "#include<fcntl.h>\n"
920
 
                        "#include<signal.h>\n"
921
 
                        "#include<sys/utsname.h>\n"
922
 
                        "\n"
923
 
                        "int main()\n"
924
 
                        "{\n"
925
 
                        "        DN_DELETE|DN_CREATE|DN_RENAME|DN_MULTISHOT|DN_MODIFY|DN_ATTRIB;\n"
926
 
                        "        return 0;\n"
927
 
                        "}\n";
928
 
                int ret;
929
 
                if (!conf->doCompileAndLink(str, QStringList(), QString(), QString(), &ret) || ret != 0)
930
 
                        return false;
931
 
                        
932
 
                conf->addDefine("HAVE_DNOTIFY");
933
 
                return true;
934
 
        }
935
 
};
936
968
#line 1 "ghbnr.qcm"
937
969
/*
938
970
-----BEGIN QCMOD-----
1029
1061
                return true;
1030
1062
        }
1031
1063
};
 
1064
#line 1 "tests.qcm"
 
1065
/*
 
1066
-----BEGIN QCMOD-----
 
1067
name: Tests
 
1068
-----END QCMOD-----
 
1069
*/
 
1070
 
 
1071
//----------------------------------------------------------------------------
 
1072
// qc_tests
 
1073
//----------------------------------------------------------------------------
 
1074
class qc_tests : public ConfObj
 
1075
{
 
1076
public:
 
1077
        qc_tests(Conf *c) : ConfObj(c) {}
 
1078
        QString name() const { return "tests"; }
 
1079
        QString shortname() const { return "tests"; }
 
1080
        bool exec()
 
1081
        {
 
1082
                conf->addExtra("CONFIG += tests");
 
1083
                return true;
 
1084
        }
 
1085
};
1032
1086
#line 1 "debug.qcm"
1033
1087
/*
1034
1088
-----BEGIN QCMOD-----
1116
1170
    o = new qc_certstore(conf);
1117
1171
    o->required = true;
1118
1172
    o->disabled = false;
 
1173
    o = new qc_qdbus(conf);
 
1174
    o->required = false;
 
1175
    o->disabled = false;
1119
1176
    o = new qc_growl(conf);
1120
1177
    o->required = false;
1121
1178
    o->disabled = false;
1122
1179
    o = new qc_xss(conf);
1123
1180
    o->required = false;
1124
1181
    o->disabled = false;
1125
 
    o = new qc_dnotify(conf);
1126
 
    o->required = false;
1127
 
    o->disabled = false;
1128
1182
    o = new qc_ghbnr(conf);
1129
1183
    o->required = false;
1130
1184
    o->disabled = false;
1131
1185
    o = new qc_aspell(conf);
1132
1186
    o->required = false;
1133
1187
    o->disabled = false;
 
1188
    o = new qc_tests(conf);
 
1189
    o->required = false;
 
1190
    o->disabled = true;
1134
1191
    o = new qc_debug(conf);
1135
1192
    o->required = true;
1136
1193
    o->disabled = false;
1140
1197
 
1141
1198
EOT
1142
1199
cat >$1/conf4.h <<EOT
 
1200
/*
 
1201
Copyright (C) 2004-2008  Justin Karneges
 
1202
 
 
1203
This file is free software; unlimited permission is given to copy and/or
 
1204
distribute it, with or without modifications, as long as this notice is
 
1205
preserved.
 
1206
*/
 
1207
 
1143
1208
#ifndef QC_CONF4_H
1144
1209
#define QC_CONF4_H
1145
1210
 
1192
1257
public:
1193
1258
        bool debug_enabled;
1194
1259
        QString qmake_path;
 
1260
        QString qmakespec;
1195
1261
        QString maketool;
1196
1262
 
1197
1263
        QString DEFINES;
1244
1310
 
1245
1311
EOT
1246
1312
cat >$1/conf4.cpp <<EOT
 
1313
/*
 
1314
Copyright (C) 2004-2008  Justin Karneges
 
1315
 
 
1316
This file is free software; unlimited permission is given to copy and/or
 
1317
distribute it, with or without modifications, as long as this notice is
 
1318
preserved.
 
1319
*/
 
1320
 
1247
1321
#include "conf4.h"
1248
1322
 
1249
1323
#include <stdio.h>
1637
1711
        QString pro = QString(
1638
1712
                "CONFIG  += console\n"
1639
1713
                "CONFIG  -= qt app_bundle\n"
1640
 
                "CONFIG  -= qt link_prl\n"
1641
1714
                "SOURCES += atest.cpp\n");
1642
1715
        QString inc = incs.join(" ");
1643
1716
        if(!inc.isEmpty())
1966
2039
        QString confCommand = qc_getenv("QC_COMMAND");
1967
2040
        QString proName = qc_getenv("QC_PROFILE");
1968
2041
        conf->qmake_path = qc_getenv("QC_QMAKE");
 
2042
        conf->qmakespec = qc_getenv("QC_QMAKESPEC");
1969
2043
        conf->maketool = qc_getenv("QC_MAKETOOL");
1970
2044
 
1971
2045
        if(conf->debug_enabled)
1989
2063
                printf("builddir:     [%s]\n", qPrintable(builddir));
1990
2064
                printf("profile:      [%s]\n", qPrintable(proPath));
1991
2065
                printf("qmake path:   [%s]\n", qPrintable(conf->qmake_path));
 
2066
                printf("qmakespec:    [%s]\n", qPrintable(conf->qmakespec));
1992
2067
                printf("make tool:    [%s]\n", qPrintable(conf->maketool));
1993
2068
                printf("\n");
1994
2069
        }
2046
2121
                success = true;
2047
2122
        }
2048
2123
        QString qmake_path = conf->qmake_path;
 
2124
        QString qmakespec = conf->qmakespec;
2049
2125
        delete conf;
2050
2126
 
2051
2127
        if(!success)
2052
2128
                return 1;
2053
2129
 
2054
2130
        // run qmake on the project file
2055
 
        int ret = qc_runprogram(qmake_path, QStringList() << proPath, 0, true);
 
2131
        QStringList args;
 
2132
        if(!qmakespec.isEmpty())
 
2133
        {
 
2134
                args += "-spec";
 
2135
                args += qmakespec;
 
2136
        }
 
2137
        args += proPath;
 
2138
        int ret = qc_runprogram(qmake_path, args, 0, true);
2056
2139
        if(ret != 0)
2057
2140
                return 1;
2058
2141
 
2063
2146
cat >$1/conf4.pro <<EOT
2064
2147
CONFIG  += console
2065
2148
CONFIG  -= app_bundle
2066
 
CONFIG  -= link_prl
2067
2149
QT      -= gui
2068
2150
TARGET   = conf
2069
2151
 
2088
2170
export QC_WITH_ZLIB_INC
2089
2171
export QC_WITH_ZLIB_LIB
2090
2172
export QC_ENABLE_universal
 
2173
export QC_DISABLE_qdbus
2091
2174
export QC_DISABLE_growl
2092
2175
export QC_WITH_GROWL
2093
2176
export QC_DISABLE_xss
2094
 
export QC_DISABLE_dnotify
2095
2177
export QC_DISABLE_ghbnr
2096
2178
export QC_DISABLE_aspell
2097
2179
export QC_WITH_ASPELL_INC
2098
2180
export QC_WITH_ASPELL_LIB
 
2181
export QC_ENABLE_tests
2099
2182
export QC_ENABLE_DEBUG
2100
2183
export QC_VERBOSE
2101
2184
rm -rf .qconftemp
2103
2186
        mkdir .qconftemp
2104
2187
        gen_files .qconftemp
2105
2188
        cd .qconftemp
2106
 
        $qm conf4.pro >/dev/null
 
2189
        if [ ! -z "$qm_spec" ]; then
 
2190
                $qm -spec $qm_spec conf4.pro >/dev/null
 
2191
        else
 
2192
                $qm conf4.pro >/dev/null
 
2193
        fi
2107
2194
        $MAKE clean >/dev/null 2>&1
2108
2195
        $MAKE >../conf.log 2>&1
2109
2196
)
2132
2219
export QC_PROFILE
2133
2220
QC_QMAKE=$qm
2134
2221
export QC_QMAKE
 
2222
QC_QMAKESPEC=$qm_spec
 
2223
export QC_QMAKESPEC
2135
2224
QC_MAKETOOL=$MAKE
2136
2225
export QC_MAKETOOL
2137
2226
.qconftemp/conf