configure 111 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825
  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-x use the X Window System"
  14. ac_help="$ac_help
  15. --with-sproc use sproc instead of pthreads if possible"
  16. # Initialize some variables set by options.
  17. # The variables have the same names as the options, with
  18. # dashes changed to underlines.
  19. build=NONE
  20. cache_file=./config.cache
  21. exec_prefix=NONE
  22. host=NONE
  23. no_create=
  24. nonopt=NONE
  25. no_recursion=
  26. prefix=NONE
  27. program_prefix=NONE
  28. program_suffix=NONE
  29. program_transform_name=s,x,x,
  30. silent=
  31. site=
  32. srcdir=
  33. target=NONE
  34. verbose=
  35. x_includes=NONE
  36. x_libraries=NONE
  37. bindir='${exec_prefix}/bin'
  38. sbindir='${exec_prefix}/sbin'
  39. libexecdir='${exec_prefix}/libexec'
  40. datadir='${prefix}/share'
  41. sysconfdir='${prefix}/etc'
  42. sharedstatedir='${prefix}/com'
  43. localstatedir='${prefix}/var'
  44. libdir='${exec_prefix}/lib'
  45. includedir='${prefix}/include'
  46. oldincludedir='/usr/include'
  47. infodir='${prefix}/info'
  48. mandir='${prefix}/man'
  49. # Initialize some other variables.
  50. subdirs=
  51. MFLAGS= MAKEFLAGS=
  52. SHELL=${CONFIG_SHELL-/bin/sh}
  53. # Maximum number of lines to put in a shell here document.
  54. ac_max_here_lines=12
  55. ac_prev=
  56. for ac_option
  57. do
  58. # If the previous option needs an argument, assign it.
  59. if test -n "$ac_prev"; then
  60. eval "$ac_prev=\$ac_option"
  61. ac_prev=
  62. continue
  63. fi
  64. case "$ac_option" in
  65. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  66. *) ac_optarg= ;;
  67. esac
  68. # Accept the important Cygnus configure options, so we can diagnose typos.
  69. case "$ac_option" in
  70. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  71. ac_prev=bindir ;;
  72. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  73. bindir="$ac_optarg" ;;
  74. -build | --build | --buil | --bui | --bu)
  75. ac_prev=build ;;
  76. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  77. build="$ac_optarg" ;;
  78. -cache-file | --cache-file | --cache-fil | --cache-fi \
  79. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  80. ac_prev=cache_file ;;
  81. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  82. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  83. cache_file="$ac_optarg" ;;
  84. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  85. ac_prev=datadir ;;
  86. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  87. | --da=*)
  88. datadir="$ac_optarg" ;;
  89. -disable-* | --disable-*)
  90. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  91. # Reject names that are not valid shell variable names.
  92. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  93. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  94. fi
  95. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  96. eval "enable_${ac_feature}=no" ;;
  97. -enable-* | --enable-*)
  98. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  99. # Reject names that are not valid shell variable names.
  100. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  101. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  102. fi
  103. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  104. case "$ac_option" in
  105. *=*) ;;
  106. *) ac_optarg=yes ;;
  107. esac
  108. eval "enable_${ac_feature}='$ac_optarg'" ;;
  109. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  110. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  111. | --exec | --exe | --ex)
  112. ac_prev=exec_prefix ;;
  113. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  114. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  115. | --exec=* | --exe=* | --ex=*)
  116. exec_prefix="$ac_optarg" ;;
  117. -gas | --gas | --ga | --g)
  118. # Obsolete; use --with-gas.
  119. with_gas=yes ;;
  120. -help | --help | --hel | --he)
  121. # Omit some internal or obsolete options to make the list less imposing.
  122. # This message is too long to be a string in the A/UX 3.1 sh.
  123. cat << EOF
  124. Usage: configure [options] [host]
  125. Options: [defaults in brackets after descriptions]
  126. Configuration:
  127. --cache-file=FILE cache test results in FILE
  128. --help print this message
  129. --no-create do not create output files
  130. --quiet, --silent do not print \`checking...' messages
  131. --version print the version of autoconf that created configure
  132. Directory and file names:
  133. --prefix=PREFIX install architecture-independent files in PREFIX
  134. [$ac_default_prefix]
  135. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  136. [same as prefix]
  137. --bindir=DIR user executables in DIR [EPREFIX/bin]
  138. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  139. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  140. --datadir=DIR read-only architecture-independent data in DIR
  141. [PREFIX/share]
  142. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  143. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  144. [PREFIX/com]
  145. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  146. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  147. --includedir=DIR C header files in DIR [PREFIX/include]
  148. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  149. --infodir=DIR info documentation in DIR [PREFIX/info]
  150. --mandir=DIR man documentation in DIR [PREFIX/man]
  151. --srcdir=DIR find the sources in DIR [configure dir or ..]
  152. --program-prefix=PREFIX prepend PREFIX to installed program names
  153. --program-suffix=SUFFIX append SUFFIX to installed program names
  154. --program-transform-name=PROGRAM
  155. run sed PROGRAM on installed program names
  156. EOF
  157. cat << EOF
  158. Host type:
  159. --build=BUILD configure for building on BUILD [BUILD=HOST]
  160. --host=HOST configure for HOST [guessed]
  161. --target=TARGET configure for TARGET [TARGET=HOST]
  162. Features and packages:
  163. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  164. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  165. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  166. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  167. --x-includes=DIR X include files are in DIR
  168. --x-libraries=DIR X library files are in DIR
  169. EOF
  170. if test -n "$ac_help"; then
  171. echo "--enable and --with options recognized:$ac_help"
  172. fi
  173. exit 0 ;;
  174. -host | --host | --hos | --ho)
  175. ac_prev=host ;;
  176. -host=* | --host=* | --hos=* | --ho=*)
  177. host="$ac_optarg" ;;
  178. -includedir | --includedir | --includedi | --included | --include \
  179. | --includ | --inclu | --incl | --inc)
  180. ac_prev=includedir ;;
  181. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  182. | --includ=* | --inclu=* | --incl=* | --inc=*)
  183. includedir="$ac_optarg" ;;
  184. -infodir | --infodir | --infodi | --infod | --info | --inf)
  185. ac_prev=infodir ;;
  186. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  187. infodir="$ac_optarg" ;;
  188. -libdir | --libdir | --libdi | --libd)
  189. ac_prev=libdir ;;
  190. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  191. libdir="$ac_optarg" ;;
  192. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  193. | --libexe | --libex | --libe)
  194. ac_prev=libexecdir ;;
  195. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  196. | --libexe=* | --libex=* | --libe=*)
  197. libexecdir="$ac_optarg" ;;
  198. -localstatedir | --localstatedir | --localstatedi | --localstated \
  199. | --localstate | --localstat | --localsta | --localst \
  200. | --locals | --local | --loca | --loc | --lo)
  201. ac_prev=localstatedir ;;
  202. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  203. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  204. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  205. localstatedir="$ac_optarg" ;;
  206. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  207. ac_prev=mandir ;;
  208. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  209. mandir="$ac_optarg" ;;
  210. -nfp | --nfp | --nf)
  211. # Obsolete; use --without-fp.
  212. with_fp=no ;;
  213. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  214. | --no-cr | --no-c)
  215. no_create=yes ;;
  216. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  217. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  218. no_recursion=yes ;;
  219. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  220. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  221. | --oldin | --oldi | --old | --ol | --o)
  222. ac_prev=oldincludedir ;;
  223. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  224. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  225. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  226. oldincludedir="$ac_optarg" ;;
  227. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  228. ac_prev=prefix ;;
  229. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  230. prefix="$ac_optarg" ;;
  231. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  232. | --program-pre | --program-pr | --program-p)
  233. ac_prev=program_prefix ;;
  234. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  235. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  236. program_prefix="$ac_optarg" ;;
  237. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  238. | --program-suf | --program-su | --program-s)
  239. ac_prev=program_suffix ;;
  240. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  241. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  242. program_suffix="$ac_optarg" ;;
  243. -program-transform-name | --program-transform-name \
  244. | --program-transform-nam | --program-transform-na \
  245. | --program-transform-n | --program-transform- \
  246. | --program-transform | --program-transfor \
  247. | --program-transfo | --program-transf \
  248. | --program-trans | --program-tran \
  249. | --progr-tra | --program-tr | --program-t)
  250. ac_prev=program_transform_name ;;
  251. -program-transform-name=* | --program-transform-name=* \
  252. | --program-transform-nam=* | --program-transform-na=* \
  253. | --program-transform-n=* | --program-transform-=* \
  254. | --program-transform=* | --program-transfor=* \
  255. | --program-transfo=* | --program-transf=* \
  256. | --program-trans=* | --program-tran=* \
  257. | --progr-tra=* | --program-tr=* | --program-t=*)
  258. program_transform_name="$ac_optarg" ;;
  259. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  260. | -silent | --silent | --silen | --sile | --sil)
  261. silent=yes ;;
  262. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  263. ac_prev=sbindir ;;
  264. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  265. | --sbi=* | --sb=*)
  266. sbindir="$ac_optarg" ;;
  267. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  268. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  269. | --sharedst | --shareds | --shared | --share | --shar \
  270. | --sha | --sh)
  271. ac_prev=sharedstatedir ;;
  272. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  273. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  274. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  275. | --sha=* | --sh=*)
  276. sharedstatedir="$ac_optarg" ;;
  277. -site | --site | --sit)
  278. ac_prev=site ;;
  279. -site=* | --site=* | --sit=*)
  280. site="$ac_optarg" ;;
  281. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  282. ac_prev=srcdir ;;
  283. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  284. srcdir="$ac_optarg" ;;
  285. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  286. | --syscon | --sysco | --sysc | --sys | --sy)
  287. ac_prev=sysconfdir ;;
  288. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  289. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  290. sysconfdir="$ac_optarg" ;;
  291. -target | --target | --targe | --targ | --tar | --ta | --t)
  292. ac_prev=target ;;
  293. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  294. target="$ac_optarg" ;;
  295. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  296. verbose=yes ;;
  297. -version | --version | --versio | --versi | --vers)
  298. echo "configure generated by autoconf version 2.13"
  299. exit 0 ;;
  300. -with-* | --with-*)
  301. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  302. # Reject names that are not valid shell variable names.
  303. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  304. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  305. fi
  306. ac_package=`echo $ac_package| sed 's/-/_/g'`
  307. case "$ac_option" in
  308. *=*) ;;
  309. *) ac_optarg=yes ;;
  310. esac
  311. eval "with_${ac_package}='$ac_optarg'" ;;
  312. -without-* | --without-*)
  313. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  314. # Reject names that are not valid shell variable names.
  315. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  316. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  317. fi
  318. ac_package=`echo $ac_package| sed 's/-/_/g'`
  319. eval "with_${ac_package}=no" ;;
  320. --x)
  321. # Obsolete; use --with-x.
  322. with_x=yes ;;
  323. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  324. | --x-incl | --x-inc | --x-in | --x-i)
  325. ac_prev=x_includes ;;
  326. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  327. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  328. x_includes="$ac_optarg" ;;
  329. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  330. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  331. ac_prev=x_libraries ;;
  332. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  333. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  334. x_libraries="$ac_optarg" ;;
  335. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  336. ;;
  337. *)
  338. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  339. echo "configure: warning: $ac_option: invalid host type" 1>&2
  340. fi
  341. if test "x$nonopt" != xNONE; then
  342. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  343. fi
  344. nonopt="$ac_option"
  345. ;;
  346. esac
  347. done
  348. if test -n "$ac_prev"; then
  349. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  350. fi
  351. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  352. # File descriptor usage:
  353. # 0 standard input
  354. # 1 file creation
  355. # 2 errors and warnings
  356. # 3 some systems may open it to /dev/tty
  357. # 4 used on the Kubota Titan
  358. # 6 checking for... messages and results
  359. # 5 compiler messages saved in config.log
  360. if test "$silent" = yes; then
  361. exec 6>/dev/null
  362. else
  363. exec 6>&1
  364. fi
  365. exec 5>./config.log
  366. echo "\
  367. This file contains any messages produced by compilers while
  368. running configure, to aid debugging if configure makes a mistake.
  369. " 1>&5
  370. # Strip out --no-create and --no-recursion so they do not pile up.
  371. # Also quote any args containing shell metacharacters.
  372. ac_configure_args=
  373. for ac_arg
  374. do
  375. case "$ac_arg" in
  376. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  377. | --no-cr | --no-c) ;;
  378. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  379. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  380. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  381. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  382. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  383. esac
  384. done
  385. # NLS nuisances.
  386. # Only set these to C if already set. These must not be set unconditionally
  387. # because not all systems understand e.g. LANG=C (notably SCO).
  388. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  389. # Non-C LC_CTYPE values break the ctype check.
  390. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  391. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  392. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  393. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  394. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  395. rm -rf conftest* confdefs.h
  396. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  397. echo > confdefs.h
  398. # A filename unique to this package, relative to the directory that
  399. # configure is in, which we can look for to find out if srcdir is correct.
  400. ac_unique_file=
  401. # Find the source files, if location was not specified.
  402. if test -z "$srcdir"; then
  403. ac_srcdir_defaulted=yes
  404. # Try the directory containing this script, then its parent.
  405. ac_prog=$0
  406. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  407. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  408. srcdir=$ac_confdir
  409. if test ! -r $srcdir/$ac_unique_file; then
  410. srcdir=..
  411. fi
  412. else
  413. ac_srcdir_defaulted=no
  414. fi
  415. if test ! -r $srcdir/$ac_unique_file; then
  416. if test "$ac_srcdir_defaulted" = yes; then
  417. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  418. else
  419. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  420. fi
  421. fi
  422. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  423. # Prefer explicitly selected file to automatically selected ones.
  424. if test -z "$CONFIG_SITE"; then
  425. if test "x$prefix" != xNONE; then
  426. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  427. else
  428. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  429. fi
  430. fi
  431. for ac_site_file in $CONFIG_SITE; do
  432. if test -r "$ac_site_file"; then
  433. echo "loading site script $ac_site_file"
  434. . "$ac_site_file"
  435. fi
  436. done
  437. if test -r "$cache_file"; then
  438. echo "loading cache $cache_file"
  439. . $cache_file
  440. else
  441. echo "creating cache $cache_file"
  442. > $cache_file
  443. fi
  444. ac_ext=c
  445. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  446. ac_cpp='$CPP $CPPFLAGS'
  447. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  448. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  449. cross_compiling=$ac_cv_prog_cc_cross
  450. ac_exeext=
  451. ac_objext=o
  452. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  453. # Stardent Vistra SVR4 grep lacks -e, says [email protected].
  454. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  455. ac_n= ac_c='
  456. ' ac_t=' '
  457. else
  458. ac_n=-n ac_c= ac_t=
  459. fi
  460. else
  461. ac_n= ac_c='\c' ac_t=
  462. fi
  463. CMAKE_CONFIG_DIR=`pwd`
  464. #
  465. # check for some programs we use
  466. #
  467. # save the CFLAGS and CXXFLAGS specified by the user
  468. save_CFLAGS=$CFLAGS
  469. save_CXXFLAGS=$CXXFLAGS
  470. # Extract the first word of "gcc", so it can be a program name with args.
  471. set dummy gcc; ac_word=$2
  472. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  473. echo "configure:544: checking for $ac_word" >&5
  474. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  475. echo $ac_n "(cached) $ac_c" 1>&6
  476. else
  477. if test -n "$CC"; then
  478. ac_cv_prog_CC="$CC" # Let the user override the test.
  479. else
  480. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  481. ac_dummy="$PATH"
  482. for ac_dir in $ac_dummy; do
  483. test -z "$ac_dir" && ac_dir=.
  484. if test -f $ac_dir/$ac_word; then
  485. ac_cv_prog_CC="gcc"
  486. break
  487. fi
  488. done
  489. IFS="$ac_save_ifs"
  490. fi
  491. fi
  492. CC="$ac_cv_prog_CC"
  493. if test -n "$CC"; then
  494. echo "$ac_t""$CC" 1>&6
  495. else
  496. echo "$ac_t""no" 1>&6
  497. fi
  498. if test -z "$CC"; then
  499. # Extract the first word of "cc", so it can be a program name with args.
  500. set dummy cc; ac_word=$2
  501. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  502. echo "configure:574: checking for $ac_word" >&5
  503. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  504. echo $ac_n "(cached) $ac_c" 1>&6
  505. else
  506. if test -n "$CC"; then
  507. ac_cv_prog_CC="$CC" # Let the user override the test.
  508. else
  509. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  510. ac_prog_rejected=no
  511. ac_dummy="$PATH"
  512. for ac_dir in $ac_dummy; do
  513. test -z "$ac_dir" && ac_dir=.
  514. if test -f $ac_dir/$ac_word; then
  515. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  516. ac_prog_rejected=yes
  517. continue
  518. fi
  519. ac_cv_prog_CC="cc"
  520. break
  521. fi
  522. done
  523. IFS="$ac_save_ifs"
  524. if test $ac_prog_rejected = yes; then
  525. # We found a bogon in the path, so make sure we never use it.
  526. set dummy $ac_cv_prog_CC
  527. shift
  528. if test $# -gt 0; then
  529. # We chose a different compiler from the bogus one.
  530. # However, it has the same basename, so the bogon will be chosen
  531. # first if we set CC to just the basename; use the full file name.
  532. shift
  533. set dummy "$ac_dir/$ac_word" "$@"
  534. shift
  535. ac_cv_prog_CC="$@"
  536. fi
  537. fi
  538. fi
  539. fi
  540. CC="$ac_cv_prog_CC"
  541. if test -n "$CC"; then
  542. echo "$ac_t""$CC" 1>&6
  543. else
  544. echo "$ac_t""no" 1>&6
  545. fi
  546. if test -z "$CC"; then
  547. case "`uname -s`" in
  548. *win32* | *WIN32*)
  549. # Extract the first word of "cl", so it can be a program name with args.
  550. set dummy cl; ac_word=$2
  551. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  552. echo "configure:625: checking for $ac_word" >&5
  553. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  554. echo $ac_n "(cached) $ac_c" 1>&6
  555. else
  556. if test -n "$CC"; then
  557. ac_cv_prog_CC="$CC" # Let the user override the test.
  558. else
  559. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  560. ac_dummy="$PATH"
  561. for ac_dir in $ac_dummy; do
  562. test -z "$ac_dir" && ac_dir=.
  563. if test -f $ac_dir/$ac_word; then
  564. ac_cv_prog_CC="cl"
  565. break
  566. fi
  567. done
  568. IFS="$ac_save_ifs"
  569. fi
  570. fi
  571. CC="$ac_cv_prog_CC"
  572. if test -n "$CC"; then
  573. echo "$ac_t""$CC" 1>&6
  574. else
  575. echo "$ac_t""no" 1>&6
  576. fi
  577. ;;
  578. esac
  579. fi
  580. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  581. fi
  582. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  583. echo "configure:657: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  584. ac_ext=c
  585. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  586. ac_cpp='$CPP $CPPFLAGS'
  587. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  588. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  589. cross_compiling=$ac_cv_prog_cc_cross
  590. cat > conftest.$ac_ext << EOF
  591. #line 668 "configure"
  592. #include "confdefs.h"
  593. main(){return(0);}
  594. EOF
  595. if { (eval echo configure:673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  596. ac_cv_prog_cc_works=yes
  597. # If we can't run a trivial program, we are probably using a cross compiler.
  598. if (./conftest; exit) 2>/dev/null; then
  599. ac_cv_prog_cc_cross=no
  600. else
  601. ac_cv_prog_cc_cross=yes
  602. fi
  603. else
  604. echo "configure: failed program was:" >&5
  605. cat conftest.$ac_ext >&5
  606. ac_cv_prog_cc_works=no
  607. fi
  608. rm -fr conftest*
  609. ac_ext=c
  610. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  611. ac_cpp='$CPP $CPPFLAGS'
  612. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  613. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  614. cross_compiling=$ac_cv_prog_cc_cross
  615. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  616. if test $ac_cv_prog_cc_works = no; then
  617. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  618. fi
  619. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  620. echo "configure:699: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  621. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  622. cross_compiling=$ac_cv_prog_cc_cross
  623. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  624. echo "configure:704: checking whether we are using GNU C" >&5
  625. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  626. echo $ac_n "(cached) $ac_c" 1>&6
  627. else
  628. cat > conftest.c <<EOF
  629. #ifdef __GNUC__
  630. yes;
  631. #endif
  632. EOF
  633. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:713: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  634. ac_cv_prog_gcc=yes
  635. else
  636. ac_cv_prog_gcc=no
  637. fi
  638. fi
  639. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  640. if test $ac_cv_prog_gcc = yes; then
  641. GCC=yes
  642. else
  643. GCC=
  644. fi
  645. ac_test_CFLAGS="${CFLAGS+set}"
  646. ac_save_CFLAGS="$CFLAGS"
  647. CFLAGS=
  648. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  649. echo "configure:732: checking whether ${CC-cc} accepts -g" >&5
  650. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  651. echo $ac_n "(cached) $ac_c" 1>&6
  652. else
  653. echo 'void f(){}' > conftest.c
  654. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  655. ac_cv_prog_cc_g=yes
  656. else
  657. ac_cv_prog_cc_g=no
  658. fi
  659. rm -f conftest*
  660. fi
  661. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  662. if test "$ac_test_CFLAGS" = set; then
  663. CFLAGS="$ac_save_CFLAGS"
  664. elif test $ac_cv_prog_cc_g = yes; then
  665. if test "$GCC" = yes; then
  666. CFLAGS="-g -O2"
  667. else
  668. CFLAGS="-g"
  669. fi
  670. else
  671. if test "$GCC" = yes; then
  672. CFLAGS="-O2"
  673. else
  674. CFLAGS=
  675. fi
  676. fi
  677. for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
  678. do
  679. # Extract the first word of "$ac_prog", so it can be a program name with args.
  680. set dummy $ac_prog; ac_word=$2
  681. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  682. echo "configure:768: checking for $ac_word" >&5
  683. if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
  684. echo $ac_n "(cached) $ac_c" 1>&6
  685. else
  686. if test -n "$CXX"; then
  687. ac_cv_prog_CXX="$CXX" # Let the user override the test.
  688. else
  689. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  690. ac_dummy="$PATH"
  691. for ac_dir in $ac_dummy; do
  692. test -z "$ac_dir" && ac_dir=.
  693. if test -f $ac_dir/$ac_word; then
  694. ac_cv_prog_CXX="$ac_prog"
  695. break
  696. fi
  697. done
  698. IFS="$ac_save_ifs"
  699. fi
  700. fi
  701. CXX="$ac_cv_prog_CXX"
  702. if test -n "$CXX"; then
  703. echo "$ac_t""$CXX" 1>&6
  704. else
  705. echo "$ac_t""no" 1>&6
  706. fi
  707. test -n "$CXX" && break
  708. done
  709. test -n "$CXX" || CXX="gcc"
  710. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  711. echo "configure:800: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
  712. ac_ext=C
  713. # CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  714. ac_cpp='$CXXCPP $CPPFLAGS'
  715. ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  716. ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  717. cross_compiling=$ac_cv_prog_cxx_cross
  718. cat > conftest.$ac_ext << EOF
  719. #line 811 "configure"
  720. #include "confdefs.h"
  721. int main(){return(0);}
  722. EOF
  723. if { (eval echo configure:816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  724. ac_cv_prog_cxx_works=yes
  725. # If we can't run a trivial program, we are probably using a cross compiler.
  726. if (./conftest; exit) 2>/dev/null; then
  727. ac_cv_prog_cxx_cross=no
  728. else
  729. ac_cv_prog_cxx_cross=yes
  730. fi
  731. else
  732. echo "configure: failed program was:" >&5
  733. cat conftest.$ac_ext >&5
  734. ac_cv_prog_cxx_works=no
  735. fi
  736. rm -fr conftest*
  737. ac_ext=c
  738. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  739. ac_cpp='$CPP $CPPFLAGS'
  740. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  741. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  742. cross_compiling=$ac_cv_prog_cc_cross
  743. echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
  744. if test $ac_cv_prog_cxx_works = no; then
  745. { echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
  746. fi
  747. echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  748. echo "configure:842: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
  749. echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
  750. cross_compiling=$ac_cv_prog_cxx_cross
  751. echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
  752. echo "configure:847: checking whether we are using GNU C++" >&5
  753. if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
  754. echo $ac_n "(cached) $ac_c" 1>&6
  755. else
  756. cat > conftest.C <<EOF
  757. #ifdef __GNUC__
  758. yes;
  759. #endif
  760. EOF
  761. if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  762. ac_cv_prog_gxx=yes
  763. else
  764. ac_cv_prog_gxx=no
  765. fi
  766. fi
  767. echo "$ac_t""$ac_cv_prog_gxx" 1>&6
  768. if test $ac_cv_prog_gxx = yes; then
  769. GXX=yes
  770. else
  771. GXX=
  772. fi
  773. ac_test_CXXFLAGS="${CXXFLAGS+set}"
  774. ac_save_CXXFLAGS="$CXXFLAGS"
  775. CXXFLAGS=
  776. echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
  777. echo "configure:875: checking whether ${CXX-g++} accepts -g" >&5
  778. if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
  779. echo $ac_n "(cached) $ac_c" 1>&6
  780. else
  781. echo 'void f(){}' > conftest.cc
  782. if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
  783. ac_cv_prog_cxx_g=yes
  784. else
  785. ac_cv_prog_cxx_g=no
  786. fi
  787. rm -f conftest*
  788. fi
  789. echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
  790. if test "$ac_test_CXXFLAGS" = set; then
  791. CXXFLAGS="$ac_save_CXXFLAGS"
  792. elif test $ac_cv_prog_cxx_g = yes; then
  793. if test "$GXX" = yes; then
  794. CXXFLAGS="-g -O2"
  795. else
  796. CXXFLAGS="-g"
  797. fi
  798. else
  799. if test "$GXX" = yes; then
  800. CXXFLAGS="-O2"
  801. else
  802. CXXFLAGS=
  803. fi
  804. fi
  805. # restore the flags specified by the user and get rid of any flags
  806. # found by autoconf (we do not want -02 -g by default)
  807. CFLAGS=$save_CFLAGS
  808. CXXFLAGS=$save_CXXFLAGS
  809. # Extract the first word of "ranlib", so it can be a program name with args.
  810. set dummy ranlib; ac_word=$2
  811. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  812. echo "configure:917: checking for $ac_word" >&5
  813. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  814. echo $ac_n "(cached) $ac_c" 1>&6
  815. else
  816. if test -n "$RANLIB"; then
  817. ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  818. else
  819. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  820. ac_dummy="$PATH"
  821. for ac_dir in $ac_dummy; do
  822. test -z "$ac_dir" && ac_dir=.
  823. if test -f $ac_dir/$ac_word; then
  824. ac_cv_prog_RANLIB="ranlib"
  825. break
  826. fi
  827. done
  828. IFS="$ac_save_ifs"
  829. test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  830. fi
  831. fi
  832. RANLIB="$ac_cv_prog_RANLIB"
  833. if test -n "$RANLIB"; then
  834. echo "$ac_t""$RANLIB" 1>&6
  835. else
  836. echo "$ac_t""no" 1>&6
  837. fi
  838. ac_aux_dir=
  839. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  840. if test -f $ac_dir/install-sh; then
  841. ac_aux_dir=$ac_dir
  842. ac_install_sh="$ac_aux_dir/install-sh -c"
  843. break
  844. elif test -f $ac_dir/install.sh; then
  845. ac_aux_dir=$ac_dir
  846. ac_install_sh="$ac_aux_dir/install.sh -c"
  847. break
  848. fi
  849. done
  850. if test -z "$ac_aux_dir"; then
  851. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  852. fi
  853. ac_config_guess=$ac_aux_dir/config.guess
  854. ac_config_sub=$ac_aux_dir/config.sub
  855. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  856. # Find a good install program. We prefer a C program (faster),
  857. # so one script is as good as another. But avoid the broken or
  858. # incompatible versions:
  859. # SysV /etc/install, /usr/sbin/install
  860. # SunOS /usr/etc/install
  861. # IRIX /sbin/install
  862. # AIX /bin/install
  863. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  864. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  865. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  866. # ./install, which can be erroneously created by make from ./install.sh.
  867. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  868. echo "configure:975: checking for a BSD compatible install" >&5
  869. if test -z "$INSTALL"; then
  870. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  871. echo $ac_n "(cached) $ac_c" 1>&6
  872. else
  873. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  874. for ac_dir in $PATH; do
  875. # Account for people who put trailing slashes in PATH elements.
  876. case "$ac_dir/" in
  877. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  878. *)
  879. # OSF1 and SCO ODT 3.0 have their own names for install.
  880. # Don't use installbsd from OSF since it installs stuff as root
  881. # by default.
  882. for ac_prog in ginstall scoinst install; do
  883. if test -f $ac_dir/$ac_prog; then
  884. if test $ac_prog = install &&
  885. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  886. # AIX install. It has an incompatible calling convention.
  887. :
  888. else
  889. ac_cv_path_install="$ac_dir/$ac_prog -c"
  890. break 2
  891. fi
  892. fi
  893. done
  894. ;;
  895. esac
  896. done
  897. IFS="$ac_save_IFS"
  898. fi
  899. if test "${ac_cv_path_install+set}" = set; then
  900. INSTALL="$ac_cv_path_install"
  901. else
  902. # As a last resort, use the slow shell script. We don't cache a
  903. # path for INSTALL within a source directory, because that will
  904. # break other packages using the cache if that directory is
  905. # removed, or if the path is relative.
  906. INSTALL="$ac_install_sh"
  907. fi
  908. fi
  909. echo "$ac_t""$INSTALL" 1>&6
  910. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  911. # It thinks the first close brace ends the variable substitution.
  912. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  913. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  914. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  915. echo $ac_n "checking size of int""... $ac_c" 1>&6
  916. echo "configure:1029: checking size of int" >&5
  917. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  918. echo $ac_n "(cached) $ac_c" 1>&6
  919. else
  920. if test "$cross_compiling" = yes; then
  921. ac_cv_sizeof_int=4
  922. else
  923. cat > conftest.$ac_ext <<EOF
  924. #line 1037 "configure"
  925. #include "confdefs.h"
  926. #include <stdio.h>
  927. main()
  928. {
  929. FILE *f=fopen("conftestval", "w");
  930. if (!f) exit(1);
  931. fprintf(f, "%d\n", sizeof(int));
  932. exit(0);
  933. }
  934. EOF
  935. if { (eval echo configure:1048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  936. then
  937. ac_cv_sizeof_int=`cat conftestval`
  938. else
  939. echo "configure: failed program was:" >&5
  940. cat conftest.$ac_ext >&5
  941. rm -fr conftest*
  942. ac_cv_sizeof_int=0
  943. fi
  944. rm -fr conftest*
  945. fi
  946. fi
  947. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  948. cat >> confdefs.h <<EOF
  949. #define SIZEOF_INT $ac_cv_sizeof_int
  950. EOF
  951. CMAKE_SIZEOF_INT=$ac_cv_sizeof_int
  952. echo $ac_n "checking size of long""... $ac_c" 1>&6
  953. echo "configure:1070: checking size of long" >&5
  954. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  955. echo $ac_n "(cached) $ac_c" 1>&6
  956. else
  957. if test "$cross_compiling" = yes; then
  958. ac_cv_sizeof_long=4
  959. else
  960. cat > conftest.$ac_ext <<EOF
  961. #line 1078 "configure"
  962. #include "confdefs.h"
  963. #include <stdio.h>
  964. main()
  965. {
  966. FILE *f=fopen("conftestval", "w");
  967. if (!f) exit(1);
  968. fprintf(f, "%d\n", sizeof(long));
  969. exit(0);
  970. }
  971. EOF
  972. if { (eval echo configure:1089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  973. then
  974. ac_cv_sizeof_long=`cat conftestval`
  975. else
  976. echo "configure: failed program was:" >&5
  977. cat conftest.$ac_ext >&5
  978. rm -fr conftest*
  979. ac_cv_sizeof_long=0
  980. fi
  981. rm -fr conftest*
  982. fi
  983. fi
  984. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  985. cat >> confdefs.h <<EOF
  986. #define SIZEOF_LONG $ac_cv_sizeof_long
  987. EOF
  988. CMAKE_SIZEOF_LONG=$ac_cv_sizeof_long
  989. echo $ac_n "checking size of void *""... $ac_c" 1>&6
  990. echo "configure:1111: checking size of void *" >&5
  991. if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
  992. echo $ac_n "(cached) $ac_c" 1>&6
  993. else
  994. if test "$cross_compiling" = yes; then
  995. ac_cv_sizeof_void_p=4
  996. else
  997. cat > conftest.$ac_ext <<EOF
  998. #line 1119 "configure"
  999. #include "confdefs.h"
  1000. #include <stdio.h>
  1001. main()
  1002. {
  1003. FILE *f=fopen("conftestval", "w");
  1004. if (!f) exit(1);
  1005. fprintf(f, "%d\n", sizeof(void *));
  1006. exit(0);
  1007. }
  1008. EOF
  1009. if { (eval echo configure:1130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1010. then
  1011. ac_cv_sizeof_void_p=`cat conftestval`
  1012. else
  1013. echo "configure: failed program was:" >&5
  1014. cat conftest.$ac_ext >&5
  1015. rm -fr conftest*
  1016. ac_cv_sizeof_void_p=0
  1017. fi
  1018. rm -fr conftest*
  1019. fi
  1020. fi
  1021. echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
  1022. cat >> confdefs.h <<EOF
  1023. #define SIZEOF_VOID_P $ac_cv_sizeof_void_p
  1024. EOF
  1025. CMAKE_SIZEOF_VOID_P=$ac_cv_sizeof_void_p
  1026. echo $ac_n "checking size of char""... $ac_c" 1>&6
  1027. echo "configure:1152: checking size of char" >&5
  1028. if eval "test \"`echo '$''{'ac_cv_sizeof_char'+set}'`\" = set"; then
  1029. echo $ac_n "(cached) $ac_c" 1>&6
  1030. else
  1031. if test "$cross_compiling" = yes; then
  1032. ac_cv_sizeof_char=1
  1033. else
  1034. cat > conftest.$ac_ext <<EOF
  1035. #line 1160 "configure"
  1036. #include "confdefs.h"
  1037. #include <stdio.h>
  1038. main()
  1039. {
  1040. FILE *f=fopen("conftestval", "w");
  1041. if (!f) exit(1);
  1042. fprintf(f, "%d\n", sizeof(char));
  1043. exit(0);
  1044. }
  1045. EOF
  1046. if { (eval echo configure:1171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1047. then
  1048. ac_cv_sizeof_char=`cat conftestval`
  1049. else
  1050. echo "configure: failed program was:" >&5
  1051. cat conftest.$ac_ext >&5
  1052. rm -fr conftest*
  1053. ac_cv_sizeof_char=0
  1054. fi
  1055. rm -fr conftest*
  1056. fi
  1057. fi
  1058. echo "$ac_t""$ac_cv_sizeof_char" 1>&6
  1059. cat >> confdefs.h <<EOF
  1060. #define SIZEOF_CHAR $ac_cv_sizeof_char
  1061. EOF
  1062. CMAKE_SIZEOF_CHAR=$ac_cv_sizeof_char
  1063. echo $ac_n "checking size of short""... $ac_c" 1>&6
  1064. echo "configure:1193: checking size of short" >&5
  1065. if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  1066. echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068. if test "$cross_compiling" = yes; then
  1069. ac_cv_sizeof_short=2
  1070. else
  1071. cat > conftest.$ac_ext <<EOF
  1072. #line 1201 "configure"
  1073. #include "confdefs.h"
  1074. #include <stdio.h>
  1075. main()
  1076. {
  1077. FILE *f=fopen("conftestval", "w");
  1078. if (!f) exit(1);
  1079. fprintf(f, "%d\n", sizeof(short));
  1080. exit(0);
  1081. }
  1082. EOF
  1083. if { (eval echo configure:1212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1084. then
  1085. ac_cv_sizeof_short=`cat conftestval`
  1086. else
  1087. echo "configure: failed program was:" >&5
  1088. cat conftest.$ac_ext >&5
  1089. rm -fr conftest*
  1090. ac_cv_sizeof_short=0
  1091. fi
  1092. rm -fr conftest*
  1093. fi
  1094. fi
  1095. echo "$ac_t""$ac_cv_sizeof_short" 1>&6
  1096. cat >> confdefs.h <<EOF
  1097. #define SIZEOF_SHORT $ac_cv_sizeof_short
  1098. EOF
  1099. CMAKE_SIZEOF_SHORT=$ac_cv_sizeof_short
  1100. echo $ac_n "checking size of float""... $ac_c" 1>&6
  1101. echo "configure:1234: checking size of float" >&5
  1102. if eval "test \"`echo '$''{'ac_cv_sizeof_float'+set}'`\" = set"; then
  1103. echo $ac_n "(cached) $ac_c" 1>&6
  1104. else
  1105. if test "$cross_compiling" = yes; then
  1106. ac_cv_sizeof_float=4
  1107. else
  1108. cat > conftest.$ac_ext <<EOF
  1109. #line 1242 "configure"
  1110. #include "confdefs.h"
  1111. #include <stdio.h>
  1112. main()
  1113. {
  1114. FILE *f=fopen("conftestval", "w");
  1115. if (!f) exit(1);
  1116. fprintf(f, "%d\n", sizeof(float));
  1117. exit(0);
  1118. }
  1119. EOF
  1120. if { (eval echo configure:1253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1121. then
  1122. ac_cv_sizeof_float=`cat conftestval`
  1123. else
  1124. echo "configure: failed program was:" >&5
  1125. cat conftest.$ac_ext >&5
  1126. rm -fr conftest*
  1127. ac_cv_sizeof_float=0
  1128. fi
  1129. rm -fr conftest*
  1130. fi
  1131. fi
  1132. echo "$ac_t""$ac_cv_sizeof_float" 1>&6
  1133. cat >> confdefs.h <<EOF
  1134. #define SIZEOF_FLOAT $ac_cv_sizeof_float
  1135. EOF
  1136. CMAKE_SIZEOF_FLOAT=$ac_cv_sizeof_float
  1137. echo $ac_n "checking size of double""... $ac_c" 1>&6
  1138. echo "configure:1275: checking size of double" >&5
  1139. if eval "test \"`echo '$''{'ac_cv_sizeof_double'+set}'`\" = set"; then
  1140. echo $ac_n "(cached) $ac_c" 1>&6
  1141. else
  1142. if test "$cross_compiling" = yes; then
  1143. ac_cv_sizeof_double=8
  1144. else
  1145. cat > conftest.$ac_ext <<EOF
  1146. #line 1283 "configure"
  1147. #include "confdefs.h"
  1148. #include <stdio.h>
  1149. main()
  1150. {
  1151. FILE *f=fopen("conftestval", "w");
  1152. if (!f) exit(1);
  1153. fprintf(f, "%d\n", sizeof(double));
  1154. exit(0);
  1155. }
  1156. EOF
  1157. if { (eval echo configure:1294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1158. then
  1159. ac_cv_sizeof_double=`cat conftestval`
  1160. else
  1161. echo "configure: failed program was:" >&5
  1162. cat conftest.$ac_ext >&5
  1163. rm -fr conftest*
  1164. ac_cv_sizeof_double=0
  1165. fi
  1166. rm -fr conftest*
  1167. fi
  1168. fi
  1169. echo "$ac_t""$ac_cv_sizeof_double" 1>&6
  1170. cat >> confdefs.h <<EOF
  1171. #define SIZEOF_DOUBLE $ac_cv_sizeof_double
  1172. EOF
  1173. CMAKE_SIZEOF_DOUBLE=$ac_cv_sizeof_double
  1174. # check for X11 support
  1175. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1176. echo "configure:1318: checking how to run the C preprocessor" >&5
  1177. # On Suns, sometimes $CPP names a directory.
  1178. if test -n "$CPP" && test -d "$CPP"; then
  1179. CPP=
  1180. fi
  1181. if test -z "$CPP"; then
  1182. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1183. echo $ac_n "(cached) $ac_c" 1>&6
  1184. else
  1185. # This must be in double quotes, not single quotes, because CPP may get
  1186. # substituted into the Makefile and "${CC-cc}" will confuse make.
  1187. CPP="${CC-cc} -E"
  1188. # On the NeXT, cc -E runs the code through the compiler's parser,
  1189. # not just through cpp.
  1190. cat > conftest.$ac_ext <<EOF
  1191. #line 1333 "configure"
  1192. #include "confdefs.h"
  1193. #include <assert.h>
  1194. Syntax Error
  1195. EOF
  1196. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1197. { (eval echo configure:1339: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1198. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1199. if test -z "$ac_err"; then
  1200. :
  1201. else
  1202. echo "$ac_err" >&5
  1203. echo "configure: failed program was:" >&5
  1204. cat conftest.$ac_ext >&5
  1205. rm -rf conftest*
  1206. CPP="${CC-cc} -E -traditional-cpp"
  1207. cat > conftest.$ac_ext <<EOF
  1208. #line 1350 "configure"
  1209. #include "confdefs.h"
  1210. #include <assert.h>
  1211. Syntax Error
  1212. EOF
  1213. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1214. { (eval echo configure:1356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1215. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1216. if test -z "$ac_err"; then
  1217. :
  1218. else
  1219. echo "$ac_err" >&5
  1220. echo "configure: failed program was:" >&5
  1221. cat conftest.$ac_ext >&5
  1222. rm -rf conftest*
  1223. CPP="${CC-cc} -nologo -E"
  1224. cat > conftest.$ac_ext <<EOF
  1225. #line 1367 "configure"
  1226. #include "confdefs.h"
  1227. #include <assert.h>
  1228. Syntax Error
  1229. EOF
  1230. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1231. { (eval echo configure:1373: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1232. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1233. if test -z "$ac_err"; then
  1234. :
  1235. else
  1236. echo "$ac_err" >&5
  1237. echo "configure: failed program was:" >&5
  1238. cat conftest.$ac_ext >&5
  1239. rm -rf conftest*
  1240. CPP=/lib/cpp
  1241. fi
  1242. rm -f conftest*
  1243. fi
  1244. rm -f conftest*
  1245. fi
  1246. rm -f conftest*
  1247. ac_cv_prog_CPP="$CPP"
  1248. fi
  1249. CPP="$ac_cv_prog_CPP"
  1250. else
  1251. ac_cv_prog_CPP="$CPP"
  1252. fi
  1253. echo "$ac_t""$CPP" 1>&6
  1254. # If we find X, set shell vars x_includes and x_libraries to the
  1255. # paths, otherwise set no_x=yes.
  1256. # Uses ac_ vars as temps to allow command line to override cache and checks.
  1257. # --without-x overrides everything else, but does not touch the cache.
  1258. echo $ac_n "checking for X""... $ac_c" 1>&6
  1259. echo "configure:1402: checking for X" >&5
  1260. # Check whether --with-x or --without-x was given.
  1261. if test "${with_x+set}" = set; then
  1262. withval="$with_x"
  1263. :
  1264. fi
  1265. # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
  1266. if test "x$with_x" = xno; then
  1267. # The user explicitly disabled X.
  1268. have_x=disabled
  1269. else
  1270. if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
  1271. # Both variables are already set.
  1272. have_x=yes
  1273. else
  1274. if eval "test \"`echo '$''{'ac_cv_have_x'+set}'`\" = set"; then
  1275. echo $ac_n "(cached) $ac_c" 1>&6
  1276. else
  1277. # One or both of the vars are not set, and there is no cached value.
  1278. ac_x_includes=NO ac_x_libraries=NO
  1279. rm -fr conftestdir
  1280. if mkdir conftestdir; then
  1281. cd conftestdir
  1282. # Make sure to not put "make" in the Imakefile rules, since we grep it out.
  1283. cat > Imakefile <<'EOF'
  1284. acfindx:
  1285. @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
  1286. EOF
  1287. if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
  1288. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  1289. eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
  1290. # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
  1291. for ac_extension in a so sl; do
  1292. if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
  1293. test -f $ac_im_libdir/libX11.$ac_extension; then
  1294. ac_im_usrlibdir=$ac_im_libdir; break
  1295. fi
  1296. done
  1297. # Screen out bogus values from the imake configuration. They are
  1298. # bogus both because they are the default anyway, and because
  1299. # using them would break gcc on systems where it needs fixed includes.
  1300. case "$ac_im_incroot" in
  1301. /usr/include) ;;
  1302. *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
  1303. esac
  1304. case "$ac_im_usrlibdir" in
  1305. /usr/lib | /lib) ;;
  1306. *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
  1307. esac
  1308. fi
  1309. cd ..
  1310. rm -fr conftestdir
  1311. fi
  1312. if test "$ac_x_includes" = NO; then
  1313. # Guess where to find include files, by looking for this one X11 .h file.
  1314. test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
  1315. # First, try using that file with no special directory specified.
  1316. cat > conftest.$ac_ext <<EOF
  1317. #line 1464 "configure"
  1318. #include "confdefs.h"
  1319. #include <$x_direct_test_include>
  1320. EOF
  1321. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1322. { (eval echo configure:1469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1323. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1324. if test -z "$ac_err"; then
  1325. rm -rf conftest*
  1326. # We can compile using X headers with no special include directory.
  1327. ac_x_includes=
  1328. else
  1329. echo "$ac_err" >&5
  1330. echo "configure: failed program was:" >&5
  1331. cat conftest.$ac_ext >&5
  1332. rm -rf conftest*
  1333. # Look for the header file in a standard set of common directories.
  1334. # Check X11 before X11Rn because it is often a symlink to the current release.
  1335. for ac_dir in \
  1336. /usr/X11/include \
  1337. /usr/X11R6/include \
  1338. /usr/X11R5/include \
  1339. /usr/X11R4/include \
  1340. \
  1341. /usr/include/X11 \
  1342. /usr/include/X11R6 \
  1343. /usr/include/X11R5 \
  1344. /usr/include/X11R4 \
  1345. \
  1346. /usr/local/X11/include \
  1347. /usr/local/X11R6/include \
  1348. /usr/local/X11R5/include \
  1349. /usr/local/X11R4/include \
  1350. \
  1351. /usr/local/include/X11 \
  1352. /usr/local/include/X11R6 \
  1353. /usr/local/include/X11R5 \
  1354. /usr/local/include/X11R4 \
  1355. \
  1356. /usr/X386/include \
  1357. /usr/x386/include \
  1358. /usr/XFree86/include/X11 \
  1359. \
  1360. /usr/include \
  1361. /usr/local/include \
  1362. /usr/unsupported/include \
  1363. /usr/athena/include \
  1364. /usr/local/x11r5/include \
  1365. /usr/lpp/Xamples/include \
  1366. \
  1367. /usr/openwin/include \
  1368. /usr/openwin/share/include \
  1369. ; \
  1370. do
  1371. if test -r "$ac_dir/$x_direct_test_include"; then
  1372. ac_x_includes=$ac_dir
  1373. break
  1374. fi
  1375. done
  1376. fi
  1377. rm -f conftest*
  1378. fi # $ac_x_includes = NO
  1379. if test "$ac_x_libraries" = NO; then
  1380. # Check for the libraries.
  1381. test -z "$x_direct_test_library" && x_direct_test_library=Xt
  1382. test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
  1383. # See if we find them without any special options.
  1384. # Don't add to $LIBS permanently.
  1385. ac_save_LIBS="$LIBS"
  1386. LIBS="-l$x_direct_test_library $LIBS"
  1387. cat > conftest.$ac_ext <<EOF
  1388. #line 1538 "configure"
  1389. #include "confdefs.h"
  1390. int main() {
  1391. ${x_direct_test_function}()
  1392. ; return 0; }
  1393. EOF
  1394. if { (eval echo configure:1545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1395. rm -rf conftest*
  1396. LIBS="$ac_save_LIBS"
  1397. # We can link X programs with no special library path.
  1398. ac_x_libraries=
  1399. else
  1400. echo "configure: failed program was:" >&5
  1401. cat conftest.$ac_ext >&5
  1402. rm -rf conftest*
  1403. LIBS="$ac_save_LIBS"
  1404. # First see if replacing the include by lib works.
  1405. # Check X11 before X11Rn because it is often a symlink to the current release.
  1406. for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
  1407. /usr/X11/lib \
  1408. /usr/X11R6/lib \
  1409. /usr/X11R5/lib \
  1410. /usr/X11R4/lib \
  1411. \
  1412. /usr/lib/X11 \
  1413. /usr/lib/X11R6 \
  1414. /usr/lib/X11R5 \
  1415. /usr/lib/X11R4 \
  1416. \
  1417. /usr/local/X11/lib \
  1418. /usr/local/X11R6/lib \
  1419. /usr/local/X11R5/lib \
  1420. /usr/local/X11R4/lib \
  1421. \
  1422. /usr/local/lib/X11 \
  1423. /usr/local/lib/X11R6 \
  1424. /usr/local/lib/X11R5 \
  1425. /usr/local/lib/X11R4 \
  1426. \
  1427. /usr/X386/lib \
  1428. /usr/x386/lib \
  1429. /usr/XFree86/lib/X11 \
  1430. \
  1431. /usr/lib \
  1432. /usr/local/lib \
  1433. /usr/unsupported/lib \
  1434. /usr/athena/lib \
  1435. /usr/local/x11r5/lib \
  1436. /usr/lpp/Xamples/lib \
  1437. /lib/usr/lib/X11 \
  1438. \
  1439. /usr/openwin/lib \
  1440. /usr/openwin/share/lib \
  1441. ; \
  1442. do
  1443. for ac_extension in a so sl; do
  1444. if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
  1445. ac_x_libraries=$ac_dir
  1446. break 2
  1447. fi
  1448. done
  1449. done
  1450. fi
  1451. rm -f conftest*
  1452. fi # $ac_x_libraries = NO
  1453. if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
  1454. # Didn't find X anywhere. Cache the known absence of X.
  1455. ac_cv_have_x="have_x=no"
  1456. else
  1457. # Record where we found X for the cache.
  1458. ac_cv_have_x="have_x=yes \
  1459. ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
  1460. fi
  1461. fi
  1462. fi
  1463. eval "$ac_cv_have_x"
  1464. fi # $with_x != no
  1465. if test "$have_x" != yes; then
  1466. echo "$ac_t""$have_x" 1>&6
  1467. no_x=yes
  1468. else
  1469. # If each of the values was on the command line, it overrides each guess.
  1470. test "x$x_includes" = xNONE && x_includes=$ac_x_includes
  1471. test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
  1472. # Update the cache value to reflect the command line values.
  1473. ac_cv_have_x="have_x=yes \
  1474. ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
  1475. echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
  1476. fi
  1477. if test "$no_x" = yes; then
  1478. # Not all programs may use this symbol, but it does not hurt to define it.
  1479. cat >> confdefs.h <<\EOF
  1480. #define X_DISPLAY_MISSING 1
  1481. EOF
  1482. X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
  1483. else
  1484. if test -n "$x_includes"; then
  1485. X_CFLAGS="$X_CFLAGS -I$x_includes"
  1486. fi
  1487. # It would also be nice to do this for all -L options, not just this one.
  1488. if test -n "$x_libraries"; then
  1489. X_LIBS="$X_LIBS -L$x_libraries"
  1490. # For Solaris; some versions of Sun CC require a space after -R and
  1491. # others require no space. Words are not sufficient . . . .
  1492. case "`(uname -sr) 2>/dev/null`" in
  1493. "SunOS 5"*)
  1494. echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
  1495. echo "configure:1651: checking whether -R must be followed by a space" >&5
  1496. ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
  1497. cat > conftest.$ac_ext <<EOF
  1498. #line 1654 "configure"
  1499. #include "confdefs.h"
  1500. int main() {
  1501. ; return 0; }
  1502. EOF
  1503. if { (eval echo configure:1661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1504. rm -rf conftest*
  1505. ac_R_nospace=yes
  1506. else
  1507. echo "configure: failed program was:" >&5
  1508. cat conftest.$ac_ext >&5
  1509. rm -rf conftest*
  1510. ac_R_nospace=no
  1511. fi
  1512. rm -f conftest*
  1513. if test $ac_R_nospace = yes; then
  1514. echo "$ac_t""no" 1>&6
  1515. X_LIBS="$X_LIBS -R$x_libraries"
  1516. else
  1517. LIBS="$ac_xsave_LIBS -R $x_libraries"
  1518. cat > conftest.$ac_ext <<EOF
  1519. #line 1677 "configure"
  1520. #include "confdefs.h"
  1521. int main() {
  1522. ; return 0; }
  1523. EOF
  1524. if { (eval echo configure:1684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1525. rm -rf conftest*
  1526. ac_R_space=yes
  1527. else
  1528. echo "configure: failed program was:" >&5
  1529. cat conftest.$ac_ext >&5
  1530. rm -rf conftest*
  1531. ac_R_space=no
  1532. fi
  1533. rm -f conftest*
  1534. if test $ac_R_space = yes; then
  1535. echo "$ac_t""yes" 1>&6
  1536. X_LIBS="$X_LIBS -R $x_libraries"
  1537. else
  1538. echo "$ac_t""neither works" 1>&6
  1539. fi
  1540. fi
  1541. LIBS="$ac_xsave_LIBS"
  1542. esac
  1543. fi
  1544. # Check for system-dependent libraries X programs must link with.
  1545. # Do this before checking for the system-independent R6 libraries
  1546. # (-lICE), since we may need -lsocket or whatever for X linking.
  1547. if test "$ISC" = yes; then
  1548. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
  1549. else
  1550. # [email protected] says this is needed for Ultrix, if the X
  1551. # libraries were built with DECnet support. And [email protected] says
  1552. # the Alpha needs dnet_stub (dnet does not exist).
  1553. echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
  1554. echo "configure:1716: checking for dnet_ntoa in -ldnet" >&5
  1555. ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1556. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1557. echo $ac_n "(cached) $ac_c" 1>&6
  1558. else
  1559. ac_save_LIBS="$LIBS"
  1560. LIBS="-ldnet $LIBS"
  1561. cat > conftest.$ac_ext <<EOF
  1562. #line 1724 "configure"
  1563. #include "confdefs.h"
  1564. /* Override any gcc2 internal prototype to avoid an error. */
  1565. /* We use char because int might match the return type of a gcc2
  1566. builtin and then its argument prototype would still apply. */
  1567. char dnet_ntoa();
  1568. int main() {
  1569. dnet_ntoa()
  1570. ; return 0; }
  1571. EOF
  1572. if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1573. rm -rf conftest*
  1574. eval "ac_cv_lib_$ac_lib_var=yes"
  1575. else
  1576. echo "configure: failed program was:" >&5
  1577. cat conftest.$ac_ext >&5
  1578. rm -rf conftest*
  1579. eval "ac_cv_lib_$ac_lib_var=no"
  1580. fi
  1581. rm -f conftest*
  1582. LIBS="$ac_save_LIBS"
  1583. fi
  1584. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1585. echo "$ac_t""yes" 1>&6
  1586. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
  1587. else
  1588. echo "$ac_t""no" 1>&6
  1589. fi
  1590. if test $ac_cv_lib_dnet_dnet_ntoa = no; then
  1591. echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
  1592. echo "configure:1757: checking for dnet_ntoa in -ldnet_stub" >&5
  1593. ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
  1594. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1595. echo $ac_n "(cached) $ac_c" 1>&6
  1596. else
  1597. ac_save_LIBS="$LIBS"
  1598. LIBS="-ldnet_stub $LIBS"
  1599. cat > conftest.$ac_ext <<EOF
  1600. #line 1765 "configure"
  1601. #include "confdefs.h"
  1602. /* Override any gcc2 internal prototype to avoid an error. */
  1603. /* We use char because int might match the return type of a gcc2
  1604. builtin and then its argument prototype would still apply. */
  1605. char dnet_ntoa();
  1606. int main() {
  1607. dnet_ntoa()
  1608. ; return 0; }
  1609. EOF
  1610. if { (eval echo configure:1776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1611. rm -rf conftest*
  1612. eval "ac_cv_lib_$ac_lib_var=yes"
  1613. else
  1614. echo "configure: failed program was:" >&5
  1615. cat conftest.$ac_ext >&5
  1616. rm -rf conftest*
  1617. eval "ac_cv_lib_$ac_lib_var=no"
  1618. fi
  1619. rm -f conftest*
  1620. LIBS="$ac_save_LIBS"
  1621. fi
  1622. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1623. echo "$ac_t""yes" 1>&6
  1624. X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
  1625. else
  1626. echo "$ac_t""no" 1>&6
  1627. fi
  1628. fi
  1629. # [email protected] says -lnsl (and -lsocket) are needed for his 386/AT,
  1630. # to get the SysV transport functions.
  1631. # [email protected] says the Pyramis MIS-ES running DC/OSx (SVR4)
  1632. # needs -lnsl.
  1633. # The nsl library prevents programs from opening the X display
  1634. # on Irix 5.2, according to [email protected].
  1635. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
  1636. echo "configure:1805: checking for gethostbyname" >&5
  1637. if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then
  1638. echo $ac_n "(cached) $ac_c" 1>&6
  1639. else
  1640. cat > conftest.$ac_ext <<EOF
  1641. #line 1810 "configure"
  1642. #include "confdefs.h"
  1643. /* System header to define __stub macros and hopefully few prototypes,
  1644. which can conflict with char gethostbyname(); below. */
  1645. #include <assert.h>
  1646. /* Override any gcc2 internal prototype to avoid an error. */
  1647. /* We use char because int might match the return type of a gcc2
  1648. builtin and then its argument prototype would still apply. */
  1649. char gethostbyname();
  1650. int main() {
  1651. /* The GNU C library defines this for functions which it implements
  1652. to always fail with ENOSYS. Some functions are actually named
  1653. something starting with __ and the normal name is an alias. */
  1654. #if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
  1655. choke me
  1656. #else
  1657. gethostbyname();
  1658. #endif
  1659. ; return 0; }
  1660. EOF
  1661. if { (eval echo configure:1833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1662. rm -rf conftest*
  1663. eval "ac_cv_func_gethostbyname=yes"
  1664. else
  1665. echo "configure: failed program was:" >&5
  1666. cat conftest.$ac_ext >&5
  1667. rm -rf conftest*
  1668. eval "ac_cv_func_gethostbyname=no"
  1669. fi
  1670. rm -f conftest*
  1671. fi
  1672. if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
  1673. echo "$ac_t""yes" 1>&6
  1674. :
  1675. else
  1676. echo "$ac_t""no" 1>&6
  1677. fi
  1678. if test $ac_cv_func_gethostbyname = no; then
  1679. echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
  1680. echo "configure:1854: checking for gethostbyname in -lnsl" >&5
  1681. ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
  1682. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1683. echo $ac_n "(cached) $ac_c" 1>&6
  1684. else
  1685. ac_save_LIBS="$LIBS"
  1686. LIBS="-lnsl $LIBS"
  1687. cat > conftest.$ac_ext <<EOF
  1688. #line 1862 "configure"
  1689. #include "confdefs.h"
  1690. /* Override any gcc2 internal prototype to avoid an error. */
  1691. /* We use char because int might match the return type of a gcc2
  1692. builtin and then its argument prototype would still apply. */
  1693. char gethostbyname();
  1694. int main() {
  1695. gethostbyname()
  1696. ; return 0; }
  1697. EOF
  1698. if { (eval echo configure:1873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1699. rm -rf conftest*
  1700. eval "ac_cv_lib_$ac_lib_var=yes"
  1701. else
  1702. echo "configure: failed program was:" >&5
  1703. cat conftest.$ac_ext >&5
  1704. rm -rf conftest*
  1705. eval "ac_cv_lib_$ac_lib_var=no"
  1706. fi
  1707. rm -f conftest*
  1708. LIBS="$ac_save_LIBS"
  1709. fi
  1710. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1711. echo "$ac_t""yes" 1>&6
  1712. X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
  1713. else
  1714. echo "$ac_t""no" 1>&6
  1715. fi
  1716. fi
  1717. # [email protected] says without -lsocket,
  1718. # socket/setsockopt and other routines are undefined under SCO ODT
  1719. # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
  1720. # on later versions), says [email protected]: it contains
  1721. # gethostby* variants that don't use the nameserver (or something).
  1722. # -lsocket must be given before -lnsl if both are needed.
  1723. # We assume that if connect needs -lnsl, so does gethostbyname.
  1724. echo $ac_n "checking for connect""... $ac_c" 1>&6
  1725. echo "configure:1903: checking for connect" >&5
  1726. if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then
  1727. echo $ac_n "(cached) $ac_c" 1>&6
  1728. else
  1729. cat > conftest.$ac_ext <<EOF
  1730. #line 1908 "configure"
  1731. #include "confdefs.h"
  1732. /* System header to define __stub macros and hopefully few prototypes,
  1733. which can conflict with char connect(); below. */
  1734. #include <assert.h>
  1735. /* Override any gcc2 internal prototype to avoid an error. */
  1736. /* We use char because int might match the return type of a gcc2
  1737. builtin and then its argument prototype would still apply. */
  1738. char connect();
  1739. int main() {
  1740. /* The GNU C library defines this for functions which it implements
  1741. to always fail with ENOSYS. Some functions are actually named
  1742. something starting with __ and the normal name is an alias. */
  1743. #if defined (__stub_connect) || defined (__stub___connect)
  1744. choke me
  1745. #else
  1746. connect();
  1747. #endif
  1748. ; return 0; }
  1749. EOF
  1750. if { (eval echo configure:1931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1751. rm -rf conftest*
  1752. eval "ac_cv_func_connect=yes"
  1753. else
  1754. echo "configure: failed program was:" >&5
  1755. cat conftest.$ac_ext >&5
  1756. rm -rf conftest*
  1757. eval "ac_cv_func_connect=no"
  1758. fi
  1759. rm -f conftest*
  1760. fi
  1761. if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
  1762. echo "$ac_t""yes" 1>&6
  1763. :
  1764. else
  1765. echo "$ac_t""no" 1>&6
  1766. fi
  1767. if test $ac_cv_func_connect = no; then
  1768. echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6
  1769. echo "configure:1952: checking for connect in -lsocket" >&5
  1770. ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
  1771. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1772. echo $ac_n "(cached) $ac_c" 1>&6
  1773. else
  1774. ac_save_LIBS="$LIBS"
  1775. LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
  1776. cat > conftest.$ac_ext <<EOF
  1777. #line 1960 "configure"
  1778. #include "confdefs.h"
  1779. /* Override any gcc2 internal prototype to avoid an error. */
  1780. /* We use char because int might match the return type of a gcc2
  1781. builtin and then its argument prototype would still apply. */
  1782. char connect();
  1783. int main() {
  1784. connect()
  1785. ; return 0; }
  1786. EOF
  1787. if { (eval echo configure:1971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1788. rm -rf conftest*
  1789. eval "ac_cv_lib_$ac_lib_var=yes"
  1790. else
  1791. echo "configure: failed program was:" >&5
  1792. cat conftest.$ac_ext >&5
  1793. rm -rf conftest*
  1794. eval "ac_cv_lib_$ac_lib_var=no"
  1795. fi
  1796. rm -f conftest*
  1797. LIBS="$ac_save_LIBS"
  1798. fi
  1799. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1800. echo "$ac_t""yes" 1>&6
  1801. X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
  1802. else
  1803. echo "$ac_t""no" 1>&6
  1804. fi
  1805. fi
  1806. # [email protected] says -lposix is necessary on A/UX.
  1807. echo $ac_n "checking for remove""... $ac_c" 1>&6
  1808. echo "configure:1995: checking for remove" >&5
  1809. if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then
  1810. echo $ac_n "(cached) $ac_c" 1>&6
  1811. else
  1812. cat > conftest.$ac_ext <<EOF
  1813. #line 2000 "configure"
  1814. #include "confdefs.h"
  1815. /* System header to define __stub macros and hopefully few prototypes,
  1816. which can conflict with char remove(); below. */
  1817. #include <assert.h>
  1818. /* Override any gcc2 internal prototype to avoid an error. */
  1819. /* We use char because int might match the return type of a gcc2
  1820. builtin and then its argument prototype would still apply. */
  1821. char remove();
  1822. int main() {
  1823. /* The GNU C library defines this for functions which it implements
  1824. to always fail with ENOSYS. Some functions are actually named
  1825. something starting with __ and the normal name is an alias. */
  1826. #if defined (__stub_remove) || defined (__stub___remove)
  1827. choke me
  1828. #else
  1829. remove();
  1830. #endif
  1831. ; return 0; }
  1832. EOF
  1833. if { (eval echo configure:2023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1834. rm -rf conftest*
  1835. eval "ac_cv_func_remove=yes"
  1836. else
  1837. echo "configure: failed program was:" >&5
  1838. cat conftest.$ac_ext >&5
  1839. rm -rf conftest*
  1840. eval "ac_cv_func_remove=no"
  1841. fi
  1842. rm -f conftest*
  1843. fi
  1844. if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
  1845. echo "$ac_t""yes" 1>&6
  1846. :
  1847. else
  1848. echo "$ac_t""no" 1>&6
  1849. fi
  1850. if test $ac_cv_func_remove = no; then
  1851. echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
  1852. echo "configure:2044: checking for remove in -lposix" >&5
  1853. ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
  1854. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1855. echo $ac_n "(cached) $ac_c" 1>&6
  1856. else
  1857. ac_save_LIBS="$LIBS"
  1858. LIBS="-lposix $LIBS"
  1859. cat > conftest.$ac_ext <<EOF
  1860. #line 2052 "configure"
  1861. #include "confdefs.h"
  1862. /* Override any gcc2 internal prototype to avoid an error. */
  1863. /* We use char because int might match the return type of a gcc2
  1864. builtin and then its argument prototype would still apply. */
  1865. char remove();
  1866. int main() {
  1867. remove()
  1868. ; return 0; }
  1869. EOF
  1870. if { (eval echo configure:2063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1871. rm -rf conftest*
  1872. eval "ac_cv_lib_$ac_lib_var=yes"
  1873. else
  1874. echo "configure: failed program was:" >&5
  1875. cat conftest.$ac_ext >&5
  1876. rm -rf conftest*
  1877. eval "ac_cv_lib_$ac_lib_var=no"
  1878. fi
  1879. rm -f conftest*
  1880. LIBS="$ac_save_LIBS"
  1881. fi
  1882. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1883. echo "$ac_t""yes" 1>&6
  1884. X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
  1885. else
  1886. echo "$ac_t""no" 1>&6
  1887. fi
  1888. fi
  1889. # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
  1890. echo $ac_n "checking for shmat""... $ac_c" 1>&6
  1891. echo "configure:2087: checking for shmat" >&5
  1892. if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then
  1893. echo $ac_n "(cached) $ac_c" 1>&6
  1894. else
  1895. cat > conftest.$ac_ext <<EOF
  1896. #line 2092 "configure"
  1897. #include "confdefs.h"
  1898. /* System header to define __stub macros and hopefully few prototypes,
  1899. which can conflict with char shmat(); below. */
  1900. #include <assert.h>
  1901. /* Override any gcc2 internal prototype to avoid an error. */
  1902. /* We use char because int might match the return type of a gcc2
  1903. builtin and then its argument prototype would still apply. */
  1904. char shmat();
  1905. int main() {
  1906. /* The GNU C library defines this for functions which it implements
  1907. to always fail with ENOSYS. Some functions are actually named
  1908. something starting with __ and the normal name is an alias. */
  1909. #if defined (__stub_shmat) || defined (__stub___shmat)
  1910. choke me
  1911. #else
  1912. shmat();
  1913. #endif
  1914. ; return 0; }
  1915. EOF
  1916. if { (eval echo configure:2115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1917. rm -rf conftest*
  1918. eval "ac_cv_func_shmat=yes"
  1919. else
  1920. echo "configure: failed program was:" >&5
  1921. cat conftest.$ac_ext >&5
  1922. rm -rf conftest*
  1923. eval "ac_cv_func_shmat=no"
  1924. fi
  1925. rm -f conftest*
  1926. fi
  1927. if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
  1928. echo "$ac_t""yes" 1>&6
  1929. :
  1930. else
  1931. echo "$ac_t""no" 1>&6
  1932. fi
  1933. if test $ac_cv_func_shmat = no; then
  1934. echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
  1935. echo "configure:2136: checking for shmat in -lipc" >&5
  1936. ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
  1937. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1938. echo $ac_n "(cached) $ac_c" 1>&6
  1939. else
  1940. ac_save_LIBS="$LIBS"
  1941. LIBS="-lipc $LIBS"
  1942. cat > conftest.$ac_ext <<EOF
  1943. #line 2144 "configure"
  1944. #include "confdefs.h"
  1945. /* Override any gcc2 internal prototype to avoid an error. */
  1946. /* We use char because int might match the return type of a gcc2
  1947. builtin and then its argument prototype would still apply. */
  1948. char shmat();
  1949. int main() {
  1950. shmat()
  1951. ; return 0; }
  1952. EOF
  1953. if { (eval echo configure:2155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1954. rm -rf conftest*
  1955. eval "ac_cv_lib_$ac_lib_var=yes"
  1956. else
  1957. echo "configure: failed program was:" >&5
  1958. cat conftest.$ac_ext >&5
  1959. rm -rf conftest*
  1960. eval "ac_cv_lib_$ac_lib_var=no"
  1961. fi
  1962. rm -f conftest*
  1963. LIBS="$ac_save_LIBS"
  1964. fi
  1965. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1966. echo "$ac_t""yes" 1>&6
  1967. X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
  1968. else
  1969. echo "$ac_t""no" 1>&6
  1970. fi
  1971. fi
  1972. fi
  1973. # Check for libraries that X11R6 Xt/Xaw programs need.
  1974. ac_save_LDFLAGS="$LDFLAGS"
  1975. test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
  1976. # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
  1977. # check for ICE first), but we must link in the order -lSM -lICE or
  1978. # we get undefined symbols. So assume we have SM if we have ICE.
  1979. # These have to be linked with before -lX11, unlike the other
  1980. # libraries we check for below, so use a different variable.
  1981. # [email protected], [email protected].
  1982. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
  1983. echo "configure:2188: checking for IceConnectionNumber in -lICE" >&5
  1984. ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
  1985. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1986. echo $ac_n "(cached) $ac_c" 1>&6
  1987. else
  1988. ac_save_LIBS="$LIBS"
  1989. LIBS="-lICE $X_EXTRA_LIBS $LIBS"
  1990. cat > conftest.$ac_ext <<EOF
  1991. #line 2196 "configure"
  1992. #include "confdefs.h"
  1993. /* Override any gcc2 internal prototype to avoid an error. */
  1994. /* We use char because int might match the return type of a gcc2
  1995. builtin and then its argument prototype would still apply. */
  1996. char IceConnectionNumber();
  1997. int main() {
  1998. IceConnectionNumber()
  1999. ; return 0; }
  2000. EOF
  2001. if { (eval echo configure:2207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2002. rm -rf conftest*
  2003. eval "ac_cv_lib_$ac_lib_var=yes"
  2004. else
  2005. echo "configure: failed program was:" >&5
  2006. cat conftest.$ac_ext >&5
  2007. rm -rf conftest*
  2008. eval "ac_cv_lib_$ac_lib_var=no"
  2009. fi
  2010. rm -f conftest*
  2011. LIBS="$ac_save_LIBS"
  2012. fi
  2013. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2014. echo "$ac_t""yes" 1>&6
  2015. X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
  2016. else
  2017. echo "$ac_t""no" 1>&6
  2018. fi
  2019. LDFLAGS="$ac_save_LDFLAGS"
  2020. fi
  2021. CMAKE_HAS_X=0
  2022. if test "$no_x"a = a; then
  2023. CMAKE_HAS_X=1
  2024. fi
  2025. # get byte swapping info
  2026. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  2027. echo "configure:2239: checking whether byte ordering is bigendian" >&5
  2028. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  2029. echo $ac_n "(cached) $ac_c" 1>&6
  2030. else
  2031. ac_cv_c_bigendian=unknown
  2032. # See if sys/param.h defines the BYTE_ORDER macro.
  2033. cat > conftest.$ac_ext <<EOF
  2034. #line 2246 "configure"
  2035. #include "confdefs.h"
  2036. #include <sys/types.h>
  2037. #include <sys/param.h>
  2038. int main() {
  2039. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  2040. bogus endian macros
  2041. #endif
  2042. ; return 0; }
  2043. EOF
  2044. if { (eval echo configure:2257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2045. rm -rf conftest*
  2046. # It does; now see whether it defined to BIG_ENDIAN or not.
  2047. cat > conftest.$ac_ext <<EOF
  2048. #line 2261 "configure"
  2049. #include "confdefs.h"
  2050. #include <sys/types.h>
  2051. #include <sys/param.h>
  2052. int main() {
  2053. #if BYTE_ORDER != BIG_ENDIAN
  2054. not big endian
  2055. #endif
  2056. ; return 0; }
  2057. EOF
  2058. if { (eval echo configure:2272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  2059. rm -rf conftest*
  2060. ac_cv_c_bigendian=yes
  2061. else
  2062. echo "configure: failed program was:" >&5
  2063. cat conftest.$ac_ext >&5
  2064. rm -rf conftest*
  2065. ac_cv_c_bigendian=no
  2066. fi
  2067. rm -f conftest*
  2068. else
  2069. echo "configure: failed program was:" >&5
  2070. cat conftest.$ac_ext >&5
  2071. fi
  2072. rm -f conftest*
  2073. if test $ac_cv_c_bigendian = unknown; then
  2074. if test "$cross_compiling" = yes; then
  2075. { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  2076. else
  2077. cat > conftest.$ac_ext <<EOF
  2078. #line 2292 "configure"
  2079. #include "confdefs.h"
  2080. main () {
  2081. /* Are we little or big endian? From Harbison&Steele. */
  2082. union
  2083. {
  2084. long l;
  2085. char c[sizeof (long)];
  2086. } u;
  2087. u.l = 1;
  2088. exit (u.c[sizeof (long) - 1] == 1);
  2089. }
  2090. EOF
  2091. if { (eval echo configure:2305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  2092. then
  2093. ac_cv_c_bigendian=no
  2094. else
  2095. echo "configure: failed program was:" >&5
  2096. cat conftest.$ac_ext >&5
  2097. rm -fr conftest*
  2098. ac_cv_c_bigendian=yes
  2099. fi
  2100. rm -fr conftest*
  2101. fi
  2102. fi
  2103. fi
  2104. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  2105. if test $ac_cv_c_bigendian = yes; then
  2106. cat >> confdefs.h <<\EOF
  2107. #define WORDS_BIGENDIAN 1
  2108. EOF
  2109. fi
  2110. if test $ac_cv_c_bigendian = yes; then
  2111. CMAKE_WORDS_BIGENDIAN=1
  2112. fi
  2113. # some stuff Tcl uses
  2114. #
  2115. ac_safe=`echo "limits.h" | sed 'y%./+-%__p_%'`
  2116. echo $ac_n "checking for limits.h""... $ac_c" 1>&6
  2117. echo "configure:2338: checking for limits.h" >&5
  2118. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2119. echo $ac_n "(cached) $ac_c" 1>&6
  2120. else
  2121. cat > conftest.$ac_ext <<EOF
  2122. #line 2343 "configure"
  2123. #include "confdefs.h"
  2124. #include <limits.h>
  2125. EOF
  2126. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2127. { (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2128. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2129. if test -z "$ac_err"; then
  2130. rm -rf conftest*
  2131. eval "ac_cv_header_$ac_safe=yes"
  2132. else
  2133. echo "$ac_err" >&5
  2134. echo "configure: failed program was:" >&5
  2135. cat conftest.$ac_ext >&5
  2136. rm -rf conftest*
  2137. eval "ac_cv_header_$ac_safe=no"
  2138. fi
  2139. rm -f conftest*
  2140. fi
  2141. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2142. echo "$ac_t""yes" 1>&6
  2143. HAVE_LIMITS_H=-DHAVE_LIMITS_H
  2144. else
  2145. echo "$ac_t""no" 1>&6
  2146. HAVE_LIMITS_H=""
  2147. fi
  2148. for ac_hdr in unistd.h
  2149. do
  2150. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2151. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2152. echo "configure:2375: checking for $ac_hdr" >&5
  2153. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2154. echo $ac_n "(cached) $ac_c" 1>&6
  2155. else
  2156. cat > conftest.$ac_ext <<EOF
  2157. #line 2380 "configure"
  2158. #include "confdefs.h"
  2159. #include <$ac_hdr>
  2160. EOF
  2161. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2162. { (eval echo configure:2385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2163. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2164. if test -z "$ac_err"; then
  2165. rm -rf conftest*
  2166. eval "ac_cv_header_$ac_safe=yes"
  2167. else
  2168. echo "$ac_err" >&5
  2169. echo "configure: failed program was:" >&5
  2170. cat conftest.$ac_ext >&5
  2171. rm -rf conftest*
  2172. eval "ac_cv_header_$ac_safe=no"
  2173. fi
  2174. rm -f conftest*
  2175. fi
  2176. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2177. echo "$ac_t""yes" 1>&6
  2178. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2179. cat >> confdefs.h <<EOF
  2180. #define $ac_tr_hdr 1
  2181. EOF
  2182. HAVE_UNISTD_H=-DHAVE_UNISTD_H
  2183. else
  2184. echo "$ac_t""no" 1>&6
  2185. HAVE_UNISTD_H=""
  2186. fi
  2187. done
  2188. # Step 1: set the variable "system" to hold the name and version number
  2189. # for the system. This can usually be done via the "uname" command, but
  2190. # there are a few systems, like Next, where this doesn't work.
  2191. echo $ac_n "checking system version (for dynamic loading)""... $ac_c" 1>&6
  2192. echo "configure:2419: checking system version (for dynamic loading)" >&5
  2193. if test -f /usr/lib/NextStep/software_version; then
  2194. system=NEXTSTEP-`awk '/3/,/3/' /usr/lib/NextStep/software_version`
  2195. else
  2196. system=`uname -s`-`uname -r`
  2197. if test "$?" -ne 0 ; then
  2198. echo "$ac_t""unknown (can't find uname command)" 1>&6
  2199. system=unknown
  2200. else
  2201. # Special check for weird MP-RAS system (uname returns weird
  2202. # results, and the version is kept in special file).
  2203. if test -r /etc/.relid -a "X`uname -n`" = "X`uname -s`" ; then
  2204. system=MP-RAS-`awk '{print $3}' /etc/.relid'`
  2205. fi
  2206. echo "$ac_t""$system" 1>&6
  2207. fi
  2208. fi
  2209. #
  2210. # use shared libs
  2211. #
  2212. CMAKE_shared_ok="yes"
  2213. # the following is an excerpt from the tcl7.5b2 configure.in
  2214. #--------------------------------------------------------------------
  2215. # The statements below define a collection of symbols related to
  2216. # dynamic loading and shared libraries:
  2217. #
  2218. # CMAKE_SHLIB_CFLAGS - Flags to pass to cc when compiling the components
  2219. # of a shared library (may request position-independent
  2220. # code, among other things).
  2221. # CMAKE_SHLIB_LD_LIBS - Dependent libraries for the linker to scan when
  2222. # creating shared libraries. This symbol typically
  2223. # goes at the end of the "ld" commands that build
  2224. # shared libraries. The value of the symbol if
  2225. # "${LIBS}" if all of the dependent libraries should
  2226. # be specified when creating a shared library. If
  2227. # dependent libraries should not be specified (as on
  2228. # SunOS 4.x, where they cause the link to fail, or in
  2229. # general if Tcl and Tk aren't themselves shared
  2230. # libraries), then this symbol has an empty string
  2231. # as its value.
  2232. # CMAKE_SHLIB_SUFFIX - Suffix to use for the name of the shared library. An
  2233. # empty string means we don't know how to use shared
  2234. # libraries on this platform.
  2235. # CMAKE_SHLIB_BUILD_FLAGS -
  2236. # Flags to use when building a shared library.
  2237. # CMAKE_SHLIB_LINK_FLAGS -
  2238. # Flags to pass to the compiler when linking object
  2239. # files into an executable application binary such
  2240. # as tclsh.
  2241. # CMAKE_SHLIB_RUNTIME_FLAG -
  2242. # Flag used to specify the runtime directories (e.g. "-R" or
  2243. # "-Wl,-rpath,"). If null, no attempt is make to specify the
  2244. # runtime paths.
  2245. # CMAKE_SHLIB_RUNTIME_SEP -
  2246. # If null, then each path is a separate argument. If not null,
  2247. # then all the directories are joined together, separated by
  2248. # $(CMAKE_SHLIB_RUNTIME_SEP) and appended to
  2249. # $(CMAKE_SHLIB_RUNTIME_FLAG). When not null, this is
  2250. # typically a colon ":".
  2251. #--------------------------------------------------------------------
  2252. # Step 2: check for existence of -ldl library. This is needed because
  2253. # Linux can use either -ldl or -ldld for dynamic loading.
  2254. echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
  2255. echo "configure:2489: checking for dlopen in -ldl" >&5
  2256. ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
  2257. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2258. echo $ac_n "(cached) $ac_c" 1>&6
  2259. else
  2260. ac_save_LIBS="$LIBS"
  2261. LIBS="-ldl $LIBS"
  2262. cat > conftest.$ac_ext <<EOF
  2263. #line 2497 "configure"
  2264. #include "confdefs.h"
  2265. /* Override any gcc2 internal prototype to avoid an error. */
  2266. /* We use char because int might match the return type of a gcc2
  2267. builtin and then its argument prototype would still apply. */
  2268. char dlopen();
  2269. int main() {
  2270. dlopen()
  2271. ; return 0; }
  2272. EOF
  2273. if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2274. rm -rf conftest*
  2275. eval "ac_cv_lib_$ac_lib_var=yes"
  2276. else
  2277. echo "configure: failed program was:" >&5
  2278. cat conftest.$ac_ext >&5
  2279. rm -rf conftest*
  2280. eval "ac_cv_lib_$ac_lib_var=no"
  2281. fi
  2282. rm -f conftest*
  2283. LIBS="$ac_save_LIBS"
  2284. fi
  2285. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2286. echo "$ac_t""yes" 1>&6
  2287. have_dl=yes
  2288. else
  2289. echo "$ac_t""no" 1>&6
  2290. have_dl=no
  2291. fi
  2292. # Step 4: set configuration options based on system name and version.
  2293. fullSrcDir=`cd $srcdir; pwd`
  2294. case $system in
  2295. AIX-*)
  2296. # AIX: can't link shared library extensions unless Tcl and Tk are
  2297. # also shared libraries.
  2298. CMAKE_SHLIB_CFLAGS=""
  2299. CMAKE_SHLIB_LD_LIBS='${LIBS}'
  2300. CMAKE_SHLIB_SUFFIX="..o"
  2301. CMAKE_MODULE_SUFFIX="..o"
  2302. CMAKE_DL_LIBS=""
  2303. echo $ac_n "checking for printf in -lld""... $ac_c" 1>&6
  2304. echo "configure:2544: checking for printf in -lld" >&5
  2305. ac_lib_var=`echo ld'_'printf | sed 'y%./+-%__p_%'`
  2306. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2307. echo $ac_n "(cached) $ac_c" 1>&6
  2308. else
  2309. ac_save_LIBS="$LIBS"
  2310. LIBS="-lld $LIBS"
  2311. cat > conftest.$ac_ext <<EOF
  2312. #line 2552 "configure"
  2313. #include "confdefs.h"
  2314. /* Override any gcc2 internal prototype to avoid an error. */
  2315. /* We use char because int might match the return type of a gcc2
  2316. builtin and then its argument prototype would still apply. */
  2317. char printf();
  2318. int main() {
  2319. printf()
  2320. ; return 0; }
  2321. EOF
  2322. if { (eval echo configure:2563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2323. rm -rf conftest*
  2324. eval "ac_cv_lib_$ac_lib_var=yes"
  2325. else
  2326. echo "configure: failed program was:" >&5
  2327. cat conftest.$ac_ext >&5
  2328. rm -rf conftest*
  2329. eval "ac_cv_lib_$ac_lib_var=no"
  2330. fi
  2331. rm -f conftest*
  2332. LIBS="$ac_save_LIBS"
  2333. fi
  2334. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2335. echo "$ac_t""yes" 1>&6
  2336. CMAKE_DL_LIBS="-lld"
  2337. else
  2338. echo "$ac_t""no" 1>&6
  2339. fi
  2340. CMAKE_SHLIB_LINK_FLAGS=""
  2341. CMAKE_MODULE_LINK_FLAGS=""
  2342. CMAKE_SHLIB_RUNTIME_FLAG=""
  2343. CMAKE_SHLIB_RUNTIME_SEP=""
  2344. if test $ac_cv_prog_gxx = yes; then
  2345. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-G'
  2346. CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-G'
  2347. CMAKE_SHLIB_LINK_FLAGS='-Wl,-brtl'
  2348. CMAKE_MODULE_LINK_FLAGS='-Wl,-brtl'
  2349. CMAKE_MODULE_SUFFIX=".so"
  2350. CMAKE_SHLIB_SUFFIX=".so"
  2351. fi
  2352. ;;
  2353. Darwin-*)
  2354. CMAKE_SHLIB_CFLAGS=""
  2355. CMAKE_SHLIB_LD_LIBS=""
  2356. CMAKE_SHLIB_SUFFIX=".dylib"
  2357. CMAKE_MODULE_SUFFIX=".so"
  2358. CMAKE_DL_LIBS=""
  2359. CMAKE_SHLIB_BUILD_FLAGS="-dynamiclib"
  2360. CMAKE_SHLIB_LINK_FLAGS=""
  2361. CMAKE_MODULE_BUILD_FLAGS="-bundle -flat_namespace -undefined suppress"
  2362. CMAKE_MODULE_LINK_FLAGS=""
  2363. CMAKE_SHLIB_RUNTIME_FLAG=""
  2364. CMAKE_SHLIB_RUNTIME_SEP=":"
  2365. ;;
  2366. HP-UX-*)
  2367. CMAKE_SHLIB_CFLAGS="+Z"
  2368. CMAKE_SHLIB_LD_LIBS=""
  2369. CMAKE_SHLIB_SUFFIX=".sl"
  2370. CMAKE_MODULE_SUFFIX=".sl"
  2371. CMAKE_DL_LIBS="-ldld"
  2372. CMAKE_SHLIB_BUILD_FLAGS='+Z -Wl,-E -b -L/usr/lib'
  2373. CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
  2374. CMAKE_MODULE_BUILD_FLAGS='+Z -Wl,-E -b -L/usr/lib'
  2375. CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
  2376. CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
  2377. CMAKE_SHLIB_RUNTIME_SEP=':'
  2378. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  2379. CMAKE_SHLIB_CFLAGS="-fPIC"
  2380. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
  2381. CMAKE_SHLIB_LINK_FLAGS='-Wl,+s'
  2382. CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-E -Wl,-b'
  2383. CMAKE_MODULE_LINK_FLAGS='-Wl,+s'
  2384. CMAKE_SHLIB_RUNTIME_FLAG='-Wl,+b,'
  2385. CMAKE_SHLIB_RUNTIME_SEP=':'
  2386. fi
  2387. ;;
  2388. IRIX-5.*)
  2389. CMAKE_SHLIB_CFLAGS=""
  2390. CMAKE_SHLIB_LD_LIBS=""
  2391. CMAKE_SHLIB_SUFFIX=".so"
  2392. CMAKE_MODULE_SUFFIX=".so"
  2393. CMAKE_DL_LIBS=""
  2394. CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
  2395. CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
  2396. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2397. CMAKE_SHLIB_RUNTIME_SEP=":"
  2398. ;;
  2399. IRIX-6* | IRIX64-6* | IRIX-64-6*)
  2400. CMAKE_SHLIB_CFLAGS=""
  2401. CMAKE_SHLIB_LD_LIBS=""
  2402. CMAKE_SHLIB_SUFFIX=".so"
  2403. CMAKE_MODULE_SUFFIX=".so"
  2404. CMAKE_DL_LIBS=""
  2405. CMAKE_SHLIB_BUILD_FLAGS="-shared -rdata_shared"
  2406. CMAKE_MODULE_BUILD_FLAGS="-shared -rdata_shared"
  2407. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2408. CMAKE_SHLIB_RUNTIME_SEP=":"
  2409. ;;
  2410. Linux*)
  2411. CMAKE_SHLIB_CFLAGS="-fPIC"
  2412. CMAKE_SHLIB_LD_LIBS=""
  2413. CMAKE_SHLIB_SUFFIX=".so"
  2414. CMAKE_MODULE_SUFFIX=".so"
  2415. CMAKE_SHLIB_BUILD_FLAGS="-shared"
  2416. CMAKE_MODULE_BUILD_FLAGS="-shared"
  2417. if test "$have_dl" = yes; then
  2418. CMAKE_DL_LIBS="-ldl"
  2419. CMAKE_SHLIB_LINK_FLAGS="-rdynamic"
  2420. CMAKE_MODULE_LINK_FLAGS="-rdynamic"
  2421. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2422. CMAKE_SHLIB_RUNTIME_SEP=":"
  2423. else
  2424. ac_safe=`echo "dld.h" | sed 'y%./+-%__p_%'`
  2425. echo $ac_n "checking for dld.h""... $ac_c" 1>&6
  2426. echo "configure:2669: checking for dld.h" >&5
  2427. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2428. echo $ac_n "(cached) $ac_c" 1>&6
  2429. else
  2430. cat > conftest.$ac_ext <<EOF
  2431. #line 2674 "configure"
  2432. #include "confdefs.h"
  2433. #include <dld.h>
  2434. EOF
  2435. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2436. { (eval echo configure:2679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2437. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2438. if test -z "$ac_err"; then
  2439. rm -rf conftest*
  2440. eval "ac_cv_header_$ac_safe=yes"
  2441. else
  2442. echo "$ac_err" >&5
  2443. echo "configure: failed program was:" >&5
  2444. cat conftest.$ac_ext >&5
  2445. rm -rf conftest*
  2446. eval "ac_cv_header_$ac_safe=no"
  2447. fi
  2448. rm -f conftest*
  2449. fi
  2450. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2451. echo "$ac_t""yes" 1>&6
  2452. CMAKE_DL_LIBS="-ldld"
  2453. CMAKE_SHLIB_LINK_FLAGS=""
  2454. CMAKE_MODULE_LINK_FLAGS=""
  2455. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2456. CMAKE_SHLIB_RUNTIME_SEP=""
  2457. else
  2458. echo "$ac_t""no" 1>&6
  2459. fi
  2460. fi
  2461. ;;
  2462. CYGWIN_NT*)
  2463. CMAKE_SHLIB_CFLAGS=""
  2464. CMAKE_DL_LIBS="-lgdi32"
  2465. CMAKE_SHLIB_BUILD_FLAGS="-shared"
  2466. CMAKE_MODULE_BUILD_FLAGS="-shared"
  2467. CMAKE_SHLIB_SUFFIX=".dll"
  2468. CMAKE_MODULE_SUFFIX=".dll"
  2469. CMAKE_SHLIB_LINK_FLAGS=""
  2470. CMAKE_MODULE_LINK_FLAGS=""
  2471. CMAKE_SHLIB_RUNTIME_FLAG=""
  2472. CMAKE_SHLIB_RUNTIME_SEP=""
  2473. ;;
  2474. MP-RAS-02*)
  2475. CMAKE_SHLIB_CFLAGS="-K PIC"
  2476. CMAKE_SHLIB_LD_LIBS=""
  2477. CMAKE_SHLIB_SUFFIX=".so"
  2478. CMAKE_MODULE_SUFFIX=".so"
  2479. CMAKE_DL_LIBS="-ldl"
  2480. CMAKE_SHLIB_LINK_FLAGS=""
  2481. CMAKE_MODULE_LINK_FLAGS=""
  2482. CMAKE_SHLIB_RUNTIME_FLAG=""
  2483. CMAKE_SHLIB_RUNTIME_SEP=""
  2484. ;;
  2485. MP-RAS-*)
  2486. CMAKE_SHLIB_CFLAGS="-K PIC"
  2487. CMAKE_SHLIB_LD_LIBS=""
  2488. CMAKE_SHLIB_SUFFIX=".so"
  2489. CMAKE_MODULE_SUFFIX=".so"
  2490. CMAKE_DL_LIBS="-ldl"
  2491. CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
  2492. CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
  2493. CMAKE_SHLIB_RUNTIME_FLAG=""
  2494. CMAKE_SHLIB_RUNTIME_SEP=""
  2495. ;;
  2496. NetBSD-*|FreeBSD-*)
  2497. # Not available on all versions: check for include file.
  2498. if test -f /usr/include/dlfcn.h; then
  2499. CMAKE_SHLIB_CFLAGS="-fPIC"
  2500. CMAKE_SHLIB_LD_LIBS=""
  2501. CMAKE_SHLIB_SUFFIX=".so"
  2502. CMAKE_MODULE_SUFFIX=".so"
  2503. CMAKE_DL_LIBS=""
  2504. CMAKE_SHLIB_BUILD_FLAGS="-shared"
  2505. CMAKE_SHLIB_LINK_FLAGS=""
  2506. CMAKE_MODULE_BUILD_FLAGS="-shared"
  2507. CMAKE_MODULE_LINK_FLAGS=""
  2508. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2509. CMAKE_SHLIB_RUNTIME_SEP=":"
  2510. else
  2511. CMAKE_SHLIB_CFLAGS=""
  2512. CMAKE_SHLIB_LD_LIBS=""
  2513. CMAKE_SHLIB_SUFFIX="..o"
  2514. CMAKE_MODULE_SUFFIX="..o"
  2515. CMAKE_DL_LIBS=""
  2516. CMAKE_SHLIB_LINK_FLAGS=""
  2517. CMAKE_MODULE_LINK_FLAGS=""
  2518. CMAKE_SHLIB_RUNTIME_FLAG=""
  2519. CMAKE_SHLIB_RUNTIME_SEP=""
  2520. fi
  2521. ;;
  2522. NEXTSTEP-*)
  2523. CMAKE_SHLIB_CFLAGS=""
  2524. CMAKE_SHLIB_LD_LIBS=""
  2525. CMAKE_SHLIB_SUFFIX=".so"
  2526. CMAKE_MODULE_SUFFIX=".so"
  2527. CMAKE_DL_LIBS=""
  2528. CMAKE_SHLIB_LINK_FLAGS=""
  2529. CMAKE_MODULE_LINK_FLAGS=""
  2530. CMAKE_SHLIB_RUNTIME_FLAG=""
  2531. CMAKE_SHLIB_RUNTIME_SEP=""
  2532. ;;
  2533. OSF1-1.012)
  2534. # OSF/1 1.[012] from OSF, and derivatives, including Paragon OSF/1
  2535. CMAKE_SHLIB_CFLAGS=""
  2536. # Hack: make package name same as library name
  2537. CMAKE_SHLIB_LD_LIBS=""
  2538. CMAKE_SHLIB_SUFFIX=".so"
  2539. CMAKE_MODULE_SUFFIX=".so"
  2540. CMAKE_DL_LIBS=""
  2541. CMAKE_SHLIB_LINK_FLAGS=""
  2542. CMAKE_MODULE_LINK_FLAGS=""
  2543. CMAKE_SHLIB_RUNTIME_FLAG=""
  2544. CMAKE_SHLIB_RUNTIME_SEP=""
  2545. ;;
  2546. OSF1-1.*)
  2547. # OSF/1 1.3 from OSF using ELF, and derivatives, including AD2
  2548. CMAKE_SHLIB_CFLAGS="-fpic"
  2549. CMAKE_SHLIB_LD_LIBS=""
  2550. CMAKE_SHLIB_SUFFIX=".so"
  2551. CMAKE_MODULE_SUFFIX=".so"
  2552. CMAKE_DL_LIBS=""
  2553. CMAKE_SHLIB_LINK_FLAGS=""
  2554. CMAKE_MODULE_LINK_FLAGS=""
  2555. CMAKE_SHLIB_RUNTIME_FLAG=""
  2556. CMAKE_SHLIB_RUNTIME_SEP=""
  2557. ;;
  2558. OSF1-V*)
  2559. # Digital OSF/1
  2560. CMAKE_SHLIB_CFLAGS=""
  2561. CMAKE_SHLIB_LD_LIBS=""
  2562. CMAKE_SHLIB_SUFFIX=".so"
  2563. CMAKE_MODULE_SUFFIX=".so"
  2564. CMAKE_DL_LIBS=""
  2565. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
  2566. CMAKE_SHLIB_LINK_FLAGS=''
  2567. CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-expect_unresolved,\\*'
  2568. CMAKE_MODULE_LINK_FLAGS=''
  2569. if test $ac_cv_prog_gxx = yes; then
  2570. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-rpath,"
  2571. else
  2572. CMAKE_SHLIB_RUNTIME_FLAG="-rpath "
  2573. fi
  2574. CMAKE_SHLIB_RUNTIME_SEP=":"
  2575. ;;
  2576. RISCos-*)
  2577. CMAKE_SHLIB_CFLAGS="-G 0"
  2578. CMAKE_SHLIB_LD_LIBS=""
  2579. CMAKE_SHLIB_SUFFIX="..o"
  2580. CMAKE_MODULE_SUFFIX="..o"
  2581. CMAKE_DL_LIBS=""
  2582. CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
  2583. CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
  2584. CMAKE_SHLIB_RUNTIME_FLAG=""
  2585. CMAKE_SHLIB_RUNTIME_SEP=""
  2586. ;;
  2587. SCO_SV-3.2*)
  2588. # Note, dlopen is available only on SCO 3.2.5 and greater. However,
  2589. # this test works, since "uname -s" was non-standard in 3.2.4 and
  2590. # below.
  2591. CMAKE_SHLIB_CFLAGS="-Kpic -belf"
  2592. CMAKE_SHLIB_LD_LIBS=""
  2593. CMAKE_SHLIB_SUFFIX=".so"
  2594. CMAKE_MODULE_SUFFIX=".so"
  2595. CMAKE_DL_LIBS=""
  2596. CMAKE_SHLIB_LINK_FLAGS="-belf -Wl,-Bexport"
  2597. CMAKE_SHLIB_MODULE_FLAGS="-belf -Wl,-Bexport"
  2598. CMAKE_SHLIB_RUNTIME_FLAG=""
  2599. CMAKE_SHLIB_RUNTIME_SEP=""
  2600. ;;
  2601. SINIX*5.4*)
  2602. CMAKE_SHLIB_CFLAGS="-K PIC"
  2603. CMAKE_SHLIB_LD_LIBS=""
  2604. CMAKE_SHLIB_SUFFIX=".so"
  2605. CMAKE_MODULE_SUFFIX=".so"
  2606. CMAKE_DL_LIBS="-ldl"
  2607. CMAKE_SHLIB_LINK_FLAGS=""
  2608. CMAKE_MODULE_LINK_FLAGS=""
  2609. CMAKE_SHLIB_RUNTIME_FLAG=""
  2610. CMAKE_SHLIB_RUNTIME_SEP=""
  2611. ;;
  2612. SunOS-4*)
  2613. CMAKE_SHLIB_CFLAGS="-PIC"
  2614. CMAKE_SHLIB_LD_LIBS=""
  2615. CMAKE_SHLIB_SUFFIX=".so"
  2616. CMAKE_MODULE_SUFFIX=".so"
  2617. CMAKE_DL_LIBS="-ldl"
  2618. CMAKE_SHLIB_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
  2619. CMAKE_SHLIB_LINK_FLAGS=''
  2620. CMAKE_MODULE_BUILD_FLAGS='-shared -Wl,-r -nostdlib'
  2621. CMAKE_MODULE_LINK_FLAGS=''
  2622. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
  2623. CMAKE_SHLIB_RUNTIME_SEP=":"
  2624. ;;
  2625. SunOS-5*)
  2626. CMAKE_SHLIB_CFLAGS="-KPIC"
  2627. CMAKE_SHLIB_LD_LIBS='${LIBS}'
  2628. CMAKE_SHLIB_SUFFIX=".so"
  2629. CMAKE_MODULE_SUFFIX=".so"
  2630. CMAKE_DL_LIBS="-ldl"
  2631. CMAKE_SHLIB_BUILD_FLAGS='-G'
  2632. CMAKE_SHLIB_LINK_FLAGS=''
  2633. CMAKE_MODULE_BUILD_FLAGS='-G'
  2634. CMAKE_MODULE_LINK_FLAGS=''
  2635. CMAKE_SHLIB_RUNTIME_FLAG="-R "
  2636. CMAKE_SHLIB_RUNTIME_SEP=":"
  2637. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  2638. CMAKE_SHLIB_BUILD_FLAGS='-shared -nostdlib'
  2639. CMAKE_SHLIB_LINK_FLAGS=''
  2640. CMAKE_MODULE_BUILD_FLAGS='-shared -nostdlib'
  2641. CMAKE_MODULE_LINK_FLAGS=''
  2642. CMAKE_SHLIB_RUNTIME_FLAG="-Wl,-R,"
  2643. CMAKE_SHLIB_RUNTIME_SEP=":"
  2644. fi
  2645. ;;
  2646. ULTRIX-4.*)
  2647. CMAKE_SHLIB_CFLAGS="-G 0"
  2648. CMAKE_SHLIB_SUFFIX="..o"
  2649. CMAKE_MODULE_SUFFIX="..o"
  2650. CMAKE_SHLIB_LD_LIBS=""
  2651. CMAKE_DL_LIBS=""
  2652. CMAKE_SHLIB_LINK_FLAGS="-Wl,-D,08000000"
  2653. CMAKE_MODULE_LINK_FLAGS="-Wl,-D,08000000"
  2654. CMAKE_SHLIB_RUNTIME_FLAG=""
  2655. CMAKE_SHLIB_RUNTIME_SEP=""
  2656. ;;
  2657. UNIX_SV*)
  2658. CMAKE_SHLIB_CFLAGS="-K PIC"
  2659. CMAKE_SHLIB_LD_LIBS=""
  2660. CMAKE_SHLIB_SUFFIX=".so"
  2661. CMAKE_MODULE_SUFFIX=".so"
  2662. CMAKE_DL_LIBS="-ldl"
  2663. CMAKE_SHLIB_LINK_FLAGS="-Wl,-Bexport"
  2664. CMAKE_MODULE_LINK_FLAGS="-Wl,-Bexport"
  2665. CMAKE_SHLIB_RUNTIME_FLAG=""
  2666. CMAKE_SHLIB_RUNTIME_SEP=""
  2667. ;;
  2668. esac
  2669. export CMAKE_SHLIB_SUFFIX
  2670. export CMAKE_MODULE_SUFFIX
  2671. # If we're running gcc, then change the C flags for compiling shared
  2672. # libraries to the right flags for gcc, instead of those for the
  2673. # standard manufacturer compiler.
  2674. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  2675. CMAKE_SHLIB_CFLAGS="-fPIC"
  2676. fi
  2677. # if running on cygwin remove -fPIC flag
  2678. case $system in
  2679. CYGWIN_NT*)
  2680. CMAKE_SHLIB_CFLAGS=""
  2681. ;;
  2682. Darwin*) #don't need -fPIC on Darwin (on by default)
  2683. CMAKE_SHLIB_CFLAGS=""
  2684. ;;
  2685. esac
  2686. # if running on darwin no explicit template instantiations
  2687. case $system in
  2688. Darwin*)
  2689. CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION="1"
  2690. ;;
  2691. esac
  2692. # If the user has supplied C flags for compiling shared objects, use
  2693. # those instead
  2694. if test "${SHLIB_CFLAGS}" != ""; then
  2695. CMAKE_SHLIB_CFLAGS="${SHLIB_CFLAGS}"
  2696. fi
  2697. CMAKE_LD_SEARCH_FLAGS="${LD_SEARCH_FLAGS}"
  2698. ##########################
  2699. ## ##
  2700. ## Check thread support ##
  2701. ## ##
  2702. ##########################
  2703. # initialize thread vars
  2704. CMAKE_THREAD_LIBS=""
  2705. use_sproc=no
  2706. CMAKE_USE_SPROC=0
  2707. CMAKE_USE_PTHREADS=0
  2708. CMAKE_HP_PTHREADS=0
  2709. ##########################
  2710. ## ##
  2711. ## sproc ##
  2712. ## ##
  2713. ##########################
  2714. # check for sproc
  2715. force_sproc=no
  2716. # Check whether --with-sproc or --without-sproc was given.
  2717. if test "${with_sproc+set}" = set; then
  2718. withval="$with_sproc"
  2719. if test "$withval" = yes; then
  2720. force_sproc=yes
  2721. fi
  2722. fi
  2723. for ac_hdr in sys/prctl.h
  2724. do
  2725. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2726. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2727. echo "configure:2997: checking for $ac_hdr" >&5
  2728. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2729. echo $ac_n "(cached) $ac_c" 1>&6
  2730. else
  2731. cat > conftest.$ac_ext <<EOF
  2732. #line 3002 "configure"
  2733. #include "confdefs.h"
  2734. #include <$ac_hdr>
  2735. EOF
  2736. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2737. { (eval echo configure:3007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2738. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2739. if test -z "$ac_err"; then
  2740. rm -rf conftest*
  2741. eval "ac_cv_header_$ac_safe=yes"
  2742. else
  2743. echo "$ac_err" >&5
  2744. echo "configure: failed program was:" >&5
  2745. cat conftest.$ac_ext >&5
  2746. rm -rf conftest*
  2747. eval "ac_cv_header_$ac_safe=no"
  2748. fi
  2749. rm -f conftest*
  2750. fi
  2751. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2752. echo "$ac_t""yes" 1>&6
  2753. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2754. cat >> confdefs.h <<EOF
  2755. #define $ac_tr_hdr 1
  2756. EOF
  2757. use_sproc=yes
  2758. else
  2759. echo "$ac_t""no" 1>&6
  2760. fi
  2761. done
  2762. if test "$use_sproc" = "yes"; then
  2763. case $system in
  2764. Linux* | IRIX64-6.5 | IRIX-6.5)
  2765. if test "$force_sproc" = "yes"; then
  2766. CMAKE_USE_SPROC=1
  2767. else
  2768. use_sproc=no
  2769. fi
  2770. ;;
  2771. IRIX*)
  2772. CMAKE_USE_SPROC=1
  2773. ;;
  2774. esac
  2775. fi
  2776. use_pthreads=no
  2777. for ac_hdr in pthread.h
  2778. do
  2779. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  2780. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  2781. echo "configure:3052: checking for $ac_hdr" >&5
  2782. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  2783. echo $ac_n "(cached) $ac_c" 1>&6
  2784. else
  2785. cat > conftest.$ac_ext <<EOF
  2786. #line 3057 "configure"
  2787. #include "confdefs.h"
  2788. #include <$ac_hdr>
  2789. EOF
  2790. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  2791. { (eval echo configure:3062: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  2792. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  2793. if test -z "$ac_err"; then
  2794. rm -rf conftest*
  2795. eval "ac_cv_header_$ac_safe=yes"
  2796. else
  2797. echo "$ac_err" >&5
  2798. echo "configure: failed program was:" >&5
  2799. cat conftest.$ac_ext >&5
  2800. rm -rf conftest*
  2801. eval "ac_cv_header_$ac_safe=no"
  2802. fi
  2803. rm -f conftest*
  2804. fi
  2805. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  2806. echo "$ac_t""yes" 1>&6
  2807. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  2808. cat >> confdefs.h <<EOF
  2809. #define $ac_tr_hdr 1
  2810. EOF
  2811. use_pthreads=yes
  2812. else
  2813. echo "$ac_t""no" 1>&6
  2814. fi
  2815. done
  2816. if test "$use_pthreads" = "yes"; then
  2817. if test "$use_sproc" = "no"; then
  2818. echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
  2819. echo "configure:3091: checking for pthread_create in -lpthreads" >&5
  2820. ac_lib_var=`echo pthreads'_'pthread_create | sed 'y%./+-%__p_%'`
  2821. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2822. echo $ac_n "(cached) $ac_c" 1>&6
  2823. else
  2824. ac_save_LIBS="$LIBS"
  2825. LIBS="-lpthreads $LIBS"
  2826. cat > conftest.$ac_ext <<EOF
  2827. #line 3099 "configure"
  2828. #include "confdefs.h"
  2829. /* Override any gcc2 internal prototype to avoid an error. */
  2830. /* We use char because int might match the return type of a gcc2
  2831. builtin and then its argument prototype would still apply. */
  2832. char pthread_create();
  2833. int main() {
  2834. pthread_create()
  2835. ; return 0; }
  2836. EOF
  2837. if { (eval echo configure:3110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2838. rm -rf conftest*
  2839. eval "ac_cv_lib_$ac_lib_var=yes"
  2840. else
  2841. echo "configure: failed program was:" >&5
  2842. cat conftest.$ac_ext >&5
  2843. rm -rf conftest*
  2844. eval "ac_cv_lib_$ac_lib_var=no"
  2845. fi
  2846. rm -f conftest*
  2847. LIBS="$ac_save_LIBS"
  2848. fi
  2849. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2850. echo "$ac_t""yes" 1>&6
  2851. CMAKE_THREAD_LIBS="-lpthreads"
  2852. else
  2853. echo "$ac_t""no" 1>&6
  2854. fi
  2855. echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
  2856. echo "configure:3131: checking for pthread_create in -lpthread" >&5
  2857. ac_lib_var=`echo pthread'_'pthread_create | sed 'y%./+-%__p_%'`
  2858. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2859. echo $ac_n "(cached) $ac_c" 1>&6
  2860. else
  2861. ac_save_LIBS="$LIBS"
  2862. LIBS="-lpthread $LIBS"
  2863. cat > conftest.$ac_ext <<EOF
  2864. #line 3139 "configure"
  2865. #include "confdefs.h"
  2866. /* Override any gcc2 internal prototype to avoid an error. */
  2867. /* We use char because int might match the return type of a gcc2
  2868. builtin and then its argument prototype would still apply. */
  2869. char pthread_create();
  2870. int main() {
  2871. pthread_create()
  2872. ; return 0; }
  2873. EOF
  2874. if { (eval echo configure:3150: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2875. rm -rf conftest*
  2876. eval "ac_cv_lib_$ac_lib_var=yes"
  2877. else
  2878. echo "configure: failed program was:" >&5
  2879. cat conftest.$ac_ext >&5
  2880. rm -rf conftest*
  2881. eval "ac_cv_lib_$ac_lib_var=no"
  2882. fi
  2883. rm -f conftest*
  2884. LIBS="$ac_save_LIBS"
  2885. fi
  2886. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2887. echo "$ac_t""yes" 1>&6
  2888. CMAKE_THREAD_LIBS="-lpthread"
  2889. else
  2890. echo "$ac_t""no" 1>&6
  2891. fi
  2892. # Work around Solaris 5.6 and 5.7 bug:
  2893. if test "`uname -s -r`" = "SunOS 5.6"; then
  2894. echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
  2895. echo "configure:3173: checking for thr_create in -lthread" >&5
  2896. ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
  2897. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2898. echo $ac_n "(cached) $ac_c" 1>&6
  2899. else
  2900. ac_save_LIBS="$LIBS"
  2901. LIBS="-lthread $LIBS"
  2902. cat > conftest.$ac_ext <<EOF
  2903. #line 3181 "configure"
  2904. #include "confdefs.h"
  2905. /* Override any gcc2 internal prototype to avoid an error. */
  2906. /* We use char because int might match the return type of a gcc2
  2907. builtin and then its argument prototype would still apply. */
  2908. char thr_create();
  2909. int main() {
  2910. thr_create()
  2911. ; return 0; }
  2912. EOF
  2913. if { (eval echo configure:3192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2914. rm -rf conftest*
  2915. eval "ac_cv_lib_$ac_lib_var=yes"
  2916. else
  2917. echo "configure: failed program was:" >&5
  2918. cat conftest.$ac_ext >&5
  2919. rm -rf conftest*
  2920. eval "ac_cv_lib_$ac_lib_var=no"
  2921. fi
  2922. rm -f conftest*
  2923. LIBS="$ac_save_LIBS"
  2924. fi
  2925. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2926. echo "$ac_t""yes" 1>&6
  2927. CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread"
  2928. else
  2929. echo "$ac_t""no" 1>&6
  2930. fi
  2931. fi
  2932. if test "`uname -s -r`" = "SunOS 5.7"; then
  2933. echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
  2934. echo "configure:3215: checking for thr_create in -lthread" >&5
  2935. ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-%__p_%'`
  2936. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  2937. echo $ac_n "(cached) $ac_c" 1>&6
  2938. else
  2939. ac_save_LIBS="$LIBS"
  2940. LIBS="-lthread $LIBS"
  2941. cat > conftest.$ac_ext <<EOF
  2942. #line 3223 "configure"
  2943. #include "confdefs.h"
  2944. /* Override any gcc2 internal prototype to avoid an error. */
  2945. /* We use char because int might match the return type of a gcc2
  2946. builtin and then its argument prototype would still apply. */
  2947. char thr_create();
  2948. int main() {
  2949. thr_create()
  2950. ; return 0; }
  2951. EOF
  2952. if { (eval echo configure:3234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  2953. rm -rf conftest*
  2954. eval "ac_cv_lib_$ac_lib_var=yes"
  2955. else
  2956. echo "configure: failed program was:" >&5
  2957. cat conftest.$ac_ext >&5
  2958. rm -rf conftest*
  2959. eval "ac_cv_lib_$ac_lib_var=no"
  2960. fi
  2961. rm -f conftest*
  2962. LIBS="$ac_save_LIBS"
  2963. fi
  2964. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  2965. echo "$ac_t""yes" 1>&6
  2966. CMAKE_THREAD_LIBS="$CMAKE_THREAD_LIBS -lthread"
  2967. else
  2968. echo "$ac_t""no" 1>&6
  2969. fi
  2970. fi
  2971. CMAKE_USE_PTHREADS=1
  2972. fi
  2973. fi
  2974. # on an HP with pthread we need to use -lcma
  2975. # on dec alphas we have had problems as well
  2976. if test "$use_pthreads" = "yes"; then
  2977. case $system in
  2978. HP-UX-*)
  2979. CMAKE_THREAD_LIBS="-lcma"
  2980. CMAKE_USE_PTHREADS=1
  2981. CMAKE_HP_PTHREADS=1
  2982. ;;
  2983. OSF1-V*)
  2984. CMAKE_USE_PTHREADS=0
  2985. CMAKE_THREAD_LIBS=""
  2986. ;;
  2987. FreeBSD*)
  2988. CMAKE_USE_PTHREADS=0
  2989. CMAKE_THREAD_LIBS=""
  2990. ;;
  2991. CYGWIN_NT*)
  2992. CMAKE_THREAD_LIBS=""
  2993. CMAKE_USE_WIN32_THREADS=0
  2994. CMAKE_USE_PTHREADS=1
  2995. ;;
  2996. esac
  2997. fi
  2998. CMAKE_ANSI_CFLAGS=""
  2999. CMAKE_ANSI_CXXFLAGS=""
  3000. # on hp use -Aa for ansi
  3001. if test $ac_cv_prog_gxx = no; then
  3002. case $system in
  3003. HP-UX-*)
  3004. echo $ac_n "checking whether ${CC} accepts -Aa""... $ac_c" 1>&6
  3005. echo 'void f(){}' > conftest.c
  3006. if test -z "`${CC} -Aa -c conftest.c 2>&1`"; then
  3007. echo "$ac_t""yes" 1>&6
  3008. CMAKE_ANSI_CFLAGS="-Aa"
  3009. else
  3010. echo "$ac_t""no" 1>&6
  3011. fi
  3012. rm -f conftest*
  3013. ;;
  3014. IRIX-5* | IRIX-6* | IRIX64-6* | IRIX-64-6*)
  3015. echo $ac_n "checking whether ${CXX} accepts -LANG:std""... $ac_c" 1>&6
  3016. echo 'void f(){}' > conftest.c
  3017. if test -z "`${CXX} -LANG:std -c conftest.c 2>&1`"; then
  3018. echo "$ac_t""yes" 1>&6
  3019. CMAKE_ANSI_CXXFLAGS="-LANG:std"
  3020. else
  3021. echo "$ac_t""no" 1>&6
  3022. fi
  3023. rm -f conftest*
  3024. ;;
  3025. esac
  3026. fi
  3027. # if we are not running g++ then we might need some other flags
  3028. # to get the templates compiled correctly
  3029. CMAKE_TEMPLATE_FLAGS=""
  3030. if test $ac_cv_prog_gxx = no; then
  3031. echo $ac_n "checking whether ${CXX} accepts -ptused -no_prelink""... $ac_c" 1>&6
  3032. echo 'void f(){}' > conftest.cc
  3033. if test -z "`${CXX} -ptused -no_prelink -c conftest.cc 2>&1`"; then
  3034. echo "$ac_t""yes" 1>&6
  3035. CMAKE_TEMPLATE_FLAGS="-ptused -no_prelink"
  3036. else
  3037. echo "$ac_t""no" 1>&6
  3038. fi
  3039. rm -f conftest*
  3040. fi
  3041. # check no g++ compilers to see if they have the standard
  3042. # ansi stream files (without the .h)
  3043. if test $ac_cv_prog_gxx = no; then
  3044. echo $ac_n "checking ansi standard C++ stream headers ""... $ac_c" 1>&6
  3045. echo "configure:3344: checking ansi standard C++ stream headers " >&5
  3046. rm -rf conftest.*
  3047. cat > conftest.cc <<!
  3048. #include <iostream>
  3049. !
  3050. if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
  3051. echo "$ac_t""yes" 1>&6
  3052. else
  3053. CMAKE_NO_ANSI_STREAM_HEADERS="1"
  3054. echo "$ac_t""no" 1>&6
  3055. fi
  3056. fi
  3057. # check to see if stl is in the std namespace
  3058. if test $ac_cv_prog_gxx = no; then
  3059. echo $ac_n "checking ansi standard namespace support ""... $ac_c" 1>&6
  3060. echo "configure:3361: checking ansi standard namespace support " >&5
  3061. rm -rf conftest.*
  3062. cat > conftest.cc <<!
  3063. #include <list>
  3064. void foo() { std::list<int> l; }
  3065. !
  3066. if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
  3067. echo "$ac_t""yes" 1>&6
  3068. else
  3069. CMAKE_NO_STD_NAMESPACE="1"
  3070. echo "$ac_t""no" 1>&6
  3071. fi
  3072. fi
  3073. # check to see if for scoping is supported
  3074. if test $ac_cv_prog_gxx = no; then
  3075. echo $ac_n "checking ansi for scope support ""... $ac_c" 1>&6
  3076. echo "configure:3379: checking ansi for scope support " >&5
  3077. rm -rf conftest.*
  3078. cat > conftest.cc <<!
  3079. void foo() { for(int i;;); for(int i;;); }
  3080. !
  3081. if test -z "`${CXX} ${CMAKE_ANSI_CXXFLAGS} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>&1`"; then
  3082. echo "$ac_t""yes" 1>&6
  3083. else
  3084. CMAKE_NO_ANSI_FOR_SCOPE="1"
  3085. echo "$ac_t""no" 1>&6
  3086. fi
  3087. fi
  3088. if test "$CC" = "gcc" -o `$CC -v 2>&1 | grep -c gcc` != "0" ; then
  3089. SHLIB_CFLAGS="-fPIC"
  3090. fi
  3091. # find make to use to build cmake, prefer gmake
  3092. for ac_prog in gmake make
  3093. do
  3094. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3095. set dummy $ac_prog; ac_word=$2
  3096. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3097. echo "configure:3404: checking for $ac_word" >&5
  3098. if eval "test \"`echo '$''{'ac_cv_path_RUNMAKE'+set}'`\" = set"; then
  3099. echo $ac_n "(cached) $ac_c" 1>&6
  3100. else
  3101. case "$RUNMAKE" in
  3102. /*)
  3103. ac_cv_path_RUNMAKE="$RUNMAKE" # Let the user override the test with a path.
  3104. ;;
  3105. ?:/*)
  3106. ac_cv_path_RUNMAKE="$RUNMAKE" # Let the user override the test with a dos path.
  3107. ;;
  3108. *)
  3109. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3110. ac_dummy="$PATH"
  3111. for ac_dir in $ac_dummy; do
  3112. test -z "$ac_dir" && ac_dir=.
  3113. if test -f $ac_dir/$ac_word; then
  3114. ac_cv_path_RUNMAKE="$ac_dir/$ac_word"
  3115. break
  3116. fi
  3117. done
  3118. IFS="$ac_save_ifs"
  3119. ;;
  3120. esac
  3121. fi
  3122. RUNMAKE="$ac_cv_path_RUNMAKE"
  3123. if test -n "$RUNMAKE"; then
  3124. echo "$ac_t""$RUNMAKE" 1>&6
  3125. else
  3126. echo "$ac_t""no" 1>&6
  3127. fi
  3128. test -n "$RUNMAKE" && break
  3129. done
  3130. for ac_prog in ar
  3131. do
  3132. # Extract the first word of "$ac_prog", so it can be a program name with args.
  3133. set dummy $ac_prog; ac_word=$2
  3134. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  3135. echo "configure:3444: checking for $ac_word" >&5
  3136. if eval "test \"`echo '$''{'ac_cv_path_CMAKE_AR_TMP'+set}'`\" = set"; then
  3137. echo $ac_n "(cached) $ac_c" 1>&6
  3138. else
  3139. case "$CMAKE_AR_TMP" in
  3140. /*)
  3141. ac_cv_path_CMAKE_AR_TMP="$CMAKE_AR_TMP" # Let the user override the test with a path.
  3142. ;;
  3143. ?:/*)
  3144. ac_cv_path_CMAKE_AR_TMP="$CMAKE_AR_TMP" # Let the user override the test with a dos path.
  3145. ;;
  3146. *)
  3147. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  3148. ac_dummy="$PATH"
  3149. for ac_dir in $ac_dummy; do
  3150. test -z "$ac_dir" && ac_dir=.
  3151. if test -f $ac_dir/$ac_word; then
  3152. ac_cv_path_CMAKE_AR_TMP="$ac_dir/$ac_word"
  3153. break
  3154. fi
  3155. done
  3156. IFS="$ac_save_ifs"
  3157. ;;
  3158. esac
  3159. fi
  3160. CMAKE_AR_TMP="$ac_cv_path_CMAKE_AR_TMP"
  3161. if test -n "$CMAKE_AR_TMP"; then
  3162. echo "$ac_t""$CMAKE_AR_TMP" 1>&6
  3163. else
  3164. echo "$ac_t""no" 1>&6
  3165. fi
  3166. test -n "$CMAKE_AR_TMP" && break
  3167. done
  3168. CMAKE_AR="$CMAKE_AR_TMP"
  3169. CMAKE_AR_ARGS="cr"
  3170. # if on SunOS and not using gXX then use the compiler to make .a libs
  3171. case $system in
  3172. SunOS-5*)
  3173. if test $ac_cv_prog_gxx = yes; then
  3174. :
  3175. else
  3176. echo "Using $CXX -xar -o for creating .a libraries"
  3177. CMAKE_AR="$CXX"
  3178. CMAKE_AR_ARGS="-xar -o"
  3179. fi
  3180. ;;
  3181. IRIX*)
  3182. if test $ac_cv_prog_gxx = yes; then
  3183. :
  3184. else
  3185. echo "Using $CXX -xar -o for creating .a libraries"
  3186. CMAKE_AR="$CXX"
  3187. CMAKE_AR_ARGS="-ar -o"
  3188. fi
  3189. ;;
  3190. esac
  3191. CMAKE_COMPILER_IS_GNUGXX=0
  3192. if test $ac_cv_prog_gxx = yes; then
  3193. CMAKE_COMPILER_IS_GNUCXX=1
  3194. fi
  3195. CMAKE_SYSTEM="$system"
  3196. # generate output files.
  3197. # create mkdir files just to make some of the directories
  3198. trap '' 1 2 15
  3199. cat > confcache <<\EOF
  3200. # This file is a shell script that caches the results of configure
  3201. # tests run on this system so they can be shared between configure
  3202. # scripts and configure runs. It is not useful on other systems.
  3203. # If it contains results you don't want to keep, you may remove or edit it.
  3204. #
  3205. # By default, configure uses ./config.cache as the cache file,
  3206. # creating it if it does not exist already. You can give configure
  3207. # the --cache-file=FILE option to use a different cache file; that is
  3208. # what configure does when it calls configure scripts in
  3209. # subdirectories, so they share the cache.
  3210. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  3211. # config.status only pays attention to the cache file if you give it the
  3212. # --recheck option to rerun configure.
  3213. #
  3214. EOF
  3215. # The following way of writing the cache mishandles newlines in values,
  3216. # but we know of no workaround that is simple, portable, and efficient.
  3217. # So, don't put newlines in cache variables' values.
  3218. # Ultrix sh set writes to stderr and can't be redirected directly,
  3219. # and sets the high bit in the cache file unless we assign to the vars.
  3220. (set) 2>&1 |
  3221. case `(ac_space=' '; set | grep ac_space) 2>&1` in
  3222. *ac_space=\ *)
  3223. # `set' does not quote correctly, so add quotes (double-quote substitution
  3224. # turns \\\\ into \\, and sed turns \\ into \).
  3225. sed -n \
  3226. -e "s/'/'\\\\''/g" \
  3227. -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
  3228. ;;
  3229. *)
  3230. # `set' quotes correctly as required by POSIX, so do not add quotes.
  3231. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
  3232. ;;
  3233. esac >> confcache
  3234. if cmp -s $cache_file confcache; then
  3235. :
  3236. else
  3237. if test -w $cache_file; then
  3238. echo "updating cache $cache_file"
  3239. cat confcache > $cache_file
  3240. else
  3241. echo "not updating unwritable cache $cache_file"
  3242. fi
  3243. fi
  3244. rm -f confcache
  3245. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  3246. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  3247. # Let make expand exec_prefix.
  3248. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  3249. # Any assignment to VPATH causes Sun make to only execute
  3250. # the first set of double-colon rules, so remove it if not needed.
  3251. # If there is a colon in the path, we need to keep it.
  3252. if test "x$srcdir" = x.; then
  3253. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  3254. fi
  3255. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  3256. # Transform confdefs.h into DEFS.
  3257. # Protect against shell expansion while executing Makefile rules.
  3258. # Protect against Makefile macro expansion.
  3259. cat > conftest.defs <<\EOF
  3260. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
  3261. s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
  3262. s%\[%\\&%g
  3263. s%\]%\\&%g
  3264. s%\$%$$%g
  3265. EOF
  3266. DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
  3267. rm -f conftest.defs
  3268. # Without the "./", some shells look in PATH for config.status.
  3269. : ${CONFIG_STATUS=./config.status}
  3270. echo creating $CONFIG_STATUS
  3271. rm -f $CONFIG_STATUS
  3272. cat > $CONFIG_STATUS <<EOF
  3273. #! /bin/sh
  3274. # Generated automatically by configure.
  3275. # Run this file to recreate the current configuration.
  3276. # This directory was configured as follows,
  3277. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  3278. #
  3279. # $0 $ac_configure_args
  3280. #
  3281. # Compiler output produced by configure, useful for debugging
  3282. # configure, is in ./config.log if it exists.
  3283. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  3284. for ac_option
  3285. do
  3286. case "\$ac_option" in
  3287. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  3288. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  3289. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  3290. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  3291. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  3292. exit 0 ;;
  3293. -help | --help | --hel | --he | --h)
  3294. echo "\$ac_cs_usage"; exit 0 ;;
  3295. *) echo "\$ac_cs_usage"; exit 1 ;;
  3296. esac
  3297. done
  3298. ac_given_srcdir=$srcdir
  3299. ac_given_INSTALL="$INSTALL"
  3300. trap 'rm -fr `echo "CMakeSystemConfig.cmake " | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  3301. EOF
  3302. cat >> $CONFIG_STATUS <<EOF
  3303. # Protect against being on the right side of a sed subst in config.status.
  3304. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  3305. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  3306. $ac_vpsub
  3307. $extrasub
  3308. s%@SHELL@%$SHELL%g
  3309. s%@CFLAGS@%$CFLAGS%g
  3310. s%@CPPFLAGS@%$CPPFLAGS%g
  3311. s%@CXXFLAGS@%$CXXFLAGS%g
  3312. s%@FFLAGS@%$FFLAGS%g
  3313. s%@DEFS@%$DEFS%g
  3314. s%@LDFLAGS@%$LDFLAGS%g
  3315. s%@LIBS@%$LIBS%g
  3316. s%@exec_prefix@%$exec_prefix%g
  3317. s%@prefix@%$prefix%g
  3318. s%@program_transform_name@%$program_transform_name%g
  3319. s%@bindir@%$bindir%g
  3320. s%@sbindir@%$sbindir%g
  3321. s%@libexecdir@%$libexecdir%g
  3322. s%@datadir@%$datadir%g
  3323. s%@sysconfdir@%$sysconfdir%g
  3324. s%@sharedstatedir@%$sharedstatedir%g
  3325. s%@localstatedir@%$localstatedir%g
  3326. s%@libdir@%$libdir%g
  3327. s%@includedir@%$includedir%g
  3328. s%@oldincludedir@%$oldincludedir%g
  3329. s%@infodir@%$infodir%g
  3330. s%@mandir@%$mandir%g
  3331. s%@CMAKE_CONFIG_DIR@%$CMAKE_CONFIG_DIR%g
  3332. s%@CC@%$CC%g
  3333. s%@CXX@%$CXX%g
  3334. s%@RANLIB@%$RANLIB%g
  3335. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  3336. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  3337. s%@INSTALL_DATA@%$INSTALL_DATA%g
  3338. s%@CMAKE_SIZEOF_INT@%$CMAKE_SIZEOF_INT%g
  3339. s%@CMAKE_SIZEOF_LONG@%$CMAKE_SIZEOF_LONG%g
  3340. s%@CMAKE_SIZEOF_VOID_P@%$CMAKE_SIZEOF_VOID_P%g
  3341. s%@CMAKE_SIZEOF_CHAR@%$CMAKE_SIZEOF_CHAR%g
  3342. s%@CMAKE_SIZEOF_SHORT@%$CMAKE_SIZEOF_SHORT%g
  3343. s%@CMAKE_SIZEOF_FLOAT@%$CMAKE_SIZEOF_FLOAT%g
  3344. s%@CMAKE_SIZEOF_DOUBLE@%$CMAKE_SIZEOF_DOUBLE%g
  3345. s%@CPP@%$CPP%g
  3346. s%@X_CFLAGS@%$X_CFLAGS%g
  3347. s%@X_PRE_LIBS@%$X_PRE_LIBS%g
  3348. s%@X_LIBS@%$X_LIBS%g
  3349. s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
  3350. s%@CMAKE_HAS_X@%$CMAKE_HAS_X%g
  3351. s%@CMAKE_WORDS_BIGENDIAN@%$CMAKE_WORDS_BIGENDIAN%g
  3352. s%@CMAKE_HAVE_LIMITS_H@%$CMAKE_HAVE_LIMITS_H%g
  3353. s%@CMAKE_HAVE_UNISTD_H@%$CMAKE_HAVE_UNISTD_H%g
  3354. s%@fullSrcDir@%$fullSrcDir%g
  3355. s%@CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION@%$CMAKE_NO_EXPLICIT_TEMPLATE_INSTANTIATION%g
  3356. s%@CMAKE_SHLIB_LINK_FLAGS@%$CMAKE_SHLIB_LINK_FLAGS%g
  3357. s%@CMAKE_SHLIB_BUILD_FLAGS@%$CMAKE_SHLIB_BUILD_FLAGS%g
  3358. s%@CMAKE_MODULE_LINK_FLAGS@%$CMAKE_MODULE_LINK_FLAGS%g
  3359. s%@CMAKE_MODULE_BUILD_FLAGS@%$CMAKE_MODULE_BUILD_FLAGS%g
  3360. s%@CMAKE_SHLIB_CFLAGS@%$CMAKE_SHLIB_CFLAGS%g
  3361. s%@CMAKE_LIB_EXT@%$CMAKE_LIB_EXT%g
  3362. s%@CMAKE_DL_LIBS@%$CMAKE_DL_LIBS%g
  3363. s%@CMAKE_SHLIB_LD_LIBS@%$CMAKE_SHLIB_LD_LIBS%g
  3364. s%@CMAKE_SHLIB_SUFFIX@%$CMAKE_SHLIB_SUFFIX%g
  3365. s%@CMAKE_MODULE_SUFFIX@%$CMAKE_MODULE_SUFFIX%g
  3366. s%@CMAKE_SHLIB_RUNTIME_FLAG@%$CMAKE_SHLIB_RUNTIME_FLAG%g
  3367. s%@CMAKE_SHLIB_RUNTIME_SEP@%$CMAKE_SHLIB_RUNTIME_SEP%g
  3368. s%@CMAKE_USE_SPROC@%$CMAKE_USE_SPROC%g
  3369. s%@CMAKE_USE_PTHREADS@%$CMAKE_USE_PTHREADS%g
  3370. s%@CMAKE_USE_WIN32_THREADS@%$CMAKE_USE_WIN32_THREADS%g
  3371. s%@CMAKE_HP_PTHREADS@%$CMAKE_HP_PTHREADS%g
  3372. s%@CMAKE_THREAD_LIBS@%$CMAKE_THREAD_LIBS%g
  3373. s%@CMAKE_ANSI_CFLAGS@%$CMAKE_ANSI_CFLAGS%g
  3374. s%@CMAKE_ANSI_CXXFLAGS@%$CMAKE_ANSI_CXXFLAGS%g
  3375. s%@CMAKE_TEMPLATE_FLAGS@%$CMAKE_TEMPLATE_FLAGS%g
  3376. s%@CMAKE_NO_ANSI_STREAM_HEADERS@%$CMAKE_NO_ANSI_STREAM_HEADERS%g
  3377. s%@CMAKE_NO_STD_NAMESPACE@%$CMAKE_NO_STD_NAMESPACE%g
  3378. s%@CMAKE_NO_ANSI_FOR_SCOPE@%$CMAKE_NO_ANSI_FOR_SCOPE%g
  3379. s%@RUNMAKE@%$RUNMAKE%g
  3380. s%@CMAKE_AR_TMP@%$CMAKE_AR_TMP%g
  3381. s%@CMAKE_AR@%$CMAKE_AR%g
  3382. s%@CMAKE_AR_ARGS@%$CMAKE_AR_ARGS%g
  3383. s%@CMAKE_SYSTEM@%$CMAKE_SYSTEM%g
  3384. s%@CMAKE_COMPILER_IS_GNUCXX@%$CMAKE_COMPILER_IS_GNUCXX%g
  3385. CEOF
  3386. EOF
  3387. cat >> $CONFIG_STATUS <<\EOF
  3388. # Split the substitutions into bite-sized pieces for seds with
  3389. # small command number limits, like on Digital OSF/1 and HP-UX.
  3390. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  3391. ac_file=1 # Number of current file.
  3392. ac_beg=1 # First line for current file.
  3393. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  3394. ac_more_lines=:
  3395. ac_sed_cmds=""
  3396. while $ac_more_lines; do
  3397. if test $ac_beg -gt 1; then
  3398. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  3399. else
  3400. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  3401. fi
  3402. if test ! -s conftest.s$ac_file; then
  3403. ac_more_lines=false
  3404. rm -f conftest.s$ac_file
  3405. else
  3406. if test -z "$ac_sed_cmds"; then
  3407. ac_sed_cmds="sed -f conftest.s$ac_file"
  3408. else
  3409. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  3410. fi
  3411. ac_file=`expr $ac_file + 1`
  3412. ac_beg=$ac_end
  3413. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  3414. fi
  3415. done
  3416. if test -z "$ac_sed_cmds"; then
  3417. ac_sed_cmds=cat
  3418. fi
  3419. EOF
  3420. cat >> $CONFIG_STATUS <<EOF
  3421. CONFIG_FILES=\${CONFIG_FILES-"CMakeSystemConfig.cmake "}
  3422. EOF
  3423. cat >> $CONFIG_STATUS <<\EOF
  3424. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  3425. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  3426. case "$ac_file" in
  3427. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  3428. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  3429. *) ac_file_in="${ac_file}.in" ;;
  3430. esac
  3431. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  3432. # Remove last slash and all that follows it. Not all systems have dirname.
  3433. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  3434. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  3435. # The file is in a subdirectory.
  3436. test ! -d "$ac_dir" && mkdir "$ac_dir"
  3437. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  3438. # A "../" for each directory in $ac_dir_suffix.
  3439. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  3440. else
  3441. ac_dir_suffix= ac_dots=
  3442. fi
  3443. case "$ac_given_srcdir" in
  3444. .) srcdir=.
  3445. if test -z "$ac_dots"; then top_srcdir=.
  3446. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  3447. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  3448. *) # Relative path.
  3449. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  3450. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  3451. esac
  3452. case "$ac_given_INSTALL" in
  3453. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  3454. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  3455. esac
  3456. echo creating "$ac_file"
  3457. rm -f "$ac_file"
  3458. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  3459. case "$ac_file" in
  3460. *Makefile*) ac_comsub="1i\\
  3461. # $configure_input" ;;
  3462. *) ac_comsub= ;;
  3463. esac
  3464. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  3465. sed -e "$ac_comsub
  3466. s%@configure_input@%$configure_input%g
  3467. s%@srcdir@%$srcdir%g
  3468. s%@top_srcdir@%$top_srcdir%g
  3469. s%@INSTALL@%$INSTALL%g
  3470. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  3471. fi; done
  3472. rm -f conftest.s*
  3473. EOF
  3474. cat >> $CONFIG_STATUS <<EOF
  3475. EOF
  3476. cat >> $CONFIG_STATUS <<\EOF
  3477. exit 0
  3478. EOF
  3479. chmod +x $CONFIG_STATUS
  3480. rm -fr confdefs* $ac_clean_files
  3481. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1