aclocal.m4 145 KB

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