aclocal.m4 152 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613
  1. # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
  2. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
  3. # Free Software Foundation, Inc.
  4. # This file is free software; the Free Software Foundation
  5. # gives unlimited permission to copy and/or distribute it,
  6. # with or without modifications, as long as this notice is preserved.
  7. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
  9. # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  10. # PARTICULAR PURPOSE.
  11. dnl cloned from autoconf 2.13 acspecific.m4
  12. AC_DEFUN([AC_C_LONG_LONG],
  13. [AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
  14. [if test "$GCC" = yes; then
  15. ac_cv_c_long_long=yes
  16. else
  17. AC_TRY_RUN([int main() {
  18. long long foo = 0;
  19. exit(sizeof(long long) < sizeof(long)); }],
  20. ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
  21. fi])
  22. if test $ac_cv_c_long_long = yes; then
  23. AC_DEFINE(HAVE_LONG_LONG)
  24. fi
  25. ])
  26. dnl from autoconf 2.13 acspecific.m4, with changes to check for daylight
  27. AC_DEFUN([AC_STRUCT_TIMEZONE_DAYLIGHT],
  28. [AC_REQUIRE([AC_STRUCT_TM])dnl
  29. AC_CACHE_CHECK([for tm_zone in struct tm], ac_cv_struct_tm_zone,
  30. [AC_TRY_COMPILE([#include <sys/types.h>
  31. #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_zone;],
  32. ac_cv_struct_tm_zone=yes, ac_cv_struct_tm_zone=no)])
  33. if test "$ac_cv_struct_tm_zone" = yes; then
  34. AC_DEFINE(HAVE_TM_ZONE,1,[HAVE_TM_ZONE])
  35. fi
  36. AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
  37. [AC_TRY_LINK(
  38. changequote(<<, >>)dnl
  39. <<#include <time.h>
  40. #ifndef tzname /* For SGI. */
  41. extern char *tzname[]; /* RS6000 and others reject char **tzname. */
  42. #endif>>,
  43. changequote([, ])dnl
  44. [atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
  45. if test $ac_cv_var_tzname = yes; then
  46. AC_DEFINE(HAVE_TZNAME,1,[HAVE_TZNAME])
  47. fi
  48. AC_CACHE_CHECK([for tm_isdst in struct tm], ac_cv_struct_tm_isdst,
  49. [AC_TRY_COMPILE([#include <sys/types.h>
  50. #include <$ac_cv_struct_tm>], [struct tm tm; tm.tm_isdst;],
  51. ac_cv_struct_tm_isdst=yes, ac_cv_struct_tm_isdst=no)])
  52. if test "$ac_cv_struct_tm_isdst" = yes; then
  53. AC_DEFINE(HAVE_TM_ISDST)
  54. fi
  55. AC_CACHE_CHECK(for daylight, ac_cv_var_daylight,
  56. [AC_TRY_LINK(
  57. changequote(<<, >>)dnl
  58. <<#include <time.h>
  59. #ifndef daylight /* In case IRIX #defines this, too */
  60. extern int daylight;
  61. #endif>>,
  62. changequote([, ])dnl
  63. [atoi(daylight);], ac_cv_var_daylight=yes, ac_cv_var_daylight=no)])
  64. if test $ac_cv_var_daylight = yes; then
  65. AC_DEFINE(HAVE_DAYLIGHT)
  66. fi
  67. ])
  68. dnl from autoconf 2.13 acgeneral.m4, with patch:
  69. dnl Date: Fri, 15 Jan 1999 05:52:41 -0800
  70. dnl Message-ID: <199901151352.FAA18237@shade.twinsun.com>
  71. dnl From: eggert@twinsun.com (Paul Eggert)
  72. dnl Subject: autoconf 2.13 AC_CHECK_TYPE doesn't allow shell vars
  73. dnl Newsgroups: gnu.utils.bug
  74. dnl
  75. dnl now include <stdint.h> if available
  76. dnl AC_CHECK_TYPE2_STDC(TYPE, DEFAULT)
  77. AC_DEFUN([AC_CHECK_TYPE2_STDC],
  78. [AC_REQUIRE([AC_HEADER_STDC])dnl
  79. AC_REQUIRE([AC_HEADER_STDINT])dnl
  80. AC_MSG_CHECKING(for $1)
  81. AC_CACHE_VAL(ac_cv_type_$1,
  82. [AC_EGREP_CPP(dnl
  83. [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
  84. [#if HAVE_STDINT_H
  85. #include <stdint.h>
  86. #endif
  87. #include <sys/types.h>
  88. #if STDC_HEADERS
  89. #include <stdlib.h>
  90. #include <stddef.h>
  91. #endif], eval "ac_cv_type_$1=yes", eval "ac_cv_type_$1=no")])dnl
  92. if eval "test \"`echo '$ac_cv_type_'$1`\" = yes"; then
  93. AC_MSG_RESULT(yes)
  94. else
  95. AC_MSG_RESULT(no)
  96. AC_DEFINE_UNQUOTED($1, $2)
  97. fi
  98. ])
  99. dnl from autoconf 2.13 acgeneral.m4, with additional third argument
  100. dnl AC_CHECK_SIZEOF_INCLUDES(TYPE [, CROSS-SIZE [, INCLUDES]])
  101. AC_DEFUN([AC_CHECK_SIZEOF_INCLUDES],
  102. [dnl The name to #define.
  103. define([AC_TYPE_NAME], translit(sizeof_$1, [[[a-z *]]], [[[A-Z_P]]]))dnl
  104. dnl The cache variable name.
  105. define([AC_CV_NAME], translit(ac_cv_sizeof_$1, [[[ *]]], [[[_p]]]))dnl
  106. AC_MSG_CHECKING(size of $1)
  107. AC_CACHE_VAL(AC_CV_NAME,
  108. [AC_TRY_RUN([$3
  109. #include <stdio.h>
  110. main()
  111. {
  112. FILE *f=fopen("conftestval", "w");
  113. if (!f) exit(1);
  114. fprintf(f, "%d\n", sizeof($1));
  115. exit(0);
  116. }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , , AC_CV_NAME=$2))])dnl
  117. AC_MSG_RESULT($AC_CV_NAME)
  118. AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME)
  119. undefine([AC_TYPE_NAME])dnl
  120. undefine([AC_CV_NAME])dnl
  121. ])
  122. dnl AC_CHECK_SIZEOF_STDC_HEADERS(TYPE [, CROSS_SIZE])
  123. AC_DEFUN([AC_CHECK_SIZEOF_STDC_HEADERS],
  124. [AC_REQUIRE([AC_HEADER_STDC])dnl
  125. AC_REQUIRE([AC_HEADER_STDINT])dnl
  126. AC_CHECK_SIZEOF_INCLUDES($1, $2,
  127. [#if HAVE_STDINT_H
  128. #include <stdint.h>
  129. #endif
  130. #include <sys/types.h>
  131. #ifdef STDC_HEADERS
  132. #include <stdlib.h>
  133. #endif
  134. ])
  135. ])
  136. dnl AC_CHECK_TYPE_STDC(TYPE, DEFAULT)
  137. AC_DEFUN([AC_CHECK_TYPE_STDC],
  138. [AC_REQUIRE([AC_HEADER_STDC])dnl
  139. AC_REQUIRE([AC_HEADER_STDINT])dnl
  140. AC_MSG_CHECKING(for $1)
  141. AC_CACHE_VAL(ac_cv_type_$1,
  142. [AC_EGREP_CPP(dnl
  143. [(^|[^a-zA-Z_0-9])$1[^a-zA-Z_0-9]],
  144. [#if HAVE_STDINT_H
  145. #include <stdint.h>
  146. #endif
  147. #include <sys/types.h>
  148. #if STDC_HEADERS
  149. #include <stdlib.h>
  150. #include <stddef.h>
  151. #endif], ac_cv_type_$1=yes, ac_cv_type_$1=no)])dnl
  152. AC_MSG_RESULT($ac_cv_type_$1)
  153. if test $ac_cv_type_$1 = no; then
  154. AC_DEFINE($1, $2)
  155. fi
  156. ])
  157. dnl AC_HEADER_STDINT
  158. AC_DEFUN([AC_HEADER_STDINT], [AC_CHECK_HEADERS(stdint.h)])
  159. #serial 19
  160. dnl By default, many hosts won't let programs access large files;
  161. dnl one must use special compiler options to get large-file access to work.
  162. dnl For more details about this brain damage please see:
  163. dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
  164. dnl Written by Paul Eggert <eggert@twinsun.com>.
  165. dnl Internal subroutine of AC_SYS_LARGEFILE.
  166. dnl AC_SYS_LARGEFILE_TEST_INCLUDES
  167. AC_DEFUN([AC_SYS_LARGEFILE_TEST_INCLUDES],
  168. [[#include <sys/types.h>
  169. /* Check that off_t can represent 2**63 - 1 correctly.
  170. We can't simply "#define LARGE_OFF_T 9223372036854775807",
  171. since some C++ compilers masquerading as C compilers
  172. incorrectly reject 9223372036854775807. */
  173. # define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
  174. int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
  175. && LARGE_OFF_T % 2147483647 == 1)
  176. ? 1 : -1];
  177. ]])
  178. dnl Internal subroutine of AC_SYS_LARGEFILE.
  179. dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, CACHE-VAR, COMMENT, INCLU=
  180. DES, FUNCTION-BODY)
  181. AC_DEFUN([AC_SYS_LARGEFILE_MACRO_VALUE],
  182. [AC_CACHE_CHECK([for $1 value needed for large files], $3,
  183. [$3=no
  184. AC_TRY_COMPILE([$5],
  185. [$6],
  186. ,
  187. [AC_TRY_COMPILE([#define $1 $2]
  188. [$5]
  189. ,
  190. [$6],
  191. [$3=$2])])])
  192. if test "[$]$3" != no; then
  193. AC_DEFINE_UNQUOTED([$1], [$]$3, [$4])
  194. fi])
  195. AC_DEFUN([AC_SYS_LARGEFILE],
  196. [AC_REQUIRE([AC_PROG_CC])
  197. AC_ARG_ENABLE(largefile,
  198. [ --disable-largefile omit support for large files])
  199. if test "$enable_largefile" != no; then
  200. AC_CACHE_CHECK([for special C compiler options needed for large files=
  201. ],
  202. ac_cv_sys_largefile_CC,
  203. [ac_cv_sys_largefile_CC=no
  204. if test "$GCC" != yes; then
  205. # IRIX 6.2 and later do not support large files by default,
  206. # so use the C compiler's -n32 option if that helps.
  207. AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, , ,
  208. [ac_save_CC="$CC"
  209. CC="$CC -n32"
  210. AC_TRY_COMPILE(AC_SYS_LARGEFILE_TEST_INCLUDES, ,
  211. ac_cv_sys_largefile_CC=' -n32')
  212. CC="$ac_save_CC"])
  213. fi])
  214. if test "$ac_cv_sys_largefile_CC" != no; then
  215. CC="$CC$ac_cv_sys_largefile_CC"
  216. fi
  217. AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
  218. ac_cv_sys_file_offset_bits,
  219. [Number of bits in a file offset, on hosts where this is settable.],
  220. AC_SYS_LARGEFILE_TEST_INCLUDES)
  221. AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1,
  222. ac_cv_sys_large_files,
  223. [Define for large files, on AIX-style hosts.],
  224. AC_SYS_LARGEFILE_TEST_INCLUDES)
  225. fi
  226. ])
  227. AC_DEFUN([AC_FUNC_FSEEKO],
  228. [AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE, 1,
  229. ac_cv_sys_largefile_source,
  230. [Define to make fseeko visible on some hosts (e.g. glibc 2.2).],
  231. [#include <stdio.h>], [return !fseeko;])
  232. # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
  233. # in glibc 2.1.3, but that breaks too many other things.
  234. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
  235. AC_CACHE_CHECK([for fseeko], ac_cv_func_fseeko,
  236. [ac_cv_func_fseeko=no
  237. AC_TRY_LINK([#include <stdio.h>],
  238. [return fseeko && fseeko (stdin, 0, 0);],
  239. [ac_cv_func_fseeko=yes])])
  240. if test $ac_cv_func_fseeko != no; then
  241. AC_DEFINE(HAVE_FSEEKO, 1,
  242. [Define if fseeko (and presumably ftello) exists and is declared.])
  243. fi])
  244. # serial 9
  245. # From Paul Eggert.
  246. # BeOS 5 has <wchar.h> but does not define mbstate_t,
  247. # so you can't declare an object of that type.
  248. # Check for this incompatibility with Standard C.
  249. # Include stdlib.h first, because otherwise this test would fail on Linux
  250. # (at least glibc-2.1.3) because the "_XOPEN_SOURCE 500" definition elicits
  251. # a syntax error in wchar.h due to the use of undefined __int32_t.
  252. AC_DEFUN([AC_MBSTATE_T],
  253. [
  254. AC_CHECK_HEADERS(stdlib.h)
  255. AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t,
  256. [AC_TRY_COMPILE([
  257. #if HAVE_STDLIB_H
  258. # include <stdlib.h>
  259. #endif
  260. #include <wchar.h>],
  261. [mbstate_t x; return sizeof x;],
  262. ac_cv_type_mbstate_t=yes,
  263. ac_cv_type_mbstate_t=no)])
  264. if test $ac_cv_type_mbstate_t = no; then
  265. AC_DEFINE(mbstate_t, int,
  266. [Define to a type if <wchar.h> does not define.])
  267. fi])
  268. # Do all the work for Automake. -*- Autoconf -*-
  269. # This macro actually does too much some checks are only needed if
  270. # your package does certain things. But this isn't really a big deal.
  271. # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
  272. # Free Software Foundation, Inc.
  273. # This program is free software; you can redistribute it and/or modify
  274. # it under the terms of the GNU General Public License as published by
  275. # the Free Software Foundation; either version 2, or (at your option)
  276. # any later version.
  277. # This program is distributed in the hope that it will be useful,
  278. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  279. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  280. # GNU General Public License for more details.
  281. # You should have received a copy of the GNU General Public License
  282. # along with this program; if not, write to the Free Software
  283. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  284. # 02111-1307, USA.
  285. # serial 8
  286. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  287. # written in clear, in which case automake, when reading aclocal.m4,
  288. # will think it sees a *use*, and therefore will trigger all it's
  289. # C support machinery. Also note that it means that autoscan, seeing
  290. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  291. AC_PREREQ([2.52])
  292. # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
  293. # the ones we care about.
  294. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
  295. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
  296. # AM_INIT_AUTOMAKE([OPTIONS])
  297. # -----------------------------------------------
  298. # The call with PACKAGE and VERSION arguments is the old style
  299. # call (pre autoconf-2.50), which is being phased out. PACKAGE
  300. # and VERSION should now be passed to AC_INIT and removed from
  301. # the call to AM_INIT_AUTOMAKE.
  302. # We support both call styles for the transition. After
  303. # the next Automake release, Autoconf can make the AC_INIT
  304. # arguments mandatory, and then we can depend on a new Autoconf
  305. # release and drop the old call support.
  306. AC_DEFUN([AM_INIT_AUTOMAKE],
  307. [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
  308. AC_REQUIRE([AC_PROG_INSTALL])dnl
  309. # test to see if srcdir already configured
  310. if test "`cd $srcdir && pwd`" != "`pwd`" &&
  311. test -f $srcdir/config.status; then
  312. AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
  313. fi
  314. # Define the identity of the package.
  315. dnl Distinguish between old-style and new-style calls.
  316. m4_ifval([$2],
  317. [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
  318. AC_SUBST([PACKAGE], [$1])dnl
  319. AC_SUBST([VERSION], [$2])],
  320. [_AM_SET_OPTIONS([$1])dnl
  321. AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl
  322. AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl
  323. _AM_IF_OPTION([no-define],,
  324. [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
  325. AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
  326. # Some tools Automake needs.
  327. AC_REQUIRE([AM_SANITY_CHECK])dnl
  328. AC_REQUIRE([AC_ARG_PROGRAM])dnl
  329. AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
  330. AM_MISSING_PROG(AUTOCONF, autoconf)
  331. AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
  332. AM_MISSING_PROG(AUTOHEADER, autoheader)
  333. AM_MISSING_PROG(MAKEINFO, makeinfo)
  334. AM_MISSING_PROG(AMTAR, tar)
  335. AM_PROG_INSTALL_SH
  336. AM_PROG_INSTALL_STRIP
  337. # We need awk for the "check" target. The system "awk" is bad on
  338. # some platforms.
  339. AC_REQUIRE([AC_PROG_AWK])dnl
  340. AC_REQUIRE([AC_PROG_MAKE_SET])dnl
  341. _AM_IF_OPTION([no-dependencies],,
  342. [AC_PROVIDE_IFELSE([AC_PROG_][CC],
  343. [_AM_DEPENDENCIES(CC)],
  344. [define([AC_PROG_][CC],
  345. defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
  346. AC_PROVIDE_IFELSE([AC_PROG_][CXX],
  347. [_AM_DEPENDENCIES(CXX)],
  348. [define([AC_PROG_][CXX],
  349. defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
  350. ])
  351. ])
  352. # Copyright 2002 Free Software Foundation, Inc.
  353. # This program is free software; you can redistribute it and/or modify
  354. # it under the terms of the GNU General Public License as published by
  355. # the Free Software Foundation; either version 2, or (at your option)
  356. # any later version.
  357. # This program is distributed in the hope that it will be useful,
  358. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  359. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  360. # GNU General Public License for more details.
  361. # You should have received a copy of the GNU General Public License
  362. # along with this program; if not, write to the Free Software
  363. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  364. # AM_AUTOMAKE_VERSION(VERSION)
  365. # ----------------------------
  366. # Automake X.Y traces this macro to ensure aclocal.m4 has been
  367. # generated from the m4 files accompanying Automake X.Y.
  368. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])
  369. # AM_SET_CURRENT_AUTOMAKE_VERSION
  370. # -------------------------------
  371. # Call AM_AUTOMAKE_VERSION so it can be traced.
  372. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
  373. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
  374. [AM_AUTOMAKE_VERSION([1.6.3])])
  375. # Helper functions for option handling. -*- Autoconf -*-
  376. # Copyright 2001, 2002 Free Software Foundation, Inc.
  377. # This program is free software; you can redistribute it and/or modify
  378. # it under the terms of the GNU General Public License as published by
  379. # the Free Software Foundation; either version 2, or (at your option)
  380. # any later version.
  381. # This program is distributed in the hope that it will be useful,
  382. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  383. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  384. # GNU General Public License for more details.
  385. # You should have received a copy of the GNU General Public License
  386. # along with this program; if not, write to the Free Software
  387. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  388. # 02111-1307, USA.
  389. # serial 2
  390. # _AM_MANGLE_OPTION(NAME)
  391. # -----------------------
  392. AC_DEFUN([_AM_MANGLE_OPTION],
  393. [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
  394. # _AM_SET_OPTION(NAME)
  395. # ------------------------------
  396. # Set option NAME. Presently that only means defining a flag for this option.
  397. AC_DEFUN([_AM_SET_OPTION],
  398. [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
  399. # _AM_SET_OPTIONS(OPTIONS)
  400. # ----------------------------------
  401. # OPTIONS is a space-separated list of Automake options.
  402. AC_DEFUN([_AM_SET_OPTIONS],
  403. [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
  404. # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
  405. # -------------------------------------------
  406. # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
  407. AC_DEFUN([_AM_IF_OPTION],
  408. [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
  409. #
  410. # Check to make sure that the build environment is sane.
  411. #
  412. # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  413. # This program is free software; you can redistribute it and/or modify
  414. # it under the terms of the GNU General Public License as published by
  415. # the Free Software Foundation; either version 2, or (at your option)
  416. # any later version.
  417. # This program is distributed in the hope that it will be useful,
  418. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  419. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  420. # GNU General Public License for more details.
  421. # You should have received a copy of the GNU General Public License
  422. # along with this program; if not, write to the Free Software
  423. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  424. # 02111-1307, USA.
  425. # serial 3
  426. # AM_SANITY_CHECK
  427. # ---------------
  428. AC_DEFUN([AM_SANITY_CHECK],
  429. [AC_MSG_CHECKING([whether build environment is sane])
  430. # Just in case
  431. sleep 1
  432. echo timestamp > conftest.file
  433. # Do `set' in a subshell so we don't clobber the current shell's
  434. # arguments. Must try -L first in case configure is actually a
  435. # symlink; some systems play weird games with the mod time of symlinks
  436. # (eg FreeBSD returns the mod time of the symlink's containing
  437. # directory).
  438. if (
  439. set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
  440. if test "$[*]" = "X"; then
  441. # -L didn't work.
  442. set X `ls -t $srcdir/configure conftest.file`
  443. fi
  444. rm -f conftest.file
  445. if test "$[*]" != "X $srcdir/configure conftest.file" \
  446. && test "$[*]" != "X conftest.file $srcdir/configure"; then
  447. # If neither matched, then we have a broken ls. This can happen
  448. # if, for instance, CONFIG_SHELL is bash and it inherits a
  449. # broken ls alias from the environment. This has actually
  450. # happened. Such a system could not be considered "sane".
  451. AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
  452. alias in your environment])
  453. fi
  454. test "$[2]" = conftest.file
  455. )
  456. then
  457. # Ok.
  458. :
  459. else
  460. AC_MSG_ERROR([newly created file is older than distributed files!
  461. Check your system clock])
  462. fi
  463. AC_MSG_RESULT(yes)])
  464. # -*- Autoconf -*-
  465. # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
  466. # This program is free software; you can redistribute it and/or modify
  467. # it under the terms of the GNU General Public License as published by
  468. # the Free Software Foundation; either version 2, or (at your option)
  469. # any later version.
  470. # This program is distributed in the hope that it will be useful,
  471. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  472. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  473. # GNU General Public License for more details.
  474. # You should have received a copy of the GNU General Public License
  475. # along with this program; if not, write to the Free Software
  476. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  477. # 02111-1307, USA.
  478. # serial 3
  479. # AM_MISSING_PROG(NAME, PROGRAM)
  480. # ------------------------------
  481. AC_DEFUN([AM_MISSING_PROG],
  482. [AC_REQUIRE([AM_MISSING_HAS_RUN])
  483. $1=${$1-"${am_missing_run}$2"}
  484. AC_SUBST($1)])
  485. # AM_MISSING_HAS_RUN
  486. # ------------------
  487. # Define MISSING if not defined so far and test if it supports --run.
  488. # If it does, set am_missing_run to use it, otherwise, to nothing.
  489. AC_DEFUN([AM_MISSING_HAS_RUN],
  490. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  491. test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
  492. # Use eval to expand $SHELL
  493. if eval "$MISSING --run true"; then
  494. am_missing_run="$MISSING --run "
  495. else
  496. am_missing_run=
  497. AC_MSG_WARN([`missing' script is too old or missing])
  498. fi
  499. ])
  500. # AM_AUX_DIR_EXPAND
  501. # Copyright 2001 Free Software Foundation, Inc.
  502. # This program is free software; you can redistribute it and/or modify
  503. # it under the terms of the GNU General Public License as published by
  504. # the Free Software Foundation; either version 2, or (at your option)
  505. # any later version.
  506. # This program is distributed in the hope that it will be useful,
  507. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  508. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  509. # GNU General Public License for more details.
  510. # You should have received a copy of the GNU General Public License
  511. # along with this program; if not, write to the Free Software
  512. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  513. # 02111-1307, USA.
  514. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
  515. # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
  516. # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
  517. #
  518. # Of course, Automake must honor this variable whenever it calls a
  519. # tool from the auxiliary directory. The problem is that $srcdir (and
  520. # therefore $ac_aux_dir as well) can be either absolute or relative,
  521. # depending on how configure is run. This is pretty annoying, since
  522. # it makes $ac_aux_dir quite unusable in subdirectories: in the top
  523. # source directory, any form will work fine, but in subdirectories a
  524. # relative path needs to be adjusted first.
  525. #
  526. # $ac_aux_dir/missing
  527. # fails when called from a subdirectory if $ac_aux_dir is relative
  528. # $top_srcdir/$ac_aux_dir/missing
  529. # fails if $ac_aux_dir is absolute,
  530. # fails when called from a subdirectory in a VPATH build with
  531. # a relative $ac_aux_dir
  532. #
  533. # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
  534. # are both prefixed by $srcdir. In an in-source build this is usually
  535. # harmless because $srcdir is `.', but things will broke when you
  536. # start a VPATH build or use an absolute $srcdir.
  537. #
  538. # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
  539. # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
  540. # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
  541. # and then we would define $MISSING as
  542. # MISSING="\${SHELL} $am_aux_dir/missing"
  543. # This will work as long as MISSING is not called from configure, because
  544. # unfortunately $(top_srcdir) has no meaning in configure.
  545. # However there are other variables, like CC, which are often used in
  546. # configure, and could therefore not use this "fixed" $ac_aux_dir.
  547. #
  548. # Another solution, used here, is to always expand $ac_aux_dir to an
  549. # absolute PATH. The drawback is that using absolute paths prevent a
  550. # configured tree to be moved without reconfiguration.
  551. # Rely on autoconf to set up CDPATH properly.
  552. AC_PREREQ([2.50])
  553. AC_DEFUN([AM_AUX_DIR_EXPAND], [
  554. # expand $ac_aux_dir to an absolute path
  555. am_aux_dir=`cd $ac_aux_dir && pwd`
  556. ])
  557. # AM_PROG_INSTALL_SH
  558. # ------------------
  559. # Define $install_sh.
  560. # Copyright 2001 Free Software Foundation, Inc.
  561. # This program is free software; you can redistribute it and/or modify
  562. # it under the terms of the GNU General Public License as published by
  563. # the Free Software Foundation; either version 2, or (at your option)
  564. # any later version.
  565. # This program is distributed in the hope that it will be useful,
  566. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  567. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  568. # GNU General Public License for more details.
  569. # You should have received a copy of the GNU General Public License
  570. # along with this program; if not, write to the Free Software
  571. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  572. # 02111-1307, USA.
  573. AC_DEFUN([AM_PROG_INSTALL_SH],
  574. [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
  575. install_sh=${install_sh-"$am_aux_dir/install-sh"}
  576. AC_SUBST(install_sh)])
  577. # AM_PROG_INSTALL_STRIP
  578. # Copyright 2001 Free Software Foundation, Inc.
  579. # This program is free software; you can redistribute it and/or modify
  580. # it under the terms of the GNU General Public License as published by
  581. # the Free Software Foundation; either version 2, or (at your option)
  582. # any later version.
  583. # This program is distributed in the hope that it will be useful,
  584. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  585. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  586. # GNU General Public License for more details.
  587. # You should have received a copy of the GNU General Public License
  588. # along with this program; if not, write to the Free Software
  589. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  590. # 02111-1307, USA.
  591. # One issue with vendor `install' (even GNU) is that you can't
  592. # specify the program used to strip binaries. This is especially
  593. # annoying in cross-compiling environments, where the build's strip
  594. # is unlikely to handle the host's binaries.
  595. # Fortunately install-sh will honor a STRIPPROG variable, so we
  596. # always use install-sh in `make install-strip', and initialize
  597. # STRIPPROG with the value of the STRIP variable (set by the user).
  598. AC_DEFUN([AM_PROG_INSTALL_STRIP],
  599. [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
  600. # Installed binaries are usually stripped using `strip' when the user
  601. # run `make install-strip'. However `strip' might not be the right
  602. # tool to use in cross-compilation environments, therefore Automake
  603. # will honor the `STRIP' environment variable to overrule this program.
  604. dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
  605. if test "$cross_compiling" != no; then
  606. AC_CHECK_TOOL([STRIP], [strip], :)
  607. fi
  608. INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
  609. AC_SUBST([INSTALL_STRIP_PROGRAM])])
  610. # serial 4 -*- Autoconf -*-
  611. # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
  612. # This program is free software; you can redistribute it and/or modify
  613. # it under the terms of the GNU General Public License as published by
  614. # the Free Software Foundation; either version 2, or (at your option)
  615. # any later version.
  616. # This program is distributed in the hope that it will be useful,
  617. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  618. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  619. # GNU General Public License for more details.
  620. # You should have received a copy of the GNU General Public License
  621. # along with this program; if not, write to the Free Software
  622. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  623. # 02111-1307, USA.
  624. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
  625. # written in clear, in which case automake, when reading aclocal.m4,
  626. # will think it sees a *use*, and therefore will trigger all it's
  627. # C support machinery. Also note that it means that autoscan, seeing
  628. # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
  629. # _AM_DEPENDENCIES(NAME)
  630. # ----------------------
  631. # See how the compiler implements dependency checking.
  632. # NAME is "CC", "CXX", "GCJ", or "OBJC".
  633. # We try a few techniques and use that to set a single cache variable.
  634. #
  635. # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
  636. # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
  637. # dependency, and given that the user is not expected to run this macro,
  638. # just rely on AC_PROG_CC.
  639. AC_DEFUN([_AM_DEPENDENCIES],
  640. [AC_REQUIRE([AM_SET_DEPDIR])dnl
  641. AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
  642. AC_REQUIRE([AM_MAKE_INCLUDE])dnl
  643. AC_REQUIRE([AM_DEP_TRACK])dnl
  644. ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
  645. [$1], CXX, [depcc="$CXX" am_compiler_list=],
  646. [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
  647. [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
  648. [depcc="$$1" am_compiler_list=])
  649. AC_CACHE_CHECK([dependency style of $depcc],
  650. [am_cv_$1_dependencies_compiler_type],
  651. [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
  652. # We make a subdir and do the tests there. Otherwise we can end up
  653. # making bogus files that we don't know about and never remove. For
  654. # instance it was reported that on HP-UX the gcc test will end up
  655. # making a dummy file named `D' -- because `-MD' means `put the output
  656. # in D'.
  657. mkdir conftest.dir
  658. # Copy depcomp to subdir because otherwise we won't find it if we're
  659. # using a relative directory.
  660. cp "$am_depcomp" conftest.dir
  661. cd conftest.dir
  662. am_cv_$1_dependencies_compiler_type=none
  663. if test "$am_compiler_list" = ""; then
  664. am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
  665. fi
  666. for depmode in $am_compiler_list; do
  667. # We need to recreate these files for each test, as the compiler may
  668. # overwrite some of them when testing with obscure command lines.
  669. # This happens at least with the AIX C compiler.
  670. echo '#include "conftest.h"' > conftest.c
  671. echo 'int i;' > conftest.h
  672. echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
  673. case $depmode in
  674. nosideeffect)
  675. # after this tag, mechanisms are not by side-effect, so they'll
  676. # only be used when explicitly requested
  677. if test "x$enable_dependency_tracking" = xyes; then
  678. continue
  679. else
  680. break
  681. fi
  682. ;;
  683. none) break ;;
  684. esac
  685. # We check with `-c' and `-o' for the sake of the "dashmstdout"
  686. # mode. It turns out that the SunPro C++ compiler does not properly
  687. # handle `-M -o', and we need to detect this.
  688. if depmode=$depmode \
  689. source=conftest.c object=conftest.o \
  690. depfile=conftest.Po tmpdepfile=conftest.TPo \
  691. $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
  692. grep conftest.h conftest.Po > /dev/null 2>&1 &&
  693. ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
  694. am_cv_$1_dependencies_compiler_type=$depmode
  695. break
  696. fi
  697. done
  698. cd ..
  699. rm -rf conftest.dir
  700. else
  701. am_cv_$1_dependencies_compiler_type=none
  702. fi
  703. ])
  704. AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
  705. ])
  706. # AM_SET_DEPDIR
  707. # -------------
  708. # Choose a directory name for dependency files.
  709. # This macro is AC_REQUIREd in _AM_DEPENDENCIES
  710. AC_DEFUN([AM_SET_DEPDIR],
  711. [rm -f .deps 2>/dev/null
  712. mkdir .deps 2>/dev/null
  713. if test -d .deps; then
  714. DEPDIR=.deps
  715. else
  716. # MS-DOS does not allow filenames that begin with a dot.
  717. DEPDIR=_deps
  718. fi
  719. rmdir .deps 2>/dev/null
  720. AC_SUBST([DEPDIR])
  721. ])
  722. # AM_DEP_TRACK
  723. # ------------
  724. AC_DEFUN([AM_DEP_TRACK],
  725. [AC_ARG_ENABLE(dependency-tracking,
  726. [ --disable-dependency-tracking Speeds up one-time builds
  727. --enable-dependency-tracking Do not reject slow dependency extractors])
  728. if test "x$enable_dependency_tracking" != xno; then
  729. am_depcomp="$ac_aux_dir/depcomp"
  730. AMDEPBACKSLASH='\'
  731. fi
  732. AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
  733. AC_SUBST([AMDEPBACKSLASH])
  734. ])
  735. # Generate code to set up dependency tracking. -*- Autoconf -*-
  736. # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
  737. # This program is free software; you can redistribute it and/or modify
  738. # it under the terms of the GNU General Public License as published by
  739. # the Free Software Foundation; either version 2, or (at your option)
  740. # any later version.
  741. # This program is distributed in the hope that it will be useful,
  742. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  743. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  744. # GNU General Public License for more details.
  745. # You should have received a copy of the GNU General Public License
  746. # along with this program; if not, write to the Free Software
  747. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  748. # 02111-1307, USA.
  749. #serial 2
  750. # _AM_OUTPUT_DEPENDENCY_COMMANDS
  751. # ------------------------------
  752. AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
  753. [for mf in $CONFIG_FILES; do
  754. # Strip MF so we end up with the name of the file.
  755. mf=`echo "$mf" | sed -e 's/:.*$//'`
  756. # Check whether this is an Automake generated Makefile or not.
  757. # We used to match only the files named `Makefile.in', but
  758. # some people rename them; so instead we look at the file content.
  759. # Grep'ing the first line is not enough: some people post-process
  760. # each Makefile.in and add a new line on top of each file to say so.
  761. # So let's grep whole file.
  762. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
  763. dirpart=`AS_DIRNAME("$mf")`
  764. else
  765. continue
  766. fi
  767. grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
  768. # Extract the definition of DEP_FILES from the Makefile without
  769. # running `make'.
  770. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
  771. test -z "$DEPDIR" && continue
  772. # When using ansi2knr, U may be empty or an underscore; expand it
  773. U=`sed -n -e '/^U = / s///p' < "$mf"`
  774. test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
  775. # We invoke sed twice because it is the simplest approach to
  776. # changing $(DEPDIR) to its actual value in the expansion.
  777. for file in `sed -n -e '
  778. /^DEP_FILES = .*\\\\$/ {
  779. s/^DEP_FILES = //
  780. :loop
  781. s/\\\\$//
  782. p
  783. n
  784. /\\\\$/ b loop
  785. p
  786. }
  787. /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
  788. sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
  789. # Make sure the directory exists.
  790. test -f "$dirpart/$file" && continue
  791. fdir=`AS_DIRNAME(["$file"])`
  792. AS_MKDIR_P([$dirpart/$fdir])
  793. # echo "creating $dirpart/$file"
  794. echo '# dummy' > "$dirpart/$file"
  795. done
  796. done
  797. ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
  798. # AM_OUTPUT_DEPENDENCY_COMMANDS
  799. # -----------------------------
  800. # This macro should only be invoked once -- use via AC_REQUIRE.
  801. #
  802. # This code is only required when automatic dependency tracking
  803. # is enabled. FIXME. This creates each `.P' file that we will
  804. # need in order to bootstrap the dependency handling code.
  805. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
  806. [AC_CONFIG_COMMANDS([depfiles],
  807. [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
  808. [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
  809. ])
  810. # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
  811. # This program is free software; you can redistribute it and/or modify
  812. # it under the terms of the GNU General Public License as published by
  813. # the Free Software Foundation; either version 2, or (at your option)
  814. # any later version.
  815. # This program is distributed in the hope that it will be useful,
  816. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  817. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  818. # GNU General Public License for more details.
  819. # You should have received a copy of the GNU General Public License
  820. # along with this program; if not, write to the Free Software
  821. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  822. # 02111-1307, USA.
  823. # serial 2
  824. # AM_MAKE_INCLUDE()
  825. # -----------------
  826. # Check to see how make treats includes.
  827. AC_DEFUN([AM_MAKE_INCLUDE],
  828. [am_make=${MAKE-make}
  829. cat > confinc << 'END'
  830. doit:
  831. @echo done
  832. END
  833. # If we don't find an include directive, just comment out the code.
  834. AC_MSG_CHECKING([for style of include used by $am_make])
  835. am__include="#"
  836. am__quote=
  837. _am_result=none
  838. # First try GNU make style include.
  839. echo "include confinc" > confmf
  840. # We grep out `Entering directory' and `Leaving directory'
  841. # messages which can occur if `w' ends up in MAKEFLAGS.
  842. # In particular we don't look at `^make:' because GNU make might
  843. # be invoked under some other name (usually "gmake"), in which
  844. # case it prints its new name instead of `make'.
  845. if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
  846. am__include=include
  847. am__quote=
  848. _am_result=GNU
  849. fi
  850. # Now try BSD make style include.
  851. if test "$am__include" = "#"; then
  852. echo '.include "confinc"' > confmf
  853. if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
  854. am__include=.include
  855. am__quote="\""
  856. _am_result=BSD
  857. fi
  858. fi
  859. AC_SUBST(am__include)
  860. AC_SUBST(am__quote)
  861. AC_MSG_RESULT($_am_result)
  862. rm -f confinc confmf
  863. ])
  864. # AM_CONDITIONAL -*- Autoconf -*-
  865. # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
  866. # This program is free software; you can redistribute it and/or modify
  867. # it under the terms of the GNU General Public License as published by
  868. # the Free Software Foundation; either version 2, or (at your option)
  869. # any later version.
  870. # This program is distributed in the hope that it will be useful,
  871. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  872. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  873. # GNU General Public License for more details.
  874. # You should have received a copy of the GNU General Public License
  875. # along with this program; if not, write to the Free Software
  876. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  877. # 02111-1307, USA.
  878. # serial 5
  879. AC_PREREQ(2.52)
  880. # AM_CONDITIONAL(NAME, SHELL-CONDITION)
  881. # -------------------------------------
  882. # Define a conditional.
  883. AC_DEFUN([AM_CONDITIONAL],
  884. [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
  885. [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
  886. AC_SUBST([$1_TRUE])
  887. AC_SUBST([$1_FALSE])
  888. if $2; then
  889. $1_TRUE=
  890. $1_FALSE='#'
  891. else
  892. $1_TRUE='#'
  893. $1_FALSE=
  894. fi
  895. AC_CONFIG_COMMANDS_PRE(
  896. [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
  897. AC_MSG_ERROR([conditional \"$1\" was never defined.
  898. Usually this means the macro was only invoked conditionally.])
  899. fi])])
  900. # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
  901. # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
  902. # This program is free software; you can redistribute it and/or modify
  903. # it under the terms of the GNU General Public License as published by
  904. # the Free Software Foundation; either version 2, or (at your option)
  905. # any later version.
  906. # This program is distributed in the hope that it will be useful,
  907. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  908. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  909. # GNU General Public License for more details.
  910. # You should have received a copy of the GNU General Public License
  911. # along with this program; if not, write to the Free Software
  912. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  913. # 02111-1307, USA.
  914. AC_PREREQ([2.52])
  915. # serial 6
  916. # When config.status generates a header, we must update the stamp-h file.
  917. # This file resides in the same directory as the config header
  918. # that is generated. We must strip everything past the first ":",
  919. # and everything past the last "/".
  920. # _AM_DIRNAME(PATH)
  921. # -----------------
  922. # Like AS_DIRNAME, only do it during macro expansion
  923. AC_DEFUN([_AM_DIRNAME],
  924. [m4_if(regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
  925. m4_if(regexp([$1], [^//\([^/]\|$\)]), -1,
  926. m4_if(regexp([$1], [^/.*]), -1,
  927. [.],
  928. patsubst([$1], [^\(/\).*], [\1])),
  929. patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
  930. patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
  931. ])# _AM_DIRNAME
  932. # The stamp files are numbered to have different names.
  933. # We could number them on a directory basis, but that's additional
  934. # complications, let's have a unique counter.
  935. m4_define([_AM_STAMP_Count], [0])
  936. # _AM_STAMP(HEADER)
  937. # -----------------
  938. # The name of the stamp file for HEADER.
  939. AC_DEFUN([_AM_STAMP],
  940. [m4_define([_AM_STAMP_Count], m4_incr(_AM_STAMP_Count))dnl
  941. AS_ESCAPE(_AM_DIRNAME(patsubst([$1],
  942. [:.*])))/stamp-h[]_AM_STAMP_Count])
  943. # _AM_CONFIG_HEADER(HEADER[:SOURCES], COMMANDS, INIT-COMMANDS)
  944. # ------------------------------------------------------------
  945. # We used to try to get a real timestamp in stamp-h. But the fear is that
  946. # that will cause unnecessary cvs conflicts.
  947. AC_DEFUN([_AM_CONFIG_HEADER],
  948. [# Add the stamp file to the list of files AC keeps track of,
  949. # along with our hook.
  950. AC_CONFIG_HEADERS([$1],
  951. [# update the timestamp
  952. echo 'timestamp for $1' >"_AM_STAMP([$1])"
  953. $2],
  954. [$3])
  955. ])# _AM_CONFIG_HEADER
  956. # AM_CONFIG_HEADER(HEADER[:SOURCES]..., COMMANDS, INIT-COMMANDS)
  957. # --------------------------------------------------------------
  958. AC_DEFUN([AM_CONFIG_HEADER],
  959. [AC_FOREACH([_AM_File], [$1], [_AM_CONFIG_HEADER(_AM_File, [$2], [$3])])
  960. ])# AM_CONFIG_HEADER
  961. # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
  962. # serial 46 AC_PROG_LIBTOOL
  963. AC_DEFUN([AC_PROG_LIBTOOL],
  964. [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
  965. # This can be used to rebuild libtool when needed
  966. LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
  967. # Always use our own libtool.
  968. LIBTOOL='$(SHELL) $(top_builddir)/libtool'
  969. AC_SUBST(LIBTOOL)dnl
  970. # Prevent multiple expansion
  971. define([AC_PROG_LIBTOOL], [])
  972. ])
  973. AC_DEFUN([AC_LIBTOOL_SETUP],
  974. [AC_PREREQ(2.13)dnl
  975. AC_REQUIRE([AC_ENABLE_SHARED])dnl
  976. AC_REQUIRE([AC_ENABLE_STATIC])dnl
  977. AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
  978. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  979. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  980. AC_REQUIRE([AC_PROG_CC])dnl
  981. AC_REQUIRE([AC_PROG_LD])dnl
  982. AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
  983. AC_REQUIRE([AC_PROG_NM])dnl
  984. AC_REQUIRE([AC_PROG_LN_S])dnl
  985. AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
  986. AC_REQUIRE([AC_OBJEXT])dnl
  987. AC_REQUIRE([AC_EXEEXT])dnl
  988. dnl
  989. _LT_AC_PROG_ECHO_BACKSLASH
  990. # Only perform the check for file, if the check method requires it
  991. case $deplibs_check_method in
  992. file_magic*)
  993. if test "$file_magic_cmd" = '$MAGIC_CMD'; then
  994. AC_PATH_MAGIC
  995. fi
  996. ;;
  997. esac
  998. AC_CHECK_TOOL(RANLIB, ranlib, :)
  999. AC_CHECK_TOOL(STRIP, strip, :)
  1000. ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
  1001. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  1002. enable_win32_dll=yes, enable_win32_dll=no)
  1003. AC_ARG_ENABLE(libtool-lock,
  1004. [ --disable-libtool-lock avoid locking (might break parallel builds)])
  1005. test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
  1006. # Some flags need to be propagated to the compiler or linker for good
  1007. # libtool support.
  1008. case $host in
  1009. *-*-irix6*)
  1010. # Find out which ABI we are using.
  1011. echo '[#]line __oline__ "configure"' > conftest.$ac_ext
  1012. if AC_TRY_EVAL(ac_compile); then
  1013. case `/usr/bin/file conftest.$ac_objext` in
  1014. *32-bit*)
  1015. LD="${LD-ld} -32"
  1016. ;;
  1017. *N32*)
  1018. LD="${LD-ld} -n32"
  1019. ;;
  1020. *64-bit*)
  1021. LD="${LD-ld} -64"
  1022. ;;
  1023. esac
  1024. fi
  1025. rm -rf conftest*
  1026. ;;
  1027. *-*-sco3.2v5*)
  1028. # On SCO OpenServer 5, we need -belf to get full-featured binaries.
  1029. SAVE_CFLAGS="$CFLAGS"
  1030. CFLAGS="$CFLAGS -belf"
  1031. AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
  1032. [AC_LANG_SAVE
  1033. AC_LANG_C
  1034. AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
  1035. AC_LANG_RESTORE])
  1036. if test x"$lt_cv_cc_needs_belf" != x"yes"; then
  1037. # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
  1038. CFLAGS="$SAVE_CFLAGS"
  1039. fi
  1040. ;;
  1041. ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
  1042. [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
  1043. AC_CHECK_TOOL(DLLTOOL, dlltool, false)
  1044. AC_CHECK_TOOL(AS, as, false)
  1045. AC_CHECK_TOOL(OBJDUMP, objdump, false)
  1046. # recent cygwin and mingw systems supply a stub DllMain which the user
  1047. # can override, but on older systems we have to supply one
  1048. AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
  1049. [AC_TRY_LINK([],
  1050. [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
  1051. DllMain (0, 0, 0);],
  1052. [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
  1053. case $host/$CC in
  1054. *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
  1055. # old mingw systems require "-dll" to link a DLL, while more recent ones
  1056. # require "-mdll"
  1057. SAVE_CFLAGS="$CFLAGS"
  1058. CFLAGS="$CFLAGS -mdll"
  1059. AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
  1060. [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
  1061. CFLAGS="$SAVE_CFLAGS" ;;
  1062. *-*-cygwin* | *-*-pw32*)
  1063. # cygwin systems need to pass --dll to the linker, and not link
  1064. # crt.o which will require a WinMain@16 definition.
  1065. lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
  1066. esac
  1067. ;;
  1068. ])
  1069. esac
  1070. _LT_AC_LTCONFIG_HACK
  1071. ])
  1072. # AC_LIBTOOL_HEADER_ASSERT
  1073. # ------------------------
  1074. AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
  1075. [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
  1076. [lt_cv_func_assert_works],
  1077. [case $host in
  1078. *-*-solaris*)
  1079. if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
  1080. case `$CC --version 2>/dev/null` in
  1081. [[12]].*) lt_cv_func_assert_works=no ;;
  1082. *) lt_cv_func_assert_works=yes ;;
  1083. esac
  1084. fi
  1085. ;;
  1086. esac])
  1087. if test "x$lt_cv_func_assert_works" = xyes; then
  1088. AC_CHECK_HEADERS(assert.h)
  1089. fi
  1090. ])# AC_LIBTOOL_HEADER_ASSERT
  1091. # _LT_AC_CHECK_DLFCN
  1092. # --------------------
  1093. AC_DEFUN([_LT_AC_CHECK_DLFCN],
  1094. [AC_CHECK_HEADERS(dlfcn.h)
  1095. ])# _LT_AC_CHECK_DLFCN
  1096. # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  1097. # ---------------------------------
  1098. AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
  1099. [AC_REQUIRE([AC_CANONICAL_HOST])
  1100. AC_REQUIRE([AC_PROG_NM])
  1101. AC_REQUIRE([AC_OBJEXT])
  1102. # Check for command to grab the raw symbol name followed by C symbol from nm.
  1103. AC_MSG_CHECKING([command to parse $NM output])
  1104. AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
  1105. # These are sane defaults that work on at least a few old systems.
  1106. # [They come from Ultrix. What could be older than Ultrix?!! ;)]
  1107. # Character class describing NM global symbol codes.
  1108. symcode='[[BCDEGRST]]'
  1109. # Regexp to match symbols that can be accessed directly from C.
  1110. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
  1111. # Transform the above into a raw symbol and a C symbol.
  1112. symxfrm='\1 \2\3 \3'
  1113. # Transform an extracted symbol line into a proper C declaration
  1114. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
  1115. # Transform an extracted symbol line into symbol name and symbol address
  1116. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  1117. # Define system-specific variables.
  1118. case $host_os in
  1119. aix*)
  1120. symcode='[[BCDT]]'
  1121. ;;
  1122. cygwin* | mingw* | pw32*)
  1123. symcode='[[ABCDGISTW]]'
  1124. ;;
  1125. hpux*) # Its linker distinguishes data from code symbols
  1126. lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
  1127. lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
  1128. ;;
  1129. irix*)
  1130. symcode='[[BCDEGRST]]'
  1131. ;;
  1132. solaris* | sysv5*)
  1133. symcode='[[BDT]]'
  1134. ;;
  1135. sysv4)
  1136. symcode='[[DFNSTU]]'
  1137. ;;
  1138. esac
  1139. # Handle CRLF in mingw tool chain
  1140. opt_cr=
  1141. case $host_os in
  1142. mingw*)
  1143. opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
  1144. ;;
  1145. esac
  1146. # If we're using GNU nm, then use its standard symbol codes.
  1147. if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
  1148. symcode='[[ABCDGISTW]]'
  1149. fi
  1150. # Try without a prefix undercore, then with it.
  1151. for ac_symprfx in "" "_"; do
  1152. # Write the raw and C identifiers.
  1153. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
  1154. # Check to see that the pipe works correctly.
  1155. pipe_works=no
  1156. rm -f conftest*
  1157. cat > conftest.$ac_ext <<EOF
  1158. #ifdef __cplusplus
  1159. extern "C" {
  1160. #endif
  1161. char nm_test_var;
  1162. void nm_test_func(){}
  1163. #ifdef __cplusplus
  1164. }
  1165. #endif
  1166. int main(){nm_test_var='a';nm_test_func();return(0);}
  1167. EOF
  1168. if AC_TRY_EVAL(ac_compile); then
  1169. # Now try to grab the symbols.
  1170. nlist=conftest.nm
  1171. if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
  1172. # Try sorting and uniquifying the output.
  1173. if sort "$nlist" | uniq > "$nlist"T; then
  1174. mv -f "$nlist"T "$nlist"
  1175. else
  1176. rm -f "$nlist"T
  1177. fi
  1178. # Make sure that we snagged all the symbols we need.
  1179. if egrep ' nm_test_var$' "$nlist" >/dev/null; then
  1180. if egrep ' nm_test_func$' "$nlist" >/dev/null; then
  1181. cat <<EOF > conftest.$ac_ext
  1182. #ifdef __cplusplus
  1183. extern "C" {
  1184. #endif
  1185. EOF
  1186. # Now generate the symbol file.
  1187. eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
  1188. cat <<EOF >> conftest.$ac_ext
  1189. #if defined (__STDC__) && __STDC__
  1190. # define lt_ptr void *
  1191. #else
  1192. # define lt_ptr char *
  1193. # define const
  1194. #endif
  1195. /* The mapping between symbol names and symbols. */
  1196. const struct {
  1197. const char *name;
  1198. lt_ptr address;
  1199. }
  1200. lt_preloaded_symbols[[]] =
  1201. {
  1202. EOF
  1203. sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
  1204. cat <<\EOF >> conftest.$ac_ext
  1205. {0, (lt_ptr) 0}
  1206. };
  1207. #ifdef __cplusplus
  1208. }
  1209. #endif
  1210. EOF
  1211. # Now try linking the two files.
  1212. mv conftest.$ac_objext conftstm.$ac_objext
  1213. save_LIBS="$LIBS"
  1214. save_CFLAGS="$CFLAGS"
  1215. LIBS="conftstm.$ac_objext"
  1216. CFLAGS="$CFLAGS$no_builtin_flag"
  1217. if AC_TRY_EVAL(ac_link) && test -s conftest; then
  1218. pipe_works=yes
  1219. fi
  1220. LIBS="$save_LIBS"
  1221. CFLAGS="$save_CFLAGS"
  1222. else
  1223. echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
  1224. fi
  1225. else
  1226. echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
  1227. fi
  1228. else
  1229. echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
  1230. fi
  1231. else
  1232. echo "$progname: failed program was:" >&AC_FD_CC
  1233. cat conftest.$ac_ext >&5
  1234. fi
  1235. rm -f conftest* conftst*
  1236. # Do not use the global_symbol_pipe unless it works.
  1237. if test "$pipe_works" = yes; then
  1238. break
  1239. else
  1240. lt_cv_sys_global_symbol_pipe=
  1241. fi
  1242. done
  1243. ])
  1244. global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
  1245. if test -z "$lt_cv_sys_global_symbol_pipe"; then
  1246. global_symbol_to_cdecl=
  1247. global_symbol_to_c_name_address=
  1248. else
  1249. global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
  1250. global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
  1251. fi
  1252. if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
  1253. then
  1254. AC_MSG_RESULT(failed)
  1255. else
  1256. AC_MSG_RESULT(ok)
  1257. fi
  1258. ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
  1259. # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  1260. # ---------------------------------
  1261. AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
  1262. [# Find the correct PATH separator. Usually this is `:', but
  1263. # DJGPP uses `;' like DOS.
  1264. if test "X${PATH_SEPARATOR+set}" != Xset; then
  1265. UNAME=${UNAME-`uname 2>/dev/null`}
  1266. case X$UNAME in
  1267. *-DOS) lt_cv_sys_path_separator=';' ;;
  1268. *) lt_cv_sys_path_separator=':' ;;
  1269. esac
  1270. PATH_SEPARATOR=$lt_cv_sys_path_separator
  1271. fi
  1272. ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  1273. # _LT_AC_PROG_ECHO_BACKSLASH
  1274. # --------------------------
  1275. # Add some code to the start of the generated configure script which
  1276. # will find an echo command which doesn't interpret backslashes.
  1277. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
  1278. [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
  1279. [AC_DIVERT_PUSH(NOTICE)])
  1280. _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
  1281. # Check that we are running under the correct shell.
  1282. SHELL=${CONFIG_SHELL-/bin/sh}
  1283. case X$ECHO in
  1284. X*--fallback-echo)
  1285. # Remove one level of quotation (which was required for Make).
  1286. ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
  1287. ;;
  1288. esac
  1289. echo=${ECHO-echo}
  1290. if test "X[$]1" = X--no-reexec; then
  1291. # Discard the --no-reexec flag, and continue.
  1292. shift
  1293. elif test "X[$]1" = X--fallback-echo; then
  1294. # Avoid inline document here, it may be left over
  1295. :
  1296. elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
  1297. # Yippee, $echo works!
  1298. :
  1299. else
  1300. # Restart under the correct shell.
  1301. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
  1302. fi
  1303. if test "X[$]1" = X--fallback-echo; then
  1304. # used as fallback echo
  1305. shift
  1306. cat <<EOF
  1307. $*
  1308. EOF
  1309. exit 0
  1310. fi
  1311. # The HP-UX ksh and POSIX shell print the target directory to stdout
  1312. # if CDPATH is set.
  1313. if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  1314. if test -z "$ECHO"; then
  1315. if test "X${echo_test_string+set}" != Xset; then
  1316. # find a string as large as possible, as long as the shell can cope with it
  1317. for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
  1318. # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
  1319. if (echo_test_string="`eval $cmd`") 2>/dev/null &&
  1320. echo_test_string="`eval $cmd`" &&
  1321. (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
  1322. then
  1323. break
  1324. fi
  1325. done
  1326. fi
  1327. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  1328. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  1329. test "X$echo_testing_string" = "X$echo_test_string"; then
  1330. :
  1331. else
  1332. # The Solaris, AIX, and Digital Unix default echo programs unquote
  1333. # backslashes. This makes it impossible to quote backslashes using
  1334. # echo "$something" | sed 's/\\/\\\\/g'
  1335. #
  1336. # So, first we look for a working echo in the user's PATH.
  1337. IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  1338. for dir in $PATH /usr/ucb; do
  1339. if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
  1340. test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
  1341. echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
  1342. test "X$echo_testing_string" = "X$echo_test_string"; then
  1343. echo="$dir/echo"
  1344. break
  1345. fi
  1346. done
  1347. IFS="$save_ifs"
  1348. if test "X$echo" = Xecho; then
  1349. # We didn't find a better echo, so look for alternatives.
  1350. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
  1351. echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
  1352. test "X$echo_testing_string" = "X$echo_test_string"; then
  1353. # This shell has a builtin print -r that does the trick.
  1354. echo='print -r'
  1355. elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
  1356. test "X$CONFIG_SHELL" != X/bin/ksh; then
  1357. # If we have ksh, try running configure again with it.
  1358. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
  1359. export ORIGINAL_CONFIG_SHELL
  1360. CONFIG_SHELL=/bin/ksh
  1361. export CONFIG_SHELL
  1362. exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
  1363. else
  1364. # Try using printf.
  1365. echo='printf %s\n'
  1366. if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
  1367. echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
  1368. test "X$echo_testing_string" = "X$echo_test_string"; then
  1369. # Cool, printf works
  1370. :
  1371. elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  1372. test "X$echo_testing_string" = 'X\t' &&
  1373. echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  1374. test "X$echo_testing_string" = "X$echo_test_string"; then
  1375. CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
  1376. export CONFIG_SHELL
  1377. SHELL="$CONFIG_SHELL"
  1378. export SHELL
  1379. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  1380. elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
  1381. test "X$echo_testing_string" = 'X\t' &&
  1382. echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
  1383. test "X$echo_testing_string" = "X$echo_test_string"; then
  1384. echo="$CONFIG_SHELL [$]0 --fallback-echo"
  1385. else
  1386. # maybe with a smaller string...
  1387. prev=:
  1388. for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
  1389. if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
  1390. then
  1391. break
  1392. fi
  1393. prev="$cmd"
  1394. done
  1395. if test "$prev" != 'sed 50q "[$]0"'; then
  1396. echo_test_string=`eval $prev`
  1397. export echo_test_string
  1398. exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
  1399. else
  1400. # Oops. We lost completely, so just stick with echo.
  1401. echo=echo
  1402. fi
  1403. fi
  1404. fi
  1405. fi
  1406. fi
  1407. fi
  1408. # Copy echo and quote the copy suitably for passing to libtool from
  1409. # the Makefile, instead of quoting the original, which is used later.
  1410. ECHO=$echo
  1411. if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
  1412. ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
  1413. fi
  1414. AC_SUBST(ECHO)
  1415. AC_DIVERT_POP
  1416. ])# _LT_AC_PROG_ECHO_BACKSLASH
  1417. # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
  1418. # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
  1419. # ------------------------------------------------------------------
  1420. AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
  1421. [if test "$cross_compiling" = yes; then :
  1422. [$4]
  1423. else
  1424. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  1425. lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  1426. lt_status=$lt_dlunknown
  1427. cat > conftest.$ac_ext <<EOF
  1428. [#line __oline__ "configure"
  1429. #include "confdefs.h"
  1430. #if HAVE_DLFCN_H
  1431. #include <dlfcn.h>
  1432. #endif
  1433. #include <stdio.h>
  1434. #ifdef RTLD_GLOBAL
  1435. # define LT_DLGLOBAL RTLD_GLOBAL
  1436. #else
  1437. # ifdef DL_GLOBAL
  1438. # define LT_DLGLOBAL DL_GLOBAL
  1439. # else
  1440. # define LT_DLGLOBAL 0
  1441. # endif
  1442. #endif
  1443. /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
  1444. find out it does not work in some platform. */
  1445. #ifndef LT_DLLAZY_OR_NOW
  1446. # ifdef RTLD_LAZY
  1447. # define LT_DLLAZY_OR_NOW RTLD_LAZY
  1448. # else
  1449. # ifdef DL_LAZY
  1450. # define LT_DLLAZY_OR_NOW DL_LAZY
  1451. # else
  1452. # ifdef RTLD_NOW
  1453. # define LT_DLLAZY_OR_NOW RTLD_NOW
  1454. # else
  1455. # ifdef DL_NOW
  1456. # define LT_DLLAZY_OR_NOW DL_NOW
  1457. # else
  1458. # define LT_DLLAZY_OR_NOW 0
  1459. # endif
  1460. # endif
  1461. # endif
  1462. # endif
  1463. #endif
  1464. #ifdef __cplusplus
  1465. extern "C" void exit (int);
  1466. #endif
  1467. void fnord() { int i=42;}
  1468. int main ()
  1469. {
  1470. void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
  1471. int status = $lt_dlunknown;
  1472. if (self)
  1473. {
  1474. if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
  1475. else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
  1476. /* dlclose (self); */
  1477. }
  1478. exit (status);
  1479. }]
  1480. EOF
  1481. if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
  1482. (./conftest; exit; ) 2>/dev/null
  1483. lt_status=$?
  1484. case x$lt_status in
  1485. x$lt_dlno_uscore) $1 ;;
  1486. x$lt_dlneed_uscore) $2 ;;
  1487. x$lt_unknown|x*) $3 ;;
  1488. esac
  1489. else :
  1490. # compilation failed
  1491. $3
  1492. fi
  1493. fi
  1494. rm -fr conftest*
  1495. ])# _LT_AC_TRY_DLOPEN_SELF
  1496. # AC_LIBTOOL_DLOPEN_SELF
  1497. # -------------------
  1498. AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
  1499. [if test "x$enable_dlopen" != xyes; then
  1500. enable_dlopen=unknown
  1501. enable_dlopen_self=unknown
  1502. enable_dlopen_self_static=unknown
  1503. else
  1504. lt_cv_dlopen=no
  1505. lt_cv_dlopen_libs=
  1506. case $host_os in
  1507. beos*)
  1508. lt_cv_dlopen="load_add_on"
  1509. lt_cv_dlopen_libs=
  1510. lt_cv_dlopen_self=yes
  1511. ;;
  1512. cygwin* | mingw* | pw32*)
  1513. lt_cv_dlopen="LoadLibrary"
  1514. lt_cv_dlopen_libs=
  1515. ;;
  1516. *)
  1517. AC_CHECK_FUNC([shl_load],
  1518. [lt_cv_dlopen="shl_load"],
  1519. [AC_CHECK_LIB([dld], [shl_load],
  1520. [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
  1521. [AC_CHECK_FUNC([dlopen],
  1522. [lt_cv_dlopen="dlopen"],
  1523. [AC_CHECK_LIB([dl], [dlopen],
  1524. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
  1525. [AC_CHECK_LIB([svld], [dlopen],
  1526. [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
  1527. [AC_CHECK_LIB([dld], [dld_link],
  1528. [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
  1529. ])
  1530. ])
  1531. ])
  1532. ])
  1533. ])
  1534. ;;
  1535. esac
  1536. if test "x$lt_cv_dlopen" != xno; then
  1537. enable_dlopen=yes
  1538. else
  1539. enable_dlopen=no
  1540. fi
  1541. case $lt_cv_dlopen in
  1542. dlopen)
  1543. save_CPPFLAGS="$CPPFLAGS"
  1544. AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
  1545. test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
  1546. save_LDFLAGS="$LDFLAGS"
  1547. eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
  1548. save_LIBS="$LIBS"
  1549. LIBS="$lt_cv_dlopen_libs $LIBS"
  1550. AC_CACHE_CHECK([whether a program can dlopen itself],
  1551. lt_cv_dlopen_self, [dnl
  1552. _LT_AC_TRY_DLOPEN_SELF(
  1553. lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
  1554. lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
  1555. ])
  1556. if test "x$lt_cv_dlopen_self" = xyes; then
  1557. LDFLAGS="$LDFLAGS $link_static_flag"
  1558. AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
  1559. lt_cv_dlopen_self_static, [dnl
  1560. _LT_AC_TRY_DLOPEN_SELF(
  1561. lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
  1562. lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
  1563. ])
  1564. fi
  1565. CPPFLAGS="$save_CPPFLAGS"
  1566. LDFLAGS="$save_LDFLAGS"
  1567. LIBS="$save_LIBS"
  1568. ;;
  1569. esac
  1570. case $lt_cv_dlopen_self in
  1571. yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
  1572. *) enable_dlopen_self=unknown ;;
  1573. esac
  1574. case $lt_cv_dlopen_self_static in
  1575. yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
  1576. *) enable_dlopen_self_static=unknown ;;
  1577. esac
  1578. fi
  1579. ])# AC_LIBTOOL_DLOPEN_SELF
  1580. AC_DEFUN([_LT_AC_LTCONFIG_HACK],
  1581. [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
  1582. # Sed substitution that helps us do robust quoting. It backslashifies
  1583. # metacharacters that are still active within double-quoted strings.
  1584. Xsed='sed -e s/^X//'
  1585. sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
  1586. # Same as above, but do not quote variable references.
  1587. double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
  1588. # Sed substitution to delay expansion of an escaped shell variable in a
  1589. # double_quote_subst'ed string.
  1590. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
  1591. # Constants:
  1592. rm="rm -f"
  1593. # Global variables:
  1594. default_ofile=libtool
  1595. can_build_shared=yes
  1596. # All known linkers require a `.a' archive for static linking (except M$VC,
  1597. # which needs '.lib').
  1598. libext=a
  1599. ltmain="$ac_aux_dir/ltmain.sh"
  1600. ofile="$default_ofile"
  1601. with_gnu_ld="$lt_cv_prog_gnu_ld"
  1602. need_locks="$enable_libtool_lock"
  1603. old_CC="$CC"
  1604. old_CFLAGS="$CFLAGS"
  1605. # Set sane defaults for various variables
  1606. test -z "$AR" && AR=ar
  1607. test -z "$AR_FLAGS" && AR_FLAGS=cru
  1608. test -z "$AS" && AS=as
  1609. test -z "$CC" && CC=cc
  1610. test -z "$DLLTOOL" && DLLTOOL=dlltool
  1611. test -z "$LD" && LD=ld
  1612. test -z "$LN_S" && LN_S="ln -s"
  1613. test -z "$MAGIC_CMD" && MAGIC_CMD=file
  1614. test -z "$NM" && NM=nm
  1615. test -z "$OBJDUMP" && OBJDUMP=objdump
  1616. test -z "$RANLIB" && RANLIB=:
  1617. test -z "$STRIP" && STRIP=:
  1618. test -z "$ac_objext" && ac_objext=o
  1619. if test x"$host" != x"$build"; then
  1620. ac_tool_prefix=${host_alias}-
  1621. else
  1622. ac_tool_prefix=
  1623. fi
  1624. # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
  1625. case $host_os in
  1626. linux-gnu*) ;;
  1627. linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
  1628. esac
  1629. case $host_os in
  1630. aix3*)
  1631. # AIX sometimes has problems with the GCC collect2 program. For some
  1632. # reason, if we set the COLLECT_NAMES environment variable, the problems
  1633. # vanish in a puff of smoke.
  1634. if test "X${COLLECT_NAMES+set}" != Xset; then
  1635. COLLECT_NAMES=
  1636. export COLLECT_NAMES
  1637. fi
  1638. ;;
  1639. esac
  1640. # Determine commands to create old-style static archives.
  1641. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
  1642. old_postinstall_cmds='chmod 644 $oldlib'
  1643. old_postuninstall_cmds=
  1644. if test -n "$RANLIB"; then
  1645. case $host_os in
  1646. openbsd*)
  1647. old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
  1648. ;;
  1649. *)
  1650. old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
  1651. ;;
  1652. esac
  1653. old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
  1654. fi
  1655. # Allow CC to be a program name with arguments.
  1656. set dummy $CC
  1657. compiler="[$]2"
  1658. AC_MSG_CHECKING([for objdir])
  1659. rm -f .libs 2>/dev/null
  1660. mkdir .libs 2>/dev/null
  1661. if test -d .libs; then
  1662. objdir=.libs
  1663. else
  1664. # MS-DOS does not allow filenames that begin with a dot.
  1665. objdir=_libs
  1666. fi
  1667. rmdir .libs 2>/dev/null
  1668. AC_MSG_RESULT($objdir)
  1669. AC_ARG_WITH(pic,
  1670. [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
  1671. pic_mode="$withval", pic_mode=default)
  1672. test -z "$pic_mode" && pic_mode=default
  1673. # We assume here that the value for lt_cv_prog_cc_pic will not be cached
  1674. # in isolation, and that seeing it set (from the cache) indicates that
  1675. # the associated values are set (in the cache) correctly too.
  1676. AC_MSG_CHECKING([for $compiler option to produce PIC])
  1677. AC_CACHE_VAL(lt_cv_prog_cc_pic,
  1678. [ lt_cv_prog_cc_pic=
  1679. lt_cv_prog_cc_shlib=
  1680. lt_cv_prog_cc_wl=
  1681. lt_cv_prog_cc_static=
  1682. lt_cv_prog_cc_no_builtin=
  1683. lt_cv_prog_cc_can_build_shared=$can_build_shared
  1684. if test "$GCC" = yes; then
  1685. lt_cv_prog_cc_wl='-Wl,'
  1686. lt_cv_prog_cc_static='-static'
  1687. case $host_os in
  1688. aix*)
  1689. # Below there is a dirty hack to force normal static linking with -ldl
  1690. # The problem is because libdl dynamically linked with both libc and
  1691. # libC (AIX C++ library), which obviously doesn't included in libraries
  1692. # list by gcc. This cause undefined symbols with -static flags.
  1693. # This hack allows C programs to be linked with "-static -ldl", but
  1694. # not sure about C++ programs.
  1695. lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
  1696. ;;
  1697. amigaos*)
  1698. # FIXME: we need at least 68020 code to build shared libraries, but
  1699. # adding the `-m68020' flag to GCC prevents building anything better,
  1700. # like `-m68040'.
  1701. lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
  1702. ;;
  1703. beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
  1704. # PIC is the default for these OSes.
  1705. ;;
  1706. darwin* | rhapsody*)
  1707. # PIC is the default on this platform
  1708. # Common symbols not allowed in MH_DYLIB files
  1709. lt_cv_prog_cc_pic='-fno-common'
  1710. ;;
  1711. cygwin* | mingw* | pw32* | os2*)
  1712. # This hack is so that the source file can tell whether it is being
  1713. # built for inclusion in a dll (and should export symbols for example).
  1714. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1715. ;;
  1716. sysv4*MP*)
  1717. if test -d /usr/nec; then
  1718. lt_cv_prog_cc_pic=-Kconform_pic
  1719. fi
  1720. ;;
  1721. *)
  1722. lt_cv_prog_cc_pic='-fPIC'
  1723. ;;
  1724. esac
  1725. else
  1726. # PORTME Check for PIC flags for the system compiler.
  1727. case $host_os in
  1728. aix3* | aix4* | aix5*)
  1729. lt_cv_prog_cc_wl='-Wl,'
  1730. # All AIX code is PIC.
  1731. if test "$host_cpu" = ia64; then
  1732. # AIX 5 now supports IA64 processor
  1733. lt_cv_prog_cc_static='-Bstatic'
  1734. else
  1735. lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
  1736. fi
  1737. ;;
  1738. hpux9* | hpux10* | hpux11*)
  1739. # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
  1740. lt_cv_prog_cc_wl='-Wl,'
  1741. lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
  1742. lt_cv_prog_cc_pic='+Z'
  1743. ;;
  1744. irix5* | irix6*)
  1745. lt_cv_prog_cc_wl='-Wl,'
  1746. lt_cv_prog_cc_static='-non_shared'
  1747. # PIC (with -KPIC) is the default.
  1748. ;;
  1749. cygwin* | mingw* | pw32* | os2*)
  1750. # This hack is so that the source file can tell whether it is being
  1751. # built for inclusion in a dll (and should export symbols for example).
  1752. lt_cv_prog_cc_pic='-DDLL_EXPORT'
  1753. ;;
  1754. newsos6)
  1755. lt_cv_prog_cc_pic='-KPIC'
  1756. lt_cv_prog_cc_static='-Bstatic'
  1757. ;;
  1758. osf3* | osf4* | osf5*)
  1759. # All OSF/1 code is PIC.
  1760. lt_cv_prog_cc_wl='-Wl,'
  1761. lt_cv_prog_cc_static='-non_shared'
  1762. ;;
  1763. sco3.2v5*)
  1764. lt_cv_prog_cc_pic='-Kpic'
  1765. lt_cv_prog_cc_static='-dn'
  1766. lt_cv_prog_cc_shlib='-belf'
  1767. ;;
  1768. solaris*)
  1769. lt_cv_prog_cc_pic='-KPIC'
  1770. lt_cv_prog_cc_static='-Bstatic'
  1771. lt_cv_prog_cc_wl='-Wl,'
  1772. ;;
  1773. sunos4*)
  1774. lt_cv_prog_cc_pic='-PIC'
  1775. lt_cv_prog_cc_static='-Bstatic'
  1776. lt_cv_prog_cc_wl='-Qoption ld '
  1777. ;;
  1778. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  1779. lt_cv_prog_cc_pic='-KPIC'
  1780. lt_cv_prog_cc_static='-Bstatic'
  1781. if test "x$host_vendor" = xsni; then
  1782. lt_cv_prog_cc_wl='-LD'
  1783. else
  1784. lt_cv_prog_cc_wl='-Wl,'
  1785. fi
  1786. ;;
  1787. uts4*)
  1788. lt_cv_prog_cc_pic='-pic'
  1789. lt_cv_prog_cc_static='-Bstatic'
  1790. ;;
  1791. sysv4*MP*)
  1792. if test -d /usr/nec ;then
  1793. lt_cv_prog_cc_pic='-Kconform_pic'
  1794. lt_cv_prog_cc_static='-Bstatic'
  1795. fi
  1796. ;;
  1797. *)
  1798. lt_cv_prog_cc_can_build_shared=no
  1799. ;;
  1800. esac
  1801. fi
  1802. ])
  1803. if test -z "$lt_cv_prog_cc_pic"; then
  1804. AC_MSG_RESULT([none])
  1805. else
  1806. AC_MSG_RESULT([$lt_cv_prog_cc_pic])
  1807. # Check to make sure the pic_flag actually works.
  1808. AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
  1809. AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
  1810. save_CFLAGS="$CFLAGS"
  1811. CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
  1812. AC_TRY_COMPILE([], [], [dnl
  1813. case $host_os in
  1814. hpux9* | hpux10* | hpux11*)
  1815. # On HP-UX, both CC and GCC only warn that PIC is supported... then
  1816. # they create non-PIC objects. So, if there were any warnings, we
  1817. # assume that PIC is not supported.
  1818. if test -s conftest.err; then
  1819. lt_cv_prog_cc_pic_works=no
  1820. else
  1821. lt_cv_prog_cc_pic_works=yes
  1822. fi
  1823. ;;
  1824. *)
  1825. lt_cv_prog_cc_pic_works=yes
  1826. ;;
  1827. esac
  1828. ], [dnl
  1829. lt_cv_prog_cc_pic_works=no
  1830. ])
  1831. CFLAGS="$save_CFLAGS"
  1832. ])
  1833. if test "X$lt_cv_prog_cc_pic_works" = Xno; then
  1834. lt_cv_prog_cc_pic=
  1835. lt_cv_prog_cc_can_build_shared=no
  1836. else
  1837. lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
  1838. fi
  1839. AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
  1840. fi
  1841. # Check for any special shared library compilation flags.
  1842. if test -n "$lt_cv_prog_cc_shlib"; then
  1843. AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
  1844. if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
  1845. else
  1846. AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
  1847. lt_cv_prog_cc_can_build_shared=no
  1848. fi
  1849. fi
  1850. AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
  1851. AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
  1852. lt_cv_prog_cc_static_works=no
  1853. save_LDFLAGS="$LDFLAGS"
  1854. LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
  1855. AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
  1856. LDFLAGS="$save_LDFLAGS"
  1857. ])
  1858. # Belt *and* braces to stop my trousers falling down:
  1859. test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
  1860. AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
  1861. pic_flag="$lt_cv_prog_cc_pic"
  1862. special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
  1863. wl="$lt_cv_prog_cc_wl"
  1864. link_static_flag="$lt_cv_prog_cc_static"
  1865. no_builtin_flag="$lt_cv_prog_cc_no_builtin"
  1866. can_build_shared="$lt_cv_prog_cc_can_build_shared"
  1867. # Check to see if options -o and -c are simultaneously supported by compiler
  1868. AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
  1869. AC_CACHE_VAL([lt_cv_compiler_c_o], [
  1870. $rm -r conftest 2>/dev/null
  1871. mkdir conftest
  1872. cd conftest
  1873. echo "int some_variable = 0;" > conftest.$ac_ext
  1874. mkdir out
  1875. # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
  1876. # that will create temporary files in the current directory regardless of
  1877. # the output directory. Thus, making CWD read-only will cause this test
  1878. # to fail, enabling locking or at least warning the user not to do parallel
  1879. # builds.
  1880. chmod -w .
  1881. save_CFLAGS="$CFLAGS"
  1882. CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
  1883. compiler_c_o=no
  1884. if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
  1885. # The compiler can only warn and ignore the option if not recognized
  1886. # So say no if there are warnings
  1887. if test -s out/conftest.err; then
  1888. lt_cv_compiler_c_o=no
  1889. else
  1890. lt_cv_compiler_c_o=yes
  1891. fi
  1892. else
  1893. # Append any errors to the config.log.
  1894. cat out/conftest.err 1>&AC_FD_CC
  1895. lt_cv_compiler_c_o=no
  1896. fi
  1897. CFLAGS="$save_CFLAGS"
  1898. chmod u+w .
  1899. $rm conftest* out/*
  1900. rmdir out
  1901. cd ..
  1902. rmdir conftest
  1903. $rm -r conftest 2>/dev/null
  1904. ])
  1905. compiler_c_o=$lt_cv_compiler_c_o
  1906. AC_MSG_RESULT([$compiler_c_o])
  1907. if test x"$compiler_c_o" = x"yes"; then
  1908. # Check to see if we can write to a .lo
  1909. AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
  1910. AC_CACHE_VAL([lt_cv_compiler_o_lo], [
  1911. lt_cv_compiler_o_lo=no
  1912. save_CFLAGS="$CFLAGS"
  1913. CFLAGS="$CFLAGS -c -o conftest.lo"
  1914. save_objext="$ac_objext"
  1915. ac_objext=lo
  1916. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1917. # The compiler can only warn and ignore the option if not recognized
  1918. # So say no if there are warnings
  1919. if test -s conftest.err; then
  1920. lt_cv_compiler_o_lo=no
  1921. else
  1922. lt_cv_compiler_o_lo=yes
  1923. fi
  1924. ])
  1925. ac_objext="$save_objext"
  1926. CFLAGS="$save_CFLAGS"
  1927. ])
  1928. compiler_o_lo=$lt_cv_compiler_o_lo
  1929. AC_MSG_RESULT([$compiler_o_lo])
  1930. else
  1931. compiler_o_lo=no
  1932. fi
  1933. # Check to see if we can do hard links to lock some files if needed
  1934. hard_links="nottested"
  1935. if test "$compiler_c_o" = no && test "$need_locks" != no; then
  1936. # do not overwrite the value of need_locks provided by the user
  1937. AC_MSG_CHECKING([if we can lock with hard links])
  1938. hard_links=yes
  1939. $rm conftest*
  1940. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1941. touch conftest.a
  1942. ln conftest.a conftest.b 2>&5 || hard_links=no
  1943. ln conftest.a conftest.b 2>/dev/null && hard_links=no
  1944. AC_MSG_RESULT([$hard_links])
  1945. if test "$hard_links" = no; then
  1946. AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
  1947. need_locks=warn
  1948. fi
  1949. else
  1950. need_locks=no
  1951. fi
  1952. if test "$GCC" = yes; then
  1953. # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
  1954. AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
  1955. echo "int some_variable = 0;" > conftest.$ac_ext
  1956. save_CFLAGS="$CFLAGS"
  1957. CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
  1958. compiler_rtti_exceptions=no
  1959. AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
  1960. # The compiler can only warn and ignore the option if not recognized
  1961. # So say no if there are warnings
  1962. if test -s conftest.err; then
  1963. compiler_rtti_exceptions=no
  1964. else
  1965. compiler_rtti_exceptions=yes
  1966. fi
  1967. ])
  1968. CFLAGS="$save_CFLAGS"
  1969. AC_MSG_RESULT([$compiler_rtti_exceptions])
  1970. if test "$compiler_rtti_exceptions" = "yes"; then
  1971. no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
  1972. else
  1973. no_builtin_flag=' -fno-builtin'
  1974. fi
  1975. fi
  1976. # See if the linker supports building shared libraries.
  1977. AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
  1978. allow_undefined_flag=
  1979. no_undefined_flag=
  1980. need_lib_prefix=unknown
  1981. need_version=unknown
  1982. # when you set need_version to no, make sure it does not cause -set_version
  1983. # flags to be left without arguments
  1984. archive_cmds=
  1985. archive_expsym_cmds=
  1986. old_archive_from_new_cmds=
  1987. old_archive_from_expsyms_cmds=
  1988. export_dynamic_flag_spec=
  1989. whole_archive_flag_spec=
  1990. thread_safe_flag_spec=
  1991. hardcode_into_libs=no
  1992. hardcode_libdir_flag_spec=
  1993. hardcode_libdir_separator=
  1994. hardcode_direct=no
  1995. hardcode_minus_L=no
  1996. hardcode_shlibpath_var=unsupported
  1997. runpath_var=
  1998. link_all_deplibs=unknown
  1999. always_export_symbols=no
  2000. export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
  2001. # include_expsyms should be a list of space-separated symbols to be *always*
  2002. # included in the symbol list
  2003. include_expsyms=
  2004. # exclude_expsyms can be an egrep regular expression of symbols to exclude
  2005. # it will be wrapped by ` (' and `)$', so one must not match beginning or
  2006. # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
  2007. # as well as any symbol that contains `d'.
  2008. exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
  2009. # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
  2010. # platforms (ab)use it in PIC code, but their linkers get confused if
  2011. # the symbol is explicitly referenced. Since portable code cannot
  2012. # rely on this symbol name, it's probably fine to never include it in
  2013. # preloaded symbol tables.
  2014. extract_expsyms_cmds=
  2015. case $host_os in
  2016. cygwin* | mingw* | pw32*)
  2017. # FIXME: the MSVC++ port hasn't been tested in a loooong time
  2018. # When not using gcc, we currently assume that we are using
  2019. # Microsoft Visual C++.
  2020. if test "$GCC" != yes; then
  2021. with_gnu_ld=no
  2022. fi
  2023. ;;
  2024. openbsd*)
  2025. with_gnu_ld=no
  2026. ;;
  2027. esac
  2028. ld_shlibs=yes
  2029. if test "$with_gnu_ld" = yes; then
  2030. # If archive_cmds runs LD, not CC, wlarc should be empty
  2031. wlarc='${wl}'
  2032. # See if GNU ld supports shared libraries.
  2033. case $host_os in
  2034. aix3* | aix4* | aix5*)
  2035. # On AIX, the GNU linker is very broken
  2036. # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
  2037. ld_shlibs=no
  2038. cat <<EOF 1>&2
  2039. *** Warning: the GNU linker, at least up to release 2.9.1, is reported
  2040. *** to be unable to reliably create shared libraries on AIX.
  2041. *** Therefore, libtool is disabling shared libraries support. If you
  2042. *** really care for shared libraries, you may want to modify your PATH
  2043. *** so that a non-GNU linker is found, and then restart.
  2044. EOF
  2045. ;;
  2046. amigaos*)
  2047. archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  2048. hardcode_libdir_flag_spec='-L$libdir'
  2049. hardcode_minus_L=yes
  2050. # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
  2051. # that the semantics of dynamic libraries on AmigaOS, at least up
  2052. # to version 4, is to share data among multiple programs linked
  2053. # with the same dynamic library. Since this doesn't match the
  2054. # behavior of shared libraries on other platforms, we can use
  2055. # them.
  2056. ld_shlibs=no
  2057. ;;
  2058. beos*)
  2059. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  2060. allow_undefined_flag=unsupported
  2061. # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
  2062. # support --undefined. This deserves some investigation. FIXME
  2063. archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2064. else
  2065. ld_shlibs=no
  2066. fi
  2067. ;;
  2068. cygwin* | mingw* | pw32*)
  2069. # hardcode_libdir_flag_spec is actually meaningless, as there is
  2070. # no search path for DLLs.
  2071. hardcode_libdir_flag_spec='-L$libdir'
  2072. allow_undefined_flag=unsupported
  2073. always_export_symbols=yes
  2074. extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
  2075. sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
  2076. test -f $output_objdir/impgen.exe || (cd $output_objdir && \
  2077. if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
  2078. else $CC -o impgen impgen.c ; fi)~
  2079. $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
  2080. old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
  2081. # cygwin and mingw dlls have different entry points and sets of symbols
  2082. # to exclude.
  2083. # FIXME: what about values for MSVC?
  2084. dll_entry=__cygwin_dll_entry@12
  2085. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
  2086. case $host_os in
  2087. mingw*)
  2088. # mingw values
  2089. dll_entry=_DllMainCRTStartup@12
  2090. dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
  2091. ;;
  2092. esac
  2093. # mingw and cygwin differ, and it's simplest to just exclude the union
  2094. # of the two symbol sets.
  2095. dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
  2096. # recent cygwin and mingw systems supply a stub DllMain which the user
  2097. # can override, but on older systems we have to supply one (in ltdll.c)
  2098. if test "x$lt_cv_need_dllmain" = "xyes"; then
  2099. ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
  2100. ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
  2101. test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
  2102. else
  2103. ltdll_obj=
  2104. ltdll_cmds=
  2105. fi
  2106. # Extract the symbol export list from an `--export-all' def file,
  2107. # then regenerate the def file from the symbol export list, so that
  2108. # the compiled dll only exports the symbol export list.
  2109. # Be careful not to strip the DATA tag left be newer dlltools.
  2110. export_symbols_cmds="$ltdll_cmds"'
  2111. $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
  2112. sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
  2113. # If the export-symbols file already is a .def file (1st line
  2114. # is EXPORTS), use it as is.
  2115. # If DATA tags from a recent dlltool are present, honour them!
  2116. archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
  2117. cp $export_symbols $output_objdir/$soname-def;
  2118. else
  2119. echo EXPORTS > $output_objdir/$soname-def;
  2120. _lt_hint=1;
  2121. cat $export_symbols | while read symbol; do
  2122. set dummy \$symbol;
  2123. case \[$]# in
  2124. 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
  2125. *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
  2126. esac;
  2127. _lt_hint=`expr 1 + \$_lt_hint`;
  2128. done;
  2129. fi~
  2130. '"$ltdll_cmds"'
  2131. $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  2132. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
  2133. $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
  2134. $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
  2135. $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
  2136. ;;
  2137. netbsd*)
  2138. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2139. archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
  2140. wlarc=
  2141. else
  2142. archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2143. archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2144. fi
  2145. ;;
  2146. solaris* | sysv5*)
  2147. if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
  2148. ld_shlibs=no
  2149. cat <<EOF 1>&2
  2150. *** Warning: The releases 2.8.* of the GNU linker cannot reliably
  2151. *** create shared libraries on Solaris systems. Therefore, libtool
  2152. *** is disabling shared libraries support. We urge you to upgrade GNU
  2153. *** binutils to release 2.9.1 or newer. Another option is to modify
  2154. *** your PATH or compiler configuration so that the native linker is
  2155. *** used, and then restart.
  2156. EOF
  2157. elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  2158. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2159. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2160. else
  2161. ld_shlibs=no
  2162. fi
  2163. ;;
  2164. sunos4*)
  2165. archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  2166. wlarc=
  2167. hardcode_direct=yes
  2168. hardcode_shlibpath_var=no
  2169. ;;
  2170. *)
  2171. if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
  2172. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
  2173. archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
  2174. else
  2175. ld_shlibs=no
  2176. fi
  2177. ;;
  2178. esac
  2179. if test "$ld_shlibs" = yes; then
  2180. runpath_var=LD_RUN_PATH
  2181. hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
  2182. export_dynamic_flag_spec='${wl}--export-dynamic'
  2183. case $host_os in
  2184. cygwin* | mingw* | pw32*)
  2185. # dlltool doesn't understand --whole-archive et. al.
  2186. whole_archive_flag_spec=
  2187. ;;
  2188. *)
  2189. # ancient GNU ld didn't support --whole-archive et. al.
  2190. if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
  2191. whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
  2192. else
  2193. whole_archive_flag_spec=
  2194. fi
  2195. ;;
  2196. esac
  2197. fi
  2198. else
  2199. # PORTME fill in a description of your system's linker (not GNU ld)
  2200. case $host_os in
  2201. aix3*)
  2202. allow_undefined_flag=unsupported
  2203. always_export_symbols=yes
  2204. archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
  2205. # Note: this linker hardcodes the directories in LIBPATH if there
  2206. # are no directories specified by -L.
  2207. hardcode_minus_L=yes
  2208. if test "$GCC" = yes && test -z "$link_static_flag"; then
  2209. # Neither direct hardcoding nor static linking is supported with a
  2210. # broken collect2.
  2211. hardcode_direct=unsupported
  2212. fi
  2213. ;;
  2214. aix4* | aix5*)
  2215. if test "$host_cpu" = ia64; then
  2216. # On IA64, the linker does run time linking by default, so we don't
  2217. # have to do anything special.
  2218. aix_use_runtimelinking=no
  2219. exp_sym_flag='-Bexport'
  2220. no_entry_flag=""
  2221. else
  2222. aix_use_runtimelinking=no
  2223. # Test if we are trying to use run time linking or normal
  2224. # AIX style linking. If -brtl is somewhere in LDFLAGS, we
  2225. # need to do runtime linking.
  2226. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
  2227. for ld_flag in $LDFLAGS; do
  2228. if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
  2229. aix_use_runtimelinking=yes
  2230. break
  2231. fi
  2232. done
  2233. esac
  2234. exp_sym_flag='-bexport'
  2235. no_entry_flag='-bnoentry'
  2236. fi
  2237. # When large executables or shared objects are built, AIX ld can
  2238. # have problems creating the table of contents. If linking a library
  2239. # or program results in "error TOC overflow" add -mminimal-toc to
  2240. # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
  2241. # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
  2242. hardcode_direct=yes
  2243. archive_cmds=''
  2244. hardcode_libdir_separator=':'
  2245. if test "$GCC" = yes; then
  2246. case $host_os in aix4.[[012]]|aix4.[[012]].*)
  2247. collect2name=`${CC} -print-prog-name=collect2`
  2248. if test -f "$collect2name" && \
  2249. strings "$collect2name" | grep resolve_lib_name >/dev/null
  2250. then
  2251. # We have reworked collect2
  2252. hardcode_direct=yes
  2253. else
  2254. # We have old collect2
  2255. hardcode_direct=unsupported
  2256. # It fails to find uninstalled libraries when the uninstalled
  2257. # path is not listed in the libpath. Setting hardcode_minus_L
  2258. # to unsupported forces relinking
  2259. hardcode_minus_L=yes
  2260. hardcode_libdir_flag_spec='-L$libdir'
  2261. hardcode_libdir_separator=
  2262. fi
  2263. esac
  2264. shared_flag='-shared'
  2265. else
  2266. # not using gcc
  2267. if test "$host_cpu" = ia64; then
  2268. shared_flag='${wl}-G'
  2269. else
  2270. if test "$aix_use_runtimelinking" = yes; then
  2271. shared_flag='${wl}-G'
  2272. else
  2273. shared_flag='${wl}-bM:SRE'
  2274. fi
  2275. fi
  2276. fi
  2277. # It seems that -bexpall can do strange things, so it is better to
  2278. # generate a list of symbols to export.
  2279. always_export_symbols=yes
  2280. if test "$aix_use_runtimelinking" = yes; then
  2281. # Warning - without using the other runtime loading flags (-brtl),
  2282. # -berok will link without error, but may produce a broken library.
  2283. allow_undefined_flag='-berok'
  2284. hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
  2285. archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
  2286. else
  2287. if test "$host_cpu" = ia64; then
  2288. hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
  2289. allow_undefined_flag="-z nodefs"
  2290. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
  2291. else
  2292. hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
  2293. # Warning - without using the other run time loading flags,
  2294. # -berok will link without error, but may produce a broken library.
  2295. allow_undefined_flag='${wl}-berok'
  2296. # This is a bit strange, but is similar to how AIX traditionally builds
  2297. # it's shared libraries.
  2298. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
  2299. fi
  2300. fi
  2301. ;;
  2302. amigaos*)
  2303. archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
  2304. hardcode_libdir_flag_spec='-L$libdir'
  2305. hardcode_minus_L=yes
  2306. # see comment about different semantics on the GNU ld section
  2307. ld_shlibs=no
  2308. ;;
  2309. cygwin* | mingw* | pw32*)
  2310. # When not using gcc, we currently assume that we are using
  2311. # Microsoft Visual C++.
  2312. # hardcode_libdir_flag_spec is actually meaningless, as there is
  2313. # no search path for DLLs.
  2314. hardcode_libdir_flag_spec=' '
  2315. allow_undefined_flag=unsupported
  2316. # Tell ltmain to make .lib files, not .a files.
  2317. libext=lib
  2318. # FIXME: Setting linknames here is a bad hack.
  2319. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
  2320. # The linker will automatically build a .lib file if we build a DLL.
  2321. old_archive_from_new_cmds='true'
  2322. # FIXME: Should let the user specify the lib program.
  2323. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
  2324. fix_srcfile_path='`cygpath -w "$srcfile"`'
  2325. ;;
  2326. darwin* | rhapsody*)
  2327. case "$host_os" in
  2328. rhapsody* | darwin1.[[012]])
  2329. allow_undefined_flag='-undefined suppress'
  2330. ;;
  2331. *) # Darwin 1.3 on
  2332. allow_undefined_flag='-flat_namespace -undefined suppress'
  2333. ;;
  2334. esac
  2335. # FIXME: Relying on posixy $() will cause problems for
  2336. # cross-compilation, but unfortunately the echo tests do not
  2337. # yet detect zsh echo's removal of \ escapes.
  2338. archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
  2339. # We need to add '_' to the symbols in $export_symbols first
  2340. #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
  2341. hardcode_direct=yes
  2342. hardcode_shlibpath_var=no
  2343. whole_archive_flag_spec='-all_load $convenience'
  2344. ;;
  2345. freebsd1*)
  2346. ld_shlibs=no
  2347. ;;
  2348. # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
  2349. # support. Future versions do this automatically, but an explicit c++rt0.o
  2350. # does not break anything, and helps significantly (at the cost of a little
  2351. # extra space).
  2352. freebsd2.2*)
  2353. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
  2354. hardcode_libdir_flag_spec='-R$libdir'
  2355. hardcode_direct=yes
  2356. hardcode_shlibpath_var=no
  2357. ;;
  2358. # Unfortunately, older versions of FreeBSD 2 do not have this feature.
  2359. freebsd2*)
  2360. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  2361. hardcode_direct=yes
  2362. hardcode_minus_L=yes
  2363. hardcode_shlibpath_var=no
  2364. ;;
  2365. # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
  2366. freebsd*)
  2367. archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
  2368. hardcode_libdir_flag_spec='-R$libdir'
  2369. hardcode_direct=yes
  2370. hardcode_shlibpath_var=no
  2371. ;;
  2372. hpux9* | hpux10* | hpux11*)
  2373. case $host_os in
  2374. hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
  2375. *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
  2376. esac
  2377. hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
  2378. hardcode_libdir_separator=:
  2379. hardcode_direct=yes
  2380. hardcode_minus_L=yes # Not in the search PATH, but as the default
  2381. # location of the library.
  2382. export_dynamic_flag_spec='${wl}-E'
  2383. ;;
  2384. irix5* | irix6*)
  2385. if test "$GCC" = yes; then
  2386. archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2387. else
  2388. archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  2389. fi
  2390. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  2391. hardcode_libdir_separator=:
  2392. link_all_deplibs=yes
  2393. ;;
  2394. netbsd*)
  2395. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2396. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
  2397. else
  2398. archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
  2399. fi
  2400. hardcode_libdir_flag_spec='-R$libdir'
  2401. hardcode_direct=yes
  2402. hardcode_shlibpath_var=no
  2403. ;;
  2404. newsos6)
  2405. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2406. hardcode_direct=yes
  2407. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  2408. hardcode_libdir_separator=:
  2409. hardcode_shlibpath_var=no
  2410. ;;
  2411. openbsd*)
  2412. hardcode_direct=yes
  2413. hardcode_shlibpath_var=no
  2414. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2415. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
  2416. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  2417. export_dynamic_flag_spec='${wl}-E'
  2418. else
  2419. case "$host_os" in
  2420. openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
  2421. archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
  2422. hardcode_libdir_flag_spec='-R$libdir'
  2423. ;;
  2424. *)
  2425. archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
  2426. hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
  2427. ;;
  2428. esac
  2429. fi
  2430. ;;
  2431. os2*)
  2432. hardcode_libdir_flag_spec='-L$libdir'
  2433. hardcode_minus_L=yes
  2434. allow_undefined_flag=unsupported
  2435. archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
  2436. old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
  2437. ;;
  2438. osf3*)
  2439. if test "$GCC" = yes; then
  2440. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  2441. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2442. else
  2443. allow_undefined_flag=' -expect_unresolved \*'
  2444. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  2445. fi
  2446. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  2447. hardcode_libdir_separator=:
  2448. ;;
  2449. osf4* | osf5*) # as osf3* with the addition of -msym flag
  2450. if test "$GCC" = yes; then
  2451. allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
  2452. archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
  2453. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  2454. else
  2455. allow_undefined_flag=' -expect_unresolved \*'
  2456. archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
  2457. archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
  2458. $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
  2459. #Both c and cxx compiler support -rpath directly
  2460. hardcode_libdir_flag_spec='-rpath $libdir'
  2461. fi
  2462. hardcode_libdir_separator=:
  2463. ;;
  2464. sco3.2v5*)
  2465. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2466. hardcode_shlibpath_var=no
  2467. runpath_var=LD_RUN_PATH
  2468. hardcode_runpath_var=yes
  2469. export_dynamic_flag_spec='${wl}-Bexport'
  2470. ;;
  2471. solaris*)
  2472. # gcc --version < 3.0 without binutils cannot create self contained
  2473. # shared libraries reliably, requiring libgcc.a to resolve some of
  2474. # the object symbols generated in some cases. Libraries that use
  2475. # assert need libgcc.a to resolve __eprintf, for example. Linking
  2476. # a copy of libgcc.a into every shared library to guarantee resolving
  2477. # such symbols causes other problems: According to Tim Van Holder
  2478. # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
  2479. # (to the application) exception stack for one thing.
  2480. no_undefined_flag=' -z defs'
  2481. if test "$GCC" = yes; then
  2482. case `$CC --version 2>/dev/null` in
  2483. [[12]].*)
  2484. cat <<EOF 1>&2
  2485. *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
  2486. *** create self contained shared libraries on Solaris systems, without
  2487. *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
  2488. *** -no-undefined support, which will at least allow you to build shared
  2489. *** libraries. However, you may find that when you link such libraries
  2490. *** into an application without using GCC, you have to manually add
  2491. *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
  2492. *** upgrade to a newer version of GCC. Another option is to rebuild your
  2493. *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
  2494. EOF
  2495. no_undefined_flag=
  2496. ;;
  2497. esac
  2498. fi
  2499. # $CC -shared without GNU ld will not create a library from C++
  2500. # object files and a static libstdc++, better avoid it by now
  2501. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2502. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2503. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  2504. hardcode_libdir_flag_spec='-R$libdir'
  2505. hardcode_shlibpath_var=no
  2506. case $host_os in
  2507. solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
  2508. *) # Supported since Solaris 2.6 (maybe 2.5.1?)
  2509. whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
  2510. esac
  2511. link_all_deplibs=yes
  2512. ;;
  2513. sunos4*)
  2514. if test "x$host_vendor" = xsequent; then
  2515. # Use $CC to link under sequent, because it throws in some extra .o
  2516. # files that make .init and .fini sections work.
  2517. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
  2518. else
  2519. archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
  2520. fi
  2521. hardcode_libdir_flag_spec='-L$libdir'
  2522. hardcode_direct=yes
  2523. hardcode_minus_L=yes
  2524. hardcode_shlibpath_var=no
  2525. ;;
  2526. sysv4)
  2527. if test "x$host_vendor" = xsno; then
  2528. archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2529. hardcode_direct=yes # is this really true???
  2530. else
  2531. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2532. hardcode_direct=no #Motorola manual says yes, but my tests say they lie
  2533. fi
  2534. runpath_var='LD_RUN_PATH'
  2535. hardcode_shlibpath_var=no
  2536. ;;
  2537. sysv4.3*)
  2538. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2539. hardcode_shlibpath_var=no
  2540. export_dynamic_flag_spec='-Bexport'
  2541. ;;
  2542. sysv5*)
  2543. no_undefined_flag=' -z text'
  2544. # $CC -shared without GNU ld will not create a library from C++
  2545. # object files and a static libstdc++, better avoid it by now
  2546. archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2547. archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
  2548. $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
  2549. hardcode_libdir_flag_spec=
  2550. hardcode_shlibpath_var=no
  2551. runpath_var='LD_RUN_PATH'
  2552. ;;
  2553. uts4*)
  2554. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2555. hardcode_libdir_flag_spec='-L$libdir'
  2556. hardcode_shlibpath_var=no
  2557. ;;
  2558. dgux*)
  2559. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2560. hardcode_libdir_flag_spec='-L$libdir'
  2561. hardcode_shlibpath_var=no
  2562. ;;
  2563. sysv4*MP*)
  2564. if test -d /usr/nec; then
  2565. archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
  2566. hardcode_shlibpath_var=no
  2567. runpath_var=LD_RUN_PATH
  2568. hardcode_runpath_var=yes
  2569. ld_shlibs=yes
  2570. fi
  2571. ;;
  2572. sysv4.2uw2*)
  2573. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
  2574. hardcode_direct=yes
  2575. hardcode_minus_L=no
  2576. hardcode_shlibpath_var=no
  2577. hardcode_runpath_var=yes
  2578. runpath_var=LD_RUN_PATH
  2579. ;;
  2580. sysv5uw7* | unixware7*)
  2581. no_undefined_flag='${wl}-z ${wl}text'
  2582. if test "$GCC" = yes; then
  2583. archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  2584. else
  2585. archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
  2586. fi
  2587. runpath_var='LD_RUN_PATH'
  2588. hardcode_shlibpath_var=no
  2589. ;;
  2590. *)
  2591. ld_shlibs=no
  2592. ;;
  2593. esac
  2594. fi
  2595. AC_MSG_RESULT([$ld_shlibs])
  2596. test "$ld_shlibs" = no && can_build_shared=no
  2597. # Check hardcoding attributes.
  2598. AC_MSG_CHECKING([how to hardcode library paths into programs])
  2599. hardcode_action=
  2600. if test -n "$hardcode_libdir_flag_spec" || \
  2601. test -n "$runpath_var"; then
  2602. # We can hardcode non-existant directories.
  2603. if test "$hardcode_direct" != no &&
  2604. # If the only mechanism to avoid hardcoding is shlibpath_var, we
  2605. # have to relink, otherwise we might link with an installed library
  2606. # when we should be linking with a yet-to-be-installed one
  2607. ## test "$hardcode_shlibpath_var" != no &&
  2608. test "$hardcode_minus_L" != no; then
  2609. # Linking always hardcodes the temporary library directory.
  2610. hardcode_action=relink
  2611. else
  2612. # We can link without hardcoding, and we can hardcode nonexisting dirs.
  2613. hardcode_action=immediate
  2614. fi
  2615. else
  2616. # We cannot hardcode anything, or else we can only hardcode existing
  2617. # directories.
  2618. hardcode_action=unsupported
  2619. fi
  2620. AC_MSG_RESULT([$hardcode_action])
  2621. striplib=
  2622. old_striplib=
  2623. AC_MSG_CHECKING([whether stripping libraries is possible])
  2624. if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
  2625. test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
  2626. test -z "$striplib" && striplib="$STRIP --strip-unneeded"
  2627. AC_MSG_RESULT([yes])
  2628. else
  2629. AC_MSG_RESULT([no])
  2630. fi
  2631. reload_cmds='$LD$reload_flag -o $output$reload_objs'
  2632. test -z "$deplibs_check_method" && deplibs_check_method=unknown
  2633. # PORTME Fill in your ld.so characteristics
  2634. AC_MSG_CHECKING([dynamic linker characteristics])
  2635. library_names_spec=
  2636. libname_spec='lib$name'
  2637. soname_spec=
  2638. postinstall_cmds=
  2639. postuninstall_cmds=
  2640. finish_cmds=
  2641. finish_eval=
  2642. shlibpath_var=
  2643. shlibpath_overrides_runpath=unknown
  2644. version_type=none
  2645. dynamic_linker="$host_os ld.so"
  2646. sys_lib_dlsearch_path_spec="/lib /usr/lib"
  2647. sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
  2648. case $host_os in
  2649. aix3*)
  2650. version_type=linux
  2651. library_names_spec='${libname}${release}.so$versuffix $libname.a'
  2652. shlibpath_var=LIBPATH
  2653. # AIX has no versioning support, so we append a major version to the name.
  2654. soname_spec='${libname}${release}.so$major'
  2655. ;;
  2656. aix4* | aix5*)
  2657. version_type=linux
  2658. if test "$host_cpu" = ia64; then
  2659. # AIX 5 supports IA64
  2660. library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
  2661. shlibpath_var=LD_LIBRARY_PATH
  2662. else
  2663. # With GCC up to 2.95.x, collect2 would create an import file
  2664. # for dependence libraries. The import file would start with
  2665. # the line `#! .'. This would cause the generated library to
  2666. # depend on `.', always an invalid library. This was fixed in
  2667. # development snapshots of GCC prior to 3.0.
  2668. case $host_os in
  2669. aix4 | aix4.[[01]] | aix4.[[01]].*)
  2670. if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
  2671. echo ' yes '
  2672. echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
  2673. :
  2674. else
  2675. can_build_shared=no
  2676. fi
  2677. ;;
  2678. esac
  2679. # AIX (on Power*) has no versioning support, so currently we can
  2680. # not hardcode correct soname into executable. Probably we can
  2681. # add versioning support to collect2, so additional links can
  2682. # be useful in future.
  2683. if test "$aix_use_runtimelinking" = yes; then
  2684. # If using run time linking (on AIX 4.2 or later) use lib<name>.so
  2685. # instead of lib<name>.a to let people know that these are not
  2686. # typical AIX shared libraries.
  2687. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2688. else
  2689. # We preserve .a as extension for shared libraries through AIX4.2
  2690. # and later when we are not doing run time linking.
  2691. library_names_spec='${libname}${release}.a $libname.a'
  2692. soname_spec='${libname}${release}.so$major'
  2693. fi
  2694. shlibpath_var=LIBPATH
  2695. fi
  2696. ;;
  2697. amigaos*)
  2698. library_names_spec='$libname.ixlibrary $libname.a'
  2699. # Create ${libname}_ixlibrary.a entries in /sys/libs.
  2700. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done'
  2701. ;;
  2702. beos*)
  2703. library_names_spec='${libname}.so'
  2704. dynamic_linker="$host_os ld.so"
  2705. shlibpath_var=LIBRARY_PATH
  2706. ;;
  2707. bsdi4*)
  2708. version_type=linux
  2709. need_version=no
  2710. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2711. soname_spec='${libname}${release}.so$major'
  2712. finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
  2713. shlibpath_var=LD_LIBRARY_PATH
  2714. sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
  2715. sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
  2716. export_dynamic_flag_spec=-rdynamic
  2717. # the default ld.so.conf also contains /usr/contrib/lib and
  2718. # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
  2719. # libtool to hard-code these into programs
  2720. ;;
  2721. cygwin* | mingw* | pw32*)
  2722. version_type=windows
  2723. need_version=no
  2724. need_lib_prefix=no
  2725. case $GCC,$host_os in
  2726. yes,cygwin*)
  2727. library_names_spec='$libname.dll.a'
  2728. soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2729. postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
  2730. dldir=$destdir/`dirname \$dlpath`~
  2731. test -d \$dldir || mkdir -p \$dldir~
  2732. $install_prog .libs/$dlname \$dldir/$dlname'
  2733. postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
  2734. dlpath=$dir/\$dldll~
  2735. $rm \$dlpath'
  2736. ;;
  2737. yes,mingw*)
  2738. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
  2739. sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
  2740. ;;
  2741. yes,pw32*)
  2742. library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
  2743. ;;
  2744. *)
  2745. library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
  2746. ;;
  2747. esac
  2748. dynamic_linker='Win32 ld.exe'
  2749. # FIXME: first we should search . and the directory the executable is in
  2750. shlibpath_var=PATH
  2751. ;;
  2752. darwin* | rhapsody*)
  2753. dynamic_linker="$host_os dyld"
  2754. version_type=darwin
  2755. need_lib_prefix=no
  2756. need_version=no
  2757. # FIXME: Relying on posixy $() will cause problems for
  2758. # cross-compilation, but unfortunately the echo tests do not
  2759. # yet detect zsh echo's removal of \ escapes.
  2760. library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
  2761. soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
  2762. shlibpath_overrides_runpath=yes
  2763. shlibpath_var=DYLD_LIBRARY_PATH
  2764. ;;
  2765. freebsd1*)
  2766. dynamic_linker=no
  2767. ;;
  2768. freebsd*)
  2769. objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
  2770. version_type=freebsd-$objformat
  2771. case $version_type in
  2772. freebsd-elf*)
  2773. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2774. need_version=no
  2775. need_lib_prefix=no
  2776. ;;
  2777. freebsd-*)
  2778. library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
  2779. need_version=yes
  2780. ;;
  2781. esac
  2782. shlibpath_var=LD_LIBRARY_PATH
  2783. case $host_os in
  2784. freebsd2*)
  2785. shlibpath_overrides_runpath=yes
  2786. ;;
  2787. *)
  2788. shlibpath_overrides_runpath=no
  2789. hardcode_into_libs=yes
  2790. ;;
  2791. esac
  2792. ;;
  2793. gnu*)
  2794. version_type=linux
  2795. need_lib_prefix=no
  2796. need_version=no
  2797. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
  2798. soname_spec='${libname}${release}.so$major'
  2799. shlibpath_var=LD_LIBRARY_PATH
  2800. hardcode_into_libs=yes
  2801. ;;
  2802. hpux9* | hpux10* | hpux11*)
  2803. # Give a soname corresponding to the major version so that dld.sl refuses to
  2804. # link against other versions.
  2805. dynamic_linker="$host_os dld.sl"
  2806. version_type=sunos
  2807. need_lib_prefix=no
  2808. need_version=no
  2809. shlibpath_var=SHLIB_PATH
  2810. shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
  2811. library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
  2812. soname_spec='${libname}${release}.sl$major'
  2813. # HP-UX runs *really* slowly unless shared libraries are mode 555.
  2814. postinstall_cmds='chmod 555 $lib'
  2815. ;;
  2816. irix5* | irix6*)
  2817. version_type=irix
  2818. need_lib_prefix=no
  2819. need_version=no
  2820. soname_spec='${libname}${release}.so$major'
  2821. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
  2822. case $host_os in
  2823. irix5*)
  2824. libsuff= shlibsuff=
  2825. ;;
  2826. *)
  2827. case $LD in # libtool.m4 will add one of these switches to LD
  2828. *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
  2829. *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
  2830. *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
  2831. *) libsuff= shlibsuff= libmagic=never-match;;
  2832. esac
  2833. ;;
  2834. esac
  2835. shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
  2836. shlibpath_overrides_runpath=no
  2837. sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
  2838. sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
  2839. ;;
  2840. # No shared lib support for Linux oldld, aout, or coff.
  2841. linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
  2842. dynamic_linker=no
  2843. ;;
  2844. # This must be Linux ELF.
  2845. linux-gnu*)
  2846. version_type=linux
  2847. need_lib_prefix=no
  2848. need_version=no
  2849. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2850. soname_spec='${libname}${release}.so$major'
  2851. finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
  2852. shlibpath_var=LD_LIBRARY_PATH
  2853. shlibpath_overrides_runpath=no
  2854. # This implies no fast_install, which is unacceptable.
  2855. # Some rework will be needed to allow for fast_install
  2856. # before this can be enabled.
  2857. hardcode_into_libs=yes
  2858. # We used to test for /lib/ld.so.1 and disable shared libraries on
  2859. # powerpc, because MkLinux only supported shared libraries with the
  2860. # GNU dynamic linker. Since this was broken with cross compilers,
  2861. # most powerpc-linux boxes support dynamic linking these days and
  2862. # people can always --disable-shared, the test was removed, and we
  2863. # assume the GNU/Linux dynamic linker is in use.
  2864. dynamic_linker='GNU/Linux ld.so'
  2865. ;;
  2866. netbsd*)
  2867. version_type=sunos
  2868. need_lib_prefix=no
  2869. need_version=no
  2870. if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
  2871. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2872. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2873. dynamic_linker='NetBSD (a.out) ld.so'
  2874. else
  2875. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
  2876. soname_spec='${libname}${release}.so$major'
  2877. dynamic_linker='NetBSD ld.elf_so'
  2878. fi
  2879. shlibpath_var=LD_LIBRARY_PATH
  2880. shlibpath_overrides_runpath=yes
  2881. hardcode_into_libs=yes
  2882. ;;
  2883. newsos6)
  2884. version_type=linux
  2885. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2886. shlibpath_var=LD_LIBRARY_PATH
  2887. shlibpath_overrides_runpath=yes
  2888. ;;
  2889. openbsd*)
  2890. version_type=sunos
  2891. need_lib_prefix=no
  2892. need_version=no
  2893. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  2894. case "$host_os" in
  2895. openbsd2.[[89]] | openbsd2.[[89]].*)
  2896. shlibpath_overrides_runpath=no
  2897. ;;
  2898. *)
  2899. shlibpath_overrides_runpath=yes
  2900. ;;
  2901. esac
  2902. else
  2903. shlibpath_overrides_runpath=yes
  2904. fi
  2905. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2906. finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
  2907. shlibpath_var=LD_LIBRARY_PATH
  2908. ;;
  2909. os2*)
  2910. libname_spec='$name'
  2911. need_lib_prefix=no
  2912. library_names_spec='$libname.dll $libname.a'
  2913. dynamic_linker='OS/2 ld.exe'
  2914. shlibpath_var=LIBPATH
  2915. ;;
  2916. osf3* | osf4* | osf5*)
  2917. version_type=osf
  2918. need_version=no
  2919. soname_spec='${libname}${release}.so'
  2920. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
  2921. shlibpath_var=LD_LIBRARY_PATH
  2922. sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
  2923. sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
  2924. ;;
  2925. sco3.2v5*)
  2926. version_type=osf
  2927. soname_spec='${libname}${release}.so$major'
  2928. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2929. shlibpath_var=LD_LIBRARY_PATH
  2930. ;;
  2931. solaris*)
  2932. version_type=linux
  2933. need_lib_prefix=no
  2934. need_version=no
  2935. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2936. soname_spec='${libname}${release}.so$major'
  2937. shlibpath_var=LD_LIBRARY_PATH
  2938. shlibpath_overrides_runpath=yes
  2939. hardcode_into_libs=yes
  2940. # ldd complains unless libraries are executable
  2941. postinstall_cmds='chmod +x $lib'
  2942. ;;
  2943. sunos4*)
  2944. version_type=sunos
  2945. library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
  2946. finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
  2947. shlibpath_var=LD_LIBRARY_PATH
  2948. shlibpath_overrides_runpath=yes
  2949. if test "$with_gnu_ld" = yes; then
  2950. need_lib_prefix=no
  2951. fi
  2952. need_version=yes
  2953. ;;
  2954. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  2955. version_type=linux
  2956. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2957. soname_spec='${libname}${release}.so$major'
  2958. shlibpath_var=LD_LIBRARY_PATH
  2959. case $host_vendor in
  2960. sni)
  2961. shlibpath_overrides_runpath=no
  2962. ;;
  2963. motorola)
  2964. need_lib_prefix=no
  2965. need_version=no
  2966. shlibpath_overrides_runpath=no
  2967. sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
  2968. ;;
  2969. esac
  2970. ;;
  2971. uts4*)
  2972. version_type=linux
  2973. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2974. soname_spec='${libname}${release}.so$major'
  2975. shlibpath_var=LD_LIBRARY_PATH
  2976. ;;
  2977. dgux*)
  2978. version_type=linux
  2979. need_lib_prefix=no
  2980. need_version=no
  2981. library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
  2982. soname_spec='${libname}${release}.so$major'
  2983. shlibpath_var=LD_LIBRARY_PATH
  2984. ;;
  2985. sysv4*MP*)
  2986. if test -d /usr/nec ;then
  2987. version_type=linux
  2988. library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
  2989. soname_spec='$libname.so.$major'
  2990. shlibpath_var=LD_LIBRARY_PATH
  2991. fi
  2992. ;;
  2993. *)
  2994. dynamic_linker=no
  2995. ;;
  2996. esac
  2997. AC_MSG_RESULT([$dynamic_linker])
  2998. test "$dynamic_linker" = no && can_build_shared=no
  2999. # Report the final consequences.
  3000. AC_MSG_CHECKING([if libtool supports shared libraries])
  3001. AC_MSG_RESULT([$can_build_shared])
  3002. AC_MSG_CHECKING([whether to build shared libraries])
  3003. test "$can_build_shared" = "no" && enable_shared=no
  3004. # On AIX, shared libraries and static libraries use the same namespace, and
  3005. # are all built from PIC.
  3006. case "$host_os" in
  3007. aix3*)
  3008. test "$enable_shared" = yes && enable_static=no
  3009. if test -n "$RANLIB"; then
  3010. archive_cmds="$archive_cmds~\$RANLIB \$lib"
  3011. postinstall_cmds='$RANLIB $lib'
  3012. fi
  3013. ;;
  3014. aix4*)
  3015. if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
  3016. test "$enable_shared" = yes && enable_static=no
  3017. fi
  3018. ;;
  3019. esac
  3020. AC_MSG_RESULT([$enable_shared])
  3021. AC_MSG_CHECKING([whether to build static libraries])
  3022. # Make sure either enable_shared or enable_static is yes.
  3023. test "$enable_shared" = yes || enable_static=yes
  3024. AC_MSG_RESULT([$enable_static])
  3025. if test "$hardcode_action" = relink; then
  3026. # Fast installation is not supported
  3027. enable_fast_install=no
  3028. elif test "$shlibpath_overrides_runpath" = yes ||
  3029. test "$enable_shared" = no; then
  3030. # Fast installation is not necessary
  3031. enable_fast_install=needless
  3032. fi
  3033. variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
  3034. if test "$GCC" = yes; then
  3035. variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
  3036. fi
  3037. AC_LIBTOOL_DLOPEN_SELF
  3038. if test "$enable_shared" = yes && test "$GCC" = yes; then
  3039. case $archive_cmds in
  3040. *'~'*)
  3041. # FIXME: we may have to deal with multi-command sequences.
  3042. ;;
  3043. '$CC '*)
  3044. # Test whether the compiler implicitly links with -lc since on some
  3045. # systems, -lgcc has to come before -lc. If gcc already passes -lc
  3046. # to ld, don't add -lc before -lgcc.
  3047. AC_MSG_CHECKING([whether -lc should be explicitly linked in])
  3048. AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
  3049. [$rm conftest*
  3050. echo 'static int dummy;' > conftest.$ac_ext
  3051. if AC_TRY_EVAL(ac_compile); then
  3052. soname=conftest
  3053. lib=conftest
  3054. libobjs=conftest.$ac_objext
  3055. deplibs=
  3056. wl=$lt_cv_prog_cc_wl
  3057. compiler_flags=-v
  3058. linker_flags=-v
  3059. verstring=
  3060. output_objdir=.
  3061. libname=conftest
  3062. save_allow_undefined_flag=$allow_undefined_flag
  3063. allow_undefined_flag=
  3064. if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
  3065. then
  3066. lt_cv_archive_cmds_need_lc=no
  3067. else
  3068. lt_cv_archive_cmds_need_lc=yes
  3069. fi
  3070. allow_undefined_flag=$save_allow_undefined_flag
  3071. else
  3072. cat conftest.err 1>&5
  3073. fi])
  3074. AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
  3075. ;;
  3076. esac
  3077. fi
  3078. need_lc=${lt_cv_archive_cmds_need_lc-yes}
  3079. # The second clause should only fire when bootstrapping the
  3080. # libtool distribution, otherwise you forgot to ship ltmain.sh
  3081. # with your package, and you will get complaints that there are
  3082. # no rules to generate ltmain.sh.
  3083. if test -f "$ltmain"; then
  3084. :
  3085. else
  3086. # If there is no Makefile yet, we rely on a make rule to execute
  3087. # `config.status --recheck' to rerun these tests and create the
  3088. # libtool script then.
  3089. test -f Makefile && make "$ltmain"
  3090. fi
  3091. if test -f "$ltmain"; then
  3092. trap "$rm \"${ofile}T\"; exit 1" 1 2 15
  3093. $rm -f "${ofile}T"
  3094. echo creating $ofile
  3095. # Now quote all the things that may contain metacharacters while being
  3096. # careful not to overquote the AC_SUBSTed values. We take copies of the
  3097. # variables and quote the copies for generation of the libtool script.
  3098. for var in echo old_CC old_CFLAGS \
  3099. AR AR_FLAGS CC LD LN_S NM SHELL \
  3100. reload_flag reload_cmds wl \
  3101. pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
  3102. thread_safe_flag_spec whole_archive_flag_spec libname_spec \
  3103. library_names_spec soname_spec \
  3104. RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
  3105. old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
  3106. postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
  3107. old_striplib striplib file_magic_cmd export_symbols_cmds \
  3108. deplibs_check_method allow_undefined_flag no_undefined_flag \
  3109. finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
  3110. global_symbol_to_c_name_address \
  3111. hardcode_libdir_flag_spec hardcode_libdir_separator \
  3112. sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
  3113. compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
  3114. case $var in
  3115. reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
  3116. old_postinstall_cmds | old_postuninstall_cmds | \
  3117. export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
  3118. extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
  3119. postinstall_cmds | postuninstall_cmds | \
  3120. finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
  3121. # Double-quote double-evaled strings.
  3122. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
  3123. ;;
  3124. *)
  3125. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
  3126. ;;
  3127. esac
  3128. done
  3129. cat <<__EOF__ > "${ofile}T"
  3130. #! $SHELL
  3131. # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
  3132. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
  3133. # NOTE: Changes made to this file will be lost: look at ltmain.sh.
  3134. #
  3135. # Copyright (C) 1996-2000 Free Software Foundation, Inc.
  3136. # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
  3137. #
  3138. # This program is free software; you can redistribute it and/or modify
  3139. # it under the terms of the GNU General Public License as published by
  3140. # the Free Software Foundation; either version 2 of the License, or
  3141. # (at your option) any later version.
  3142. #
  3143. # This program is distributed in the hope that it will be useful, but
  3144. # WITHOUT ANY WARRANTY; without even the implied warranty of
  3145. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  3146. # General Public License for more details.
  3147. #
  3148. # You should have received a copy of the GNU General Public License
  3149. # along with this program; if not, write to the Free Software
  3150. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  3151. #
  3152. # As a special exception to the GNU General Public License, if you
  3153. # distribute this file as part of a program that contains a
  3154. # configuration script generated by Autoconf, you may include it under
  3155. # the same distribution terms that you use for the rest of that program.
  3156. # Sed that helps us avoid accidentally triggering echo(1) options like -n.
  3157. Xsed="sed -e s/^X//"
  3158. # The HP-UX ksh and POSIX shell print the target directory to stdout
  3159. # if CDPATH is set.
  3160. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
  3161. # ### BEGIN LIBTOOL CONFIG
  3162. # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3163. # Shell to use when invoking shell scripts.
  3164. SHELL=$lt_SHELL
  3165. # Whether or not to build shared libraries.
  3166. build_libtool_libs=$enable_shared
  3167. # Whether or not to build static libraries.
  3168. build_old_libs=$enable_static
  3169. # Whether or not to add -lc for building shared libraries.
  3170. build_libtool_need_lc=$need_lc
  3171. # Whether or not to optimize for fast installation.
  3172. fast_install=$enable_fast_install
  3173. # The host system.
  3174. host_alias=$host_alias
  3175. host=$host
  3176. # An echo program that does not interpret backslashes.
  3177. echo=$lt_echo
  3178. # The archiver.
  3179. AR=$lt_AR
  3180. AR_FLAGS=$lt_AR_FLAGS
  3181. # The default C compiler.
  3182. CC=$lt_CC
  3183. # Is the compiler the GNU C compiler?
  3184. with_gcc=$GCC
  3185. # The linker used to build libraries.
  3186. LD=$lt_LD
  3187. # Whether we need hard or soft links.
  3188. LN_S=$lt_LN_S
  3189. # A BSD-compatible nm program.
  3190. NM=$lt_NM
  3191. # A symbol stripping program
  3192. STRIP=$STRIP
  3193. # Used to examine libraries when file_magic_cmd begins "file"
  3194. MAGIC_CMD=$MAGIC_CMD
  3195. # Used on cygwin: DLL creation program.
  3196. DLLTOOL="$DLLTOOL"
  3197. # Used on cygwin: object dumper.
  3198. OBJDUMP="$OBJDUMP"
  3199. # Used on cygwin: assembler.
  3200. AS="$AS"
  3201. # The name of the directory that contains temporary libtool files.
  3202. objdir=$objdir
  3203. # How to create reloadable object files.
  3204. reload_flag=$lt_reload_flag
  3205. reload_cmds=$lt_reload_cmds
  3206. # How to pass a linker flag through the compiler.
  3207. wl=$lt_wl
  3208. # Object file suffix (normally "o").
  3209. objext="$ac_objext"
  3210. # Old archive suffix (normally "a").
  3211. libext="$libext"
  3212. # Executable file suffix (normally "").
  3213. exeext="$exeext"
  3214. # Additional compiler flags for building library objects.
  3215. pic_flag=$lt_pic_flag
  3216. pic_mode=$pic_mode
  3217. # Does compiler simultaneously support -c and -o options?
  3218. compiler_c_o=$lt_compiler_c_o
  3219. # Can we write directly to a .lo ?
  3220. compiler_o_lo=$lt_compiler_o_lo
  3221. # Must we lock files when doing compilation ?
  3222. need_locks=$lt_need_locks
  3223. # Do we need the lib prefix for modules?
  3224. need_lib_prefix=$need_lib_prefix
  3225. # Do we need a version for libraries?
  3226. need_version=$need_version
  3227. # Whether dlopen is supported.
  3228. dlopen_support=$enable_dlopen
  3229. # Whether dlopen of programs is supported.
  3230. dlopen_self=$enable_dlopen_self
  3231. # Whether dlopen of statically linked programs is supported.
  3232. dlopen_self_static=$enable_dlopen_self_static
  3233. # Compiler flag to prevent dynamic linking.
  3234. link_static_flag=$lt_link_static_flag
  3235. # Compiler flag to turn off builtin functions.
  3236. no_builtin_flag=$lt_no_builtin_flag
  3237. # Compiler flag to allow reflexive dlopens.
  3238. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
  3239. # Compiler flag to generate shared objects directly from archives.
  3240. whole_archive_flag_spec=$lt_whole_archive_flag_spec
  3241. # Compiler flag to generate thread-safe objects.
  3242. thread_safe_flag_spec=$lt_thread_safe_flag_spec
  3243. # Library versioning type.
  3244. version_type=$version_type
  3245. # Format of library name prefix.
  3246. libname_spec=$lt_libname_spec
  3247. # List of archive names. First name is the real one, the rest are links.
  3248. # The last name is the one that the linker finds with -lNAME.
  3249. library_names_spec=$lt_library_names_spec
  3250. # The coded name of the library, if different from the real name.
  3251. soname_spec=$lt_soname_spec
  3252. # Commands used to build and install an old-style archive.
  3253. RANLIB=$lt_RANLIB
  3254. old_archive_cmds=$lt_old_archive_cmds
  3255. old_postinstall_cmds=$lt_old_postinstall_cmds
  3256. old_postuninstall_cmds=$lt_old_postuninstall_cmds
  3257. # Create an old-style archive from a shared archive.
  3258. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
  3259. # Create a temporary old-style archive to link instead of a shared archive.
  3260. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
  3261. # Commands used to build and install a shared archive.
  3262. archive_cmds=$lt_archive_cmds
  3263. archive_expsym_cmds=$lt_archive_expsym_cmds
  3264. postinstall_cmds=$lt_postinstall_cmds
  3265. postuninstall_cmds=$lt_postuninstall_cmds
  3266. # Commands to strip libraries.
  3267. old_striplib=$lt_old_striplib
  3268. striplib=$lt_striplib
  3269. # Method to check whether dependent libraries are shared objects.
  3270. deplibs_check_method=$lt_deplibs_check_method
  3271. # Command to use when deplibs_check_method == file_magic.
  3272. file_magic_cmd=$lt_file_magic_cmd
  3273. # Flag that allows shared libraries with undefined symbols to be built.
  3274. allow_undefined_flag=$lt_allow_undefined_flag
  3275. # Flag that forces no undefined symbols.
  3276. no_undefined_flag=$lt_no_undefined_flag
  3277. # Commands used to finish a libtool library installation in a directory.
  3278. finish_cmds=$lt_finish_cmds
  3279. # Same as above, but a single script fragment to be evaled but not shown.
  3280. finish_eval=$lt_finish_eval
  3281. # Take the output of nm and produce a listing of raw symbols and C names.
  3282. global_symbol_pipe=$lt_global_symbol_pipe
  3283. # Transform the output of nm in a proper C declaration
  3284. global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
  3285. # Transform the output of nm in a C name address pair
  3286. global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
  3287. # This is the shared library runtime path variable.
  3288. runpath_var=$runpath_var
  3289. # This is the shared library path variable.
  3290. shlibpath_var=$shlibpath_var
  3291. # Is shlibpath searched before the hard-coded library search path?
  3292. shlibpath_overrides_runpath=$shlibpath_overrides_runpath
  3293. # How to hardcode a shared library path into an executable.
  3294. hardcode_action=$hardcode_action
  3295. # Whether we should hardcode library paths into libraries.
  3296. hardcode_into_libs=$hardcode_into_libs
  3297. # Flag to hardcode \$libdir into a binary during linking.
  3298. # This must work even if \$libdir does not exist.
  3299. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
  3300. # Whether we need a single -rpath flag with a separated argument.
  3301. hardcode_libdir_separator=$lt_hardcode_libdir_separator
  3302. # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
  3303. # resulting binary.
  3304. hardcode_direct=$hardcode_direct
  3305. # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
  3306. # resulting binary.
  3307. hardcode_minus_L=$hardcode_minus_L
  3308. # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
  3309. # the resulting binary.
  3310. hardcode_shlibpath_var=$hardcode_shlibpath_var
  3311. # Variables whose values should be saved in libtool wrapper scripts and
  3312. # restored at relink time.
  3313. variables_saved_for_relink="$variables_saved_for_relink"
  3314. # Whether libtool must link a program against all its dependency libraries.
  3315. link_all_deplibs=$link_all_deplibs
  3316. # Compile-time system search path for libraries
  3317. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
  3318. # Run-time system search path for libraries
  3319. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
  3320. # Fix the shell variable \$srcfile for the compiler.
  3321. fix_srcfile_path="$fix_srcfile_path"
  3322. # Set to yes if exported symbols are required.
  3323. always_export_symbols=$always_export_symbols
  3324. # The commands to list exported symbols.
  3325. export_symbols_cmds=$lt_export_symbols_cmds
  3326. # The commands to extract the exported symbol list from a shared archive.
  3327. extract_expsyms_cmds=$lt_extract_expsyms_cmds
  3328. # Symbols that should not be listed in the preloaded symbols.
  3329. exclude_expsyms=$lt_exclude_expsyms
  3330. # Symbols that must always be exported.
  3331. include_expsyms=$lt_include_expsyms
  3332. # ### END LIBTOOL CONFIG
  3333. __EOF__
  3334. case $host_os in
  3335. aix3*)
  3336. cat <<\EOF >> "${ofile}T"
  3337. # AIX sometimes has problems with the GCC collect2 program. For some
  3338. # reason, if we set the COLLECT_NAMES environment variable, the problems
  3339. # vanish in a puff of smoke.
  3340. if test "X${COLLECT_NAMES+set}" != Xset; then
  3341. COLLECT_NAMES=
  3342. export COLLECT_NAMES
  3343. fi
  3344. EOF
  3345. ;;
  3346. esac
  3347. case $host_os in
  3348. cygwin* | mingw* | pw32* | os2*)
  3349. cat <<'EOF' >> "${ofile}T"
  3350. # This is a source program that is used to create dlls on Windows
  3351. # Don't remove nor modify the starting and closing comments
  3352. # /* ltdll.c starts here */
  3353. # #define WIN32_LEAN_AND_MEAN
  3354. # #include <windows.h>
  3355. # #undef WIN32_LEAN_AND_MEAN
  3356. # #include <stdio.h>
  3357. #
  3358. # #ifndef __CYGWIN__
  3359. # # ifdef __CYGWIN32__
  3360. # # define __CYGWIN__ __CYGWIN32__
  3361. # # endif
  3362. # #endif
  3363. #
  3364. # #ifdef __cplusplus
  3365. # extern "C" {
  3366. # #endif
  3367. # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
  3368. # #ifdef __cplusplus
  3369. # }
  3370. # #endif
  3371. #
  3372. # #ifdef __CYGWIN__
  3373. # #include <cygwin/cygwin_dll.h>
  3374. # DECLARE_CYGWIN_DLL( DllMain );
  3375. # #endif
  3376. # HINSTANCE __hDllInstance_base;
  3377. #
  3378. # BOOL APIENTRY
  3379. # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
  3380. # {
  3381. # __hDllInstance_base = hInst;
  3382. # return TRUE;
  3383. # }
  3384. # /* ltdll.c ends here */
  3385. # This is a source program that is used to create import libraries
  3386. # on Windows for dlls which lack them. Don't remove nor modify the
  3387. # starting and closing comments
  3388. # /* impgen.c starts here */
  3389. # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
  3390. #
  3391. # This file is part of GNU libtool.
  3392. #
  3393. # This program is free software; you can redistribute it and/or modify
  3394. # it under the terms of the GNU General Public License as published by
  3395. # the Free Software Foundation; either version 2 of the License, or
  3396. # (at your option) any later version.
  3397. #
  3398. # This program is distributed in the hope that it will be useful,
  3399. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  3400. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  3401. # GNU General Public License for more details.
  3402. #
  3403. # You should have received a copy of the GNU General Public License
  3404. # along with this program; if not, write to the Free Software
  3405. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  3406. # */
  3407. #
  3408. # #include <stdio.h> /* for printf() */
  3409. # #include <unistd.h> /* for open(), lseek(), read() */
  3410. # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
  3411. # #include <string.h> /* for strdup() */
  3412. #
  3413. # /* O_BINARY isn't required (or even defined sometimes) under Unix */
  3414. # #ifndef O_BINARY
  3415. # #define O_BINARY 0
  3416. # #endif
  3417. #
  3418. # static unsigned int
  3419. # pe_get16 (fd, offset)
  3420. # int fd;
  3421. # int offset;
  3422. # {
  3423. # unsigned char b[2];
  3424. # lseek (fd, offset, SEEK_SET);
  3425. # read (fd, b, 2);
  3426. # return b[0] + (b[1]<<8);
  3427. # }
  3428. #
  3429. # static unsigned int
  3430. # pe_get32 (fd, offset)
  3431. # int fd;
  3432. # int offset;
  3433. # {
  3434. # unsigned char b[4];
  3435. # lseek (fd, offset, SEEK_SET);
  3436. # read (fd, b, 4);
  3437. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  3438. # }
  3439. #
  3440. # static unsigned int
  3441. # pe_as32 (ptr)
  3442. # void *ptr;
  3443. # {
  3444. # unsigned char *b = ptr;
  3445. # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
  3446. # }
  3447. #
  3448. # int
  3449. # main (argc, argv)
  3450. # int argc;
  3451. # char *argv[];
  3452. # {
  3453. # int dll;
  3454. # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
  3455. # unsigned long export_rva, export_size, nsections, secptr, expptr;
  3456. # unsigned long name_rvas, nexp;
  3457. # unsigned char *expdata, *erva;
  3458. # char *filename, *dll_name;
  3459. #
  3460. # filename = argv[1];
  3461. #
  3462. # dll = open(filename, O_RDONLY|O_BINARY);
  3463. # if (dll < 1)
  3464. # return 1;
  3465. #
  3466. # dll_name = filename;
  3467. #
  3468. # for (i=0; filename[i]; i++)
  3469. # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
  3470. # dll_name = filename + i +1;
  3471. #
  3472. # pe_header_offset = pe_get32 (dll, 0x3c);
  3473. # opthdr_ofs = pe_header_offset + 4 + 20;
  3474. # num_entries = pe_get32 (dll, opthdr_ofs + 92);
  3475. #
  3476. # if (num_entries < 1) /* no exports */
  3477. # return 1;
  3478. #
  3479. # export_rva = pe_get32 (dll, opthdr_ofs + 96);
  3480. # export_size = pe_get32 (dll, opthdr_ofs + 100);
  3481. # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
  3482. # secptr = (pe_header_offset + 4 + 20 +
  3483. # pe_get16 (dll, pe_header_offset + 4 + 16));
  3484. #
  3485. # expptr = 0;
  3486. # for (i = 0; i < nsections; i++)
  3487. # {
  3488. # char sname[8];
  3489. # unsigned long secptr1 = secptr + 40 * i;
  3490. # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
  3491. # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
  3492. # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
  3493. # lseek(dll, secptr1, SEEK_SET);
  3494. # read(dll, sname, 8);
  3495. # if (vaddr <= export_rva && vaddr+vsize > export_rva)
  3496. # {
  3497. # expptr = fptr + (export_rva - vaddr);
  3498. # if (export_rva + export_size > vaddr + vsize)
  3499. # export_size = vsize - (export_rva - vaddr);
  3500. # break;
  3501. # }
  3502. # }
  3503. #
  3504. # expdata = (unsigned char*)malloc(export_size);
  3505. # lseek (dll, expptr, SEEK_SET);
  3506. # read (dll, expdata, export_size);
  3507. # erva = expdata - export_rva;
  3508. #
  3509. # nexp = pe_as32 (expdata+24);
  3510. # name_rvas = pe_as32 (expdata+32);
  3511. #
  3512. # printf ("EXPORTS\n");
  3513. # for (i = 0; i<nexp; i++)
  3514. # {
  3515. # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
  3516. # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
  3517. # }
  3518. #
  3519. # return 0;
  3520. # }
  3521. # /* impgen.c ends here */
  3522. EOF
  3523. ;;
  3524. esac
  3525. # We use sed instead of cat because bash on DJGPP gets confused if
  3526. # if finds mixed CR/LF and LF-only lines. Since sed operates in
  3527. # text mode, it properly converts lines to CR/LF. This bash problem
  3528. # is reportedly fixed, but why not run on old versions too?
  3529. sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
  3530. mv -f "${ofile}T" "$ofile" || \
  3531. (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
  3532. chmod +x "$ofile"
  3533. fi
  3534. ])# _LT_AC_LTCONFIG_HACK
  3535. # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
  3536. AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
  3537. # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
  3538. AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
  3539. # AC_ENABLE_SHARED - implement the --enable-shared flag
  3540. # Usage: AC_ENABLE_SHARED[(DEFAULT)]
  3541. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3542. # `yes'.
  3543. AC_DEFUN([AC_ENABLE_SHARED],
  3544. [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
  3545. AC_ARG_ENABLE(shared,
  3546. changequote(<<, >>)dnl
  3547. << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
  3548. changequote([, ])dnl
  3549. [p=${PACKAGE-default}
  3550. case $enableval in
  3551. yes) enable_shared=yes ;;
  3552. no) enable_shared=no ;;
  3553. *)
  3554. enable_shared=no
  3555. # Look at the argument we got. We use all the common list separators.
  3556. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3557. for pkg in $enableval; do
  3558. if test "X$pkg" = "X$p"; then
  3559. enable_shared=yes
  3560. fi
  3561. done
  3562. IFS="$ac_save_ifs"
  3563. ;;
  3564. esac],
  3565. enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
  3566. ])
  3567. # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
  3568. AC_DEFUN([AC_DISABLE_SHARED],
  3569. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3570. AC_ENABLE_SHARED(no)])
  3571. # AC_ENABLE_STATIC - implement the --enable-static flag
  3572. # Usage: AC_ENABLE_STATIC[(DEFAULT)]
  3573. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3574. # `yes'.
  3575. AC_DEFUN([AC_ENABLE_STATIC],
  3576. [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
  3577. AC_ARG_ENABLE(static,
  3578. changequote(<<, >>)dnl
  3579. << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
  3580. changequote([, ])dnl
  3581. [p=${PACKAGE-default}
  3582. case $enableval in
  3583. yes) enable_static=yes ;;
  3584. no) enable_static=no ;;
  3585. *)
  3586. enable_static=no
  3587. # Look at the argument we got. We use all the common list separators.
  3588. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3589. for pkg in $enableval; do
  3590. if test "X$pkg" = "X$p"; then
  3591. enable_static=yes
  3592. fi
  3593. done
  3594. IFS="$ac_save_ifs"
  3595. ;;
  3596. esac],
  3597. enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
  3598. ])
  3599. # AC_DISABLE_STATIC - set the default static flag to --disable-static
  3600. AC_DEFUN([AC_DISABLE_STATIC],
  3601. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3602. AC_ENABLE_STATIC(no)])
  3603. # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
  3604. # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
  3605. # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
  3606. # `yes'.
  3607. AC_DEFUN([AC_ENABLE_FAST_INSTALL],
  3608. [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
  3609. AC_ARG_ENABLE(fast-install,
  3610. changequote(<<, >>)dnl
  3611. << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
  3612. changequote([, ])dnl
  3613. [p=${PACKAGE-default}
  3614. case $enableval in
  3615. yes) enable_fast_install=yes ;;
  3616. no) enable_fast_install=no ;;
  3617. *)
  3618. enable_fast_install=no
  3619. # Look at the argument we got. We use all the common list separators.
  3620. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
  3621. for pkg in $enableval; do
  3622. if test "X$pkg" = "X$p"; then
  3623. enable_fast_install=yes
  3624. fi
  3625. done
  3626. IFS="$ac_save_ifs"
  3627. ;;
  3628. esac],
  3629. enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
  3630. ])
  3631. # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
  3632. AC_DEFUN([AC_DISABLE_FAST_INSTALL],
  3633. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3634. AC_ENABLE_FAST_INSTALL(no)])
  3635. # AC_LIBTOOL_PICMODE - implement the --with-pic flag
  3636. # Usage: AC_LIBTOOL_PICMODE[(MODE)]
  3637. # Where MODE is either `yes' or `no'. If omitted, it defaults to
  3638. # `both'.
  3639. AC_DEFUN([AC_LIBTOOL_PICMODE],
  3640. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  3641. pic_mode=ifelse($#,1,$1,default)])
  3642. # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
  3643. AC_DEFUN([AC_PATH_TOOL_PREFIX],
  3644. [AC_MSG_CHECKING([for $1])
  3645. AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
  3646. [case $MAGIC_CMD in
  3647. /*)
  3648. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
  3649. ;;
  3650. ?:/*)
  3651. lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
  3652. ;;
  3653. *)
  3654. ac_save_MAGIC_CMD="$MAGIC_CMD"
  3655. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3656. dnl $ac_dummy forces splitting on constant user-supplied paths.
  3657. dnl POSIX.2 word splitting is done only on the output of word expansions,
  3658. dnl not every word. This closes a longstanding sh security hole.
  3659. ac_dummy="ifelse([$2], , $PATH, [$2])"
  3660. for ac_dir in $ac_dummy; do
  3661. test -z "$ac_dir" && ac_dir=.
  3662. if test -f $ac_dir/$1; then
  3663. lt_cv_path_MAGIC_CMD="$ac_dir/$1"
  3664. if test -n "$file_magic_test_file"; then
  3665. case $deplibs_check_method in
  3666. "file_magic "*)
  3667. file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
  3668. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3669. if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
  3670. egrep "$file_magic_regex" > /dev/null; then
  3671. :
  3672. else
  3673. cat <<EOF 1>&2
  3674. *** Warning: the command libtool uses to detect shared libraries,
  3675. *** $file_magic_cmd, produces output that libtool cannot recognize.
  3676. *** The result is that libtool may fail to recognize shared libraries
  3677. *** as such. This will affect the creation of libtool libraries that
  3678. *** depend on shared libraries, but programs linked with such libtool
  3679. *** libraries will work regardless of this problem. Nevertheless, you
  3680. *** may want to report the problem to your system manager and/or to
  3681. *** bug-libtool@gnu.org
  3682. EOF
  3683. fi ;;
  3684. esac
  3685. fi
  3686. break
  3687. fi
  3688. done
  3689. IFS="$ac_save_ifs"
  3690. MAGIC_CMD="$ac_save_MAGIC_CMD"
  3691. ;;
  3692. esac])
  3693. MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
  3694. if test -n "$MAGIC_CMD"; then
  3695. AC_MSG_RESULT($MAGIC_CMD)
  3696. else
  3697. AC_MSG_RESULT(no)
  3698. fi
  3699. ])
  3700. # AC_PATH_MAGIC - find a file program which can recognise a shared library
  3701. AC_DEFUN([AC_PATH_MAGIC],
  3702. [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
  3703. AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
  3704. if test -z "$lt_cv_path_MAGIC_CMD"; then
  3705. if test -n "$ac_tool_prefix"; then
  3706. AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
  3707. else
  3708. MAGIC_CMD=:
  3709. fi
  3710. fi
  3711. ])
  3712. # AC_PROG_LD - find the path to the GNU or non-GNU linker
  3713. AC_DEFUN([AC_PROG_LD],
  3714. [AC_ARG_WITH(gnu-ld,
  3715. [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
  3716. test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
  3717. AC_REQUIRE([AC_PROG_CC])dnl
  3718. AC_REQUIRE([AC_CANONICAL_HOST])dnl
  3719. AC_REQUIRE([AC_CANONICAL_BUILD])dnl
  3720. AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3721. ac_prog=ld
  3722. if test "$GCC" = yes; then
  3723. # Check if gcc -print-prog-name=ld gives a path.
  3724. AC_MSG_CHECKING([for ld used by GCC])
  3725. case $host in
  3726. *-*-mingw*)
  3727. # gcc leaves a trailing carriage return which upsets mingw
  3728. ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
  3729. *)
  3730. ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
  3731. esac
  3732. case $ac_prog in
  3733. # Accept absolute paths.
  3734. [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
  3735. re_direlt='/[[^/]][[^/]]*/\.\./'
  3736. # Canonicalize the path of ld
  3737. ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
  3738. while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
  3739. ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
  3740. done
  3741. test -z "$LD" && LD="$ac_prog"
  3742. ;;
  3743. "")
  3744. # If it fails, then pretend we aren't using GCC.
  3745. ac_prog=ld
  3746. ;;
  3747. *)
  3748. # If it is relative, then search for the first ld in PATH.
  3749. with_gnu_ld=unknown
  3750. ;;
  3751. esac
  3752. elif test "$with_gnu_ld" = yes; then
  3753. AC_MSG_CHECKING([for GNU ld])
  3754. else
  3755. AC_MSG_CHECKING([for non-GNU ld])
  3756. fi
  3757. AC_CACHE_VAL(lt_cv_path_LD,
  3758. [if test -z "$LD"; then
  3759. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3760. for ac_dir in $PATH; do
  3761. test -z "$ac_dir" && ac_dir=.
  3762. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
  3763. lt_cv_path_LD="$ac_dir/$ac_prog"
  3764. # Check to see if the program is GNU ld. I'd rather use --version,
  3765. # but apparently some GNU ld's only accept -v.
  3766. # Break only if it was the GNU/non-GNU ld that we prefer.
  3767. if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
  3768. test "$with_gnu_ld" != no && break
  3769. else
  3770. test "$with_gnu_ld" != yes && break
  3771. fi
  3772. fi
  3773. done
  3774. IFS="$ac_save_ifs"
  3775. else
  3776. lt_cv_path_LD="$LD" # Let the user override the test with a path.
  3777. fi])
  3778. LD="$lt_cv_path_LD"
  3779. if test -n "$LD"; then
  3780. AC_MSG_RESULT($LD)
  3781. else
  3782. AC_MSG_RESULT(no)
  3783. fi
  3784. test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
  3785. AC_PROG_LD_GNU
  3786. ])
  3787. # AC_PROG_LD_GNU -
  3788. AC_DEFUN([AC_PROG_LD_GNU],
  3789. [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
  3790. [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
  3791. if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
  3792. lt_cv_prog_gnu_ld=yes
  3793. else
  3794. lt_cv_prog_gnu_ld=no
  3795. fi])
  3796. with_gnu_ld=$lt_cv_prog_gnu_ld
  3797. ])
  3798. # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
  3799. # -- PORTME Some linkers may need a different reload flag.
  3800. AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
  3801. [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
  3802. [lt_cv_ld_reload_flag='-r'])
  3803. reload_flag=$lt_cv_ld_reload_flag
  3804. test -n "$reload_flag" && reload_flag=" $reload_flag"
  3805. ])
  3806. # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
  3807. # -- PORTME fill in with the dynamic library characteristics
  3808. AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
  3809. [AC_CACHE_CHECK([how to recognise dependant libraries],
  3810. lt_cv_deplibs_check_method,
  3811. [lt_cv_file_magic_cmd='$MAGIC_CMD'
  3812. lt_cv_file_magic_test_file=
  3813. lt_cv_deplibs_check_method='unknown'
  3814. # Need to set the preceding variable on all platforms that support
  3815. # interlibrary dependencies.
  3816. # 'none' -- dependencies not supported.
  3817. # `unknown' -- same as none, but documents that we really don't know.
  3818. # 'pass_all' -- all dependencies passed with no checks.
  3819. # 'test_compile' -- check by making test program.
  3820. # 'file_magic [[regex]]' -- check by looking for files in library path
  3821. # which responds to the $file_magic_cmd with a given egrep regex.
  3822. # If you have `file' or equivalent on your system and you're not sure
  3823. # whether `pass_all' will *always* work, you probably want this one.
  3824. case $host_os in
  3825. aix4* | aix5*)
  3826. lt_cv_deplibs_check_method=pass_all
  3827. ;;
  3828. beos*)
  3829. lt_cv_deplibs_check_method=pass_all
  3830. ;;
  3831. bsdi4*)
  3832. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
  3833. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3834. lt_cv_file_magic_test_file=/shlib/libc.so
  3835. ;;
  3836. cygwin* | mingw* | pw32*)
  3837. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
  3838. lt_cv_file_magic_cmd='$OBJDUMP -f'
  3839. ;;
  3840. darwin* | rhapsody*)
  3841. lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
  3842. lt_cv_file_magic_cmd='/usr/bin/file -L'
  3843. case "$host_os" in
  3844. rhapsody* | darwin1.[[012]])
  3845. lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
  3846. ;;
  3847. *) # Darwin 1.3 on
  3848. lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
  3849. ;;
  3850. esac
  3851. ;;
  3852. freebsd*)
  3853. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3854. case $host_cpu in
  3855. i*86 )
  3856. # Not sure whether the presence of OpenBSD here was a mistake.
  3857. # Let's accept both of them until this is cleared up.
  3858. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
  3859. lt_cv_file_magic_cmd=/usr/bin/file
  3860. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3861. ;;
  3862. esac
  3863. else
  3864. lt_cv_deplibs_check_method=pass_all
  3865. fi
  3866. ;;
  3867. gnu*)
  3868. lt_cv_deplibs_check_method=pass_all
  3869. ;;
  3870. hpux10.20*|hpux11*)
  3871. lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
  3872. lt_cv_file_magic_cmd=/usr/bin/file
  3873. lt_cv_file_magic_test_file=/usr/lib/libc.sl
  3874. ;;
  3875. irix5* | irix6*)
  3876. case $host_os in
  3877. irix5*)
  3878. # this will be overridden with pass_all, but let us keep it just in case
  3879. lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
  3880. ;;
  3881. *)
  3882. case $LD in
  3883. *-32|*"-32 ") libmagic=32-bit;;
  3884. *-n32|*"-n32 ") libmagic=N32;;
  3885. *-64|*"-64 ") libmagic=64-bit;;
  3886. *) libmagic=never-match;;
  3887. esac
  3888. # this will be overridden with pass_all, but let us keep it just in case
  3889. lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
  3890. ;;
  3891. esac
  3892. lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
  3893. lt_cv_deplibs_check_method=pass_all
  3894. ;;
  3895. # This must be Linux ELF.
  3896. linux-gnu*)
  3897. case $host_cpu in
  3898. alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* | s390* )
  3899. lt_cv_deplibs_check_method=pass_all ;;
  3900. *)
  3901. # glibc up to 2.1.1 does not perform some relocations on ARM
  3902. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
  3903. esac
  3904. lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
  3905. ;;
  3906. netbsd*)
  3907. if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
  3908. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
  3909. else
  3910. lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
  3911. fi
  3912. ;;
  3913. newos6*)
  3914. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
  3915. lt_cv_file_magic_cmd=/usr/bin/file
  3916. lt_cv_file_magic_test_file=/usr/lib/libnls.so
  3917. ;;
  3918. openbsd*)
  3919. lt_cv_file_magic_cmd=/usr/bin/file
  3920. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
  3921. if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
  3922. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
  3923. else
  3924. lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
  3925. fi
  3926. ;;
  3927. osf3* | osf4* | osf5*)
  3928. # this will be overridden with pass_all, but let us keep it just in case
  3929. lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
  3930. lt_cv_file_magic_test_file=/shlib/libc.so
  3931. lt_cv_deplibs_check_method=pass_all
  3932. ;;
  3933. sco3.2v5*)
  3934. lt_cv_deplibs_check_method=pass_all
  3935. ;;
  3936. solaris*)
  3937. lt_cv_deplibs_check_method=pass_all
  3938. lt_cv_file_magic_test_file=/lib/libc.so
  3939. ;;
  3940. sysv5uw[[78]]* | sysv4*uw2*)
  3941. lt_cv_deplibs_check_method=pass_all
  3942. ;;
  3943. sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
  3944. case $host_vendor in
  3945. motorola)
  3946. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
  3947. lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
  3948. ;;
  3949. ncr)
  3950. lt_cv_deplibs_check_method=pass_all
  3951. ;;
  3952. sequent)
  3953. lt_cv_file_magic_cmd='/bin/file'
  3954. lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
  3955. ;;
  3956. sni)
  3957. lt_cv_file_magic_cmd='/bin/file'
  3958. lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
  3959. lt_cv_file_magic_test_file=/lib/libc.so
  3960. ;;
  3961. esac
  3962. ;;
  3963. esac
  3964. ])
  3965. file_magic_cmd=$lt_cv_file_magic_cmd
  3966. deplibs_check_method=$lt_cv_deplibs_check_method
  3967. ])
  3968. # AC_PROG_NM - find the path to a BSD-compatible name lister
  3969. AC_DEFUN([AC_PROG_NM],
  3970. [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
  3971. AC_MSG_CHECKING([for BSD-compatible nm])
  3972. AC_CACHE_VAL(lt_cv_path_NM,
  3973. [if test -n "$NM"; then
  3974. # Let the user override the test.
  3975. lt_cv_path_NM="$NM"
  3976. else
  3977. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
  3978. for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
  3979. test -z "$ac_dir" && ac_dir=.
  3980. tmp_nm=$ac_dir/${ac_tool_prefix}nm
  3981. if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
  3982. # Check to see if the nm accepts a BSD-compat flag.
  3983. # Adding the `sed 1q' prevents false positives on HP-UX, which says:
  3984. # nm: unknown option "B" ignored
  3985. # Tru64's nm complains that /dev/null is an invalid object file
  3986. if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
  3987. lt_cv_path_NM="$tmp_nm -B"
  3988. break
  3989. elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
  3990. lt_cv_path_NM="$tmp_nm -p"
  3991. break
  3992. else
  3993. lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
  3994. continue # so that we can try to find one that supports BSD flags
  3995. fi
  3996. fi
  3997. done
  3998. IFS="$ac_save_ifs"
  3999. test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
  4000. fi])
  4001. NM="$lt_cv_path_NM"
  4002. AC_MSG_RESULT([$NM])
  4003. ])
  4004. # AC_CHECK_LIBM - check for math library
  4005. AC_DEFUN([AC_CHECK_LIBM],
  4006. [AC_REQUIRE([AC_CANONICAL_HOST])dnl
  4007. LIBM=
  4008. case $host in
  4009. *-*-beos* | *-*-cygwin* | *-*-pw32*)
  4010. # These system don't have libm
  4011. ;;
  4012. *-ncr-sysv4.3*)
  4013. AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
  4014. AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
  4015. ;;
  4016. *)
  4017. AC_CHECK_LIB(m, main, LIBM="-lm")
  4018. ;;
  4019. esac
  4020. ])
  4021. # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
  4022. # the libltdl convenience library and INCLTDL to the include flags for
  4023. # the libltdl header and adds --enable-ltdl-convenience to the
  4024. # configure arguments. Note that LIBLTDL and INCLTDL are not
  4025. # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
  4026. # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
  4027. # with '${top_builddir}/' and INCLTDL will be prefixed with
  4028. # '${top_srcdir}/' (note the single quotes!). If your package is not
  4029. # flat and you're not using automake, define top_builddir and
  4030. # top_srcdir appropriately in the Makefiles.
  4031. AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
  4032. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4033. case $enable_ltdl_convenience in
  4034. no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
  4035. "") enable_ltdl_convenience=yes
  4036. ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
  4037. esac
  4038. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
  4039. INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  4040. ])
  4041. # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
  4042. # the libltdl installable library and INCLTDL to the include flags for
  4043. # the libltdl header and adds --enable-ltdl-install to the configure
  4044. # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
  4045. # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
  4046. # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
  4047. # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
  4048. # with '${top_srcdir}/' (note the single quotes!). If your package is
  4049. # not flat and you're not using automake, define top_builddir and
  4050. # top_srcdir appropriately in the Makefiles.
  4051. # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
  4052. AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
  4053. [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
  4054. AC_CHECK_LIB(ltdl, main,
  4055. [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
  4056. [if test x"$enable_ltdl_install" = xno; then
  4057. AC_MSG_WARN([libltdl not installed, but installation disabled])
  4058. else
  4059. enable_ltdl_install=yes
  4060. fi
  4061. ])
  4062. if test x"$enable_ltdl_install" = x"yes"; then
  4063. ac_configure_args="$ac_configure_args --enable-ltdl-install"
  4064. LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
  4065. INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
  4066. else
  4067. ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
  4068. LIBLTDL="-lltdl"
  4069. INCLTDL=
  4070. fi
  4071. ])
  4072. # old names
  4073. AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
  4074. AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
  4075. AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
  4076. AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
  4077. AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
  4078. AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
  4079. AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
  4080. # This is just to silence aclocal about the macro not being used
  4081. ifelse([AC_DISABLE_FAST_INSTALL])