4
0

configure 70 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511
  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_default_prefix=/usr/local/nagios
  13. ac_help="$ac_help
  14. --enable-ssl enables native SSL support"
  15. ac_help="$ac_help
  16. --with-ssl-lib=DIR sets location of the SSL library"
  17. ac_help="$ac_help
  18. --with-ssl-inc=DIR sets location of the SSL include files"
  19. ac_help="$ac_help
  20. --with-nrpe-user=<user> sets user name to run NRPE"
  21. ac_help="$ac_help
  22. --with-nrpe-group=<group> sets group name to run NRPE"
  23. ac_help="$ac_help
  24. --with-nrpe-port=<port> sets port number for NRPE to listen on"
  25. ac_help="$ac_help
  26. --enable-command-args allows clients to specify command arguments. *** THIS IS A SECURITY RISK! *** Read the SECURITY file before using this option!"
  27. # Initialize some variables set by options.
  28. # The variables have the same names as the options, with
  29. # dashes changed to underlines.
  30. build=NONE
  31. cache_file=./config.cache
  32. exec_prefix=NONE
  33. host=NONE
  34. no_create=
  35. nonopt=NONE
  36. no_recursion=
  37. prefix=NONE
  38. program_prefix=NONE
  39. program_suffix=NONE
  40. program_transform_name=s,x,x,
  41. silent=
  42. site=
  43. srcdir=
  44. target=NONE
  45. verbose=
  46. x_includes=NONE
  47. x_libraries=NONE
  48. bindir='${exec_prefix}/bin'
  49. sbindir='${exec_prefix}/sbin'
  50. libexecdir='${exec_prefix}/libexec'
  51. datadir='${prefix}/share'
  52. sysconfdir='${prefix}/etc'
  53. sharedstatedir='${prefix}/com'
  54. localstatedir='${prefix}/var'
  55. libdir='${exec_prefix}/lib'
  56. includedir='${prefix}/include'
  57. oldincludedir='/usr/include'
  58. infodir='${prefix}/info'
  59. mandir='${prefix}/man'
  60. # Initialize some other variables.
  61. subdirs=
  62. MFLAGS= MAKEFLAGS=
  63. SHELL=${CONFIG_SHELL-/bin/sh}
  64. # Maximum number of lines to put in a shell here document.
  65. ac_max_here_lines=12
  66. ac_prev=
  67. for ac_option
  68. do
  69. # If the previous option needs an argument, assign it.
  70. if test -n "$ac_prev"; then
  71. eval "$ac_prev=\$ac_option"
  72. ac_prev=
  73. continue
  74. fi
  75. case "$ac_option" in
  76. -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  77. *) ac_optarg= ;;
  78. esac
  79. # Accept the important Cygnus configure options, so we can diagnose typos.
  80. case "$ac_option" in
  81. -bindir | --bindir | --bindi | --bind | --bin | --bi)
  82. ac_prev=bindir ;;
  83. -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
  84. bindir="$ac_optarg" ;;
  85. -build | --build | --buil | --bui | --bu)
  86. ac_prev=build ;;
  87. -build=* | --build=* | --buil=* | --bui=* | --bu=*)
  88. build="$ac_optarg" ;;
  89. -cache-file | --cache-file | --cache-fil | --cache-fi \
  90. | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  91. ac_prev=cache_file ;;
  92. -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  93. | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  94. cache_file="$ac_optarg" ;;
  95. -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
  96. ac_prev=datadir ;;
  97. -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
  98. | --da=*)
  99. datadir="$ac_optarg" ;;
  100. -disable-* | --disable-*)
  101. ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  102. # Reject names that are not valid shell variable names.
  103. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  104. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  105. fi
  106. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  107. eval "enable_${ac_feature}=no" ;;
  108. -enable-* | --enable-*)
  109. ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  110. # Reject names that are not valid shell variable names.
  111. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  112. { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  113. fi
  114. ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  115. case "$ac_option" in
  116. *=*) ;;
  117. *) ac_optarg=yes ;;
  118. esac
  119. eval "enable_${ac_feature}='$ac_optarg'" ;;
  120. -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  121. | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  122. | --exec | --exe | --ex)
  123. ac_prev=exec_prefix ;;
  124. -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  125. | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  126. | --exec=* | --exe=* | --ex=*)
  127. exec_prefix="$ac_optarg" ;;
  128. -gas | --gas | --ga | --g)
  129. # Obsolete; use --with-gas.
  130. with_gas=yes ;;
  131. -help | --help | --hel | --he)
  132. # Omit some internal or obsolete options to make the list less imposing.
  133. # This message is too long to be a string in the A/UX 3.1 sh.
  134. cat << EOF
  135. Usage: configure [options] [host]
  136. Options: [defaults in brackets after descriptions]
  137. Configuration:
  138. --cache-file=FILE cache test results in FILE
  139. --help print this message
  140. --no-create do not create output files
  141. --quiet, --silent do not print \`checking...' messages
  142. --version print the version of autoconf that created configure
  143. Directory and file names:
  144. --prefix=PREFIX install architecture-independent files in PREFIX
  145. [$ac_default_prefix]
  146. --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
  147. [same as prefix]
  148. --bindir=DIR user executables in DIR [EPREFIX/bin]
  149. --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
  150. --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
  151. --datadir=DIR read-only architecture-independent data in DIR
  152. [PREFIX/share]
  153. --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
  154. --sharedstatedir=DIR modifiable architecture-independent data in DIR
  155. [PREFIX/com]
  156. --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
  157. --libdir=DIR object code libraries in DIR [EPREFIX/lib]
  158. --includedir=DIR C header files in DIR [PREFIX/include]
  159. --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
  160. --infodir=DIR info documentation in DIR [PREFIX/info]
  161. --mandir=DIR man documentation in DIR [PREFIX/man]
  162. --srcdir=DIR find the sources in DIR [configure dir or ..]
  163. --program-prefix=PREFIX prepend PREFIX to installed program names
  164. --program-suffix=SUFFIX append SUFFIX to installed program names
  165. --program-transform-name=PROGRAM
  166. run sed PROGRAM on installed program names
  167. EOF
  168. cat << EOF
  169. Host type:
  170. --build=BUILD configure for building on BUILD [BUILD=HOST]
  171. --host=HOST configure for HOST [guessed]
  172. --target=TARGET configure for TARGET [TARGET=HOST]
  173. Features and packages:
  174. --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
  175. --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
  176. --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
  177. --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
  178. --x-includes=DIR X include files are in DIR
  179. --x-libraries=DIR X library files are in DIR
  180. EOF
  181. if test -n "$ac_help"; then
  182. echo "--enable and --with options recognized:$ac_help"
  183. fi
  184. exit 0 ;;
  185. -host | --host | --hos | --ho)
  186. ac_prev=host ;;
  187. -host=* | --host=* | --hos=* | --ho=*)
  188. host="$ac_optarg" ;;
  189. -includedir | --includedir | --includedi | --included | --include \
  190. | --includ | --inclu | --incl | --inc)
  191. ac_prev=includedir ;;
  192. -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
  193. | --includ=* | --inclu=* | --incl=* | --inc=*)
  194. includedir="$ac_optarg" ;;
  195. -infodir | --infodir | --infodi | --infod | --info | --inf)
  196. ac_prev=infodir ;;
  197. -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
  198. infodir="$ac_optarg" ;;
  199. -libdir | --libdir | --libdi | --libd)
  200. ac_prev=libdir ;;
  201. -libdir=* | --libdir=* | --libdi=* | --libd=*)
  202. libdir="$ac_optarg" ;;
  203. -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
  204. | --libexe | --libex | --libe)
  205. ac_prev=libexecdir ;;
  206. -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
  207. | --libexe=* | --libex=* | --libe=*)
  208. libexecdir="$ac_optarg" ;;
  209. -localstatedir | --localstatedir | --localstatedi | --localstated \
  210. | --localstate | --localstat | --localsta | --localst \
  211. | --locals | --local | --loca | --loc | --lo)
  212. ac_prev=localstatedir ;;
  213. -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
  214. | --localstate=* | --localstat=* | --localsta=* | --localst=* \
  215. | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
  216. localstatedir="$ac_optarg" ;;
  217. -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
  218. ac_prev=mandir ;;
  219. -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
  220. mandir="$ac_optarg" ;;
  221. -nfp | --nfp | --nf)
  222. # Obsolete; use --without-fp.
  223. with_fp=no ;;
  224. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  225. | --no-cr | --no-c)
  226. no_create=yes ;;
  227. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  228. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  229. no_recursion=yes ;;
  230. -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
  231. | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
  232. | --oldin | --oldi | --old | --ol | --o)
  233. ac_prev=oldincludedir ;;
  234. -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
  235. | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
  236. | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
  237. oldincludedir="$ac_optarg" ;;
  238. -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  239. ac_prev=prefix ;;
  240. -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  241. prefix="$ac_optarg" ;;
  242. -program-prefix | --program-prefix | --program-prefi | --program-pref \
  243. | --program-pre | --program-pr | --program-p)
  244. ac_prev=program_prefix ;;
  245. -program-prefix=* | --program-prefix=* | --program-prefi=* \
  246. | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  247. program_prefix="$ac_optarg" ;;
  248. -program-suffix | --program-suffix | --program-suffi | --program-suff \
  249. | --program-suf | --program-su | --program-s)
  250. ac_prev=program_suffix ;;
  251. -program-suffix=* | --program-suffix=* | --program-suffi=* \
  252. | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  253. program_suffix="$ac_optarg" ;;
  254. -program-transform-name | --program-transform-name \
  255. | --program-transform-nam | --program-transform-na \
  256. | --program-transform-n | --program-transform- \
  257. | --program-transform | --program-transfor \
  258. | --program-transfo | --program-transf \
  259. | --program-trans | --program-tran \
  260. | --progr-tra | --program-tr | --program-t)
  261. ac_prev=program_transform_name ;;
  262. -program-transform-name=* | --program-transform-name=* \
  263. | --program-transform-nam=* | --program-transform-na=* \
  264. | --program-transform-n=* | --program-transform-=* \
  265. | --program-transform=* | --program-transfor=* \
  266. | --program-transfo=* | --program-transf=* \
  267. | --program-trans=* | --program-tran=* \
  268. | --progr-tra=* | --program-tr=* | --program-t=*)
  269. program_transform_name="$ac_optarg" ;;
  270. -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  271. | -silent | --silent | --silen | --sile | --sil)
  272. silent=yes ;;
  273. -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
  274. ac_prev=sbindir ;;
  275. -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
  276. | --sbi=* | --sb=*)
  277. sbindir="$ac_optarg" ;;
  278. -sharedstatedir | --sharedstatedir | --sharedstatedi \
  279. | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
  280. | --sharedst | --shareds | --shared | --share | --shar \
  281. | --sha | --sh)
  282. ac_prev=sharedstatedir ;;
  283. -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
  284. | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
  285. | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
  286. | --sha=* | --sh=*)
  287. sharedstatedir="$ac_optarg" ;;
  288. -site | --site | --sit)
  289. ac_prev=site ;;
  290. -site=* | --site=* | --sit=*)
  291. site="$ac_optarg" ;;
  292. -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  293. ac_prev=srcdir ;;
  294. -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  295. srcdir="$ac_optarg" ;;
  296. -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
  297. | --syscon | --sysco | --sysc | --sys | --sy)
  298. ac_prev=sysconfdir ;;
  299. -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
  300. | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
  301. sysconfdir="$ac_optarg" ;;
  302. -target | --target | --targe | --targ | --tar | --ta | --t)
  303. ac_prev=target ;;
  304. -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  305. target="$ac_optarg" ;;
  306. -v | -verbose | --verbose | --verbos | --verbo | --verb)
  307. verbose=yes ;;
  308. -version | --version | --versio | --versi | --vers)
  309. echo "configure generated by autoconf version 2.13"
  310. exit 0 ;;
  311. -with-* | --with-*)
  312. ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  313. # Reject names that are not valid shell variable names.
  314. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  315. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  316. fi
  317. ac_package=`echo $ac_package| sed 's/-/_/g'`
  318. case "$ac_option" in
  319. *=*) ;;
  320. *) ac_optarg=yes ;;
  321. esac
  322. eval "with_${ac_package}='$ac_optarg'" ;;
  323. -without-* | --without-*)
  324. ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  325. # Reject names that are not valid shell variable names.
  326. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  327. { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  328. fi
  329. ac_package=`echo $ac_package| sed 's/-/_/g'`
  330. eval "with_${ac_package}=no" ;;
  331. --x)
  332. # Obsolete; use --with-x.
  333. with_x=yes ;;
  334. -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  335. | --x-incl | --x-inc | --x-in | --x-i)
  336. ac_prev=x_includes ;;
  337. -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  338. | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  339. x_includes="$ac_optarg" ;;
  340. -x-libraries | --x-libraries | --x-librarie | --x-librari \
  341. | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  342. ac_prev=x_libraries ;;
  343. -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  344. | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  345. x_libraries="$ac_optarg" ;;
  346. -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  347. ;;
  348. *)
  349. if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  350. echo "configure: warning: $ac_option: invalid host type" 1>&2
  351. fi
  352. if test "x$nonopt" != xNONE; then
  353. { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  354. fi
  355. nonopt="$ac_option"
  356. ;;
  357. esac
  358. done
  359. if test -n "$ac_prev"; then
  360. { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  361. fi
  362. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  363. # File descriptor usage:
  364. # 0 standard input
  365. # 1 file creation
  366. # 2 errors and warnings
  367. # 3 some systems may open it to /dev/tty
  368. # 4 used on the Kubota Titan
  369. # 6 checking for... messages and results
  370. # 5 compiler messages saved in config.log
  371. if test "$silent" = yes; then
  372. exec 6>/dev/null
  373. else
  374. exec 6>&1
  375. fi
  376. exec 5>./config.log
  377. echo "\
  378. This file contains any messages produced by compilers while
  379. running configure, to aid debugging if configure makes a mistake.
  380. " 1>&5
  381. # Strip out --no-create and --no-recursion so they do not pile up.
  382. # Also quote any args containing shell metacharacters.
  383. ac_configure_args=
  384. for ac_arg
  385. do
  386. case "$ac_arg" in
  387. -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  388. | --no-cr | --no-c) ;;
  389. -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  390. | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  391. *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  392. ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  393. *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  394. esac
  395. done
  396. # NLS nuisances.
  397. # Only set these to C if already set. These must not be set unconditionally
  398. # because not all systems understand e.g. LANG=C (notably SCO).
  399. # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
  400. # Non-C LC_CTYPE values break the ctype check.
  401. if test "${LANG+set}" = set; then LANG=C; export LANG; fi
  402. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  403. if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
  404. if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
  405. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  406. rm -rf conftest* confdefs.h
  407. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  408. echo > confdefs.h
  409. # A filename unique to this package, relative to the directory that
  410. # configure is in, which we can look for to find out if srcdir is correct.
  411. ac_unique_file=src/nrpe.c
  412. # Find the source files, if location was not specified.
  413. if test -z "$srcdir"; then
  414. ac_srcdir_defaulted=yes
  415. # Try the directory containing this script, then its parent.
  416. ac_prog=$0
  417. ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  418. test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  419. srcdir=$ac_confdir
  420. if test ! -r $srcdir/$ac_unique_file; then
  421. srcdir=..
  422. fi
  423. else
  424. ac_srcdir_defaulted=no
  425. fi
  426. if test ! -r $srcdir/$ac_unique_file; then
  427. if test "$ac_srcdir_defaulted" = yes; then
  428. { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  429. else
  430. { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  431. fi
  432. fi
  433. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  434. # Prefer explicitly selected file to automatically selected ones.
  435. if test -z "$CONFIG_SITE"; then
  436. if test "x$prefix" != xNONE; then
  437. CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  438. else
  439. CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  440. fi
  441. fi
  442. for ac_site_file in $CONFIG_SITE; do
  443. if test -r "$ac_site_file"; then
  444. echo "loading site script $ac_site_file"
  445. . "$ac_site_file"
  446. fi
  447. done
  448. ac_ext=c
  449. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  450. ac_cpp='$CPP $CPPFLAGS'
  451. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  452. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  453. cross_compiling=$ac_cv_prog_cc_cross
  454. ac_exeext=
  455. ac_objext=o
  456. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  457. # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  458. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  459. ac_n= ac_c='
  460. ' ac_t=' '
  461. else
  462. ac_n=-n ac_c= ac_t=
  463. fi
  464. else
  465. ac_n= ac_c='\c' ac_t=
  466. fi
  467. PKG_NAME=nrpe
  468. PKG_VERSION="2.0a1"
  469. PKG_HOME_URL="http://www.nagios.org/"
  470. PKG_REL_DATE="01-30-2003"
  471. ac_aux_dir=
  472. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  473. if test -f $ac_dir/install-sh; then
  474. ac_aux_dir=$ac_dir
  475. ac_install_sh="$ac_aux_dir/install-sh -c"
  476. break
  477. elif test -f $ac_dir/install.sh; then
  478. ac_aux_dir=$ac_dir
  479. ac_install_sh="$ac_aux_dir/install.sh -c"
  480. break
  481. fi
  482. done
  483. if test -z "$ac_aux_dir"; then
  484. { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  485. fi
  486. ac_config_guess=$ac_aux_dir/config.guess
  487. ac_config_sub=$ac_aux_dir/config.sub
  488. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  489. # Find a good install program. We prefer a C program (faster),
  490. # so one script is as good as another. But avoid the broken or
  491. # incompatible versions:
  492. # SysV /etc/install, /usr/sbin/install
  493. # SunOS /usr/etc/install
  494. # IRIX /sbin/install
  495. # AIX /bin/install
  496. # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
  497. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  498. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  499. # ./install, which can be erroneously created by make from ./install.sh.
  500. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  501. echo "configure:573: checking for a BSD compatible install" >&5
  502. if test -z "$INSTALL"; then
  503. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  504. echo $ac_n "(cached) $ac_c" 1>&6
  505. else
  506. IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":"
  507. for ac_dir in $PATH; do
  508. # Account for people who put trailing slashes in PATH elements.
  509. case "$ac_dir/" in
  510. /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  511. *)
  512. # OSF1 and SCO ODT 3.0 have their own names for install.
  513. # Don't use installbsd from OSF since it installs stuff as root
  514. # by default.
  515. for ac_prog in ginstall scoinst install; do
  516. if test -f $ac_dir/$ac_prog; then
  517. if test $ac_prog = install &&
  518. grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  519. # AIX install. It has an incompatible calling convention.
  520. :
  521. else
  522. ac_cv_path_install="$ac_dir/$ac_prog -c"
  523. break 2
  524. fi
  525. fi
  526. done
  527. ;;
  528. esac
  529. done
  530. IFS="$ac_save_IFS"
  531. fi
  532. if test "${ac_cv_path_install+set}" = set; then
  533. INSTALL="$ac_cv_path_install"
  534. else
  535. # As a last resort, use the slow shell script. We don't cache a
  536. # path for INSTALL within a source directory, because that will
  537. # break other packages using the cache if that directory is
  538. # removed, or if the path is relative.
  539. INSTALL="$ac_install_sh"
  540. fi
  541. fi
  542. echo "$ac_t""$INSTALL" 1>&6
  543. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  544. # It thinks the first close brace ends the variable substitution.
  545. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  546. test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
  547. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  548. # Extract the first word of "gcc", so it can be a program name with args.
  549. set dummy gcc; ac_word=$2
  550. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  551. echo "configure:630: checking for $ac_word" >&5
  552. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  553. echo $ac_n "(cached) $ac_c" 1>&6
  554. else
  555. if test -n "$CC"; then
  556. ac_cv_prog_CC="$CC" # Let the user override the test.
  557. else
  558. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  559. ac_dummy="$PATH"
  560. for ac_dir in $ac_dummy; do
  561. test -z "$ac_dir" && ac_dir=.
  562. if test -f $ac_dir/$ac_word; then
  563. ac_cv_prog_CC="gcc"
  564. break
  565. fi
  566. done
  567. IFS="$ac_save_ifs"
  568. fi
  569. fi
  570. CC="$ac_cv_prog_CC"
  571. if test -n "$CC"; then
  572. echo "$ac_t""$CC" 1>&6
  573. else
  574. echo "$ac_t""no" 1>&6
  575. fi
  576. if test -z "$CC"; then
  577. # Extract the first word of "cc", so it can be a program name with args.
  578. set dummy cc; ac_word=$2
  579. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  580. echo "configure:660: checking for $ac_word" >&5
  581. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  582. echo $ac_n "(cached) $ac_c" 1>&6
  583. else
  584. if test -n "$CC"; then
  585. ac_cv_prog_CC="$CC" # Let the user override the test.
  586. else
  587. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  588. ac_prog_rejected=no
  589. ac_dummy="$PATH"
  590. for ac_dir in $ac_dummy; do
  591. test -z "$ac_dir" && ac_dir=.
  592. if test -f $ac_dir/$ac_word; then
  593. if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
  594. ac_prog_rejected=yes
  595. continue
  596. fi
  597. ac_cv_prog_CC="cc"
  598. break
  599. fi
  600. done
  601. IFS="$ac_save_ifs"
  602. if test $ac_prog_rejected = yes; then
  603. # We found a bogon in the path, so make sure we never use it.
  604. set dummy $ac_cv_prog_CC
  605. shift
  606. if test $# -gt 0; then
  607. # We chose a different compiler from the bogus one.
  608. # However, it has the same basename, so the bogon will be chosen
  609. # first if we set CC to just the basename; use the full file name.
  610. shift
  611. set dummy "$ac_dir/$ac_word" "$@"
  612. shift
  613. ac_cv_prog_CC="$@"
  614. fi
  615. fi
  616. fi
  617. fi
  618. CC="$ac_cv_prog_CC"
  619. if test -n "$CC"; then
  620. echo "$ac_t""$CC" 1>&6
  621. else
  622. echo "$ac_t""no" 1>&6
  623. fi
  624. if test -z "$CC"; then
  625. case "`uname -s`" in
  626. *win32* | *WIN32*)
  627. # Extract the first word of "cl", so it can be a program name with args.
  628. set dummy cl; ac_word=$2
  629. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  630. echo "configure:711: checking for $ac_word" >&5
  631. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  632. echo $ac_n "(cached) $ac_c" 1>&6
  633. else
  634. if test -n "$CC"; then
  635. ac_cv_prog_CC="$CC" # Let the user override the test.
  636. else
  637. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  638. ac_dummy="$PATH"
  639. for ac_dir in $ac_dummy; do
  640. test -z "$ac_dir" && ac_dir=.
  641. if test -f $ac_dir/$ac_word; then
  642. ac_cv_prog_CC="cl"
  643. break
  644. fi
  645. done
  646. IFS="$ac_save_ifs"
  647. fi
  648. fi
  649. CC="$ac_cv_prog_CC"
  650. if test -n "$CC"; then
  651. echo "$ac_t""$CC" 1>&6
  652. else
  653. echo "$ac_t""no" 1>&6
  654. fi
  655. ;;
  656. esac
  657. fi
  658. test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
  659. fi
  660. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
  661. echo "configure:743: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
  662. ac_ext=c
  663. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  664. ac_cpp='$CPP $CPPFLAGS'
  665. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  666. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  667. cross_compiling=$ac_cv_prog_cc_cross
  668. cat > conftest.$ac_ext << EOF
  669. #line 754 "configure"
  670. #include "confdefs.h"
  671. main(){return(0);}
  672. EOF
  673. if { (eval echo configure:759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  674. ac_cv_prog_cc_works=yes
  675. # If we can't run a trivial program, we are probably using a cross compiler.
  676. if (./conftest; exit) 2>/dev/null; then
  677. ac_cv_prog_cc_cross=no
  678. else
  679. ac_cv_prog_cc_cross=yes
  680. fi
  681. else
  682. echo "configure: failed program was:" >&5
  683. cat conftest.$ac_ext >&5
  684. ac_cv_prog_cc_works=no
  685. fi
  686. rm -fr conftest*
  687. ac_ext=c
  688. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  689. ac_cpp='$CPP $CPPFLAGS'
  690. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
  691. ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
  692. cross_compiling=$ac_cv_prog_cc_cross
  693. echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
  694. if test $ac_cv_prog_cc_works = no; then
  695. { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
  696. fi
  697. echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
  698. echo "configure:785: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
  699. echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
  700. cross_compiling=$ac_cv_prog_cc_cross
  701. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  702. echo "configure:790: checking whether we are using GNU C" >&5
  703. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  704. echo $ac_n "(cached) $ac_c" 1>&6
  705. else
  706. cat > conftest.c <<EOF
  707. #ifdef __GNUC__
  708. yes;
  709. #endif
  710. EOF
  711. if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:799: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
  712. ac_cv_prog_gcc=yes
  713. else
  714. ac_cv_prog_gcc=no
  715. fi
  716. fi
  717. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  718. if test $ac_cv_prog_gcc = yes; then
  719. GCC=yes
  720. else
  721. GCC=
  722. fi
  723. ac_test_CFLAGS="${CFLAGS+set}"
  724. ac_save_CFLAGS="$CFLAGS"
  725. CFLAGS=
  726. echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  727. echo "configure:818: checking whether ${CC-cc} accepts -g" >&5
  728. if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
  729. echo $ac_n "(cached) $ac_c" 1>&6
  730. else
  731. echo 'void f(){}' > conftest.c
  732. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  733. ac_cv_prog_cc_g=yes
  734. else
  735. ac_cv_prog_cc_g=no
  736. fi
  737. rm -f conftest*
  738. fi
  739. echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
  740. if test "$ac_test_CFLAGS" = set; then
  741. CFLAGS="$ac_save_CFLAGS"
  742. elif test $ac_cv_prog_cc_g = yes; then
  743. if test "$GCC" = yes; then
  744. CFLAGS="-g -O2"
  745. else
  746. CFLAGS="-g"
  747. fi
  748. else
  749. if test "$GCC" = yes; then
  750. CFLAGS="-O2"
  751. else
  752. CFLAGS=
  753. fi
  754. fi
  755. echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
  756. echo "configure:850: checking whether ${MAKE-make} sets \${MAKE}" >&5
  757. set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
  758. if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
  759. echo $ac_n "(cached) $ac_c" 1>&6
  760. else
  761. cat > conftestmake <<\EOF
  762. all:
  763. @echo 'ac_maketemp="${MAKE}"'
  764. EOF
  765. # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
  766. eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
  767. if test -n "$ac_maketemp"; then
  768. eval ac_cv_prog_make_${ac_make}_set=yes
  769. else
  770. eval ac_cv_prog_make_${ac_make}_set=no
  771. fi
  772. rm -f conftestmake
  773. fi
  774. if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
  775. echo "$ac_t""yes" 1>&6
  776. SET_MAKE=
  777. else
  778. echo "$ac_t""no" 1>&6
  779. SET_MAKE="MAKE=${MAKE-make}"
  780. fi
  781. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  782. echo "configure:878: checking how to run the C preprocessor" >&5
  783. # On Suns, sometimes $CPP names a directory.
  784. if test -n "$CPP" && test -d "$CPP"; then
  785. CPP=
  786. fi
  787. if test -z "$CPP"; then
  788. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  789. echo $ac_n "(cached) $ac_c" 1>&6
  790. else
  791. # This must be in double quotes, not single quotes, because CPP may get
  792. # substituted into the Makefile and "${CC-cc}" will confuse make.
  793. CPP="${CC-cc} -E"
  794. # On the NeXT, cc -E runs the code through the compiler's parser,
  795. # not just through cpp.
  796. cat > conftest.$ac_ext <<EOF
  797. #line 893 "configure"
  798. #include "confdefs.h"
  799. #include <assert.h>
  800. Syntax Error
  801. EOF
  802. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  803. { (eval echo configure:899: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  804. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  805. if test -z "$ac_err"; then
  806. :
  807. else
  808. echo "$ac_err" >&5
  809. echo "configure: failed program was:" >&5
  810. cat conftest.$ac_ext >&5
  811. rm -rf conftest*
  812. CPP="${CC-cc} -E -traditional-cpp"
  813. cat > conftest.$ac_ext <<EOF
  814. #line 910 "configure"
  815. #include "confdefs.h"
  816. #include <assert.h>
  817. Syntax Error
  818. EOF
  819. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  820. { (eval echo configure:916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  821. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  822. if test -z "$ac_err"; then
  823. :
  824. else
  825. echo "$ac_err" >&5
  826. echo "configure: failed program was:" >&5
  827. cat conftest.$ac_ext >&5
  828. rm -rf conftest*
  829. CPP="${CC-cc} -nologo -E"
  830. cat > conftest.$ac_ext <<EOF
  831. #line 927 "configure"
  832. #include "confdefs.h"
  833. #include <assert.h>
  834. Syntax Error
  835. EOF
  836. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  837. { (eval echo configure:933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  838. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  839. if test -z "$ac_err"; then
  840. :
  841. else
  842. echo "$ac_err" >&5
  843. echo "configure: failed program was:" >&5
  844. cat conftest.$ac_ext >&5
  845. rm -rf conftest*
  846. CPP=/lib/cpp
  847. fi
  848. rm -f conftest*
  849. fi
  850. rm -f conftest*
  851. fi
  852. rm -f conftest*
  853. ac_cv_prog_CPP="$CPP"
  854. fi
  855. CPP="$ac_cv_prog_CPP"
  856. else
  857. ac_cv_prog_CPP="$CPP"
  858. fi
  859. echo "$ac_t""$CPP" 1>&6
  860. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
  861. echo "configure:958: checking for ANSI C header files" >&5
  862. if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
  863. echo $ac_n "(cached) $ac_c" 1>&6
  864. else
  865. cat > conftest.$ac_ext <<EOF
  866. #line 963 "configure"
  867. #include "confdefs.h"
  868. #include <stdlib.h>
  869. #include <stdarg.h>
  870. #include <string.h>
  871. #include <float.h>
  872. EOF
  873. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  874. { (eval echo configure:971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  875. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  876. if test -z "$ac_err"; then
  877. rm -rf conftest*
  878. ac_cv_header_stdc=yes
  879. else
  880. echo "$ac_err" >&5
  881. echo "configure: failed program was:" >&5
  882. cat conftest.$ac_ext >&5
  883. rm -rf conftest*
  884. ac_cv_header_stdc=no
  885. fi
  886. rm -f conftest*
  887. if test $ac_cv_header_stdc = yes; then
  888. # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
  889. cat > conftest.$ac_ext <<EOF
  890. #line 988 "configure"
  891. #include "confdefs.h"
  892. #include <string.h>
  893. EOF
  894. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  895. egrep "memchr" >/dev/null 2>&1; then
  896. :
  897. else
  898. rm -rf conftest*
  899. ac_cv_header_stdc=no
  900. fi
  901. rm -f conftest*
  902. fi
  903. if test $ac_cv_header_stdc = yes; then
  904. # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
  905. cat > conftest.$ac_ext <<EOF
  906. #line 1006 "configure"
  907. #include "confdefs.h"
  908. #include <stdlib.h>
  909. EOF
  910. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  911. egrep "free" >/dev/null 2>&1; then
  912. :
  913. else
  914. rm -rf conftest*
  915. ac_cv_header_stdc=no
  916. fi
  917. rm -f conftest*
  918. fi
  919. if test $ac_cv_header_stdc = yes; then
  920. # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
  921. if test "$cross_compiling" = yes; then
  922. :
  923. else
  924. cat > conftest.$ac_ext <<EOF
  925. #line 1027 "configure"
  926. #include "confdefs.h"
  927. #include <ctype.h>
  928. #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
  929. #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
  930. #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
  931. int main () { int i; for (i = 0; i < 256; i++)
  932. if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
  933. exit (0); }
  934. EOF
  935. if { (eval echo configure:1038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  936. then
  937. :
  938. else
  939. echo "configure: failed program was:" >&5
  940. cat conftest.$ac_ext >&5
  941. rm -fr conftest*
  942. ac_cv_header_stdc=no
  943. fi
  944. rm -fr conftest*
  945. fi
  946. fi
  947. fi
  948. echo "$ac_t""$ac_cv_header_stdc" 1>&6
  949. if test $ac_cv_header_stdc = yes; then
  950. cat >> confdefs.h <<\EOF
  951. #define STDC_HEADERS 1
  952. EOF
  953. fi
  954. echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
  955. echo "configure:1062: checking whether time.h and sys/time.h may both be included" >&5
  956. if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then
  957. echo $ac_n "(cached) $ac_c" 1>&6
  958. else
  959. cat > conftest.$ac_ext <<EOF
  960. #line 1067 "configure"
  961. #include "confdefs.h"
  962. #include <sys/types.h>
  963. #include <sys/time.h>
  964. #include <time.h>
  965. int main() {
  966. struct tm *tp;
  967. ; return 0; }
  968. EOF
  969. if { (eval echo configure:1076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  970. rm -rf conftest*
  971. ac_cv_header_time=yes
  972. else
  973. echo "configure: failed program was:" >&5
  974. cat conftest.$ac_ext >&5
  975. rm -rf conftest*
  976. ac_cv_header_time=no
  977. fi
  978. rm -f conftest*
  979. fi
  980. echo "$ac_t""$ac_cv_header_time" 1>&6
  981. if test $ac_cv_header_time = yes; then
  982. cat >> confdefs.h <<\EOF
  983. #define TIME_WITH_SYS_TIME 1
  984. EOF
  985. fi
  986. echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
  987. echo "configure:1097: checking for sys/wait.h that is POSIX.1 compatible" >&5
  988. if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
  989. echo $ac_n "(cached) $ac_c" 1>&6
  990. else
  991. cat > conftest.$ac_ext <<EOF
  992. #line 1102 "configure"
  993. #include "confdefs.h"
  994. #include <sys/types.h>
  995. #include <sys/wait.h>
  996. #ifndef WEXITSTATUS
  997. #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
  998. #endif
  999. #ifndef WIFEXITED
  1000. #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
  1001. #endif
  1002. int main() {
  1003. int s;
  1004. wait (&s);
  1005. s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
  1006. ; return 0; }
  1007. EOF
  1008. if { (eval echo configure:1118: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1009. rm -rf conftest*
  1010. ac_cv_header_sys_wait_h=yes
  1011. else
  1012. echo "configure: failed program was:" >&5
  1013. cat conftest.$ac_ext >&5
  1014. rm -rf conftest*
  1015. ac_cv_header_sys_wait_h=no
  1016. fi
  1017. rm -f conftest*
  1018. fi
  1019. echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
  1020. if test $ac_cv_header_sys_wait_h = yes; then
  1021. cat >> confdefs.h <<\EOF
  1022. #define HAVE_SYS_WAIT_H 1
  1023. EOF
  1024. fi
  1025. for ac_hdr in ctype.h errno.h fcntl.h getopt.h grp.h netdb.h pwd.h signal.h strings.h string.h syslog.h unistd.h arpa/inet.h netinet/in.h sys/types.h sys/time.h sys/resource.h sys/wait.h sys/socket.h sys/stat.h
  1026. do
  1027. ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
  1028. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1029. echo "configure:1142: checking for $ac_hdr" >&5
  1030. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1031. echo $ac_n "(cached) $ac_c" 1>&6
  1032. else
  1033. cat > conftest.$ac_ext <<EOF
  1034. #line 1147 "configure"
  1035. #include "confdefs.h"
  1036. #include <$ac_hdr>
  1037. EOF
  1038. ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1039. { (eval echo configure:1152: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
  1040. ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
  1041. if test -z "$ac_err"; then
  1042. rm -rf conftest*
  1043. eval "ac_cv_header_$ac_safe=yes"
  1044. else
  1045. echo "$ac_err" >&5
  1046. echo "configure: failed program was:" >&5
  1047. cat conftest.$ac_ext >&5
  1048. rm -rf conftest*
  1049. eval "ac_cv_header_$ac_safe=no"
  1050. fi
  1051. rm -f conftest*
  1052. fi
  1053. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1054. echo "$ac_t""yes" 1>&6
  1055. ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
  1056. cat >> confdefs.h <<EOF
  1057. #define $ac_tr_hdr 1
  1058. EOF
  1059. else
  1060. echo "$ac_t""no" 1>&6
  1061. fi
  1062. done
  1063. echo $ac_n "checking for working const""... $ac_c" 1>&6
  1064. echo "configure:1180: checking for working const" >&5
  1065. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  1066. echo $ac_n "(cached) $ac_c" 1>&6
  1067. else
  1068. cat > conftest.$ac_ext <<EOF
  1069. #line 1185 "configure"
  1070. #include "confdefs.h"
  1071. int main() {
  1072. /* Ultrix mips cc rejects this. */
  1073. typedef int charset[2]; const charset x;
  1074. /* SunOS 4.1.1 cc rejects this. */
  1075. char const *const *ccp;
  1076. char **p;
  1077. /* NEC SVR4.0.2 mips cc rejects this. */
  1078. struct point {int x, y;};
  1079. static struct point const zero = {0,0};
  1080. /* AIX XL C 1.02.0.0 rejects this.
  1081. It does not let you subtract one const X* pointer from another in an arm
  1082. of an if-expression whose if-part is not a constant expression */
  1083. const char *g = "string";
  1084. ccp = &g + (g ? g-g : 0);
  1085. /* HPUX 7.0 cc rejects these. */
  1086. ++ccp;
  1087. p = (char**) ccp;
  1088. ccp = (char const *const *) p;
  1089. { /* SCO 3.2v4 cc rejects this. */
  1090. char *t;
  1091. char const *s = 0 ? (char *) 0 : (char const *) 0;
  1092. *t++ = 0;
  1093. }
  1094. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
  1095. int x[] = {25, 17};
  1096. const int *foo = &x[0];
  1097. ++foo;
  1098. }
  1099. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  1100. typedef const int *iptr;
  1101. iptr p = 0;
  1102. ++p;
  1103. }
  1104. { /* AIX XL C 1.02.0.0 rejects this saying
  1105. "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  1106. struct s { int j; const int *ap[3]; };
  1107. struct s *b; b->j = 5;
  1108. }
  1109. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  1110. const int foo = 10;
  1111. }
  1112. ; return 0; }
  1113. EOF
  1114. if { (eval echo configure:1234: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1115. rm -rf conftest*
  1116. ac_cv_c_const=yes
  1117. else
  1118. echo "configure: failed program was:" >&5
  1119. cat conftest.$ac_ext >&5
  1120. rm -rf conftest*
  1121. ac_cv_c_const=no
  1122. fi
  1123. rm -f conftest*
  1124. fi
  1125. echo "$ac_t""$ac_cv_c_const" 1>&6
  1126. if test $ac_cv_c_const = no; then
  1127. cat >> confdefs.h <<\EOF
  1128. #define const
  1129. EOF
  1130. fi
  1131. echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
  1132. echo "configure:1255: checking whether struct tm is in sys/time.h or time.h" >&5
  1133. if eval "test \"`echo '$''{'ac_cv_struct_tm'+set}'`\" = set"; then
  1134. echo $ac_n "(cached) $ac_c" 1>&6
  1135. else
  1136. cat > conftest.$ac_ext <<EOF
  1137. #line 1260 "configure"
  1138. #include "confdefs.h"
  1139. #include <sys/types.h>
  1140. #include <time.h>
  1141. int main() {
  1142. struct tm *tp; tp->tm_sec;
  1143. ; return 0; }
  1144. EOF
  1145. if { (eval echo configure:1268: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1146. rm -rf conftest*
  1147. ac_cv_struct_tm=time.h
  1148. else
  1149. echo "configure: failed program was:" >&5
  1150. cat conftest.$ac_ext >&5
  1151. rm -rf conftest*
  1152. ac_cv_struct_tm=sys/time.h
  1153. fi
  1154. rm -f conftest*
  1155. fi
  1156. echo "$ac_t""$ac_cv_struct_tm" 1>&6
  1157. if test $ac_cv_struct_tm = sys/time.h; then
  1158. cat >> confdefs.h <<\EOF
  1159. #define TM_IN_SYS_TIME 1
  1160. EOF
  1161. fi
  1162. echo $ac_n "checking for mode_t""... $ac_c" 1>&6
  1163. echo "configure:1289: checking for mode_t" >&5
  1164. if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
  1165. echo $ac_n "(cached) $ac_c" 1>&6
  1166. else
  1167. cat > conftest.$ac_ext <<EOF
  1168. #line 1294 "configure"
  1169. #include "confdefs.h"
  1170. #include <sys/types.h>
  1171. #if STDC_HEADERS
  1172. #include <stdlib.h>
  1173. #include <stddef.h>
  1174. #endif
  1175. EOF
  1176. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1177. egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1178. rm -rf conftest*
  1179. ac_cv_type_mode_t=yes
  1180. else
  1181. rm -rf conftest*
  1182. ac_cv_type_mode_t=no
  1183. fi
  1184. rm -f conftest*
  1185. fi
  1186. echo "$ac_t""$ac_cv_type_mode_t" 1>&6
  1187. if test $ac_cv_type_mode_t = no; then
  1188. cat >> confdefs.h <<\EOF
  1189. #define mode_t int
  1190. EOF
  1191. fi
  1192. echo $ac_n "checking for pid_t""... $ac_c" 1>&6
  1193. echo "configure:1322: checking for pid_t" >&5
  1194. if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
  1195. echo $ac_n "(cached) $ac_c" 1>&6
  1196. else
  1197. cat > conftest.$ac_ext <<EOF
  1198. #line 1327 "configure"
  1199. #include "confdefs.h"
  1200. #include <sys/types.h>
  1201. #if STDC_HEADERS
  1202. #include <stdlib.h>
  1203. #include <stddef.h>
  1204. #endif
  1205. EOF
  1206. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1207. egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1208. rm -rf conftest*
  1209. ac_cv_type_pid_t=yes
  1210. else
  1211. rm -rf conftest*
  1212. ac_cv_type_pid_t=no
  1213. fi
  1214. rm -f conftest*
  1215. fi
  1216. echo "$ac_t""$ac_cv_type_pid_t" 1>&6
  1217. if test $ac_cv_type_pid_t = no; then
  1218. cat >> confdefs.h <<\EOF
  1219. #define pid_t int
  1220. EOF
  1221. fi
  1222. echo $ac_n "checking for size_t""... $ac_c" 1>&6
  1223. echo "configure:1355: checking for size_t" >&5
  1224. if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
  1225. echo $ac_n "(cached) $ac_c" 1>&6
  1226. else
  1227. cat > conftest.$ac_ext <<EOF
  1228. #line 1360 "configure"
  1229. #include "confdefs.h"
  1230. #include <sys/types.h>
  1231. #if STDC_HEADERS
  1232. #include <stdlib.h>
  1233. #include <stddef.h>
  1234. #endif
  1235. EOF
  1236. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1237. egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1238. rm -rf conftest*
  1239. ac_cv_type_size_t=yes
  1240. else
  1241. rm -rf conftest*
  1242. ac_cv_type_size_t=no
  1243. fi
  1244. rm -f conftest*
  1245. fi
  1246. echo "$ac_t""$ac_cv_type_size_t" 1>&6
  1247. if test $ac_cv_type_size_t = no; then
  1248. cat >> confdefs.h <<\EOF
  1249. #define size_t unsigned
  1250. EOF
  1251. fi
  1252. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1253. echo "configure:1388: checking return type of signal handlers" >&5
  1254. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1255. echo $ac_n "(cached) $ac_c" 1>&6
  1256. else
  1257. cat > conftest.$ac_ext <<EOF
  1258. #line 1393 "configure"
  1259. #include "confdefs.h"
  1260. #include <sys/types.h>
  1261. #include <signal.h>
  1262. #ifdef signal
  1263. #undef signal
  1264. #endif
  1265. #ifdef __cplusplus
  1266. extern "C" void (*signal (int, void (*)(int)))(int);
  1267. #else
  1268. void (*signal ()) ();
  1269. #endif
  1270. int main() {
  1271. int i;
  1272. ; return 0; }
  1273. EOF
  1274. if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1275. rm -rf conftest*
  1276. ac_cv_type_signal=void
  1277. else
  1278. echo "configure: failed program was:" >&5
  1279. cat conftest.$ac_ext >&5
  1280. rm -rf conftest*
  1281. ac_cv_type_signal=int
  1282. fi
  1283. rm -f conftest*
  1284. fi
  1285. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1286. cat >> confdefs.h <<EOF
  1287. #define RETSIGTYPE $ac_cv_type_signal
  1288. EOF
  1289. echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
  1290. echo "configure:1429: checking for uid_t in sys/types.h" >&5
  1291. if eval "test \"`echo '$''{'ac_cv_type_uid_t'+set}'`\" = set"; then
  1292. echo $ac_n "(cached) $ac_c" 1>&6
  1293. else
  1294. cat > conftest.$ac_ext <<EOF
  1295. #line 1434 "configure"
  1296. #include "confdefs.h"
  1297. #include <sys/types.h>
  1298. EOF
  1299. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1300. egrep "uid_t" >/dev/null 2>&1; then
  1301. rm -rf conftest*
  1302. ac_cv_type_uid_t=yes
  1303. else
  1304. rm -rf conftest*
  1305. ac_cv_type_uid_t=no
  1306. fi
  1307. rm -f conftest*
  1308. fi
  1309. echo "$ac_t""$ac_cv_type_uid_t" 1>&6
  1310. if test $ac_cv_type_uid_t = no; then
  1311. cat >> confdefs.h <<\EOF
  1312. #define uid_t int
  1313. EOF
  1314. cat >> confdefs.h <<\EOF
  1315. #define gid_t int
  1316. EOF
  1317. fi
  1318. echo $ac_n "checking type of array argument to getgroups""... $ac_c" 1>&6
  1319. echo "configure:1463: checking type of array argument to getgroups" >&5
  1320. if eval "test \"`echo '$''{'ac_cv_type_getgroups'+set}'`\" = set"; then
  1321. echo $ac_n "(cached) $ac_c" 1>&6
  1322. else
  1323. if test "$cross_compiling" = yes; then
  1324. ac_cv_type_getgroups=cross
  1325. else
  1326. cat > conftest.$ac_ext <<EOF
  1327. #line 1471 "configure"
  1328. #include "confdefs.h"
  1329. /* Thanks to Mike Rendell for this test. */
  1330. #include <sys/types.h>
  1331. #define NGID 256
  1332. #undef MAX
  1333. #define MAX(x, y) ((x) > (y) ? (x) : (y))
  1334. main()
  1335. {
  1336. gid_t gidset[NGID];
  1337. int i, n;
  1338. union { gid_t gval; long lval; } val;
  1339. val.lval = -1;
  1340. for (i = 0; i < NGID; i++)
  1341. gidset[i] = val.gval;
  1342. n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
  1343. gidset);
  1344. /* Exit non-zero if getgroups seems to require an array of ints. This
  1345. happens when gid_t is short but getgroups modifies an array of ints. */
  1346. exit ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
  1347. }
  1348. EOF
  1349. if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1350. then
  1351. ac_cv_type_getgroups=gid_t
  1352. else
  1353. echo "configure: failed program was:" >&5
  1354. cat conftest.$ac_ext >&5
  1355. rm -fr conftest*
  1356. ac_cv_type_getgroups=int
  1357. fi
  1358. rm -fr conftest*
  1359. fi
  1360. if test $ac_cv_type_getgroups = cross; then
  1361. cat > conftest.$ac_ext <<EOF
  1362. #line 1510 "configure"
  1363. #include "confdefs.h"
  1364. #include <unistd.h>
  1365. EOF
  1366. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1367. egrep "getgroups.*int.*gid_t" >/dev/null 2>&1; then
  1368. rm -rf conftest*
  1369. ac_cv_type_getgroups=gid_t
  1370. else
  1371. rm -rf conftest*
  1372. ac_cv_type_getgroups=int
  1373. fi
  1374. rm -f conftest*
  1375. fi
  1376. fi
  1377. echo "$ac_t""$ac_cv_type_getgroups" 1>&6
  1378. cat >> confdefs.h <<EOF
  1379. #define GETGROUPS_T $ac_cv_type_getgroups
  1380. EOF
  1381. echo $ac_n "checking size of int""... $ac_c" 1>&6
  1382. echo "configure:1535: checking size of int" >&5
  1383. if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
  1384. echo $ac_n "(cached) $ac_c" 1>&6
  1385. else
  1386. if test "$cross_compiling" = yes; then
  1387. { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1388. else
  1389. cat > conftest.$ac_ext <<EOF
  1390. #line 1543 "configure"
  1391. #include "confdefs.h"
  1392. #include <stdio.h>
  1393. int main()
  1394. {
  1395. FILE *f=fopen("conftestval", "w");
  1396. if (!f) return(1);
  1397. fprintf(f, "%d\n", sizeof(int));
  1398. return(0);
  1399. }
  1400. EOF
  1401. if { (eval echo configure:1554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1402. then
  1403. ac_cv_sizeof_int=`cat conftestval`
  1404. else
  1405. echo "configure: failed program was:" >&5
  1406. cat conftest.$ac_ext >&5
  1407. rm -fr conftest*
  1408. ac_cv_sizeof_int=0
  1409. fi
  1410. rm -fr conftest*
  1411. fi
  1412. fi
  1413. echo "$ac_t""$ac_cv_sizeof_int" 1>&6
  1414. cat >> confdefs.h <<EOF
  1415. #define SIZEOF_INT $ac_cv_sizeof_int
  1416. EOF
  1417. echo $ac_n "checking size of short""... $ac_c" 1>&6
  1418. echo "configure:1574: checking size of short" >&5
  1419. if eval "test \"`echo '$''{'ac_cv_sizeof_short'+set}'`\" = set"; then
  1420. echo $ac_n "(cached) $ac_c" 1>&6
  1421. else
  1422. if test "$cross_compiling" = yes; then
  1423. { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1424. else
  1425. cat > conftest.$ac_ext <<EOF
  1426. #line 1582 "configure"
  1427. #include "confdefs.h"
  1428. #include <stdio.h>
  1429. int main()
  1430. {
  1431. FILE *f=fopen("conftestval", "w");
  1432. if (!f) return(1);
  1433. fprintf(f, "%d\n", sizeof(short));
  1434. return(0);
  1435. }
  1436. EOF
  1437. if { (eval echo configure:1593: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1438. then
  1439. ac_cv_sizeof_short=`cat conftestval`
  1440. else
  1441. echo "configure: failed program was:" >&5
  1442. cat conftest.$ac_ext >&5
  1443. rm -fr conftest*
  1444. ac_cv_sizeof_short=0
  1445. fi
  1446. rm -fr conftest*
  1447. fi
  1448. fi
  1449. echo "$ac_t""$ac_cv_sizeof_short" 1>&6
  1450. cat >> confdefs.h <<EOF
  1451. #define SIZEOF_SHORT $ac_cv_sizeof_short
  1452. EOF
  1453. echo $ac_n "checking size of long""... $ac_c" 1>&6
  1454. echo "configure:1613: checking size of long" >&5
  1455. if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
  1456. echo $ac_n "(cached) $ac_c" 1>&6
  1457. else
  1458. if test "$cross_compiling" = yes; then
  1459. { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  1460. else
  1461. cat > conftest.$ac_ext <<EOF
  1462. #line 1621 "configure"
  1463. #include "confdefs.h"
  1464. #include <stdio.h>
  1465. int main()
  1466. {
  1467. FILE *f=fopen("conftestval", "w");
  1468. if (!f) return(1);
  1469. fprintf(f, "%d\n", sizeof(long));
  1470. return(0);
  1471. }
  1472. EOF
  1473. if { (eval echo configure:1632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
  1474. then
  1475. ac_cv_sizeof_long=`cat conftestval`
  1476. else
  1477. echo "configure: failed program was:" >&5
  1478. cat conftest.$ac_ext >&5
  1479. rm -fr conftest*
  1480. ac_cv_sizeof_long=0
  1481. fi
  1482. rm -fr conftest*
  1483. fi
  1484. fi
  1485. echo "$ac_t""$ac_cv_sizeof_long" 1>&6
  1486. cat >> confdefs.h <<EOF
  1487. #define SIZEOF_LONG $ac_cv_sizeof_long
  1488. EOF
  1489. if test "$ac_cv_sizeof_int" = 4 ; then
  1490. echo $ac_n "checking for int32_t""... $ac_c" 1>&6
  1491. echo "configure:1653: checking for int32_t" >&5
  1492. if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
  1493. echo $ac_n "(cached) $ac_c" 1>&6
  1494. else
  1495. cat > conftest.$ac_ext <<EOF
  1496. #line 1658 "configure"
  1497. #include "confdefs.h"
  1498. #include <sys/types.h>
  1499. #if STDC_HEADERS
  1500. #include <stdlib.h>
  1501. #include <stddef.h>
  1502. #endif
  1503. EOF
  1504. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1505. egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1506. rm -rf conftest*
  1507. ac_cv_type_int32_t=yes
  1508. else
  1509. rm -rf conftest*
  1510. ac_cv_type_int32_t=no
  1511. fi
  1512. rm -f conftest*
  1513. fi
  1514. echo "$ac_t""$ac_cv_type_int32_t" 1>&6
  1515. if test $ac_cv_type_int32_t = no; then
  1516. cat >> confdefs.h <<\EOF
  1517. #define int32_t int
  1518. EOF
  1519. fi
  1520. echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
  1521. echo "configure:1686: checking for u_int32_t" >&5
  1522. if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
  1523. echo $ac_n "(cached) $ac_c" 1>&6
  1524. else
  1525. cat > conftest.$ac_ext <<EOF
  1526. #line 1691 "configure"
  1527. #include "confdefs.h"
  1528. #include <sys/types.h>
  1529. #if STDC_HEADERS
  1530. #include <stdlib.h>
  1531. #include <stddef.h>
  1532. #endif
  1533. EOF
  1534. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1535. egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1536. rm -rf conftest*
  1537. ac_cv_type_u_int32_t=yes
  1538. else
  1539. rm -rf conftest*
  1540. ac_cv_type_u_int32_t=no
  1541. fi
  1542. rm -f conftest*
  1543. fi
  1544. echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
  1545. if test $ac_cv_type_u_int32_t = no; then
  1546. cat >> confdefs.h <<\EOF
  1547. #define u_int32_t unsigned int
  1548. EOF
  1549. fi
  1550. elif test "$ac_cv_sizeof_short" = 4 ; then
  1551. echo $ac_n "checking for int32_t""... $ac_c" 1>&6
  1552. echo "configure:1720: checking for int32_t" >&5
  1553. if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
  1554. echo $ac_n "(cached) $ac_c" 1>&6
  1555. else
  1556. cat > conftest.$ac_ext <<EOF
  1557. #line 1725 "configure"
  1558. #include "confdefs.h"
  1559. #include <sys/types.h>
  1560. #if STDC_HEADERS
  1561. #include <stdlib.h>
  1562. #include <stddef.h>
  1563. #endif
  1564. EOF
  1565. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1566. egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1567. rm -rf conftest*
  1568. ac_cv_type_int32_t=yes
  1569. else
  1570. rm -rf conftest*
  1571. ac_cv_type_int32_t=no
  1572. fi
  1573. rm -f conftest*
  1574. fi
  1575. echo "$ac_t""$ac_cv_type_int32_t" 1>&6
  1576. if test $ac_cv_type_int32_t = no; then
  1577. cat >> confdefs.h <<\EOF
  1578. #define int32_t short
  1579. EOF
  1580. fi
  1581. echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
  1582. echo "configure:1753: checking for u_int32_t" >&5
  1583. if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
  1584. echo $ac_n "(cached) $ac_c" 1>&6
  1585. else
  1586. cat > conftest.$ac_ext <<EOF
  1587. #line 1758 "configure"
  1588. #include "confdefs.h"
  1589. #include <sys/types.h>
  1590. #if STDC_HEADERS
  1591. #include <stdlib.h>
  1592. #include <stddef.h>
  1593. #endif
  1594. EOF
  1595. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1596. egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1597. rm -rf conftest*
  1598. ac_cv_type_u_int32_t=yes
  1599. else
  1600. rm -rf conftest*
  1601. ac_cv_type_u_int32_t=no
  1602. fi
  1603. rm -f conftest*
  1604. fi
  1605. echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
  1606. if test $ac_cv_type_u_int32_t = no; then
  1607. cat >> confdefs.h <<\EOF
  1608. #define u_int32_t unsigned short
  1609. EOF
  1610. fi
  1611. elif test "$ac_cv_sizeof_long" = 4 ; then
  1612. echo $ac_n "checking for int32_t""... $ac_c" 1>&6
  1613. echo "configure:1787: checking for int32_t" >&5
  1614. if eval "test \"`echo '$''{'ac_cv_type_int32_t'+set}'`\" = set"; then
  1615. echo $ac_n "(cached) $ac_c" 1>&6
  1616. else
  1617. cat > conftest.$ac_ext <<EOF
  1618. #line 1792 "configure"
  1619. #include "confdefs.h"
  1620. #include <sys/types.h>
  1621. #if STDC_HEADERS
  1622. #include <stdlib.h>
  1623. #include <stddef.h>
  1624. #endif
  1625. EOF
  1626. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1627. egrep "(^|[^a-zA-Z_0-9])int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1628. rm -rf conftest*
  1629. ac_cv_type_int32_t=yes
  1630. else
  1631. rm -rf conftest*
  1632. ac_cv_type_int32_t=no
  1633. fi
  1634. rm -f conftest*
  1635. fi
  1636. echo "$ac_t""$ac_cv_type_int32_t" 1>&6
  1637. if test $ac_cv_type_int32_t = no; then
  1638. cat >> confdefs.h <<\EOF
  1639. #define int32_t long
  1640. EOF
  1641. fi
  1642. echo $ac_n "checking for u_int32_t""... $ac_c" 1>&6
  1643. echo "configure:1820: checking for u_int32_t" >&5
  1644. if eval "test \"`echo '$''{'ac_cv_type_u_int32_t'+set}'`\" = set"; then
  1645. echo $ac_n "(cached) $ac_c" 1>&6
  1646. else
  1647. cat > conftest.$ac_ext <<EOF
  1648. #line 1825 "configure"
  1649. #include "confdefs.h"
  1650. #include <sys/types.h>
  1651. #if STDC_HEADERS
  1652. #include <stdlib.h>
  1653. #include <stddef.h>
  1654. #endif
  1655. EOF
  1656. if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
  1657. egrep "(^|[^a-zA-Z_0-9])u_int32_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
  1658. rm -rf conftest*
  1659. ac_cv_type_u_int32_t=yes
  1660. else
  1661. rm -rf conftest*
  1662. ac_cv_type_u_int32_t=no
  1663. fi
  1664. rm -f conftest*
  1665. fi
  1666. echo "$ac_t""$ac_cv_type_u_int32_t" 1>&6
  1667. if test $ac_cv_type_u_int32_t = no; then
  1668. cat >> confdefs.h <<\EOF
  1669. #define u_int32_t unsigned long
  1670. EOF
  1671. fi
  1672. else
  1673. { echo "configure: error: Cannot find a type with size of 32 bits" 1>&2; exit 1; }
  1674. fi
  1675. echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
  1676. echo "configure:1857: checking for main in -lnsl" >&5
  1677. ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
  1678. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1679. echo $ac_n "(cached) $ac_c" 1>&6
  1680. else
  1681. ac_save_LIBS="$LIBS"
  1682. LIBS="-lnsl $LIBS"
  1683. cat > conftest.$ac_ext <<EOF
  1684. #line 1865 "configure"
  1685. #include "confdefs.h"
  1686. int main() {
  1687. main()
  1688. ; return 0; }
  1689. EOF
  1690. if { (eval echo configure:1872: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1691. rm -rf conftest*
  1692. eval "ac_cv_lib_$ac_lib_var=yes"
  1693. else
  1694. echo "configure: failed program was:" >&5
  1695. cat conftest.$ac_ext >&5
  1696. rm -rf conftest*
  1697. eval "ac_cv_lib_$ac_lib_var=no"
  1698. fi
  1699. rm -f conftest*
  1700. LIBS="$ac_save_LIBS"
  1701. fi
  1702. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1703. echo "$ac_t""yes" 1>&6
  1704. SOCKETLIBS="$SOCKETLIBS -lnsl"
  1705. else
  1706. echo "$ac_t""no" 1>&6
  1707. fi
  1708. echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
  1709. echo "configure:1893: checking for socket in -lsocket" >&5
  1710. ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
  1711. if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
  1712. echo $ac_n "(cached) $ac_c" 1>&6
  1713. else
  1714. ac_save_LIBS="$LIBS"
  1715. LIBS="-lsocket $LIBS"
  1716. cat > conftest.$ac_ext <<EOF
  1717. #line 1901 "configure"
  1718. #include "confdefs.h"
  1719. /* Override any gcc2 internal prototype to avoid an error. */
  1720. /* We use char because int might match the return type of a gcc2
  1721. builtin and then its argument prototype would still apply. */
  1722. char socket();
  1723. int main() {
  1724. socket()
  1725. ; return 0; }
  1726. EOF
  1727. if { (eval echo configure:1912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1728. rm -rf conftest*
  1729. eval "ac_cv_lib_$ac_lib_var=yes"
  1730. else
  1731. echo "configure: failed program was:" >&5
  1732. cat conftest.$ac_ext >&5
  1733. rm -rf conftest*
  1734. eval "ac_cv_lib_$ac_lib_var=no"
  1735. fi
  1736. rm -f conftest*
  1737. LIBS="$ac_save_LIBS"
  1738. fi
  1739. if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
  1740. echo "$ac_t""yes" 1>&6
  1741. SOCKETLIBS="$SOCKETLIBS -lsocket"
  1742. else
  1743. echo "$ac_t""no" 1>&6
  1744. fi
  1745. for ac_func in strdup strstr strtoul initgroups
  1746. do
  1747. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1748. echo "configure:1936: checking for $ac_func" >&5
  1749. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1750. echo $ac_n "(cached) $ac_c" 1>&6
  1751. else
  1752. cat > conftest.$ac_ext <<EOF
  1753. #line 1941 "configure"
  1754. #include "confdefs.h"
  1755. /* System header to define __stub macros and hopefully few prototypes,
  1756. which can conflict with char $ac_func(); below. */
  1757. #include <assert.h>
  1758. /* Override any gcc2 internal prototype to avoid an error. */
  1759. /* We use char because int might match the return type of a gcc2
  1760. builtin and then its argument prototype would still apply. */
  1761. char $ac_func();
  1762. int main() {
  1763. /* The GNU C library defines this for functions which it implements
  1764. to always fail with ENOSYS. Some functions are actually named
  1765. something starting with __ and the normal name is an alias. */
  1766. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1767. choke me
  1768. #else
  1769. $ac_func();
  1770. #endif
  1771. ; return 0; }
  1772. EOF
  1773. if { (eval echo configure:1964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  1774. rm -rf conftest*
  1775. eval "ac_cv_func_$ac_func=yes"
  1776. else
  1777. echo "configure: failed program was:" >&5
  1778. cat conftest.$ac_ext >&5
  1779. rm -rf conftest*
  1780. eval "ac_cv_func_$ac_func=no"
  1781. fi
  1782. rm -f conftest*
  1783. fi
  1784. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1785. echo "$ac_t""yes" 1>&6
  1786. ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
  1787. cat >> confdefs.h <<EOF
  1788. #define $ac_tr_func 1
  1789. EOF
  1790. else
  1791. echo "$ac_t""no" 1>&6
  1792. fi
  1793. done
  1794. echo $ac_n "checking for type of socket size""... $ac_c" 1>&6
  1795. echo "configure:1990: checking for type of socket size" >&5
  1796. cat > conftest.$ac_ext <<EOF
  1797. #line 1992 "configure"
  1798. #include "confdefs.h"
  1799. #include <stdlib.h>
  1800. #include <sys/types.h>
  1801. #include <sys/socket.h>
  1802. int main() {
  1803. int a = send(1, (const void *)0, (size_t *) 0, (int *) 0);
  1804. ; return 0; }
  1805. EOF
  1806. if { (eval echo configure:2002: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  1807. rm -rf conftest*
  1808. cat >> confdefs.h <<\EOF
  1809. #define SOCKET_SIZE_TYPE size_t
  1810. EOF
  1811. echo "$ac_t""size_t" 1>&6
  1812. else
  1813. echo "configure: failed program was:" >&5
  1814. cat conftest.$ac_ext >&5
  1815. rm -rf conftest*
  1816. cat >> confdefs.h <<\EOF
  1817. #define SOCKET_SIZE_TYPE int
  1818. EOF
  1819. echo "$ac_t""int" 1>&6
  1820. fi
  1821. rm -f conftest*
  1822. # Check whether --enable-ssl or --disable-ssl was given.
  1823. if test "${enable_ssl+set}" = set; then
  1824. enableval="$enable_ssl"
  1825. if test x$enableval = xyes; then
  1826. check_for_ssl=yes
  1827. else
  1828. check_for_ssl=no
  1829. fi
  1830. else
  1831. check_for_ssl=yes
  1832. fi
  1833. ssl_lib_dir=
  1834. ssl_inc_dir=
  1835. # Check whether --with-ssl-lib or --without-ssl-lib was given.
  1836. if test "${with_ssl_lib+set}" = set; then
  1837. withval="$with_ssl_lib"
  1838. ssl_lib_dir=$withval
  1839. fi
  1840. # Check whether --with-ssl-inc or --without-ssl-inc was given.
  1841. if test "${with_ssl_inc+set}" = set; then
  1842. withval="$with_ssl_inc"
  1843. ssl_inc_dir=$withval
  1844. fi
  1845. if test x$check_for_ssl = xyes; then
  1846. echo $ac_n "checking for SSL""... $ac_c" 1>&6
  1847. echo "configure:2055: checking for SSL" >&5
  1848. found_ssl=no
  1849. for dir in $ssl_inc_dir /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr; do
  1850. ssldir="$dir"
  1851. if test -f "$dir/include/openssl/ssl.h"; then
  1852. found_ssl=yes
  1853. CFLAGS="$CFLAGS -I$ssldir/include/openssl"
  1854. break
  1855. fi
  1856. if test -f "$dir/include/ssl.h"; then
  1857. found_ssl=yes
  1858. CFLAGS="$CFLAGS -I$ssldir/include"
  1859. break
  1860. fi
  1861. done
  1862. if test x_$found_ssl != x_yes; then
  1863. { echo "configure: error: Cannot find ssl libraries" 1>&2; exit 1; }
  1864. else
  1865. printf "SSL found in $ssldir\n";
  1866. LIBS="$LIBS -lssl -lcrypto";
  1867. if test x$ssl_lib_dir != x; then
  1868. LDFLAGS="$LDFLAGS -L$ssl_lib_dir";
  1869. else
  1870. LDFLAGS="$LDFLAGS -L$ssldir/lib";
  1871. fi
  1872. cat >> confdefs.h <<EOF
  1873. #define HAVE_SSL 1
  1874. EOF
  1875. fi
  1876. fi
  1877. # Check whether --with-nrpe_user or --without-nrpe_user was given.
  1878. if test "${with_nrpe_user+set}" = set; then
  1879. withval="$with_nrpe_user"
  1880. nrpe_user=$withval
  1881. else
  1882. nrpe_user=nagios
  1883. fi
  1884. # Check whether --with-nrpe_group or --without-nrpe_group was given.
  1885. if test "${with_nrpe_group+set}" = set; then
  1886. withval="$with_nrpe_group"
  1887. nrpe_grp=$withval
  1888. else
  1889. nrpe_grp=nagios
  1890. fi
  1891. # Check whether --with-nrpe_port or --without-nrpe_port was given.
  1892. if test "${with_nrpe_port+set}" = set; then
  1893. withval="$with_nrpe_port"
  1894. nrpe_port=$withval
  1895. else
  1896. nrpe_port=5666
  1897. fi
  1898. cat >> confdefs.h <<EOF
  1899. #define DEFAULT_SERVER_PORT $nrpe_port
  1900. EOF
  1901. # Check whether --enable-command-args or --disable-command-args was given.
  1902. if test "${enable_command_args+set}" = set; then
  1903. enableval="$enable_command_args"
  1904. cat >> confdefs.h <<EOF
  1905. #define ENABLE_COMMAND_ARGUMENTS 1
  1906. EOF
  1907. fi
  1908. # Extract the first word of "perl", so it can be a program name with args.
  1909. set dummy perl; ac_word=$2
  1910. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  1911. echo "configure:2135: checking for $ac_word" >&5
  1912. if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
  1913. echo $ac_n "(cached) $ac_c" 1>&6
  1914. else
  1915. case "$PERL" in
  1916. /*)
  1917. ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
  1918. ;;
  1919. ?:/*)
  1920. ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path.
  1921. ;;
  1922. *)
  1923. IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
  1924. ac_dummy="$PATH"
  1925. for ac_dir in $ac_dummy; do
  1926. test -z "$ac_dir" && ac_dir=.
  1927. if test -f $ac_dir/$ac_word; then
  1928. ac_cv_path_PERL="$ac_dir/$ac_word"
  1929. break
  1930. fi
  1931. done
  1932. IFS="$ac_save_ifs"
  1933. ;;
  1934. esac
  1935. fi
  1936. PERL="$ac_cv_path_PERL"
  1937. if test -n "$PERL"; then
  1938. echo "$ac_t""$PERL" 1>&6
  1939. else
  1940. echo "$ac_t""no" 1>&6
  1941. fi
  1942. trap '' 1 2 15
  1943. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1944. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1945. # Let make expand exec_prefix.
  1946. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1947. # Any assignment to VPATH causes Sun make to only execute
  1948. # the first set of double-colon rules, so remove it if not needed.
  1949. # If there is a colon in the path, we need to keep it.
  1950. if test "x$srcdir" = x.; then
  1951. ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
  1952. fi
  1953. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1954. DEFS=-DHAVE_CONFIG_H
  1955. # Without the "./", some shells look in PATH for config.status.
  1956. : ${CONFIG_STATUS=./config.status}
  1957. echo creating $CONFIG_STATUS
  1958. rm -f $CONFIG_STATUS
  1959. cat > $CONFIG_STATUS <<EOF
  1960. #! /bin/sh
  1961. # Generated automatically by configure.
  1962. # Run this file to recreate the current configuration.
  1963. # This directory was configured as follows,
  1964. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1965. #
  1966. # $0 $ac_configure_args
  1967. #
  1968. # Compiler output produced by configure, useful for debugging
  1969. # configure, is in ./config.log if it exists.
  1970. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1971. for ac_option
  1972. do
  1973. case "\$ac_option" in
  1974. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1975. echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1976. exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1977. -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1978. echo "$CONFIG_STATUS generated by autoconf version 2.13"
  1979. exit 0 ;;
  1980. -help | --help | --hel | --he | --h)
  1981. echo "\$ac_cs_usage"; exit 0 ;;
  1982. *) echo "\$ac_cs_usage"; exit 1 ;;
  1983. esac
  1984. done
  1985. ac_given_srcdir=$srcdir
  1986. ac_given_INSTALL="$INSTALL"
  1987. trap 'rm -fr `echo "Makefile src/Makefile subst common/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1988. EOF
  1989. cat >> $CONFIG_STATUS <<EOF
  1990. # Protect against being on the right side of a sed subst in config.status.
  1991. sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
  1992. s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
  1993. $ac_vpsub
  1994. $extrasub
  1995. s%@SHELL@%$SHELL%g
  1996. s%@CFLAGS@%$CFLAGS%g
  1997. s%@CPPFLAGS@%$CPPFLAGS%g
  1998. s%@CXXFLAGS@%$CXXFLAGS%g
  1999. s%@FFLAGS@%$FFLAGS%g
  2000. s%@DEFS@%$DEFS%g
  2001. s%@LDFLAGS@%$LDFLAGS%g
  2002. s%@LIBS@%$LIBS%g
  2003. s%@exec_prefix@%$exec_prefix%g
  2004. s%@prefix@%$prefix%g
  2005. s%@program_transform_name@%$program_transform_name%g
  2006. s%@bindir@%$bindir%g
  2007. s%@sbindir@%$sbindir%g
  2008. s%@libexecdir@%$libexecdir%g
  2009. s%@datadir@%$datadir%g
  2010. s%@sysconfdir@%$sysconfdir%g
  2011. s%@sharedstatedir@%$sharedstatedir%g
  2012. s%@localstatedir@%$localstatedir%g
  2013. s%@libdir@%$libdir%g
  2014. s%@includedir@%$includedir%g
  2015. s%@oldincludedir@%$oldincludedir%g
  2016. s%@infodir@%$infodir%g
  2017. s%@mandir@%$mandir%g
  2018. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  2019. s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
  2020. s%@INSTALL_DATA@%$INSTALL_DATA%g
  2021. s%@INSTALL@%$INSTALL%g
  2022. s%@CC@%$CC%g
  2023. s%@SET_MAKE@%$SET_MAKE%g
  2024. s%@CPP@%$CPP%g
  2025. s%@SOCKETLIBS@%$SOCKETLIBS%g
  2026. s%@HAVE_SSL@%$HAVE_SSL%g
  2027. s%@nrpe_user@%$nrpe_user%g
  2028. s%@nrpe_grp@%$nrpe_grp%g
  2029. s%@nrpe_port@%$nrpe_port%g
  2030. s%@PERL@%$PERL%g
  2031. CEOF
  2032. EOF
  2033. cat >> $CONFIG_STATUS <<\EOF
  2034. # Split the substitutions into bite-sized pieces for seds with
  2035. # small command number limits, like on Digital OSF/1 and HP-UX.
  2036. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
  2037. ac_file=1 # Number of current file.
  2038. ac_beg=1 # First line for current file.
  2039. ac_end=$ac_max_sed_cmds # Line after last line for current file.
  2040. ac_more_lines=:
  2041. ac_sed_cmds=""
  2042. while $ac_more_lines; do
  2043. if test $ac_beg -gt 1; then
  2044. sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
  2045. else
  2046. sed "${ac_end}q" conftest.subs > conftest.s$ac_file
  2047. fi
  2048. if test ! -s conftest.s$ac_file; then
  2049. ac_more_lines=false
  2050. rm -f conftest.s$ac_file
  2051. else
  2052. if test -z "$ac_sed_cmds"; then
  2053. ac_sed_cmds="sed -f conftest.s$ac_file"
  2054. else
  2055. ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
  2056. fi
  2057. ac_file=`expr $ac_file + 1`
  2058. ac_beg=$ac_end
  2059. ac_end=`expr $ac_end + $ac_max_sed_cmds`
  2060. fi
  2061. done
  2062. if test -z "$ac_sed_cmds"; then
  2063. ac_sed_cmds=cat
  2064. fi
  2065. EOF
  2066. cat >> $CONFIG_STATUS <<EOF
  2067. CONFIG_FILES=\${CONFIG_FILES-"Makefile src/Makefile subst"}
  2068. EOF
  2069. cat >> $CONFIG_STATUS <<\EOF
  2070. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  2071. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2072. case "$ac_file" in
  2073. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2074. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2075. *) ac_file_in="${ac_file}.in" ;;
  2076. esac
  2077. # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
  2078. # Remove last slash and all that follows it. Not all systems have dirname.
  2079. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2080. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2081. # The file is in a subdirectory.
  2082. test ! -d "$ac_dir" && mkdir "$ac_dir"
  2083. ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  2084. # A "../" for each directory in $ac_dir_suffix.
  2085. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  2086. else
  2087. ac_dir_suffix= ac_dots=
  2088. fi
  2089. case "$ac_given_srcdir" in
  2090. .) srcdir=.
  2091. if test -z "$ac_dots"; then top_srcdir=.
  2092. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  2093. /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  2094. *) # Relative path.
  2095. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  2096. top_srcdir="$ac_dots$ac_given_srcdir" ;;
  2097. esac
  2098. case "$ac_given_INSTALL" in
  2099. [/$]*) INSTALL="$ac_given_INSTALL" ;;
  2100. *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  2101. esac
  2102. echo creating "$ac_file"
  2103. rm -f "$ac_file"
  2104. configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  2105. case "$ac_file" in
  2106. *Makefile*) ac_comsub="1i\\
  2107. # $configure_input" ;;
  2108. *) ac_comsub= ;;
  2109. esac
  2110. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2111. sed -e "$ac_comsub
  2112. s%@configure_input@%$configure_input%g
  2113. s%@srcdir@%$srcdir%g
  2114. s%@top_srcdir@%$top_srcdir%g
  2115. s%@INSTALL@%$INSTALL%g
  2116. " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
  2117. fi; done
  2118. rm -f conftest.s*
  2119. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  2120. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  2121. #
  2122. # ac_d sets the value in "#define NAME VALUE" lines.
  2123. ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)'
  2124. ac_dB='\([ ][ ]*\)[^ ]*%\1#\2'
  2125. ac_dC='\3'
  2126. ac_dD='%g'
  2127. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2128. ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  2129. ac_uB='\([ ]\)%\1#\2define\3'
  2130. ac_uC=' '
  2131. ac_uD='\4%g'
  2132. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2133. ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)'
  2134. ac_eB='$%\1#\2define\3'
  2135. ac_eC=' '
  2136. ac_eD='%g'
  2137. if test "${CONFIG_HEADERS+set}" != set; then
  2138. EOF
  2139. cat >> $CONFIG_STATUS <<EOF
  2140. CONFIG_HEADERS="common/config.h"
  2141. EOF
  2142. cat >> $CONFIG_STATUS <<\EOF
  2143. fi
  2144. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2145. # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
  2146. case "$ac_file" in
  2147. *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
  2148. ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2149. *) ac_file_in="${ac_file}.in" ;;
  2150. esac
  2151. echo creating $ac_file
  2152. rm -f conftest.frag conftest.in conftest.out
  2153. ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
  2154. cat $ac_file_inputs > conftest.in
  2155. EOF
  2156. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2157. # the proper values into config.h.in to produce config.h. And first:
  2158. # Protect against being on the right side of a sed subst in config.status.
  2159. # Protect against being in an unquoted here document in config.status.
  2160. rm -f conftest.vals
  2161. cat > conftest.hdr <<\EOF
  2162. s/[\\&%]/\\&/g
  2163. s%[\\$`]%\\&%g
  2164. s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2165. s%ac_d%ac_u%gp
  2166. s%ac_u%ac_e%gp
  2167. EOF
  2168. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2169. rm -f conftest.hdr
  2170. # This sed command replaces #undef with comments. This is necessary, for
  2171. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2172. # on some systems where configure will not decide to define it.
  2173. cat >> conftest.vals <<\EOF
  2174. s%^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2175. EOF
  2176. # Break up conftest.vals because some shells have a limit on
  2177. # the size of here documents, and old seds have small limits too.
  2178. rm -f conftest.tail
  2179. while :
  2180. do
  2181. ac_lines=`grep -c . conftest.vals`
  2182. # grep -c gives empty output for an empty file on some AIX systems.
  2183. if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2184. # Write a limited-size here document to conftest.frag.
  2185. echo ' cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2186. sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2187. echo 'CEOF
  2188. sed -f conftest.frag conftest.in > conftest.out
  2189. rm -f conftest.in
  2190. mv conftest.out conftest.in
  2191. ' >> $CONFIG_STATUS
  2192. sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2193. rm -f conftest.vals
  2194. mv conftest.tail conftest.vals
  2195. done
  2196. rm -f conftest.vals
  2197. cat >> $CONFIG_STATUS <<\EOF
  2198. rm -f conftest.frag conftest.h
  2199. echo "/* $ac_file. Generated automatically by configure. */" > conftest.h
  2200. cat conftest.in >> conftest.h
  2201. rm -f conftest.in
  2202. if cmp -s $ac_file conftest.h 2>/dev/null; then
  2203. echo "$ac_file is unchanged"
  2204. rm -f conftest.h
  2205. else
  2206. # Remove last slash and all that follows it. Not all systems have dirname.
  2207. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  2208. if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  2209. # The file is in a subdirectory.
  2210. test ! -d "$ac_dir" && mkdir "$ac_dir"
  2211. fi
  2212. rm -f $ac_file
  2213. mv conftest.h $ac_file
  2214. fi
  2215. fi; done
  2216. EOF
  2217. cat >> $CONFIG_STATUS <<EOF
  2218. EOF
  2219. cat >> $CONFIG_STATUS <<\EOF
  2220. exit 0
  2221. EOF
  2222. chmod +x $CONFIG_STATUS
  2223. rm -fr confdefs* $ac_clean_files
  2224. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2225. perl subst nrpe.cfg
  2226. perl subst init-script
  2227. perl subst init-script.debian
  2228. perl subst init-script.freebsd
  2229. perl subst nrpe.xinetd
  2230. echo ""
  2231. echo ""
  2232. echo "$ac_t""*** Configuration summary for $PKG_NAME $PKG_VERSION $PKG_REL_DATE ***:" 1>&6
  2233. echo ""
  2234. echo " General Options:"
  2235. echo " -------------------------"
  2236. echo "$ac_t"" NRPE port: $nrpe_port" 1>&6
  2237. echo "$ac_t"" NRPE user: $nrpe_user" 1>&6
  2238. echo "$ac_t"" NRPE group: $nrpe_grp" 1>&6
  2239. echo ""
  2240. echo ""
  2241. echo "Review the options above for accuracy. If they look okay,"
  2242. echo "type 'make all' to compile the NRPE daemon and client."
  2243. echo ""