configure.ac 146 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036
  1. #***************************************************************************
  2. # _ _ ____ _
  3. # Project ___| | | | _ \| |
  4. # / __| | | | |_) | |
  5. # | (__| |_| | _ <| |___
  6. # \___|\___/|_| \_\_____|
  7. #
  8. # Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
  9. #
  10. # This software is licensed as described in the file COPYING, which
  11. # you should have received as part of this distribution. The terms
  12. # are also available at https://curl.se/docs/copyright.html.
  13. #
  14. # You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. # copies of the Software, and permit persons to whom the Software is
  16. # furnished to do so, under the terms of the COPYING file.
  17. #
  18. # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. # KIND, either express or implied.
  20. #
  21. # SPDX-License-Identifier: curl
  22. #
  23. #***************************************************************************
  24. dnl Process this file with autoconf to produce a configure script.
  25. AC_PREREQ(2.59)
  26. dnl We don't know the version number "statically" so we use a dash here
  27. AC_INIT([curl], [-], [a suitable curl mailing list: https://curl.se/mail/])
  28. XC_OVR_ZZ50
  29. XC_OVR_ZZ60
  30. CURL_OVERRIDE_AUTOCONF
  31. dnl configure script copyright
  32. AC_COPYRIGHT([Copyright (C) Daniel Stenberg, <daniel@haxx.se>
  33. This configure script may be copied, distributed and modified under the
  34. terms of the curl license; see COPYING for more details])
  35. AC_CONFIG_SRCDIR([lib/urldata.h])
  36. AC_CONFIG_HEADERS(lib/curl_config.h)
  37. AC_CONFIG_MACRO_DIR([m4])
  38. AM_MAINTAINER_MODE
  39. m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
  40. CURL_CHECK_OPTION_DEBUG
  41. CURL_CHECK_OPTION_OPTIMIZE
  42. CURL_CHECK_OPTION_WARNINGS
  43. CURL_CHECK_OPTION_WERROR
  44. CURL_CHECK_OPTION_CURLDEBUG
  45. CURL_CHECK_OPTION_SYMBOL_HIDING
  46. CURL_CHECK_OPTION_ARES
  47. CURL_CHECK_OPTION_RT
  48. CURL_CHECK_OPTION_ECH
  49. XC_CHECK_PATH_SEPARATOR
  50. #
  51. # save the configure arguments
  52. #
  53. CONFIGURE_OPTIONS="\"$ac_configure_args\""
  54. AC_SUBST(CONFIGURE_OPTIONS)
  55. dnl SED is mandatory for configure process and libtool.
  56. dnl Set it now, allowing it to be changed later.
  57. if test -z "$SED"; then
  58. dnl allow it to be overridden
  59. AC_PATH_PROG([SED], [sed], [not_found],
  60. [$PATH:/usr/bin:/usr/local/bin])
  61. if test -z "$SED" || test "$SED" = "not_found"; then
  62. AC_MSG_ERROR([sed not found in PATH. Cannot continue without sed.])
  63. fi
  64. fi
  65. AC_SUBST([SED])
  66. dnl GREP is mandatory for configure process and libtool.
  67. dnl Set it now, allowing it to be changed later.
  68. if test -z "$GREP"; then
  69. dnl allow it to be overridden
  70. AC_PATH_PROG([GREP], [grep], [not_found],
  71. [$PATH:/usr/bin:/usr/local/bin])
  72. if test -z "$GREP" || test "$GREP" = "not_found"; then
  73. AC_MSG_ERROR([grep not found in PATH. Cannot continue without grep.])
  74. fi
  75. fi
  76. AC_SUBST([GREP])
  77. dnl 'grep -E' is mandatory for configure process and libtool.
  78. dnl Set it now, allowing it to be changed later.
  79. if test -z "$EGREP"; then
  80. dnl allow it to be overridden
  81. AC_MSG_CHECKING([that grep -E works])
  82. if echo a | ($GREP -E '(a|b)') >/dev/null 2>&1; then
  83. EGREP="$GREP -E"
  84. AC_MSG_RESULT([yes])
  85. else
  86. AC_MSG_RESULT([no])
  87. AC_PATH_PROG([EGREP], [egrep], [not_found],
  88. [$PATH:/usr/bin:/usr/local/bin])
  89. fi
  90. fi
  91. if test -z "$EGREP" || test "$EGREP" = "not_found"; then
  92. AC_MSG_ERROR([grep -E is not working and egrep is not found in PATH. Cannot continue.])
  93. fi
  94. AC_SUBST([EGREP])
  95. dnl AR is mandatory for configure process and libtool.
  96. dnl This is target dependent, so check it as a tool.
  97. if test -z "$AR"; then
  98. dnl allow it to be overridden
  99. AC_PATH_TOOL([AR], [ar], [not_found],
  100. [$PATH:/usr/bin:/usr/local/bin])
  101. if test -z "$AR" || test "$AR" = "not_found"; then
  102. AC_MSG_ERROR([ar not found in PATH. Cannot continue without ar.])
  103. fi
  104. fi
  105. AC_SUBST([AR])
  106. AC_SUBST(libext)
  107. dnl figure out the libcurl version
  108. CURLVERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)".*/\1/p' ${srcdir}/include/curl/curlver.h`
  109. XC_CHECK_PROG_CC
  110. CURL_ATOMIC
  111. dnl for --enable-code-coverage
  112. CURL_COVERAGE
  113. XC_AUTOMAKE
  114. AC_MSG_CHECKING([curl version])
  115. AC_MSG_RESULT($CURLVERSION)
  116. AC_SUBST(CURLVERSION)
  117. dnl
  118. dnl we extract the numerical version for curl-config only
  119. VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\([0-9A-Fa-f]*\).*/\1/p' ${srcdir}/include/curl/curlver.h`
  120. AC_SUBST(VERSIONNUM)
  121. dnl Solaris pkgadd support definitions
  122. PKGADD_PKG="HAXXcurl"
  123. PKGADD_NAME="curl - a client that groks URLs"
  124. PKGADD_VENDOR="curl.se"
  125. AC_SUBST(PKGADD_PKG)
  126. AC_SUBST(PKGADD_NAME)
  127. AC_SUBST(PKGADD_VENDOR)
  128. dnl
  129. dnl initialize all the info variables
  130. curl_ssl_msg="no (--with-{openssl,gnutls,mbedtls,wolfssl,schannel,secure-transport,amissl,bearssl,rustls} )"
  131. curl_ssh_msg="no (--with-{libssh,libssh2})"
  132. curl_zlib_msg="no (--with-zlib)"
  133. curl_brotli_msg="no (--with-brotli)"
  134. curl_zstd_msg="no (--with-zstd)"
  135. curl_gss_msg="no (--with-gssapi)"
  136. curl_gsasl_msg="no (--with-gsasl)"
  137. curl_tls_srp_msg="no (--enable-tls-srp)"
  138. curl_res_msg="default (--enable-ares / --enable-threaded-resolver)"
  139. curl_ipv6_msg="no (--enable-ipv6)"
  140. curl_unix_sockets_msg="no (--enable-unix-sockets)"
  141. curl_idn_msg="no (--with-{libidn2,winidn})"
  142. curl_docs_msg="enabled (--disable-docs)"
  143. curl_manual_msg="no (--enable-manual)"
  144. curl_libcurl_msg="enabled (--disable-libcurl-option)"
  145. curl_verbose_msg="enabled (--disable-verbose)"
  146. curl_sspi_msg="no (--enable-sspi)"
  147. curl_ldap_msg="no (--enable-ldap / --with-ldap-lib / --with-lber-lib)"
  148. curl_ldaps_msg="no (--enable-ldaps)"
  149. curl_rtsp_msg="no (--enable-rtsp)"
  150. curl_rtmp_msg="no (--with-librtmp)"
  151. curl_psl_msg="no (--with-libpsl)"
  152. curl_altsvc_msg="enabled (--disable-alt-svc)"
  153. curl_headers_msg="enabled (--disable-headers-api)"
  154. curl_hsts_msg="enabled (--disable-hsts)"
  155. curl_ws_msg="no (--enable-websockets)"
  156. ssl_backends=
  157. curl_h1_msg="enabled (internal)"
  158. curl_h2_msg="no (--with-nghttp2)"
  159. curl_h3_msg="no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)"
  160. enable_altsvc="yes"
  161. hsts="yes"
  162. dnl
  163. dnl Save some initial values the user might have provided
  164. dnl
  165. INITIAL_LDFLAGS=$LDFLAGS
  166. INITIAL_LIBS=$LIBS
  167. dnl
  168. dnl Generates a shell script to run the compiler with LD_LIBRARY_PATH set to
  169. dnl the value used right now. This lets CURL_RUN_IFELSE set LD_LIBRARY_PATH to
  170. dnl something different but only have that affect the execution of the results
  171. dnl of the compile, not change the libraries for the compiler itself.
  172. dnl
  173. compilersh="run-compiler"
  174. CURL_SAVED_CC="$CC"
  175. export CURL_SAVED_CC
  176. CURL_SAVED_LD_LIBRARY_PATH="$LD_LIBRARY_PATH"
  177. export CURL_SAVED_LD_LIBRARY_PATH
  178. cat <<\EOF > "$compilersh"
  179. CC="$CURL_SAVED_CC"
  180. export CC
  181. LD_LIBRARY_PATH="$CURL_SAVED_LD_LIBRARY_PATH"
  182. export LD_LIBRARY_PATH
  183. exec $CC "$@"
  184. EOF
  185. dnl **********************************************************************
  186. dnl See which TLS backend(s) that are requested. Just do all the
  187. dnl TLS AC_ARG_WITH() invokes here and do the checks later
  188. dnl **********************************************************************
  189. OPT_SCHANNEL=no
  190. AC_ARG_WITH(schannel,dnl
  191. AS_HELP_STRING([--with-schannel],[enable Windows native SSL/TLS]),
  192. OPT_SCHANNEL=$withval
  193. TLSCHOICE="schannel")
  194. OPT_SECURETRANSPORT=no
  195. AC_ARG_WITH(secure-transport,dnl
  196. AS_HELP_STRING([--with-secure-transport],[enable Apple OS native SSL/TLS]),[
  197. OPT_SECURETRANSPORT=$withval
  198. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }Secure-Transport"
  199. ])
  200. OPT_AMISSL=no
  201. AC_ARG_WITH(amissl,dnl
  202. AS_HELP_STRING([--with-amissl],[enable Amiga native SSL/TLS (AmiSSL)]),[
  203. OPT_AMISSL=$withval
  204. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }AmiSSL"
  205. ])
  206. OPT_OPENSSL=no
  207. dnl Default to no CA bundle
  208. ca="no"
  209. AC_ARG_WITH(ssl,dnl
  210. AS_HELP_STRING([--with-ssl=PATH],[old version of --with-openssl])
  211. AS_HELP_STRING([--without-ssl], [build without any TLS library]),[
  212. OPT_SSL=$withval
  213. OPT_OPENSSL=$withval
  214. if test X"$withval" != Xno; then
  215. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
  216. else
  217. SSL_DISABLED="D"
  218. fi
  219. ])
  220. AC_ARG_WITH(openssl,dnl
  221. AS_HELP_STRING([--with-openssl=PATH],[Where to look for OpenSSL, PATH points to the SSL installation (default: /usr/local/ssl); when possible, set the PKG_CONFIG_PATH environment variable instead of using this option]),[
  222. OPT_OPENSSL=$withval
  223. if test X"$withval" != Xno; then
  224. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }OpenSSL"
  225. fi
  226. ])
  227. OPT_GNUTLS=no
  228. AC_ARG_WITH(gnutls,dnl
  229. AS_HELP_STRING([--with-gnutls=PATH],[where to look for GnuTLS, PATH points to the installation root]),[
  230. OPT_GNUTLS=$withval
  231. if test X"$withval" != Xno; then
  232. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }GnuTLS"
  233. fi
  234. ])
  235. OPT_MBEDTLS=no
  236. AC_ARG_WITH(mbedtls,dnl
  237. AS_HELP_STRING([--with-mbedtls=PATH],[where to look for mbedTLS, PATH points to the installation root]),[
  238. OPT_MBEDTLS=$withval
  239. if test X"$withval" != Xno; then
  240. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }mbedTLS"
  241. fi
  242. ])
  243. OPT_WOLFSSL=no
  244. AC_ARG_WITH(wolfssl,dnl
  245. AS_HELP_STRING([--with-wolfssl=PATH],[where to look for WolfSSL, PATH points to the installation root (default: system lib default)]),[
  246. OPT_WOLFSSL=$withval
  247. if test X"$withval" != Xno; then
  248. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }wolfSSL"
  249. fi
  250. ])
  251. OPT_BEARSSL=no
  252. AC_ARG_WITH(bearssl,dnl
  253. AS_HELP_STRING([--with-bearssl=PATH],[where to look for BearSSL, PATH points to the installation root]),[
  254. OPT_BEARSSL=$withval
  255. if test X"$withval" != Xno; then
  256. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }BearSSL"
  257. fi
  258. ])
  259. OPT_RUSTLS=no
  260. AC_ARG_WITH(rustls,dnl
  261. AS_HELP_STRING([--with-rustls=PATH],[where to look for rustls, PATH points to the installation root]),[
  262. OPT_RUSTLS=$withval
  263. if test X"$withval" != Xno; then
  264. TLSCHOICE="${TLSCHOICE:+$TLSCHOICE, }rustls"
  265. experimental="$experimental rustls"
  266. fi
  267. ])
  268. TEST_NGHTTPX=nghttpx
  269. AC_ARG_WITH(test-nghttpx,dnl
  270. AS_HELP_STRING([--with-test-nghttpx=PATH],[where to find nghttpx for testing]),
  271. TEST_NGHTTPX=$withval
  272. if test X"$OPT_TEST_NGHTTPX" = "Xno" ; then
  273. TEST_NGHTTPX=""
  274. fi
  275. )
  276. AC_SUBST(TEST_NGHTTPX)
  277. CADDY=caddy
  278. AC_ARG_WITH(test-caddy,dnl
  279. AS_HELP_STRING([--with-test-caddy=PATH],[where to find caddy for testing]),
  280. CADDY=$withval
  281. if test X"$OPT_CADDY" = "Xno" ; then
  282. CADDY=""
  283. fi
  284. )
  285. AC_SUBST(CADDY)
  286. dnl we'd like a httpd+apachectl as test server
  287. dnl
  288. HTTPD_ENABLED="maybe"
  289. AC_ARG_WITH(test-httpd, [AS_HELP_STRING([--with-test-httpd=PATH],
  290. [where to find httpd/apache2 for testing])],
  291. [request_httpd=$withval], [request_httpd=check])
  292. if test x"$request_httpd" = "xcheck" -o x"$request_httpd" = "xyes"; then
  293. if test -x "/usr/sbin/apache2" -a -x "/usr/sbin/apache2ctl"; then
  294. # common location on distros (debian/ubuntu)
  295. HTTPD="/usr/sbin/apache2"
  296. APACHECTL="/usr/sbin/apache2ctl"
  297. AC_PATH_PROG([APXS], [apxs])
  298. if test "x$APXS" = "x"; then
  299. AC_MSG_NOTICE([apache2-dev not installed, httpd tests disabled])
  300. HTTPD_ENABLED="no"
  301. fi
  302. else
  303. AC_PATH_PROG([HTTPD], [httpd])
  304. if test "x$HTTPD" = "x"; then
  305. AC_PATH_PROG([HTTPD], [apache2])
  306. fi
  307. AC_PATH_PROG([APACHECTL], [apachectl])
  308. AC_PATH_PROG([APXS], [apxs])
  309. if test "x$HTTPD" = "x" -o "x$APACHECTL" = "x"; then
  310. AC_MSG_NOTICE([httpd/apache2 not in PATH, http tests disabled])
  311. HTTPD_ENABLED="no"
  312. fi
  313. if test "x$APXS" = "x"; then
  314. AC_MSG_NOTICE([apxs not in PATH, http tests disabled])
  315. HTTPD_ENABLED="no"
  316. fi
  317. fi
  318. elif test x"$request_httpd" != "xno"; then
  319. HTTPD="${request_httpd}/bin/httpd"
  320. APACHECTL="${request_httpd}/bin/apachectl"
  321. APXS="${request_httpd}/bin/apxs"
  322. if test ! -x "${HTTPD}"; then
  323. AC_MSG_NOTICE([httpd not found as ${HTTPD}, http tests disabled])
  324. HTTPD_ENABLED="no"
  325. elif test ! -x "${APACHECTL}"; then
  326. AC_MSG_NOTICE([apachectl not found as ${APACHECTL}, http tests disabled])
  327. HTTPD_ENABLED="no"
  328. elif test ! -x "${APXS}"; then
  329. AC_MSG_NOTICE([apxs not found as ${APXS}, http tests disabled])
  330. HTTPD_ENABLED="no"
  331. else
  332. AC_MSG_NOTICE([using HTTPD=$HTTPD for tests])
  333. fi
  334. fi
  335. if test x"$HTTPD_ENABLED" = "xno"; then
  336. HTTPD=""
  337. APACHECTL=""
  338. APXS=""
  339. fi
  340. AC_SUBST(HTTPD)
  341. AC_SUBST(APACHECTL)
  342. AC_SUBST(APXS)
  343. dnl the nghttpx we might use in httpd testing
  344. if test "x$TEST_NGHTTPX" != "x" -a "x$TEST_NGHTTPX" != "xnghttpx"; then
  345. HTTPD_NGHTTPX="$TEST_NGHTTPX"
  346. else
  347. AC_PATH_PROG([HTTPD_NGHTTPX], [nghttpx], [],
  348. [$PATH:/usr/bin:/usr/local/bin])
  349. fi
  350. AC_SUBST(HTTPD_NGHTTPX)
  351. dnl the Caddy server we might use in testing
  352. if test "x$TEST_CADDY" != "x"; then
  353. CADDY="$TEST_CADDY"
  354. else
  355. AC_PATH_PROG([CADDY], [caddy])
  356. fi
  357. AC_SUBST(CADDY)
  358. dnl If no TLS choice has been made, check if it was explicitly disabled or
  359. dnl error out to force the user to decide.
  360. if test -z "$TLSCHOICE"; then
  361. if test "x$OPT_SSL" != "xno"; then
  362. AC_MSG_ERROR([select TLS backend(s) or disable TLS with --without-ssl.
  363. Select from these:
  364. --with-amissl
  365. --with-bearssl
  366. --with-gnutls
  367. --with-mbedtls
  368. --with-openssl (also works for BoringSSL and libressl)
  369. --with-rustls
  370. --with-schannel
  371. --with-secure-transport
  372. --with-wolfssl
  373. ])
  374. fi
  375. fi
  376. AC_ARG_WITH(darwinssl,,
  377. AC_MSG_ERROR([--with-darwin-ssl and --without-darwin-ssl no longer work!]))
  378. dnl
  379. dnl Detect the canonical host and target build environment
  380. dnl
  381. AC_CANONICAL_HOST
  382. dnl Get system canonical name
  383. AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS])
  384. # Silence warning: ar: 'u' modifier ignored since 'D' is the default
  385. AC_SUBST(AR_FLAGS, [cr])
  386. dnl This defines _ALL_SOURCE for AIX
  387. CURL_CHECK_AIX_ALL_SOURCE
  388. dnl Our configure and build reentrant settings
  389. CURL_CONFIGURE_THREAD_SAFE
  390. CURL_CONFIGURE_REENTRANT
  391. dnl check for how to do large files
  392. AC_SYS_LARGEFILE
  393. XC_LIBTOOL
  394. LT_LANG([Windows Resource])
  395. #
  396. # Automake conditionals based on libtool related checks
  397. #
  398. AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSION_INFO],
  399. [test "x$xc_lt_shlib_use_version_info" = 'xyes'])
  400. AM_CONDITIONAL([CURL_LT_SHLIB_USE_NO_UNDEFINED],
  401. [test "x$xc_lt_shlib_use_no_undefined" = 'xyes'])
  402. AM_CONDITIONAL([CURL_LT_SHLIB_USE_MIMPURE_TEXT],
  403. [test "x$xc_lt_shlib_use_mimpure_text" = 'xyes'])
  404. #
  405. # Due to libtool and automake machinery limitations of not allowing
  406. # specifying separate CPPFLAGS or CFLAGS when compiling objects for
  407. # inclusion of these in shared or static libraries, we are forced to
  408. # build using separate configure runs for shared and static libraries
  409. # on systems where different CPPFLAGS or CFLAGS are mandatory in order
  410. # to compile objects for each kind of library. Notice that relying on
  411. # the '-DPIC' CFLAG that libtool provides is not valid given that the
  412. # user might for example choose to build static libraries with PIC.
  413. #
  414. #
  415. # Make our Makefile.am files use the staticlib CPPFLAG only when strictly
  416. # targeting a static library and not building its shared counterpart.
  417. #
  418. AM_CONDITIONAL([USE_CPPFLAG_CURL_STATICLIB],
  419. [test "x$xc_lt_build_static_only" = 'xyes'])
  420. #
  421. # Make staticlib CPPFLAG variable and its definition visible in output
  422. # files unconditionally, providing an empty definition unless strictly
  423. # targeting a static library and not building its shared counterpart.
  424. #
  425. CPPFLAG_CURL_STATICLIB=
  426. if test "x$xc_lt_build_static_only" = 'xyes'; then
  427. CPPFLAG_CURL_STATICLIB='-DCURL_STATICLIB'
  428. fi
  429. AC_SUBST([CPPFLAG_CURL_STATICLIB])
  430. # Determine whether all dependent libraries must be specified when linking
  431. if test "X$enable_shared" = "Xyes" -a "X$link_all_deplibs" = "Xno"
  432. then
  433. REQUIRE_LIB_DEPS=no
  434. else
  435. REQUIRE_LIB_DEPS=yes
  436. fi
  437. AC_SUBST(REQUIRE_LIB_DEPS)
  438. AM_CONDITIONAL(USE_EXPLICIT_LIB_DEPS, test x$REQUIRE_LIB_DEPS = xyes)
  439. dnl check if there's a way to force code inline
  440. AC_C_INLINE
  441. dnl **********************************************************************
  442. dnl platform/compiler/architecture specific checks/flags
  443. dnl **********************************************************************
  444. CURL_CHECK_COMPILER
  445. CURL_CHECK_NATIVE_WINDOWS
  446. CURL_SET_COMPILER_BASIC_OPTS
  447. CURL_SET_COMPILER_DEBUG_OPTS
  448. CURL_SET_COMPILER_OPTIMIZE_OPTS
  449. CURL_SET_COMPILER_WARNING_OPTS
  450. if test "$compiler_id" = "INTEL_UNIX_C"; then
  451. #
  452. if test "$compiler_num" -ge "1000"; then
  453. dnl icc 10.X or later
  454. CFLAGS="$CFLAGS -shared-intel"
  455. elif test "$compiler_num" -ge "900"; then
  456. dnl icc 9.X specific
  457. CFLAGS="$CFLAGS -i-dynamic"
  458. fi
  459. #
  460. fi
  461. CURL_CFLAG_EXTRAS=""
  462. if test X"$want_werror" = Xyes; then
  463. CURL_CFLAG_EXTRAS="-Werror"
  464. if test "$compiler_id" = "GNU_C"; then
  465. dnl enable -pedantic-errors for GCC 5 and later,
  466. dnl as before that it was the same as -Werror=pedantic
  467. if test "$compiler_num" -ge "500"; then
  468. CURL_CFLAG_EXTRAS="$CURL_CFLAG_EXTRAS -pedantic-errors"
  469. fi
  470. fi
  471. fi
  472. AC_SUBST(CURL_CFLAG_EXTRAS)
  473. CURL_CHECK_COMPILER_HALT_ON_ERROR
  474. CURL_CHECK_COMPILER_ARRAY_SIZE_NEGATIVE
  475. CURL_CHECK_COMPILER_PROTOTYPE_MISMATCH
  476. CURL_CHECK_COMPILER_SYMBOL_HIDING
  477. CURL_CHECK_CURLDEBUG
  478. AM_CONDITIONAL(CURLDEBUG, test x$want_curldebug = xyes)
  479. supports_unittests=yes
  480. # cross-compilation of unit tests static library/programs fails when
  481. # libcurl shared library is built. This might be due to a libtool or
  482. # automake issue. In this case we disable unit tests.
  483. if test "x$cross_compiling" != "xno" &&
  484. test "x$enable_shared" != "xno"; then
  485. supports_unittests=no
  486. fi
  487. # IRIX 6.5.24 gcc 3.3 autobuilds fail unittests library compilation due to
  488. # a problem related with OpenSSL headers and library versions not matching.
  489. # Disable unit tests while time to further investigate this is found.
  490. case $host in
  491. mips-sgi-irix6.5)
  492. if test "$compiler_id" = "GNU_C"; then
  493. supports_unittests=no
  494. fi
  495. ;;
  496. esac
  497. # All AIX autobuilds fails unit tests linking against unittests library
  498. # due to unittests library being built with no symbols or members. Libtool ?
  499. # Disable unit tests while time to further investigate this is found.
  500. case $host_os in
  501. aix*)
  502. supports_unittests=no
  503. ;;
  504. esac
  505. dnl Build unit tests when option --enable-debug is given.
  506. if test "x$want_debug" = "xyes" &&
  507. test "x$supports_unittests" = "xyes"; then
  508. want_unittests=yes
  509. else
  510. want_unittests=no
  511. fi
  512. AM_CONDITIONAL(BUILD_UNITTESTS, test x$want_unittests = xyes)
  513. dnl **********************************************************************
  514. dnl Compilation based checks should not be done before this point.
  515. dnl **********************************************************************
  516. CURL_CHECK_WIN32_LARGEFILE
  517. CURL_CHECK_WIN32_CRYPTO
  518. CURL_DARWIN_CFLAGS
  519. CURL_DARWIN_SYSTEMCONFIGURATION
  520. CURL_SUPPORTS_BUILTIN_AVAILABLE
  521. AM_CONDITIONAL([HAVE_WINDRES],
  522. [test "$curl_cv_native_windows" = "yes" && test -n "${RC}"])
  523. if test "$curl_cv_native_windows" = "yes"; then
  524. AM_COND_IF([HAVE_WINDRES],,
  525. [AC_MSG_ERROR([windres not found in PATH. Windows builds require windres. Cannot continue.])])
  526. fi
  527. dnl ************************************************************
  528. dnl switch off particular protocols
  529. dnl
  530. AC_MSG_CHECKING([whether to support http])
  531. AC_ARG_ENABLE(http,
  532. AS_HELP_STRING([--enable-http],[Enable HTTP support])
  533. AS_HELP_STRING([--disable-http],[Disable HTTP support]),
  534. [ case "$enableval" in
  535. no)
  536. AC_MSG_RESULT(no)
  537. AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP])
  538. disable_http="yes"
  539. AC_MSG_WARN([disable HTTP disables FTP over proxy and RTSP])
  540. AC_SUBST(CURL_DISABLE_HTTP, [1])
  541. AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
  542. AC_SUBST(CURL_DISABLE_RTSP, [1])
  543. dnl toggle off alt-svc too when HTTP is disabled
  544. AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
  545. AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable HSTS])
  546. curl_h1_msg="no (--enable-http, --with-hyper)"
  547. curl_altsvc_msg="no";
  548. curl_hsts_msg="no (--enable-hsts)";
  549. enable_altsvc="no"
  550. hsts="no"
  551. ;;
  552. *) AC_MSG_RESULT(yes)
  553. ;;
  554. esac ],
  555. AC_MSG_RESULT(yes)
  556. )
  557. AC_MSG_CHECKING([whether to support ftp])
  558. AC_ARG_ENABLE(ftp,
  559. AS_HELP_STRING([--enable-ftp],[Enable FTP support])
  560. AS_HELP_STRING([--disable-ftp],[Disable FTP support]),
  561. [ case "$enableval" in
  562. no)
  563. AC_MSG_RESULT(no)
  564. AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP])
  565. AC_SUBST(CURL_DISABLE_FTP, [1])
  566. ;;
  567. *) AC_MSG_RESULT(yes)
  568. ;;
  569. esac ],
  570. AC_MSG_RESULT(yes)
  571. )
  572. AC_MSG_CHECKING([whether to support file])
  573. AC_ARG_ENABLE(file,
  574. AS_HELP_STRING([--enable-file],[Enable FILE support])
  575. AS_HELP_STRING([--disable-file],[Disable FILE support]),
  576. [ case "$enableval" in
  577. no)
  578. AC_MSG_RESULT(no)
  579. AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE])
  580. AC_SUBST(CURL_DISABLE_FILE, [1])
  581. ;;
  582. *) AC_MSG_RESULT(yes)
  583. ;;
  584. esac ],
  585. AC_MSG_RESULT(yes)
  586. )
  587. AC_MSG_CHECKING([whether to support ldap])
  588. AC_ARG_ENABLE(ldap,
  589. AS_HELP_STRING([--enable-ldap],[Enable LDAP support])
  590. AS_HELP_STRING([--disable-ldap],[Disable LDAP support]),
  591. [ case "$enableval" in
  592. no)
  593. AC_MSG_RESULT(no)
  594. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  595. AC_SUBST(CURL_DISABLE_LDAP, [1])
  596. ;;
  597. yes)
  598. ldap_askedfor="yes"
  599. AC_MSG_RESULT(yes)
  600. ;;
  601. *)
  602. AC_MSG_RESULT(yes)
  603. ;;
  604. esac ],[
  605. AC_MSG_RESULT(yes) ]
  606. )
  607. AC_MSG_CHECKING([whether to support ldaps])
  608. AC_ARG_ENABLE(ldaps,
  609. AS_HELP_STRING([--enable-ldaps],[Enable LDAPS support])
  610. AS_HELP_STRING([--disable-ldaps],[Disable LDAPS support]),
  611. [ case "$enableval" in
  612. no)
  613. AC_MSG_RESULT(no)
  614. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  615. AC_SUBST(CURL_DISABLE_LDAPS, [1])
  616. ;;
  617. *) if test "x$CURL_DISABLE_LDAP" = "x1" ; then
  618. AC_MSG_RESULT(LDAP needs to be enabled to support LDAPS)
  619. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  620. AC_SUBST(CURL_DISABLE_LDAPS, [1])
  621. else
  622. AC_MSG_RESULT(yes)
  623. AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
  624. AC_SUBST(HAVE_LDAP_SSL, [1])
  625. fi
  626. ;;
  627. esac ],[
  628. if test "x$CURL_DISABLE_LDAP" = "x1" ; then
  629. AC_MSG_RESULT(no)
  630. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  631. AC_SUBST(CURL_DISABLE_LDAPS, [1])
  632. else
  633. AC_MSG_RESULT(yes)
  634. AC_DEFINE(HAVE_LDAP_SSL, 1, [Use LDAPS implementation])
  635. AC_SUBST(HAVE_LDAP_SSL, [1])
  636. fi ]
  637. )
  638. dnl **********************************************************************
  639. dnl Check for Hyper
  640. dnl **********************************************************************
  641. OPT_HYPER="no"
  642. AC_ARG_WITH(hyper,
  643. AS_HELP_STRING([--with-hyper=PATH],[Enable hyper usage])
  644. AS_HELP_STRING([--without-hyper],[Disable hyper usage]),
  645. [OPT_HYPER=$withval])
  646. case "$OPT_HYPER" in
  647. no)
  648. dnl --without-hyper option used
  649. want_hyper="no"
  650. ;;
  651. yes)
  652. dnl --with-hyper option used without path
  653. want_hyper="default"
  654. want_hyper_path=""
  655. ;;
  656. *)
  657. dnl --with-hyper option used with path
  658. want_hyper="yes"
  659. want_hyper_path="$withval"
  660. ;;
  661. esac
  662. if test X"$want_hyper" != Xno; then
  663. if test "x$disable_http" = "xyes"; then
  664. AC_MSG_ERROR([--with-hyper is not compatible with --disable-http])
  665. fi
  666. dnl backup the pre-hyper variables
  667. CLEANLDFLAGS="$LDFLAGS"
  668. CLEANCPPFLAGS="$CPPFLAGS"
  669. CLEANLIBS="$LIBS"
  670. CURL_CHECK_PKGCONFIG(hyper, $want_hyper_path)
  671. if test "$PKGCONFIG" != "no" ; then
  672. LIB_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
  673. $PKGCONFIG --libs-only-l hyper`
  674. CPP_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path]) dnl
  675. $PKGCONFIG --cflags-only-I hyper`
  676. LD_HYPER=`CURL_EXPORT_PCDIR([$want_hyper_path])
  677. $PKGCONFIG --libs-only-L hyper`
  678. else
  679. dnl no hyper pkg-config found
  680. LIB_HYPER="-lhyper -ldl -lpthread -lm"
  681. if test X"$want_hyper" != Xdefault; then
  682. CPP_HYPER=-I"$want_hyper_path/capi/include"
  683. LD_HYPER="-L$want_hyper_path/target/release -L$want_hyper_path/target/debug"
  684. fi
  685. fi
  686. if test -n "$LIB_HYPER"; then
  687. AC_MSG_NOTICE([-l is $LIB_HYPER])
  688. AC_MSG_NOTICE([-I is $CPP_HYPER])
  689. AC_MSG_NOTICE([-L is $LD_HYPER])
  690. LDFLAGS="$LDFLAGS $LD_HYPER"
  691. CPPFLAGS="$CPPFLAGS $CPP_HYPER"
  692. LIBS="$LIB_HYPER $LIBS"
  693. if test "x$cross_compiling" != "xyes"; then
  694. dnl remove -L, separate with colon if more than one
  695. DIR_HYPER=`echo $LD_HYPER | $SED -e 's/^-L//' -e 's/ -L/:/g'`
  696. fi
  697. AC_CHECK_LIB(hyper, hyper_io_new,
  698. [
  699. AC_CHECK_HEADERS(hyper.h,
  700. experimental="$experimental Hyper"
  701. AC_MSG_NOTICE([Hyper support is experimental])
  702. curl_h1_msg="enabled (Hyper)"
  703. HYPER_ENABLED=1
  704. AC_DEFINE(USE_HYPER, 1, [if hyper is in use])
  705. AC_SUBST(USE_HYPER, [1])
  706. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_HYPER"
  707. export CURL_LIBRARY_PATH
  708. AC_MSG_NOTICE([Added $DIR_HYPER to CURL_LIBRARY_PATH]),
  709. )
  710. ],
  711. for d in `echo $DIR_HYPER | $SED -e 's/:/ /'`; do
  712. if test -f "$d/libhyper.a"; then
  713. AC_MSG_ERROR([hyper was found in $d but was probably built with wrong flags. See docs/HYPER.md.])
  714. fi
  715. done
  716. AC_MSG_ERROR([--with-hyper but hyper was not found. See docs/HYPER.md.])
  717. )
  718. fi
  719. fi
  720. if test X"$want_hyper" != Xno; then
  721. AC_MSG_NOTICE([Disable RTSP support with hyper])
  722. AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
  723. AC_SUBST(CURL_DISABLE_RTSP, [1])
  724. else
  725. AC_MSG_CHECKING([whether to support rtsp])
  726. AC_ARG_ENABLE(rtsp,
  727. AS_HELP_STRING([--enable-rtsp],[Enable RTSP support])
  728. AS_HELP_STRING([--disable-rtsp],[Disable RTSP support]),
  729. [ case "$enableval" in
  730. no)
  731. AC_MSG_RESULT(no)
  732. AC_DEFINE(CURL_DISABLE_RTSP, 1, [to disable RTSP])
  733. AC_SUBST(CURL_DISABLE_RTSP, [1])
  734. ;;
  735. *)
  736. if test x$CURL_DISABLE_HTTP = x1 ; then
  737. AC_MSG_ERROR(HTTP support needs to be enabled in order to enable RTSP support!)
  738. else
  739. AC_MSG_RESULT(yes)
  740. curl_rtsp_msg="enabled"
  741. fi
  742. ;;
  743. esac ],
  744. if test "x$CURL_DISABLE_HTTP" != "x1"; then
  745. AC_MSG_RESULT(yes)
  746. curl_rtsp_msg="enabled"
  747. else
  748. AC_MSG_RESULT(no)
  749. fi
  750. )
  751. fi
  752. AC_MSG_CHECKING([whether to support proxies])
  753. AC_ARG_ENABLE(proxy,
  754. AS_HELP_STRING([--enable-proxy],[Enable proxy support])
  755. AS_HELP_STRING([--disable-proxy],[Disable proxy support]),
  756. [ case "$enableval" in
  757. no)
  758. AC_MSG_RESULT(no)
  759. AC_DEFINE(CURL_DISABLE_PROXY, 1, [to disable proxies])
  760. AC_SUBST(CURL_DISABLE_PROXY, [1])
  761. https_proxy="no"
  762. ;;
  763. *) AC_MSG_RESULT(yes)
  764. ;;
  765. esac ],
  766. AC_MSG_RESULT(yes)
  767. )
  768. AC_MSG_CHECKING([whether to support dict])
  769. AC_ARG_ENABLE(dict,
  770. AS_HELP_STRING([--enable-dict],[Enable DICT support])
  771. AS_HELP_STRING([--disable-dict],[Disable DICT support]),
  772. [ case "$enableval" in
  773. no)
  774. AC_MSG_RESULT(no)
  775. AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT])
  776. AC_SUBST(CURL_DISABLE_DICT, [1])
  777. ;;
  778. *) AC_MSG_RESULT(yes)
  779. ;;
  780. esac ],
  781. AC_MSG_RESULT(yes)
  782. )
  783. AC_MSG_CHECKING([whether to support telnet])
  784. AC_ARG_ENABLE(telnet,
  785. AS_HELP_STRING([--enable-telnet],[Enable TELNET support])
  786. AS_HELP_STRING([--disable-telnet],[Disable TELNET support]),
  787. [ case "$enableval" in
  788. no)
  789. AC_MSG_RESULT(no)
  790. AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET])
  791. AC_SUBST(CURL_DISABLE_TELNET, [1])
  792. ;;
  793. *) AC_MSG_RESULT(yes)
  794. ;;
  795. esac ],
  796. AC_MSG_RESULT(yes)
  797. )
  798. AC_MSG_CHECKING([whether to support tftp])
  799. AC_ARG_ENABLE(tftp,
  800. AS_HELP_STRING([--enable-tftp],[Enable TFTP support])
  801. AS_HELP_STRING([--disable-tftp],[Disable TFTP support]),
  802. [ case "$enableval" in
  803. no)
  804. AC_MSG_RESULT(no)
  805. AC_DEFINE(CURL_DISABLE_TFTP, 1, [to disable TFTP])
  806. AC_SUBST(CURL_DISABLE_TFTP, [1])
  807. ;;
  808. *) AC_MSG_RESULT(yes)
  809. ;;
  810. esac ],
  811. AC_MSG_RESULT(yes)
  812. )
  813. AC_MSG_CHECKING([whether to support pop3])
  814. AC_ARG_ENABLE(pop3,
  815. AS_HELP_STRING([--enable-pop3],[Enable POP3 support])
  816. AS_HELP_STRING([--disable-pop3],[Disable POP3 support]),
  817. [ case "$enableval" in
  818. no)
  819. AC_MSG_RESULT(no)
  820. AC_DEFINE(CURL_DISABLE_POP3, 1, [to disable POP3])
  821. AC_SUBST(CURL_DISABLE_POP3, [1])
  822. ;;
  823. *) AC_MSG_RESULT(yes)
  824. ;;
  825. esac ],
  826. AC_MSG_RESULT(yes)
  827. )
  828. AC_MSG_CHECKING([whether to support imap])
  829. AC_ARG_ENABLE(imap,
  830. AS_HELP_STRING([--enable-imap],[Enable IMAP support])
  831. AS_HELP_STRING([--disable-imap],[Disable IMAP support]),
  832. [ case "$enableval" in
  833. no)
  834. AC_MSG_RESULT(no)
  835. AC_DEFINE(CURL_DISABLE_IMAP, 1, [to disable IMAP])
  836. AC_SUBST(CURL_DISABLE_IMAP, [1])
  837. ;;
  838. *) AC_MSG_RESULT(yes)
  839. ;;
  840. esac ],
  841. AC_MSG_RESULT(yes)
  842. )
  843. AC_MSG_CHECKING([whether to support smb])
  844. AC_ARG_ENABLE(smb,
  845. AS_HELP_STRING([--enable-smb],[Enable SMB/CIFS support])
  846. AS_HELP_STRING([--disable-smb],[Disable SMB/CIFS support]),
  847. [ case "$enableval" in
  848. no)
  849. AC_MSG_RESULT(no)
  850. AC_DEFINE(CURL_DISABLE_SMB, 1, [to disable SMB/CIFS])
  851. AC_SUBST(CURL_DISABLE_SMB, [1])
  852. ;;
  853. *) AC_MSG_RESULT(yes)
  854. ;;
  855. esac ],
  856. AC_MSG_RESULT(yes)
  857. )
  858. AC_MSG_CHECKING([whether to support smtp])
  859. AC_ARG_ENABLE(smtp,
  860. AS_HELP_STRING([--enable-smtp],[Enable SMTP support])
  861. AS_HELP_STRING([--disable-smtp],[Disable SMTP support]),
  862. [ case "$enableval" in
  863. no)
  864. AC_MSG_RESULT(no)
  865. AC_DEFINE(CURL_DISABLE_SMTP, 1, [to disable SMTP])
  866. AC_SUBST(CURL_DISABLE_SMTP, [1])
  867. ;;
  868. *) AC_MSG_RESULT(yes)
  869. ;;
  870. esac ],
  871. AC_MSG_RESULT(yes)
  872. )
  873. AC_MSG_CHECKING([whether to support gopher])
  874. AC_ARG_ENABLE(gopher,
  875. AS_HELP_STRING([--enable-gopher],[Enable Gopher support])
  876. AS_HELP_STRING([--disable-gopher],[Disable Gopher support]),
  877. [ case "$enableval" in
  878. no)
  879. AC_MSG_RESULT(no)
  880. AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable Gopher])
  881. AC_SUBST(CURL_DISABLE_GOPHER, [1])
  882. ;;
  883. *) AC_MSG_RESULT(yes)
  884. ;;
  885. esac ],
  886. AC_MSG_RESULT(yes)
  887. )
  888. AC_MSG_CHECKING([whether to support mqtt])
  889. AC_ARG_ENABLE(mqtt,
  890. AS_HELP_STRING([--enable-mqtt],[Enable MQTT support])
  891. AS_HELP_STRING([--disable-mqtt],[Disable MQTT support]),
  892. [ case "$enableval" in
  893. no)
  894. AC_MSG_RESULT(no)
  895. AC_DEFINE(CURL_DISABLE_MQTT, 1, [to disable MQTT])
  896. AC_SUBST(CURL_DISABLE_MQTT, [1])
  897. ;;
  898. *) AC_MSG_RESULT(yes)
  899. ;;
  900. esac ],
  901. AC_MSG_RESULT(no)
  902. )
  903. dnl **********************************************************************
  904. dnl Check for built-in manual
  905. dnl **********************************************************************
  906. AC_MSG_CHECKING([whether to provide built-in manual])
  907. AC_ARG_ENABLE(manual,
  908. AS_HELP_STRING([--enable-manual],[Enable built-in manual])
  909. AS_HELP_STRING([--disable-manual],[Disable built-in manual]),
  910. [ case "$enableval" in
  911. no)
  912. AC_MSG_RESULT(no)
  913. ;;
  914. *) AC_MSG_RESULT(yes)
  915. USE_MANUAL="1"
  916. ;;
  917. esac ],
  918. AC_MSG_RESULT(yes)
  919. USE_MANUAL="1"
  920. )
  921. dnl The actual use of the USE_MANUAL variable is done much later in this
  922. dnl script to allow other actions to disable it as well.
  923. dnl **********************************************************************
  924. dnl Check whether to build documentation
  925. dnl **********************************************************************
  926. AC_MSG_CHECKING([whether to build documentation])
  927. AC_ARG_ENABLE(docs,
  928. AS_HELP_STRING([--enable-docs],[Enable documentation])
  929. AS_HELP_STRING([--disable-docs],[Disable documentation]),
  930. [ case "$enableval" in
  931. no)
  932. AC_MSG_RESULT(no)
  933. BUILD_DOCS=0
  934. dnl disable manual too because it needs built documentation
  935. USE_MANUAL=0
  936. curl_docs_msg="no"
  937. ;;
  938. *) AC_MSG_RESULT(yes)
  939. BUILD_DOCS=1
  940. ;;
  941. esac ],
  942. AC_MSG_RESULT(yes)
  943. BUILD_DOCS=1
  944. )
  945. dnl ************************************************************
  946. dnl disable C code generation support
  947. dnl
  948. AC_MSG_CHECKING([whether to enable generation of C code])
  949. AC_ARG_ENABLE(libcurl_option,
  950. AS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
  951. AS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
  952. [ case "$enableval" in
  953. no)
  954. AC_MSG_RESULT(no)
  955. AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
  956. curl_libcurl_msg="no"
  957. ;;
  958. *) AC_MSG_RESULT(yes)
  959. ;;
  960. esac ],
  961. AC_MSG_RESULT(yes)
  962. )
  963. dnl **********************************************************************
  964. dnl Checks for libraries.
  965. dnl **********************************************************************
  966. AC_MSG_CHECKING([whether to use libgcc])
  967. AC_ARG_ENABLE(libgcc,
  968. AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
  969. [ case "$enableval" in
  970. yes)
  971. LIBS="-lgcc $LIBS"
  972. AC_MSG_RESULT(yes)
  973. ;;
  974. *) AC_MSG_RESULT(no)
  975. ;;
  976. esac ],
  977. AC_MSG_RESULT(no)
  978. )
  979. CURL_CHECK_LIB_XNET
  980. dnl gethostbyname without lib or in the nsl lib?
  981. AC_CHECK_FUNC(gethostbyname,
  982. [HAVE_GETHOSTBYNAME="1"
  983. ],
  984. [ AC_CHECK_LIB(nsl, gethostbyname,
  985. [HAVE_GETHOSTBYNAME="1"
  986. LIBS="-lnsl $LIBS"
  987. ])
  988. ])
  989. if test "$HAVE_GETHOSTBYNAME" != "1"
  990. then
  991. dnl gethostbyname in the socket lib?
  992. AC_CHECK_LIB(socket, gethostbyname,
  993. [HAVE_GETHOSTBYNAME="1"
  994. LIBS="-lsocket $LIBS"
  995. ])
  996. fi
  997. if test "$HAVE_GETHOSTBYNAME" != "1"
  998. then
  999. dnl gethostbyname in the watt lib?
  1000. AC_CHECK_LIB(watt, gethostbyname,
  1001. [HAVE_GETHOSTBYNAME="1"
  1002. CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
  1003. LDFLAGS="-L/dev/env/WATT_ROOT/lib"
  1004. LIBS="-lwatt $LIBS"
  1005. ])
  1006. fi
  1007. dnl At least one system has been identified to require BOTH nsl and socket
  1008. dnl libs at the same time to link properly.
  1009. if test "$HAVE_GETHOSTBYNAME" != "1"
  1010. then
  1011. AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
  1012. my_ac_save_LIBS=$LIBS
  1013. LIBS="-lnsl -lsocket $LIBS"
  1014. AC_LINK_IFELSE([
  1015. AC_LANG_PROGRAM([[
  1016. ]],[[
  1017. gethostbyname();
  1018. ]])
  1019. ],[
  1020. AC_MSG_RESULT([yes])
  1021. HAVE_GETHOSTBYNAME="1"
  1022. ],[
  1023. AC_MSG_RESULT([no])
  1024. LIBS=$my_ac_save_LIBS
  1025. ])
  1026. fi
  1027. if test "$HAVE_GETHOSTBYNAME" != "1"
  1028. then
  1029. dnl This is for winsock systems
  1030. if test "$curl_cv_native_windows" = "yes"; then
  1031. winsock_LIB="-lws2_32"
  1032. if test ! -z "$winsock_LIB"; then
  1033. my_ac_save_LIBS=$LIBS
  1034. LIBS="$winsock_LIB $LIBS"
  1035. AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
  1036. AC_LINK_IFELSE([
  1037. AC_LANG_PROGRAM([[
  1038. #ifdef _WIN32
  1039. #ifndef WIN32_LEAN_AND_MEAN
  1040. #define WIN32_LEAN_AND_MEAN
  1041. #endif
  1042. #include <winsock2.h>
  1043. #endif
  1044. ]],[[
  1045. gethostbyname("localhost");
  1046. ]])
  1047. ],[
  1048. AC_MSG_RESULT([yes])
  1049. HAVE_GETHOSTBYNAME="1"
  1050. ],[
  1051. AC_MSG_RESULT([no])
  1052. winsock_LIB=""
  1053. LIBS=$my_ac_save_LIBS
  1054. ])
  1055. fi
  1056. fi
  1057. fi
  1058. if test "$HAVE_GETHOSTBYNAME" != "1"
  1059. then
  1060. dnl This is for Minix 3.1
  1061. AC_MSG_CHECKING([for gethostbyname for Minix 3])
  1062. AC_LINK_IFELSE([
  1063. AC_LANG_PROGRAM([[
  1064. /* Older Minix versions may need <net/gen/netdb.h> here instead */
  1065. #include <netdb.h>
  1066. ]],[[
  1067. gethostbyname("localhost");
  1068. ]])
  1069. ],[
  1070. AC_MSG_RESULT([yes])
  1071. HAVE_GETHOSTBYNAME="1"
  1072. ],[
  1073. AC_MSG_RESULT([no])
  1074. ])
  1075. fi
  1076. if test "$HAVE_GETHOSTBYNAME" != "1"
  1077. then
  1078. dnl This is for eCos with a stubbed DNS implementation
  1079. AC_MSG_CHECKING([for gethostbyname for eCos])
  1080. AC_LINK_IFELSE([
  1081. AC_LANG_PROGRAM([[
  1082. #include <stdio.h>
  1083. #include <netdb.h>
  1084. ]],[[
  1085. gethostbyname("localhost");
  1086. ]])
  1087. ],[
  1088. AC_MSG_RESULT([yes])
  1089. HAVE_GETHOSTBYNAME="1"
  1090. ],[
  1091. AC_MSG_RESULT([no])
  1092. ])
  1093. fi
  1094. if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
  1095. then
  1096. dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
  1097. AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
  1098. AC_LINK_IFELSE([
  1099. AC_LANG_PROGRAM([[
  1100. #define __USE_INLINE__
  1101. #include <proto/bsdsocket.h>
  1102. #ifdef __amigaos4__
  1103. struct SocketIFace *ISocket = NULL;
  1104. #else
  1105. struct Library *SocketBase = NULL;
  1106. #endif
  1107. ]],[[
  1108. gethostbyname("localhost");
  1109. ]])
  1110. ],[
  1111. AC_MSG_RESULT([yes])
  1112. HAVE_GETHOSTBYNAME="1"
  1113. HAVE_PROTO_BSDSOCKET_H="1"
  1114. AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use])
  1115. AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1])
  1116. ],[
  1117. AC_MSG_RESULT([no])
  1118. ])
  1119. fi
  1120. if test "$HAVE_GETHOSTBYNAME" != "1"
  1121. then
  1122. dnl gethostbyname in the network lib - for Haiku OS
  1123. AC_CHECK_LIB(network, gethostbyname,
  1124. [HAVE_GETHOSTBYNAME="1"
  1125. LIBS="-lnetwork $LIBS"
  1126. ])
  1127. fi
  1128. if test "$HAVE_GETHOSTBYNAME" != "1"; then
  1129. AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
  1130. fi
  1131. CURL_CHECK_LIBS_CONNECT
  1132. CURL_NETWORK_LIBS=$LIBS
  1133. dnl **********************************************************************
  1134. dnl In case that function clock_gettime with monotonic timer is available,
  1135. dnl check for additional required libraries.
  1136. dnl **********************************************************************
  1137. CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
  1138. dnl Check for even better option
  1139. CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
  1140. dnl **********************************************************************
  1141. dnl The preceding library checks are all potentially useful for test
  1142. dnl servers and libtest cases which require networking and clock_gettime
  1143. dnl support. Save the list of required libraries at this point for use
  1144. dnl while linking those test servers and programs.
  1145. dnl **********************************************************************
  1146. CURL_NETWORK_AND_TIME_LIBS=$LIBS
  1147. dnl **********************************************************************
  1148. dnl Check for the presence of ZLIB libraries and headers
  1149. dnl **********************************************************************
  1150. dnl Check for & handle argument to --with-zlib.
  1151. clean_CPPFLAGS=$CPPFLAGS
  1152. clean_LDFLAGS=$LDFLAGS
  1153. clean_LIBS=$LIBS
  1154. ZLIB_LIBS=""
  1155. AC_ARG_WITH(zlib,
  1156. AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
  1157. AS_HELP_STRING([--without-zlib],[disable use of zlib]),
  1158. [OPT_ZLIB="$withval"])
  1159. if test "$OPT_ZLIB" = "no" ; then
  1160. AC_MSG_WARN([zlib disabled])
  1161. else
  1162. if test "$OPT_ZLIB" = "yes" ; then
  1163. OPT_ZLIB=""
  1164. fi
  1165. if test -z "$OPT_ZLIB" ; then
  1166. CURL_CHECK_PKGCONFIG(zlib)
  1167. if test "$PKGCONFIG" != "no" ; then
  1168. ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`"
  1169. if test -n "$ZLIB_LIBS"; then
  1170. LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
  1171. else
  1172. ZLIB_LIBS="`$PKGCONFIG --libs zlib`"
  1173. fi
  1174. LIBS="$ZLIB_LIBS $LIBS"
  1175. CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`"
  1176. OPT_ZLIB=""
  1177. HAVE_LIBZ="1"
  1178. fi
  1179. if test -z "$HAVE_LIBZ"; then
  1180. dnl Check for the lib without setting any new path, since many
  1181. dnl people have it in the default path
  1182. AC_CHECK_LIB(z, inflateEnd,
  1183. dnl libz found, set the variable
  1184. [HAVE_LIBZ="1"
  1185. ZLIB_LIBS="-lz"
  1186. LIBS="$ZLIB_LIBS $LIBS"],
  1187. dnl if no lib found, try /usr/local
  1188. [OPT_ZLIB="/usr/local"])
  1189. fi
  1190. fi
  1191. dnl Add a nonempty path to the compiler flags
  1192. if test -n "$OPT_ZLIB"; then
  1193. CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
  1194. LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
  1195. fi
  1196. AC_CHECK_HEADER(zlib.h,
  1197. [
  1198. dnl zlib.h was found
  1199. HAVE_ZLIB_H="1"
  1200. dnl if the lib wasn't found already, try again with the new paths
  1201. if test "$HAVE_LIBZ" != "1"; then
  1202. AC_CHECK_LIB(z, gzread,
  1203. [
  1204. dnl the lib was found!
  1205. HAVE_LIBZ="1"
  1206. ZLIB_LIBS="-lz"
  1207. LIBS="$ZLIB_LIBS $LIBS"
  1208. ],
  1209. [ CPPFLAGS=$clean_CPPFLAGS
  1210. LDFLAGS=$clean_LDFLAGS])
  1211. fi
  1212. ],
  1213. [
  1214. dnl zlib.h was not found, restore the flags
  1215. CPPFLAGS=$clean_CPPFLAGS
  1216. LDFLAGS=$clean_LDFLAGS]
  1217. )
  1218. if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
  1219. then
  1220. AC_MSG_WARN([configure found only the libz lib, not the header file!])
  1221. HAVE_LIBZ=""
  1222. CPPFLAGS=$clean_CPPFLAGS
  1223. LDFLAGS=$clean_LDFLAGS
  1224. LIBS=$clean_LIBS
  1225. ZLIB_LIBS=""
  1226. elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
  1227. then
  1228. AC_MSG_WARN([configure found only the libz header file, not the lib!])
  1229. CPPFLAGS=$clean_CPPFLAGS
  1230. LDFLAGS=$clean_LDFLAGS
  1231. LIBS=$clean_LIBS
  1232. ZLIB_LIBS=""
  1233. elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
  1234. then
  1235. dnl both header and lib were found!
  1236. AC_SUBST(HAVE_LIBZ)
  1237. AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
  1238. LIBS="$ZLIB_LIBS $clean_LIBS"
  1239. dnl replace 'HAVE_LIBZ' in the automake makefile.ams
  1240. AMFIXLIB="1"
  1241. AC_MSG_NOTICE([found both libz and libz.h header])
  1242. curl_zlib_msg="enabled"
  1243. fi
  1244. fi
  1245. dnl set variable for use in automakefile(s)
  1246. AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
  1247. AC_SUBST(ZLIB_LIBS)
  1248. dnl **********************************************************************
  1249. dnl Check for the presence of BROTLI decoder libraries and headers
  1250. dnl **********************************************************************
  1251. dnl Brotli project home page: https://github.com/google/brotli
  1252. dnl Default to compiler & linker defaults for BROTLI files & libraries.
  1253. OPT_BROTLI=off
  1254. AC_ARG_WITH(brotli,dnl
  1255. AS_HELP_STRING([--with-brotli=PATH],[Where to look for brotli, PATH points to the BROTLI installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1256. AS_HELP_STRING([--without-brotli], [disable BROTLI]),
  1257. OPT_BROTLI=$withval)
  1258. if test X"$OPT_BROTLI" != Xno; then
  1259. dnl backup the pre-brotli variables
  1260. CLEANLDFLAGS="$LDFLAGS"
  1261. CLEANCPPFLAGS="$CPPFLAGS"
  1262. CLEANLIBS="$LIBS"
  1263. case "$OPT_BROTLI" in
  1264. yes)
  1265. dnl --with-brotli (without path) used
  1266. CURL_CHECK_PKGCONFIG(libbrotlidec)
  1267. if test "$PKGCONFIG" != "no" ; then
  1268. LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
  1269. LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
  1270. CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
  1271. version=`$PKGCONFIG --modversion libbrotlidec`
  1272. DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'`
  1273. fi
  1274. ;;
  1275. off)
  1276. dnl no --with-brotli option given, just check default places
  1277. ;;
  1278. *)
  1279. dnl use the given --with-brotli spot
  1280. PREFIX_BROTLI=$OPT_BROTLI
  1281. ;;
  1282. esac
  1283. dnl if given with a prefix, we set -L and -I based on that
  1284. if test -n "$PREFIX_BROTLI"; then
  1285. LIB_BROTLI="-lbrotlidec"
  1286. LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
  1287. CPP_BROTLI=-I${PREFIX_BROTLI}/include
  1288. DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
  1289. fi
  1290. LDFLAGS="$LDFLAGS $LD_BROTLI"
  1291. CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
  1292. LIBS="$LIB_BROTLI $LIBS"
  1293. AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
  1294. AC_CHECK_HEADERS(brotli/decode.h,
  1295. curl_brotli_msg="enabled (libbrotlidec)"
  1296. HAVE_BROTLI=1
  1297. AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use])
  1298. AC_SUBST(HAVE_BROTLI, [1])
  1299. )
  1300. if test X"$OPT_BROTLI" != Xoff &&
  1301. test "$HAVE_BROTLI" != "1"; then
  1302. AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
  1303. fi
  1304. if test "$HAVE_BROTLI" = "1"; then
  1305. if test -n "$DIR_BROTLI"; then
  1306. dnl when the brotli shared libs were found in a path that the run-time
  1307. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  1308. dnl to prevent further configure tests to fail due to this
  1309. if test "x$cross_compiling" != "xyes"; then
  1310. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
  1311. export CURL_LIBRARY_PATH
  1312. AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
  1313. fi
  1314. fi
  1315. else
  1316. dnl no brotli, revert back to clean variables
  1317. LDFLAGS=$CLEANLDFLAGS
  1318. CPPFLAGS=$CLEANCPPFLAGS
  1319. LIBS=$CLEANLIBS
  1320. fi
  1321. fi
  1322. dnl **********************************************************************
  1323. dnl Check for libzstd
  1324. dnl **********************************************************************
  1325. dnl Default to compiler & linker defaults for libzstd
  1326. OPT_ZSTD=off
  1327. AC_ARG_WITH(zstd,dnl
  1328. AS_HELP_STRING([--with-zstd=PATH],[Where to look for libzstd, PATH points to the libzstd installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1329. AS_HELP_STRING([--without-zstd], [disable libzstd]),
  1330. OPT_ZSTD=$withval)
  1331. if test X"$OPT_ZSTD" != Xno; then
  1332. dnl backup the pre-zstd variables
  1333. CLEANLDFLAGS="$LDFLAGS"
  1334. CLEANCPPFLAGS="$CPPFLAGS"
  1335. CLEANLIBS="$LIBS"
  1336. case "$OPT_ZSTD" in
  1337. yes)
  1338. dnl --with-zstd (without path) used
  1339. CURL_CHECK_PKGCONFIG(libzstd)
  1340. if test "$PKGCONFIG" != "no" ; then
  1341. LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd`
  1342. LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd`
  1343. CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd`
  1344. version=`$PKGCONFIG --modversion libzstd`
  1345. DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'`
  1346. fi
  1347. ;;
  1348. off)
  1349. dnl no --with-zstd option given, just check default places
  1350. ;;
  1351. *)
  1352. dnl use the given --with-zstd spot
  1353. PREFIX_ZSTD=$OPT_ZSTD
  1354. ;;
  1355. esac
  1356. dnl if given with a prefix, we set -L and -I based on that
  1357. if test -n "$PREFIX_ZSTD"; then
  1358. LIB_ZSTD="-lzstd"
  1359. LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff
  1360. CPP_ZSTD=-I${PREFIX_ZSTD}/include
  1361. DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff
  1362. fi
  1363. LDFLAGS="$LDFLAGS $LD_ZSTD"
  1364. CPPFLAGS="$CPPFLAGS $CPP_ZSTD"
  1365. LIBS="$LIB_ZSTD $LIBS"
  1366. AC_CHECK_LIB(zstd, ZSTD_createDStream)
  1367. AC_CHECK_HEADERS(zstd.h,
  1368. curl_zstd_msg="enabled (libzstd)"
  1369. HAVE_ZSTD=1
  1370. AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use])
  1371. AC_SUBST(HAVE_ZSTD, [1])
  1372. )
  1373. if test X"$OPT_ZSTD" != Xoff &&
  1374. test "$HAVE_ZSTD" != "1"; then
  1375. AC_MSG_ERROR([libzstd was not found where specified!])
  1376. fi
  1377. if test "$HAVE_ZSTD" = "1"; then
  1378. if test -n "$DIR_ZSTD"; then
  1379. dnl when the zstd shared lib were found in a path that the run-time
  1380. dnl linker doesn't search through, we need to add it to
  1381. dnl CURL_LIBRARY_PATH to prevent further configure tests to fail due to
  1382. dnl this
  1383. if test "x$cross_compiling" != "xyes"; then
  1384. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD"
  1385. export CURL_LIBRARY_PATH
  1386. AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH])
  1387. fi
  1388. fi
  1389. else
  1390. dnl no zstd, revert back to clean variables
  1391. LDFLAGS=$CLEANLDFLAGS
  1392. CPPFLAGS=$CLEANCPPFLAGS
  1393. LIBS=$CLEANLIBS
  1394. fi
  1395. fi
  1396. dnl **********************************************************************
  1397. dnl Check for LDAP
  1398. dnl **********************************************************************
  1399. LDAPLIBNAME=""
  1400. AC_ARG_WITH(ldap-lib,
  1401. AS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
  1402. [LDAPLIBNAME="$withval"])
  1403. LBERLIBNAME=""
  1404. AC_ARG_WITH(lber-lib,
  1405. AS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
  1406. [LBERLIBNAME="$withval"])
  1407. if test x$CURL_DISABLE_LDAP != x1 ; then
  1408. CURL_CHECK_HEADER_LBER
  1409. CURL_CHECK_HEADER_LDAP
  1410. CURL_CHECK_HEADER_LDAP_SSL
  1411. if test -z "$LDAPLIBNAME" ; then
  1412. if test "$curl_cv_native_windows" = "yes"; then
  1413. dnl Windows uses a single and unique LDAP library name
  1414. LDAPLIBNAME="wldap32"
  1415. LBERLIBNAME="no"
  1416. fi
  1417. fi
  1418. if test "$LDAPLIBNAME" ; then
  1419. AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
  1420. if test -n "$ldap_askedfor"; then
  1421. AC_MSG_ERROR([couldn't detect the LDAP libraries])
  1422. fi
  1423. AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
  1424. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1425. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1426. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1427. AC_SUBST(CURL_DISABLE_LDAPS, [1])])
  1428. else
  1429. dnl Try to find the right ldap libraries for this system
  1430. CURL_CHECK_LIBS_LDAP
  1431. case X-"$curl_cv_ldap_LIBS" in
  1432. X-unknown)
  1433. if test -n "$ldap_askedfor"; then
  1434. AC_MSG_ERROR([couldn't detect the LDAP libraries])
  1435. fi
  1436. AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
  1437. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1438. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1439. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1440. AC_SUBST(CURL_DISABLE_LDAPS, [1])
  1441. ;;
  1442. esac
  1443. fi
  1444. fi
  1445. if test x$CURL_DISABLE_LDAP != x1 ; then
  1446. if test "$LBERLIBNAME" ; then
  1447. dnl If name is "no" then don't define this library at all
  1448. dnl (it's only needed if libldap.so's dependencies are broken).
  1449. if test "$LBERLIBNAME" != "no" ; then
  1450. AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
  1451. AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
  1452. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1453. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1454. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1455. AC_SUBST(CURL_DISABLE_LDAPS, [1])])
  1456. fi
  1457. fi
  1458. fi
  1459. if test x$CURL_DISABLE_LDAP != x1 ; then
  1460. AC_CHECK_FUNCS([ldap_url_parse \
  1461. ldap_init_fd])
  1462. if test "$LDAPLIBNAME" = "wldap32"; then
  1463. curl_ldap_msg="enabled (winldap)"
  1464. AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
  1465. else
  1466. if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
  1467. curl_ldap_msg="enabled (OpenLDAP)"
  1468. AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
  1469. AC_SUBST(USE_OPENLDAP, [1])
  1470. else
  1471. curl_ldap_msg="enabled (ancient OpenLDAP)"
  1472. fi
  1473. fi
  1474. fi
  1475. if test x$CURL_DISABLE_LDAPS != x1 ; then
  1476. curl_ldaps_msg="enabled"
  1477. fi
  1478. dnl **********************************************************************
  1479. dnl Checks for IPv6
  1480. dnl **********************************************************************
  1481. AC_MSG_CHECKING([whether to enable IPv6])
  1482. AC_ARG_ENABLE(ipv6,
  1483. AS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
  1484. AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
  1485. [ case "$enableval" in
  1486. no)
  1487. AC_MSG_RESULT(no)
  1488. ipv6=no
  1489. ;;
  1490. *) AC_MSG_RESULT(yes)
  1491. ipv6=yes
  1492. ;;
  1493. esac ],
  1494. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1495. /* are AF_INET6 and sockaddr_in6 available? */
  1496. #include <sys/types.h>
  1497. #ifdef _WIN32
  1498. #include <winsock2.h>
  1499. #include <ws2tcpip.h>
  1500. #else
  1501. #include <sys/socket.h>
  1502. #include <netinet/in.h>
  1503. #if defined (__TANDEM)
  1504. # include <netinet/in6.h>
  1505. #endif
  1506. #endif
  1507. int main(void)
  1508. {
  1509. struct sockaddr_in6 s;
  1510. (void)s;
  1511. return socket(AF_INET6, SOCK_STREAM, 0) < 0;
  1512. }
  1513. ]])
  1514. ],
  1515. AC_MSG_RESULT(yes)
  1516. ipv6=yes,
  1517. AC_MSG_RESULT(no)
  1518. ipv6=no,
  1519. AC_MSG_RESULT(yes)
  1520. ipv6=yes
  1521. ))
  1522. if test "$ipv6" = yes; then
  1523. curl_ipv6_msg="enabled"
  1524. AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
  1525. IPV6_ENABLED=1
  1526. AC_SUBST(IPV6_ENABLED)
  1527. AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
  1528. AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
  1529. #include <sys/types.h>
  1530. #ifdef _WIN32
  1531. #include <winsock2.h>
  1532. #include <ws2tcpip.h>
  1533. #else
  1534. #include <netinet/in.h>
  1535. #if defined (__TANDEM)
  1536. # include <netinet/in6.h>
  1537. #endif
  1538. #endif
  1539. ]], [[
  1540. struct sockaddr_in6 s;
  1541. s.sin6_scope_id = 0;
  1542. ]])], [
  1543. AC_MSG_RESULT([yes])
  1544. AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
  1545. ], [
  1546. AC_MSG_RESULT([no])
  1547. ])
  1548. fi
  1549. dnl **********************************************************************
  1550. dnl Check if the operating system allows programs to write to their own argv[]
  1551. dnl **********************************************************************
  1552. AC_MSG_CHECKING([if argv can be written to])
  1553. CURL_RUN_IFELSE([[
  1554. int main(int argc, char **argv)
  1555. {
  1556. #ifdef _WIN32
  1557. /* on Windows, writing to the argv does not hide the argument in
  1558. process lists so it can just be skipped */
  1559. (void)argc;
  1560. (void)argv;
  1561. return 1;
  1562. #else
  1563. (void)argc;
  1564. argv[0][0] = ' ';
  1565. return (argv[0][0] == ' ')?0:1;
  1566. #endif
  1567. }
  1568. ]],[
  1569. curl_cv_writable_argv=yes
  1570. ],[
  1571. curl_cv_writable_argv=no
  1572. ],[
  1573. curl_cv_writable_argv=cross
  1574. ])
  1575. case $curl_cv_writable_argv in
  1576. yes)
  1577. AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
  1578. AC_MSG_RESULT(yes)
  1579. ;;
  1580. no)
  1581. AC_MSG_RESULT(no)
  1582. ;;
  1583. *)
  1584. AC_MSG_RESULT(no)
  1585. AC_MSG_WARN([the previous check could not be made default was used])
  1586. ;;
  1587. esac
  1588. dnl **********************************************************************
  1589. dnl Check for GSS-API libraries
  1590. dnl **********************************************************************
  1591. dnl check for GSS-API stuff in the /usr as default
  1592. GSSAPI_ROOT="/usr"
  1593. AC_ARG_WITH(gssapi-includes,
  1594. AS_HELP_STRING([--with-gssapi-includes=DIR],
  1595. [Specify location of GSS-API headers]),
  1596. [ GSSAPI_INCS="-I$withval"
  1597. want_gss="yes" ]
  1598. )
  1599. AC_ARG_WITH(gssapi-libs,
  1600. AS_HELP_STRING([--with-gssapi-libs=DIR],
  1601. [Specify location of GSS-API libs]),
  1602. [ GSSAPI_LIB_DIR="-L$withval"
  1603. want_gss="yes" ]
  1604. )
  1605. AC_ARG_WITH(gssapi,
  1606. AS_HELP_STRING([--with-gssapi=DIR],
  1607. [Where to look for GSS-API]), [
  1608. GSSAPI_ROOT="$withval"
  1609. if test x"$GSSAPI_ROOT" != xno; then
  1610. want_gss="yes"
  1611. if test x"$GSSAPI_ROOT" = xyes; then
  1612. dnl if yes, then use default root
  1613. GSSAPI_ROOT="/usr"
  1614. fi
  1615. fi
  1616. ])
  1617. : ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
  1618. save_CPPFLAGS="$CPPFLAGS"
  1619. AC_MSG_CHECKING([if GSS-API support is requested])
  1620. if test x"$want_gss" = xyes; then
  1621. AC_MSG_RESULT(yes)
  1622. if test $GSSAPI_ROOT != "/usr"; then
  1623. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
  1624. else
  1625. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
  1626. fi
  1627. if test -z "$GSSAPI_INCS"; then
  1628. if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
  1629. GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
  1630. elif test "$PKGCONFIG" != "no" ; then
  1631. GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
  1632. elif test -f "$KRB5CONFIG"; then
  1633. GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
  1634. elif test "$GSSAPI_ROOT" != "yes"; then
  1635. GSSAPI_INCS="-I$GSSAPI_ROOT/include"
  1636. fi
  1637. fi
  1638. CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
  1639. AC_CHECK_HEADER(gss.h,
  1640. [
  1641. dnl found in the given dirs
  1642. AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
  1643. gnu_gss=yes
  1644. ],
  1645. [
  1646. dnl not found, check Heimdal or MIT
  1647. AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
  1648. AC_CHECK_HEADERS(
  1649. [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
  1650. [],
  1651. [not_mit=1],
  1652. [
  1653. AC_INCLUDES_DEFAULT
  1654. #ifdef HAVE_GSSAPI_GSSAPI_H
  1655. #include <gssapi/gssapi.h>
  1656. #endif
  1657. ])
  1658. if test "x$not_mit" = "x1"; then
  1659. dnl MIT not found, check for Heimdal
  1660. AC_CHECK_HEADER(gssapi.h,
  1661. [],
  1662. [
  1663. dnl no header found, disabling GSS
  1664. want_gss=no
  1665. AC_MSG_WARN(disabling GSS-API support since no header files were found)
  1666. ]
  1667. )
  1668. else
  1669. dnl MIT found
  1670. dnl check if we have a really old MIT Kerberos version (<= 1.2)
  1671. AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
  1672. AC_COMPILE_IFELSE([
  1673. AC_LANG_PROGRAM([[
  1674. #include <gssapi/gssapi.h>
  1675. #include <gssapi/gssapi_generic.h>
  1676. #include <gssapi/gssapi_krb5.h>
  1677. ]],[[
  1678. gss_import_name(
  1679. (OM_uint32 *)0,
  1680. (gss_buffer_t)0,
  1681. GSS_C_NT_HOSTBASED_SERVICE,
  1682. (gss_name_t *)0);
  1683. ]])
  1684. ],[
  1685. AC_MSG_RESULT([yes])
  1686. ],[
  1687. AC_MSG_RESULT([no])
  1688. AC_DEFINE(HAVE_OLD_GSSMIT, 1,
  1689. [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
  1690. ])
  1691. fi
  1692. ]
  1693. )
  1694. else
  1695. AC_MSG_RESULT(no)
  1696. fi
  1697. if test x"$want_gss" = xyes; then
  1698. AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
  1699. HAVE_GSSAPI=1
  1700. curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
  1701. if test -n "$gnu_gss"; then
  1702. curl_gss_msg="enabled (GNU GSS)"
  1703. LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
  1704. LIBS="-lgss $LIBS"
  1705. elif test -z "$GSSAPI_LIB_DIR"; then
  1706. case $host in
  1707. *-*-darwin*)
  1708. LIBS="-lgssapi_krb5 -lresolv $LIBS"
  1709. ;;
  1710. *)
  1711. if test $GSSAPI_ROOT != "/usr"; then
  1712. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
  1713. else
  1714. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
  1715. fi
  1716. if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
  1717. dnl krb5-config doesn't have --libs-only-L or similar, put everything
  1718. dnl into LIBS
  1719. gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
  1720. LIBS="$gss_libs $LIBS"
  1721. elif test "$PKGCONFIG" != "no" ; then
  1722. gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
  1723. LIBS="$gss_libs $LIBS"
  1724. elif test -f "$KRB5CONFIG"; then
  1725. dnl krb5-config doesn't have --libs-only-L or similar, put everything
  1726. dnl into LIBS
  1727. gss_libs=`$KRB5CONFIG --libs gssapi`
  1728. LIBS="$gss_libs $LIBS"
  1729. else
  1730. case $host in
  1731. *-hp-hpux*)
  1732. gss_libname="gss"
  1733. ;;
  1734. *)
  1735. gss_libname="gssapi"
  1736. ;;
  1737. esac
  1738. if test "$GSSAPI_ROOT" != "yes"; then
  1739. LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
  1740. LIBS="-l$gss_libname $LIBS"
  1741. else
  1742. LIBS="-l$gss_libname $LIBS"
  1743. fi
  1744. fi
  1745. ;;
  1746. esac
  1747. else
  1748. LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
  1749. case $host in
  1750. *-hp-hpux*)
  1751. LIBS="-lgss $LIBS"
  1752. ;;
  1753. *)
  1754. LIBS="-lgssapi $LIBS"
  1755. ;;
  1756. esac
  1757. fi
  1758. else
  1759. CPPFLAGS="$save_CPPFLAGS"
  1760. fi
  1761. if test x"$want_gss" = xyes; then
  1762. AC_MSG_CHECKING([if we can link against GSS-API library])
  1763. AC_LINK_IFELSE([
  1764. AC_LANG_FUNC_LINK_TRY([gss_init_sec_context])
  1765. ],[
  1766. AC_MSG_RESULT([yes])
  1767. ],[
  1768. AC_MSG_RESULT([no])
  1769. AC_MSG_ERROR([--with-gssapi was specified, but a GSS-API library was not found.])
  1770. ])
  1771. fi
  1772. build_libstubgss=no
  1773. if test x"$want_gss" = "xyes"; then
  1774. build_libstubgss=yes
  1775. fi
  1776. AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes")
  1777. dnl -------------------------------------------------------------
  1778. dnl parse --with-default-ssl-backend so it can be validated below
  1779. dnl -------------------------------------------------------------
  1780. DEFAULT_SSL_BACKEND=no
  1781. VALID_DEFAULT_SSL_BACKEND=
  1782. AC_ARG_WITH(default-ssl-backend,
  1783. AS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
  1784. AS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
  1785. [DEFAULT_SSL_BACKEND=$withval])
  1786. case "$DEFAULT_SSL_BACKEND" in
  1787. no)
  1788. dnl --without-default-ssl-backend option used
  1789. ;;
  1790. default|yes)
  1791. dnl --with-default-ssl-backend option used without name
  1792. AC_MSG_ERROR([The name of the default SSL backend is required.])
  1793. ;;
  1794. *)
  1795. dnl --with-default-ssl-backend option used with name
  1796. AC_SUBST(DEFAULT_SSL_BACKEND)
  1797. dnl needs to be validated below
  1798. VALID_DEFAULT_SSL_BACKEND=no
  1799. ;;
  1800. esac
  1801. CURL_WITH_SCHANNEL
  1802. CURL_WITH_SECURETRANSPORT
  1803. CURL_WITH_AMISSL
  1804. CURL_WITH_OPENSSL
  1805. CURL_WITH_GNUTLS
  1806. CURL_WITH_MBEDTLS
  1807. CURL_WITH_WOLFSSL
  1808. CURL_WITH_BEARSSL
  1809. CURL_WITH_RUSTLS
  1810. dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
  1811. if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
  1812. LIBS="-ladvapi32 -lcrypt32 $LIBS"
  1813. fi
  1814. dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
  1815. if test "x$curl_cv_native_windows" = "xyes"; then
  1816. LIBS="-lbcrypt $LIBS"
  1817. fi
  1818. case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
  1819. in
  1820. x)
  1821. AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
  1822. Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
  1823. ;;
  1824. x1)
  1825. # one SSL backend is enabled
  1826. AC_SUBST(SSL_ENABLED)
  1827. SSL_ENABLED="1"
  1828. AC_MSG_NOTICE([built with one SSL backend])
  1829. ;;
  1830. xD)
  1831. # explicitly built without TLS
  1832. ;;
  1833. xD*)
  1834. AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
  1835. (e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
  1836. Since these are conflicting parameters, verify which is the desired one and drop the other.])
  1837. ;;
  1838. *)
  1839. # more than one SSL backend is enabled
  1840. AC_SUBST(SSL_ENABLED)
  1841. SSL_ENABLED="1"
  1842. AC_SUBST(CURL_WITH_MULTI_SSL)
  1843. CURL_WITH_MULTI_SSL="1"
  1844. AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
  1845. AC_MSG_NOTICE([built with multiple SSL backends])
  1846. ;;
  1847. esac
  1848. if test -n "$ssl_backends"; then
  1849. curl_ssl_msg="enabled ($ssl_backends)"
  1850. fi
  1851. if test no = "$VALID_DEFAULT_SSL_BACKEND"
  1852. then
  1853. if test -n "$SSL_ENABLED"
  1854. then
  1855. AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!])
  1856. else
  1857. AC_MSG_ERROR([Default SSL backend requires SSL!])
  1858. fi
  1859. elif test yes = "$VALID_DEFAULT_SSL_BACKEND"
  1860. then
  1861. AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
  1862. fi
  1863. dnl **********************************************************************
  1864. dnl Check for the CA bundle
  1865. dnl **********************************************************************
  1866. if test -n "$check_for_ca_bundle"; then
  1867. CURL_CHECK_CA_BUNDLE
  1868. fi
  1869. dnl **********************************************************************
  1870. dnl Check for libpsl
  1871. dnl **********************************************************************
  1872. dnl Default to compiler & linker defaults for LIBPSL files & libraries.
  1873. OPT_LIBPSL=off
  1874. AC_ARG_WITH(libpsl,dnl
  1875. AS_HELP_STRING([--with-libpsl=PATH],[Where to look for libpsl, PATH points to the LIBPSL installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1876. AS_HELP_STRING([--without-libpsl], [disable LIBPSL]),
  1877. OPT_LIBPSL=$withval)
  1878. if test X"$OPT_LIBPSL" != Xno; then
  1879. dnl backup the pre-libpsl variables
  1880. CLEANLDFLAGS="$LDFLAGS"
  1881. CLEANCPPFLAGS="$CPPFLAGS"
  1882. CLEANLIBS="$LIBS"
  1883. case "$OPT_LIBPSL" in
  1884. yes)
  1885. dnl --with-libpsl (without path) used
  1886. CURL_CHECK_PKGCONFIG(libpsl)
  1887. if test "$PKGCONFIG" != "no" ; then
  1888. LIB_PSL=`$PKGCONFIG --libs-only-l libpsl`
  1889. LD_PSL=`$PKGCONFIG --libs-only-L libpsl`
  1890. CPP_PSL=`$PKGCONFIG --cflags-only-I libpsl`
  1891. else
  1892. dnl no libpsl pkg-config found
  1893. LIB_PSL="-lpsl"
  1894. fi
  1895. ;;
  1896. off)
  1897. dnl no --with-libpsl option given, just check default places
  1898. LIB_PSL="-lpsl"
  1899. ;;
  1900. *)
  1901. dnl use the given --with-libpsl spot
  1902. LIB_PSL="-lpsl"
  1903. PREFIX_PSL=$OPT_LIBPSL
  1904. ;;
  1905. esac
  1906. dnl if given with a prefix, we set -L and -I based on that
  1907. if test -n "$PREFIX_PSL"; then
  1908. LD_PSL=-L${PREFIX_PSL}/lib$libsuff
  1909. CPP_PSL=-I${PREFIX_PSL}/include
  1910. fi
  1911. LDFLAGS="$LDFLAGS $LD_PSL"
  1912. CPPFLAGS="$CPPFLAGS $CPP_PSL"
  1913. LIBS="$LIB_PSL $LIBS"
  1914. AC_CHECK_LIB(psl, psl_builtin,
  1915. [
  1916. AC_CHECK_HEADERS(libpsl.h,
  1917. curl_psl_msg="enabled"
  1918. LIBPSL_ENABLED=1
  1919. AC_DEFINE(USE_LIBPSL, 1, [if libpsl is in use])
  1920. AC_SUBST(USE_LIBPSL, [1])
  1921. )
  1922. ],
  1923. dnl not found, revert back to clean variables
  1924. LDFLAGS=$CLEANLDFLAGS
  1925. CPPFLAGS=$CLEANCPPFLAGS
  1926. LIBS=$CLEANLIBS
  1927. )
  1928. if test X"$OPT_LIBPSL" != Xoff &&
  1929. test "$LIBPSL_ENABLED" != "1"; then
  1930. AC_MSG_ERROR([libpsl libs and/or directories were not found where specified!])
  1931. fi
  1932. fi
  1933. AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
  1934. dnl **********************************************************************
  1935. dnl Check for libgsasl
  1936. dnl **********************************************************************
  1937. AC_ARG_WITH(libgsasl,
  1938. AS_HELP_STRING([--without-libgsasl],
  1939. [disable libgsasl support for SCRAM]),
  1940. with_libgsasl=$withval,
  1941. with_libgsasl=yes)
  1942. if test $with_libgsasl != "no"; then
  1943. AC_SEARCH_LIBS(gsasl_init, gsasl,
  1944. [curl_gsasl_msg="enabled";
  1945. AC_DEFINE([USE_GSASL], [1], [GSASL support enabled])
  1946. ],
  1947. [curl_gsasl_msg="no (libgsasl not found)";
  1948. AC_MSG_WARN([libgsasl was not found])
  1949. ]
  1950. )
  1951. fi
  1952. AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
  1953. AC_ARG_WITH(libmetalink,,
  1954. AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!]))
  1955. dnl **********************************************************************
  1956. dnl Check for the presence of LIBSSH2 libraries and headers
  1957. dnl **********************************************************************
  1958. dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
  1959. OPT_LIBSSH2=off
  1960. AC_ARG_WITH(libssh2,dnl
  1961. AS_HELP_STRING([--with-libssh2=PATH],[Where to look for libssh2, PATH points to the libssh2 installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1962. AS_HELP_STRING([--with-libssh2], [enable libssh2]),
  1963. OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
  1964. OPT_LIBSSH=off
  1965. AC_ARG_WITH(libssh,dnl
  1966. AS_HELP_STRING([--with-libssh=PATH],[Where to look for libssh, PATH points to the libssh installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1967. AS_HELP_STRING([--with-libssh], [enable libssh]),
  1968. OPT_LIBSSH=$withval, OPT_LIBSSH=no)
  1969. OPT_WOLFSSH=off
  1970. AC_ARG_WITH(wolfssh,dnl
  1971. AS_HELP_STRING([--with-wolfssh=PATH],[Where to look for wolfssh, PATH points to the wolfSSH installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  1972. AS_HELP_STRING([--with-wolfssh], [enable wolfssh]),
  1973. OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
  1974. if test X"$OPT_LIBSSH2" != Xno; then
  1975. dnl backup the pre-libssh2 variables
  1976. CLEANLDFLAGS="$LDFLAGS"
  1977. CLEANCPPFLAGS="$CPPFLAGS"
  1978. CLEANLIBS="$LIBS"
  1979. case "$OPT_LIBSSH2" in
  1980. yes)
  1981. dnl --with-libssh2 (without path) used
  1982. CURL_CHECK_PKGCONFIG(libssh2)
  1983. if test "$PKGCONFIG" != "no" ; then
  1984. LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
  1985. LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
  1986. CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
  1987. version=`$PKGCONFIG --modversion libssh2`
  1988. DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'`
  1989. fi
  1990. ;;
  1991. off)
  1992. dnl no --with-libssh2 option given, just check default places
  1993. ;;
  1994. *)
  1995. dnl use the given --with-libssh2 spot
  1996. PREFIX_SSH2=$OPT_LIBSSH2
  1997. ;;
  1998. esac
  1999. dnl if given with a prefix, we set -L and -I based on that
  2000. if test -n "$PREFIX_SSH2"; then
  2001. LIB_SSH2="-lssh2"
  2002. LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
  2003. CPP_SSH2=-I${PREFIX_SSH2}/include
  2004. DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
  2005. fi
  2006. LDFLAGS="$LDFLAGS $LD_SSH2"
  2007. CPPFLAGS="$CPPFLAGS $CPP_SSH2"
  2008. LIBS="$LIB_SSH2 $LIBS"
  2009. dnl check for function added in libssh2 version 1.0
  2010. AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
  2011. AC_CHECK_HEADER(libssh2.h,
  2012. curl_ssh_msg="enabled (libSSH2)"
  2013. LIBSSH2_ENABLED=1
  2014. AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
  2015. AC_SUBST(USE_LIBSSH2, [1])
  2016. )
  2017. if test X"$OPT_LIBSSH2" != Xoff &&
  2018. test "$LIBSSH2_ENABLED" != "1"; then
  2019. AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
  2020. fi
  2021. if test "$LIBSSH2_ENABLED" = "1"; then
  2022. if test -n "$DIR_SSH2"; then
  2023. dnl when the libssh2 shared libs were found in a path that the run-time
  2024. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  2025. dnl to prevent further configure tests to fail due to this
  2026. if test "x$cross_compiling" != "xyes"; then
  2027. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
  2028. export CURL_LIBRARY_PATH
  2029. AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
  2030. fi
  2031. fi
  2032. else
  2033. dnl no libssh2, revert back to clean variables
  2034. LDFLAGS=$CLEANLDFLAGS
  2035. CPPFLAGS=$CLEANCPPFLAGS
  2036. LIBS=$CLEANLIBS
  2037. fi
  2038. elif test X"$OPT_LIBSSH" != Xno; then
  2039. dnl backup the pre-libssh variables
  2040. CLEANLDFLAGS="$LDFLAGS"
  2041. CLEANCPPFLAGS="$CPPFLAGS"
  2042. CLEANLIBS="$LIBS"
  2043. case "$OPT_LIBSSH" in
  2044. yes)
  2045. dnl --with-libssh (without path) used
  2046. CURL_CHECK_PKGCONFIG(libssh)
  2047. if test "$PKGCONFIG" != "no" ; then
  2048. LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
  2049. LD_SSH=`$PKGCONFIG --libs-only-L libssh`
  2050. CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
  2051. version=`$PKGCONFIG --modversion libssh`
  2052. DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'`
  2053. fi
  2054. ;;
  2055. off)
  2056. dnl no --with-libssh option given, just check default places
  2057. ;;
  2058. *)
  2059. dnl use the given --with-libssh spot
  2060. PREFIX_SSH=$OPT_LIBSSH
  2061. ;;
  2062. esac
  2063. dnl if given with a prefix, we set -L and -I based on that
  2064. if test -n "$PREFIX_SSH"; then
  2065. LIB_SSH="-lssh"
  2066. LD_SSH=-L${PREFIX_SSH}/lib$libsuff
  2067. CPP_SSH=-I${PREFIX_SSH}/include
  2068. DIR_SSH=${PREFIX_SSH}/lib$libsuff
  2069. fi
  2070. LDFLAGS="$LDFLAGS $LD_SSH"
  2071. CPPFLAGS="$CPPFLAGS $CPP_SSH"
  2072. LIBS="$LIB_SSH $LIBS"
  2073. AC_CHECK_LIB(ssh, ssh_new)
  2074. AC_CHECK_HEADER(libssh/libssh.h,
  2075. curl_ssh_msg="enabled (libSSH)"
  2076. LIBSSH_ENABLED=1
  2077. AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
  2078. AC_SUBST(USE_LIBSSH, [1])
  2079. )
  2080. if test X"$OPT_LIBSSH" != Xoff &&
  2081. test "$LIBSSH_ENABLED" != "1"; then
  2082. AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
  2083. fi
  2084. if test "$LIBSSH_ENABLED" = "1"; then
  2085. if test -n "$DIR_SSH"; then
  2086. dnl when the libssh shared libs were found in a path that the run-time
  2087. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  2088. dnl to prevent further configure tests to fail due to this
  2089. if test "x$cross_compiling" != "xyes"; then
  2090. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
  2091. export CURL_LIBRARY_PATH
  2092. AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
  2093. fi
  2094. fi
  2095. else
  2096. dnl no libssh, revert back to clean variables
  2097. LDFLAGS=$CLEANLDFLAGS
  2098. CPPFLAGS=$CLEANCPPFLAGS
  2099. LIBS=$CLEANLIBS
  2100. fi
  2101. elif test X"$OPT_WOLFSSH" != Xno; then
  2102. dnl backup the pre-wolfssh variables
  2103. CLEANLDFLAGS="$LDFLAGS"
  2104. CLEANCPPFLAGS="$CPPFLAGS"
  2105. CLEANLIBS="$LIBS"
  2106. if test "$OPT_WOLFSSH" != yes; then
  2107. WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
  2108. LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
  2109. CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
  2110. fi
  2111. AC_CHECK_LIB(wolfssh, wolfSSH_Init)
  2112. AC_CHECK_HEADERS(wolfssh/ssh.h,
  2113. curl_ssh_msg="enabled (wolfSSH)"
  2114. WOLFSSH_ENABLED=1
  2115. AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use])
  2116. AC_SUBST(USE_WOLFSSH, [1])
  2117. )
  2118. fi
  2119. dnl **********************************************************************
  2120. dnl Check for the presence of LIBRTMP libraries and headers
  2121. dnl **********************************************************************
  2122. dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
  2123. OPT_LIBRTMP=off
  2124. AC_ARG_WITH(librtmp,dnl
  2125. AS_HELP_STRING([--with-librtmp=PATH],[Where to look for librtmp, PATH points to the LIBRTMP installation; when possible, set the PKG_CONFIG_PATH environment variable instead of using this option])
  2126. AS_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
  2127. OPT_LIBRTMP=$withval)
  2128. if test X"$OPT_LIBRTMP" != Xno; then
  2129. dnl backup the pre-librtmp variables
  2130. CLEANLDFLAGS="$LDFLAGS"
  2131. CLEANCPPFLAGS="$CPPFLAGS"
  2132. CLEANLIBS="$LIBS"
  2133. case "$OPT_LIBRTMP" in
  2134. yes)
  2135. dnl --with-librtmp (without path) used
  2136. CURL_CHECK_PKGCONFIG(librtmp)
  2137. if test "$PKGCONFIG" != "no" ; then
  2138. LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
  2139. LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
  2140. CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
  2141. version=`$PKGCONFIG --modversion librtmp`
  2142. DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'`
  2143. else
  2144. dnl To avoid link errors, we do not allow --librtmp without
  2145. dnl a pkgconfig file
  2146. AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
  2147. fi
  2148. ;;
  2149. off)
  2150. dnl no --with-librtmp option given, just check default places
  2151. LIB_RTMP="-lrtmp"
  2152. ;;
  2153. *)
  2154. dnl use the given --with-librtmp spot
  2155. LIB_RTMP="-lrtmp"
  2156. PREFIX_RTMP=$OPT_LIBRTMP
  2157. ;;
  2158. esac
  2159. dnl if given with a prefix, we set -L and -I based on that
  2160. if test -n "$PREFIX_RTMP"; then
  2161. LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
  2162. CPP_RTMP=-I${PREFIX_RTMP}/include
  2163. DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
  2164. fi
  2165. LDFLAGS="$LDFLAGS $LD_RTMP"
  2166. CPPFLAGS="$CPPFLAGS $CPP_RTMP"
  2167. LIBS="$LIB_RTMP $LIBS"
  2168. AC_CHECK_LIB(rtmp, RTMP_Init,
  2169. [
  2170. AC_CHECK_HEADERS(librtmp/rtmp.h,
  2171. curl_rtmp_msg="enabled (librtmp)"
  2172. LIBRTMP_ENABLED=1
  2173. AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
  2174. AC_SUBST(USE_LIBRTMP, [1])
  2175. )
  2176. ],
  2177. dnl not found, revert back to clean variables
  2178. LDFLAGS=$CLEANLDFLAGS
  2179. CPPFLAGS=$CLEANCPPFLAGS
  2180. LIBS=$CLEANLIBS
  2181. )
  2182. if test X"$OPT_LIBRTMP" != Xoff &&
  2183. test "$LIBRTMP_ENABLED" != "1"; then
  2184. AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
  2185. fi
  2186. fi
  2187. dnl **********************************************************************
  2188. dnl Check for linker switch for versioned symbols
  2189. dnl **********************************************************************
  2190. versioned_symbols_flavour=
  2191. AC_MSG_CHECKING([whether versioned symbols are wanted])
  2192. AC_ARG_ENABLE(versioned-symbols,
  2193. AS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
  2194. AS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
  2195. [ case "$enableval" in
  2196. yes) AC_MSG_RESULT(yes)
  2197. AC_MSG_CHECKING([if libraries can be versioned])
  2198. GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
  2199. if test -z "$GLD"; then
  2200. AC_MSG_RESULT(no)
  2201. AC_MSG_WARN([You need an ld version supporting the --version-script option])
  2202. else
  2203. AC_MSG_RESULT(yes)
  2204. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  2205. versioned_symbols_flavour="MULTISSL_"
  2206. elif test "x$OPENSSL_ENABLED" = "x1"; then
  2207. versioned_symbols_flavour="OPENSSL_"
  2208. elif test "x$GNUTLS_ENABLED" = "x1"; then
  2209. versioned_symbols_flavour="GNUTLS_"
  2210. elif test "x$WOLFSSL_ENABLED" = "x1"; then
  2211. versioned_symbols_flavour="WOLFSSL_"
  2212. elif test "x$SCHANNEL_ENABLED" = "x1"; then
  2213. versioned_symbols_flavour="SCHANNEL_"
  2214. elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
  2215. versioned_symbols_flavour="SECURE_TRANSPORT_"
  2216. else
  2217. versioned_symbols_flavour=""
  2218. fi
  2219. versioned_symbols="yes"
  2220. fi
  2221. ;;
  2222. *) AC_MSG_RESULT(no)
  2223. ;;
  2224. esac
  2225. ], [
  2226. AC_MSG_RESULT(no)
  2227. ]
  2228. )
  2229. AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
  2230. ["$versioned_symbols_flavour"])
  2231. AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
  2232. [test "x$versioned_symbols" = 'xyes'])
  2233. dnl Update .plist file with current version
  2234. AC_SUBST([CURL_PLIST_VERSION],
  2235. ["$CURLVERSION"])
  2236. dnl -------------------------------------------------
  2237. dnl check winidn option before other IDN libraries
  2238. dnl -------------------------------------------------
  2239. AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
  2240. OPT_WINIDN="default"
  2241. AC_ARG_WITH(winidn,
  2242. AS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
  2243. AS_HELP_STRING([--without-winidn], [disable Windows native IDN]),
  2244. OPT_WINIDN=$withval)
  2245. case "$OPT_WINIDN" in
  2246. no|default)
  2247. dnl --without-winidn option used or configure option not specified
  2248. want_winidn="no"
  2249. AC_MSG_RESULT([no])
  2250. ;;
  2251. yes)
  2252. dnl --with-winidn option used without path
  2253. want_winidn="yes"
  2254. want_winidn_path="default"
  2255. AC_MSG_RESULT([yes])
  2256. ;;
  2257. *)
  2258. dnl --with-winidn option used with path
  2259. want_winidn="yes"
  2260. want_winidn_path="$withval"
  2261. AC_MSG_RESULT([yes ($withval)])
  2262. ;;
  2263. esac
  2264. if test "$want_winidn" = "yes"; then
  2265. dnl winidn library support has been requested
  2266. clean_CFLAGS="$CFLAGS"
  2267. clean_CPPFLAGS="$CPPFLAGS"
  2268. clean_LDFLAGS="$LDFLAGS"
  2269. clean_LIBS="$LIBS"
  2270. WINIDN_LIBS="-lnormaliz"
  2271. WINIDN_CPPFLAGS=""
  2272. #
  2273. if test "$want_winidn_path" != "default"; then
  2274. dnl path has been specified
  2275. dnl pkg-config not available or provides no info
  2276. WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
  2277. WINIDN_CPPFLAGS="-I$want_winidn_path/include"
  2278. WINIDN_DIR="$want_winidn_path/lib$libsuff"
  2279. fi
  2280. #
  2281. dnl WinIDN requires a minimum supported OS version of at least Vista (0x0600)
  2282. AC_COMPILE_IFELSE([
  2283. AC_LANG_PROGRAM([[
  2284. #include <windows.h>
  2285. ]],[[
  2286. #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
  2287. #error
  2288. #endif
  2289. ]])
  2290. ],[
  2291. ],[
  2292. CFLAGS=`echo $CFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
  2293. CFLAGS=`echo $CFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
  2294. CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
  2295. CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
  2296. WINIDN_CPPFLAGS="$WINIDN_CPPFLAGS -DWINVER=0x0600"
  2297. ])
  2298. #
  2299. CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
  2300. LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
  2301. LIBS="$WINIDN_LIBS $LIBS"
  2302. #
  2303. AC_MSG_CHECKING([if IdnToUnicode can be linked])
  2304. AC_LINK_IFELSE([
  2305. AC_LANG_PROGRAM([[
  2306. #include <windows.h>
  2307. ]],[[
  2308. IdnToUnicode(0, NULL, 0, NULL, 0);
  2309. ]])
  2310. ],[
  2311. AC_MSG_RESULT([yes])
  2312. tst_links_winidn="yes"
  2313. ],[
  2314. AC_MSG_RESULT([no])
  2315. tst_links_winidn="no"
  2316. ])
  2317. #
  2318. if test "$tst_links_winidn" = "yes"; then
  2319. AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
  2320. AC_SUBST([IDN_ENABLED], [1])
  2321. curl_idn_msg="enabled (Windows-native)"
  2322. else
  2323. AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
  2324. CFLAGS="$clean_CFLAGS"
  2325. CPPFLAGS="$clean_CPPFLAGS"
  2326. LDFLAGS="$clean_LDFLAGS"
  2327. LIBS="$clean_LIBS"
  2328. fi
  2329. fi
  2330. dnl **********************************************************************
  2331. dnl Check for the presence of IDN libraries and headers
  2332. dnl **********************************************************************
  2333. AC_MSG_CHECKING([whether to build with libidn2])
  2334. OPT_IDN="default"
  2335. AC_ARG_WITH(libidn2,
  2336. AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
  2337. AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
  2338. [OPT_IDN=$withval])
  2339. if test "x$tst_links_winidn" = "xyes"; then
  2340. want_idn="no"
  2341. AC_MSG_RESULT([no (using winidn instead)])
  2342. else
  2343. case "$OPT_IDN" in
  2344. no)
  2345. dnl --without-libidn2 option used
  2346. want_idn="no"
  2347. AC_MSG_RESULT([no])
  2348. ;;
  2349. default)
  2350. dnl configure option not specified
  2351. want_idn="yes"
  2352. want_idn_path="default"
  2353. AC_MSG_RESULT([(assumed) yes])
  2354. ;;
  2355. yes)
  2356. dnl --with-libidn2 option used without path
  2357. want_idn="yes"
  2358. want_idn_path="default"
  2359. AC_MSG_RESULT([yes])
  2360. ;;
  2361. *)
  2362. dnl --with-libidn2 option used with path
  2363. want_idn="yes"
  2364. want_idn_path="$withval"
  2365. AC_MSG_RESULT([yes ($withval)])
  2366. ;;
  2367. esac
  2368. fi
  2369. if test "$want_idn" = "yes"; then
  2370. dnl idn library support has been requested
  2371. clean_CPPFLAGS="$CPPFLAGS"
  2372. clean_LDFLAGS="$LDFLAGS"
  2373. clean_LIBS="$LIBS"
  2374. PKGCONFIG="no"
  2375. #
  2376. if test "$want_idn_path" != "default"; then
  2377. dnl path has been specified
  2378. IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
  2379. CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
  2380. if test "$PKGCONFIG" != "no"; then
  2381. IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2382. $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
  2383. IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2384. $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
  2385. IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2386. $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
  2387. IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
  2388. else
  2389. dnl pkg-config not available or provides no info
  2390. IDN_LIBS="-lidn2"
  2391. IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
  2392. IDN_CPPFLAGS="-I$want_idn_path/include"
  2393. IDN_DIR="$want_idn_path/lib$libsuff"
  2394. fi
  2395. else
  2396. dnl path not specified
  2397. CURL_CHECK_PKGCONFIG(libidn2)
  2398. if test "$PKGCONFIG" != "no"; then
  2399. IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
  2400. IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
  2401. IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
  2402. IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
  2403. else
  2404. dnl pkg-config not available or provides no info
  2405. IDN_LIBS="-lidn2"
  2406. fi
  2407. fi
  2408. #
  2409. if test "$PKGCONFIG" != "no"; then
  2410. AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
  2411. AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
  2412. AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
  2413. AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
  2414. else
  2415. AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
  2416. AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
  2417. AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
  2418. AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
  2419. fi
  2420. #
  2421. CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
  2422. LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
  2423. LIBS="$IDN_LIBS $LIBS"
  2424. #
  2425. AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
  2426. AC_LINK_IFELSE([
  2427. AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
  2428. ],[
  2429. AC_MSG_RESULT([yes])
  2430. tst_links_libidn="yes"
  2431. ],[
  2432. AC_MSG_RESULT([no])
  2433. tst_links_libidn="no"
  2434. ])
  2435. #
  2436. AC_CHECK_HEADERS( idn2.h )
  2437. if test "$tst_links_libidn" = "yes"; then
  2438. AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
  2439. dnl different versions of libidn have different setups of these:
  2440. AC_SUBST([IDN_ENABLED], [1])
  2441. curl_idn_msg="enabled (libidn2)"
  2442. if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
  2443. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
  2444. export CURL_LIBRARY_PATH
  2445. AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
  2446. fi
  2447. else
  2448. AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
  2449. CPPFLAGS="$clean_CPPFLAGS"
  2450. LDFLAGS="$clean_LDFLAGS"
  2451. LIBS="$clean_LIBS"
  2452. fi
  2453. fi
  2454. dnl **********************************************************************
  2455. dnl Check for nghttp2
  2456. dnl **********************************************************************
  2457. OPT_H2="yes"
  2458. if test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then
  2459. # without HTTP or with Hyper, nghttp2 is no use
  2460. OPT_H2="no"
  2461. fi
  2462. AC_ARG_WITH(nghttp2,
  2463. AS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
  2464. AS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
  2465. [OPT_H2=$withval])
  2466. case "$OPT_H2" in
  2467. no)
  2468. dnl --without-nghttp2 option used
  2469. want_nghttp2="no"
  2470. ;;
  2471. yes)
  2472. dnl --with-nghttp2 option used without path
  2473. want_nghttp2="default"
  2474. want_nghttp2_path=""
  2475. want_nghttp2_pkg_config_path=""
  2476. ;;
  2477. *)
  2478. dnl --with-nghttp2 option used with path
  2479. want_nghttp2="yes"
  2480. want_nghttp2_path="$withval"
  2481. want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
  2482. ;;
  2483. esac
  2484. if test X"$want_nghttp2" != Xno; then
  2485. dnl backup the pre-nghttp2 variables
  2486. CLEANLDFLAGS="$LDFLAGS"
  2487. CLEANCPPFLAGS="$CPPFLAGS"
  2488. CLEANLIBS="$LIBS"
  2489. CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path)
  2490. if test "$PKGCONFIG" != "no" ; then
  2491. LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
  2492. $PKGCONFIG --libs-only-l libnghttp2`
  2493. AC_MSG_NOTICE([-l is $LIB_H2])
  2494. CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
  2495. $PKGCONFIG --cflags-only-I libnghttp2`
  2496. AC_MSG_NOTICE([-I is $CPP_H2])
  2497. LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
  2498. $PKGCONFIG --libs-only-L libnghttp2`
  2499. AC_MSG_NOTICE([-L is $LD_H2])
  2500. DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
  2501. elif test x"$want_nghttp2_path" != x; then
  2502. LIB_H2="-lnghttp2"
  2503. LD_H2=-L${want_nghttp2_path}/lib$libsuff
  2504. CPP_H2=-I${want_nghttp2_path}/include
  2505. DIR_H2=${want_nghttp2_path}/lib$libsuff
  2506. elif test X"$want_nghttp2" != Xdefault; then
  2507. dnl no nghttp2 pkg-config found and no custom directory specified,
  2508. dnl deal with it
  2509. AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
  2510. else
  2511. LIB_H2="-lnghttp2"
  2512. fi
  2513. LDFLAGS="$LDFLAGS $LD_H2"
  2514. CPPFLAGS="$CPPFLAGS $CPP_H2"
  2515. LIBS="$LIB_H2 $LIBS"
  2516. # use nghttp2_session_get_stream_local_window_size to require nghttp2
  2517. # >= 1.15.0
  2518. AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size,
  2519. [
  2520. AC_CHECK_HEADERS(nghttp2/nghttp2.h,
  2521. curl_h2_msg="enabled (nghttp2)"
  2522. NGHTTP2_ENABLED=1
  2523. AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
  2524. AC_SUBST(USE_NGHTTP2, [1])
  2525. )
  2526. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
  2527. export CURL_LIBRARY_PATH
  2528. AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH])
  2529. ],
  2530. dnl not found, revert back to clean variables
  2531. LDFLAGS=$CLEANLDFLAGS
  2532. CPPFLAGS=$CLEANCPPFLAGS
  2533. LIBS=$CLEANLIBS
  2534. )
  2535. fi
  2536. dnl **********************************************************************
  2537. dnl Check for ngtcp2 (QUIC)
  2538. dnl **********************************************************************
  2539. OPT_TCP2="no"
  2540. if test "x$disable_http" = "xyes"; then
  2541. # without HTTP, ngtcp2 is no use
  2542. OPT_TCP2="no"
  2543. fi
  2544. AC_ARG_WITH(ngtcp2,
  2545. AS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
  2546. AS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
  2547. [OPT_TCP2=$withval])
  2548. case "$OPT_TCP2" in
  2549. no)
  2550. dnl --without-ngtcp2 option used
  2551. want_tcp2="no"
  2552. ;;
  2553. yes)
  2554. dnl --with-ngtcp2 option used without path
  2555. want_tcp2="default"
  2556. want_tcp2_path=""
  2557. ;;
  2558. *)
  2559. dnl --with-ngtcp2 option used with path
  2560. want_tcp2="yes"
  2561. want_tcp2_path="$withval/lib/pkgconfig"
  2562. ;;
  2563. esac
  2564. curl_tcp2_msg="no (--with-ngtcp2)"
  2565. if test X"$want_tcp2" != Xno; then
  2566. if test "$QUIC_ENABLED" != "yes"; then
  2567. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-ngtcp2 a no-no])
  2568. fi
  2569. dnl backup the pre-ngtcp2 variables
  2570. CLEANLDFLAGS="$LDFLAGS"
  2571. CLEANCPPFLAGS="$CPPFLAGS"
  2572. CLEANLIBS="$LIBS"
  2573. CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path)
  2574. if test "$PKGCONFIG" != "no" ; then
  2575. LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2576. $PKGCONFIG --libs-only-l libngtcp2`
  2577. AC_MSG_NOTICE([-l is $LIB_TCP2])
  2578. CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2579. $PKGCONFIG --cflags-only-I libngtcp2`
  2580. AC_MSG_NOTICE([-I is $CPP_TCP2])
  2581. LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2582. $PKGCONFIG --libs-only-L libngtcp2`
  2583. AC_MSG_NOTICE([-L is $LD_TCP2])
  2584. LDFLAGS="$LDFLAGS $LD_TCP2"
  2585. CPPFLAGS="$CPPFLAGS $CPP_TCP2"
  2586. LIBS="$LIB_TCP2 $LIBS"
  2587. if test "x$cross_compiling" != "xyes"; then
  2588. DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'`
  2589. fi
  2590. AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new_versioned,
  2591. [
  2592. AC_CHECK_HEADERS(ngtcp2/ngtcp2.h,
  2593. NGTCP2_ENABLED=1
  2594. AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use])
  2595. AC_SUBST(USE_NGTCP2, [1])
  2596. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
  2597. export CURL_LIBRARY_PATH
  2598. AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH])
  2599. )
  2600. ],
  2601. dnl not found, revert back to clean variables
  2602. LDFLAGS=$CLEANLDFLAGS
  2603. CPPFLAGS=$CLEANCPPFLAGS
  2604. LIBS=$CLEANLIBS
  2605. )
  2606. else
  2607. dnl no ngtcp2 pkg-config found, deal with it
  2608. if test X"$want_tcp2" != Xdefault; then
  2609. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2610. dnl a pkgconfig file
  2611. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.])
  2612. fi
  2613. fi
  2614. fi
  2615. if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" != "x1"; then
  2616. dnl backup the pre-ngtcp2_crypto_quictls variables
  2617. CLEANLDFLAGS="$LDFLAGS"
  2618. CLEANCPPFLAGS="$CPPFLAGS"
  2619. CLEANLIBS="$LIBS"
  2620. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
  2621. if test "$PKGCONFIG" != "no" ; then
  2622. LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2623. $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
  2624. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
  2625. CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2626. $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
  2627. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
  2628. LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2629. $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
  2630. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])
  2631. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
  2632. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
  2633. LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
  2634. if test "x$cross_compiling" != "xyes"; then
  2635. DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
  2636. fi
  2637. AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
  2638. [
  2639. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2640. NGTCP2_ENABLED=1
  2641. AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
  2642. AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
  2643. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
  2644. export CURL_LIBRARY_PATH
  2645. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
  2646. )
  2647. ],
  2648. dnl not found, revert back to clean variables
  2649. LDFLAGS=$CLEANLDFLAGS
  2650. CPPFLAGS=$CLEANCPPFLAGS
  2651. LIBS=$CLEANLIBS
  2652. )
  2653. else
  2654. dnl no ngtcp2_crypto_quictls pkg-config found, deal with it
  2655. if test X"$want_tcp2" != Xdefault; then
  2656. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2657. dnl a pkgconfig file
  2658. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
  2659. fi
  2660. fi
  2661. fi
  2662. if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" = "x1"; then
  2663. dnl backup the pre-ngtcp2_crypto_boringssl variables
  2664. CLEANLDFLAGS="$LDFLAGS"
  2665. CLEANCPPFLAGS="$CPPFLAGS"
  2666. CLEANLIBS="$LIBS"
  2667. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_boringssl, $want_tcp2_path)
  2668. if test "$PKGCONFIG" != "no" ; then
  2669. LIB_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2670. $PKGCONFIG --libs-only-l libngtcp2_crypto_boringssl`
  2671. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_BORINGSSL])
  2672. CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2673. $PKGCONFIG --cflags-only-I libngtcp2_crypto_boringssl`
  2674. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_BORINGSSL])
  2675. LD_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2676. $PKGCONFIG --libs-only-L libngtcp2_crypto_boringssl`
  2677. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_BORINGSSL])
  2678. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_BORINGSSL"
  2679. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_BORINGSSL"
  2680. LIBS="$LIB_NGTCP2_CRYPTO_BORINGSSL $LIBS"
  2681. if test "x$cross_compiling" != "xyes"; then
  2682. DIR_NGTCP2_CRYPTO_BORINGSSL=`echo $LD_NGTCP2_CRYPTO_BORINGSSL | $SED -e 's/^-L//'`
  2683. fi
  2684. AC_CHECK_LIB(ngtcp2_crypto_boringssl, ngtcp2_crypto_recv_client_initial_cb,
  2685. [
  2686. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2687. NGTCP2_ENABLED=1
  2688. AC_DEFINE(USE_NGTCP2_CRYPTO_BORINGSSL, 1, [if ngtcp2_crypto_boringssl is in use])
  2689. AC_SUBST(USE_NGTCP2_CRYPTO_BORINGSSL, [1])
  2690. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_BORINGSSL"
  2691. export CURL_LIBRARY_PATH
  2692. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_BORINGSSL to CURL_LIBRARY_PATH])
  2693. )
  2694. ],
  2695. dnl not found, revert back to clean variables
  2696. LDFLAGS=$CLEANLDFLAGS
  2697. CPPFLAGS=$CLEANCPPFLAGS
  2698. LIBS=$CLEANLIBS
  2699. )
  2700. else
  2701. dnl no ngtcp2_crypto_boringssl pkg-config found, deal with it
  2702. if test X"$want_tcp2" != Xdefault; then
  2703. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2704. dnl a pkgconfig file
  2705. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.])
  2706. fi
  2707. fi
  2708. fi
  2709. if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
  2710. dnl backup the pre-ngtcp2_crypto_gnutls variables
  2711. CLEANLDFLAGS="$LDFLAGS"
  2712. CLEANCPPFLAGS="$CPPFLAGS"
  2713. CLEANLIBS="$LIBS"
  2714. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path)
  2715. if test "$PKGCONFIG" != "no" ; then
  2716. LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2717. $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
  2718. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
  2719. CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2720. $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
  2721. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
  2722. LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2723. $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
  2724. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS])
  2725. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
  2726. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
  2727. LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
  2728. if test "x$cross_compiling" != "xyes"; then
  2729. DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
  2730. fi
  2731. AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb,
  2732. [
  2733. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2734. NGTCP2_ENABLED=1
  2735. AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use])
  2736. AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1])
  2737. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
  2738. export CURL_LIBRARY_PATH
  2739. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH])
  2740. )
  2741. ],
  2742. dnl not found, revert back to clean variables
  2743. LDFLAGS=$CLEANLDFLAGS
  2744. CPPFLAGS=$CLEANCPPFLAGS
  2745. LIBS=$CLEANLIBS
  2746. )
  2747. else
  2748. dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it
  2749. if test X"$want_tcp2" != Xdefault; then
  2750. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2751. dnl a pkgconfig file
  2752. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.])
  2753. fi
  2754. fi
  2755. fi
  2756. if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then
  2757. dnl backup the pre-ngtcp2_crypto_wolfssl variables
  2758. CLEANLDFLAGS="$LDFLAGS"
  2759. CLEANCPPFLAGS="$CPPFLAGS"
  2760. CLEANLIBS="$LIBS"
  2761. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_wolfssl, $want_tcp2_path)
  2762. if test "$PKGCONFIG" != "no" ; then
  2763. LIB_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2764. $PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
  2765. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL])
  2766. CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2767. $PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
  2768. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL])
  2769. LD_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2770. $PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl`
  2771. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_WOLFSSL])
  2772. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL"
  2773. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL"
  2774. LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS"
  2775. if test "x$cross_compiling" != "xyes"; then
  2776. DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'`
  2777. fi
  2778. AC_CHECK_LIB(ngtcp2_crypto_wolfssl, ngtcp2_crypto_recv_client_initial_cb,
  2779. [
  2780. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2781. NGTCP2_ENABLED=1
  2782. AC_DEFINE(USE_NGTCP2_CRYPTO_WOLFSSL, 1, [if ngtcp2_crypto_wolfssl is in use])
  2783. AC_SUBST(USE_NGTCP2_CRYPTO_WOLFSSL, [1])
  2784. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL"
  2785. export CURL_LIBRARY_PATH
  2786. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH])
  2787. )
  2788. ],
  2789. dnl not found, revert back to clean variables
  2790. LDFLAGS=$CLEANLDFLAGS
  2791. CPPFLAGS=$CLEANCPPFLAGS
  2792. LIBS=$CLEANLIBS
  2793. )
  2794. else
  2795. dnl no ngtcp2_crypto_wolfssl pkg-config found, deal with it
  2796. if test X"$want_tcp2" != Xdefault; then
  2797. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2798. dnl a pkgconfig file
  2799. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file.])
  2800. fi
  2801. fi
  2802. fi
  2803. dnl **********************************************************************
  2804. dnl Check for OpenSSL QUIC
  2805. dnl **********************************************************************
  2806. OPT_OPENSSL_QUIC="no"
  2807. if test "x$disable_http" = "xyes" -o "x$OPENSSL_ENABLED" != "x1"; then
  2808. # without HTTP or without openssl, no use
  2809. OPT_OPENSSL_QUIC="no"
  2810. fi
  2811. AC_ARG_WITH(openssl-quic,
  2812. AS_HELP_STRING([--with-openssl-quic],[Enable OpenSSL QUIC usage])
  2813. AS_HELP_STRING([--without-openssl-quic],[Disable OpenSSL QUIC usage]),
  2814. [OPT_OPENSSL_QUIC=$withval])
  2815. case "$OPT_OPENSSL_QUIC" in
  2816. no)
  2817. dnl --without-openssl-quic option used
  2818. want_openssl_quic="no"
  2819. ;;
  2820. yes)
  2821. dnl --with-openssl-quic option used
  2822. want_openssl_quic="yes"
  2823. ;;
  2824. esac
  2825. curl_openssl_quic_msg="no (--with-openssl-quic)"
  2826. if test "x$want_openssl_quic" = "xyes"; then
  2827. if test "$NGTCP2_ENABLED" = 1; then
  2828. AC_MSG_ERROR([--with-openssl-quic and --with-ngtcp2 are mutually exclusive])
  2829. fi
  2830. if test "$HAVE_OPENSSL_QUIC" != 1; then
  2831. AC_MSG_ERROR([--with-openssl-quic requires quic support in OpenSSL])
  2832. fi
  2833. AC_DEFINE(USE_OPENSSL_QUIC, 1, [if openssl QUIC is in use])
  2834. AC_SUBST(USE_OPENSSL_QUIC, [1])
  2835. fi
  2836. dnl **********************************************************************
  2837. dnl Check for nghttp3 (HTTP/3 with ngtcp2)
  2838. dnl **********************************************************************
  2839. OPT_NGHTTP3="yes"
  2840. if test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then
  2841. # without ngtcp2 or openssl quic, nghttp3 is of no use for us
  2842. OPT_NGHTTP3="no"
  2843. want_nghttp3="no"
  2844. fi
  2845. AC_ARG_WITH(nghttp3,
  2846. AS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
  2847. AS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
  2848. [OPT_NGHTTP3=$withval])
  2849. case "$OPT_NGHTTP3" in
  2850. no)
  2851. dnl --without-nghttp3 option used
  2852. want_nghttp3="no"
  2853. ;;
  2854. yes)
  2855. dnl --with-nghttp3 option used without path
  2856. want_nghttp3="default"
  2857. want_nghttp3_path=""
  2858. ;;
  2859. *)
  2860. dnl --with-nghttp3 option used with path
  2861. want_nghttp3="yes"
  2862. want_nghttp3_path="$withval/lib/pkgconfig"
  2863. ;;
  2864. esac
  2865. curl_http3_msg="no (--with-nghttp3)"
  2866. if test X"$want_nghttp3" != Xno; then
  2867. dnl backup the pre-nghttp3 variables
  2868. CLEANLDFLAGS="$LDFLAGS"
  2869. CLEANCPPFLAGS="$CPPFLAGS"
  2870. CLEANLIBS="$LIBS"
  2871. CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path)
  2872. if test "$PKGCONFIG" != "no" ; then
  2873. LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
  2874. $PKGCONFIG --libs-only-l libnghttp3`
  2875. AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
  2876. CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
  2877. $PKGCONFIG --cflags-only-I libnghttp3`
  2878. AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
  2879. LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
  2880. $PKGCONFIG --libs-only-L libnghttp3`
  2881. AC_MSG_NOTICE([-L is $LD_NGHTTP3])
  2882. LDFLAGS="$LDFLAGS $LD_NGHTTP3"
  2883. CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
  2884. LIBS="$LIB_NGHTTP3 $LIBS"
  2885. if test "x$cross_compiling" != "xyes"; then
  2886. DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'`
  2887. fi
  2888. AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new_versioned,
  2889. [
  2890. AC_CHECK_HEADERS(nghttp3/nghttp3.h,
  2891. AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use])
  2892. AC_SUBST(USE_NGHTTP3, [1])
  2893. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
  2894. export CURL_LIBRARY_PATH
  2895. AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
  2896. )
  2897. ],
  2898. dnl not found, revert back to clean variables
  2899. LDFLAGS=$CLEANLDFLAGS
  2900. CPPFLAGS=$CLEANCPPFLAGS
  2901. LIBS=$CLEANLIBS
  2902. )
  2903. else
  2904. dnl no nghttp3 pkg-config found, deal with it
  2905. if test X"$want_nghttp3" != Xdefault; then
  2906. dnl To avoid link errors, we do not allow --with-nghttp3 without
  2907. dnl a pkgconfig file
  2908. AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.])
  2909. fi
  2910. fi
  2911. fi
  2912. dnl **********************************************************************
  2913. dnl Check for ngtcp2 and nghttp3 (HTTP/3 with ngtcp2 + nghttp3)
  2914. dnl **********************************************************************
  2915. if test "x$NGTCP2_ENABLED" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
  2916. AC_DEFINE(USE_NGTCP2_H3, 1, [if ngtcp2 + nghttp3 is in use])
  2917. AC_SUBST(USE_NGTCP2_H3, [1])
  2918. AC_MSG_NOTICE([HTTP3 support is experimental])
  2919. curl_h3_msg="enabled (ngtcp2 + nghttp3)"
  2920. fi
  2921. dnl **********************************************************************
  2922. dnl Check for OpenSSL and nghttp3 (HTTP/3 with nghttp3 using OpenSSL QUIC)
  2923. dnl **********************************************************************
  2924. if test "x$USE_OPENSSL_QUIC" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
  2925. experimental="$experimental HTTP3"
  2926. AC_DEFINE(USE_OPENSSL_H3, 1, [if openssl quic + nghttp3 is in use])
  2927. AC_SUBST(USE_OPENSSL_H3, [1])
  2928. AC_MSG_NOTICE([HTTP3 support is experimental])
  2929. curl_h3_msg="enabled (openssl + nghttp3)"
  2930. fi
  2931. dnl **********************************************************************
  2932. dnl Check for quiche (QUIC)
  2933. dnl **********************************************************************
  2934. OPT_QUICHE="no"
  2935. if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
  2936. # without HTTP or with ngtcp2, quiche is no use
  2937. OPT_QUICHE="no"
  2938. fi
  2939. AC_ARG_WITH(quiche,
  2940. AS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
  2941. AS_HELP_STRING([--without-quiche],[Disable quiche usage]),
  2942. [OPT_QUICHE=$withval])
  2943. case "$OPT_QUICHE" in
  2944. no)
  2945. dnl --without-quiche option used
  2946. want_quiche="no"
  2947. ;;
  2948. yes)
  2949. dnl --with-quiche option used without path
  2950. want_quiche="default"
  2951. want_quiche_path=""
  2952. ;;
  2953. *)
  2954. dnl --with-quiche option used with path
  2955. want_quiche="yes"
  2956. want_quiche_path="$withval"
  2957. ;;
  2958. esac
  2959. if test X"$want_quiche" != Xno; then
  2960. if test "$QUIC_ENABLED" != "yes"; then
  2961. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-quiche a no-no])
  2962. fi
  2963. if test "$NGHTTP3_ENABLED" = 1; then
  2964. AC_MSG_ERROR([--with-quiche and --with-ngtcp2 are mutually exclusive])
  2965. fi
  2966. dnl backup the pre-quiche variables
  2967. CLEANLDFLAGS="$LDFLAGS"
  2968. CLEANCPPFLAGS="$CPPFLAGS"
  2969. CLEANLIBS="$LIBS"
  2970. CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path)
  2971. if test "$PKGCONFIG" != "no" ; then
  2972. LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
  2973. $PKGCONFIG --libs-only-l quiche`
  2974. AC_MSG_NOTICE([-l is $LIB_QUICHE])
  2975. CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
  2976. $PKGCONFIG --cflags-only-I quiche`
  2977. AC_MSG_NOTICE([-I is $CPP_QUICHE])
  2978. LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
  2979. $PKGCONFIG --libs-only-L quiche`
  2980. AC_MSG_NOTICE([-L is $LD_QUICHE])
  2981. LDFLAGS="$LDFLAGS $LD_QUICHE"
  2982. CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
  2983. LIBS="$LIB_QUICHE $LIBS"
  2984. if test "x$cross_compiling" != "xyes"; then
  2985. DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
  2986. fi
  2987. AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting,
  2988. [
  2989. AC_CHECK_HEADERS(quiche.h,
  2990. experimental="$experimental HTTP3"
  2991. AC_MSG_NOTICE([HTTP3 support is experimental])
  2992. curl_h3_msg="enabled (quiche)"
  2993. QUICHE_ENABLED=1
  2994. AC_DEFINE(USE_QUICHE, 1, [if quiche is in use])
  2995. AC_SUBST(USE_QUICHE, [1])
  2996. AC_CHECK_FUNCS([quiche_conn_set_qlog_fd])
  2997. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
  2998. export CURL_LIBRARY_PATH
  2999. AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]),
  3000. [],
  3001. [
  3002. AC_INCLUDES_DEFAULT
  3003. #include <sys/socket.h>
  3004. ]
  3005. )
  3006. ],
  3007. dnl not found, revert back to clean variables
  3008. AC_MSG_ERROR([couldn't use quiche])
  3009. )
  3010. else
  3011. dnl no quiche pkg-config found, deal with it
  3012. if test X"$want_quiche" != Xdefault; then
  3013. dnl To avoid link errors, we do not allow --with-quiche without
  3014. dnl a pkgconfig file
  3015. AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.])
  3016. fi
  3017. fi
  3018. fi
  3019. dnl **********************************************************************
  3020. dnl Check for msh3 (QUIC)
  3021. dnl **********************************************************************
  3022. OPT_MSH3="no"
  3023. if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
  3024. # without HTTP or with ngtcp2, msh3 is no use
  3025. OPT_MSH3="no"
  3026. fi
  3027. AC_ARG_WITH(msh3,
  3028. AS_HELP_STRING([--with-msh3=PATH],[Enable msh3 usage])
  3029. AS_HELP_STRING([--without-msh3],[Disable msh3 usage]),
  3030. [OPT_MSH3=$withval])
  3031. case "$OPT_MSH3" in
  3032. no)
  3033. dnl --without-msh3 option used
  3034. want_msh3="no"
  3035. ;;
  3036. yes)
  3037. dnl --with-msh3 option used without path
  3038. want_msh3="default"
  3039. want_msh3_path=""
  3040. ;;
  3041. *)
  3042. dnl --with-msh3 option used with path
  3043. want_msh3="yes"
  3044. want_msh3_path="$withval"
  3045. ;;
  3046. esac
  3047. if test X"$want_msh3" != Xno; then
  3048. dnl msh3 on non-Windows needs an OpenSSL with the QUIC API
  3049. if test "$curl_cv_native_windows" != "yes"; then
  3050. if test "$QUIC_ENABLED" != "yes"; then
  3051. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-msh3 a no-no])
  3052. fi
  3053. if test "$OPENSSL_ENABLED" != "1"; then
  3054. AC_MSG_ERROR([msh3 requires OpenSSL])
  3055. fi
  3056. fi
  3057. if test "$NGHTTP3_ENABLED" = 1; then
  3058. AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive])
  3059. fi
  3060. if test "$QUICHE_ENABLED" = 1; then
  3061. AC_MSG_ERROR([--with-msh3 and --with-quiche are mutually exclusive])
  3062. fi
  3063. dnl backup the pre-msh3 variables
  3064. CLEANLDFLAGS="$LDFLAGS"
  3065. CLEANCPPFLAGS="$CPPFLAGS"
  3066. CLEANLIBS="$LIBS"
  3067. if test -n "$want_msh3_path"; then
  3068. LD_MSH3="-L$want_msh3_path/lib"
  3069. CPP_MSH3="-I$want_msh3_path/include"
  3070. DIR_MSH3="$want_msh3_path/lib"
  3071. LDFLAGS="$LDFLAGS $LD_MSH3"
  3072. CPPFLAGS="$CPPFLAGS $CPP_MSH3"
  3073. fi
  3074. LIBS="-lmsh3 $LIBS"
  3075. AC_CHECK_LIB(msh3, MsH3ApiOpen,
  3076. [
  3077. AC_CHECK_HEADERS(msh3.h,
  3078. curl_h3_msg="enabled (msh3)"
  3079. MSH3_ENABLED=1
  3080. AC_DEFINE(USE_MSH3, 1, [if msh3 is in use])
  3081. AC_SUBST(USE_MSH3, [1])
  3082. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3"
  3083. export CURL_LIBRARY_PATH
  3084. AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH]),
  3085. experimental="$experimental HTTP3"
  3086. )
  3087. ],
  3088. dnl not found, revert back to clean variables
  3089. LDFLAGS=$CLEANLDFLAGS
  3090. CPPFLAGS=$CLEANCPPFLAGS
  3091. LIBS=$CLEANLIBS
  3092. )
  3093. fi
  3094. dnl **********************************************************************
  3095. dnl Check for zsh completion path
  3096. dnl **********************************************************************
  3097. OPT_ZSH_FPATH=default
  3098. AC_ARG_WITH(zsh-functions-dir,
  3099. AS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
  3100. AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
  3101. [OPT_ZSH_FPATH=$withval])
  3102. case "$OPT_ZSH_FPATH" in
  3103. default|no)
  3104. dnl --without-zsh-functions-dir option used
  3105. ;;
  3106. yes)
  3107. dnl --with-zsh-functions-dir option used without path
  3108. ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
  3109. AC_SUBST(ZSH_FUNCTIONS_DIR)
  3110. ;;
  3111. *)
  3112. dnl --with-zsh-functions-dir option used with path
  3113. ZSH_FUNCTIONS_DIR="$withval"
  3114. AC_SUBST(ZSH_FUNCTIONS_DIR)
  3115. ;;
  3116. esac
  3117. AM_CONDITIONAL(USE_ZSH_COMPLETION, test x"$ZSH_FUNCTIONS_DIR" != x)
  3118. dnl **********************************************************************
  3119. dnl Check for fish completion path
  3120. dnl **********************************************************************
  3121. OPT_FISH_FPATH=default
  3122. AC_ARG_WITH(fish-functions-dir,
  3123. AS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
  3124. AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
  3125. [OPT_FISH_FPATH=$withval])
  3126. case "$OPT_FISH_FPATH" in
  3127. default|no)
  3128. dnl --without-fish-functions-dir option used
  3129. ;;
  3130. yes)
  3131. dnl --with-fish-functions-dir option used without path
  3132. CURL_CHECK_PKGCONFIG(fish)
  3133. if test "$PKGCONFIG" != "no" ; then
  3134. FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
  3135. else
  3136. FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
  3137. fi
  3138. AC_SUBST(FISH_FUNCTIONS_DIR)
  3139. ;;
  3140. *)
  3141. dnl --with-fish-functions-dir option used with path
  3142. FISH_FUNCTIONS_DIR="$withval"
  3143. AC_SUBST(FISH_FUNCTIONS_DIR)
  3144. ;;
  3145. esac
  3146. AM_CONDITIONAL(USE_FISH_COMPLETION, test x"$FISH_FUNCTIONS_DIR" != x)
  3147. dnl Now check for the very most basic headers. Then we can use these
  3148. dnl ones as default-headers when checking for the rest!
  3149. AC_CHECK_HEADERS(
  3150. sys/types.h \
  3151. sys/time.h \
  3152. sys/select.h \
  3153. sys/socket.h \
  3154. sys/ioctl.h \
  3155. unistd.h \
  3156. stdlib.h \
  3157. arpa/inet.h \
  3158. net/if.h \
  3159. netinet/in.h \
  3160. netinet/in6.h \
  3161. sys/un.h \
  3162. linux/tcp.h \
  3163. netinet/tcp.h \
  3164. netinet/udp.h \
  3165. netdb.h \
  3166. sys/sockio.h \
  3167. sys/stat.h \
  3168. sys/param.h \
  3169. termios.h \
  3170. termio.h \
  3171. fcntl.h \
  3172. io.h \
  3173. pwd.h \
  3174. utime.h \
  3175. sys/utime.h \
  3176. sys/poll.h \
  3177. poll.h \
  3178. socket.h \
  3179. sys/resource.h \
  3180. libgen.h \
  3181. locale.h \
  3182. stdbool.h \
  3183. sys/filio.h \
  3184. sys/wait.h \
  3185. setjmp.h,
  3186. dnl to do if not found
  3187. [],
  3188. dnl to do if found
  3189. [],
  3190. dnl default includes
  3191. [
  3192. #ifdef HAVE_SYS_TYPES_H
  3193. #include <sys/types.h>
  3194. #endif
  3195. #ifdef HAVE_SYS_TIME_H
  3196. #include <sys/time.h>
  3197. #endif
  3198. #ifdef HAVE_SYS_SELECT_H
  3199. #include <sys/select.h>
  3200. #elif defined(HAVE_UNISTD_H)
  3201. #include <unistd.h>
  3202. #endif
  3203. #ifdef HAVE_SYS_SOCKET_H
  3204. #include <sys/socket.h>
  3205. #endif
  3206. #ifdef HAVE_NETINET_IN_H
  3207. #include <netinet/in.h>
  3208. #endif
  3209. #ifdef HAVE_NETINET_IN6_H
  3210. #include <netinet/in6.h>
  3211. #endif
  3212. #ifdef HAVE_SYS_UN_H
  3213. #include <sys/un.h>
  3214. #endif
  3215. ]
  3216. )
  3217. dnl Checks for typedefs, structures, and compiler characteristics.
  3218. AC_C_CONST
  3219. AC_TYPE_SIZE_T
  3220. CURL_CHECK_STRUCT_TIMEVAL
  3221. CURL_VERIFY_RUNTIMELIBS
  3222. CURL_SIZEOF(size_t)
  3223. CURL_SIZEOF(long)
  3224. CURL_SIZEOF(int)
  3225. CURL_SIZEOF(time_t)
  3226. CURL_SIZEOF(off_t)
  3227. o=$CPPFLAGS
  3228. CPPFLAGS="-I$srcdir/include $CPPFLAGS"
  3229. CURL_SIZEOF(curl_off_t, [
  3230. #include <curl/system.h>
  3231. ])
  3232. CURL_SIZEOF(curl_socket_t, [
  3233. #include <curl/curl.h>
  3234. ])
  3235. CPPFLAGS=$o
  3236. AC_CHECK_TYPE(long long,
  3237. [AC_DEFINE(HAVE_LONGLONG, 1,
  3238. [Define to 1 if the compiler supports the 'long long' data type.])]
  3239. longlong="yes"
  3240. )
  3241. if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
  3242. AC_MSG_ERROR([64 bit curl_off_t is required])
  3243. fi
  3244. # check for ssize_t
  3245. AC_CHECK_TYPE(ssize_t, ,
  3246. AC_DEFINE(ssize_t, int, [the signed version of size_t]))
  3247. # check for bool type
  3248. AC_CHECK_TYPE([bool],[
  3249. AC_DEFINE(HAVE_BOOL_T, 1,
  3250. [Define to 1 if bool is an available type.])
  3251. ], ,[
  3252. #ifdef HAVE_SYS_TYPES_H
  3253. #include <sys/types.h>
  3254. #endif
  3255. #ifdef HAVE_STDBOOL_H
  3256. #include <stdbool.h>
  3257. #endif
  3258. ])
  3259. # check for sa_family_t
  3260. AC_CHECK_TYPE(sa_family_t,
  3261. AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
  3262. [
  3263. # The windows name?
  3264. AC_CHECK_TYPE(ADDRESS_FAMILY,
  3265. AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
  3266. AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
  3267. [
  3268. #ifdef _WIN32
  3269. #ifndef WIN32_LEAN_AND_MEAN
  3270. #define WIN32_LEAN_AND_MEAN
  3271. #endif
  3272. #include <winsock2.h>
  3273. #endif
  3274. #ifdef HAVE_SYS_SOCKET_H
  3275. #include <sys/socket.h>
  3276. #endif
  3277. ])
  3278. ],
  3279. [
  3280. #ifdef HAVE_SYS_SOCKET_H
  3281. #include <sys/socket.h>
  3282. #endif
  3283. ])
  3284. # check for suseconds_t
  3285. AC_CHECK_TYPE([suseconds_t],[
  3286. AC_DEFINE(HAVE_SUSECONDS_T, 1,
  3287. [Define to 1 if suseconds_t is an available type.])
  3288. ], ,[
  3289. #ifdef HAVE_SYS_TYPES_H
  3290. #include <sys/types.h>
  3291. #endif
  3292. #ifdef HAVE_SYS_TIME_H
  3293. #include <sys/time.h>
  3294. #endif
  3295. ])
  3296. AC_MSG_CHECKING([if time_t is unsigned])
  3297. CURL_RUN_IFELSE(
  3298. [
  3299. #include <time.h>
  3300. #include <limits.h>
  3301. int main(void) {
  3302. time_t t = -1;
  3303. return (t < 0);
  3304. }
  3305. ],[
  3306. AC_MSG_RESULT([yes])
  3307. AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
  3308. ],[
  3309. AC_MSG_RESULT([no])
  3310. ],[
  3311. dnl cross-compiling, most systems are unsigned
  3312. AC_MSG_RESULT([no])
  3313. ])
  3314. TYPE_IN_ADDR_T
  3315. TYPE_SOCKADDR_STORAGE
  3316. CURL_CHECK_FUNC_SELECT
  3317. CURL_CHECK_FUNC_RECV
  3318. CURL_CHECK_FUNC_SEND
  3319. CURL_CHECK_MSG_NOSIGNAL
  3320. CURL_CHECK_FUNC_ALARM
  3321. CURL_CHECK_FUNC_BASENAME
  3322. CURL_CHECK_FUNC_CLOSESOCKET
  3323. CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
  3324. CURL_CHECK_FUNC_FCNTL
  3325. CURL_CHECK_FUNC_FREEADDRINFO
  3326. CURL_CHECK_FUNC_FSETXATTR
  3327. CURL_CHECK_FUNC_FTRUNCATE
  3328. CURL_CHECK_FUNC_GETADDRINFO
  3329. CURL_CHECK_FUNC_GETHOSTBYNAME
  3330. CURL_CHECK_FUNC_GETHOSTBYNAME_R
  3331. CURL_CHECK_FUNC_GETHOSTNAME
  3332. CURL_CHECK_FUNC_GETPEERNAME
  3333. CURL_CHECK_FUNC_GETSOCKNAME
  3334. CURL_CHECK_FUNC_IF_NAMETOINDEX
  3335. CURL_CHECK_FUNC_GETIFADDRS
  3336. CURL_CHECK_FUNC_GMTIME_R
  3337. CURL_CHECK_FUNC_INET_NTOP
  3338. CURL_CHECK_FUNC_INET_PTON
  3339. CURL_CHECK_FUNC_IOCTL
  3340. CURL_CHECK_FUNC_IOCTLSOCKET
  3341. CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
  3342. CURL_CHECK_FUNC_MEMRCHR
  3343. CURL_CHECK_FUNC_POLL
  3344. CURL_CHECK_FUNC_SIGACTION
  3345. CURL_CHECK_FUNC_SIGINTERRUPT
  3346. CURL_CHECK_FUNC_SIGNAL
  3347. CURL_CHECK_FUNC_SIGSETJMP
  3348. CURL_CHECK_FUNC_SOCKET
  3349. CURL_CHECK_FUNC_SOCKETPAIR
  3350. CURL_CHECK_FUNC_STRCASECMP
  3351. CURL_CHECK_FUNC_STRCMPI
  3352. CURL_CHECK_FUNC_STRDUP
  3353. CURL_CHECK_FUNC_STRERROR_R
  3354. CURL_CHECK_FUNC_STRICMP
  3355. CURL_CHECK_FUNC_STRTOK_R
  3356. CURL_CHECK_FUNC_STRTOLL
  3357. case $host in
  3358. *msdosdjgpp)
  3359. ac_cv_func_pipe=no
  3360. skipcheck_pipe=yes
  3361. AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
  3362. ;;
  3363. esac
  3364. AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")],
  3365. [[#include <pwd.h>
  3366. #include <sys/types.h>]])
  3367. AC_CHECK_FUNCS([\
  3368. _fseeki64 \
  3369. arc4random \
  3370. fnmatch \
  3371. fseeko \
  3372. geteuid \
  3373. getpass_r \
  3374. getppid \
  3375. getpwuid \
  3376. getpwuid_r \
  3377. getrlimit \
  3378. gettimeofday \
  3379. if_nametoindex \
  3380. mach_absolute_time \
  3381. pipe \
  3382. sched_yield \
  3383. sendmsg \
  3384. setlocale \
  3385. setmode \
  3386. setrlimit \
  3387. snprintf \
  3388. utime \
  3389. utimes \
  3390. ],[
  3391. ],[
  3392. func="$ac_func"
  3393. eval skipcheck=\$skipcheck_$func
  3394. if test "x$skipcheck" != "xyes"; then
  3395. AC_MSG_CHECKING([deeper for $func])
  3396. AC_LINK_IFELSE([
  3397. AC_LANG_PROGRAM([[
  3398. ]],[[
  3399. $func ();
  3400. ]])
  3401. ],[
  3402. AC_MSG_RESULT([yes])
  3403. eval "ac_cv_func_$func=yes"
  3404. AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
  3405. [Define to 1 if you have the $func function.])
  3406. ],[
  3407. AC_MSG_RESULT([but still no])
  3408. ])
  3409. fi
  3410. ])
  3411. dnl On Android, the only way to know if fseeko can be used is to see if it is
  3412. dnl declared or not (for this API level), as the symbol always exists in the
  3413. dnl lib.
  3414. AC_CHECK_DECL([fseeko],
  3415. [AC_DEFINE([HAVE_DECL_FSEEKO], [1],
  3416. [Define to 1 if you have the fseeko declaration])],
  3417. [],
  3418. [[#include <stdio.h>]])
  3419. CURL_CHECK_NONBLOCKING_SOCKET
  3420. AC_PATH_PROG( PERL, perl, ,
  3421. $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
  3422. AC_SUBST(PERL)
  3423. if test -z "$PERL"; then
  3424. dnl if perl was not found then disable building docs
  3425. AC_MSG_WARN([disabling documentation])
  3426. BUILD_DOCS=0
  3427. curl_docs_msg="no"
  3428. fi
  3429. dnl set variable for use in automakefile(s)
  3430. AM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1)
  3431. dnl *************************************************************************
  3432. dnl If the manual variable still is set, then we go with providing a built-in
  3433. dnl manual
  3434. if test "$USE_MANUAL" = "1"; then
  3435. AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
  3436. curl_manual_msg="enabled"
  3437. fi
  3438. dnl set variable for use in automakefile(s)
  3439. AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
  3440. CURL_CHECK_LIB_ARES
  3441. if test "x$curl_cv_native_windows" != "xyes" &&
  3442. test "x$enable_shared" = "xyes"; then
  3443. build_libhostname=yes
  3444. else
  3445. build_libhostname=no
  3446. fi
  3447. AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
  3448. if test "x$want_ares" != xyes; then
  3449. CURL_CHECK_OPTION_THREADED_RESOLVER
  3450. fi
  3451. dnl ************************************************************
  3452. dnl disable POSIX threads
  3453. dnl
  3454. AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
  3455. AC_ARG_ENABLE(pthreads,
  3456. AS_HELP_STRING([--enable-pthreads],
  3457. [Enable POSIX threads (default for threaded resolver)])
  3458. AS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
  3459. [ case "$enableval" in
  3460. no) AC_MSG_RESULT(no)
  3461. want_pthreads=no
  3462. ;;
  3463. *) AC_MSG_RESULT(yes)
  3464. want_pthreads=yes
  3465. ;;
  3466. esac ], [
  3467. AC_MSG_RESULT(auto)
  3468. want_pthreads=auto
  3469. ]
  3470. )
  3471. dnl turn off pthreads if rt is disabled
  3472. if test "$want_pthreads" != "no"; then
  3473. if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
  3474. AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive])
  3475. fi
  3476. if test "$dontwant_rt" != "no"; then
  3477. dnl if --enable-pthreads was explicit then warn it's being ignored
  3478. if test "$want_pthreads" = "yes"; then
  3479. AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
  3480. fi
  3481. want_pthreads=no
  3482. fi
  3483. fi
  3484. dnl turn off pthreads if no threaded resolver
  3485. if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
  3486. want_pthreads=no
  3487. fi
  3488. dnl detect pthreads
  3489. if test "$want_pthreads" != "no"; then
  3490. AC_CHECK_HEADER(pthread.h,
  3491. [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
  3492. save_CFLAGS="$CFLAGS"
  3493. dnl When statically linking against boringssl, -lpthread is added to LIBS.
  3494. dnl Make sure to that this does not pass the check below, we really want
  3495. dnl -pthread in CFLAGS as recommended for GCC. This also ensures that
  3496. dnl lib1541 and lib1565 tests are built with these options. Otherwise
  3497. dnl they fail the build since tests/libtest/Makefile.am clears LIBS.
  3498. save_LIBS="$LIBS"
  3499. LIBS=
  3500. dnl Check for libc variants without a separate pthread lib like bionic
  3501. AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
  3502. LIBS="$save_LIBS"
  3503. dnl on HPUX, life is more complicated...
  3504. case $host in
  3505. *-hp-hpux*)
  3506. dnl it doesn't actually work without -lpthread
  3507. USE_THREADS_POSIX=""
  3508. ;;
  3509. *)
  3510. ;;
  3511. esac
  3512. dnl if it wasn't found without lib, search for it in pthread lib
  3513. if test "$USE_THREADS_POSIX" != "1"
  3514. then
  3515. # assign PTHREAD for pkg-config use
  3516. PTHREAD=" -pthread"
  3517. case $host in
  3518. *-ibm-aix*)
  3519. dnl Check if compiler is xlC
  3520. COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
  3521. if test x"$COMPILER_VERSION" = "x"; then
  3522. CFLAGS="$CFLAGS -pthread"
  3523. else
  3524. CFLAGS="$CFLAGS -qthreaded"
  3525. fi
  3526. ;;
  3527. powerpc-*amigaos*)
  3528. dnl No -pthread option, but link with -lpthread
  3529. PTHREAD=" -lpthread"
  3530. ;;
  3531. *)
  3532. CFLAGS="$CFLAGS -pthread"
  3533. ;;
  3534. esac
  3535. AC_CHECK_LIB(pthread, pthread_create,
  3536. [USE_THREADS_POSIX=1],
  3537. [ CFLAGS="$save_CFLAGS"])
  3538. fi
  3539. if test "x$USE_THREADS_POSIX" = "x1"
  3540. then
  3541. AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
  3542. curl_res_msg="POSIX threaded"
  3543. fi
  3544. ])
  3545. fi
  3546. dnl threaded resolver check
  3547. if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
  3548. if test "$want_pthreads" = "yes"; then
  3549. AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
  3550. fi
  3551. dnl If native Windows fallback on Win32 threads since no POSIX threads
  3552. if test "$curl_cv_native_windows" = "yes"; then
  3553. USE_THREADS_WIN32=1
  3554. AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
  3555. curl_res_msg="Win32 threaded"
  3556. else
  3557. AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
  3558. fi
  3559. fi
  3560. CURL_CONVERT_INCLUDE_TO_ISYSTEM
  3561. dnl ************************************************************
  3562. dnl disable verbose text strings
  3563. dnl
  3564. AC_MSG_CHECKING([whether to enable verbose strings])
  3565. AC_ARG_ENABLE(verbose,
  3566. AS_HELP_STRING([--enable-verbose],[Enable verbose strings])
  3567. AS_HELP_STRING([--disable-verbose],[Disable verbose strings]),
  3568. [ case "$enableval" in
  3569. no)
  3570. AC_MSG_RESULT(no)
  3571. AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
  3572. curl_verbose_msg="no"
  3573. ;;
  3574. *) AC_MSG_RESULT(yes)
  3575. ;;
  3576. esac ],
  3577. AC_MSG_RESULT(yes)
  3578. )
  3579. dnl ************************************************************
  3580. dnl enable SSPI support
  3581. dnl
  3582. AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
  3583. AC_ARG_ENABLE(sspi,
  3584. AS_HELP_STRING([--enable-sspi],[Enable SSPI])
  3585. AS_HELP_STRING([--disable-sspi],[Disable SSPI]),
  3586. [ case "$enableval" in
  3587. yes)
  3588. if test "$curl_cv_native_windows" = "yes"; then
  3589. AC_MSG_RESULT(yes)
  3590. AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
  3591. AC_SUBST(USE_WINDOWS_SSPI, [1])
  3592. curl_sspi_msg="enabled"
  3593. else
  3594. AC_MSG_RESULT(no)
  3595. AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
  3596. fi
  3597. ;;
  3598. *)
  3599. if test "x$SCHANNEL_ENABLED" = "x1"; then
  3600. # --with-schannel implies --enable-sspi
  3601. AC_MSG_RESULT(yes)
  3602. else
  3603. AC_MSG_RESULT(no)
  3604. fi
  3605. ;;
  3606. esac ],
  3607. if test "x$SCHANNEL_ENABLED" = "x1"; then
  3608. # --with-schannel implies --enable-sspi
  3609. AC_MSG_RESULT(yes)
  3610. else
  3611. AC_MSG_RESULT(no)
  3612. fi
  3613. )
  3614. dnl ************************************************************
  3615. dnl disable basic authentication
  3616. dnl
  3617. AC_MSG_CHECKING([whether to enable basic authentication method])
  3618. AC_ARG_ENABLE(basic-auth,
  3619. AS_HELP_STRING([--enable-basic-auth],[Enable basic authentication (default)])
  3620. AS_HELP_STRING([--disable-basic-auth],[Disable basic authentication]),
  3621. [ case "$enableval" in
  3622. no)
  3623. AC_MSG_RESULT(no)
  3624. AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication])
  3625. CURL_DISABLE_BASIC_AUTH=1
  3626. ;;
  3627. *) AC_MSG_RESULT(yes)
  3628. ;;
  3629. esac ],
  3630. AC_MSG_RESULT(yes)
  3631. )
  3632. dnl ************************************************************
  3633. dnl disable bearer authentication
  3634. dnl
  3635. AC_MSG_CHECKING([whether to enable bearer authentication method])
  3636. AC_ARG_ENABLE(bearer-auth,
  3637. AS_HELP_STRING([--enable-bearer-auth],[Enable bearer authentication (default)])
  3638. AS_HELP_STRING([--disable-bearer-auth],[Disable bearer authentication]),
  3639. [ case "$enableval" in
  3640. no)
  3641. AC_MSG_RESULT(no)
  3642. AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication])
  3643. CURL_DISABLE_BEARER_AUTH=1
  3644. ;;
  3645. *) AC_MSG_RESULT(yes)
  3646. ;;
  3647. esac ],
  3648. AC_MSG_RESULT(yes)
  3649. )
  3650. dnl ************************************************************
  3651. dnl disable digest authentication
  3652. dnl
  3653. AC_MSG_CHECKING([whether to enable digest authentication method])
  3654. AC_ARG_ENABLE(digest-auth,
  3655. AS_HELP_STRING([--enable-digest-auth],[Enable digest authentication (default)])
  3656. AS_HELP_STRING([--disable-digest-auth],[Disable digest authentication]),
  3657. [ case "$enableval" in
  3658. no)
  3659. AC_MSG_RESULT(no)
  3660. AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication])
  3661. CURL_DISABLE_DIGEST_AUTH=1
  3662. ;;
  3663. *) AC_MSG_RESULT(yes)
  3664. ;;
  3665. esac ],
  3666. AC_MSG_RESULT(yes)
  3667. )
  3668. dnl ************************************************************
  3669. dnl disable kerberos authentication
  3670. dnl
  3671. AC_MSG_CHECKING([whether to enable kerberos authentication method])
  3672. AC_ARG_ENABLE(kerberos-auth,
  3673. AS_HELP_STRING([--enable-kerberos-auth],[Enable kerberos authentication (default)])
  3674. AS_HELP_STRING([--disable-kerberos-auth],[Disable kerberos authentication]),
  3675. [ case "$enableval" in
  3676. no)
  3677. AC_MSG_RESULT(no)
  3678. AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication])
  3679. CURL_DISABLE_KERBEROS_AUTH=1
  3680. ;;
  3681. *) AC_MSG_RESULT(yes)
  3682. ;;
  3683. esac ],
  3684. AC_MSG_RESULT(yes)
  3685. )
  3686. dnl ************************************************************
  3687. dnl disable negotiate authentication
  3688. dnl
  3689. AC_MSG_CHECKING([whether to enable negotiate authentication method])
  3690. AC_ARG_ENABLE(negotiate-auth,
  3691. AS_HELP_STRING([--enable-negotiate-auth],[Enable negotiate authentication (default)])
  3692. AS_HELP_STRING([--disable-negotiate-auth],[Disable negotiate authentication]),
  3693. [ case "$enableval" in
  3694. no)
  3695. AC_MSG_RESULT(no)
  3696. AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication])
  3697. CURL_DISABLE_NEGOTIATE_AUTH=1
  3698. ;;
  3699. *) AC_MSG_RESULT(yes)
  3700. ;;
  3701. esac ],
  3702. AC_MSG_RESULT(yes)
  3703. )
  3704. dnl ************************************************************
  3705. dnl disable aws
  3706. dnl
  3707. AC_MSG_CHECKING([whether to enable aws sig methods])
  3708. AC_ARG_ENABLE(aws,
  3709. AS_HELP_STRING([--enable-aws],[Enable AWS sig support (default)])
  3710. AS_HELP_STRING([--disable-aws],[Disable AWS sig support]),
  3711. [ case "$enableval" in
  3712. no)
  3713. AC_MSG_RESULT(no)
  3714. AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support])
  3715. CURL_DISABLE_AWS=1
  3716. ;;
  3717. *) AC_MSG_RESULT(yes)
  3718. ;;
  3719. esac ],
  3720. AC_MSG_RESULT(yes)
  3721. )
  3722. dnl ************************************************************
  3723. dnl disable NTLM support
  3724. dnl
  3725. AC_MSG_CHECKING([whether to support NTLM])
  3726. AC_ARG_ENABLE(ntlm,
  3727. AS_HELP_STRING([--enable-ntlm],[Enable NTLM support])
  3728. AS_HELP_STRING([--disable-ntlm],[Disable NTLM support]),
  3729. [ case "$enableval" in
  3730. no)
  3731. AC_MSG_RESULT(no)
  3732. AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support])
  3733. CURL_DISABLE_NTLM=1
  3734. ;;
  3735. *) AC_MSG_RESULT(yes)
  3736. ;;
  3737. esac ],
  3738. AC_MSG_RESULT(yes)
  3739. )
  3740. CURL_CHECK_OPTION_NTLM_WB
  3741. CURL_CHECK_NTLM_WB
  3742. dnl ************************************************************
  3743. dnl disable TLS-SRP authentication
  3744. dnl
  3745. AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
  3746. AC_ARG_ENABLE(tls-srp,
  3747. AS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
  3748. AS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
  3749. [ case "$enableval" in
  3750. no)
  3751. AC_MSG_RESULT(no)
  3752. want_tls_srp=no
  3753. ;;
  3754. *) AC_MSG_RESULT(yes)
  3755. want_tls_srp=yes
  3756. ;;
  3757. esac ],
  3758. AC_MSG_RESULT(yes)
  3759. want_tls_srp=yes
  3760. )
  3761. if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
  3762. AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
  3763. USE_TLS_SRP=1
  3764. curl_tls_srp_msg="enabled"
  3765. fi
  3766. dnl ************************************************************
  3767. dnl disable Unix domain sockets support
  3768. dnl
  3769. AC_MSG_CHECKING([whether to enable Unix domain sockets])
  3770. AC_ARG_ENABLE(unix-sockets,
  3771. AS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
  3772. AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
  3773. [ case "$enableval" in
  3774. no) AC_MSG_RESULT(no)
  3775. want_unix_sockets=no
  3776. ;;
  3777. *) AC_MSG_RESULT(yes)
  3778. want_unix_sockets=yes
  3779. ;;
  3780. esac ], [
  3781. AC_MSG_RESULT(auto)
  3782. want_unix_sockets=auto
  3783. ]
  3784. )
  3785. if test "x$want_unix_sockets" != "xno"; then
  3786. if test "x$curl_cv_native_windows" = "xyes"; then
  3787. USE_UNIX_SOCKETS=1
  3788. AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
  3789. curl_unix_sockets_msg="enabled"
  3790. else
  3791. AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
  3792. AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
  3793. AC_SUBST(USE_UNIX_SOCKETS, [1])
  3794. curl_unix_sockets_msg="enabled"
  3795. ], [
  3796. if test "x$want_unix_sockets" = "xyes"; then
  3797. AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
  3798. fi
  3799. ], [
  3800. #include <sys/un.h>
  3801. ])
  3802. fi
  3803. fi
  3804. dnl ************************************************************
  3805. dnl disable cookies support
  3806. dnl
  3807. AC_MSG_CHECKING([whether to support cookies])
  3808. AC_ARG_ENABLE(cookies,
  3809. AS_HELP_STRING([--enable-cookies],[Enable cookies support])
  3810. AS_HELP_STRING([--disable-cookies],[Disable cookies support]),
  3811. [ case "$enableval" in
  3812. no)
  3813. AC_MSG_RESULT(no)
  3814. AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
  3815. ;;
  3816. *) AC_MSG_RESULT(yes)
  3817. ;;
  3818. esac ],
  3819. AC_MSG_RESULT(yes)
  3820. )
  3821. dnl ************************************************************
  3822. dnl disable socketpair
  3823. dnl
  3824. AC_MSG_CHECKING([whether to support socketpair])
  3825. AC_ARG_ENABLE(socketpair,
  3826. AS_HELP_STRING([--enable-socketpair],[Enable socketpair support])
  3827. AS_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
  3828. [ case "$enableval" in
  3829. no)
  3830. AC_MSG_RESULT(no)
  3831. AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support])
  3832. ;;
  3833. *) AC_MSG_RESULT(yes)
  3834. ;;
  3835. esac ],
  3836. AC_MSG_RESULT(yes)
  3837. )
  3838. dnl ************************************************************
  3839. dnl disable HTTP authentication support
  3840. dnl
  3841. AC_MSG_CHECKING([whether to support HTTP authentication])
  3842. AC_ARG_ENABLE(http-auth,
  3843. AS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
  3844. AS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
  3845. [ case "$enableval" in
  3846. no)
  3847. AC_MSG_RESULT(no)
  3848. AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication])
  3849. ;;
  3850. *) AC_MSG_RESULT(yes)
  3851. ;;
  3852. esac ],
  3853. AC_MSG_RESULT(yes)
  3854. )
  3855. dnl ************************************************************
  3856. dnl disable DoH support
  3857. dnl
  3858. AC_MSG_CHECKING([whether to support DoH])
  3859. AC_ARG_ENABLE(doh,
  3860. AS_HELP_STRING([--enable-doh],[Enable DoH support])
  3861. AS_HELP_STRING([--disable-doh],[Disable DoH support]),
  3862. [ case "$enableval" in
  3863. no)
  3864. AC_MSG_RESULT(no)
  3865. AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH])
  3866. ;;
  3867. *) AC_MSG_RESULT(yes)
  3868. ;;
  3869. esac ],
  3870. AC_MSG_RESULT(yes)
  3871. )
  3872. dnl ************************************************************
  3873. dnl disable mime API support
  3874. dnl
  3875. AC_MSG_CHECKING([whether to support the MIME API])
  3876. AC_ARG_ENABLE(mime,
  3877. AS_HELP_STRING([--enable-mime],[Enable mime API support])
  3878. AS_HELP_STRING([--disable-mime],[Disable mime API support]),
  3879. [ case "$enableval" in
  3880. no)
  3881. AC_MSG_RESULT(no)
  3882. AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API])
  3883. ;;
  3884. *) AC_MSG_RESULT(yes)
  3885. ;;
  3886. esac ],
  3887. AC_MSG_RESULT(yes)
  3888. )
  3889. dnl ************************************************************
  3890. dnl disable bindlocal
  3891. dnl
  3892. AC_MSG_CHECKING([whether to support binding connections locally])
  3893. AC_ARG_ENABLE(bindlocal,
  3894. AS_HELP_STRING([--enable-bindlocal],[Enable local binding support])
  3895. AS_HELP_STRING([--disable-bindlocal],[Disable local binding support]),
  3896. [ case "$enableval" in
  3897. no)
  3898. AC_MSG_RESULT(no)
  3899. AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support])
  3900. ;;
  3901. *) AC_MSG_RESULT(yes)
  3902. ;;
  3903. esac ],
  3904. AC_MSG_RESULT(yes)
  3905. )
  3906. dnl ************************************************************
  3907. dnl disable form API support
  3908. dnl
  3909. AC_MSG_CHECKING([whether to support the form API])
  3910. AC_ARG_ENABLE(form-api,
  3911. AS_HELP_STRING([--enable-form-api],[Enable form API support])
  3912. AS_HELP_STRING([--disable-form-api],[Disable form API support]),
  3913. [ case "$enableval" in
  3914. no) AC_MSG_RESULT(no)
  3915. AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
  3916. ;;
  3917. *) AC_MSG_RESULT(yes)
  3918. test "$enable_mime" = no &&
  3919. AC_MSG_ERROR(MIME support needs to be enabled in order to enable form API support)
  3920. ;;
  3921. esac ],
  3922. [
  3923. if test "$enable_mime" = no; then
  3924. enable_form_api=no
  3925. AC_MSG_RESULT(no)
  3926. AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
  3927. else
  3928. AC_MSG_RESULT(yes)
  3929. fi ]
  3930. )
  3931. dnl ************************************************************
  3932. dnl disable date parsing
  3933. dnl
  3934. AC_MSG_CHECKING([whether to support date parsing])
  3935. AC_ARG_ENABLE(dateparse,
  3936. AS_HELP_STRING([--enable-dateparse],[Enable date parsing])
  3937. AS_HELP_STRING([--disable-dateparse],[Disable date parsing]),
  3938. [ case "$enableval" in
  3939. no)
  3940. AC_MSG_RESULT(no)
  3941. AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing])
  3942. ;;
  3943. *) AC_MSG_RESULT(yes)
  3944. ;;
  3945. esac ],
  3946. AC_MSG_RESULT(yes)
  3947. )
  3948. dnl ************************************************************
  3949. dnl disable netrc
  3950. dnl
  3951. AC_MSG_CHECKING([whether to support netrc parsing])
  3952. AC_ARG_ENABLE(netrc,
  3953. AS_HELP_STRING([--enable-netrc],[Enable netrc parsing])
  3954. AS_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
  3955. [ case "$enableval" in
  3956. no)
  3957. AC_MSG_RESULT(no)
  3958. AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing])
  3959. ;;
  3960. *) AC_MSG_RESULT(yes)
  3961. ;;
  3962. esac ],
  3963. AC_MSG_RESULT(yes)
  3964. )
  3965. dnl ************************************************************
  3966. dnl disable progress-meter
  3967. dnl
  3968. AC_MSG_CHECKING([whether to support progress-meter])
  3969. AC_ARG_ENABLE(progress-meter,
  3970. AS_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
  3971. AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
  3972. [ case "$enableval" in
  3973. no)
  3974. AC_MSG_RESULT(no)
  3975. AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter])
  3976. ;;
  3977. *) AC_MSG_RESULT(yes)
  3978. ;;
  3979. esac ],
  3980. AC_MSG_RESULT(yes)
  3981. )
  3982. dnl ************************************************************
  3983. dnl disable shuffle DNS support
  3984. dnl
  3985. AC_MSG_CHECKING([whether to support DNS shuffling])
  3986. AC_ARG_ENABLE(dnsshuffle,
  3987. AS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
  3988. AS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
  3989. [ case "$enableval" in
  3990. no)
  3991. AC_MSG_RESULT(no)
  3992. AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling])
  3993. ;;
  3994. *) AC_MSG_RESULT(yes)
  3995. ;;
  3996. esac ],
  3997. AC_MSG_RESULT(yes)
  3998. )
  3999. dnl ************************************************************
  4000. dnl disable the curl_easy_options API
  4001. dnl
  4002. AC_MSG_CHECKING([whether to support curl_easy_option*])
  4003. AC_ARG_ENABLE(get-easy-options,
  4004. AS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
  4005. AS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
  4006. [ case "$enableval" in
  4007. no)
  4008. AC_MSG_RESULT(no)
  4009. AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
  4010. ;;
  4011. *) AC_MSG_RESULT(yes)
  4012. ;;
  4013. esac ],
  4014. AC_MSG_RESULT(yes)
  4015. )
  4016. dnl ************************************************************
  4017. dnl switch on/off alt-svc
  4018. dnl
  4019. AC_MSG_CHECKING([whether to support alt-svc])
  4020. AC_ARG_ENABLE(alt-svc,
  4021. AS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
  4022. AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
  4023. [ case "$enableval" in
  4024. no)
  4025. AC_MSG_RESULT(no)
  4026. AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
  4027. curl_altsvc_msg="no";
  4028. enable_altsvc="no"
  4029. ;;
  4030. *) AC_MSG_RESULT(yes)
  4031. ;;
  4032. esac ],
  4033. AC_MSG_RESULT(yes)
  4034. )
  4035. dnl ************************************************************
  4036. dnl switch on/off headers-api
  4037. dnl
  4038. AC_MSG_CHECKING([whether to support headers-api])
  4039. AC_ARG_ENABLE(headers-api,
  4040. AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
  4041. AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
  4042. [ case "$enableval" in
  4043. no) AC_MSG_RESULT(no)
  4044. curl_headers_msg="no (--enable-headers-api)"
  4045. AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api])
  4046. ;;
  4047. *)
  4048. AC_MSG_RESULT(yes)
  4049. ;;
  4050. esac ],
  4051. AC_MSG_RESULT(yes)
  4052. )
  4053. dnl only check for HSTS if there's SSL present
  4054. if test -n "$SSL_ENABLED"; then
  4055. dnl ************************************************************
  4056. dnl switch on/off hsts
  4057. dnl
  4058. AC_MSG_CHECKING([whether to support HSTS])
  4059. AC_ARG_ENABLE(hsts,
  4060. AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
  4061. AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
  4062. [ case "$enableval" in
  4063. no)
  4064. AC_MSG_RESULT(no)
  4065. hsts="no"
  4066. ;;
  4067. *) AC_MSG_RESULT(yes)
  4068. ;;
  4069. esac ],
  4070. AC_MSG_RESULT($hsts)
  4071. )
  4072. else
  4073. AC_MSG_NOTICE([disables HSTS due to lack of SSL])
  4074. hsts="no"
  4075. fi
  4076. if test "x$hsts" != "xyes"; then
  4077. curl_hsts_msg="no (--enable-hsts)";
  4078. AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
  4079. fi
  4080. dnl *************************************************************
  4081. dnl check whether ECH support, if desired, is actually available
  4082. dnl
  4083. if test "x$want_ech" != "xno"; then
  4084. AC_MSG_CHECKING([whether ECH support is available])
  4085. dnl assume NOT and look for sufficient condition
  4086. ECH_ENABLED=0
  4087. ECH_SUPPORT=''
  4088. dnl OpenSSL with a chosen ECH function should be enough
  4089. dnl so more exhaustive checking seems unnecessary for now
  4090. if test "x$OPENSSL_ENABLED" = "x1"; then
  4091. AC_CHECK_FUNCS(SSL_get_ech_status,
  4092. ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)"
  4093. ECH_ENABLED=1)
  4094. dnl add 'elif' chain here for additional implementations
  4095. fi
  4096. dnl now deal with whatever we found
  4097. if test "x$ECH_ENABLED" = "x1"; then
  4098. AC_DEFINE(USE_ECH, 1, [if ECH support is available])
  4099. AC_MSG_RESULT($ECH_SUPPORT)
  4100. experimental="$experimental ECH"
  4101. else
  4102. AC_MSG_ERROR([--enable-ech ignored: No ECH support found])
  4103. fi
  4104. fi
  4105. dnl *************************************************************
  4106. dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio
  4107. dnl
  4108. if test "x$OPENSSL_ENABLED" = "x1"; then
  4109. AC_CHECK_FUNCS([SSL_set0_wbio])
  4110. fi
  4111. dnl *************************************************************
  4112. dnl WebSockets
  4113. dnl
  4114. AC_MSG_CHECKING([whether to support WebSockets])
  4115. AC_ARG_ENABLE(websockets,
  4116. AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
  4117. AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
  4118. [ case "$enableval" in
  4119. no)
  4120. AC_MSG_RESULT(no)
  4121. ;;
  4122. *)
  4123. if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
  4124. AC_MSG_RESULT(yes)
  4125. curl_ws_msg="enabled"
  4126. AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable websockets support])
  4127. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
  4128. if test "x$SSL_ENABLED" = "x1"; then
  4129. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
  4130. fi
  4131. experimental="$experimental Websockets"
  4132. else
  4133. dnl websockets requires >32 bit curl_off_t
  4134. AC_MSG_RESULT(no)
  4135. AC_MSG_WARN([Websockets disabled due to lack of >32 bit curl_off_t])
  4136. fi
  4137. ;;
  4138. esac ],
  4139. AC_MSG_RESULT(no)
  4140. )
  4141. dnl ************************************************************
  4142. dnl hiding of library internal symbols
  4143. dnl
  4144. CURL_CONFIGURE_SYMBOL_HIDING
  4145. dnl
  4146. dnl All the library dependencies put into $LIB apply to libcurl only.
  4147. dnl
  4148. LIBCURL_LIBS="$LIBS$PTHREAD"
  4149. AC_SUBST(LIBCURL_LIBS)
  4150. AC_SUBST(CURL_NETWORK_LIBS)
  4151. AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
  4152. dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
  4153. dnl LIBS variable used in generated makefile at makefile processing
  4154. dnl time. Doing this functionally prevents LIBS from being used for
  4155. dnl all link targets in given makefile.
  4156. BLANK_AT_MAKETIME=
  4157. AC_SUBST(BLANK_AT_MAKETIME)
  4158. AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
  4159. dnl yes or no
  4160. ENABLE_SHARED="$enable_shared"
  4161. AC_SUBST(ENABLE_SHARED)
  4162. dnl to let curl-config output the static libraries correctly
  4163. ENABLE_STATIC="$enable_static"
  4164. AC_SUBST(ENABLE_STATIC)
  4165. dnl merge the pkg-config Libs.private field into Libs when static-only
  4166. if test "x$enable_shared" = "xno"; then
  4167. LIBCURL_NO_SHARED=$LIBCURL_LIBS
  4168. else
  4169. LIBCURL_NO_SHARED=
  4170. fi
  4171. AC_SUBST(LIBCURL_NO_SHARED)
  4172. rm $compilersh
  4173. dnl
  4174. dnl For keeping supported features and protocols also in pkg-config file
  4175. dnl since it is more cross-compile friendly than curl-config
  4176. dnl
  4177. if test "x$OPENSSL_ENABLED" = "x1"; then
  4178. SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
  4179. elif test -n "$SSL_ENABLED"; then
  4180. SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
  4181. fi
  4182. if test "x$IPV6_ENABLED" = "x1"; then
  4183. SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
  4184. fi
  4185. if test "x$USE_UNIX_SOCKETS" = "x1"; then
  4186. SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
  4187. fi
  4188. if test "x$HAVE_LIBZ" = "x1"; then
  4189. SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
  4190. fi
  4191. if test "x$HAVE_BROTLI" = "x1"; then
  4192. SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
  4193. fi
  4194. if test "x$HAVE_ZSTD" = "x1"; then
  4195. SUPPORT_FEATURES="$SUPPORT_FEATURES zstd"
  4196. fi
  4197. if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
  4198. -o "x$USE_THREADS_WIN32" = "x1"; then
  4199. SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
  4200. fi
  4201. if test "x$IDN_ENABLED" = "x1"; then
  4202. SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
  4203. fi
  4204. if test "x$USE_WINDOWS_SSPI" = "x1"; then
  4205. SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
  4206. fi
  4207. if test "x$HAVE_GSSAPI" = "x1"; then
  4208. SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
  4209. fi
  4210. if test "x$curl_psl_msg" = "xenabled"; then
  4211. SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
  4212. fi
  4213. if test "x$curl_gsasl_msg" = "xenabled"; then
  4214. SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
  4215. fi
  4216. if test "x$enable_altsvc" = "xyes"; then
  4217. SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
  4218. fi
  4219. if test "x$hsts" = "xyes"; then
  4220. SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
  4221. fi
  4222. if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
  4223. \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
  4224. SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
  4225. fi
  4226. if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
  4227. \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
  4228. SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
  4229. fi
  4230. use_curl_ntlm_core=no
  4231. if test "x$CURL_DISABLE_NTLM" != "x1"; then
  4232. if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
  4233. -o "x$GNUTLS_ENABLED" = "x1" \
  4234. -o "x$SECURETRANSPORT_ENABLED" = "x1" \
  4235. -o "x$USE_WIN32_CRYPTO" = "x1" \
  4236. -o "x$WOLFSSL_NTLM" = "x1"; then
  4237. use_curl_ntlm_core=yes
  4238. fi
  4239. if test "x$use_curl_ntlm_core" = "xyes" \
  4240. -o "x$USE_WINDOWS_SSPI" = "x1"; then
  4241. SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
  4242. if test "x$CURL_DISABLE_HTTP" != "x1" -a \
  4243. "x$NTLM_WB_ENABLED" = "x1"; then
  4244. SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
  4245. fi
  4246. fi
  4247. fi
  4248. if test "x$USE_TLS_SRP" = "x1"; then
  4249. SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
  4250. fi
  4251. if test "x$USE_NGHTTP2" = "x1"; then
  4252. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
  4253. fi
  4254. if test "x$USE_NGTCP2_H3" = "x1" -o "x$USE_QUICHE" = "x1" \
  4255. -o "x$USE_OPENSSL_H3" = "x1" -o "x$USE_MSH3" = "x1"; then
  4256. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  4257. AC_MSG_ERROR([MultiSSL cannot be enabled with HTTP/3 and vice versa])
  4258. fi
  4259. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
  4260. fi
  4261. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  4262. SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
  4263. fi
  4264. AC_MSG_CHECKING([if this build supports HTTPS-proxy])
  4265. dnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends
  4266. if test "x$CURL_DISABLE_HTTP" != "x1"; then
  4267. if test "x$https_proxy" != "xno"; then
  4268. if test "x$OPENSSL_ENABLED" = "x1" \
  4269. -o "x$GNUTLS_ENABLED" = "x1" \
  4270. -o "x$SECURETRANSPORT_ENABLED" = "x1" \
  4271. -o "x$RUSTLS_ENABLED" = "x1" \
  4272. -o "x$BEARSSL_ENABLED" = "x1" \
  4273. -o "x$SCHANNEL_ENABLED" = "x1" \
  4274. -o "x$GNUTLS_ENABLED" = "x1" \
  4275. -o "x$MBEDTLS_ENABLED" = "x1"; then
  4276. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
  4277. AC_MSG_RESULT([yes])
  4278. elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_FULL_BIO" = "x1"; then
  4279. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
  4280. AC_MSG_RESULT([yes])
  4281. else
  4282. AC_MSG_RESULT([no])
  4283. fi
  4284. else
  4285. AC_MSG_RESULT([no])
  4286. fi
  4287. else
  4288. AC_MSG_RESULT([no])
  4289. fi
  4290. if test "x$ECH_ENABLED" = "x1"; then
  4291. SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
  4292. fi
  4293. if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
  4294. if test ${ac_cv_sizeof_off_t} -gt 4 -o \
  4295. "$curl_win32_file_api" = "win32_large_files"; then
  4296. SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
  4297. fi
  4298. fi
  4299. if test "$tst_atomic" = "yes"; then
  4300. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4301. elif test "x$USE_THREADS_POSIX" = "x1" -a \
  4302. "x$ac_cv_header_pthread_h" = "xyes"; then
  4303. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4304. else
  4305. AC_COMPILE_IFELSE([
  4306. AC_LANG_PROGRAM([[
  4307. #include <windows.h>
  4308. ]],[[
  4309. #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
  4310. #error
  4311. #endif
  4312. ]])
  4313. ],[
  4314. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4315. ],[
  4316. ])
  4317. fi
  4318. dnl replace spaces with newlines
  4319. dnl sort the lines
  4320. dnl replace the newlines back to spaces
  4321. SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
  4322. AC_SUBST(SUPPORT_FEATURES)
  4323. dnl For supported protocols in pkg-config file
  4324. if test "x$CURL_DISABLE_HTTP" != "x1"; then
  4325. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP IPFS IPNS"
  4326. if test "x$SSL_ENABLED" = "x1"; then
  4327. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
  4328. fi
  4329. fi
  4330. if test "x$CURL_DISABLE_FTP" != "x1"; then
  4331. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
  4332. if test "x$SSL_ENABLED" = "x1"; then
  4333. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
  4334. fi
  4335. fi
  4336. if test "x$CURL_DISABLE_FILE" != "x1"; then
  4337. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
  4338. fi
  4339. if test "x$CURL_DISABLE_TELNET" != "x1"; then
  4340. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
  4341. fi
  4342. if test "x$CURL_DISABLE_LDAP" != "x1"; then
  4343. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
  4344. if test "x$CURL_DISABLE_LDAPS" != "x1"; then
  4345. if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
  4346. (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
  4347. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
  4348. fi
  4349. fi
  4350. fi
  4351. if test "x$CURL_DISABLE_DICT" != "x1"; then
  4352. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
  4353. fi
  4354. if test "x$CURL_DISABLE_TFTP" != "x1"; then
  4355. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
  4356. fi
  4357. if test "x$CURL_DISABLE_GOPHER" != "x1"; then
  4358. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
  4359. if test "x$SSL_ENABLED" = "x1"; then
  4360. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
  4361. fi
  4362. fi
  4363. if test "x$CURL_DISABLE_MQTT" != "x1"; then
  4364. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
  4365. fi
  4366. if test "x$CURL_DISABLE_POP3" != "x1"; then
  4367. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
  4368. if test "x$SSL_ENABLED" = "x1"; then
  4369. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
  4370. fi
  4371. fi
  4372. if test "x$CURL_DISABLE_IMAP" != "x1"; then
  4373. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
  4374. if test "x$SSL_ENABLED" = "x1"; then
  4375. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
  4376. fi
  4377. fi
  4378. if test "x$CURL_DISABLE_SMB" != "x1" \
  4379. -a "x$use_curl_ntlm_core" = "xyes"; then
  4380. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
  4381. if test "x$SSL_ENABLED" = "x1"; then
  4382. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
  4383. fi
  4384. fi
  4385. if test "x$CURL_DISABLE_SMTP" != "x1"; then
  4386. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
  4387. if test "x$SSL_ENABLED" = "x1"; then
  4388. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
  4389. fi
  4390. fi
  4391. if test "x$USE_LIBSSH2" = "x1"; then
  4392. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
  4393. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4394. fi
  4395. if test "x$USE_LIBSSH" = "x1"; then
  4396. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
  4397. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4398. fi
  4399. if test "x$USE_WOLFSSH" = "x1"; then
  4400. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4401. fi
  4402. if test "x$CURL_DISABLE_RTSP" != "x1"; then
  4403. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
  4404. fi
  4405. if test "x$USE_LIBRTMP" = "x1"; then
  4406. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
  4407. fi
  4408. dnl replace spaces with newlines
  4409. dnl sort the lines
  4410. dnl replace the newlines back to spaces
  4411. SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
  4412. AC_SUBST(SUPPORT_PROTOCOLS)
  4413. dnl squeeze whitespace out of some variables
  4414. squeeze CFLAGS
  4415. squeeze CPPFLAGS
  4416. squeeze DEFS
  4417. squeeze LDFLAGS
  4418. squeeze LIBS
  4419. squeeze LIBCURL_LIBS
  4420. squeeze CURL_NETWORK_LIBS
  4421. squeeze CURL_NETWORK_AND_TIME_LIBS
  4422. squeeze SUPPORT_FEATURES
  4423. squeeze SUPPORT_PROTOCOLS
  4424. XC_CHECK_BUILD_FLAGS
  4425. SSL_BACKENDS=${ssl_backends}
  4426. AC_SUBST(SSL_BACKENDS)
  4427. if test "x$want_curldebug_assumed" = "xyes" &&
  4428. test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
  4429. ac_configure_args="$ac_configure_args --enable-curldebug"
  4430. fi
  4431. AC_CONFIG_FILES([Makefile \
  4432. docs/Makefile \
  4433. docs/examples/Makefile \
  4434. docs/libcurl/Makefile \
  4435. docs/libcurl/opts/Makefile \
  4436. docs/cmdline-opts/Makefile \
  4437. include/Makefile \
  4438. include/curl/Makefile \
  4439. src/Makefile \
  4440. lib/Makefile \
  4441. scripts/Makefile \
  4442. lib/libcurl.vers \
  4443. lib/libcurl.plist \
  4444. tests/Makefile \
  4445. tests/config \
  4446. tests/certs/Makefile \
  4447. tests/certs/scripts/Makefile \
  4448. tests/data/Makefile \
  4449. tests/server/Makefile \
  4450. tests/libtest/Makefile \
  4451. tests/unit/Makefile \
  4452. tests/http/config.ini \
  4453. tests/http/Makefile \
  4454. tests/http/clients/Makefile \
  4455. packages/Makefile \
  4456. packages/vms/Makefile \
  4457. curl-config \
  4458. libcurl.pc
  4459. ])
  4460. AC_OUTPUT
  4461. CURL_GENERATE_CONFIGUREHELP_PM
  4462. AC_MSG_NOTICE([Configured to build curl/libcurl:
  4463. Host setup: ${host}
  4464. Install prefix: ${prefix}
  4465. Compiler: ${CC}
  4466. CFLAGS: ${CFLAGS}
  4467. CPPFLAGS: ${CPPFLAGS}
  4468. LDFLAGS: ${LDFLAGS}
  4469. LIBS: ${LIBS}
  4470. curl version: ${CURLVERSION}
  4471. SSL: ${curl_ssl_msg}
  4472. SSH: ${curl_ssh_msg}
  4473. zlib: ${curl_zlib_msg}
  4474. brotli: ${curl_brotli_msg}
  4475. zstd: ${curl_zstd_msg}
  4476. GSS-API: ${curl_gss_msg}
  4477. GSASL: ${curl_gsasl_msg}
  4478. TLS-SRP: ${curl_tls_srp_msg}
  4479. resolver: ${curl_res_msg}
  4480. IPv6: ${curl_ipv6_msg}
  4481. Unix sockets: ${curl_unix_sockets_msg}
  4482. IDN: ${curl_idn_msg}
  4483. Build docs: ${curl_docs_msg}
  4484. Build libcurl: Shared=${enable_shared}, Static=${enable_static}
  4485. Built-in manual: ${curl_manual_msg}
  4486. --libcurl option: ${curl_libcurl_msg}
  4487. Verbose errors: ${curl_verbose_msg}
  4488. Code coverage: ${curl_coverage_msg}
  4489. SSPI: ${curl_sspi_msg}
  4490. ca cert bundle: ${ca}${ca_warning}
  4491. ca cert path: ${capath}${capath_warning}
  4492. ca fallback: ${with_ca_fallback}
  4493. LDAP: ${curl_ldap_msg}
  4494. LDAPS: ${curl_ldaps_msg}
  4495. RTSP: ${curl_rtsp_msg}
  4496. RTMP: ${curl_rtmp_msg}
  4497. PSL: ${curl_psl_msg}
  4498. Alt-svc: ${curl_altsvc_msg}
  4499. Headers API: ${curl_headers_msg}
  4500. HSTS: ${curl_hsts_msg}
  4501. HTTP1: ${curl_h1_msg}
  4502. HTTP2: ${curl_h2_msg}
  4503. HTTP3: ${curl_h3_msg}
  4504. ECH: ${curl_ech_msg}
  4505. WebSockets: ${curl_ws_msg}
  4506. Protocols: ${SUPPORT_PROTOCOLS}
  4507. Features: ${SUPPORT_FEATURES}
  4508. ])
  4509. non13=`echo "$TLSCHOICE" | grep -Ei 'bearssl|secure-transport|mbedtls'`;
  4510. if test -n "$non13"; then
  4511. cat >&2 << _EOF
  4512. WARNING: A selected TLS library ($TLSCHOICE) does not support TLS 1.3!
  4513. _EOF
  4514. fi
  4515. if test -n "$experimental"; then
  4516. cat >&2 << _EOF
  4517. WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution!
  4518. _EOF
  4519. fi