aclocal.m4 180 KB

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