configure 117 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344
  1. #! /bin/sh
  2. # Guess values for system-dependent variables and create Makefiles.
  3. # Generated automatically using autoconf version 2.13
  4. # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
  5. #
  6. # This configure script is free software; the Free Software Foundation
  7. # gives unlimited permission to copy, distribute and modify it.
  8. # Defaults:
  9. ac_help=
  10. ac_default_prefix=/usr/local
  11. # Any additions from configure.in:
  12. ac_help="$ac_help
  13. --with-tcllib=PATH full path to Tcl library"
  14. ac_help="$ac_help
  15. --with-tclinc=PATH full path to Tcl header"
  16. ac_help="$ac_help
  17. --disable-tcl-threads Disable threaded Tcl support if detected. (Ignore this
  18. option unless you know what you are doing)"
  19. # Initialize some variables set by options.
  20. # The variables have the same names as the options, with
  21. # dashes changed to underlines.
  22. build=NONE
  23. cache_file=./config.cache
  24. exec_prefix=NONE
  25. host=NONE
  26. no_create=
  27. nonopt=NONE
  28. no_recursion=
  29. prefix=NONE
  30. program_prefix=NONE
  31. program_suffix=NONE
  32. program_transform_name=s,x,x,
  33. silent=
  34. site=
  35. srcdir=
  36. target=NONE
  37. verbose=
  38. x_includes=NONE
  39. x_libraries=NONE
  40. bindir='${exec_prefix}/bin'
  41. sbindir='${exec_prefix}/sbin'
  42. libexecdir='${exec_prefix}/libexec'
  43. datadir='${prefix}/share'
  44. sysconfdir='${prefix}/etc'
  45. sharedstatedir='${prefix}/com'
  46. localstatedir='${prefix}/var'
  47. libdir='${exec_prefix}/lib'
  48. includedir='${prefix}/include'
  49. oldincludedir='/usr/include'
  50. infodir='${prefix}/info'
  51. mandir='${prefix}/man'
  52. # Initialize some other variables.
  53. subdirs=
  54. MFLAGS= MAKEFLAGS=
  55. SHELL=${CONFIG_SHELL-/bin/sh}
  56. # Maximum number of lines to put in a shell here document.
  57. ac_max_here_lines=12
  58. ac_prev=
  59. for ac_option
  60. do
  61. # If the previous option needs an argument, assign it.
  62. if test -n "$ac_prev"; then
  63. eval "$ac_prev=\$ac_option"
  64. ac_prev=
  65. continue
  66. fi
  67. case "$ac_option" in
  68. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  69. *) ac_optarg= ;;
  70. esac
  71. # Accept the important Cygnus configure options, so we can diagnose typos.
  72. case "$ac_option" in
  73. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  74. ac_prev=bindir ;;
  75. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  76. bindir="$ac_optarg" ;;
  77. -build | --build | --buil | --bui | --bu)
  78. ac_prev=build ;;
  79. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  80. build="$ac_optarg" ;;
  81. -cache-file | --cache-file | --cache-fil | --cache-fi \
  82. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  83. ac_prev=cache_file ;;
  84. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  85. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  86. cache_file="$ac_optarg" ;;
  87. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  88. ac_prev=datadir ;;
  89. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  90. | --da=*)
  91. datadir="$ac_optarg" ;;
  92. -disable-* | --disable-*)
  93. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  94. # Reject names that are not valid shell variable names.
  95. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  96. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  97. fi
  98. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  99. eval "enable_${ac_feature}=no" ;;
  100. -enable-* | --enable-*)
  101. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  102. # Reject names that are not valid shell variable names.
  103. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  104. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  105. fi
  106. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  107. case "$ac_option" in
  108. *=*) ;;
  109. *) ac_optarg=yes ;;
  110. esac
  111. eval "enable_${ac_feature}='$ac_optarg'" ;;
  112. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  113. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  114. | --exec | --exe | --ex)
  115. ac_prev=exec_prefix ;;
  116. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  117. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  118. | --exec=* | --exe=* | --ex=*)
  119. exec_prefix="$ac_optarg" ;;
  120. -gas | --gas | --ga | --g)
  121. # Obsolete; use --with-gas.
  122. with_gas=yes ;;
  123. -help | --help | --hel | --he)
  124. # Omit some internal or obsolete options to make the list less imposing.
  125. # This message is too long to be a string in the A/UX 3.1 sh.
  126. cat << EOF
  127. Usage: configure [options] [host]
  128. Options: [defaults in brackets after descriptions]
  129. Configuration:
  130. --cache-file=FILE cache test results in FILE
  131. --help print this message
  132. --no-create do not create output files
  133. --quiet, --silent do not print \`checking...' messages
  134. --version print the version of autoconf that created configure
  135. Directory and file names:
  136. --prefix=PREFIX install architecture-independent files in PREFIX
  137. [$ac_default_prefix]
  138. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  139. [same as prefix]
  140. --bindir=DIR user executables in DIR [EPREFIX/bin]
  141. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  142. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  143. --datadir=DIR read-only architecture-independent data in DIR
  144. [PREFIX/share]
  145. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  146. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  147. [PREFIX/com]
  148. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  149. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  150. --includedir=DIR C header files in DIR [PREFIX/include]
  151. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  152. --infodir=DIR info documentation in DIR [PREFIX/info]
  153. --mandir=DIR man documentation in DIR [PREFIX/man]
  154. --srcdir=DIR find the sources in DIR [configure dir or ..]
  155. --program-prefix=PREFIX prepend PREFIX to installed program names
  156. --program-suffix=SUFFIX append SUFFIX to installed program names
  157. --program-transform-name=PROGRAM
  158. run sed PROGRAM on installed program names
  159. EOF
  160. cat << EOF
  161. Host type:
  162. --build=BUILD configure for building on BUILD [BUILD=HOST]
  163. --host=HOST configure for HOST [guessed]
  164. --target=TARGET configure for TARGET [TARGET=HOST]
  165. Features and packages:
  166. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  167. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  168. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  169. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  170. --x-includes=DIR X include files are in DIR
  171. --x-libraries=DIR X library files are in DIR
  172. EOF
  173. if test -n "$ac_help"; then
  174. echo "--enable and --with options recognized:$ac_help"
  175. fi
  176. exit 0 ;;
  177. -host | --host | --hos | --ho)
  178. ac_prev=host ;;
  179. -host=* | --host=* | --hos=* | --ho=*)
  180. host="$ac_optarg" ;;
  181. -includedir | --includedir | --includedi | --included | --include \
  182. | --includ | --inclu | --incl | --inc)
  183. ac_prev=includedir ;;
  184. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  185. | --includ=* | --inclu=* | --incl=* | --inc=*)
  186. includedir="$ac_optarg" ;;
  187. -infodir | --infodir | --infodi | --infod | --info | --inf)
  188. ac_prev=infodir ;;
  189. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  190. infodir="$ac_optarg" ;;
  191. -libdir | --libdir | --libdi | --libd)
  192. ac_prev=libdir ;;
  193. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  194. libdir="$ac_optarg" ;;
  195. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  196. | --libexe | --libex | --libe)
  197. ac_prev=libexecdir ;;
  198. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  199. | --libexe=* | --libex=* | --libe=*)
  200. libexecdir="$ac_optarg" ;;
  201. -localstatedir | --localstatedir | --localstatedi | --localstated \
  202. | --localstate | --localstat | --localsta | --localst \
  203. | --locals | --local | --loca | --loc | --lo)
  204. ac_prev=localstatedir ;;
  205. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  206. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  207. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  208. localstatedir="$ac_optarg" ;;
  209. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  210. ac_prev=mandir ;;
  211. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  212. mandir="$ac_optarg" ;;
  213. -nfp | --nfp | --nf)
  214. # Obsolete; use --without-fp.
  215. with_fp=no ;;
  216. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  217. | --no-cr | --no-c)
  218. no_create=yes ;;
  219. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  220. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  221. no_recursion=yes ;;
  222. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  223. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  224. | --oldin | --oldi | --old | --ol | --o)
  225. ac_prev=oldincludedir ;;
  226. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  227. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  228. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  229. oldincludedir="$ac_optarg" ;;
  230. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  231. ac_prev=prefix ;;
  232. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  233. prefix="$ac_optarg" ;;
  234. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  235. | --program-pre | --program-pr | --program-p)
  236. ac_prev=program_prefix ;;
  237. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  238. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  239. program_prefix="$ac_optarg" ;;
  240. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  241. | --program-suf | --program-su | --program-s)
  242. ac_prev=program_suffix ;;
  243. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  244. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  245. program_suffix="$ac_optarg" ;;
  246. -program-transform-name | --program-transform-name \
  247. | --program-transform-nam | --program-transform-na \
  248. | --program-transform-n | --program-transform- \
  249. | --program-transform | --program-transfor \
  250. | --program-transfo | --program-transf \
  251. | --program-trans | --program-tran \
  252. | --progr-tra | --program-tr | --program-t)
  253. ac_prev=program_transform_name ;;
  254. -program-transform-name=* | --program-transform-name=* \
  255. | --program-transform-nam=* | --program-transform-na=* \
  256. | --program-transform-n=* | --program-transform-=* \
  257. | --program-transform=* | --program-transfor=* \
  258. | --program-transfo=* | --program-transf=* \
  259. | --program-trans=* | --program-tran=* \
  260. | --progr-tra=* | --program-tr=* | --program-t=*)
  261. program_transform_name="$ac_optarg" ;;
  262. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  263. | -silent | --silent | --silen | --sile | --sil)
  264. silent=yes ;;
  265. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  266. ac_prev=sbindir ;;
  267. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  268. | --sbi=* | --sb=*)
  269. sbindir="$ac_optarg" ;;
  270. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  271. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  272. | --sharedst | --shareds | --shared | --share | --shar \
  273. | --sha | --sh)
  274. ac_prev=sharedstatedir ;;
  275. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  276. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  277. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  278. | --sha=* | --sh=*)
  279. sharedstatedir="$ac_optarg" ;;
  280. -site | --site | --sit)
  281. ac_prev=site ;;
  282. -site=* | --site=* | --sit=*)
  283. site="$ac_optarg" ;;
  284. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  285. ac_prev=srcdir ;;
  286. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  287. srcdir="$ac_optarg" ;;
  288. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  289. | --syscon | --sysco | --sysc | --sys | --sy)
  290. ac_prev=sysconfdir ;;
  291. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  292. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  293. sysconfdir="$ac_optarg" ;;
  294. -target | --target | --targe | --targ | --tar | --ta | --t)
  295. ac_prev=target ;;
  296. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  297. target="$ac_optarg" ;;
  298. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  299. verbose=yes ;;
  300. -version | --version | --versio | --versi | --vers)
  301. echo "configure generated by autoconf version 2.13"
  302. exit 0 ;;
  303. -with-* | --with-*)
  304. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  305. # Reject names that are not valid shell variable names.
  306. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  307. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  308. fi
  309. ac_package=`echo $ac_package| sed 's/-/_/g'`
  310. case "$ac_option" in
  311. *=*) ;;
  312. *) ac_optarg=yes ;;
  313. esac
  314. eval "with_${ac_package}='$ac_optarg'" ;;
  315. -without-* | --without-*)
  316. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  317. # Reject names that are not valid shell variable names.
  318. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  319. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  320. fi
  321. ac_package=`echo $ac_package| sed 's/-/_/g'`
  322. eval "with_${ac_package}=no" ;;
  323. --x)
  324. # Obsolete; use --with-x.
  325. with_x=yes ;;
  326. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  327. | --x-incl | --x-inc | --x-in | --x-i)
  328. ac_prev=x_includes ;;
  329. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  330. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  331. x_includes="$ac_optarg" ;;
  332. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  333. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  334. ac_prev=x_libraries ;;
  335. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  336. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  337. x_libraries="$ac_optarg" ;;
  338. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  339. ;;
  340. *)
  341. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  342. echo "configure: warning: $ac_option: invalid host type" 1>&2
  343. fi
  344. if test "x$nonopt" != xNONE; then
  345. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  346. fi
  347. nonopt="$ac_option"
  348. ;;
  349. esac
  350. done
  351. if test -n "$ac_prev"; then
  352. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  353. fi
  354. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  355. # File descriptor usage:
  356. # 0 standard input
  357. # 1 file creation
  358. # 2 errors and warnings
  359. # 3 some systems may open it to /dev/tty
  360. # 4 used on the Kubota Titan
  361. # 6 checking for... messages and results
  362. # 5 compiler messages saved in config.log
  363. if test "$silent" = yes; then
  364. exec 6>/dev/null
  365. else
  366. exec 6>&1
  367. fi
  368. exec 5>./config.log
  369. echo "\
  370. This file contains any messages produced by compilers while
  371. running configure, to aid debugging if configure makes a mistake.
  372. " 1>&5
  373. # Strip out --no-create and --no-recursion so they do not pile up.
  374. # Also quote any args containing shell metacharacters.
  375. ac_configure_args=
  376. for ac_arg
  377. do
  378. case "$ac_arg" in
  379. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  380. | --no-cr | --no-c) ;;
  381. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  382. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  383. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  384. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  385. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  386. esac
  387. done
  388. # NLS nuisances.
  389. # Only set these to C if already set. These must not be set unconditionally
  390. # because not all systems understand e.g. LANG=C (notably SCO).
  391. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  392. # Non-C LC_CTYPE values break the ctype check.
  393. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  394. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  395. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  396. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  397. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  398. rm -rf conftest* confdefs.h
  399. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  400. echo > confdefs.h
  401. # A filename unique to this package, relative to the directory that
  402. # configure is in, which we can look for to find out if srcdir is correct.
  403. ac_unique_file=src/eggdrop.h
  404. # Find the source files, if location was not specified.
  405. if test -z "$srcdir"; then
  406. ac_srcdir_defaulted=yes
  407. # Try the directory containing this script, then its parent.
  408. ac_prog=$0
  409. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  410. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  411. srcdir=$ac_confdir
  412. if test ! -r $srcdir/$ac_unique_file; then
  413. srcdir=..
  414. fi
  415. else
  416. ac_srcdir_defaulted=no
  417. fi
  418. if test ! -r $srcdir/$ac_unique_file; then
  419. if test "$ac_srcdir_defaulted" = yes; then
  420. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  421. else
  422. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  423. fi
  424. fi
  425. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  426. # Prefer explicitly selected file to automatically selected ones.
  427. if test -z "$CONFIG_SITE"; then
  428. if test "x$prefix" != xNONE; then
  429. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  430. else
  431. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  432. fi
  433. fi
  434. for ac_site_file in $CONFIG_SITE; do
  435. if test -r "$ac_site_file"; then
  436. echo "loading site script $ac_site_file"
  437. . "$ac_site_file"
  438. fi
  439. done
  440. if test -r "$cache_file"; then
  441. echo "loading cache $cache_file"
  442. . $cache_file
  443. else
  444. echo "creating cache $cache_file"
  445. > $cache_file
  446. fi
  447. ac_ext=c
  448. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  449. ac_cpp='$CPP $CPPFLAGS'
  450. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  451. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  452. cross_compiling=$ac_cv_prog_cc_cross
  453. ac_exeext=
  454. ac_objext=o
  455. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  456. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  457. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  458. ac_n= ac_c='
  459. ' ac_t=' '
  460. else
  461. ac_n=-n ac_c= ac_t=
  462. fi
  463. else
  464. ac_n= ac_c='\c' ac_t=
  465. fi
  466. ac_aux_dir=
  467. for ac_dir in misc $srcdir/misc; do
  468. if test -f $ac_dir/install-sh; then
  469. ac_aux_dir=$ac_dir
  470. ac_install_sh="$ac_aux_dir/install-sh -c"
  471. break
  472. elif test -f $ac_dir/install.sh; then
  473. ac_aux_dir=$ac_dir
  474. ac_install_sh="$ac_aux_dir/install.sh -c"
  475. break
  476. fi
  477. done
  478. if test -z "$ac_aux_dir"; then
  479. { echo "configure: error: can not find install-sh or install.sh in misc $srcdir/misc" 1>&2; exit 1; }
  480. fi
  481. ac_config_guess=$ac_aux_dir/config.guess
  482. ac_config_sub=$ac_aux_dir/config.sub
  483. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  484. # Remove --cache-file and --srcdir arguments so they do not pile up.
  485. egg_ac_parameters=
  486. ac_prev=
  487. for ac_arg in $ac_configure_args; do
  488. if test -n "$ac_prev"; then
  489. ac_prev=
  490. continue
  491. fi
  492. case $ac_arg in
  493. -cache-file | --cache-file | --cache-fil | --cache-fi \
  494. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  495. ac_prev=cache_file ;;
  496. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  497. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
  498. | --c=*)
  499. ;;
  500. --config-cache | -C)
  501. ;;
  502. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  503. ac_prev=srcdir ;;
  504. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  505. ;;
  506. *) egg_ac_parameters="$egg_ac_parameters $ac_arg" ;;
  507. esac
  508. done
  509. # Setup build environment
  510. # Extract the first word of "gcc", so it can be a program name with args.
  511. set dummy gcc; ac_word=$2
  512. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  513. echo "configure:585: checking for $ac_word" >&5
  514. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  515. echo $ac_n "(cached) $ac_c" 1>&6
  516. else
  517. if test -n "$CC"; then
  518. ac_cv_prog_CC="$CC" # Let the user override the test.
  519. else
  520. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  521. ac_dummy="$PATH"
  522. for ac_dir in $ac_dummy; do
  523. test -z "$ac_dir" && ac_dir=.
  524. if test -f $ac_dir/$ac_word; then
  525. ac_cv_prog_CC="gcc"
  526. break
  527. fi
  528. done
  529. IFS="$ac_save_ifs"
  530. fi
  531. fi
  532. CC="$ac_cv_prog_CC"
  533. if test -n "$CC"; then
  534. echo "$ac_t""$CC" 1>&6
  535. else
  536. echo "$ac_t""no" 1>&6
  537. fi
  538. if test -z "$CC"; then
  539. # Extract the first word of "cc", so it can be a program name with args.
  540. set dummy cc; ac_word=$2
  541. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  542. echo "configure:615: checking for $ac_word" >&5
  543. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  544. echo $ac_n "(cached) $ac_c" 1>&6
  545. else
  546. if test -n "$CC"; then
  547. ac_cv_prog_CC="$CC" # Let the user override the test.
  548. else
  549. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  550. ac_prog_rejected=no
  551. ac_dummy="$PATH"
  552. for ac_dir in $ac_dummy; do
  553. test -z "$ac_dir" && ac_dir=.
  554. if test -f $ac_dir/$ac_word; then
  555. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  556. ac_prog_rejected=yes
  557. continue
  558. fi
  559. ac_cv_prog_CC="cc"
  560. break
  561. fi
  562. done
  563. IFS="$ac_save_ifs"
  564. if test $ac_prog_rejected = yes; then
  565. # We found a bogon in the path, so make sure we never use it.
  566. set dummy $ac_cv_prog_CC
  567. shift
  568. if test $# -gt 0; then
  569. # We chose a different compiler from the bogus one.
  570. # However, it has the same basename, so the bogon will be chosen
  571. # first if we set CC to just the basename; use the full file name.
  572. shift
  573. set dummy "$ac_dir/$ac_word" "$@"
  574. shift
  575. ac_cv_prog_CC="$@"
  576. fi
  577. fi
  578. fi
  579. fi
  580. CC="$ac_cv_prog_CC"
  581. if test -n "$CC"; then
  582. echo "$ac_t""$CC" 1>&6
  583. else
  584. echo "$ac_t""no" 1>&6
  585. fi
  586. if test -z "$CC"; then
  587. case "`uname -s`" in
  588. *win32* | *WIN32*)
  589. # Extract the first word of "cl", so it can be a program name with args.
  590. set dummy cl; ac_word=$2
  591. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  592. echo "configure:666: checking for $ac_word" >&5
  593. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  594. echo $ac_n "(cached) $ac_c" 1>&6
  595. else
  596. if test -n "$CC"; then
  597. ac_cv_prog_CC="$CC" # Let the user override the test.
  598. else
  599. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  600. ac_dummy="$PATH"
  601. for ac_dir in $ac_dummy; do
  602. test -z "$ac_dir" && ac_dir=.
  603. if test -f $ac_dir/$ac_word; then
  604. ac_cv_prog_CC="cl"
  605. break
  606. fi
  607. done
  608. IFS="$ac_save_ifs"
  609. fi
  610. fi
  611. CC="$ac_cv_prog_CC"
  612. if test -n "$CC"; then
  613. echo "$ac_t""$CC" 1>&6
  614. else
  615. echo "$ac_t""no" 1>&6
  616. fi
  617. ;;
  618. esac
  619. fi
  620. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  621. fi
  622. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  623. echo "configure:698: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  624. ac_ext=c
  625. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  626. ac_cpp='$CPP $CPPFLAGS'
  627. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  628. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  629. cross_compiling=$ac_cv_prog_cc_cross
  630. cat > conftest.$ac_ext << EOF
  631. #line 709 "configure"
  632. #include "confdefs.h"
  633. main(){return(0);}
  634. EOF
  635. if { (eval echo configure:714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  636. ac_cv_prog_cc_works=yes
  637. # If we can't run a trivial program, we are probably using a cross compiler.
  638. if (./conftest; exit) 2>/dev/null; then
  639. ac_cv_prog_cc_cross=no
  640. else
  641. ac_cv_prog_cc_cross=yes
  642. fi
  643. else
  644. echo "configure: failed program was:" >&5
  645. cat conftest.$ac_ext >&5
  646. ac_cv_prog_cc_works=no
  647. fi
  648. rm -fr conftest*
  649. ac_ext=c
  650. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  651. ac_cpp='$CPP $CPPFLAGS'
  652. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  653. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  654. cross_compiling=$ac_cv_prog_cc_cross
  655. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  656. if test $ac_cv_prog_cc_works = no; then
  657. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  658. fi
  659. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  660. echo "configure:740: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  661. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  662. cross_compiling=$ac_cv_prog_cc_cross
  663. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  664. echo "configure:745: checking whether we are using GNU C" >&5
  665. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  666. echo $ac_n "(cached) $ac_c" 1>&6
  667. else
  668. cat > conftest.c <<EOF
  669. #ifdef __GNUC__
  670. yes;
  671. #endif
  672. EOF
  673. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  674. ac_cv_prog_gcc=yes
  675. else
  676. ac_cv_prog_gcc=no
  677. fi
  678. fi
  679. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  680. if test $ac_cv_prog_gcc = yes; then
  681. GCC=yes
  682. else
  683. GCC=
  684. fi
  685. ac_test_CFLAGS="${CFLAGS+set}"
  686. ac_save_CFLAGS="$CFLAGS"
  687. CFLAGS=
  688. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  689. echo "configure:773: checking whether ${CC-cc} accepts -g" >&5
  690. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  691. echo $ac_n "(cached) $ac_c" 1>&6
  692. else
  693. echo 'void f(){}' > conftest.c
  694. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  695. ac_cv_prog_cc_g=yes
  696. else
  697. ac_cv_prog_cc_g=no
  698. fi
  699. rm -f conftest*
  700. fi
  701. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  702. if test "$ac_test_CFLAGS" = set; then
  703. CFLAGS="$ac_save_CFLAGS"
  704. elif test $ac_cv_prog_cc_g = yes; then
  705. if test "$GCC" = yes; then
  706. CFLAGS="-g -O2"
  707. else
  708. CFLAGS="-g"
  709. fi
  710. else
  711. if test "$GCC" = yes; then
  712. CFLAGS="-O2"
  713. else
  714. CFLAGS=
  715. fi
  716. fi
  717. if test "${cross_compiling-x}" = "x"
  718. then
  719. cat << 'EOF' >&2
  720. configure: error:
  721. This system does not appear to have a working C compiler.
  722. A working C compiler is required to compile Eggdrop.
  723. EOF
  724. exit 1
  725. fi
  726. # Crazy machines
  727. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  728. echo "configure:819: checking how to run the C preprocessor" >&5
  729. # On Suns, sometimes $CPP names a directory.
  730. if test -n "$CPP" && test -d "$CPP"; then
  731. CPP=
  732. fi
  733. if test -z "$CPP"; then
  734. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  735. echo $ac_n "(cached) $ac_c" 1>&6
  736. else
  737. # This must be in double quotes, not single quotes, because CPP may get
  738. # substituted into the Makefile and "${CC-cc}" will confuse make.
  739. CPP="${CC-cc} -E"
  740. # On the NeXT, cc -E runs the code through the compiler's parser,
  741. # not just through cpp.
  742. cat > conftest.$ac_ext <<EOF
  743. #line 834 "configure"
  744. #include "confdefs.h"
  745. #include <assert.h>
  746. Syntax Error
  747. EOF
  748. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  749. { (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  750. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  751. if test -z "$ac_err"; then
  752. :
  753. else
  754. echo "$ac_err" >&5
  755. echo "configure: failed program was:" >&5
  756. cat conftest.$ac_ext >&5
  757. rm -rf conftest*
  758. CPP="${CC-cc} -E -traditional-cpp"
  759. cat > conftest.$ac_ext <<EOF
  760. #line 851 "configure"
  761. #include "confdefs.h"
  762. #include <assert.h>
  763. Syntax Error
  764. EOF
  765. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  766. { (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  767. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  768. if test -z "$ac_err"; then
  769. :
  770. else
  771. echo "$ac_err" >&5
  772. echo "configure: failed program was:" >&5
  773. cat conftest.$ac_ext >&5
  774. rm -rf conftest*
  775. CPP="${CC-cc} -nologo -E"
  776. cat > conftest.$ac_ext <<EOF
  777. #line 868 "configure"
  778. #include "confdefs.h"
  779. #include <assert.h>
  780. Syntax Error
  781. EOF
  782. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  783. { (eval echo configure:874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  784. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  785. if test -z "$ac_err"; then
  786. :
  787. else
  788. echo "$ac_err" >&5
  789. echo "configure: failed program was:" >&5
  790. cat conftest.$ac_ext >&5
  791. rm -rf conftest*
  792. CPP=/lib/cpp
  793. fi
  794. rm -f conftest*
  795. fi
  796. rm -f conftest*
  797. fi
  798. rm -f conftest*
  799. ac_cv_prog_CPP="$CPP"
  800. fi
  801. CPP="$ac_cv_prog_CPP"
  802. else
  803. ac_cv_prog_CPP="$CPP"
  804. fi
  805. echo "$ac_t""$CPP" 1>&6
  806. echo $ac_n "checking for AIX""... $ac_c" 1>&6
  807. echo "configure:899: checking for AIX" >&5
  808. cat > conftest.$ac_ext <<EOF
  809. #line 901 "configure"
  810. #include "confdefs.h"
  811. #ifdef _AIX
  812. yes
  813. #endif
  814. EOF
  815. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  816. egrep "yes" >/dev/null 2>&1; then
  817. rm -rf conftest*
  818. echo "$ac_t""yes" 1>&6; cat >> confdefs.h <<\EOF
  819. #define _ALL_SOURCE 1
  820. EOF
  821. else
  822. rm -rf conftest*
  823. echo "$ac_t""no" 1>&6
  824. fi
  825. rm -f conftest*
  826. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  827. echo "configure:923: checking for POSIXized ISC" >&5
  828. if test -d /etc/conf/kconfig.d &&
  829. grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  830. then
  831. echo "$ac_t""yes" 1>&6
  832. ISC=yes # If later tests want to check for ISC.
  833. cat >> confdefs.h <<\EOF
  834. #define _POSIX_SOURCE 1
  835. EOF
  836. if test "$GCC" = yes; then
  837. CC="$CC -posix"
  838. else
  839. CC="$CC -Xp"
  840. fi
  841. else
  842. echo "$ac_t""no" 1>&6
  843. ISC=
  844. fi
  845. ac_safe=`echo "minix/config.h" | sed 'y%./+-%__p_%'`
  846. echo $ac_n "checking for minix/config.h""... $ac_c" 1>&6
  847. echo "configure:945: checking for minix/config.h" >&5
  848. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  849. echo $ac_n "(cached) $ac_c" 1>&6
  850. else
  851. cat > conftest.$ac_ext <<EOF
  852. #line 950 "configure"
  853. #include "confdefs.h"
  854. #include <minix/config.h>
  855. EOF
  856. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  857. { (eval echo configure:955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  858. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  859. if test -z "$ac_err"; then
  860. rm -rf conftest*
  861. eval "ac_cv_header_$ac_safe=yes"
  862. else
  863. echo "$ac_err" >&5
  864. echo "configure: failed program was:" >&5
  865. cat conftest.$ac_ext >&5
  866. rm -rf conftest*
  867. eval "ac_cv_header_$ac_safe=no"
  868. fi
  869. rm -f conftest*
  870. fi
  871. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  872. echo "$ac_t""yes" 1>&6
  873. MINIX=yes
  874. else
  875. echo "$ac_t""no" 1>&6
  876. MINIX=
  877. fi
  878. if test "$MINIX" = yes; then
  879. cat >> confdefs.h <<\EOF
  880. #define _POSIX_SOURCE 1
  881. EOF
  882. cat >> confdefs.h <<\EOF
  883. #define _POSIX_1_SOURCE 2
  884. EOF
  885. cat >> confdefs.h <<\EOF
  886. #define _MINIX 1
  887. EOF
  888. fi
  889. # Speedup compile
  890. if test -z "$no_pipe"
  891. then
  892. if test -n "$GCC"
  893. then
  894. echo $ac_n "checking whether the compiler understands -pipe""... $ac_c" 1>&6
  895. echo "configure:999: checking whether the compiler understands -pipe" >&5
  896. if eval "test \"`echo '$''{'egg_cv_var_ccpipe'+set}'`\" = set"; then
  897. echo $ac_n "(cached) $ac_c" 1>&6
  898. else
  899. ac_old_CC="$CC"
  900. CC="$CC -pipe"
  901. cat > conftest.$ac_ext <<EOF
  902. #line 1006 "configure"
  903. #include "confdefs.h"
  904. int main() {
  905. ; return 0; }
  906. EOF
  907. if { (eval echo configure:1013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  908. rm -rf conftest*
  909. egg_cv_var_ccpipe="yes"
  910. else
  911. echo "configure: failed program was:" >&5
  912. cat conftest.$ac_ext >&5
  913. rm -rf conftest*
  914. egg_cv_var_ccpipe="no"
  915. fi
  916. rm -f conftest*
  917. CC="$ac_old_CC"
  918. fi
  919. echo "$ac_t""$egg_cv_var_ccpipe" 1>&6
  920. if test "$egg_cv_var_ccpipe" = "yes"
  921. then
  922. CC="$CC -pipe"
  923. fi
  924. fi
  925. fi
  926. # Checks for programs
  927. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  928. echo "configure:1038: checking whether ${MAKE-make} sets \${MAKE}" >&5
  929. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  930. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  931. echo $ac_n "(cached) $ac_c" 1>&6
  932. else
  933. cat > conftestmake <<\EOF
  934. all:
  935. @echo 'ac_maketemp="${MAKE}"'
  936. EOF
  937. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  938. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  939. if test -n "$ac_maketemp"; then
  940. eval ac_cv_prog_make_${ac_make}_set=yes
  941. else
  942. eval ac_cv_prog_make_${ac_make}_set=no
  943. fi
  944. rm -f conftestmake
  945. fi
  946. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  947. echo "$ac_t""yes" 1>&6
  948. SET_MAKE=
  949. else
  950. echo "$ac_t""no" 1>&6
  951. SET_MAKE="MAKE=${MAKE-make}"
  952. fi
  953. # Extract the first word of "ranlib", so it can be a program name with args.
  954. set dummy ranlib; ac_word=$2
  955. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  956. echo "configure:1067: checking for $ac_word" >&5
  957. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  958. echo $ac_n "(cached) $ac_c" 1>&6
  959. else
  960. if test -n "$RANLIB"; then
  961. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  962. else
  963. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  964. ac_dummy="$PATH"
  965. for ac_dir in $ac_dummy; do
  966. test -z "$ac_dir" && ac_dir=.
  967. if test -f $ac_dir/$ac_word; then
  968. ac_cv_prog_RANLIB="ranlib"
  969. break
  970. fi
  971. done
  972. IFS="$ac_save_ifs"
  973. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  974. fi
  975. fi
  976. RANLIB="$ac_cv_prog_RANLIB"
  977. if test -n "$RANLIB"; then
  978. echo "$ac_t""$RANLIB" 1>&6
  979. else
  980. echo "$ac_t""no" 1>&6
  981. fi
  982. # Find a good install program. We prefer a C program (faster),
  983. # so one script is as good as another. But avoid the broken or
  984. # incompatible versions:
  985. # SysV /etc/install, /usr/sbin/install
  986. # SunOS /usr/etc/install
  987. # IRIX /sbin/install
  988. # AIX /bin/install
  989. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  990. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  991. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  992. # ./install, which can be erroneously created by make from ./install.sh.
  993. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  994. echo "configure:1106: checking for a BSD compatible install" >&5
  995. if test -z "$INSTALL"; then
  996. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  997. echo $ac_n "(cached) $ac_c" 1>&6
  998. else
  999. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  1000. for ac_dir in $PATH; do
  1001. # Account for people who put trailing slashes in PATH elements.
  1002. case "$ac_dir/" in
  1003. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  1004. *)
  1005. # OSF1 and SCO ODT 3.0 have their own names for install.
  1006. # Don't use installbsd from OSF since it installs stuff as root
  1007. # by default.
  1008. for ac_prog in ginstall scoinst install; do
  1009. if test -f $ac_dir/$ac_prog; then
  1010. if test $ac_prog = install &&
  1011. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  1012. # AIX install. It has an incompatible calling convention.
  1013. :
  1014. else
  1015. ac_cv_path_install="$ac_dir/$ac_prog -c"
  1016. break 2
  1017. fi
  1018. fi
  1019. done
  1020. ;;
  1021. esac
  1022. done
  1023. IFS="$ac_save_IFS"
  1024. fi
  1025. if test "${ac_cv_path_install+set}" = set; then
  1026. INSTALL="$ac_cv_path_install"
  1027. else
  1028. # As a last resort, use the slow shell script. We don't cache a
  1029. # path for INSTALL within a source directory, because that will
  1030. # break other packages using the cache if that directory is
  1031. # removed, or if the path is relative.
  1032. INSTALL="$ac_install_sh"
  1033. fi
  1034. fi
  1035. echo "$ac_t""$INSTALL" 1>&6
  1036. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  1037. # It thinks the first close brace ends the variable substitution.
  1038. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  1039. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  1040. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  1041. echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
  1042. echo "configure:1159: checking whether ln -s works" >&5
  1043. if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
  1044. echo $ac_n "(cached) $ac_c" 1>&6
  1045. else
  1046. rm -f conftestdata
  1047. if ln -s X conftestdata 2>/dev/null
  1048. then
  1049. rm -f conftestdata
  1050. ac_cv_prog_LN_S="ln -s"
  1051. else
  1052. ac_cv_prog_LN_S=ln
  1053. fi
  1054. fi
  1055. LN_S="$ac_cv_prog_LN_S"
  1056. if test "$ac_cv_prog_LN_S" = "ln -s"; then
  1057. echo "$ac_t""yes" 1>&6
  1058. else
  1059. echo "$ac_t""no" 1>&6
  1060. fi
  1061. # Extract the first word of "strip", so it can be a program name with args.
  1062. set dummy strip; ac_word=$2
  1063. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1064. echo "configure:1182: checking for $ac_word" >&5
  1065. if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
  1066. echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068. if test -n "$STRIP"; then
  1069. ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
  1070. else
  1071. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1072. ac_dummy="$PATH"
  1073. for ac_dir in $ac_dummy; do
  1074. test -z "$ac_dir" && ac_dir=.
  1075. if test -f $ac_dir/$ac_word; then
  1076. ac_cv_prog_STRIP="strip"
  1077. break
  1078. fi
  1079. done
  1080. IFS="$ac_save_ifs"
  1081. fi
  1082. fi
  1083. STRIP="$ac_cv_prog_STRIP"
  1084. if test -n "$STRIP"; then
  1085. echo "$ac_t""$STRIP" 1>&6
  1086. else
  1087. echo "$ac_t""no" 1>&6
  1088. fi
  1089. if test "${STRIP-x}" = "x"
  1090. then
  1091. STRIP=touch
  1092. fi
  1093. # awk is needed for Tcl library and header checks, and eggdrop version subst
  1094. for ac_prog in mawk gawk nawk awk
  1095. do
  1096. # Extract the first word of "$ac_prog", so it can be a program name with args.
  1097. set dummy $ac_prog; ac_word=$2
  1098. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1099. echo "configure:1219: checking for $ac_word" >&5
  1100. if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
  1101. echo $ac_n "(cached) $ac_c" 1>&6
  1102. else
  1103. if test -n "$AWK"; then
  1104. ac_cv_prog_AWK="$AWK" # Let the user override the test.
  1105. else
  1106. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1107. ac_dummy="$PATH"
  1108. for ac_dir in $ac_dummy; do
  1109. test -z "$ac_dir" && ac_dir=.
  1110. if test -f $ac_dir/$ac_word; then
  1111. ac_cv_prog_AWK="$ac_prog"
  1112. break
  1113. fi
  1114. done
  1115. IFS="$ac_save_ifs"
  1116. fi
  1117. fi
  1118. AWK="$ac_cv_prog_AWK"
  1119. if test -n "$AWK"; then
  1120. echo "$ac_t""$AWK" 1>&6
  1121. else
  1122. echo "$ac_t""no" 1>&6
  1123. fi
  1124. test -n "$AWK" && break
  1125. done
  1126. if test "${AWK-x}" = "x"
  1127. then
  1128. cat << 'EOF' >&2
  1129. configure: error:
  1130. This system seems to lack a working 'awk' command.
  1131. A working 'awk' command is required to compile Eggdrop.
  1132. EOF
  1133. exit 1
  1134. fi
  1135. # basename is needed for Tcl library and header checks
  1136. # Extract the first word of "basename", so it can be a program name with args.
  1137. set dummy basename; ac_word=$2
  1138. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1139. echo "configure:1264: checking for $ac_word" >&5
  1140. if eval "test \"`echo '$''{'ac_cv_prog_BASENAME'+set}'`\" = set"; then
  1141. echo $ac_n "(cached) $ac_c" 1>&6
  1142. else
  1143. if test -n "$BASENAME"; then
  1144. ac_cv_prog_BASENAME="$BASENAME" # Let the user override the test.
  1145. else
  1146. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1147. ac_dummy="$PATH"
  1148. for ac_dir in $ac_dummy; do
  1149. test -z "$ac_dir" && ac_dir=.
  1150. if test -f $ac_dir/$ac_word; then
  1151. ac_cv_prog_BASENAME="basename"
  1152. break
  1153. fi
  1154. done
  1155. IFS="$ac_save_ifs"
  1156. fi
  1157. fi
  1158. BASENAME="$ac_cv_prog_BASENAME"
  1159. if test -n "$BASENAME"; then
  1160. echo "$ac_t""$BASENAME" 1>&6
  1161. else
  1162. echo "$ac_t""no" 1>&6
  1163. fi
  1164. if test "${BASENAME-x}" = "x"
  1165. then
  1166. cat << 'EOF' >&2
  1167. configure: error:
  1168. This system seems to lack a working 'basename' command.
  1169. A working 'basename' command is required to compile Eggdrop.
  1170. EOF
  1171. exit 1
  1172. fi
  1173. # Extract the first word of "uname", so it can be a program name with args.
  1174. set dummy uname; ac_word=$2
  1175. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1176. echo "configure:1305: checking for $ac_word" >&5
  1177. if eval "test \"`echo '$''{'ac_cv_prog_UNAME'+set}'`\" = set"; then
  1178. echo $ac_n "(cached) $ac_c" 1>&6
  1179. else
  1180. if test -n "$UNAME"; then
  1181. ac_cv_prog_UNAME="$UNAME" # Let the user override the test.
  1182. else
  1183. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1184. ac_dummy="$PATH"
  1185. for ac_dir in $ac_dummy; do
  1186. test -z "$ac_dir" && ac_dir=.
  1187. if test -f $ac_dir/$ac_word; then
  1188. ac_cv_prog_UNAME="uname"
  1189. break
  1190. fi
  1191. done
  1192. IFS="$ac_save_ifs"
  1193. fi
  1194. fi
  1195. UNAME="$ac_cv_prog_UNAME"
  1196. if test -n "$UNAME"; then
  1197. echo "$ac_t""$UNAME" 1>&6
  1198. else
  1199. echo "$ac_t""no" 1>&6
  1200. fi
  1201. # Test the os and set the module linking settings
  1202. LINUX=no
  1203. IRIX=no
  1204. SUNOS=no
  1205. HPUX=no
  1206. EGG_CYGWIN=no
  1207. MOD_CC="$CC"
  1208. MOD_LD="$CC"
  1209. MOD_STRIP="$STRIP"
  1210. SHLIB_CC="$CC"
  1211. SHLIB_LD="$CC"
  1212. SHLIB_STRIP="$STRIP"
  1213. NEED_DL=1
  1214. DEFAULT_MAKE=eggdrop
  1215. echo $ac_n "checking system type""... $ac_c" 1>&6
  1216. echo "configure:1348: checking system type" >&5
  1217. if eval "test \"`echo '$''{'egg_cv_var_system_type'+set}'`\" = set"; then
  1218. echo $ac_n "(cached) $ac_c" 1>&6
  1219. else
  1220. egg_cv_var_system_type=`$UNAME -s`
  1221. fi
  1222. echo "$ac_t""$egg_cv_var_system_type" 1>&6
  1223. echo $ac_n "checking system release""... $ac_c" 1>&6
  1224. echo "configure:1357: checking system release" >&5
  1225. if eval "test \"`echo '$''{'egg_cv_var_system_release'+set}'`\" = set"; then
  1226. echo $ac_n "(cached) $ac_c" 1>&6
  1227. else
  1228. egg_cv_var_system_release=`$UNAME -r`
  1229. fi
  1230. echo "$ac_t""$egg_cv_var_system_release" 1>&6
  1231. case "$egg_cv_var_system_type" in
  1232. BSD/OS)
  1233. case "`echo $egg_cv_var_system_release | cut -d . -f 1`" in
  1234. 2)
  1235. NEED_DL=0
  1236. DEFAULT_MAKE=static
  1237. ;;
  1238. 3)
  1239. MOD_CC=shlicc
  1240. MOD_LD=shlicc
  1241. MOD_STRIP="$STRIP -d"
  1242. SHLIB_LD="shlicc -r"
  1243. SHLIB_STRIP=touch
  1244. cat >> confdefs.h <<\EOF
  1245. #define MODULES_OK 1
  1246. EOF
  1247. ;;
  1248. *)
  1249. CFLAGS="$CFLAGS -Wall"
  1250. MOD_LD="$CC"
  1251. MOD_STRIP="$STRIP -d"
  1252. SHLIB_CC="$CC -export-dynamic -fPIC"
  1253. SHLIB_LD="$CC -shared -nostartfiles"
  1254. cat >> confdefs.h <<\EOF
  1255. #define MODULES_OK 1
  1256. EOF
  1257. ;;
  1258. esac
  1259. ;;
  1260. CYGWI*)
  1261. case "`echo $egg_cv_var_system_release | cut -c 1-3`" in
  1262. 1.*)
  1263. NEED_DL=0
  1264. SHLIB_LD="$CC -shared"
  1265. echo $ac_n "checking how to access the Win32 API""... $ac_c" 1>&6
  1266. echo "configure:1402: checking how to access the Win32 API" >&5
  1267. WIN32FLAGS=
  1268. cat > conftest.$ac_ext <<EOF
  1269. #line 1405 "configure"
  1270. #include "confdefs.h"
  1271. int main() {
  1272. #ifndef WIN32
  1273. # ifndef _WIN32
  1274. # error WIN32 or _WIN32 not defined
  1275. # endif
  1276. #endif
  1277. ; return 0; }
  1278. EOF
  1279. if { (eval echo configure:1417: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1280. rm -rf conftest*
  1281. echo "$ac_t""present by default" 1>&6
  1282. else
  1283. echo "configure: failed program was:" >&5
  1284. cat conftest.$ac_ext >&5
  1285. rm -rf conftest*
  1286. ac_compile_save="$ac_compile"
  1287. save_CC="$CC"
  1288. ac_compile="$ac_compile -mwin32"
  1289. CC="$CC -mwin32"
  1290. cat > conftest.$ac_ext <<EOF
  1291. #line 1432 "configure"
  1292. #include "confdefs.h"
  1293. int main() {
  1294. #ifndef WIN32
  1295. # ifndef _WIN32
  1296. # error WIN32 or _WIN32 not defined
  1297. # endif
  1298. #endif
  1299. ; return 0; }
  1300. EOF
  1301. if { (eval echo configure:1444: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1302. rm -rf conftest*
  1303. echo "$ac_t""found via -mwin32" 1>&6
  1304. ac_compile="$ac_compile_save"
  1305. CC="$save_CC"
  1306. WIN32FLAGS="-mwin32"
  1307. else
  1308. echo "configure: failed program was:" >&5
  1309. cat conftest.$ac_ext >&5
  1310. rm -rf conftest*
  1311. ac_compile="$ac_compile_save"
  1312. CC="$save_CC"
  1313. echo "$ac_t""not found" 1>&6
  1314. fi
  1315. rm -f conftest*
  1316. fi
  1317. rm -f conftest*
  1318. CC="$CC $WIN32FLAGS"
  1319. MOD_CC="$CC"
  1320. MOD_LD="$CC"
  1321. echo $ac_n "checking for /usr/lib/binmode.o""... $ac_c" 1>&6
  1322. echo "configure:1472: checking for /usr/lib/binmode.o" >&5
  1323. if test -r /usr/lib/binmode.o
  1324. then
  1325. echo "$ac_t""yes" 1>&6
  1326. LIBS="$LIBS /usr/lib/binmode.o"
  1327. else
  1328. echo "$ac_t""no" 1>&6
  1329. echo "configure: warning: Make sure the directory Eggdrop is installed into is mounted in binary mode." 1>&2
  1330. fi
  1331. cat >> confdefs.h <<\EOF
  1332. #define MODULES_OK 1
  1333. EOF
  1334. ;;
  1335. *)
  1336. NEED_DL=0
  1337. DEFAULT_MAKE=static
  1338. echo "configure: warning: Make sure the directory Eggdrop is installed into is mounted in binary mode." 1>&2
  1339. ;;
  1340. esac
  1341. EGG_CYGWIN=yes
  1342. cat >> confdefs.h <<\EOF
  1343. #define CYGWIN_HACKS 1
  1344. EOF
  1345. ;;
  1346. HP-UX)
  1347. HPUX=yes
  1348. MOD_LD="$CC -fPIC -shared"
  1349. SHLIB_CC="$CC -fPIC"
  1350. SHLIB_LD="ld -b"
  1351. NEED_DL=0
  1352. cat >> confdefs.h <<\EOF
  1353. #define MODULES_OK 1
  1354. EOF
  1355. cat >> confdefs.h <<\EOF
  1356. #define HPUX_HACKS 1
  1357. EOF
  1358. if test "`echo $egg_cv_var_system_release | cut -d . -f 2`" = "10"
  1359. then
  1360. cat >> confdefs.h <<\EOF
  1361. #define HPUX10_HACKS 1
  1362. EOF
  1363. fi
  1364. ;;
  1365. dell)
  1366. echo "$ac_t""Dell SVR4" 1>&6
  1367. SHLIB_STRIP=touch
  1368. NEED_DL=0
  1369. MOD_LD="$CC -lelf -lucb"
  1370. ;;
  1371. IRIX)
  1372. SHLIB_LD="ld -n32 -shared -rdata_shared"
  1373. IRIX=yes
  1374. SHLIB_STRIP=touch
  1375. NEED_DL=0
  1376. DEFAULT_MAKE=static
  1377. ;;
  1378. Ultrix)
  1379. NEED_DL=0
  1380. SHLIB_STRIP=touch
  1381. DEFAULT_MAKE=static
  1382. SHELL=/bin/sh5
  1383. ;;
  1384. SINIX*)
  1385. NEED_DL=0
  1386. SHLIB_STRIP=touch
  1387. DEFAULT_MAKE=static
  1388. SHLIB_CC="cc -G"
  1389. ;;
  1390. BeOS)
  1391. NEED_DL=0
  1392. SHLIB_STRIP=strip
  1393. DEFAULT_MAKE=static
  1394. ;;
  1395. Linux)
  1396. LINUX=yes
  1397. CFLAGS="$CFLAGS -Wall"
  1398. MOD_LD="$CC"
  1399. SHLIB_CC="$CC -fPIC"
  1400. SHLIB_LD="$CC -shared -nostartfiles"
  1401. cat >> confdefs.h <<\EOF
  1402. #define MODULES_OK 1
  1403. EOF
  1404. ;;
  1405. Lynx)
  1406. NEED_DL=0
  1407. DEFAULT_MAKE=static
  1408. SHLIB_STRIP=strip
  1409. ;;
  1410. QNX)
  1411. NEED_DL=0
  1412. DEFAULT_MAKE=static
  1413. SHLIB_LD="ld -shared"
  1414. SHLIB_STRIP=strip
  1415. ;;
  1416. OSF1)
  1417. case "`echo $egg_cv_var_system_release | cut -d . -f 1`" in
  1418. V*)
  1419. # FIXME: we should check this in a separate test
  1420. # Digital OSF uses an ancient version of gawk
  1421. if test "$AWK" = "gawk"
  1422. then
  1423. AWK=awk
  1424. fi
  1425. MOD_CC=cc
  1426. MOD_LD=cc
  1427. SHLIB_CC=cc
  1428. SHLIB_LD="ld -shared -expect_unresolved \"'*'\""
  1429. SHLIB_STRIP=touch
  1430. cat >> confdefs.h <<\EOF
  1431. #define MODULES_OK 1
  1432. EOF
  1433. ;;
  1434. 1.0|1.1|1.2)
  1435. SHLIB_LD="ld -R -export :"
  1436. cat >> confdefs.h <<\EOF
  1437. #define MODULES_OK 1
  1438. EOF
  1439. cat >> confdefs.h <<\EOF
  1440. #define OSF1_HACKS 1
  1441. EOF
  1442. ;;
  1443. 1.*)
  1444. SHLIB_CC="$CC -fpic"
  1445. SHLIB_LD="ld -shared"
  1446. cat >> confdefs.h <<\EOF
  1447. #define MODULES_OK 1
  1448. EOF
  1449. cat >> confdefs.h <<\EOF
  1450. #define OSF1_HACKS 1
  1451. EOF
  1452. ;;
  1453. *)
  1454. NEED_DL=0
  1455. DEFAULT_MAKE=static
  1456. ;;
  1457. esac
  1458. cat >> confdefs.h <<\EOF
  1459. #define STOP_UAC 1
  1460. EOF
  1461. ;;
  1462. SunOS)
  1463. if test "`echo $egg_cv_var_system_release | cut -d . -f 1`" = "5"
  1464. then
  1465. # Solaris
  1466. if test -n "$GCC"
  1467. then
  1468. SHLIB_CC="$CC -fPIC"
  1469. SHLIB_LD="$CC -shared"
  1470. else
  1471. SHLIB_CC="$CC -KPIC"
  1472. SHLIB_LD="$CC -G -z text"
  1473. fi
  1474. else
  1475. # SunOS 4
  1476. SUNOS=yes
  1477. SHLIB_LD=ld
  1478. SHLIB_CC="$CC -PIC"
  1479. cat >> confdefs.h <<\EOF
  1480. #define DLOPEN_1 1
  1481. EOF
  1482. fi
  1483. cat >> confdefs.h <<\EOF
  1484. #define MODULES_OK 1
  1485. EOF
  1486. ;;
  1487. *BSD)
  1488. # FreeBSD/OpenBSD/NetBSD
  1489. SHLIB_CC="$CC -fPIC"
  1490. SHLIB_LD="ld -Bshareable -x"
  1491. cat >> confdefs.h <<\EOF
  1492. #define MODULES_OK 1
  1493. EOF
  1494. ;;
  1495. *)
  1496. echo $ac_n "checking if system is Mach based""... $ac_c" 1>&6
  1497. echo "configure:1648: checking if system is Mach based" >&5
  1498. if test -r /mach
  1499. then
  1500. echo "$ac_t""yes" 1>&6
  1501. NEED_DL=0
  1502. DEFAULT_MAKE=static
  1503. cat >> confdefs.h <<\EOF
  1504. #define BORGCUBES 1
  1505. EOF
  1506. else
  1507. echo "$ac_t""no" 1>&6
  1508. echo $ac_n "checking if system is QNX""... $ac_c" 1>&6
  1509. echo "configure:1660: checking if system is QNX" >&5
  1510. if test -r /cmds
  1511. then
  1512. echo "$ac_t""yes" 1>&6
  1513. SHLIB_STRIP=touch
  1514. NEED_DL=0
  1515. DEFAULT_MAKE=static
  1516. else
  1517. echo "$ac_t""no" 1>&6
  1518. echo "$ac_t""Something unknown!" 1>&6
  1519. echo "$ac_t""If you get dynamic modules to work, be sure to let the devel team know HOW :)" 1>&6
  1520. NEED_DL=0
  1521. DEFAULT_MAKE=static
  1522. fi
  1523. fi
  1524. ;;
  1525. esac
  1526. # Checks for system libraries
  1527. # FIXME: this needs to be fixed so that it works on IRIX
  1528. if test "$IRIX" = "yes"
  1529. then
  1530. echo "configure: warning: Skipping library tests because they CONFUSE Irix." 1>&2
  1531. else
  1532. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  1533. echo "configure:1686: checking for socket in -lsocket" >&5
  1534. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  1535. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1536. echo $ac_n "(cached) $ac_c" 1>&6
  1537. else
  1538. ac_save_LIBS="$LIBS"
  1539. LIBS="-lsocket $LIBS"
  1540. cat > conftest.$ac_ext <<EOF
  1541. #line 1694 "configure"
  1542. #include "confdefs.h"
  1543. /* Override any gcc2 internal prototype to avoid an error. */
  1544. /* We use char because int might match the return type of a gcc2
  1545. builtin and then its argument prototype would still apply. */
  1546. char socket();
  1547. int main() {
  1548. socket()
  1549. ; return 0; }
  1550. EOF
  1551. if { (eval echo configure:1705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1552. rm -rf conftest*
  1553. eval "ac_cv_lib_$ac_lib_var=yes"
  1554. else
  1555. echo "configure: failed program was:" >&5
  1556. cat conftest.$ac_ext >&5
  1557. rm -rf conftest*
  1558. eval "ac_cv_lib_$ac_lib_var=no"
  1559. fi
  1560. rm -f conftest*
  1561. LIBS="$ac_save_LIBS"
  1562. fi
  1563. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1564. echo "$ac_t""yes" 1>&6
  1565. ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1566. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1567. cat >> confdefs.h <<EOF
  1568. #define $ac_tr_lib 1
  1569. EOF
  1570. LIBS="-lsocket $LIBS"
  1571. else
  1572. echo "$ac_t""no" 1>&6
  1573. fi
  1574. echo $ac_n "checking for connect in -lnsl""... $ac_c" 1>&6
  1575. echo "configure:1733: checking for connect in -lnsl" >&5
  1576. ac_lib_var=`echo nsl'_'connect | sed 'y%./+-%__p_%'`
  1577. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1578. echo $ac_n "(cached) $ac_c" 1>&6
  1579. else
  1580. ac_save_LIBS="$LIBS"
  1581. LIBS="-lnsl $LIBS"
  1582. cat > conftest.$ac_ext <<EOF
  1583. #line 1741 "configure"
  1584. #include "confdefs.h"
  1585. /* Override any gcc2 internal prototype to avoid an error. */
  1586. /* We use char because int might match the return type of a gcc2
  1587. builtin and then its argument prototype would still apply. */
  1588. char connect();
  1589. int main() {
  1590. connect()
  1591. ; return 0; }
  1592. EOF
  1593. if { (eval echo configure:1752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1594. rm -rf conftest*
  1595. eval "ac_cv_lib_$ac_lib_var=yes"
  1596. else
  1597. echo "configure: failed program was:" >&5
  1598. cat conftest.$ac_ext >&5
  1599. rm -rf conftest*
  1600. eval "ac_cv_lib_$ac_lib_var=no"
  1601. fi
  1602. rm -f conftest*
  1603. LIBS="$ac_save_LIBS"
  1604. fi
  1605. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1606. echo "$ac_t""yes" 1>&6
  1607. ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1608. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1609. cat >> confdefs.h <<EOF
  1610. #define $ac_tr_lib 1
  1611. EOF
  1612. LIBS="-lnsl $LIBS"
  1613. else
  1614. echo "$ac_t""no" 1>&6
  1615. fi
  1616. echo $ac_n "checking for gethostbyname in -ldns""... $ac_c" 1>&6
  1617. echo "configure:1780: checking for gethostbyname in -ldns" >&5
  1618. ac_lib_var=`echo dns'_'gethostbyname | sed 'y%./+-%__p_%'`
  1619. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1620. echo $ac_n "(cached) $ac_c" 1>&6
  1621. else
  1622. ac_save_LIBS="$LIBS"
  1623. LIBS="-ldns $LIBS"
  1624. cat > conftest.$ac_ext <<EOF
  1625. #line 1788 "configure"
  1626. #include "confdefs.h"
  1627. /* Override any gcc2 internal prototype to avoid an error. */
  1628. /* We use char because int might match the return type of a gcc2
  1629. builtin and then its argument prototype would still apply. */
  1630. char gethostbyname();
  1631. int main() {
  1632. gethostbyname()
  1633. ; return 0; }
  1634. EOF
  1635. if { (eval echo configure:1799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1636. rm -rf conftest*
  1637. eval "ac_cv_lib_$ac_lib_var=yes"
  1638. else
  1639. echo "configure: failed program was:" >&5
  1640. cat conftest.$ac_ext >&5
  1641. rm -rf conftest*
  1642. eval "ac_cv_lib_$ac_lib_var=no"
  1643. fi
  1644. rm -f conftest*
  1645. LIBS="$ac_save_LIBS"
  1646. fi
  1647. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1648. echo "$ac_t""yes" 1>&6
  1649. ac_tr_lib=HAVE_LIB`echo dns | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1650. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1651. cat >> confdefs.h <<EOF
  1652. #define $ac_tr_lib 1
  1653. EOF
  1654. LIBS="-ldns $LIBS"
  1655. else
  1656. echo "$ac_t""no" 1>&6
  1657. fi
  1658. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  1659. echo "configure:1827: checking for dlopen in -ldl" >&5
  1660. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  1661. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1662. echo $ac_n "(cached) $ac_c" 1>&6
  1663. else
  1664. ac_save_LIBS="$LIBS"
  1665. LIBS="-ldl $LIBS"
  1666. cat > conftest.$ac_ext <<EOF
  1667. #line 1835 "configure"
  1668. #include "confdefs.h"
  1669. /* Override any gcc2 internal prototype to avoid an error. */
  1670. /* We use char because int might match the return type of a gcc2
  1671. builtin and then its argument prototype would still apply. */
  1672. char dlopen();
  1673. int main() {
  1674. dlopen()
  1675. ; return 0; }
  1676. EOF
  1677. if { (eval echo configure:1846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1678. rm -rf conftest*
  1679. eval "ac_cv_lib_$ac_lib_var=yes"
  1680. else
  1681. echo "configure: failed program was:" >&5
  1682. cat conftest.$ac_ext >&5
  1683. rm -rf conftest*
  1684. eval "ac_cv_lib_$ac_lib_var=no"
  1685. fi
  1686. rm -f conftest*
  1687. LIBS="$ac_save_LIBS"
  1688. fi
  1689. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1690. echo "$ac_t""yes" 1>&6
  1691. ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1692. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1693. cat >> confdefs.h <<EOF
  1694. #define $ac_tr_lib 1
  1695. EOF
  1696. LIBS="-ldl $LIBS"
  1697. else
  1698. echo "$ac_t""no" 1>&6
  1699. fi
  1700. echo $ac_n "checking for tan in -lm""... $ac_c" 1>&6
  1701. echo "configure:1874: checking for tan in -lm" >&5
  1702. ac_lib_var=`echo m'_'tan | sed 'y%./+-%__p_%'`
  1703. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1704. echo $ac_n "(cached) $ac_c" 1>&6
  1705. else
  1706. ac_save_LIBS="$LIBS"
  1707. LIBS="-lm $LIBS"
  1708. cat > conftest.$ac_ext <<EOF
  1709. #line 1882 "configure"
  1710. #include "confdefs.h"
  1711. /* Override any gcc2 internal prototype to avoid an error. */
  1712. /* We use char because int might match the return type of a gcc2
  1713. builtin and then its argument prototype would still apply. */
  1714. char tan();
  1715. int main() {
  1716. tan()
  1717. ; return 0; }
  1718. EOF
  1719. if { (eval echo configure:1893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1720. rm -rf conftest*
  1721. eval "ac_cv_lib_$ac_lib_var=yes"
  1722. else
  1723. echo "configure: failed program was:" >&5
  1724. cat conftest.$ac_ext >&5
  1725. rm -rf conftest*
  1726. eval "ac_cv_lib_$ac_lib_var=no"
  1727. fi
  1728. rm -f conftest*
  1729. LIBS="$ac_save_LIBS"
  1730. fi
  1731. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1732. echo "$ac_t""yes" 1>&6
  1733. EGG_MATH_LIB="-lm"
  1734. else
  1735. echo "$ac_t""no" 1>&6
  1736. fi
  1737. # This is needed for Tcl libraries compiled with thread support
  1738. echo $ac_n "checking for pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1739. echo "configure:1915: checking for pthread_mutex_init in -lpthread" >&5
  1740. ac_lib_var=`echo pthread'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1741. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1742. echo $ac_n "(cached) $ac_c" 1>&6
  1743. else
  1744. ac_save_LIBS="$LIBS"
  1745. LIBS="-lpthread $LIBS"
  1746. cat > conftest.$ac_ext <<EOF
  1747. #line 1923 "configure"
  1748. #include "confdefs.h"
  1749. /* Override any gcc2 internal prototype to avoid an error. */
  1750. /* We use char because int might match the return type of a gcc2
  1751. builtin and then its argument prototype would still apply. */
  1752. char pthread_mutex_init();
  1753. int main() {
  1754. pthread_mutex_init()
  1755. ; return 0; }
  1756. EOF
  1757. if { (eval echo configure:1934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1758. rm -rf conftest*
  1759. eval "ac_cv_lib_$ac_lib_var=yes"
  1760. else
  1761. echo "configure: failed program was:" >&5
  1762. cat conftest.$ac_ext >&5
  1763. rm -rf conftest*
  1764. eval "ac_cv_lib_$ac_lib_var=no"
  1765. fi
  1766. rm -f conftest*
  1767. LIBS="$ac_save_LIBS"
  1768. fi
  1769. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1770. echo "$ac_t""yes" 1>&6
  1771. ac_cv_lib_pthread_pthread_mutex_init=yes
  1772. ac_cv_lib_pthread="-lpthread"
  1773. else
  1774. echo "$ac_t""no" 1>&6
  1775. echo $ac_n "checking for __pthread_mutex_init in -lpthread""... $ac_c" 1>&6
  1776. echo "configure:1954: checking for __pthread_mutex_init in -lpthread" >&5
  1777. ac_lib_var=`echo pthread'_'__pthread_mutex_init | sed 'y%./+-%__p_%'`
  1778. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1779. echo $ac_n "(cached) $ac_c" 1>&6
  1780. else
  1781. ac_save_LIBS="$LIBS"
  1782. LIBS="-lpthread $LIBS"
  1783. cat > conftest.$ac_ext <<EOF
  1784. #line 1962 "configure"
  1785. #include "confdefs.h"
  1786. /* Override any gcc2 internal prototype to avoid an error. */
  1787. /* We use char because int might match the return type of a gcc2
  1788. builtin and then its argument prototype would still apply. */
  1789. char __pthread_mutex_init();
  1790. int main() {
  1791. __pthread_mutex_init()
  1792. ; return 0; }
  1793. EOF
  1794. if { (eval echo configure:1973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1795. rm -rf conftest*
  1796. eval "ac_cv_lib_$ac_lib_var=yes"
  1797. else
  1798. echo "configure: failed program was:" >&5
  1799. cat conftest.$ac_ext >&5
  1800. rm -rf conftest*
  1801. eval "ac_cv_lib_$ac_lib_var=no"
  1802. fi
  1803. rm -f conftest*
  1804. LIBS="$ac_save_LIBS"
  1805. fi
  1806. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1807. echo "$ac_t""yes" 1>&6
  1808. ac_cv_lib_pthread_pthread_mutex_init=yes
  1809. ac_cv_lib_pthread="-lpthread"
  1810. else
  1811. echo "$ac_t""no" 1>&6
  1812. echo $ac_n "checking for pthread_mutex_init in -lpthreads""... $ac_c" 1>&6
  1813. echo "configure:1993: checking for pthread_mutex_init in -lpthreads" >&5
  1814. ac_lib_var=`echo pthreads'_'pthread_mutex_init | sed 'y%./+-%__p_%'`
  1815. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1816. echo $ac_n "(cached) $ac_c" 1>&6
  1817. else
  1818. ac_save_LIBS="$LIBS"
  1819. LIBS="-lpthreads $LIBS"
  1820. cat > conftest.$ac_ext <<EOF
  1821. #line 2001 "configure"
  1822. #include "confdefs.h"
  1823. /* Override any gcc2 internal prototype to avoid an error. */
  1824. /* We use char because int might match the return type of a gcc2
  1825. builtin and then its argument prototype would still apply. */
  1826. char pthread_mutex_init();
  1827. int main() {
  1828. pthread_mutex_init()
  1829. ; return 0; }
  1830. EOF
  1831. if { (eval echo configure:2012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1832. rm -rf conftest*
  1833. eval "ac_cv_lib_$ac_lib_var=yes"
  1834. else
  1835. echo "configure: failed program was:" >&5
  1836. cat conftest.$ac_ext >&5
  1837. rm -rf conftest*
  1838. eval "ac_cv_lib_$ac_lib_var=no"
  1839. fi
  1840. rm -f conftest*
  1841. LIBS="$ac_save_LIBS"
  1842. fi
  1843. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1844. echo "$ac_t""yes" 1>&6
  1845. ac_cv_lib_pthread_pthread_mutex_init=yes
  1846. ac_cv_lib_pthread="-lpthreads"
  1847. else
  1848. echo "$ac_t""no" 1>&6
  1849. echo $ac_n "checking for pthread_mutex_init""... $ac_c" 1>&6
  1850. echo "configure:2032: checking for pthread_mutex_init" >&5
  1851. if eval "test \"`echo '$''{'ac_cv_func_pthread_mutex_init'+set}'`\" = set"; then
  1852. echo $ac_n "(cached) $ac_c" 1>&6
  1853. else
  1854. cat > conftest.$ac_ext <<EOF
  1855. #line 2037 "configure"
  1856. #include "confdefs.h"
  1857. /* System header to define __stub macros and hopefully few prototypes,
  1858. which can conflict with char pthread_mutex_init(); below. */
  1859. #include <assert.h>
  1860. /* Override any gcc2 internal prototype to avoid an error. */
  1861. /* We use char because int might match the return type of a gcc2
  1862. builtin and then its argument prototype would still apply. */
  1863. char pthread_mutex_init();
  1864. int main() {
  1865. /* The GNU C library defines this for functions which it implements
  1866. to always fail with ENOSYS. Some functions are actually named
  1867. something starting with __ and the normal name is an alias. */
  1868. #if defined (__stub_pthread_mutex_init) || defined (__stub___pthread_mutex_init)
  1869. choke me
  1870. #else
  1871. pthread_mutex_init();
  1872. #endif
  1873. ; return 0; }
  1874. EOF
  1875. if { (eval echo configure:2060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1876. rm -rf conftest*
  1877. eval "ac_cv_func_pthread_mutex_init=yes"
  1878. else
  1879. echo "configure: failed program was:" >&5
  1880. cat conftest.$ac_ext >&5
  1881. rm -rf conftest*
  1882. eval "ac_cv_func_pthread_mutex_init=no"
  1883. fi
  1884. rm -f conftest*
  1885. fi
  1886. if eval "test \"`echo '$ac_cv_func_'pthread_mutex_init`\" = yes"; then
  1887. echo "$ac_t""yes" 1>&6
  1888. ac_cv_lib_pthread_pthread_mutex_init=yes
  1889. ac_cv_lib_pthread=""
  1890. else
  1891. echo "$ac_t""no" 1>&6
  1892. ac_cv_lib_pthread_pthread_mutex_init=no
  1893. fi
  1894. fi
  1895. fi
  1896. fi
  1897. if test "$SUNOS" = "yes"
  1898. then
  1899. # For suns without yp or something like that
  1900. echo $ac_n "checking for main in -ldl""... $ac_c" 1>&6
  1901. echo "configure:2091: checking for main in -ldl" >&5
  1902. ac_lib_var=`echo dl'_'main | sed 'y%./+-%__p_%'`
  1903. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1904. echo $ac_n "(cached) $ac_c" 1>&6
  1905. else
  1906. ac_save_LIBS="$LIBS"
  1907. LIBS="-ldl $LIBS"
  1908. cat > conftest.$ac_ext <<EOF
  1909. #line 2099 "configure"
  1910. #include "confdefs.h"
  1911. int main() {
  1912. main()
  1913. ; return 0; }
  1914. EOF
  1915. if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1916. rm -rf conftest*
  1917. eval "ac_cv_lib_$ac_lib_var=yes"
  1918. else
  1919. echo "configure: failed program was:" >&5
  1920. cat conftest.$ac_ext >&5
  1921. rm -rf conftest*
  1922. eval "ac_cv_lib_$ac_lib_var=no"
  1923. fi
  1924. rm -f conftest*
  1925. LIBS="$ac_save_LIBS"
  1926. fi
  1927. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1928. echo "$ac_t""yes" 1>&6
  1929. ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1930. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1931. cat >> confdefs.h <<EOF
  1932. #define $ac_tr_lib 1
  1933. EOF
  1934. LIBS="-ldl $LIBS"
  1935. else
  1936. echo "$ac_t""no" 1>&6
  1937. fi
  1938. else
  1939. if test "$HPUX" = "yes"
  1940. then
  1941. echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
  1942. echo "configure:2137: checking for shl_load in -ldld" >&5
  1943. ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
  1944. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1945. echo $ac_n "(cached) $ac_c" 1>&6
  1946. else
  1947. ac_save_LIBS="$LIBS"
  1948. LIBS="-ldld $LIBS"
  1949. cat > conftest.$ac_ext <<EOF
  1950. #line 2145 "configure"
  1951. #include "confdefs.h"
  1952. /* Override any gcc2 internal prototype to avoid an error. */
  1953. /* We use char because int might match the return type of a gcc2
  1954. builtin and then its argument prototype would still apply. */
  1955. char shl_load();
  1956. int main() {
  1957. shl_load()
  1958. ; return 0; }
  1959. EOF
  1960. if { (eval echo configure:2156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1961. rm -rf conftest*
  1962. eval "ac_cv_lib_$ac_lib_var=yes"
  1963. else
  1964. echo "configure: failed program was:" >&5
  1965. cat conftest.$ac_ext >&5
  1966. rm -rf conftest*
  1967. eval "ac_cv_lib_$ac_lib_var=no"
  1968. fi
  1969. rm -f conftest*
  1970. LIBS="$ac_save_LIBS"
  1971. fi
  1972. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1973. echo "$ac_t""yes" 1>&6
  1974. ac_tr_lib=HAVE_LIB`echo dld | sed -e 's/[^a-zA-Z0-9_]/_/g' \
  1975. -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
  1976. cat >> confdefs.h <<EOF
  1977. #define $ac_tr_lib 1
  1978. EOF
  1979. LIBS="-ldld $LIBS"
  1980. else
  1981. echo "$ac_t""no" 1>&6
  1982. fi
  1983. fi
  1984. fi
  1985. fi
  1986. # Checks for header files
  1987. ac_header_dirent=no
  1988. for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
  1989. do
  1990. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1991. echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
  1992. echo "configure:2194: checking for $ac_hdr that defines DIR" >&5
  1993. if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
  1994. echo $ac_n "(cached) $ac_c" 1>&6
  1995. else
  1996. cat > conftest.$ac_ext <<EOF
  1997. #line 2199 "configure"
  1998. #include "confdefs.h"
  1999. #include <sys/types.h>
  2000. #include <$ac_hdr>
  2001. int main() {
  2002. DIR *dirp = 0;
  2003. ; return 0; }
  2004. EOF
  2005. if { (eval echo configure:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2006. rm -rf conftest*
  2007. eval "ac_cv_header_dirent_$ac_safe=yes"
  2008. else
  2009. echo "configure: failed program was:" >&5
  2010. cat conftest.$ac_ext >&5
  2011. rm -rf conftest*
  2012. eval "ac_cv_header_dirent_$ac_safe=no"
  2013. fi
  2014. rm -f conftest*
  2015. fi
  2016. if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
  2017. echo "$ac_t""yes" 1>&6
  2018. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2019. cat >> confdefs.h <<EOF
  2020. #define $ac_tr_hdr 1
  2021. EOF
  2022. ac_header_dirent=$ac_hdr; break
  2023. else
  2024. echo "$ac_t""no" 1>&6
  2025. fi
  2026. done
  2027. # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
  2028. if test $ac_header_dirent = dirent.h; then
  2029. echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
  2030. echo "configure:2232: checking for opendir in -ldir" >&5
  2031. ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
  2032. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2033. echo $ac_n "(cached) $ac_c" 1>&6
  2034. else
  2035. ac_save_LIBS="$LIBS"
  2036. LIBS="-ldir $LIBS"
  2037. cat > conftest.$ac_ext <<EOF
  2038. #line 2240 "configure"
  2039. #include "confdefs.h"
  2040. /* Override any gcc2 internal prototype to avoid an error. */
  2041. /* We use char because int might match the return type of a gcc2
  2042. builtin and then its argument prototype would still apply. */
  2043. char opendir();
  2044. int main() {
  2045. opendir()
  2046. ; return 0; }
  2047. EOF
  2048. if { (eval echo configure:2251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2049. rm -rf conftest*
  2050. eval "ac_cv_lib_$ac_lib_var=yes"
  2051. else
  2052. echo "configure: failed program was:" >&5
  2053. cat conftest.$ac_ext >&5
  2054. rm -rf conftest*
  2055. eval "ac_cv_lib_$ac_lib_var=no"
  2056. fi
  2057. rm -f conftest*
  2058. LIBS="$ac_save_LIBS"
  2059. fi
  2060. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2061. echo "$ac_t""yes" 1>&6
  2062. LIBS="$LIBS -ldir"
  2063. else
  2064. echo "$ac_t""no" 1>&6
  2065. fi
  2066. else
  2067. echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
  2068. echo "configure:2273: checking for opendir in -lx" >&5
  2069. ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
  2070. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2071. echo $ac_n "(cached) $ac_c" 1>&6
  2072. else
  2073. ac_save_LIBS="$LIBS"
  2074. LIBS="-lx $LIBS"
  2075. cat > conftest.$ac_ext <<EOF
  2076. #line 2281 "configure"
  2077. #include "confdefs.h"
  2078. /* Override any gcc2 internal prototype to avoid an error. */
  2079. /* We use char because int might match the return type of a gcc2
  2080. builtin and then its argument prototype would still apply. */
  2081. char opendir();
  2082. int main() {
  2083. opendir()
  2084. ; return 0; }
  2085. EOF
  2086. if { (eval echo configure:2292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2087. rm -rf conftest*
  2088. eval "ac_cv_lib_$ac_lib_var=yes"
  2089. else
  2090. echo "configure: failed program was:" >&5
  2091. cat conftest.$ac_ext >&5
  2092. rm -rf conftest*
  2093. eval "ac_cv_lib_$ac_lib_var=no"
  2094. fi
  2095. rm -f conftest*
  2096. LIBS="$ac_save_LIBS"
  2097. fi
  2098. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2099. echo "$ac_t""yes" 1>&6
  2100. LIBS="$LIBS -lx"
  2101. else
  2102. echo "$ac_t""no" 1>&6
  2103. fi
  2104. fi
  2105. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  2106. echo "configure:2315: checking for sys/wait.h that is POSIX.1 compatible" >&5
  2107. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  2108. echo $ac_n "(cached) $ac_c" 1>&6
  2109. else
  2110. cat > conftest.$ac_ext <<EOF
  2111. #line 2320 "configure"
  2112. #include "confdefs.h"
  2113. #include <sys/types.h>
  2114. #include <sys/wait.h>
  2115. #ifndef WEXITSTATUS
  2116. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  2117. #endif
  2118. #ifndef WIFEXITED
  2119. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  2120. #endif
  2121. int main() {
  2122. int s;
  2123. wait (&s);
  2124. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  2125. ; return 0; }
  2126. EOF
  2127. if { (eval echo configure:2336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2128. rm -rf conftest*
  2129. ac_cv_header_sys_wait_h=yes
  2130. else
  2131. echo "configure: failed program was:" >&5
  2132. cat conftest.$ac_ext >&5
  2133. rm -rf conftest*
  2134. ac_cv_header_sys_wait_h=no
  2135. fi
  2136. rm -f conftest*
  2137. fi
  2138. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  2139. if test $ac_cv_header_sys_wait_h = yes; then
  2140. cat >> confdefs.h <<\EOF
  2141. #define HAVE_SYS_WAIT_H 1
  2142. EOF
  2143. fi
  2144. for ac_hdr in sys/time.h
  2145. do
  2146. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2147. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2148. echo "configure:2360: checking for $ac_hdr" >&5
  2149. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2150. echo $ac_n "(cached) $ac_c" 1>&6
  2151. else
  2152. cat > conftest.$ac_ext <<EOF
  2153. #line 2365 "configure"
  2154. #include "confdefs.h"
  2155. #include <$ac_hdr>
  2156. EOF
  2157. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2158. { (eval echo configure:2370: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2159. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2160. if test -z "$ac_err"; then
  2161. rm -rf conftest*
  2162. eval "ac_cv_header_$ac_safe=yes"
  2163. else
  2164. echo "$ac_err" >&5
  2165. echo "configure: failed program was:" >&5
  2166. cat conftest.$ac_ext >&5
  2167. rm -rf conftest*
  2168. eval "ac_cv_header_$ac_safe=no"
  2169. fi
  2170. rm -f conftest*
  2171. fi
  2172. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2173. echo "$ac_t""yes" 1>&6
  2174. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2175. cat >> confdefs.h <<EOF
  2176. #define $ac_tr_hdr 1
  2177. EOF
  2178. else
  2179. echo "$ac_t""no" 1>&6
  2180. fi
  2181. done
  2182. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  2183. echo "configure:2397: checking whether time.h and sys/time.h may both be included" >&5
  2184. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  2185. echo $ac_n "(cached) $ac_c" 1>&6
  2186. else
  2187. cat > conftest.$ac_ext <<EOF
  2188. #line 2402 "configure"
  2189. #include "confdefs.h"
  2190. #include <sys/types.h>
  2191. #include <sys/time.h>
  2192. #include <time.h>
  2193. int main() {
  2194. struct tm *tp;
  2195. ; return 0; }
  2196. EOF
  2197. if { (eval echo configure:2411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2198. rm -rf conftest*
  2199. ac_cv_header_time=yes
  2200. else
  2201. echo "configure: failed program was:" >&5
  2202. cat conftest.$ac_ext >&5
  2203. rm -rf conftest*
  2204. ac_cv_header_time=no
  2205. fi
  2206. rm -f conftest*
  2207. fi
  2208. echo "$ac_t""$ac_cv_header_time" 1>&6
  2209. if test $ac_cv_header_time = yes; then
  2210. cat >> confdefs.h <<\EOF
  2211. #define TIME_WITH_SYS_TIME 1
  2212. EOF
  2213. fi
  2214. for ac_hdr in sys/select.h sys/rusage.h unistd.h dlfcn.h stdarg.h std_args.h strings.h limits.h
  2215. do
  2216. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2217. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2218. echo "configure:2435: checking for $ac_hdr" >&5
  2219. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2220. echo $ac_n "(cached) $ac_c" 1>&6
  2221. else
  2222. cat > conftest.$ac_ext <<EOF
  2223. #line 2440 "configure"
  2224. #include "confdefs.h"
  2225. #include <$ac_hdr>
  2226. EOF
  2227. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2228. { (eval echo configure:2445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2229. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2230. if test -z "$ac_err"; then
  2231. rm -rf conftest*
  2232. eval "ac_cv_header_$ac_safe=yes"
  2233. else
  2234. echo "$ac_err" >&5
  2235. echo "configure: failed program was:" >&5
  2236. cat conftest.$ac_ext >&5
  2237. rm -rf conftest*
  2238. eval "ac_cv_header_$ac_safe=no"
  2239. fi
  2240. rm -f conftest*
  2241. fi
  2242. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2243. echo "$ac_t""yes" 1>&6
  2244. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2245. cat >> confdefs.h <<EOF
  2246. #define $ac_tr_hdr 1
  2247. EOF
  2248. else
  2249. echo "$ac_t""no" 1>&6
  2250. fi
  2251. done
  2252. # Checks for typedefs, structures, and compiler characteristics
  2253. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  2254. echo "configure:2474: checking for ANSI C header files" >&5
  2255. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  2256. echo $ac_n "(cached) $ac_c" 1>&6
  2257. else
  2258. cat > conftest.$ac_ext <<EOF
  2259. #line 2479 "configure"
  2260. #include "confdefs.h"
  2261. #include <stdlib.h>
  2262. #include <stdarg.h>
  2263. #include <string.h>
  2264. #include <float.h>
  2265. EOF
  2266. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2267. { (eval echo configure:2487: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2268. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2269. if test -z "$ac_err"; then
  2270. rm -rf conftest*
  2271. ac_cv_header_stdc=yes
  2272. else
  2273. echo "$ac_err" >&5
  2274. echo "configure: failed program was:" >&5
  2275. cat conftest.$ac_ext >&5
  2276. rm -rf conftest*
  2277. ac_cv_header_stdc=no
  2278. fi
  2279. rm -f conftest*
  2280. if test $ac_cv_header_stdc = yes; then
  2281. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  2282. cat > conftest.$ac_ext <<EOF
  2283. #line 2504 "configure"
  2284. #include "confdefs.h"
  2285. #include <string.h>
  2286. EOF
  2287. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2288. egrep "memchr" >/dev/null 2>&1; then
  2289. :
  2290. else
  2291. rm -rf conftest*
  2292. ac_cv_header_stdc=no
  2293. fi
  2294. rm -f conftest*
  2295. fi
  2296. if test $ac_cv_header_stdc = yes; then
  2297. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  2298. cat > conftest.$ac_ext <<EOF
  2299. #line 2522 "configure"
  2300. #include "confdefs.h"
  2301. #include <stdlib.h>
  2302. EOF
  2303. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2304. egrep "free" >/dev/null 2>&1; then
  2305. :
  2306. else
  2307. rm -rf conftest*
  2308. ac_cv_header_stdc=no
  2309. fi
  2310. rm -f conftest*
  2311. fi
  2312. if test $ac_cv_header_stdc = yes; then
  2313. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  2314. if test "$cross_compiling" = yes; then
  2315. :
  2316. else
  2317. cat > conftest.$ac_ext <<EOF
  2318. #line 2543 "configure"
  2319. #include "confdefs.h"
  2320. #include <ctype.h>
  2321. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  2322. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  2323. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  2324. int main () { int i; for (i = 0; i < 256; i++)
  2325. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  2326. exit (0); }
  2327. EOF
  2328. if { (eval echo configure:2554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2329. then
  2330. :
  2331. else
  2332. echo "configure: failed program was:" >&5
  2333. cat conftest.$ac_ext >&5
  2334. rm -fr conftest*
  2335. ac_cv_header_stdc=no
  2336. fi
  2337. rm -fr conftest*
  2338. fi
  2339. fi
  2340. fi
  2341. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  2342. if test $ac_cv_header_stdc = yes; then
  2343. cat >> confdefs.h <<\EOF
  2344. #define STDC_HEADERS 1
  2345. EOF
  2346. fi
  2347. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  2348. echo "configure:2578: checking for pid_t" >&5
  2349. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  2350. echo $ac_n "(cached) $ac_c" 1>&6
  2351. else
  2352. cat > conftest.$ac_ext <<EOF
  2353. #line 2583 "configure"
  2354. #include "confdefs.h"
  2355. #include <sys/types.h>
  2356. #if STDC_HEADERS
  2357. #include <stdlib.h>
  2358. #include <stddef.h>
  2359. #endif
  2360. EOF
  2361. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2362. egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2363. rm -rf conftest*
  2364. ac_cv_type_pid_t=yes
  2365. else
  2366. rm -rf conftest*
  2367. ac_cv_type_pid_t=no
  2368. fi
  2369. rm -f conftest*
  2370. fi
  2371. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  2372. if test $ac_cv_type_pid_t = no; then
  2373. cat >> confdefs.h <<\EOF
  2374. #define pid_t int
  2375. EOF
  2376. fi
  2377. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  2378. echo "configure:2611: checking for size_t" >&5
  2379. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  2380. echo $ac_n "(cached) $ac_c" 1>&6
  2381. else
  2382. cat > conftest.$ac_ext <<EOF
  2383. #line 2616 "configure"
  2384. #include "confdefs.h"
  2385. #include <sys/types.h>
  2386. #if STDC_HEADERS
  2387. #include <stdlib.h>
  2388. #include <stddef.h>
  2389. #endif
  2390. EOF
  2391. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  2392. egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  2393. rm -rf conftest*
  2394. ac_cv_type_size_t=yes
  2395. else
  2396. rm -rf conftest*
  2397. ac_cv_type_size_t=no
  2398. fi
  2399. rm -f conftest*
  2400. fi
  2401. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  2402. if test $ac_cv_type_size_t = no; then
  2403. cat >> confdefs.h <<\EOF
  2404. #define size_t unsigned
  2405. EOF
  2406. fi
  2407. echo $ac_n "checking for working const""... $ac_c" 1>&6
  2408. echo "configure:2644: checking for working const" >&5
  2409. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  2410. echo $ac_n "(cached) $ac_c" 1>&6
  2411. else
  2412. cat > conftest.$ac_ext <<EOF
  2413. #line 2649 "configure"
  2414. #include "confdefs.h"
  2415. int main() {
  2416. /* Ultrix mips cc rejects this. */
  2417. typedef int charset[2]; const charset x;
  2418. /* SunOS 4.1.1 cc rejects this. */
  2419. char const *const *ccp;
  2420. char **p;
  2421. /* NEC SVR4.0.2 mips cc rejects this. */
  2422. struct point {int x, y;};
  2423. static struct point const zero = {0,0};
  2424. /* AIX XL C 1.02.0.0 rejects this.
  2425. It does not let you subtract one const X* pointer from another in an arm
  2426. of an if-expression whose if-part is not a constant expression */
  2427. const char *g = "string";
  2428. ccp = &g + (g ? g-g : 0);
  2429. /* HPUX 7.0 cc rejects these. */
  2430. ++ccp;
  2431. p = (char**) ccp;
  2432. ccp = (char const *const *) p;
  2433. { /* SCO 3.2v4 cc rejects this. */
  2434. char *t;
  2435. char const *s = 0 ? (char *) 0 : (char const *) 0;
  2436. *t++ = 0;
  2437. }
  2438. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
  2439. int x[] = {25, 17};
  2440. const int *foo = &x[0];
  2441. ++foo;
  2442. }
  2443. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  2444. typedef const int *iptr;
  2445. iptr p = 0;
  2446. ++p;
  2447. }
  2448. { /* AIX XL C 1.02.0.0 rejects this saying
  2449. "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  2450. struct s { int j; const int *ap[3]; };
  2451. struct s *b; b->j = 5;
  2452. }
  2453. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  2454. const int foo = 10;
  2455. }
  2456. ; return 0; }
  2457. EOF
  2458. if { (eval echo configure:2698: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2459. rm -rf conftest*
  2460. ac_cv_c_const=yes
  2461. else
  2462. echo "configure: failed program was:" >&5
  2463. cat conftest.$ac_ext >&5
  2464. rm -rf conftest*
  2465. ac_cv_c_const=no
  2466. fi
  2467. rm -f conftest*
  2468. fi
  2469. echo "$ac_t""$ac_cv_c_const" 1>&6
  2470. if test $ac_cv_c_const = no; then
  2471. cat >> confdefs.h <<\EOF
  2472. #define const
  2473. EOF
  2474. fi
  2475. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  2476. echo "configure:2719: checking whether byte ordering is bigendian" >&5
  2477. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  2478. echo $ac_n "(cached) $ac_c" 1>&6
  2479. else
  2480. ac_cv_c_bigendian=unknown
  2481. # See if sys/param.h defines the BYTE_ORDER macro.
  2482. cat > conftest.$ac_ext <<EOF
  2483. #line 2726 "configure"
  2484. #include "confdefs.h"
  2485. #include <sys/types.h>
  2486. #include <sys/param.h>
  2487. int main() {
  2488. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  2489. bogus endian macros
  2490. #endif
  2491. ; return 0; }
  2492. EOF
  2493. if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2494. rm -rf conftest*
  2495. # It does; now see whether it defined to BIG_ENDIAN or not.
  2496. cat > conftest.$ac_ext <<EOF
  2497. #line 2741 "configure"
  2498. #include "confdefs.h"
  2499. #include <sys/types.h>
  2500. #include <sys/param.h>
  2501. int main() {
  2502. #if BYTE_ORDER != BIG_ENDIAN
  2503. not big endian
  2504. #endif
  2505. ; return 0; }
  2506. EOF
  2507. if { (eval echo configure:2752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2508. rm -rf conftest*
  2509. ac_cv_c_bigendian=yes
  2510. else
  2511. echo "configure: failed program was:" >&5
  2512. cat conftest.$ac_ext >&5
  2513. rm -rf conftest*
  2514. ac_cv_c_bigendian=no
  2515. fi
  2516. rm -f conftest*
  2517. else
  2518. echo "configure: failed program was:" >&5
  2519. cat conftest.$ac_ext >&5
  2520. fi
  2521. rm -f conftest*
  2522. if test $ac_cv_c_bigendian = unknown; then
  2523. if test "$cross_compiling" = yes; then
  2524. { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2525. else
  2526. cat > conftest.$ac_ext <<EOF
  2527. #line 2772 "configure"
  2528. #include "confdefs.h"
  2529. main () {
  2530. /* Are we little or big endian? From Harbison&Steele. */
  2531. union
  2532. {
  2533. long l;
  2534. char c[sizeof (long)];
  2535. } u;
  2536. u.l = 1;
  2537. exit (u.c[sizeof (long) - 1] == 1);
  2538. }
  2539. EOF
  2540. if { (eval echo configure:2785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2541. then
  2542. ac_cv_c_bigendian=no
  2543. else
  2544. echo "configure: failed program was:" >&5
  2545. cat conftest.$ac_ext >&5
  2546. rm -fr conftest*
  2547. ac_cv_c_bigendian=yes
  2548. fi
  2549. rm -fr conftest*
  2550. fi
  2551. fi
  2552. fi
  2553. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  2554. if test $ac_cv_c_bigendian = yes; then
  2555. cat >> confdefs.h <<\EOF
  2556. #define WORDS_BIGENDIAN 1
  2557. EOF
  2558. fi
  2559. echo $ac_n "checking for inline""... $ac_c" 1>&6
  2560. echo "configure:2809: checking for inline" >&5
  2561. if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then
  2562. echo $ac_n "(cached) $ac_c" 1>&6
  2563. else
  2564. ac_cv_c_inline=no
  2565. for ac_kw in inline __inline__ __inline; do
  2566. cat > conftest.$ac_ext <<EOF
  2567. #line 2816 "configure"
  2568. #include "confdefs.h"
  2569. int main() {
  2570. } $ac_kw foo() {
  2571. ; return 0; }
  2572. EOF
  2573. if { (eval echo configure:2823: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2574. rm -rf conftest*
  2575. ac_cv_c_inline=$ac_kw; break
  2576. else
  2577. echo "configure: failed program was:" >&5
  2578. cat conftest.$ac_ext >&5
  2579. fi
  2580. rm -f conftest*
  2581. done
  2582. fi
  2583. echo "$ac_t""$ac_cv_c_inline" 1>&6
  2584. case "$ac_cv_c_inline" in
  2585. inline | yes) ;;
  2586. no) cat >> confdefs.h <<\EOF
  2587. #define inline
  2588. EOF
  2589. ;;
  2590. *) cat >> confdefs.h <<EOF
  2591. #define inline $ac_cv_c_inline
  2592. EOF
  2593. ;;
  2594. esac
  2595. echo $ac_n "checking size of long""... $ac_c" 1>&6
  2596. echo "configure:2849: checking size of long" >&5
  2597. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  2598. echo $ac_n "(cached) $ac_c" 1>&6
  2599. else
  2600. if test "$cross_compiling" = yes; then
  2601. ac_cv_sizeof_long=0
  2602. else
  2603. cat > conftest.$ac_ext <<EOF
  2604. #line 2857 "configure"
  2605. #include "confdefs.h"
  2606. #include <stdio.h>
  2607. #include <sys/types.h>
  2608. main()
  2609. {
  2610. FILE *f=fopen("conftestval", "w");
  2611. if (!f) exit(1);
  2612. fprintf(f, "%d\n", sizeof(long));
  2613. exit(0);
  2614. }
  2615. EOF
  2616. if { (eval echo configure:2869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2617. then
  2618. ac_cv_sizeof_long=`cat conftestval`
  2619. else
  2620. echo "configure: failed program was:" >&5
  2621. cat conftest.$ac_ext >&5
  2622. rm -fr conftest*
  2623. ac_cv_sizeof_long=0
  2624. fi
  2625. rm -fr conftest*
  2626. fi
  2627. fi
  2628. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  2629. cat >> confdefs.h <<EOF
  2630. #define SIZEOF_LONG $ac_cv_sizeof_long
  2631. EOF
  2632. echo $ac_n "checking size of int""... $ac_c" 1>&6
  2633. echo "configure:2889: checking size of int" >&5
  2634. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  2635. echo $ac_n "(cached) $ac_c" 1>&6
  2636. else
  2637. if test "$cross_compiling" = yes; then
  2638. ac_cv_sizeof_int=0
  2639. else
  2640. cat > conftest.$ac_ext <<EOF
  2641. #line 2897 "configure"
  2642. #include "confdefs.h"
  2643. #include <stdio.h>
  2644. #include <sys/types.h>
  2645. main()
  2646. {
  2647. FILE *f=fopen("conftestval", "w");
  2648. if (!f) exit(1);
  2649. fprintf(f, "%d\n", sizeof(int));
  2650. exit(0);
  2651. }
  2652. EOF
  2653. if { (eval echo configure:2909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2654. then
  2655. ac_cv_sizeof_int=`cat conftestval`
  2656. else
  2657. echo "configure: failed program was:" >&5
  2658. cat conftest.$ac_ext >&5
  2659. rm -fr conftest*
  2660. ac_cv_sizeof_int=0
  2661. fi
  2662. rm -fr conftest*
  2663. fi
  2664. fi
  2665. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  2666. cat >> confdefs.h <<EOF
  2667. #define SIZEOF_INT $ac_cv_sizeof_int
  2668. EOF
  2669. # Checks for library functions
  2670. for ac_func in clock getrusage setpgid uname sigaction sigemptyset rename strcasecmp strncasecmp getdtablesize memset random srandom dlopen dprintf snprintf vsnprintf isascii inet_aton memcpy strftime fsync
  2671. do
  2672. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2673. echo "configure:2933: checking for $ac_func" >&5
  2674. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2675. echo $ac_n "(cached) $ac_c" 1>&6
  2676. else
  2677. cat > conftest.$ac_ext <<EOF
  2678. #line 2938 "configure"
  2679. #include "confdefs.h"
  2680. /* System header to define __stub macros and hopefully few prototypes,
  2681. which can conflict with char $ac_func(); below. */
  2682. #include <assert.h>
  2683. /* Override any gcc2 internal prototype to avoid an error. */
  2684. /* We use char because int might match the return type of a gcc2
  2685. builtin and then its argument prototype would still apply. */
  2686. char $ac_func();
  2687. int main() {
  2688. /* The GNU C library defines this for functions which it implements
  2689. to always fail with ENOSYS. Some functions are actually named
  2690. something starting with __ and the normal name is an alias. */
  2691. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2692. choke me
  2693. #else
  2694. $ac_func();
  2695. #endif
  2696. ; return 0; }
  2697. EOF
  2698. if { (eval echo configure:2961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2699. rm -rf conftest*
  2700. eval "ac_cv_func_$ac_func=yes"
  2701. else
  2702. echo "configure: failed program was:" >&5
  2703. cat conftest.$ac_ext >&5
  2704. rm -rf conftest*
  2705. eval "ac_cv_func_$ac_func=no"
  2706. fi
  2707. rm -f conftest*
  2708. fi
  2709. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2710. echo "$ac_t""yes" 1>&6
  2711. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2712. cat >> confdefs.h <<EOF
  2713. #define $ac_tr_func 1
  2714. EOF
  2715. else
  2716. echo "$ac_t""no" 1>&6
  2717. fi
  2718. done
  2719. for ac_func in vsprintf
  2720. do
  2721. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  2722. echo "configure:2988: checking for $ac_func" >&5
  2723. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  2724. echo $ac_n "(cached) $ac_c" 1>&6
  2725. else
  2726. cat > conftest.$ac_ext <<EOF
  2727. #line 2993 "configure"
  2728. #include "confdefs.h"
  2729. /* System header to define __stub macros and hopefully few prototypes,
  2730. which can conflict with char $ac_func(); below. */
  2731. #include <assert.h>
  2732. /* Override any gcc2 internal prototype to avoid an error. */
  2733. /* We use char because int might match the return type of a gcc2
  2734. builtin and then its argument prototype would still apply. */
  2735. char $ac_func();
  2736. int main() {
  2737. /* The GNU C library defines this for functions which it implements
  2738. to always fail with ENOSYS. Some functions are actually named
  2739. something starting with __ and the normal name is an alias. */
  2740. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  2741. choke me
  2742. #else
  2743. $ac_func();
  2744. #endif
  2745. ; return 0; }
  2746. EOF
  2747. if { (eval echo configure:3016: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2748. rm -rf conftest*
  2749. eval "ac_cv_func_$ac_func=yes"
  2750. else
  2751. echo "configure: failed program was:" >&5
  2752. cat conftest.$ac_ext >&5
  2753. rm -rf conftest*
  2754. eval "ac_cv_func_$ac_func=no"
  2755. fi
  2756. rm -f conftest*
  2757. fi
  2758. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  2759. echo "$ac_t""yes" 1>&6
  2760. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  2761. cat >> confdefs.h <<EOF
  2762. #define $ac_tr_func 1
  2763. EOF
  2764. else
  2765. echo "$ac_t""no" 1>&6
  2766. fi
  2767. done
  2768. if test "$ac_cv_func_vsprintf" = "no"
  2769. then
  2770. cat << 'EOF' >&2
  2771. configure: error:
  2772. Your system does not have the sprintf/vsprintf libraries.
  2773. These are required to compile almost anything. Sorry.
  2774. EOF
  2775. exit 1
  2776. fi
  2777. # Make sure we have stdc headers, since we can't compile without them
  2778. if test "$ac_cv_header_stdc" = "no"
  2779. then
  2780. cat << 'EOF' >&2
  2781. configure: error:
  2782. Your system must support ANSI C Header files.
  2783. These are required for the language support. Sorry.
  2784. EOF
  2785. exit 1
  2786. fi
  2787. # Make sure we are using the correct result from a broken libsafe sscanf
  2788. echo $ac_n "checking for broken libsafe sscanf""... $ac_c" 1>&6
  2789. echo "configure:3069: checking for broken libsafe sscanf" >&5
  2790. if eval "test \"`echo '$''{'egg_cv_var_libsafe_sscanf'+set}'`\" = set"; then
  2791. echo $ac_n "(cached) $ac_c" 1>&6
  2792. else
  2793. if test "$cross_compiling" = yes; then
  2794. egg_cv_var_libsafe_sscanf="no"
  2795. else
  2796. cat > conftest.$ac_ext <<EOF
  2797. #line 3077 "configure"
  2798. #include "confdefs.h"
  2799. #include <stdio.h>
  2800. int main()
  2801. {
  2802. char *src = "0x001,guppyism\n";
  2803. char dst[10];
  2804. int idx;
  2805. if (sscanf(src, "0x%x,%10c", &idx, dst) == 1)
  2806. exit(1);
  2807. return 0;
  2808. }
  2809. EOF
  2810. if { (eval echo configure:3093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2811. then
  2812. egg_cv_var_libsafe_sscanf="no"
  2813. else
  2814. echo "configure: failed program was:" >&5
  2815. cat conftest.$ac_ext >&5
  2816. rm -fr conftest*
  2817. egg_cv_var_libsafe_sscanf="yes"
  2818. fi
  2819. rm -fr conftest*
  2820. fi
  2821. fi
  2822. echo "$ac_t""$egg_cv_var_libsafe_sscanf" 1>&6
  2823. if test "$egg_cv_var_libsafe_sscanf" = "yes"
  2824. then
  2825. cat >> confdefs.h <<\EOF
  2826. #define LIBSAFE_HACKS 1
  2827. EOF
  2828. fi
  2829. # Checks for executable extension
  2830. echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
  2831. echo "configure:3119: checking for Cygwin environment" >&5
  2832. if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
  2833. echo $ac_n "(cached) $ac_c" 1>&6
  2834. else
  2835. cat > conftest.$ac_ext <<EOF
  2836. #line 3124 "configure"
  2837. #include "confdefs.h"
  2838. int main() {
  2839. #ifndef __CYGWIN__
  2840. #define __CYGWIN__ __CYGWIN32__
  2841. #endif
  2842. return __CYGWIN__;
  2843. ; return 0; }
  2844. EOF
  2845. if { (eval echo configure:3135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2846. rm -rf conftest*
  2847. ac_cv_cygwin=yes
  2848. else
  2849. echo "configure: failed program was:" >&5
  2850. cat conftest.$ac_ext >&5
  2851. rm -rf conftest*
  2852. ac_cv_cygwin=no
  2853. fi
  2854. rm -f conftest*
  2855. rm -f conftest*
  2856. fi
  2857. echo "$ac_t""$ac_cv_cygwin" 1>&6
  2858. CYGWIN=
  2859. test "$ac_cv_cygwin" = yes && CYGWIN=yes
  2860. echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
  2861. echo "configure:3152: checking for mingw32 environment" >&5
  2862. if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
  2863. echo $ac_n "(cached) $ac_c" 1>&6
  2864. else
  2865. cat > conftest.$ac_ext <<EOF
  2866. #line 3157 "configure"
  2867. #include "confdefs.h"
  2868. int main() {
  2869. return __MINGW32__;
  2870. ; return 0; }
  2871. EOF
  2872. if { (eval echo configure:3164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2873. rm -rf conftest*
  2874. ac_cv_mingw32=yes
  2875. else
  2876. echo "configure: failed program was:" >&5
  2877. cat conftest.$ac_ext >&5
  2878. rm -rf conftest*
  2879. ac_cv_mingw32=no
  2880. fi
  2881. rm -f conftest*
  2882. rm -f conftest*
  2883. fi
  2884. echo "$ac_t""$ac_cv_mingw32" 1>&6
  2885. MINGW32=
  2886. test "$ac_cv_mingw32" = yes && MINGW32=yes
  2887. EGGEXEC=eggdrop
  2888. echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
  2889. echo "configure:3184: checking for executable suffix" >&5
  2890. if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
  2891. echo $ac_n "(cached) $ac_c" 1>&6
  2892. else
  2893. if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
  2894. ac_cv_exeext=.exe
  2895. else
  2896. rm -f conftest*
  2897. echo 'int main () { return 0; }' > conftest.$ac_ext
  2898. ac_cv_exeext=
  2899. if { (eval echo configure:3194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
  2900. for file in conftest.*; do
  2901. case $file in
  2902. *.$ac_ext | *.c | *.o | *.obj) ;;
  2903. *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
  2904. esac
  2905. done
  2906. else
  2907. { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
  2908. fi
  2909. rm -f conftest*
  2910. test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
  2911. fi
  2912. fi
  2913. EXEEXT=""
  2914. test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
  2915. echo "$ac_t""${ac_cv_exeext}" 1>&6
  2916. ac_exeext=$EXEEXT
  2917. if test ! "${EXEEXT-x}" = "x"
  2918. then
  2919. EGGEXEC="eggdrop$EXEEXT"
  2920. fi
  2921. # Where is Tcl? Is it here?
  2922. # ---------- begin robey's Tcl thingies
  2923. # (well, what used to be robey's Tcl thingies...)
  2924. # Latest tested Tcl version to recommend if Tcl isn't found
  2925. tclrecommendver="8.3.3"
  2926. # Site recommended to download Tcl from
  2927. tclrecommendsite="ftp://ftp.eggheads.org/pub/tcl/tcl8_3/"
  2928. # Tcl library filename prefixes (also used for Tcl header dir on FreeBSD)
  2929. tcllibnames="tcl tcl8.4 tcl84 tcl8.3 tcl83 tcl8.2 tcl82 tcl8.1 tcl81 \
  2930. tcl8.0 tcl80 tcl7.6 tcl76 tcl7.5 tcl75 tcl7.4 tcl74 \
  2931. tcl7.3 tcl73 tcl7.2 tcl72 tcl7.1 tcl71 tcl7.0 tcl70"
  2932. # Tcl library filename suffixes
  2933. tcllibextensions=".so .so.1 .so.1.0 .so.1.2 .a .sl .dll"
  2934. # Tcl library search paths
  2935. tcllibpaths="$HOME/lib $HOME/tcl/lib $HOME \
  2936. /usr/local/lib /usr/local/pkgs/tcl/lib \
  2937. /usr/lib /lib /usr/i486-linuxaout/lib \
  2938. /beos/system/lib /sys/lib"
  2939. # Tcl header filenames
  2940. tclheadernames="tcl.h"
  2941. # Tcl header search paths
  2942. tclheaderpaths="$HOME/include $HOME/tcl/include $HOME \
  2943. /usr/local/include /usr/local/pkgs/tcl/include \
  2944. /usr/include /beos/system/include /beos/devel/include \
  2945. /sys/include"
  2946. # oohh new configure --variables for those with multiple Tcl libs
  2947. # Check whether --with-tcllib or --without-tcllib was given.
  2948. if test "${with_tcllib+set}" = set; then
  2949. withval="$with_tcllib"
  2950. tcllibname="$withval"
  2951. fi
  2952. # Check whether --with-tclinc or --without-tclinc was given.
  2953. if test "${with_tclinc+set}" = set; then
  2954. withval="$with_tclinc"
  2955. tclincname="$withval"
  2956. fi
  2957. WARN=0
  2958. # Make sure either both or neither $tcllibname and $tclincname are set
  2959. if test ! "${tcllibname-x}" = "x"
  2960. then
  2961. if test "${tclincname-x}" = "x"
  2962. then
  2963. WARN=1
  2964. tcllibname=""
  2965. TCLLIB=""
  2966. TCLINC=""
  2967. fi
  2968. else
  2969. if test ! "${tclincname-x}" = "x"
  2970. then
  2971. WARN=1
  2972. tclincname=""
  2973. TCLLIB=""
  2974. TCLINC=""
  2975. fi
  2976. fi
  2977. if test "$WARN" = 1
  2978. then
  2979. cat << 'EOF' >&2
  2980. configure: warning:
  2981. You must specify both --with-tcllib and --with-tclinc for them to work.
  2982. configure will now attempt to autodetect both the Tcl library and header...
  2983. EOF
  2984. fi
  2985. WARN=0
  2986. # Make sure either both or neither $TCLLIB and $TCLINC are set
  2987. if test ! "${TCLLIB-x}" = "x"
  2988. then
  2989. if test "${TCLINC-x}" = "x"
  2990. then
  2991. WARN=1
  2992. WVAR1=TCLLIB
  2993. WVAR2=TCLINC
  2994. TCLLIB=""
  2995. fi
  2996. else
  2997. if test ! "${TCLINC-x}" = "x"
  2998. then
  2999. WARN=1
  3000. WVAR1=TCLINC
  3001. WVAR2=TCLLIB
  3002. TCLINC=""
  3003. fi
  3004. fi
  3005. if test "$WARN" = 1
  3006. then
  3007. cat << EOF >&2
  3008. configure: warning:
  3009. Environment variable $WVAR1 was set, but I did not detect ${WVAR2}.
  3010. Please set both TCLLIB and TCLINC correctly if you wish to use them.
  3011. configure will now attempt to autodetect both the Tcl library and header...
  3012. EOF
  3013. fi
  3014. # Look for Tcl library: if $tcllibname is set, check there first
  3015. if test ! "${tcllibname-x}" = "x"
  3016. then
  3017. if test -f "$tcllibname" && test -r "$tcllibname"
  3018. then
  3019. TCLLIB=`echo $tcllibname | sed 's%/[^/][^/]*$%%'`
  3020. TCLLIBFN=`$BASENAME $tcllibname | cut -c4-`
  3021. TCLLIBEXT=".`echo $TCLLIBFN | $AWK '{j=split($1, i, "."); print i[j]}'`"
  3022. TCLLIBFNS=`$BASENAME $tcllibname $TCLLIBEXT | cut -c4-`
  3023. else
  3024. cat << EOF >&2
  3025. configure: warning:
  3026. The file '$tcllibname' given to option --with-tcllib is not valid.
  3027. configure will now attempt to autodetect both the Tcl library and header...
  3028. EOF
  3029. tcllibname=""
  3030. tclincname=""
  3031. TCLLIB=""
  3032. TCLLIBFN=""
  3033. TCLINC=""
  3034. TCLINCFN=""
  3035. fi
  3036. fi
  3037. # Look for Tcl header: if $tclincname is set, check there first
  3038. if test ! "${tclincname-x}" = "x"
  3039. then
  3040. if test -f "$tclincname" && test -r "$tclincname"
  3041. then
  3042. TCLINC=`echo $tclincname | sed 's%/[^/][^/]*$%%'`
  3043. TCLINCFN=`$BASENAME $tclincname`
  3044. else
  3045. cat << EOF >&2
  3046. configure: warning:
  3047. The file '$tclincname' given to option --with-tclinc is not valid.
  3048. configure will now attempt to autodetect both the Tcl library and header...
  3049. EOF
  3050. tcllibname=""
  3051. tclincname=""
  3052. TCLLIB=""
  3053. TCLLIBFN=""
  3054. TCLINC=""
  3055. TCLINCFN=""
  3056. fi
  3057. fi
  3058. # Look for Tcl library: if $TCLLIB is set, check there first
  3059. if test "${TCLLIBFN-x}" = "x"
  3060. then
  3061. if test ! "${TCLLIB-x}" = "x"
  3062. then
  3063. if test -d "$TCLLIB"
  3064. then
  3065. for tcllibfns in $tcllibnames
  3066. do
  3067. for tcllibext in $tcllibextensions
  3068. do
  3069. if test -r "$TCLLIB/lib$tcllibfns$tcllibext"
  3070. then
  3071. TCLLIBFN="$tcllibfns$tcllibext"
  3072. TCLLIBEXT="$tcllibext"
  3073. TCLLIBFNS="$tcllibfns"
  3074. break 2
  3075. fi
  3076. done
  3077. done
  3078. fi
  3079. if test "${TCLLIBFN-x}" = "x"
  3080. then
  3081. cat << 'EOF' >&2
  3082. configure: warning:
  3083. Environment variable TCLLIB was set, but incorrect.
  3084. Please set both TCLLIB and TCLINC correctly if you wish to use them.
  3085. configure will now attempt to autodetect both the Tcl library and header...
  3086. EOF
  3087. TCLLIB=""
  3088. TCLLIBFN=""
  3089. TCLINC=""
  3090. TCLINCFN=""
  3091. fi
  3092. fi
  3093. fi
  3094. # Look for Tcl header: if $TCLINC is set, check there first
  3095. if test "${TCLINCFN-x}" = "x"
  3096. then
  3097. if test ! "${TCLINC-x}" = "x"
  3098. then
  3099. if test -d "$TCLINC"
  3100. then
  3101. for tclheaderfn in $tclheadernames
  3102. do
  3103. if test -r "$TCLINC/$tclheaderfn"
  3104. then
  3105. TCLINCFN="$tclheaderfn"
  3106. break
  3107. fi
  3108. done
  3109. fi
  3110. if test "${TCLINCFN-x}" = "x"
  3111. then
  3112. cat << 'EOF' >&2
  3113. configure: warning:
  3114. Environment variable TCLINC was set, but incorrect.
  3115. Please set both TCLLIB and TCLINC correctly if you wish to use them.
  3116. configure will now attempt to autodetect both the Tcl library and header...
  3117. EOF
  3118. TCLLIB=""
  3119. TCLLIBFN=""
  3120. TCLINC=""
  3121. TCLINCFN=""
  3122. fi
  3123. fi
  3124. fi
  3125. echo $ac_n "checking for Tcl library""... $ac_c" 1>&6
  3126. echo "configure:3454: checking for Tcl library" >&5
  3127. # Attempt autodetect for $TCLLIBFN if it's not set
  3128. if test ! "${TCLLIBFN-x}" = "x"
  3129. then
  3130. echo "$ac_t""using $TCLLIB/lib$TCLLIBFN" 1>&6
  3131. else
  3132. for tcllibfns in $tcllibnames
  3133. do
  3134. for tcllibext in $tcllibextensions
  3135. do
  3136. for tcllibpath in $tcllibpaths
  3137. do
  3138. if test -r "$tcllibpath/lib$tcllibfns$tcllibext"
  3139. then
  3140. echo "$ac_t""found $tcllibpath/lib$tcllibfns$tcllibext" 1>&6
  3141. TCLLIB="$tcllibpath"
  3142. TCLLIBFN="$tcllibfns$tcllibext"
  3143. TCLLIBEXT="$tcllibext"
  3144. TCLLIBFNS="$tcllibfns"
  3145. break 3
  3146. fi
  3147. done
  3148. done
  3149. done
  3150. fi
  3151. # Show if $TCLLIBFN wasn't found
  3152. if test "${TCLLIBFN-x}" = "x"
  3153. then
  3154. echo "$ac_t""not found" 1>&6
  3155. fi
  3156. echo $ac_n "checking for Tcl header""... $ac_c" 1>&6
  3157. echo "configure:3488: checking for Tcl header" >&5
  3158. # Attempt autodetect for $TCLINCFN if it's not set
  3159. if test ! "${TCLINCFN-x}" = "x"
  3160. then
  3161. echo "$ac_t""using $TCLINC/$TCLINCFN" 1>&6
  3162. else
  3163. for tclheaderpath in $tclheaderpaths
  3164. do
  3165. for tclheaderfn in $tclheadernames
  3166. do
  3167. if test -r "$tclheaderpath/$tclheaderfn"
  3168. then
  3169. echo "$ac_t""found $tclheaderpath/$tclheaderfn" 1>&6
  3170. TCLINC="$tclheaderpath"
  3171. TCLINCFN="$tclheaderfn"
  3172. break 2
  3173. fi
  3174. done
  3175. done
  3176. # FreeBSD hack ...
  3177. if test "${TCLINCFN-x}" = "x"
  3178. then
  3179. for tcllibfns in $tcllibnames
  3180. do
  3181. for tclheaderpath in $tclheaderpaths
  3182. do
  3183. for tclheaderfn in $tclheadernames
  3184. do
  3185. if test -r "$tclheaderpath/$tcllibfns/$tclheaderfn"
  3186. then
  3187. echo "$ac_t""found $tclheaderpath/$tcllibfns/$tclheaderfn" 1>&6
  3188. TCLINC="$tclheaderpath/$tcllibfns"
  3189. TCLINCFN="$tclheaderfn"
  3190. break 3
  3191. fi
  3192. done
  3193. done
  3194. done
  3195. fi
  3196. fi
  3197. # Show if $TCLINCFN wasn't found
  3198. if test "${TCLINCFN-x}" = "x"
  3199. then
  3200. echo "$ac_t""not found" 1>&6
  3201. fi
  3202. echo $ac_n "checking whether the Tcl system has changed""... $ac_c" 1>&6
  3203. echo "configure:3537: checking whether the Tcl system has changed" >&5
  3204. egg_tcl_changed=yes
  3205. egg_tcl_id="$TCLLIB:$TCLLIBFN:$TCLINC:$TCLINCFN"
  3206. if test ! "$egg_tcl_id" = ":::"
  3207. then
  3208. egg_tcl_cached=yes
  3209. if eval "test \"`echo '$''{'egg_cv_var_tcl_id'+set}'`\" = set"; then
  3210. echo $ac_n "(cached) $ac_c" 1>&6
  3211. else
  3212. egg_cv_var_tcl_id="$egg_tcl_id"
  3213. egg_tcl_cached=no
  3214. fi
  3215. if test "$egg_tcl_cached" = "yes"
  3216. then
  3217. if test "${egg_cv_var_tcl_id-x}" = "${egg_tcl_id-x}"
  3218. then
  3219. egg_tcl_changed=no
  3220. else
  3221. egg_cv_var_tcl_id="$egg_tcl_id"
  3222. fi
  3223. fi
  3224. fi
  3225. if test "$egg_tcl_changed" = "yes"
  3226. then
  3227. echo "$ac_t""yes" 1>&6
  3228. else
  3229. echo "$ac_t""no" 1>&6
  3230. fi
  3231. # Both TCLLIBFN & TCLINCFN must be set, or we bail
  3232. TCL_FOUND=0
  3233. if test ! "${TCLLIBFN-x}" = "x" && test ! "${TCLINCFN-x}" = "x"
  3234. then
  3235. TCL_FOUND=1
  3236. # Check Tcl's version
  3237. if test "$egg_tcl_changed" = "yes"
  3238. then
  3239. unset egg_cv_var_tcl_version
  3240. fi
  3241. echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
  3242. echo "configure:3582: checking for Tcl version" >&5
  3243. if eval "test \"`echo '$''{'egg_cv_var_tcl_version'+set}'`\" = set"; then
  3244. echo $ac_n "(cached) $ac_c" 1>&6
  3245. else
  3246. egg_cv_var_tcl_version=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
  3247. fi
  3248. if test ! "${egg_cv_var_tcl_version-x}" = "x"
  3249. then
  3250. echo "$ac_t""$egg_cv_var_tcl_version" 1>&6
  3251. else
  3252. echo "$ac_t""not found" 1>&6
  3253. TCL_FOUND=0
  3254. fi
  3255. # Check Tcl's patch level (if available)
  3256. if test "$egg_tcl_changed" = "yes"
  3257. then
  3258. unset egg_cv_var_tcl_patch_level
  3259. fi
  3260. echo $ac_n "checking for Tcl patch level""... $ac_c" 1>&6
  3261. echo "configure:3606: checking for Tcl patch level" >&5
  3262. if eval "test \"`echo '$''{'egg_cv_var_tcl_patch_level'+set}'`\" = set"; then
  3263. echo $ac_n "(cached) $ac_c" 1>&6
  3264. else
  3265. eval "egg_cv_var_tcl_patch_level=`grep TCL_PATCH_LEVEL $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`"
  3266. fi
  3267. if test ! "${egg_cv_var_tcl_patch_level-x}" = "x"
  3268. then
  3269. echo "$ac_t""$egg_cv_var_tcl_patch_level" 1>&6
  3270. else
  3271. egg_cv_var_tcl_patch_level="unknown"
  3272. echo "$ac_t""unknown" 1>&6
  3273. fi
  3274. fi
  3275. # Check if we found Tcl's version
  3276. if test "$TCL_FOUND" = 0
  3277. then
  3278. cat << 'EOF' >&2
  3279. configure: error:
  3280. I can't find Tcl on this system.
  3281. You must set the path for it in pack/conf.h
  3282. EOF
  3283. exit 1
  3284. fi
  3285. # Is this version of Tcl too old for us to use ?
  3286. TCL_VER_PRE70=`echo $egg_cv_var_tcl_version | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
  3287. if test "$TCL_VER_PRE70" = "yes"
  3288. then
  3289. cat << EOF >&2
  3290. configure: error:
  3291. Your Tcl version is much too old for Eggdrop to use.
  3292. I suggest you download and compile a more recent version.
  3293. The most reliable current version is $tclrecommendver and
  3294. can be downloaded from $tclrecommendsite
  3295. EOF
  3296. exit 1
  3297. fi
  3298. # Are we using a pre 7.5 Tcl version ?
  3299. TCL_VER_PRE75=`echo $egg_cv_var_tcl_version | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 5)) || (i[1] < 7)) print "yes"; else print "no"}'`
  3300. if test "$TCL_VER_PRE75" = "yes"
  3301. then
  3302. cat >> confdefs.h <<\EOF
  3303. #define HAVE_PRE7_5_TCL 1
  3304. EOF
  3305. fi
  3306. # Set variables for Tcl library tests
  3307. TCL_TEST_LIB="$TCLLIBFNS"
  3308. TCL_TEST_OTHERLIBS="-L$TCLLIB $EGG_MATH_LIB"
  3309. if test ! "${ac_cv_lib_pthread-x}" = "x"
  3310. then
  3311. TCL_TEST_OTHERLIBS="$TCL_TEST_OTHERLIBS $ac_cv_lib_pthread"
  3312. fi
  3313. if test "$egg_tcl_changed" = "yes"
  3314. then
  3315. unset egg_cv_var_tcl_free
  3316. fi
  3317. # Check for Tcl_Free()
  3318. echo $ac_n "checking for Tcl_Free in -l$TCL_TEST_LIB""... $ac_c" 1>&6
  3319. echo "configure:3679: checking for Tcl_Free in -l$TCL_TEST_LIB" >&5
  3320. ac_lib_var=`echo $TCL_TEST_LIB'_'Tcl_Free | sed 'y%./+-%__p_%'`
  3321. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3322. echo $ac_n "(cached) $ac_c" 1>&6
  3323. else
  3324. ac_save_LIBS="$LIBS"
  3325. LIBS="-l$TCL_TEST_LIB $TCL_TEST_OTHERLIBS $LIBS"
  3326. cat > conftest.$ac_ext <<EOF
  3327. #line 3687 "configure"
  3328. #include "confdefs.h"
  3329. /* Override any gcc2 internal prototype to avoid an error. */
  3330. /* We use char because int might match the return type of a gcc2
  3331. builtin and then its argument prototype would still apply. */
  3332. char Tcl_Free();
  3333. int main() {
  3334. Tcl_Free()
  3335. ; return 0; }
  3336. EOF
  3337. if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3338. rm -rf conftest*
  3339. eval "ac_cv_lib_$ac_lib_var=yes"
  3340. else
  3341. echo "configure: failed program was:" >&5
  3342. cat conftest.$ac_ext >&5
  3343. rm -rf conftest*
  3344. eval "ac_cv_lib_$ac_lib_var=no"
  3345. fi
  3346. rm -f conftest*
  3347. LIBS="$ac_save_LIBS"
  3348. fi
  3349. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3350. echo "$ac_t""yes" 1>&6
  3351. egg_cv_var_tcl_free="yes"
  3352. else
  3353. echo "$ac_t""no" 1>&6
  3354. egg_cv_var_tcl_free="no"
  3355. fi
  3356. if test "$egg_cv_var_tcl_free" = "yes"
  3357. then
  3358. cat >> confdefs.h <<\EOF
  3359. #define HAVE_TCL_FREE 1
  3360. EOF
  3361. fi
  3362. # Check whether --enable-tcl-threads or --disable-tcl-threads was given.
  3363. if test "${enable_tcl_threads+set}" = set; then
  3364. enableval="$enable_tcl_threads"
  3365. enable_tcl_threads="$enableval"
  3366. else
  3367. enable_tcl_threads=yes
  3368. fi
  3369. if test "$egg_tcl_changed" = "yes"
  3370. then
  3371. unset egg_cv_var_tcl_threaded
  3372. fi
  3373. # Check for TclpFinalizeThreadData()
  3374. echo $ac_n "checking for TclpFinalizeThreadData in -l$TCL_TEST_LIB""... $ac_c" 1>&6
  3375. echo "configure:3744: checking for TclpFinalizeThreadData in -l$TCL_TEST_LIB" >&5
  3376. ac_lib_var=`echo $TCL_TEST_LIB'_'TclpFinalizeThreadData | sed 'y%./+-%__p_%'`
  3377. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  3378. echo $ac_n "(cached) $ac_c" 1>&6
  3379. else
  3380. ac_save_LIBS="$LIBS"
  3381. LIBS="-l$TCL_TEST_LIB $TCL_TEST_OTHERLIBS $LIBS"
  3382. cat > conftest.$ac_ext <<EOF
  3383. #line 3752 "configure"
  3384. #include "confdefs.h"
  3385. /* Override any gcc2 internal prototype to avoid an error. */
  3386. /* We use char because int might match the return type of a gcc2
  3387. builtin and then its argument prototype would still apply. */
  3388. char TclpFinalizeThreadData();
  3389. int main() {
  3390. TclpFinalizeThreadData()
  3391. ; return 0; }
  3392. EOF
  3393. if { (eval echo configure:3763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  3394. rm -rf conftest*
  3395. eval "ac_cv_lib_$ac_lib_var=yes"
  3396. else
  3397. echo "configure: failed program was:" >&5
  3398. cat conftest.$ac_ext >&5
  3399. rm -rf conftest*
  3400. eval "ac_cv_lib_$ac_lib_var=no"
  3401. fi
  3402. rm -f conftest*
  3403. LIBS="$ac_save_LIBS"
  3404. fi
  3405. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  3406. echo "$ac_t""yes" 1>&6
  3407. egg_cv_var_tcl_threaded="yes"
  3408. else
  3409. echo "$ac_t""no" 1>&6
  3410. egg_cv_var_tcl_threaded="no"
  3411. fi
  3412. if test "$egg_cv_var_tcl_threaded" = "yes"
  3413. then
  3414. if test "$enable_tcl_threads" = "no"
  3415. then
  3416. cat << 'EOF' >&2
  3417. configure: warning:
  3418. You have disabled threads support on a system with a threaded Tcl library.
  3419. Tcl features that rely on scheduled events may not function properly.
  3420. EOF
  3421. else
  3422. cat >> confdefs.h <<\EOF
  3423. #define HAVE_TCL_THREADS 1
  3424. EOF
  3425. fi
  3426. # Add pthread library to $LIBS if we need it
  3427. if test ! "${ac_cv_lib_pthread-x}" = "x"
  3428. then
  3429. LIBS="$ac_cv_lib_pthread $LIBS"
  3430. fi
  3431. fi
  3432. if test "$EGG_CYGWIN" = "yes"
  3433. then
  3434. TCL_REQS="$TCLLIB/lib$TCLLIBFN"
  3435. TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB"
  3436. else
  3437. if test ! "$TCLLIBEXT" = ".a"
  3438. then
  3439. TCL_REQS="$TCLLIB/lib$TCLLIBFN"
  3440. TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB"
  3441. else
  3442. # Set default make as static for unshared Tcl library
  3443. if test ! "$DEFAULT_MAKE" = "static"
  3444. then
  3445. cat << 'EOF' >&2
  3446. configure: warning:
  3447. Your Tcl library is not a shared lib.
  3448. configure will now set default make type to static...
  3449. EOF
  3450. DEFAULT_MAKE=static
  3451. fi
  3452. # Are we using a pre 7.4 Tcl version ?
  3453. TCL_VER_PRE74=`echo $egg_cv_var_tcl_version | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] < 4)) || (i[1] < 7)) print "yes"; else print "no"}'`
  3454. if test "$TCL_VER_PRE74" = "no"
  3455. then
  3456. # Was the --with-tcllib option given ?
  3457. if test ! "${tcllibname-x}" = "x"
  3458. then
  3459. TCL_REQS="$TCLLIB/lib$TCLLIBFN"
  3460. TCL_LIBS="$TCLLIB/lib$TCLLIBFN $EGG_MATH_LIB"
  3461. else
  3462. TCL_REQS="$TCLLIB/lib$TCLLIBFN"
  3463. TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS $EGG_MATH_LIB"
  3464. fi
  3465. else
  3466. cat << EOF >&2
  3467. configure: warning:
  3468. Your Tcl version ($egg_cv_var_tcl_version) is older then 7.4.
  3469. There are known problems, but we will attempt to work around them.
  3470. EOF
  3471. TCL_REQS="libtcle.a"
  3472. TCL_LIBS="-L`pwd` -ltcle $EGG_MATH_LIB"
  3473. fi
  3474. fi
  3475. fi
  3476. # ---------- end of (what used to be) robey's Tcl thingies
  3477. if test "$NEED_DL" = 1 && test "$ac_cv_func_dlopen" = "no"
  3478. then
  3479. if test "$LINUX" = "yes"
  3480. then
  3481. cat << 'EOF' >&2
  3482. configure: warning:
  3483. Since you are on a Linux system, this has a known problem...
  3484. I know a kludge for it,
  3485. EOF
  3486. if test -r "/lib/libdl.so.1"
  3487. then
  3488. cat << 'EOF' >&2
  3489. and you seem to have it, so we'll do that...
  3490. EOF
  3491. cat >> confdefs.h <<\EOF
  3492. #define HAVE_DLOPEN 1
  3493. EOF
  3494. LIBS="/lib/libdl.so.1 $LIBS"
  3495. else
  3496. cat << 'EOF' >&2
  3497. which you DON'T seem to have... doh!
  3498. perhaps you may still have the stuff lying around somewhere
  3499. if you work out where it is, add it to your XLIBS= lines
  3500. and #define HAVE_DLOPEN in config.h
  3501. we'll proceed on anyway, but you probably won't be able
  3502. to 'make eggdrop' but you might be able to make the
  3503. static bot (I'll default your make to this version).
  3504. EOF
  3505. DEFAULT_MAKE=static
  3506. fi
  3507. else
  3508. cat << 'EOF' >&2
  3509. configure: warning:
  3510. You don't seem to have libdl anywhere I can find it, this will
  3511. prevent you from doing dynamic modules, I'll set your default
  3512. make to static linking.
  3513. EOF
  3514. DEFAULT_MAKE=static
  3515. fi
  3516. fi
  3517. EGGVERSION=`grep 'char.egg_version' $srcdir/src/main.c | $AWK '{gsub(/(\"|\;)/, "", $4); print $4}'`
  3518. egg_version_num=`echo $EGGVERSION | $AWK 'BEGIN {FS = "."} {printf("%d%02d%02d", $1, $2, $3)}'`
  3519. cat >> confdefs.h <<EOF
  3520. #define EGG_VERSION $egg_version_num
  3521. EOF
  3522. if test "${DEST-x}" = "x"
  3523. then
  3524. DEST=\${prefix}
  3525. fi
  3526. case "$srcdir" in
  3527. [\\/]* | ?:[\\/]*)
  3528. MOD_UPDIR=""
  3529. ;;
  3530. *)
  3531. MOD_UPDIR="../"
  3532. ;;
  3533. esac
  3534. trap '' 1 2 15
  3535. cat > confcache <<\EOF
  3536. # This file is a shell script that caches the results of configure
  3537. # tests run on this system so they can be shared between configure
  3538. # scripts and configure runs. It is not useful on other systems.
  3539. # If it contains results you don't want to keep, you may remove or edit it.
  3540. #
  3541. # By default, configure uses ./config.cache as the cache file,
  3542. # creating it if it does not exist already. You can give configure
  3543. # the --cache-file=FILE option to use a different cache file; that is
  3544. # what configure does when it calls configure scripts in
  3545. # subdirectories, so they share the cache.
  3546. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3547. # config.status only pays attention to the cache file if you give it the
  3548. # --recheck option to rerun configure.
  3549. #
  3550. EOF
  3551. # The following way of writing the cache mishandles newlines in values,
  3552. # but we know of no workaround that is simple, portable, and efficient.
  3553. # So, don't put newlines in cache variables' values.
  3554. # Ultrix sh set writes to stderr and can't be redirected directly,
  3555. # and sets the high bit in the cache file unless we assign to the vars.
  3556. (set) 2>&1 |
  3557. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  3558. *ac_space=\ *)
  3559. # `set' does not quote correctly, so add quotes (double-quote substitution
  3560. # turns \\\\ into \\, and sed turns \\ into \).
  3561. sed -n \
  3562. -e "s/'/'\\\\''/g" \
  3563. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  3564. ;;
  3565. *)
  3566. # `set' quotes correctly as required by POSIX, so do not add quotes.
  3567. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  3568. ;;
  3569. esac >> confcache
  3570. if cmp -s $cache_file confcache; then
  3571. :
  3572. else
  3573. if test -w $cache_file; then
  3574. echo "updating cache $cache_file"
  3575. cat confcache > $cache_file
  3576. else
  3577. echo "not updating unwritable cache $cache_file"
  3578. fi
  3579. fi
  3580. rm -f confcache
  3581. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3582. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3583. # Let make expand exec_prefix.
  3584. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3585. # Any assignment to VPATH causes Sun make to only execute
  3586. # the first set of double-colon rules, so remove it if not needed.
  3587. # If there is a colon in the path, we need to keep it.
  3588. if test "x$srcdir" = x.; then
  3589. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  3590. fi
  3591. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3592. DEFS=-DHAVE_CONFIG_H
  3593. # Without the "./", some shells look in PATH for config.status.
  3594. : ${CONFIG_STATUS=./config.status}
  3595. echo creating $CONFIG_STATUS
  3596. rm -f $CONFIG_STATUS
  3597. cat > $CONFIG_STATUS <<EOF
  3598. #! /bin/sh
  3599. # Generated automatically by configure.
  3600. # Run this file to recreate the current configuration.
  3601. # This directory was configured as follows,
  3602. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3603. #
  3604. # $0 $ac_configure_args
  3605. #
  3606. # Compiler output produced by configure, useful for debugging
  3607. # configure, is in ./config.log if it exists.
  3608. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3609. for ac_option
  3610. do
  3611. case "\$ac_option" in
  3612. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3613. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3614. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3615. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3616. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  3617. exit 0 ;;
  3618. -help | --help | --hel | --he | --h)
  3619. echo "\$ac_cs_usage"; exit 0 ;;
  3620. *) echo "\$ac_cs_usage"; exit 1 ;;
  3621. esac
  3622. done
  3623. ac_given_srcdir=$srcdir
  3624. ac_given_INSTALL="$INSTALL"
  3625. trap 'rm -fr `echo "Makefile src/Makefile src/md5/Makefile src/compat/Makefile src/mod/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3626. EOF
  3627. cat >> $CONFIG_STATUS <<EOF
  3628. # Protect against being on the right side of a sed subst in config.status.
  3629. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3630. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3631. $ac_vpsub
  3632. $extrasub
  3633. s%@SHELL@%$SHELL%g
  3634. s%@CFLAGS@%$CFLAGS%g
  3635. s%@CPPFLAGS@%$CPPFLAGS%g
  3636. s%@CXXFLAGS@%$CXXFLAGS%g
  3637. s%@FFLAGS@%$FFLAGS%g
  3638. s%@DEFS@%$DEFS%g
  3639. s%@LDFLAGS@%$LDFLAGS%g
  3640. s%@LIBS@%$LIBS%g
  3641. s%@exec_prefix@%$exec_prefix%g
  3642. s%@prefix@%$prefix%g
  3643. s%@program_transform_name@%$program_transform_name%g
  3644. s%@bindir@%$bindir%g
  3645. s%@sbindir@%$sbindir%g
  3646. s%@libexecdir@%$libexecdir%g
  3647. s%@datadir@%$datadir%g
  3648. s%@sysconfdir@%$sysconfdir%g
  3649. s%@sharedstatedir@%$sharedstatedir%g
  3650. s%@localstatedir@%$localstatedir%g
  3651. s%@libdir@%$libdir%g
  3652. s%@includedir@%$includedir%g
  3653. s%@oldincludedir@%$oldincludedir%g
  3654. s%@infodir@%$infodir%g
  3655. s%@mandir@%$mandir%g
  3656. s%@egg_ac_parameters@%$egg_ac_parameters%g
  3657. s%@CC@%$CC%g
  3658. s%@CPP@%$CPP%g
  3659. s%@SET_MAKE@%$SET_MAKE%g
  3660. s%@RANLIB@%$RANLIB%g
  3661. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3662. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  3663. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3664. s%@LN_S@%$LN_S%g
  3665. s%@STRIP@%$STRIP%g
  3666. s%@AWK@%$AWK%g
  3667. s%@BASENAME@%$BASENAME%g
  3668. s%@UNAME@%$UNAME%g
  3669. s%@MOD_LD@%$MOD_LD%g
  3670. s%@MOD_CC@%$MOD_CC%g
  3671. s%@MOD_STRIP@%$MOD_STRIP%g
  3672. s%@SHLIB_LD@%$SHLIB_LD%g
  3673. s%@SHLIB_CC@%$SHLIB_CC%g
  3674. s%@SHLIB_STRIP@%$SHLIB_STRIP%g
  3675. s%@DEFAULT_MAKE@%$DEFAULT_MAKE%g
  3676. s%@EXEEXT@%$EXEEXT%g
  3677. s%@EGGEXEC@%$EGGEXEC%g
  3678. s%@TCLLIB@%$TCLLIB%g
  3679. s%@TCLLIBFN@%$TCLLIBFN%g
  3680. s%@TCLINC@%$TCLINC%g
  3681. s%@TCLINCFN@%$TCLINCFN%g
  3682. s%@TCL_REQS@%$TCL_REQS%g
  3683. s%@TCL_LIBS@%$TCL_LIBS%g
  3684. s%@EGGVERSION@%$EGGVERSION%g
  3685. s%@DEST@%$DEST%g
  3686. s%@MOD_UPDIR@%$MOD_UPDIR%g
  3687. CEOF
  3688. EOF
  3689. cat >> $CONFIG_STATUS <<\EOF
  3690. # Split the substitutions into bite-sized pieces for seds with
  3691. # small command number limits, like on Digital OSF/1 and HP-UX.
  3692. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3693. ac_file=1 # Number of current file.
  3694. ac_beg=1 # First line for current file.
  3695. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3696. ac_more_lines=:
  3697. ac_sed_cmds=""
  3698. while $ac_more_lines; do
  3699. if test $ac_beg -gt 1; then
  3700. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3701. else
  3702. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3703. fi
  3704. if test ! -s conftest.s$ac_file; then
  3705. ac_more_lines=false
  3706. rm -f conftest.s$ac_file
  3707. else
  3708. if test -z "$ac_sed_cmds"; then
  3709. ac_sed_cmds="sed -f conftest.s$ac_file"
  3710. else
  3711. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3712. fi
  3713. ac_file=`expr $ac_file + 1`
  3714. ac_beg=$ac_end
  3715. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3716. fi
  3717. done
  3718. if test -z "$ac_sed_cmds"; then
  3719. ac_sed_cmds=cat
  3720. fi
  3721. EOF
  3722. cat >> $CONFIG_STATUS <<EOF
  3723. CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile src/md5/Makefile src/compat/Makefile src/mod/Makefile"}
  3724. EOF
  3725. cat >> $CONFIG_STATUS <<\EOF
  3726. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3727. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3728. case "$ac_file" in
  3729. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3730. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3731. *) ac_file_in="${ac_file}.in" ;;
  3732. esac
  3733. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3734. # Remove last slash and all that follows it. Not all systems have dirname.
  3735. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3736. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3737. # The file is in a subdirectory.
  3738. test ! -d "$ac_dir" && mkdir "$ac_dir"
  3739. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3740. # A "../" for each directory in $ac_dir_suffix.
  3741. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3742. else
  3743. ac_dir_suffix= ac_dots=
  3744. fi
  3745. case "$ac_given_srcdir" in
  3746. .) srcdir=.
  3747. if test -z "$ac_dots"; then top_srcdir=.
  3748. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3749. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3750. *) # Relative path.
  3751. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3752. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3753. esac
  3754. case "$ac_given_INSTALL" in
  3755. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3756. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3757. esac
  3758. echo creating "$ac_file"
  3759. rm -f "$ac_file"
  3760. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3761. case "$ac_file" in
  3762. *Makefile*) ac_comsub="1i\\
  3763. # $configure_input" ;;
  3764. *) ac_comsub= ;;
  3765. esac
  3766. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3767. sed -e "$ac_comsub
  3768. s%@configure_input@%$configure_input%g
  3769. s%@srcdir@%$srcdir%g
  3770. s%@top_srcdir@%$top_srcdir%g
  3771. s%@INSTALL@%$INSTALL%g
  3772. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3773. fi; done
  3774. rm -f conftest.s*
  3775. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  3776. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  3777. #
  3778. # ac_d sets the value in "#define NAME VALUE" lines.
  3779. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  3780. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  3781. ac_dC='\3'
  3782. ac_dD='%g'
  3783. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  3784. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  3785. ac_uB='\([ ]\)%\1#\2define\3'
  3786. ac_uC=' '
  3787. ac_uD='\4%g'
  3788. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  3789. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  3790. ac_eB='$%\1#\2define\3'
  3791. ac_eC=' '
  3792. ac_eD='%g'
  3793. if test "${CONFIG_HEADERS+set}" != set; then
  3794. EOF
  3795. cat >> $CONFIG_STATUS <<EOF
  3796. CONFIG_HEADERS="config.h"
  3797. EOF
  3798. cat >> $CONFIG_STATUS <<\EOF
  3799. fi
  3800. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  3801. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3802. case "$ac_file" in
  3803. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3804. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3805. *) ac_file_in="${ac_file}.in" ;;
  3806. esac
  3807. echo creating $ac_file
  3808. rm -f conftest.frag conftest.in conftest.out
  3809. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3810. cat $ac_file_inputs > conftest.in
  3811. EOF
  3812. # Transform confdefs.h into a sed script conftest.vals that substitutes
  3813. # the proper values into config.h.in to produce config.h. And first:
  3814. # Protect against being on the right side of a sed subst in config.status.
  3815. # Protect against being in an unquoted here document in config.status.
  3816. rm -f conftest.vals
  3817. cat > conftest.hdr <<\EOF
  3818. s/[\\&%]/\\&/g
  3819. s%[\\$`]%\\&%g
  3820. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  3821. s%ac_d%ac_u%gp
  3822. s%ac_u%ac_e%gp
  3823. EOF
  3824. sed -n -f conftest.hdr confdefs.h > conftest.vals
  3825. rm -f conftest.hdr
  3826. # This sed command replaces #undef with comments. This is necessary, for
  3827. # example, in the case of _POSIX_SOURCE, which is predefined and required
  3828. # on some systems where configure will not decide to define it.
  3829. cat >> conftest.vals <<\EOF
  3830. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  3831. EOF
  3832. # Break up conftest.vals because some shells have a limit on
  3833. # the size of here documents, and old seds have small limits too.
  3834. rm -f conftest.tail
  3835. while :
  3836. do
  3837. ac_lines=`grep -c . conftest.vals`
  3838. # grep -c gives empty output for an empty file on some AIX systems.
  3839. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  3840. # Write a limited-size here document to conftest.frag.
  3841. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  3842. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  3843. echo 'CEOF
  3844. sed -f conftest.frag conftest.in > conftest.out
  3845. rm -f conftest.in
  3846. mv conftest.out conftest.in
  3847. ' >> $CONFIG_STATUS
  3848. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  3849. rm -f conftest.vals
  3850. mv conftest.tail conftest.vals
  3851. done
  3852. rm -f conftest.vals
  3853. cat >> $CONFIG_STATUS <<\EOF
  3854. rm -f conftest.frag conftest.h
  3855. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  3856. cat conftest.in >> conftest.h
  3857. rm -f conftest.in
  3858. if cmp -s $ac_file conftest.h 2>/dev/null; then
  3859. echo "$ac_file is unchanged"
  3860. rm -f conftest.h
  3861. else
  3862. # Remove last slash and all that follows it. Not all systems have dirname.
  3863. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3864. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3865. # The file is in a subdirectory.
  3866. test ! -d "$ac_dir" && mkdir "$ac_dir"
  3867. fi
  3868. rm -f $ac_file
  3869. mv conftest.h $ac_file
  3870. fi
  3871. fi; done
  3872. EOF
  3873. cat >> $CONFIG_STATUS <<EOF
  3874. egg_tclinc="$TCLINC"
  3875. egg_tclincfn="$TCLINCFN"
  3876. EOF
  3877. cat >> $CONFIG_STATUS <<\EOF
  3878. egg_replace_file="lush.h"
  3879. echo "creating lush.h"
  3880. cat > conftest.out << EGGEOF
  3881. /* Ignore me but do not erase me. I am a kludge. */
  3882. #include "$egg_tclinc/$egg_tclincfn"
  3883. EGGEOF
  3884. if test -f "$egg_replace_file" && cmp -s conftest.out $egg_replace_file
  3885. then
  3886. echo "lush.h is unchanged"
  3887. else
  3888. mv conftest.out $egg_replace_file
  3889. fi
  3890. rm -f conftest.out
  3891. if test -f .modules
  3892. then
  3893. $srcdir/misc/modconfig --top_srcdir="$srcdir/src" Makefile
  3894. fi
  3895. exit 0
  3896. EOF
  3897. chmod +x $CONFIG_STATUS
  3898. rm -fr confdefs* $ac_clean_files
  3899. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1