1 Star 0 Fork 0

村野龙夫 / qtbase

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
configure 252.37 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746
#!/bin/sh
#############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Copyright (C) 2016 Intel Corporation.
## Contact: https://www.qt.io/licensing/
##
## This file is the build configuration utility of the Qt Toolkit.
##
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensees holding valid commercial Qt licenses may use this file in
## accordance with the commercial license agreement provided with the
## Software or, alternatively, in accordance with the terms contained in
## a written agreement between you and The Qt Company. For licensing terms
## and conditions see https://www.qt.io/terms-conditions. For further
## information use the contact form at https://www.qt.io/contact-us.
##
## GNU General Public License Usage
## Alternatively, this file may be used under the terms of the GNU
## General Public License version 3 as published by the Free Software
## Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
## included in the packaging of this file. Please review the following
## information to ensure the GNU General Public License requirements will
## be met: https://www.gnu.org/licenses/gpl-3.0.html.
##
## $QT_END_LICENSE$
##
#############################################################################
#-------------------------------------------------------------------------------
# script initialization
#-------------------------------------------------------------------------------
# the name of this script
relconf=`basename $0`
# the directory of this script is the "source tree"
relpath=`dirname $0`
relpath=`(cd "$relpath"; /bin/pwd)`
# the current directory is the "build tree" or "object tree"
outpath=`/bin/pwd`
# where to find which..
unixtests="$relpath/config.tests/unix"
mactests="$relpath/config.tests/mac"
WHICH="$unixtests/which.test"
PERL=`$WHICH perl 2>/dev/null`
# find out which awk we want to use, prefer gawk, then nawk, then regular awk
AWK=
for e in gawk nawk awk; do
if "$WHICH" $e >/dev/null 2>&1 && ( $e -f /dev/null /dev/null ) >/dev/null 2>&1; then
AWK=$e
break
fi
done
# find a make command
if [ -z "$MAKE" ]; then
MAKE=
for mk in gmake make; do
if "$WHICH" $mk >/dev/null 2>&1; then
MAKE=`"$WHICH" $mk`
break
fi
done
if [ -z "$MAKE" ]; then
echo >&2 "You don't seem to have 'make' or 'gmake' in your PATH."
echo >&2 "Cannot proceed."
exit 1
fi
# export MAKE, we need it later in the config.tests
export MAKE
fi
# do this early so we don't store it in config.status
CFG_TOPLEVEL=
if [ x"$1" = x"-top-level" ]; then
CFG_TOPLEVEL=yes
shift
fi
# later cache the command line in config.status
OPT_CMDLINE=
for i in "$@"; do
if [ "x$i" != "x-v" ]; then
[ -z "${i##* *}" ] && i="'$i'"
OPT_CMDLINE="$OPT_CMDLINE $i"
fi
done
# initialize global variables
CONFIG_SEPARATORS=`printf ' \t'`
QMAKE_SWITCHES=
QMAKE_VARS=
QMAKE_CONFIG=
QTCONFIG_CONFIG=
QT_CONFIG=
SUPPORTED=
QMAKE_VARS_FILE=.qmake.vars
DEVICE_VARS_FILE=.device.vars
HOST_VARS_FILE=.host.vars
:> "$QMAKE_VARS_FILE"
:> "$DEVICE_VARS_FILE"
:> "$HOST_VARS_FILE"
#-------------------------------------------------------------------------------
# utility functions
#-------------------------------------------------------------------------------
shellEscape()
{
echo "$@" | sed 's/ /\ /g'
}
makeabs()
{
local FILE="$1"
local RES="$FILE"
if [ -z "${FILE##/*}" ]; then
true
elif [ "$OSTYPE" = "msys" -a -z "${FILE##[a-zA-Z]:[/\\]*}" ]; then
true
else
RES=$PWD/$FILE
fi
RES=$RES/
while true; do
nres=`echo "$RES" | sed 's,/[^/][^/]*/\.\./,/,g; s,/\./,/,g'`
test x"$nres" = x"$RES" && break
RES=$nres
done
echo "$RES" | sed 's,//,/,g; s,/$,,'
}
# Adds a new qmake variable to the cache
# Usage: QMakeVar mode varname contents
# where mode is one of: set, add, del
QMakeVar()
{
case "$1" in
set)
eq="="
;;
add)
eq="+="
;;
del)
eq="-="
;;
*)
echo >&2 "BUG: wrong command to QMakeVar: $1"
;;
esac
echo "$2" "$eq" "$3" >> "$QMAKE_VARS_FILE"
}
shellArgumentListToQMakeListHelper()
{
local retval
for arg in "$@"; do retval="$retval \"$arg\""; done
echo "$retval"
}
# Convert a string usable on a shell command line into word-by-word quoted
# qmake list.
shellArgumentListToQMakeList()
{
# eval is needed for the shell to interpret the backslash escape sequences
eval shellArgumentListToQMakeListHelper "$@"
}
# Helper function for getQMakeConf. It parses include statements in
# qmake.conf and prints out the expanded file
expandQMakeConf()
{
while read line; do case "$line" in
include*)
inc_file=`echo "$line" | sed -n -e '/^include.*(.*)/s/include.*(\(.*\)).*$/\1/p'`
current_dir=`dirname "$1"`
conf_file="$current_dir/$inc_file"
if [ ! -f "$conf_file" ]; then
echo "WARNING: Unable to find file $conf_file" >&2
continue
fi
expandQMakeConf "$conf_file" "$2"
;;
*load\(device_config\)*)
conf_file="$2"
if [ ! -f "$conf_file" ]; then
echo "WARNING: Unable to find file $conf_file" >&2
continue
fi
expandQMakeConf "$conf_file" "$2"
;;
*)
echo "$line"
;;
esac; done < "$1"
}
extractQMakeVariables()
{
LC_ALL=C $AWK '
BEGIN {
values["LITERAL_WHITESPACE"] = " "
values["LITERAL_DOLLAR"] = "$"
}
/^!?host_build:/ {
scopeStart = index($0, ":") + 1
condition = substr($0, 0, scopeStart - 2)
if (condition != "'"$1"'") { next }
$0 = substr($0, scopeStart)
}
/^[_A-Z0-9.]+[ \t]*\+?=/ {
valStart = index($0, "=") + 1
append = 0
if (substr($0, valStart - 2, 1) == "+") {
append = 1
}
variable = substr($0, 0, valStart - 2 - append)
value = substr($0, valStart)
gsub("[ \t]+", "", variable)
gsub("^[ \t]+", "", value)
gsub("[ \t]+$", "", value)
ovalue = ""
while (match(value, /\$\$(\{[_A-Z0-9.]+\}|[_A-Z0-9.]+)/)) {
ovalue = ovalue substr(value, 1, RSTART - 1)
var = substr(value, RSTART + 2, RLENGTH - 2)
value = substr(value, RSTART + RLENGTH)
if (var ~ /^\{/) {
var = substr(var, 2, length(var) - 2)
}
ovalue = ovalue values[var]
}
value = ovalue value
ovalue = ""
while (match(value, /\$\$system\(("[^"]*"|[^)]*)\)/)) {
ovalue = ovalue substr(value, 1, RSTART - 1)
cmd = substr(value, RSTART + 9, RLENGTH - 10)
gsub(/^"|"$/, "", cmd)
value = substr(value, RSTART + RLENGTH)
while ((cmd | getline line) > 0) {
ovalue = ovalue line
}
close(cmd)
}
value = ovalue value
combinedValue = values[variable]
if (append == 1 && length(combinedValue) > 0) {
combinedValue = combinedValue " " value
} else {
combinedValue = value
}
values[variable] = combinedValue
}
END {
for (var in values) {
print var "=" values[var]
}
}
'
}
getSingleQMakeVariable()
{
echo "$2" | $AWK "/^($1)=/ { print substr(\$0, index(\$0, \"=\") + 1) }"
}
macSDKify()
{
# Normally we take care of sysrootifying in sdk.prf, but configure extracts some
# values before qmake is even built, so we have to duplicate the logic here.
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
case "$sdk" in
macosx*)
version_min_flag="-mmacosx-version-min=$(getSingleQMakeVariable QMAKE_MACOSX_DEPLOYMENT_TARGET "$1")"
;;
iphoneos*)
version_min_flag="-miphoneos-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
;;
iphonesimulator*)
version_min_flag="-mios-simulator-version-min=$(getSingleQMakeVariable QMAKE_IOS_DEPLOYMENT_TARGET "$1")"
;;
*)
;;
esac
echo "$1" | while read line; do
case "$line" in
QMAKE_CC=*|QMAKE_CXX=*|QMAKE_FIX_RPATH=*|QMAKE_AR=*|QMAKE_RANLIB=*|QMAKE_LINK=*|QMAKE_LINK_SHLIB=*)
# Prefix tool with toolchain path
var=$(echo "$line" | cut -d '=' -f 1)
val=$(echo "$line" | cut -d '=' -f 2-)
sdk_val=$(/usr/bin/xcrun -sdk $sdk -find $(echo $val | cut -d ' ' -f 1))
val=$(echo $sdk_val $(echo $val | cut -s -d ' ' -f 2-))
echo "$var=$val"
;;
QMAKE_CFLAGS=*|QMAKE_CXXFLAGS=*)
echo "$line -isysroot $sysroot $version_min_flag"
;;
QMAKE_LFLAGS=*)
echo "$line -Wl,-syslibroot,$sysroot $version_min_flag"
;;
*)
echo "$line"
;;
esac
done
}
# relies on $QMAKESPEC being set correctly. parses include statements in
# qmake.conf and prints out the expanded file
getQMakeConf()
{
if [ -z "$specvals" ]; then
specvals=`expandQMakeConf "$QMAKESPEC/qmake.conf" "$HOST_VARS_FILE" | extractQMakeVariables "host_build"`
if [ "$BUILD_ON_MAC" = "yes" ]; then specvals=$(macSDKify "$specvals"); fi
fi
getSingleQMakeVariable "$1" "$specvals"
}
getXQMakeConf()
{
if [ -z "$xspecvals" ]; then
xspecvals=`expandQMakeConf "$XQMAKESPEC/qmake.conf" "$DEVICE_VARS_FILE" | extractQMakeVariables "!host_build"`
if [ "$XPLATFORM_MAC" = "yes" ]; then xspecvals=$(macSDKify "$xspecvals"); fi
fi
getSingleQMakeVariable "$1" "$xspecvals"
}
testXConfig()
{
# Put a space on each end of the CONFIG value so that searching for the
# target with whitespace on either side will work even when it's the
# first/last/only item in the CONFIG value.
case \ `getXQMakeConf CONFIG`\ in
*[${CONFIG_SEPARATORS}]$1[${CONFIG_SEPARATORS}]*)
return 0
;;
*)
return 1
;;
esac
}
compilerSupportsFlag()
{
cat >conftest.cpp <<EOF
int main() { return 0; }
EOF
if [ "$OPT_VERBOSE" = "yes" ]; then
"$@" -o conftest-out conftest.cpp
else
"$@" -o conftest-out conftest.cpp >/dev/null 2>&1
fi
ret=$?
rm -f conftest.cpp conftest-out
return $ret
}
linkerSupportsFlag()
{
compiler=$1
shift
lflags=-Wl
for flag
do
safe_flag=`shellEscape "$flag"`
lflags=$lflags,$safe_flag
done
if [ $CFG_USE_GOLD_LINKER = yes ]; then
lflags="-fuse-ld=gold $lflags"
fi
compilerSupportsFlag $compiler $lflags
}
# $1: newline-separated list of default paths
# stdin: input path
# stdout: input path or nothing
filterDefaultPaths()
{
local path
path=`cat`
path=`makeabs "$path"`
echo "$1" | grep "^$path\$" > /dev/null || echo "$path"
}
filterIncludePath()
{
filterDefaultPaths "$DEFAULT_INCDIRS"
}
filterLibraryPath()
{
filterDefaultPaths "$DEFAULT_LIBDIRS"
}
filterPathOptionsHelper()
{
local flag defpaths sep p path
flag=$1; shift
defpaths=$1; shift
sep=
for p in "$@"; do
path=${p#$flag}
if [ "x$path" != "x$p" ]; then
path=`echo "$path" | filterDefaultPaths "$defpaths"`
test -z "$path" && continue
fi
# Re-quote for shell & qmake
p=`echo "$p" | sed 's,[^ ]* .*,"&",g'`
printf "%s%s" "$sep" "$p"
sep=" "
done
echo
}
# $1: flag
# $2: newline-separated list of default paths
# stdin: list of command line options
# sdout: stdin without the options naming default paths
filterPathOptions()
{
# The eval does escape interpretation for us
eval filterPathOptionsHelper $1 "\"$2\"" "`cat`"
}
filterIncludeOptions()
{
filterPathOptions -I "$DEFAULT_INCDIRS"
}
filterLibraryOptions()
{
filterPathOptions -L "$DEFAULT_LIBDIRS"
}
#-------------------------------------------------------------------------------
# device options
#-------------------------------------------------------------------------------
DeviceVar()
{
case "$1" in
set)
eq="="
;;
*)
echo >&2 "BUG: wrong command to DeviceVar: $1"
;;
esac
echo "$2" "$eq" "$3" >> "$DEVICE_VARS_FILE"
}
resolveDeviceMkspec()
{
result=$(find "$relpath/mkspecs/devices/" -type d -name "*$1*" | sed "s,^$relpath/mkspecs/,,")
match_count=$(echo "$result" | wc -w)
if [ "$match_count" -gt 1 ]; then
echo >&2 "Error: Multiple matches for device '$1'. Candidates are:"
tabbed_result=$(echo "$result" | sed 's,^, ,')
echo >&2 "$tabbed_result"
echo "undefined"
elif [ "$match_count" -eq 0 ]; then
echo >&2 "Error: No device matching '$1'"
echo "undefined"
else
echo "$result"
fi
}
#-------------------------------------------------------------------------------
# Host options
#-------------------------------------------------------------------------------
HostVar()
{
case "$1" in
set)
eq="="
;;
*)
echo >&2 "BUG: wrong command to HostVar: $1"
;;
esac
echo "$2" "$eq" "$3" >> "$HOST_VARS_FILE"
}
#-------------------------------------------------------------------------------
# operating system detection
#-------------------------------------------------------------------------------
# need that throughout the script
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
# detect the "echo without newline" style. usage: echo $ECHO_N "<string>$ECHO_C"
if echo '\c' | grep '\c' >/dev/null; then
ECHO_N=-n
else
ECHO_C='\c'
fi
#-------------------------------------------------------------------------------
# window system detection
#-------------------------------------------------------------------------------
BUILD_ON_MAC=no
if [ -d /System/Library/Frameworks/Carbon.framework ]; then
BUILD_ON_MAC=yes
fi
HOST_DIRLIST_SEP=":"
DEV_NULL=/dev/null
if [ "$OSTYPE" = "msys" ]; then
HOST_DIRLIST_SEP=";"
DEV_NULL=/tmp/empty-file
echo "" > $DEV_NULL
relpath=`(cd "$relpath"; pwd -W)`
outpath=`pwd -W`
fi
#-------------------------------------------------------------------------------
# Verify Xcode installation on Mac OS
#-------------------------------------------------------------------------------
if [ "$BUILD_ON_MAC" = "yes" ]; then
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
echo >&2
echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
echo " version. See the xcode-select man page for more information." >&2
echo >&2
exit 2
fi
if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
echo >&2
echo " Xcode not set up properly. You may need to confirm the license" >&2
echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
echo >&2
exit 2
fi
fi
#-----------------------------------------------------------------------------
# Qt version detection
#-----------------------------------------------------------------------------
QT_VERSION=
QT_MAJOR_VERSION=
QT_MINOR_VERSION=0
QT_PATCH_VERSION=0
eval `sed -n -e 's/^MODULE_VERSION = \(\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*\)$/QT_VERSION=\1\
QT_MAJOR_VERSION=\2\
QT_MINOR_VERSION=\3\
QT_PATCH_VERSION=\4/p' < "$relpath"/.qmake.conf`
if [ -z "$QT_MAJOR_VERSION" ]; then
echo "Cannot process version from .qmake.conf"
echo "Cannot proceed."
exit 1
fi
#-------------------------------------------------------------------------------
# initalize variables
#-------------------------------------------------------------------------------
SYSTEM_VARIABLES="AR RANLIB STRIP OBJDUMP LD CC CXX CFLAGS CXXFLAGS LDFLAGS"
for varname in $SYSTEM_VARIABLES; do
qmakevarname="${varname}"
qmakecmdargs=""
# use LDFLAGS for autoconf compat, but qmake uses QMAKE_LFLAGS
if [ "${varname}" = "LDFLAGS" ]; then
qmakevarname="LFLAGS"
elif [ "${varname}" = "LD" ]; then
qmakevarname="LINK"
elif [ "${varname}" = "AR" ]; then
# QMAKE_AR needs to be set to "/path/to/ar cqs" but the
# environment variable will be set to the command only so we
# need to append " cqs" for autoconf compatibility
qmakecmdargs=" cqs"
fi
cmd=`echo \
'if [ -n "\$'${varname}'" ]; then
QMakeVar set QMAKE_'${qmakevarname}' "\$'${varname}${qmakecmdargs}'"
fi'`
eval "$cmd"
done
# Use CC/CXX to run config.tests
mkdir -p "$outpath/config.tests"
rm -f "$outpath/config.tests/.qmake.cache"
cp "$QMAKE_VARS_FILE" "$outpath/config.tests/.qmake.cache"
QMakeVar add styles "mac fusion windows"
# QTDIR may be set and point to an old or system-wide Qt installation
unset QTDIR
# the minimum version of libdbus-1 that we require:
MIN_DBUS_1_VERSION=1.2
# initalize internal variables
CFG_CONFIGURE_EXIT_ON_ERROR=yes
CFG_PROFILE=no
CFG_STRIP=yes
CFG_GUI=auto # (yes|no|auto)
CFG_WIDGETS=yes
CFG_QCONFIG=full
CFG_DEBUG=auto
CFG_MYSQL_CONFIG=
CFG_PSQL_CONFIG=
CFG_DEBUG_RELEASE=no
CFG_FORCEDEBUGINFO=no
CFG_RELEASE_TOOLS=no
CFG_SHARED=yes
CFG_SM=auto
CFG_XSHAPE=auto
CFG_XSYNC=auto
CFG_XFIXES=runtime
CFG_ZLIB=auto
CFG_MTDEV=auto
CFG_JOURNALD=no
CFG_SYSLOG=no
CFG_SQLITE=qt
CFG_GIF=auto
CFG_PNG=yes
CFG_LIBPNG=auto
CFG_JPEG=auto
CFG_LIBJPEG=auto
CFG_XCURSOR=runtime
CFG_XRANDR=runtime
CFG_XRENDER=auto
CFG_MITSHM=auto
CFG_OPENGL=auto
CFG_OPENGLES3=yes # still depends on CFG_OPENGL, so auto in practice
CFG_OPENVG=auto
CFG_OPENVG_LC_INCLUDES=no
CFG_OPENVG_SHIVA=auto
CFG_OPENVG_ON_OPENGL=auto
CFG_EGL=auto
CFG_EGL_X=auto
CFG_DOUBLECONVERSION=auto
CFG_FONTCONFIG=auto
CFG_FREETYPE=auto
CFG_HARFBUZZ=auto
CFG_SQL_AVAILABLE=
QT_ALL_BUILD_PARTS=" libs tools examples tests "
QT_DEFAULT_BUILD_PARTS="libs tools examples"
CFG_BUILD_PARTS=""
CFG_NOBUILD_PARTS=""
CFG_SKIP_MODULES=""
CFG_COMPILE_EXAMPLES=yes
CFG_AUDIO_BACKEND=auto
CFG_QML_DEBUG=yes
CFG_PKGCONFIG=auto
CFG_STACK_PROTECTOR_STRONG=auto
CFG_SLOG2=auto
CFG_PPS=auto
CFG_QNX_IMF=auto
CFG_LGMON=auto
CFG_SYSTEM_PROXIES=no
CFG_ANDROID_STYLE_ASSETS=yes
CFG_GSTREAMER=auto
CFG_GSTREAMER_VERSION=""
CFG_ATOMIC64=auto
# Target architecture
CFG_ARCH=
CFG_CPUFEATURES=
# Host architecture, same as CFG_ARCH when not cross-compiling
CFG_HOST_ARCH=
CFG_HOST_CPUFEATURES=
# Set when the -arch or -host-arch arguments are used
OPT_OBSOLETE_HOST_ARG=no
CFG_USE_GNUMAKE=no
CFG_XINPUT2=auto
CFG_XKB=auto
CFG_XKBCOMMON=yes
CFG_XKBCOMMON_EVDEV=auto
CFG_XKB_CONFIG_ROOT=auto
CFG_XCB=auto
CFG_XCB_XLIB=auto
CFG_XCB_GLX=no
CFG_EGLFS=auto
CFG_EGLFS_BRCM=no
CFG_EGLFS_EGLDEVICE=no
CFG_EGLFS_MALI=no
CFG_EGLFS_VIV=no
CFG_EGLFS_VIV_WL=no
CFG_DIRECTFB=no
CFG_GBM=auto
CFG_LINUXFB=auto
CFG_INTEGRITYFB=no
CFG_KMS=auto
CFG_MIRCLIENT=auto
CFG_LIBUDEV=auto
CFG_LIBINPUT=auto
CFG_OBSOLETE_WAYLAND=no
CFG_EVDEV=auto
CFG_TSLIB=auto
CFG_CUPS=auto
CFG_ICONV=auto
CFG_DBUS=auto
CFG_GLIB=auto
CFG_GTK=auto
CFG_LARGEFILE=auto
CFG_OPENSSL=auto
CFG_LIBPROXY=auto
CFG_SECURETRANSPORT=auto
CFG_PRECOMPILE=auto
CFG_LTCG=no
CFG_SEPARATE_DEBUG_INFO=no
CFG_REDUCE_EXPORTS=auto
CFG_SSE2=auto
CFG_SSE3=auto
CFG_SSSE3=auto
CFG_SSE4_1=auto
CFG_SSE4_2=auto
CFG_AVX=auto
CFG_AVX2=auto
CFG_AVX512=auto
CFG_REDUCE_RELOCATIONS=auto
CFG_ACCESSIBILITY=auto
CFG_ACCESSIBILITY_ATSPI_BRIDGE=no # will be enabled depending on dbus and accessibility being enabled
CFG_NEON=auto
CFG_MIPS_DSP=auto
CFG_MIPS_DSPR2=auto
CFG_CLOCK_GETTIME=auto
CFG_CLOCK_MONOTONIC=auto
CFG_POSIX_FALLOCATE=auto
CFG_MREMAP=auto
CFG_GETADDRINFO=auto
CFG_IPV6IFNAME=auto
CFG_GETIFADDRS=auto
CFG_INOTIFY=auto
CFG_EVENTFD=auto
CFG_CLOEXEC=no
CFG_POLL=auto
CFG_RPATH=yes
CFG_FRAMEWORK=auto
CFG_USE_GOLD_LINKER=auto
CFG_ENABLE_NEW_DTAGS=auto
DEFINES=
INCLUDES=
D_FLAGS=
I_FLAGS=
L_FLAGS=
RPATH_FLAGS=
W_FLAGS=
QCONFIG_FLAGS=
XPLATFORM= # This seems to be the QMAKESPEC, like "linux-g++"
XPLATFORM_MAC=no # Whether target platform is OS X or iOS
XPLATFORM_IOS=no # Whether target platform is iOS
XPLATFORM_ANDROID=no
XPLATFORM_MINGW=no # Whether target platform is MinGW (win32-g++*)
XPLATFORM_QNX=no
XPLATFORM_HAIKU=no
XPLATFORM_INTEGRITY=no
PLATFORM=$QMAKESPEC
QT_CROSS_COMPILE=no
OPT_CONFIRM_LICENSE=no
OPT_SHADOW=maybe
OPT_VERBOSE=no
OPT_HELP=
CFG_SILENT=no
CFG_ALSA=auto
CFG_PULSEAUDIO=auto
CFG_COREWLAN=auto
CFG_ICU=auto
CFG_FORCE_ASSERTS=no
CFG_SANITIZERS=none
CFG_SANITIZE_ADDRESS=no
CFG_SANITIZE_THREAD=no
CFG_SANITIZE_MEMORY=no
CFG_SANITIZE_UNDEFINED=no
CFG_PCRE=auto
QPA_PLATFORM_GUARD=yes
CFG_STDCXX=auto
CFG_DIRECTWRITE=no
CFG_DIRECTWRITE2=auto
CFG_WERROR=auto
CFG_HEADERSCLEAN=auto
CFG_QREAL=double
OPT_MAC_SDK=
COMMERCIAL_USER=ask
LICENSE_FILE=
CFG_DEV=no
# initalize variables used for installation
QT_INSTALL_PREFIX=
QT_INSTALL_DOCS=
QT_INSTALL_HEADERS=
QT_INSTALL_LIBS=
QT_INSTALL_BINS=
QT_INSTALL_LIBEXECS=
QT_INSTALL_PLUGINS=
QT_INSTALL_IMPORTS=
QT_INSTALL_QML=
QT_INSTALL_ARCHDATA=
QT_INSTALL_DATA=
QT_INSTALL_TRANSLATIONS=
QT_INSTALL_SETTINGS=
QT_INSTALL_EXAMPLES=
QT_INSTALL_TESTS=
CFG_SYSROOT=
CFG_GCC_SYSROOT="yes"
QT_HOST_PREFIX=
QT_HOST_BINS=
QT_HOST_LIBS=
QT_HOST_DATA=
QT_EXT_PREFIX=
#flags for SQL drivers
QT_CFLAGS_PSQL=
QT_LFLAGS_PSQL=
QT_CFLAGS_MYSQL=
QT_LFLAGS_MYSQL=
QT_LFLAGS_MYSQL_R=
QT_CFLAGS_SQLITE=
QT_LFLAGS_SQLITE=
QT_LFLAGS_ODBC="-lodbc"
QT_LFLAGS_TDS=
# flags for libdbus-1
QT_CFLAGS_DBUS=
QT_LIBS_DBUS=
# flags for Glib (X11 only)
QT_CFLAGS_GLIB=
QT_LIBS_GLIB=
# default qpa platform
QT_QPA_DEFAULT_PLATFORM=
# Android vars
CFG_DEFAULT_ANDROID_NDK_ROOT=$ANDROID_NDK_ROOT
CFG_DEFAULT_ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT
CFG_DEFAULT_ANDROID_PLATFORM=android-16
CFG_DEFAULT_ANDROID_TARGET_ARCH=armeabi-v7a
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION=4.9
CFG_DEFAULT_ANDROID_NDK_HOST=$ANDROID_NDK_HOST
#-------------------------------------------------------------------------------
# check SQL drivers available in this package
#-------------------------------------------------------------------------------
# opensource version removes some drivers, so force them to be off
CFG_SQL_tds=no
CFG_SQL_oci=no
CFG_SQL_db2=no
CFG_SQL_AVAILABLE=
if [ -d "$relpath/src/plugins/sqldrivers" ]; then
for a in "$relpath/src/plugins/sqldrivers/"*; do
if [ -d "$a" ]; then
base_a=`basename "$a"`
CFG_SQL_AVAILABLE="${CFG_SQL_AVAILABLE} ${base_a}"
eval "CFG_SQL_${base_a}=auto"
fi
done
fi
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE=
if [ -d "$relpath/src/plugins/imageformats" ]; then
for a in "$relpath/src/plugins/imageformats/"*; do
if [ -d "$a" ]; then
base_a=`basename "$a"`
CFG_IMAGEFORMAT_PLUGIN_AVAILABLE="${CFG_IMAGEFORMAT_PLUGIN_AVAILABLE} ${base_a}"
fi
done
fi
#-------------------------------------------------------------------------------
# parse command line arguments
#-------------------------------------------------------------------------------
# parse the arguments, setting things to "yes" or "no"
while [ "$#" -gt 0 ]; do
CURRENT_OPT="$1"
UNKNOWN_ARG=no
case "$1" in
#Autoconf style options
--enable-*)
VAR=`echo $1 | sed 's,^--enable-\(.*\),\1,'`
VAL=yes
;;
--disable-*)
VAR=`echo $1 | sed 's,^--disable-\(.*\),\1,'`
VAL=no
;;
--*=*)
VAR=`echo $1 | sed 's,^--\(.*\)=.*,\1,'`
VAL=`echo $1 | sed 's,^--.*=\(.*\),\1,'`
;;
--no-*)
VAR=`echo $1 | sed 's,^--no-\(.*\),\1,'`
VAL=no
;;
--*)
VAR=`echo $1 | sed 's,^--\(.*\),\1,'`
VAL=yes
;;
#Qt plugin options
-no-*-*|-plugin-*-*|-qt-*-*)
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
VAL=`echo $1 | sed 's,^-\([^-]*\).*,\1,'`
;;
#Qt style no options
-no-*)
VAR=`echo $1 | sed 's,^-no-\(.*\),\1,'`
VAL=no
;;
#Qt style options that pass an argument
-prefix| \
-docdir| \
-headerdir| \
-plugindir| \
-importdir| \
-qmldir| \
-archdatadir| \
-datadir| \
-libdir| \
-bindir| \
-libexecdir| \
-translationdir| \
-sysconfdir| \
-examplesdir| \
-testsdir| \
-hostdatadir| \
-hostbindir| \
-hostlibdir| \
-extprefix| \
-sysroot| \
-external-hostbindir| \
-depths| \
-make| \
-nomake| \
-skip| \
-platform| \
-xplatform| \
-device| \
-device-option| \
-host-option| \
-sdk| \
-arch| \
-host-arch| \
-c++std | \
-mysql_config| \
-psql_config| \
-qpa| \
-qconfig| \
-qreal| \
-sanitize| \
-xkb-config-root| \
-android-sdk| \
-android-ndk| \
-android-ndk-platform| \
-android-ndk-host| \
-android-arch| \
-android-toolchain-version)
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
shift
VAL="$1"
;;
#Qt style complex options in one command
-enable-*|-disable-*)
VAR=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
VAL=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
;;
-system-proxies)
VAR=system-proxies
VAL=yes
;;
-no-system-proxies)
VAR=system-proxies
VAL=no
;;
#Qt Builtin/System style options
-no-*|-system-*|-qt-*)
VAR=`echo $1 | sed 's,^-[^-]*-\(.*\),\1,'`
VAL=`echo $1 | sed 's,^-\([^-]*\)-.*,\1,'`
;;
#Options that cannot be generalized
-k|-continue)
VAR=fatal_error
VAL=no
;;
-opengl)
VAR=opengl
# this option may or may not be followed by an argument
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
VAL=yes
else
shift;
VAL=$1
fi
;;
-openvg)
VAR=openvg
# this option may or may not be followed by an argument
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
VAL=yes
else
shift;
VAL=$1
fi
;;
-gstreamer)
VAR=gstreamer
# this option may or may not be followed by an argument
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
VAL=yes
else
shift;
VAL=$1
fi
;;
-hostprefix)
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
# this option may or may not be followed by an argument
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
VAL=$outpath
else
shift;
VAL=$1
fi
;;
-qtnamespace)
VAR="qtnamespace"
shift
VAL="$1"
;;
-qtlibinfix)
VAR="qtlibinfix"
shift
VAL="$1"
;;
-D?*|-D)
VAR="add_define"
if [ "$1" = "-D" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-D,,'`
fi
;;
-fpu)
VAR="fpu"
# this option may or may not be followed by an argument
if [ -z "$2" ] || echo "$2" | grep '^-' >/dev/null 2>&1; then
VAL=no
else
shift
VAL=$1
fi
;;
-I?*|-I)
VAR="add_ipath"
if [ "$1" = "-I" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-I,,'`
fi
;;
-L?*|-L)
VAR="add_lpath"
if [ "$1" = "-L" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-L,,'`
fi
;;
-R?*|-R)
VAR="add_rpath"
if [ "$1" = "-R" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-R,,'`
fi
;;
-l) # -lfoo is handled differently
VAR="add_link"
shift
VAL="$1"
;;
-F?*|-F)
VAR="add_fpath"
if [ "$1" = "-F" ]; then
shift
VAL="$1"
else
VAL=`echo $1 | sed 's,-F,,'`
fi
;;
-fw) # -fwfoo is handled differently
VAR="add_framework"
shift
VAL="$1"
;;
-W*)
VAR="add_warn"
VAL="$1"
;;
#General options, including Qt style yes options
-*)
VAR=`echo $1 | sed 's,^-\(.*\),\1,'`
VAL="yes"
;;
*)
UNKNOWN_ARG=yes
;;
esac
if [ "$UNKNOWN_ARG" = "yes" ]; then
echo "$1: unknown argument"
ERROR=yes
shift
continue
fi
shift
UNKNOWN_OPT=no
case "$VAR" in
accessibility)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ACCESSIBILITY="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
license)
LICENSE_FILE="$VAL"
;;
gnumake)
CFG_USE_GNUMAKE="$VAL"
;;
mysql_config)
CFG_MYSQL_CONFIG="$VAL"
;;
psql_config)
CFG_PSQL_CONFIG="$VAL"
;;
prefix)
QT_INSTALL_PREFIX="$VAL"
;;
hostprefix)
QT_HOST_PREFIX="$VAL"
;;
hostdatadir)
QT_HOST_DATA="$VAL"
;;
hostbindir)
QT_HOST_BINS="$VAL"
;;
hostlibdir)
QT_HOST_LIBS="$VAL"
;;
extprefix)
QT_EXT_PREFIX="$VAL"
;;
pkg-config)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PKGCONFIG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
force-pkg-config)
CFG_PKGCONFIG="yes"
;;
docdir)
QT_INSTALL_DOCS="$VAL"
;;
headerdir)
QT_INSTALL_HEADERS="$VAL"
;;
plugindir)
QT_INSTALL_PLUGINS="$VAL"
;;
importdir)
QT_INSTALL_IMPORTS="$VAL"
;;
qmldir)
QT_INSTALL_QML="$VAL"
;;
archdatadir)
QT_INSTALL_ARCHDATA="$VAL"
;;
datadir)
QT_INSTALL_DATA="$VAL"
;;
libdir)
QT_INSTALL_LIBS="$VAL"
;;
qtnamespace)
QT_NAMESPACE="$VAL"
;;
qtlibinfix)
QT_LIBINFIX="$VAL"
;;
translationdir)
QT_INSTALL_TRANSLATIONS="$VAL"
;;
sysconfdir|settingsdir)
QT_INSTALL_SETTINGS="$VAL"
;;
examplesdir)
QT_INSTALL_EXAMPLES="$VAL"
;;
testsdir)
QT_INSTALL_TESTS="$VAL"
;;
qconfig)
CFG_QCONFIG="$VAL"
;;
qreal)
CFG_QREAL="$VAL"
if [ "$CFG_QREAL" = "float" ]; then
CFG_QREAL_STRING="\"float\""
elif [ "$CFG_QREAL" != "double" ]; then
if [ -z "$PERL" ]; then
echo "configure needs perl in \$PATH if the -qreal option is used with" >&2
echo "a value different from \"float\"" >&2
exit 1
fi
CFG_QREAL_STRING=`perl -e '$_ = $ARGV[0];
s/ +/ /g; s/^ +//; s/ +$//;
while (/(.)/g) {
$c = $1;
if ($c =~ /[a-zA-Z0-9]/) { $result .= $c; }
else { $result .= "_" . unpack("H*", $c); }
}
print "\"$result\"";' "$CFG_QREAL"`
fi
;;
sanitize)
if [ "$VAL" = "address" ]; then
CFG_SANITIZE_ADDRESS=yes
elif [ "$VAL" = "thread" ]; then
CFG_SANITIZE_THREAD=yes
elif [ "$VAL" = "memory" ]; then
CFG_SANITIZE_MEMORY=yes
elif [ "$VAL" = "undefined" ]; then
CFG_SANITIZE_UNDEFINED=yes
else
echo "Unknown sanitizer: '$VAL'"
ERROR=true
fi
if [ "$CFG_SANITIZERS" = "none" ]; then
CFG_SANITIZERS=$VAL
else
CFG_SANITIZERS="$CFG_SANITIZERS $VAL"
fi
;;
sysroot)
CFG_SYSROOT="$VAL"
;;
gcc-sysroot)
CFG_GCC_SYSROOT="$VAL"
;;
external-hostbindir)
CFG_HOST_QT_TOOLS_PATH="$VAL"
HostVar set HOST_QT_TOOLS "$VAL"
;;
bindir)
QT_INSTALL_BINS="$VAL"
;;
libexecdir)
QT_INSTALL_LIBEXECS="$VAL"
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
opengles3)
if [ "$VAL" = "no" ]; then
CFG_OPENGLES3="no"
else
UNKNOWN_OPT=yes
fi
;;
openvg)
if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_OPENVG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
nomake)
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
echo "Unknown part $VAL passed to -nomake." >&2
exit 1
fi
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS $VAL"
;;
make)
if [ "$VAL" = "no" ]; then
UNKNOWN_OPT=yes
else
if [ -n "${QT_ALL_BUILD_PARTS%%* $VAL *}" ]; then
echo "Unknown part $VAL passed to -make." >&2
exit 1
fi
CFG_BUILD_PARTS="$CFG_BUILD_PARTS $VAL"
fi
;;
skip)
VAL=qt${VAL#qt}
if ! [ -d $relpath/../$VAL ]; then
echo "Attempting to skip non-existent module $VAL." >&2
exit 1
fi
CFG_SKIP_MODULES="$CFG_SKIP_MODULES $VAL"
;;
compile-examples)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_COMPILE_EXAMPLES="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sdk)
if [ "$BUILD_ON_MAC" = "yes" ]; then
DeviceVar set !host_build:QMAKE_MAC_SDK "$VAL"
OPT_MAC_SDK="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
arch|host-arch)
OPT_OBSOLETE_HOST_ARG=yes
;;
harfbuzz)
[ "$VAL" = "yes" ] && VAL=qt
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_HARFBUZZ="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
framework)
if [ "$BUILD_ON_MAC" = "yes" ]; then
CFG_FRAMEWORK="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
profile)
if [ "$VAL" = "yes" ]; then
CFG_PROFILE=yes
QMakeVar add QMAKE_CFLAGS -pg
QMakeVar add QMAKE_CXXFLAGS -pg
QMakeVar add QMAKE_LFLAGS -pg
QMAKE_VARS="$QMAKE_VARS CONFIG+=nostrip"
else
UNKNOWN_OPT=yes
fi
;;
strip)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_STRIP=$VAL
else
UNKNOWN_OPT=yes
fi
;;
testcocoon)
if [ "$VAL" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG testcocoon"
fi
;;
gcov)
if [ "$VAL" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG gcov"
fi
;;
platform)
PLATFORM="$VAL"
# keep compatibility with old platform names
case $PLATFORM in
aix-64)
PLATFORM=aix-xlc-64
;;
hpux-o64)
PLATFORM=hpux-acc-o64
;;
hpux-n64)
PLATFORM=hpux-acc-64
;;
hpux-acc-n64)
PLATFORM=hpux-acc-64
;;
irix-n32)
PLATFORM=irix-cc
;;
irix-64)
PLATFORM=irix-cc-64
;;
irix-cc-n64)
PLATFORM=irix-cc-64
;;
reliant-64)
PLATFORM=reliant-cds-64
;;
solaris-64)
PLATFORM=solaris-cc-64
;;
openunix-cc)
PLATFORM=unixware-cc
;;
openunix-g++)
PLATFORM=unixware-g++
;;
unixware7-cc)
PLATFORM=unixware-cc
;;
unixware7-g++)
PLATFORM=unixware-g++
;;
esac
;;
xplatform)
XPLATFORM="$VAL"
case `basename "$XPLATFORM"` in win32-g++*)
XPLATFORM_MINGW=yes
CFG_RPATH=no
CFG_REDUCE_EXPORTS=no
CFG_ICU=no
;;
esac
;;
device)
XPLATFORM=`resolveDeviceMkspec $VAL`
[ "$XPLATFORM" = "undefined" ] && exit 101
;;
device-option)
DEV_VAR=`echo $VAL | cut -d '=' -f 1`
DEV_VAL=`echo $VAL | cut -d '=' -f 2-`
DeviceVar set $DEV_VAR "$DEV_VAL"
;;
host-option)
HOST_VAR=`echo $VAL | cut -d '=' -f 1`
HOST_VAL=`echo $VAL | cut -d '=' -f 2-`
HostVar set $HOST_VAR "$HOST_VAL"
;;
qpa)
QT_QPA_DEFAULT_PLATFORM="$VAL"
;;
debug-and-release)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_DEBUG_RELEASE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
release)
if [ "$VAL" = "yes" ]; then
CFG_DEBUG=no
elif [ "$VAL" = "no" ]; then
CFG_DEBUG=yes
else
UNKNOWN_OPT=yes
fi
;;
debug)
CFG_DEBUG="$VAL"
;;
force-debug-info)
CFG_FORCEDEBUGINFO="$VAL"
;;
optimized-qmake|optimized-tools)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_RELEASE_TOOLS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
developer-build)
CFG_DEV="yes"
;;
commercial)
COMMERCIAL_USER="yes"
;;
opensource)
COMMERCIAL_USER="no"
;;
static)
if [ "$VAL" = "yes" ]; then
CFG_SHARED=no
elif [ "$VAL" = "no" ]; then
CFG_SHARED=yes
else
UNKNOWN_OPT=yes
fi
;;
fatal_error)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_CONFIGURE_EXIT_ON_ERROR="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
feature-*)
FEATURE=`echo $VAR | sed 's,^[^-]*-\([^-]*\),\1,' | tr 'abcdefghijklmnopqrstuvwxyz-' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
if grep "^Feature: *${FEATURE} *\$" "$relpath"/src/corelib/global/qfeatures.txt >/dev/null 2>&1; then
if [ "$VAL" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_$FEATURE"
elif [ "$VAL" = "yes" ] || [ "$VAL" = "unknown" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_$FEATURE"
else
UNKNOWN_OPT=yes
fi
else
echo "ERROR: Unknown feature $FEATURE"
UNKNOWN_OPT=yes
fi
;;
shared)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SHARED="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
gif)
if [ "$VAL" = "no" ]; then
CFG_GIF="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sm)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SM="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xshape)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XSHAPE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xsync)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XSYNC="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xinput2)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XINPUT2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
egl)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_EGL="$VAL"
CFG_EGL_X="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
pch)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PRECOMPILE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
ltcg)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LTCG="$VAL"
else
UNKNOWN_OPT=no
fi
;;
separate-debug-info)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SEPARATE_DEBUG_INFO="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
reduce-exports)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_REDUCE_EXPORTS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sse2)
if [ "$VAL" = "no" ]; then
CFG_SSE2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sse3)
if [ "$VAL" = "no" ]; then
CFG_SSE3="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
ssse3)
if [ "$VAL" = "no" ]; then
CFG_SSSE3="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sse4.1)
if [ "$VAL" = "no" ]; then
CFG_SSE4_1="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sse4.2)
if [ "$VAL" = "no" ]; then
CFG_SSE4_2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
avx)
if [ "$VAL" = "no" ]; then
CFG_AVX="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
avx2)
if [ "$VAL" = "no" ]; then
CFG_AVX2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
avx512)
if [ "$VAL" = "no" ]; then
CFG_AVX512=""
else
UNKNOWN_OPT=yes
fi
;;
mips_dsp)
if [ "$VAL" = "no" ]; then
CFG_MIPS_DSP="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
mips_dspr2)
if [ "$VAL" = "no" ]; then
CFG_MIPS_DSPR2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
reduce-relocations)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_REDUCE_RELOCATIONS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
use-gold-linker)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_USE_GOLD_LINKER="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
zlib)
[ "$VAL" = "qt" ] && VAL=yes
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_ZLIB="$VAL"
else
UNKNOWN_OPT=yes
fi
# No longer supported:
#[ "$VAL" = "no" ] && CFG_LIBPNG=no
;;
mtdev)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_MTDEV="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
journald)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_JOURNALD="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
syslog)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SYSLOG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sqlite)
if [ "$VAL" = "system" ]; then
CFG_SQLITE=system
else
UNKNOWN_OPT=yes
fi
;;
libpng)
[ "$VAL" = "yes" ] && VAL=qt
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_LIBPNG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
libjpeg)
[ "$VAL" = "yes" ] && VAL=qt
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_LIBJPEG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xcursor)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
CFG_XCURSOR="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xfixes)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
CFG_XFIXES="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xrandr)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "runtime" ]; then
CFG_XRANDR="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xrender)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XRENDER="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
mitshm)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_MITSHM="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
doubleconversion)
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_DOUBLECONVERSION="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
fontconfig)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_FONTCONFIG="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
freetype)
[ "$VAL" = "yes" ] && VAL=qt
if [ "$VAL" = "qt" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ]; then
CFG_FREETYPE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xkb)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XKB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xkbcommon-evdev)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XKBCOMMON_EVDEV="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xkbcommon|xkbcommon-x11)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
CFG_XKBCOMMON="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xcb)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ] || [ "$VAL" = "system" ] || [ "$VAL" = "qt" ]; then
CFG_XCB="$VAL"
if [ "$VAL" = "yes" ]; then
CFG_XCB="system"
fi
else
UNKNOWN_OPT=yes
fi
;;
xcb-xlib)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_XCB_XLIB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
wayland)
CFG_OBSOLETE_WAYLAND=yes
;;
eglfs)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_EGLFS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
directfb)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_DIRECTFB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
gbm)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GBM="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
linuxfb)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LINUXFB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
kms)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_KMS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
mirclient)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_MIRCLIENT="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
libudev)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LIBUDEV="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
libinput)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LIBINPUT="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
evdev)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_EVDEV="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
tslib)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_TSLIB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
cups)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_CUPS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
iconv)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ICONV="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
glib)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GLIB="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
slog2)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SLOG2="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
imf)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_QNX_IMF="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
pps)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PPS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
lgmon)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LGMON="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
pulseaudio)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PULSEAUDIO="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
alsa)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ALSA="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
gstreamer)
if [ "$VAL" = "auto" ] || [ "$VAL" = "yes" ] ||
[ "$VAL" = "0.10" ] || [ "$VAL" = "1.0" ] ||
[ "$VAL" = "no" ]; then
CFG_GSTREAMER="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
gtk)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GTK="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
gui)
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
CFG_GUI="yes"
else
if [ "$VAL" = "no" ]; then
CFG_GUI="no"
else
UNKNOWN_OPT=yes
fi
fi
;;
widgets)
if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then
CFG_WIDGETS="yes"
elif [ "$VAL" = "no" ]; then
CFG_WIDGETS="no"
else
UNKNOWN_OPT=yes
fi
;;
qpa-platform-guard)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
QPA_PLATFORM_GUARD="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
dbus)
if [ "$VAL" = "no" ] || [ "$VAL" = "linked" ] || [ "$VAL" = "runtime" ]; then
CFG_DBUS="$VAL"
elif [ "$VAL" = "yes" ]; then
# keep as auto, we'll auto-detect whether to go linked or runtime later
CFG_DBUS=auto
else
UNKNOWN_OPT=yes
fi
;;
dbus-linked)
if [ "$VAL" = "yes" ]; then
CFG_DBUS="linked"
else
UNKNOWN_OPT=yes
fi
;;
dbus-runtime)
if [ "$VAL" = "yes" ]; then
CFG_DBUS="runtime"
else
UNKNOWN_OPT=yes
fi
;;
largefile)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LARGEFILE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
openssl)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_OPENSSL="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
openssl-linked)
if [ "$VAL" = "yes" ]; then
CFG_OPENSSL="linked"
else
UNKNOWN_OPT=yes
fi
;;
securetransport)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SECURETRANSPORT="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
libproxy)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_LIBPROXY="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
qml-debug)
if [ "$VAL" = "yes" ]; then
CFG_QML_DEBUG="yes"
else
if [ "$VAL" = "no" ]; then
CFG_QML_DEBUG="no"
else
UNKNOWN_OPT=yes
fi
fi
;;
confirm-license)
if [ "$VAL" = "yes" ]; then
OPT_CONFIRM_LICENSE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
h|help)
if [ "$VAL" = "yes" ]; then
OPT_HELP="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
sql-*|imageformat-*)
# if Qt style options were used, $VAL can be "no", "qt", or "plugin"
# if autoconf style options were used, $VAL can be "yes" or "no"
[ "$VAL" = "yes" ] && VAL=qt
# now $VAL should be "no", "qt", or "plugin"... double-check
if [ "$VAL" != "no" ] && [ "$VAL" != "qt" ] && [ "$VAL" != "plugin" ]; then
UNKNOWN_OPT=yes
fi
# now $VAL is "no", "qt", or "plugin"
OPT="$VAL"
VAL=`echo $VAR | sed 's,^[^-]*-\([^-]*\).*,\1,'`
VAR=`echo $VAR | sed 's,^\([^-]*\).*,\1,'`
# Grab the available values
case "$VAR" in
sql)
avail="$CFG_SQL_AVAILABLE"
;;
imageformat)
avail="$CFG_IMAGEFORMAT_PLUGIN_AVAILABLE"
if [ "$OPT" != "plugin" ]; then
# png is always built in
avail="$avail png"
fi
;;
*)
avail=""
echo "BUG: Unhandled type $VAR used in $CURRENT_OPT"
;;
esac
# Check that that user's value is available.
found=no
for d in $avail; do
if [ "$VAL" = "$d" ]; then
found=yes
break
fi
done
if [ "$found" != "yes" ]; then
echo "$CURRENT_OPT: unknown argument"
ERROR=yes
continue
fi
if [ "$VAR" = "sql" ]; then
# set the CFG_SQL_driver
eval "CFG_SQL_$VAL=\$OPT"
continue
elif [ "$VAR" = "imageformat" ]; then
[ "$OPT" = "qt" ] && OPT=yes
VAL="`echo $VAL |tr a-z A-Z`"
eval "CFG_$VAL=$OPT"
continue
fi
if [ "$OPT" = "plugin" ] || [ "$OPT" = "qt" ]; then
if [ "$OPT" = "plugin" ]; then
VAR="${VAR}-${OPT}"
fi
QMakeVar add "${VAR}s" "${VAL}"
elif [ "$OPT" = "no" ]; then
PLUG_VAR="${VAR}-plugin"
IN_VAR="${VAR}"
QMakeVar del "${IN_VAR}s" "$VAL"
QMakeVar del "${PLUG_VAR}s" "$VAL"
fi
;;
v|verbose)
if [ "$VAL" = "yes" ]; then
if [ "$OPT_VERBOSE" = "$VAL" ]; then # takes two verboses to turn on qmake debugs
QMAKE_SWITCHES="$QMAKE_SWITCHES -d"
else
OPT_VERBOSE=yes
fi
elif [ "$VAL" = "no" ]; then
if [ "$OPT_VERBOSE" = "$VAL" ] && echo "$QMAKE_SWITCHES" | grep ' -d' >/dev/null 2>&1; then
QMAKE_SWITCHES=`echo $QMAKE_SWITCHES | sed 's, -d,,'`
else
OPT_VERBOSE=no
fi
else
UNKNOWN_OPT=yes
fi
;;
rpath)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_RPATH="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
add_define)
DEFINES="$DEFINES \"$VAL\""
D_FLAGS="$D_FLAGS -D\"$VAL\""
;;
add_ipath)
INCLUDES="$INCLUDES \"$VAL\""
I_FLAGS="$I_FLAGS -I\"${VAL}\""
;;
add_lpath)
L_FLAGS="$L_FLAGS -L\"${VAL}\""
;;
add_rpath)
RPATH_FLAGS="$RPATH_FLAGS \"${VAL}\""
;;
add_link)
L_FLAGS="$L_FLAGS -l\"${VAL}\""
;;
add_fpath)
if [ "$BUILD_ON_MAC" = "yes" ]; then
L_FLAGS="$L_FLAGS -F\"${VAL}\""
I_FLAGS="$I_FLAGS -F\"${VAL}\""
else
UNKNOWN_OPT=yes
fi
;;
add_framework)
if [ "$BUILD_ON_MAC" = "yes" ]; then
L_FLAGS="$L_FLAGS -framework \"${VAL}\""
else
UNKNOWN_OPT=yes
fi
;;
add_warn)
W_FLAGS="$W_FLAGS \"${VAL}\""
;;
silent)
CFG_SILENT="$VAL"
;;
audio-backend)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_AUDIO_BACKEND="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
icu)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ICU="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
force-asserts)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_FORCE_ASSERTS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
pcre)
if [ "$VAL" = "qt" ] || [ "$VAL" = "system" ]; then
CFG_PCRE="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
c++std)
case "$VAL" in
c++11|c++14|c++1z|auto)
CFG_STDCXX="$VAL"
;;
11|14|1z)
CFG_STDCXX="c++$VAL"
;;
1y|c++1y)
CFG_STDCXX="c++14"
;;
*)
echo >&2 "Invalid C++ edition: $VAL; valid options are: c++11 c++14 c++1z auto"
ERROR=yes
;;
esac
;;
system-proxies)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_SYSTEM_PROXIES="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
directwrite)
if [ "$XPLATFORM_MINGW" = "yes" ] ; then
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_DIRECTWRITE="$VAL"
else
UNKNOWN_OPT=yes
fi
else
UNKNOWN_OPT=yes
fi
;;
warnings-are-errors|Werror)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_WERROR="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
headersclean)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_HEADERSCLEAN="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
xkb-config-root)
CFG_XKB_CONFIG_ROOT="$VAL"
;;
android-sdk)
CFG_DEFAULT_ANDROID_SDK_ROOT="$VAL"
;;
android-ndk)
CFG_DEFAULT_ANDROID_NDK_ROOT="$VAL"
;;
android-ndk-platform)
CFG_DEFAULT_ANDROID_PLATFORM="$VAL"
;;
android-ndk-host)
CFG_DEFAULT_ANDROID_NDK_HOST="$VAL"
;;
android-arch)
CFG_DEFAULT_ANDROID_TARGET_ARCH="$VAL"
;;
android-toolchain-version)
CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION="$VAL"
;;
android-style-assets)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_ANDROID_STYLE_ASSETS="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
l*) # -lfoo
if [ "$VAL" = "yes" ]; then
L_FLAGS="$L_FLAGS -l\"${VAR#l}\""
else
UNKNOWN_OPT=yes
fi
;;
fw*) # -fwfoo
if [ "$VAL" = "yes" ]; then
if [ "$BUILD_ON_MAC" = "yes" ]; then
L_FLAGS="$L_FLAGS -framework \"${VAR#fw}\""
else
UNKNOWN_OPT=yes
fi
else
UNKNOWN_OPT=yes
fi
;;
*)
UNKNOWN_OPT=yes
;;
esac
if [ "$UNKNOWN_OPT" = "yes" ]; then
echo "${CURRENT_OPT}: invalid command-line switch"
ERROR=yes
fi
done
[ "x$ERROR" = "xyes" ] && exit 1
#-------------------------------------------------------------------------------
# help - interactive parts of the script _after_ this section please
#-------------------------------------------------------------------------------
if [ "$OPT_HELP" = "yes" ]; then
cat <<EOF
Usage: $relconf [options]
Installation options:
These are optional, but you may specify install directories.
-prefix <dir> ...... The deployment directory, as seen on the target device.
(default /usr/local/Qt-${QT_VERSION}, \$PWD if -developer-build is active)
-extprefix <dir> ... The installation directory, as seen on the host machine.
(default SYSROOT/PREFIX)
-hostprefix [dir] .. The installation directory for build tools running on the
host machine. If [dir] is not given, the current build
directory will be used. (default EXTPREFIX)
You may use these to change the layout of the install. Note that all directories
except -sysconfdir should be located under -prefix/-hostprefix:
-bindir <dir> ......... User executables will be installed to <dir>
(default PREFIX/bin)
-headerdir <dir> ...... Headers will be installed to <dir>
(default PREFIX/include)
-libdir <dir> ......... Libraries will be installed to <dir>
(default PREFIX/lib)
-archdatadir <dir> .... Arch-dependent data used by Qt will be installed to <dir>
(default PREFIX)
-plugindir <dir> ...... Plugins will be installed to <dir>
(default ARCHDATADIR/plugins)
-libexecdir <dir> ..... Program executables will be installed to <dir>
(default ARCHDATADIR/libexec, ARCHDATADIR/bin for MinGW)
-importdir <dir> ...... Imports for QML1 will be installed to <dir>
(default ARCHDATADIR/imports)
-qmldir <dir> ......... Imports for QML2 will be installed to <dir>
(default ARCHDATADIR/qml)
-datadir <dir> ........ Arch-independent data used by Qt will be installed to <dir>
(default PREFIX)
-docdir <dir> ......... Documentation will be installed to <dir>
(default DATADIR/doc)
-translationdir <dir> . Translations of Qt programs will be installed to <dir>
(default DATADIR/translations)
-sysconfdir <dir> ..... Settings used by Qt programs will be looked for in <dir>
(default PREFIX/etc/xdg)
-examplesdir <dir> .... Examples will be installed to <dir>
(default PREFIX/examples)
-testsdir <dir> ....... Tests will be installed to <dir>
(default PREFIX/tests)
-hostbindir <dir> .. Host executables will be installed to <dir>
(default HOSTPREFIX/bin)
-hostlibdir <dir> .. Host libraries will be installed to <dir>
(default HOSTPREFIX/lib)
-hostdatadir <dir> . Data used by qmake will be installed to <dir>
(default HOSTPREFIX)
Configure options:
The defaults (*) are usually acceptable. A plus (+) denotes a default value
that needs to be evaluated. If the evaluation succeeds, the feature is
included. Here is a short explanation of each option:
* -release ........... Compile and link Qt with debugging turned off.
-debug ............. Compile and link Qt with debugging turned on.
-debug-and-release . Compile and link two versions of Qt, with and without
debugging turned on (Mac only).
-force-debug-info .. Create symbol files for release builds.
-developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)
* -no-optimized-tools ... Do not build optimized host tools even in debug build.
-optimized-tools ...... Build optimized host tools even in debug build.
-opensource ........ Compile and link the Open-Source Edition of Qt.
-commercial ........ Compile and link the Commercial Edition of Qt.
-confirm-license ... Automatically acknowledge the license (use with
either -opensource or -commercial)
-c++std <edition> .. Compile Qt with C++ standard edition (c++11, c++14, c++1z)
Default: highest supported
* -shared ............ Create and use shared Qt libraries.
-static ............ Create and use static Qt libraries.
-no-largefile ...... Disables large file support.
+ -largefile ......... Enables Qt to access files larger than 4 GB.
-no-accessibility .. Do not compile Accessibility support.
Disabling accessibility is not recommended, as it will break QStyle
and may break other internal parts of Qt.
With this switch you create a source incompatible version of Qt,
which is unsupported.
+ -accessibility ..... Compile Accessibility support.
-no-sql-<driver> ... Disable SQL <driver> entirely.
-qt-sql-<driver> ... Enable a SQL <driver> in the Qt SQL module, by default
none are turned on.
-plugin-sql-<driver> Enable SQL <driver> as a plugin to be linked to
at run time.
Possible values for <driver>:
[$CFG_SQL_AVAILABLE ]
-system-sqlite ..... Use sqlite from the operating system.
-no-qml-debug ...... Do not build the in-process QML debugging support.
+ -qml-debug ......... Build the QML debugging support.
-platform target ... The operating system and compiler you are building
on (default detected from host system).
See the README file for a list of supported
operating systems and compilers.
-no-sse2 ........... Do not compile with use of SSE2 instructions.
-no-sse3 ........... Do not compile with use of SSE3 instructions.
-no-ssse3 .......... Do not compile with use of SSSE3 instructions.
-no-sse4.1 ......... Do not compile with use of SSE4.1 instructions.
-no-sse4.2 ......... Do not compile with use of SSE4.2 instructions.
-no-avx ............ Do not compile with use of AVX instructions.
-no-avx2 ........... Do not compile with use of AVX2 instructions.
-no-avx512 ......... Do not compile with use of AVX512 instructions.
-no-mips_dsp ....... Do not compile with use of MIPS DSP instructions.
-no-mips_dspr2 ..... Do not compile with use of MIPS DSP rev2 instructions.
-qtnamespace <name> Wraps all Qt library code in 'namespace <name> {...}'.
-qtlibinfix <infix> Renames all libQt*.so to libQt*<infix>.so.
-testcocoon ........ Instrument Qt with the TestCocoon code coverage tool.
-gcov .............. Instrument Qt with the GCov code coverage tool.
-D <string> ........ Add an explicit define to the preprocessor.
-I <string> ........ Add an explicit include path.
-L <string> ........ Add an explicit library path.
+ -pkg-config ........ Use pkg-config to detect include and library paths. By default,
configure determines whether to use pkg-config or not with
some heuristics such as checking the environment variables.
-no-pkg-config ..... Disable use of pkg-config.
-force-pkg-config .. Force usage of pkg-config (skips pkg-config usability
detection heuristic).
-help, -h .......... Display this information.
Third Party Libraries:
-qt-zlib ............ Use the zlib bundled with Qt.
+ -system-zlib ........ Use zlib from the operating system.
See http://www.gzip.org/zlib
-no-mtdev ........... Do not compile mtdev support.
+ -mtdev .............. Enable mtdev support.
+ -no-journald ........ Do not send logging output to journald.
-journald ........... Send logging output to journald.
+ -no-syslog .......... Do not send logging output to syslog.
-syslog ............. Send logging output to syslog.
-no-gif ............. Do not compile GIF reading support.
-no-libpng .......... Do not compile PNG support.
-qt-libpng .......... Use the libpng bundled with Qt.
+ -system-libpng ...... Use libpng from the operating system.
See http://www.libpng.org/pub/png
-no-libjpeg ......... Do not compile JPEG support.
-qt-libjpeg ......... Use the libjpeg bundled with Qt.
+ -system-libjpeg ..... Use libjpeg from the operating system.
See http://www.ijg.org
-no-doubleconversion ..... Use sscanf_l and snprintf_l for (imprecise) double conversion.
-qt-doubleconversion ..... Use the libdouble-conversion bundled with Qt.
+ -system-doubleconversion . Use the libdouble-conversion provided by the system.
See https://github.com/google/double-conversion
-no-freetype ........ Do not compile in Freetype2 support.
-qt-freetype ........ Use the libfreetype bundled with Qt.
+ -system-freetype..... Use the libfreetype provided by the system (enabled if -fontconfig is active).
See http://www.freetype.org
-no-harfbuzz ........ Do not compile HarfBuzz-NG support.
-qt-harfbuzz ........ Use HarfBuzz-NG bundled with Qt to do text shaping.
It can still be disabled by setting
the QT_HARFBUZZ environment variable to "old".
+ -system-harfbuzz .... Use HarfBuzz-NG from the operating system
to do text shaping. It can still be disabled
by setting the QT_HARFBUZZ environment variable to "old".
See http://www.harfbuzz.org
-no-openssl ......... Do not compile support for OpenSSL.
+ -openssl ............ Enable run-time OpenSSL support.
-openssl-linked ..... Enabled linked OpenSSL support.
-no-libproxy ....... Do not compile support for libproxy
+ -libproxy .......... Use libproxy from the operating system.
-qt-pcre ............ Use the PCRE library bundled with Qt.
+ -system-pcre ........ Use the PCRE library from the operating system.
-qt-xcb ............. Use xcb- libraries bundled with Qt.
(libxcb.so will still be used from operating system).
+ -system-xcb ......... Use xcb- libraries from the operating system.
-xkb-config-root .... Set default XKB config root. This option is used only together with -qt-xkbcommon-x11.
-qt-xkbcommon-x11 ... Use the xkbcommon library bundled with Qt in combination with xcb.
+ -system-xkbcommon-x11 Use the xkbcommon library from the operating system in combination with xcb.
-no-xkbcommon-evdev . Do not use X-less xkbcommon when compiling libinput support.
* -xkbcommon-evdev .... Use X-less xkbcommon when compiling libinput support.
-no-xinput2 ......... Do not compile XInput2 support.
* -xinput2 ............ Compile XInput2 support.
-no-xcb-xlib......... Do not compile Xcb-Xlib support.
* -xcb-xlib............ Compile Xcb-Xlib support.
-no-glib ............ Do not compile Glib support.
+ -glib ............... Compile Glib support.
-no-pulseaudio ...... Do not compile PulseAudio support.
+ -pulseaudio ......... Compile PulseAudio support.
-no-alsa ............ Do not compile ALSA support.
+ -alsa ............... Compile ALSA support.
-no-gtk ............. Do not compile GTK platform theme support.
+ -gtk ................ Compile GTK platform theme support.
Additional options:
-make <part> ....... Add part to the list of parts to be built at make time.
(defaults to: $QT_DEFAULT_BUILD_PARTS)
-nomake <part> ..... Exclude part from the list of parts to be built.
-skip <module> ..... Exclude an entire module from the build.
-no-compile-examples ... Install only the sources of examples.
-no-gui ............ Don't build the Qt GUI module and dependencies.
+ -gui ............... Build the Qt GUI module and dependencies.
-no-widgets ........ Don't build the Qt Widgets module and dependencies.
+ -widgets ........... Build the Qt Widgets module and dependencies.
-R <string> ........ Add an explicit runtime library path to the Qt
libraries.
-l <string> ........ Add an explicit library.
-no-rpath .......... Do not use the library install path as a runtime
library path. On Apple platforms, this implies using
absolute install names (based in -libdir) for dynamic
libraries and frameworks.
+ -rpath ............. Link Qt libraries and executables using the library
install path as a runtime library path. Equivalent
to -R install_libpath
-continue .......... Continue as far as possible if an error occurs.
-verbose, -v ....... Print verbose information about each step of the
configure process.
-silent ............ Reduce the build output so that warnings and errors
can be seen more easily.
-no-cups ........... Do not compile CUPS support.
* -cups .............. Compile CUPS support.
Requires cups/cups.h and libcups.so.2.
-no-iconv .......... Do not compile support for iconv(3).
* -iconv ............. Compile support for iconv(3).
-no-evdev .......... Do not compile support for evdev.
* -evdev ............. Compile support for evdev.
-no-tslib .......... Do not compile support for tslib.
* -tslib ............. Compile support for tslib.
-no-icu ............ Do not compile support for ICU libraries.
+ -icu ............... Compile support for ICU libraries.
-no-fontconfig ..... Do not compile FontConfig support.
+ -fontconfig ........ Compile FontConfig support.
-no-strip .......... Do not strip binaries and libraries of unneeded symbols.
* -strip ............. Strip binaries and libraries of unneeded symbols when installing.
* -no-pch ............ Do not use precompiled header support.
-pch ............... Use precompiled header support.
* -no-ltcg Do not use Link Time Code Generation
-ltcg Use Link Time Code Generation.
-no-dbus ........... Do not compile the Qt D-Bus module.
+ -dbus-linked ....... Compile the Qt D-Bus module and link to libdbus-1.
-dbus-runtime ...... Compile the Qt D-Bus module and dynamically load libdbus-1.
-reduce-relocations ..... Reduce relocations in the libraries through extra
linker optimizations (Qt/X11 and Qt for Embedded Linux only;
experimental; needs GNU ld >= 2.18).
-no-use-gold-linker ..... Do not link using the GNU gold linker.
+ -use-gold-linker ........ Link using the GNU gold linker if available.
-force-asserts ........ Force Q_ASSERT to be enabled even in release builds.
-sanitize [address|thread|memory|undefined] Enables the specified compiler sanitizer.
-device <name> ............... Cross-compile for device <name> (experimental)
-device-option <key=value> ... Add device specific options for the device mkspec
(experimental)
-host-option <key=value> ..... Add host specific options for the host mkspec
* -no-separate-debug-info . Do not store debug information in a separate file.
-separate-debug-info .... Strip debug information into a separate file.
-no-xcb ............ Do not compile Xcb (X protocol C-language Binding) support.
* -xcb ............... Compile Xcb support.
-no-eglfs .......... Do not compile EGLFS (EGL Full Screen/Single Surface) support.
* -eglfs ............. Compile EGLFS support.
-no-kms ............ Do not compile backends for KMS.
* -kms ............... Compile backends for KMS.
-no-gbm ............ Do not compile backends for GBM.
* -gbm ............... Compile backends for GBM.
* -no-directfb ....... Do not compile DirectFB support.
-directfb .......... Compile DirectFB support.
-no-linuxfb ........ Do not compile Linux Framebuffer support.
* -linuxfb ........... Compile Linux Framebuffer support.
* -no-mirclient....... Do not compile Mir client support.
-mirclient.......... Compile Mir client support.
-qpa <name> ......... Sets the default QPA platform (e.g xcb, cocoa, windows).
-xplatform target ... The target platform when cross-compiling.
-sysroot <dir> ...... Sets <dir> as the target compiler's and qmake's sysroot and also sets pkg-config paths.
-no-gcc-sysroot ..... When using -sysroot, it disables the passing of --sysroot to the compiler
-external-hostbindir <path> .. Path to Qt tools built for this machine. Use this when -platform
does not match the current system, i.e., to make a Canadian Cross Build.
-no-feature-<feature> Do not compile in <feature>.
-feature-<feature> .. Compile in <feature>. The available features
are described in src/corelib/global/qfeatures.txt
-qconfig local ...... Use src/corelib/global/qconfig-local.h rather than the
default ($CFG_QCONFIG).
-qreal [double|float] typedef qreal to the specified type. The default is double.
Note that changing this flag affects binary compatibility.
-no-opengl .......... Do not support OpenGL.
-opengl <api> ....... Enable OpenGL support
With no parameter, this will attempt to auto-detect
OpenGL ES 2.0 and higher, or regular desktop OpenGL.
Use es2 for <api> to override auto-detection.
-no-libinput ........ Do not support libinput.
* -libinput ........... Enable libinput support.
-no-gstreamer ....... Do not support GStreamer.
+ -gstreamer <version> Enable GStreamer support
With no parameter, this will attempt to auto-detect GStreamer 0.10 and
1.0. GStreamer 1.0 is used by default when available.
Use 0.10 or 1.0 for <version> to override auto-detection.
* -no-system-proxies .. Do not use system network proxies by default.
-system-proxies ..... Use system network proxies by default.
-no-warnings-are-errors Make warnings be treated normally
-warnings-are-errors Make warnings be treated as errors
(enabled if -developer-build is active)
QNX options:
-no-slog2 .......... Do not compile with slog2 support.
-slog2 ............. Compile with slog2 support.
-no-pps ............ Do not compile with pps support.
-pps ............... Compile with pps support.
-no-imf ............ Do not compile with imf support.
-imf ............... Compile with imf support.
-no-lgmon .......... Do not compile with lgmon support.
-lgmon ............. Compile with lgmon support.
MacOS/iOS options:
-Fstring ........... Add an explicit framework path.
-fw string ......... Add an explicit framework.
* -framework ......... Build Qt as a series of frameworks and
link tools against those frameworks.
-no-framework ...... Do not build Qt as a series of frameworks.
* -securetransport ... Use SecureTransport instead of OpenSSL
-no-securetransport Do not use SecureTransport, either use OpenSSL or do not use any SSL backend
at all (if combined with -no-openssl).
-sdk <sdk> ......... Build Qt using Apple provided SDK <sdk>. The argument should be
one of the available SDKs as listed by 'xcodebuild -showsdks'.
Note that the argument applies only to Qt libraries and applications built
using the target mkspec - not host tools such as qmake, moc, rcc, etc.
Android options:
-android-sdk path .............. The Android SDK root path.
(default \$ANDROID_SDK_ROOT)
-android-ndk path .............. The Android NDK root path.
(default \$ANDROID_NDK_ROOT)
-android-ndk-platform .......... Sets the android platform
(default $CFG_DEFAULT_ANDROID_PLATFORM)
-android-ndk-host .............. Sets the android NDK host (linux-x86, linux-x86_64, etc.)
(default \$ANDROID_NDK_HOST)
-android-arch .................. Sets the android architecture (armeabi, armeabi-v7a, x86, mips,
arm64-v8a, x86_64, mips64)
(default $CFG_DEFAULT_ANDROID_TARGET_ARCH)
-android-toolchain-version ..... Sets the android toolchain version
(default $CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION)
-no-android-style-assets ....... Do not compile in the code which automatically extracts
style assets from the run-time device. Setting this will
make the Android style behave incorrectly, but will enable
compatibility with the LGPL2.1 license.
* -android-style-assets .......... Compile the code which automatically extracts style assets
from the run-time device. This option will make the
Android platform plugin incompatible with the LGPL2.1.
EOF
exit 0
fi # Help
#-------------------------------------------------------------------------------
# platform detection
#-------------------------------------------------------------------------------
if [ -z "$PLATFORM" ]; then
PLATFORM_NOTES=
case "$UNAME_SYSTEM:$UNAME_RELEASE" in
Darwin:*)
# Select compiler. Use g++ unless we find a usable Clang version. Note that
# we are checking the "Apple" clang/LLVM version number, not the actual
# clang/LLVM version number that the Apple version was based on. We look
# for Apple clang version 3.0 or higher, which was branched off LLVM 3.0
# from SVN, and first included in Xcode 4.2. Also note that we do not care
# about the OS version, since we're not using the clang version that comes
# with the system. We use 'xcrun' to check the clang version that's part of
# the Xcode installation.
XCRUN=`/usr/bin/xcrun -sdk macosx clang -v 2>&1`
CLANGVERSION=`echo "$XCRUN" | sed -n 's/.*version \([0-9]\).*/\1/p'`
expr "$CLANGVERSION" : '[0-9]' > /dev/null || { echo "Unable to determine CLANG version from output of xcrun: $XCRUN" ; exit 2 ; }
if [ "$CLANGVERSION" -ge 3 ]; then
PLATFORM=macx-clang
# Advertise g++ as an alternative on Lion and below
if [ "$(uname -r | cut -d. -f1)" -le 11 ]; then
PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n"
fi
else
PLATFORM=macx-g++
fi
;;
AIX:*)
#PLATFORM=aix-g++
#PLATFORM=aix-g++-64
PLATFORM=aix-xlc
#PLATFORM=aix-xlc-64
PLATFORM_NOTES="
- Also available for AIX: aix-g++ aix-g++-64 aix-xlc-64
"
;;
GNU:*)
PLATFORM=hurd-g++
;;
dgux:*)
PLATFORM=dgux-g++
;;
# DYNIX/ptx:4*)
# PLATFORM=dynix-g++
# ;;
ULTRIX:*)
PLATFORM=ultrix-g++
;;
FreeBSD:*)
if [ "$(uname -r | cut -d. -f1)" -ge 10 ]; then
PLATFORM=freebsd-clang
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-g++
"
else
PLATFORM=freebsd-g++
PLATFORM_NOTES="
- Also available for FreeBSD: freebsd-clang
"
fi
;;
OpenBSD:*)
PLATFORM=openbsd-g++
;;
NetBSD:*)
PLATFORM=netbsd-g++
;;
BSD/OS:*|BSD/386:*)
PLATFORM=bsdi-g++
;;
IRIX*:*)
#PLATFORM=irix-g++
PLATFORM=irix-cc
#PLATFORM=irix-cc-64
PLATFORM_NOTES="
- Also available for IRIX: irix-g++ irix-cc-64
"
;;
HP-UX:*)
case "$UNAME_MACHINE" in
ia64)
#PLATFORM=hpuxi-acc-32
PLATFORM=hpuxi-acc-64
PLATFORM_NOTES="
- Also available for HP-UXi: hpuxi-acc-32
"
;;
*)
#PLATFORM=hpux-g++
PLATFORM=hpux-acc
#PLATFORM=hpux-acc-64
#PLATFORM=hpux-cc
#PLATFORM=hpux-acc-o64
PLATFORM_NOTES="
- Also available for HP-UX: hpux-g++ hpux-acc-64 hpux-acc-o64
"
;;
esac
;;
OSF1:*)
#PLATFORM=tru64-g++
PLATFORM=tru64-cxx
PLATFORM_NOTES="
- Also available for Tru64: tru64-g++
"
;;
Linux:*)
PLATFORM=linux-g++
PLATFORM_NOTES="
- Also available for Linux: linux-clang linux-kcc linux-icc linux-cxx
"
;;
SunOS:5*)
if [ "$XPLATFORM_MINGW" = "yes" ]; then
PLATFORM="solaris-g++"
else
#PLATFORM=solaris-g++
PLATFORM=solaris-cc
#PLATFORM=solaris-cc64
fi
PLATFORM_NOTES="
- Also available for Solaris: solaris-g++ solaris-cc-64
"
;;
ReliantUNIX-*:*|SINIX-*:*)
PLATFORM=reliant-cds
#PLATFORM=reliant-cds-64
PLATFORM_NOTES="
- Also available for Reliant UNIX: reliant-cds-64
"
;;
CYGWIN*:*)
PLATFORM=cygwin-g++
;;
LynxOS*:*)
PLATFORM=lynxos-g++
;;
OpenUNIX:*)
#PLATFORM=unixware-g++
PLATFORM=unixware-cc
PLATFORM_NOTES="
- Also available for OpenUNIX: unixware-g++
"
;;
UnixWare:*)
#PLATFORM=unixware-g++
PLATFORM=unixware-cc
PLATFORM_NOTES="
- Also available for UnixWare: unixware-g++
"
;;
SCO_SV:*)
#PLATFORM=sco-g++
PLATFORM=sco-cc
PLATFORM_NOTES="
- Also available for SCO OpenServer: sco-g++
"
;;
UNIX_SV:*)
PLATFORM=unixware-g++
;;
QNX:*)
PLATFORM=unsupported/qnx-g++
;;
*)
echo >&2
echo " The build script does not currently recognize all" >&2
echo " platforms supported by Qt." >&2
echo " Rerun this script with a -platform option listed to" >&2
echo " set the system/compiler combination you use." >&2
echo >&2
exit 2
esac
fi
[ -z "$XPLATFORM" ] && XPLATFORM="$PLATFORM"
case "$XPLATFORM" in
*win32-g++*)
XPLATFORM_MINGW=yes
;;
*qnx-*)
XPLATFORM_QNX=yes
;;
*haiku-*)
XPLATFORM_HAIKU=yes
;;
*ios*)
XPLATFORM_MAC=yes
XPLATFORM_IOS=yes
;;
*macx*)
XPLATFORM_MAC=yes
;;
*integrity*)
XPLATFORM_INTEGRITY=yes
;;
# XPLATFORM_ANDROID should not be set for unsupported/android-g++
*unsupported*)
;;
*android-g++*)
XPLATFORM_ANDROID=g++
;;
*android-clang*)
XPLATFORM_ANDROID=clang
;;
esac
#-------------------------------------------------------------------------------
# check the license
#-------------------------------------------------------------------------------
if [ "$COMMERCIAL_USER" = "ask" ]; then
while true; do
echo "Which edition of Qt do you want to use ?"
echo
echo "Type 'c' if you want to use the Commercial Edition."
echo "Type 'o' if you want to use the Open Source Edition."
echo
read commercial
echo
if [ "$commercial" = "c" ]; then
COMMERCIAL_USER="yes"
break
elif [ "$commercial" = "o" ]; then
COMMERCIAL_USER="no"
break
fi
done
fi
if [ -f "$relpath"/LICENSE.PREVIEW.COMMERCIAL ] && [ $COMMERCIAL_USER = "yes" ]; then
# Commercial preview release
Licensee="Preview"
Edition="Preview"
EditionString="Technology Preview"
elif [ $COMMERCIAL_USER = "yes" ]; then
if [ $UNAME_SYSTEM = "Linux" ]; then
case "$PLATFORM" in
*-32)
Licheck=licheck32
;;
*-64)
Licheck=licheck64
;;
*)
if file -L /bin/sh | grep -q "64-bit" ; then
Licheck=licheck64
else
Licheck=licheck32
fi
;;
esac
elif [ $UNAME_SYSTEM = "Darwin" ]; then
Licheck=licheck_mac
else
echo >&2 "Host operating system not supported by this edition of Qt."
exit 1
fi
if [ -x "$relpath/bin/$Licheck" ]; then
LicheckOutput=`$relpath/bin/$Licheck $OPT_CONFIRM_LICENSE $relpath $outpath\
$PLATFORM $XPLATFORM`
if [ $? -ne 0 ]; then
exit 1
else
eval "$LicheckOutput"
fi
else
echo
echo "Error: This is the Open Source version of Qt."
echo "If you want to use Enterprise features of Qt,"
echo "use the contact form at http://www.qt.io/contact-us"
echo "to purchase a license."
echo
exit 1
fi
elif [ $COMMERCIAL_USER = "no" ]; then
# Open Source edition - may only be used under the terms of the LGPLv3 or GPLv2.
Licensee="Open Source"
Edition="OpenSource"
EditionString="Open Source"
fi
if [ "$Edition" = "OpenSource" ] || [ "$Edition" = "Preview" ]; then
echo
echo "This is the Qt ${EditionString} Edition."
echo
fi
if [ "$Edition" = "OpenSource" ]; then
while true; do
if [ "$CFG_ANDROID_STYLE_ASSETS" = "no" ] || [ "$XPLATFORM_ANDROID" = "no" ]; then
echo "You are licensed to use this software under the terms of"
echo "the GNU Lesser General Public License (LGPL) versions 3."
echo "You are also licensed to use this software under the terms of"
echo "the GNU General Public License (GPL) versions 2."
affix="either"
showGPL2="yes"
else
echo "You are licensed to use this software under the terms of"
echo "the GNU Lesser General Public License (LGPL) versions 3."
showGPL2="no"
affix="the"
fi
echo
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
echo "You have already accepted the terms of the $EditionString license."
acceptance=yes
else
if [ -f "$relpath/LICENSE.LGPL3" ]; then
echo "Type 'L' to view the GNU Lesser General Public License version 3."
fi
if [ "$showGPL2" = "yes" ]; then
echo "Type 'G' to view the GNU General Public License version 2."
fi
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
echo
echo $ECHO_N "Do you accept the terms of $affix license? $ECHO_C"
read acceptance
fi
echo
if [ "$acceptance" = "yes" ] || [ "$acceptance" = "y" ]; then
break
elif [ "$acceptance" = "no" ]; then
echo "You are not licensed to use this software."
echo
exit 1
elif [ "$acceptance" = "L" ]; then
more "$relpath/LICENSE.LGPL3"
elif [ "$acceptance" = "G" ] && [ "$showGPL2" = "yes" ]; then
more "$relpath/LICENSE.GPL2"
fi
done
elif [ "$Edition" = "Preview" ]; then
TheLicense=`head -n 1 "$relpath/LICENSE.PREVIEW.COMMERCIAL"`
while true; do
if [ "$OPT_CONFIRM_LICENSE" = "yes" ]; then
echo "You have already accepted the terms of the $EditionString license."
acceptance=yes
else
echo "You are licensed to use this software under the terms of"
echo "the $TheLicense"
echo
echo "Type '?' to read the Preview License."
echo "Type 'yes' to accept this license offer."
echo "Type 'no' to decline this license offer."
echo
echo $ECHO_N "Do you accept the terms of the license? $ECHO_C"
read acceptance
fi
echo
if [ "$acceptance" = "yes" ]; then
break
elif [ "$acceptance" = "no" ] ;then
echo "You are not licensed to use this software."
echo
exit 0
elif [ "$acceptance" = "?" ]; then
more "$relpath/LICENSE.PREVIEW.COMMERCIAL"
fi
done
fi
#-------------------------------------------------------------------------------
# command line and environment validation
#-------------------------------------------------------------------------------
# update QT_CONFIG to show our current predefined configuration
CFG_QCONFIG_PATH=$relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h
case "$CFG_QCONFIG" in
minimal|small|medium|large|full)
# these are a sequence of increasing functionality
for c in minimal small medium large full; do
QT_CONFIG="$QT_CONFIG $c-config"
[ "$CFG_QCONFIG" = $c ] && break
done
[ "$CFG_QCONFIG" = full ] && CFG_QCONFIG_PATH=
;;
*)
# not known to be sufficient for anything
if [ ! -f "$CFG_QCONFIG_PATH" ]; then
CFG_QCONFIG_PATH=`makeabs "${CFG_QCONFIG}"`
if [ ! -f "$CFG_QCONFIG_PATH" ]; then
echo >&2 "Error: configuration file not found:"
echo >&2 " $relpath/src/corelib/global/qconfig-${CFG_QCONFIG}.h"
echo >&2 " or"
echo >&2 " $CFG_QCONFIG_PATH"
exit 1
fi
fi
esac
if [ "$XPLATFORM_MAC" = "no" -a "$CFG_DEBUG_RELEASE" = "yes" ]; then
echo
echo "WARNING: -debug-and-release is not supported outside of Mac OS X."
echo "Qt can be built in release mode with separate debug information, so"
echo "-debug-and-release is not necessary anymore"
echo
fi
if ( [ "$CFG_XCB" = "system" ] || [ "$CFG_XCB" = "qt" ] ) && [ "$CFG_XKBCOMMON" = "no" ]; then
echo "Error: -no-xkbcommon-x11 is not supported on XCB platform plugin."
exit 101
fi
if [ "$XPLATFORM_ANDROID" != "no" ]; then
if [ "$CFG_DBUS" = "auto" ]; then
CFG_DBUS="no"
fi
if [ "$CFG_EGLFS" = "auto" ]; then
CFG_EGLFS="no"
fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
case $PLATFORM in
linux-*)
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86
elif [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/linux-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=linux-x86_64
fi
;;
macx-*)
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/darwin-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=darwin-x86_64
fi
;;
win32-*)
CFG_DEFAULT_ANDROID_NDK_HOST=windows
if [ -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/windows-x86_64" ]; then
CFG_DEFAULT_ANDROID_NDK_HOST=windows-x86_64
fi
;;
esac
fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_ROOT" ]; then
echo
echo "Can not find Android NDK. Please use -android-ndk option to specify one"
exit 1
fi
if [ -z "$CFG_DEFAULT_ANDROID_SDK_ROOT" ]; then
echo
echo "Can not find Android SDK. Please use -android-sdk option to specify one"
exit 1
fi
if [ -z "CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt" ]; then
echo
echo "Can not detect Android NDK toolchain. Please use -android-toolchain-version to specify"
exit 1
fi
if [ -z "$CFG_DEFAULT_ANDROID_NDK_HOST" ] || [ ! -d "$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/arm-linux-androideabi-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST" ]; then
echo
echo "Can not detect the android host. Please use -android-ndk-host option to specify one"
exit 1
fi
QT_QPA_DEFAULT_PLATFORM="android"
CFG_LARGEFILE="no"
DeviceVar set DEFAULT_ANDROID_SDK_ROOT "$CFG_DEFAULT_ANDROID_SDK_ROOT"
DeviceVar set DEFAULT_ANDROID_NDK_ROOT "$CFG_DEFAULT_ANDROID_NDK_ROOT"
DeviceVar set DEFAULT_ANDROID_PLATFORM "$CFG_DEFAULT_ANDROID_PLATFORM"
DeviceVar set DEFAULT_ANDROID_NDK_HOST "$CFG_DEFAULT_ANDROID_NDK_HOST"
DeviceVar set DEFAULT_ANDROID_TARGET_ARCH "$CFG_DEFAULT_ANDROID_TARGET_ARCH"
DeviceVar set DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION "$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION"
fi
if [ -d "$PLATFORM" ]; then
QMAKESPEC="$PLATFORM"
else
QMAKESPEC="$relpath/mkspecs/${PLATFORM}"
fi
if [ -d "$XPLATFORM" ]; then
XQMAKESPEC="$XPLATFORM"
else
XQMAKESPEC="$relpath/mkspecs/${XPLATFORM}"
fi
if [ "$PLATFORM" != "$XPLATFORM" ]; then
QT_CROSS_COMPILE=yes
QMAKE_CONFIG="$QMAKE_CONFIG cross_compile"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG cross_compile"
fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
if [ `basename $QMAKESPEC` = "macx-xcode" ] || [ `basename $XQMAKESPEC` = "macx-xcode" ]; then
echo >&2
echo " Platform 'macx-xcode' should not be used when building Qt/Mac." >&2
echo " Please build Qt/Mac with 'macx-clang' or 'macx-g++', then use" >&2
echo " the 'macx-xcode' spec for your application, and it will link to" >&2
echo " the Qt/Mac build using the settings of the original mkspec." >&2
echo >&2
exit 2
fi
fi
# check specified platforms are supported
if [ '!' -d "$QMAKESPEC" ]; then
echo
echo " The specified system/compiler is not supported:"
echo
echo " $QMAKESPEC"
echo
echo " Please see the README file for a complete list."
echo
exit 2
fi
if [ '!' -d "$XQMAKESPEC" ]; then
echo
echo " The specified system/compiler is not supported:"
echo
echo " $XQMAKESPEC"
echo
echo " Please see the README file for a complete list."
echo
exit 2
fi
if [ '!' -f "${XQMAKESPEC}/qplatformdefs.h" ]; then
echo
echo " The specified system/compiler port is not complete:"
echo
echo " $XQMAKESPEC/qplatformdefs.h"
echo
echo " Please information use the contact form at http://www.qt.io/contact-us"
echo
exit 2
fi
#-------------------------------------------------------------------------------
# build tree initialization
#-------------------------------------------------------------------------------
# is this a shadow build?
if [ "$OPT_SHADOW" = "maybe" ]; then
OPT_SHADOW=no
if [ "$relpath" != "$outpath" ] && [ '!' -f "$outpath/configure" ]; then
if [ -h "$outpath" ]; then
[ "$relpath" -ef "$outpath" ] || OPT_SHADOW=yes
else
OPT_SHADOW=yes
fi
fi
fi
if [ "$OPT_SHADOW" = "yes" ]; then
if [ -f "$relpath/.qmake.cache" -o -f "$relpath/src/corelib/global/qconfig.h" -o -f "$relpath/src/corelib/global/qconfig.cpp" ]; then
echo >&2 "You cannot make a shadow build from a source tree containing a previous build."
echo >&2 "Cannot proceed."
exit 1
fi
[ "$OPT_VERBOSE" = "yes" ] && echo "Performing shadow build..."
fi
# if the source tree is different from the build tree,
# symlink or copy part of the sources
if [ "$OPT_SHADOW" = "yes" ]; then
echo "Preparing build tree..."
[ -d "$outpath/bin" ] || mkdir -p "$outpath/bin"
mkdir -p "$outpath/mkspecs"
fi
# detect build style
if [ "$CFG_DEBUG" = "auto" ]; then
if [ "$XPLATFORM_MAC" = "yes" -o "$XPLATFORM_MINGW" = "yes" ]; then
CFG_DEBUG_RELEASE=yes
CFG_DEBUG=yes
elif [ "$CFG_DEV" = "yes" ]; then
CFG_DEBUG_RELEASE=no
CFG_DEBUG=yes
else
CFG_DEBUG_RELEASE=no
CFG_DEBUG=no
fi
fi
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG build_all debug_and_release"
fi
if [ "$CFG_FORCEDEBUGINFO" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG force_debug_info"
fi
if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG release_tools"
fi
if [ "$XPLATFORM_MAC" = "yes" ]; then
[ "$CFG_PKGCONFIG" = "auto" ] && CFG_PKGCONFIG="no"
fi
if [ "$XPLATFORM_IOS" = "yes" ]; then
CFG_RPATH="no"
CFG_NOBUILD_PARTS="$CFG_NOBUILD_PARTS examples"
CFG_SHARED="no" # iOS builds should be static to be able to submit to the App Store
CFG_SKIP_MODULES="$CFG_SKIP_MODULES qtdoc qtmacextras qtserialport qtwebkit qtwebkit-examples"
CFG_PRECOMPILE="no" # Precompiled headers not supported with multiple -arch arguments
# If the user passes -sdk on the command line we build a SDK-specific Qt build.
# Otherwise we build a joined simulator and device build, which is the default.
if [ -z "$OPT_MAC_SDK" ]; then
QT_CONFIG="$QT_CONFIG build_all simulator_and_device"
fi
fi
# disable XCB and GTK support auto-detection on Mac
if [ "$XPLATFORM_MAC" = "yes" ]; then
[ "$CFG_XCB" = "auto" ] && CFG_XCB=no
[ "$CFG_GTK" = "auto" ] && CFG_GTK=no
fi
QMAKE_CONF_COMPILER=`getXQMakeConf QMAKE_CXX`
TEST_COMPILER=$QMAKE_CONF_COMPILER
if [ "$XPLATFORM_ANDROID" != "no" ] ; then
ANDROID_NDK_TOOLCHAIN_PREFIX=
ANDROID_NDK_TOOLS_PREFIX=
ANDROID_PLATFORM_ARCH=
case $CFG_DEFAULT_ANDROID_TARGET_ARCH in
armeabi*)
ANDROID_NDK_TOOLS_PREFIX=arm-linux-androideabi
ANDROID_NDK_TOOLCHAIN_PREFIX=arm-linux-androideabi
ANDROID_PLATFORM_ARCH=arch-arm
;;
x86)
ANDROID_NDK_TOOLS_PREFIX=i686-linux-android
ANDROID_NDK_TOOLCHAIN_PREFIX=x86
ANDROID_PLATFORM_ARCH=arch-x86
;;
mips)
ANDROID_NDK_TOOLS_PREFIX=mipsel-linux-android
ANDROID_NDK_TOOLCHAIN_PREFIX=mipsel-linux-android
ANDROID_PLATFORM_ARCH=arch-mips
;;
arm64-v8a)
ANDROID_NDK_TOOLS_PREFIX=aarch64-linux-android
ANDROID_NDK_TOOLCHAIN_PREFIX=aarch64-linux-android
ANDROID_PLATFORM_ARCH=arch-arm64
;;
mips64)
ANDROID_NDK_TOOLS_PREFIX=mips64el-linux-android
ANDROID_NDK_TOOLCHAIN_PREFIX=mips64el-linux-android
ANDROID_PLATFORM_ARCH=arch-mips64
;;
x86_64)
ANDROID_NDK_TOOLS_PREFIX=x86_64-linux-android
ANDROID_NDK_TOOLCHAIN_PREFIX=x86_64
ANDROID_PLATFORM_ARCH=arch-x86_64
;;
*)
echo "ERROR: Unknown android arch $CFG_DEFAULT_ANDROID_TARGET_ARCH"
exit 1
;;
esac
if [ "$XPLATFORM_ANDROID" = "g++" ] ; then
QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/$ANDROID_NDK_TOOLCHAIN_PREFIX-$CFG_DEFAULT_ANDROID_NDK_TOOLCHAIN_VERSION/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/$ANDROID_NDK_TOOLS_PREFIX-g++
else
QMAKE_CONF_COMPILER=$CFG_DEFAULT_ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/$CFG_DEFAULT_ANDROID_NDK_HOST/bin/clang++
fi
TEST_COMPILER="$QMAKE_CONF_COMPILER --sysroot=$CFG_DEFAULT_ANDROID_NDK_ROOT/platforms/$CFG_DEFAULT_ANDROID_PLATFORM/$ANDROID_PLATFORM_ARCH/"
if [ "$CFG_ANDROID_STYLE_ASSETS" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG android-style-assets"
fi
fi
TEST_COMPILER_CXXFLAGS=`getXQMakeConf QMAKE_CXXFLAGS`
GCC_MACHINE_DUMP=
case "$TEST_COMPILER" in *g++) GCC_MACHINE_DUMP=$($TEST_COMPILER -dumpmachine);; esac
if [ -n "$GCC_MACHINE_DUMP" ]; then
DeviceVar set GCC_MACHINE_DUMP $($TEST_COMPILER -dumpmachine)
fi
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
SYSROOT_FLAG="--sysroot=$CFG_SYSROOT"
else
SYSROOT_FLAG=
fi
export SYSROOT_FLAG # used by config.tests/unix/{compile.test,arch.test}
# Auto-detect default include and library search paths.
# Use intermediate variable to get around backtick/quote nesting problems.
awkprog='
BEGIN { ORS = ""; FS = "="; incs = 0; libs = 0; }
function normalize(dir)
{
do {
odir = dir
sub(/\/[^\/]+\/\.\./, "", dir)
} while (dir != odir);
do {
odir = dir
gsub(/\/\./, "", dir)
} while (dir != odir);
sub("/$", "", dir);
return dir;
}
# extract include paths from indented lines between
# #include <...> search starts here:
# and
# End of search list.
/^\#include </ { yup=1; print "DEFAULT_INCDIRS=\""; next }
/^End of search/ { yup=0; print "\"\n" }
/ \(framework directory\)$/ { next }
yup { print normalize(substr($0, 2)) "\n"; ++incs }
# extract from one line like LIBRARY_PATH=/one/path:/another/path:...
$1 == "LIBRARY_PATH" {
libs = split($2, library_paths, ":");
print "DEFAULT_LIBDIRS=\"";
for (lib in library_paths) {
dir = normalize(library_paths[lib]);
if (!(dir in dirs)) {
print dir "\n";
dirs[dir] = 1;
}
}
print "\"\n"
}
END {
if (incs == 0)
print "DEFAULT_INCDIRS=\"/usr/include\n/usr/local/include\"\n";
if (libs == 0)
print "DEFAULT_LIBDIRS=\"/lib\n/usr/lib\"\n";
}'
awkprog_result=`LC_ALL=C $TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null | $AWK "$awkprog"`
eval "$awkprog_result"
[ "$OPT_VERBOSE" = "yes" ] && echo "$awkprog_result"
#setup the build parts
if [ -z "$CFG_BUILD_PARTS" ]; then
CFG_BUILD_PARTS="$QT_DEFAULT_BUILD_PARTS"
# build tests by default, if a developer build
if [ "$CFG_DEV" = "yes" ]; then
CFG_BUILD_PARTS="$CFG_BUILD_PARTS tests"
fi
# don't build tools by default when cross-compiling
if [ "$PLATFORM" != "$XPLATFORM" ]; then
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed 's, tools,,g'`
fi
fi
for nobuild in $CFG_NOBUILD_PARTS; do
CFG_BUILD_PARTS=`echo "$CFG_BUILD_PARTS" | sed "s, $nobuild,,g"`
done
if echo $CFG_BUILD_PARTS | grep -v libs >/dev/null 2>&1; then
# echo
# echo "WARNING: libs is a required part of the build."
# echo
CFG_BUILD_PARTS="$CFG_BUILD_PARTS libs"
fi
#-------------------------------------------------------------------------------
# postprocess installation and deployment paths
#-------------------------------------------------------------------------------
if [ -z "$QT_INSTALL_PREFIX" ]; then
if [ "$CFG_DEV" = "yes" ]; then
QT_INSTALL_PREFIX="$outpath" # In Development, we use sandboxed builds by default
else
QT_INSTALL_PREFIX="/usr/local/Qt-${QT_VERSION}" # the default install prefix is /usr/local/Qt-$QT_VERSION
fi
fi
QT_INSTALL_PREFIX=`makeabs "$QT_INSTALL_PREFIX"`
if [ -z "$QT_EXT_PREFIX" ]; then
QT_EXT_PREFIX=$QT_INSTALL_PREFIX
if [ -n "$CFG_SYSROOT" ]; then
QMAKE_SYSROOTIFY=true
else
QMAKE_SYSROOTIFY=false
fi
else
QT_EXT_PREFIX=`makeabs "$QT_EXT_PREFIX"`
QMAKE_SYSROOTIFY=false
fi
if [ -z "$QT_HOST_PREFIX" ]; then
if $QMAKE_SYSROOTIFY; then
QT_HOST_PREFIX=$CFG_SYSROOT$QT_EXT_PREFIX
else
QT_HOST_PREFIX=$QT_EXT_PREFIX
fi
HAVE_HOST_PATH=false
else
QT_HOST_PREFIX=`makeabs "$QT_HOST_PREFIX"`
HAVE_HOST_PATH=true
fi
#------- make the paths relative to the prefixes --------
PREFIX_COMPLAINTS=
PREFIX_REMINDER=false
while read basevar baseoption var option; do
eval path=\$QT_${basevar}_$var
[ -z "$path" ] && continue
path=`makeabs "$path"`
eval base=\$QT_${basevar}_PREFIX
rel=${path##$base}
if [ x"$rel" = x"$path" ]; then
if [ x"$option" != x"sysconf" ]; then
PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
NOTICE: -${option}dir is not a subdirectory of ${baseoption}prefix."
eval \$HAVE_${basevar}_PATH || PREFIX_REMINDER=true
fi
eval QT_REL_${basevar}_$var=\$rel
elif [ -z "$rel" ]; then
eval QT_REL_${basevar}_$var=.
else
eval QT_REL_${basevar}_$var=\${rel#/}
fi
done <<EOF
INSTALL - DOCS doc
INSTALL - HEADERS header
INSTALL - LIBS lib
INSTALL - LIBEXECS libexec
INSTALL - BINS bin
INSTALL - PLUGINS plugin
INSTALL - IMPORTS import
INSTALL - QML qml
INSTALL - ARCHDATA archdata
INSTALL - DATA data
INSTALL - TRANSLATIONS translation
INSTALL - EXAMPLES examples
INSTALL - TESTS tests
INSTALL - SETTINGS sysconf
HOST -host BINS hostbin
HOST -host LIBS hostlib
HOST -host DATA hostdata
EOF
$PREFIX_REMINDER && PREFIX_COMPLAINTS="$PREFIX_COMPLAINTS
Maybe you forgot to specify -prefix/-hostprefix?"
if [ -z "$QT_REL_INSTALL_HEADERS" ]; then
QT_REL_INSTALL_HEADERS=include
fi
if [ -z "$QT_REL_INSTALL_LIBS" ]; then
QT_REL_INSTALL_LIBS=lib
fi
if [ -z "$QT_REL_INSTALL_BINS" ]; then
QT_REL_INSTALL_BINS=bin
fi
if [ -z "$QT_REL_INSTALL_ARCHDATA" ]; then
QT_REL_INSTALL_ARCHDATA=.
fi
if [ x"$QT_REL_INSTALL_ARCHDATA" != x. ]; then
QT_REL_INSTALL_ARCHDATA_PREFIX=$QT_REL_INSTALL_ARCHDATA/
fi
if [ -z "$QT_REL_INSTALL_LIBEXECS" ]; then
if [ "$XPLATFORM_MINGW" = "yes" ]; then
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}bin
else
QT_REL_INSTALL_LIBEXECS=${QT_REL_INSTALL_ARCHDATA_PREFIX}libexec
fi
fi
if [ -z "$QT_REL_INSTALL_PLUGINS" ]; then
QT_REL_INSTALL_PLUGINS=${QT_REL_INSTALL_ARCHDATA_PREFIX}plugins
fi
if [ -z "$QT_REL_INSTALL_IMPORTS" ]; then
QT_REL_INSTALL_IMPORTS=${QT_REL_INSTALL_ARCHDATA_PREFIX}imports
fi
if [ -z "$QT_REL_INSTALL_QML" ]; then
QT_REL_INSTALL_QML=${QT_REL_INSTALL_ARCHDATA_PREFIX}qml
fi
if [ -z "$QT_REL_INSTALL_DATA" ]; then
QT_REL_INSTALL_DATA=.
fi
if [ x"$QT_REL_INSTALL_DATA" != x. ]; then
QT_REL_INSTALL_DATA_PREFIX=$QT_REL_INSTALL_DATA/
fi
if [ -z "$QT_REL_INSTALL_DOCS" ]; then
QT_REL_INSTALL_DOCS=${QT_REL_INSTALL_DATA_PREFIX}doc
fi
if [ -z "$QT_REL_INSTALL_TRANSLATIONS" ]; then
QT_REL_INSTALL_TRANSLATIONS=${QT_REL_INSTALL_DATA_PREFIX}translations
fi
if [ -z "$QT_REL_INSTALL_EXAMPLES" ]; then
QT_REL_INSTALL_EXAMPLES=examples
fi
if [ -z "$QT_REL_INSTALL_TESTS" ]; then
QT_REL_INSTALL_TESTS=tests
fi
if [ -z "$QT_REL_INSTALL_SETTINGS" ]; then
if [ "$XPLATFORM_MAC" = "yes" ]; then
QT_REL_INSTALL_SETTINGS=/Library/Preferences/Qt
else
QT_REL_INSTALL_SETTINGS=etc/xdg
fi
fi
#------- host paths --------
if [ -z "$QT_REL_HOST_BINS" ]; then
if $HAVE_HOST_PATH; then
QT_REL_HOST_BINS=bin
else
QT_REL_HOST_BINS=$QT_REL_INSTALL_BINS
fi
fi
if [ -z "$QT_REL_HOST_LIBS" ]; then
if $HAVE_HOST_PATH; then
QT_REL_HOST_LIBS=lib
else
QT_REL_HOST_LIBS=$QT_REL_INSTALL_LIBS
fi
fi
if [ -z "$QT_REL_HOST_DATA" ]; then
if $HAVE_HOST_PATH; then
QT_REL_HOST_DATA=.
else
QT_REL_HOST_DATA=$QT_REL_INSTALL_ARCHDATA
fi
fi
if [ "$CFG_COMPILE_EXAMPLES" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG compile_examples"
fi
shortxspec=`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
shortspec=`echo $QMAKESPEC | sed "s,^${relpath}/mkspecs/,,"`
QT_CONFIGURE_STR_OFF=0
addConfStr()
{
QT_CONFIGURE_STR_OFFSETS="$QT_CONFIGURE_STR_OFFSETS $QT_CONFIGURE_STR_OFF,"
QT_CONFIGURE_STRS="$QT_CONFIGURE_STRS \"$1\\0\"
"
count=`echo "$1" | wc -c`
QT_CONFIGURE_STR_OFF=`expr $QT_CONFIGURE_STR_OFF + $count`
}
QT_CONFIGURE_STR_OFFSETS=
QT_CONFIGURE_STRS=
addConfStr "$QT_REL_INSTALL_DOCS"
addConfStr "$QT_REL_INSTALL_HEADERS"
addConfStr "$QT_REL_INSTALL_LIBS"
addConfStr "$QT_REL_INSTALL_LIBEXECS"
addConfStr "$QT_REL_INSTALL_BINS"
addConfStr "$QT_REL_INSTALL_PLUGINS"
addConfStr "$QT_REL_INSTALL_IMPORTS"
addConfStr "$QT_REL_INSTALL_QML"
addConfStr "$QT_REL_INSTALL_ARCHDATA"
addConfStr "$QT_REL_INSTALL_DATA"
addConfStr "$QT_REL_INSTALL_TRANSLATIONS"
addConfStr "$QT_REL_INSTALL_EXAMPLES"
addConfStr "$QT_REL_INSTALL_TESTS"
QT_CONFIGURE_STR_OFFSETS_ALL=$QT_CONFIGURE_STR_OFFSETS
QT_CONFIGURE_STRS_ALL=$QT_CONFIGURE_STRS
QT_CONFIGURE_STR_OFFSETS=
QT_CONFIGURE_STRS=
addConfStr "$CFG_SYSROOT"
addConfStr "$QT_REL_HOST_BINS"
addConfStr "$QT_REL_HOST_LIBS"
addConfStr "$QT_REL_HOST_DATA"
addConfStr "$shortxspec"
addConfStr "$shortspec"
#-------------------------------------------------------------------------------
# generate qconfig.cpp
#-------------------------------------------------------------------------------
[ -d "$outpath/src/corelib/global" ] || mkdir -p "$outpath/src/corelib/global"
cat > "$outpath/src/corelib/global/qconfig.cpp.new" <<EOF
/* License Info */
static const char qt_configure_licensee_str [256 + 12] = "qt_lcnsuser=$Licensee";
static const char qt_configure_licensed_products_str [256 + 12] = "qt_lcnsprod=$Edition";
/* Installation date */
static const char qt_configure_installation [12+11] = "qt_instdate=2012-12-20";
/* Installation Info */
static const char qt_configure_prefix_path_str [256 + 12] = "qt_prfxpath=$QT_INSTALL_PREFIX";
#ifdef QT_BUILD_QMAKE
static const char qt_configure_ext_prefix_path_str [256 + 12] = "qt_epfxpath=$QT_EXT_PREFIX";
static const char qt_configure_host_prefix_path_str [256 + 12] = "qt_hpfxpath=$QT_HOST_PREFIX";
#endif
static const short qt_configure_str_offsets[] = {
$QT_CONFIGURE_STR_OFFSETS_ALL
#ifdef QT_BUILD_QMAKE
$QT_CONFIGURE_STR_OFFSETS
#endif
};
static const char qt_configure_strs[] =
$QT_CONFIGURE_STRS_ALL#ifdef QT_BUILD_QMAKE
$QT_CONFIGURE_STRS#endif
;
#define QT_CONFIGURE_SETTINGS_PATH "$QT_REL_INSTALL_SETTINGS"
#ifdef QT_BUILD_QMAKE
# define QT_CONFIGURE_SYSROOTIFY_PREFIX $QMAKE_SYSROOTIFY
#endif
/* strlen( "qt_lcnsxxxx" ) == 12 */
#define QT_CONFIGURE_LICENSEE qt_configure_licensee_str + 12
#define QT_CONFIGURE_LICENSED_PRODUCTS qt_configure_licensed_products_str + 12
#define QT_CONFIGURE_PREFIX_PATH qt_configure_prefix_path_str + 12
#ifdef QT_BUILD_QMAKE
# define QT_CONFIGURE_EXT_PREFIX_PATH qt_configure_ext_prefix_path_str + 12
# define QT_CONFIGURE_HOST_PREFIX_PATH qt_configure_host_prefix_path_str + 12
#endif
EOF
# avoid unecessary rebuilds by copying only if qconfig.cpp has changed
if cmp -s "$outpath/src/corelib/global/qconfig.cpp" "$outpath/src/corelib/global/qconfig.cpp.new"; then
rm -f "$outpath/src/corelib/global/qconfig.cpp.new"
else
[ -f "$outpath/src/corelib/global/qconfig.cpp" ] && chmod +w "$outpath/src/corelib/global/qconfig.cpp"
mv "$outpath/src/corelib/global/qconfig.cpp.new" "$outpath/src/corelib/global/qconfig.cpp"
chmod -w "$outpath/src/corelib/global/qconfig.cpp"
fi
# -----------------------------------------------------------------------------
# build qmake
# -----------------------------------------------------------------------------
# symlink includes
if [ -e "$relpath/.git" ]; then
if [ -z "$PERL" ]; then
echo
echo "You need perl in your PATH to make a build from GIT."
echo "Cannot proceed."
exit 1
fi
"$relpath/bin/syncqt.pl" -version $QT_VERSION -minimal -module QtCore "$relpath" || exit 1
fi
# $1: input variable name (awk regexp)
# $2: optional output variable name
# $3: optional value transformation (sed command)
# relies on $QMAKESPEC, $COMPILER_CONF and $mkfile being set correctly, as the latter
# is where the resulting variable is written to
setBootstrapVariable()
{
getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile"
}
# build qmake
if true; then ###[ '!' -f "$outpath/bin/qmake" ];
echo "Creating qmake..."
mkdir -p "$outpath/qmake" || exit
# fix makefiles
for mkfile in GNUmakefile Makefile; do
EXTRA_LFLAGS=
EXTRA_CFLAGS=
in_mkfile="${mkfile}.in"
if [ "$mkfile" = "Makefile" ]; then
# if which qmake >/dev/null 2>&1 && [ -f qmake/qmake.pro ]; then
# (cd qmake && qmake) >/dev/null 2>&1 && continue
# fi
in_mkfile="${mkfile}.unix"
fi
in_mkfile="$relpath/qmake/$in_mkfile"
mkfile="$outpath/qmake/$mkfile"
if [ -f "$mkfile" ]; then
[ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile"
rm -f "$mkfile"
fi
[ -f "$in_mkfile" ] || continue
echo "########################################################################" > "$mkfile"
echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile"
echo "########################################################################" >> "$mkfile"
EXTRA_OBJS=
EXTRA_SRCS=
EXTRA_CFLAGS="\$(QMAKE_CFLAGS) \$(QMAKE_CFLAGS_SPLIT_SECTIONS)"
EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX11) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)"
EXTRA_LFLAGS="\$(QMAKE_LFLAGS) \$(QMAKE_LFLAGS_GCSECTIONS)"
if [ "$PLATFORM" = "irix-cc" ] || [ "$PLATFORM" = "irix-cc-64" ]; then
EXTRA_LFLAGS="$EXTRA_LFLAGS -lm"
fi
[ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM=
setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM"
setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM"
setBootstrapVariable QMAKE_CFLAGS
setBootstrapVariable QMAKE_CFLAGS_SPLIT_SECTIONS
setBootstrapVariable QMAKE_CXXFLAGS
setBootstrapVariable QMAKE_CXXFLAGS_CXX11
setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS
setBootstrapVariable QMAKE_LFLAGS
setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS
if [ "$CFG_DEBUG" = "no" ] || [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
setBootstrapVariable QMAKE_CFLAGS_RELEASE
setBootstrapVariable QMAKE_CXXFLAGS_RELEASE
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_RELEASE)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)"
else
setBootstrapVariable QMAKE_CFLAGS_DEBUG
setBootstrapVariable QMAKE_CXXFLAGS_DEBUG
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(QMAKE_CFLAGS_DEBUG)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)"
fi
case `basename "$PLATFORM"` in
win32-g++*)
EXTRA_CFLAGS="$EXTRA_CFLAGS -DUNICODE"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -DUNICODE"
EXTRA_OBJS="qfilesystemengine_win.o \
qfilesystemiterator_win.o \
qfsfileengine_win.o \
qlocale_win.o \
qsettings_win.o \
qsystemlibrary.o \
registry.o"
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/corelib/io/qfilesystemengine_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_win.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/plugin/qsystemlibrary.cpp\" \
\"\$(SOURCE_PATH)/tools/shared/windows/registry.cpp\""
EXTRA_LFLAGS="$EXTRA_LFLAGS -static -s -lole32 -luuid -ladvapi32 -lkernel32"
EXEEXT=".exe"
;;
*)
EXTRA_OBJS="qfilesystemengine_unix.o \
qfilesystemiterator_unix.o \
qfsfileengine_unix.o \
qlocale_unix.o"
EXTRA_SRCS="\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemengine_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfilesystemiterator_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/io/qfsfileengine_unix.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/tools/qlocale_unix.cpp\""
EXEEXT=
;;
esac
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "COCOA_LFLAGS =-framework Foundation -framework CoreServices" >>"$mkfile"
echo "CARBON_LFLAGS =-framework ApplicationServices" >>"$mkfile"
echo "CARBON_CFLAGS =-fconstant-cfstrings" >>"$mkfile"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(COCOA_LFLAGS)"
EXTRA_LFLAGS="$EXTRA_LFLAGS \$(CARBON_LFLAGS)"
EXTRA_CFLAGS="$EXTRA_CFLAGS \$(CARBON_CFLAGS)"
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="$EXTRA_OBJS \
qsettings_mac.o \
qcore_mac.o \
qcore_mac_objc.o"
EXTRA_SRCS="$EXTRA_SRCS \
\"\$(SOURCE_PATH)/src/corelib/io/qsettings_mac.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac.cpp\" \
\"\$(SOURCE_PATH)/src/corelib/kernel/qcore_mac_objc.mm\""
fi
echo >>"$mkfile"
adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'`
adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'`
adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'`
echo "BUILD_PATH = .." >> "$mkfile"
echo "SOURCE_PATH = $adjrelpath" >> "$mkfile"
if [ -e "$relpath/.git" ]; then
echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile"
else
echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile"
fi
echo "QMAKESPEC = $adjqmakespec" >> "$mkfile"
echo "QT_VERSION = $QT_VERSION" >> "$mkfile"
echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile"
echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile"
echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile"
echo "EXTRA_CFLAGS = $EXTRA_CFLAGS" >> "$mkfile"
echo "EXTRA_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile"
echo "QTOBJS =" $EXTRA_OBJS >> "$mkfile"
echo "QTSRCS =" $EXTRA_SRCS >> "$mkfile"
echo "LFLAGS = $EXTRA_LFLAGS" >> "$mkfile"
echo "EXEEXT = $EXEEXT" >> "$mkfile"
echo "RM_F = rm -f" >> "$mkfile"
echo "RM_RF = rm -rf" >> "$mkfile"
if [ "$BUILD_ON_MAC" = "yes" ]; then
echo "EXTRA_CXXFLAGS += -MMD" >> "$mkfile"
cat "$in_mkfile" >> "$mkfile"
echo "-include \$(notdir \$(DEPEND_SRC:%.cpp=%.d))" >> "$mkfile"
else
cat "$in_mkfile" >> "$mkfile"
if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then
(cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1
sed 's,^.*/\([^/]*.o\):,\1:,g' "$mkfile" >"$mkfile.tmp"
sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile"
rm "$mkfile.tmp"
fi
fi
done
if [ "$OPT_VERBOSE" = yes ]; then
# Show the output of make
(cd "$outpath/qmake"; "$MAKE") || exit 2
else
# Hide the output of make
# Use bash to print dots, if we have it, and stdout is a tty.
if test -t 1 && $WHICH bash > /dev/null 2>/dev/null; then
bash -c 'set -o pipefail
cd "$0/qmake"; "$1" | while read line; do
builtin echo -n .
done' "$outpath" "$MAKE" || exit 2
else
(cd "$outpath/qmake"; "$MAKE" -s) || exit 2
fi
echo "Done."
fi
fi # Build qmake
#-------------------------------------------------------------------------------
# create a qt.conf for the Qt build tree itself
#-------------------------------------------------------------------------------
QTCONFFILE="$outpath/bin/qt.conf"
cat > "$QTCONFFILE" <<EOF
[EffectivePaths]
Prefix=..
EOF
if [ -n "$CFG_HOST_QT_TOOLS_PATH" ]; then
cat >> "$QTCONFFILE" <<EOF
[Paths]
Prefix=$QT_EXT_PREFIX
Documentation=$QT_REL_INSTALL_DOCS
Headers=$QT_REL_INSTALL_HEADERS
Libraries=$QT_REL_INSTALL_LIBS
LibraryExecutables=$QT_REL_INSTALL_LIBEXECS
Binaries=$QT_REL_INSTALL_BINS
Plugins=$QT_REL_INSTALL_PLUGINS
Imports=$QT_REL_INSTALL_IMPORTS
Qml2Imports=$QT_REL_INSTALL_QML
ArchData=$QT_REL_INSTALL_ARCHDATA
Data=$QT_REL_INSTALL_DATA
Translations=$QT_REL_INSTALL_TRANSLATIONS
Examples=$QT_REL_INSTALL_EXAMPLES
Tests=$QT_REL_INSTALL_TESTS
HostPrefix=$QT_HOST_PREFIX
HostBinaries=$QT_REL_HOST_BINS
HostLibraries=$QT_REL_HOST_LIBS
HostData=$QT_REL_HOST_DATA
TargetSpec=$XPLATFORM
HostSpec=$PLATFORM
EOF
if [ -n "$CFG_SYSROOT" ]; then
cat >> "$QTCONFFILE" <<EOF
Sysroot=$CFG_SYSROOT
EOF
fi
fi
if [ x"$relpath" != x"$outpath" ]; then
cat >> "$QTCONFFILE" <<EOF
[EffectiveSourcePaths]
Prefix=$relpath
EOF
fi
[ -z "$CFG_HOST_QT_TOOLS_PATH" ] && CFG_HOST_QT_TOOLS_PATH="$outpath/bin"
CFG_QMAKE_PATH="$CFG_HOST_QT_TOOLS_PATH/qmake"
#-------------------------------------------------------------------------------
# write out device config before we run the test.
#-------------------------------------------------------------------------------
DEVICE_VARS_OUTFILE="$outpath/mkspecs/qdevice.pri"
if cmp -s "$DEVICE_VARS_FILE" "$DEVICE_VARS_OUTFILE"; then
rm -f "$DEVICE_VARS_FILE"
else
mv -f $DEVICE_VARS_FILE "$DEVICE_VARS_OUTFILE"
DEVICE_VARS_FILE="$DEVICE_VARS_OUTFILE"
fi
#-------------------------------------------------------------------------------
# write out host config.
#-------------------------------------------------------------------------------
HOST_VARS_OUTFILE="$outpath/mkspecs/qhost.pri"
if cmp -s "$HOST_VARS_FILE" "$HOST_VARS_OUTFILE"; then
rm -f "$HOST_VARS_FILE"
else
mv -f $HOST_VARS_FILE "$HOST_VARS_OUTFILE"
HOST_VARS_FILE="$HOST_VARS_OUTFILE"
fi
echo "Running configuration tests..."
#-------------------------------------------------------------------------------
# Verify makespec
#-------------------------------------------------------------------------------
QMAKE_OUTPUT=`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "QT=" $DEV_NULL 2>&1`
if [ $? != "0" ]; then
echo "Failed to process makespec for platform '$XPLATFORM'"
if [ "$OPT_VERBOSE" = "yes" ]; then
echo "$QMAKE_OUTPUT"
else
echo "Turn on verbose messaging (-v) to see the final report."
fi
exit 101
fi
#-------------------------------------------------------------------------------
# Detect pkg-config
#-------------------------------------------------------------------------------
if [ -z "$PKG_CONFIG" ]; then
# See if PKG_CONFIG is set in the mkspec:
PKG_CONFIG="`"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" -E -nocache -spec "$XQMAKESPEC" "CONFIG=" $DEV_NULL 2>&1 | sed -n -e 's,^PKG_CONFIG = \(.*\),\1,p'`"
[ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from mkspec: $PKG_CONFIG"
fi
if [ -z "$PKG_CONFIG" ]; then
PKG_CONFIG=`"$WHICH" pkg-config 2>/dev/null`
[ -n "$PKG_CONFIG" ] && [ "$OPT_VERBOSE" = "yes" ] && echo "Found pkg-config from \$PATH: $PKG_CONFIG"
fi
if [ "$CFG_PKGCONFIG" = "no" ]; then
PKG_CONFIG=
[ "$OPT_VERBOSE" = "yes" ] && echo "pkg-config support disabled."
elif [ -n "$PKG_CONFIG" ]; then
# found a pkg-config
if [ "$QT_CROSS_COMPILE" = "yes" ]; then
# when xcompiling, check environment to see if it's actually usable
if [ -z "$PKG_CONFIG_LIBDIR" ]; then
if [ -n "$CFG_SYSROOT" ] && [ -d "$CFG_SYSROOT/usr/lib/pkgconfig" ]; then
PKG_CONFIG_LIBDIR=$CFG_SYSROOT/usr/lib/pkgconfig:$CFG_SYSROOT/usr/share/pkgconfig
if [ -n "$GCC_MACHINE_DUMP" ]; then
PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$CFG_SYSROOT/usr/lib/$GCC_MACHINE_DUMP/pkgconfig
fi
export PKG_CONFIG_LIBDIR
echo >&2 "Note: PKG_CONFIG_LIBDIR automatically set to $PKG_CONFIG_LIBDIR"
elif [ "$CFG_PKGCONFIG" = "auto" ]; then
PKG_CONFIG=
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_LIBDIR is not set and"
echo >&2 "the host's .pc files would be used (even if you set PKG_CONFIG_PATH)."
echo >&2 "Set this variable to the directory that contains target .pc files"
echo >&2 "for pkg-config to function correctly when cross-compiling or"
echo >&2 "use -pkg-config to override this test."
fi
fi
if [ -z "$PKG_CONFIG_SYSROOT_DIR" ]; then
if [ -n "$CFG_SYSROOT" ]; then
PKG_CONFIG_SYSROOT_DIR=$CFG_SYSROOT
export PKG_CONFIG_SYSROOT_DIR
echo >&2 "Note: PKG_CONFIG_SYSROOT_DIR automatically set to $PKG_CONFIG_SYSROOT_DIR"
elif [ "$CFG_PKGCONFIG" = "auto" ]; then
PKG_CONFIG=
echo >&2 "Warning: Disabling pkg-config since PKG_CONFIG_SYSROOT_DIR is not set."
echo >&2 "Set this variable to your sysroot for pkg-config to function correctly when"
echo >&2 "cross-compiling or use -pkg-config to override this test."
fi
fi
fi
if [ -n "$PKG_CONFIG" ]; then
CFG_PKGCONFIG=yes
else
CFG_PKGCONFIG=no
fi
elif [ "$CFG_PKGCONFIG" = "yes" ]; then
echo >&2 "Could not detect pkg-config from mkspec or PATH."
exit 101
fi
if [ -z "$PKG_CONFIG" ]; then
QT_CONFIG="$QT_CONFIG no-pkg-config"
fi
#-------------------------------------------------------------------------------
# run configure tests
#-------------------------------------------------------------------------------
# parameters: path, name, extra args
compileTest()
{
path=config.tests/$1
name=$2
shift 2
# allow config tests which behave differently depending on the type of
# library being built (shared/static) e.g. see config.tests/unix/icu
test_config="$QMAKE_CONFIG shared"
if [ "$CFG_SHARED" = "no" ]; then
test_config="$QMAKE_CONFIG static"
fi
TEST_CONFIG_FLAGS=
if [ -z "$PKG_CONFIG" ]; then
TEST_CONFIG_FLAGS="QT_CONFIG+=no-pkg-config"
fi
echo $ECHO_N "checking for $name... $ECHO_C"
"$unixtests/compile.test" "$XQMAKESPEC" "$test_config" $OPT_VERBOSE "$relpath" "$outpath" "$path" "$name" "$CFG_QMAKE_PATH" "$QTCONFFILE" $I_FLAGS $D_FLAGS $L_FLAGS $TEST_CONFIG_FLAGS "$@"
}
compileTestWithPkgConfig()
{
if [ $# -lt 4 ]; then
echo "CompileTestWithPkgConfig requires at least 4 arguments."
echo "compileTestWithPkgConfig pkg_name configtest configtest_name qmake_postfix + additional arguments to compileTest"
exit 1
fi
local pkg_name=$1
local configtest=$2
local configtest_name="$3"
local qmake_postfix=$4
shift 4
local has_used_pkg_config="no"
local incdir_raw incdir_mod cflags
local libdir_raw libdir_mod libs
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists $pkg_name 2>/dev/null; then
incdir_raw=`$PKG_CONFIG --cflags-only-I $pkg_name 2>/dev/null`
cflags=`$PKG_CONFIG --cflags-only-other $pkg_name 2>/dev/null`
libdir_raw=`$PKG_CONFIG --libs-only-L $pkg_name 2>/dev/null`
libs=`$PKG_CONFIG --libs-only-l --libs-only-other $pkg_name 2>/dev/null`
incdir_mod=`echo $incdir_raw | sed -e 's,^-I,,g' -e 's, -I, ,g'`
libdir_mod=`echo $libdir_raw | sed -e 's,^-L,,g' -e 's, -L, ,g'`
has_used_pkg_config="yes"
fi
if compileTest $configtest "$configtest_name" $libdir_raw $incdir_raw $libs $cflags "$@"; then
if [ "$has_used_pkg_config" = "yes" ] && [ -n "$qmake_postfix" ]; then
QMakeVar set QMAKE_INCDIR_$qmake_postfix "`shellArgumentListToQMakeList $incdir_mod`"
QMakeVar set QMAKE_LIBDIR_$qmake_postfix "`shellArgumentListToQMakeList $libdir_mod`"
QMakeVar set QMAKE_LIBS_$qmake_postfix "`shellArgumentListToQMakeList $libs`"
QMakeVar set QMAKE_CFLAGS_$qmake_postfix "`shellArgumentListToQMakeList $cflags`"
fi
return 0
else
return 1
fi
}
#-------------------------------------------------------------------------------
# determine the target and host architectures
#-------------------------------------------------------------------------------
# Use config.tests/arch/arch.pro to have the compiler tell us what the target architecture is
OUTFILE=$outpath/arch.result
"$unixtests/arch.test" "$XQMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "target" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else
echo
echo "Could not determine the target architecture!"
echo "Turn on verbose messaging (-v) to see the final report."
fi
rm -f "$OUTFILE" 2>/dev/null
[ -z "$CFG_ARCH" ] && CFG_ARCH="unknown"
if [ "$QMAKESPEC" != "$XQMAKESPEC" ]; then
# Do the same test again, using the host compiler
SYSROOT_FLAG= "$unixtests/arch.test" "$QMAKESPEC" $OPT_VERBOSE "$relpath" "$outpath" "$OUTFILE" "host" $CFG_QMAKE_PATH $QTCONFFILE $I_FLAGS $D_FLAGS $L_FLAGS
if [ $? -eq 0 ]; then
eval `cat "$OUTFILE"`
else
echo
echo "Could not determine the host architecture!"
echo "Turn on verbose messaging (-v) to see the final report."
fi
rm -f "$OUTFILE" 2>/dev/null
[ -z "$CFG_HOST_ARCH" ] && CFG_HOST_ARCH="unknown"
else
# not cross compiling, host == target
CFG_HOST_ARCH="$CFG_ARCH"
CFG_HOST_CPUFEATURES="$CFG_CPUFEATURES"
fi
unset OUTFILE
if [ "$OPT_VERBOSE" = "yes" ]; then
echo "System architecture: '$CFG_ARCH'"
echo "Host architecture: '$CFG_HOST_ARCH'"
fi
#-------------------------------------------------------------------------------
# functionality tests
#-------------------------------------------------------------------------------
# auto-detect precompiled header support
if [ "$CFG_PRECOMPILE" = "auto" ]; then
if "$unixtests/precomp.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
CFG_PRECOMPILE=no
else
CFG_PRECOMPILE=yes
fi
fi
# auto-detect -fvisibility support
if [ "$CFG_REDUCE_EXPORTS" != "no" ]; then
if "$unixtests/fvisibility.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
echo "-reduce-exports was requested but this compiler does not support it"
echo "Re-run configure with -v for more information"
exit 1
fi
CFG_REDUCE_EXPORTS=no
else
CFG_REDUCE_EXPORTS=yes
fi
fi
# auto-detect -fuse-ld=gold support
if [ "$CFG_USE_GOLD_LINKER" != "no" ]; then
if compilerSupportsFlag $TEST_COMPILER -fuse-ld=gold; then
CFG_USE_GOLD_LINKER=yes
else
if [ "$CFG_USE_GOLD_LINKER" = "yes" ]; then
echo "-use-gold-linker was requested but this compiler does not support it"
exit 1
fi
CFG_USE_GOLD_LINKER=no
fi
fi
# auto-detect --enable-new-dtags support
if linkerSupportsFlag $TEST_COMPILER --enable-new-dtags; then
CFG_ENABLE_NEW_DTAGS=yes
else
CFG_ENABLE_NEW_DTAGS=no
fi
# auto-detect -fstack-protector-strong support (for QNX only currently)
if [ "$XPLATFORM_QNX" = "yes" ]; then
if compilerSupportsFlag $TEST_COMPILER -fstack-protector-strong; then
CFG_STACK_PROTECTOR_STRONG=yes
else
CFG_STACK_PROTECTOR_STRONG=no
fi
else
CFG_STACK_PROTECTOR_STRONG=no
fi
# detect the availability of the -Bsymbolic-functions linker optimization
if [ "$CFG_REDUCE_RELOCATIONS" != "no" ]; then
if "$unixtests/bsymbolic_functions.test" "$TEST_COMPILER" "$OPT_VERBOSE"; then
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
echo "-reduce-relocations was requested but this compiler does not support it"
echo "Re-run configure with -v for more information"
exit 1
fi
CFG_REDUCE_RELOCATIONS=no
else
CFG_REDUCE_RELOCATIONS=yes
fi
fi
# auto-detect GNU make support
if [ "$CFG_USE_GNUMAKE" = "auto" ] && "$MAKE" -v | grep "GNU Make" >/dev/null 2>&1; then
CFG_USE_GNUMAKE=yes
fi
# find the default framework value
if [ "$XPLATFORM_MAC" = "yes" ]; then
if [ "$CFG_FRAMEWORK" = "auto" ]; then
CFG_FRAMEWORK="$CFG_SHARED"
elif [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_SHARED" = "no" ]; then
echo
echo "WARNING: Using static linking will disable the use of Mac frameworks."
echo
CFG_FRAMEWORK="no"
fi
else
CFG_FRAMEWORK=no
fi
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
# sanity-check for separate debug info
if [ "$CFG_SHARED" = "no" ]; then
echo "ERROR: -separate-debug-info is incompatible with -static"
exit 1
fi
if [ "$CFG_DEBUG" = "no" -a "$CFG_DEBUG_RELEASE" = "no" -a "$CFG_FORCEDEBUGINFO" = "no" ]; then
echo "ERROR: -separate-debug-info needs -debug, -debug-and-release, or -force-debug-info"
exit 1
fi
# Detect objcopy support
if [ "$XPLATFORM_MAC" = "no" ]; then
if ! compileTest unix/objcopy "objcopy"; then
echo "ERROR: -separate-debug-info was requested but this binutils does not support it."
echo "Re-run configure with -v for more information"
exit 1
fi
fi
fi
# Detect C++11 & up support
stdcxx_error=false
if [ "$CFG_STDCXX" = "c++11" ]; then
: # CFG_STDCXX is correct
elif ! compileTest common/c++14 "C++14"; then
if [ "$CFG_STDCXX" != "auto" ]; then
stdcxx_error=true
else
CFG_STDCXX="c++11"
fi
elif [ "$CFG_STDCXX" = "c++14" ]; then
: # CFG_STDCXX is correct
elif ! compileTest common/c++1z "C++1z"; then
if [ "$CFG_STDCXX" != "auto" ]; then
stdcxx_error=true
else
CFG_STDCXX="c++14"
fi
else
CFG_STDCXX="c++1z"
fi
if $stdcxx_error && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "$CFG_STDCXX support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
fi
# Detect which edition of the C++ standard the compiler defaults to
CFG_STDCXX_DEFAULT=199711
if compileTest common/c++default "default C++ standard edition"; then
if [ -e "$outpath/config.tests/common/c++default/c++default.ii" ]; then
CFG_STDCXX_DEFAULT=`sed -n '/^[0-9]/s/L//p' "$outpath/config.tests/common/c++default/c++default.ii"`
else
if [ "$OPT_VERBOSE" = "yes" ]; then
echo "Failed to run the preprocessor, something is wrong with your compiler"
fi
if [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
exit 101
fi
fi
fi
# Detect whether 64-bit std::atomic works -- some 32-bit platforms require extra library support
if compileTest common/atomic64 "64-bit std::atomic"; then
CFG_ATOMIC64=yes
elif compileTest common/atomic64 "64-bit std::atomic in -latomic" -latomic; then
CFG_ATOMIC64=libatomic
else
CFG_ATOMIC64=no
fi
# Detect whether std::atomic works for function pointers -- some implementations are buggy
if ! compileTest common/atomicfptr "std::atomic for function pointers"; then
echo "ERROR: detected a std::atomic implementation that fails for function pointers."
echo "Please apply the patch corresponding to your Standard Library vendor, found in"
echo " $relpath/config.tests/common/atomicfptr"
exit 101
fi
# detect sse2 support
CFG_SSE_LIST=
if [ "${CFG_SSE2}" = "auto" ]; then
if compileTest common/sse2 "sse2"; then
CFG_SSE2=yes
CFG_SSE_LIST=SSE2
else
CFG_SSE2=no
fi
fi
# detect sse3 support
if [ "${CFG_SSE2}" = "no" ]; then
CFG_SSE3=no
fi
if [ "${CFG_SSE3}" = "auto" ]; then
if compileTest common/sse3 "sse3"; then
CFG_SSE3=yes
CFG_SSE_LIST="$CFG_SSE_LIST SSE3"
else
CFG_SSE3=no
fi
fi
# detect ssse3 support
if [ "${CFG_SSE3}" = "no" ]; then
CFG_SSSE3=no
fi
if [ "${CFG_SSSE3}" = "auto" ]; then
if compileTest common/ssse3 "ssse3"; then
CFG_SSSE3=yes
CFG_SSE_LIST="$CFG_SSE_LIST SSSE3"
else
CFG_SSSE3=no
fi
fi
# detect sse4.1 support
if [ "${CFG_SSSE3}" = "no" ]; then
CFG_SSE4_1=no
fi
if [ "${CFG_SSE4_1}" = "auto" ]; then
if compileTest common/sse4_1 "sse4_1"; then
CFG_SSE4_1=yes
CFG_SSE_LIST="$CFG_SSE_LIST SSE4.1"
else
CFG_SSE4_1=no
fi
fi
# detect sse4.2 support
if [ "${CFG_SSE4_1}" = "no" ]; then
CFG_SSE4_2=no
fi
if [ "${CFG_SSE4_2}" = "auto" ]; then
if compileTest common/sse4_2 "sse4_2"; then
CFG_SSE4_2=yes
CFG_SSE_LIST="$CFG_SSE_LIST SSE4.2"
else
CFG_SSE4_2=no
fi
fi
# detect avx support
CFG_AVX_LIST=
if [ "${CFG_SSE4_2}" = "no" ]; then
CFG_AVX=no
fi
if [ "${CFG_AVX}" = "auto" ]; then
if compileTest common/avx "avx"; then
case "$XQMAKESPEC" in
*g++*|*-clang*)
# Some clang versions produce internal compiler errors compiling Qt AVX code
case `$TEST_COMPILER --version` in
Apple\ clang\ version\ [23]*)
CFG_AVX=no
if [ "$OPT_VERBOSE" = "yes" ]; then
echo 'AVX support disabled for blacklisted clang compiler'
fi
;;
*)
CFG_AVX=yes
CFG_AVX_LIST=AVX
;;
esac
;;
*)
CFG_AVX=yes
CFG_AVX_LIST=AVX
;;
esac
else
CFG_AVX=no
fi
fi
# detect avx2 support
if [ "${CFG_AVX}" = "no" ]; then
CFG_AVX2=no
fi
if [ "${CFG_AVX2}" = "auto" ]; then
if compileTest common/avx2 "avx2"; then
CFG_AVX2=yes
CFG_AVX_LIST="$CFG_AVX_LIST AVX2"
else
CFG_AVX2=no
fi
fi
# detect avx512 support
if [ "${CFG_AVX2}" = "no" ]; then
CFG_AVX512=
fi
if [ "${CFG_AVX512}" = "auto" ]; then
# First, test for AVX-512 Foundation
if compileTest common/avx512 "avx512f" AVX512=F; then
# Test for the sub-features
CFG_AVX512=f
CFG_AVX512_UPPER=AVX512F
for feature in er cd pf dq bw vl ifma vbmi; do
if [ -n "$BASH_VERSION" ] && [ "${BASH_VERSION%%.*}" -gt 3 ]; then
upper=${feature^^*}
elif [ -n "$ZSH_VERSION" ]; then
upper=${(U)feature}
else
upper=`echo $feature | tr a-z A-Z`
fi
if compileTest common/avx512 "avx512$feature" AVX512=$upper; then
CFG_AVX512="$CFG_AVX512 $feature"
CFG_AVX512_UPPER="$CFG_AVX512_UPPER AVX512$upper"
fi
done
else
CFG_AVX512=
fi
fi
# check Neon support
if [ "$CFG_NEON" = "auto" ]; then
# no compile test, just check what the compiler has
case "$CFG_CPUFEATURES" in
*neon*)
CFG_NEON=yes
;;
*)
CFG_NEON=no
;;
esac
fi
# detect mips_dsp support
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSP}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dsp "mips_dsp" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
CFG_MIPS_DSP=yes
else
CFG_MIPS_DSP=no
fi
elif [ "$CFG_ARCH" != "mips" ]; then
CFG_MIPS_DSP=no
fi
# detect mips_dspr2 support
if [ "$CFG_ARCH" = "mips" ] && [ "${CFG_MIPS_DSPR2}" = "auto" ]; then
if "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" $OPT_VERBOSE "$relpath" "$outpath" config.tests/unix/mips_dspr2 "mips_dspr2" "$CFG_QMAKE_PATH" "$QTCONFFILE" $L_FLAGS $I_FLAGS $D_FLAGS $l_FLAGS; then
CFG_MIPS_DSPR2=yes
else
CFG_MIPS_DSPR2=no
fi
elif [ "$CFG_ARCH" != "mips" ]; then
CFG_MIPS_DSPR2=no
fi
[ "$XPLATFORM_MINGW" = "yes" ] && QMakeVar add styles "windowsxp windowsvista"
[ "$XPLATFORM_ANDROID" != "no" ] && QMakeVar add styles "android"
# check IPC support
if ! compileTest unix/ipc_sysv "ipc_sysv" ; then
# SYSV IPC is not supported - check POSIX IPC
if compileTest unix/ipc_posix "ipc_posix" ; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_POSIX_IPC"
else
if [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] ; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SYSTEMSEMAPHORE QT_NO_SHAREDMEMORY"
fi
fi
fi
# detect zlib
if [ "$CFG_ZLIB" = "no" ]; then
# Note: Qt no longer support builds without zlib
# So we force a "no" to be "auto" here.
# If you REALLY really need no zlib support, you can still disable
# it by doing the following:
# add "no-zlib" to mkspecs/qconfig.pri
# #define QT_NO_COMPRESS (probably by adding to src/corelib/global/qconfig.h)
#
# There's no guarantee that Qt will build under those conditions
CFG_ZLIB=auto
ZLIB_FORCED=yes
fi
if [ "$XPLATFORM_QNX" = "yes" ]; then
if [ "$CFG_SLOG2" != "no" ]; then
if compileTest unix/slog2 "slog2"; then
CFG_SLOG2=yes
QMAKE_CONFIG="$QMAKE_CONFIG slog2"
else
CFG_SLOG2=no
fi
fi
if [ "$CFG_QNX_IMF" != "no" ]; then
if compileTest unix/qqnx_imf "qqnx_imf"; then
CFG_QNX_IMF=yes
QMAKE_CONFIG="$QMAKE_CONFIG qqnx_imf"
else
CFG_QNX_IMF=no
fi
fi
if [ "$CFG_PPS" != "no" ]; then
if compileTest unix/pps "pps"; then
CFG_PPS=yes
QMAKE_CONFIG="$QMAKE_CONFIG qqnx_pps"
else
CFG_PPS=no
fi
fi
if [ "$CFG_LGMON" != "no" ]; then
if compileTest unix/lgmon "lgmon"; then
CFG_LGMON=yes
QMAKE_CONFIG="$QMAKE_CONFIG lgmon"
else
CFG_LGMON=no
fi
fi
fi
if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
CFG_INTEGRITYFB=yes
CFG_SHARED=no
CFG_LARGEFILE=no
fi
if [ "$CFG_ZLIB" = "auto" ]; then
if compileTest unix/zlib "zlib"; then
CFG_ZLIB=system
else
CFG_ZLIB=yes
fi
fi
if [ "$CFG_MTDEV" != "no" ]; then
if compileTest unix/mtdev "mtdev"; then
CFG_MTDEV=yes
else
CFG_MTDEV=no
fi
fi
if [ "$CFG_MTDEV" = "no" ]; then
QMakeVar add DEFINES QT_NO_MTDEV
fi
if [ "$CFG_JOURNALD" != "no" ]; then
if compileTest unix/journald "journald"; then
CFG_JOURNALD=yes
QMAKE_CONFIG="$QMAKE_CONFIG journald"
else
if [ "$CFG_JOURNALD" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "journald support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_JOURNALD=no
fi
fi
fi
if [ "$CFG_SYSLOG" != "no" ]; then
if compileTest unix/syslog "syslog"; then
CFG_SYSLOG=yes
QMAKE_CONFIG="$QMAKE_CONFIG syslog"
else
if [ "$CFG_SYSLOG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "syslog support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SYSLOG=no
fi
fi
fi
if [ "$CFG_LARGEFILE" = "auto" ]; then
#Large files should be enabled for all Linux systems
CFG_LARGEFILE=yes
fi
if [ "$CFG_GUI" = "no" ]; then
QPA_PLATFORM_GUARD=no
fi
# detect how jpeg should be built
if [ "$CFG_JPEG" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
CFG_JPEG=plugin
else
CFG_JPEG=yes
fi
fi
# detect jpeg
if [ "$CFG_LIBJPEG" = "auto" ]; then
if compileTest unix/libjpeg "libjpeg"; then
CFG_LIBJPEG=system
else
CFG_LIBJPEG=qt
fi
fi
# detect how gif should be built
if [ "$CFG_GIF" = "auto" ]; then
if [ "$CFG_SHARED" = "yes" ]; then
CFG_GIF=plugin
else
CFG_GIF=yes
fi
fi
# detect png
if [ "$CFG_LIBPNG" = "auto" ]; then
if compileTest unix/libpng "libpng"; then
CFG_LIBPNG=system
else
CFG_LIBPNG=qt
fi
fi
# detect dl
if compileTest unix/dlopen "dlopen"; then
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
else
if ! compileTest unix/libdl "libdl"; then
QMAKE_CONFIG="$QMAKE_CONFIG no-libdl"
QMakeVar add DEFINES QT_NO_DYNAMIC_LIBRARY
fi
fi
if [ "$CFG_EGLFS" = "yes" ]; then
if [ "$CFG_EGL" = "no" ]; then
echo "The EGLFS plugin requires EGL support and cannot be built"
exit 101
fi
CFG_EGL=yes
fi
# auto-detect SQL-modules support
for _SQLDR in $CFG_SQL_AVAILABLE; do
case $_SQLDR in
mysql)
if [ "$CFG_SQL_mysql" != "no" ]; then
[ -z "$CFG_MYSQL_CONFIG" ] && CFG_MYSQL_CONFIG=`"$WHICH" mysql_config`
if [ -x "$CFG_MYSQL_CONFIG" ]; then
QT_CFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --include 2>/dev/null | filterIncludeOptions`
# -rdynamic should not be returned by mysql_config, but is on RHEL 6.6
QT_LFLAGS_MYSQL_R=`$CFG_MYSQL_CONFIG --libs_r 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
QT_LFLAGS_MYSQL=`$CFG_MYSQL_CONFIG --libs 2>/dev/null | filterLibraryOptions | sed "s/-rdynamic//"`
QT_MYSQL_VERSION=`$CFG_MYSQL_CONFIG --version 2>/dev/null`
QT_MYSQL_VERSION_MAJOR=`echo $QT_MYSQL_VERSION | cut -d . -f 1`
fi
if [ -n "$QT_MYSQL_VERSION" ] && [ "$QT_MYSQL_VERSION_MAJOR" -lt 4 ]; then
if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "This version of MySql is not supported ($QT_MYSQL_VERSION)."
echo " You need MySql 4 or higher."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_mysql="no"
QT_LFLAGS_MYSQL=""
QT_LFLAGS_MYSQL_R=""
QT_CFLAGS_MYSQL=""
fi
else
if compileTest unix/mysql_r "MySQL (thread-safe)" $QT_LFLAGS_MYSQL_R $QT_CFLAGS_MYSQL; then
QMakeVar add CONFIG use_libmysqlclient_r
if [ "$CFG_SQL_mysql" = "auto" ]; then
CFG_SQL_mysql=plugin
fi
QT_LFLAGS_MYSQL="$QT_LFLAGS_MYSQL_R"
elif compileTest unix/mysql "MySQL (thread-unsafe)" $QT_LFLAGS_MYSQL $QT_CFLAGS_MYSQL; then
if [ "$CFG_SQL_mysql" = "auto" ]; then
CFG_SQL_mysql=plugin
fi
else
if [ "$CFG_SQL_mysql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "MySQL support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_mysql=no
QT_LFLAGS_MYSQL=""
QT_LFLAGS_MYSQL_R=""
QT_CFLAGS_MYSQL=""
fi
fi
fi
fi
;;
psql)
if [ "$CFG_SQL_psql" != "no" ]; then
[ -z "$CFG_PSQL_CONFIG" ] && CFG_PSQL_CONFIG=`"$WHICH" pg_config`
# Be careful not to use native pg_config when cross building.
if [ "$XPLATFORM_MINGW" != "yes" ] && [ -x "$CFG_PSQL_CONFIG" ]; then
QT_CFLAGS_PSQL=`$CFG_PSQL_CONFIG --includedir 2>/dev/null | filterIncludePath`
QT_LFLAGS_PSQL=`$CFG_PSQL_CONFIG --libdir 2>/dev/null | filterLibraryPath`
fi
[ -z "$QT_CFLAGS_PSQL" ] || QT_CFLAGS_PSQL="-I$QT_CFLAGS_PSQL"
[ -z "$QT_LFLAGS_PSQL" ] || QT_LFLAGS_PSQL="-L$QT_LFLAGS_PSQL"
# But, respect PSQL_LIBS if set
[ -z "$PSQL_LIBS" ] || QT_LFLAGS_PSQL="$PSQL_LIBS"
if compileTest unix/psql "PostgreSQL" $QT_LFLAGS_PSQL $QT_CFLAGS_PSQL; then
if [ "$CFG_SQL_psql" = "auto" ]; then
CFG_SQL_psql=plugin
fi
else
if [ "$CFG_SQL_psql" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "PostgreSQL support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_psql=no
QT_CFLAGS_PSQL=""
QT_LFLAGS_PSQL=""
fi
fi
fi
;;
odbc)
if [ "$CFG_SQL_odbc" != "no" ]; then
if [ "$XPLATFORM_MAC" != "yes" ] && compileTest unix/odbc "ODBC"; then
if [ "$CFG_SQL_odbc" = "auto" ]; then
CFG_SQL_odbc=plugin
fi
else
if compileTest unix/iodbc "iODBC"; then
QT_LFLAGS_ODBC="-liodbc"
if [ "$CFG_SQL_odbc" = "auto" ]; then
CFG_SQL_odbc=plugin
fi
else
if [ "$CFG_SQL_odbc" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "ODBC support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_odbc=no
fi
fi
fi
fi
;;
oci)
if [ "$CFG_SQL_oci" != "no" ]; then
if compileTest unix/oci "OCI"; then
if [ "$CFG_SQL_oci" = "auto" ]; then
CFG_SQL_oci=plugin
fi
else
if [ "$CFG_SQL_oci" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Oracle (OCI) support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_oci=no
fi
fi
fi
;;
tds)
if [ "$CFG_SQL_tds" != "no" ]; then
[ -z "$SYBASE" ] || QT_LFLAGS_TDS="-L$SYBASE/lib"
[ -z "$SYBASE_LIBS" ] || QT_LFLAGS_TDS="$QT_LFLAGS_TDS $SYBASE_LIBS"
if compileTest unix/tds "TDS" $QT_LFLAGS_TDS; then
if [ "$CFG_SQL_tds" = "auto" ]; then
CFG_SQL_tds=plugin
fi
else
if [ "$CFG_SQL_tds" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "TDS support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_tds=no
fi
fi
fi
;;
db2)
if [ "$CFG_SQL_db2" != "no" ]; then
if compileTest unix/db2 "DB2"; then
if [ "$CFG_SQL_db2" = "auto" ]; then
CFG_SQL_db2=plugin
fi
else
if [ "$CFG_SQL_db2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "ODBC support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_db2=no
fi
fi
fi
;;
ibase)
if [ "$CFG_SQL_ibase" != "no" ]; then
if compileTest unix/ibase "InterBase"; then
if [ "$CFG_SQL_ibase" = "auto" ]; then
CFG_SQL_ibase=plugin
fi
else
if [ "$CFG_SQL_ibase" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "InterBase support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_ibase=no
fi
fi
fi
;;
sqlite2)
if [ "$CFG_SQL_sqlite2" != "no" ]; then
if compileTest unix/sqlite2 "SQLite2"; then
if [ "$CFG_SQL_sqlite2" = "auto" ]; then
CFG_SQL_sqlite2=plugin
fi
else
if [ "$CFG_SQL_sqlite2" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "SQLite2 support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_SQL_sqlite2=no
fi
fi
fi
;;
sqlite)
if [ "$CFG_SQL_sqlite" != "no" ]; then
SQLITE_AUTODETECT_FAILED="no"
if [ "$CFG_SQLITE" = "system" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists sqlite3 2>/dev/null; then
QT_CFLAGS_SQLITE=`$PKG_CONFIG --cflags sqlite3 2>/dev/null`
QT_LFLAGS_SQLITE=`$PKG_CONFIG --libs sqlite3 2>/dev/null`
else
QT_CFLAGS_SQLITE=
QT_LFLAGS_SQLITE="-lsqlite3 -lz"
fi
if compileTest unix/sqlite "SQLite" $QT_LFLAGS_SQLITE $QT_CFLAGS_SQLITE; then
if [ "$CFG_SQL_sqlite" = "auto" ]; then
CFG_SQL_sqlite=plugin
fi
QMAKE_CONFIG="$QMAKE_CONFIG system-sqlite"
else
SQLITE_AUTODETECT_FAILED="yes"
CFG_SQL_sqlite=no
fi
elif [ -f "$relpath/src/3rdparty/sqlite/sqlite3.h" ]; then
if [ "$CFG_SQL_sqlite" = "auto" ]; then
CFG_SQL_sqlite=plugin
fi
else
SQLITE_AUTODETECT_FAILED="yes"
CFG_SQL_sqlite=no
fi
if [ "$SQLITE_AUTODETECT_FAILED" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "SQLite support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
fi
fi
;;
*)
if [ "$OPT_VERBOSE" = "yes" ]; then
echo "unknown SQL driver: $_SQLDR"
fi
;;
esac
done
# auto-detect CUPS support
if [ "$CFG_CUPS" != "no" ]; then
if compileTest unix/cups "Cups"; then
CFG_CUPS=yes
else
if [ "$CFG_CUPS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Cups support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_CUPS=no
fi
fi
fi
# auto-detect iconv(3) support
if [ "$CFG_ICONV" != "no" ]; then
if [ "$XPLATFORM_MINGW" = "yes" ]; then
CFG_ICONV=no
elif compileTest unix/iconv "POSIX iconv"; then
CFG_ICONV=yes
elif compileTest unix/sun-libiconv "SUN libiconv"; then
CFG_ICONV=sun
elif compileTest unix/gnu-libiconv "GNU libiconv"; then
CFG_ICONV=gnu
else
if [ "$CFG_ICONV" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Iconv support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_ICONV=no
fi
fi
fi
# auto-detect libdbus-1 support
# auto: detect if libdbus-1 is present; if so, link to it
# linked: fail if libdbus-1 is not present; otherwise link to it
# runtime: no detection (cannot fail), load libdbus-1 at runtime
if [ "$CFG_DBUS" = "auto" ] || [ "$CFG_DBUS" = "linked" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
QT_CFLAGS_DBUS=`$PKG_CONFIG --cflags dbus-1 2>/dev/null`
QT_LIBS_DBUS=`$PKG_CONFIG --libs dbus-1 2>/dev/null`
else
QT_LIBS_DBUS="-ldbus-1"
fi
if compileTest unix/dbus "D-Bus" $QT_CFLAGS_DBUS $QT_LIBS_DBUS; then
QMakeVar set QT_LIBS_DBUS "$QT_LIBS_DBUS"
QMakeVar set QT_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
# Try find correct host configuration for dbus tools when cross-compiling
if [ "$QT_CROSS_COMPILE" = "yes" ] && env -i PATH="$PATH" \
pkg-config --atleast-version="$MIN_DBUS_1_VERSION" dbus-1 2>/dev/null; then
QT_CFLAGS_DBUS=`env -i PATH="$PATH" pkg-config --cflags dbus-1 2>/dev/null`
fi
QMakeVar set QT_HOST_CFLAGS_DBUS "$QT_CFLAGS_DBUS"
CFG_DBUS=linked
else
# Failed to compile the test, so it's an error if CFG_DBUS is "linked"
if [ "$CFG_DBUS" = "linked" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "The Qt D-Bus module cannot be enabled because libdbus-1 version $MIN_DBUS_1_VERSION was not found."
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
# CFG_DBUS is "auto" here
CFG_DBUS=runtime
fi
fi
fi
# auto-detect libproxy support
if [ "$CFG_LIBPROXY" != "no" ]; then
if compileTest common/libproxy "libproxy"; then
CFG_LIBPROXY=yes
else
if [ "$CFG_LIBPROXY" = "auto" ]; then
CFG_LIBPROXY=no
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
# CFG_LIBPROXY is "yes" here
echo "The libproxy support cannot be enabled because libproxy was not found."
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
fi
fi
fi
# auto-detect Glib support
if [ "$CFG_GLIB" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_GLIB=`$PKG_CONFIG --cflags glib-2.0 gthread-2.0 2>/dev/null`
QT_LIBS_GLIB=`$PKG_CONFIG --libs glib-2.0 gthread-2.0 2>/dev/null`
fi
if compileTest unix/glib "Glib" $QT_CFLAGS_GLIB $QT_LIBS_GLIB; then
CFG_GLIB=yes
QMakeVar set QT_CFLAGS_GLIB "$QT_CFLAGS_GLIB"
QMakeVar set QT_LIBS_GLIB "$QT_LIBS_GLIB"
else
if [ "$CFG_GLIB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Glib support cannot be enabled due to functionality tests!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_GLIB=no
fi
fi
fi
# auto-detect GTK style support
if [ "$CFG_GLIB" = "yes" -a "$CFG_GTK" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_QGTK3=`$PKG_CONFIG --cflags gtk+-3.0 2>/dev/null`
QT_LIBS_QGTK3=`$PKG_CONFIG --libs gtk+-3.0 2>/dev/null`
QT_LIBS_QGOBJECT=`$PKG_CONFIG --libs gobject-2.0 2>/dev/null`
fi
if [ -n "$QT_CFLAGS_QGTK3" ] ; then
CFG_GTK=yes
QT_CONFIG="$QT_CONFIG gtk3"
QMakeVar set QT_CFLAGS_QGTK3 "$QT_CFLAGS_QGTK3"
QMakeVar set QT_LIBS_QGTK3 "$QT_LIBS_QGTK3"
else
if [ "$CFG_GTK" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "GTK theme support cannot be enabled due to functionality tests!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_GTK=no
fi
fi
elif [ "$CFG_GLIB" = "no" ]; then
CFG_GTK=no
fi
# auto-detect libicu support
if [ "$CFG_ICU" != "no" ]; then
if compileTest unix/icu "ICU"; then
[ "$CFG_ICU" = "auto" ] && CFG_ICU=yes
else
if [ "$CFG_ICU" = "auto" ]; then
CFG_ICU=no
elif [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
# CFG_ICU is "yes"
echo "The ICU library support cannot be enabled."
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
fi
fi
fi
# Auto-detect PulseAudio support
if [ "$CFG_PULSEAUDIO" != "no" ]; then
if [ -n "$PKG_CONFIG" ]; then
QT_CFLAGS_PULSEAUDIO=`$PKG_CONFIG --cflags libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
QT_LIBS_PULSEAUDIO=`$PKG_CONFIG --libs libpulse '>=' 0.9.10 libpulse-mainloop-glib 2>/dev/null`
fi
if compileTest unix/pulseaudio "PulseAudio" $QT_CFLAGS_PULSEAUDIO $QT_LIBS_PULSEAUDIO; then
CFG_PULSEAUDIO=yes
QMakeVar set QT_CFLAGS_PULSEAUDIO "$QT_CFLAGS_PULSEAUDIO"
QMakeVar set QT_LIBS_PULSEAUDIO "$QT_LIBS_PULSEAUDIO"
else
if [ "$CFG_PULSEAUDIO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "PulseAudio support cannot be enabled due to functionality tests!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_PULSEAUDIO=no
fi
fi
fi
# X11/MINGW OpenGL
if [ "$XPLATFORM_MINGW" = "yes" ]; then
# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_GUI" = "no" ]; then
if [ "$CFG_OPENGL" = "auto" ]; then
CFG_OPENGL=no
fi
if [ "$CFG_OPENGL" != "no" ]; then
echo "OpenGL enabled, but GUI disabled."
echo " You might need to either enable the GUI or disable OpenGL"
exit 1
fi
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
CFG_OPENGL=desktop
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
echo "All the OpenGL functionality tests failed!"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
echo " ${XQMAKESPEC}."
exit 1
fi
CFG_OPENGL=no
fi
case "$PLATFORM" in
hpux*)
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
if [ "$CFG_OPENGL" = "desktop" ]; then
compileTest x11/glxfbconfig "OpenGL"
if [ $? != "0" ]; then
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
fi
fi
;;
*)
;;
esac
elif [ "$CFG_OPENGL" = "es2" ]; then
#OpenGL ES 2.0
compileTest unix/opengles2 "OpenGL ES 2.0"
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
echo " ${XQMAKESPEC}."
exit 1
fi
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
if [ $? != "0" ]; then
echo "The OpenGL functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
echo " ${XQMAKESPEC}."
exit 1
fi
case "$PLATFORM" in
hpux*)
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
compileTest x11/glxfbconfig "OpenGL"
if [ $? != "0" ]; then
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
fi
;;
*)
;;
esac
fi
fi # X11/MINGW OpenGL
if [ "$XPLATFORM_MAC" = "yes" ]; then
if [ "$CFG_COREWLAN" = "auto" ]; then
if compileTest mac/corewlan "CoreWlan"; then
CFG_COREWLAN=yes
else
CFG_COREWLAN=no
fi
fi
fi
# auto-detect OpenGL support (es2 = OpenGL ES 2.0 or higher)
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL; then
CFG_OPENGL=desktop
elif compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2; then
CFG_OPENGL=es2
else
if [ "$CFG_OPENGL" = "yes" ]; then
echo "All the OpenGL functionality tests failed!"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
echo " ${XQMAKESPEC}."
exit 1
fi
CFG_OPENGL=no
fi
elif [ "$CFG_OPENGL" = "es2" ]; then
#OpenGL ES 2.0
compileTestWithPkgConfig glesv2 unix/opengles2 "OpenGL ES 2.0" OPENGL_ES2
if [ $? != "0" ]; then
echo "The OpenGL ES 2.0 functionality test failed!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL_ES2, QMAKE_LIBDIR_OPENGL_ES2 and QMAKE_LIBS_OPENGL_ES2 in"
echo " ${XQMAKESPEC}."
exit 1
fi
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTestWithPkgConfig gl unix/opengldesktop "OpenGL" OPENGL
if [ $? != "0" ]; then
echo "The OpenGL functionality test failed!"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
echo " ${XQMAKESPEC}."
exit 1
fi
fi
# If OpenGL ES 2.0 is enabled, check for 3.0 and higher. This is used to allow
# compile-time differentiation and including the version specific (but backwards
# compatible) ES headers (for example, GLES3/gl31.h). Other than that, there is
# no difference in the configuration, even the library is the same.
if [ "$CFG_OPENGL" = "es2" ] && [ "$CFG_OPENGLES3" = "yes" ]; then
if compileTestWithPkgConfig glesv2 unix/opengles3 "OpenGL ES 3.0" ""; then
# Add a define for ES3, in addition to ES and ES2.
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3"
fi
if compileTestWithPkgConfig glesv2 unix/opengles31 "OpenGL ES 3.1" ""; then
# Add a define for ES31.
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES_3_1"
fi
fi
# auto-detect FontConfig support
ORIG_CFG_FREETYPE="$CFG_FREETYPE"
if [ "$CFG_FONTCONFIG" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists fontconfig --exists freetype2 2>/dev/null; then
QT_CFLAGS_FONTCONFIG=`$PKG_CONFIG --cflags fontconfig --cflags freetype2 2>/dev/null`
QT_LIBS_FONTCONFIG=`$PKG_CONFIG --libs fontconfig --libs freetype2 2>/dev/null`
else
QT_CFLAGS_FONTCONFIG=
QT_LIBS_FONTCONFIG="-lfreetype -lfontconfig"
fi
if compileTest unix/fontconfig "FontConfig" $QT_CFLAGS_FONTCONFIG $QT_LIBS_FONTCONFIG; then
QT_CONFIG="$QT_CONFIG fontconfig"
QMakeVar set QMAKE_CFLAGS_FONTCONFIG "$QT_CFLAGS_FONTCONFIG"
QMakeVar set QMAKE_LIBS_FONTCONFIG "$QT_LIBS_FONTCONFIG"
CFG_FONTCONFIG=yes
CFG_FREETYPE=system
else
CFG_FONTCONFIG=no
fi
fi
# Save these for a check later
ORIG_CFG_XCB="$CFG_XCB"
ORIG_CFG_EGLFS="$CFG_EGLFS"
ORIG_CFG_DIRECTFB="$CFG_DIRECTFB"
ORIG_CFG_LINUXFB="$CFG_LINUXFB"
ORIG_CFG_MIRCLIENT="$CFG_MIRCLIENT"
if [ "$CFG_LIBUDEV" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libudev 2>/dev/null; then
QMAKE_INCDIR_LIBUDEV=`$PKG_CONFIG --cflags-only-I libudev 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_LIBUDEV=`$PKG_CONFIG --libs libudev 2>/dev/null`
QMAKE_CFLAGS_LIBUDEV=`$PKG_CONFIG --cflags libudev 2>/dev/null`
QMakeVar set QMAKE_INCDIR_LIBUDEV "$QMAKE_INCDIR_LIBUDEV"
QMakeVar set QMAKE_LIBS_LIBUDEV "$QMAKE_LIBS_LIBUDEV"
fi
if compileTest unix/libudev "libudev" $QMAKE_CFLAGS_LIBUDEV $QMAKE_LIBS_LIBUDEV; then
CFG_LIBUDEV=yes
QT_CONFIG="$QT_CONFIG libudev"
elif [ "$CFG_LIBUDEV" = "yes" ]; then
echo "The libudev functionality test failed!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
exit 1
else
CFG_LIBUDEV=no
fi
fi
if [ "$CFG_LIBUDEV" = "no" ]; then
QMakeVar add DEFINES QT_NO_LIBUDEV
fi
if [ "$CFG_EVDEV" != "no" ]; then
if compileTest unix/evdev "evdev"; then
CFG_EVDEV=yes
QT_CONFIG="$QT_CONFIG evdev"
elif [ "$CFG_EVDEV" = "yes" ]; then
echo "The evdev functionality test failed!"
exit 1
else
CFG_EVDEV=no
fi
fi
if [ "$CFG_EVDEV" = "no" ]; then
QMakeVar add DEFINES QT_NO_EVDEV
fi
if [ "$CFG_TSLIB" != "no" ]; then
if compileTest unix/tslib "tslib"; then
CFG_TSLIB=yes
QT_CONFIG="$QT_CONFIG tslib"
elif [ "$CFG_TSLIB" = "yes" ]; then
echo "The tslib functionality test failed!"
exit 1
else
CFG_TSLIB=no
fi
fi
if [ "$CFG_TSLIB" = "no" ]; then
QMakeVar add DEFINES QT_NO_TSLIB
fi
if [ "$CFG_XKBCOMMON_EVDEV" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xkbcommon 2>/dev/null; then
QMAKE_INCDIR_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags-only-I xkbcommon 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_XKBCOMMON_EVDEV=`$PKG_CONFIG --libs xkbcommon 2>/dev/null`
QMAKE_CFLAGS_XKBCOMMON_EVDEV=`$PKG_CONFIG --cflags xkbcommon 2>/dev/null`
QMakeVar set QMAKE_INCDIR_XKBCOMMON_EVDEV "$QMAKE_INCDIR_XKBCOMMON_EVDEV"
QMakeVar set QMAKE_LIBS_XKBCOMMON_EVDEV "$QMAKE_LIBS_XKBCOMMON_EVDEV"
fi
if compileTest unix/xkbcommon "xkbcommon" $QMAKE_CFLAGS_XKBCOMMON_EVDEV $QMAKE_LIBS_XKBCOMMON_EVDEV; then
CFG_XKBCOMMON_EVDEV=yes
QT_CONFIG="$QT_CONFIG xkbcommon-evdev"
elif [ "$CFG_XKBCOMMON_EVDEV" = "yes" ]; then
echo "The xkbcommon-evdev functionality test failed!"
exit 1
else
CFG_XKBCOMMON_EVDEV=no
fi
fi
if [ "$CFG_LIBINPUT" != "no" ] && [ "$CFG_LIBUDEV" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists libinput 2>/dev/null; then
QMAKE_INCDIR_LIBINPUT=`$PKG_CONFIG --cflags-only-I libinput 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_LIBINPUT=`$PKG_CONFIG --libs libinput 2>/dev/null`
QMAKE_CFLAGS_LIBINPUT=`$PKG_CONFIG --cflags libinput 2>/dev/null`
QMAKE_LIBINPUT_VERSION_MAJOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 1`
QMAKE_LIBINPUT_VERSION_MINOR=`$PKG_CONFIG --modversion libinput 2>/dev/null | cut -d . -f 2`
QMakeVar set QMAKE_LIBINPUT_VERSION_MAJOR "$QMAKE_LIBINPUT_VERSION_MAJOR"
QMakeVar set QMAKE_LIBINPUT_VERSION_MINOR "$QMAKE_LIBINPUT_VERSION_MINOR"
QMakeVar set QMAKE_INCDIR_LIBINPUT "$QMAKE_INCDIR_LIBINPUT"
QMakeVar set QMAKE_LIBS_LIBINPUT "$QMAKE_LIBS_LIBINPUT"
fi
if compileTest unix/libinput "libinput" $QMAKE_CFLAGS_LIBINPUT $QMAKE_LIBS_LIBINPUT; then
CFG_LIBINPUT=yes
QT_CONFIG="$QT_CONFIG libinput"
elif [ "$CFG_LIBINPUT" = "yes" ]; then
echo "The libinput functionality test failed!"
exit 1
else
CFG_LIBINPUT=no
fi
else
CFG_LIBINPUT=no
fi
if [ "$CFG_LIBINPUT" = "no" ]; then
QMakeVar add DEFINES QT_NO_LIBINPUT
fi
# Check we actually have X11 :-)
if compileTest x11/xlib "XLib"; then
QT_CONFIG="$QT_CONFIG xlib"
fi
# auto-detect Xrender support
if [ "$CFG_XRENDER" != "no" ]; then
if compileTest x11/xrender "Xrender"; then
CFG_XRENDER=yes
QT_CONFIG="$QT_CONFIG xrender"
else
if [ "$CFG_XRENDER" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "Xrender support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_XRENDER=no
fi
fi
fi
# auto-detect XInput2 support
if [ "$CFG_XINPUT2" != "no" ]; then
if compileTest x11/xinput2 "XInput2"; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists xi 2>/dev/null; then
QMAKE_LIBXI_VERSION_MAJOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 1`
QMAKE_LIBXI_VERSION_MINOR=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 2`
QMAKE_LIBXI_VERSION_PATCH=`$PKG_CONFIG --modversion xi 2>/dev/null | cut -d . -f 3`
QMakeVar set QMAKE_LIBXI_VERSION_MAJOR "$QMAKE_LIBXI_VERSION_MAJOR"
QMakeVar set QMAKE_LIBXI_VERSION_MINOR "$QMAKE_LIBXI_VERSION_MINOR"
QMakeVar set QMAKE_LIBXI_VERSION_PATCH "$QMAKE_LIBXI_VERSION_PATCH"
fi
CFG_XINPUT2=yes
else
if [ "$CFG_XINPUT2" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "XInput2 support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_XINPUT2=no
fi
fi
fi
if [ "$CFG_XCB" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags xcb 2>/dev/null`"
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs xcb 2>/dev/null`"
fi
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "x11" 2> /dev/null; then
QMAKE_X11_PREFIX="`$PKG_CONFIG --variable=prefix x11`"
else
# default to LSB prefix
QMAKE_X11_PREFIX="/usr"
fi
QMakeVar set QMAKE_X11_PREFIX "$QMAKE_X11_PREFIX"
if [ "$CFG_XKBCOMMON" != no ] && compileTest qpa/xcb "xcb" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
QT_CONFIG="$QT_CONFIG xcb-plugin"
if [ "$CFG_XCB" = "qt" ]; then
QT_CONFIG="$QT_CONFIG xcb-qt"
if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
CFG_XCB_GLX=yes
QT_CONFIG="$QT_CONFIG xcb-glx"
fi
else
CFG_XCB="system"
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xcb >= 1.5" 2>/dev/null; then
XCB_PACKAGES="xcb xcb-shm xcb-sync xcb-xfixes xcb-randr xcb-image xcb-keysyms xcb-icccm xcb-shape"
QMAKE_CFLAGS_XCB="`$PKG_CONFIG --cflags $XCB_PACKAGES 2>/dev/null`"
QMAKE_LIBS_XCB="`$PKG_CONFIG --libs $XCB_PACKAGES 2>/dev/null`"
fi
# libxcb version 1.10 was the first version that enables xcb-xkb by default,
# therefore the minimal xcb-xkb version we support is 1.10
CFG_XKB=no
if $PKG_CONFIG --exists "xcb-xkb >= 1.10" 2>/dev/null; then
QMAKE_CFLAGS_XKB="`$PKG_CONFIG --cflags xcb xcb-xkb 2>/dev/null`"
QMAKE_LIBS_XKB="`$PKG_CONFIG --libs xcb xcb-xkb 2>/dev/null`"
if compileTest qpa/xcb-xkb "xcb-xkb" $QMAKE_CFLAGS_XKB $QMAKE_LIBS_XKB; then
CFG_XKB=yes
fi
fi
if [ "$CFG_XKB" = "no" ]; then
QMakeVar add DEFINES QT_NO_XKB
fi
if compileTest qpa/xcb-syslibs "xcb-syslibs" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
if compileTest qpa/xcb-render "xcb-render" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
QT_CONFIG="$QT_CONFIG xcb-render"
fi
if compileTest qpa/xcb-glx "xcb-glx" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
CFG_XCB_GLX=yes
QT_CONFIG="$QT_CONFIG xcb-glx"
fi
else
echo "The test for linking against libxcb and support libraries failed!"
echo " You might need to install dependency packages, or pass -qt-xcb."
echo " See src/plugins/platforms/xcb/README."
exit 1
fi
fi
if [ "$CFG_XCB_XLIB" != "no" ]; then
if compileTest qpa/xcb-xlib "xcb-xlib" $QMAKE_CFLAGS_XCB $QMAKE_LIBS_XCB; then
QT_CONFIG="$QT_CONFIG xcb-xlib"
CFG_XCB_XLIB=yes
else
CFG_XCB_XLIB=no
fi
fi
if [ "$CFG_SM" != "no" ] && [ -n "$PKG_CONFIG" ]; then
if $PKG_CONFIG --exists "sm" 2>/dev/null && $PKG_CONFIG --exists "ice" 2>/dev/null; then
QT_CONFIG="$QT_CONFIG xcb-sm"
fi
fi
else
if [ "$CFG_XCB" != "auto" ]; then
echo "The test for linking against libxcb failed!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " You might need to install dependency packages for libxcb."
echo " See src/plugins/platforms/xcb/README."
exit 1
fi
CFG_XCB=no
fi
fi
if [ "$CFG_DIRECTFB" != "no" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists directfb 2>/dev/null; then
QMAKE_CFLAGS_DIRECTFB=`$PKG_CONFIG --cflags directfb 2>/dev/null`
QMAKE_LIBS_DIRECTFB=`$PKG_CONFIG --libs directfb 2>/dev/null`
if compileTest qpa/directfb "DirectFB" $QMAKE_CFLAGS_DIRECTFB $QMAKE_LIBS_DIRECTFB; then
CFG_DIRECTFB=yes
elif [ "$CFG_DIRECTFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " DirectFB support cannot be enabled due to functionality tests!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_DIRECTFB=no
fi
else
CFG_DIRECTFB=no
fi
fi
if [ "$CFG_GBM" != "no" ]; then
if compileTest qpa/gbm "GBM"; then
CFG_GBM=yes
elif [ "$CFG_GBM" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " GBM support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_GBM=no
fi
fi
if [ "$CFG_LINUXFB" != "no" ]; then
if compileTest qpa/linuxfb "LinuxFB"; then
CFG_LINUXFB=yes
elif [ "$CFG_LINUXFB" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " Linux Framebuffer support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_LINUXFB=no
fi
fi
if [ "$CFG_KMS" != "no" ]; then
if compileTest qpa/kms "KMS"; then
CFG_KMS=yes
elif [ "$CFG_KMS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " KMS support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_KMS=no
fi
fi
if [ "$CFG_MIRCLIENT" != "no" ]; then
if compileTest qpa/mirclient "Mir client"; then
CFG_MIRCLIENT=yes
elif [ "$CFG_MIRCLIENT" = "yes" ]; then
echo " Mir client support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_MIRCLIENT=no
fi
fi
# Detect libxkbcommon
MIN_REQ_XKBCOMMON="0.4.1"
# currently only xcb platform plugin supports building xkbcommon
if [ "$CFG_XCB" != "no" ]; then
if [ "$CFG_XKBCOMMON" != "no" ] && [ "$CFG_XKBCOMMON" != "qt" ]; then
# Check if there is a suitable system-wide xkbcommon
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkbcommon xkbcommon-x11 >= $MIN_REQ_XKBCOMMON" 2>/dev/null; then
QMAKE_CFLAGS_XKBCOMMON="`$PKG_CONFIG --cflags xkbcommon xkbcommon-x11 2>/dev/null`"
QMAKE_LIBS_XKBCOMMON="`$PKG_CONFIG --libs xkbcommon xkbcommon-x11 2>/dev/null`"
QMakeVar set QMAKE_CFLAGS_XKBCOMMON "$QMAKE_CFLAGS_XKBCOMMON"
QMakeVar set QMAKE_LIBS_XKBCOMMON "$QMAKE_LIBS_XKBCOMMON"
CFG_XKBCOMMON=system
elif [ "$CFG_XKBCOMMON" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " xkbcommon support cannot be enabled because either xkbcommon or "
echo " xkbcommon-x11 >= $MIN_REQ_XKBCOMMON was not found via pkg-config!"
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
# use the bundled version instead
CFG_XKBCOMMON=qt
fi
fi
if [ "$CFG_XKBCOMMON" = "qt" ]; then
QT_CONFIG="$QT_CONFIG xkbcommon-qt"
# detect XKB config root
if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists "xkeyboard-config" 2> /dev/null; then
CFG_XKB_CONFIG_ROOT="`$PKG_CONFIG --variable=xkb_base xkeyboard-config`"
else
# search for xkb configs in most probable locations
if [ -d "/usr/share/X11/xkb" ]; then
# Linux
CFG_XKB_CONFIG_ROOT="/usr/share/X11/xkb"
elif [ -d "/usr/local/share/X11/xkb" ]; then
# BSD UNIX
CFG_XKB_CONFIG_ROOT="/usr/local/share/X11/xkb"
fi
fi
fi
QMakeVar set QMAKE_XKB_CONFIG_ROOT "$CFG_XKB_CONFIG_ROOT"
if [ "$CFG_XKB_CONFIG_ROOT" = "auto" ]; then
CFG_XKB_CONFIG_ROOT="not found"
fi
fi
else
CFG_XKBCOMMON=no
fi
# EGL Support
if [ "$CFG_EGL" != "no" ]; then
if [ "$CFG_EGL" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
echo "EGL support was requested but OpenGL support is disabled."
echo "Either disable EGL support or enable OpenGL support."
exit 101
fi
if [ -n "$PKG_CONFIG" ] && $PKG_CONFIG --exists egl 2>/dev/null; then
QMAKE_INCDIR_EGL=`$PKG_CONFIG --cflags-only-I egl 2>/dev/null | sed -e 's,^-I,,g' -e 's, -I, ,g'`
QMAKE_LIBS_EGL=`$PKG_CONFIG --libs egl 2>/dev/null`
QMAKE_CFLAGS_EGL=`$PKG_CONFIG --cflags egl 2>/dev/null`
QMakeVar set QMAKE_INCDIR_EGL "$QMAKE_INCDIR_EGL"
QMakeVar set QMAKE_LIBS_EGL "$QMAKE_LIBS_EGL"
QMakeVar set QMAKE_CFLAGS_EGL "`echo " $QMAKE_CFLAGS_EGL " | sed -e 's, -I[^ ]* , ,g;s,^ ,,;s, $,,'`"
fi # detect EGL support
if compileTest qpa/egl "EGL" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
CFG_EGL=yes
if compileTest qpa/egl-x11 "EGL-X11" $QMAKE_CFLAGS_EGL $QMAKE_LIBS_EGL; then
CFG_EGL_X=yes
else
CFG_EGL_X=no
fi
elif [ "$CFG_EGL" = "yes" ]; then
echo " The EGL functionality test failed; EGL is required by some QPA plugins to manage contexts & surfaces."
[ -z "$PKG_CONFIG" ] && echo " Use of pkg-config is not enabled, maybe you want to pass -pkg-config?"
echo " You might need to modify the include and library search paths by editing"
echo " QMAKE_INCDIR_EGL, QMAKE_LIBDIR_EGL and QMAKE_LIBS_EGL in ${XQMAKESPEC}."
exit 1
else
CFG_EGL=no
CFG_EGL_X=no
fi
fi
if [ "$CFG_EGLFS" != "no" ]; then
if [ "$XPLATFORM_QNX" = "no" ] && [ "$CFG_OPENGL" != "no" ]; then
CFG_EGLFS="$CFG_EGL"
# Detect eglfs backends.
if compileTest qpa/eglfs-brcm "eglfs-brcm"; then
CFG_EGLFS_BRCM=yes
else
CFG_EGLFS_BRCM=no
fi
if compileTest qpa/eglfs-egldevice "eglfs-egldevice"; then
CFG_EGLFS_EGLDEVICE=yes
else
CFG_EGLFS_EGLDEVICE=no
fi
if compileTest qpa/eglfs-mali "eglfs-mali" \
|| compileTest qpa/eglfs-mali-2 "eglfs-mali-2"; then
CFG_EGLFS_MALI=yes
else
CFG_EGLFS_MALI=no
fi
if compileTest qpa/eglfs-viv "eglfs-viv"; then
CFG_EGLFS_VIV=yes
else
CFG_EGLFS_VIV=no
fi
if [ "$CFG_EGLFS_VIV" = "yes" ] && compileTest qpa/wayland-server "wayland-server"; then
CFG_EGLFS_VIV_WL=yes
else
CFG_EGLFS_VIV_WL=no
fi
else
CFG_EGLFS="no"
fi
fi
# Detect accessibility support
if [ "$CFG_ACCESSIBILITY" = "no" ]; then
echo >&2 "Warning: Disabling Accessibility. This version of Qt is unsupported."
else
CFG_ACCESSIBILITY=yes
# linux/xcb accessibility bridge needs dbus
if [ "$CFG_XCB" != "no" ]; then
if [ "$CFG_DBUS" != "no" ]; then
CFG_ACCESSIBILITY_ATSPI_BRIDGE=yes
QT_CONFIG="$QT_CONFIG accessibility-atspi-bridge"
else
echo >&2 "Warning: Disabling Linux Accessibility Bridge: DBus is missing."
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY_ATSPI_BRIDGE"
fi
fi
fi
# Determine the default QPA platform
if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
# check the mkspec
QT_QPA_DEFAULT_PLATFORM=`getXQMakeConf QT_QPA_DEFAULT_PLATFORM`
if [ -z "$QT_QPA_DEFAULT_PLATFORM" ]; then
if [ "$XPLATFORM_MINGW" = "yes" ]; then
QT_QPA_DEFAULT_PLATFORM="windows"
elif [ "$XPLATFORM_MAC" = "yes" ]; then
QT_QPA_DEFAULT_PLATFORM="cocoa"
elif [ "$UNAME_SYSTEM" = "QNX" ]; then
QT_QPA_DEFAULT_PLATFORM="qnx"
elif [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
QT_QPA_DEFAULT_PLATFORM="integrityfb"
else
QT_QPA_DEFAULT_PLATFORM="xcb"
fi
fi
fi
if [ -n "$QMAKE_CFLAGS_XCB" ] || [ -n "$QMAKE_LIBS_XCB" ]; then
QMakeVar set QMAKE_CFLAGS_XCB "$QMAKE_CFLAGS_XCB"
QMakeVar set QMAKE_LIBS_XCB "$QMAKE_LIBS_XCB"
fi
if [ "$CFG_DIRECTFB" = "yes" ]; then
QT_CONFIG="$QT_CONFIG directfb"
QMakeVar set QMAKE_CFLAGS_DIRECTFB "$QMAKE_CFLAGS_DIRECTFB"
QMakeVar set QMAKE_LIBS_DIRECTFB "$QMAKE_LIBS_DIRECTFB"
fi
if [ "$CFG_GBM" = "yes" ]; then
QT_CONFIG="$QT_CONFIG gbm"
fi
if [ "$CFG_LINUXFB" = "yes" ]; then
QT_CONFIG="$QT_CONFIG linuxfb"
fi
if [ "$CFG_INTEGRITYFB" = "yes" ]; then
QT_CONFIG="$QT_CONFIG integrityfb"
fi
if [ "$CFG_KMS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG kms"
fi
if [ "$CFG_MIRCLIENT" = "yes" ]; then
QT_CONFIG="$QT_CONFIG mirclient"
fi
if [ "$XPLATFORM_MAC" = "no" ] && [ "$XPLATFORM_MINGW" = "no" ] && [ "$XPLATFORM_QNX" = "no" ] && [ "$XPLATFORM_ANDROID" = "no" ] && [ "$XPLATFORM_HAIKU" = "no" ] && [ "$XPLATFORM_INTEGRITY" = "no" ]; then
if [ "$CFG_XCB" = "no" ] && [ "$CFG_EGLFS" = "no" ] && [ "$CFG_DIRECTFB" = "no" ] && [ "$CFG_LINUXFB" = "no" ] && [ "$CFG_MIRCLIENT" = "no" ]; then
if [ "$QPA_PLATFORM_GUARD" = "yes" ] &&
( [ "$ORIG_CFG_XCB" = "auto" ] || [ "$ORIG_CFG_EGLFS" = "auto" ] || [ "$ORIG_CFG_DIRECTFB" = "auto" ] || [ "$ORIG_CFG_LINUXFB" = "auto" ] || [ "$ORIG_CFG_MIRCLIENT" = "auto" ] ); then
echo "No QPA platform plugin enabled!"
echo " If you really want to build without a QPA platform plugin you must pass"
echo " -no-qpa-platform-guard to configure. Doing this will"
echo " produce a Qt that can not run GUI applications."
echo " The dependencies needed for xcb to build are listed in"
echo " src/plugins/platforms/xcb/README"
exit 1
fi
fi
fi
# double-conversion support
if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
if ! compileTest common/xlocalescanprint "XLocaleScanPrint"; then
echo "Your C library does not provide sscanf_l or snprintf_l."
echo "You need to use libdouble-conversion for double/string conversion."
exit 1
fi
elif [ "$CFG_DOUBLECONVERSION" != "qt" ]; then
if compileTest unix/doubleconversion "DoubleConversion"; then
CFG_DOUBLECONVERSION=system
elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then
echo "No system libdouble-conversion found."
exit 1
else
CFG_DOUBLECONVERSION=qt
fi
fi
# freetype support
[ "$XPLATFORM_MINGW" = "yes" ] && [ "$CFG_FREETYPE" = "auto" ] && CFG_FREETYPE=no
if [ "$CFG_FREETYPE" = "auto" ]; then
if compileTest unix/freetype "FreeType"; then
CFG_FREETYPE=system
else
CFG_FREETYPE=yes
fi
fi
# harfbuzz support
[ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_HARFBUZZ" = "auto" ] && CFG_HARFBUZZ=qt
if [ "$CFG_HARFBUZZ" = "auto" ] || [ "$CFG_HARFBUZZ" = "system" ]; then
if compileTest unix/harfbuzz "HarfBuzz"; then
CFG_HARFBUZZ=system
else
if [ "$CFG_HARFBUZZ" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo " HarfBuzz system library support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_HARFBUZZ=qt
fi
fi
fi
if [ "$XPLATFORM_MAC" = "yes" -a "$CFG_HARFBUZZ" != "qt" ]; then
echo
echo "WARNING: On OS X, AAT is supported only with -qt-harfbuzz."
echo
fi
if ! compileTest unix/stl "STL" &&
[ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "STL functionality check failed! Cannot build Qt with this STL library."
echo " Turn on verbose messaging (-v) to $0 to see the final report."
exit 101
fi
# detect POSIX clock_gettime()
if [ "$CFG_CLOCK_GETTIME" = "auto" ]; then
if compileTest unix/clock-gettime "POSIX clock_gettime()"; then
CFG_CLOCK_GETTIME=yes
else
CFG_CLOCK_GETTIME=no
fi
fi
# detect POSIX monotonic clocks
if [ "$CFG_CLOCK_GETTIME" = "yes" ] && [ "$CFG_CLOCK_MONOTONIC" = "auto" ]; then
if compileTest unix/clock-monotonic "POSIX Monotonic Clock"; then
CFG_CLOCK_MONOTONIC=yes
else
CFG_CLOCK_MONOTONIC=no
fi
elif [ "$CFG_CLOCK_GETTIME" = "no" ]; then
CFG_CLOCK_MONOTONIC=no
fi
# detect posix_fallocate
if [ "$CFG_POSIX_FALLOCATE" = "auto" ]; then
if compileTest unix/posix_fallocate "posix_fallocate"; then
CFG_POSIX_FALLOCATE=yes
else
CFG_POSIX_FALLOCATE=no
fi
fi
# detect mremap
if [ "$CFG_MREMAP" = "auto" ]; then
if compileTest unix/mremap "mremap"; then
CFG_MREMAP=yes
else
CFG_MREMAP=no
fi
fi
# find if the platform provides getaddrinfo (ipv6 dns lookups)
if [ "$CFG_GETADDRINFO" != "no" ]; then
if compileTest unix/getaddrinfo "getaddrinfo"; then
CFG_GETADDRINFO=yes
else
if [ "$CFG_GETADDRINFO" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "getaddrinfo support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_GETADDRINFO=no
fi
fi
fi
# find if the platform provides inotify
if [ "$CFG_INOTIFY" != "no" ]; then
if compileTest unix/inotify "inotify"; then
CFG_INOTIFY=yes
else
if [ "$CFG_INOTIFY" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "inotify support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_INOTIFY=no
fi
fi
fi
# find if the platform provides eventfd
if [ "$CFG_EVENTFD" != "no" ]; then
if compileTest unix/eventfd "eventfd"; then
CFG_EVENTFD=yes
else
if [ "$CFG_EVENTFD" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "eventfd support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_EVENTFD=no
fi
fi
fi
# find if the platform provides if_nametoindex (ipv6 interface name support)
if [ "$CFG_IPV6IFNAME" != "no" ]; then
if compileTest unix/ipv6ifname "IPv6 interface name"; then
CFG_IPV6IFNAME=yes
else
if [ "$CFG_IPV6IFNAME" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "IPv6 interface name support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_IPV6IFNAME=no
fi
fi
fi
# find if the platform provides getifaddrs (network interface enumeration)
if [ "$CFG_GETIFADDRS" != "no" ]; then
if compileTest unix/getifaddrs "getifaddrs"; then
CFG_GETIFADDRS=yes
else
if [ "$CFG_GETIFADDRS" = "yes" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "getifaddrs support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_GETIFADDRS=no
fi
fi
fi
# find if the platform provides thread-safe CLOEXEC support
if compileTest unix/cloexec "cloexec"; then
CFG_CLOEXEC=yes
fi
if compileTest unix/ppoll "ppoll"; then
CFG_POLL="ppoll"
elif compileTest unix/pollts "pollts"; then
CFG_POLL="pollts"
elif compileTest unix/poll "poll"; then
CFG_POLL="poll"
else
CFG_POLL="select"
fi
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_SECURETRANSPORT" != "no" ] && ([ "$CFG_OPENSSL" = "no" ] || [ "$CFG_OPENSSL" = "auto" ]); then
CFG_SECURETRANSPORT=yes
CFG_OPENSSL=no
else
CFG_SECURETRANSPORT=no
fi
# detect OpenSSL
if [ "$CFG_OPENSSL" != "no" ]; then
if compileTest unix/openssl "OpenSSL"; then
if [ "$CFG_OPENSSL" = "auto" ]; then
CFG_OPENSSL=yes
fi
else
if ( [ "$CFG_OPENSSL" = "yes" ] || [ "$CFG_OPENSSL" = "linked" ] ) && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "OpenSSL support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_OPENSSL=no
fi
fi
fi
# detect PCRE
if [ "$CFG_PCRE" != "qt" ]; then
if compileTest unix/pcre "PCRE"; then
CFG_PCRE=system
else
if [ "$CFG_PCRE" = "system" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "PCRE support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_PCRE=qt
fi
fi
fi
# detect OpenVG support
if [ "$CFG_OPENVG" != "no" ]; then
if compileTest unix/openvg "OpenVG"; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
elif compileTest unix/openvg "OpenVG" -config openvg_on_opengl; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
CFG_OPENVG_ON_OPENGL=yes
elif compileTest unix/openvg "OpenVG (lc includes)" -config lower_case_includes; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
CFG_OPENVG_LC_INCLUDES=yes
elif compileTest unix/openvg "OpenVG (lc includes)" -config "openvg_on_opengl lower_case_includes"; then
if [ "$CFG_OPENVG" = "auto" ]; then
CFG_OPENVG=yes
fi
CFG_OPENVG_LC_INCLUDES=yes
CFG_OPENVG_ON_OPENGL=yes
else
if [ "$CFG_OPENVG" != "auto" ] && [ "$CFG_CONFIGURE_EXIT_ON_ERROR" = "yes" ]; then
echo "$CFG_OPENVG was specified for OpenVG but cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
echo " If you believe this message is in error you may use the continue"
echo " switch (-continue) to $0 to continue."
exit 101
else
CFG_OPENVG=no
fi
fi
if [ "$CFG_OPENVG" = "yes" ] && compileTest unix/shivavg "ShivaVG"; then
CFG_OPENVG_SHIVA=yes
fi
fi
if [ "$CFG_ALSA" = "auto" ]; then
if compileTest unix/alsa "alsa"; then
CFG_ALSA=yes
else
CFG_ALSA=no
fi
fi
if [ "$CFG_AUDIO_BACKEND" = "auto" ]; then
CFG_AUDIO_BACKEND=yes
fi
# detect GStreamer support
if [ "$CFG_GSTREAMER" = "auto" ] || [ "$CFG_GSTREAMER" = "yes" ]; then
if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
CFG_GSTREAMER=yes
CFG_GSTREAMER_VERSION=1.0
elif compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
CFG_GSTREAMER=yes
CFG_GSTREAMER_VERSION=0.10
else
if [ "$CFG_GSTREAMER" = "yes" ]; then
echo "GStreamer support cannot be enabled due to functionality tests!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
exit 1
fi
CFG_GSTREAMER=no
fi
elif [ "$CFG_GSTREAMER" = "0.10" ]; then
if compileTest unix/gstreamer "GStreamer 0.10" -config gst-0.10; then
CFG_GSTREAMER=yes
CFG_GSTREAMER_VERSION=0.10
else
echo "The GStreamer 0.10 functionality test failed!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
exit 1
fi
elif [ "$CFG_GSTREAMER" = "1.0" ]; then
if compileTest unix/gstreamer "GStreamer 1.0" -config gst-1.0; then
CFG_GSTREAMER=yes
CFG_GSTREAMER_VERSION=1.0
else
echo "The GStreamer 1.0 functionality test failed!"
echo " Turn on verbose messaging (-v) to $0 to see the final report."
exit 1
fi
fi
if [ "$CFG_LARGEFILE" != "yes" ] && [ "$XPLATFORM_MINGW" = "yes" ]; then
echo "Warning: largefile support cannot be disabled for win32."
CFG_LARGEFILE="yes"
fi
# Detect DirectWrite 2 support on Windows
if [ "$CFG_DIRECTWRITE" = "no" ]; then
CFG_DIRECTWRITE2=no
fi
if [ "$CFG_DIRECTWRITE2" = "auto" ]; then
if compileTest win/directwrite2 "directwrite2"; then
CFG_DIRECTWRITE2=yes
else
CFG_DIRECTWRITE2=no
fi
fi
#-------------------------------------------------------------------------------
# ask for all that hasn't been auto-detected or specified in the arguments
#-------------------------------------------------------------------------------
# Set "c++11" unconditionally, as lots of code does contains(QT_CONFIG, c++11)
QT_CONFIG="$QT_CONFIG c++11"
if [ "$CFG_STDCXX" != "c++11" ]; then
QT_CONFIG="$QT_CONFIG c++14"
if [ "$CFG_STDCXX" != "c++14" ]; then
QT_CONFIG="$QT_CONFIG c++1z"
fi
fi
if [ "$CFG_ATOMIC64" = "libatomic" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG atomic64-libatomic"
fi
if [ "$CFG_SILENT" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG silent"
fi
# disable accessibility
if [ "$CFG_ACCESSIBILITY" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ACCESSIBILITY"
else
QT_CONFIG="$QT_CONFIG accessibility"
fi
# enable egl
if [ "$CFG_EGL" = "yes" ]; then
QT_CONFIG="$QT_CONFIG egl"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
fi
# enable egl on X
if [ "$CFG_EGL_X" = "yes" ]; then
QT_CONFIG="$QT_CONFIG egl_x11"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL_X11"
fi
# enable eglfs
if [ "$CFG_EGLFS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGLFS"
fi
# eglfs backends
if [ "$CFG_EGLFS_BRCM" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_brcm"
fi
if [ "$CFG_EGLFS_EGLDEVICE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_egldevice"
fi
if [ "$CFG_EGLFS" = "yes" ] && [ "$CFG_KMS" = "yes" ] && [ "$CFG_GBM" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_gbm"
CFG_EGLFS_GBM="yes"
else
CFG_EGLFS_GBM="no"
fi
if [ "$CFG_EGLFS_MALI" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_mali"
fi
if [ "$CFG_EGLFS_VIV" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_viv"
if [ "$CFG_EGLFS_VIV_WL" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs_viv_wl"
fi
fi
# enable openvg
if [ "$CFG_OPENVG" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENVG"
else
QT_CONFIG="$QT_CONFIG openvg"
if [ "$CFG_OPENVG_LC_INCLUDES" = "yes" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LOWER_CASE_VG_INCLUDES"
fi
if [ "$CFG_OPENVG_ON_OPENGL" = "yes" ]; then
QT_CONFIG="$QT_CONFIG openvg_on_opengl"
fi
if [ "$CFG_OPENVG_SHIVA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shivavg"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SHIVAVG"
fi
fi
# enable opengl
if [ "$CFG_OPENGL" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENGL"
else
QT_CONFIG="$QT_CONFIG opengl"
fi
if [ "$CFG_OPENGL" = "es2" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
QT_CONFIG="$QT_CONFIG opengles2"
fi
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
elif [ "$CFG_SHARED" = "no" ]; then
QT_CONFIG="$QT_CONFIG static"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG static"
fi
#FIXME: qpa is implicit this should all be removed
QMAKE_CONFIG="$QMAKE_CONFIG qpa"
QT_CONFIG="$QT_CONFIG qpa"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qpa"
if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG largefile"
fi
if [ "$CFG_USE_GNUMAKE" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG GNUmake"
fi
[ "$CFG_REDUCE_EXPORTS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_exports"
[ "$CFG_STACK_PROTECTOR_STRONG" = "yes" ] && QT_CONFIG="$QT_CONFIG stack-protector-strong"
[ "$CFG_REDUCE_RELOCATIONS" = "yes" ] && QT_CONFIG="$QT_CONFIG reduce_relocations"
[ "$CFG_STRIP" = "no" ] && QMAKE_CONFIG="$QMAKE_CONFIG nostrip"
if testXConfig precompile_header; then
[ "$CFG_PRECOMPILE" = "no" ] && QMakeVar del CONFIG precompile_header
else
[ "$CFG_PRECOMPILE" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG precompile_header"
fi
[ "$CFG_USE_GOLD_LINKER" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG use_gold_linker"
[ "$CFG_ENABLE_NEW_DTAGS" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG enable_new_dtags"
if [ "$CFG_SEPARATE_DEBUG_INFO" = "yes" ]; then
QT_CONFIG="$QT_CONFIG separate_debug_info"
fi
[ "$CFG_SSE2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse2"
[ "$CFG_SSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse3"
[ "$CFG_SSSE3" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG ssse3"
[ "$CFG_SSE4_1" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_1"
[ "$CFG_SSE4_2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG sse4_2"
[ "$CFG_AVX" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx"
[ "$CFG_AVX2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG avx2"
for feature in $CFG_AVX512; do
QMAKE_CONFIG="$QMAKE_CONFIG avx512$feature"
done
[ "$CFG_NEON" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG neon"
if [ "$CFG_ARCH" = "mips" ]; then
[ "$CFG_MIPS_DSP" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dsp"
[ "$CFG_MIPS_DSPR2" = "yes" ] && QMAKE_CONFIG="$QMAKE_CONFIG mips_dspr2"
fi
if [ "$CFG_CLOCK_GETTIME" = "yes" ]; then
QT_CONFIG="$QT_CONFIG clock-gettime"
fi
if [ "$CFG_CLOCK_MONOTONIC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG clock-monotonic"
fi
if [ "$CFG_POSIX_FALLOCATE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG posix_fallocate"
fi
if [ "$CFG_MREMAP" = "yes" ]; then
QT_CONFIG="$QT_CONFIG mremap"
fi
if [ "$CFG_GETADDRINFO" = "yes" ]; then
QT_CONFIG="$QT_CONFIG getaddrinfo"
fi
if [ "$CFG_IPV6IFNAME" = "yes" ]; then
QT_CONFIG="$QT_CONFIG ipv6ifname"
fi
if [ "$CFG_GETIFADDRS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG getifaddrs"
fi
if [ "$CFG_INOTIFY" = "yes" ]; then
QT_CONFIG="$QT_CONFIG inotify"
fi
if [ "$CFG_EVENTFD" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eventfd"
fi
if [ "$CFG_CLOEXEC" = "yes" ]; then
QT_CONFIG="$QT_CONFIG threadsafe-cloexec"
fi
if [ "$CFG_POLL" = "select" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_NATIVE_POLL"
fi
QT_CONFIG="$QT_CONFIG poll_$CFG_POLL"
if [ "$CFG_LIBJPEG" = "no" ]; then
CFG_JPEG="no"
elif [ "$CFG_LIBJPEG" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-jpeg"
fi
if [ "$CFG_JPEG" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-jpeg"
elif [ "$CFG_JPEG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG jpeg"
fi
if [ "$CFG_LIBPNG" = "no" ]; then
CFG_PNG="no"
fi
if [ "$CFG_LIBPNG" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-png"
fi
if [ "$CFG_PNG" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-png"
elif [ "$CFG_PNG" = "yes" ]; then
QT_CONFIG="$QT_CONFIG png"
fi
if [ "$CFG_GIF" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-gif"
elif [ "$CFG_GIF" = "yes" ]; then
QT_CONFIG="$QT_CONFIG gif"
fi
if [ "$CFG_DOUBLECONVERSION" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-doubleconversion"
elif [ "$CFG_DOUBLECONVERSION" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-doubleconversion"
else
QT_CONFIG="$QT_CONFIG doubleconversion"
fi
if [ "$CFG_FREETYPE" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-freetype"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FREETYPE"
elif [ "$CFG_FREETYPE" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-freetype"
else
QT_CONFIG="$QT_CONFIG freetype"
fi
if [ "$CFG_HARFBUZZ" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-harfbuzz"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_HARFBUZZ"
elif [ "$CFG_HARFBUZZ" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-harfbuzz"
else
QT_CONFIG="$QT_CONFIG harfbuzz"
fi
if [ "$CFG_GUI" = "auto" ]; then
CFG_GUI="yes"
fi
if [ "$CFG_GUI" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-gui"
CFG_WIDGETS="no"
fi
if [ "$CFG_WIDGETS" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-widgets"
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WIDGETS"
fi
if [ "$XPLATFORM_MAC" = "yes" ]; then
#On Mac we implicitly link against libz, so we
#never use the 3rdparty stuff.
[ "$CFG_ZLIB" = "yes" ] && CFG_ZLIB="system"
fi
if [ "$CFG_ZLIB" = "yes" ]; then
QT_CONFIG="$QT_CONFIG zlib"
elif [ "$CFG_ZLIB" = "system" ]; then
QT_CONFIG="$QT_CONFIG system-zlib"
fi
[ "$CFG_MTDEV" = "yes" ] && QT_CONFIG="$QT_CONFIG mtdev"
[ "$CFG_CUPS" = "yes" ] && QT_CONFIG="$QT_CONFIG cups"
[ "$CFG_ICONV" = "yes" ] && QT_CONFIG="$QT_CONFIG iconv"
[ "$CFG_ICONV" = "sun" ] && QT_CONFIG="$QT_CONFIG sun-libiconv"
[ "$CFG_ICONV" = "gnu" ] && QT_CONFIG="$QT_CONFIG gnu-libiconv"
[ "$CFG_GLIB" = "yes" ] && QT_CONFIG="$QT_CONFIG glib"
[ "$CFG_DBUS" != "no" ] && QT_CONFIG="$QT_CONFIG dbus"
[ "$CFG_DBUS" = "linked" ] && QT_CONFIG="$QT_CONFIG dbus-linked"
[ "$CFG_OPENSSL" = "yes" ] && QT_CONFIG="$QT_CONFIG openssl"
[ "$CFG_OPENSSL" = "linked" ] && QT_CONFIG="$QT_CONFIG openssl-linked"
[ "$CFG_SECURETRANSPORT" = "yes" ] && QT_CONFIG="$QT_CONFIG ssl securetransport"
[ "$CFG_LIBPROXY" = "yes" ] && QT_CONFIG="$QT_CONFIG libproxy"
[ "$CFG_XCB" != "no" ] && QT_CONFIG="$QT_CONFIG xcb"
[ "$CFG_XINPUT2" = "yes" ] && QT_CONFIG="$QT_CONFIG xinput2"
[ "$CFG_SYSTEM_PROXIES" = "yes" ] && QT_CONFIG="$QT_CONFIG system-proxies"
[ "$CFG_DIRECTWRITE" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite"
[ "$CFG_DIRECTWRITE2" = "yes" ] && QT_CONFIG="$QT_CONFIG directwrite2"
[ '!' -z "$DEFINES" ] && QMakeVar add EXTRA_DEFINES "$DEFINES"
[ '!' -z "$INCLUDES" ] && QMakeVar add EXTRA_INCLUDEPATH "$INCLUDES"
[ '!' -z "$L_FLAGS" ] && QMakeVar add EXTRA_LIBS "$L_FLAGS"
if [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
if [ -n "$RPATH_FLAGS" ]; then
echo
echo "ERROR: -R cannot be used on this platform as \$QMAKE_LFLAGS_RPATH is"
echo " undefined."
echo
exit 1
elif [ "$CFG_RPATH" = "yes" ]; then
RPATH_MESSAGE=" NOTE: This platform does not support runtime library paths, using -no-rpath."
CFG_RPATH=no
fi
else
if [ -n "$RPATH_FLAGS" ]; then
# add the user defined rpaths
QMakeVar add EXTRA_RPATHS "$RPATH_FLAGS"
fi
fi
if [ "$CFG_RPATH" = "yes" ]; then
QT_CONFIG="$QT_CONFIG rpath"
fi
if [ '!' -z "$W_FLAGS" ]; then
# add the user defined warning flags
QMakeVar add QMAKE_CFLAGS_WARN_ON "$W_FLAGS"
QMakeVar add QMAKE_CXXFLAGS_WARN_ON "$W_FLAGS"
fi
if [ "$XPLATFORM_MINGW" = "yes" ]; then
# mkspecs/features/win32/default_pre.prf sets "no-rtti".
# Follow default behavior of configure.exe by overriding with "rtti".
QTCONFIG_CONFIG="$QTCONFIG_CONFIG rtti"
fi
if [ "$CFG_ALSA" = "yes" ]; then
QT_CONFIG="$QT_CONFIG alsa"
fi
if [ "$CFG_PULSEAUDIO" = "yes" ]; then
QT_CONFIG="$QT_CONFIG pulseaudio"
fi
[ "$CFG_GSTREAMER_VERSION" = "0.10" ] && QT_CONFIG="$QT_CONFIG gstreamer-0.10"
[ "$CFG_GSTREAMER_VERSION" = "1.0" ] && QT_CONFIG="$QT_CONFIG gstreamer-1.0"
if [ "$CFG_COREWLAN" = "yes" ]; then
QT_CONFIG="$QT_CONFIG corewlan"
fi
if [ "$CFG_ICU" = "yes" ]; then
QT_CONFIG="$QT_CONFIG icu"
fi
if [ "$CFG_FORCE_ASSERTS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG force_asserts"
fi
if [ "$CFG_LTCG" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG ltcg"
fi
if [ "$CFG_SANITIZERS" != "none" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitizer"
if [ "$CFG_SANITIZE_ADDRESS" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_address"
fi
if [ "$CFG_SANITIZE_THREAD" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_thread"
fi
if [ "$CFG_SANITIZE_MEMORY" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_memory"
fi
if [ "$CFG_SANITIZE_UNDEFINED" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG sanitize_undefined"
fi
fi
if [ "$CFG_PCRE" = "qt" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG pcre"
fi
#
# Some Qt modules are too advanced in C++ for some old compilers
# Detect here the platforms where they are known to work.
#
# See Qt documentation for more information on which features are
# supported and on which compilers.
#
canBuildQtConcurrent="yes"
case "$XPLATFORM" in
hpux-g++*)
# PA-RISC's assembly is too limited
# gcc 3.4 on that platform can't build QtXmlPatterns
# the assembly it generates cannot be compiled
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
4*)
;;
3.4*)
canBuildQtXmlPatterns="no"
;;
*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
;;
esac
;;
unsupported/vxworks-*-g++*)
canBuildWebKit="no"
;;
unsupported/vxworks-*-dcc*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
;;
*-g++*)
# Check gcc's version
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
4*|3.4*)
;;
3.3*)
canBuildWebKit="no"
;;
*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
;;
esac
;;
solaris-cc*)
# Check the compiler version
case `${QMAKE_CONF_COMPILER} -V 2>&1 | $AWK '{print $4}'` in
5.[012345678])
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
canBuildQtConcurrent="no"
;;
5.*)
canBuildWebKit="no"
canBuildQtConcurrent="no"
;;
esac
;;
hpux-acc*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
canBuildQtConcurrent="no"
;;
hpuxi-acc*)
canBuildWebKit="no"
;;
aix-xlc*)
# Get the xlC version
cat > xlcver.c <<EOF
#include <stdio.h>
int main()
{
printf("%d.%d\n", __xlC__ >> 8, __xlC__ & 0xFF);
return 0;
}
EOF
xlcver=
if ${QMAKE_CONF_COMPILER} -o xlcver xlcver.c >/dev/null 2>/dev/null; then
xlcver=`./xlcver 2>/dev/null`
rm -f ./xlcver
fi
if [ "$OPT_VERBOSE" = "yes" ]; then
if [ -n "$xlcver" ]; then
echo Found IBM xlC version: $xlcver.
else
echo Could not determine IBM xlC version, assuming oldest supported.
fi
fi
case "$xlcver" in
[123456].*)
canBuildWebKit="no"
canBuildQtXmlPatterns="no"
canBuildQtConcurrent="no"
;;
*)
canBuildWebKit="no"
canBuildQtConcurrent="no"
;;
esac
;;
irix-cc*)
canBuildWebKit="no"
canBuildQtConcurrent="no"
;;
esac
if [ "$CFG_GUI" = "no" ]; then
# WebKit requires Qt GUI
canBuildWebKit="no"
fi
if [ "$CFG_SHARED" = "no" ]; then
echo
echo "WARNING: Using static linking will disable the WebKit module."
echo
canBuildWebKit="no"
fi
CFG_CONCURRENT="yes"
if [ "$canBuildQtConcurrent" = "no" ]; then
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CONCURRENT"
CFG_CONCURRENT="no"
else
QT_CONFIG="$QT_CONFIG concurrent"
fi
# ### Vestige
if [ "$CFG_AUDIO_BACKEND" = "yes" ]; then
QT_CONFIG="$QT_CONFIG audio-backend"
fi
# ### Vestige
if [ "$CFG_WEBKIT" = "debug" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug"
fi
# ### Vestige
if [ "$CFG_QML_DEBUG" = "no" ]; then
QT_CONFIG="$QT_CONFIG no-qml-debug"
fi
case "$QMAKE_CONF_COMPILER" in
*clang*)
# Clang
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n -E '
/^Apple (clang|LLVM) version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_APPLE_CLANG_MAJOR_VERSION=\1; QT_APPLE_CLANG_MINOR_VERSION=\2/;p;q;}
/^(FreeBSD )?clang version /{s///; s/^([0-9]*)\.([0-9]*).*$/QT_CLANG_MAJOR_VERSION=\1; QT_CLANG_MINOR_VERSION=\2/;p;q;}'`
eval "$COMPILER_VERSION"
;;
*icpc)
# Intel CC
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -v 2>&1 | sed -n '
s/icpc version \([0-9]*\)\.\([0-9]*\)\.\([0-9]*\) .*$/QT_ICC_MAJOR_VERSION=\1; QT_ICC_MINOR_VERSION=\2; QT_ICC_PATCH_VERSION=\3/p'`
eval "$COMPILER_VERSION"
;;
*g++*)
# GNU C++
COMPILER_VERSION=`${QMAKE_CONF_COMPILER} -dumpversion 2>/dev/null`
case "$COMPILER_VERSION" in
*.*.*)
QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\1,'`
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\2,'`
QT_GCC_PATCH_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*,\3,'`
;;
*.*)
QT_GCC_MAJOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\1,'`
QT_GCC_MINOR_VERSION=`echo $COMPILER_VERSION | sed 's,^\([0-9]*\)\.\([0-9]*\).*,\2,'`
QT_GCC_PATCH_VERSION=0
;;
*)
QT_GCC_MAJOR_VERSION=$COMPILER_VERSION
QT_GCC_MINOR_VERSION=0
QT_GCC_PATCH_VERSION=0
esac
;;
*)
#
;;
esac
echo "Done running configuration tests."
# Save stdout in fd 3
exec 3>&1
#-------------------------------------------------------------------------------
# part of configuration information goes into qconfig.h
#-------------------------------------------------------------------------------
# Open qconfig.h.new
exec > "$outpath/src/corelib/global/qconfig.h.new"
# start with Qt's version number
cat <<EOF
#define QT_VERSION_MAJOR $QT_MAJOR_VERSION
#define QT_VERSION_MINOR $QT_MINOR_VERSION
#define QT_VERSION_PATCH $QT_PATCH_VERSION
#define QT_VERSION_STR "$QT_VERSION"
EOF
case "$CFG_QCONFIG" in
full)
echo "/* Everything */"
;;
*)
echo "#ifndef QT_BOOTSTRAPPED"
cat "$CFG_QCONFIG_PATH"
echo "#endif"
;;
esac
echo '/* Compile time features */'
[ '!' -z "$LicenseKeyExt" ] && echo "#define QT_PRODUCT_LICENSEKEY \"$LicenseKeyExt\""
if [ "$CFG_SHARED" = "no" ]; then
cat <<EOF
/* Qt was configured for a static build */
#if !defined(QT_SHARED) && !defined(QT_STATIC)
# define QT_STATIC
#endif
EOF
fi
if [ "$CFG_LARGEFILE" = "yes" ] && [ "$XPLATFORM_MINGW" != "yes" ]; then
echo "#define QT_LARGEFILE_SUPPORT 64"
fi
if [ "$CFG_QREAL" != double ]; then
echo "#define QT_COORD_TYPE $CFG_QREAL"
echo "#define QT_COORD_TYPE_STRING $CFG_QREAL_STRING"
fi
if [ "$CFG_FRAMEWORK" = "yes" ]; then
echo "#define QT_MAC_FRAMEWORK_BUILD"
fi
if [ "$CFG_ATOMIC64" = "no" ]; then
echo "#define QT_NO_STD_ATOMIC64"
fi
#REDUCE_RELOCATIONS is a elf/unix only thing, so not in windows configure.exe
if [ "$CFG_REDUCE_RELOCATIONS" = "yes" ]; then
echo "#define QT_REDUCE_RELOCATIONS"
fi
# Add compiler sub-architecture support
echo ""
echo "// Compiler sub-arch support"
for SUBARCH in SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 AVX AVX2 \
MIPS_DSP MIPS_DSPR2; do
eval "VAL=\$CFG_$SUBARCH"
case "$VAL" in
yes)
echo "#define QT_COMPILER_SUPPORTS_$SUBARCH 1" \
;;
esac
done
for feature in $CFG_AVX512_UPPER; do
echo "#define QT_COMPILER_SUPPORTS_$feature 1"
done
echo ""
if [ "$CFG_DEV" = "yes" ]; then
echo "#define QT_BUILD_INTERNAL"
fi
# Add QPA to config.h
QCONFIG_FLAGS="$QCONFIG_FLAGS"
# Add turned on SQL drivers
for DRIVER in $CFG_SQL_AVAILABLE; do
eval "VAL=\$CFG_SQL_$DRIVER"
case "$VAL" in
qt)
ONDRIVER=`echo $DRIVER | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SQL_$ONDRIVER"
SQL_DRIVERS="$SQL_DRIVERS $DRIVER"
;;
plugin)
SQL_PLUGINS="$SQL_PLUGINS $DRIVER"
;;
esac
done
QMakeVar set sql-drivers "$SQL_DRIVERS"
QMakeVar set sql-plugins "$SQL_PLUGINS"
# Add other configuration options to the qconfig.h file
[ "$CFG_GIF" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_BUILTIN_GIF_READER=1"
[ "$CFG_PNG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_PNG"
[ "$CFG_JPEG" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IMAGEFORMAT_JPEG"
[ "$CFG_ZLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ZLIB"
[ "$CFG_DBUS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_DBUS"
[ "$CFG_LIBPROXY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_LIBPROXY"
# X11/Unix/Mac only configs
[ "$CFG_CUPS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CUPS"
[ "$CFG_ICONV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ICONV"
[ "$CFG_EVDEV" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVDEV"
[ "$CFG_GLIB" != "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLIB"
[ "$CFG_CLOCK_MONOTONIC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_CLOCK_MONOTONIC"
[ "$CFG_POSIX_FALLOCATE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_POSIX_FALLOCATE"
[ "$CFG_MREMAP" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MREMAP"
[ "$CFG_GETADDRINFO" = "no" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETADDRINFO"
[ "$CFG_IPV6IFNAME" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_IPV6IFNAME"
[ "$CFG_GETIFADDRS" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GETIFADDRS"
[ "$CFG_INOTIFY" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_INOTIFY"
[ "$CFG_EVENTFD" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EVENTFD"
[ "$CFG_CLOEXEC" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_THREADSAFE_CLOEXEC=1"
[ "$CFG_OPENSSL" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_OPENSSL"
[ "$CFG_OPENSSL" = "linked" ]&& QCONFIG_FLAGS="$QCONFIG_FLAGS QT_LINKED_OPENSSL"
[ "$CFG_OPENSSL" = "no" ] && [ "$CFG_SECURETRANSPORT" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SSL"
[ "$CFG_SECURETRANSPORT" = "yes" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_SECURETRANSPORT"
[ "$CFG_SM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SESSIONMANAGER"
[ "$CFG_TSLIB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_TSLIB"
[ "$CFG_XCURSOR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XCURSOR"
[ "$CFG_XFIXES" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XFIXES"
[ "$CFG_FONTCONFIG" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_FONTCONFIG"
[ "$CFG_XKB" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XKB"
[ "$CFG_XRANDR" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRANDR"
[ "$CFG_XRENDER" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XRENDER"
[ "$CFG_MITSHM" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_MITSHM"
[ "$CFG_XSHAPE" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_SHAPE"
[ "$CFG_XSYNC" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_XSYNC"
[ "$CFG_XCURSOR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XCURSOR"
[ "$CFG_XFIXES" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XFIXES"
[ "$CFG_XRANDR" = "runtime" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_RUNTIME_XRANDR"
[ "$CFG_ALSA" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_ALSA"
[ "$CFG_PULSEAUDIO" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_PULSEAUDIO"
[ "$CFG_COREWLAN" = "no" ] && QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_COREWLAN"
# sort QCONFIG_FLAGS for neatness if we can
[ '!' -z "$AWK" ] && QCONFIG_FLAGS=`echo $QCONFIG_FLAGS | $AWK '{ gsub(" ", "\n"); print }' | sort | uniq`
QCONFIG_FLAGS=`echo $QCONFIG_FLAGS`
if [ -n "$QCONFIG_FLAGS" ]; then
cat << EOF
#ifndef QT_BOOTSTRAPPED
EOF
for cfg in $QCONFIG_FLAGS; do
cfgd=`echo $cfg | sed 's/=.*$//'` # trim pushed 'Foo=Bar' defines
cfg=`echo $cfg | sed 's/=/ /'` # turn first '=' into a space
# figure out define logic, so we can output the correct
# ifdefs to override the global defines in a project
cfgdNeg=
if [ true ] && echo "$cfgd" | grep 'QT_NO_' >/dev/null 2>&1; then
# QT_NO_option can be forcefully turned on by QT_option
cfgdNeg=`echo $cfgd | sed 's,QT_NO_,QT_,'`
elif [ true ] && echo "$cfgd" | grep 'QT_' >/dev/null 2>&1; then
# QT_option can be forcefully turned off by QT_NO_option
cfgdNeg=`echo $cfgd | sed 's,QT_,QT_NO_,'`
fi
if [ -z $cfgdNeg ]; then
cat << EOF
#ifndef $cfgd
# define $cfg
#endif
EOF
else
cat << EOF
#if defined($cfgd) && defined($cfgdNeg)
# undef $cfgd
#elif !defined($cfgd) && !defined($cfgdNeg)
# define $cfg
#endif
EOF
fi
done
cat << EOF
#endif // QT_BOOTSTRAPPED
EOF
fi
if [ "$CFG_REDUCE_EXPORTS" = "yes" ]; then
cat << EOF
#define QT_VISIBILITY_AVAILABLE
EOF
fi
if [ -n "$QT_LIBINFIX" ]; then
cat << EOF
#define QT_LIBINFIX "$QT_LIBINFIX"
EOF
fi
echo "#define QT_QPA_DEFAULT_PLATFORM_NAME \"$QT_QPA_DEFAULT_PLATFORM\""
# Close qconfig.h.new (by restoring the original stdout)
exec >&3
# avoid unecessary rebuilds by copying only if qconfig.h has changed
if cmp -s "$outpath/src/corelib/global/qconfig.h" "$outpath/src/corelib/global/qconfig.h.new"; then
rm -f "$outpath/src/corelib/global/qconfig.h.new"
else
mv -f "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
fi
#-------------------------------------------------------------------------------
# save configuration into qconfig.pri
#-------------------------------------------------------------------------------
# open qconfig.pri
QTCONFIG="$outpath/mkspecs/qconfig.pri"
exec > "$QTCONFIG.tmp"
if [ "$CFG_DEBUG" = "yes" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG debug"
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG release"
fi
QT_CONFIG="$QT_CONFIG debug"
elif [ "$CFG_DEBUG" = "no" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG release"
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
QT_CONFIG="$QT_CONFIG debug"
fi
QT_CONFIG="$QT_CONFIG release"
fi
if [ "$CFG_FRAMEWORK" = "no" ]; then
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_no_framework"
else
QT_CONFIG="$QT_CONFIG qt_framework"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG qt_framework"
fi
if [ "$CFG_DEV" = "yes" ]; then
QT_CONFIG="$QT_CONFIG private_tests"
if [ "$CFG_WERROR" != "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
fi
if [ "$CFG_HEADERSCLEAN" != "no" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
fi
else
if [ "$CFG_WERROR" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG warnings_are_errors"
fi
if [ "$CFG_HEADERSCLEAN" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG headersclean"
fi
fi
cat <<EOF
#configuration
CONFIG += $QTCONFIG_CONFIG
host_build {
QT_ARCH = $CFG_HOST_ARCH
QT_TARGET_ARCH = $CFG_ARCH
} else {
QT_ARCH = $CFG_ARCH
}
QT_CONFIG += $QT_CONFIG
#versioning
QT_VERSION = $QT_VERSION
QT_MAJOR_VERSION = $QT_MAJOR_VERSION
QT_MINOR_VERSION = $QT_MINOR_VERSION
QT_PATCH_VERSION = $QT_PATCH_VERSION
#namespaces
QT_LIBINFIX = $QT_LIBINFIX
QT_NAMESPACE = $QT_NAMESPACE
QT_EDITION = $Edition
EOF
if [ "$Edition" != "OpenSource" ] && [ "$Edition" != "Preview" ]; then
echo "QT_LICHECK = $Licheck"
echo "QT_RELEASE_DATE = $ReleaseDate"
fi
echo
if [ "$CFG_SHARED" = "no" ]; then
echo "QT_DEFAULT_QPA_PLUGIN = q$QT_QPA_DEFAULT_PLATFORM"
echo
fi
if [ -n "$PKG_CONFIG_SYSROOT_DIR" ] || [ -n "$PKG_CONFIG_LIBDIR" ]; then
echo "# pkgconfig"
echo "PKG_CONFIG_SYSROOT_DIR = $PKG_CONFIG_SYSROOT_DIR"
echo "PKG_CONFIG_LIBDIR = $PKG_CONFIG_LIBDIR"
echo
fi
if [ -n "$CFG_SYSROOT" ] && [ "$CFG_GCC_SYSROOT" = "yes" ]; then
echo "# sysroot"
echo "!host_build {"
echo " QMAKE_CFLAGS += --sysroot=\$\$[QT_SYSROOT]"
echo " QMAKE_CXXFLAGS += --sysroot=\$\$[QT_SYSROOT]"
echo " QMAKE_LFLAGS += --sysroot=\$\$[QT_SYSROOT]"
echo "}"
echo
fi
echo "QT_COMPILER_STDCXX = $CFG_STDCXX_DEFAULT"
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION"
echo "QT_GCC_MINOR_VERSION = $QT_GCC_MINOR_VERSION"
echo "QT_GCC_PATCH_VERSION = $QT_GCC_PATCH_VERSION"
fi
if [ -n "$QT_ICC_MAJOR_VERSION" ]; then
echo "QT_ICC_MAJOR_VERSION = $QT_ICC_MAJOR_VERSION"
echo "QT_ICC_MINOR_VERSION = $QT_ICC_MINOR_VERSION"
echo "QT_ICC_PATCH_VERSION = $QT_ICC_PATCH_VERSION"
fi
if [ -n "$QT_CLANG_MAJOR_VERSION" ]; then
echo "QT_CLANG_MAJOR_VERSION = $QT_CLANG_MAJOR_VERSION"
echo "QT_CLANG_MINOR_VERSION = $QT_CLANG_MINOR_VERSION"
fi
if [ -n "$QT_APPLE_CLANG_MAJOR_VERSION" ]; then
echo "QT_APPLE_CLANG_MAJOR_VERSION = $QT_APPLE_CLANG_MAJOR_VERSION"
echo "QT_APPLE_CLANG_MINOR_VERSION = $QT_APPLE_CLANG_MINOR_VERSION"
fi
if [ -n "$QMAKE_INCDIR_OPENGL_ES2" ]; then
echo "#Qt opengl include path"
echo "QMAKE_INCDIR_OPENGL_ES2 = `shellArgumentListToQMakeList "$QMAKE_INCDIR_OPENGL_ES2"`"
fi
# Close qconfig.pri.tmp (by restoring the original stdout)
exec >&3
# replace qconfig.pri if it differs from the newly created temp file
if cmp -s "$QTCONFIG.tmp" "$QTCONFIG"; then
rm -f "$QTCONFIG.tmp"
else
mv -f "$QTCONFIG.tmp" "$QTCONFIG"
fi
#-------------------------------------------------------------------------------
# save configuration into qmodule.pri
#-------------------------------------------------------------------------------
# open qmodule.pri
QTMODULE="$outpath/mkspecs/qmodule.pri"
exec > "$QTMODULE.tmp"
echo "CONFIG += $QMAKE_CONFIG"
echo "QT_BUILD_PARTS += $CFG_BUILD_PARTS"
if [ -n "$CFG_SKIP_MODULES" ]; then
echo "QT_SKIP_MODULES += $CFG_SKIP_MODULES"
fi
DISABLED_FEATURES=
for cfg in $QCONFIG_FLAGS; do
ncfg=${cfg#QT_NO_}
if [ x$ncfg != x$cfg ]; then
DISABLED_FEATURES="$DISABLED_FEATURES $ncfg"
fi
done
if [ -n "$DISABLED_FEATURES" ]; then
echo "QT_NO_DEFINES = $DISABLED_FEATURES"
fi
echo "QT_QCONFIG_PATH = ${CFG_QCONFIG_PATH#$relpath/src/corelib/global/}"
cat <<EOF
host_build {
QT_CPU_FEATURES.$CFG_HOST_ARCH = $CFG_HOST_CPUFEATURES
} else {
QT_CPU_FEATURES.$CFG_ARCH = $CFG_CPUFEATURES
}
EOF
echo "QT_COORD_TYPE = $CFG_QREAL"
if [ -n "$QT_CFLAGS_PSQL" ]; then
echo "QT_CFLAGS_PSQL = $QT_CFLAGS_PSQL"
fi
if [ -n "$QT_LFLAGS_PSQL" ]; then
echo "QT_LFLAGS_PSQL = $QT_LFLAGS_PSQL"
fi
if [ -n "$QT_CFLAGS_MYSQL" ]; then
echo "QT_CFLAGS_MYSQL = $QT_CFLAGS_MYSQL"
fi
if [ -n "$QT_LFLAGS_MYSQL" ]; then
echo "QT_LFLAGS_MYSQL = $QT_LFLAGS_MYSQL"
fi
if [ -n "$QT_CFLAGS_SQLITE" ]; then
echo "QT_CFLAGS_SQLITE = $QT_CFLAGS_SQLITE"
fi
if [ -n "$QT_LFLAGS_SQLITE" ]; then
echo "QT_LFLAGS_SQLITE = $QT_LFLAGS_SQLITE"
fi
if [ -n "$QT_LFLAGS_ODBC" ]; then
echo "QT_LFLAGS_ODBC = $QT_LFLAGS_ODBC"
fi
if [ -n "$QT_LFLAGS_TDS" ]; then
echo "QT_LFLAGS_TDS = $QT_LFLAGS_TDS"
fi
#dump in the OPENSSL_LIBS info
if [ '!' -z "$OPENSSL_LIBS" ]; then
echo "OPENSSL_LIBS = $OPENSSL_LIBS"
elif [ "$CFG_OPENSSL" = "linked" ]; then
echo "OPENSSL_LIBS = -lssl -lcrypto"
fi
# cmdline args
cat "$QMAKE_VARS_FILE"
# QMAKE_VARS_FILE will be still needed for a status message.
# Close qmodule.pri.tmp (by restoring the original stdout)
exec >&3
# replace qmodule.pri if it differs from the newly created temp file
if cmp -s "$QTMODULE.tmp" "$QTMODULE"; then
rm -f "$QTMODULE.tmp"
else
mv -f "$QTMODULE.tmp" "$QTMODULE"
fi
#-------------------------------------------------------------------------------
# give feedback on configuration
#-------------------------------------------------------------------------------
exec 1>$outpath/config.summary # redirect output temporarily to config.summary
report_support()
{
case "$#,$2" in
2,auto)
# 2 arguments and the result is "auto", so just say "yes"
# this is usually an error in the configure script, but oh well..
echo "$1 yes"
return
;;
[012],* | *,no*)
# 0, 1 or 2 arguments, or anything starting with "no"
# print just the first part of the argument (before the dash)
echo "$1 ${2%%-*}"
return
:;
esac
heading=$1
shift
value=$1
shift
while [ $# -gt 0 ]; do
if [ "$value" = "$1" ]; then
echo "$heading yes ($2)"
return
fi
shift
shift
done
echo "$heading $value"
}
report_support_plugin()
{
report_support "$1" "$2-$3" \
yes-qt "in $4, using bundled copy" \
yes-system "in $4, using system library" \
plugin-qt "plugin, using bundled copy" \
plugin-system "plugin, using system library"
}
echo
echo " Configure summary"
echo
if [ "$XPLATFORM" = "$PLATFORM" ]; then
# the missing space before $CFG_FEATURES is intentional
echo "Build type: $PLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
else
echo "Building on: $PLATFORM ($CFG_HOST_ARCH, CPU features:${CFG_HOST_CPUFEATURES:- none detected})"
echo "Building for: $XPLATFORM ($CFG_ARCH, CPU features:${CFG_CPUFEATURES:- none detected})"
fi
if [ -n "$PLATFORM_NOTES" ]; then
echo "Platform notes:"
echo "$PLATFORM_NOTES"
else
echo
fi
if [ "$OPT_VERBOSE" = "yes" ]; then
echo $ECHO_N "qmake vars .......... $ECHO_C"
cat "$QMAKE_VARS_FILE" | tr '\n' ' '
echo "qmake switches ......... $QMAKE_SWITCHES"
echo
fi
# Build configuration
echo "Build options:"
echo $ECHO_N " Configuration .......... $ECHO_C"
echo $QMAKE_CONFIG $QT_CONFIG | tr ' ' '\n' | sort | tr '\n' ' '
echo
echo " Build parts ............ $CFG_BUILD_PARTS"
release="release"
[ "$CFG_FORCEDEBUGINFO" = "yes" ] && release="release (with debug info)"
[ "$CFG_DEBUG" = "yes" ] && build_mode="debug" || build_mode=$release
if [ "$CFG_DEBUG_RELEASE" = "yes" ]; then
build_mode="debug and $release; default link: $build_mode"
fi
if [ "$CFG_RELEASE_TOOLS" = "yes" ]; then
build_mode="$build_mode; optimized tools"
fi
echo " Mode ................... $build_mode"
unset build_mode release
echo " Using sanitizer(s)...... $CFG_SANITIZERS"
echo " Using C++ standard ..... $CFG_STDCXX"
echo " Using gold linker....... $CFG_USE_GOLD_LINKER"
echo " Using new DTAGS ........ $CFG_ENABLE_NEW_DTAGS"
echo " Using PCH .............. $CFG_PRECOMPILE"
echo " Using LTCG ............. $CFG_LTCG"
echo " Target compiler supports:"
if [ "$CFG_ARCH" = "i386" -o "$CFG_ARCH" = "x86_64" ]; then
echo " SSE .................. ${CFG_SSE_LIST:-<none>}"
echo " AVX .................. ${CFG_AVX_LIST:-<none>}"
echo " AVX512 ............... ${CFG_AVX512_UPPER:-<none>}"
elif [ "$CFG_ARCH" = "arm" ]; then
echo " Neon ................. ${CFG_NEON}"
elif [ "$CFG_ARCH" = "mips" ]; then
echo " DSP/DSPr2 ............ ${CFG_MIPS_DSP}/${CFG_MIPS_DSPR2}"
fi
# Qt modules
echo
echo "Qt modules and options:"
report_support " Qt D-Bus ..............." "$CFG_DBUS" runtime "loading dbus-1 at runtime" linked "linked to dbus-1"
report_support " Qt Concurrent .........." "$CFG_CONCURRENT"
report_support " Qt GUI ................." "$CFG_GUI"
report_support " Qt Widgets ............." "$CFG_WIDGETS"
report_support " Large File ............." "$CFG_LARGEFILE"
report_support " QML debugging .........." "$CFG_QML_DEBUG"
report_support " Use system proxies ....." "$CFG_SYSTEM_PROXIES"
# Other things
# Please keep sorted and properly grouped! The output is quite long, so it's
# hard to find something you're searching for if it's not sorted.
echo
echo "Support enabled for:"
report_support " Accessibility .........." "$CFG_ACCESSIBILITY"
report_support " ALSA ..................." "$CFG_ALSA"
report_support " CUPS ..................." "$CFG_CUPS"
[ "$XPLATFORM_MINGW" = "yes" ] && \
report_support " DirectWrite ............" "$CFG_DIRECTWRITE"
report_support " DoubleConversion........" "$CFG_DOUBLECONVERSION" no "libc" system "system library" qt "bundled copy"
report_support " Evdev .................." "$CFG_EVDEV"
report_support " FontConfig ............." "$CFG_FONTCONFIG"
report_support " FreeType ..............." "$CFG_FREETYPE" system "system library" yes "bundled copy"
report_support " Glib ..................." "$CFG_GLIB"
report_support " GStreamer .............." "$CFG_GSTREAMER" yes "$CFG_GSTREAMER_VERSION"
report_support " GTK platformtheme ......" "$CFG_GTK"
report_support " HarfBuzz ..............." "$CFG_HARFBUZZ" system "system library" qt "bundled copy"
report_support " Iconv .................." "$CFG_ICONV"
report_support " ICU ...................." "$CFG_ICU"
report_support " Image formats:"
report_support_plugin " GIF .................." "$CFG_GIF" qt QtGui
report_support_plugin " JPEG ................." "$CFG_JPEG" "$CFG_LIBJPEG" QtGui
report_support_plugin " PNG .................." "$CFG_PNG" "$CFG_LIBPNG" QtGui
report_support " libinput................" "$CFG_LIBINPUT"
report_support " Logging backends:"
report_support " journald ..............." "$CFG_JOURNALD"
report_support " syslog ..............." "$CFG_SYSLOG"
report_support " mtdev .................." "$CFG_MTDEV" yes "system library"
report_support " Networking:"
[ "$XPLATFORM_MAC" = "yes" ] && \
report_support " CoreWlan ............." "$CFG_COREWLAN"
report_support " getaddrinfo .........." "$CFG_GETADDRINFO"
report_support " getifaddrs ..........." "$CFG_GETIFADDRS"
report_support " IPv6 ifname .........." "$CFG_IPV6IFNAME"
report_support " libproxy.............." "$CFG_LIBPROXY"
report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading libraries at run-time" linked "linked to the libraries"
[ "$XPLATFORM_MAC" = "yes" ] && \
report_support " SecureTransport ......" "$CFG_SECURETRANSPORT"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
report_support " pkg-config ............. yes"
else
report_support " pkg-config ............. no"
fi
report_support " PulseAudio ............." "$CFG_PULSEAUDIO"
report_support " QPA backends:"
report_support " DirectFB ............." "$CFG_DIRECTFB"
report_support " EGLFS ................" "$CFG_EGLFS"
report_support " EGLFS i.MX6 ........" "$CFG_EGLFS_VIV"
report_support " EGLFS i.MX6 Wayland." "$CFG_EGLFS_VIV_WL"
report_support " EGLFS EGLDevice ...." "$CFG_EGLFS_EGLDEVICE"
report_support " EGLFS GBM .........." "$CFG_EGLFS_GBM"
report_support " EGLFS Mali ........." "$CFG_EGLFS_MALI"
report_support " EGLFS Raspberry Pi ." "$CFG_EGLFS_BRCM"
report_support " EGLFS X11 .........." "$CFG_EGL_X"
if [ "$XPLATFORM_INTEGRITY" = "yes" ]; then
report_support " INTEGRITY Framebuffer " "$CFG_INTEGRITYFB"
fi
report_support " LinuxFB .............." "$CFG_LINUXFB"
report_support " Mir client............" "$CFG_MIRCLIENT"
report_support " XCB .................." "$CFG_XCB" system "system library" qt "bundled copy"
if [ "$CFG_XCB" != "no" ]; then
report_support " EGL on X ..........." "$CFG_EGL_X"
report_support " GLX ................" "$CFG_XCB_GLX"
report_support " MIT-SHM ............" "$CFG_MITSHM"
report_support " Xcb-Xlib ..........." "$CFG_XCB_XLIB"
report_support " Xcursor ............" "$CFG_XCURSOR" runtime "loaded at runtime"
report_support " Xfixes ............." "$CFG_XFIXES" runtime "loaded at runtime"
report_support " Xi2 ................" "$CFG_XINPUT2" runtime "loaded at runtime"
report_support " Xrandr ............." "$CFG_XRANDR" runtime "loaded at runtime"
report_support " Xrender ............" "$CFG_XRENDER"
report_support " XKB ................" "$CFG_XKB"
report_support " XShape ............." "$CFG_XSHAPE"
report_support " XSync .............." "$CFG_XSYNC"
fi
report_support " Session management ....." "$CFG_SM"
if [ "$XPLATFORM_QNX" = "yes" ]; then
report_support " SLOG2 .................." "$CFG_SLOG2"
report_support " IMF ...................." "$CFG_QNX_IMF"
report_support " PPS ...................." "$CFG_PPS"
report_support " LGMON .................." "$CFG_LGMON"
fi
report_support " SQL drivers:"
report_support " DB2 .................." "$CFG_SQL_db2" plugin "plugin" yes "built into QtSql"
report_support " InterBase ............" "$CFG_SQL_ibase" plugin "plugin" yes "built into QtSql"
report_support " MySQL ................" "$CFG_SQL_mysql" plugin "plugin" yes "built into QtSql"
report_support " OCI .................." "$CFG_SQL_oci" plugin "plugin" yes "built into QtSql"
report_support " ODBC ................." "$CFG_SQL_odbc" plugin "plugin" yes "built into QtSql"
report_support " PostgreSQL ..........." "$CFG_SQL_psql" plugin "plugin" yes "built into QtSql"
report_support " SQLite 2 ............." "$CFG_SQL_sqlite2" plugin "plugin" yes "built into QtSql"
report_support_plugin " SQLite ..............." "$CFG_SQL_sqlite" "$CFG_SQLITE" QtSql
report_support " TDS .................." "$CFG_SQL_tds" plugin "plugin" yes "built into QtSql"
report_support " tslib .................." "$CFG_TSLIB"
report_support " udev ..................." "$CFG_LIBUDEV"
report_support " xkbcommon-x11..........." "$CFG_XKBCOMMON" system "system library" qt "bundled copy, XKB config root: $CFG_XKB_CONFIG_ROOT"
report_support " xkbcommon-evdev........." "$CFG_XKBCOMMON_EVDEV"
report_support " zlib ..................." "$CFG_ZLIB" system "system library" yes "bundled copy"
echo
# complain about not being able to use dynamic plugins if we are using a static build
if [ "$CFG_SHARED" = "no" ]; then
echo
echo "WARNING: Using static linking will disable the use of dynamically"
echo "loaded plugins. Make sure to import all needed static plugins,"
echo "or compile needed modules into the library."
fi
if [ "$CFG_FREETYPE" = "system" ]; then
if [ "$ORIG_CFG_FREETYPE" = "qt" ]; then
echo
echo "WARNING: Bundled FreeType can't be used. FontConfig use requires system FreeType."
elif [ "$ORIG_CFG_FREETYPE" = "no" ]; then
echo
echo "WARNING: FreeType can't be disabled. FontConfig use requires system FreeType."
fi
fi
if [ "$CFG_OPENSSL" = "linked" ] && [ "$OPENSSL_LIBS" = "" ]; then
echo
echo "NOTE: When linking against OpenSSL, you can override the default"
echo "library names through OPENSSL_LIBS."
echo "For example:"
echo " OPENSSL_LIBS='-L/opt/ssl/lib -lssl -lcrypto' ./configure -openssl-linked"
fi
if [ "$CFG_JOURNALD" = "yes" ] || [ "$CFG_SYSLOG" = "yes" ] || [ "$CFG_SLOG2" = "yes" ]; then
echo
echo "NOTE: journald, syslog or slog2 integration is enabled."
echo "If your users intend on developing applications against this build,"
echo "ensure that the IDEs they use either set QT_LOGGING_TO_CONSOLE to 1"
echo "or the IDE is able to read the logged output from journald, syslog or slog2."
fi
if [ "$CFG_XKBCOMMON" = "qt" ] && [ "$CFG_XKB_CONFIG_ROOT" = "not found" ]; then
echo
echo "WARNING: Could not find XKB config root, use -xkb-config-root to set a path to "
echo "XKB configuration data. This is required for keyboard input support."
fi
if [ "$CFG_QREAL" = double ] && [ "$CFG_ARCH" = arm ]; then
echo
echo "NOTE: Qt is using double for qreal on this system. This is binary incompatible against Qt 5.1."
echo "Configure with '-qreal float' to create a build that is binary compatible with 5.1."
fi
if [ "$CFG_RELEASE_TOOLS" = "yes" -a \( "$CFG_DEBUG" = "no" -o "$CFG_DEBUG_RELEASE" = "yes" \) ]; then
echo
echo "NOTE: -optimized-tools is not useful in -release mode."
echo
fi
exec 1>&3 3>&- # restore stdout
cat $outpath/config.summary # display config feedback to user
if [ "$XPLATFORM_MAC" = "yes" ] && [ "$CFG_FRAMEWORK" = "yes" ] && [ "$CFG_DEBUG" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "no" ]; then
echo
echo "Error: debug-only framework builds are not supported. Configure with -no-framework"
echo "if you want a pure debug build."
echo
exit 1
fi
sepath=`echo "$relpath" | sed -e 's/\\./\\\\./g'`
PROCS=1
EXEC=""
rm -f "$QMAKE_VARS_FILE" 2>/dev/null
#-------------------------------------------------------------------------------
# build makefiles based on the configuration
#-------------------------------------------------------------------------------
( # fork to make the cd stay local
relpathMangled=$relpath
if [ -n "$CFG_TOPLEVEL" ]; then
relpathMangled=`dirname "$relpath"`
cd ..
fi
"$CFG_QMAKE_PATH" -qtconf "$QTCONFFILE" "$relpathMangled"
) || exit
#-------------------------------------------------------------------------------
# check for platforms that we don't yet know about
#-------------------------------------------------------------------------------
if [ "$CFG_ARCH" = "unknown" ]; then
cat <<EOF
NOTICE: configure was unable to determine the architecture
for the $XQMAKESPEC target.
Qt will not use a specialized implementation for any atomic
operations. Instead a generic implemention based on either GCC
intrinsics or C++11 std::atomic<T> will be used (when
available). The generic implementations are generally as fast
as and always as safe as a specialized implementation.
If no generic implementation is available, Qt will use a
fallback UNIX implementation which uses a single
pthread_mutex_t to protect all atomic operations. This
implementation is the slow (but safe) fallback implementation
for architectures Qt does not yet support.
EOF
fi
#-------------------------------------------------------------------------------
# check if the user passed the -no-zlib option, which is no longer supported
#-------------------------------------------------------------------------------
if [ -n "$ZLIB_FORCED" ]; then
which_zlib="supplied"
if [ "$CFG_ZLIB" = "system" ]; then
which_zlib="system"
fi
cat <<EOF
NOTICE: The -no-zlib option was supplied but is no longer
supported.
Qt now requires zlib support in all builds, so the -no-zlib
option was ignored. Qt will be built using the $which_zlib
zlib.
EOF
fi
#-------------------------------------------------------------------------------
# check if the user passed the obsoleted -wayland or -no-wayland flag
#-------------------------------------------------------------------------------
if [ "$CFG_OBSOLETE_WAYLAND" = "yes" ]; then
cat <<EOF
NOTICE: The -wayland and -no-wayland flags are now obsolete
All configuring of QtWayland plugin and QtCompositor happens in the module
EOF
fi
#-------------------------------------------------------------------------------
# check if the user passed the obsoleted -arch or -host-arch options
#-------------------------------------------------------------------------------
if [ "$OPT_OBSOLETE_HOST_ARG" = "yes" ]; then
cat <<EOF
NOTICE: The -arch and -host-arch options are obsolete.
Qt now detects the target and host architectures based on compiler
output. Qt will be built using $CFG_ARCH for the target architecture
and $CFG_HOST_ARCH for the host architecture (note that these two
will be the same unless you are cross-compiling).
EOF
fi
#-------------------------------------------------------------------------------
# finally save the executed command to another script
#-------------------------------------------------------------------------------
if [ `basename $0` != "config.status" ]; then
CONFIG_STATUS="$relpath/$relconf$OPT_CMDLINE"
# add the system variables
for varname in $SYSTEM_VARIABLES; do
cmd=`echo \
'if [ -n "\$'${varname}'" ]; then
CONFIG_STATUS="'${varname}'='"'\\\$${varname}'"' \$CONFIG_STATUS"
fi'`
eval "$cmd"
done
echo "$CONFIG_STATUS" | grep '\-confirm\-license' >/dev/null 2>&1 || CONFIG_STATUS="$CONFIG_STATUS -confirm-license"
[ -f "$outpath/config.status" ] && rm -f "$outpath/config.status"
echo "#!/bin/sh" > "$outpath/config.status"
[ -n "$PKG_CONFIG_SYSROOT_DIR" ] && \
echo "export PKG_CONFIG_SYSROOT_DIR=$PKG_CONFIG_SYSROOT_DIR" >> "$outpath/config.status"
[ -n "$PKG_CONFIG_LIBDIR" ] && \
echo "export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR" >> "$outpath/config.status"
echo "$CONFIG_STATUS \"\$@\"" >> "$outpath/config.status"
chmod +x "$outpath/config.status"
fi
if [ -n "$RPATH_MESSAGE" ]; then
echo
echo "$RPATH_MESSAGE"
fi
if [ -n "$PREFIX_COMPLAINTS" ]; then
echo
echo "$PREFIX_COMPLAINTS"
echo
fi
MAKE=`basename "$MAKE"`
echo
echo Qt is now configured for building. Just run \'$MAKE\'.
if [ "$outpath" = "$QT_INSTALL_PREFIX" ]; then
echo Once everything is built, Qt is installed.
echo You should not run \'$MAKE install\'.
else
echo Once everything is built, you must run \'$MAKE install\'.
echo Qt will be installed into $QT_INSTALL_PREFIX
fi
echo
echo Prior to reconfiguration, make sure you remove any leftovers from
echo the previous build.
echo
1
https://gitee.com/tianxiadi2/qtbase.git
git@gitee.com:tianxiadi2/qtbase.git
tianxiadi2
qtbase
qtbase
dev

搜索帮助