configure.ac 145 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006
  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 whether to build documentation
  905. dnl **********************************************************************
  906. AC_MSG_CHECKING([whether to build documentation])
  907. AC_ARG_ENABLE(docs,
  908. AS_HELP_STRING([--enable-docs],[Enable documentation])
  909. AS_HELP_STRING([--disable-docs],[Disable documentation]),
  910. [ case "$enableval" in
  911. no)
  912. AC_MSG_RESULT(no)
  913. BUILD_DOCS=0
  914. curl_docs_msg="no"
  915. ;;
  916. *) AC_MSG_RESULT(yes)
  917. BUILD_DOCS=1
  918. ;;
  919. esac ],
  920. AC_MSG_RESULT(yes)
  921. BUILD_DOCS=1
  922. )
  923. dnl **********************************************************************
  924. dnl Check for built-in manual
  925. dnl **********************************************************************
  926. AC_MSG_CHECKING([whether to provide built-in manual])
  927. AC_ARG_ENABLE(manual,
  928. AS_HELP_STRING([--enable-manual],[Enable built-in manual])
  929. AS_HELP_STRING([--disable-manual],[Disable built-in manual]),
  930. [ case "$enableval" in
  931. no)
  932. AC_MSG_RESULT(no)
  933. ;;
  934. *) AC_MSG_RESULT(yes)
  935. USE_MANUAL="1"
  936. ;;
  937. esac ],
  938. AC_MSG_RESULT(yes)
  939. USE_MANUAL="1"
  940. )
  941. dnl The actual use of the USE_MANUAL variable is done much later in this
  942. dnl script to allow other actions to disable it as well.
  943. dnl ************************************************************
  944. dnl disable C code generation support
  945. dnl
  946. AC_MSG_CHECKING([whether to enable generation of C code])
  947. AC_ARG_ENABLE(libcurl_option,
  948. AS_HELP_STRING([--enable-libcurl-option],[Enable --libcurl C code generation support])
  949. AS_HELP_STRING([--disable-libcurl-option],[Disable --libcurl C code generation support]),
  950. [ case "$enableval" in
  951. no)
  952. AC_MSG_RESULT(no)
  953. AC_DEFINE(CURL_DISABLE_LIBCURL_OPTION, 1, [to disable --libcurl C code generation option])
  954. curl_libcurl_msg="no"
  955. ;;
  956. *) AC_MSG_RESULT(yes)
  957. ;;
  958. esac ],
  959. AC_MSG_RESULT(yes)
  960. )
  961. dnl **********************************************************************
  962. dnl Checks for libraries.
  963. dnl **********************************************************************
  964. AC_MSG_CHECKING([whether to use libgcc])
  965. AC_ARG_ENABLE(libgcc,
  966. AS_HELP_STRING([--enable-libgcc],[use libgcc when linking]),
  967. [ case "$enableval" in
  968. yes)
  969. LIBS="-lgcc $LIBS"
  970. AC_MSG_RESULT(yes)
  971. ;;
  972. *) AC_MSG_RESULT(no)
  973. ;;
  974. esac ],
  975. AC_MSG_RESULT(no)
  976. )
  977. CURL_CHECK_LIB_XNET
  978. dnl gethostbyname without lib or in the nsl lib?
  979. AC_CHECK_FUNC(gethostbyname,
  980. [HAVE_GETHOSTBYNAME="1"
  981. ],
  982. [ AC_CHECK_LIB(nsl, gethostbyname,
  983. [HAVE_GETHOSTBYNAME="1"
  984. LIBS="-lnsl $LIBS"
  985. ])
  986. ])
  987. if test "$HAVE_GETHOSTBYNAME" != "1"
  988. then
  989. dnl gethostbyname in the socket lib?
  990. AC_CHECK_LIB(socket, gethostbyname,
  991. [HAVE_GETHOSTBYNAME="1"
  992. LIBS="-lsocket $LIBS"
  993. ])
  994. fi
  995. if test "$HAVE_GETHOSTBYNAME" != "1"
  996. then
  997. dnl gethostbyname in the watt lib?
  998. AC_CHECK_LIB(watt, gethostbyname,
  999. [HAVE_GETHOSTBYNAME="1"
  1000. CPPFLAGS="-I/dev/env/WATT_ROOT/inc"
  1001. LDFLAGS="-L/dev/env/WATT_ROOT/lib"
  1002. LIBS="-lwatt $LIBS"
  1003. ])
  1004. fi
  1005. dnl At least one system has been identified to require BOTH nsl and socket
  1006. dnl libs at the same time to link properly.
  1007. if test "$HAVE_GETHOSTBYNAME" != "1"
  1008. then
  1009. AC_MSG_CHECKING([for gethostbyname with both nsl and socket libs])
  1010. my_ac_save_LIBS=$LIBS
  1011. LIBS="-lnsl -lsocket $LIBS"
  1012. AC_LINK_IFELSE([
  1013. AC_LANG_PROGRAM([[
  1014. ]],[[
  1015. gethostbyname();
  1016. ]])
  1017. ],[
  1018. AC_MSG_RESULT([yes])
  1019. HAVE_GETHOSTBYNAME="1"
  1020. ],[
  1021. AC_MSG_RESULT([no])
  1022. LIBS=$my_ac_save_LIBS
  1023. ])
  1024. fi
  1025. if test "$HAVE_GETHOSTBYNAME" != "1"
  1026. then
  1027. dnl This is for winsock systems
  1028. if test "$curl_cv_native_windows" = "yes"; then
  1029. winsock_LIB="-lws2_32"
  1030. if test ! -z "$winsock_LIB"; then
  1031. my_ac_save_LIBS=$LIBS
  1032. LIBS="$winsock_LIB $LIBS"
  1033. AC_MSG_CHECKING([for gethostbyname in $winsock_LIB])
  1034. AC_LINK_IFELSE([
  1035. AC_LANG_PROGRAM([[
  1036. #ifdef _WIN32
  1037. #ifndef WIN32_LEAN_AND_MEAN
  1038. #define WIN32_LEAN_AND_MEAN
  1039. #endif
  1040. #include <winsock2.h>
  1041. #endif
  1042. ]],[[
  1043. gethostbyname("localhost");
  1044. ]])
  1045. ],[
  1046. AC_MSG_RESULT([yes])
  1047. HAVE_GETHOSTBYNAME="1"
  1048. ],[
  1049. AC_MSG_RESULT([no])
  1050. winsock_LIB=""
  1051. LIBS=$my_ac_save_LIBS
  1052. ])
  1053. fi
  1054. fi
  1055. fi
  1056. if test "$HAVE_GETHOSTBYNAME" != "1"
  1057. then
  1058. dnl This is for Minix 3.1
  1059. AC_MSG_CHECKING([for gethostbyname for Minix 3])
  1060. AC_LINK_IFELSE([
  1061. AC_LANG_PROGRAM([[
  1062. /* Older Minix versions may need <net/gen/netdb.h> here instead */
  1063. #include <netdb.h>
  1064. ]],[[
  1065. gethostbyname("localhost");
  1066. ]])
  1067. ],[
  1068. AC_MSG_RESULT([yes])
  1069. HAVE_GETHOSTBYNAME="1"
  1070. ],[
  1071. AC_MSG_RESULT([no])
  1072. ])
  1073. fi
  1074. if test "$HAVE_GETHOSTBYNAME" != "1"
  1075. then
  1076. dnl This is for eCos with a stubbed DNS implementation
  1077. AC_MSG_CHECKING([for gethostbyname for eCos])
  1078. AC_LINK_IFELSE([
  1079. AC_LANG_PROGRAM([[
  1080. #include <stdio.h>
  1081. #include <netdb.h>
  1082. ]],[[
  1083. gethostbyname("localhost");
  1084. ]])
  1085. ],[
  1086. AC_MSG_RESULT([yes])
  1087. HAVE_GETHOSTBYNAME="1"
  1088. ],[
  1089. AC_MSG_RESULT([no])
  1090. ])
  1091. fi
  1092. if test "$HAVE_GETHOSTBYNAME" != "1" -o "${with_amissl+set}" = set
  1093. then
  1094. dnl This is for AmigaOS with bsdsocket.library - needs testing before -lnet
  1095. AC_MSG_CHECKING([for gethostbyname for AmigaOS bsdsocket.library])
  1096. AC_LINK_IFELSE([
  1097. AC_LANG_PROGRAM([[
  1098. #define __USE_INLINE__
  1099. #include <proto/bsdsocket.h>
  1100. #ifdef __amigaos4__
  1101. struct SocketIFace *ISocket = NULL;
  1102. #else
  1103. struct Library *SocketBase = NULL;
  1104. #endif
  1105. ]],[[
  1106. gethostbyname("localhost");
  1107. ]])
  1108. ],[
  1109. AC_MSG_RESULT([yes])
  1110. HAVE_GETHOSTBYNAME="1"
  1111. HAVE_PROTO_BSDSOCKET_H="1"
  1112. AC_DEFINE(HAVE_PROTO_BSDSOCKET_H, 1, [if Amiga bsdsocket.library is in use])
  1113. AC_SUBST(HAVE_PROTO_BSDSOCKET_H, [1])
  1114. ],[
  1115. AC_MSG_RESULT([no])
  1116. ])
  1117. fi
  1118. if test "$HAVE_GETHOSTBYNAME" != "1"
  1119. then
  1120. dnl gethostbyname in the network lib - for Haiku OS
  1121. AC_CHECK_LIB(network, gethostbyname,
  1122. [HAVE_GETHOSTBYNAME="1"
  1123. LIBS="-lnetwork $LIBS"
  1124. ])
  1125. fi
  1126. if test "$HAVE_GETHOSTBYNAME" != "1"; then
  1127. AC_MSG_ERROR([couldn't find libraries for gethostbyname()])
  1128. fi
  1129. CURL_CHECK_LIBS_CONNECT
  1130. CURL_NETWORK_LIBS=$LIBS
  1131. dnl **********************************************************************
  1132. dnl In case that function clock_gettime with monotonic timer is available,
  1133. dnl check for additional required libraries.
  1134. dnl **********************************************************************
  1135. CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC
  1136. dnl Check for even better option
  1137. CURL_CHECK_FUNC_CLOCK_GETTIME_MONOTONIC_RAW
  1138. dnl **********************************************************************
  1139. dnl The preceding library checks are all potentially useful for test
  1140. dnl servers and libtest cases which require networking and clock_gettime
  1141. dnl support. Save the list of required libraries at this point for use
  1142. dnl while linking those test servers and programs.
  1143. dnl **********************************************************************
  1144. CURL_NETWORK_AND_TIME_LIBS=$LIBS
  1145. dnl **********************************************************************
  1146. dnl Check for the presence of ZLIB libraries and headers
  1147. dnl **********************************************************************
  1148. dnl Check for & handle argument to --with-zlib.
  1149. clean_CPPFLAGS=$CPPFLAGS
  1150. clean_LDFLAGS=$LDFLAGS
  1151. clean_LIBS=$LIBS
  1152. ZLIB_LIBS=""
  1153. AC_ARG_WITH(zlib,
  1154. AS_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH])
  1155. AS_HELP_STRING([--without-zlib],[disable use of zlib]),
  1156. [OPT_ZLIB="$withval"])
  1157. if test "$OPT_ZLIB" = "no" ; then
  1158. AC_MSG_WARN([zlib disabled])
  1159. else
  1160. if test "$OPT_ZLIB" = "yes" ; then
  1161. OPT_ZLIB=""
  1162. fi
  1163. if test -z "$OPT_ZLIB" ; then
  1164. CURL_CHECK_PKGCONFIG(zlib)
  1165. if test "$PKGCONFIG" != "no" ; then
  1166. ZLIB_LIBS="`$PKGCONFIG --libs-only-l zlib`"
  1167. if test -n "$ZLIB_LIBS"; then
  1168. LDFLAGS="$LDFLAGS `$PKGCONFIG --libs-only-L zlib`"
  1169. else
  1170. ZLIB_LIBS="`$PKGCONFIG --libs zlib`"
  1171. fi
  1172. LIBS="$ZLIB_LIBS $LIBS"
  1173. CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags zlib`"
  1174. OPT_ZLIB=""
  1175. HAVE_LIBZ="1"
  1176. fi
  1177. if test -z "$HAVE_LIBZ"; then
  1178. dnl Check for the lib without setting any new path, since many
  1179. dnl people have it in the default path
  1180. AC_CHECK_LIB(z, inflateEnd,
  1181. dnl libz found, set the variable
  1182. [HAVE_LIBZ="1"
  1183. ZLIB_LIBS="-lz"
  1184. LIBS="$ZLIB_LIBS $LIBS"],
  1185. dnl if no lib found, try /usr/local
  1186. [OPT_ZLIB="/usr/local"])
  1187. fi
  1188. fi
  1189. dnl Add a nonempty path to the compiler flags
  1190. if test -n "$OPT_ZLIB"; then
  1191. CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include"
  1192. LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff"
  1193. fi
  1194. AC_CHECK_HEADER(zlib.h,
  1195. [
  1196. dnl zlib.h was found
  1197. HAVE_ZLIB_H="1"
  1198. dnl if the lib wasn't found already, try again with the new paths
  1199. if test "$HAVE_LIBZ" != "1"; then
  1200. AC_CHECK_LIB(z, gzread,
  1201. [
  1202. dnl the lib was found!
  1203. HAVE_LIBZ="1"
  1204. ZLIB_LIBS="-lz"
  1205. LIBS="$ZLIB_LIBS $LIBS"
  1206. ],
  1207. [ CPPFLAGS=$clean_CPPFLAGS
  1208. LDFLAGS=$clean_LDFLAGS])
  1209. fi
  1210. ],
  1211. [
  1212. dnl zlib.h was not found, restore the flags
  1213. CPPFLAGS=$clean_CPPFLAGS
  1214. LDFLAGS=$clean_LDFLAGS]
  1215. )
  1216. if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1"
  1217. then
  1218. AC_MSG_WARN([configure found only the libz lib, not the header file!])
  1219. HAVE_LIBZ=""
  1220. CPPFLAGS=$clean_CPPFLAGS
  1221. LDFLAGS=$clean_LDFLAGS
  1222. LIBS=$clean_LIBS
  1223. ZLIB_LIBS=""
  1224. elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1"
  1225. then
  1226. AC_MSG_WARN([configure found only the libz header file, not the lib!])
  1227. CPPFLAGS=$clean_CPPFLAGS
  1228. LDFLAGS=$clean_LDFLAGS
  1229. LIBS=$clean_LIBS
  1230. ZLIB_LIBS=""
  1231. elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1"
  1232. then
  1233. dnl both header and lib were found!
  1234. AC_SUBST(HAVE_LIBZ)
  1235. AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available])
  1236. LIBS="$ZLIB_LIBS $clean_LIBS"
  1237. dnl replace 'HAVE_LIBZ' in the automake makefile.ams
  1238. AMFIXLIB="1"
  1239. AC_MSG_NOTICE([found both libz and libz.h header])
  1240. curl_zlib_msg="enabled"
  1241. fi
  1242. fi
  1243. dnl set variable for use in automakefile(s)
  1244. AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1)
  1245. AC_SUBST(ZLIB_LIBS)
  1246. dnl **********************************************************************
  1247. dnl Check for the presence of BROTLI decoder libraries and headers
  1248. dnl **********************************************************************
  1249. dnl Brotli project home page: https://github.com/google/brotli
  1250. dnl Default to compiler & linker defaults for BROTLI files & libraries.
  1251. OPT_BROTLI=off
  1252. AC_ARG_WITH(brotli,dnl
  1253. 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])
  1254. AS_HELP_STRING([--without-brotli], [disable BROTLI]),
  1255. OPT_BROTLI=$withval)
  1256. if test X"$OPT_BROTLI" != Xno; then
  1257. dnl backup the pre-brotli variables
  1258. CLEANLDFLAGS="$LDFLAGS"
  1259. CLEANCPPFLAGS="$CPPFLAGS"
  1260. CLEANLIBS="$LIBS"
  1261. case "$OPT_BROTLI" in
  1262. yes)
  1263. dnl --with-brotli (without path) used
  1264. CURL_CHECK_PKGCONFIG(libbrotlidec)
  1265. if test "$PKGCONFIG" != "no" ; then
  1266. LIB_BROTLI=`$PKGCONFIG --libs-only-l libbrotlidec`
  1267. LD_BROTLI=`$PKGCONFIG --libs-only-L libbrotlidec`
  1268. CPP_BROTLI=`$PKGCONFIG --cflags-only-I libbrotlidec`
  1269. version=`$PKGCONFIG --modversion libbrotlidec`
  1270. DIR_BROTLI=`echo $LD_BROTLI | $SED -e 's/^-L//'`
  1271. fi
  1272. ;;
  1273. off)
  1274. dnl no --with-brotli option given, just check default places
  1275. ;;
  1276. *)
  1277. dnl use the given --with-brotli spot
  1278. PREFIX_BROTLI=$OPT_BROTLI
  1279. ;;
  1280. esac
  1281. dnl if given with a prefix, we set -L and -I based on that
  1282. if test -n "$PREFIX_BROTLI"; then
  1283. LIB_BROTLI="-lbrotlidec"
  1284. LD_BROTLI=-L${PREFIX_BROTLI}/lib$libsuff
  1285. CPP_BROTLI=-I${PREFIX_BROTLI}/include
  1286. DIR_BROTLI=${PREFIX_BROTLI}/lib$libsuff
  1287. fi
  1288. LDFLAGS="$LDFLAGS $LD_BROTLI"
  1289. CPPFLAGS="$CPPFLAGS $CPP_BROTLI"
  1290. LIBS="$LIB_BROTLI $LIBS"
  1291. AC_CHECK_LIB(brotlidec, BrotliDecoderDecompress)
  1292. AC_CHECK_HEADERS(brotli/decode.h,
  1293. curl_brotli_msg="enabled (libbrotlidec)"
  1294. HAVE_BROTLI=1
  1295. AC_DEFINE(HAVE_BROTLI, 1, [if BROTLI is in use])
  1296. AC_SUBST(HAVE_BROTLI, [1])
  1297. )
  1298. if test X"$OPT_BROTLI" != Xoff &&
  1299. test "$HAVE_BROTLI" != "1"; then
  1300. AC_MSG_ERROR([BROTLI libs and/or directories were not found where specified!])
  1301. fi
  1302. if test "$HAVE_BROTLI" = "1"; then
  1303. if test -n "$DIR_BROTLI"; then
  1304. dnl when the brotli shared libs were found in a path that the run-time
  1305. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  1306. dnl to prevent further configure tests to fail due to this
  1307. if test "x$cross_compiling" != "xyes"; then
  1308. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_BROTLI"
  1309. export CURL_LIBRARY_PATH
  1310. AC_MSG_NOTICE([Added $DIR_BROTLI to CURL_LIBRARY_PATH])
  1311. fi
  1312. fi
  1313. else
  1314. dnl no brotli, revert back to clean variables
  1315. LDFLAGS=$CLEANLDFLAGS
  1316. CPPFLAGS=$CLEANCPPFLAGS
  1317. LIBS=$CLEANLIBS
  1318. fi
  1319. fi
  1320. dnl **********************************************************************
  1321. dnl Check for libzstd
  1322. dnl **********************************************************************
  1323. dnl Default to compiler & linker defaults for libzstd
  1324. OPT_ZSTD=off
  1325. AC_ARG_WITH(zstd,dnl
  1326. 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])
  1327. AS_HELP_STRING([--without-zstd], [disable libzstd]),
  1328. OPT_ZSTD=$withval)
  1329. if test X"$OPT_ZSTD" != Xno; then
  1330. dnl backup the pre-zstd variables
  1331. CLEANLDFLAGS="$LDFLAGS"
  1332. CLEANCPPFLAGS="$CPPFLAGS"
  1333. CLEANLIBS="$LIBS"
  1334. case "$OPT_ZSTD" in
  1335. yes)
  1336. dnl --with-zstd (without path) used
  1337. CURL_CHECK_PKGCONFIG(libzstd)
  1338. if test "$PKGCONFIG" != "no" ; then
  1339. LIB_ZSTD=`$PKGCONFIG --libs-only-l libzstd`
  1340. LD_ZSTD=`$PKGCONFIG --libs-only-L libzstd`
  1341. CPP_ZSTD=`$PKGCONFIG --cflags-only-I libzstd`
  1342. version=`$PKGCONFIG --modversion libzstd`
  1343. DIR_ZSTD=`echo $LD_ZSTD | $SED -e 's/-L//'`
  1344. fi
  1345. ;;
  1346. off)
  1347. dnl no --with-zstd option given, just check default places
  1348. ;;
  1349. *)
  1350. dnl use the given --with-zstd spot
  1351. PREFIX_ZSTD=$OPT_ZSTD
  1352. ;;
  1353. esac
  1354. dnl if given with a prefix, we set -L and -I based on that
  1355. if test -n "$PREFIX_ZSTD"; then
  1356. LIB_ZSTD="-lzstd"
  1357. LD_ZSTD=-L${PREFIX_ZSTD}/lib$libsuff
  1358. CPP_ZSTD=-I${PREFIX_ZSTD}/include
  1359. DIR_ZSTD=${PREFIX_ZSTD}/lib$libsuff
  1360. fi
  1361. LDFLAGS="$LDFLAGS $LD_ZSTD"
  1362. CPPFLAGS="$CPPFLAGS $CPP_ZSTD"
  1363. LIBS="$LIB_ZSTD $LIBS"
  1364. AC_CHECK_LIB(zstd, ZSTD_createDStream)
  1365. AC_CHECK_HEADERS(zstd.h,
  1366. curl_zstd_msg="enabled (libzstd)"
  1367. HAVE_ZSTD=1
  1368. AC_DEFINE(HAVE_ZSTD, 1, [if libzstd is in use])
  1369. AC_SUBST(HAVE_ZSTD, [1])
  1370. )
  1371. if test X"$OPT_ZSTD" != Xoff &&
  1372. test "$HAVE_ZSTD" != "1"; then
  1373. AC_MSG_ERROR([libzstd was not found where specified!])
  1374. fi
  1375. if test "$HAVE_ZSTD" = "1"; then
  1376. if test -n "$DIR_ZSTD"; then
  1377. dnl when the zstd shared lib were found in a path that the run-time
  1378. dnl linker doesn't search through, we need to add it to
  1379. dnl CURL_LIBRARY_PATH to prevent further configure tests to fail due to
  1380. dnl this
  1381. if test "x$cross_compiling" != "xyes"; then
  1382. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_ZSTD"
  1383. export CURL_LIBRARY_PATH
  1384. AC_MSG_NOTICE([Added $DIR_ZSTD to CURL_LIBRARY_PATH])
  1385. fi
  1386. fi
  1387. else
  1388. dnl no zstd, revert back to clean variables
  1389. LDFLAGS=$CLEANLDFLAGS
  1390. CPPFLAGS=$CLEANCPPFLAGS
  1391. LIBS=$CLEANLIBS
  1392. fi
  1393. fi
  1394. dnl **********************************************************************
  1395. dnl Check for LDAP
  1396. dnl **********************************************************************
  1397. LDAPLIBNAME=""
  1398. AC_ARG_WITH(ldap-lib,
  1399. AS_HELP_STRING([--with-ldap-lib=libname],[Specify name of ldap lib file]),
  1400. [LDAPLIBNAME="$withval"])
  1401. LBERLIBNAME=""
  1402. AC_ARG_WITH(lber-lib,
  1403. AS_HELP_STRING([--with-lber-lib=libname],[Specify name of lber lib file]),
  1404. [LBERLIBNAME="$withval"])
  1405. if test x$CURL_DISABLE_LDAP != x1 ; then
  1406. CURL_CHECK_HEADER_LBER
  1407. CURL_CHECK_HEADER_LDAP
  1408. CURL_CHECK_HEADER_LDAP_SSL
  1409. if test -z "$LDAPLIBNAME" ; then
  1410. if test "$curl_cv_native_windows" = "yes"; then
  1411. dnl Windows uses a single and unique LDAP library name
  1412. LDAPLIBNAME="wldap32"
  1413. LBERLIBNAME="no"
  1414. fi
  1415. fi
  1416. if test "$LDAPLIBNAME" ; then
  1417. AC_CHECK_LIB("$LDAPLIBNAME", ldap_init,, [
  1418. if test -n "$ldap_askedfor"; then
  1419. AC_MSG_ERROR([couldn't detect the LDAP libraries])
  1420. fi
  1421. AC_MSG_WARN(["$LDAPLIBNAME" is not an LDAP library: LDAP disabled])
  1422. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1423. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1424. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1425. AC_SUBST(CURL_DISABLE_LDAPS, [1])])
  1426. else
  1427. dnl Try to find the right ldap libraries for this system
  1428. CURL_CHECK_LIBS_LDAP
  1429. case X-"$curl_cv_ldap_LIBS" in
  1430. X-unknown)
  1431. if test -n "$ldap_askedfor"; then
  1432. AC_MSG_ERROR([couldn't detect the LDAP libraries])
  1433. fi
  1434. AC_MSG_WARN([Cannot find libraries for LDAP support: LDAP disabled])
  1435. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1436. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1437. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1438. AC_SUBST(CURL_DISABLE_LDAPS, [1])
  1439. ;;
  1440. esac
  1441. fi
  1442. fi
  1443. if test x$CURL_DISABLE_LDAP != x1 ; then
  1444. if test "$LBERLIBNAME" ; then
  1445. dnl If name is "no" then don't define this library at all
  1446. dnl (it's only needed if libldap.so's dependencies are broken).
  1447. if test "$LBERLIBNAME" != "no" ; then
  1448. AC_CHECK_LIB("$LBERLIBNAME", ber_free,, [
  1449. AC_MSG_WARN(["$LBERLIBNAME" is not an LBER library: LDAP disabled])
  1450. AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP])
  1451. AC_SUBST(CURL_DISABLE_LDAP, [1])
  1452. AC_DEFINE(CURL_DISABLE_LDAPS, 1, [to disable LDAPS])
  1453. AC_SUBST(CURL_DISABLE_LDAPS, [1])])
  1454. fi
  1455. fi
  1456. fi
  1457. if test x$CURL_DISABLE_LDAP != x1 ; then
  1458. AC_CHECK_FUNCS([ldap_url_parse \
  1459. ldap_init_fd])
  1460. if test "$LDAPLIBNAME" = "wldap32"; then
  1461. curl_ldap_msg="enabled (winldap)"
  1462. AC_DEFINE(USE_WIN32_LDAP, 1, [Use Windows LDAP implementation])
  1463. else
  1464. if test "x$ac_cv_func_ldap_init_fd" = "xyes"; then
  1465. curl_ldap_msg="enabled (OpenLDAP)"
  1466. AC_DEFINE(USE_OPENLDAP, 1, [Use OpenLDAP-specific code])
  1467. AC_SUBST(USE_OPENLDAP, [1])
  1468. else
  1469. curl_ldap_msg="enabled (ancient OpenLDAP)"
  1470. fi
  1471. fi
  1472. fi
  1473. if test x$CURL_DISABLE_LDAPS != x1 ; then
  1474. curl_ldaps_msg="enabled"
  1475. fi
  1476. dnl **********************************************************************
  1477. dnl Checks for IPv6
  1478. dnl **********************************************************************
  1479. AC_MSG_CHECKING([whether to enable IPv6])
  1480. AC_ARG_ENABLE(ipv6,
  1481. AS_HELP_STRING([--enable-ipv6],[Enable IPv6 (with IPv4) support])
  1482. AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]),
  1483. [ case "$enableval" in
  1484. no)
  1485. AC_MSG_RESULT(no)
  1486. ipv6=no
  1487. ;;
  1488. *) AC_MSG_RESULT(yes)
  1489. ipv6=yes
  1490. ;;
  1491. esac ],
  1492. AC_RUN_IFELSE([AC_LANG_SOURCE([[
  1493. /* are AF_INET6 and sockaddr_in6 available? */
  1494. #include <sys/types.h>
  1495. #ifdef _WIN32
  1496. #include <winsock2.h>
  1497. #include <ws2tcpip.h>
  1498. #else
  1499. #include <sys/socket.h>
  1500. #include <netinet/in.h>
  1501. #if defined (__TANDEM)
  1502. # include <netinet/in6.h>
  1503. #endif
  1504. #endif
  1505. int main(void)
  1506. {
  1507. struct sockaddr_in6 s;
  1508. (void)s;
  1509. return socket(AF_INET6, SOCK_STREAM, 0) < 0;
  1510. }
  1511. ]])
  1512. ],
  1513. AC_MSG_RESULT(yes)
  1514. ipv6=yes,
  1515. AC_MSG_RESULT(no)
  1516. ipv6=no,
  1517. AC_MSG_RESULT(yes)
  1518. ipv6=yes
  1519. ))
  1520. if test "$ipv6" = yes; then
  1521. curl_ipv6_msg="enabled"
  1522. AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support])
  1523. IPV6_ENABLED=1
  1524. AC_SUBST(IPV6_ENABLED)
  1525. AC_MSG_CHECKING([if struct sockaddr_in6 has sin6_scope_id member])
  1526. AC_COMPILE_IFELSE([ AC_LANG_PROGRAM([[
  1527. #include <sys/types.h>
  1528. #ifdef _WIN32
  1529. #include <winsock2.h>
  1530. #include <ws2tcpip.h>
  1531. #else
  1532. #include <netinet/in.h>
  1533. #if defined (__TANDEM)
  1534. # include <netinet/in6.h>
  1535. #endif
  1536. #endif
  1537. ]], [[
  1538. struct sockaddr_in6 s;
  1539. s.sin6_scope_id = 0;
  1540. ]])], [
  1541. AC_MSG_RESULT([yes])
  1542. AC_DEFINE(HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID, 1, [Define to 1 if struct sockaddr_in6 has the sin6_scope_id member])
  1543. ], [
  1544. AC_MSG_RESULT([no])
  1545. ])
  1546. fi
  1547. dnl **********************************************************************
  1548. dnl Check if the operating system allows programs to write to their own argv[]
  1549. dnl **********************************************************************
  1550. AC_MSG_CHECKING([if argv can be written to])
  1551. CURL_RUN_IFELSE([[
  1552. int main(int argc, char **argv)
  1553. {
  1554. #ifdef _WIN32
  1555. /* on Windows, writing to the argv does not hide the argument in
  1556. process lists so it can just be skipped */
  1557. (void)argc;
  1558. (void)argv;
  1559. return 1;
  1560. #else
  1561. (void)argc;
  1562. argv[0][0] = ' ';
  1563. return (argv[0][0] == ' ')?0:1;
  1564. #endif
  1565. }
  1566. ]],[
  1567. curl_cv_writable_argv=yes
  1568. ],[
  1569. curl_cv_writable_argv=no
  1570. ],[
  1571. curl_cv_writable_argv=cross
  1572. ])
  1573. case $curl_cv_writable_argv in
  1574. yes)
  1575. AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv])
  1576. AC_MSG_RESULT(yes)
  1577. ;;
  1578. no)
  1579. AC_MSG_RESULT(no)
  1580. ;;
  1581. *)
  1582. AC_MSG_RESULT(no)
  1583. AC_MSG_WARN([the previous check could not be made default was used])
  1584. ;;
  1585. esac
  1586. dnl **********************************************************************
  1587. dnl Check for GSS-API libraries
  1588. dnl **********************************************************************
  1589. dnl check for GSS-API stuff in the /usr as default
  1590. GSSAPI_ROOT="/usr"
  1591. AC_ARG_WITH(gssapi-includes,
  1592. AS_HELP_STRING([--with-gssapi-includes=DIR],
  1593. [Specify location of GSS-API headers]),
  1594. [ GSSAPI_INCS="-I$withval"
  1595. want_gss="yes" ]
  1596. )
  1597. AC_ARG_WITH(gssapi-libs,
  1598. AS_HELP_STRING([--with-gssapi-libs=DIR],
  1599. [Specify location of GSS-API libs]),
  1600. [ GSSAPI_LIB_DIR="-L$withval"
  1601. want_gss="yes" ]
  1602. )
  1603. AC_ARG_WITH(gssapi,
  1604. AS_HELP_STRING([--with-gssapi=DIR],
  1605. [Where to look for GSS-API]), [
  1606. GSSAPI_ROOT="$withval"
  1607. if test x"$GSSAPI_ROOT" != xno; then
  1608. want_gss="yes"
  1609. if test x"$GSSAPI_ROOT" = xyes; then
  1610. dnl if yes, then use default root
  1611. GSSAPI_ROOT="/usr"
  1612. fi
  1613. fi
  1614. ])
  1615. : ${KRB5CONFIG:="$GSSAPI_ROOT/bin/krb5-config"}
  1616. save_CPPFLAGS="$CPPFLAGS"
  1617. AC_MSG_CHECKING([if GSS-API support is requested])
  1618. if test x"$want_gss" = xyes; then
  1619. AC_MSG_RESULT(yes)
  1620. if test $GSSAPI_ROOT != "/usr"; then
  1621. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
  1622. else
  1623. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
  1624. fi
  1625. if test -z "$GSSAPI_INCS"; then
  1626. if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
  1627. GSSAPI_INCS=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --cflags gssapi`
  1628. elif test "$PKGCONFIG" != "no" ; then
  1629. GSSAPI_INCS=`$PKGCONFIG --cflags mit-krb5-gssapi`
  1630. elif test -f "$KRB5CONFIG"; then
  1631. GSSAPI_INCS=`$KRB5CONFIG --cflags gssapi`
  1632. elif test "$GSSAPI_ROOT" != "yes"; then
  1633. GSSAPI_INCS="-I$GSSAPI_ROOT/include"
  1634. fi
  1635. fi
  1636. CPPFLAGS="$CPPFLAGS $GSSAPI_INCS"
  1637. AC_CHECK_HEADER(gss.h,
  1638. [
  1639. dnl found in the given dirs
  1640. AC_DEFINE(HAVE_GSSGNU, 1, [if you have GNU GSS])
  1641. gnu_gss=yes
  1642. ],
  1643. [
  1644. dnl not found, check Heimdal or MIT
  1645. AC_CHECK_HEADERS([gssapi/gssapi.h], [], [not_mit=1])
  1646. AC_CHECK_HEADERS(
  1647. [gssapi/gssapi_generic.h gssapi/gssapi_krb5.h],
  1648. [],
  1649. [not_mit=1],
  1650. [
  1651. AC_INCLUDES_DEFAULT
  1652. #ifdef HAVE_GSSAPI_GSSAPI_H
  1653. #include <gssapi/gssapi.h>
  1654. #endif
  1655. ])
  1656. if test "x$not_mit" = "x1"; then
  1657. dnl MIT not found, check for Heimdal
  1658. AC_CHECK_HEADER(gssapi.h,
  1659. [],
  1660. [
  1661. dnl no header found, disabling GSS
  1662. want_gss=no
  1663. AC_MSG_WARN(disabling GSS-API support since no header files were found)
  1664. ]
  1665. )
  1666. else
  1667. dnl MIT found
  1668. dnl check if we have a really old MIT Kerberos version (<= 1.2)
  1669. AC_MSG_CHECKING([if GSS-API headers declare GSS_C_NT_HOSTBASED_SERVICE])
  1670. AC_COMPILE_IFELSE([
  1671. AC_LANG_PROGRAM([[
  1672. #include <gssapi/gssapi.h>
  1673. #include <gssapi/gssapi_generic.h>
  1674. #include <gssapi/gssapi_krb5.h>
  1675. ]],[[
  1676. gss_import_name(
  1677. (OM_uint32 *)0,
  1678. (gss_buffer_t)0,
  1679. GSS_C_NT_HOSTBASED_SERVICE,
  1680. (gss_name_t *)0);
  1681. ]])
  1682. ],[
  1683. AC_MSG_RESULT([yes])
  1684. ],[
  1685. AC_MSG_RESULT([no])
  1686. AC_DEFINE(HAVE_OLD_GSSMIT, 1,
  1687. [if you have an old MIT Kerberos version, lacking GSS_C_NT_HOSTBASED_SERVICE])
  1688. ])
  1689. fi
  1690. ]
  1691. )
  1692. else
  1693. AC_MSG_RESULT(no)
  1694. fi
  1695. if test x"$want_gss" = xyes; then
  1696. AC_DEFINE(HAVE_GSSAPI, 1, [if you have GSS-API libraries])
  1697. HAVE_GSSAPI=1
  1698. curl_gss_msg="enabled (MIT Kerberos/Heimdal)"
  1699. if test -n "$gnu_gss"; then
  1700. curl_gss_msg="enabled (GNU GSS)"
  1701. LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
  1702. LIBS="-lgss $LIBS"
  1703. elif test -z "$GSSAPI_LIB_DIR"; then
  1704. case $host in
  1705. *-*-darwin*)
  1706. LIBS="-lgssapi_krb5 -lresolv $LIBS"
  1707. ;;
  1708. *)
  1709. if test $GSSAPI_ROOT != "/usr"; then
  1710. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi, $GSSAPI_ROOT/lib/pkgconfig)
  1711. else
  1712. CURL_CHECK_PKGCONFIG(mit-krb5-gssapi)
  1713. fi
  1714. if test -n "$host_alias" -a -f "$GSSAPI_ROOT/bin/$host_alias-krb5-config"; then
  1715. dnl krb5-config doesn't have --libs-only-L or similar, put everything
  1716. dnl into LIBS
  1717. gss_libs=`$GSSAPI_ROOT/bin/$host_alias-krb5-config --libs gssapi`
  1718. LIBS="$gss_libs $LIBS"
  1719. elif test "$PKGCONFIG" != "no" ; then
  1720. gss_libs=`$PKGCONFIG --libs mit-krb5-gssapi`
  1721. LIBS="$gss_libs $LIBS"
  1722. elif test -f "$KRB5CONFIG"; then
  1723. dnl krb5-config doesn't have --libs-only-L or similar, put everything
  1724. dnl into LIBS
  1725. gss_libs=`$KRB5CONFIG --libs gssapi`
  1726. LIBS="$gss_libs $LIBS"
  1727. else
  1728. case $host in
  1729. *-hp-hpux*)
  1730. gss_libname="gss"
  1731. ;;
  1732. *)
  1733. gss_libname="gssapi"
  1734. ;;
  1735. esac
  1736. if test "$GSSAPI_ROOT" != "yes"; then
  1737. LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff"
  1738. LIBS="-l$gss_libname $LIBS"
  1739. else
  1740. LIBS="-l$gss_libname $LIBS"
  1741. fi
  1742. fi
  1743. ;;
  1744. esac
  1745. else
  1746. LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR"
  1747. case $host in
  1748. *-hp-hpux*)
  1749. LIBS="-lgss $LIBS"
  1750. ;;
  1751. *)
  1752. LIBS="-lgssapi $LIBS"
  1753. ;;
  1754. esac
  1755. fi
  1756. else
  1757. CPPFLAGS="$save_CPPFLAGS"
  1758. fi
  1759. if test x"$want_gss" = xyes; then
  1760. AC_MSG_CHECKING([if we can link against GSS-API library])
  1761. AC_LINK_IFELSE([
  1762. AC_LANG_FUNC_LINK_TRY([gss_init_sec_context])
  1763. ],[
  1764. AC_MSG_RESULT([yes])
  1765. ],[
  1766. AC_MSG_RESULT([no])
  1767. AC_MSG_ERROR([--with-gssapi was specified, but a GSS-API library was not found.])
  1768. ])
  1769. fi
  1770. build_libstubgss=no
  1771. if test x"$want_gss" = "xyes"; then
  1772. build_libstubgss=yes
  1773. fi
  1774. AM_CONDITIONAL(BUILD_STUB_GSS, test "x$build_libstubgss" = "xyes")
  1775. dnl -------------------------------------------------------------
  1776. dnl parse --with-default-ssl-backend so it can be validated below
  1777. dnl -------------------------------------------------------------
  1778. DEFAULT_SSL_BACKEND=no
  1779. VALID_DEFAULT_SSL_BACKEND=
  1780. AC_ARG_WITH(default-ssl-backend,
  1781. AS_HELP_STRING([--with-default-ssl-backend=NAME],[Use NAME as default SSL backend])
  1782. AS_HELP_STRING([--without-default-ssl-backend],[Use implicit default SSL backend]),
  1783. [DEFAULT_SSL_BACKEND=$withval])
  1784. case "$DEFAULT_SSL_BACKEND" in
  1785. no)
  1786. dnl --without-default-ssl-backend option used
  1787. ;;
  1788. default|yes)
  1789. dnl --with-default-ssl-backend option used without name
  1790. AC_MSG_ERROR([The name of the default SSL backend is required.])
  1791. ;;
  1792. *)
  1793. dnl --with-default-ssl-backend option used with name
  1794. AC_SUBST(DEFAULT_SSL_BACKEND)
  1795. dnl needs to be validated below
  1796. VALID_DEFAULT_SSL_BACKEND=no
  1797. ;;
  1798. esac
  1799. CURL_WITH_SCHANNEL
  1800. CURL_WITH_SECURETRANSPORT
  1801. CURL_WITH_AMISSL
  1802. CURL_WITH_OPENSSL
  1803. CURL_WITH_GNUTLS
  1804. CURL_WITH_MBEDTLS
  1805. CURL_WITH_WOLFSSL
  1806. CURL_WITH_BEARSSL
  1807. CURL_WITH_RUSTLS
  1808. dnl link required libraries for USE_WIN32_CRYPTO or USE_SCHANNEL
  1809. if test "x$USE_WIN32_CRYPTO" = "x1" -o "x$USE_SCHANNEL" = "x1"; then
  1810. LIBS="-ladvapi32 -lcrypt32 $LIBS"
  1811. fi
  1812. dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer)
  1813. if test "x$curl_cv_native_windows" = "xyes"; then
  1814. LIBS="-lbcrypt $LIBS"
  1815. fi
  1816. case "x$SSL_DISABLED$OPENSSL_ENABLED$GNUTLS_ENABLED$MBEDTLS_ENABLED$WOLFSSL_ENABLED$SCHANNEL_ENABLED$SECURETRANSPORT_ENABLED$BEARSSL_ENABLED$RUSTLS_ENABLED"
  1817. in
  1818. x)
  1819. AC_MSG_ERROR([TLS not detected, you will not be able to use HTTPS, FTPS, NTLM and more.
  1820. Use --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl or --with-rustls to address this.])
  1821. ;;
  1822. x1)
  1823. # one SSL backend is enabled
  1824. AC_SUBST(SSL_ENABLED)
  1825. SSL_ENABLED="1"
  1826. AC_MSG_NOTICE([built with one SSL backend])
  1827. ;;
  1828. xD)
  1829. # explicitly built without TLS
  1830. ;;
  1831. xD*)
  1832. AC_MSG_ERROR([--without-ssl has been set together with an explicit option to use an ssl library
  1833. (e.g. --with-openssl, --with-gnutls, --with-wolfssl, --with-mbedtls, --with-schannel, --with-secure-transport, --with-amissl, --with-bearssl, --with-rustls).
  1834. Since these are conflicting parameters, verify which is the desired one and drop the other.])
  1835. ;;
  1836. *)
  1837. # more than one SSL backend is enabled
  1838. AC_SUBST(SSL_ENABLED)
  1839. SSL_ENABLED="1"
  1840. AC_SUBST(CURL_WITH_MULTI_SSL)
  1841. CURL_WITH_MULTI_SSL="1"
  1842. AC_DEFINE(CURL_WITH_MULTI_SSL, 1, [built with multiple SSL backends])
  1843. AC_MSG_NOTICE([built with multiple SSL backends])
  1844. ;;
  1845. esac
  1846. if test -n "$ssl_backends"; then
  1847. curl_ssl_msg="enabled ($ssl_backends)"
  1848. fi
  1849. if test no = "$VALID_DEFAULT_SSL_BACKEND"
  1850. then
  1851. if test -n "$SSL_ENABLED"
  1852. then
  1853. AC_MSG_ERROR([Default SSL backend $DEFAULT_SSL_BACKEND not enabled!])
  1854. else
  1855. AC_MSG_ERROR([Default SSL backend requires SSL!])
  1856. fi
  1857. elif test yes = "$VALID_DEFAULT_SSL_BACKEND"
  1858. then
  1859. AC_DEFINE_UNQUOTED([CURL_DEFAULT_SSL_BACKEND], ["$DEFAULT_SSL_BACKEND"], [Default SSL backend])
  1860. fi
  1861. dnl **********************************************************************
  1862. dnl Check for the CA bundle
  1863. dnl **********************************************************************
  1864. if test -n "$check_for_ca_bundle"; then
  1865. CURL_CHECK_CA_BUNDLE
  1866. fi
  1867. dnl **********************************************************************
  1868. dnl Check for libpsl
  1869. dnl **********************************************************************
  1870. AC_ARG_WITH(libpsl,
  1871. AS_HELP_STRING([--without-libpsl],
  1872. [disable support for libpsl]),
  1873. with_libpsl=$withval,
  1874. with_libpsl=yes)
  1875. curl_psl_msg="no (libpsl disabled)"
  1876. if test $with_libpsl != "no"; then
  1877. AC_SEARCH_LIBS(psl_builtin, psl,
  1878. [curl_psl_msg="enabled";
  1879. AC_DEFINE([USE_LIBPSL], [1], [PSL support enabled])
  1880. ],
  1881. [AC_MSG_ERROR([libpsl was not found]) ]
  1882. )
  1883. fi
  1884. AM_CONDITIONAL([USE_LIBPSL], [test "$curl_psl_msg" = "enabled"])
  1885. dnl **********************************************************************
  1886. dnl Check for libgsasl
  1887. dnl **********************************************************************
  1888. AC_ARG_WITH(libgsasl,
  1889. AS_HELP_STRING([--without-libgsasl],
  1890. [disable libgsasl support for SCRAM]),
  1891. with_libgsasl=$withval,
  1892. with_libgsasl=yes)
  1893. if test $with_libgsasl != "no"; then
  1894. AC_SEARCH_LIBS(gsasl_init, gsasl,
  1895. [curl_gsasl_msg="enabled";
  1896. AC_DEFINE([USE_GSASL], [1], [GSASL support enabled])
  1897. ],
  1898. [curl_gsasl_msg="no (libgsasl not found)";
  1899. AC_MSG_WARN([libgsasl was not found])
  1900. ]
  1901. )
  1902. fi
  1903. AM_CONDITIONAL([USE_GSASL], [test "$curl_gsasl_msg" = "enabled"])
  1904. AC_ARG_WITH(libmetalink,,
  1905. AC_MSG_ERROR([--with-libmetalink and --without-libmetalink no longer work!]))
  1906. dnl **********************************************************************
  1907. dnl Check for the presence of LIBSSH2 libraries and headers
  1908. dnl **********************************************************************
  1909. dnl Default to compiler & linker defaults for LIBSSH2 files & libraries.
  1910. OPT_LIBSSH2=off
  1911. AC_ARG_WITH(libssh2,dnl
  1912. 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])
  1913. AS_HELP_STRING([--with-libssh2], [enable libssh2]),
  1914. OPT_LIBSSH2=$withval, OPT_LIBSSH2=no)
  1915. OPT_LIBSSH=off
  1916. AC_ARG_WITH(libssh,dnl
  1917. 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])
  1918. AS_HELP_STRING([--with-libssh], [enable libssh]),
  1919. OPT_LIBSSH=$withval, OPT_LIBSSH=no)
  1920. OPT_WOLFSSH=off
  1921. AC_ARG_WITH(wolfssh,dnl
  1922. 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])
  1923. AS_HELP_STRING([--with-wolfssh], [enable wolfssh]),
  1924. OPT_WOLFSSH=$withval, OPT_WOLFSSH=no)
  1925. if test X"$OPT_LIBSSH2" != Xno; then
  1926. dnl backup the pre-libssh2 variables
  1927. CLEANLDFLAGS="$LDFLAGS"
  1928. CLEANCPPFLAGS="$CPPFLAGS"
  1929. CLEANLIBS="$LIBS"
  1930. case "$OPT_LIBSSH2" in
  1931. yes)
  1932. dnl --with-libssh2 (without path) used
  1933. CURL_CHECK_PKGCONFIG(libssh2)
  1934. if test "$PKGCONFIG" != "no" ; then
  1935. LIB_SSH2=`$PKGCONFIG --libs-only-l libssh2`
  1936. LD_SSH2=`$PKGCONFIG --libs-only-L libssh2`
  1937. CPP_SSH2=`$PKGCONFIG --cflags-only-I libssh2`
  1938. version=`$PKGCONFIG --modversion libssh2`
  1939. DIR_SSH2=`echo $LD_SSH2 | $SED -e 's/^-L//'`
  1940. fi
  1941. ;;
  1942. off)
  1943. dnl no --with-libssh2 option given, just check default places
  1944. ;;
  1945. *)
  1946. dnl use the given --with-libssh2 spot
  1947. PREFIX_SSH2=$OPT_LIBSSH2
  1948. ;;
  1949. esac
  1950. dnl if given with a prefix, we set -L and -I based on that
  1951. if test -n "$PREFIX_SSH2"; then
  1952. LIB_SSH2="-lssh2"
  1953. LD_SSH2=-L${PREFIX_SSH2}/lib$libsuff
  1954. CPP_SSH2=-I${PREFIX_SSH2}/include
  1955. DIR_SSH2=${PREFIX_SSH2}/lib$libsuff
  1956. fi
  1957. LDFLAGS="$LDFLAGS $LD_SSH2"
  1958. CPPFLAGS="$CPPFLAGS $CPP_SSH2"
  1959. LIBS="$LIB_SSH2 $LIBS"
  1960. dnl check for function added in libssh2 version 1.0
  1961. AC_CHECK_LIB(ssh2, libssh2_session_block_directions)
  1962. AC_CHECK_HEADER(libssh2.h,
  1963. curl_ssh_msg="enabled (libSSH2)"
  1964. LIBSSH2_ENABLED=1
  1965. AC_DEFINE(USE_LIBSSH2, 1, [if libSSH2 is in use])
  1966. AC_SUBST(USE_LIBSSH2, [1])
  1967. )
  1968. if test X"$OPT_LIBSSH2" != Xoff &&
  1969. test "$LIBSSH2_ENABLED" != "1"; then
  1970. AC_MSG_ERROR([libSSH2 libs and/or directories were not found where specified!])
  1971. fi
  1972. if test "$LIBSSH2_ENABLED" = "1"; then
  1973. if test -n "$DIR_SSH2"; then
  1974. dnl when the libssh2 shared libs were found in a path that the run-time
  1975. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  1976. dnl to prevent further configure tests to fail due to this
  1977. if test "x$cross_compiling" != "xyes"; then
  1978. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH2"
  1979. export CURL_LIBRARY_PATH
  1980. AC_MSG_NOTICE([Added $DIR_SSH2 to CURL_LIBRARY_PATH])
  1981. fi
  1982. fi
  1983. else
  1984. dnl no libssh2, revert back to clean variables
  1985. LDFLAGS=$CLEANLDFLAGS
  1986. CPPFLAGS=$CLEANCPPFLAGS
  1987. LIBS=$CLEANLIBS
  1988. fi
  1989. elif test X"$OPT_LIBSSH" != Xno; then
  1990. dnl backup the pre-libssh variables
  1991. CLEANLDFLAGS="$LDFLAGS"
  1992. CLEANCPPFLAGS="$CPPFLAGS"
  1993. CLEANLIBS="$LIBS"
  1994. case "$OPT_LIBSSH" in
  1995. yes)
  1996. dnl --with-libssh (without path) used
  1997. CURL_CHECK_PKGCONFIG(libssh)
  1998. if test "$PKGCONFIG" != "no" ; then
  1999. LIB_SSH=`$PKGCONFIG --libs-only-l libssh`
  2000. LD_SSH=`$PKGCONFIG --libs-only-L libssh`
  2001. CPP_SSH=`$PKGCONFIG --cflags-only-I libssh`
  2002. version=`$PKGCONFIG --modversion libssh`
  2003. DIR_SSH=`echo $LD_SSH | $SED -e 's/^-L//'`
  2004. fi
  2005. ;;
  2006. off)
  2007. dnl no --with-libssh option given, just check default places
  2008. ;;
  2009. *)
  2010. dnl use the given --with-libssh spot
  2011. PREFIX_SSH=$OPT_LIBSSH
  2012. ;;
  2013. esac
  2014. dnl if given with a prefix, we set -L and -I based on that
  2015. if test -n "$PREFIX_SSH"; then
  2016. LIB_SSH="-lssh"
  2017. LD_SSH=-L${PREFIX_SSH}/lib$libsuff
  2018. CPP_SSH=-I${PREFIX_SSH}/include
  2019. DIR_SSH=${PREFIX_SSH}/lib$libsuff
  2020. fi
  2021. LDFLAGS="$LDFLAGS $LD_SSH"
  2022. CPPFLAGS="$CPPFLAGS $CPP_SSH"
  2023. LIBS="$LIB_SSH $LIBS"
  2024. AC_CHECK_LIB(ssh, ssh_new)
  2025. AC_CHECK_HEADER(libssh/libssh.h,
  2026. curl_ssh_msg="enabled (libSSH)"
  2027. LIBSSH_ENABLED=1
  2028. AC_DEFINE(USE_LIBSSH, 1, [if libSSH is in use])
  2029. AC_SUBST(USE_LIBSSH, [1])
  2030. )
  2031. if test X"$OPT_LIBSSH" != Xoff &&
  2032. test "$LIBSSH_ENABLED" != "1"; then
  2033. AC_MSG_ERROR([libSSH libs and/or directories were not found where specified!])
  2034. fi
  2035. if test "$LIBSSH_ENABLED" = "1"; then
  2036. if test -n "$DIR_SSH"; then
  2037. dnl when the libssh shared libs were found in a path that the run-time
  2038. dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
  2039. dnl to prevent further configure tests to fail due to this
  2040. if test "x$cross_compiling" != "xyes"; then
  2041. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_SSH"
  2042. export CURL_LIBRARY_PATH
  2043. AC_MSG_NOTICE([Added $DIR_SSH to CURL_LIBRARY_PATH])
  2044. fi
  2045. fi
  2046. else
  2047. dnl no libssh, revert back to clean variables
  2048. LDFLAGS=$CLEANLDFLAGS
  2049. CPPFLAGS=$CLEANCPPFLAGS
  2050. LIBS=$CLEANLIBS
  2051. fi
  2052. elif test X"$OPT_WOLFSSH" != Xno; then
  2053. dnl backup the pre-wolfssh variables
  2054. CLEANLDFLAGS="$LDFLAGS"
  2055. CLEANCPPFLAGS="$CPPFLAGS"
  2056. CLEANLIBS="$LIBS"
  2057. if test "$OPT_WOLFSSH" != yes; then
  2058. WOLFCONFIG="$OPT_WOLFSSH/bin/wolfssh-config"
  2059. LDFLAGS="$LDFLAGS `$WOLFCONFIG --libs`"
  2060. CPPFLAGS="$CPPFLAGS `$WOLFCONFIG --cflags`"
  2061. fi
  2062. AC_CHECK_LIB(wolfssh, wolfSSH_Init)
  2063. AC_CHECK_HEADERS(wolfssh/ssh.h,
  2064. curl_ssh_msg="enabled (wolfSSH)"
  2065. WOLFSSH_ENABLED=1
  2066. AC_DEFINE(USE_WOLFSSH, 1, [if wolfSSH is in use])
  2067. AC_SUBST(USE_WOLFSSH, [1])
  2068. )
  2069. fi
  2070. dnl **********************************************************************
  2071. dnl Check for the presence of LIBRTMP libraries and headers
  2072. dnl **********************************************************************
  2073. dnl Default to compiler & linker defaults for LIBRTMP files & libraries.
  2074. OPT_LIBRTMP=off
  2075. AC_ARG_WITH(librtmp,dnl
  2076. 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])
  2077. AS_HELP_STRING([--without-librtmp], [disable LIBRTMP]),
  2078. OPT_LIBRTMP=$withval)
  2079. if test X"$OPT_LIBRTMP" != Xno; then
  2080. dnl backup the pre-librtmp variables
  2081. CLEANLDFLAGS="$LDFLAGS"
  2082. CLEANCPPFLAGS="$CPPFLAGS"
  2083. CLEANLIBS="$LIBS"
  2084. case "$OPT_LIBRTMP" in
  2085. yes)
  2086. dnl --with-librtmp (without path) used
  2087. CURL_CHECK_PKGCONFIG(librtmp)
  2088. if test "$PKGCONFIG" != "no" ; then
  2089. LIB_RTMP=`$PKGCONFIG --libs-only-l librtmp`
  2090. LD_RTMP=`$PKGCONFIG --libs-only-L librtmp`
  2091. CPP_RTMP=`$PKGCONFIG --cflags-only-I librtmp`
  2092. version=`$PKGCONFIG --modversion librtmp`
  2093. DIR_RTMP=`echo $LD_RTMP | $SED -e 's/^-L//'`
  2094. else
  2095. dnl To avoid link errors, we do not allow --librtmp without
  2096. dnl a pkgconfig file
  2097. AC_MSG_ERROR([--librtmp was specified but could not find librtmp pkgconfig file.])
  2098. fi
  2099. ;;
  2100. off)
  2101. dnl no --with-librtmp option given, just check default places
  2102. LIB_RTMP="-lrtmp"
  2103. ;;
  2104. *)
  2105. dnl use the given --with-librtmp spot
  2106. LIB_RTMP="-lrtmp"
  2107. PREFIX_RTMP=$OPT_LIBRTMP
  2108. ;;
  2109. esac
  2110. dnl if given with a prefix, we set -L and -I based on that
  2111. if test -n "$PREFIX_RTMP"; then
  2112. LD_RTMP=-L${PREFIX_RTMP}/lib$libsuff
  2113. CPP_RTMP=-I${PREFIX_RTMP}/include
  2114. DIR_RTMP=${PREFIX_RTMP}/lib$libsuff
  2115. fi
  2116. LDFLAGS="$LDFLAGS $LD_RTMP"
  2117. CPPFLAGS="$CPPFLAGS $CPP_RTMP"
  2118. LIBS="$LIB_RTMP $LIBS"
  2119. AC_CHECK_LIB(rtmp, RTMP_Init,
  2120. [
  2121. AC_CHECK_HEADERS(librtmp/rtmp.h,
  2122. curl_rtmp_msg="enabled (librtmp)"
  2123. LIBRTMP_ENABLED=1
  2124. AC_DEFINE(USE_LIBRTMP, 1, [if librtmp is in use])
  2125. AC_SUBST(USE_LIBRTMP, [1])
  2126. )
  2127. ],
  2128. dnl not found, revert back to clean variables
  2129. LDFLAGS=$CLEANLDFLAGS
  2130. CPPFLAGS=$CLEANCPPFLAGS
  2131. LIBS=$CLEANLIBS
  2132. )
  2133. if test X"$OPT_LIBRTMP" != Xoff &&
  2134. test "$LIBRTMP_ENABLED" != "1"; then
  2135. AC_MSG_ERROR([librtmp libs and/or directories were not found where specified!])
  2136. fi
  2137. fi
  2138. dnl **********************************************************************
  2139. dnl Check for linker switch for versioned symbols
  2140. dnl **********************************************************************
  2141. versioned_symbols_flavour=
  2142. AC_MSG_CHECKING([whether versioned symbols are wanted])
  2143. AC_ARG_ENABLE(versioned-symbols,
  2144. AS_HELP_STRING([--enable-versioned-symbols], [Enable versioned symbols in shared library])
  2145. AS_HELP_STRING([--disable-versioned-symbols], [Disable versioned symbols in shared library]),
  2146. [ case "$enableval" in
  2147. yes) AC_MSG_RESULT(yes)
  2148. AC_MSG_CHECKING([if libraries can be versioned])
  2149. GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
  2150. if test -z "$GLD"; then
  2151. AC_MSG_RESULT(no)
  2152. AC_MSG_WARN([You need an ld version supporting the --version-script option])
  2153. else
  2154. AC_MSG_RESULT(yes)
  2155. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  2156. versioned_symbols_flavour="MULTISSL_"
  2157. elif test "x$OPENSSL_ENABLED" = "x1"; then
  2158. versioned_symbols_flavour="OPENSSL_"
  2159. elif test "x$GNUTLS_ENABLED" = "x1"; then
  2160. versioned_symbols_flavour="GNUTLS_"
  2161. elif test "x$WOLFSSL_ENABLED" = "x1"; then
  2162. versioned_symbols_flavour="WOLFSSL_"
  2163. elif test "x$SCHANNEL_ENABLED" = "x1"; then
  2164. versioned_symbols_flavour="SCHANNEL_"
  2165. elif test "x$SECURETRANSPORT_ENABLED" = "x1"; then
  2166. versioned_symbols_flavour="SECURE_TRANSPORT_"
  2167. else
  2168. versioned_symbols_flavour=""
  2169. fi
  2170. versioned_symbols="yes"
  2171. fi
  2172. ;;
  2173. *) AC_MSG_RESULT(no)
  2174. ;;
  2175. esac
  2176. ], [
  2177. AC_MSG_RESULT(no)
  2178. ]
  2179. )
  2180. AC_SUBST([CURL_LT_SHLIB_VERSIONED_FLAVOUR],
  2181. ["$versioned_symbols_flavour"])
  2182. AM_CONDITIONAL([CURL_LT_SHLIB_USE_VERSIONED_SYMBOLS],
  2183. [test "x$versioned_symbols" = 'xyes'])
  2184. dnl Update .plist file with current version
  2185. AC_SUBST([CURL_PLIST_VERSION],
  2186. ["$CURLVERSION"])
  2187. dnl -------------------------------------------------
  2188. dnl check winidn option before other IDN libraries
  2189. dnl -------------------------------------------------
  2190. AC_MSG_CHECKING([whether to enable Windows native IDN (Windows native builds only)])
  2191. OPT_WINIDN="default"
  2192. AC_ARG_WITH(winidn,
  2193. AS_HELP_STRING([--with-winidn=PATH],[enable Windows native IDN])
  2194. AS_HELP_STRING([--without-winidn], [disable Windows native IDN]),
  2195. OPT_WINIDN=$withval)
  2196. case "$OPT_WINIDN" in
  2197. no|default)
  2198. dnl --without-winidn option used or configure option not specified
  2199. want_winidn="no"
  2200. AC_MSG_RESULT([no])
  2201. ;;
  2202. yes)
  2203. dnl --with-winidn option used without path
  2204. want_winidn="yes"
  2205. want_winidn_path="default"
  2206. AC_MSG_RESULT([yes])
  2207. ;;
  2208. *)
  2209. dnl --with-winidn option used with path
  2210. want_winidn="yes"
  2211. want_winidn_path="$withval"
  2212. AC_MSG_RESULT([yes ($withval)])
  2213. ;;
  2214. esac
  2215. if test "$want_winidn" = "yes"; then
  2216. dnl winidn library support has been requested
  2217. clean_CFLAGS="$CFLAGS"
  2218. clean_CPPFLAGS="$CPPFLAGS"
  2219. clean_LDFLAGS="$LDFLAGS"
  2220. clean_LIBS="$LIBS"
  2221. WINIDN_LIBS="-lnormaliz"
  2222. WINIDN_CPPFLAGS=""
  2223. #
  2224. if test "$want_winidn_path" != "default"; then
  2225. dnl path has been specified
  2226. dnl pkg-config not available or provides no info
  2227. WINIDN_LDFLAGS="-L$want_winidn_path/lib$libsuff"
  2228. WINIDN_CPPFLAGS="-I$want_winidn_path/include"
  2229. WINIDN_DIR="$want_winidn_path/lib$libsuff"
  2230. fi
  2231. #
  2232. dnl WinIDN requires a minimum supported OS version of at least Vista (0x0600)
  2233. AC_COMPILE_IFELSE([
  2234. AC_LANG_PROGRAM([[
  2235. #include <windows.h>
  2236. ]],[[
  2237. #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
  2238. #error
  2239. #endif
  2240. ]])
  2241. ],[
  2242. ],[
  2243. CFLAGS=`echo $CFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
  2244. CFLAGS=`echo $CFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
  2245. CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-DWINVER=[[^ ]]*//g'`
  2246. CPPFLAGS=`echo $CPPFLAGS | $SED -e 's/-D_WIN32_WINNT=[[^ ]]*//g'`
  2247. WINIDN_CPPFLAGS="$WINIDN_CPPFLAGS -DWINVER=0x0600"
  2248. ])
  2249. #
  2250. CPPFLAGS="$CPPFLAGS $WINIDN_CPPFLAGS"
  2251. LDFLAGS="$LDFLAGS $WINIDN_LDFLAGS"
  2252. LIBS="$WINIDN_LIBS $LIBS"
  2253. #
  2254. AC_MSG_CHECKING([if IdnToUnicode can be linked])
  2255. AC_LINK_IFELSE([
  2256. AC_LANG_PROGRAM([[
  2257. #include <windows.h>
  2258. ]],[[
  2259. IdnToUnicode(0, NULL, 0, NULL, 0);
  2260. ]])
  2261. ],[
  2262. AC_MSG_RESULT([yes])
  2263. tst_links_winidn="yes"
  2264. ],[
  2265. AC_MSG_RESULT([no])
  2266. tst_links_winidn="no"
  2267. ])
  2268. #
  2269. if test "$tst_links_winidn" = "yes"; then
  2270. AC_DEFINE(USE_WIN32_IDN, 1, [Define to 1 if you have the `normaliz' (WinIDN) library (-lnormaliz).])
  2271. AC_SUBST([IDN_ENABLED], [1])
  2272. curl_idn_msg="enabled (Windows-native)"
  2273. else
  2274. AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
  2275. CFLAGS="$clean_CFLAGS"
  2276. CPPFLAGS="$clean_CPPFLAGS"
  2277. LDFLAGS="$clean_LDFLAGS"
  2278. LIBS="$clean_LIBS"
  2279. fi
  2280. fi
  2281. dnl **********************************************************************
  2282. dnl Check for the presence of IDN libraries and headers
  2283. dnl **********************************************************************
  2284. AC_MSG_CHECKING([whether to build with libidn2])
  2285. OPT_IDN="default"
  2286. AC_ARG_WITH(libidn2,
  2287. AS_HELP_STRING([--with-libidn2=PATH],[Enable libidn2 usage])
  2288. AS_HELP_STRING([--without-libidn2],[Disable libidn2 usage]),
  2289. [OPT_IDN=$withval])
  2290. if test "x$tst_links_winidn" = "xyes"; then
  2291. want_idn="no"
  2292. AC_MSG_RESULT([no (using winidn instead)])
  2293. else
  2294. case "$OPT_IDN" in
  2295. no)
  2296. dnl --without-libidn2 option used
  2297. want_idn="no"
  2298. AC_MSG_RESULT([no])
  2299. ;;
  2300. default)
  2301. dnl configure option not specified
  2302. want_idn="yes"
  2303. want_idn_path="default"
  2304. AC_MSG_RESULT([(assumed) yes])
  2305. ;;
  2306. yes)
  2307. dnl --with-libidn2 option used without path
  2308. want_idn="yes"
  2309. want_idn_path="default"
  2310. AC_MSG_RESULT([yes])
  2311. ;;
  2312. *)
  2313. dnl --with-libidn2 option used with path
  2314. want_idn="yes"
  2315. want_idn_path="$withval"
  2316. AC_MSG_RESULT([yes ($withval)])
  2317. ;;
  2318. esac
  2319. fi
  2320. if test "$want_idn" = "yes"; then
  2321. dnl idn library support has been requested
  2322. clean_CPPFLAGS="$CPPFLAGS"
  2323. clean_LDFLAGS="$LDFLAGS"
  2324. clean_LIBS="$LIBS"
  2325. PKGCONFIG="no"
  2326. #
  2327. if test "$want_idn_path" != "default"; then
  2328. dnl path has been specified
  2329. IDN_PCDIR="$want_idn_path/lib$libsuff/pkgconfig"
  2330. CURL_CHECK_PKGCONFIG(libidn2, [$IDN_PCDIR])
  2331. if test "$PKGCONFIG" != "no"; then
  2332. IDN_LIBS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2333. $PKGCONFIG --libs-only-l libidn2 2>/dev/null`
  2334. IDN_LDFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2335. $PKGCONFIG --libs-only-L libidn2 2>/dev/null`
  2336. IDN_CPPFLAGS=`CURL_EXPORT_PCDIR([$IDN_PCDIR]) dnl
  2337. $PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
  2338. IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
  2339. else
  2340. dnl pkg-config not available or provides no info
  2341. IDN_LIBS="-lidn2"
  2342. IDN_LDFLAGS="-L$want_idn_path/lib$libsuff"
  2343. IDN_CPPFLAGS="-I$want_idn_path/include"
  2344. IDN_DIR="$want_idn_path/lib$libsuff"
  2345. fi
  2346. else
  2347. dnl path not specified
  2348. CURL_CHECK_PKGCONFIG(libidn2)
  2349. if test "$PKGCONFIG" != "no"; then
  2350. IDN_LIBS=`$PKGCONFIG --libs-only-l libidn2 2>/dev/null`
  2351. IDN_LDFLAGS=`$PKGCONFIG --libs-only-L libidn2 2>/dev/null`
  2352. IDN_CPPFLAGS=`$PKGCONFIG --cflags-only-I libidn2 2>/dev/null`
  2353. IDN_DIR=`echo $IDN_LDFLAGS | $SED -e 's/^-L//'`
  2354. else
  2355. dnl pkg-config not available or provides no info
  2356. IDN_LIBS="-lidn2"
  2357. fi
  2358. fi
  2359. #
  2360. if test "$PKGCONFIG" != "no"; then
  2361. AC_MSG_NOTICE([pkg-config: IDN_LIBS: "$IDN_LIBS"])
  2362. AC_MSG_NOTICE([pkg-config: IDN_LDFLAGS: "$IDN_LDFLAGS"])
  2363. AC_MSG_NOTICE([pkg-config: IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
  2364. AC_MSG_NOTICE([pkg-config: IDN_DIR: "$IDN_DIR"])
  2365. else
  2366. AC_MSG_NOTICE([IDN_LIBS: "$IDN_LIBS"])
  2367. AC_MSG_NOTICE([IDN_LDFLAGS: "$IDN_LDFLAGS"])
  2368. AC_MSG_NOTICE([IDN_CPPFLAGS: "$IDN_CPPFLAGS"])
  2369. AC_MSG_NOTICE([IDN_DIR: "$IDN_DIR"])
  2370. fi
  2371. #
  2372. CPPFLAGS="$CPPFLAGS $IDN_CPPFLAGS"
  2373. LDFLAGS="$LDFLAGS $IDN_LDFLAGS"
  2374. LIBS="$IDN_LIBS $LIBS"
  2375. #
  2376. AC_MSG_CHECKING([if idn2_lookup_ul can be linked])
  2377. AC_LINK_IFELSE([
  2378. AC_LANG_FUNC_LINK_TRY([idn2_lookup_ul])
  2379. ],[
  2380. AC_MSG_RESULT([yes])
  2381. tst_links_libidn="yes"
  2382. ],[
  2383. AC_MSG_RESULT([no])
  2384. tst_links_libidn="no"
  2385. ])
  2386. #
  2387. AC_CHECK_HEADERS( idn2.h )
  2388. if test "$tst_links_libidn" = "yes"; then
  2389. AC_DEFINE(HAVE_LIBIDN2, 1, [Define to 1 if you have the `idn2' library (-lidn2).])
  2390. dnl different versions of libidn have different setups of these:
  2391. AC_SUBST([IDN_ENABLED], [1])
  2392. curl_idn_msg="enabled (libidn2)"
  2393. if test -n "$IDN_DIR" -a "x$cross_compiling" != "xyes"; then
  2394. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$IDN_DIR"
  2395. export CURL_LIBRARY_PATH
  2396. AC_MSG_NOTICE([Added $IDN_DIR to CURL_LIBRARY_PATH])
  2397. fi
  2398. else
  2399. AC_MSG_WARN([Cannot find libraries for IDN support: IDN disabled])
  2400. CPPFLAGS="$clean_CPPFLAGS"
  2401. LDFLAGS="$clean_LDFLAGS"
  2402. LIBS="$clean_LIBS"
  2403. fi
  2404. fi
  2405. dnl **********************************************************************
  2406. dnl Check for nghttp2
  2407. dnl **********************************************************************
  2408. OPT_H2="yes"
  2409. if test "x$disable_http" = "xyes" -o X"$want_hyper" != Xno; then
  2410. # without HTTP or with Hyper, nghttp2 is no use
  2411. OPT_H2="no"
  2412. fi
  2413. AC_ARG_WITH(nghttp2,
  2414. AS_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
  2415. AS_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
  2416. [OPT_H2=$withval])
  2417. case "$OPT_H2" in
  2418. no)
  2419. dnl --without-nghttp2 option used
  2420. want_nghttp2="no"
  2421. ;;
  2422. yes)
  2423. dnl --with-nghttp2 option used without path
  2424. want_nghttp2="default"
  2425. want_nghttp2_path=""
  2426. want_nghttp2_pkg_config_path=""
  2427. ;;
  2428. *)
  2429. dnl --with-nghttp2 option used with path
  2430. want_nghttp2="yes"
  2431. want_nghttp2_path="$withval"
  2432. want_nghttp2_pkg_config_path="$withval/lib/pkgconfig"
  2433. ;;
  2434. esac
  2435. if test X"$want_nghttp2" != Xno; then
  2436. dnl backup the pre-nghttp2 variables
  2437. CLEANLDFLAGS="$LDFLAGS"
  2438. CLEANCPPFLAGS="$CPPFLAGS"
  2439. CLEANLIBS="$LIBS"
  2440. CURL_CHECK_PKGCONFIG(libnghttp2, $want_nghttp2_pkg_config_path)
  2441. if test "$PKGCONFIG" != "no" ; then
  2442. LIB_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
  2443. $PKGCONFIG --libs-only-l libnghttp2`
  2444. AC_MSG_NOTICE([-l is $LIB_H2])
  2445. CPP_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path]) dnl
  2446. $PKGCONFIG --cflags-only-I libnghttp2`
  2447. AC_MSG_NOTICE([-I is $CPP_H2])
  2448. LD_H2=`CURL_EXPORT_PCDIR([$want_nghttp2_pkg_config_path])
  2449. $PKGCONFIG --libs-only-L libnghttp2`
  2450. AC_MSG_NOTICE([-L is $LD_H2])
  2451. DIR_H2=`echo $LD_H2 | $SED -e 's/^-L//'`
  2452. elif test x"$want_nghttp2_path" != x; then
  2453. LIB_H2="-lnghttp2"
  2454. LD_H2=-L${want_nghttp2_path}/lib$libsuff
  2455. CPP_H2=-I${want_nghttp2_path}/include
  2456. DIR_H2=${want_nghttp2_path}/lib$libsuff
  2457. elif test X"$want_nghttp2" != Xdefault; then
  2458. dnl no nghttp2 pkg-config found and no custom directory specified,
  2459. dnl deal with it
  2460. AC_MSG_ERROR([--with-nghttp2 was specified but could not find libnghttp2 pkg-config file.])
  2461. else
  2462. LIB_H2="-lnghttp2"
  2463. fi
  2464. LDFLAGS="$LDFLAGS $LD_H2"
  2465. CPPFLAGS="$CPPFLAGS $CPP_H2"
  2466. LIBS="$LIB_H2 $LIBS"
  2467. # use nghttp2_session_get_stream_local_window_size to require nghttp2
  2468. # >= 1.15.0
  2469. AC_CHECK_LIB(nghttp2, nghttp2_session_get_stream_local_window_size,
  2470. [
  2471. AC_CHECK_HEADERS(nghttp2/nghttp2.h,
  2472. curl_h2_msg="enabled (nghttp2)"
  2473. NGHTTP2_ENABLED=1
  2474. AC_DEFINE(USE_NGHTTP2, 1, [if nghttp2 is in use])
  2475. AC_SUBST(USE_NGHTTP2, [1])
  2476. )
  2477. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_H2"
  2478. export CURL_LIBRARY_PATH
  2479. AC_MSG_NOTICE([Added $DIR_H2 to CURL_LIBRARY_PATH])
  2480. ],
  2481. dnl not found, revert back to clean variables
  2482. LDFLAGS=$CLEANLDFLAGS
  2483. CPPFLAGS=$CLEANCPPFLAGS
  2484. LIBS=$CLEANLIBS
  2485. )
  2486. fi
  2487. dnl **********************************************************************
  2488. dnl Check for ngtcp2 (QUIC)
  2489. dnl **********************************************************************
  2490. OPT_TCP2="no"
  2491. if test "x$disable_http" = "xyes"; then
  2492. # without HTTP, ngtcp2 is no use
  2493. OPT_TCP2="no"
  2494. fi
  2495. AC_ARG_WITH(ngtcp2,
  2496. AS_HELP_STRING([--with-ngtcp2=PATH],[Enable ngtcp2 usage])
  2497. AS_HELP_STRING([--without-ngtcp2],[Disable ngtcp2 usage]),
  2498. [OPT_TCP2=$withval])
  2499. case "$OPT_TCP2" in
  2500. no)
  2501. dnl --without-ngtcp2 option used
  2502. want_tcp2="no"
  2503. ;;
  2504. yes)
  2505. dnl --with-ngtcp2 option used without path
  2506. want_tcp2="default"
  2507. want_tcp2_path=""
  2508. ;;
  2509. *)
  2510. dnl --with-ngtcp2 option used with path
  2511. want_tcp2="yes"
  2512. want_tcp2_path="$withval/lib/pkgconfig"
  2513. ;;
  2514. esac
  2515. curl_tcp2_msg="no (--with-ngtcp2)"
  2516. if test X"$want_tcp2" != Xno; then
  2517. if test "$QUIC_ENABLED" != "yes"; then
  2518. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-ngtcp2 a no-no])
  2519. fi
  2520. dnl backup the pre-ngtcp2 variables
  2521. CLEANLDFLAGS="$LDFLAGS"
  2522. CLEANCPPFLAGS="$CPPFLAGS"
  2523. CLEANLIBS="$LIBS"
  2524. CURL_CHECK_PKGCONFIG(libngtcp2, $want_tcp2_path)
  2525. if test "$PKGCONFIG" != "no" ; then
  2526. LIB_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2527. $PKGCONFIG --libs-only-l libngtcp2`
  2528. AC_MSG_NOTICE([-l is $LIB_TCP2])
  2529. CPP_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2530. $PKGCONFIG --cflags-only-I libngtcp2`
  2531. AC_MSG_NOTICE([-I is $CPP_TCP2])
  2532. LD_TCP2=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2533. $PKGCONFIG --libs-only-L libngtcp2`
  2534. AC_MSG_NOTICE([-L is $LD_TCP2])
  2535. LDFLAGS="$LDFLAGS $LD_TCP2"
  2536. CPPFLAGS="$CPPFLAGS $CPP_TCP2"
  2537. LIBS="$LIB_TCP2 $LIBS"
  2538. if test "x$cross_compiling" != "xyes"; then
  2539. DIR_TCP2=`echo $LD_TCP2 | $SED -e 's/^-L//'`
  2540. fi
  2541. AC_CHECK_LIB(ngtcp2, ngtcp2_conn_client_new_versioned,
  2542. [
  2543. AC_CHECK_HEADERS(ngtcp2/ngtcp2.h,
  2544. NGTCP2_ENABLED=1
  2545. AC_DEFINE(USE_NGTCP2, 1, [if ngtcp2 is in use])
  2546. AC_SUBST(USE_NGTCP2, [1])
  2547. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_TCP2"
  2548. export CURL_LIBRARY_PATH
  2549. AC_MSG_NOTICE([Added $DIR_TCP2 to CURL_LIBRARY_PATH])
  2550. )
  2551. ],
  2552. dnl not found, revert back to clean variables
  2553. LDFLAGS=$CLEANLDFLAGS
  2554. CPPFLAGS=$CLEANCPPFLAGS
  2555. LIBS=$CLEANLIBS
  2556. )
  2557. else
  2558. dnl no ngtcp2 pkg-config found, deal with it
  2559. if test X"$want_tcp2" != Xdefault; then
  2560. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2561. dnl a pkgconfig file
  2562. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2 pkg-config file.])
  2563. fi
  2564. fi
  2565. fi
  2566. if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" != "x1"; then
  2567. dnl backup the pre-ngtcp2_crypto_quictls variables
  2568. CLEANLDFLAGS="$LDFLAGS"
  2569. CLEANCPPFLAGS="$CPPFLAGS"
  2570. CLEANLIBS="$LIBS"
  2571. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_quictls, $want_tcp2_path)
  2572. if test "$PKGCONFIG" != "no" ; then
  2573. LIB_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2574. $PKGCONFIG --libs-only-l libngtcp2_crypto_quictls`
  2575. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_QUICTLS])
  2576. CPP_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2577. $PKGCONFIG --cflags-only-I libngtcp2_crypto_quictls`
  2578. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_QUICTLS])
  2579. LD_NGTCP2_CRYPTO_QUICTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2580. $PKGCONFIG --libs-only-L libngtcp2_crypto_quictls`
  2581. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_QUICTLS])
  2582. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_QUICTLS"
  2583. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_QUICTLS"
  2584. LIBS="$LIB_NGTCP2_CRYPTO_QUICTLS $LIBS"
  2585. if test "x$cross_compiling" != "xyes"; then
  2586. DIR_NGTCP2_CRYPTO_QUICTLS=`echo $LD_NGTCP2_CRYPTO_QUICTLS | $SED -e 's/^-L//'`
  2587. fi
  2588. AC_CHECK_LIB(ngtcp2_crypto_quictls, ngtcp2_crypto_recv_client_initial_cb,
  2589. [
  2590. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2591. NGTCP2_ENABLED=1
  2592. AC_DEFINE(USE_NGTCP2_CRYPTO_QUICTLS, 1, [if ngtcp2_crypto_quictls is in use])
  2593. AC_SUBST(USE_NGTCP2_CRYPTO_QUICTLS, [1])
  2594. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_QUICTLS"
  2595. export CURL_LIBRARY_PATH
  2596. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_QUICTLS to CURL_LIBRARY_PATH])
  2597. )
  2598. ],
  2599. dnl not found, revert back to clean variables
  2600. LDFLAGS=$CLEANLDFLAGS
  2601. CPPFLAGS=$CLEANCPPFLAGS
  2602. LIBS=$CLEANLIBS
  2603. )
  2604. else
  2605. dnl no ngtcp2_crypto_quictls pkg-config found, deal with it
  2606. if test X"$want_tcp2" != Xdefault; then
  2607. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2608. dnl a pkgconfig file
  2609. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.])
  2610. fi
  2611. fi
  2612. fi
  2613. if test "x$NGTCP2_ENABLED" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "x$OPENSSL_IS_BORINGSSL" = "x1"; then
  2614. dnl backup the pre-ngtcp2_crypto_boringssl variables
  2615. CLEANLDFLAGS="$LDFLAGS"
  2616. CLEANCPPFLAGS="$CPPFLAGS"
  2617. CLEANLIBS="$LIBS"
  2618. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_boringssl, $want_tcp2_path)
  2619. if test "$PKGCONFIG" != "no" ; then
  2620. LIB_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2621. $PKGCONFIG --libs-only-l libngtcp2_crypto_boringssl`
  2622. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_BORINGSSL])
  2623. CPP_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2624. $PKGCONFIG --cflags-only-I libngtcp2_crypto_boringssl`
  2625. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_BORINGSSL])
  2626. LD_NGTCP2_CRYPTO_BORINGSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2627. $PKGCONFIG --libs-only-L libngtcp2_crypto_boringssl`
  2628. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_BORINGSSL])
  2629. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_BORINGSSL"
  2630. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_BORINGSSL"
  2631. LIBS="$LIB_NGTCP2_CRYPTO_BORINGSSL $LIBS"
  2632. if test "x$cross_compiling" != "xyes"; then
  2633. DIR_NGTCP2_CRYPTO_BORINGSSL=`echo $LD_NGTCP2_CRYPTO_BORINGSSL | $SED -e 's/^-L//'`
  2634. fi
  2635. AC_CHECK_LIB(ngtcp2_crypto_boringssl, ngtcp2_crypto_recv_client_initial_cb,
  2636. [
  2637. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2638. NGTCP2_ENABLED=1
  2639. AC_DEFINE(USE_NGTCP2_CRYPTO_BORINGSSL, 1, [if ngtcp2_crypto_boringssl is in use])
  2640. AC_SUBST(USE_NGTCP2_CRYPTO_BORINGSSL, [1])
  2641. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_BORINGSSL"
  2642. export CURL_LIBRARY_PATH
  2643. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_BORINGSSL to CURL_LIBRARY_PATH])
  2644. )
  2645. ],
  2646. dnl not found, revert back to clean variables
  2647. LDFLAGS=$CLEANLDFLAGS
  2648. CPPFLAGS=$CLEANCPPFLAGS
  2649. LIBS=$CLEANLIBS
  2650. )
  2651. else
  2652. dnl no ngtcp2_crypto_boringssl pkg-config found, deal with it
  2653. if test X"$want_tcp2" != Xdefault; then
  2654. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2655. dnl a pkgconfig file
  2656. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_boringssl pkg-config file.])
  2657. fi
  2658. fi
  2659. fi
  2660. if test "x$NGTCP2_ENABLED" = "x1" -a "x$GNUTLS_ENABLED" = "x1"; then
  2661. dnl backup the pre-ngtcp2_crypto_gnutls variables
  2662. CLEANLDFLAGS="$LDFLAGS"
  2663. CLEANCPPFLAGS="$CPPFLAGS"
  2664. CLEANLIBS="$LIBS"
  2665. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_gnutls, $want_tcp2_path)
  2666. if test "$PKGCONFIG" != "no" ; then
  2667. LIB_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2668. $PKGCONFIG --libs-only-l libngtcp2_crypto_gnutls`
  2669. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_GNUTLS])
  2670. CPP_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2671. $PKGCONFIG --cflags-only-I libngtcp2_crypto_gnutls`
  2672. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_GNUTLS])
  2673. LD_NGTCP2_CRYPTO_GNUTLS=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2674. $PKGCONFIG --libs-only-L libngtcp2_crypto_gnutls`
  2675. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_GNUTLS])
  2676. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_GNUTLS"
  2677. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_GNUTLS"
  2678. LIBS="$LIB_NGTCP2_CRYPTO_GNUTLS $LIBS"
  2679. if test "x$cross_compiling" != "xyes"; then
  2680. DIR_NGTCP2_CRYPTO_GNUTLS=`echo $LD_NGTCP2_CRYPTO_GNUTLS | $SED -e 's/^-L//'`
  2681. fi
  2682. AC_CHECK_LIB(ngtcp2_crypto_gnutls, ngtcp2_crypto_recv_client_initial_cb,
  2683. [
  2684. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2685. NGTCP2_ENABLED=1
  2686. AC_DEFINE(USE_NGTCP2_CRYPTO_GNUTLS, 1, [if ngtcp2_crypto_gnutls is in use])
  2687. AC_SUBST(USE_NGTCP2_CRYPTO_GNUTLS, [1])
  2688. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_GNUTLS"
  2689. export CURL_LIBRARY_PATH
  2690. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_GNUTLS to CURL_LIBRARY_PATH])
  2691. )
  2692. ],
  2693. dnl not found, revert back to clean variables
  2694. LDFLAGS=$CLEANLDFLAGS
  2695. CPPFLAGS=$CLEANCPPFLAGS
  2696. LIBS=$CLEANLIBS
  2697. )
  2698. else
  2699. dnl no ngtcp2_crypto_gnutls pkg-config found, deal with it
  2700. if test X"$want_tcp2" != Xdefault; then
  2701. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2702. dnl a pkgconfig file
  2703. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_gnutls pkg-config file.])
  2704. fi
  2705. fi
  2706. fi
  2707. if test "x$NGTCP2_ENABLED" = "x1" -a "x$WOLFSSL_ENABLED" = "x1"; then
  2708. dnl backup the pre-ngtcp2_crypto_wolfssl variables
  2709. CLEANLDFLAGS="$LDFLAGS"
  2710. CLEANCPPFLAGS="$CPPFLAGS"
  2711. CLEANLIBS="$LIBS"
  2712. CURL_CHECK_PKGCONFIG(libngtcp2_crypto_wolfssl, $want_tcp2_path)
  2713. if test "$PKGCONFIG" != "no" ; then
  2714. LIB_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2715. $PKGCONFIG --libs-only-l libngtcp2_crypto_wolfssl`
  2716. AC_MSG_NOTICE([-l is $LIB_NGTCP2_CRYPTO_WOLFSSL])
  2717. CPP_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path]) dnl
  2718. $PKGCONFIG --cflags-only-I libngtcp2_crypto_wolfssl`
  2719. AC_MSG_NOTICE([-I is $CPP_NGTCP2_CRYPTO_WOLFSSL])
  2720. LD_NGTCP2_CRYPTO_WOLFSSL=`CURL_EXPORT_PCDIR([$want_tcp2_path])
  2721. $PKGCONFIG --libs-only-L libngtcp2_crypto_wolfssl`
  2722. AC_MSG_NOTICE([-L is $LD_NGTCP2_CRYPTO_WOLFSSL])
  2723. LDFLAGS="$LDFLAGS $LD_NGTCP2_CRYPTO_WOLFSSL"
  2724. CPPFLAGS="$CPPFLAGS $CPP_NGTCP2_CRYPTO_WOLFSSL"
  2725. LIBS="$LIB_NGTCP2_CRYPTO_WOLFSSL $LIBS"
  2726. if test "x$cross_compiling" != "xyes"; then
  2727. DIR_NGTCP2_CRYPTO_WOLFSSL=`echo $LD_NGTCP2_CRYPTO_WOLFSSL | $SED -e 's/^-L//'`
  2728. fi
  2729. AC_CHECK_LIB(ngtcp2_crypto_wolfssl, ngtcp2_crypto_recv_client_initial_cb,
  2730. [
  2731. AC_CHECK_HEADERS(ngtcp2/ngtcp2_crypto.h,
  2732. NGTCP2_ENABLED=1
  2733. AC_DEFINE(USE_NGTCP2_CRYPTO_WOLFSSL, 1, [if ngtcp2_crypto_wolfssl is in use])
  2734. AC_SUBST(USE_NGTCP2_CRYPTO_WOLFSSL, [1])
  2735. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGTCP2_CRYPTO_WOLFSSL"
  2736. export CURL_LIBRARY_PATH
  2737. AC_MSG_NOTICE([Added $DIR_NGTCP2_CRYPTO_WOLFSSL to CURL_LIBRARY_PATH])
  2738. )
  2739. ],
  2740. dnl not found, revert back to clean variables
  2741. LDFLAGS=$CLEANLDFLAGS
  2742. CPPFLAGS=$CLEANCPPFLAGS
  2743. LIBS=$CLEANLIBS
  2744. )
  2745. else
  2746. dnl no ngtcp2_crypto_wolfssl pkg-config found, deal with it
  2747. if test X"$want_tcp2" != Xdefault; then
  2748. dnl To avoid link errors, we do not allow --with-ngtcp2 without
  2749. dnl a pkgconfig file
  2750. AC_MSG_ERROR([--with-ngtcp2 was specified but could not find ngtcp2_crypto_wolfssl pkg-config file.])
  2751. fi
  2752. fi
  2753. fi
  2754. dnl **********************************************************************
  2755. dnl Check for OpenSSL QUIC
  2756. dnl **********************************************************************
  2757. OPT_OPENSSL_QUIC="no"
  2758. if test "x$disable_http" = "xyes" -o "x$OPENSSL_ENABLED" != "x1"; then
  2759. # without HTTP or without openssl, no use
  2760. OPT_OPENSSL_QUIC="no"
  2761. fi
  2762. AC_ARG_WITH(openssl-quic,
  2763. AS_HELP_STRING([--with-openssl-quic],[Enable OpenSSL QUIC usage])
  2764. AS_HELP_STRING([--without-openssl-quic],[Disable OpenSSL QUIC usage]),
  2765. [OPT_OPENSSL_QUIC=$withval])
  2766. case "$OPT_OPENSSL_QUIC" in
  2767. no)
  2768. dnl --without-openssl-quic option used
  2769. want_openssl_quic="no"
  2770. ;;
  2771. yes)
  2772. dnl --with-openssl-quic option used
  2773. want_openssl_quic="yes"
  2774. ;;
  2775. esac
  2776. curl_openssl_quic_msg="no (--with-openssl-quic)"
  2777. if test "x$want_openssl_quic" = "xyes"; then
  2778. if test "$NGTCP2_ENABLED" = 1; then
  2779. AC_MSG_ERROR([--with-openssl-quic and --with-ngtcp2 are mutually exclusive])
  2780. fi
  2781. if test "$HAVE_OPENSSL_QUIC" != 1; then
  2782. AC_MSG_ERROR([--with-openssl-quic requires quic support in OpenSSL])
  2783. fi
  2784. AC_DEFINE(USE_OPENSSL_QUIC, 1, [if openssl QUIC is in use])
  2785. AC_SUBST(USE_OPENSSL_QUIC, [1])
  2786. fi
  2787. dnl **********************************************************************
  2788. dnl Check for nghttp3 (HTTP/3 with ngtcp2)
  2789. dnl **********************************************************************
  2790. OPT_NGHTTP3="yes"
  2791. if test "x$USE_NGTCP2" != "x1" -a "x$USE_OPENSSL_QUIC" != "x1"; then
  2792. # without ngtcp2 or openssl quic, nghttp3 is of no use for us
  2793. OPT_NGHTTP3="no"
  2794. want_nghttp3="no"
  2795. fi
  2796. AC_ARG_WITH(nghttp3,
  2797. AS_HELP_STRING([--with-nghttp3=PATH],[Enable nghttp3 usage])
  2798. AS_HELP_STRING([--without-nghttp3],[Disable nghttp3 usage]),
  2799. [OPT_NGHTTP3=$withval])
  2800. case "$OPT_NGHTTP3" in
  2801. no)
  2802. dnl --without-nghttp3 option used
  2803. want_nghttp3="no"
  2804. ;;
  2805. yes)
  2806. dnl --with-nghttp3 option used without path
  2807. want_nghttp3="default"
  2808. want_nghttp3_path=""
  2809. ;;
  2810. *)
  2811. dnl --with-nghttp3 option used with path
  2812. want_nghttp3="yes"
  2813. want_nghttp3_path="$withval/lib/pkgconfig"
  2814. ;;
  2815. esac
  2816. curl_http3_msg="no (--with-nghttp3)"
  2817. if test X"$want_nghttp3" != Xno; then
  2818. dnl backup the pre-nghttp3 variables
  2819. CLEANLDFLAGS="$LDFLAGS"
  2820. CLEANCPPFLAGS="$CPPFLAGS"
  2821. CLEANLIBS="$LIBS"
  2822. CURL_CHECK_PKGCONFIG(libnghttp3, $want_nghttp3_path)
  2823. if test "$PKGCONFIG" != "no" ; then
  2824. LIB_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
  2825. $PKGCONFIG --libs-only-l libnghttp3`
  2826. AC_MSG_NOTICE([-l is $LIB_NGHTTP3])
  2827. CPP_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path]) dnl
  2828. $PKGCONFIG --cflags-only-I libnghttp3`
  2829. AC_MSG_NOTICE([-I is $CPP_NGHTTP3])
  2830. LD_NGHTTP3=`CURL_EXPORT_PCDIR([$want_nghttp3_path])
  2831. $PKGCONFIG --libs-only-L libnghttp3`
  2832. AC_MSG_NOTICE([-L is $LD_NGHTTP3])
  2833. LDFLAGS="$LDFLAGS $LD_NGHTTP3"
  2834. CPPFLAGS="$CPPFLAGS $CPP_NGHTTP3"
  2835. LIBS="$LIB_NGHTTP3 $LIBS"
  2836. if test "x$cross_compiling" != "xyes"; then
  2837. DIR_NGHTTP3=`echo $LD_NGHTTP3 | $SED -e 's/^-L//'`
  2838. fi
  2839. AC_CHECK_LIB(nghttp3, nghttp3_conn_client_new_versioned,
  2840. [
  2841. AC_CHECK_HEADERS(nghttp3/nghttp3.h,
  2842. AC_DEFINE(USE_NGHTTP3, 1, [if nghttp3 is in use])
  2843. AC_SUBST(USE_NGHTTP3, [1])
  2844. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_NGHTTP3"
  2845. export CURL_LIBRARY_PATH
  2846. AC_MSG_NOTICE([Added $DIR_NGHTTP3 to CURL_LIBRARY_PATH])
  2847. )
  2848. ],
  2849. dnl not found, revert back to clean variables
  2850. LDFLAGS=$CLEANLDFLAGS
  2851. CPPFLAGS=$CLEANCPPFLAGS
  2852. LIBS=$CLEANLIBS
  2853. )
  2854. else
  2855. dnl no nghttp3 pkg-config found, deal with it
  2856. if test X"$want_nghttp3" != Xdefault; then
  2857. dnl To avoid link errors, we do not allow --with-nghttp3 without
  2858. dnl a pkgconfig file
  2859. AC_MSG_ERROR([--with-nghttp3 was specified but could not find nghttp3 pkg-config file.])
  2860. fi
  2861. fi
  2862. fi
  2863. dnl **********************************************************************
  2864. dnl Check for ngtcp2 and nghttp3 (HTTP/3 with ngtcp2 + nghttp3)
  2865. dnl **********************************************************************
  2866. if test "x$NGTCP2_ENABLED" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
  2867. AC_DEFINE(USE_NGTCP2_H3, 1, [if ngtcp2 + nghttp3 is in use])
  2868. AC_SUBST(USE_NGTCP2_H3, [1])
  2869. AC_MSG_NOTICE([HTTP3 support is experimental])
  2870. curl_h3_msg="enabled (ngtcp2 + nghttp3)"
  2871. fi
  2872. dnl **********************************************************************
  2873. dnl Check for OpenSSL and nghttp3 (HTTP/3 with nghttp3 using OpenSSL QUIC)
  2874. dnl **********************************************************************
  2875. if test "x$USE_OPENSSL_QUIC" = "x1" -a "x$USE_NGHTTP3" = "x1"; then
  2876. experimental="$experimental HTTP3"
  2877. AC_DEFINE(USE_OPENSSL_H3, 1, [if openssl quic + nghttp3 is in use])
  2878. AC_SUBST(USE_OPENSSL_H3, [1])
  2879. AC_MSG_NOTICE([HTTP3 support is experimental])
  2880. curl_h3_msg="enabled (openssl + nghttp3)"
  2881. fi
  2882. dnl **********************************************************************
  2883. dnl Check for quiche (QUIC)
  2884. dnl **********************************************************************
  2885. OPT_QUICHE="no"
  2886. if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
  2887. # without HTTP or with ngtcp2, quiche is no use
  2888. OPT_QUICHE="no"
  2889. fi
  2890. AC_ARG_WITH(quiche,
  2891. AS_HELP_STRING([--with-quiche=PATH],[Enable quiche usage])
  2892. AS_HELP_STRING([--without-quiche],[Disable quiche usage]),
  2893. [OPT_QUICHE=$withval])
  2894. case "$OPT_QUICHE" in
  2895. no)
  2896. dnl --without-quiche option used
  2897. want_quiche="no"
  2898. ;;
  2899. yes)
  2900. dnl --with-quiche option used without path
  2901. want_quiche="default"
  2902. want_quiche_path=""
  2903. ;;
  2904. *)
  2905. dnl --with-quiche option used with path
  2906. want_quiche="yes"
  2907. want_quiche_path="$withval"
  2908. ;;
  2909. esac
  2910. if test X"$want_quiche" != Xno; then
  2911. if test "$QUIC_ENABLED" != "yes"; then
  2912. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-quiche a no-no])
  2913. fi
  2914. if test "$NGHTTP3_ENABLED" = 1; then
  2915. AC_MSG_ERROR([--with-quiche and --with-ngtcp2 are mutually exclusive])
  2916. fi
  2917. dnl backup the pre-quiche variables
  2918. CLEANLDFLAGS="$LDFLAGS"
  2919. CLEANCPPFLAGS="$CPPFLAGS"
  2920. CLEANLIBS="$LIBS"
  2921. CURL_CHECK_PKGCONFIG(quiche, $want_quiche_path)
  2922. if test "$PKGCONFIG" != "no" ; then
  2923. LIB_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
  2924. $PKGCONFIG --libs-only-l quiche`
  2925. AC_MSG_NOTICE([-l is $LIB_QUICHE])
  2926. CPP_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path]) dnl
  2927. $PKGCONFIG --cflags-only-I quiche`
  2928. AC_MSG_NOTICE([-I is $CPP_QUICHE])
  2929. LD_QUICHE=`CURL_EXPORT_PCDIR([$want_quiche_path])
  2930. $PKGCONFIG --libs-only-L quiche`
  2931. AC_MSG_NOTICE([-L is $LD_QUICHE])
  2932. LDFLAGS="$LDFLAGS $LD_QUICHE"
  2933. CPPFLAGS="$CPPFLAGS $CPP_QUICHE"
  2934. LIBS="$LIB_QUICHE $LIBS"
  2935. if test "x$cross_compiling" != "xyes"; then
  2936. DIR_QUICHE=`echo $LD_QUICHE | $SED -e 's/^-L//'`
  2937. fi
  2938. AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting,
  2939. [
  2940. AC_CHECK_HEADERS(quiche.h,
  2941. experimental="$experimental HTTP3"
  2942. AC_MSG_NOTICE([HTTP3 support is experimental])
  2943. curl_h3_msg="enabled (quiche)"
  2944. QUICHE_ENABLED=1
  2945. AC_DEFINE(USE_QUICHE, 1, [if quiche is in use])
  2946. AC_SUBST(USE_QUICHE, [1])
  2947. AC_CHECK_FUNCS([quiche_conn_set_qlog_fd])
  2948. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_QUICHE"
  2949. export CURL_LIBRARY_PATH
  2950. AC_MSG_NOTICE([Added $DIR_QUICHE to CURL_LIBRARY_PATH]),
  2951. [],
  2952. [
  2953. AC_INCLUDES_DEFAULT
  2954. #include <sys/socket.h>
  2955. ]
  2956. )
  2957. ],
  2958. dnl not found, revert back to clean variables
  2959. AC_MSG_ERROR([couldn't use quiche])
  2960. )
  2961. else
  2962. dnl no quiche pkg-config found, deal with it
  2963. if test X"$want_quiche" != Xdefault; then
  2964. dnl To avoid link errors, we do not allow --with-quiche without
  2965. dnl a pkgconfig file
  2966. AC_MSG_ERROR([--with-quiche was specified but could not find quiche pkg-config file.])
  2967. fi
  2968. fi
  2969. fi
  2970. dnl **********************************************************************
  2971. dnl Check for msh3 (QUIC)
  2972. dnl **********************************************************************
  2973. OPT_MSH3="no"
  2974. if test "x$disable_http" = "xyes" -o "x$USE_NGTCP" = "x1"; then
  2975. # without HTTP or with ngtcp2, msh3 is no use
  2976. OPT_MSH3="no"
  2977. fi
  2978. AC_ARG_WITH(msh3,
  2979. AS_HELP_STRING([--with-msh3=PATH],[Enable msh3 usage])
  2980. AS_HELP_STRING([--without-msh3],[Disable msh3 usage]),
  2981. [OPT_MSH3=$withval])
  2982. case "$OPT_MSH3" in
  2983. no)
  2984. dnl --without-msh3 option used
  2985. want_msh3="no"
  2986. ;;
  2987. yes)
  2988. dnl --with-msh3 option used without path
  2989. want_msh3="default"
  2990. want_msh3_path=""
  2991. ;;
  2992. *)
  2993. dnl --with-msh3 option used with path
  2994. want_msh3="yes"
  2995. want_msh3_path="$withval"
  2996. ;;
  2997. esac
  2998. if test X"$want_msh3" != Xno; then
  2999. dnl msh3 on non-Windows needs an OpenSSL with the QUIC API
  3000. if test "$curl_cv_native_windows" != "yes"; then
  3001. if test "$QUIC_ENABLED" != "yes"; then
  3002. AC_MSG_ERROR([the detected TLS library does not support QUIC, making --with-msh3 a no-no])
  3003. fi
  3004. if test "$OPENSSL_ENABLED" != "1"; then
  3005. AC_MSG_ERROR([msh3 requires OpenSSL])
  3006. fi
  3007. fi
  3008. if test "$NGHTTP3_ENABLED" = 1; then
  3009. AC_MSG_ERROR([--with-msh3 and --with-ngtcp2 are mutually exclusive])
  3010. fi
  3011. if test "$QUICHE_ENABLED" = 1; then
  3012. AC_MSG_ERROR([--with-msh3 and --with-quiche are mutually exclusive])
  3013. fi
  3014. dnl backup the pre-msh3 variables
  3015. CLEANLDFLAGS="$LDFLAGS"
  3016. CLEANCPPFLAGS="$CPPFLAGS"
  3017. CLEANLIBS="$LIBS"
  3018. if test -n "$want_msh3_path"; then
  3019. LD_MSH3="-L$want_msh3_path/lib"
  3020. CPP_MSH3="-I$want_msh3_path/include"
  3021. DIR_MSH3="$want_msh3_path/lib"
  3022. LDFLAGS="$LDFLAGS $LD_MSH3"
  3023. CPPFLAGS="$CPPFLAGS $CPP_MSH3"
  3024. fi
  3025. LIBS="-lmsh3 $LIBS"
  3026. AC_CHECK_LIB(msh3, MsH3ApiOpen,
  3027. [
  3028. AC_CHECK_HEADERS(msh3.h,
  3029. curl_h3_msg="enabled (msh3)"
  3030. MSH3_ENABLED=1
  3031. AC_DEFINE(USE_MSH3, 1, [if msh3 is in use])
  3032. AC_SUBST(USE_MSH3, [1])
  3033. CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$DIR_MSH3"
  3034. export CURL_LIBRARY_PATH
  3035. AC_MSG_NOTICE([Added $DIR_MSH3 to CURL_LIBRARY_PATH]),
  3036. experimental="$experimental HTTP3"
  3037. )
  3038. ],
  3039. dnl not found, revert back to clean variables
  3040. LDFLAGS=$CLEANLDFLAGS
  3041. CPPFLAGS=$CLEANCPPFLAGS
  3042. LIBS=$CLEANLIBS
  3043. )
  3044. fi
  3045. dnl **********************************************************************
  3046. dnl Check for zsh completion path
  3047. dnl **********************************************************************
  3048. OPT_ZSH_FPATH=default
  3049. AC_ARG_WITH(zsh-functions-dir,
  3050. AS_HELP_STRING([--with-zsh-functions-dir=PATH],[Install zsh completions to PATH])
  3051. AS_HELP_STRING([--without-zsh-functions-dir],[Do not install zsh completions]),
  3052. [OPT_ZSH_FPATH=$withval])
  3053. case "$OPT_ZSH_FPATH" in
  3054. no)
  3055. dnl --without-zsh-functions-dir option used
  3056. ;;
  3057. default|yes)
  3058. dnl --with-zsh-functions-dir option used without path
  3059. ZSH_FUNCTIONS_DIR="$datarootdir/zsh/site-functions"
  3060. AC_SUBST(ZSH_FUNCTIONS_DIR)
  3061. ;;
  3062. *)
  3063. dnl --with-zsh-functions-dir option used with path
  3064. ZSH_FUNCTIONS_DIR="$withval"
  3065. AC_SUBST(ZSH_FUNCTIONS_DIR)
  3066. ;;
  3067. esac
  3068. dnl **********************************************************************
  3069. dnl Check for fish completion path
  3070. dnl **********************************************************************
  3071. OPT_FISH_FPATH=default
  3072. AC_ARG_WITH(fish-functions-dir,
  3073. AS_HELP_STRING([--with-fish-functions-dir=PATH],[Install fish completions to PATH])
  3074. AS_HELP_STRING([--without-fish-functions-dir],[Do not install fish completions]),
  3075. [OPT_FISH_FPATH=$withval])
  3076. case "$OPT_FISH_FPATH" in
  3077. no)
  3078. dnl --without-fish-functions-dir option used
  3079. ;;
  3080. default|yes)
  3081. dnl --with-fish-functions-dir option used without path
  3082. CURL_CHECK_PKGCONFIG(fish)
  3083. if test "$PKGCONFIG" != "no" ; then
  3084. FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
  3085. else
  3086. FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
  3087. fi
  3088. AC_SUBST(FISH_FUNCTIONS_DIR)
  3089. ;;
  3090. *)
  3091. dnl --with-fish-functions-dir option used with path
  3092. FISH_FUNCTIONS_DIR="$withval"
  3093. AC_SUBST(FISH_FUNCTIONS_DIR)
  3094. ;;
  3095. esac
  3096. dnl Now check for the very most basic headers. Then we can use these
  3097. dnl ones as default-headers when checking for the rest!
  3098. AC_CHECK_HEADERS(
  3099. sys/types.h \
  3100. sys/time.h \
  3101. sys/select.h \
  3102. sys/socket.h \
  3103. sys/ioctl.h \
  3104. unistd.h \
  3105. stdlib.h \
  3106. arpa/inet.h \
  3107. net/if.h \
  3108. netinet/in.h \
  3109. netinet/in6.h \
  3110. sys/un.h \
  3111. linux/tcp.h \
  3112. netinet/tcp.h \
  3113. netinet/udp.h \
  3114. netdb.h \
  3115. sys/sockio.h \
  3116. sys/stat.h \
  3117. sys/param.h \
  3118. termios.h \
  3119. termio.h \
  3120. fcntl.h \
  3121. io.h \
  3122. pwd.h \
  3123. utime.h \
  3124. sys/utime.h \
  3125. sys/poll.h \
  3126. poll.h \
  3127. socket.h \
  3128. sys/resource.h \
  3129. libgen.h \
  3130. locale.h \
  3131. stdbool.h \
  3132. sys/filio.h \
  3133. sys/wait.h \
  3134. setjmp.h,
  3135. dnl to do if not found
  3136. [],
  3137. dnl to do if found
  3138. [],
  3139. dnl default includes
  3140. [
  3141. #ifdef HAVE_SYS_TYPES_H
  3142. #include <sys/types.h>
  3143. #endif
  3144. #ifdef HAVE_SYS_TIME_H
  3145. #include <sys/time.h>
  3146. #endif
  3147. #ifdef HAVE_SYS_SELECT_H
  3148. #include <sys/select.h>
  3149. #elif defined(HAVE_UNISTD_H)
  3150. #include <unistd.h>
  3151. #endif
  3152. #ifdef HAVE_SYS_SOCKET_H
  3153. #include <sys/socket.h>
  3154. #endif
  3155. #ifdef HAVE_NETINET_IN_H
  3156. #include <netinet/in.h>
  3157. #endif
  3158. #ifdef HAVE_NETINET_IN6_H
  3159. #include <netinet/in6.h>
  3160. #endif
  3161. #ifdef HAVE_SYS_UN_H
  3162. #include <sys/un.h>
  3163. #endif
  3164. ]
  3165. )
  3166. dnl Checks for typedefs, structures, and compiler characteristics.
  3167. AC_C_CONST
  3168. AC_TYPE_SIZE_T
  3169. CURL_CHECK_STRUCT_TIMEVAL
  3170. CURL_VERIFY_RUNTIMELIBS
  3171. CURL_SIZEOF(size_t)
  3172. CURL_SIZEOF(long)
  3173. CURL_SIZEOF(int)
  3174. CURL_SIZEOF(time_t)
  3175. CURL_SIZEOF(off_t)
  3176. o=$CPPFLAGS
  3177. CPPFLAGS="-I$srcdir/include $CPPFLAGS"
  3178. CURL_SIZEOF(curl_off_t, [
  3179. #include <curl/system.h>
  3180. ])
  3181. CURL_SIZEOF(curl_socket_t, [
  3182. #include <curl/curl.h>
  3183. ])
  3184. CPPFLAGS=$o
  3185. AC_CHECK_TYPE(long long,
  3186. [AC_DEFINE(HAVE_LONGLONG, 1,
  3187. [Define to 1 if the compiler supports the 'long long' data type.])]
  3188. longlong="yes"
  3189. )
  3190. if test ${ac_cv_sizeof_curl_off_t} -lt 8; then
  3191. AC_MSG_ERROR([64 bit curl_off_t is required])
  3192. fi
  3193. # check for ssize_t
  3194. AC_CHECK_TYPE(ssize_t, ,
  3195. AC_DEFINE(ssize_t, int, [the signed version of size_t]))
  3196. # check for bool type
  3197. AC_CHECK_TYPE([bool],[
  3198. AC_DEFINE(HAVE_BOOL_T, 1,
  3199. [Define to 1 if bool is an available type.])
  3200. ], ,[
  3201. #ifdef HAVE_SYS_TYPES_H
  3202. #include <sys/types.h>
  3203. #endif
  3204. #ifdef HAVE_STDBOOL_H
  3205. #include <stdbool.h>
  3206. #endif
  3207. ])
  3208. # check for sa_family_t
  3209. AC_CHECK_TYPE(sa_family_t,
  3210. AC_DEFINE(CURL_SA_FAMILY_T, sa_family_t, [IP address type in sockaddr]),
  3211. [
  3212. # The windows name?
  3213. AC_CHECK_TYPE(ADDRESS_FAMILY,
  3214. AC_DEFINE(CURL_SA_FAMILY_T, ADDRESS_FAMILY, [IP address type in sockaddr]),
  3215. AC_DEFINE(CURL_SA_FAMILY_T, unsigned short, [IP address type in sockaddr]),
  3216. [
  3217. #ifdef _WIN32
  3218. #ifndef WIN32_LEAN_AND_MEAN
  3219. #define WIN32_LEAN_AND_MEAN
  3220. #endif
  3221. #include <winsock2.h>
  3222. #endif
  3223. #ifdef HAVE_SYS_SOCKET_H
  3224. #include <sys/socket.h>
  3225. #endif
  3226. ])
  3227. ],
  3228. [
  3229. #ifdef HAVE_SYS_SOCKET_H
  3230. #include <sys/socket.h>
  3231. #endif
  3232. ])
  3233. # check for suseconds_t
  3234. AC_CHECK_TYPE([suseconds_t],[
  3235. AC_DEFINE(HAVE_SUSECONDS_T, 1,
  3236. [Define to 1 if suseconds_t is an available type.])
  3237. ], ,[
  3238. #ifdef HAVE_SYS_TYPES_H
  3239. #include <sys/types.h>
  3240. #endif
  3241. #ifdef HAVE_SYS_TIME_H
  3242. #include <sys/time.h>
  3243. #endif
  3244. ])
  3245. AC_MSG_CHECKING([if time_t is unsigned])
  3246. CURL_RUN_IFELSE(
  3247. [
  3248. #include <time.h>
  3249. #include <limits.h>
  3250. int main(void) {
  3251. time_t t = -1;
  3252. return (t < 0);
  3253. }
  3254. ],[
  3255. AC_MSG_RESULT([yes])
  3256. AC_DEFINE(HAVE_TIME_T_UNSIGNED, 1, [Define this if time_t is unsigned])
  3257. ],[
  3258. AC_MSG_RESULT([no])
  3259. ],[
  3260. dnl cross-compiling, most systems are unsigned
  3261. AC_MSG_RESULT([no])
  3262. ])
  3263. TYPE_IN_ADDR_T
  3264. TYPE_SOCKADDR_STORAGE
  3265. CURL_CHECK_FUNC_SELECT
  3266. CURL_CHECK_FUNC_RECV
  3267. CURL_CHECK_FUNC_SEND
  3268. CURL_CHECK_MSG_NOSIGNAL
  3269. CURL_CHECK_FUNC_ALARM
  3270. CURL_CHECK_FUNC_BASENAME
  3271. CURL_CHECK_FUNC_CLOSESOCKET
  3272. CURL_CHECK_FUNC_CLOSESOCKET_CAMEL
  3273. CURL_CHECK_FUNC_FCNTL
  3274. CURL_CHECK_FUNC_FREEADDRINFO
  3275. CURL_CHECK_FUNC_FSETXATTR
  3276. CURL_CHECK_FUNC_FTRUNCATE
  3277. CURL_CHECK_FUNC_GETADDRINFO
  3278. CURL_CHECK_FUNC_GETHOSTBYNAME
  3279. CURL_CHECK_FUNC_GETHOSTBYNAME_R
  3280. CURL_CHECK_FUNC_GETHOSTNAME
  3281. CURL_CHECK_FUNC_GETPEERNAME
  3282. CURL_CHECK_FUNC_GETSOCKNAME
  3283. CURL_CHECK_FUNC_IF_NAMETOINDEX
  3284. CURL_CHECK_FUNC_GETIFADDRS
  3285. CURL_CHECK_FUNC_GMTIME_R
  3286. CURL_CHECK_FUNC_INET_NTOP
  3287. CURL_CHECK_FUNC_INET_PTON
  3288. CURL_CHECK_FUNC_IOCTL
  3289. CURL_CHECK_FUNC_IOCTLSOCKET
  3290. CURL_CHECK_FUNC_IOCTLSOCKET_CAMEL
  3291. CURL_CHECK_FUNC_MEMRCHR
  3292. CURL_CHECK_FUNC_POLL
  3293. CURL_CHECK_FUNC_SIGACTION
  3294. CURL_CHECK_FUNC_SIGINTERRUPT
  3295. CURL_CHECK_FUNC_SIGNAL
  3296. CURL_CHECK_FUNC_SIGSETJMP
  3297. CURL_CHECK_FUNC_SOCKET
  3298. CURL_CHECK_FUNC_SOCKETPAIR
  3299. CURL_CHECK_FUNC_STRCASECMP
  3300. CURL_CHECK_FUNC_STRCMPI
  3301. CURL_CHECK_FUNC_STRDUP
  3302. CURL_CHECK_FUNC_STRERROR_R
  3303. CURL_CHECK_FUNC_STRICMP
  3304. CURL_CHECK_FUNC_STRTOK_R
  3305. CURL_CHECK_FUNC_STRTOLL
  3306. case $host in
  3307. *msdosdjgpp)
  3308. ac_cv_func_pipe=no
  3309. skipcheck_pipe=yes
  3310. AC_MSG_NOTICE([skip check for pipe on msdosdjgpp])
  3311. ;;
  3312. esac
  3313. AC_CHECK_DECLS([getpwuid_r], [], [AC_DEFINE(HAVE_DECL_GETPWUID_R_MISSING, 1, "Set if getpwuid_r() declaration is missing")],
  3314. [[#include <pwd.h>
  3315. #include <sys/types.h>]])
  3316. AC_CHECK_FUNCS([\
  3317. _fseeki64 \
  3318. arc4random \
  3319. fnmatch \
  3320. fseeko \
  3321. geteuid \
  3322. getpass_r \
  3323. getppid \
  3324. getpwuid \
  3325. getpwuid_r \
  3326. getrlimit \
  3327. gettimeofday \
  3328. if_nametoindex \
  3329. mach_absolute_time \
  3330. pipe \
  3331. sched_yield \
  3332. sendmsg \
  3333. setlocale \
  3334. setmode \
  3335. setrlimit \
  3336. snprintf \
  3337. utime \
  3338. utimes \
  3339. ],[
  3340. ],[
  3341. func="$ac_func"
  3342. eval skipcheck=\$skipcheck_$func
  3343. if test "x$skipcheck" != "xyes"; then
  3344. AC_MSG_CHECKING([deeper for $func])
  3345. AC_LINK_IFELSE([
  3346. AC_LANG_PROGRAM([[
  3347. ]],[[
  3348. $func ();
  3349. ]])
  3350. ],[
  3351. AC_MSG_RESULT([yes])
  3352. eval "ac_cv_func_$func=yes"
  3353. AC_DEFINE_UNQUOTED(XC_SH_TR_CPP([HAVE_$func]), [1],
  3354. [Define to 1 if you have the $func function.])
  3355. ],[
  3356. AC_MSG_RESULT([but still no])
  3357. ])
  3358. fi
  3359. ])
  3360. dnl On Android, the only way to know if fseeko can be used is to see if it is
  3361. dnl declared or not (for this API level), as the symbol always exists in the
  3362. dnl lib.
  3363. AC_CHECK_DECL([fseeko],
  3364. [AC_DEFINE([HAVE_DECL_FSEEKO], [1],
  3365. [Define to 1 if you have the fseeko declaration])],
  3366. [],
  3367. [[#include <stdio.h>]])
  3368. CURL_CHECK_NONBLOCKING_SOCKET
  3369. dnl ************************************************************
  3370. dnl nroff tool stuff
  3371. dnl
  3372. AC_PATH_PROG( PERL, perl, ,
  3373. $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin )
  3374. AC_SUBST(PERL)
  3375. if test -z "$PERL"; then
  3376. dnl if perl was not found then disable building docs
  3377. AC_MSG_WARN([disabling documentation])
  3378. BUILD_DOCS=0
  3379. curl_docs_msg="no"
  3380. fi
  3381. dnl set variable for use in automakefile(s)
  3382. AM_CONDITIONAL(BUILD_DOCS, test x"$BUILD_DOCS" = x1)
  3383. AC_PATH_PROGS( NROFF, gnroff nroff, ,
  3384. $PATH:/usr/bin/:/usr/local/bin )
  3385. AC_SUBST(NROFF)
  3386. if test -n "$NROFF"; then
  3387. dnl only check for nroff options if an nroff command was found
  3388. AC_MSG_CHECKING([how to use *nroff to get plain text from man pages])
  3389. MANOPT="-man"
  3390. mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
  3391. if test -z "$mancheck"; then
  3392. MANOPT="-mandoc"
  3393. mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null`
  3394. if test -z "$mancheck"; then
  3395. MANOPT=""
  3396. AC_MSG_RESULT([failed])
  3397. AC_MSG_WARN([found no *nroff option to get plaintext from man pages])
  3398. else
  3399. AC_MSG_RESULT([$MANOPT])
  3400. fi
  3401. else
  3402. AC_MSG_RESULT([$MANOPT])
  3403. fi
  3404. AC_SUBST(MANOPT)
  3405. fi
  3406. if test -z "$MANOPT"
  3407. then
  3408. dnl if no nroff tool was found, or no option that could convert man pages
  3409. dnl was found, then disable the built-in manual stuff
  3410. AC_MSG_WARN([disabling built-in manual])
  3411. USE_MANUAL="no";
  3412. fi
  3413. dnl *************************************************************************
  3414. dnl If the manual variable still is set, then we go with providing a built-in
  3415. dnl manual
  3416. if test "$USE_MANUAL" = "1"; then
  3417. AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual])
  3418. curl_manual_msg="enabled"
  3419. fi
  3420. dnl set variable for use in automakefile(s)
  3421. AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1)
  3422. CURL_CHECK_LIB_ARES
  3423. if test "x$curl_cv_native_windows" != "xyes" &&
  3424. test "x$enable_shared" = "xyes"; then
  3425. build_libhostname=yes
  3426. else
  3427. build_libhostname=no
  3428. fi
  3429. AM_CONDITIONAL(BUILD_LIBHOSTNAME, test x$build_libhostname = xyes)
  3430. if test "x$want_ares" != xyes; then
  3431. CURL_CHECK_OPTION_THREADED_RESOLVER
  3432. fi
  3433. dnl ************************************************************
  3434. dnl disable POSIX threads
  3435. dnl
  3436. AC_MSG_CHECKING([whether to use POSIX threads for threaded resolver])
  3437. AC_ARG_ENABLE(pthreads,
  3438. AS_HELP_STRING([--enable-pthreads],
  3439. [Enable POSIX threads (default for threaded resolver)])
  3440. AS_HELP_STRING([--disable-pthreads],[Disable POSIX threads]),
  3441. [ case "$enableval" in
  3442. no) AC_MSG_RESULT(no)
  3443. want_pthreads=no
  3444. ;;
  3445. *) AC_MSG_RESULT(yes)
  3446. want_pthreads=yes
  3447. ;;
  3448. esac ], [
  3449. AC_MSG_RESULT(auto)
  3450. want_pthreads=auto
  3451. ]
  3452. )
  3453. dnl turn off pthreads if rt is disabled
  3454. if test "$want_pthreads" != "no"; then
  3455. if test "$want_pthreads" = "yes" && test "$dontwant_rt" = "yes"; then
  3456. AC_MSG_ERROR([options --enable-pthreads and --disable-rt are mutually exclusive])
  3457. fi
  3458. if test "$dontwant_rt" != "no"; then
  3459. dnl if --enable-pthreads was explicit then warn it's being ignored
  3460. if test "$want_pthreads" = "yes"; then
  3461. AC_MSG_WARN([--enable-pthreads Ignored since librt is disabled.])
  3462. fi
  3463. want_pthreads=no
  3464. fi
  3465. fi
  3466. dnl turn off pthreads if no threaded resolver
  3467. if test "$want_pthreads" != "no" && test "$want_thres" != "yes"; then
  3468. want_pthreads=no
  3469. fi
  3470. dnl detect pthreads
  3471. if test "$want_pthreads" != "no"; then
  3472. AC_CHECK_HEADER(pthread.h,
  3473. [ AC_DEFINE(HAVE_PTHREAD_H, 1, [if you have <pthread.h>])
  3474. save_CFLAGS="$CFLAGS"
  3475. dnl When statically linking against boringssl, -lpthread is added to LIBS.
  3476. dnl Make sure to that this does not pass the check below, we really want
  3477. dnl -pthread in CFLAGS as recommended for GCC. This also ensures that
  3478. dnl lib1541 and lib1565 tests are built with these options. Otherwise
  3479. dnl they fail the build since tests/libtest/Makefile.am clears LIBS.
  3480. save_LIBS="$LIBS"
  3481. LIBS=
  3482. dnl Check for libc variants without a separate pthread lib like bionic
  3483. AC_CHECK_FUNC(pthread_create, [USE_THREADS_POSIX=1] )
  3484. LIBS="$save_LIBS"
  3485. dnl on HPUX, life is more complicated...
  3486. case $host in
  3487. *-hp-hpux*)
  3488. dnl it doesn't actually work without -lpthread
  3489. USE_THREADS_POSIX=""
  3490. ;;
  3491. *)
  3492. ;;
  3493. esac
  3494. dnl if it wasn't found without lib, search for it in pthread lib
  3495. if test "$USE_THREADS_POSIX" != "1"
  3496. then
  3497. # assign PTHREAD for pkg-config use
  3498. PTHREAD=" -pthread"
  3499. case $host in
  3500. *-ibm-aix*)
  3501. dnl Check if compiler is xlC
  3502. COMPILER_VERSION=`"$CC" -qversion 2>/dev/null`
  3503. if test x"$COMPILER_VERSION" = "x"; then
  3504. CFLAGS="$CFLAGS -pthread"
  3505. else
  3506. CFLAGS="$CFLAGS -qthreaded"
  3507. fi
  3508. ;;
  3509. powerpc-*amigaos*)
  3510. dnl No -pthread option, but link with -lpthread
  3511. PTHREAD=" -lpthread"
  3512. ;;
  3513. *)
  3514. CFLAGS="$CFLAGS -pthread"
  3515. ;;
  3516. esac
  3517. AC_CHECK_LIB(pthread, pthread_create,
  3518. [USE_THREADS_POSIX=1],
  3519. [ CFLAGS="$save_CFLAGS"])
  3520. fi
  3521. if test "x$USE_THREADS_POSIX" = "x1"
  3522. then
  3523. AC_DEFINE(USE_THREADS_POSIX, 1, [if you want POSIX threaded DNS lookup])
  3524. curl_res_msg="POSIX threaded"
  3525. fi
  3526. ])
  3527. fi
  3528. dnl threaded resolver check
  3529. if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
  3530. if test "$want_pthreads" = "yes"; then
  3531. AC_MSG_ERROR([--enable-pthreads but pthreads was not found])
  3532. fi
  3533. dnl If native Windows fallback on Win32 threads since no POSIX threads
  3534. if test "$curl_cv_native_windows" = "yes"; then
  3535. USE_THREADS_WIN32=1
  3536. AC_DEFINE(USE_THREADS_WIN32, 1, [if you want Win32 threaded DNS lookup])
  3537. curl_res_msg="Win32 threaded"
  3538. else
  3539. AC_MSG_ERROR([Threaded resolver enabled but no thread library found])
  3540. fi
  3541. fi
  3542. CURL_CONVERT_INCLUDE_TO_ISYSTEM
  3543. dnl ************************************************************
  3544. dnl disable verbose text strings
  3545. dnl
  3546. AC_MSG_CHECKING([whether to enable verbose strings])
  3547. AC_ARG_ENABLE(verbose,
  3548. AS_HELP_STRING([--enable-verbose],[Enable verbose strings])
  3549. AS_HELP_STRING([--disable-verbose],[Disable verbose strings]),
  3550. [ case "$enableval" in
  3551. no)
  3552. AC_MSG_RESULT(no)
  3553. AC_DEFINE(CURL_DISABLE_VERBOSE_STRINGS, 1, [to disable verbose strings])
  3554. curl_verbose_msg="no"
  3555. ;;
  3556. *) AC_MSG_RESULT(yes)
  3557. ;;
  3558. esac ],
  3559. AC_MSG_RESULT(yes)
  3560. )
  3561. dnl ************************************************************
  3562. dnl enable SSPI support
  3563. dnl
  3564. AC_MSG_CHECKING([whether to enable SSPI support (Windows native builds only)])
  3565. AC_ARG_ENABLE(sspi,
  3566. AS_HELP_STRING([--enable-sspi],[Enable SSPI])
  3567. AS_HELP_STRING([--disable-sspi],[Disable SSPI]),
  3568. [ case "$enableval" in
  3569. yes)
  3570. if test "$curl_cv_native_windows" = "yes"; then
  3571. AC_MSG_RESULT(yes)
  3572. AC_DEFINE(USE_WINDOWS_SSPI, 1, [to enable SSPI support])
  3573. AC_SUBST(USE_WINDOWS_SSPI, [1])
  3574. curl_sspi_msg="enabled"
  3575. else
  3576. AC_MSG_RESULT(no)
  3577. AC_MSG_WARN([--enable-sspi Ignored. Only supported on native Windows builds.])
  3578. fi
  3579. ;;
  3580. *)
  3581. if test "x$SCHANNEL_ENABLED" = "x1"; then
  3582. # --with-schannel implies --enable-sspi
  3583. AC_MSG_RESULT(yes)
  3584. else
  3585. AC_MSG_RESULT(no)
  3586. fi
  3587. ;;
  3588. esac ],
  3589. if test "x$SCHANNEL_ENABLED" = "x1"; then
  3590. # --with-schannel implies --enable-sspi
  3591. AC_MSG_RESULT(yes)
  3592. else
  3593. AC_MSG_RESULT(no)
  3594. fi
  3595. )
  3596. dnl ************************************************************
  3597. dnl disable basic authentication
  3598. dnl
  3599. AC_MSG_CHECKING([whether to enable basic authentication method])
  3600. AC_ARG_ENABLE(basic-auth,
  3601. AS_HELP_STRING([--enable-basic-auth],[Enable basic authentication (default)])
  3602. AS_HELP_STRING([--disable-basic-auth],[Disable basic authentication]),
  3603. [ case "$enableval" in
  3604. no)
  3605. AC_MSG_RESULT(no)
  3606. AC_DEFINE(CURL_DISABLE_BASIC_AUTH, 1, [to disable basic authentication])
  3607. CURL_DISABLE_BASIC_AUTH=1
  3608. ;;
  3609. *) AC_MSG_RESULT(yes)
  3610. ;;
  3611. esac ],
  3612. AC_MSG_RESULT(yes)
  3613. )
  3614. dnl ************************************************************
  3615. dnl disable bearer authentication
  3616. dnl
  3617. AC_MSG_CHECKING([whether to enable bearer authentication method])
  3618. AC_ARG_ENABLE(bearer-auth,
  3619. AS_HELP_STRING([--enable-bearer-auth],[Enable bearer authentication (default)])
  3620. AS_HELP_STRING([--disable-bearer-auth],[Disable bearer authentication]),
  3621. [ case "$enableval" in
  3622. no)
  3623. AC_MSG_RESULT(no)
  3624. AC_DEFINE(CURL_DISABLE_BEARER_AUTH, 1, [to disable bearer authentication])
  3625. CURL_DISABLE_BEARER_AUTH=1
  3626. ;;
  3627. *) AC_MSG_RESULT(yes)
  3628. ;;
  3629. esac ],
  3630. AC_MSG_RESULT(yes)
  3631. )
  3632. dnl ************************************************************
  3633. dnl disable digest authentication
  3634. dnl
  3635. AC_MSG_CHECKING([whether to enable digest authentication method])
  3636. AC_ARG_ENABLE(digest-auth,
  3637. AS_HELP_STRING([--enable-digest-auth],[Enable digest authentication (default)])
  3638. AS_HELP_STRING([--disable-digest-auth],[Disable digest authentication]),
  3639. [ case "$enableval" in
  3640. no)
  3641. AC_MSG_RESULT(no)
  3642. AC_DEFINE(CURL_DISABLE_DIGEST_AUTH, 1, [to disable digest authentication])
  3643. CURL_DISABLE_DIGEST_AUTH=1
  3644. ;;
  3645. *) AC_MSG_RESULT(yes)
  3646. ;;
  3647. esac ],
  3648. AC_MSG_RESULT(yes)
  3649. )
  3650. dnl ************************************************************
  3651. dnl disable kerberos authentication
  3652. dnl
  3653. AC_MSG_CHECKING([whether to enable kerberos authentication method])
  3654. AC_ARG_ENABLE(kerberos-auth,
  3655. AS_HELP_STRING([--enable-kerberos-auth],[Enable kerberos authentication (default)])
  3656. AS_HELP_STRING([--disable-kerberos-auth],[Disable kerberos authentication]),
  3657. [ case "$enableval" in
  3658. no)
  3659. AC_MSG_RESULT(no)
  3660. AC_DEFINE(CURL_DISABLE_KERBEROS_AUTH, 1, [to disable kerberos authentication])
  3661. CURL_DISABLE_KERBEROS_AUTH=1
  3662. ;;
  3663. *) AC_MSG_RESULT(yes)
  3664. ;;
  3665. esac ],
  3666. AC_MSG_RESULT(yes)
  3667. )
  3668. dnl ************************************************************
  3669. dnl disable negotiate authentication
  3670. dnl
  3671. AC_MSG_CHECKING([whether to enable negotiate authentication method])
  3672. AC_ARG_ENABLE(negotiate-auth,
  3673. AS_HELP_STRING([--enable-negotiate-auth],[Enable negotiate authentication (default)])
  3674. AS_HELP_STRING([--disable-negotiate-auth],[Disable negotiate authentication]),
  3675. [ case "$enableval" in
  3676. no)
  3677. AC_MSG_RESULT(no)
  3678. AC_DEFINE(CURL_DISABLE_NEGOTIATE_AUTH, 1, [to disable negotiate authentication])
  3679. CURL_DISABLE_NEGOTIATE_AUTH=1
  3680. ;;
  3681. *) AC_MSG_RESULT(yes)
  3682. ;;
  3683. esac ],
  3684. AC_MSG_RESULT(yes)
  3685. )
  3686. dnl ************************************************************
  3687. dnl disable aws
  3688. dnl
  3689. AC_MSG_CHECKING([whether to enable aws sig methods])
  3690. AC_ARG_ENABLE(aws,
  3691. AS_HELP_STRING([--enable-aws],[Enable AWS sig support (default)])
  3692. AS_HELP_STRING([--disable-aws],[Disable AWS sig support]),
  3693. [ case "$enableval" in
  3694. no)
  3695. AC_MSG_RESULT(no)
  3696. AC_DEFINE(CURL_DISABLE_AWS, 1, [to disable AWS sig support])
  3697. CURL_DISABLE_AWS=1
  3698. ;;
  3699. *) AC_MSG_RESULT(yes)
  3700. ;;
  3701. esac ],
  3702. AC_MSG_RESULT(yes)
  3703. )
  3704. dnl ************************************************************
  3705. dnl disable NTLM support
  3706. dnl
  3707. AC_MSG_CHECKING([whether to support NTLM])
  3708. AC_ARG_ENABLE(ntlm,
  3709. AS_HELP_STRING([--enable-ntlm],[Enable NTLM support])
  3710. AS_HELP_STRING([--disable-ntlm],[Disable NTLM support]),
  3711. [ case "$enableval" in
  3712. no)
  3713. AC_MSG_RESULT(no)
  3714. AC_DEFINE(CURL_DISABLE_NTLM, 1, [to disable NTLM support])
  3715. CURL_DISABLE_NTLM=1
  3716. ;;
  3717. *) AC_MSG_RESULT(yes)
  3718. ;;
  3719. esac ],
  3720. AC_MSG_RESULT(yes)
  3721. )
  3722. CURL_CHECK_OPTION_NTLM_WB
  3723. CURL_CHECK_NTLM_WB
  3724. dnl ************************************************************
  3725. dnl disable TLS-SRP authentication
  3726. dnl
  3727. AC_MSG_CHECKING([whether to enable TLS-SRP authentication])
  3728. AC_ARG_ENABLE(tls-srp,
  3729. AS_HELP_STRING([--enable-tls-srp],[Enable TLS-SRP authentication])
  3730. AS_HELP_STRING([--disable-tls-srp],[Disable TLS-SRP authentication]),
  3731. [ case "$enableval" in
  3732. no)
  3733. AC_MSG_RESULT(no)
  3734. want_tls_srp=no
  3735. ;;
  3736. *) AC_MSG_RESULT(yes)
  3737. want_tls_srp=yes
  3738. ;;
  3739. esac ],
  3740. AC_MSG_RESULT(yes)
  3741. want_tls_srp=yes
  3742. )
  3743. if test "$want_tls_srp" = "yes" && ( test "x$HAVE_GNUTLS_SRP" = "x1" || test "x$HAVE_OPENSSL_SRP" = "x1") ; then
  3744. AC_DEFINE(USE_TLS_SRP, 1, [Use TLS-SRP authentication])
  3745. USE_TLS_SRP=1
  3746. curl_tls_srp_msg="enabled"
  3747. fi
  3748. dnl ************************************************************
  3749. dnl disable Unix domain sockets support
  3750. dnl
  3751. AC_MSG_CHECKING([whether to enable Unix domain sockets])
  3752. AC_ARG_ENABLE(unix-sockets,
  3753. AS_HELP_STRING([--enable-unix-sockets],[Enable Unix domain sockets])
  3754. AS_HELP_STRING([--disable-unix-sockets],[Disable Unix domain sockets]),
  3755. [ case "$enableval" in
  3756. no) AC_MSG_RESULT(no)
  3757. want_unix_sockets=no
  3758. ;;
  3759. *) AC_MSG_RESULT(yes)
  3760. want_unix_sockets=yes
  3761. ;;
  3762. esac ], [
  3763. AC_MSG_RESULT(auto)
  3764. want_unix_sockets=auto
  3765. ]
  3766. )
  3767. if test "x$want_unix_sockets" != "xno"; then
  3768. if test "x$curl_cv_native_windows" = "xyes"; then
  3769. USE_UNIX_SOCKETS=1
  3770. AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
  3771. curl_unix_sockets_msg="enabled"
  3772. else
  3773. AC_CHECK_MEMBER([struct sockaddr_un.sun_path], [
  3774. AC_DEFINE(USE_UNIX_SOCKETS, 1, [Use Unix domain sockets])
  3775. AC_SUBST(USE_UNIX_SOCKETS, [1])
  3776. curl_unix_sockets_msg="enabled"
  3777. ], [
  3778. if test "x$want_unix_sockets" = "xyes"; then
  3779. AC_MSG_ERROR([--enable-unix-sockets is not available on this platform!])
  3780. fi
  3781. ], [
  3782. #include <sys/un.h>
  3783. ])
  3784. fi
  3785. fi
  3786. dnl ************************************************************
  3787. dnl disable cookies support
  3788. dnl
  3789. AC_MSG_CHECKING([whether to support cookies])
  3790. AC_ARG_ENABLE(cookies,
  3791. AS_HELP_STRING([--enable-cookies],[Enable cookies support])
  3792. AS_HELP_STRING([--disable-cookies],[Disable cookies support]),
  3793. [ case "$enableval" in
  3794. no)
  3795. AC_MSG_RESULT(no)
  3796. AC_DEFINE(CURL_DISABLE_COOKIES, 1, [to disable cookies support])
  3797. ;;
  3798. *) AC_MSG_RESULT(yes)
  3799. ;;
  3800. esac ],
  3801. AC_MSG_RESULT(yes)
  3802. )
  3803. dnl ************************************************************
  3804. dnl disable socketpair
  3805. dnl
  3806. AC_MSG_CHECKING([whether to support socketpair])
  3807. AC_ARG_ENABLE(socketpair,
  3808. AS_HELP_STRING([--enable-socketpair],[Enable socketpair support])
  3809. AS_HELP_STRING([--disable-socketpair],[Disable socketpair support]),
  3810. [ case "$enableval" in
  3811. no)
  3812. AC_MSG_RESULT(no)
  3813. AC_DEFINE(CURL_DISABLE_SOCKETPAIR, 1, [to disable socketpair support])
  3814. ;;
  3815. *) AC_MSG_RESULT(yes)
  3816. ;;
  3817. esac ],
  3818. AC_MSG_RESULT(yes)
  3819. )
  3820. dnl ************************************************************
  3821. dnl disable HTTP authentication support
  3822. dnl
  3823. AC_MSG_CHECKING([whether to support HTTP authentication])
  3824. AC_ARG_ENABLE(http-auth,
  3825. AS_HELP_STRING([--enable-http-auth],[Enable HTTP authentication support])
  3826. AS_HELP_STRING([--disable-http-auth],[Disable HTTP authentication support]),
  3827. [ case "$enableval" in
  3828. no)
  3829. AC_MSG_RESULT(no)
  3830. AC_DEFINE(CURL_DISABLE_HTTP_AUTH, 1, [disable HTTP authentication])
  3831. ;;
  3832. *) AC_MSG_RESULT(yes)
  3833. ;;
  3834. esac ],
  3835. AC_MSG_RESULT(yes)
  3836. )
  3837. dnl ************************************************************
  3838. dnl disable DoH support
  3839. dnl
  3840. AC_MSG_CHECKING([whether to support DoH])
  3841. AC_ARG_ENABLE(doh,
  3842. AS_HELP_STRING([--enable-doh],[Enable DoH support])
  3843. AS_HELP_STRING([--disable-doh],[Disable DoH support]),
  3844. [ case "$enableval" in
  3845. no)
  3846. AC_MSG_RESULT(no)
  3847. AC_DEFINE(CURL_DISABLE_DOH, 1, [disable DoH])
  3848. ;;
  3849. *) AC_MSG_RESULT(yes)
  3850. ;;
  3851. esac ],
  3852. AC_MSG_RESULT(yes)
  3853. )
  3854. dnl ************************************************************
  3855. dnl disable mime API support
  3856. dnl
  3857. AC_MSG_CHECKING([whether to support the MIME API])
  3858. AC_ARG_ENABLE(mime,
  3859. AS_HELP_STRING([--enable-mime],[Enable mime API support])
  3860. AS_HELP_STRING([--disable-mime],[Disable mime API support]),
  3861. [ case "$enableval" in
  3862. no)
  3863. AC_MSG_RESULT(no)
  3864. AC_DEFINE(CURL_DISABLE_MIME, 1, [disable mime API])
  3865. ;;
  3866. *) AC_MSG_RESULT(yes)
  3867. ;;
  3868. esac ],
  3869. AC_MSG_RESULT(yes)
  3870. )
  3871. dnl ************************************************************
  3872. dnl disable bindlocal
  3873. dnl
  3874. AC_MSG_CHECKING([whether to support binding connections locally])
  3875. AC_ARG_ENABLE(bindlocal,
  3876. AS_HELP_STRING([--enable-bindlocal],[Enable local binding support])
  3877. AS_HELP_STRING([--disable-bindlocal],[Disable local binding support]),
  3878. [ case "$enableval" in
  3879. no)
  3880. AC_MSG_RESULT(no)
  3881. AC_DEFINE(CURL_DISABLE_BINDLOCAL, 1, [disable local binding support])
  3882. ;;
  3883. *) AC_MSG_RESULT(yes)
  3884. ;;
  3885. esac ],
  3886. AC_MSG_RESULT(yes)
  3887. )
  3888. dnl ************************************************************
  3889. dnl disable form API support
  3890. dnl
  3891. AC_MSG_CHECKING([whether to support the form API])
  3892. AC_ARG_ENABLE(form-api,
  3893. AS_HELP_STRING([--enable-form-api],[Enable form API support])
  3894. AS_HELP_STRING([--disable-form-api],[Disable form API support]),
  3895. [ case "$enableval" in
  3896. no) AC_MSG_RESULT(no)
  3897. AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
  3898. ;;
  3899. *) AC_MSG_RESULT(yes)
  3900. test "$enable_mime" = no &&
  3901. AC_MSG_ERROR(MIME support needs to be enabled in order to enable form API support)
  3902. ;;
  3903. esac ],
  3904. [
  3905. if test "$enable_mime" = no; then
  3906. enable_form_api=no
  3907. AC_MSG_RESULT(no)
  3908. AC_DEFINE(CURL_DISABLE_FORM_API, 1, [disable form API])
  3909. else
  3910. AC_MSG_RESULT(yes)
  3911. fi ]
  3912. )
  3913. dnl ************************************************************
  3914. dnl disable date parsing
  3915. dnl
  3916. AC_MSG_CHECKING([whether to support date parsing])
  3917. AC_ARG_ENABLE(dateparse,
  3918. AS_HELP_STRING([--enable-dateparse],[Enable date parsing])
  3919. AS_HELP_STRING([--disable-dateparse],[Disable date parsing]),
  3920. [ case "$enableval" in
  3921. no)
  3922. AC_MSG_RESULT(no)
  3923. AC_DEFINE(CURL_DISABLE_PARSEDATE, 1, [disable date parsing])
  3924. ;;
  3925. *) AC_MSG_RESULT(yes)
  3926. ;;
  3927. esac ],
  3928. AC_MSG_RESULT(yes)
  3929. )
  3930. dnl ************************************************************
  3931. dnl disable netrc
  3932. dnl
  3933. AC_MSG_CHECKING([whether to support netrc parsing])
  3934. AC_ARG_ENABLE(netrc,
  3935. AS_HELP_STRING([--enable-netrc],[Enable netrc parsing])
  3936. AS_HELP_STRING([--disable-netrc],[Disable netrc parsing]),
  3937. [ case "$enableval" in
  3938. no)
  3939. AC_MSG_RESULT(no)
  3940. AC_DEFINE(CURL_DISABLE_NETRC, 1, [disable netrc parsing])
  3941. ;;
  3942. *) AC_MSG_RESULT(yes)
  3943. ;;
  3944. esac ],
  3945. AC_MSG_RESULT(yes)
  3946. )
  3947. dnl ************************************************************
  3948. dnl disable progress-meter
  3949. dnl
  3950. AC_MSG_CHECKING([whether to support progress-meter])
  3951. AC_ARG_ENABLE(progress-meter,
  3952. AS_HELP_STRING([--enable-progress-meter],[Enable progress-meter])
  3953. AS_HELP_STRING([--disable-progress-meter],[Disable progress-meter]),
  3954. [ case "$enableval" in
  3955. no)
  3956. AC_MSG_RESULT(no)
  3957. AC_DEFINE(CURL_DISABLE_PROGRESS_METER, 1, [disable progress-meter])
  3958. ;;
  3959. *) AC_MSG_RESULT(yes)
  3960. ;;
  3961. esac ],
  3962. AC_MSG_RESULT(yes)
  3963. )
  3964. dnl ************************************************************
  3965. dnl disable shuffle DNS support
  3966. dnl
  3967. AC_MSG_CHECKING([whether to support DNS shuffling])
  3968. AC_ARG_ENABLE(dnsshuffle,
  3969. AS_HELP_STRING([--enable-dnsshuffle],[Enable DNS shuffling])
  3970. AS_HELP_STRING([--disable-dnsshuffle],[Disable DNS shuffling]),
  3971. [ case "$enableval" in
  3972. no)
  3973. AC_MSG_RESULT(no)
  3974. AC_DEFINE(CURL_DISABLE_SHUFFLE_DNS, 1, [disable DNS shuffling])
  3975. ;;
  3976. *) AC_MSG_RESULT(yes)
  3977. ;;
  3978. esac ],
  3979. AC_MSG_RESULT(yes)
  3980. )
  3981. dnl ************************************************************
  3982. dnl disable the curl_easy_options API
  3983. dnl
  3984. AC_MSG_CHECKING([whether to support curl_easy_option*])
  3985. AC_ARG_ENABLE(get-easy-options,
  3986. AS_HELP_STRING([--enable-get-easy-options],[Enable curl_easy_options])
  3987. AS_HELP_STRING([--disable-get-easy-options],[Disable curl_easy_options]),
  3988. [ case "$enableval" in
  3989. no)
  3990. AC_MSG_RESULT(no)
  3991. AC_DEFINE(CURL_DISABLE_GETOPTIONS, 1, [to disable curl_easy_options])
  3992. ;;
  3993. *) AC_MSG_RESULT(yes)
  3994. ;;
  3995. esac ],
  3996. AC_MSG_RESULT(yes)
  3997. )
  3998. dnl ************************************************************
  3999. dnl switch on/off alt-svc
  4000. dnl
  4001. AC_MSG_CHECKING([whether to support alt-svc])
  4002. AC_ARG_ENABLE(alt-svc,
  4003. AS_HELP_STRING([--enable-alt-svc],[Enable alt-svc support])
  4004. AS_HELP_STRING([--disable-alt-svc],[Disable alt-svc support]),
  4005. [ case "$enableval" in
  4006. no)
  4007. AC_MSG_RESULT(no)
  4008. AC_DEFINE(CURL_DISABLE_ALTSVC, 1, [disable alt-svc])
  4009. curl_altsvc_msg="no";
  4010. enable_altsvc="no"
  4011. ;;
  4012. *) AC_MSG_RESULT(yes)
  4013. ;;
  4014. esac ],
  4015. AC_MSG_RESULT(yes)
  4016. )
  4017. dnl ************************************************************
  4018. dnl switch on/off headers-api
  4019. dnl
  4020. AC_MSG_CHECKING([whether to support headers-api])
  4021. AC_ARG_ENABLE(headers-api,
  4022. AS_HELP_STRING([--enable-headers-api],[Enable headers-api support])
  4023. AS_HELP_STRING([--disable-headers-api],[Disable headers-api support]),
  4024. [ case "$enableval" in
  4025. no) AC_MSG_RESULT(no)
  4026. curl_headers_msg="no (--enable-headers-api)"
  4027. AC_DEFINE(CURL_DISABLE_HEADERS_API, 1, [disable headers-api])
  4028. ;;
  4029. *)
  4030. AC_MSG_RESULT(yes)
  4031. ;;
  4032. esac ],
  4033. AC_MSG_RESULT(yes)
  4034. )
  4035. dnl only check for HSTS if there's SSL present
  4036. if test -n "$SSL_ENABLED"; then
  4037. dnl ************************************************************
  4038. dnl switch on/off hsts
  4039. dnl
  4040. AC_MSG_CHECKING([whether to support HSTS])
  4041. AC_ARG_ENABLE(hsts,
  4042. AS_HELP_STRING([--enable-hsts],[Enable HSTS support])
  4043. AS_HELP_STRING([--disable-hsts],[Disable HSTS support]),
  4044. [ case "$enableval" in
  4045. no)
  4046. AC_MSG_RESULT(no)
  4047. hsts="no"
  4048. ;;
  4049. *) AC_MSG_RESULT(yes)
  4050. ;;
  4051. esac ],
  4052. AC_MSG_RESULT($hsts)
  4053. )
  4054. else
  4055. AC_MSG_NOTICE([disables HSTS due to lack of SSL])
  4056. hsts="no"
  4057. fi
  4058. if test "x$hsts" != "xyes"; then
  4059. curl_hsts_msg="no (--enable-hsts)";
  4060. AC_DEFINE(CURL_DISABLE_HSTS, 1, [disable alt-svc])
  4061. fi
  4062. dnl *************************************************************
  4063. dnl check whether ECH support, if desired, is actually available
  4064. dnl
  4065. if test "x$want_ech" != "xno"; then
  4066. AC_MSG_CHECKING([whether ECH support is available])
  4067. dnl assume NOT and look for sufficient condition
  4068. ECH_ENABLED=0
  4069. ECH_SUPPORT=''
  4070. dnl OpenSSL with a chosen ECH function should be enough
  4071. dnl so more exhaustive checking seems unnecessary for now
  4072. if test "x$OPENSSL_ENABLED" = "x1"; then
  4073. AC_CHECK_FUNCS(SSL_get_ech_status,
  4074. ECH_SUPPORT="ECH support available (OpenSSL with SSL_get_ech_status)"
  4075. ECH_ENABLED=1)
  4076. dnl add 'elif' chain here for additional implementations
  4077. fi
  4078. dnl now deal with whatever we found
  4079. if test "x$ECH_ENABLED" = "x1"; then
  4080. AC_DEFINE(USE_ECH, 1, [if ECH support is available])
  4081. AC_MSG_RESULT($ECH_SUPPORT)
  4082. experimental="$experimental ECH"
  4083. else
  4084. AC_MSG_ERROR([--enable-ech ignored: No ECH support found])
  4085. fi
  4086. fi
  4087. dnl *************************************************************
  4088. dnl check whether OpenSSL (lookalikes) have SSL_set0_wbio
  4089. dnl
  4090. if test "x$OPENSSL_ENABLED" = "x1"; then
  4091. AC_CHECK_FUNCS([SSL_set0_wbio])
  4092. fi
  4093. dnl *************************************************************
  4094. dnl WebSockets
  4095. dnl
  4096. AC_MSG_CHECKING([whether to support WebSockets])
  4097. AC_ARG_ENABLE(websockets,
  4098. AS_HELP_STRING([--enable-websockets],[Enable WebSockets support])
  4099. AS_HELP_STRING([--disable-websockets],[Disable WebSockets support]),
  4100. [ case "$enableval" in
  4101. no)
  4102. AC_MSG_RESULT(no)
  4103. ;;
  4104. *)
  4105. if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
  4106. AC_MSG_RESULT(yes)
  4107. curl_ws_msg="enabled"
  4108. AC_DEFINE_UNQUOTED(USE_WEBSOCKETS, [1], [enable websockets support])
  4109. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WS"
  4110. if test "x$SSL_ENABLED" = "x1"; then
  4111. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS WSS"
  4112. fi
  4113. experimental="$experimental Websockets"
  4114. else
  4115. dnl websockets requires >32 bit curl_off_t
  4116. AC_MSG_RESULT(no)
  4117. AC_MSG_WARN([Websockets disabled due to lack of >32 bit curl_off_t])
  4118. fi
  4119. ;;
  4120. esac ],
  4121. AC_MSG_RESULT(no)
  4122. )
  4123. dnl ************************************************************
  4124. dnl hiding of library internal symbols
  4125. dnl
  4126. CURL_CONFIGURE_SYMBOL_HIDING
  4127. dnl
  4128. dnl All the library dependencies put into $LIB apply to libcurl only.
  4129. dnl
  4130. LIBCURL_LIBS="$LIBS$PTHREAD"
  4131. AC_SUBST(LIBCURL_LIBS)
  4132. AC_SUBST(CURL_NETWORK_LIBS)
  4133. AC_SUBST(CURL_NETWORK_AND_TIME_LIBS)
  4134. dnl BLANK_AT_MAKETIME may be used in our Makefile.am files to blank
  4135. dnl LIBS variable used in generated makefile at makefile processing
  4136. dnl time. Doing this functionally prevents LIBS from being used for
  4137. dnl all link targets in given makefile.
  4138. BLANK_AT_MAKETIME=
  4139. AC_SUBST(BLANK_AT_MAKETIME)
  4140. AM_CONDITIONAL(CROSSCOMPILING, test x$cross_compiling = xyes)
  4141. dnl yes or no
  4142. ENABLE_SHARED="$enable_shared"
  4143. AC_SUBST(ENABLE_SHARED)
  4144. dnl to let curl-config output the static libraries correctly
  4145. ENABLE_STATIC="$enable_static"
  4146. AC_SUBST(ENABLE_STATIC)
  4147. dnl merge the pkg-config Libs.private field into Libs when static-only
  4148. if test "x$enable_shared" = "xno"; then
  4149. LIBCURL_NO_SHARED=$LIBCURL_LIBS
  4150. else
  4151. LIBCURL_NO_SHARED=
  4152. fi
  4153. AC_SUBST(LIBCURL_NO_SHARED)
  4154. rm $compilersh
  4155. dnl
  4156. dnl For keeping supported features and protocols also in pkg-config file
  4157. dnl since it is more cross-compile friendly than curl-config
  4158. dnl
  4159. if test "x$OPENSSL_ENABLED" = "x1"; then
  4160. SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
  4161. elif test -n "$SSL_ENABLED"; then
  4162. SUPPORT_FEATURES="$SUPPORT_FEATURES SSL"
  4163. fi
  4164. if test "x$IPV6_ENABLED" = "x1"; then
  4165. SUPPORT_FEATURES="$SUPPORT_FEATURES IPv6"
  4166. fi
  4167. if test "x$USE_UNIX_SOCKETS" = "x1"; then
  4168. SUPPORT_FEATURES="$SUPPORT_FEATURES UnixSockets"
  4169. fi
  4170. if test "x$HAVE_LIBZ" = "x1"; then
  4171. SUPPORT_FEATURES="$SUPPORT_FEATURES libz"
  4172. fi
  4173. if test "x$HAVE_BROTLI" = "x1"; then
  4174. SUPPORT_FEATURES="$SUPPORT_FEATURES brotli"
  4175. fi
  4176. if test "x$HAVE_ZSTD" = "x1"; then
  4177. SUPPORT_FEATURES="$SUPPORT_FEATURES zstd"
  4178. fi
  4179. if test "x$USE_ARES" = "x1" -o "x$USE_THREADS_POSIX" = "x1" \
  4180. -o "x$USE_THREADS_WIN32" = "x1"; then
  4181. SUPPORT_FEATURES="$SUPPORT_FEATURES AsynchDNS"
  4182. fi
  4183. if test "x$IDN_ENABLED" = "x1"; then
  4184. SUPPORT_FEATURES="$SUPPORT_FEATURES IDN"
  4185. fi
  4186. if test "x$USE_WINDOWS_SSPI" = "x1"; then
  4187. SUPPORT_FEATURES="$SUPPORT_FEATURES SSPI"
  4188. fi
  4189. if test "x$HAVE_GSSAPI" = "x1"; then
  4190. SUPPORT_FEATURES="$SUPPORT_FEATURES GSS-API"
  4191. fi
  4192. if test "x$curl_psl_msg" = "xenabled"; then
  4193. SUPPORT_FEATURES="$SUPPORT_FEATURES PSL"
  4194. fi
  4195. if test "x$curl_gsasl_msg" = "xenabled"; then
  4196. SUPPORT_FEATURES="$SUPPORT_FEATURES GSASL"
  4197. fi
  4198. if test "x$enable_altsvc" = "xyes"; then
  4199. SUPPORT_FEATURES="$SUPPORT_FEATURES alt-svc"
  4200. fi
  4201. if test "x$hsts" = "xyes"; then
  4202. SUPPORT_FEATURES="$SUPPORT_FEATURES HSTS"
  4203. fi
  4204. if test "x$CURL_DISABLE_NEGOTIATE_AUTH" != "x1" -a \
  4205. \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
  4206. SUPPORT_FEATURES="$SUPPORT_FEATURES SPNEGO"
  4207. fi
  4208. if test "x$CURL_DISABLE_KERBEROS_AUTH" != "x1" -a \
  4209. \( "x$HAVE_GSSAPI" = "x1" -o "x$USE_WINDOWS_SSPI" = "x1" \); then
  4210. SUPPORT_FEATURES="$SUPPORT_FEATURES Kerberos"
  4211. fi
  4212. use_curl_ntlm_core=no
  4213. if test "x$CURL_DISABLE_NTLM" != "x1"; then
  4214. if test "x$OPENSSL_ENABLED" = "x1" -o "x$MBEDTLS_ENABLED" = "x1" \
  4215. -o "x$GNUTLS_ENABLED" = "x1" \
  4216. -o "x$SECURETRANSPORT_ENABLED" = "x1" \
  4217. -o "x$USE_WIN32_CRYPTO" = "x1" \
  4218. -o "x$WOLFSSL_NTLM" = "x1"; then
  4219. use_curl_ntlm_core=yes
  4220. fi
  4221. if test "x$use_curl_ntlm_core" = "xyes" \
  4222. -o "x$USE_WINDOWS_SSPI" = "x1"; then
  4223. SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM"
  4224. if test "x$CURL_DISABLE_HTTP" != "x1" -a \
  4225. "x$NTLM_WB_ENABLED" = "x1"; then
  4226. SUPPORT_FEATURES="$SUPPORT_FEATURES NTLM_WB"
  4227. fi
  4228. fi
  4229. fi
  4230. if test "x$USE_TLS_SRP" = "x1"; then
  4231. SUPPORT_FEATURES="$SUPPORT_FEATURES TLS-SRP"
  4232. fi
  4233. if test "x$USE_NGHTTP2" = "x1"; then
  4234. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP2"
  4235. fi
  4236. if test "x$USE_NGTCP2_H3" = "x1" -o "x$USE_QUICHE" = "x1" \
  4237. -o "x$USE_OPENSSL_H3" = "x1" -o "x$USE_MSH3" = "x1"; then
  4238. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  4239. AC_MSG_ERROR([MultiSSL cannot be enabled with HTTP/3 and vice versa])
  4240. fi
  4241. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTP3"
  4242. fi
  4243. if test "x$CURL_WITH_MULTI_SSL" = "x1"; then
  4244. SUPPORT_FEATURES="$SUPPORT_FEATURES MultiSSL"
  4245. fi
  4246. AC_MSG_CHECKING([if this build supports HTTPS-proxy])
  4247. dnl if not explicitly turned off, HTTPS-proxy comes with some TLS backends
  4248. if test "x$CURL_DISABLE_HTTP" != "x1"; then
  4249. if test "x$https_proxy" != "xno"; then
  4250. if test "x$OPENSSL_ENABLED" = "x1" \
  4251. -o "x$GNUTLS_ENABLED" = "x1" \
  4252. -o "x$SECURETRANSPORT_ENABLED" = "x1" \
  4253. -o "x$RUSTLS_ENABLED" = "x1" \
  4254. -o "x$BEARSSL_ENABLED" = "x1" \
  4255. -o "x$SCHANNEL_ENABLED" = "x1" \
  4256. -o "x$GNUTLS_ENABLED" = "x1" \
  4257. -o "x$MBEDTLS_ENABLED" = "x1"; then
  4258. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
  4259. AC_MSG_RESULT([yes])
  4260. elif test "x$WOLFSSL_ENABLED" = "x1" -a "x$WOLFSSL_FULL_BIO" = "x1"; then
  4261. SUPPORT_FEATURES="$SUPPORT_FEATURES HTTPS-proxy"
  4262. AC_MSG_RESULT([yes])
  4263. else
  4264. AC_MSG_RESULT([no])
  4265. fi
  4266. else
  4267. AC_MSG_RESULT([no])
  4268. fi
  4269. else
  4270. AC_MSG_RESULT([no])
  4271. fi
  4272. if test "x$ECH_ENABLED" = "x1"; then
  4273. SUPPORT_FEATURES="$SUPPORT_FEATURES ECH"
  4274. fi
  4275. if test ${ac_cv_sizeof_curl_off_t} -gt 4; then
  4276. if test ${ac_cv_sizeof_off_t} -gt 4 -o \
  4277. "$curl_win32_file_api" = "win32_large_files"; then
  4278. SUPPORT_FEATURES="$SUPPORT_FEATURES Largefile"
  4279. fi
  4280. fi
  4281. if test "$tst_atomic" = "yes"; then
  4282. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4283. elif test "x$USE_THREADS_POSIX" = "x1" -a \
  4284. "x$ac_cv_header_pthread_h" = "xyes"; then
  4285. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4286. else
  4287. AC_COMPILE_IFELSE([
  4288. AC_LANG_PROGRAM([[
  4289. #include <windows.h>
  4290. ]],[[
  4291. #if (WINVER < 0x600) && (_WIN32_WINNT < 0x600)
  4292. #error
  4293. #endif
  4294. ]])
  4295. ],[
  4296. SUPPORT_FEATURES="$SUPPORT_FEATURES threadsafe"
  4297. ],[
  4298. ])
  4299. fi
  4300. dnl replace spaces with newlines
  4301. dnl sort the lines
  4302. dnl replace the newlines back to spaces
  4303. SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
  4304. AC_SUBST(SUPPORT_FEATURES)
  4305. dnl For supported protocols in pkg-config file
  4306. if test "x$CURL_DISABLE_HTTP" != "x1"; then
  4307. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTP IPFS IPNS"
  4308. if test "x$SSL_ENABLED" = "x1"; then
  4309. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS HTTPS"
  4310. fi
  4311. fi
  4312. if test "x$CURL_DISABLE_FTP" != "x1"; then
  4313. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTP"
  4314. if test "x$SSL_ENABLED" = "x1"; then
  4315. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FTPS"
  4316. fi
  4317. fi
  4318. if test "x$CURL_DISABLE_FILE" != "x1"; then
  4319. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS FILE"
  4320. fi
  4321. if test "x$CURL_DISABLE_TELNET" != "x1"; then
  4322. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TELNET"
  4323. fi
  4324. if test "x$CURL_DISABLE_LDAP" != "x1"; then
  4325. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAP"
  4326. if test "x$CURL_DISABLE_LDAPS" != "x1"; then
  4327. if (test "x$USE_OPENLDAP" = "x1" && test "x$SSL_ENABLED" = "x1") ||
  4328. (test "x$USE_OPENLDAP" != "x1" && test "x$HAVE_LDAP_SSL" = "x1"); then
  4329. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS LDAPS"
  4330. fi
  4331. fi
  4332. fi
  4333. if test "x$CURL_DISABLE_DICT" != "x1"; then
  4334. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS DICT"
  4335. fi
  4336. if test "x$CURL_DISABLE_TFTP" != "x1"; then
  4337. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS TFTP"
  4338. fi
  4339. if test "x$CURL_DISABLE_GOPHER" != "x1"; then
  4340. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHER"
  4341. if test "x$SSL_ENABLED" = "x1"; then
  4342. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS GOPHERS"
  4343. fi
  4344. fi
  4345. if test "x$CURL_DISABLE_MQTT" != "x1"; then
  4346. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS MQTT"
  4347. fi
  4348. if test "x$CURL_DISABLE_POP3" != "x1"; then
  4349. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3"
  4350. if test "x$SSL_ENABLED" = "x1"; then
  4351. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS POP3S"
  4352. fi
  4353. fi
  4354. if test "x$CURL_DISABLE_IMAP" != "x1"; then
  4355. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAP"
  4356. if test "x$SSL_ENABLED" = "x1"; then
  4357. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS IMAPS"
  4358. fi
  4359. fi
  4360. if test "x$CURL_DISABLE_SMB" != "x1" \
  4361. -a "x$use_curl_ntlm_core" = "xyes"; then
  4362. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMB"
  4363. if test "x$SSL_ENABLED" = "x1"; then
  4364. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMBS"
  4365. fi
  4366. fi
  4367. if test "x$CURL_DISABLE_SMTP" != "x1"; then
  4368. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTP"
  4369. if test "x$SSL_ENABLED" = "x1"; then
  4370. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SMTPS"
  4371. fi
  4372. fi
  4373. if test "x$USE_LIBSSH2" = "x1"; then
  4374. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
  4375. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4376. fi
  4377. if test "x$USE_LIBSSH" = "x1"; then
  4378. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SCP"
  4379. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4380. fi
  4381. if test "x$USE_WOLFSSH" = "x1"; then
  4382. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS SFTP"
  4383. fi
  4384. if test "x$CURL_DISABLE_RTSP" != "x1"; then
  4385. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTSP"
  4386. fi
  4387. if test "x$USE_LIBRTMP" = "x1"; then
  4388. SUPPORT_PROTOCOLS="$SUPPORT_PROTOCOLS RTMP"
  4389. fi
  4390. dnl replace spaces with newlines
  4391. dnl sort the lines
  4392. dnl replace the newlines back to spaces
  4393. SUPPORT_PROTOCOLS=`echo $SUPPORT_PROTOCOLS | tr ' ' '\012' | sort | tr '\012' ' '`
  4394. AC_SUBST(SUPPORT_PROTOCOLS)
  4395. dnl squeeze whitespace out of some variables
  4396. squeeze CFLAGS
  4397. squeeze CPPFLAGS
  4398. squeeze DEFS
  4399. squeeze LDFLAGS
  4400. squeeze LIBS
  4401. squeeze LIBCURL_LIBS
  4402. squeeze CURL_NETWORK_LIBS
  4403. squeeze CURL_NETWORK_AND_TIME_LIBS
  4404. squeeze SUPPORT_FEATURES
  4405. squeeze SUPPORT_PROTOCOLS
  4406. XC_CHECK_BUILD_FLAGS
  4407. SSL_BACKENDS=${ssl_backends}
  4408. AC_SUBST(SSL_BACKENDS)
  4409. if test "x$want_curldebug_assumed" = "xyes" &&
  4410. test "x$want_curldebug" = "xyes" && test "x$USE_ARES" = "x1"; then
  4411. ac_configure_args="$ac_configure_args --enable-curldebug"
  4412. fi
  4413. AC_CONFIG_FILES([Makefile \
  4414. docs/Makefile \
  4415. docs/examples/Makefile \
  4416. docs/libcurl/Makefile \
  4417. docs/libcurl/opts/Makefile \
  4418. docs/cmdline-opts/Makefile \
  4419. include/Makefile \
  4420. include/curl/Makefile \
  4421. src/Makefile \
  4422. lib/Makefile \
  4423. scripts/Makefile \
  4424. lib/libcurl.vers \
  4425. lib/libcurl.plist \
  4426. tests/Makefile \
  4427. tests/config \
  4428. tests/certs/Makefile \
  4429. tests/certs/scripts/Makefile \
  4430. tests/data/Makefile \
  4431. tests/server/Makefile \
  4432. tests/libtest/Makefile \
  4433. tests/unit/Makefile \
  4434. tests/http/config.ini \
  4435. tests/http/Makefile \
  4436. tests/http/clients/Makefile \
  4437. packages/Makefile \
  4438. packages/vms/Makefile \
  4439. curl-config \
  4440. libcurl.pc
  4441. ])
  4442. AC_OUTPUT
  4443. CURL_GENERATE_CONFIGUREHELP_PM
  4444. AC_MSG_NOTICE([Configured to build curl/libcurl:
  4445. Host setup: ${host}
  4446. Install prefix: ${prefix}
  4447. Compiler: ${CC}
  4448. CFLAGS: ${CFLAGS}
  4449. CPPFLAGS: ${CPPFLAGS}
  4450. LDFLAGS: ${LDFLAGS}
  4451. LIBS: ${LIBS}
  4452. curl version: ${CURLVERSION}
  4453. SSL: ${curl_ssl_msg}
  4454. SSH: ${curl_ssh_msg}
  4455. zlib: ${curl_zlib_msg}
  4456. brotli: ${curl_brotli_msg}
  4457. zstd: ${curl_zstd_msg}
  4458. GSS-API: ${curl_gss_msg}
  4459. GSASL: ${curl_gsasl_msg}
  4460. TLS-SRP: ${curl_tls_srp_msg}
  4461. resolver: ${curl_res_msg}
  4462. IPv6: ${curl_ipv6_msg}
  4463. Unix sockets: ${curl_unix_sockets_msg}
  4464. IDN: ${curl_idn_msg}
  4465. Build docs: ${curl_docs_msg}
  4466. Build libcurl: Shared=${enable_shared}, Static=${enable_static}
  4467. Built-in manual: ${curl_manual_msg}
  4468. --libcurl option: ${curl_libcurl_msg}
  4469. Verbose errors: ${curl_verbose_msg}
  4470. Code coverage: ${curl_coverage_msg}
  4471. SSPI: ${curl_sspi_msg}
  4472. ca cert bundle: ${ca}${ca_warning}
  4473. ca cert path: ${capath}${capath_warning}
  4474. ca fallback: ${with_ca_fallback}
  4475. LDAP: ${curl_ldap_msg}
  4476. LDAPS: ${curl_ldaps_msg}
  4477. RTSP: ${curl_rtsp_msg}
  4478. RTMP: ${curl_rtmp_msg}
  4479. PSL: ${curl_psl_msg}
  4480. Alt-svc: ${curl_altsvc_msg}
  4481. Headers API: ${curl_headers_msg}
  4482. HSTS: ${curl_hsts_msg}
  4483. HTTP1: ${curl_h1_msg}
  4484. HTTP2: ${curl_h2_msg}
  4485. HTTP3: ${curl_h3_msg}
  4486. ECH: ${curl_ech_msg}
  4487. WebSockets: ${curl_ws_msg}
  4488. Protocols: ${SUPPORT_PROTOCOLS}
  4489. Features: ${SUPPORT_FEATURES}
  4490. ])
  4491. if test -n "$experimental"; then
  4492. cat >&2 << _EOF
  4493. WARNING: $experimental enabled but marked EXPERIMENTAL. Use with caution!
  4494. _EOF
  4495. fi