sipp-3.5.1/0000755000175000017500000000000012672463320011532 5ustar vsevavsevasipp-3.5.1/sipp.dtd0000644000175000017500000000376612672462535013225 0ustar vsevavseva sipp-3.5.1/FAQ.md0000644000175000017500000000022112672462535012465 0ustar vsevavsevaHardly documented answers ========================= * How to include a literal bracket in a SIP message? You can use `\x5b` instead of `[`. sipp-3.5.1/pcap/0000755000175000017500000000000012672462535012464 5ustar vsevavsevasipp-3.5.1/pcap/g711a.pcap0000644000175000017500000021674012672462535014163 0ustar vsevavsevaò@=V&&Pfv" E@@#  R€@=f&&Pfv" E@@#  RQ@=&&Pfv" E@@#  Q`@=w&&Pfv" E@@#  Po@=[&&Pfv" E@@#  O~@=Bc&&Pfv" E@@#  N@=|&&Pfv" E@@#  M@=H&&Pfv" E@@#  L@=ɽ&&Pfv" E@@#  Kp@= 3&&Pfv" E@@#  Jɀ `@=1&&Pfv" E@@#  I؀ P@= &&Pfv" E@@#  H @@=Ē &&Pfv" E@@#  G 0@=% &&Pfv" E@@#  G @=| &&Pfv" E@@#  F @=. &&Pfv" E@@#  E# @=k &&Pfv" E@@#  D2 @= &&Pfv" E@@#  CA@=WR &&Pfv" E@@#  BP@= &&Pfv" E@@#  A_@=< &&Pfv" E@@#  JJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=> &&Pfv" E@@#  DZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=v&&&Pfv" E@@#  .fZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=ݛ&&Pfv" E@@#  ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  ӀpZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=D&&Pfv" E@@#  `ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  рPZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=M5&&Pfv" E@@#  1Ā@ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=L&&Pfv" E@@#  M0ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=1&&Pfv" E@@#  qʀ ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=5&&Pfv" E@@#  ٦ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJJZZZJJJJJJJJJJJJJZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZZJJJJJJJJJ@= |&&Pfv" E@@#  ]JJJJJJJJJJJJJJJJJJJZZZZZZZJJJJJJJJZJZZZZZZZZZZZZJJZJJJJJZZZJJZZZZJJJJZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJZZZJZZZJJJJJJJJJJJJJJJJJJZJZZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJ@==&&Pfv" E@@#  ̀JZJJJJJJJJJJJrJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJrJJrrrrrrrrrrrrrrrrrrrrrrrrrJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZJJJZZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=b&&Pfv" E@@#   ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#    !ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJzZZZ@=CM&&Pfv" E@@#  !"ZZZZZZZZZJZZZZZJJZJJJJJJrrrrrrrrrrrrrrrzzzzzzzzzzzfffffffffffbbbbbbbbbbbbbbbbbbbbnnnbnbnnnnnnnnnjjnjjjjjjjjjjnjnnnjnjnnjjjjjnjjnjjjjjjjjjjjnjjjjnnn@=&&Pfv" E@@#  ǀ"#nnnnnnnnnbbbbbbbbbbbbbbbbbbfffffffzzzzzzzzzrzrJrrJrrrrJZrJZJJZZZZZZZZ@=7&&Pfv" E@@#  !#$ZZZZZZZZZZZZZZZZZZZZJJJJJJJJJJJJJJJJJJJJJrJrrrrrrrJrrrrrrrJJrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrJrrrJJJrJJJJzbJJrZZJJZJJJZZJZZZZZJZZJJZZJJJJZZZZ@=&&Pfv" E@@#  <$%ZZZJJZZZZZJZZJJJZZZJZZZZZZZZZZZZZZZJZZZZJZZJZZZJJJZJJJZZJJrrJJJZZZZZJJrJJJZZJrJJJJJrrrrrrrJJJJrrJ@=!&&Pfv" E@@#  އ%&prJJZZrrrrrrJZJrrrrzzzrZZZZJJrzzrrJZrrrrrJJzrJJJJrrrJrrrrrrrrJrJJrzrrrrrzzJrrJZJJJrrrJJJJrrJJJJrrrrJJrJJJZJrrJJJJrJJZJJJJJJJJrJJJJJJJJZZZJJZZZZJJJJZZZJJZZZZJJZZZJZJJZZZZZZZJZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  р&'`JZZZJZZZZZJZZZZZZZZZZZZZZJZJJZZZJJZJrJJZZZZJJZZZZrrZZJZZZJZZJJJZJZZZJrJZZJZZJJJrZZZZJJZZJZJJZZrrJJZZJJJZJJJJJJrrZZJZJJJJJrrJJJrrJJZJzrZZJJJJZZJrrrJZZJrrrJZJZZJJJrrJJJZJrJZZJZrJZrrrzZJJZJJZJ@=o &&Pfv" E@@#  Q'(PZZJZZZZJZZZJJJJrJZZZZZZZZZZZJZJZZZZZZZZZZZZZZJZJZJZZJZZZZZZZZZZZZZZZZZZZZZZJZZZJZZZZJ@=)&&Pfv" E@@#  8()@ZZZZZZZJZZZZZZZJZZZZZJZJJZJZZZZJZJZZZJZZZZZZZZZZZZJZZZZJZJJZZJZZZZZJZJZZJZJZZZZZZZZZJrZZJrZZJZJJJJZJJZZJZZZJZJrZJJZJZJZZZZZZZZJJZZZZZZZJJZZZZZZZZZZZZZZJZZZZJ@=i&&Pfv" E@@#  0)*0ZZJZZZZZZZZZJZZrJZZJZZZZZZZZZJZZJZZZZZZZZZZZZZZZZZZZZZZJZZZZZJZZJZZZJZZZZZZJJZZJZZZZZZZZZZZZZZZZZZJZZZZZJJJJZZZJZZZZJZJJZZZJZZJJZ@=l &&Pfv" E@@#  *+ ZJJJJZJZZZJJZZZZrJZZZJJJZJrJZZJZJJZZJZrJZJrJZZrJJZZJJZZZZJJZJrJZJZJZZJZZZZJZZZJJJZZJJJZZJrZZZZJZJrZZZZZJZZZJJJJZZZZZZZZZZJZJJJJZJZZZZZZZZZJJZJZZZZJJJrJZZZZZZJrrJJZZJJJJJZJJJZZZJJJZZJJrJJJJJZZZJJZZZJJJZJJJJZJJZZZZJJZZJJ@= &&Pfv" E@@#  vЀ+,JJZZZZZZZZZZJZZZZZZJJZZZZJZZZZZZZZZZZJZZZZZZZZZZJJZZZZZJZZZZZZJZZZJZZZZZZJJJJJJJZZJJZZZZJJJZZJJJJZJrJJJJJJJZJZJJJJZZJJJZZZZJJZZJJJJJZZZJJJJJJJJJJJJJZJJJJZJJZZJJJZZZJJZZJJJZZZJZZZJJJZJJJZZZZJZZZZZJZZZZZJJZZZJJJJJZZJZZZZJJZZZJJZZZZZZZZJJJJZ@=X &&Pfv" E@@#  L,-JJJJZZZZZJJJZJJJJZZZZJZZZJJJZZZZZJJJZZJJJJJZZJZZZZZZJJZZJZZZZJJJJZZZZZZZZZZZZZZJZZZZZZZZZZJJZZZZZZZZZZZZZJZZZZJJZJZZZZZZZJJJZZZZZZZZZZZZZZZJJJJJZZZZJJJJJJJZZZJJZZJZZZZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJJJJZJZZZZJJJZZZZZZZZJZZZZJ@= &&Pfv" E@@#  x--ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=D &&Pfv" E@@#  À..ZZZZZZZZZZZZZZZZZZZZZZZZJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZJJZJJJJJJJJJJJ@=ص &&Pfv" E@@#  //JJJJJJJJJJJJJJJJJJJJJJJJJJJZZJZZZZZZZZZZZZ@=+ &&Pfv" E@@#  Ԋ00ZZZZZZZZZZZZZZZZJJZZZZJZZZJJJJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZZZZZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZZJJZZJZZZJZZJJZZJJJZZZZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJJZJJJJJJJJJJJJJJJJ@= &&Pfv" E@@#  11rrJJJJrJJJJJJJJJJJZZJZZZZZZZZZZZZZZZZZZZZZZZJZZZJJZJJJJJJJJrrrrrzzzzzzzffffffffffffzzffzzzzzzzrrrrJJJJJJJJJJZZZZZZZJZZZZZZZJrrzffbnjjjnnbfzzrJZ镗rrzbnbnbbnnbbbzzffzzrrrrJZJZZJrrrzzfbbbnnjjjjjnnbbf@= &&Pfv" E@@#  /B22ffzrJZ闑JzffbbfnnbbbffbfffzrrrJJZZJJJJJJzfffbbbnnnjnnbbbbfzrrJZ镗rffffbnjnbbffbnbffzzzrrJZZJJJrJrzffbbnnjjjjjjjnnbffzrJZ闑rfbbbbnjjnnbfnnnbbzzfzrrJZrzfzrzfffbnnnnjjjjjjnbfzrJZ@=> &&Pfv" E@@#  33闑JrfbbbnnnjnbbnnbbfffzzzrJZZJrrJrfffbnjjjjjjnbfzrrZ闓JzfnnbnjjnnbbbnnbfzzzrrJZJJZJzzfbfnjjjjjnnbbzrJZ闓ZzzbbfbnbbnfzfbfbfzzrJJJZZrffffbnjjjjjjjnbbfzrJZᕑ@= &&Pfv" E@@#  ŀ44JrffzfbbfbfzzffffzzrJJJJzzfffbnnnnbnnbfzrJZᕑZJJrzrrrZrrrrJZJJZZZrrzffzzfzzzJJJZᕓZZJrJJZJrzrZZJJrJJJJJrrffzzrrrrJJZ鑟ZJZZrrJJfjbrZZZrrZ@=u&&Pfv" E@@#  955pZJzzzrrzzrJJJzfzJZ铅jfZrJ홛ZjrZffJbbrrjJJbjnzzzzzrᓁZ᝛ZJZrJJnrrfnbrZJffJJ턉 őZz ՕrbfZJbfnnjbZZJ rr b靗@=&&Pfv" E@@#  M66`nbjfzrrJz 4 ZfrfznfrZzjnzZ靀n 5 jrrZZbZZzfrZZzbbzᗅ54ZrjfJrjf靕rzrbfrZZzbfJ鑙z 4 nnzfZjrZJrrJZrzr呅@=&&Pfv" E@@#  77P ŇZnnffjfrjrZZZZᝃ4 bbjbfnjjfJZJJrrrJ흁j6 nnnffJJffzJ47rJrrnJZZrzzJ66ZJjrZzJZZJZ陀515f@=&&Pfv" E@@#  B88@nJzfJZ啟44 brnrrnbzZnrbbrJrzffzrrJJJ镑ZrzzzzzbnjjjjnnnnnbbffzrZ핕rzfbbbnjjjnnbbffrrZZrzfbbnnjjjjjnbffzrJZZ@=f&&Pfv" E@@#  `~990ZJrrzfbbbnnnnnnbbbfzzrrJZZZZZZJJrrrzzzzzzzzrrrrJJJZZZZZZZZZZZZZJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZJZZZZZZZJJZZJJJJJZZJJJJJJJJJJ@=Y|&&Pfv" E@@#  {:: JJZJJZZJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJJJJJJJJJZZJJJZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=L&&Pfv" E@@#  'e;;ZZZ镕ZrrZ镕ZzbjjzJZᕝnfffZzfnzzfzJJznjnnnjnbfJJZZZJrzfb@=yh&&Pfv" E@@#  <<bnjjjjnnbffzrrJJZZJrzzfbbnbbbnnnnnbbbfzzrrrJZZZ镕ZJrrrrrJrrrrrrrJJJZZZ镕ZJrzffffffffzfffffzzzzzrrrrrJJJJJJrrrrrJZZJzfbnjjjjn@=a&&Pfv" E@@#  ^==rZJfnzZZZzfffbbbfzzrJZZZZZJrrzrrrJ靄JZZZZZJJrfffbbffbfzrJJJJJrrzrrJJZᑅJrrrzJZrJZZrrzbbbbnnnnjnbfzzzzffbbfffzJ퓄ZZZzbffbfJJzzrrzffnjjjnffbnnjjjnnbzᓅzzznjbbbfJrfzr@=&&Pfv" E@@#  GS?>zfbnjnbbbnnjjjnnbr퟇zzznnnfJJzzJrfbnjjjnbnnbnnbbbfJ陆zbrfjjnfzffrznnbjbbbnbbbbbfrᓄzbJfjjnrzbzfnnnjbbfzzffzzJ퓅ffJnbfJznfzbjjjjnfzzrJrJZ韄@=;&&Pfv" E@@#  D@?rjZJfbJrjbrnjjjnnbzrzJZJJᗙnbZjrzZnjJfjjnbzzJZZ闟znrzrffZznffjjbzrrZ闟rzrnnzbbJZrrJfnjjnnfJJZ闓fnJfbzbzbrfjjnbbzJZ핑JjzzjJJfJJ@=J&&Pfv" E@@#  A@bffjjjjnnfzrJ闝ZbfbnrrJZrzfnjnnbzrJ镑fjbjnrJZZJrznjnbzrJZ鑝bbrZJzffjjjnfrJZ헟JfJJfbnjnfrJJ铛zZZfjnfzrᗟJz@=%&&Pfv" E@@#  WBAbrZfbfzJ鑙JrbZnjjnrZbnbfrzznjfffJ铟bnzzzrJzzffbnnnbbbbbfzzJZ镕JrrrzfbbbbbbbfffzrJZ镗ZZZZZZZ镗@=&&Pfv" E@@#  CB镑镗镕镕镕@=U&&Pfv" E@@#  DC镕ZZZZZZZJJJJJJZZZZZZZZZZ@=&&Pfv" E@@#  jEDpZZJJJJrJrrrrrrrzrrrJJZZZZZZZZZZZZZJJJJrrrrrzzzzzzzzzzzzzrJJJrrrJJJZJJJJJJrrrrrrrrzjnffffzzzzzzzfzzrJJrJbjzrrJJZJJrrrzfffzffzzfffffzzzzzffzzzzzrrrzzrzzzzrzfrrfffbjnbfrrzbfzzbjjbfzrJZJJJzfffbbnnnjjjnjjjnnnnfbfzZrn@=&&Pfv" E@@#  FE`jbjjnjjrbnznjfJ푙JJJZrbjfrJ靅ZZrrZrbnzrZ铛jjZJznzJZ푟zbnnrj@=o&&Pfv" E@@#  OGFPfJZ핝zznzznjnzJ闙bbrZnjnzrZ靅fjnZbbzJ푛JJZfjjfrZᑛJZJznjfrZᗛ@=&&Pfv" E@@#  HG@nzJJbjjzrJᕟZbZJrfbjbzJ鑟zbnzZZZJbnffbbzJ镑JfbbbbnfrZZZZrzfffzzrZ闓JfbnnnbfrJZJrzfbnnbzrJZ헓rbjj@=Z&&Pfv" E@@#   gIH0bfzJZrfbnnnnnfrJ闓ZbjfrJZrbjnzJ鑙ZJzbJᕕJzfjjbJᓄjj r핟nbfbbJZZᙃn5 JbffjzJffZ遈 75ZZ z@=&&Pfv" E@@#  QJI bbznnZr 65過n 5jrnjnn՗ 77b 4 bᗗbjjՕ56r5 nJᗗzjjrᙍ  15 jŕrfnnZ홍51 frjjfZ@=D &&Pfv" E@@#  KJf 7 n陁fbbfJZZZZ哄jfjrZbbrZ啟JnnrZfnfzr铛zrZznjjnbfJ푙jjJZZZfbbjnnfJᕟzb@=+ &&Pfv" E@@#  i,LKJJrZrfbnjnzZ푛Jzrnfr铇zJf bjᄛJnbbfZJfZ靇ZJ 06fjfJ5fZzZZn嗅jJ3<4JzZzz74brfrzrេb090j 136 @=1 &&Pfv" E@@#  MMKjrJjՓ 2:?nş 56334nnjՑf 5?<4ŕn 5rZrrZzrjnbzZz铟镗镗Jrzzfffffbbbbfz@= &&Pfv" E@@#  e6NLzzrJJJZZZZZJrrzzzzzzzzzzrrrrrrJJJZZZZZZZZZZZJZZZJJJJJJZZZZZZZZZZJJZZJJrzrJJJrrrrrJrrJrrrrrJJJJJJrrrrrrrzzzzrzrzzzzzzzrJJJrrzzzzzzzfzzzzzfzzfzzrrrrzzzzzrJrrrrzrrJJZJJZZJJJJZZZZZZZZJJJJJJZZZ@= &&Pfv" E@@#  ZOMZZZZZZZZZZZZZZZZZZZZJJZ핕闗@= &&Pfv" E@@#  `PNJZZrzzzzzffzzzzzrrzrzffrzffzrzfffJrfjbJrbjnffzrJZrfnbzzzrJzfzznjnffnjnfzbjnnnfrzbbfzzbfzfbfrJrrzrrrfbzfnfZrfrJZZZZrrJZZZJJZZZJZZZrzzJJJJJ@= &&Pfv" E@@#  XQOJJZZJᕗZJZrrJZZZZJrrZZZZZZzzJJzfrJZrzzzzJJffrZJrJZZZJJJJJZZZZZZZZZ镕핕Jzbfrrfnnbbbfbnjbfbnjj@=y &&Pfv" E@@#  fRPnjnnnjnbfzzzrJZJJJZZJJrzrJrffbbbbffnjnbffbfzZZzJJZJZZrrrJffrznjbfbbZfnrrfjnJbbzbjfrnjnjffbZfz哅@= &&Pfv" E@@#  SQ᝗ᗕrZJZJrZffJrrJJZzZrzzfrzzfbbnbnjnjnjjjjjjnjjnjjnbnnjbjjjjj@=$c &&Pfv" E@@#  _TRjjjnbfbbbbzrJZJrrrJZZZZZrrJZJZJrrJZJJJrzzrJZZZJrzJZZZJJZZZZZZZ@=Z &&Pfv" E@@#  USpZZZZZZJJrrrrzzrrrrJZJZ镗JzfnjbzZ푙znnZJ jz呄br᝛Znj  frjJfn@=M&&Pfv" E@@#  ހVT`fbՓn fnzrnjbrfnnnnz헄b jjrfjzfbznnzbbzJᑄrjbjfbnfbjfzbfrzzZ흄nfjzJZjnbbfrzzJJrZ啙bbnf@=&&Pfv" E@@#  lWUPjbffzJrzZZJ흅rbfnfbjbzzrJJZZZ鑅nnjbZrjjbzrrJZ啝bfjbJZnjnrJrZ啟zzjjfJfbjnzrJZᕓZzbbb@=O8&&Pfv" E@@#  XV@bnnfzfzrzbnnnbfzJZ鑟ZJfnnbfrJ闑JzbjjjjjnbfzJZZJrzfbjbjjnjjnnjjjnnnbbbfrJJJZZJrrrzffbbbfbbbffffzzzrJJJZ@=\k&&Pfv" E@@#  YW0ZznrnjnjnbfzJJJJZZJZJJbbfzrfjfjbzZZrZZJzzZZJJZZZJJZZZJrJJZrJZJJZZZZJrJJJJrZZJZrzZzzZJZᗑ@=&&Pfv" E@@#  ^ZZX ZZZZZZZZZZZZZJrfffffffrJJJJJZZJZZZJrfnnnnjnbzzzzzzrJZZZZJrrJJJrrrJJZZZZZ@=PU&&Pfv" E@@#  n[YZZZJZZZZZZJrrrJJJJJrrrrrzrZZJJJJrJJJZZZZZZJJZZZZZZZJrrJZZZZZJrrJZZZZZZJJJJJZZJJJJrrzrrrJJrzjfZbjJZnbZrnnfJZzjnzJrbnbrJrzffrJrzzrrrzzrrrrJrzzrrrrJJJnbzjnJjbfzZJrzJZnz@=3&&Pfv" E@@#  \ZbzJbrrzbfrrzzJrrrrjJrnfZbnfJZrbzJJrJZJrzrJJrrrrJJJJJJJZJrJJZZrrJZZZZZJJZZZfjbbbjjnbzrJJrffzr푟jnJf bzZ嗟5 1= 큛J Zfjjf@=WA&&Pfv" E@@#  P]ZffzZ啓 6 rJnjbjzfnbJ鑛Z 7rzjnjbfbnfJᗛ  醙헇JJZffrrnjnnzzzrᕝbjj靕呄rnfzjfZJbnrrbjnbnnf@=B&&Pfv" E@@#  z^[JᗓrJzrᗓrbnjjbbnnfzzrrrrzbbfzffzJ핓zbjzZZZJzffnjjnbzzrJJJJJrrrJJ헝JfnnfzzrZZrzffnjnfrJJrrzffzzrJJZ镑ZzfbbffbfrJJZZZZZZJJznjnj@=;-&&Pfv" E@@#  n<_\jnbnfzzfzzzzzzzJrZZ镕JzfffffbzrrrJJJJJrrzfbbnjjjnnbbfzzfrzzzrzJJrJZ镕ZrzzzffffzrrrrJJJrrrzfffbnnnnnnbffzrrrrrrrJJJJ闗JrrrzzzrJJZZZZZZZJrrrrzfffbbffzrzrJJJZrJZZZZZ@=ã&&Pfv" E@@#  uB`]镕JJJJrJJJZZZZZZJrzzzzffzrJJrJZZZZZZ镕ZJZJJJJZZZZZZZJJJrrzzzzrrrrrJJJZZZZZZ镑JJJrzrrJZZJZZZZZJJJJrrrrzzzzzzzrrzzrrrrrrrJJJZZZ镕JrzzfffzzrJJJJJJJJrr@=&&Pfv" E@@#  =a^rrrrzzzffzzrrrrrrrzrJJrJJJZZZ镗ZJrzzfbfzrJJJZZZJJJJJJrrrrzzzzzrrrrJJJJJJJJJJZZZZ镗ZrzzzffzrrJJJZZJJJJJJrrrrrrrrrJJJZZZZZZZZZZZZ镕JrrrrzzrJZZZZZZZJJrrrzfzzzrrrrJJJJJJZZJZZZZZ镕@=&&Pfv" E@@#  Kb_JzbbfzzfzrZZJJZZZrzbbbbbbbffzrrrrrJJJJrrrrrrZ闓ZJzjnfzrJZZJrbjfJJJrJJJrzzzzrZ푙zbnr靅JfnjfzzZJfbbbjjbrᗙJ ퟟrzZZfnbbz闑nr@=&&Pfv" E@@#   c`bzfzfjfrJZᕑJbnnfZrbbbbnjjfZ푝f釀bfrJZJbnnbfffr镑ZJJjJZZJbjjbzrrZ鑝ZJffJZzjjfrrrᗝ@=s&&Pfv" E@@#  ՀdaşrzbfZrJZfnzJZZ퓙jJrbfZJrZZznnfJᗙjœzbzfzZZrrZ啓bbbnfrnnnjjbzJJZZ핑JrJrbjbJZZZzffffbnjnfzrJ镑ZJZJznj@=Q&&Pfv" E@@#  ƀebpbrZZJzzzzfbnnfzrJZ핑rJJznjnzZZZZrrrzfbnbfzrJZ핑JzfbjjbJZJJZJrrzzfnnbfzzrJ핗ZrbnjjnfrrrrZZJrrzfbnnnbffzrZ闑ZrbjjjnfzzzrZZJzzzzfbnjnnnbfzrZ핗ZJzbjjbfbbfrrzffffb@=_&&Pfv" E@@#  \)fc`njjjjjnbfzJ镗ZJrbnnnbnbfrrzffzzfbnnnnnbfzrZ镑zbjnbrZJrrzbjjjnbzJZ헓fnjzfjfZZZ핑Znn闑Jf헝fnjzᗕ鑝jbZZJ@=x&&Pfv" E@@#  *gdP鑙nj镕zzZJJ푛n镕fzJrrZᗙnJ핕rfZJzrJZ퓅Jj镗zzZrzzrJ퓅nZ镗rfJrffzzrZ@=H&&Pfv" E@@#  ^he@rŕbfZZzbffzrZ靅ZՕffZJfbbbffrᑙf呑jzZznjnbbzJ퓅n坟zJznjnbz啝៟fZJrznnfzJ@=˽&&Pfv" E@@#  рif0Zf陟jnJJrrzbjjnfrJ嗟Jj闗rjzZZJZ镕ZZJJJJZZJJrrrrrrrrrzrrzzrrrrrrrrJJJZZZZJJJrrrrzrzzrrrrrrrJJJZZZZZZZZZ@=3&&Pfv" E@@#  .jg JJJJJJJJJJJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJJJJJZZJJJJJJZJJJJJJJJJJJJJJJJJJJJJJJJJJrJJJrrJrrJrrrJJrJrrJrrrrrrJrrrrrrrrrrrrrrrJrrrrrrrrrrrrrrrJrrrrJJ@=/&&Pfv" E@@#  Y!khJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJJZJZZJJJJZJJZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@= &&Pfv" E@@#  UliZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZZZZJJJJZZZZZJJJZZJJZZZZZZZZZJZZZZJJJJZZJrzfzzzzzrrrrrrrJJJJJJJJJZZZZ@= &&Pfv" E@@#  miZZZJrrzzfbbbbbbbbbfffzrJ镗 r嗟rnznbJZJznjjnnbfrZ핑 jnrzrJfnfZZZZJrfnbfzrJZ镓bbbzZrfjZ@= &&Pfv" E@@#  ^}njzjjfrrzJZZ啑zbzZ᝛ZrnfJZJzzzzrJ闑zfzbjbJZzbnbfrJrzffbnjjnbbfrZ푙bᓛffzbrZZZJrfnnjjjbfzJ镕zZznjnzJ@=l &&Pfv" E@@#  րokrbfnjjzrfzJJzzzzfbbfzfrZ闝r핝znzJZzbnjnnbrZZJZᗝjnnrZ闕znjjnjfJJrffzffrZ핓njjzZ嗕JbnjnbbJJzbbbnnfzzJ핗@=K &&Pfv" E@@#  &plZbzjjnf啕rzbjbbfZJZZZrzfbbbbfzrJ鑝ZjfjJᑑJrfjfzfJZJZfzzbjnnbbzJZ铙fjff靕JrbnzzzJJfzbjjbnbfrJᕓjnfjr呝JrzjjfJzJJzfzbj@=k &&Pfv" E@@#  qmnbbfrZᕗnnf靟ffbbJrJZrbfnjnnzJ闝jb鑟jfZJZZJJfjjnbzZᕑ헕jjn헕jjjzrzfjjbzJ핓nbJ嗓rffnzrJJZJb@= &&Pfv" E@@#  ʀrnjnjnnbr핑zr푝bjfZZrrrbjnjnfrrZ헝ZᗝjnbbZZrbfbjnffzr핓jJ鑝ZZfnrJJrrnjbbnfrrZ헝rb啓JbbjbJznfbjnfzzJZ@=jR &&Pfv" E@@#  so헙rj静jnzJrrznnbbfzJZZZ핝fJnZfJZJbjnjnbfzJZZZZ푟fbnb퓛jbZZzjjjjnzJJZZZ嗟bbb鑙ZfbJZJfjnbbzJZᗙbb@= &&Pfv" E@@#  tpb鑟JbfZJrfjnbfJZ韅znjr헓znJJznjnnbzrZZᗟrbnJᕑrnzZJzbbbnbzrrZ헟rff呙ZrnbbbrZrzzrrzrJZ镑rfbzZZZZ@=< &&Pfv" E@@#   uqpZZJJJZZJJZZZZZZZZZZZZZZZJJJJJJrrrrrrrrrrrrrJJJZZZrrrrrrJZJJJJJJrrrJrrrrrrrrJJZZZZZZZZZZZrrrrJrJZJrrzzzzzzrrrJZJZZZZJZZZZZ闓ZfnnbbnnzZZrrrfnj@=? &&Pfv" E@@#  8vr`nnbnbfrrzzrrrzzzzzfzzrrrZ镑bjjjrZJrrrnjfzzzrZJzffbbnnbfzzJ闓JjjfJzrfjjnbrJrJZzffbnnjnfzrZ闑jbjz헑JzrfnbfrJZZZZJrzfbjjjjnbfzJZ闓nfnJ@=L9&&Pfv" E@@#  TwsP핗ZrrbjjnfzbrZJZrzrfjnjbnfrJZ헓JfzrjJJrrnnznjffbzfbrznnfnjnnnfzzJZZ闗ZrzbbzbbrJJJrrznjjbbfzzzzzzrrrJZZZZZZZZJJJJJJJZJJrrrzzzzzrrrrJJJJJJJZZ@=&&Pfv" E@@#  ]xt@ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJJJJJZJJJJJJJJJJJJJJJJJJJJJJ@=&&Pfv" E@@#  yu0JJJJJJJJJrrJJJJJJrJJJJrJJrJrrJJrrrrrrrJJrrrrrrrrrrrrrrrrrrrrrrrrrrrJJrrrrrrrrrrrrrJrrrrrrrrJJJJrrJJrJJJJJJJJJJJJJJJJJJJJJJJZZZZZZZZZZZZZZZZZZZZZ@= D&&Pfv" E@@#  'zv ZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZJZZZZZZZZZZJZZJZZJZJJZZJJZJJJJJJJJZJJJJJJJJJJJJJJJJJJJJJJJJJJZJJJJJJJZJJZJJJJJZJJZZJJJJJJZZJJJJJJJJZJZZZJJJJJZZJZJJJZJZJZZZJZJJJZZZJJZZZZJZZ@=&&Pfv" E@@#  {wZJJZZZZZZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=B5&&Pfv" E@@#  |xZZZZZZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZJZJZZZZZZZZZZZZZZZZZZZZZZZZJJZZJZZZZZZZJZJJZZZZZZZJJZJJJJJZJJJrJJJZJJJJJJZJJJJJJZZJZZZZJJZJZZZZZJZZJJJrJJrrrrrrrrrrJrrrrJrJJJJJJZJZZZZJJrrzffbbbnnnnnnbbbffzrrZ@=O&&Pfv" E@@#  5}x핗JrzbnnjjjjnnnbffzzzzzrrzrrrrJJJZ闑ZJzbbnjjnnnbzzzzzzfzzfffbbbffzrJZ闓ZJznjjnbbzrrrrJrrrzfbbbbbffzrJJZZ镗ZJzfffnnbbbbbnnjnjjjjjjnbbzrZ闝Zrbj@=]&&Pfv" E@@#  E~yjjnbfzfzzffbnnjjjjnbfzrrrJJJJZZZZZZ핑ZJzbnbbnbfbbffbnbnjjjjjjjjnffzrJZ헝ZJfnjjnjbfbfzrzzzzbnbjjjjjnfzzrZZZ핓ZJfjbbbbzzzzrJzzzfnnnjjnnnbfzrJJZZZᕑJrfnbfzfzrzzrJrzfbnnnnnn@=h&&Pfv" E@@#  `zbffzJZZZ闓ZrzzffrrzzrrrrrzffbnbbbffzzrrJJJZZZ핑ZJrzfzfbbffffzbbfbbbfbbffzzrJJZZZ鑝JJrzfzfbbffffzffffbffbbffzrrrrJZZ핑rrzffzbnffbfzffffbbbbnbbffzzrrJJZZZZZZ@=]&&Pfv" E@@#  ۸{鑝ZrrffffnnbbbfzfbbbnnbbnbbbfzzzrJJJZZZZZᕑZrrzfzfbbfbbzzfffbnbfbbbbfzzzrJJZZZZᕑrrzfzzbbfffzzfzzbbffbbfffzrrJJJZZZZ闝JzzzzzfbbbfzzzzfbbbbbffffzzzrJJZZZZZ핑@=W|&&Pfv" E@@#  |rrrzzrfbbfzzzrzffbbfffffzzrJrJZZZZ闝JrrzzrrfbffzrrzzzfbfffffzzrrrJJZ헓rrzzrrzfffbzrzzzzbbffbfzzrrrrJZZ闓ZrzffrJzffbbzrzrrzffffffzzrrrrJJZZZ핑rzffrJzffbbf@=&&Pfv" E@@#  )}zfzzffbbnnbfzzrzzzrJJZZZZJZ闓ZfbnnfzfbbnjbbbfzfbbnjnnnfzzzzzzzrJJJJJJJZ闓핕zbnjnffbbnjjnnbfbbbbnjjnnffzzzffzrrJJJrJJZᕑJfnjjffbbbjjnnnbfbbbnjjnnbzzzzzzzrrJJJJJJJ헓rfnjbzfffbnnbbbfffffbnn@=b&&Pfv" E@@#  Ҁ~nbfrrrrrrrrJZZZZZ헓zfnnfzfzzbbffbfzffzfbbbbfzrrJrrrrJZZZ鑝JfnjnfffzfnbbnbfffffbbnnbfzrrrzzrrrJZZZZ헓ZzbjnffzzzbnbnnbfffznbzrZZZJZJZZ铛ZfjbffrJJJfbjjbbzzzrJJJJrzzz@=&&Pfv" E@@#  EȀzzrrJJZᕓbjbzZJbnjbfzrzzrrrrrzzzfzrrrJᕓfbrJbnfrrrzzzrrrrzffzzzrJJᕝjzZJfjnzrrzfbnbfzzrzzzffzzrrJZ鑙J嗑rzbfJJfjjfzrJrzzzzzzrrrZ@=DM&&Pfv" E@@#  p푙 J흟zbnrJbjfJZZJrzzzzzzrrZ鑙 ZJfnjjJrnnzZZJrzzzfzzzrJ헝r j훇rfnjjrJbjzZZJrzzzzrrrZ헝 ᅁrbjjjrZbzZJzfzzzzzrJᕑ@=&&Pfv" E@@#  N` ՙrnjfbfZJzffzffzzrZ헟z nnbfnJJzfffffffzJᕑ ńfjrZjzZrffffffbfzZᕓ 5 퀏bjjjJjZZzfffffffzJ鑟@=7&&Pfv" E@@#  P5퀎fjnnnŕZnZzzzzzzffzJ鑙 jnjnbjzᑑbzJzzzzfbbbzZ铅n 5 ZrjnnjՕjJZrzfzzfbbfrZᕝ5zjjnjnJnZZrzfzfbbbfrZ铅@=y&&Pfv" E@@#  %@5zjjnJnZZzffffbbbfrZ퓅 5 ՆzjjnŕZjZZzffffbbbfrZᕟ njjJ푗nzJzfbfbbbbzJ푅j 5ՇzjjbZjZZrffffbnnfrZ铄@=!&&Pfv" E@@#  K0 rjjnjz呝JbZrzzzzbbbzJ靄 Jnnbjz呝JnJzzzffbbzJZᗙ nfnbbjŗjrJrzzfbbnfrZ铅j JbnbjrᓝrbZJrzzfnnnfJᗟ@=&&Pfv" E@@#  0  zbbbՕbzZJJrfbnjbrZᕟ znbbjŗnjrZZZZrzbjjbzZZZ헟zJZfnbbz哝JbJZZJJZJzbjjbrZZZZ铛J fZfbbbz呓rjzZZZZZZrznjjfJ@=Z&&Pfv" E@@#  'WZ闟适rfbfnnjnbfzJJbnrZZZZ헙 rfffbjzrznjbJzjfJZJJZ푛 jJrfff哟jjrZJbjjfrjfJZZJrJZᗟ JrzfnՕffJr@=A&&Pfv" E@@#  1njrZbjzZJrzzrZᗙ 凍JrfbjŗbfZZzjfZJfjjzJJrzzrZ铄Z zZrzfbzᓓZnrzjfJZrfnbrJJrrrJZ푛r JJrfbbrᓑZjbJJbjjzrzfnnjbzJJrrrJZᕟ 퇂@=y&&Pfv" E@@#   rzffnnŕzjzZfnnzJJzbnjnzJZJrrJJᕟj rrffbJ헕rjfZJbnnfJJznjjbrJJrzrJZᕟ ZrrffbrᕕJjfrbfJZrbjnzJJrzrJZ鑙 fjbfrrbJzjJJbbrJznjjnzrzfbf@=k &&Pfv" E@@#  zJZᕝr៙rzzfffnnJZznjfJJfnjbzJJzbjnfzrrrrJZ闝JfJzffzzfnjfZrbjbrZfjjfrrznjbzzrrrrZ镑Jnr嗑ZfnbffzfnjfrJJrfnnfrrzbnnnbfffnjjbfzzzrJZ闑zzrZZrzffffffffzrr@= &&Pfv" E@@#  NrzzffnjnbzzfbnnjjjnbfrJJZZZ镗ZZJrzzzzzzzzzzzbnjjnbbbnjjjnbbbbffzzrrrJZ핗ZJJrrrrrrJrzzbnjbbbbbnjjnbfzrrrrrJJJ镕ZZZrzfrrJZZZZZZZ핕@=U &&Pfv" E@@#  i镑JZZZZJJZ镕ZJJrzfbffffbbbbnnbfzzzrrrJJrrJZJJZJrrr@= &&Pfv" E@@#  4zfnjjjjjjjjjnnnbfffffffrJJJZZZZJJJrrzzzzffbjjjjjjjjnnbfffbfzrrrJJZZZZJJrzzzzzfbjjjnjjnbbffzzrrrJJZZZJJJrrzzzfbnjjjjnnbffzzfzJJZ@=U@ &&Pfv" E@@#  ZJJrzzbnnjjjjnnbbbnbfzzzrrrJJJJZZZZZJJJrzzzfbnjjjjjnnbfffzzzrJJZZZZJzzzfbnjjnbfffffzrJJZZZZrzzfbnnnnn@=ĵ &&Pfv" E@@#  UjnjjjjnnnnbbfzzzzzJJZZJJrzzfbnnjjjjnnjnbbfffzrzrrJJZZZZJrrrzffffffffffffzzzrJJJJJZZZJJrzzzfffbbbbbnnnnbbbbffzrrrJJZ@=(+ &&Pfv" E@@#  ZZJJrzfffbbbbbnnnnnnbbbffzzzzrJJJZZZJJrzzzfffbnnnjjjjjjjjnnnnnbbfffzzzrrrJZZZZZZZZJ@= &&Pfv" E@@#  ̀pZJJrJJJrJrrrrrrzrrzzzrrrrrrrrJJJJJZZZZZZZZZZZZZZZZZZJJJJJJJrrrrrrzzzzzzffzffzzzzzzzzffffffffbbbbbbbbbbbbfffzrrJJJJZZZZZZZZZZJJJJJJJJrJJJZZZZZZZZZZJJJJrrrrrrrrzzzffzfzffffffffzfff@= &&Pfv" E@@#  `zzzzzzzzzzzzzzzrrrrrrJrrrJJrJJJJJrrJJrrJJJrJJJrrrJrrrrrrrrrrrrrrrrrrrzrzzzzrrzrrrzzrrrrrJJrrJJJZZJZZZZZZJJZZZZZZZZZZ@= &&Pfv" E@@#  <؀PZZZZZZZZZZZZZZZZZZJZZZJJJJJJJJJJrrrrrrrrrrrzrrrrrrrJJrrJJJJJJZJJZZZZZ@=&&Pfv" E@@#  @ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=v&&Pfv" E@@#  d0ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  V ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=x &&Pfv" E@@#  ~NZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  ]2ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  dπZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=T|&&Pfv" E@@#  F;ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=h&&Pfv" E@@#  ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZZZZZJZZZZZZZZZZZZZZZZZZJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=f&&Pfv" E@@#  .ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  =ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=QQ&&Pfv" E@@#  ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=&&Pfv" E@@#  jZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZJZZZZZZZZZZZZZZZZZJJZJJZZZZZZZZZJZZZZZJJZZJJJZJZJJZZZZZZJJJJZZZJZZJJZZZJJZZJJJJZZZZZZZZZJZZZZZZZZZZZZZJJZZJJZJJZZZZZJZZZZZJZZZZJZZZZZZZZZZZJZZZ@=s;&&Pfv" E@@#  ڀZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZJZZZZJZZZZZZZZJZJZZZJZJZZZZZZZZZZJJZZZJZZZJZZZJZZJJZZZJZJZrJJJZZZ@=&&Pfv" E@@#  @pZZZZZZJZZJJZZZZrZZZZJZZZZrZZZZZZZZZZZZJJZZZZJZJZZZZZZZZZZJZJZZJrZZZZJZZZJZZJZZJrJZzJJZr@=(&&Pfv" E@@#  S`JJZZZZZZZZZZJJZZJJZZJZZJZJJZJZrJrzZrZZJJJZZZrZZZJrZJZZrJJJJZJZZJrJZrrrJZrZJJZJJJZJrzJZJzzJZJrJJzzZZrzrJJJrZZZJrZZrrJZJrrrJJJrrrJr@=&&Pfv" E@@#  WPrJJJZJJrJJJzrJzJrrJrrJJrrfrJZrrrJZZrfrJffrZJzzzJJrrzzrrzzzrrzzrrrrrfzrrrzrrzzrzzJzzzzzzfzzzfbfffrfbffzfzzrrzzrzfzzffffrzffffzzfzfzzbfffbzzzzzzzzzfffzfzzzfzfzzzfzrzffzfrzzzrzffzzzzzzzzzzzzrrzzrzrfzzzrzzzzzrrzrrJrzzzrrrzzrJrrzzrrrrrzzrrrrrrJ@=f&&Pfv" E@@#  *Ҁ@JrrrrJJrJrrrrrJrJJrrrJJJJJJJJJrrrJJJJrrJJJJJrrJJJJJJJJJZZJJJZZJJJJZZJJJJZZZZZJZZJZZZZZZZZZZZZZZZZJZZZZZZZZJZZZZZZZZZZZZZZZZZJZZZZZZZZJJJZJJZZZZJJZZZJJJJJJJJJZZZJJJJZJJZJJJJJJrJJJJJJJZZJJJZZZJJJJJJJJJJJJJJJJJJJJrJJJJJJJJJJJJJJJJJJJJJJJJJ@=&&Pfv" E@@#  L0ZZJJJJJJJJJJJJJZJJZZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@= &&Pfv" E@@#  T ZZZZZZZZZZZZZZ@=o&&Pfv" E@@#  HZZZZZZZZZZZZZZZZZZZZZZZZZbjrrZrZZZZJJZZZJZZJZZZZZZZrfrZZZZZZZrrZJrJfzrzzzfznnfZJ@=&&Pfv" E@@#  ȦbZrrrfzrzzZbzffzzZJZZfbjnzbrJZZZJJzrrJZrZZZZZZJJzrZJJZZrZrzZJJZZJZZZZZZZZZZ@=Z&&Pfv" E@@#  ֢rZJJZrJZZJZZrJZrrJZJJJrrJrJZJrZJZrzbjjnnnfffrJZ鑝ZjzfnzZnjzbnffzZZ镑雇fnj@=o&&Pfv" E@@#  nrnnZJnzZbbbjbfzJZ헑JfZjnnfbjfffZJbbrbjnjjnbffzrrZ镓zfZnjjJJfzbnbfzJJrJZZJᕝfZ rJZZbrzzZZZZZZ헝@=D &&Pfv" E@@#  znz嗓jjnfrJZJZ镟JjzJZfnnzrJ闓zbnzzJZZfnnnnfJ闓ZrbjjnfbzrrJrzrznnjjjjjnbfzrJZ@= &&Pfv" E@@#  絀镗ZrzfbbnbbbfzzzzzzzfbbbbbbbbfzzrrJZZZZZZJJrrrrzrzzzzzzzzzrrrrrrJJZZZZZZZZZZZZZZZZZZZZZZZZZZJJZJJZJJJJJJJJJZZJZJJZZJJZZZZZZZJZZZZZJZZZZZZZZZZZJJZZZZZ@=./ &&Pfv" E@@#  1ZZZJJZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZZZZZJJZZZZZZJZZZZJJZJJZJJJZZZJJZZZZZZZZJZZZJZZZZJZJJZJZZZJZZZZZZZZZZZZJJJZJZZJZZJJJJrZZJJZZJZZZZZZZZZZZZZZJZJJZJrJrJZZJJJJJJrJZrJJrrrrJJrrJJJZrzJJJJJzzzfzJzrrzJJzzJrrz@= &&Pfv" E@@#  >3rzrzrJrrrJZZZzZJrZJJJZZJJZZZZZJՕZZJZJJzJJZZZrbfzZrJJJ@=+ &&Pfv" E@@#  g;rZZzzbbZnJZzfrrZJJJZZZZZZZZZJJZZJZZZZ闓JznjbzJ푙 1  n74fn fbfrfjzrrr嗟1?J 5@= &&Pfv" E@@#  Zf fJznjbzZᝃ ::5큏126Jb44r푅jZZnbJZJJJrr啙Z2%2n523勵J 5zzjnbbjbzzzzJᕙ?< Jn ZZnj՗jbrZZZ@=K &&Pfv" E@@#  KxpfzrbnbfzfzJ학16r퍎bnᓄbbZᗕbퟗzzzZZJᕝ1 nrrfjbb嗛fjJnJbjbffbnfZJZ靀04Jnfbzjrfb靗ZzZJrZz5zf@=;z &&Pfv" E@@#  v`znZrfzzfJ26bzf Jnjnnfnfzffjjnbfrrffzᝀ65zjzrJZnzrjznbjnnnfrzffJៀZ5铟rJrZnnzrr铕fbbbjbJJbnbbjnbjjnffbbbzJJ@= &&Pfv" E@@#  ;P嗟nnŕrjZZZrbJbjjjjnrJJzbnjjnnbfzzzzzJjnz훙bbffJrfrrfbzJzfnjnnnbbbbbjjnnnbfzzzJZ鑟JzrZrzzffbbbbbfzrJrrJJJrrrrzffffbbbbbbnnnbbbfffzzJZᕓZr@=Sf &&Pfv" E@@#  A0@zzrJJrrrzzzfbnnjnfffzrrJJJZJrrJrzzfbbbbbbbbbffzrJ鑙JrJJJZJZJrrrfbbnnbffzrzrJZZZZZJJrrzzffffzzzzrrJ헝JJJZZJZJJJrfbbnbbffffzrrJJJrrrzzffbbbbfffzrZ핓ZzfzzJZJrrrzrzbnnjjnnnnnbfzzzzfffbbnnnjnnbf@= &&Pfv" E@@#  0frZ啓rbfffzrzzzzfzfnjjjnjnnnbfzzffbbnnnjjjjnbfrZᗝZJzbffzrzJffzznnjnnnfffffbbnnjjnnnfrZ푙bfzbbbZZJJJrfnnjnnnbfffzrrzzfbbnnbbbfrZᗟrbrfrbJZJJzbjnjnjbfzzrJJrrrfzfffzrJZᗙ@=`&&Pfv" E@@#  8ʀ ZnbbfzfJrzfjjjjnzzrrJJJrJrzzzzrZᗟrJnjnbJrZJzfbjnfzrJJJJZJJJrrJZᕝfnzjnzrbjfrrJJJJrJJJJZZᗟnbnrrJfbbbJZrrJJrrJZ핝bnnfJbnbjjrrfz@=&&Pfv" E@@#  !ZrzzZZJ鑝rbfzZbbbbzZJzrJrzJ闑jzJJJJjzrfrJzfzzrJZ闟fjZ흗JZbbrJrrJzffzrZ핗ZJzffjjzJffzfbbJ啝JZnj陓zfjjjnJrfffbnnr@=g8&&Pfv" E@@#  "SrJbJnnjbJZfjnbnjfZᓛzzj᝝bjjjzZrbjnbjf퓙rzbZ呝bjjfZrnjnjf韇Jbf陗JjnjrJzjjjr韄ff陑njzJfjz呅zbnz@=kk&&Pfv" E@@#  坄zjjrrnrZZrbrnrnjzrjfrr陇rnnrᑛbjfbfrrJnff陕fjbnbrrŕzjrr៕njbfzrZbzfn@=&&Pfv" E@@#  7nzfnzjfzfjjbnrfZ鑙zzՕznfjjjf핟Zrśfbjf핑J՗zrzjr镟ZnZ呓J@=`U&&Pfv" E@@#  ZrjjjjjZ啗zb퓑ZZfjjjnjjnJ啝JJjZ铕JzffbbjjnbfZ闙ZrᗓJrzjbnjnbnjjbrZ헟rfr헟ZzfbfnzZfjjjzzfZ镓fJbb@=\&&Pfv" E@@#  (ŕJbznjbjjrrbnbnbnnzZ闑zbfjjrfnnnzffJrfbbnbffJ镑zzfnnbJrfnjnrrrZrrzfzJZZrrrJJZZJJJzzzzzrrJZJrrrJZJfnnrᗝZrfjnr헕ZznnbzZJrrrrJZ@=@&&Pfv" E@@#  QZJrrrrJZJJrrJZZJrJJZZZZZZZZJrrrrJZZZJJZZZJrzzzrJZZJJrJJZZJrzffzrJZrrrrJZZrzffzzrZJrrrrJZZZZZJrrzzrJJJZZZJJZZZZZrzrrzzJZZZZZZJJZZJrzrJrzrZZ@=ȴ&&Pfv" E@@#  ,ZZZJJZJJJZZJJrzffrJJJZZJJJZZZZZZZJrrrrrrJZZZZZZZJJJJJJJZZZZZZZZZZJJJZZZZZZZZZZZZZZZZJZZZZZZZZZZZJJrrzzrrrJZZZZZJJZZZJJJJrrrrrzzrJrrrJZZJJZZZZZZZZZZJJJrzzrrrrrJJJJJZZZZZZZZZZJJJrrJJrrrJJrrrrJJJJZZZZZ@=%*&&Pfv" E@@#  ZZZJJJJrJJJJJJJZZZZZZJJJZZJJJZZZZZZZZZZZZZZZZZJJJJZZZZZZJJZZZJZZZZrZJZZZZJZZZZZZJ@=(&&Pfv" E@@#  fZZZJJZZZZZJZZZZZJJZZZJZJJJZZJrZrZZJrJZZZZZZZZZZZJJZrJJZrrZrJJZJJrZZZZZZJZZZJZJJJJrJJZJJJJJZJZJJZZZZZZZZZZJJZZZJZZJrJJrrJrJJJrJJrZZZZZZZZZZZJZZJJrJ@=&&Pfv" E@@#  UpJrJJzrJZJJJZJJZZZZZZZZJZZJZJJJJJJJJZJJJJZrZZZZJZZJJJZJJJZJZJZJZZJZJZJJZZZJZJZZZZJZJrZJrJJJrZZZrJZJJJJJJZJZZZZZZZZZZJZZJJZZZJZZZJZZZZZJZJJJZJZJJzJZZzrJJJZZZZZrZZJ@=Q&&Pfv" E@@#  =<`ZZZrZJZZJJZZrrJrJJZrrJZJZZJZZJZzJZZZZZJJZZJrJZJJrZJJZZJZZZzJZrZrZrZZJZzJZZZJJJZJJJzJZZJZJJZZJJJZJZrrJZZJZJZJJZZJZJrJrfrZZZZJJJZJrJZZZZZZJJZZJZZJJJZZZZZZZJJZ@=U&&Pfv" E@@#  pЀPZZJrzbnbbnnnjjjnjjnbffzJᕑ ?3f65JjJZJnnrzfffnnfZᑟ2> 폏55zfzzbbnZrzfjjnbnfJJrzrj6=ŌZ ᄇfbjjŕZjzznjbJ@=Xv&&Pfv" E@@#  9@ZnbzzrrJrbnfZ흄67zfbᅟjnjZzjfzfnfJZzfrJrzbnnbzᗟn5JfnnnrrbbnnfnnzrzfzJrbjnrZJrfbnbzJ铙 탍bnbbjzbffbzZJfnnbzrrrJrzbjnzJZJzbbbzJᗝf@=H&&Pfv" E@@#  _0nfznnZJbrrzzJZJzbbzJZZJrzfnnbrZZrffzrZᕓzՅZbnffnnzzfrrrrJJZJzbbfJZJfbnnbzrJJrzffzrZ헟ᇁznbfbjjzbbzzfzrZZznnbrZZrfnnnfrrrzzffzrJᗝfrbnffjjrjbzfbzZJbbzJZ@=b&&Pfv" E@@#  7 rbbbffzzzzzzzrZᗟ՟rzzbfzjjnnbrrfbbfzzrrJJJrrzzrrJJZᕝJf呓rjbJZJzbnnzJZJzffzrJZᕓZzfzZZrzzzzbbbzrJJJrrJJJJJJJJJJJrrrrrrrJJJZZZZ핓ZJ@=&&Pfv" E@@#  d̀ZZJrrJJJrzffffffbfffzrrrJJZZZJJJJJJrrrJJJJZ핑ZzzrJrrzfzrJJrzffffbbnnbbfzzzrrJJJrrrrrzzzzzzrrJ헓rfzrzzfffzJJrffffffnnnnnbfffzrrrJJrrrrzzzzzzrrJ闝JffzrzffffrJJzfffffbnnnnbffzzrrJJrrrrrzzzzzzrrJ@=H&&Pfv" E@@#  q鑝rbfzzffffzrJrfffbffbnnnbbfzzrrJJJJrrrrrrzzrJJ핝JffrrrzzfzJZJrzzfzzfbbbbnnzzrJZZrrrrrrJZ靅fbnjnnZ푑ZJzbJJrzJZZJzffrJJJrrJJJrrrJZ퓛fjjnf՗ZJbbrZZJJrfffzJZJJZJrJZᗟ@=ҽ&&Pfv" E@@#  EbjjbZZrnffzzrJZJfbbfzzzzJZJJJZ啝fnnbJ퓕ZfjjbzrrfnnbbnbbfrJrrrJJZZ헝rfbzZfjjnbbbbfzfbbbfzzzzrJZZ헓ZrbnzZJJzbnnnjnnnbzrzzzzrrzzrJJZ핗ZzbbbfzzzrJJrr@= 3&&Pfv" E@@#  zffbnjjjnbfzzrrrrrJJJJZZJrzzzzzfzrrrrzffbbnnnnbbffzrrrJZZZJrrrrzzrrrrrrrrzfffffzzzrJJJZJrrrrrrrrrrrzzzzffffzzzzrrJJZZZJrzfzzzzzrrrzzffffffzzzzrrJJJZZ@=9&&Pfv" E@@#   qJrzfbbfzzrrJJrzffbbbbbffzzrrrJJZZJzbjjbfrrJZJrzfnnjjjbbbfzrrJJZZ핑JZzbrZZZJznjnnnzZZJJJJJrzrJ鑟rbznf핓zffnzrzrZrzrzzfzJ헟ffᕗnfZZJZJfjnzzbfJ@= &&Pfv" E@@#  WL푟nz镕znJZzfrzbjjnffbzJ铙fznfnbbbjjnjjbfzr闟雙nzZnjfZJffZJjnzbnjjnfrzfzZZ镑JzbnnbnnnbfbnnfzzzzrJZZ镑@= &&Pfv" E@@#  ǰZ啑闗헟鑑闕ZZJZrJZJZZJJzrZZrrZrJZrzZZzrfzrJfrzrzJzJzzJzzzfrrzZzfJZnzzrzzzfrrfbzffzzbrzzJfrZfrZJJZJrrZJrJJZfrrrrzZJzrJZJzJrfZrfZZzrJzJrJrZrrJJJrrrZrrrZfJzJ@=Q &&Pfv" E@@#   ȠJJrJrZZJJZrZZJZJZJZZJJJrJJrZZrJJrJZrJJrzZJrzJrrzzJzzJJrrJzzrzzzJrZzrrJfrrzzJzfzzzzffrznfzbzzbnbnjfnjbbbfzfbnbbbbzffnzzfbrfbfbffzzfzzffbnzffffzzbzzzffzrrffrzzzzrJJJJzJZrJJJZJJJZJZZrJZZJZZZZ@=| &&Pfv" E@@#  (-ɐZZZZZJZZZZZJZJZrJZZZZrZJJZJrrZJZZJrrZJJrJJzfzzrzfzrfzzrJrrrrJrrrrrrrrrzrrrrJJrJJzrrJrZrzZzZJrJJZrZJZJzJrJzJJJJZZJZZZZZJZJZZZ@= &&Pfv" E@@#  "ʀZZJZZZZZJZZZZJZJZZJZZZZZZZZJrZJZZrZJZZrZrrJZZZZJZZJZZZZJJZJZZZZZZZZZZZZZZZZZZZZZZZJJrrrrzrrzzzzzzzzzzrrJJJZZᕑ@=!k &&Pfv" E@@#  Ypzbjr鑑JnjbrZJrrbjnjnbfzzrJrJJrrJJZ韆rzbrᑟfnrZZzfbjjbfzZ푅bnrᑝzbjjz헓JbjnfrZJrfbffzrZᕓznZ푛j@= &&Pfv" E@@#  #`jz闑JbjnzJnbJJrJzbzrJ铛rnz푝JjbZ啗JfnnfJbbfZzffnbrJJ铟JjjrZbjz푓ZbjbrZrbbZZJZzbjnfbr학njbJ@=6S &&Pfv" E@@#  PP퓝Zrf啑fnjbrZrfnjzZZZZJrfnnffzZᕟfbfr闗ZfnbrrffbnbzrZJbbzrZZZZJrrzrJJJZ镑ZrbnnbfzrZZJrJJJJZZZZZJJJrffffzzrJrrJJJJJJJZZZ@=F &&Pfv" E@@#  @@ZZJJJrzzzfzrrrrrrrrJJJZZZJJrrzzzzfffffzzzrrrJZZZZZJJrrzzzfzzrrrrrrJJZZZZZJJJrzzfffffbbfffzzzrrJJJZZZZJrrzzzzzzzzzzrrrrrJJJZZZZZZZZZZZZZJJJ@=J? &&Pfv" E@@#  ̀0JrzzffbbbbbbfffzzzrrJJZZZZZZJJJrrzzzzrrrrrJrrJJJZZZZZZZZZZZZZZZJJrrzzzzffffffzzzzrrrJJZZZZZJJrzzrrJJZZZZZZZZZZZZZZZZZZZZZZZZZJrzbbbffzzzzrrrJJJZZ镗Jfbbnbf@=6 &&Pfv" E@@#  c׀ rJJrrrrrrJZZJrfnnjjfrrrJJJZJJJZZJZZJJZ핗ZzbjbzJZfbbnnbrZJrfbbbffbbbnrzbzrzzrzrZZJJZJJ鑝zfnnz闗ZfjnrrbbbnbzJZjnzrZZrzrzfzJZJZ@=&&&Pfv" E@@#  6핝rbnzJ闗JrbbzrJfnbfzJZrnjJrzbnfzzrZZ헝zjjr啗JfbjjfJJrfjnfrZrfrrfnjfzzJZJJJZZJzfrffrzzrzzrZZrzzzfzJJJJ@=&&Pfv" E@@#  EjnjzrzJZJrrzzJJzJZZ静rbbjbZrffnnzZJzzzzJZrrzzzbjrJzJZJZJzrrrZZZZZZZJJJJrJJJJZZZZZZJZJJZZZZZᕓbbfbfZJffzfzZrrJJZJrJJJJZZ@=&&Pfv" E@@#  ƬJJJJJZZJJrjfZZJrrrJZZJZZJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ@=D&&Pfv" E@@#  "ZZZZZZZZZZZZZZJJJrrrrrrrrrJJJZZZ闓rzZzfbfrJZZzzrrrJZZJJJJZZJJrrJZZZZZJJJJZZZZZZJJJZZZZZZZZZJJJZZZZZZZJJJJJJZZZZZZZZZJJZJZZZZZZZZJJJJJJJJJJJznZJZrbfr@=&&Pfv" E@@#  oZZJrzrZZZZJrrJZZZZJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJZZZZZZZZZZZJJZZZZZZZZZZZJJZZZJZZZZZZZZZJZZZZZZZZZZZZZZZZZZZZZZZZJJZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZJJZZZJJJZZZZJZZ@=\5&&Pfv" E@@#  镕fjzznjnzZJzbbzZZrfnbfzrJJJrzzfffzrrJJJJZZJrrJZZZbjnrZfnjbrZJzjbJZZrzzbnjjbrZZZJrrrrJZ헟rfjrrnbZJrbjjfrJrzfffbjjnfrJJJJJJJJrrJZ@=P&&Pfv" E@@#  xְZZZZJJrJrrrrzzzzfffffzzrrrrrrJJZZ鑙nՓfőJbr嗑JfrJfbnfJZJrrzrJZ핓铓nn핕ZbnrZznjjjnfrZJrfnnbbbzrJZJrrrJ헟z흝nr@=&&Pfv" E@@#  Xנ핗nbZJjzzzZrnnffzJJrzffzZ铛Օr啗nfJznnbrZfnjnnfrZJrzfzJ啑ZZ闙jnz鑑znjjnfrZrbjfJrfbnjnnjnzrzzzfrJZ鑝fZᝅzr@=&&Pfv" E@@#  ؐJfbbfJZJffzzffnjbbnjjjnffbfzzzzfzrJZ闓znbjnnf퓕JrJzfJZZJrJrnnbfzzfffbjjjbbbzzzrrrrJZ镗fbjnzrrJrrzrJJJJrbjjnnbfzzzrzffbfzzzzrrJJJZ镗ZJJZJrJzfzrzrrr@=Z&&Pfv" E@@#  ـrrffzrzrrJrJJrJrJZZZJzrJrJZJJZrJZJrZZJJZrZZZZZZZZZZZZZZJJJZrJZJJJZJZZJJJJJJrZZJJJZJJZZJJZrJrJJZJZJJZZZJJJZZZZJZZJZJJZr@=3x&&Pfv" E@@#  pJJrJJZrZJZJJZZrZJJZJJJJZZZZJZZZJZzJrJzJrJJJrZrZJZrrJZJJrZZZJZZZJZJZrJJJJZJJZJJZrZZJZJJJrJJZJJZZJZJrJrZzZrJrZrZfJrZrJZrrJZzrrJrJrZJJrJJJJJZJZJZrZzZrZrZJrrrJZZrJZJJJJJrJJrJZZJZJJJJZJrJZJJZrZrZJrZJZJZJJZJZZZJJJZZJ@=&&Pfv" E@@#  ނ`JJJZZrZZrZrZZrrZJJZZfrZrJZZJJJrZZrJrZJrJJZJJJZZJrrJJrJrJrJJJrZJzrrzrJrJzrrJJrzZJrJzzrrzrJfJJrzrrfJzrzrzzJrzrrzzrfrrrzrzzrJzzrrzJzrrfzzJfrJrrzJfZbJbZffzzZzrzZzJzzzJfrJrrrzzJrzrrJrzzzzzrZrrzzJfJfJrJZrrJJJrZzJrJrJJfZrJrfZrJJZJrZJJJ@=Ic&&Pfv" E@@#  j]PJJZrZZrZZZZJZZZZJZZZZZZ핕JZZJJZJJZZJZZZ핗rrzzzrzZ@=2&&Pfv" E@@#  <|@JJrzzrzrJrrJrrJJzrrzzzzzrJJJZ핕ZrrzzzzJZZJrrzfbjnbnjnbbffbfbnbzfbbfzzrrJZJ闑JrzffbfzzzzJJrJJrrzfbjjnbffbnbbbfbbbbfzzzJZJZZZrZrfzrzrrrrrzbzbnjjnbnnnfbbzfffrsipp-3.5.1/pcap/dtmf_2833_3.pcap0000644000175000017500000000137412672462535015171 0ustar vsevavsevaòCQ ::P6 $E,V@'4&y@8N C ::P6 $E,W@'3eey@8N @Ch ::P6 $E,X@'2$ey@8N Cj ::P6 $E,Y@'0ey@8N C ::P6 $E,Z@'/ey@8N CR ::P6 $E,[@'.aey@8N @C ::P6 $E,\@'- ey@8N C? ::P6 $E,]@'+_ey@8NC ::P6 $E,^@'+_ey@8NC ::P6 $E,_@ '+_ey@8Nsipp-3.5.1/pcap/dtmf_2833_7.pcap0000644000175000017500000000137412672462535015175 0ustar vsevavsevaòC. ::P6 $E,V@'! 8N C} ::P6 $E,W@'`e 8N @Cp ::P6 $E,X@'e 8N C ::P6 $E,Y@'ހe 8N Cg ::P6 $E,Z@'Νe 8N Cص ::P6 $E,[@'\e 8N @C ::P6 $E,\@'e !8N C|Q ::P6 $E,]@'Ze "8NCQ ::P6 $E,^@'Ze "8NCQ ::P6 $E,_@ 'Ze "8Nsipp-3.5.1/pcap/dtmf_2833_5.pcap0000644000175000017500000000137412672462535015173 0ustar vsevavsevaòCx::P6 $E,@'b8N C|::P6 $E,@'e8N @C::P6 $E,@'`e8N Cb::P6 $E,@'e8N C::P6 $E,@'݀e8N C$::P6 $E,@'e8N @C$M::P6 $E,@~'[e8N C]::P6 $E,@}'e8NC͛::P6 $E,@|'e8NCٛ::P6 $E,@{'e8Nsipp-3.5.1/pcap/dtmf_2833_4.pcap0000644000175000017500000000137412672462535015172 0ustar vsevavsevaòC "::P6 $E,@'D8N Cp::P6 $E,@'e8N @Co::P6 $E,@'Be8N C ::P6 $E,@'e8N ClZ ::P6 $E,@'e8N C ::P6 $E,@'e8N @C[ ::P6 $E,@'>e8N CD ::P6 $E,@'}e8NCD ::P6 $E,@'}e8NCD ::P6 $E,@'}e8Nsipp-3.5.1/pcap/dtmf_2833_star.pcap0000644000175000017500000000137412672462535016000 0ustar vsevavsevaòCV ::P6 $E,@'V/ O8N CǤ ::P6 $E,@'Une O8N @C ::P6 $E,@'T-e O8N C@ ::P6 $E,@'Re O8N C& ::P6 $E,@'Qe O8N Cb ::P6 $E,@'Pje O8N @C?+ ::P6 $E,@'O)e O8N Cy ::P6 $E,@'Mhe O8N Cz ::P6 $E,@'Mhe O8N Cz ::P6 $E,@'Mhe O8N sipp-3.5.1/pcap/dtmf_2833_9.pcap0000644000175000017500000000137412672462535015177 0ustar vsevavsevaòC::P6 $E,@x' e 8N Ce::P6 $E,@w'րe f 8N @CK::P6 $E,@v'e g 8N C::P6 $E,@u'Te h 8N Cw::P6 $E,@t'e i 8N CX6::P6 $E,@s'Ҁe j 8N @C::P6 $E,@r'e k 8N C::P6 $E,@q'Ѐe l 8N C@::P6 $E,@p'Ѐe l 8N CK::P6 $E,@o'Ѐe l 8N sipp-3.5.1/pcap/dtmf_2833_2.pcap0000644000175000017500000000137412672462535015170 0ustar vsevavsevaòC ::P6 $E,@n'SjZ8N Ci ::P6 $E,@m'S2ekZ8N @C ::P6 $E,@l'QelZ8N C ::P6 $E,@k'PemZ8N CS ::P6 $E,@j'OoenZ8N C ::P6 $E,@i'N.eoZ8N @C; ::P6 $E,@h'LepZ8N C>::P6 $E,@g'K,eqZ8NCP>::P6 $E,@f'K,eqZ8NCZ>::P6 $E,@e'K,eqZ8Nsipp-3.5.1/pcap/dtmf_2833_pound.pcap0000644000175000017500000000137412672462535016154 0ustar vsevavsevaòCa3::P6 $E,@w':( i8N C::P6 $E,@v'9ge i8N @C::P6 $E,@u'8&e i8N C::P6 $E,@t'6e i8N C|k::P6 $E,@s'5e i8N C::P6 $E,@r'4ce i8N @C ::P6 $E,@q'3"e i8N C|U ::P6 $E,@p'1ae i8N CU ::P6 $E,@o'1ae i8N CU ::P6 $E,@n'1ae i8N sipp-3.5.1/pcap/dtmf_2833_6.pcap0000644000175000017500000000137412672462535015174 0ustar vsevavsevaòC&::P6 $E, @c'b8N C2::P6 $E, @b'ꡀe8N @C::P6 $E, @a'`e8N C::P6 $E,@^'e8N C::P6 $E,%@G'ހe8N Ck::P6 $E,1@;'址e8N @C::P6 $E,6@6'\e 8N C'::P6 $E,7@5'⛀e 8NC}::P6 $E,8@4'⛀e 8NC::P6 $E,9@3'⛀e 8Nsipp-3.5.1/pcap/dtmf_2833_0.pcap0000644000175000017500000000137412672462535015166 0ustar vsevavsevaòCs::P6 $E,@'[/0D8N C::P6 $E,@'[,e/1D8N @C_ ::P6 $E,@'Ye/2D8N C] ::P6 $E,@'Xe/3D8N C ::P6 $E,@'Wie/4D8N C ::P6 $E,@'V(e/5D8N @CG ::P6 $E,@'Te/6D8N Cܕ ::P6 $E,@'S&e/7D8NC ::P6 $E,@'S&e/7D8NC/ ::P6 $E,@'S&e/7D8Nsipp-3.5.1/pcap/dtmf_2833_1.pcap0000644000175000017500000000137412672462535015167 0ustar vsevavsevaòCs::P6 $E,@'{038N C::P6 $E,@'{,e138N @C_ ::P6 $E,@'ye238N C] ::P6 $E,@'xe338N C ::P6 $E,@'wie438N C ::P6 $E,@'v(e538N @CG ::P6 $E,@'te638N Cܕ ::P6 $E,@'s&e738NC ::P6 $E,@'s&e738NC/ ::P6 $E,@'s&e738Nsipp-3.5.1/pcap/dtmf_2833_8.pcap0000644000175000017500000000137412672462535015176 0ustar vsevavsevaòCR::P6 $E,@'? =8N Cb::P6 $E,@'~e >8N @C!::P6 $E,@'=e ?8N Co::P6 $E,@'e @8N C::P6 $E,@'e A8N C ::P6 $E,@'ze B8N @CY ::P6 $E,@'9e C8N C ::P6 $E,@'xe D8NCZ ::P6 $E,@'xe D8NCf ::P6 $E,@'xe D8Nsipp-3.5.1/gtest/0000755000175000017500000000000012672462535012667 5ustar vsevavsevasipp-3.5.1/regress/0000755000175000017500000000000012672462535013213 5ustar vsevavsevasipp-3.5.1/regress/github-#0152/0000755000175000017500000000000012672462535015125 5ustar vsevavsevasipp-3.5.1/regress/github-#0152/uac.xml0000644000175000017500000000111612672462535016416 0ustar vsevavseva ;tag=[pid]SIPpTag00[call_number] To: [service] Call-ID: [call_id] CSeq: 1 WITHOUTTO Contact: sip:sipp@[local_ip]:[local_port] Content-Length: 0 ]]> sipp-3.5.1/regress/github-#0152/run0000755000175000017500000000100612672462535015654 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init sippbg -sf uas.xml -p 5070 sippfg -m 20 -sf uac.xml 127.0.0.1:5070 \ -timeout 4 -timeout_error -trace_stat -stf tmp.log \ >/dev/null 2>&1 status=$? # (it's not a log, it's a csv) calls=`cut -d';' -f12 tmp.log | tail -n1` failed=`cut -d';' -f18 tmp.log | tail -n1` if test $calls -eq 20 && test $failed -gt 0; then ok else fail "got $calls calls, and $failed failed" fi sipp-3.5.1/regress/github-#0152/uas.xml0000644000175000017500000000140312672462535016435 0ustar vsevavseva Content-Length: 0 ]]> sipp-3.5.1/regress/runtests0000755000175000017500000000223512672462535015032 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 # Don't run from anywhere else than here! cd `dirname "$0"` # Cleanup test remnants. find . -name '*.log' | xargs --no-run-if-empty -d\\n rm -v echo # Export custom location SIPP binary if supplied. export SIPP # Set flag that we want verbose exit codes. export VERBOSE_EXITSTATUS=1 echo "== RUNNING TESTS ==" ok=0 fail=0 unexpected_ok=0 expected_fail=0 skip=0 for path in github-*; do $path/run ret=$? case $ret in 0) ok=$((ok+1)) ;; 1) fail=$((fail+1)) ;; 2) unexpected_ok=$((unexpected_ok+1)) ;; 3) expected_fail=$((expected_fail+1)) ;; 4) skip=$((skip+1)) ;; *) echo "Unexpected return value: $ret" >&2 && exit 1 esac done echo "==" echo -n "$ok success" test $skip -ne 0 && echo -n ", $skip skipped" test $fail -ne 0 && echo -n ", $fail FAILURE" test $unexpected_ok -ne 0 && echo -n ", $unexpected_ok UNEXPECTED SUCCESS" test $expected_fail -ne 0 && echo -n ", $expected_fail expected failure" echo # Return our status. test $fail -ne 0 && exit 1 test $unexpected_ok -ne 0 && exit 2 exit 0 # vim: set ts=8 sw=4 sts=4 et ai: sipp-3.5.1/regress/github-#0103/0000755000175000017500000000000012672462535015121 5ustar vsevavsevasipp-3.5.1/regress/github-#0103/run0000755000175000017500000000057012672462535015655 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 . "`dirname "$0"`/../functions"; init sippbg -sf uas-modified.xml -i 127.0.0.1 -p 5070 -m 1 sippbg 127.0.0.1:5070 -sn uac -i 127.0.0.1 -m 1 job2=$! # If job2 was finished (ran the entire scenario), we have success. if ! /bin/kill -0 $job2 2>/dev/null; then ok else fail fi sipp-3.5.1/regress/github-#0103/uas-modified.xml0000644000175000017500000000365012672462535020215 0ustar vsevavseva Content-Length: 0 ]]> sipp-3.5.1/regress/github-#0083-1/0000755000175000017500000000000012672462535015266 5ustar vsevavsevasipp-3.5.1/regress/github-#0083-1/run0000755000175000017500000000062412672462535016022 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 . "`dirname "$0"`/../functions"; init skip "broken by 337f5c0cd" tcplisten 5070 >tmp.log 2>&1 & pid=$! sleep 1 sippbg -m 1 -sn uac -i 127.0.3.1 -t t1 -p 5071 127.0.2.1:5070 /bin/kill -9 $pid 2>/dev/null if grep -q '^Connection from 127.0.3.1:' tmp.log; then ok else fail "broken by 337f5c0cd (?)" fi sipp-3.5.1/regress/github-#0083-2/0000755000175000017500000000000012672462535015267 5ustar vsevavsevasipp-3.5.1/regress/github-#0083-2/run0000755000175000017500000000350212672462535016021 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 . "`dirname "$0"`/../functions"; init skip "broken by 337f5c0cd" tcplisten 5070 >tmp.log 2>&1 & pid=$! sleep 1 sippbg -m 1 -sn uac -i 127.0.3.1 -t t1 -p 5071 127.0.2.1:5070 /bin/kill -9 $pid 2>/dev/null conn_sport=`sed -ne 's/^Connection from.*://p' tmp.log` via_sport=`grep ^Via: tmp.log | sed -e 's/.*:\([0-9]*\);.*/\1/'` if test $conn_sport = $via_sport; then unexpected_ok else expected_fail fi # This is disabled, because it broke github-#0098. # # From 807a97fc3ef97811c393266ce57ff8c5afd185d9 Mon Sep 17 00:00:00 2001 # From: Walter Doekes # Date: Wed, 6 Aug 2014 09:30:48 +0200 # Subject: [PATCH] Also update local_port value after binding a TCP socket. # # The [local_port] will hold the random port that was bound to. # --- # src/socket.cpp | 3 +-- # 1 file changed, 1 insertion(+), 2 deletions(-) # # diff --git a/src/socket.cpp b/src/socket.cpp # index 9214a2d..74c77b6 100644 # --- a/src/socket.cpp # +++ b/src/socket.cpp # @@ -1520,14 +1520,13 @@ int sipp_do_connect_socket(struct sipp_socket *socket) # # if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS) { # struct sockaddr_storage local_without_port; # - int port = -1; # memcpy(&local_without_port, &local_sockaddr, sizeof(struct sockaddr_storage)); # if (local_ip_is_ipv6) { # (_RCAST(struct sockaddr_in6 *, &local_without_port))->sin6_port = htons(0); # } else { # (_RCAST(struct sockaddr_in *, &local_without_port))->sin_port = htons(0); # } # - sipp_bind_socket(socket, &local_without_port, &port); # + sipp_bind_socket(socket, &local_without_port, &local_port); # } # #ifdef USE_SCTP # if (socket->ss_transport == T_SCTP) { sipp-3.5.1/regress/github-#0156/0000755000175000017500000000000012672462535015131 5ustar vsevavsevasipp-3.5.1/regress/github-#0156/run0000755000175000017500000000146512672462535015671 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init skip "will fix later" # Valgrind on UAS. valgrind --xml=yes --xml-file=uas.log --partial-loads-ok=yes \ --show-leak-kinds=all --leak-check=full `get_sipp` -nostdin -m 10 -sn uas \ >/dev/null 2>&1 & uaspid=$! sleep 1 # Valgrind on UAC. valgrind --xml=yes --xml-file=uac.log --partial-loads-ok=yes \ --show-leak-kinds=all --leak-check=full `get_sipp` -nostdin -m 10 -sn uac \ 127.0.0.1 >/dev/null 2>&1 & uacpid=$! wait $uaspid test $? -ne 0 && fail "UAS returned non-zero" wait $uacpid test $? -ne 0 && fail "UAC returned non-zero" grep -q '' uas.log && fail "valgrind reported leaks in UAS" grep -q '' uac.log && fail "valgrind reported leaks in UAC" ok sipp-3.5.1/regress/github-#0150/0000755000175000017500000000000012672462535015123 5ustar vsevavsevasipp-3.5.1/regress/github-#0150/run0000755000175000017500000000107112672462535015654 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init skip "this seems to be broken" sippfg -m 1 -sn uac '127.0.0.1:5071' -p 5070 -timeout 1 -timeout_error 2>&1 | grep -q 'Unable to send UDP' if test $? -ne 0; then true else fail 'unable to send UDP for IPv4' fi sippfg -m 1 -sn uac '[::1]:5071' -p 5070 -timeout 1 -timeout_error 2>&1 | grep -q 'Unable to send UDP.*family not supported' if test $? -ne 0; then ok else fail 'unable to send UDP for IPv6' fi sipp-3.5.1/regress/github-#0018/0000755000175000017500000000000012672462535015126 5ustar vsevavsevasipp-3.5.1/regress/github-#0018/notify-brackets.xml0000644000175000017500000000116612672462535020760 0ustar vsevavseva sipp-3.5.1/regress/github-#0018/run0000755000175000017500000000060412672462535015660 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2016 . "`dirname "$0"`/../functions"; init tcplisten 5070 >tmp.log 2>&1 & pid=$! sleep 1 sippbg -m 1 -sf notify-brackets.xml -t t1 127.0.0.1:5070 /bin/kill -9 $pid 2>/dev/null if grep -qF 'X-Literal: [date]' tmp.log && ! grep -q 'X-Keyword: .*[][].*$' tmp.log; then ok else fail fi sipp-3.5.1/regress/functions0000644000175000017500000000476512672462535015162 0ustar vsevavseva# This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 init() { # Jump into the directory where the test is. cd "`dirname "$0"`" # Print a nice message. echo -n "Testing `basename \`pwd\``: " } # Allow SIPP=/path/to/sipp to override autodetection. Please use an # absolute path. This allows you to test a different version. get_sipp() { if test -z "$SIPP"; then # The cd in init() jumps to the directory where the test lives. # We traverse upwards in the directory until we find the sipp # binary. tmp=`pwd` while ! test -x "$tmp/sipp"; do tmp=`dirname "$tmp"` test "$tmp" = "/" && break done test -x "$tmp/sipp" || exit 1 SIPP="$tmp/sipp" fi echo "$SIPP" } sipp() { exec "`get_sipp`" "$@" } sippfg() { "`get_sipp`" -nostdin "$@" } sippbg() { temp=`mktemp` sipp -nostdin "$@" >$temp 2>&1 /dev/null; then wait $pid ret=$? if test $ret -ne 0; then echo "sipp $@: startup failure, got $ret:" >&2 cat $temp rm $temp exit 1 fi fi rm $temp } tcplisten() { port="$1" exec perl -e ' use Socket;$|=1;(socket(S,PF_INET,SOCK_STREAM,6)&& setsockopt(S,SOL_SOCKET,SO_REUSEADDR,1)&& bind(S,pack_sockaddr_in('$port',"\0\0\0\0"))&& listen(S,1)&&($sa=accept(N,S))&&(($port,$ia)= unpack_sockaddr_in($sa))&&($ia=inet_ntoa($ia))&& print "Connection from $ia:$port\n")||die($!); close(S);while(1){recv(N,$o,2048,0);print "$o";}' } #udplisten() { # port="$1" # exec perl -e ' # use Socket;(socket(S,PF_INET,SOCK_DGRAM,17)&& # bind(S,pack_sockaddr_in('$port',"\x7f\0\0\1"))&& # listen(S,1)&&recv(S,$o,2048,0)&&print "$o\n")||die($!);' #} cleanup() { # Kill all of our children, if there are any. pkill -P$$ wait } ok() { echo "." cleanup exit 0 } fail() { test -z "$@" && echo "failed" || echo "failed ($@)" cleanup exit 1 } unexpected_ok() { echo "unexpected success" cleanup exit 2 } expected_fail() { echo "x" cleanup test -n "$VERBOSE_EXITSTATUS" && exit 3 exit 0 } skip() { echo "skipped ($@)" cleanup test -n "$VERBOSE_EXITSTATUS" && exit 4 exit 0 } # Workaround when no term is set. See also github-#0075. export TERM=dumb # vim: set syn=sh ts=8 sw=4 sts=4 et ai: sipp-3.5.1/regress/github-#0155/0000755000175000017500000000000012672462535015130 5ustar vsevavsevasipp-3.5.1/regress/github-#0155/run0000755000175000017500000000067212672462535015667 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init sippbg -sn uas -p 5070 # Problem which appears to goes away when -nostdin or when screen is # not initialized. `get_sipp` -m 1 -sn uac -p 5071 127.0.0.1:5070 -timeout 2 -timeout_error \ >/dev/null 2>&1 status=$? if test $status -eq 0; then ok else fail "uac packets seem not to arrive at uas" fi sipp-3.5.1/regress/github-#0130/0000755000175000017500000000000012672462535015121 5ustar vsevavsevasipp-3.5.1/regress/github-#0130/run0000755000175000017500000000100612672462535015650 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init # Test whether sipp will run without a proper TERM setting. # After pull request #130 it will, as long as stdout is not a tty. TERM=bad_term sippbg -sn uas -i 127.0.0.1 -p 5070 -m 1 TERM=bad_term sippbg -sn uac -i 127.0.0.1 -m 1 127.0.0.1:5070 job2=$! # If job2 was finished (ran the entire scenario), we have success. if ! /bin/kill -0 $job2 2>/dev/null; then ok else fail fi sipp-3.5.1/regress/github-#0085/0000755000175000017500000000000012672462535015132 5ustar vsevavsevasipp-3.5.1/regress/github-#0085/uac.xml0000644000175000017500000001037412672462535016431 0ustar vsevavseva ;tag=[pid]SIPpTag00[call_number] To: [service] Call-ID: [call_id] CSeq: 1 INVITE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Type: application/sdp Content-Length: [len] v=0 o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip] s=- c=IN IP[media_ip_type] [media_ip] t=0 0 m=audio [media_port] RTP/AVP 0 a=rtpmap:0 PCMU/8000 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 1 ACK Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 2 INFO Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> ;tag=[pid]SIPpTag02[call_number] To: [service] Call-ID: unrelated-notify///[call_id] CSeq: 100 NOTIFY Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> ;tag=[pid]SIPpTag03[call_number] To: [service] Call-ID: unrelated-options///[call_id] CSeq: 100 OPTIONS Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 3 UPDATE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> ;tag=[pid]SIPpTag00[call_number] To: [service] [peer_tag_param] Call-ID: [call_id] CSeq: 4 BYE Contact: sip:sipp@[local_ip]:[local_port] Max-Forwards: 70 Content-Length: 0 ]]> sipp-3.5.1/regress/github-#0085/run0000755000175000017500000000161412672462535015666 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2015 . "`dirname "$0"`/../functions"; init # Test that out-of-dialog INFO, NOTIFY, UPDATE and OPTIONS get an # automatic 200 reply with automaticResponseMode (-aa): sippbg -sn uas -i 127.0.0.1 -p 5070 -m 1 -aa sippbg -sf uac.xml -i 127.0.0.1 -m 1 127.0.0.1:5070 job2=$! # If job2 did not finish, we have failure. if /bin/kill -0 $job2 2>/dev/null; then fail fi # Remove all running sipp instances manually. cleanup # Test that out-of-dialog INFO, NOTIFY, UPDATE and OPTIONS do *NOT* # get the automatic 200 if we don't use automaticResponseMode (-aa). sippbg -sn uas -i 127.0.0.1 -p 5070 -m 1 sippbg -sf uac.xml -i 127.0.0.1 -m 1 127.0.0.1:5070 job2=$! # If job2 did not finish, it is waiting for job1 to send a 200. This # is expected behaviour. if /bin/kill -0 $job2 2>/dev/null; then ok else fail fi sipp-3.5.1/regress/github-#0034/0000755000175000017500000000000012672462535015124 5ustar vsevavsevasipp-3.5.1/regress/github-#0034/notify-manylf.xml0000644000175000017500000000107212672462535020442 0ustar vsevavseva sipp-3.5.1/regress/github-#0034/notify-nocrlf.xml0000644000175000017500000000106112672462535020435 0ustar vsevavseva sipp-3.5.1/regress/github-#0034/notify-withlf.xml0000644000175000017500000000111612672462535020450 0ustar vsevavseva sipp-3.5.1/regress/github-#0034/run0000755000175000017500000000227412672462535015663 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2016 . "`dirname "$0"`/../functions"; init tcplisten 5070 >notify-1234.log 2>&1 & notify_1234=$! tcplisten 5071 >notify-manylf.log 2>&1 & notify_manylf=$1 tcplisten 5072 >notify-nocrlf.log 2>&1 & notify_nocrlf=$1 tcplisten 5073 >notify-withlf.log 2>&1 & notify_withlf=$1 sleep 1 sippbg -m 1 -sf notify-1234.xml -t t1 127.0.0.1:5070 sippbg -m 1 -sf notify-manylf.xml -t t1 127.0.0.1:5071 sippbg -m 1 -sf notify-nocrlf.xml -t t1 127.0.0.1:5072 sippbg -m 1 -sf notify-withlf.xml -t t1 127.0.0.1:5073 /bin/kill -9 $notify_1234 $notify_manylf $notify_nocrlf $notify_withlf 2>&1 last_bytes_equal() { size=`stat -c%s $1` tail=`dd if=$1 bs=1 skip=$((size - $2)) 2>/dev/null` test "$tail" = "$3" } fail= last_bytes_equal notify-1234.log 5 "`printf '\n\1\2\3\4'`" || fail="$fail notify-1234" last_bytes_equal notify-manylf.log 5 "`printf '0\r\n\r\n'`" || fail="$fail notify-manylf" last_bytes_equal notify-nocrlf.log 5 "`printf '0\r\n\r\n'`" || fail="$fail notify-nocrlf" last_bytes_equal notify-withlf.log 8 "`printf '3\r\n\r\nX\r\n'`" || fail="$fail notify-withlf" if test -z "$fail"; then ok else fail "on$fail" fi sipp-3.5.1/regress/github-#0034/notify-1234.xml0000644000175000017500000000125112672462535017544 0ustar vsevavseva sipp-3.5.1/regress/github-#0098/0000755000175000017500000000000012672462535015136 5ustar vsevavsevasipp-3.5.1/regress/github-#0098/run0000755000175000017500000000061712672462535015674 0ustar vsevavseva#!/bin/sh # This regression test is a part of SIPp. # Author: Walter Doekes, OSSO B.V., 2014 . "`dirname "$0"`/../functions"; init sippbg 127.0.0.1:5070 -sn 3pcc-C-B -3pcc 127.0.0.1:9000 -i 127.0.0.1 -p 5071 -m 1 sippbg 127.0.0.1:5072 -sn 3pcc-C-A -3pcc 127.0.0.1:9000 -i 127.0.0.1 -p 5073 -m 1 -trace_msg -message_file tmp.log if grep -q Via.*127.0.0.1:5073 tmp.log; then ok else fail fi sipp-3.5.1/depcomp0000755000175000017500000005601612672463320013117 0ustar vsevavseva#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sipp-3.5.1/Makefile.in0000644000175000017500000066534212672463320013617 0ustar vsevavseva# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = sipp$(EXEEXT) TESTS = sipp_unittest$(EXEEXT) check_PROGRAMS = $(am__EXEEXT_1) @HAVE_OPENSSL_TRUE@am__append_1 = -DUSE_OPENSSL @HAVE_PCAP_TRUE@am__append_2 = -DPCAPPLAY @HAVE_RTP_TRUE@am__append_3 = -DRTP_STREAM @HAVE_SCTP_TRUE@am__append_4 = -DUSE_SCTP @HAVE_GSL_TRUE@am__append_5 = -DHAVE_GSL @HAVE_EPOLL_TRUE@am__append_6 = -DHAVE_EPOLL @HAVE_HELP2MAN_TRUE@am__append_7 = $(man_MANS) subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/include/config.h.in depcomp test-driver THANKS \ config.guess config.sub install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/am_git_version.m4 \ $(top_srcdir)/m4/ax_check_compile_flag.m4 \ $(top_srcdir)/m4/ax_config_feature.m4 \ $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \ $(top_srcdir)/m4/ax_have_epoll.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" am__EXEEXT_1 = sipp_unittest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__sipp_SOURCES_DIST = src/actions.cpp src/auth.cpp src/comp.c \ src/call.cpp src/deadcall.cpp src/infile.cpp src/listener.cpp \ src/logger.cpp src/md5.c src/message.cpp src/milenage.c \ src/call_generation_task.cpp src/ratetask.cpp \ src/reporttask.cpp src/rijndael.c src/scenario.cpp \ src/sip_parser.cpp src/screen.cpp src/socket.cpp \ src/socketowner.cpp src/stat.cpp src/strings.cpp src/task.cpp \ src/time.cpp src/variables.cpp src/watchdog.cpp \ src/xp_parser.c include/comp.h include/infile.hpp \ include/listener.hpp include/logger.hpp include/md5.h \ include/message.hpp include/milenage.h \ include/call_generation_task.hpp include/ratetask.hpp \ include/reporttask.hpp include/rijndael.h include/scenario.hpp \ include/sip_parser.hpp include/screen.hpp include/socket.hpp \ include/socketowner.hpp include/stat.hpp include/strings.hpp \ include/task.hpp include/time.hpp include/variables.hpp \ include/watchdog.hpp include/xp_parser.h include/actions.hpp \ include/call.hpp include/auth.hpp include/deadcall.hpp \ include/sslcommon.h src/sslinit.c src/sslthreadsafe.c \ include/prepare_pcap.h include/send_packets.h \ src/prepare_pcap.c src/send_packets.c src/rtpstream.cpp \ include/rtpstream.hpp src/sipp.cpp include/sipp.hpp am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = @HAVE_OPENSSL_TRUE@am__objects_2 = $(am__objects_1) \ @HAVE_OPENSSL_TRUE@ src/sipp-sslinit.$(OBJEXT) \ @HAVE_OPENSSL_TRUE@ src/sipp-sslthreadsafe.$(OBJEXT) @HAVE_PCAP_TRUE@am__objects_3 = $(am__objects_1) \ @HAVE_PCAP_TRUE@ src/sipp-prepare_pcap.$(OBJEXT) \ @HAVE_PCAP_TRUE@ src/sipp-send_packets.$(OBJEXT) @HAVE_RTP_TRUE@am__objects_4 = src/sipp-rtpstream.$(OBJEXT) am__objects_5 = src/sipp-actions.$(OBJEXT) src/sipp-auth.$(OBJEXT) \ src/sipp-comp.$(OBJEXT) src/sipp-call.$(OBJEXT) \ src/sipp-deadcall.$(OBJEXT) src/sipp-infile.$(OBJEXT) \ src/sipp-listener.$(OBJEXT) src/sipp-logger.$(OBJEXT) \ src/sipp-md5.$(OBJEXT) src/sipp-message.$(OBJEXT) \ src/sipp-milenage.$(OBJEXT) \ src/sipp-call_generation_task.$(OBJEXT) \ src/sipp-ratetask.$(OBJEXT) src/sipp-reporttask.$(OBJEXT) \ src/sipp-rijndael.$(OBJEXT) src/sipp-scenario.$(OBJEXT) \ src/sipp-sip_parser.$(OBJEXT) src/sipp-screen.$(OBJEXT) \ src/sipp-socket.$(OBJEXT) src/sipp-socketowner.$(OBJEXT) \ src/sipp-stat.$(OBJEXT) src/sipp-strings.$(OBJEXT) \ src/sipp-task.$(OBJEXT) src/sipp-time.$(OBJEXT) \ src/sipp-variables.$(OBJEXT) src/sipp-watchdog.$(OBJEXT) \ src/sipp-xp_parser.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) am_sipp_OBJECTS = $(am__objects_5) src/sipp-sipp.$(OBJEXT) sipp_OBJECTS = $(am_sipp_OBJECTS) sipp_DEPENDENCIES = @LIBOBJS@ sipp_LINK = $(CXXLD) $(sipp_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__sipp_unittest_SOURCES_DIST = src/actions.cpp src/auth.cpp \ src/comp.c src/call.cpp src/deadcall.cpp src/infile.cpp \ src/listener.cpp src/logger.cpp src/md5.c src/message.cpp \ src/milenage.c src/call_generation_task.cpp src/ratetask.cpp \ src/reporttask.cpp src/rijndael.c src/scenario.cpp \ src/sip_parser.cpp src/screen.cpp src/socket.cpp \ src/socketowner.cpp src/stat.cpp src/strings.cpp src/task.cpp \ src/time.cpp src/variables.cpp src/watchdog.cpp \ src/xp_parser.c include/comp.h include/infile.hpp \ include/listener.hpp include/logger.hpp include/md5.h \ include/message.hpp include/milenage.h \ include/call_generation_task.hpp include/ratetask.hpp \ include/reporttask.hpp include/rijndael.h include/scenario.hpp \ include/sip_parser.hpp include/screen.hpp include/socket.hpp \ include/socketowner.hpp include/stat.hpp include/strings.hpp \ include/task.hpp include/time.hpp include/variables.hpp \ include/watchdog.hpp include/xp_parser.h include/actions.hpp \ include/call.hpp include/auth.hpp include/deadcall.hpp \ include/sslcommon.h src/sslinit.c src/sslthreadsafe.c \ include/prepare_pcap.h include/send_packets.h \ src/prepare_pcap.c src/send_packets.c src/rtpstream.cpp \ include/rtpstream.hpp src/sipp_unittest.cpp \ src/xp_parser_ut.cpp gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc @HAVE_OPENSSL_TRUE@am__objects_6 = $(am__objects_1) \ @HAVE_OPENSSL_TRUE@ src/sipp_unittest-sslinit.$(OBJEXT) \ @HAVE_OPENSSL_TRUE@ src/sipp_unittest-sslthreadsafe.$(OBJEXT) @HAVE_PCAP_TRUE@am__objects_7 = $(am__objects_1) \ @HAVE_PCAP_TRUE@ src/sipp_unittest-prepare_pcap.$(OBJEXT) \ @HAVE_PCAP_TRUE@ src/sipp_unittest-send_packets.$(OBJEXT) @HAVE_RTP_TRUE@am__objects_8 = src/sipp_unittest-rtpstream.$(OBJEXT) am__objects_9 = src/sipp_unittest-actions.$(OBJEXT) \ src/sipp_unittest-auth.$(OBJEXT) \ src/sipp_unittest-comp.$(OBJEXT) \ src/sipp_unittest-call.$(OBJEXT) \ src/sipp_unittest-deadcall.$(OBJEXT) \ src/sipp_unittest-infile.$(OBJEXT) \ src/sipp_unittest-listener.$(OBJEXT) \ src/sipp_unittest-logger.$(OBJEXT) \ src/sipp_unittest-md5.$(OBJEXT) \ src/sipp_unittest-message.$(OBJEXT) \ src/sipp_unittest-milenage.$(OBJEXT) \ src/sipp_unittest-call_generation_task.$(OBJEXT) \ src/sipp_unittest-ratetask.$(OBJEXT) \ src/sipp_unittest-reporttask.$(OBJEXT) \ src/sipp_unittest-rijndael.$(OBJEXT) \ src/sipp_unittest-scenario.$(OBJEXT) \ src/sipp_unittest-sip_parser.$(OBJEXT) \ src/sipp_unittest-screen.$(OBJEXT) \ src/sipp_unittest-socket.$(OBJEXT) \ src/sipp_unittest-socketowner.$(OBJEXT) \ src/sipp_unittest-stat.$(OBJEXT) \ src/sipp_unittest-strings.$(OBJEXT) \ src/sipp_unittest-task.$(OBJEXT) \ src/sipp_unittest-time.$(OBJEXT) \ src/sipp_unittest-variables.$(OBJEXT) \ src/sipp_unittest-watchdog.$(OBJEXT) \ src/sipp_unittest-xp_parser.$(OBJEXT) $(am__objects_1) \ $(am__objects_6) $(am__objects_7) $(am__objects_8) am__objects_10 = gtest/src/sipp_unittest-gtest-death-test.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-filepath.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-port.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-printers.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-test-part.$(OBJEXT) \ gtest/src/sipp_unittest-gtest-typed-test.$(OBJEXT) \ gtest/src/sipp_unittest-gtest.$(OBJEXT) \ gmock/src/sipp_unittest-gmock-internal-utils.$(OBJEXT) \ gmock/src/sipp_unittest-gmock-matchers.$(OBJEXT) am_sipp_unittest_OBJECTS = $(am__objects_9) \ src/sipp_unittest-sipp_unittest.$(OBJEXT) \ src/sipp_unittest-xp_parser_ut.$(OBJEXT) $(am__objects_10) sipp_unittest_OBJECTS = $(am_sipp_unittest_OBJECTS) sipp_unittest_DEPENDENCIES = @LIBOBJS@ sipp_unittest_LINK = $(CXXLD) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(sipp_SOURCES) $(sipp_unittest_SOURCES) DIST_SOURCES = $(am__sipp_SOURCES_DIST) \ $(am__sipp_unittest_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(man_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope AM_RECURSIVE_TARGETS = cscope check recheck am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ $(am__append_1) $(am__append_2) $(am__append_3) \ $(am__append_4) $(am__append_5) $(am__append_6) DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ GSL_CFLAGS = @GSL_CFLAGS@ GSL_CXXFLAGS = @GSL_CXXFLAGS@ GSL_LIBS = @GSL_LIBS@ HAVE_CXX11 = @HAVE_CXX11@ HELP2MAN = @HELP2MAN@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = -I$(srcdir)/include -Wall -pedantic AM_CXXFLAGS = -I$(srcdir)/include -Wall -pedantic CLEANFILES = $(am__append_7) EXTRA_DIST = \ $(srcdir)/src/fortune.cpp \ $(srcdir)/LICENSE.txt \ $(srcdir)/README.md \ $(srcdir)/THANKS \ $(srcdir)/sipp.dtd \ $(srcdir)/cpplint.py @HAVE_OPENSSL_TRUE@ssl_incl = \ @HAVE_OPENSSL_TRUE@ include/sslcommon.h @HAVE_OPENSSL_TRUE@ssl_SOURCES = \ @HAVE_OPENSSL_TRUE@ $(ssl_incl) \ @HAVE_OPENSSL_TRUE@ src/sslinit.c \ @HAVE_OPENSSL_TRUE@ src/sslthreadsafe.c @HAVE_PCAP_TRUE@pcap_incl = \ @HAVE_PCAP_TRUE@ include/prepare_pcap.h \ @HAVE_PCAP_TRUE@ include/send_packets.h @HAVE_PCAP_TRUE@pcap_SOURCES = \ @HAVE_PCAP_TRUE@ $(pcap_incl) \ @HAVE_PCAP_TRUE@ src/prepare_pcap.c \ @HAVE_PCAP_TRUE@ src/send_packets.c @HAVE_RTP_TRUE@rtp_SOURCES = \ @HAVE_RTP_TRUE@ src/rtpstream.cpp \ @HAVE_RTP_TRUE@ include/rtpstream.hpp common_incl = \ include/comp.h \ include/infile.hpp \ include/listener.hpp \ include/logger.hpp \ include/md5.h \ include/message.hpp \ include/milenage.h \ include/call_generation_task.hpp \ include/ratetask.hpp \ include/reporttask.hpp \ include/rijndael.h \ include/scenario.hpp \ include/sip_parser.hpp \ include/screen.hpp \ include/socket.hpp \ include/socketowner.hpp \ include/stat.hpp \ include/strings.hpp \ include/task.hpp \ include/time.hpp \ include/variables.hpp \ include/watchdog.hpp \ include/xp_parser.h \ include/actions.hpp \ include/call.hpp \ include/auth.hpp \ include/deadcall.hpp common_SOURCES = \ src/actions.cpp \ src/auth.cpp \ src/comp.c \ src/call.cpp \ src/deadcall.cpp \ src/infile.cpp \ src/listener.cpp \ src/logger.cpp \ src/md5.c \ src/message.cpp \ src/milenage.c \ src/call_generation_task.cpp \ src/ratetask.cpp \ src/reporttask.cpp \ src/rijndael.c \ src/scenario.cpp \ src/sip_parser.cpp \ src/screen.cpp \ src/socket.cpp \ src/socketowner.cpp \ src/stat.cpp \ src/strings.cpp \ src/task.cpp \ src/time.cpp \ src/variables.cpp \ src/watchdog.cpp \ src/xp_parser.c \ $(common_incl) \ $(ssl_SOURCES) \ $(pcap_SOURCES) \ $(rtp_SOURCES) sipp_SOURCES = \ $(common_SOURCES) \ src/sipp.cpp \ include/sipp.hpp sipp_CFLAGS = $(AM_CFLAGS) @GSL_CFLAGS@ sipp_CXXFLAGS = $(AM_CXXFLAGS) @GSL_CXXFLAGS@ sipp_LDADD = @LIBOBJS@ @GSL_LIBS@ gtest_SOURCES = \ gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc \ gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc \ gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc \ gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc \ gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc sipp_unittest_SOURCES = \ $(common_SOURCES) \ src/sipp_unittest.cpp \ src/xp_parser_ut.cpp \ $(gtest_SOURCES) sipp_unittest_CFLAGS = $(AM_CFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CFLAGS@ sipp_unittest_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CXXFLAGS@ sipp_unittest_LDADD = @LIBOBJS@ @GSL_LIBS@ @HAVE_HELP2MAN_TRUE@man_MANS = sipp.1 all: all-am .SUFFIXES: .SUFFIXES: .c .cc .cpp .log .o .obj .test .test$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): include/config.h: include/stamp-h1 @if test ! -f $@; then rm -f include/stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) include/stamp-h1; else :; fi include/stamp-h1: $(top_srcdir)/include/config.h.in $(top_builddir)/config.status @rm -f include/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status include/config.h $(top_srcdir)/include/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f include/stamp-h1 touch $@ distclean-hdr: -rm -f include/config.h include/stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-checkPROGRAMS: -test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS) src/$(am__dirstamp): @$(MKDIR_P) src @: > src/$(am__dirstamp) src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) src/$(DEPDIR) @: > src/$(DEPDIR)/$(am__dirstamp) src/sipp-actions.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-auth.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-comp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-call.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-deadcall.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-infile.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-listener.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-logger.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-md5.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-message.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-milenage.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-call_generation_task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-ratetask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-reporttask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-rijndael.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-scenario.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sip_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-screen.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-socket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-socketowner.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-stat.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-strings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-time.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-variables.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-watchdog.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-xp_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sslinit.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sslthreadsafe.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-prepare_pcap.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-send_packets.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-rtpstream.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp-sipp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) sipp$(EXEEXT): $(sipp_OBJECTS) $(sipp_DEPENDENCIES) $(EXTRA_sipp_DEPENDENCIES) @rm -f sipp$(EXEEXT) $(AM_V_CXXLD)$(sipp_LINK) $(sipp_OBJECTS) $(sipp_LDADD) $(LIBS) src/sipp_unittest-actions.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-auth.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-comp.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-call.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-deadcall.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-infile.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-listener.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-logger.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-md5.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-message.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-milenage.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-call_generation_task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-ratetask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-reporttask.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-rijndael.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-scenario.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sip_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-screen.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-socket.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-socketowner.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-stat.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-strings.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-task.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-time.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-variables.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-watchdog.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-xp_parser.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sslinit.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sslthreadsafe.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-prepare_pcap.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-send_packets.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-rtpstream.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-sipp_unittest.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) src/sipp_unittest-xp_parser_ut.$(OBJEXT): src/$(am__dirstamp) \ src/$(DEPDIR)/$(am__dirstamp) gtest/src/$(am__dirstamp): @$(MKDIR_P) gtest/src @: > gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) gtest/src/$(DEPDIR) @: > gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-death-test.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-filepath.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-port.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-printers.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-test-part.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest-typed-test.$(OBJEXT): \ gtest/src/$(am__dirstamp) gtest/src/$(DEPDIR)/$(am__dirstamp) gtest/src/sipp_unittest-gtest.$(OBJEXT): gtest/src/$(am__dirstamp) \ gtest/src/$(DEPDIR)/$(am__dirstamp) gmock/src/$(am__dirstamp): @$(MKDIR_P) gmock/src @: > gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) gmock/src/$(DEPDIR) @: > gmock/src/$(DEPDIR)/$(am__dirstamp) gmock/src/sipp_unittest-gmock-internal-utils.$(OBJEXT): \ gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp) gmock/src/sipp_unittest-gmock-matchers.$(OBJEXT): \ gmock/src/$(am__dirstamp) gmock/src/$(DEPDIR)/$(am__dirstamp) sipp_unittest$(EXEEXT): $(sipp_unittest_OBJECTS) $(sipp_unittest_DEPENDENCIES) $(EXTRA_sipp_unittest_DEPENDENCIES) @rm -f sipp_unittest$(EXEEXT) $(AM_V_CXXLD)$(sipp_unittest_LINK) $(sipp_unittest_OBJECTS) $(sipp_unittest_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f gmock/src/*.$(OBJEXT) -rm -f gtest/src/*.$(OBJEXT) -rm -f src/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-auth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-call_generation_task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-comp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-deadcall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-infile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-milenage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-prepare_pcap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-ratetask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-reporttask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-rijndael.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-rtpstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-scenario.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-send_packets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sip_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sipp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-socketowner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sslinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-sslthreadsafe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-variables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-watchdog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp-xp_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-auth.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-call.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-call_generation_task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-comp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-deadcall.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-infile.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-listener.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-logger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-md5.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-message.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-milenage.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-ratetask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-reporttask.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-rijndael.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-rtpstream.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-scenario.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-send_packets.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sip_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-socketowner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sslinit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-stat.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-strings.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-task.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-time.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-variables.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-watchdog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-xp_parser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` src/sipp-comp.o: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-comp.o -MD -MP -MF src/$(DEPDIR)/sipp-comp.Tpo -c -o src/sipp-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-comp.Tpo src/$(DEPDIR)/sipp-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp-comp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c src/sipp-comp.obj: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-comp.obj -MD -MP -MF src/$(DEPDIR)/sipp-comp.Tpo -c -o src/sipp-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-comp.Tpo src/$(DEPDIR)/sipp-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp-comp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` src/sipp-md5.o: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-md5.o -MD -MP -MF src/$(DEPDIR)/sipp-md5.Tpo -c -o src/sipp-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-md5.Tpo src/$(DEPDIR)/sipp-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp-md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c src/sipp-md5.obj: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-md5.obj -MD -MP -MF src/$(DEPDIR)/sipp-md5.Tpo -c -o src/sipp-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-md5.Tpo src/$(DEPDIR)/sipp-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp-md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` src/sipp-milenage.o: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-milenage.o -MD -MP -MF src/$(DEPDIR)/sipp-milenage.Tpo -c -o src/sipp-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-milenage.Tpo src/$(DEPDIR)/sipp-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp-milenage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c src/sipp-milenage.obj: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-milenage.obj -MD -MP -MF src/$(DEPDIR)/sipp-milenage.Tpo -c -o src/sipp-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-milenage.Tpo src/$(DEPDIR)/sipp-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp-milenage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` src/sipp-rijndael.o: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-rijndael.o -MD -MP -MF src/$(DEPDIR)/sipp-rijndael.Tpo -c -o src/sipp-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rijndael.Tpo src/$(DEPDIR)/sipp-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp-rijndael.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c src/sipp-rijndael.obj: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-rijndael.obj -MD -MP -MF src/$(DEPDIR)/sipp-rijndael.Tpo -c -o src/sipp-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rijndael.Tpo src/$(DEPDIR)/sipp-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp-rijndael.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` src/sipp-xp_parser.o: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-xp_parser.o -MD -MP -MF src/$(DEPDIR)/sipp-xp_parser.Tpo -c -o src/sipp-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-xp_parser.Tpo src/$(DEPDIR)/sipp-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp-xp_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c src/sipp-xp_parser.obj: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-xp_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp-xp_parser.Tpo -c -o src/sipp-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-xp_parser.Tpo src/$(DEPDIR)/sipp-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp-xp_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` src/sipp-sslinit.o: src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-sslinit.o -MD -MP -MF src/$(DEPDIR)/sipp-sslinit.Tpo -c -o src/sipp-sslinit.o `test -f 'src/sslinit.c' || echo '$(srcdir)/'`src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslinit.Tpo src/$(DEPDIR)/sipp-sslinit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslinit.c' object='src/sipp-sslinit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-sslinit.o `test -f 'src/sslinit.c' || echo '$(srcdir)/'`src/sslinit.c src/sipp-sslinit.obj: src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-sslinit.obj -MD -MP -MF src/$(DEPDIR)/sipp-sslinit.Tpo -c -o src/sipp-sslinit.obj `if test -f 'src/sslinit.c'; then $(CYGPATH_W) 'src/sslinit.c'; else $(CYGPATH_W) '$(srcdir)/src/sslinit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslinit.Tpo src/$(DEPDIR)/sipp-sslinit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslinit.c' object='src/sipp-sslinit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-sslinit.obj `if test -f 'src/sslinit.c'; then $(CYGPATH_W) 'src/sslinit.c'; else $(CYGPATH_W) '$(srcdir)/src/sslinit.c'; fi` src/sipp-sslthreadsafe.o: src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-sslthreadsafe.o -MD -MP -MF src/$(DEPDIR)/sipp-sslthreadsafe.Tpo -c -o src/sipp-sslthreadsafe.o `test -f 'src/sslthreadsafe.c' || echo '$(srcdir)/'`src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslthreadsafe.Tpo src/$(DEPDIR)/sipp-sslthreadsafe.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslthreadsafe.c' object='src/sipp-sslthreadsafe.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-sslthreadsafe.o `test -f 'src/sslthreadsafe.c' || echo '$(srcdir)/'`src/sslthreadsafe.c src/sipp-sslthreadsafe.obj: src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-sslthreadsafe.obj -MD -MP -MF src/$(DEPDIR)/sipp-sslthreadsafe.Tpo -c -o src/sipp-sslthreadsafe.obj `if test -f 'src/sslthreadsafe.c'; then $(CYGPATH_W) 'src/sslthreadsafe.c'; else $(CYGPATH_W) '$(srcdir)/src/sslthreadsafe.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sslthreadsafe.Tpo src/$(DEPDIR)/sipp-sslthreadsafe.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslthreadsafe.c' object='src/sipp-sslthreadsafe.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-sslthreadsafe.obj `if test -f 'src/sslthreadsafe.c'; then $(CYGPATH_W) 'src/sslthreadsafe.c'; else $(CYGPATH_W) '$(srcdir)/src/sslthreadsafe.c'; fi` src/sipp-prepare_pcap.o: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-prepare_pcap.o -MD -MP -MF src/$(DEPDIR)/sipp-prepare_pcap.Tpo -c -o src/sipp-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-prepare_pcap.Tpo src/$(DEPDIR)/sipp-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp-prepare_pcap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c src/sipp-prepare_pcap.obj: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-prepare_pcap.obj -MD -MP -MF src/$(DEPDIR)/sipp-prepare_pcap.Tpo -c -o src/sipp-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-prepare_pcap.Tpo src/$(DEPDIR)/sipp-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp-prepare_pcap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` src/sipp-send_packets.o: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-send_packets.o -MD -MP -MF src/$(DEPDIR)/sipp-send_packets.Tpo -c -o src/sipp-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-send_packets.Tpo src/$(DEPDIR)/sipp-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp-send_packets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c src/sipp-send_packets.obj: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -MT src/sipp-send_packets.obj -MD -MP -MF src/$(DEPDIR)/sipp-send_packets.Tpo -c -o src/sipp-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-send_packets.Tpo src/$(DEPDIR)/sipp-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp-send_packets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CFLAGS) $(CFLAGS) -c -o src/sipp-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` src/sipp_unittest-comp.o: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-comp.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-comp.Tpo -c -o src/sipp_unittest-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-comp.Tpo src/$(DEPDIR)/sipp_unittest-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp_unittest-comp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-comp.o `test -f 'src/comp.c' || echo '$(srcdir)/'`src/comp.c src/sipp_unittest-comp.obj: src/comp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-comp.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-comp.Tpo -c -o src/sipp_unittest-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-comp.Tpo src/$(DEPDIR)/sipp_unittest-comp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/comp.c' object='src/sipp_unittest-comp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-comp.obj `if test -f 'src/comp.c'; then $(CYGPATH_W) 'src/comp.c'; else $(CYGPATH_W) '$(srcdir)/src/comp.c'; fi` src/sipp_unittest-md5.o: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-md5.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-md5.Tpo -c -o src/sipp_unittest-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-md5.Tpo src/$(DEPDIR)/sipp_unittest-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp_unittest-md5.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-md5.o `test -f 'src/md5.c' || echo '$(srcdir)/'`src/md5.c src/sipp_unittest-md5.obj: src/md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-md5.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-md5.Tpo -c -o src/sipp_unittest-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-md5.Tpo src/$(DEPDIR)/sipp_unittest-md5.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/md5.c' object='src/sipp_unittest-md5.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-md5.obj `if test -f 'src/md5.c'; then $(CYGPATH_W) 'src/md5.c'; else $(CYGPATH_W) '$(srcdir)/src/md5.c'; fi` src/sipp_unittest-milenage.o: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-milenage.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-milenage.Tpo -c -o src/sipp_unittest-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-milenage.Tpo src/$(DEPDIR)/sipp_unittest-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp_unittest-milenage.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-milenage.o `test -f 'src/milenage.c' || echo '$(srcdir)/'`src/milenage.c src/sipp_unittest-milenage.obj: src/milenage.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-milenage.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-milenage.Tpo -c -o src/sipp_unittest-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-milenage.Tpo src/$(DEPDIR)/sipp_unittest-milenage.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/milenage.c' object='src/sipp_unittest-milenage.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-milenage.obj `if test -f 'src/milenage.c'; then $(CYGPATH_W) 'src/milenage.c'; else $(CYGPATH_W) '$(srcdir)/src/milenage.c'; fi` src/sipp_unittest-rijndael.o: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-rijndael.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rijndael.Tpo -c -o src/sipp_unittest-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rijndael.Tpo src/$(DEPDIR)/sipp_unittest-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp_unittest-rijndael.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-rijndael.o `test -f 'src/rijndael.c' || echo '$(srcdir)/'`src/rijndael.c src/sipp_unittest-rijndael.obj: src/rijndael.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-rijndael.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rijndael.Tpo -c -o src/sipp_unittest-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rijndael.Tpo src/$(DEPDIR)/sipp_unittest-rijndael.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/rijndael.c' object='src/sipp_unittest-rijndael.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-rijndael.obj `if test -f 'src/rijndael.c'; then $(CYGPATH_W) 'src/rijndael.c'; else $(CYGPATH_W) '$(srcdir)/src/rijndael.c'; fi` src/sipp_unittest-xp_parser.o: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-xp_parser.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo -c -o src/sipp_unittest-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp_unittest-xp_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-xp_parser.o `test -f 'src/xp_parser.c' || echo '$(srcdir)/'`src/xp_parser.c src/sipp_unittest-xp_parser.obj: src/xp_parser.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-xp_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo -c -o src/sipp_unittest-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/xp_parser.c' object='src/sipp_unittest-xp_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-xp_parser.obj `if test -f 'src/xp_parser.c'; then $(CYGPATH_W) 'src/xp_parser.c'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser.c'; fi` src/sipp_unittest-sslinit.o: src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-sslinit.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslinit.Tpo -c -o src/sipp_unittest-sslinit.o `test -f 'src/sslinit.c' || echo '$(srcdir)/'`src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslinit.Tpo src/$(DEPDIR)/sipp_unittest-sslinit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslinit.c' object='src/sipp_unittest-sslinit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-sslinit.o `test -f 'src/sslinit.c' || echo '$(srcdir)/'`src/sslinit.c src/sipp_unittest-sslinit.obj: src/sslinit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-sslinit.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslinit.Tpo -c -o src/sipp_unittest-sslinit.obj `if test -f 'src/sslinit.c'; then $(CYGPATH_W) 'src/sslinit.c'; else $(CYGPATH_W) '$(srcdir)/src/sslinit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslinit.Tpo src/$(DEPDIR)/sipp_unittest-sslinit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslinit.c' object='src/sipp_unittest-sslinit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-sslinit.obj `if test -f 'src/sslinit.c'; then $(CYGPATH_W) 'src/sslinit.c'; else $(CYGPATH_W) '$(srcdir)/src/sslinit.c'; fi` src/sipp_unittest-sslthreadsafe.o: src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-sslthreadsafe.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Tpo -c -o src/sipp_unittest-sslthreadsafe.o `test -f 'src/sslthreadsafe.c' || echo '$(srcdir)/'`src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Tpo src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslthreadsafe.c' object='src/sipp_unittest-sslthreadsafe.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-sslthreadsafe.o `test -f 'src/sslthreadsafe.c' || echo '$(srcdir)/'`src/sslthreadsafe.c src/sipp_unittest-sslthreadsafe.obj: src/sslthreadsafe.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-sslthreadsafe.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Tpo -c -o src/sipp_unittest-sslthreadsafe.obj `if test -f 'src/sslthreadsafe.c'; then $(CYGPATH_W) 'src/sslthreadsafe.c'; else $(CYGPATH_W) '$(srcdir)/src/sslthreadsafe.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Tpo src/$(DEPDIR)/sipp_unittest-sslthreadsafe.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/sslthreadsafe.c' object='src/sipp_unittest-sslthreadsafe.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-sslthreadsafe.obj `if test -f 'src/sslthreadsafe.c'; then $(CYGPATH_W) 'src/sslthreadsafe.c'; else $(CYGPATH_W) '$(srcdir)/src/sslthreadsafe.c'; fi` src/sipp_unittest-prepare_pcap.o: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-prepare_pcap.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo -c -o src/sipp_unittest-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp_unittest-prepare_pcap.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-prepare_pcap.o `test -f 'src/prepare_pcap.c' || echo '$(srcdir)/'`src/prepare_pcap.c src/sipp_unittest-prepare_pcap.obj: src/prepare_pcap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-prepare_pcap.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo -c -o src/sipp_unittest-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-prepare_pcap.Tpo src/$(DEPDIR)/sipp_unittest-prepare_pcap.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/prepare_pcap.c' object='src/sipp_unittest-prepare_pcap.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-prepare_pcap.obj `if test -f 'src/prepare_pcap.c'; then $(CYGPATH_W) 'src/prepare_pcap.c'; else $(CYGPATH_W) '$(srcdir)/src/prepare_pcap.c'; fi` src/sipp_unittest-send_packets.o: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-send_packets.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-send_packets.Tpo -c -o src/sipp_unittest-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-send_packets.Tpo src/$(DEPDIR)/sipp_unittest-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp_unittest-send_packets.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-send_packets.o `test -f 'src/send_packets.c' || echo '$(srcdir)/'`src/send_packets.c src/sipp_unittest-send_packets.obj: src/send_packets.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -MT src/sipp_unittest-send_packets.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-send_packets.Tpo -c -o src/sipp_unittest-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-send_packets.Tpo src/$(DEPDIR)/sipp_unittest-send_packets.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='src/send_packets.c' object='src/sipp_unittest-send_packets.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CFLAGS) $(CFLAGS) -c -o src/sipp_unittest-send_packets.obj `if test -f 'src/send_packets.c'; then $(CYGPATH_W) 'src/send_packets.c'; else $(CYGPATH_W) '$(srcdir)/src/send_packets.c'; fi` .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` src/sipp-actions.o: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-actions.o -MD -MP -MF src/$(DEPDIR)/sipp-actions.Tpo -c -o src/sipp-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-actions.Tpo src/$(DEPDIR)/sipp-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp-actions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp src/sipp-actions.obj: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-actions.obj -MD -MP -MF src/$(DEPDIR)/sipp-actions.Tpo -c -o src/sipp-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-actions.Tpo src/$(DEPDIR)/sipp-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp-actions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` src/sipp-auth.o: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-auth.o -MD -MP -MF src/$(DEPDIR)/sipp-auth.Tpo -c -o src/sipp-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-auth.Tpo src/$(DEPDIR)/sipp-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp-auth.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp src/sipp-auth.obj: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-auth.obj -MD -MP -MF src/$(DEPDIR)/sipp-auth.Tpo -c -o src/sipp-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-auth.Tpo src/$(DEPDIR)/sipp-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp-auth.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` src/sipp-call.o: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call.o -MD -MP -MF src/$(DEPDIR)/sipp-call.Tpo -c -o src/sipp-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call.Tpo src/$(DEPDIR)/sipp-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp-call.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp src/sipp-call.obj: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call.obj -MD -MP -MF src/$(DEPDIR)/sipp-call.Tpo -c -o src/sipp-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call.Tpo src/$(DEPDIR)/sipp-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp-call.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` src/sipp-deadcall.o: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-deadcall.o -MD -MP -MF src/$(DEPDIR)/sipp-deadcall.Tpo -c -o src/sipp-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-deadcall.Tpo src/$(DEPDIR)/sipp-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp-deadcall.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp src/sipp-deadcall.obj: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-deadcall.obj -MD -MP -MF src/$(DEPDIR)/sipp-deadcall.Tpo -c -o src/sipp-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-deadcall.Tpo src/$(DEPDIR)/sipp-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp-deadcall.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` src/sipp-infile.o: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-infile.o -MD -MP -MF src/$(DEPDIR)/sipp-infile.Tpo -c -o src/sipp-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-infile.Tpo src/$(DEPDIR)/sipp-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp-infile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp src/sipp-infile.obj: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-infile.obj -MD -MP -MF src/$(DEPDIR)/sipp-infile.Tpo -c -o src/sipp-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-infile.Tpo src/$(DEPDIR)/sipp-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp-infile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` src/sipp-listener.o: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-listener.o -MD -MP -MF src/$(DEPDIR)/sipp-listener.Tpo -c -o src/sipp-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-listener.Tpo src/$(DEPDIR)/sipp-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp-listener.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp src/sipp-listener.obj: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-listener.obj -MD -MP -MF src/$(DEPDIR)/sipp-listener.Tpo -c -o src/sipp-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-listener.Tpo src/$(DEPDIR)/sipp-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp-listener.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` src/sipp-logger.o: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-logger.o -MD -MP -MF src/$(DEPDIR)/sipp-logger.Tpo -c -o src/sipp-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-logger.Tpo src/$(DEPDIR)/sipp-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp-logger.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp src/sipp-logger.obj: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-logger.obj -MD -MP -MF src/$(DEPDIR)/sipp-logger.Tpo -c -o src/sipp-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-logger.Tpo src/$(DEPDIR)/sipp-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp-logger.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` src/sipp-message.o: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-message.o -MD -MP -MF src/$(DEPDIR)/sipp-message.Tpo -c -o src/sipp-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-message.Tpo src/$(DEPDIR)/sipp-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp-message.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp src/sipp-message.obj: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-message.obj -MD -MP -MF src/$(DEPDIR)/sipp-message.Tpo -c -o src/sipp-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-message.Tpo src/$(DEPDIR)/sipp-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp-message.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` src/sipp-call_generation_task.o: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call_generation_task.o -MD -MP -MF src/$(DEPDIR)/sipp-call_generation_task.Tpo -c -o src/sipp-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call_generation_task.Tpo src/$(DEPDIR)/sipp-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp-call_generation_task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp src/sipp-call_generation_task.obj: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-call_generation_task.obj -MD -MP -MF src/$(DEPDIR)/sipp-call_generation_task.Tpo -c -o src/sipp-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-call_generation_task.Tpo src/$(DEPDIR)/sipp-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp-call_generation_task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` src/sipp-ratetask.o: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-ratetask.o -MD -MP -MF src/$(DEPDIR)/sipp-ratetask.Tpo -c -o src/sipp-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-ratetask.Tpo src/$(DEPDIR)/sipp-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp-ratetask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp src/sipp-ratetask.obj: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-ratetask.obj -MD -MP -MF src/$(DEPDIR)/sipp-ratetask.Tpo -c -o src/sipp-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-ratetask.Tpo src/$(DEPDIR)/sipp-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp-ratetask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` src/sipp-reporttask.o: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-reporttask.o -MD -MP -MF src/$(DEPDIR)/sipp-reporttask.Tpo -c -o src/sipp-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-reporttask.Tpo src/$(DEPDIR)/sipp-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp-reporttask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp src/sipp-reporttask.obj: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-reporttask.obj -MD -MP -MF src/$(DEPDIR)/sipp-reporttask.Tpo -c -o src/sipp-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-reporttask.Tpo src/$(DEPDIR)/sipp-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp-reporttask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` src/sipp-scenario.o: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-scenario.o -MD -MP -MF src/$(DEPDIR)/sipp-scenario.Tpo -c -o src/sipp-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-scenario.Tpo src/$(DEPDIR)/sipp-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp-scenario.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp src/sipp-scenario.obj: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-scenario.obj -MD -MP -MF src/$(DEPDIR)/sipp-scenario.Tpo -c -o src/sipp-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-scenario.Tpo src/$(DEPDIR)/sipp-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp-scenario.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` src/sipp-sip_parser.o: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sip_parser.o -MD -MP -MF src/$(DEPDIR)/sipp-sip_parser.Tpo -c -o src/sipp-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sip_parser.Tpo src/$(DEPDIR)/sipp-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp-sip_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp src/sipp-sip_parser.obj: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sip_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp-sip_parser.Tpo -c -o src/sipp-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sip_parser.Tpo src/$(DEPDIR)/sipp-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp-sip_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` src/sipp-screen.o: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-screen.o -MD -MP -MF src/$(DEPDIR)/sipp-screen.Tpo -c -o src/sipp-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-screen.Tpo src/$(DEPDIR)/sipp-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp-screen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp src/sipp-screen.obj: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-screen.obj -MD -MP -MF src/$(DEPDIR)/sipp-screen.Tpo -c -o src/sipp-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-screen.Tpo src/$(DEPDIR)/sipp-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp-screen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` src/sipp-socket.o: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socket.o -MD -MP -MF src/$(DEPDIR)/sipp-socket.Tpo -c -o src/sipp-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socket.Tpo src/$(DEPDIR)/sipp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp src/sipp-socket.obj: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socket.obj -MD -MP -MF src/$(DEPDIR)/sipp-socket.Tpo -c -o src/sipp-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socket.Tpo src/$(DEPDIR)/sipp-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` src/sipp-socketowner.o: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socketowner.o -MD -MP -MF src/$(DEPDIR)/sipp-socketowner.Tpo -c -o src/sipp-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socketowner.Tpo src/$(DEPDIR)/sipp-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp-socketowner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp src/sipp-socketowner.obj: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-socketowner.obj -MD -MP -MF src/$(DEPDIR)/sipp-socketowner.Tpo -c -o src/sipp-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-socketowner.Tpo src/$(DEPDIR)/sipp-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp-socketowner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` src/sipp-stat.o: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-stat.o -MD -MP -MF src/$(DEPDIR)/sipp-stat.Tpo -c -o src/sipp-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-stat.Tpo src/$(DEPDIR)/sipp-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp-stat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp src/sipp-stat.obj: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-stat.obj -MD -MP -MF src/$(DEPDIR)/sipp-stat.Tpo -c -o src/sipp-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-stat.Tpo src/$(DEPDIR)/sipp-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp-stat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` src/sipp-strings.o: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-strings.o -MD -MP -MF src/$(DEPDIR)/sipp-strings.Tpo -c -o src/sipp-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-strings.Tpo src/$(DEPDIR)/sipp-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp-strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp src/sipp-strings.obj: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-strings.obj -MD -MP -MF src/$(DEPDIR)/sipp-strings.Tpo -c -o src/sipp-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-strings.Tpo src/$(DEPDIR)/sipp-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp-strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` src/sipp-task.o: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-task.o -MD -MP -MF src/$(DEPDIR)/sipp-task.Tpo -c -o src/sipp-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-task.Tpo src/$(DEPDIR)/sipp-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp-task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp src/sipp-task.obj: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-task.obj -MD -MP -MF src/$(DEPDIR)/sipp-task.Tpo -c -o src/sipp-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-task.Tpo src/$(DEPDIR)/sipp-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp-task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` src/sipp-time.o: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-time.o -MD -MP -MF src/$(DEPDIR)/sipp-time.Tpo -c -o src/sipp-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-time.Tpo src/$(DEPDIR)/sipp-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp src/sipp-time.obj: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-time.obj -MD -MP -MF src/$(DEPDIR)/sipp-time.Tpo -c -o src/sipp-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-time.Tpo src/$(DEPDIR)/sipp-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` src/sipp-variables.o: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-variables.o -MD -MP -MF src/$(DEPDIR)/sipp-variables.Tpo -c -o src/sipp-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-variables.Tpo src/$(DEPDIR)/sipp-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp-variables.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp src/sipp-variables.obj: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-variables.obj -MD -MP -MF src/$(DEPDIR)/sipp-variables.Tpo -c -o src/sipp-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-variables.Tpo src/$(DEPDIR)/sipp-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp-variables.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` src/sipp-watchdog.o: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-watchdog.o -MD -MP -MF src/$(DEPDIR)/sipp-watchdog.Tpo -c -o src/sipp-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-watchdog.Tpo src/$(DEPDIR)/sipp-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp-watchdog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp src/sipp-watchdog.obj: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-watchdog.obj -MD -MP -MF src/$(DEPDIR)/sipp-watchdog.Tpo -c -o src/sipp-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-watchdog.Tpo src/$(DEPDIR)/sipp-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp-watchdog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` src/sipp-rtpstream.o: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-rtpstream.o -MD -MP -MF src/$(DEPDIR)/sipp-rtpstream.Tpo -c -o src/sipp-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rtpstream.Tpo src/$(DEPDIR)/sipp-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp-rtpstream.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp src/sipp-rtpstream.obj: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-rtpstream.obj -MD -MP -MF src/$(DEPDIR)/sipp-rtpstream.Tpo -c -o src/sipp-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-rtpstream.Tpo src/$(DEPDIR)/sipp-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp-rtpstream.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` src/sipp-sipp.o: src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sipp.o -MD -MP -MF src/$(DEPDIR)/sipp-sipp.Tpo -c -o src/sipp-sipp.o `test -f 'src/sipp.cpp' || echo '$(srcdir)/'`src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sipp.Tpo src/$(DEPDIR)/sipp-sipp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp.cpp' object='src/sipp-sipp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sipp.o `test -f 'src/sipp.cpp' || echo '$(srcdir)/'`src/sipp.cpp src/sipp-sipp.obj: src/sipp.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -MT src/sipp-sipp.obj -MD -MP -MF src/$(DEPDIR)/sipp-sipp.Tpo -c -o src/sipp-sipp.obj `if test -f 'src/sipp.cpp'; then $(CYGPATH_W) 'src/sipp.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp-sipp.Tpo src/$(DEPDIR)/sipp-sipp.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp.cpp' object='src/sipp-sipp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp-sipp.obj `if test -f 'src/sipp.cpp'; then $(CYGPATH_W) 'src/sipp.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp.cpp'; fi` src/sipp_unittest-actions.o: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-actions.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-actions.Tpo -c -o src/sipp_unittest-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-actions.Tpo src/$(DEPDIR)/sipp_unittest-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp_unittest-actions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-actions.o `test -f 'src/actions.cpp' || echo '$(srcdir)/'`src/actions.cpp src/sipp_unittest-actions.obj: src/actions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-actions.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-actions.Tpo -c -o src/sipp_unittest-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-actions.Tpo src/$(DEPDIR)/sipp_unittest-actions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/actions.cpp' object='src/sipp_unittest-actions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-actions.obj `if test -f 'src/actions.cpp'; then $(CYGPATH_W) 'src/actions.cpp'; else $(CYGPATH_W) '$(srcdir)/src/actions.cpp'; fi` src/sipp_unittest-auth.o: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-auth.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-auth.Tpo -c -o src/sipp_unittest-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-auth.Tpo src/$(DEPDIR)/sipp_unittest-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp_unittest-auth.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-auth.o `test -f 'src/auth.cpp' || echo '$(srcdir)/'`src/auth.cpp src/sipp_unittest-auth.obj: src/auth.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-auth.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-auth.Tpo -c -o src/sipp_unittest-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-auth.Tpo src/$(DEPDIR)/sipp_unittest-auth.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/auth.cpp' object='src/sipp_unittest-auth.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-auth.obj `if test -f 'src/auth.cpp'; then $(CYGPATH_W) 'src/auth.cpp'; else $(CYGPATH_W) '$(srcdir)/src/auth.cpp'; fi` src/sipp_unittest-call.o: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call.Tpo -c -o src/sipp_unittest-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call.Tpo src/$(DEPDIR)/sipp_unittest-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp_unittest-call.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call.o `test -f 'src/call.cpp' || echo '$(srcdir)/'`src/call.cpp src/sipp_unittest-call.obj: src/call.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call.Tpo -c -o src/sipp_unittest-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call.Tpo src/$(DEPDIR)/sipp_unittest-call.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call.cpp' object='src/sipp_unittest-call.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call.obj `if test -f 'src/call.cpp'; then $(CYGPATH_W) 'src/call.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call.cpp'; fi` src/sipp_unittest-deadcall.o: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-deadcall.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-deadcall.Tpo -c -o src/sipp_unittest-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-deadcall.Tpo src/$(DEPDIR)/sipp_unittest-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp_unittest-deadcall.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-deadcall.o `test -f 'src/deadcall.cpp' || echo '$(srcdir)/'`src/deadcall.cpp src/sipp_unittest-deadcall.obj: src/deadcall.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-deadcall.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-deadcall.Tpo -c -o src/sipp_unittest-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-deadcall.Tpo src/$(DEPDIR)/sipp_unittest-deadcall.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/deadcall.cpp' object='src/sipp_unittest-deadcall.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-deadcall.obj `if test -f 'src/deadcall.cpp'; then $(CYGPATH_W) 'src/deadcall.cpp'; else $(CYGPATH_W) '$(srcdir)/src/deadcall.cpp'; fi` src/sipp_unittest-infile.o: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-infile.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-infile.Tpo -c -o src/sipp_unittest-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-infile.Tpo src/$(DEPDIR)/sipp_unittest-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp_unittest-infile.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-infile.o `test -f 'src/infile.cpp' || echo '$(srcdir)/'`src/infile.cpp src/sipp_unittest-infile.obj: src/infile.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-infile.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-infile.Tpo -c -o src/sipp_unittest-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-infile.Tpo src/$(DEPDIR)/sipp_unittest-infile.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/infile.cpp' object='src/sipp_unittest-infile.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-infile.obj `if test -f 'src/infile.cpp'; then $(CYGPATH_W) 'src/infile.cpp'; else $(CYGPATH_W) '$(srcdir)/src/infile.cpp'; fi` src/sipp_unittest-listener.o: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-listener.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-listener.Tpo -c -o src/sipp_unittest-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-listener.Tpo src/$(DEPDIR)/sipp_unittest-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp_unittest-listener.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-listener.o `test -f 'src/listener.cpp' || echo '$(srcdir)/'`src/listener.cpp src/sipp_unittest-listener.obj: src/listener.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-listener.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-listener.Tpo -c -o src/sipp_unittest-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-listener.Tpo src/$(DEPDIR)/sipp_unittest-listener.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/listener.cpp' object='src/sipp_unittest-listener.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-listener.obj `if test -f 'src/listener.cpp'; then $(CYGPATH_W) 'src/listener.cpp'; else $(CYGPATH_W) '$(srcdir)/src/listener.cpp'; fi` src/sipp_unittest-logger.o: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-logger.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-logger.Tpo -c -o src/sipp_unittest-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-logger.Tpo src/$(DEPDIR)/sipp_unittest-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp_unittest-logger.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-logger.o `test -f 'src/logger.cpp' || echo '$(srcdir)/'`src/logger.cpp src/sipp_unittest-logger.obj: src/logger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-logger.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-logger.Tpo -c -o src/sipp_unittest-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-logger.Tpo src/$(DEPDIR)/sipp_unittest-logger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/logger.cpp' object='src/sipp_unittest-logger.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-logger.obj `if test -f 'src/logger.cpp'; then $(CYGPATH_W) 'src/logger.cpp'; else $(CYGPATH_W) '$(srcdir)/src/logger.cpp'; fi` src/sipp_unittest-message.o: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-message.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-message.Tpo -c -o src/sipp_unittest-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-message.Tpo src/$(DEPDIR)/sipp_unittest-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp_unittest-message.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-message.o `test -f 'src/message.cpp' || echo '$(srcdir)/'`src/message.cpp src/sipp_unittest-message.obj: src/message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-message.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-message.Tpo -c -o src/sipp_unittest-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-message.Tpo src/$(DEPDIR)/sipp_unittest-message.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/message.cpp' object='src/sipp_unittest-message.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-message.obj `if test -f 'src/message.cpp'; then $(CYGPATH_W) 'src/message.cpp'; else $(CYGPATH_W) '$(srcdir)/src/message.cpp'; fi` src/sipp_unittest-call_generation_task.o: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call_generation_task.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo -c -o src/sipp_unittest-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo src/$(DEPDIR)/sipp_unittest-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp_unittest-call_generation_task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call_generation_task.o `test -f 'src/call_generation_task.cpp' || echo '$(srcdir)/'`src/call_generation_task.cpp src/sipp_unittest-call_generation_task.obj: src/call_generation_task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-call_generation_task.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo -c -o src/sipp_unittest-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-call_generation_task.Tpo src/$(DEPDIR)/sipp_unittest-call_generation_task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/call_generation_task.cpp' object='src/sipp_unittest-call_generation_task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-call_generation_task.obj `if test -f 'src/call_generation_task.cpp'; then $(CYGPATH_W) 'src/call_generation_task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/call_generation_task.cpp'; fi` src/sipp_unittest-ratetask.o: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-ratetask.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-ratetask.Tpo -c -o src/sipp_unittest-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-ratetask.Tpo src/$(DEPDIR)/sipp_unittest-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp_unittest-ratetask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-ratetask.o `test -f 'src/ratetask.cpp' || echo '$(srcdir)/'`src/ratetask.cpp src/sipp_unittest-ratetask.obj: src/ratetask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-ratetask.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-ratetask.Tpo -c -o src/sipp_unittest-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-ratetask.Tpo src/$(DEPDIR)/sipp_unittest-ratetask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/ratetask.cpp' object='src/sipp_unittest-ratetask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-ratetask.obj `if test -f 'src/ratetask.cpp'; then $(CYGPATH_W) 'src/ratetask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/ratetask.cpp'; fi` src/sipp_unittest-reporttask.o: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-reporttask.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-reporttask.Tpo -c -o src/sipp_unittest-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-reporttask.Tpo src/$(DEPDIR)/sipp_unittest-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp_unittest-reporttask.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-reporttask.o `test -f 'src/reporttask.cpp' || echo '$(srcdir)/'`src/reporttask.cpp src/sipp_unittest-reporttask.obj: src/reporttask.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-reporttask.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-reporttask.Tpo -c -o src/sipp_unittest-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-reporttask.Tpo src/$(DEPDIR)/sipp_unittest-reporttask.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/reporttask.cpp' object='src/sipp_unittest-reporttask.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-reporttask.obj `if test -f 'src/reporttask.cpp'; then $(CYGPATH_W) 'src/reporttask.cpp'; else $(CYGPATH_W) '$(srcdir)/src/reporttask.cpp'; fi` src/sipp_unittest-scenario.o: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-scenario.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-scenario.Tpo -c -o src/sipp_unittest-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-scenario.Tpo src/$(DEPDIR)/sipp_unittest-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp_unittest-scenario.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-scenario.o `test -f 'src/scenario.cpp' || echo '$(srcdir)/'`src/scenario.cpp src/sipp_unittest-scenario.obj: src/scenario.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-scenario.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-scenario.Tpo -c -o src/sipp_unittest-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-scenario.Tpo src/$(DEPDIR)/sipp_unittest-scenario.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/scenario.cpp' object='src/sipp_unittest-scenario.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-scenario.obj `if test -f 'src/scenario.cpp'; then $(CYGPATH_W) 'src/scenario.cpp'; else $(CYGPATH_W) '$(srcdir)/src/scenario.cpp'; fi` src/sipp_unittest-sip_parser.o: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sip_parser.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo -c -o src/sipp_unittest-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo src/$(DEPDIR)/sipp_unittest-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp_unittest-sip_parser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sip_parser.o `test -f 'src/sip_parser.cpp' || echo '$(srcdir)/'`src/sip_parser.cpp src/sipp_unittest-sip_parser.obj: src/sip_parser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sip_parser.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo -c -o src/sipp_unittest-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sip_parser.Tpo src/$(DEPDIR)/sipp_unittest-sip_parser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sip_parser.cpp' object='src/sipp_unittest-sip_parser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sip_parser.obj `if test -f 'src/sip_parser.cpp'; then $(CYGPATH_W) 'src/sip_parser.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sip_parser.cpp'; fi` src/sipp_unittest-screen.o: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-screen.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-screen.Tpo -c -o src/sipp_unittest-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-screen.Tpo src/$(DEPDIR)/sipp_unittest-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp_unittest-screen.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-screen.o `test -f 'src/screen.cpp' || echo '$(srcdir)/'`src/screen.cpp src/sipp_unittest-screen.obj: src/screen.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-screen.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-screen.Tpo -c -o src/sipp_unittest-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-screen.Tpo src/$(DEPDIR)/sipp_unittest-screen.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/screen.cpp' object='src/sipp_unittest-screen.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-screen.obj `if test -f 'src/screen.cpp'; then $(CYGPATH_W) 'src/screen.cpp'; else $(CYGPATH_W) '$(srcdir)/src/screen.cpp'; fi` src/sipp_unittest-socket.o: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socket.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socket.Tpo -c -o src/sipp_unittest-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socket.Tpo src/$(DEPDIR)/sipp_unittest-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp_unittest-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socket.o `test -f 'src/socket.cpp' || echo '$(srcdir)/'`src/socket.cpp src/sipp_unittest-socket.obj: src/socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socket.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socket.Tpo -c -o src/sipp_unittest-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socket.Tpo src/$(DEPDIR)/sipp_unittest-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socket.cpp' object='src/sipp_unittest-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socket.obj `if test -f 'src/socket.cpp'; then $(CYGPATH_W) 'src/socket.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socket.cpp'; fi` src/sipp_unittest-socketowner.o: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socketowner.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socketowner.Tpo -c -o src/sipp_unittest-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socketowner.Tpo src/$(DEPDIR)/sipp_unittest-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp_unittest-socketowner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socketowner.o `test -f 'src/socketowner.cpp' || echo '$(srcdir)/'`src/socketowner.cpp src/sipp_unittest-socketowner.obj: src/socketowner.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-socketowner.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-socketowner.Tpo -c -o src/sipp_unittest-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-socketowner.Tpo src/$(DEPDIR)/sipp_unittest-socketowner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/socketowner.cpp' object='src/sipp_unittest-socketowner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-socketowner.obj `if test -f 'src/socketowner.cpp'; then $(CYGPATH_W) 'src/socketowner.cpp'; else $(CYGPATH_W) '$(srcdir)/src/socketowner.cpp'; fi` src/sipp_unittest-stat.o: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-stat.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-stat.Tpo -c -o src/sipp_unittest-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-stat.Tpo src/$(DEPDIR)/sipp_unittest-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp_unittest-stat.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-stat.o `test -f 'src/stat.cpp' || echo '$(srcdir)/'`src/stat.cpp src/sipp_unittest-stat.obj: src/stat.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-stat.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-stat.Tpo -c -o src/sipp_unittest-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-stat.Tpo src/$(DEPDIR)/sipp_unittest-stat.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/stat.cpp' object='src/sipp_unittest-stat.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-stat.obj `if test -f 'src/stat.cpp'; then $(CYGPATH_W) 'src/stat.cpp'; else $(CYGPATH_W) '$(srcdir)/src/stat.cpp'; fi` src/sipp_unittest-strings.o: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-strings.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-strings.Tpo -c -o src/sipp_unittest-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-strings.Tpo src/$(DEPDIR)/sipp_unittest-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp_unittest-strings.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-strings.o `test -f 'src/strings.cpp' || echo '$(srcdir)/'`src/strings.cpp src/sipp_unittest-strings.obj: src/strings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-strings.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-strings.Tpo -c -o src/sipp_unittest-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-strings.Tpo src/$(DEPDIR)/sipp_unittest-strings.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/strings.cpp' object='src/sipp_unittest-strings.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-strings.obj `if test -f 'src/strings.cpp'; then $(CYGPATH_W) 'src/strings.cpp'; else $(CYGPATH_W) '$(srcdir)/src/strings.cpp'; fi` src/sipp_unittest-task.o: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-task.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-task.Tpo -c -o src/sipp_unittest-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-task.Tpo src/$(DEPDIR)/sipp_unittest-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp_unittest-task.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-task.o `test -f 'src/task.cpp' || echo '$(srcdir)/'`src/task.cpp src/sipp_unittest-task.obj: src/task.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-task.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-task.Tpo -c -o src/sipp_unittest-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-task.Tpo src/$(DEPDIR)/sipp_unittest-task.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/task.cpp' object='src/sipp_unittest-task.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-task.obj `if test -f 'src/task.cpp'; then $(CYGPATH_W) 'src/task.cpp'; else $(CYGPATH_W) '$(srcdir)/src/task.cpp'; fi` src/sipp_unittest-time.o: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-time.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-time.Tpo -c -o src/sipp_unittest-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-time.Tpo src/$(DEPDIR)/sipp_unittest-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp_unittest-time.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-time.o `test -f 'src/time.cpp' || echo '$(srcdir)/'`src/time.cpp src/sipp_unittest-time.obj: src/time.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-time.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-time.Tpo -c -o src/sipp_unittest-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-time.Tpo src/$(DEPDIR)/sipp_unittest-time.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/time.cpp' object='src/sipp_unittest-time.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-time.obj `if test -f 'src/time.cpp'; then $(CYGPATH_W) 'src/time.cpp'; else $(CYGPATH_W) '$(srcdir)/src/time.cpp'; fi` src/sipp_unittest-variables.o: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-variables.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-variables.Tpo -c -o src/sipp_unittest-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-variables.Tpo src/$(DEPDIR)/sipp_unittest-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp_unittest-variables.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-variables.o `test -f 'src/variables.cpp' || echo '$(srcdir)/'`src/variables.cpp src/sipp_unittest-variables.obj: src/variables.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-variables.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-variables.Tpo -c -o src/sipp_unittest-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-variables.Tpo src/$(DEPDIR)/sipp_unittest-variables.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/variables.cpp' object='src/sipp_unittest-variables.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-variables.obj `if test -f 'src/variables.cpp'; then $(CYGPATH_W) 'src/variables.cpp'; else $(CYGPATH_W) '$(srcdir)/src/variables.cpp'; fi` src/sipp_unittest-watchdog.o: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-watchdog.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-watchdog.Tpo -c -o src/sipp_unittest-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-watchdog.Tpo src/$(DEPDIR)/sipp_unittest-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp_unittest-watchdog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-watchdog.o `test -f 'src/watchdog.cpp' || echo '$(srcdir)/'`src/watchdog.cpp src/sipp_unittest-watchdog.obj: src/watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-watchdog.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-watchdog.Tpo -c -o src/sipp_unittest-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-watchdog.Tpo src/$(DEPDIR)/sipp_unittest-watchdog.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/watchdog.cpp' object='src/sipp_unittest-watchdog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-watchdog.obj `if test -f 'src/watchdog.cpp'; then $(CYGPATH_W) 'src/watchdog.cpp'; else $(CYGPATH_W) '$(srcdir)/src/watchdog.cpp'; fi` src/sipp_unittest-rtpstream.o: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-rtpstream.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo -c -o src/sipp_unittest-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo src/$(DEPDIR)/sipp_unittest-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp_unittest-rtpstream.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-rtpstream.o `test -f 'src/rtpstream.cpp' || echo '$(srcdir)/'`src/rtpstream.cpp src/sipp_unittest-rtpstream.obj: src/rtpstream.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-rtpstream.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo -c -o src/sipp_unittest-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-rtpstream.Tpo src/$(DEPDIR)/sipp_unittest-rtpstream.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/rtpstream.cpp' object='src/sipp_unittest-rtpstream.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-rtpstream.obj `if test -f 'src/rtpstream.cpp'; then $(CYGPATH_W) 'src/rtpstream.cpp'; else $(CYGPATH_W) '$(srcdir)/src/rtpstream.cpp'; fi` src/sipp_unittest-sipp_unittest.o: src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sipp_unittest.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo -c -o src/sipp_unittest-sipp_unittest.o `test -f 'src/sipp_unittest.cpp' || echo '$(srcdir)/'`src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp_unittest.cpp' object='src/sipp_unittest-sipp_unittest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sipp_unittest.o `test -f 'src/sipp_unittest.cpp' || echo '$(srcdir)/'`src/sipp_unittest.cpp src/sipp_unittest-sipp_unittest.obj: src/sipp_unittest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-sipp_unittest.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo -c -o src/sipp_unittest-sipp_unittest.obj `if test -f 'src/sipp_unittest.cpp'; then $(CYGPATH_W) 'src/sipp_unittest.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp_unittest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-sipp_unittest.Tpo src/$(DEPDIR)/sipp_unittest-sipp_unittest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/sipp_unittest.cpp' object='src/sipp_unittest-sipp_unittest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-sipp_unittest.obj `if test -f 'src/sipp_unittest.cpp'; then $(CYGPATH_W) 'src/sipp_unittest.cpp'; else $(CYGPATH_W) '$(srcdir)/src/sipp_unittest.cpp'; fi` src/sipp_unittest-xp_parser_ut.o: src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-xp_parser_ut.o -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo -c -o src/sipp_unittest-xp_parser_ut.o `test -f 'src/xp_parser_ut.cpp' || echo '$(srcdir)/'`src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/xp_parser_ut.cpp' object='src/sipp_unittest-xp_parser_ut.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-xp_parser_ut.o `test -f 'src/xp_parser_ut.cpp' || echo '$(srcdir)/'`src/xp_parser_ut.cpp src/sipp_unittest-xp_parser_ut.obj: src/xp_parser_ut.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT src/sipp_unittest-xp_parser_ut.obj -MD -MP -MF src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo -c -o src/sipp_unittest-xp_parser_ut.obj `if test -f 'src/xp_parser_ut.cpp'; then $(CYGPATH_W) 'src/xp_parser_ut.cpp'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser_ut.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Tpo src/$(DEPDIR)/sipp_unittest-xp_parser_ut.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='src/xp_parser_ut.cpp' object='src/sipp_unittest-xp_parser_ut.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o src/sipp_unittest-xp_parser_ut.obj `if test -f 'src/xp_parser_ut.cpp'; then $(CYGPATH_W) 'src/xp_parser_ut.cpp'; else $(CYGPATH_W) '$(srcdir)/src/xp_parser_ut.cpp'; fi` gtest/src/sipp_unittest-gtest-death-test.o: gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-death-test.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo -c -o gtest/src/sipp_unittest-gtest-death-test.o `test -f 'gtest/src/gtest-death-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-death-test.cc' object='gtest/src/sipp_unittest-gtest-death-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-death-test.o `test -f 'gtest/src/gtest-death-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-death-test.cc gtest/src/sipp_unittest-gtest-death-test.obj: gtest/src/gtest-death-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-death-test.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo -c -o gtest/src/sipp_unittest-gtest-death-test.obj `if test -f 'gtest/src/gtest-death-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-death-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-death-test.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-death-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-death-test.cc' object='gtest/src/sipp_unittest-gtest-death-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-death-test.obj `if test -f 'gtest/src/gtest-death-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-death-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-death-test.cc'; fi` gtest/src/sipp_unittest-gtest-filepath.o: gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-filepath.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo -c -o gtest/src/sipp_unittest-gtest-filepath.o `test -f 'gtest/src/gtest-filepath.cc' || echo '$(srcdir)/'`gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-filepath.cc' object='gtest/src/sipp_unittest-gtest-filepath.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-filepath.o `test -f 'gtest/src/gtest-filepath.cc' || echo '$(srcdir)/'`gtest/src/gtest-filepath.cc gtest/src/sipp_unittest-gtest-filepath.obj: gtest/src/gtest-filepath.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-filepath.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo -c -o gtest/src/sipp_unittest-gtest-filepath.obj `if test -f 'gtest/src/gtest-filepath.cc'; then $(CYGPATH_W) 'gtest/src/gtest-filepath.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-filepath.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-filepath.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-filepath.cc' object='gtest/src/sipp_unittest-gtest-filepath.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-filepath.obj `if test -f 'gtest/src/gtest-filepath.cc'; then $(CYGPATH_W) 'gtest/src/gtest-filepath.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-filepath.cc'; fi` gtest/src/sipp_unittest-gtest-port.o: gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-port.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo -c -o gtest/src/sipp_unittest-gtest-port.o `test -f 'gtest/src/gtest-port.cc' || echo '$(srcdir)/'`gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-port.cc' object='gtest/src/sipp_unittest-gtest-port.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-port.o `test -f 'gtest/src/gtest-port.cc' || echo '$(srcdir)/'`gtest/src/gtest-port.cc gtest/src/sipp_unittest-gtest-port.obj: gtest/src/gtest-port.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-port.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo -c -o gtest/src/sipp_unittest-gtest-port.obj `if test -f 'gtest/src/gtest-port.cc'; then $(CYGPATH_W) 'gtest/src/gtest-port.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-port.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-port.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-port.cc' object='gtest/src/sipp_unittest-gtest-port.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-port.obj `if test -f 'gtest/src/gtest-port.cc'; then $(CYGPATH_W) 'gtest/src/gtest-port.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-port.cc'; fi` gtest/src/sipp_unittest-gtest-printers.o: gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-printers.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo -c -o gtest/src/sipp_unittest-gtest-printers.o `test -f 'gtest/src/gtest-printers.cc' || echo '$(srcdir)/'`gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-printers.cc' object='gtest/src/sipp_unittest-gtest-printers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-printers.o `test -f 'gtest/src/gtest-printers.cc' || echo '$(srcdir)/'`gtest/src/gtest-printers.cc gtest/src/sipp_unittest-gtest-printers.obj: gtest/src/gtest-printers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-printers.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo -c -o gtest/src/sipp_unittest-gtest-printers.obj `if test -f 'gtest/src/gtest-printers.cc'; then $(CYGPATH_W) 'gtest/src/gtest-printers.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-printers.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-printers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-printers.cc' object='gtest/src/sipp_unittest-gtest-printers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-printers.obj `if test -f 'gtest/src/gtest-printers.cc'; then $(CYGPATH_W) 'gtest/src/gtest-printers.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-printers.cc'; fi` gtest/src/sipp_unittest-gtest-test-part.o: gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-test-part.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo -c -o gtest/src/sipp_unittest-gtest-test-part.o `test -f 'gtest/src/gtest-test-part.cc' || echo '$(srcdir)/'`gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-test-part.cc' object='gtest/src/sipp_unittest-gtest-test-part.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-test-part.o `test -f 'gtest/src/gtest-test-part.cc' || echo '$(srcdir)/'`gtest/src/gtest-test-part.cc gtest/src/sipp_unittest-gtest-test-part.obj: gtest/src/gtest-test-part.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-test-part.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo -c -o gtest/src/sipp_unittest-gtest-test-part.obj `if test -f 'gtest/src/gtest-test-part.cc'; then $(CYGPATH_W) 'gtest/src/gtest-test-part.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-test-part.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-test-part.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-test-part.cc' object='gtest/src/sipp_unittest-gtest-test-part.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-test-part.obj `if test -f 'gtest/src/gtest-test-part.cc'; then $(CYGPATH_W) 'gtest/src/gtest-test-part.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-test-part.cc'; fi` gtest/src/sipp_unittest-gtest-typed-test.o: gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-typed-test.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo -c -o gtest/src/sipp_unittest-gtest-typed-test.o `test -f 'gtest/src/gtest-typed-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-typed-test.cc' object='gtest/src/sipp_unittest-gtest-typed-test.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-typed-test.o `test -f 'gtest/src/gtest-typed-test.cc' || echo '$(srcdir)/'`gtest/src/gtest-typed-test.cc gtest/src/sipp_unittest-gtest-typed-test.obj: gtest/src/gtest-typed-test.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest-typed-test.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo -c -o gtest/src/sipp_unittest-gtest-typed-test.obj `if test -f 'gtest/src/gtest-typed-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-typed-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-typed-test.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest-typed-test.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest-typed-test.cc' object='gtest/src/sipp_unittest-gtest-typed-test.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest-typed-test.obj `if test -f 'gtest/src/gtest-typed-test.cc'; then $(CYGPATH_W) 'gtest/src/gtest-typed-test.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest-typed-test.cc'; fi` gtest/src/sipp_unittest-gtest.o: gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest.o -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo -c -o gtest/src/sipp_unittest-gtest.o `test -f 'gtest/src/gtest.cc' || echo '$(srcdir)/'`gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest.cc' object='gtest/src/sipp_unittest-gtest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest.o `test -f 'gtest/src/gtest.cc' || echo '$(srcdir)/'`gtest/src/gtest.cc gtest/src/sipp_unittest-gtest.obj: gtest/src/gtest.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gtest/src/sipp_unittest-gtest.obj -MD -MP -MF gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo -c -o gtest/src/sipp_unittest-gtest.obj `if test -f 'gtest/src/gtest.cc'; then $(CYGPATH_W) 'gtest/src/gtest.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gtest/src/$(DEPDIR)/sipp_unittest-gtest.Tpo gtest/src/$(DEPDIR)/sipp_unittest-gtest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gtest/src/gtest.cc' object='gtest/src/sipp_unittest-gtest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gtest/src/sipp_unittest-gtest.obj `if test -f 'gtest/src/gtest.cc'; then $(CYGPATH_W) 'gtest/src/gtest.cc'; else $(CYGPATH_W) '$(srcdir)/gtest/src/gtest.cc'; fi` gmock/src/sipp_unittest-gmock-internal-utils.o: gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-internal-utils.o -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo -c -o gmock/src/sipp_unittest-gmock-internal-utils.o `test -f 'gmock/src/gmock-internal-utils.cc' || echo '$(srcdir)/'`gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-internal-utils.cc' object='gmock/src/sipp_unittest-gmock-internal-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-internal-utils.o `test -f 'gmock/src/gmock-internal-utils.cc' || echo '$(srcdir)/'`gmock/src/gmock-internal-utils.cc gmock/src/sipp_unittest-gmock-internal-utils.obj: gmock/src/gmock-internal-utils.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-internal-utils.obj -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo -c -o gmock/src/sipp_unittest-gmock-internal-utils.obj `if test -f 'gmock/src/gmock-internal-utils.cc'; then $(CYGPATH_W) 'gmock/src/gmock-internal-utils.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-internal-utils.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-internal-utils.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-internal-utils.cc' object='gmock/src/sipp_unittest-gmock-internal-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-internal-utils.obj `if test -f 'gmock/src/gmock-internal-utils.cc'; then $(CYGPATH_W) 'gmock/src/gmock-internal-utils.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-internal-utils.cc'; fi` gmock/src/sipp_unittest-gmock-matchers.o: gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-matchers.o -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo -c -o gmock/src/sipp_unittest-gmock-matchers.o `test -f 'gmock/src/gmock-matchers.cc' || echo '$(srcdir)/'`gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-matchers.cc' object='gmock/src/sipp_unittest-gmock-matchers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-matchers.o `test -f 'gmock/src/gmock-matchers.cc' || echo '$(srcdir)/'`gmock/src/gmock-matchers.cc gmock/src/sipp_unittest-gmock-matchers.obj: gmock/src/gmock-matchers.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -MT gmock/src/sipp_unittest-gmock-matchers.obj -MD -MP -MF gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo -c -o gmock/src/sipp_unittest-gmock-matchers.obj `if test -f 'gmock/src/gmock-matchers.cc'; then $(CYGPATH_W) 'gmock/src/gmock-matchers.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-matchers.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Tpo gmock/src/$(DEPDIR)/sipp_unittest-gmock-matchers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='gmock/src/gmock-matchers.cc' object='gmock/src/sipp_unittest-gmock-matchers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(sipp_unittest_CXXFLAGS) $(CXXFLAGS) -c -o gmock/src/sipp_unittest-gmock-matchers.obj `if test -f 'gmock/src/gmock-matchers.cc'; then $(CYGPATH_W) 'gmock/src/gmock-matchers.cc'; else $(CYGPATH_W) '$(srcdir)/gmock/src/gmock-matchers.cc'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ else \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? sipp_unittest.log: sipp_unittest$(EXEEXT) @p='sipp_unittest$(EXEEXT)'; \ b='sipp_unittest'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(MANS) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f gmock/src/$(DEPDIR)/$(am__dirstamp) -rm -f gmock/src/$(am__dirstamp) -rm -f gtest/src/$(DEPDIR)/$(am__dirstamp) -rm -f gtest/src/$(am__dirstamp) -rm -f src/$(DEPDIR)/$(am__dirstamp) -rm -f src/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ mostlyclean-am distclean: distclean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf gmock/src/$(DEPDIR) gtest/src/$(DEPDIR) src/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf gmock/src/$(DEPDIR) gtest/src/$(DEPDIR) src/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-man: uninstall-man1 .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ clean-cscope clean-generic cscope cscopelist-am ctags ctags-am \ dist dist-all dist-bzip2 dist-gzip dist-lzip dist-shar \ dist-tarZ dist-xz dist-zip distcheck distclean \ distclean-compile distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man1 install-pdf install-pdf-am install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 @AM_GIT_VERSION@ # call.cpp and sipp.cpp use version.h; see AM_GIT_VERSION. src/call.cpp: include/version.h src/sipp.cpp: include/version.h @HAVE_HELP2MAN_TRUE@sipp.1: ./sipp $(sipp_SOURCES) @HAVE_HELP2MAN_TRUE@ $(HELP2MAN) --output=$@ -v "-v" --no-info \ @HAVE_HELP2MAN_TRUE@ --name='SIP testing tool and traffic generator' \ @HAVE_HELP2MAN_TRUE@ ./sipp @HAVE_HELP2MAN_FALSE@sipp.1: @HAVE_HELP2MAN_FALSE@ @echo "Warning: help2man not available, no man page is created." # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: sipp-3.5.1/.gitmodules0000644000175000017500000000211612672462535013716 0ustar vsevavseva[submodule "gtest"] # https://code.google.com/p/googletest/wiki/FAQ # > In the early days, we said that you could install compiled # > Google Test libraries on *nix systems using make install. # > Then every user of your machine can write tests without # > recompiling Google Test. # > # > This seemed like a good idea, but it has a got-cha: every # > user needs to compile his tests using the same compiler # > flags used to compile the installed Google Test libraries; # > otherwise he may run into undefined behaviors (i.e. the # > tests can behave strangely and may even crash for no obvious # > reasons). # ... # > Therefore, for your sanity, we recommend to avoid installing # > pre-compiled Google Test libraries. Instead, each project # > should compile Google Test itself such that it can be sure # > that the same flags are used for both Google Test and the # > tests. # path = gtest url = https://chromium.googlesource.com/external/googletest ignore = dirty [submodule "gmock"] path = gmock url = https://chromium.googlesource.com/external/googlemock ignore = dirty sipp-3.5.1/.gitignore0000644000175000017500000000070012672462535013526 0ustar vsevavseva*.o *~ .*.sw* .deps/ .version Makefile Makefile.in Makefile.am aclocal.m4 autom4te.cache/ configure config.guess config.h config.log config.status config.sub compile depcomp .dirstamp install-sh missing sipp sipp.1 sipp-*.tar.gz sipp_unittest stamp-h1 test-driver *.log *.csv vim_ctags .*.sw? stamp-h.in *.orig *.rej *.patch # Ignore *.xml in root dir, but not in regression tests dir. /*.xml # Ignore autogenerated version.h. /include/version.h sipp-3.5.1/gmock/0000755000175000017500000000000012672462535012641 5ustar vsevavsevasipp-3.5.1/cpplint.py0000644000175000017500000046622112672462535013577 0ustar vsevavseva#!/usr/bin/python # # Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above # copyright notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of Google Inc. nor the names of its # contributors may be used to endorse or promote products derived from # this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Here are some issues that I've had people identify in my code during reviews, # that I think are possible to flag automatically in a lint tool. If these were # caught by lint, it would save time both for myself and that of my reviewers. # Most likely, some of these are beyond the scope of the current lint framework, # but I think it is valuable to retain these wish-list items even if they cannot # be immediately implemented. # # Suggestions # ----------- # - Check for no 'explicit' for multi-arg ctor # - Check for boolean assign RHS in parens # - Check for ctor initializer-list colon position and spacing # - Check that if there's a ctor, there should be a dtor # - Check accessors that return non-pointer member variables are # declared const # - Check accessors that return non-const pointer member vars are # *not* declared const # - Check for using public includes for testing # - Check for spaces between brackets in one-line inline method # - Check for no assert() # - Check for spaces surrounding operators # - Check for 0 in pointer context (should be NULL) # - Check for 0 in char context (should be '\0') # - Check for camel-case method name conventions for methods # that are not simple inline getters and setters # - Do not indent namespace contents # - Avoid inlining non-trivial constructors in header files # - Check for old-school (void) cast for call-sites of functions # ignored return value # - Check gUnit usage of anonymous namespace # - Check for class declaration order (typedefs, consts, enums, # ctor(s?), dtor, friend declarations, methods, member vars) # """Does google-lint on c++ files. The goal of this script is to identify places in the code that *may* be in non-compliance with google style. It does not attempt to fix up these problems -- the point is to educate. It does also not attempt to find all problems, or to ensure that everything it does find is legitimately a problem. In particular, we can get very confused by /* and // inside strings! We do a small hack, which is to ignore //'s with "'s after them on the same line, but it is far from perfect (in either direction). """ import codecs import copy import getopt import math # for log import os import re import sre_compile import string import sys import unicodedata _USAGE = """ Syntax: cpplint.py [--verbose=#] [--output=vs7] [--filter=-x,+y,...] [--counting=total|toplevel|detailed] [file] ... The style guidelines this tries to follow are those in http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml Every problem is given a confidence score from 1-5, with 5 meaning we are certain of the problem, and 1 meaning it could be a legitimate construct. This will miss some errors, and is not a substitute for a code review. To suppress false-positive errors of a certain category, add a 'NOLINT(category)' comment to the line. NOLINT or NOLINT(*) suppresses errors of all categories on that line. The files passed in will be linted; at least one file must be provided. Linted extensions are .cc, .cpp, and .h. Other file types will be ignored. Flags: output=vs7 By default, the output is formatted to ease emacs parsing. Visual Studio compatible output (vs7) may also be used. Other formats are unsupported. verbose=# Specify a number 0-5 to restrict errors to certain verbosity levels. filter=-x,+y,... Specify a comma-separated list of category-filters to apply: only error messages whose category names pass the filters will be printed. (Category names are printed with the message and look like "[whitespace/indent]".) Filters are evaluated left to right. "-FOO" and "FOO" means "do not print categories that start with FOO". "+FOO" means "do print categories that start with FOO". Examples: --filter=-whitespace,+whitespace/braces --filter=whitespace,runtime/printf,+runtime/printf_format --filter=-,+build/include_what_you_use To see a list of all the categories used in cpplint, pass no arg: --filter= counting=total|toplevel|detailed The total number of errors found is always printed. If 'toplevel' is provided, then the count of errors in each of the top-level categories like 'build' and 'whitespace' will also be printed. If 'detailed' is provided, then a count is provided for each category like 'build/class'. root=subdir The root directory used for deriving header guard CPP variable. By default, the header guard CPP variable is calculated as the relative path to the directory that contains .git, .hg, or .svn. When this flag is specified, the relative path is calculated from the specified directory. If the specified directory does not exist, this flag is ignored. Examples: Assuing that src/.git exists, the header guard CPP variables for src/chrome/browser/ui/browser.h are: No flag => CHROME_BROWSER_UI_BROWSER_H_ --root=chrome => BROWSER_UI_BROWSER_H_ --root=chrome/browser => UI_BROWSER_H_ """ # We categorize each error message we print. Here are the categories. # We want an explicit list so we can list them all in cpplint --filter=. # If you add a new error message with a new category, add it to the list # here! cpplint_unittest.py should tell you if you forget to do this. # \ used for clearer layout -- pylint: disable-msg=C6013 _ERROR_CATEGORIES = [ 'build/class', 'build/deprecated', 'build/endif_comment', 'build/explicit_make_pair', 'build/forward_decl', 'build/header_guard', 'build/include', 'build/include_alpha', 'build/include_order', 'build/include_what_you_use', 'build/namespaces', 'build/printf_format', 'build/storage_class', 'legal/copyright', 'readability/alt_tokens', 'readability/braces', 'readability/casting', 'readability/check', 'readability/constructors', 'readability/fn_size', 'readability/function', 'readability/multiline_comment', 'readability/multiline_string', 'readability/namespace', 'readability/nolint', 'readability/streams', 'readability/todo', 'readability/utf8', 'runtime/arrays', 'runtime/casting', 'runtime/explicit', 'runtime/int', 'runtime/init', 'runtime/invalid_increment', 'runtime/member_string_references', 'runtime/memset', 'runtime/operator', 'runtime/printf', 'runtime/printf_format', 'runtime/references', 'runtime/rtti', 'runtime/sizeof', 'runtime/string', 'runtime/threadsafe_fn', 'whitespace/blank_line', 'whitespace/braces', 'whitespace/comma', 'whitespace/comments', 'whitespace/empty_loop_body', 'whitespace/end_of_line', 'whitespace/ending_newline', 'whitespace/forcolon', 'whitespace/indent', 'whitespace/labels', 'whitespace/line_length', 'whitespace/newline', 'whitespace/operators', 'whitespace/parens', 'whitespace/semicolon', 'whitespace/tab', 'whitespace/todo' ] # The default state of the category filter. This is overrided by the --filter= # flag. By default all errors are on, so only add here categories that should be # off by default (i.e., categories that must be enabled by the --filter= flags). # All entries here should start with a '-' or '+', as in the --filter= flag. _DEFAULT_FILTERS = ['-build/include_alpha'] # We used to check for high-bit characters, but after much discussion we # decided those were OK, as long as they were in UTF-8 and didn't represent # hard-coded international strings, which belong in a separate i18n file. # Headers that we consider STL headers. _STL_HEADERS = frozenset([ 'algobase.h', 'algorithm', 'alloc.h', 'bitset', 'deque', 'exception', 'function.h', 'functional', 'hash_map', 'hash_map.h', 'hash_set', 'hash_set.h', 'iterator', 'list', 'list.h', 'map', 'memory', 'new', 'pair.h', 'pthread_alloc', 'queue', 'set', 'set.h', 'sstream', 'stack', 'stl_alloc.h', 'stl_relops.h', 'type_traits.h', 'utility', 'vector', 'vector.h', ]) # Non-STL C++ system headers. _CPP_HEADERS = frozenset([ 'algo.h', 'builtinbuf.h', 'bvector.h', 'cassert', 'cctype', 'cerrno', 'cfloat', 'ciso646', 'climits', 'clocale', 'cmath', 'complex', 'complex.h', 'csetjmp', 'csignal', 'cstdarg', 'cstddef', 'cstdio', 'cstdlib', 'cstring', 'ctime', 'cwchar', 'cwctype', 'defalloc.h', 'deque.h', 'editbuf.h', 'exception', 'fstream', 'fstream.h', 'hashtable.h', 'heap.h', 'indstream.h', 'iomanip', 'iomanip.h', 'ios', 'iosfwd', 'iostream', 'iostream.h', 'istream', 'istream.h', 'iterator.h', 'limits', 'map.h', 'multimap.h', 'multiset.h', 'numeric', 'ostream', 'ostream.h', 'parsestream.h', 'pfstream.h', 'PlotFile.h', 'procbuf.h', 'pthread_alloc.h', 'rope', 'rope.h', 'ropeimpl.h', 'SFile.h', 'slist', 'slist.h', 'stack.h', 'stdexcept', 'stdiostream.h', 'streambuf', 'streambuf.h', 'stream.h', 'strfile.h', 'string', 'strstream', 'strstream.h', 'tempbuf.h', 'tree.h', 'typeinfo', 'valarray', ]) # Assertion macros. These are defined in base/logging.h and # testing/base/gunit.h. Note that the _M versions need to come first # for substring matching to work. _CHECK_MACROS = [ 'DCHECK', 'CHECK', 'EXPECT_TRUE_M', 'EXPECT_TRUE', 'ASSERT_TRUE_M', 'ASSERT_TRUE', 'EXPECT_FALSE_M', 'EXPECT_FALSE', 'ASSERT_FALSE_M', 'ASSERT_FALSE', ] # Replacement macros for CHECK/DCHECK/EXPECT_TRUE/EXPECT_FALSE _CHECK_REPLACEMENT = dict([(m, {}) for m in _CHECK_MACROS]) for op, replacement in [('==', 'EQ'), ('!=', 'NE'), ('>=', 'GE'), ('>', 'GT'), ('<=', 'LE'), ('<', 'LT')]: _CHECK_REPLACEMENT['DCHECK'][op] = 'DCHECK_%s' % replacement _CHECK_REPLACEMENT['CHECK'][op] = 'CHECK_%s' % replacement _CHECK_REPLACEMENT['EXPECT_TRUE'][op] = 'EXPECT_%s' % replacement _CHECK_REPLACEMENT['ASSERT_TRUE'][op] = 'ASSERT_%s' % replacement _CHECK_REPLACEMENT['EXPECT_TRUE_M'][op] = 'EXPECT_%s_M' % replacement _CHECK_REPLACEMENT['ASSERT_TRUE_M'][op] = 'ASSERT_%s_M' % replacement for op, inv_replacement in [('==', 'NE'), ('!=', 'EQ'), ('>=', 'LT'), ('>', 'LE'), ('<=', 'GT'), ('<', 'GE')]: _CHECK_REPLACEMENT['EXPECT_FALSE'][op] = 'EXPECT_%s' % inv_replacement _CHECK_REPLACEMENT['ASSERT_FALSE'][op] = 'ASSERT_%s' % inv_replacement _CHECK_REPLACEMENT['EXPECT_FALSE_M'][op] = 'EXPECT_%s_M' % inv_replacement _CHECK_REPLACEMENT['ASSERT_FALSE_M'][op] = 'ASSERT_%s_M' % inv_replacement # Alternative tokens and their replacements. For full list, see section 2.5 # Alternative tokens [lex.digraph] in the C++ standard. # # Digraphs (such as '%:') are not included here since it's a mess to # match those on a word boundary. _ALT_TOKEN_REPLACEMENT = { 'and': '&&', 'bitor': '|', 'or': '||', 'xor': '^', 'compl': '~', 'bitand': '&', 'and_eq': '&=', 'or_eq': '|=', 'xor_eq': '^=', 'not': '!', 'not_eq': '!=' } # Compile regular expression that matches all the above keywords. The "[ =()]" # bit is meant to avoid matching these keywords outside of boolean expressions. # # False positives include C-style multi-line comments (http://go/nsiut ) # and multi-line strings (http://go/beujw ), but those have always been # troublesome for cpplint. _ALT_TOKEN_REPLACEMENT_PATTERN = re.compile( r'[ =()](' + ('|'.join(_ALT_TOKEN_REPLACEMENT.keys())) + r')(?=[ (]|$)') # These constants define types of headers for use with # _IncludeState.CheckNextIncludeOrder(). _C_SYS_HEADER = 1 _CPP_SYS_HEADER = 2 _LIKELY_MY_HEADER = 3 _POSSIBLE_MY_HEADER = 4 _OTHER_HEADER = 5 # These constants define the current inline assembly state _NO_ASM = 0 # Outside of inline assembly block _INSIDE_ASM = 1 # Inside inline assembly block _END_ASM = 2 # Last line of inline assembly block _BLOCK_ASM = 3 # The whole block is an inline assembly block # Match start of assembly blocks _MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)' r'(?:\s+(volatile|__volatile__))?' r'\s*[{(]') _regexp_compile_cache = {} # Finds occurrences of NOLINT or NOLINT(...). _RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?') # {str, set(int)}: a map from error categories to sets of linenumbers # on which those errors are expected and should be suppressed. _error_suppressions = {} # The root directory used for deriving header guard CPP variable. # This is set by --root flag. _root = None def ParseNolintSuppressions(filename, raw_line, linenum, error): """Updates the global list of error-suppressions. Parses any NOLINT comments on the current line, updating the global error_suppressions store. Reports an error if the NOLINT comment was malformed. Args: filename: str, the name of the input file. raw_line: str, the line of input text, with comments. linenum: int, the number of the current line. error: function, an error handler. """ # FIXME(adonovan): "NOLINT(" is misparsed as NOLINT(*). matched = _RE_SUPPRESSION.search(raw_line) if matched: category = matched.group(1) if category in (None, '(*)'): # => "suppress all" _error_suppressions.setdefault(None, set()).add(linenum) else: if category.startswith('(') and category.endswith(')'): category = category[1:-1] if category in _ERROR_CATEGORIES: _error_suppressions.setdefault(category, set()).add(linenum) else: error(filename, linenum, 'readability/nolint', 5, 'Unknown NOLINT error category: %s' % category) def ResetNolintSuppressions(): "Resets the set of NOLINT suppressions to empty." _error_suppressions.clear() def IsErrorSuppressedByNolint(category, linenum): """Returns true if the specified error category is suppressed on this line. Consults the global error_suppressions map populated by ParseNolintSuppressions/ResetNolintSuppressions. Args: category: str, the category of the error. linenum: int, the current line number. Returns: bool, True iff the error should be suppressed due to a NOLINT comment. """ return (linenum in _error_suppressions.get(category, set()) or linenum in _error_suppressions.get(None, set())) def Match(pattern, s): """Matches the string with the pattern, caching the compiled regexp.""" # The regexp compilation caching is inlined in both Match and Search for # performance reasons; factoring it out into a separate function turns out # to be noticeably expensive. if not pattern in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].match(s) def Search(pattern, s): """Searches the string for the pattern, caching the compiled regexp.""" if not pattern in _regexp_compile_cache: _regexp_compile_cache[pattern] = sre_compile.compile(pattern) return _regexp_compile_cache[pattern].search(s) class _IncludeState(dict): """Tracks line numbers for includes, and the order in which includes appear. As a dict, an _IncludeState object serves as a mapping between include filename and line number on which that file was included. Call CheckNextIncludeOrder() once for each header in the file, passing in the type constants defined above. Calls in an illegal order will raise an _IncludeError with an appropriate error message. """ # self._section will move monotonically through this set. If it ever # needs to move backwards, CheckNextIncludeOrder will raise an error. _INITIAL_SECTION = 0 _MY_H_SECTION = 1 _C_SECTION = 2 _CPP_SECTION = 3 _OTHER_H_SECTION = 4 _TYPE_NAMES = { _C_SYS_HEADER: 'C system header', _CPP_SYS_HEADER: 'C++ system header', _LIKELY_MY_HEADER: 'header this file implements', _POSSIBLE_MY_HEADER: 'header this file may implement', _OTHER_HEADER: 'other header', } _SECTION_NAMES = { _INITIAL_SECTION: "... nothing. (This can't be an error.)", _MY_H_SECTION: 'a header this file implements', _C_SECTION: 'C system header', _CPP_SECTION: 'C++ system header', _OTHER_H_SECTION: 'other header', } def __init__(self): dict.__init__(self) # The name of the current section. self._section = self._INITIAL_SECTION # The path of last found header. self._last_header = '' def CanonicalizeAlphabeticalOrder(self, header_path): """Returns a path canonicalized for alphabetical comparison. - replaces "-" with "_" so they both cmp the same. - removes '-inl' since we don't require them to be after the main header. - lowercase everything, just in case. Args: header_path: Path to be canonicalized. Returns: Canonicalized path. """ return header_path.replace('-inl.h', '.h').replace('-', '_').lower() def IsInAlphabeticalOrder(self, header_path): """Check if a header is in alphabetical order with the previous header. Args: header_path: Header to be checked. Returns: Returns true if the header is in alphabetical order. """ canonical_header = self.CanonicalizeAlphabeticalOrder(header_path) if self._last_header > canonical_header: return False self._last_header = canonical_header return True def CheckNextIncludeOrder(self, header_type): """Returns a non-empty error message if the next header is out of order. This function also updates the internal state to be ready to check the next include. Args: header_type: One of the _XXX_HEADER constants defined above. Returns: The empty string if the header is in the right order, or an error message describing what's wrong. """ error_message = ('Found %s after %s' % (self._TYPE_NAMES[header_type], self._SECTION_NAMES[self._section])) last_section = self._section if header_type == _C_SYS_HEADER: if self._section <= self._C_SECTION: self._section = self._C_SECTION else: self._last_header = '' return error_message elif header_type == _CPP_SYS_HEADER: if self._section <= self._CPP_SECTION: self._section = self._CPP_SECTION else: self._last_header = '' return error_message elif header_type == _LIKELY_MY_HEADER: if self._section <= self._MY_H_SECTION: self._section = self._MY_H_SECTION else: self._section = self._OTHER_H_SECTION elif header_type == _POSSIBLE_MY_HEADER: if self._section <= self._MY_H_SECTION: self._section = self._MY_H_SECTION else: # This will always be the fallback because we're not sure # enough that the header is associated with this file. self._section = self._OTHER_H_SECTION else: assert header_type == _OTHER_HEADER self._section = self._OTHER_H_SECTION if last_section != self._section: self._last_header = '' return '' class _CppLintState(object): """Maintains module-wide state..""" def __init__(self): self.verbose_level = 1 # global setting. self.error_count = 0 # global count of reported errors # filters to apply when emitting error messages self.filters = _DEFAULT_FILTERS[:] self.counting = 'total' # In what way are we counting errors? self.errors_by_category = {} # string to int dict storing error counts # output format: # "emacs" - format that emacs can parse (default) # "vs7" - format that Microsoft Visual Studio 7 can parse self.output_format = 'emacs' def SetOutputFormat(self, output_format): """Sets the output format for errors.""" self.output_format = output_format def SetVerboseLevel(self, level): """Sets the module's verbosity, and returns the previous setting.""" last_verbose_level = self.verbose_level self.verbose_level = level return last_verbose_level def SetCountingStyle(self, counting_style): """Sets the module's counting options.""" self.counting = counting_style def SetFilters(self, filters): """Sets the error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "+whitespace/indent"). Each filter should start with + or -; else we die. Raises: ValueError: The comma-separated filters did not all start with '+' or '-'. E.g. "-,+whitespace,-whitespace/indent,whitespace/badfilter" """ # Default filters always have less priority than the flag ones. self.filters = _DEFAULT_FILTERS[:] for filt in filters.split(','): clean_filt = filt.strip() if clean_filt: self.filters.append(clean_filt) for filt in self.filters: if not (filt.startswith('+') or filt.startswith('-')): raise ValueError('Every filter in --filters must start with + or -' ' (%s does not)' % filt) def ResetErrorCounts(self): """Sets the module's error statistic back to zero.""" self.error_count = 0 self.errors_by_category = {} def IncrementErrorCount(self, category): """Bumps the module's error statistic.""" self.error_count += 1 if self.counting in ('toplevel', 'detailed'): if self.counting != 'detailed': category = category.split('/')[0] if category not in self.errors_by_category: self.errors_by_category[category] = 0 self.errors_by_category[category] += 1 def PrintErrorCounts(self): """Print a summary of errors by category, and the total.""" for category, count in self.errors_by_category.iteritems(): sys.stderr.write('Category \'%s\' errors found: %d\n' % (category, count)) sys.stderr.write('Total errors found: %d\n' % self.error_count) _cpplint_state = _CppLintState() def _OutputFormat(): """Gets the module's output format.""" return _cpplint_state.output_format def _SetOutputFormat(output_format): """Sets the module's output format.""" _cpplint_state.SetOutputFormat(output_format) def _VerboseLevel(): """Returns the module's verbosity setting.""" return _cpplint_state.verbose_level def _SetVerboseLevel(level): """Sets the module's verbosity, and returns the previous setting.""" return _cpplint_state.SetVerboseLevel(level) def _SetCountingStyle(level): """Sets the module's counting options.""" _cpplint_state.SetCountingStyle(level) def _Filters(): """Returns the module's list of output filters, as a list.""" return _cpplint_state.filters def _SetFilters(filters): """Sets the module's error-message filters. These filters are applied when deciding whether to emit a given error message. Args: filters: A string of comma-separated filters (eg "whitespace/indent"). Each filter should start with + or -; else we die. """ _cpplint_state.SetFilters(filters) class _FunctionState(object): """Tracks current function name and the number of lines in its body.""" _NORMAL_TRIGGER = 250 # for --v=0, 500 for --v=1, etc. _TEST_TRIGGER = 400 # about 50% more than _NORMAL_TRIGGER. def __init__(self): self.in_a_function = False self.lines_in_function = 0 self.current_function = '' def Begin(self, function_name): """Start analyzing function body. Args: function_name: The name of the function being tracked. """ self.in_a_function = True self.lines_in_function = 0 self.current_function = function_name def Count(self): """Count line in current function body.""" if self.in_a_function: self.lines_in_function += 1 def Check(self, error, filename, linenum): """Report if too many lines in function body. Args: error: The function to call with any errors found. filename: The name of the current file. linenum: The number of the line to check. """ if Match(r'T(EST|est)', self.current_function): base_trigger = self._TEST_TRIGGER else: base_trigger = self._NORMAL_TRIGGER trigger = base_trigger * 2**_VerboseLevel() if self.lines_in_function > trigger: error_level = int(math.log(self.lines_in_function / base_trigger, 2)) # 50 => 0, 100 => 1, 200 => 2, 400 => 3, 800 => 4, 1600 => 5, ... if error_level > 5: error_level = 5 error(filename, linenum, 'readability/fn_size', error_level, 'Small and focused functions are preferred:' ' %s has %d non-comment lines' ' (error triggered by exceeding %d lines).' % ( self.current_function, self.lines_in_function, trigger)) def End(self): """Stop analyzing function body.""" self.in_a_function = False class _IncludeError(Exception): """Indicates a problem with the include order in a file.""" pass class FileInfo: """Provides utility functions for filenames. FileInfo provides easy access to the components of a file's path relative to the project root. """ def __init__(self, filename): self._filename = filename def FullName(self): """Make Windows paths like Unix.""" return os.path.abspath(self._filename).replace('\\', '/') def RepositoryName(self): """FullName after removing the local path to the repository. If we have a real absolute path name here we can try to do something smart: detecting the root of the checkout and truncating /path/to/checkout from the name so that we get header guards that don't include things like "C:\Documents and Settings\..." or "/home/username/..." in them and thus people on different computers who have checked the source out to different locations won't see bogus errors. """ fullname = self.FullName() if os.path.exists(fullname): project_dir = os.path.dirname(fullname) if os.path.exists(os.path.join(project_dir, ".svn")): # If there's a .svn file in the current directory, we recursively look # up the directory tree for the top of the SVN checkout root_dir = project_dir one_up_dir = os.path.dirname(root_dir) while os.path.exists(os.path.join(one_up_dir, ".svn")): root_dir = os.path.dirname(root_dir) one_up_dir = os.path.dirname(one_up_dir) prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:] # Not SVN <= 1.6? Try to find a git, hg, or svn top level directory by # searching up from the current path. root_dir = os.path.dirname(fullname) while (root_dir != os.path.dirname(root_dir) and not os.path.exists(os.path.join(root_dir, ".git")) and not os.path.exists(os.path.join(root_dir, ".hg")) and not os.path.exists(os.path.join(root_dir, ".svn"))): root_dir = os.path.dirname(root_dir) if (os.path.exists(os.path.join(root_dir, ".git")) or os.path.exists(os.path.join(root_dir, ".hg")) or os.path.exists(os.path.join(root_dir, ".svn"))): prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:] # Don't know what to do; header guard warnings may be wrong... return fullname def Split(self): """Splits the file into the directory, basename, and extension. For 'chrome/browser/browser.cc', Split() would return ('chrome/browser', 'browser', '.cc') Returns: A tuple of (directory, basename, extension). """ googlename = self.RepositoryName() project, rest = os.path.split(googlename) return (project,) + os.path.splitext(rest) def BaseName(self): """File base name - text after the final slash, before the final period.""" return self.Split()[1] def Extension(self): """File extension - text following the final period.""" return self.Split()[2] def NoExtension(self): """File has no source file extension.""" return '/'.join(self.Split()[0:2]) def IsSource(self): """File has a source file extension.""" return self.Extension()[1:] in ('c', 'cc', 'cpp', 'cxx') def _ShouldPrintError(category, confidence, linenum): """If confidence >= verbose, category passes filter and is not suppressed.""" # There are three ways we might decide not to print an error message: # a "NOLINT(category)" comment appears in the source, # the verbosity level isn't high enough, or the filters filter it out. if IsErrorSuppressedByNolint(category, linenum): return False if confidence < _cpplint_state.verbose_level: return False is_filtered = False for one_filter in _Filters(): if one_filter.startswith('-'): if category.startswith(one_filter[1:]): is_filtered = True elif one_filter.startswith('+'): if category.startswith(one_filter[1:]): is_filtered = False else: assert False # should have been checked for in SetFilter. if is_filtered: return False return True def Error(filename, linenum, category, confidence, message): """Logs the fact we've found a lint error. We log where the error was found, and also our confidence in the error, that is, how certain we are this is a legitimate style regression, and not a misidentification or a use that's sometimes justified. False positives can be suppressed by the use of "cpplint(category)" comments on the offending line. These are parsed into _error_suppressions. Args: filename: The name of the file containing the error. linenum: The number of the line containing the error. category: A string used to describe the "category" this bug falls under: "whitespace", say, or "runtime". Categories may have a hierarchy separated by slashes: "whitespace/indent". confidence: A number from 1-5 representing a confidence score for the error, with 5 meaning that we are certain of the problem, and 1 meaning that it could be a legitimate construct. message: The error message. """ if _ShouldPrintError(category, confidence, linenum): _cpplint_state.IncrementErrorCount(category) if _cpplint_state.output_format == 'vs7': sys.stderr.write('%s(%s): %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) elif _cpplint_state.output_format == 'eclipse': sys.stderr.write('%s:%s: warning: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) else: sys.stderr.write('%s:%s: %s [%s] [%d]\n' % ( filename, linenum, message, category, confidence)) # Matches standard C++ escape esequences per 2.13.2.3 of the C++ standard. _RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile( r'\\([abfnrtv?"\\\']|\d+|x[0-9a-fA-F]+)') # Matches strings. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"') # Matches characters. Escape codes should already be removed by ESCAPES. _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'") # Matches multi-line C++ comments. # This RE is a little bit more complicated than one might expect, because we # have to take care of space removals tools so we can handle comments inside # statements better. # The current rule is: We only clear spaces from both sides when we're at the # end of the line. Otherwise, we try to remove spaces from the right side, # if this doesn't work we try on left side but only if there's a non-character # on the right. _RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile( r"""(\s*/\*.*\*/\s*$| /\*.*\*/\s+| \s+/\*.*\*/(?=\W)| /\*.*\*/)""", re.VERBOSE) def IsCppString(line): """Does line terminate so, that the next symbol is in string constant. This function does not consider single-line nor multi-line comments. Args: line: is a partial line of code starting from the 0..n. Returns: True, if next character appended to 'line' is inside a string constant. """ line = line.replace(r'\\', 'XX') # after this, \\" does not match to \" return ((line.count('"') - line.count(r'\"') - line.count("'\"'")) & 1) == 1 def FindNextMultiLineCommentStart(lines, lineix): """Find the beginning marker for a multiline comment.""" while lineix < len(lines): if lines[lineix].strip().startswith('/*'): # Only return this marker if the comment goes beyond this line if lines[lineix].strip().find('*/', 2) < 0: return lineix lineix += 1 return len(lines) def FindNextMultiLineCommentEnd(lines, lineix): """We are inside a comment, find the end marker.""" while lineix < len(lines): if lines[lineix].strip().endswith('*/'): return lineix lineix += 1 return len(lines) def RemoveMultiLineCommentsFromRange(lines, begin, end): """Clears a range of lines for multi-line comments.""" # Having // dummy comments makes the lines non-empty, so we will not get # unnecessary blank line warnings later in the code. for i in range(begin, end): lines[i] = '// dummy' def RemoveMultiLineComments(filename, lines, error): """Removes multiline (c-style) comments from lines.""" lineix = 0 while lineix < len(lines): lineix_begin = FindNextMultiLineCommentStart(lines, lineix) if lineix_begin >= len(lines): return lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) if lineix_end >= len(lines): error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, 'Could not find end of multi-line comment') return RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) lineix = lineix_end + 1 def CleanseComments(line): """Removes //-comments and single-line C-style /* */ comments. Args: line: A line of C++ source. Returns: The line with single-line comments removed. """ commentpos = line.find('//') if commentpos != -1 and not IsCppString(line[:commentpos]): line = line[:commentpos].rstrip() # get rid of /* ... */ return _RE_PATTERN_CLEANSE_LINE_C_COMMENTS.sub('', line) class CleansedLines(object): """Holds 3 copies of all lines with different preprocessing applied to them. 1) elided member contains lines without strings and comments, 2) lines member contains lines without comments, and 3) raw_lines member contains all the lines without processing. All these three members are of , and of the same length. """ def __init__(self, lines): self.elided = [] self.lines = [] self.raw_lines = lines self.num_lines = len(lines) for linenum in range(len(lines)): self.lines.append(CleanseComments(lines[linenum])) elided = self._CollapseStrings(lines[linenum]) self.elided.append(CleanseComments(elided)) def NumLines(self): """Returns the number of lines represented.""" return self.num_lines @staticmethod def _CollapseStrings(elided): """Collapses strings and chars on a line to simple "" or '' blocks. We nix strings first so we're not fooled by text like '"http://"' Args: elided: The line being processed. Returns: The line with collapsed strings. """ if not _RE_PATTERN_INCLUDE.match(elided): # Remove escaped characters first to make quote/single quote collapsing # basic. Things that look like escaped characters shouldn't occur # outside of strings and chars. elided = _RE_PATTERN_CLEANSE_LINE_ESCAPES.sub('', elided) elided = _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES.sub("''", elided) elided = _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES.sub('""', elided) return elided def FindEndOfExpressionInLine(line, startpos, depth, startchar, endchar): """Find the position just after the matching endchar. Args: line: a CleansedLines line. startpos: start searching at this position. depth: nesting level at startpos. startchar: expression opening character. endchar: expression closing character. Returns: Index just after endchar. """ for i in xrange(startpos, len(line)): if line[i] == startchar: depth += 1 elif line[i] == endchar: depth -= 1 if depth == 0: return i + 1 return -1 def CloseExpression(clean_lines, linenum, pos): """If input points to ( or { or [, finds the position that closes it. If lines[linenum][pos] points to a '(' or '{' or '[', finds the linenum/pos that correspond to the closing of the expression. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: A position on the line. Returns: A tuple (line, linenum, pos) pointer *past* the closing brace, or (line, len(lines), -1) if we never find a close. Note we ignore strings and comments when matching; and the line we return is the 'cleansed' line at linenum. """ line = clean_lines.elided[linenum] startchar = line[pos] if startchar not in '({[': return (line, clean_lines.NumLines(), -1) if startchar == '(': endchar = ')' if startchar == '[': endchar = ']' if startchar == '{': endchar = '}' # Check first line end_pos = FindEndOfExpressionInLine(line, pos, 0, startchar, endchar) if end_pos > -1: return (line, linenum, end_pos) tail = line[pos:] num_open = tail.count(startchar) - tail.count(endchar) while linenum < clean_lines.NumLines() - 1: linenum += 1 line = clean_lines.elided[linenum] delta = line.count(startchar) - line.count(endchar) if num_open + delta <= 0: return (line, linenum, FindEndOfExpressionInLine(line, 0, num_open, startchar, endchar)) num_open += delta # Did not find endchar before end of file, give up return (line, clean_lines.NumLines(), -1) def CheckForCopyright(filename, lines, error): """Logs an error if no Copyright message appears at the top of the file.""" # We'll say it should occur by line 10. Don't forget there's a # dummy line at the front. for line in xrange(1, min(len(lines), 11)): if re.search(r'Copyright', lines[line], re.I): break else: # means no copyright line was found error(filename, 0, 'legal/copyright', 5, 'No copyright message found. ' 'You should have a line: "Copyright [year] "') def GetHeaderGuardCPPVariable(filename): """Returns the CPP variable that should be used as a header guard. Args: filename: The name of a C++ header file. Returns: The CPP variable that should be used as a header guard in the named file. """ # Restores original filename in case that cpplint is invoked from Emacs's # flymake. filename = re.sub(r'_flymake\.h$', '.h', filename) filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename) fileinfo = FileInfo(filename) file_path_from_root = fileinfo.RepositoryName() if _root: file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root) return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_' def CheckForHeaderGuard(filename, lines, error): """Checks that the file contains a header guard. Logs an error if no #ifndef header guard is present. For other headers, checks that the full pathname is used. Args: filename: The name of the C++ header file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ cppvar = GetHeaderGuardCPPVariable(filename) ifndef = None ifndef_linenum = 0 define = None endif = None endif_linenum = 0 for linenum, line in enumerate(lines): linesplit = line.split() if len(linesplit) >= 2: # find the first occurrence of #ifndef and #define, save arg if not ifndef and linesplit[0] == '#ifndef': # set ifndef to the header guard presented on the #ifndef line. ifndef = linesplit[1] ifndef_linenum = linenum if not define and linesplit[0] == '#define': define = linesplit[1] # find the last occurrence of #endif, save entire line if line.startswith('#endif'): endif = line endif_linenum = linenum if not ifndef: error(filename, 0, 'build/header_guard', 5, 'No #ifndef header guard found, suggested CPP variable is: %s' % cppvar) return if not define: error(filename, 0, 'build/header_guard', 5, 'No #define header guard found, suggested CPP variable is: %s' % cppvar) return # The guard should be PATH_FILE_H_, but we also allow PATH_FILE_H__ # for backward compatibility. if ifndef != cppvar: error_level = 0 if ifndef != cppvar + '_': error_level = 5 ParseNolintSuppressions(filename, lines[ifndef_linenum], ifndef_linenum, error) error(filename, ifndef_linenum, 'build/header_guard', error_level, '#ifndef header guard has wrong style, please use: %s' % cppvar) if define != ifndef: error(filename, 0, 'build/header_guard', 5, '#ifndef and #define don\'t match, suggested CPP variable is: %s' % cppvar) return if endif != ('#endif // %s' % cppvar): error_level = 0 if endif != ('#endif // %s' % (cppvar + '_')): error_level = 5 ParseNolintSuppressions(filename, lines[endif_linenum], endif_linenum, error) error(filename, endif_linenum, 'build/header_guard', error_level, '#endif line should be "#endif // %s"' % cppvar) def CheckForUnicodeReplacementCharacters(filename, lines, error): """Logs an error for each line containing Unicode replacement characters. These indicate that either the file contained invalid UTF-8 (likely) or Unicode replacement characters (which it shouldn't). Note that it's possible for this to throw off line numbering if the invalid UTF-8 occurred adjacent to a newline. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ for linenum, line in enumerate(lines): if u'\ufffd' in line: error(filename, linenum, 'readability/utf8', 5, 'Line contains invalid UTF-8 (or Unicode replacement character).') def CheckForNewlineAtEOF(filename, lines, error): """Logs an error if there is no newline char at the end of the file. Args: filename: The name of the current file. lines: An array of strings, each representing a line of the file. error: The function to call with any errors found. """ # The array lines() was created by adding two newlines to the # original file (go figure), then splitting on \n. # To verify that the file ends in \n, we just have to make sure the # last-but-two element of lines() exists and is empty. if len(lines) < 3 or lines[-2]: error(filename, len(lines) - 2, 'whitespace/ending_newline', 5, 'Could not find a newline character at the end of the file.') def CheckForMultilineCommentsAndStrings(filename, clean_lines, linenum, error): """Logs an error if we see /* ... */ or "..." that extend past one line. /* ... */ comments are legit inside macros, for one line. Otherwise, we prefer // comments, so it's ok to warn about the other. Likewise, it's ok for strings to extend across multiple lines, as long as a line continuation character (backslash) terminates each line. Although not currently prohibited by the C++ style guide, it's ugly and unnecessary. We don't do well with either in this lint program, so we warn about both. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Remove all \\ (escaped backslashes) from the line. They are OK, and the # second (escaped) slash may trigger later \" detection erroneously. line = line.replace('\\\\', '') if line.count('/*') > line.count('*/'): error(filename, linenum, 'readability/multiline_comment', 5, 'Complex multi-line /*...*/-style comment found. ' 'Lint may give bogus warnings. ' 'Consider replacing these with //-style comments, ' 'with #if 0...#endif, ' 'or with more clearly structured multi-line comments.') if (line.count('"') - line.count('\\"')) % 2: error(filename, linenum, 'readability/multiline_string', 5, 'Multi-line string ("...") found. This lint script doesn\'t ' 'do well with such strings, and may give bogus warnings. They\'re ' 'ugly and unnecessary, and you should use concatenation instead".') threading_list = ( ('asctime(', 'asctime_r('), ('ctime(', 'ctime_r('), ('getgrgid(', 'getgrgid_r('), ('getgrnam(', 'getgrnam_r('), ('getlogin(', 'getlogin_r('), ('getpwnam(', 'getpwnam_r('), ('getpwuid(', 'getpwuid_r('), ('gmtime(', 'gmtime_r('), ('localtime(', 'localtime_r('), ('rand(', 'rand_r('), ('readdir(', 'readdir_r('), ('strtok(', 'strtok_r('), ('ttyname(', 'ttyname_r('), ) def CheckPosixThreading(filename, clean_lines, linenum, error): """Checks for calls to thread-unsafe functions. Much code has been originally written without consideration of multi-threading. Also, engineers are relying on their old experience; they have learned posix before threading extensions were added. These tests guide the engineers to use thread-safe functions (when using posix directly). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] for single_thread_function, multithread_safe_function in threading_list: ix = line.find(single_thread_function) # Comparisons made explicit for clarity -- pylint: disable-msg=C6403 if ix >= 0 and (ix == 0 or (not line[ix - 1].isalnum() and line[ix - 1] not in ('_', '.', '>'))): error(filename, linenum, 'runtime/threadsafe_fn', 2, 'Consider using ' + multithread_safe_function + '...) instead of ' + single_thread_function + '...) for improved thread safety.') # Matches invalid increment: *count++, which moves pointer instead of # incrementing a value. _RE_PATTERN_INVALID_INCREMENT = re.compile( r'^\s*\*\w+(\+\+|--);') def CheckInvalidIncrement(filename, clean_lines, linenum, error): """Checks for invalid increment *count++. For example following function: void increment_counter(int* count) { *count++; } is invalid, because it effectively does count++, moving pointer, and should be replaced with ++*count, (*count)++ or *count += 1. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] if _RE_PATTERN_INVALID_INCREMENT.match(line): error(filename, linenum, 'runtime/invalid_increment', 5, 'Changing pointer instead of value (or unused value of operator*).') class _BlockInfo(object): """Stores information about a generic block of code.""" def __init__(self, seen_open_brace): self.seen_open_brace = seen_open_brace self.open_parentheses = 0 self.inline_asm = _NO_ASM def CheckBegin(self, filename, clean_lines, linenum, error): """Run checks that applies to text up to the opening brace. This is mostly for checking the text after the class identifier and the "{", usually where the base class is specified. For other blocks, there isn't much to check, so we always pass. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ pass def CheckEnd(self, filename, clean_lines, linenum, error): """Run checks that applies to text after the closing brace. This is mostly used for checking end of namespace comments. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ pass class _ClassInfo(_BlockInfo): """Stores information about a class.""" def __init__(self, name, class_or_struct, clean_lines, linenum): _BlockInfo.__init__(self, False) self.name = name self.starting_linenum = linenum self.is_derived = False if class_or_struct == 'struct': self.access = 'public' else: self.access = 'private' # Try to find the end of the class. This will be confused by things like: # class A { # } *x = { ... # # But it's still good enough for CheckSectionSpacing. self.last_line = 0 depth = 0 for i in range(linenum, clean_lines.NumLines()): line = clean_lines.elided[i] depth += line.count('{') - line.count('}') if not depth: self.last_line = i break def CheckBegin(self, filename, clean_lines, linenum, error): # Look for a bare ':' if Search('(^|[^:]):($|[^:])', clean_lines.elided[linenum]): self.is_derived = True class _NamespaceInfo(_BlockInfo): """Stores information about a namespace.""" def __init__(self, name, linenum): _BlockInfo.__init__(self, False) self.name = name or '' self.starting_linenum = linenum def CheckEnd(self, filename, clean_lines, linenum, error): """Check end of namespace comments.""" line = clean_lines.raw_lines[linenum] # Check how many lines is enclosed in this namespace. Don't issue # warning for missing namespace comments if there aren't enough # lines. However, do apply checks if there is already an end of # namespace comment and it's incorrect. # # TODO(unknown): We always want to check end of namespace comments # if a namespace is large, but sometimes we also want to apply the # check if a short namespace contained nontrivial things (something # other than forward declarations). There is currently no logic on # deciding what these nontrivial things are, so this check is # triggered by namespace size only, which works most of the time. if (linenum - self.starting_linenum < 10 and not Match(r'};*\s*(//|/\*).*\bnamespace\b', line)): return # Look for matching comment at end of namespace. # # Note that we accept C style "/* */" comments for terminating # namespaces, so that code that terminate namespaces inside # preprocessor macros can be cpplint clean. Example: http://go/nxpiz # # We also accept stuff like "// end of namespace ." with the # period at the end. # # Besides these, we don't accept anything else, otherwise we might # get false negatives when existing comment is a substring of the # expected namespace. Example: http://go/ldkdc, http://cl/23548205 if self.name: # Named namespace if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) + r'[\*/\.\\\s]*$'), line): error(filename, linenum, 'readability/namespace', 5, 'Namespace should be terminated with "// namespace %s"' % self.name) else: # Anonymous namespace if not Match(r'};*\s*(//|/\*).*\bnamespace[\*/\.\\\s]*$', line): error(filename, linenum, 'readability/namespace', 5, 'Namespace should be terminated with "// namespace"') class _PreprocessorInfo(object): """Stores checkpoints of nesting stacks when #if/#else is seen.""" def __init__(self, stack_before_if): # The entire nesting stack before #if self.stack_before_if = stack_before_if # The entire nesting stack up to #else self.stack_before_else = [] # Whether we have already seen #else or #elif self.seen_else = False class _NestingState(object): """Holds states related to parsing braces.""" def __init__(self): # Stack for tracking all braces. An object is pushed whenever we # see a "{", and popped when we see a "}". Only 3 types of # objects are possible: # - _ClassInfo: a class or struct. # - _NamespaceInfo: a namespace. # - _BlockInfo: some other type of block. self.stack = [] # Stack of _PreprocessorInfo objects. self.pp_stack = [] def SeenOpenBrace(self): """Check if we have seen the opening brace for the innermost block. Returns: True if we have seen the opening brace, False if the innermost block is still expecting an opening brace. """ return (not self.stack) or self.stack[-1].seen_open_brace def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo) def UpdatePreprocessor(self, line): """Update preprocessor stack. We need to handle preprocessors due to classes like this: #ifdef SWIG struct ResultDetailsPageElementExtensionPoint { #else struct ResultDetailsPageElementExtensionPoint : public Extension { #endif (see http://go/qwddn for original example) We make the following assumptions (good enough for most files): - Preprocessor condition evaluates to true from #if up to first #else/#elif/#endif. - Preprocessor condition evaluates to false from #else/#elif up to #endif. We still perform lint checks on these lines, but these do not affect nesting stack. Args: line: current line to check. """ if Match(r'^\s*#\s*(if|ifdef|ifndef)\b', line): # Beginning of #if block, save the nesting stack here. The saved # stack will allow us to restore the parsing state in the #else case. self.pp_stack.append(_PreprocessorInfo(copy.deepcopy(self.stack))) elif Match(r'^\s*#\s*(else|elif)\b', line): # Beginning of #else block if self.pp_stack: if not self.pp_stack[-1].seen_else: # This is the first #else or #elif block. Remember the # whole nesting stack up to this point. This is what we # keep after the #endif. self.pp_stack[-1].seen_else = True self.pp_stack[-1].stack_before_else = copy.deepcopy(self.stack) # Restore the stack to how it was before the #if self.stack = copy.deepcopy(self.pp_stack[-1].stack_before_if) else: # TODO(unknown): unexpected #else, issue warning? pass elif Match(r'^\s*#\s*endif\b', line): # End of #if or #else blocks. if self.pp_stack: # If we saw an #else, we will need to restore the nesting # stack to its former state before the #else, otherwise we # will just continue from where we left off. if self.pp_stack[-1].seen_else: # Here we can just use a shallow copy since we are the last # reference to it. self.stack = self.pp_stack[-1].stack_before_else # Drop the corresponding #if self.pp_stack.pop() else: # TODO(unknown): unexpected #endif, issue warning? pass def Update(self, filename, clean_lines, linenum, error): """Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Update pp_stack first self.UpdatePreprocessor(line) # Count parentheses. This is to avoid adding struct arguments to # the nesting stack. if self.stack: inner_block = self.stack[-1] depth_change = line.count('(') - line.count(')') inner_block.open_parentheses += depth_change # Also check if we are starting or ending an inline assembly block. if inner_block.inline_asm in (_NO_ASM, _END_ASM): if (depth_change != 0 and inner_block.open_parentheses == 1 and _MATCH_ASM.match(line)): # Enter assembly block inner_block.inline_asm = _INSIDE_ASM else: # Not entering assembly block. If previous line was _END_ASM, # we will now shift to _NO_ASM state. inner_block.inline_asm = _NO_ASM elif (inner_block.inline_asm == _INSIDE_ASM and inner_block.open_parentheses == 0): # Exit assembly block inner_block.inline_asm = _END_ASM # Consume namespace declaration at the beginning of the line. Do # this in a loop so that we catch same line declarations like this: # namespace proto2 { namespace bridge { class MessageSet; } } while True: # Match start of namespace. The "\b\s*" below catches namespace # declarations even if it weren't followed by a whitespace, this # is so that we don't confuse our namespace checker. The # missing spaces will be flagged by CheckSpacing. namespace_decl_match = Match(r'^\s*namespace\b\s*([:\w]+)?(.*)$', line) if not namespace_decl_match: break new_namespace = _NamespaceInfo(namespace_decl_match.group(1), linenum) self.stack.append(new_namespace) line = namespace_decl_match.group(2) if line.find('{') != -1: new_namespace.seen_open_brace = True line = line[line.find('{') + 1:] # Look for a class declaration in whatever is left of the line # after parsing namespaces. The regexp accounts for decorated classes # such as in: # class LOCKABLE API Object { # }; # # Templates with class arguments may confuse the parser, for example: # template , # class Vector = vector > # class HeapQueue { # # Because this parser has no nesting state about templates, by the # time it saw "class Comparator", it may think that it's a new class. # Nested templates have a similar problem: # template < # typename ExportedType, # typename TupleType, # template class ImplTemplate> # # To avoid these cases, we ignore classes that are followed by '=' or '>' class_decl_match = Match( r'\s*(template\s*<[\w\s<>,:]*>\s*)?' '(class|struct)\s+([A-Z_]+\s+)*(\w+(?:::\w+)*)' '(([^=>]|<[^<>]*>)*)$', line) if (class_decl_match and (not self.stack or self.stack[-1].open_parentheses == 0)): self.stack.append(_ClassInfo( class_decl_match.group(4), class_decl_match.group(2), clean_lines, linenum)) line = class_decl_match.group(5) # If we have not yet seen the opening brace for the innermost block, # run checks here. if not self.SeenOpenBrace(): self.stack[-1].CheckBegin(filename, clean_lines, linenum, error) # Update access control if we are inside a class/struct if self.stack and isinstance(self.stack[-1], _ClassInfo): access_match = Match(r'\s*(public|private|protected)\s*:', line) if access_match: self.stack[-1].access = access_match.group(1) # Consume braces or semicolons from what's left of the line while True: # Match first brace, semicolon, or closed parenthesis. matched = Match(r'^[^{;)}]*([{;)}])(.*)$', line) if not matched: break token = matched.group(1) if token == '{': # If namespace or class hasn't seen a opening brace yet, mark # namespace/class head as complete. Push a new block onto the # stack otherwise. if not self.SeenOpenBrace(): self.stack[-1].seen_open_brace = True else: self.stack.append(_BlockInfo(True)) if _MATCH_ASM.match(line): self.stack[-1].inline_asm = _BLOCK_ASM elif token == ';' or token == ')': # If we haven't seen an opening brace yet, but we already saw # a semicolon, this is probably a forward declaration. Pop # the stack for these. # # Similarly, if we haven't seen an opening brace yet, but we # already saw a closing parenthesis, then these are probably # function arguments with extra "class" or "struct" keywords. # Also pop these stack for these. if not self.SeenOpenBrace(): self.stack.pop() else: # token == '}' # Perform end of block checks and pop the stack. if self.stack: self.stack[-1].CheckEnd(filename, clean_lines, linenum, error) self.stack.pop() line = matched.group(2) def InnermostClass(self): """Get class info on the top of the stack. Returns: A _ClassInfo object if we are inside a class, or None otherwise. """ for i in range(len(self.stack), 0, -1): classinfo = self.stack[i - 1] if isinstance(classinfo, _ClassInfo): return classinfo return None def CheckClassFinished(self, filename, error): """Checks that all classes have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found. """ # Note: This test can result in false positives if #ifdef constructs # get in the way of brace matching. See the testBuildClass test in # cpplint_unittest.py for an example of this. for obj in self.stack: if isinstance(obj, _ClassInfo): error(filename, obj.starting_linenum, 'build/class', 5, 'Failed to find complete declaration of class %s' % obj.name) def CheckForNonStandardConstructs(filename, clean_lines, linenum, nesting_state, error): """Logs an error if we see certain non-ANSI constructs ignored by gcc-2. Complain about several constructs which gcc-2 accepts, but which are not standard C++. Warning about these in lint is one way to ease the transition to new compilers. - put storage class first (e.g. "static const" instead of "const static"). - "%lld" instead of %qd" in printf-type functions. - "%1$d" is non-standard in printf-type functions. - "\%" is an undefined character escape sequence. - text after #endif is not allowed. - invalid inner-style forward declaration. - >? and ?= and )\?=?\s*(\w+|[+-]?\d+)(\.\d*)?', line): error(filename, linenum, 'build/deprecated', 3, '>? and ))?' # r'\s*const\s*' + type_name + '\s*&\s*\w+\s*;' error(filename, linenum, 'runtime/member_string_references', 2, 'const string& members are dangerous. It is much better to use ' 'alternatives, such as pointers or simple constants.') # Everything else in this function operates on class declarations. # Return early if the top of the nesting stack is not a class, or if # the class head is not completed yet. classinfo = nesting_state.InnermostClass() if not classinfo or not classinfo.seen_open_brace: return # The class may have been declared with namespace or classname qualifiers. # The constructor and destructor will not have those qualifiers. base_classname = classinfo.name.split('::')[-1] # Look for single-argument constructors that aren't marked explicit. # Technically a valid construct, but against style. args = Match(r'\s+(?:inline\s+)?%s\s*\(([^,()]+)\)' % re.escape(base_classname), line) if (args and args.group(1) != 'void' and not Match(r'(const\s+)?%s\s*(?:<\w+>\s*)?&' % re.escape(base_classname), args.group(1).strip())): error(filename, linenum, 'runtime/explicit', 5, 'Single-argument constructors should be marked explicit.') def CheckSpacingForFunctionCall(filename, line, linenum, error): """Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. line: The text of the line to check. linenum: The number of the line to check. error: The function to call with any errors found. """ # Since function calls often occur inside if/for/while/switch # expressions - which have their own, more liberal conventions - we # first see if we should be looking inside such an expression for a # function call, to which we can apply more strict standards. fncall = line # if there's no control flow construct, look at whole line for pattern in (r'\bif\s*\((.*)\)\s*{', r'\bfor\s*\((.*)\)\s*{', r'\bwhile\s*\((.*)\)\s*[{;]', r'\bswitch\s*\((.*)\)\s*{'): match = Search(pattern, line) if match: fncall = match.group(1) # look inside the parens for function calls break # Except in if/for/while/switch, there should never be space # immediately inside parens (eg "f( 3, 4 )"). We make an exception # for nested parens ( (a+b) + c ). Likewise, there should never be # a space before a ( when it's a function argument. I assume it's a # function argument when the char before the whitespace is legal in # a function name (alnum + _) and we're not starting a macro. Also ignore # pointers and references to arrays and functions coz they're too tricky: # we use a very simple way to recognize these: # " (something)(maybe-something)" or # " (something)(maybe-something," or # " (something)[something]" # Note that we assume the contents of [] to be short enough that # they'll never need to wrap. if ( # Ignore control structures. not Search(r'\b(if|for|while|switch|return|delete)\b', fncall) and # Ignore pointers/references to functions. not Search(r' \([^)]+\)\([^)]*(\)|,$)', fncall) and # Ignore pointers/references to arrays. not Search(r' \([^)]+\)\[[^\]]+\]', fncall)): if Search(r'\w\s*\(\s(?!\s*\\$)', fncall): # a ( used for a fn call error(filename, linenum, 'whitespace/parens', 4, 'Extra space after ( in function call') elif Search(r'\(\s+(?!(\s*\\)|\()', fncall): error(filename, linenum, 'whitespace/parens', 2, 'Extra space after (') if (Search(r'\w\s+\(', fncall) and not Search(r'#\s*define|typedef', fncall) and not Search(r'\w\s+\((\w+::)?\*\w+\)\(', fncall)): error(filename, linenum, 'whitespace/parens', 4, 'Extra space before ( in function call') # If the ) is followed only by a newline or a { + newline, assume it's # part of a control statement (if/while/etc), and don't complain if Search(r'[^)]\s+\)\s*[^{\s]', fncall): # If the closing parenthesis is preceded by only whitespaces, # try to give a more descriptive error message. if Search(r'^\s+\)', fncall): error(filename, linenum, 'whitespace/parens', 2, 'Closing ) should be moved to the previous line') else: error(filename, linenum, 'whitespace/parens', 2, 'Extra space before )') def IsBlankLine(line): """Returns true if the given line is blank. We consider a line to be blank if the line is empty or consists of only white spaces. Args: line: A line of a string. Returns: True, if the given line is blank. """ return not line or line.isspace() def CheckForFunctionLengths(filename, clean_lines, linenum, function_state, error): """Reports for long function bodies. For an overview why this is done, see: http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Write_Short_Functions Uses a simplistic algorithm assuming other style guidelines (especially spacing) are followed. Only checks unindented functions, so class members are unchecked. Trivial bodies are unchecked, so constructors with huge initializer lists may be missed. Blank/comment lines are not counted so as to avoid encouraging the removal of vertical space and comments just to get through a lint check. NOLINT *on the last line of a function* disables this check. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. function_state: Current function name and lines in body so far. error: The function to call with any errors found. """ lines = clean_lines.lines line = lines[linenum] raw = clean_lines.raw_lines raw_line = raw[linenum] joined_line = '' starting_func = False regexp = r'(\w(\w|::|\*|\&|\s)*)\(' # decls * & space::name( ... match_result = Match(regexp, line) if match_result: # If the name is all caps and underscores, figure it's a macro and # ignore it, unless it's TEST or TEST_F. function_name = match_result.group(1).split()[-1] if function_name == 'TEST' or function_name == 'TEST_F' or ( not Match(r'[A-Z_]+$', function_name)): starting_func = True if starting_func: body_found = False for start_linenum in xrange(linenum, clean_lines.NumLines()): start_line = lines[start_linenum] joined_line += ' ' + start_line.lstrip() if Search(r'(;|})', start_line): # Declarations and trivial functions body_found = True break # ... ignore elif Search(r'{', start_line): body_found = True function = Search(r'((\w|:)*)\(', line).group(1) if Match(r'TEST', function): # Handle TEST... macros parameter_regexp = Search(r'(\(.*\))', joined_line) if parameter_regexp: # Ignore bad syntax function += parameter_regexp.group(1) else: function += '()' function_state.Begin(function) break if not body_found: # No body for the function (or evidence of a non-function) was found. error(filename, linenum, 'readability/fn_size', 5, 'Lint failed to find start of function body.') elif Match(r'^\}\s*$', line): # function end function_state.Check(error, filename, linenum) function_state.End() elif not Match(r'^\s*$', line): function_state.Count() # Count non-blank/non-comment lines. _RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?') def CheckComment(comment, filename, linenum, error): """Checks for common mistakes in TODO comments. Args: comment: The text of the comment from the line in question. filename: The name of the current file. linenum: The number of the line to check. error: The function to call with any errors found. """ match = _RE_PATTERN_TODO.match(comment) if match: # One whitespace is correct; zero whitespace is handled elsewhere. leading_whitespace = match.group(1) if len(leading_whitespace) > 1: error(filename, linenum, 'whitespace/todo', 2, 'Too many spaces before TODO') username = match.group(2) if not username: error(filename, linenum, 'readability/todo', 2, 'Missing username in TODO; it should look like ' '"// TODO(my_username): Stuff."') middle_whitespace = match.group(3) # Comparisons made explicit for correctness -- pylint: disable-msg=C6403 if middle_whitespace != ' ' and middle_whitespace != '': error(filename, linenum, 'whitespace/todo', 2, 'TODO(my_username) should be followed by a space') def CheckAccess(filename, clean_lines, linenum, nesting_state, error): """Checks for improper use of DISALLOW* macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # get rid of comments and strings matched = Match((r'\s*(DISALLOW_COPY_AND_ASSIGN|' r'DISALLOW_EVIL_CONSTRUCTORS|' r'DISALLOW_IMPLICIT_CONSTRUCTORS)'), line) if not matched: return if nesting_state.stack and isinstance(nesting_state.stack[-1], _ClassInfo): if nesting_state.stack[-1].access != 'private': error(filename, linenum, 'readability/constructors', 3, '%s must be in the private: section' % matched.group(1)) else: # Found DISALLOW* macro outside a class declaration, or perhaps it # was used inside a function when it should have been part of the # class declaration. We could issue a warning here, but it # probably resulted in a compiler error already. pass def FindNextMatchingAngleBracket(clean_lines, linenum, init_suffix): """Find the corresponding > to close a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_suffix: Remainder of the current line after the initial <. Returns: True if a matching bracket exists. """ line = init_suffix nesting_stack = ['<'] while True: # Find the next operator that can tell us whether < is used as an # opening bracket or as a less-than operator. We only want to # warn on the latter case. # # We could also check all other operators and terminate the search # early, e.g. if we got something like this "a(),;\[\]]*([<>(),;\[\]])(.*)$', line) if match: # Found an operator, update nesting stack operator = match.group(1) line = match.group(2) if nesting_stack[-1] == '<': # Expecting closing angle bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator == '>': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma after a bracket, this is most likely a template # argument. We have not seen a closing angle bracket yet, but # it's probably a few lines later if we look for it, so just # return early here. return True else: # Got some other operator. return False else: # Expecting closing parenthesis or closing bracket if operator in ('<', '(', '['): nesting_stack.append(operator) elif operator in (')', ']'): # We don't bother checking for matching () or []. If we got # something like (] or [), it would have been a syntax error. nesting_stack.pop() else: # Scan the next line linenum += 1 if linenum >= len(clean_lines.elided): break line = clean_lines.elided[linenum] # Exhausted all remaining lines and still no matching angle bracket. # Most likely the input was incomplete, otherwise we should have # seen a semicolon and returned early. return True def FindPreviousMatchingAngleBracket(clean_lines, linenum, init_prefix): """Find the corresponding < that started a template. Args: clean_lines: A CleansedLines instance containing the file. linenum: Current line number. init_prefix: Part of the current line before the initial >. Returns: True if a matching bracket exists. """ line = init_prefix nesting_stack = ['>'] while True: # Find the previous operator match = Search(r'^(.*)([<>(),;\[\]])[^<>(),;\[\]]*$', line) if match: # Found an operator, update nesting stack operator = match.group(2) line = match.group(1) if nesting_stack[-1] == '>': # Expecting opening angle bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator == '<': nesting_stack.pop() if not nesting_stack: # Found matching angle bracket return True elif operator == ',': # Got a comma before a bracket, this is most likely a # template argument. The opening angle bracket is probably # there if we look for it, so just return early here. return True else: # Got some other operator. return False else: # Expecting opening parenthesis or opening bracket if operator in ('>', ')', ']'): nesting_stack.append(operator) elif operator in ('(', '['): nesting_stack.pop() else: # Scan the previous line linenum -= 1 if linenum < 0: break line = clean_lines.elided[linenum] # Exhausted all earlier lines and still no matching angle bracket. return False def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): """Checks for the correctness of various spacing issues in the code. Things we check for: spaces around operators, spaces after if/for/while/switch, no spaces around parens in function calls, two spaces between code and comment, don't start a block with a blank line, don't end a function with a blank line, don't add a blank line after public/protected/private, don't have too many blank lines in a row. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ raw = clean_lines.raw_lines line = raw[linenum] # Before nixing comments, check if the line is blank for no good # reason. This includes the first line after a block is opened, and # blank lines at the end of a function (ie, right before a line like '}' # # Skip all the blank line checks if we are immediately inside a # namespace body. In other words, don't issue blank line warnings # for this block: # namespace { # # } # # A warning about missing end of namespace comments will be issued instead. if IsBlankLine(line) and not nesting_state.InNamespaceBody(): elided = clean_lines.elided prev_line = elided[linenum - 1] prevbrace = prev_line.rfind('{') # TODO(unknown): Don't complain if line before blank line, and line after, # both start with alnums and are indented the same amount. # This ignores whitespace at the start of a namespace block # because those are not usually indented. if prevbrace != -1 and prev_line[prevbrace:].find('}') == -1: # OK, we have a blank line at the start of a code block. Before we # complain, we check if it is an exception to the rule: The previous # non-empty line has the parameters of a function header that are indented # 4 spaces (because they did not fit in a 80 column line when placed on # the same line as the function name). We also check for the case where # the previous line is indented 6 spaces, which may happen when the # initializers of a constructor do not fit into a 80 column line. exception = False if Match(r' {6}\w', prev_line): # Initializer list? # We are looking for the opening column of initializer list, which # should be indented 4 spaces to cause 6 space indentation afterwards. search_position = linenum-2 while (search_position >= 0 and Match(r' {6}\w', elided[search_position])): search_position -= 1 exception = (search_position >= 0 and elided[search_position][:5] == ' :') else: # Search for the function arguments or an initializer list. We use a # simple heuristic here: If the line is indented 4 spaces; and we have a # closing paren, without the opening paren, followed by an opening brace # or colon (for initializer lists) we assume that it is the last line of # a function header. If we have a colon indented 4 spaces, it is an # initializer list. exception = (Match(r' {4}\w[^\(]*\)\s*(const\s*)?(\{\s*$|:)', prev_line) or Match(r' {4}:', prev_line)) if not exception: error(filename, linenum, 'whitespace/blank_line', 2, 'Blank line at the start of a code block. Is this needed?') # Ignore blank lines at the end of a block in a long if-else # chain, like this: # if (condition1) { # // Something followed by a blank line # # } else if (condition2) { # // Something else # } if linenum + 1 < clean_lines.NumLines(): next_line = raw[linenum + 1] if (next_line and Match(r'\s*}', next_line) and next_line.find('} else ') == -1): error(filename, linenum, 'whitespace/blank_line', 3, 'Blank line at the end of a code block. Is this needed?') matched = Match(r'\s*(public|protected|private):', prev_line) if matched: error(filename, linenum, 'whitespace/blank_line', 3, 'Do not leave a blank line after "%s:"' % matched.group(1)) # Next, we complain if there's a comment too near the text commentpos = line.find('//') if commentpos != -1: # Check if the // may be in quotes. If so, ignore it # Comparisons made explicit for clarity -- pylint: disable-msg=C6403 if (line.count('"', 0, commentpos) - line.count('\\"', 0, commentpos)) % 2 == 0: # not in quotes # Allow one space for new scopes, two spaces otherwise: if (not Match(r'^\s*{ //', line) and ((commentpos >= 1 and line[commentpos-1] not in string.whitespace) or (commentpos >= 2 and line[commentpos-2] not in string.whitespace))): error(filename, linenum, 'whitespace/comments', 2, 'At least two spaces is best between code and comments') # There should always be a space between the // and the comment commentend = commentpos + 2 if commentend < len(line) and not line[commentend] == ' ': # but some lines are exceptions -- e.g. if they're big # comment delimiters like: # //---------------------------------------------------------- # or are an empty C++ style Doxygen comment, like: # /// # or they begin with multiple slashes followed by a space: # //////// Header comment match = (Search(r'[=/-]{4,}\s*$', line[commentend:]) or Search(r'^/$', line[commentend:]) or Search(r'^/+ ', line[commentend:])) if not match: error(filename, linenum, 'whitespace/comments', 4, 'Should have a space between // and comment') CheckComment(line[commentpos:], filename, linenum, error) line = clean_lines.elided[linenum] # get rid of comments and strings # Don't try to do spacing checks for operator methods line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line) # We allow no-spaces around = within an if: "if ( (a=Foo()) == 0 )". # Otherwise not. Note we only check for non-spaces on *both* sides; # sometimes people put non-spaces on one side when aligning ='s among # many lines (not that this is behavior that I approve of...) if Search(r'[\w.]=[\w.]', line) and not Search(r'\b(if|while) ', line): error(filename, linenum, 'whitespace/operators', 4, 'Missing spaces around =') # It's ok not to have spaces around binary operators like + - * /, but if # there's too little whitespace, we get concerned. It's hard to tell, # though, so we punt on this one for now. TODO. # You should always have whitespace around binary operators. # # Check <= and >= first to avoid false positives with < and >, then # check non-include lines for spacing around < and >. match = Search(r'[^<>=!\s](==|!=|<=|>=)[^<>=!\s]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around %s' % match.group(1)) # We allow no-spaces around << when used like this: 10<<20, but # not otherwise (particularly, not when used as streams) match = Search(r'(\S)(?:L|UL|ULL|l|ul|ull)?<<(\S)', line) if match and not (match.group(1).isdigit() and match.group(2).isdigit()): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <<') elif not Match(r'#.*include', line): # Avoid false positives on -> reduced_line = line.replace('->', '') # Look for < that is not surrounded by spaces. This is only # triggered if both sides are missing spaces, even though # technically should should flag if at least one side is missing a # space. This is done to avoid some false positives with shifts. match = Search(r'[^\s<]<([^\s=<].*)', reduced_line) if (match and not FindNextMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around <') # Look for > that is not surrounded by spaces. Similar to the # above, we only trigger if both sides are missing spaces to avoid # false positives with shifts. match = Search(r'^(.*[^\s>])>[^\s=>]', reduced_line) if (match and not FindPreviousMatchingAngleBracket(clean_lines, linenum, match.group(1))): error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >') # We allow no-spaces around >> for almost anything. This is because # C++11 allows ">>" to close nested templates, which accounts for # most cases when ">>" is not followed by a space. # # We still warn on ">>" followed by alpha character, because that is # likely due to ">>" being used for right shifts, e.g.: # value >> alpha # # When ">>" is used to close templates, the alphanumeric letter that # follows would be part of an identifier, and there should still be # a space separating the template type and the identifier. # type> alpha match = Search(r'>>[a-zA-Z_]', line) if match: error(filename, linenum, 'whitespace/operators', 3, 'Missing spaces around >>') # There shouldn't be space around unary operators match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line) if match: error(filename, linenum, 'whitespace/operators', 4, 'Extra space for operator %s' % match.group(1)) # A pet peeve of mine: no spaces after an if, while, switch, or for match = Search(r' (if\(|for\(|while\(|switch\()', line) if match: error(filename, linenum, 'whitespace/parens', 5, 'Missing space before ( in %s' % match.group(1)) # For if/for/while/switch, the left and right parens should be # consistent about how many spaces are inside the parens, and # there should either be zero or one spaces inside the parens. # We don't want: "if ( foo)" or "if ( foo )". # Exception: "for ( ; foo; bar)" and "for (foo; bar; )" are allowed. match = Search(r'\b(if|for|while|switch)\s*' r'\(([ ]*)(.).*[^ ]+([ ]*)\)\s*{\s*$', line) if match: if len(match.group(2)) != len(match.group(4)): if not (match.group(3) == ';' and len(match.group(2)) == 1 + len(match.group(4)) or not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)): error(filename, linenum, 'whitespace/parens', 5, 'Mismatching spaces inside () in %s' % match.group(1)) if not len(match.group(2)) in [0, 1]: error(filename, linenum, 'whitespace/parens', 5, 'Should have zero or one spaces inside ( and ) in %s' % match.group(1)) # You should always have a space after a comma (either as fn arg or operator) if Search(r',[^\s]', line): error(filename, linenum, 'whitespace/comma', 3, 'Missing space after ,') # You should always have a space after a semicolon # except for few corner cases # TODO(unknown): clarify if 'if (1) { return 1;}' is requires one more # space after ; if Search(r';[^\s};\\)/]', line): error(filename, linenum, 'whitespace/semicolon', 3, 'Missing space after ;') # Next we will look for issues with function calls. CheckSpacingForFunctionCall(filename, line, linenum, error) # Except after an opening paren, or after another opening brace (in case of # an initializer list, for instance), you should have spaces before your # braces. And since you should never have braces at the beginning of a line, # this is an easy test. if Search(r'[^ ({]{', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before {') # Make sure '} else {' has spaces. if Search(r'}else', line): error(filename, linenum, 'whitespace/braces', 5, 'Missing space before else') # You shouldn't have spaces before your brackets, except maybe after # 'delete []' or 'new char * []'. if Search(r'\w\s+\[', line) and not Search(r'delete\s+\[', line): error(filename, linenum, 'whitespace/braces', 5, 'Extra space before [') # You shouldn't have a space before a semicolon at the end of the line. # There's a special case for "for" since the style guide allows space before # the semicolon there. if Search(r':\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Semicolon defining empty statement. Use {} instead.') elif Search(r'^\s*;\s*$', line): error(filename, linenum, 'whitespace/semicolon', 5, 'Line contains only semicolon. If this should be an empty statement, ' 'use {} instead.') elif (Search(r'\s+;\s*$', line) and not Search(r'\bfor\b', line)): error(filename, linenum, 'whitespace/semicolon', 5, 'Extra space before last semicolon. If this should be an empty ' 'statement, use {} instead.') # In range-based for, we wanted spaces before and after the colon, but # not around "::" tokens that might appear. if (Search('for *\(.*[^:]:[^: ]', line) or Search('for *\(.*[^: ]:[^:]', line)): error(filename, linenum, 'whitespace/forcolon', 2, 'Missing space around colon in range-based for loop') def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): """Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. class_info: A _ClassInfo objects. linenum: The number of the line to check. error: The function to call with any errors found. """ # Skip checks if the class is small, where small means 25 lines or less. # 25 lines seems like a good cutoff since that's the usual height of # terminals, and any class that can't fit in one screen can't really # be considered "small". # # Also skip checks if we are on the first line. This accounts for # classes that look like # class Foo { public: ... }; # # If we didn't find the end of the class, last_line would be zero, # and the check will be skipped by the first condition. if (class_info.last_line - class_info.starting_linenum <= 24 or linenum <= class_info.starting_linenum): return matched = Match(r'\s*(public|protected|private):', clean_lines.lines[linenum]) if matched: # Issue warning if the line before public/protected/private was # not a blank line, but don't do this if the previous line contains # "class" or "struct". This can happen two ways: # - We are at the beginning of the class. # - We are forward-declaring an inner class that is semantically # private, but needed to be public for implementation reasons. # Also ignores cases where the previous line ends with a backslash as can be # common when defining classes in C macros. prev_line = clean_lines.lines[linenum - 1] if (not IsBlankLine(prev_line) and not Search(r'\b(class|struct)\b', prev_line) and not Search(r'\\$', prev_line)): # Try a bit harder to find the beginning of the class. This is to # account for multi-line base-specifier lists, e.g.: # class Derived # : public Base { end_class_head = class_info.starting_linenum for i in range(class_info.starting_linenum, linenum): if Search(r'\{\s*$', clean_lines.lines[i]): end_class_head = i break if end_class_head < linenum - 1: error(filename, linenum, 'whitespace/blank_line', 3, '"%s:" should be preceded by a blank line' % matched.group(1)) def GetPreviousNonBlankLine(clean_lines, linenum): """Return the most recent non-blank line and its line number. Args: clean_lines: A CleansedLines instance containing the file contents. linenum: The number of the line to check. Returns: A tuple with two elements. The first element is the contents of the last non-blank line before the current line, or the empty string if this is the first non-blank line. The second is the line number of that line, or -1 if this is the first non-blank line. """ prevlinenum = linenum - 1 while prevlinenum >= 0: prevline = clean_lines.elided[prevlinenum] if not IsBlankLine(prevline): # if not a blank line... return (prevline, prevlinenum) prevlinenum -= 1 return ('', -1) def CheckBraces(filename, clean_lines, linenum, error): """Looks for misplaced braces (e.g. at the end of line). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # get rid of comments and strings if Match(r'\s*{\s*$', line): # We allow an open brace to start a line in the case where someone # is using braces in a block to explicitly create a new scope, # which is commonly used to control the lifetime of # stack-allocated variables. We don't detect this perfectly: we # just don't complain if the last non-whitespace character on the # previous non-blank line is ';', ':', '{', or '}', or if the previous # line starts a preprocessor block. prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if (not Search(r'[;:}{]\s*$', prevline) and not Match(r'\s*#', prevline)): error(filename, linenum, 'whitespace/braces', 4, '{ should almost always be at the end of the previous line') # An else clause should be on the same line as the preceding closing brace. if Match(r'\s*else\s*', line): prevline = GetPreviousNonBlankLine(clean_lines, linenum)[0] if Match(r'\s*}\s*$', prevline): error(filename, linenum, 'whitespace/newline', 4, 'An else should appear on the same line as the preceding }') # If braces come on one side of an else, they should be on both. # However, we have to worry about "else if" that spans multiple lines! if Search(r'}\s*else[^{]*$', line) or Match(r'[^}]*else\s*{', line): if Search(r'}\s*else if([^{]*)$', line): # could be multi-line if # find the ( after the if pos = line.find('else if') pos = line.find('(', pos) if pos > 0: (endline, _, endpos) = CloseExpression(clean_lines, linenum, pos) if endline[endpos:].find('{') == -1: # must be brace after if error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side, it should have it on both') else: # common case: else not followed by a multi-line if error(filename, linenum, 'readability/braces', 5, 'If an else has a brace on one side, it should have it on both') # Likewise, an else should never have the else clause on the same line if Search(r'\belse [^\s{]', line) and not Search(r'\belse if\b', line): error(filename, linenum, 'whitespace/newline', 4, 'Else clause should never be on same line as else (use 2 lines)') # In the same way, a do/while should never be on one line if Match(r'\s*do [^\s{]', line): error(filename, linenum, 'whitespace/newline', 4, 'do/while clauses should not be on a single line') # Braces shouldn't be followed by a ; unless they're defining a struct # or initializing an array. # We can't tell in general, but we can for some common cases. prevlinenum = linenum while True: (prevline, prevlinenum) = GetPreviousNonBlankLine(clean_lines, prevlinenum) if Match(r'\s+{.*}\s*;', line) and not prevline.count(';'): line = prevline + line else: break if (Search(r'{.*}\s*;', line) and line.count('{') == line.count('}') and not Search(r'struct|class|enum|\s*=\s*{', line)): error(filename, linenum, 'readability/braces', 4, "You don't need a ; after a }") def CheckEmptyLoopBody(filename, clean_lines, linenum, error): """Loop for empty loop body with only a single semicolon. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ # Search for loop keywords at the beginning of the line. Because only # whitespaces are allowed before the keywords, this will also ignore most # do-while-loops, since those lines should start with closing brace. line = clean_lines.elided[linenum] if Match(r'\s*(for|while)\s*\(', line): # Find the end of the conditional expression (end_line, end_linenum, end_pos) = CloseExpression( clean_lines, linenum, line.find('(')) # Output warning if what follows the condition expression is a semicolon. # No warning for all other cases, including whitespace or newline, since we # have a separate check for semicolons preceded by whitespace. if end_pos >= 0 and Match(r';', end_line[end_pos:]): error(filename, end_linenum, 'whitespace/empty_loop_body', 5, 'Empty loop bodies should use {} or continue') def ReplaceableCheck(operator, macro, line): """Determine whether a basic CHECK can be replaced with a more specific one. For example suggest using CHECK_EQ instead of CHECK(a == b) and similarly for CHECK_GE, CHECK_GT, CHECK_LE, CHECK_LT, CHECK_NE. Args: operator: The C++ operator used in the CHECK. macro: The CHECK or EXPECT macro being called. line: The current source line. Returns: True if the CHECK can be replaced with a more specific one. """ # This matches decimal and hex integers, strings, and chars (in that order). match_constant = r'([-+]?(\d+|0[xX][0-9a-fA-F]+)[lLuU]{0,3}|".*"|\'.*\')' # Expression to match two sides of the operator with something that # looks like a literal, since CHECK(x == iterator) won't compile. # This means we can't catch all the cases where a more specific # CHECK is possible, but it's less annoying than dealing with # extraneous warnings. match_this = (r'\s*' + macro + r'\((\s*' + match_constant + r'\s*' + operator + r'[^<>].*|' r'.*[^<>]' + operator + r'\s*' + match_constant + r'\s*\))') # Don't complain about CHECK(x == NULL) or similar because # CHECK_EQ(x, NULL) won't compile (requires a cast). # Also, don't complain about more complex boolean expressions # involving && or || such as CHECK(a == b || c == d). return Match(match_this, line) and not Search(r'NULL|&&|\|\|', line) def CheckCheck(filename, clean_lines, linenum, error): """Checks the use of CHECK and EXPECT macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ # Decide the set of replacement macros that should be suggested raw_lines = clean_lines.raw_lines current_macro = '' for macro in _CHECK_MACROS: if raw_lines[linenum].find(macro) >= 0: current_macro = macro break if not current_macro: # Don't waste time here if line doesn't contain 'CHECK' or 'EXPECT' return line = clean_lines.elided[linenum] # get rid of comments and strings # Encourage replacing plain CHECKs with CHECK_EQ/CHECK_NE/etc. for operator in ['==', '!=', '>=', '>', '<=', '<']: if ReplaceableCheck(operator, current_macro, line): error(filename, linenum, 'readability/check', 2, 'Consider using %s instead of %s(a %s b)' % ( _CHECK_REPLACEMENT[current_macro][operator], current_macro, operator)) break def CheckAltTokens(filename, clean_lines, linenum, error): """Check alternative keywords being used in boolean expressions. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line = clean_lines.elided[linenum] # Avoid preprocessor lines if Match(r'^\s*#', line): return # Last ditch effort to avoid multi-line comments. This will not help # if the comment started before the current line or ended after the # current line, but it catches most of the false positives. At least, # it provides a way to workaround this warning for people who use # multi-line comments in preprocessor macros. # # TODO(unknown): remove this once cpplint has better support for # multi-line comments. if line.find('/*') >= 0 or line.find('*/') >= 0: return for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line): error(filename, linenum, 'readability/alt_tokens', 2, 'Use operator %s instead of %s' % ( _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1))) def GetLineWidth(line): """Determines the width of the line in column positions. Args: line: A string, which may be a Unicode string. Returns: The width of the line in column positions, accounting for Unicode combining characters and wide characters. """ if isinstance(line, unicode): width = 0 for uc in unicodedata.normalize('NFC', line): if unicodedata.east_asian_width(uc) in ('W', 'F'): width += 2 elif not unicodedata.combining(uc): width += 1 return width else: return len(line) def CheckStyle(filename, clean_lines, linenum, file_extension, nesting_state, error): """Checks rules from the 'C++ style rules' section of cppguide.html. Most of these rules are hard to test (naming, comment style), but we do what we can. In particular we check for 2-space indents, line lengths, tab usage, spaces inside code, etc. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. file_extension: The extension (without the dot) of the filename. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: The function to call with any errors found. """ raw_lines = clean_lines.raw_lines line = raw_lines[linenum] if line.find('\t') != -1: error(filename, linenum, 'whitespace/tab', 1, 'Tab found; better to use spaces') # One or three blank spaces at the beginning of the line is weird; it's # hard to reconcile that with 2-space indents. # NOTE: here are the conditions rob pike used for his tests. Mine aren't # as sophisticated, but it may be worth becoming so: RLENGTH==initial_spaces # if(RLENGTH > 20) complain = 0; # if(match($0, " +(error|private|public|protected):")) complain = 0; # if(match(prev, "&& *$")) complain = 0; # if(match(prev, "\\|\\| *$")) complain = 0; # if(match(prev, "[\",=><] *$")) complain = 0; # if(match($0, " <<")) complain = 0; # if(match(prev, " +for \\(")) complain = 0; # if(prevodd && match(prevprev, " +for \\(")) complain = 0; initial_spaces = 0 cleansed_line = clean_lines.elided[linenum] while initial_spaces < len(line) and line[initial_spaces] == ' ': initial_spaces += 1 if line and line[-1].isspace(): error(filename, linenum, 'whitespace/end_of_line', 4, 'Line ends in whitespace. Consider deleting these extra spaces.') # There are certain situations we allow one space, notably for labels elif ((initial_spaces == 1 or initial_spaces == 3) and not Match(r'\s*\w+\s*:\s*$', cleansed_line)): error(filename, linenum, 'whitespace/indent', 3, 'Weird number of spaces at line-start. ' 'Are you using a 2-space indent?') # Labels should always be indented at least one space. elif not initial_spaces and line[:2] != '//' and Search(r'[^:]:\s*$', line): error(filename, linenum, 'whitespace/labels', 4, 'Labels should always be indented at least one space. ' 'If this is a member-initializer list in a constructor or ' 'the base class list in a class definition, the colon should ' 'be on the following line.') # Check if the line is a header guard. is_header_guard = False if file_extension == 'h': cppvar = GetHeaderGuardCPPVariable(filename) if (line.startswith('#ifndef %s' % cppvar) or line.startswith('#define %s' % cppvar) or line.startswith('#endif // %s' % cppvar)): is_header_guard = True # #include lines and header guards can be long, since there's no clean way to # split them. # # URLs can be long too. It's possible to split these, but it makes them # harder to cut&paste. # # The "$Id:...$" comment may also get very long without it being the # developers fault. if (not line.startswith('#include') and not is_header_guard and not Match(r'^\s*//.*http(s?)://\S*$', line) and not Match(r'^// \$Id:.*#[0-9]+ \$$', line)): line_width = GetLineWidth(line) if line_width > 100: error(filename, linenum, 'whitespace/line_length', 4, 'Lines should very rarely be longer than 100 characters') elif line_width > 80: error(filename, linenum, 'whitespace/line_length', 2, 'Lines should be <= 80 characters long') if (cleansed_line.count(';') > 1 and # for loops are allowed two ;'s (and may run over two lines). cleansed_line.find('for') == -1 and (GetPreviousNonBlankLine(clean_lines, linenum)[0].find('for') == -1 or GetPreviousNonBlankLine(clean_lines, linenum)[0].find(';') != -1) and # It's ok to have many commands in a switch case that fits in 1 line not ((cleansed_line.find('case ') != -1 or cleansed_line.find('default:') != -1) and cleansed_line.find('break;') != -1)): error(filename, linenum, 'whitespace/newline', 0, 'More than one command on the same line') # Some more style checks CheckBraces(filename, clean_lines, linenum, error) CheckEmptyLoopBody(filename, clean_lines, linenum, error) CheckAccess(filename, clean_lines, linenum, nesting_state, error) CheckSpacing(filename, clean_lines, linenum, nesting_state, error) CheckCheck(filename, clean_lines, linenum, error) CheckAltTokens(filename, clean_lines, linenum, error) classinfo = nesting_state.InnermostClass() if classinfo: CheckSectionSpacing(filename, clean_lines, classinfo, linenum, error) _RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"') _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$') # Matches the first component of a filename delimited by -s and _s. That is: # _RE_FIRST_COMPONENT.match('foo').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo-bar_baz.cc').group(0) == 'foo' # _RE_FIRST_COMPONENT.match('foo_bar-baz.cc').group(0) == 'foo' _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+') def _DropCommonSuffixes(filename): """Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCommonSuffixes('foo/foo_unusualinternal.h') 'foo/foo_unusualinternal' Args: filename: The input filename. Returns: The filename with the common suffix removed. """ for suffix in ('test.cc', 'regtest.cc', 'unittest.cc', 'inl.h', 'impl.h', 'internal.h'): if (filename.endswith(suffix) and len(filename) > len(suffix) and filename[-len(suffix) - 1] in ('-', '_')): return filename[:-len(suffix) - 1] return os.path.splitext(filename)[0] def _IsTestFilename(filename): """Determines if the given filename has a suffix that identifies it as a test. Args: filename: The input filename. Returns: True if 'filename' looks like a test, False otherwise. """ if (filename.endswith('_test.cc') or filename.endswith('_unittest.cc') or filename.endswith('_regtest.cc')): return True else: return False def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _XXX_HEADER constants. For example: >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'stdio.h', True) _C_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'string', True) _CPP_SYS_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/foo.h', False) _LIKELY_MY_HEADER >>> _ClassifyInclude(FileInfo('foo/foo_unknown_extension.cc'), ... 'bar/foo_other_ext.h', False) _POSSIBLE_MY_HEADER >>> _ClassifyInclude(FileInfo('foo/foo.cc'), 'foo/bar.h', False) _OTHER_HEADER """ # This is a list of all standard c++ header files, except # those already checked for above. is_stl_h = include in _STL_HEADERS is_cpp_h = is_stl_h or include in _CPP_HEADERS if is_system: if is_cpp_h: return _CPP_SYS_HEADER else: return _C_SYS_HEADER # If the target file and the include we're checking share a # basename when we drop common extensions, and the include # lives in . , then it's likely to be owned by the target file. target_dir, target_base = ( os.path.split(_DropCommonSuffixes(fileinfo.RepositoryName()))) include_dir, include_base = os.path.split(_DropCommonSuffixes(include)) if target_base == include_base and ( include_dir == target_dir or include_dir == os.path.normpath(target_dir + '/../public')): return _LIKELY_MY_HEADER # If the target and include share some initial basename # component, it's possible the target is implementing the # include, so it's allowed to be first, but we'll never # complain if it's not there. target_first_component = _RE_FIRST_COMPONENT.match(target_base) include_first_component = _RE_FIRST_COMPONENT.match(include_base) if (target_first_component and include_first_component and target_first_component.group(0) == include_first_component.group(0)): return _POSSIBLE_MY_HEADER return _OTHER_HEADER def CheckIncludeLine(filename, clean_lines, linenum, include_state, error): """Check rules that are applicable to #include lines. Strings on #include lines are NOT removed from elided line, to make certain tasks easier. However, to prevent false positives, checks applicable to #include lines in CheckLanguage must be put here. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. include_state: An _IncludeState instance in which the headers are inserted. error: The function to call with any errors found. """ fileinfo = FileInfo(filename) line = clean_lines.lines[linenum] # "include" should use the new style "foo/bar.h" instead of just "bar.h" if _RE_PATTERN_INCLUDE_NEW_STYLE.search(line): error(filename, linenum, 'build/include', 4, 'Include the directory when naming .h files') # we shouldn't include a file more than once. actually, there are a # handful of instances where doing so is okay, but in general it's # not. match = _RE_PATTERN_INCLUDE.search(line) if match: include = match.group(2) is_system = (match.group(1) == '<') if include in include_state: error(filename, linenum, 'build/include', 4, '"%s" already included at %s:%s' % (include, filename, include_state[include])) else: include_state[include] = linenum # We want to ensure that headers appear in the right order: # 1) for foo.cc, foo.h (preferred location) # 2) c system files # 3) cpp system files # 4) for foo.cc, foo.h (deprecated location) # 5) other google headers # # We classify each include statement as one of those 5 types # using a number of techniques. The include_state object keeps # track of the highest type seen, and complains if we see a # lower type after that. error_message = include_state.CheckNextIncludeOrder( _ClassifyInclude(fileinfo, include, is_system)) if error_message: error(filename, linenum, 'build/include_order', 4, '%s. Should be: %s.h, c system, c++ system, other.' % (error_message, fileinfo.BaseName())) if not include_state.IsInAlphabeticalOrder(include): error(filename, linenum, 'build/include_alpha', 4, 'Include "%s" not in alphabetical order' % include) # Look for any of the stream classes that are part of standard C++. match = _RE_PATTERN_INCLUDE.match(line) if match: include = match.group(2) if Match(r'(f|ind|io|i|o|parse|pf|stdio|str|)?stream$', include): # Many unit tests use cout, so we exempt them. if not _IsTestFilename(filename): error(filename, linenum, 'readability/streams', 3, 'Streams are highly discouraged.') def _GetTextInside(text, start_pattern): """Retrieves all the text between matching open and close parentheses. Given a string of lines and a regular expression string, retrieve all the text following the expression and between opening punctuation symbols like (, [, or {, and the matching close-punctuation symbol. This properly nested occurrences of the punctuations, so for the text like printf(a(), b(c())); a call to _GetTextInside(text, r'printf\(') will return 'a(), b(c())'. start_pattern must match string having an open punctuation symbol at the end. Args: text: The lines to extract text. Its comments and strings must be elided. It can be single line and can span multiple lines. start_pattern: The regexp string indicating where to start extracting the text. Returns: The extracted text. None if either the opening string or ending punctuation could not be found. """ # TODO(sugawarayu): Audit cpplint.py to see what places could be profitably # rewritten to use _GetTextInside (and use inferior regexp matching today). # Give opening punctuations to get the matching close-punctuations. matching_punctuation = {'(': ')', '{': '}', '[': ']'} closing_punctuation = set(matching_punctuation.itervalues()) # Find the position to start extracting text. match = re.search(start_pattern, text, re.M) if not match: # start_pattern not found in text. return None start_position = match.end(0) assert start_position > 0, ( 'start_pattern must ends with an opening punctuation.') assert text[start_position - 1] in matching_punctuation, ( 'start_pattern must ends with an opening punctuation.') # Stack of closing punctuations we expect to have in text after position. punctuation_stack = [matching_punctuation[text[start_position - 1]]] position = start_position while punctuation_stack and position < len(text): if text[position] == punctuation_stack[-1]: punctuation_stack.pop() elif text[position] in closing_punctuation: # A closing punctuation without matching opening punctuations. return None elif text[position] in matching_punctuation: punctuation_stack.append(matching_punctuation[text[position]]) position += 1 if punctuation_stack: # Opening punctuations left without matching close-punctuations. return None # punctuations match. return text[start_position:position - 1] def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, error): """Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. file_extension: The extension (without the dot) of the filename. include_state: An _IncludeState instance in which the headers are inserted. error: The function to call with any errors found. """ # If the line is empty or consists of entirely a comment, no need to # check it. line = clean_lines.elided[linenum] if not line: return match = _RE_PATTERN_INCLUDE.search(line) if match: CheckIncludeLine(filename, clean_lines, linenum, include_state, error) return # Create an extended_line, which is the concatenation of the current and # next lines, for more effective checking of code that may span more than one # line. if linenum + 1 < clean_lines.NumLines(): extended_line = line + clean_lines.elided[linenum + 1] else: extended_line = line # Make Windows paths like Unix. fullname = os.path.abspath(filename).replace('\\', '/') # TODO(unknown): figure out if they're using default arguments in fn proto. # Check for non-const references in functions. This is tricky because & # is also used to take the address of something. We allow <> for templates, # (ignoring whatever is between the braces) and : for classes. # These are complicated re's. They try to capture the following: # paren (for fn-prototype start), typename, &, varname. For the const # version, we're willing for const to be before typename or after # Don't check the implementation on same line. fnline = line.split('{', 1)[0] if (len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) > len(re.findall(r'\([^()]*\bconst\s+(?:typename\s+)?(?:struct\s+)?' r'(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) + len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+\s+const(\s?&|&\s?)[\w]+', fnline))): # We allow non-const references in a few standard places, like functions # called "swap()" or iostream operators like "<<" or ">>". We also filter # out for loops, which lint otherwise mistakenly thinks are functions. if not Search( r'(for|swap|Swap|operator[<>][<>])\s*\(\s*' r'(?:(?:typename\s*)?[\w:]|<.*>)+\s*&', fnline): error(filename, linenum, 'runtime/references', 2, 'Is this a non-const reference? ' 'If so, make const or use a pointer.') # Check to see if they're using an conversion function cast. # I just try to capture the most common basic types, though there are more. # Parameterless conversion functions, such as bool(), are allowed as they are # probably a member operator declaration or default constructor. match = Search( r'(\bnew\s+)?\b' # Grab 'new' operator, if it's there r'(int|float|double|bool|char|int32|uint32|int64|uint64)\([^)]', line) if match: # gMock methods are defined using some variant of MOCK_METHODx(name, type) # where type may be float(), int(string), etc. Without context they are # virtually indistinguishable from int(x) casts. Likewise, gMock's # MockCallback takes a template parameter of the form return_type(arg_type), # which looks much like the cast we're trying to detect. if (match.group(1) is None and # If new operator, then this isn't a cast not (Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(', line) or Match(r'^\s*MockCallback<.*>', line))): # Try a bit harder to catch gmock lines: the only place where # something looks like an old-style cast is where we declare the # return type of the mocked method, and the only time when we # are missing context is if MOCK_METHOD was split across # multiple lines (for example http://go/hrfhr ), so we only need # to check the previous line for MOCK_METHOD. if (linenum == 0 or not Match(r'^\s*MOCK_(CONST_)?METHOD\d+(_T)?\(\S+,\s*$', clean_lines.elided[linenum - 1])): error(filename, linenum, 'readability/casting', 4, 'Using deprecated casting style. ' 'Use static_cast<%s>(...) instead' % match.group(2)) CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'static_cast', r'\((int|float|double|bool|char|u?int(16|32|64))\)', error) # This doesn't catch all cases. Consider (const char * const)"hello". # # (char *) "foo" should always be a const_cast (reinterpret_cast won't # compile). if CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'const_cast', r'\((char\s?\*+\s?)\)\s*"', error): pass else: # Check pointer casts for other than string constants CheckCStyleCast(filename, linenum, line, clean_lines.raw_lines[linenum], 'reinterpret_cast', r'\((\w+\s?\*+\s?)\)', error) # In addition, we look for people taking the address of a cast. This # is dangerous -- casts can assign to temporaries, so the pointer doesn't # point where you think. if Search( r'(&\([^)]+\)[\w(])|(&(static|dynamic|reinterpret)_cast\b)', line): error(filename, linenum, 'runtime/casting', 4, ('Are you taking an address of a cast? ' 'This is dangerous: could be a temp var. ' 'Take the address before doing the cast, rather than after')) # Check for people declaring static/global STL strings at the top level. # This is dangerous because the C++ language does not guarantee that # globals with constructors are initialized before the first access. match = Match( r'((?:|static +)(?:|const +))string +([a-zA-Z0-9_:]+)\b(.*)', line) # Make sure it's not a function. # Function template specialization looks like: "string foo(...". # Class template definitions look like: "string Foo::Method(...". if match and not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)?\s*\(([^"]|$)', match.group(3)): error(filename, linenum, 'runtime/string', 4, 'For a static/global string constant, use a C style string instead: ' '"%schar %s[]".' % (match.group(1), match.group(2))) # Check that we're not using RTTI outside of testing code. if Search(r'\bdynamic_cast<', line) and not _IsTestFilename(filename): error(filename, linenum, 'runtime/rtti', 5, 'Do not use dynamic_cast<>. If you need to cast within a class ' "hierarchy, use static_cast<> to upcast. Google doesn't support " 'RTTI.') if Search(r'\b([A-Za-z0-9_]*_)\(\1\)', line): error(filename, linenum, 'runtime/init', 4, 'You seem to be initializing a member variable with itself.') if file_extension == 'h': # TODO(unknown): check that 1-arg constructors are explicit. # How to tell it's a constructor? # (handled in CheckForNonStandardConstructs for now) # TODO(unknown): check that classes have DISALLOW_EVIL_CONSTRUCTORS # (level 1 error) pass # Check if people are using the verboten C basic types. The only exception # we regularly allow is "unsigned short port" for port. if Search(r'\bshort port\b', line): if not Search(r'\bunsigned short port\b', line): error(filename, linenum, 'runtime/int', 4, 'Use "unsigned short" for ports, not "short"') else: match = Search(r'\b(short|long(?! +double)|long long)\b', line) if match: error(filename, linenum, 'runtime/int', 4, 'Use int16/int64/etc, rather than the C type %s' % match.group(1)) # When snprintf is used, the second argument shouldn't be a literal. match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line) if match and match.group(2) != '0': # If 2nd arg is zero, snprintf is used to calculate size. error(filename, linenum, 'runtime/printf', 3, 'If you can, use sizeof(%s) instead of %s as the 2nd arg ' 'to snprintf.' % (match.group(1), match.group(2))) # Check if some verboten C functions are being used. if Search(r'\bsprintf\b', line): error(filename, linenum, 'runtime/printf', 5, 'Never use sprintf. Use snprintf instead.') match = Search(r'\b(strcpy|strcat)\b', line) if match: error(filename, linenum, 'runtime/printf', 4, 'Almost always, snprintf is better than %s' % match.group(1)) if Search(r'\bsscanf\b', line): error(filename, linenum, 'runtime/printf', 1, 'sscanf can be ok, but is slow and can overflow buffers.') # Check if some verboten operator overloading is going on # TODO(unknown): catch out-of-line unary operator&: # class X {}; # int operator&(const X& x) { return 42; } // unary operator& # The trick is it's hard to tell apart from binary operator&: # class Y { int operator&(const Y& x) { return 23; } }; // binary operator& if Search(r'\boperator\s*&\s*\(\s*\)', line): error(filename, linenum, 'runtime/operator', 4, 'Unary operator& is dangerous. Do not use it.') # Check for suspicious usage of "if" like # } if (a == b) { if Search(r'\}\s*if\s*\(', line): error(filename, linenum, 'readability/braces', 4, 'Did you mean "else if"? If not, start a new line for "if".') # Check for potential format string bugs like printf(foo). # We constrain the pattern not to pick things like DocidForPrintf(foo). # Not perfect but it can catch printf(foo.c_str()) and printf(foo->c_str()) # TODO(sugawarayu): Catch the following case. Need to change the calling # convention of the whole function to process multiple line to handle it. # printf( # boy_this_is_a_really_long_variable_that_cannot_fit_on_the_prev_line); printf_args = _GetTextInside(line, r'(?i)\b(string)?printf\s*\(') if printf_args: match = Match(r'([\w.\->()]+)$', printf_args) if match and match.group(1) != '__VA_ARGS__': function_name = re.search(r'\b((?:string)?printf)\s*\(', line, re.I).group(1) error(filename, linenum, 'runtime/printf', 4, 'Potential format string bug. Do %s("%%s", %s) instead.' % (function_name, match.group(1))) # Check for potential memset bugs like memset(buf, sizeof(buf), 0). match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line) if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)): error(filename, linenum, 'runtime/memset', 4, 'Did you mean "memset(%s, 0, %s)"?' % (match.group(1), match.group(2))) if Search(r'\busing namespace\b', line): error(filename, linenum, 'build/namespaces', 5, 'Do not use namespace using-directives. ' 'Use using-declarations instead.') # Detect variable-length arrays. match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line) if (match and match.group(2) != 'return' and match.group(2) != 'delete' and match.group(3).find(']') == -1): # Split the size using space and arithmetic operators as delimiters. # If any of the resulting tokens are not compile time constants then # report the error. tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3)) is_const = True skip_next = False for tok in tokens: if skip_next: skip_next = False continue if Search(r'sizeof\(.+\)', tok): continue if Search(r'arraysize\(\w+\)', tok): continue tok = tok.lstrip('(') tok = tok.rstrip(')') if not tok: continue if Match(r'\d+', tok): continue if Match(r'0[xX][0-9a-fA-F]+', tok): continue if Match(r'k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?k[A-Z0-9]\w*', tok): continue if Match(r'(.+::)?[A-Z][A-Z0-9_]*', tok): continue # A catch all for tricky sizeof cases, including 'sizeof expression', # 'sizeof(*type)', 'sizeof(const type)', 'sizeof(struct StructName)' # requires skipping the next token because we split on ' ' and '*'. if tok.startswith('sizeof'): skip_next = True continue is_const = False break if not is_const: error(filename, linenum, 'runtime/arrays', 1, 'Do not use variable-length arrays. Use an appropriately named ' "('k' followed by CamelCase) compile-time constant for the size.") # If DISALLOW_EVIL_CONSTRUCTORS, DISALLOW_COPY_AND_ASSIGN, or # DISALLOW_IMPLICIT_CONSTRUCTORS is present, then it should be the last thing # in the class declaration. match = Match( (r'\s*' r'(DISALLOW_(EVIL_CONSTRUCTORS|COPY_AND_ASSIGN|IMPLICIT_CONSTRUCTORS))' r'\(.*\);$'), line) if match and linenum + 1 < clean_lines.NumLines(): next_line = clean_lines.elided[linenum + 1] # We allow some, but not all, declarations of variables to be present # in the statement that defines the class. The [\w\*,\s]* fragment of # the regular expression below allows users to declare instances of # the class or pointers to instances, but not less common types such # as function pointers or arrays. It's a tradeoff between allowing # reasonable code and avoiding trying to parse more C++ using regexps. if not Search(r'^\s*}[\w\*,\s]*;', next_line): error(filename, linenum, 'readability/constructors', 3, match.group(1) + ' should be the last thing in the class') # Check for use of unnamed namespaces in header files. Registration # macros are typically OK, so we allow use of "namespace {" on lines # that end with backslashes. if (file_extension == 'h' and Search(r'\bnamespace\s*{', line) and line[-1] != '\\'): error(filename, linenum, 'build/namespaces', 4, 'Do not use unnamed namespaces in header files. See ' 'http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Namespaces' ' for more information.') def CheckCStyleCast(filename, linenum, line, raw_line, cast_type, pattern, error): """Checks for a C-style cast by looking for the pattern. This also handles sizeof(type) warnings, due to similarity of content. Args: filename: The name of the current file. linenum: The number of the line to check. line: The line of code to check. raw_line: The raw line of code to check, with comments. cast_type: The string for the C++ cast to recommend. This is either reinterpret_cast, static_cast, or const_cast, depending. pattern: The regular expression used to find C-style casts. error: The function to call with any errors found. Returns: True if an error was emitted. False otherwise. """ match = Search(pattern, line) if not match: return False # e.g., sizeof(int) sizeof_match = Match(r'.*sizeof\s*$', line[0:match.start(1) - 1]) if sizeof_match: error(filename, linenum, 'runtime/sizeof', 1, 'Using sizeof(type). Use sizeof(varname) instead if possible') return True # operator++(int) and operator--(int) if (line[0:match.start(1) - 1].endswith(' operator++') or line[0:match.start(1) - 1].endswith(' operator--')): return False remainder = line[match.end(0):] # The close paren is for function pointers as arguments to a function. # eg, void foo(void (*bar)(int)); # The semicolon check is a more basic function check; also possibly a # function pointer typedef. # eg, void foo(int); or void foo(int) const; # The equals check is for function pointer assignment. # eg, void *(*foo)(int) = ... # The > is for MockCallback<...> ... # # Right now, this will only catch cases where there's a single argument, and # it's unnamed. It should probably be expanded to check for multiple # arguments with some unnamed. function_match = Match(r'\s*(\)|=|(const)?\s*(;|\{|throw\(\)|>))', remainder) if function_match: if (not function_match.group(3) or function_match.group(3) == ';' or ('MockCallback<' not in raw_line and '/*' not in raw_line)): error(filename, linenum, 'readability/function', 3, 'All parameters should be named in a function') return True # At this point, all that should be left is actual casts. error(filename, linenum, 'readability/casting', 4, 'Using C-style cast. Use %s<%s>(...) instead' % (cast_type, match.group(1))) return True _HEADERS_CONTAINING_TEMPLATES = ( ('', ('deque',)), ('', ('unary_function', 'binary_function', 'plus', 'minus', 'multiplies', 'divides', 'modulus', 'negate', 'equal_to', 'not_equal_to', 'greater', 'less', 'greater_equal', 'less_equal', 'logical_and', 'logical_or', 'logical_not', 'unary_negate', 'not1', 'binary_negate', 'not2', 'bind1st', 'bind2nd', 'pointer_to_unary_function', 'pointer_to_binary_function', 'ptr_fun', 'mem_fun_t', 'mem_fun', 'mem_fun1_t', 'mem_fun1_ref_t', 'mem_fun_ref_t', 'const_mem_fun_t', 'const_mem_fun1_t', 'const_mem_fun_ref_t', 'const_mem_fun1_ref_t', 'mem_fun_ref', )), ('', ('numeric_limits',)), ('', ('list',)), ('', ('map', 'multimap',)), ('', ('allocator',)), ('', ('queue', 'priority_queue',)), ('', ('set', 'multiset',)), ('', ('stack',)), ('', ('char_traits', 'basic_string',)), ('', ('pair',)), ('', ('vector',)), # gcc extensions. # Note: std::hash is their hash, ::hash is our hash ('', ('hash_map', 'hash_multimap',)), ('', ('hash_set', 'hash_multiset',)), ('', ('slist',)), ) _RE_PATTERN_STRING = re.compile(r'\bstring\b') _re_pattern_algorithm_header = [] for _template in ('copy', 'max', 'min', 'min_element', 'sort', 'swap', 'transform'): # Match max(..., ...), max(..., ...), but not foo->max, foo.max or # type::max(). _re_pattern_algorithm_header.append( (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'), _template, '')) _re_pattern_templates = [] for _header, _templates in _HEADERS_CONTAINING_TEMPLATES: for _template in _templates: _re_pattern_templates.append( (re.compile(r'(\<|\b)' + _template + r'\s*\<'), _template + '<>', _header)) def FilesBelongToSameModule(filename_cc, filename_h): """Check if these two filenames belong to the same module. The concept of a 'module' here is a as follows: foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the same 'module' if they are in the same directory. some/path/public/xyzzy and some/path/internal/xyzzy are also considered to belong to the same module here. If the filename_cc contains a longer path than the filename_h, for example, '/absolute/path/to/base/sysinfo.cc', and this file would include 'base/sysinfo.h', this function also produces the prefix needed to open the header. This is used by the caller of this function to more robustly open the header file. We don't have access to the real include paths in this context, so we need this guesswork here. Known bugs: tools/base/bar.cc and base/bar.h belong to the same module according to this implementation. Because of this, this function gives some false positives. This should be sufficiently rare in practice. Args: filename_cc: is the path for the .cc file filename_h: is the path for the header path Returns: Tuple with a bool and a string: bool: True if filename_cc and filename_h belong to the same module. string: the additional prefix needed to open the header file. """ if not filename_cc.endswith('.cc'): return (False, '') filename_cc = filename_cc[:-len('.cc')] if filename_cc.endswith('_unittest'): filename_cc = filename_cc[:-len('_unittest')] elif filename_cc.endswith('_test'): filename_cc = filename_cc[:-len('_test')] filename_cc = filename_cc.replace('/public/', '/') filename_cc = filename_cc.replace('/internal/', '/') if not filename_h.endswith('.h'): return (False, '') filename_h = filename_h[:-len('.h')] if filename_h.endswith('-inl'): filename_h = filename_h[:-len('-inl')] filename_h = filename_h.replace('/public/', '/') filename_h = filename_h.replace('/internal/', '/') files_belong_to_same_module = filename_cc.endswith(filename_h) common_path = '' if files_belong_to_same_module: common_path = filename_cc[:-len(filename_h)] return files_belong_to_same_module, common_path def UpdateIncludeState(filename, include_state, io=codecs): """Fill up the include_state with new includes found from the file. Args: filename: the name of the header to read. include_state: an _IncludeState instance in which the headers are inserted. io: The io factory to use to read the file. Provided for testability. Returns: True if a header was succesfully added. False otherwise. """ headerfile = None try: headerfile = io.open(filename, 'r', 'utf8', 'replace') except IOError: return False linenum = 0 for line in headerfile: linenum += 1 clean_line = CleanseComments(line) match = _RE_PATTERN_INCLUDE.search(clean_line) if match: include = match.group(2) # The value formatting is cute, but not really used right now. # What matters here is that the key is in include_state. include_state.setdefault(include, '%s:%d' % (filename, linenum)) return True def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, io=codecs): """Reports for missing stl includes. This function will output warnings to make sure you are including the headers necessary for the stl containers and functions that you use. We only give one reason to include a header. For example, if you use both equal_to<> and less<> in a .h file, only one (the latter in the file) of these will be reported as a reason to include the . Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. include_state: An _IncludeState instance. error: The function to call with any errors found. io: The IO factory to use to read the header file. Provided for unittest injection. """ required = {} # A map of header name to linenumber and the template entity. # Example of required: { '': (1219, 'less<>') } for linenum in xrange(clean_lines.NumLines()): line = clean_lines.elided[linenum] if not line or line[0] == '#': continue # String is special -- it is a non-templatized type in STL. matched = _RE_PATTERN_STRING.search(line) if matched: # Don't warn about strings in non-STL namespaces: # (We check only the first match per line; good enough.) prefix = line[:matched.start()] if prefix.endswith('std::') or not prefix.endswith('::'): required[''] = (linenum, 'string') for pattern, template, header in _re_pattern_algorithm_header: if pattern.search(line): required[header] = (linenum, template) # The following function is just a speed up, no semantics are changed. if not '<' in line: # Reduces the cpu time usage by skipping lines. continue for pattern, template, header in _re_pattern_templates: if pattern.search(line): required[header] = (linenum, template) # The policy is that if you #include something in foo.h you don't need to # include it again in foo.cc. Here, we will look at possible includes. # Let's copy the include_state so it is only messed up within this function. include_state = include_state.copy() # Did we find the header for this file (if any) and succesfully load it? header_found = False # Use the absolute path so that matching works properly. abs_filename = FileInfo(filename).FullName() # For Emacs's flymake. # If cpplint is invoked from Emacs's flymake, a temporary file is generated # by flymake and that file name might end with '_flymake.cc'. In that case, # restore original file name here so that the corresponding header file can be # found. # e.g. If the file name is 'foo_flymake.cc', we should search for 'foo.h' # instead of 'foo_flymake.h' abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename) # include_state is modified during iteration, so we iterate over a copy of # the keys. header_keys = include_state.keys() for header in header_keys: (same_module, common_path) = FilesBelongToSameModule(abs_filename, header) fullpath = common_path + header if same_module and UpdateIncludeState(fullpath, include_state, io): header_found = True # If we can't find the header file for a .cc, assume it's because we don't # know where to look. In that case we'll give up as we're not sure they # didn't include it in the .h file. # TODO(unknown): Do a better job of finding .h files so we are confident that # not having the .h file means there isn't one. if filename.endswith('.cc') and not header_found: return # All the lines have been processed, report the errors found. for required_header_unstripped in required: template = required[required_header_unstripped][1] if required_header_unstripped.strip('<>"') not in include_state: error(filename, required[required_header_unstripped][0], 'build/include_what_you_use', 4, 'Add #include ' + required_header_unstripped + ' for ' + template) _RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<') def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++0x mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ raw = clean_lines.raw_lines line = raw[linenum] match = _RE_PATTERN_EXPLICIT_MAKEPAIR.search(line) if match: error(filename, linenum, 'build/explicit_make_pair', 4, # 4 = high confidence 'For C++11-compatibility, omit template arguments from make_pair' ' OR use pair directly OR if appropriate, construct a pair directly') def ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions=[]): """Processes a single line in the file. Args: filename: Filename of the file that is being processed. file_extension: The extension (dot not included) of the file. clean_lines: An array of strings, each representing a line of the file, with comments stripped. line: Number of line being processed. include_state: An _IncludeState instance in which the headers are inserted. function_state: A _FunctionState instance which counts function lines, etc. nesting_state: A _NestingState instance which maintains information about the current stack of nested blocks being parsed. error: A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ raw_lines = clean_lines.raw_lines ParseNolintSuppressions(filename, raw_lines[line], line, error) nesting_state.Update(filename, clean_lines, line, error) if nesting_state.stack and nesting_state.stack[-1].inline_asm != _NO_ASM: return CheckForFunctionLengths(filename, clean_lines, line, function_state, error) CheckForMultilineCommentsAndStrings(filename, clean_lines, line, error) CheckStyle(filename, clean_lines, line, file_extension, nesting_state, error) CheckLanguage(filename, clean_lines, line, file_extension, include_state, error) CheckForNonStandardConstructs(filename, clean_lines, line, nesting_state, error) CheckPosixThreading(filename, clean_lines, line, error) CheckInvalidIncrement(filename, clean_lines, line, error) CheckMakePairUsesDeduction(filename, clean_lines, line, error) for check_fn in extra_check_functions: check_fn(filename, clean_lines, line, error) def ProcessFileData(filename, file_extension, lines, error, extra_check_functions=[]): """Performs lint checks and reports any errors to the given error function. Args: filename: Filename of the file that is being processed. file_extension: The extension (dot not included) of the file. lines: An array of strings, each representing a line of the file, with the last element being empty if the file is terminated with a newline. error: A callable to which errors are reported, which takes 4 arguments: filename, line number, error level, and message extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ lines = (['// marker so line numbers and indices both start at 1'] + lines + ['// marker so line numbers end in a known way']) include_state = _IncludeState() function_state = _FunctionState() nesting_state = _NestingState() ResetNolintSuppressions() CheckForCopyright(filename, lines, error) if file_extension == 'h': CheckForHeaderGuard(filename, lines, error) RemoveMultiLineComments(filename, lines, error) clean_lines = CleansedLines(lines) for line in xrange(clean_lines.NumLines()): ProcessLine(filename, file_extension, clean_lines, line, include_state, function_state, nesting_state, error, extra_check_functions) nesting_state.CheckClassFinished(filename, error) CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error) # We check here rather than inside ProcessLine so that we see raw # lines rather than "cleaned" lines. CheckForUnicodeReplacementCharacters(filename, lines, error) CheckForNewlineAtEOF(filename, lines, error) def ProcessFile(filename, vlevel, extra_check_functions=[]): """Does google-lint on a single file. Args: filename: The name of the file to parse. vlevel: The level of errors to report. Every error of confidence >= verbose_level will be reported. 0 is a good default. extra_check_functions: An array of additional check functions that will be run on each source line. Each function takes 4 arguments: filename, clean_lines, line, error """ _SetVerboseLevel(vlevel) try: # Support the UNIX convention of using "-" for stdin. Note that # we are not opening the file with universal newline support # (which codecs doesn't support anyway), so the resulting lines do # contain trailing '\r' characters if we are reading a file that # has CRLF endings. # If after the split a trailing '\r' is present, it is removed # below. If it is not expected to be present (i.e. os.linesep != # '\r\n' as in Windows), a warning is issued below if this file # is processed. if filename == '-': lines = codecs.StreamReaderWriter(sys.stdin, codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace').read().split('\n') else: lines = codecs.open(filename, 'r', 'utf8', 'replace').read().split('\n') carriage_return_found = False # Remove trailing '\r'. for linenum in range(len(lines)): if lines[linenum].endswith('\r'): lines[linenum] = lines[linenum].rstrip('\r') carriage_return_found = True except IOError: sys.stderr.write( "Skipping input '%s': Can't open for reading\n" % filename) return # Note, if no dot is found, this will give the entire filename as the ext. file_extension = filename[filename.rfind('.') + 1:] # When reading from stdin, the extension is unknown, so no cpplint tests # should rely on the extension. if filename != '-' and file_extension not in ('cc', 'h', 'cpp', 'hpp'): sys.stderr.write('Ignoring %s; not a .cc or .h file\n' % filename) else: ProcessFileData(filename, file_extension, lines, Error, extra_check_functions) if carriage_return_found and os.linesep != '\r\n': # Use 0 for linenum since outputting only one error for potentially # several lines. Error(filename, 0, 'whitespace/newline', 1, 'One or more unexpected \\r (^M) found;' 'better to use only a \\n') sys.stderr.write('Done processing %s\n' % filename) def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message. """ sys.stderr.write(_USAGE) if message: sys.exit('\nFATAL ERROR: ' + message) else: sys.exit(1) def PrintCategories(): """Prints a list of all the error-categories used by error messages. These are the categories used to filter messages via --filter. """ sys.stderr.write(''.join(' %s\n' % cat for cat in _ERROR_CATEGORIES)) sys.exit(0) def ParseArguments(args): """Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint. """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose=', 'counting=', 'filter=', 'root=']) except getopt.GetoptError: PrintUsage('Invalid arguments.') verbosity = _VerboseLevel() output_format = _OutputFormat() filters = '' counting_style = '' for (opt, val) in opts: if opt == '--help': PrintUsage(None) elif opt == '--output': if not val in ('emacs', 'vs7', 'eclipse'): PrintUsage('The only allowed output formats are emacs, vs7 and eclipse.') output_format = val elif opt == '--verbose': verbosity = int(val) elif opt == '--filter': filters = val if not filters: PrintCategories() elif opt == '--counting': if val not in ('total', 'toplevel', 'detailed'): PrintUsage('Valid counting options are total, toplevel, and detailed') counting_style = val elif opt == '--root': global _root _root = val if not filenames: PrintUsage('No files were specified.') _SetOutputFormat(output_format) _SetVerboseLevel(verbosity) _SetFilters(filters) _SetCountingStyle(counting_style) return filenames def main(): filenames = ParseArguments(sys.argv[1:]) # Change stderr to write with replacement characters so we don't die # if we try to print something containing non-ASCII characters. sys.stderr = codecs.StreamReaderWriter(sys.stderr, codecs.getreader('utf8'), codecs.getwriter('utf8'), 'replace') _cpplint_state.ResetErrorCounts() for filename in filenames: ProcessFile(filename, _cpplint_state.verbose_level) _cpplint_state.PrintErrorCounts() sys.exit(_cpplint_state.error_count > 0) if __name__ == '__main__': main() sipp-3.5.1/CHANGES.md0000644000175000017500000000444612672462535013143 0ustar vsevavsevaBugs fixed in 3.5.1 =================== * Fix qop-value in authorization Digest. It can only hold a single value (auth, auth-int, ...) and does not take double quotes, in contrast to the challenge. Some servers returned a 400 upon receiving this. (Issue #191, reported by @artlov.) * Fix compile error on Cygwin. (Issue #193, reported by @Gankarloo.) Features added in 3.5.0 ======================= * Clean up source code, fix typo's, alter warning and error messages, fix pedantic coding style. Add gtest framework and tests. Add regression tests. Fix and improve build scripts (see also: `build.sh`). * Use better timing with `clock_gettime` (or `clock_get_time` on OSX). * Don't complain about the dummy variable `_` being used only once. * Ignore 4x NUL keepalive (next to ignoring the CRLF CRLF keepalive). * Add `[date]` keyword. * Add `-trace_screen` option to log screen output in a file. * Add `-rate_increase` option to increase load periodically. * Add `-callid_slash_ign` to disable the magic triple slash behaviour.a * Alter `-aa` to also reply to OPTIONS. * Allow replaying pcaps with `LINUX_SLL`, `EN10MB` and 802.11 (and ratiotap) link layer types. Handle 802.1Q tagged frames. * Allow starting SIPp without a TERM setting (a "working" terminal). * Allow m=image in SDP to pcapplay faxes/images. * `` and friends: - If the argument is not an absolute path, the pcap is searched next to the scenario, before falling back to checking the current working directory. - The argument may be enclosed in brackets, in which case it is interpreted as a keyword value; set through the `-key` command line option. Example: `` with option `-key file1 /path/to/pcap`. Bugs fixed in 3.5.0 =================== * Start SDP search in body instead of in header. Fix IPv6 media address in SDP. * Allow single CR and single LF in SDP. * Don't confuse cnonce with nonce, improve other auth parsing. * Don't abort SIPp if the To header is missing. * Fixes to XML parser; improve `get_peer_tag` behaviour. * Fix jump recursion crashes. * Fix a few (potential) memory leaks and dangerous code. * Remove a few autogenerated files from tree (configure, manpage). * Fix digest calculation when `qop` is given. 3.4.1 ===== * Not documented here. sipp-3.5.1/config.guess0000755000175000017500000013036112672463320014056 0ustar vsevavseva#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: sipp-3.5.1/README.md0000644000175000017500000000574012672462535013026 0ustar vsevavseva Travis Build Status Coverity Scan Build Status SIPp - a SIP protocol test tool Copyright (C) 2003-2016 - The Authors This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see [http://www.gnu.org/licenses/](http://www.gnu.org/licenses/). # Building This is the SIPp package. Please refer to the [webpage](http://sipp.sourceforge.net/) for details and documentation. Normally, you should be able to build SIPp by using the provided build script: `build.sh`. This: * checks out the gtest submodule * generates autotools files * runs configure * builds and runs the test suite * builds SIPp `build.sh` passes its arguments through to the configure script, so you can enable SSL, PCAP and SCTP support by calling `./build.sh --with-pcap --with-sctp --with-openssl` or `./build.sh --full` to enable all optional features. # Support I try and be responsive to issues raised on Github, and there's [a reasonably active mailing list](https://lists.sourceforge.net/lists/listinfo/sipp-users). # Making a release * Update CHANGES.md. Tag release. * Download zip, `autoreconf -vif`, copy sipp.1, copy include/version.h. * Create tgz. Upload to github as "binary". # Contributing SIPp is free software, under the terms of the GPL licence (see the LICENCE.txt file for details). You can contribute to the development of SIPp and use the standard Github fork/pull request method to integrate your changes integrate your changes. If you make changes in SIPp, *PLEASE* follow a few coding rules: - SIPp uses GNU autotools, so changes to the build process should be done by editing configure.ac and Makefile.am. Then regenerate the files with `autoreconf -ivf`. (You will need your distribution's `autotools` and `autoconf-archive` packages installed for this.) - Please stay conformant with the current indentation style (4 spaces indent, standard Emacs-like indentation). Examples: ``` if (condition) { /* "{" even if only one instruction */ f(); /* 4 space indents */ } else { char* p = ptr; /* C++-style pointer declaration placement */ g(p); } ``` - If possible, check your changes can be compiled on: - Linux, - Cygwin, - Mac OS X, - FreeBSD. Thanks, Rob Day sipp-3.5.1/m4/0000755000175000017500000000000012672462535012061 5ustar vsevavsevasipp-3.5.1/m4/ax_have_epoll.m40000644000175000017500000000705612672462535015141 0ustar vsevavseva# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 AC_DEFUN([AX_HAVE_EPOLL], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface]) AC_CACHE_VAL([ax_cv_have_epoll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0);])], [ax_cv_have_epoll=yes], [ax_cv_have_epoll=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension]) AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # error linux kernel version is too old to have epoll_pwait # endif #endif #include #include ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])], [ax_cv_have_epoll_pwait=yes], [ax_cv_have_epoll_pwait=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl sipp-3.5.1/m4/ax_check_compile_flag.m40000644000175000017500000000640212672462535016573 0ustar vsevavseva# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ])dnl AX_CHECK_COMPILE_FLAGS sipp-3.5.1/m4/am_git_version.m40000644000175000017500000000011412672462535015324 0ustar vsevavsevaAC_SUBST_FILE([AM_GIT_VERSION]) AM_GIT_VERSION=$srcdir/m4/am_git_version.mh sipp-3.5.1/m4/ax_cxx_compile_stdcxx_11.m40000644000175000017500000001321412672462535017224 0ustar vsevavseva# ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } ]]) AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl m4_if([$1], [], [], [$1], [ext], [], [$1], [noext], [], [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], [$2], [optional], [ax_cxx_compile_cxx11_required=false], [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports C++11 features by default, ax_cv_cxx_compile_cxx11, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [ax_cv_cxx_compile_cxx11=yes], [ax_cv_cxx_compile_cxx11=no])]) if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi m4_if([$1], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) m4_if([$1], [ext], [], [dnl if test x$ac_success = xno; then dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf for switch in -std=c++11 -std=c++0x +std=c++11; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) fi else if test x$ac_success = xno; then HAVE_CXX11=0 AC_MSG_NOTICE([No compiler with C++11 support was found]) else HAVE_CXX11=1 AC_DEFINE(HAVE_CXX11,1, [define if the compiler supports basic C++11 syntax]) fi AC_SUBST(HAVE_CXX11) fi ]) sipp-3.5.1/m4/am_git_version.mh0000644000175000017500000000054712672462535015422 0ustar vsevavsevagit_version = $(shell git describe --tags --always 2>/dev/null || cat .version 2>/dev/null) file_version = $(shell cat .version 2>/dev/null) ifneq ($(git_version),$(file_version)) $(shell echo 'Updating include/version.h' >&2) $(shell echo '#define SIPP_VERSION "$(git_version)"' >include/version.h) $(shell echo '$(git_version)' >.version) endif sipp-3.5.1/m4/ax_config_feature.m40000644000175000017500000001237212672462535016000 0ustar vsevavseva# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 AC_DEFUN([AX_CONFIG_FEATURE],[ dnl m4_pushdef([FEATURE], patsubst([$1], -, _))dnl AC_ARG_ENABLE([$1],AS_HELP_STRING([--enable-$1],[$2]),[ case "${enableval}" in yes) ax_config_feature_[]FEATURE[]="yes" ;; no) ax_config_feature_[]FEATURE[]="no" ;; *) AC_MSG_ERROR([bad value ${enableval} for feature --$1]) ;; esac ]) AS_IF([test "$ax_config_feature_[]FEATURE[]" = yes],[ dnl AC_DEFINE([$3]) $5 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is enabled]) ]) ],[ dnl $6 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is disabled]) ]) ]) AH_TEMPLATE([$3],[$4]) m4_popdef([FEATURE])dnl ]) dnl Feature global AC_DEFUN([AX_CONFIG_FEATURE_VERBOSE],[ dnl ax_config_feature_verbose=yes ]) dnl Feature global AC_DEFUN([AX_CONFIG_FEATURE_SILENT],[ dnl ax_config_feature_verbose=no ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_ENABLED], [ ax_config_feature_[]FEATURE[]_default=yes ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_DISABLED], [ ax_config_feature_[]FEATURE[]_default=no ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_ENABLE],[ dnl ax_config_feature_[]patsubst([$1], -, _)[]=yes ]) dnl Feature specific AC_DEFUN([AX_CONFIG_FEATURE_DISABLE],[ dnl ax_config_feature_[]patsubst([$1], -, _)[]=no ]) sipp-3.5.1/aclocal.m40000644000175000017500000011164212672463316013404 0ustar vsevavseva# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR sipp-3.5.1/LICENSE.txt0000644000175000017500000004326212672462535013373 0ustar vsevavsevaSIPp as a whole is licensed under the GNU General Public License, version 2 or any later version (copy below). send_packets.c, send_packets.h, md5.c and md5.h have separate copyright licenses, which apply only to those files. The following license applies to send_packets.c and send_packets.h only: * Copyright (c) 2001-2004 Aaron Turner. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright owners nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The following license applies to md5.c and md5.h only: /* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ All other parts of SIPp are under the following license (or, at your option, any later version of the GNU GPL): GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS sipp-3.5.1/test-driver0000755000175000017500000000761112672463320013735 0ustar vsevavseva#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2012-06-27.10; # UTC # Copyright (C) 2011-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then estatus=1 fi case $estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sipp-3.5.1/Makefile.am0000644000175000017500000000674412672462535013610 0ustar vsevavseva@AM_GIT_VERSION@ bin_PROGRAMS = sipp TESTS = sipp_unittest check_PROGRAMS = $(TESTS) AM_CFLAGS=-I$(srcdir)/include -Wall -pedantic AM_CXXFLAGS=-I$(srcdir)/include -Wall -pedantic CLEANFILES = EXTRA_DIST = \ $(srcdir)/src/fortune.cpp \ $(srcdir)/LICENSE.txt \ $(srcdir)/README.md \ $(srcdir)/THANKS \ $(srcdir)/sipp.dtd \ $(srcdir)/cpplint.py if HAVE_OPENSSL DEFS += -DUSE_OPENSSL ssl_incl = \ include/sslcommon.h ssl_SOURCES = \ $(ssl_incl) \ src/sslinit.c \ src/sslthreadsafe.c endif if HAVE_PCAP DEFS += -DPCAPPLAY pcap_incl = \ include/prepare_pcap.h \ include/send_packets.h pcap_SOURCES = \ $(pcap_incl) \ src/prepare_pcap.c \ src/send_packets.c endif if HAVE_RTP DEFS += -DRTP_STREAM rtp_SOURCES = \ src/rtpstream.cpp \ include/rtpstream.hpp endif if HAVE_SCTP DEFS += -DUSE_SCTP endif if HAVE_GSL DEFS += -DHAVE_GSL endif if HAVE_EPOLL DEFS += -DHAVE_EPOLL endif common_incl = \ include/comp.h \ include/infile.hpp \ include/listener.hpp \ include/logger.hpp \ include/md5.h \ include/message.hpp \ include/milenage.h \ include/call_generation_task.hpp \ include/ratetask.hpp \ include/reporttask.hpp \ include/rijndael.h \ include/scenario.hpp \ include/sip_parser.hpp \ include/screen.hpp \ include/socket.hpp \ include/socketowner.hpp \ include/stat.hpp \ include/strings.hpp \ include/task.hpp \ include/time.hpp \ include/variables.hpp \ include/watchdog.hpp \ include/xp_parser.h \ include/actions.hpp \ include/call.hpp \ include/auth.hpp \ include/deadcall.hpp common_SOURCES = \ src/actions.cpp \ src/auth.cpp \ src/comp.c \ src/call.cpp \ src/deadcall.cpp \ src/infile.cpp \ src/listener.cpp \ src/logger.cpp \ src/md5.c \ src/message.cpp \ src/milenage.c \ src/call_generation_task.cpp \ src/ratetask.cpp \ src/reporttask.cpp \ src/rijndael.c \ src/scenario.cpp \ src/sip_parser.cpp \ src/screen.cpp \ src/socket.cpp \ src/socketowner.cpp \ src/stat.cpp \ src/strings.cpp \ src/task.cpp \ src/time.cpp \ src/variables.cpp \ src/watchdog.cpp \ src/xp_parser.c \ $(common_incl) \ $(ssl_SOURCES) \ $(pcap_SOURCES) \ $(rtp_SOURCES) sipp_SOURCES = \ $(common_SOURCES) \ src/sipp.cpp \ include/sipp.hpp sipp_CFLAGS = $(AM_CFLAGS) @GSL_CFLAGS@ sipp_CXXFLAGS = $(AM_CXXFLAGS) @GSL_CXXFLAGS@ sipp_LDADD = @LIBOBJS@ @GSL_LIBS@ # call.cpp and sipp.cpp use version.h; see AM_GIT_VERSION. src/call.cpp: include/version.h src/sipp.cpp: include/version.h gtest_SOURCES = \ gtest/src/gtest-death-test.cc \ gtest/src/gtest-filepath.cc \ gtest/src/gtest-internal-inl.h \ gtest/src/gtest-port.cc \ gtest/src/gtest-printers.cc \ gtest/src/gtest-test-part.cc \ gtest/src/gtest-typed-test.cc \ gtest/src/gtest.cc \ gmock/src/gmock-internal-utils.cc \ gmock/src/gmock-matchers.cc sipp_unittest_SOURCES = \ $(common_SOURCES) \ src/sipp_unittest.cpp \ src/xp_parser_ut.cpp \ $(gtest_SOURCES) sipp_unittest_CFLAGS = $(AM_CFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CFLAGS@ sipp_unittest_CXXFLAGS = $(AM_CXXFLAGS) -DGTEST=1 \ -I$(srcdir)/gtest/include \ -I$(srcdir)/gmock/include \ -I$(srcdir)/gtest \ -I$(srcdir)/gmock \ @GSL_CXXFLAGS@ sipp_unittest_LDADD = @LIBOBJS@ @GSL_LIBS@ if HAVE_HELP2MAN man_MANS = sipp.1 CLEANFILES += $(man_MANS) sipp.1: ./sipp $(sipp_SOURCES) $(HELP2MAN) --output=$@ -v "-v" --no-info \ --name='SIP testing tool and traffic generator' \ ./sipp else sipp.1: @echo "Warning: help2man not available, no man page is created." endif sipp-3.5.1/build.sh0000755000175000017500000000116212672462535013177 0ustar vsevavseva#!/bin/sh set -e # abort on error MAKE=`which gmake make 2>/dev/null | head -n1` # prefer GNU make test -z "$MAKE" && echo "No (g)make found" >&2 && exit 1 # Optional: for git checkout only. if which git >/dev/null && test -d .git; then git submodule update --init fi autoreconf -vifs if test "$*" = "--full"; then ./configure \ --with-gsl \ --with-openssl \ --with-pcap \ --with-rtpstream \ --with-sctp else ./configure "$@" fi "$MAKE" clean # Optional: for git checkout only. if test -f gtest/gtest.h; then "$MAKE" -j3 sipp_unittest ./sipp_unittest fi "$MAKE" -j3 sipp-3.5.1/configure0000755000175000017500000110633412672463317013457 0ustar vsevavseva#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for SIPp see-include/version.h. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: sipp-users@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='SIPp' PACKAGE_TARNAME='sipp' PACKAGE_VERSION='see-include/version.h' PACKAGE_STRING='SIPp see-include/version.h' PACKAGE_BUGREPORT='sipp-users@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="src/sipp.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS ALLOCA HAVE_EPOLL_FALSE HAVE_EPOLL_TRUE HAVE_GSL_FALSE HAVE_GSL_TRUE GSL_LIBS GSL_CXXFLAGS GSL_CFLAGS HAVE_RTP_FALSE HAVE_RTP_TRUE HAVE_PCAP_FALSE HAVE_PCAP_TRUE HAVE_SCTP_FALSE HAVE_SCTP_TRUE HAVE_OPENSSL_FALSE HAVE_OPENSSL_TRUE HAVE_CXX11 EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC HAVE_HELP2MAN_FALSE HAVE_HELP2MAN_TRUE HELP2MAN AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='AM_GIT_VERSION' ac_user_opts=' enable_option_checking enable_silent_rules with_openssl with_pcap with_sctp with_gsl with_rtpstream enable_epoll enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures SIPp see-include/version.h to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/sipp] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of SIPp see-include/version.h:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-epoll build with epoll backend --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-epoll This platform supports epoll(7) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openssl build with OpenSSL support --with-pcap build with pcap support --with-sctp build with SCTP support --with-gsl build with GSL (GNU Scientific Library) support --without-rtpstream build without RTP streaming support Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF SIPp configure see-include/version.h generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------------- ## ## Report this to sipp-users@lists.sourceforge.net ## ## ----------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Load non-standard m4 files from ./m4/*.m4. # AC_CONFIG_MACRO_DIR([m4]) does not work on pre-1.13 aclocal, so we # have to include all files by hand. AM_GIT_VERSION=$srcdir/m4/am_git_version.mh # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 # ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_config_headers="$ac_config_headers include/config.h" am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='sipp' VERSION='see-include/version.h' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; openssl="$withval" else openssl="no" fi # Check whether --with-pcap was given. if test "${with_pcap+set}" = set; then : withval=$with_pcap; pcap="$withval" else pcap="no" fi # Check whether --with-sctp was given. if test "${with_sctp+set}" = set; then : withval=$with_sctp; sctp="$withval" else sctp="no" fi # Check whether --with-gsl was given. if test "${with_gsl+set}" = set; then : withval=$with_gsl; gsl="$withval" else gsl="no" fi # Check whether --with-rtpstream was given. if test "${with_rtpstream+set}" = set; then : withval=$with_rtpstream; rtp="$withval" else rtp="yes" fi # Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "$enableval" in yes | no) epoll="$enableval" ;; *) as_fn_error $? "bad value $enableval for --enable-epoll" "$LINENO" 5 ;; esac else epoll="yes" fi # Extract the first word of "help2man", so it can be a program name with args. set dummy help2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $HELP2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HELP2MAN=$ac_cv_path_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$HELP2MAN"; then HAVE_HELP2MAN_TRUE= HAVE_HELP2MAN_FALSE='#' else HAVE_HELP2MAN_TRUE='#' HAVE_HELP2MAN_FALSE= fi if test x"$HELP2MAN" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find help2man, you will not be able to generate manpages" >&5 $as_echo "$as_me: WARNING: cannot find help2man, you will not be able to generate manpages" >&2;} fi # ==================== basic compiler settings ========================== ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # Prefer ext (gnu++11) over noext (c++11) because on some platforms the # noext (stricter) mode disables non-posix features like stdio fileno(). ax_cxx_compile_cxx11_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compile_cxx11=yes else ax_cv_cxx_compile_cxx11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$ac_save_CXXFLAGS" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi else if test x$ac_success = xno; then HAVE_CXX11=0 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 $as_echo "#define HAVE_CXX11 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu11" >&5 $as_echo_n "checking whether C compiler accepts -std=gnu11... " >&6; } if ${ax_cv_check_cflags___std_gnu11+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -std=gnu11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___std_gnu11=yes else ax_cv_check_cflags___std_gnu11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___std_gnu11" >&5 $as_echo "$ax_cv_check_cflags___std_gnu11" >&6; } if test "x$ax_cv_check_cflags___std_gnu11" = xyes; then : CFLAGS+=" -std=gnu11" else : fi case "$host" in *-linux*) CFLAGS="$CFLAGS -D__LINUX" CPPFLAGS="$CPPFLAGS -D__LINUX" ;; *-darwin*) CFLAGS="$CFLAGS -D__DARWIN" CPPFLAGS="$CPPFLAGS -D__DARWIN" ;; *-hpux*) CFLAGS="$CFLAGS -D__HPUX" CPPFLAGS="$CPPFLAGS -D__HPUX" ;; *-freebsd*) CFLAGS="$CFLAGS -D__LINUX -I/usr/local/include" CPPFLAGS="$CPPFLAGS -D__LINUX -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-sunos*) CFLAGS="$CFLAGS -D__SUNOS" CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) CFLAGS="$CFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" CPPFLAGS="$CPPFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" LDFLAGS="$LDFLAGS -L /usr/lib/WpdPack/Lib -L /usr/lib/SctpDrv" ;; *-tru64*) CFLAGS="$CFLAGS -D__OSF1" CPPFLAGS="$CPPFLAGS -D__OSF1" ;; esac # ==================== checks for libraries ============================= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 $as_echo_n "checking for initscr in -lcurses... " >&6; } if ${ac_cv_lib_curses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_initscr=yes else ac_cv_lib_curses_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5 $as_echo "$ac_cv_lib_curses_initscr" >&6; } if test "x$ac_cv_lib_curses_initscr" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCURSES 1 _ACEOF LIBS="-lcurses $LIBS" else as_fn_error $? "ncurses library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : THREAD_LIBS="-lpthread" else as_fn_error $? "pthread library needed!" "$LINENO" 5 fi # For Linux and SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlerror" >&5 $as_echo_n "checking for library containing dlerror... " >&6; } if ${ac_cv_search_dlerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlerror (); int main () { return dlerror (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlerror+:} false; then : break fi done if ${ac_cv_search_dlerror+:} false; then : else ac_cv_search_dlerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlerror" >&5 $as_echo "$ac_cv_search_dlerror" >&6; } ac_res=$ac_cv_search_dlerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 $as_echo_n "checking for library containing dlsym... " >&6; } if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlsym (); int main () { return dlsym (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlsym+:} false; then : break fi done if ${ac_cv_search_dlsym+:} false; then : else ac_cv_search_dlsym=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 $as_echo "$ac_cv_search_dlsym" >&6; } ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For glibc pre-2.17 we need -rt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5 $as_echo_n "checking for library containing inet_addr... " >&6; } if ${ac_cv_search_inet_addr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_addr (); int main () { return inet_addr (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_addr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_addr+:} false; then : break fi done if ${ac_cv_search_inet_addr+:} false; then : else ac_cv_search_inet_addr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5 $as_echo "$ac_cv_search_inet_addr" >&6; } ac_res=$ac_cv_search_inet_addr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_init" >&5 $as_echo_n "checking for library containing pthread_mutex_init... " >&6; } if ${ac_cv_search_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_init+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_init+:} false; then : else ac_cv_search_pthread_mutex_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_init" >&5 $as_echo "$ac_cv_search_pthread_mutex_init" >&6; } ac_res=$ac_cv_search_pthread_mutex_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5 $as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; } if ${ac_cv_search_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_destroy (); int main () { return pthread_mutex_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_destroy+:} false; then : else ac_cv_search_pthread_mutex_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_destroy" >&5 $as_echo "$ac_cv_search_pthread_mutex_destroy" >&6; } ac_res=$ac_cv_search_pthread_mutex_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 $as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } if ${ac_cv_search_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_lock (); int main () { return pthread_mutex_lock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_lock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_lock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_lock+:} false; then : else ac_cv_search_pthread_mutex_lock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5 $as_echo "$ac_cv_search_pthread_mutex_lock" >&6; } ac_res=$ac_cv_search_pthread_mutex_lock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_unlock" >&5 $as_echo_n "checking for library containing pthread_mutex_unlock... " >&6; } if ${ac_cv_search_pthread_mutex_unlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_unlock (); int main () { return pthread_mutex_unlock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_unlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_unlock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_unlock+:} false; then : else ac_cv_search_pthread_mutex_unlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_unlock" >&5 $as_echo "$ac_cv_search_pthread_mutex_unlock" >&6; } ac_res=$ac_cv_search_pthread_mutex_unlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_self" >&5 $as_echo_n "checking for library containing pthread_self... " >&6; } if ${ac_cv_search_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_self (); int main () { return pthread_self (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_self=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_self+:} false; then : break fi done if ${ac_cv_search_pthread_self+:} false; then : else ac_cv_search_pthread_self=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_self" >&5 $as_echo "$ac_cv_search_pthread_self" >&6; } ac_res=$ac_cv_search_pthread_self if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_cancel" >&5 $as_echo_n "checking for library containing pthread_cancel... " >&6; } if ${ac_cv_search_pthread_cancel+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_cancel (); int main () { return pthread_cancel (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_cancel=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_cancel+:} false; then : break fi done if ${ac_cv_search_pthread_cancel+:} false; then : else ac_cv_search_pthread_cancel=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_cancel" >&5 $as_echo "$ac_cv_search_pthread_cancel" >&6; } ac_res=$ac_cv_search_pthread_cancel if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5 $as_echo_n "checking for library containing pthread_join... " >&6; } if ${ac_cv_search_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_join=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_join+:} false; then : break fi done if ${ac_cv_search_pthread_join+:} false; then : else ac_cv_search_pthread_join=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5 $as_echo "$ac_cv_search_pthread_join" >&6; } ac_res=$ac_cv_search_pthread_join if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_init" >&5 $as_echo_n "checking for library containing pthread_attr_init... " >&6; } if ${ac_cv_search_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_init+:} false; then : break fi done if ${ac_cv_search_pthread_attr_init+:} false; then : else ac_cv_search_pthread_attr_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_init" >&5 $as_echo "$ac_cv_search_pthread_attr_init" >&6; } ac_res=$ac_cv_search_pthread_attr_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_setstacksize" >&5 $as_echo_n "checking for library containing pthread_attr_setstacksize... " >&6; } if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_setstacksize (); int main () { return pthread_attr_setstacksize (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_setstacksize=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : break fi done if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : else ac_cv_search_pthread_attr_setstacksize=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_setstacksize" >&5 $as_echo "$ac_cv_search_pthread_attr_setstacksize" >&6; } ac_res=$ac_cv_search_pthread_attr_setstacksize if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_create+:} false; then : break fi done if ${ac_cv_search_pthread_create+:} false; then : else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 $as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_destroy" >&5 $as_echo_n "checking for library containing pthread_attr_destroy... " >&6; } if ${ac_cv_search_pthread_attr_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_destroy (); int main () { return pthread_attr_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_attr_destroy+:} false; then : else ac_cv_search_pthread_attr_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_destroy" >&5 $as_echo "$ac_cv_search_pthread_attr_destroy" >&6; } ac_res=$ac_cv_search_pthread_attr_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setschedparam" >&5 $as_echo_n "checking for library containing pthread_setschedparam... " >&6; } if ${ac_cv_search_pthread_setschedparam+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setschedparam (); int main () { return pthread_setschedparam (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setschedparam=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setschedparam+:} false; then : break fi done if ${ac_cv_search_pthread_setschedparam+:} false; then : else ac_cv_search_pthread_setschedparam=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setschedparam" >&5 $as_echo "$ac_cv_search_pthread_setschedparam" >&6; } ac_res=$ac_cv_search_pthread_setschedparam if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcancelstate" >&5 $as_echo_n "checking for library containing pthread_setcancelstate... " >&6; } if ${ac_cv_search_pthread_setcancelstate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcancelstate (); int main () { return pthread_setcancelstate (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcancelstate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcancelstate+:} false; then : break fi done if ${ac_cv_search_pthread_setcancelstate+:} false; then : else ac_cv_search_pthread_setcancelstate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcancelstate" >&5 $as_echo "$ac_cv_search_pthread_setcancelstate" >&6; } ac_res=$ac_cv_search_pthread_setcancelstate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcanceltype" >&5 $as_echo_n "checking for library containing pthread_setcanceltype... " >&6; } if ${ac_cv_search_pthread_setcanceltype+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcanceltype (); int main () { return pthread_setcanceltype (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcanceltype=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcanceltype+:} false; then : break fi done if ${ac_cv_search_pthread_setcanceltype+:} false; then : else ac_cv_search_pthread_setcanceltype=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcanceltype" >&5 $as_echo "$ac_cv_search_pthread_setcanceltype" >&6; } ac_res=$ac_cv_search_pthread_setcanceltype if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_exit" >&5 $as_echo_n "checking for library containing pthread_exit... " >&6; } if ${ac_cv_search_pthread_exit+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_exit (); int main () { return pthread_exit (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_exit=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_exit+:} false; then : break fi done if ${ac_cv_search_pthread_exit+:} false; then : else ac_cv_search_pthread_exit=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_exit" >&5 $as_echo "$ac_cv_search_pthread_exit" >&6; } ac_res=$ac_cv_search_pthread_exit if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 $as_echo_n "checking for library containing pthread_sigmask... " >&6; } if ${ac_cv_search_pthread_sigmask+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_sigmask (); int main () { return pthread_sigmask (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_sigmask=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_sigmask+:} false; then : break fi done if ${ac_cv_search_pthread_sigmask+:} false; then : else ac_cv_search_pthread_sigmask=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 $as_echo "$ac_cv_search_pthread_sigmask" >&6; } ac_res=$ac_cv_search_pthread_sigmask if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi #AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro #AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5 $as_echo_n "checking for library containing pow... " >&6; } if ${ac_cv_search_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pow=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pow+:} false; then : break fi done if ${ac_cv_search_pow+:} false; then : else ac_cv_search_pow=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5 $as_echo "$ac_cv_search_pow" >&6; } ac_res=$ac_cv_search_pow if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing htons" >&5 $as_echo_n "checking for library containing htons... " >&6; } if ${ac_cv_search_htons+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char htons (); int main () { return htons (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_htons=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_htons+:} false; then : break fi done if ${ac_cv_search_htons+:} false; then : else ac_cv_search_htons=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_htons" >&5 $as_echo "$ac_cv_search_htons" >&6; } ac_res=$ac_cv_search_htons if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ntohs" >&5 $as_echo_n "checking for library containing ntohs... " >&6; } if ${ac_cv_search_ntohs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ntohs (); int main () { return ntohs (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_ntohs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_ntohs+:} false; then : break fi done if ${ac_cv_search_ntohs+:} false; then : else ac_cv_search_ntohs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ntohs" >&5 $as_echo "$ac_cv_search_ntohs" >&6; } ac_res=$ac_cv_search_ntohs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind" >&5 $as_echo_n "checking for library containing bind... " >&6; } if ${ac_cv_search_bind+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind (); int main () { return bind (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bind=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bind+:} false; then : break fi done if ${ac_cv_search_bind+:} false; then : else ac_cv_search_bind=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind" >&5 $as_echo "$ac_cv_search_bind" >&6; } ac_res=$ac_cv_search_bind if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing freeaddrinfo" >&5 $as_echo_n "checking for library containing freeaddrinfo... " >&6; } if ${ac_cv_search_freeaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char freeaddrinfo (); int main () { return freeaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_freeaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_freeaddrinfo+:} false; then : break fi done if ${ac_cv_search_freeaddrinfo+:} false; then : else ac_cv_search_freeaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_freeaddrinfo" >&5 $as_echo "$ac_cv_search_freeaddrinfo" >&6; } ac_res=$ac_cv_search_freeaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if ${ac_cv_search_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_getaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_getaddrinfo+:} false; then : break fi done if ${ac_cv_search_getaddrinfo+:} false; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing listen" >&5 $as_echo_n "checking for library containing listen... " >&6; } if ${ac_cv_search_listen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char listen (); int main () { return listen (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_listen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_listen+:} false; then : break fi done if ${ac_cv_search_listen+:} false; then : else ac_cv_search_listen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_listen" >&5 $as_echo "$ac_cv_search_listen" >&6; } ac_res=$ac_cv_search_listen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing recvfrom" >&5 $as_echo_n "checking for library containing recvfrom... " >&6; } if ${ac_cv_search_recvfrom+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char recvfrom (); int main () { return recvfrom (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_recvfrom=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_recvfrom+:} false; then : break fi done if ${ac_cv_search_recvfrom+:} false; then : else ac_cv_search_recvfrom=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_recvfrom" >&5 $as_echo "$ac_cv_search_recvfrom" >&6; } ac_res=$ac_cv_search_recvfrom if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shutdown" >&5 $as_echo_n "checking for library containing shutdown... " >&6; } if ${ac_cv_search_shutdown+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shutdown (); int main () { return shutdown (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shutdown=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_shutdown+:} false; then : break fi done if ${ac_cv_search_shutdown+:} false; then : else ac_cv_search_shutdown=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shutdown" >&5 $as_echo "$ac_cv_search_shutdown" >&6; } ac_res=$ac_cv_search_shutdown if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For Linux, SunOS and Cygwin #AC_CHECK_LIB(stdc++,main,,[AC_MSG_ERROR([stdc++ library missing])]) # Conditional build with OpenSSL if test "$openssl" = 'yes'; then # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in openssl/md5.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_md5_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_MD5_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/bio.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/bio.h" "ac_cv_header_openssl_bio_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_bio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_BIO_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/err.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_ERR_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/rand.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_rand_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_RAND_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/ssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_SSL_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/x509v3.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509v3.h" "ac_cv_header_openssl_x509v3_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_x509v3_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OPENSSL_X509V3_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_library_init=yes else ac_cv_lib_ssl_SSL_library_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSSL 1 _ACEOF LIBS="-lssl $LIBS" else as_fn_error $? "ssl library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_num_locks in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_num_locks in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_CRYPTO_num_locks+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char CRYPTO_num_locks (); int main () { return CRYPTO_num_locks (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_CRYPTO_num_locks=yes else ac_cv_lib_crypto_CRYPTO_num_locks=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_num_locks" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_num_locks" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_num_locks" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else as_fn_error $? "crypto library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$openssl" = "yes"; then HAVE_OPENSSL_TRUE= HAVE_OPENSSL_FALSE='#' else HAVE_OPENSSL_TRUE='#' HAVE_OPENSSL_FALSE= fi # Conditional build with SCTP if test "$sctp" = 'yes'; then for ac_header in netinet/sctp.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_SCTP_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&5 $as_echo "$as_me: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_send" >&5 $as_echo_n "checking for library containing sctp_send... " >&6; } if ${ac_cv_search_sctp_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_send (); int main () { return sctp_send (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_send=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_send+:} false; then : break fi done if ${ac_cv_search_sctp_send+:} false; then : else ac_cv_search_sctp_send=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_send" >&5 $as_echo "$ac_cv_search_sctp_send" >&6; } ac_res=$ac_cv_search_sctp_send if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_freepaddrs" >&5 $as_echo_n "checking for library containing sctp_freepaddrs... " >&6; } if ${ac_cv_search_sctp_freepaddrs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_freepaddrs (); int main () { return sctp_freepaddrs (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_freepaddrs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_freepaddrs+:} false; then : break fi done if ${ac_cv_search_sctp_freepaddrs+:} false; then : else ac_cv_search_sctp_freepaddrs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_freepaddrs" >&5 $as_echo "$ac_cv_search_sctp_freepaddrs" >&6; } ac_res=$ac_cv_search_sctp_freepaddrs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_bindx" >&5 $as_echo_n "checking for library containing sctp_bindx... " >&6; } if ${ac_cv_search_sctp_bindx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_bindx (); int main () { return sctp_bindx (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_bindx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_bindx+:} false; then : break fi done if ${ac_cv_search_sctp_bindx+:} false; then : else ac_cv_search_sctp_bindx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_bindx" >&5 $as_echo "$ac_cv_search_sctp_bindx" >&6; } ac_res=$ac_cv_search_sctp_bindx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_recvmsg" >&5 $as_echo_n "checking for library containing sctp_recvmsg... " >&6; } if ${ac_cv_search_sctp_recvmsg+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_recvmsg (); int main () { return sctp_recvmsg (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_recvmsg=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_recvmsg+:} false; then : break fi done if ${ac_cv_search_sctp_recvmsg+:} false; then : else ac_cv_search_sctp_recvmsg=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_recvmsg" >&5 $as_echo "$ac_cv_search_sctp_recvmsg" >&6; } ac_res=$ac_cv_search_sctp_recvmsg if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$sctp" = "yes"; then HAVE_SCTP_TRUE= HAVE_SCTP_FALSE='#' else HAVE_SCTP_TRUE='#' HAVE_SCTP_FALSE= fi # Conditional build with pcap if test "$pcap" = 'yes'; then for ac_header in pcap.h do : ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PCAP_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_open_offline" >&5 $as_echo_n "checking for library containing pcap_open_offline... " >&6; } if ${ac_cv_search_pcap_open_offline+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_open_offline (); int main () { return pcap_open_offline (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_open_offline=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_open_offline+:} false; then : break fi done if ${ac_cv_search_pcap_open_offline+:} false; then : else ac_cv_search_pcap_open_offline=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_open_offline" >&5 $as_echo "$ac_cv_search_pcap_open_offline" >&6; } ac_res=$ac_cv_search_pcap_open_offline if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_next" >&5 $as_echo_n "checking for library containing pcap_next... " >&6; } if ${ac_cv_search_pcap_next+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next (); int main () { return pcap_next (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_next=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_next+:} false; then : break fi done if ${ac_cv_search_pcap_next+:} false; then : else ac_cv_search_pcap_next=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_next" >&5 $as_echo "$ac_cv_search_pcap_next" >&6; } ac_res=$ac_cv_search_pcap_next if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_close" >&5 $as_echo_n "checking for library containing pcap_close... " >&6; } if ${ac_cv_search_pcap_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_close (); int main () { return pcap_close (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_close=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_close+:} false; then : break fi done if ${ac_cv_search_pcap_close+:} false; then : else ac_cv_search_pcap_close=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_close" >&5 $as_echo "$ac_cv_search_pcap_close" >&6; } ac_res=$ac_cv_search_pcap_close if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_next_ex in -lpcap" >&5 $as_echo_n "checking for pcap_next_ex in -lpcap... " >&6; } if ${ac_cv_lib_pcap_pcap_next_ex+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next_ex (); int main () { return pcap_next_ex (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_pcap_next_ex=yes else ac_cv_lib_pcap_pcap_next_ex=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_next_ex" >&5 $as_echo "$ac_cv_lib_pcap_pcap_next_ex" >&6; } if test "x$ac_cv_lib_pcap_pcap_next_ex" = xyes; then : $as_echo "#define HAVE_PCAP_NEXT_EX 1" >>confdefs.h fi fi # For Makefile.am if test "$pcap" = "yes"; then HAVE_PCAP_TRUE= HAVE_PCAP_FALSE='#' else HAVE_PCAP_TRUE='#' HAVE_PCAP_FALSE= fi if test "$rtp" = "yes"; then HAVE_RTP_TRUE= HAVE_RTP_FALSE='#' else HAVE_RTP_TRUE='#' HAVE_RTP_FALSE= fi # Conditional build with pcap if test "$gsl" = 'yes'; then for ac_header in gsl/gsl_randist.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_randist.h" "ac_cv_header_gsl_gsl_randist_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_randist_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_RANDIST_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_rng.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_rng.h" "ac_cv_header_gsl_gsl_rng_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_rng_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_RNG_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_cdf.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_cdf.h" "ac_cv_header_gsl_gsl_cdf_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_cdf_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_GSL_CDF_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_dgemm=yes else ac_cv_lib_gslcblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_rng_alloc in -lgsl" >&5 $as_echo_n "checking for gsl_rng_alloc in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_rng_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_rng_alloc (); int main () { return gsl_rng_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_rng_alloc=yes else ac_cv_lib_gsl_gsl_rng_alloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_rng_alloc" >&5 $as_echo "$ac_cv_lib_gsl_gsl_rng_alloc" >&6; } if test "x$ac_cv_lib_gsl_gsl_rng_alloc" = xyes; then : GSL_CFLAGS=`pkg-config gsl --cflags` GSL_CXXFLAGS=`pkg-config gsl --cflags` GSL_LIBS=`pkg-config gsl --libs` else as_fn_error $? "gsl library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$gsl" = "yes"; then HAVE_GSL_TRUE= HAVE_GSL_FALSE='#' else HAVE_GSL_TRUE='#' HAVE_GSL_FALSE= fi if test "$epoll" = 'yes'; then ax_have_epoll_cppflags="${CPPFLAGS}" ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default" if test "x$ac_cv_header_linux_version_h" = xyes; then : CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(7) interface" >&5 $as_echo_n "checking for Linux epoll(7) interface... " >&6; } if ${ax_cv_have_epoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif int main () { int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_epoll=yes else ax_cv_have_epoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="${ax_have_epoll_cppflags}" if test "${ax_cv_have_epoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ax_config_feature_epoll=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ax_config_feature_epoll=no fi # Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "${enableval}" in yes) ax_config_feature_epoll="yes" ;; no) ax_config_feature_epoll="no" ;; *) as_fn_error $? "bad value ${enableval} for feature --epoll" "$LINENO" 5 ;; esac fi if test "$ax_config_feature_epoll" = yes; then : $as_echo "#define HAVE_EPOLL 1" >>confdefs.h epoll="yes" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is enabled" >&5 $as_echo "$as_me: Feature epoll is enabled" >&6;} fi else epoll="no" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is disabled" >&5 $as_echo "$as_me: Feature epoll is disabled" >&6;} fi fi fi if test "$epoll" = "yes"; then HAVE_EPOLL_TRUE= HAVE_EPOLL_FALSE='#' else HAVE_EPOLL_TRUE='#' HAVE_EPOLL_FALSE= fi # ==================== checks for header files ========================== ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # ===== checks for typedefs, structures and compiler characteristics ==== { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi # These conflict with netinet/in.h typedefs. #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT8_T # ==================== checks for library functions ===================== for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi #AC_FUNC_MALLOC #AC_FUNC_REALLOC #AC_FUNC_STRTOD for ac_func in alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # ==================== check for clang/gmock workaround ================= # clang++ falls over the use of is_default_constructible, suggesting # is_nothrow_constructible instead. # # ./gmock/include/gmock/gmock-actions.h:107:19: error: no template named # 'is_default_constructible' in namespace 'std'; did you mean # 'is_nothrow_constructible'? # T, ::std::is_default_constructible::value>::Get(); # ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # is_nothrow_constructible # /usr/include/c++/4.6/type_traits:705:12: note: # 'is_nothrow_constructible' declared here # ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports is_default_constructible (used by gmock)" >&5 $as_echo_n "checking whether $CXX supports is_default_constructible (used by gmock)... " >&6; } if ${ax_cv_cxx_has_is_default_constructible+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_has_is_default_constructible=yes else ax_cv_cxx_has_is_default_constructible=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_has_is_default_constructible" >&5 $as_echo "$ax_cv_cxx_has_is_default_constructible" >&6; } if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ==================== generate files =================================== ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SCTP_TRUE}" && test -z "${HAVE_SCTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_SCTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PCAP_TRUE}" && test -z "${HAVE_PCAP_FALSE}"; then as_fn_error $? "conditional \"HAVE_PCAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RTP_TRUE}" && test -z "${HAVE_RTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_RTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GSL_TRUE}" && test -z "${HAVE_GSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_GSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EPOLL_TRUE}" && test -z "${HAVE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_EPOLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ SIPp config.status see-include/version.h configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi sipp-3.5.1/install-sh0000755000175000017500000003325512672463320013546 0ustar vsevavseva#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sipp-3.5.1/.travis.yml0000644000175000017500000000071712672462535013657 0ustar vsevavsevalanguage: cpp compiler: - gcc - clang notifications: email: false sudo: required before_install: - sudo apt-get -qq update - sudo apt-get install -y libpcap-dev libsctp-dev libncurses5-dev libssl-dev libgsl0-dev before_script: - git submodule update --init - autoreconf -vifs - ./configure --with-gsl --with-openssl --with-pcap --with-rtpstream --with-sctp script: - make -j2 - make -j2 check - ./regress/runtests sipp-3.5.1/src/0000755000175000017500000000000012672462535012330 5ustar vsevavsevasipp-3.5.1/src/xp_parser.c0000644000175000017500000003313112672462535014500 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ /* * Mini xml parser: * * WARNING 1: Only supports printable * ASCII characters in xml files. '\0' * is not a valid character. Returned string are * NULL-terminated. * * WARNING 2: Does not supports multithreading. Works * with static buffer, no memory allocation. */ /******************* Include files *********************/ #include #include #include #include "xp_parser.h" #define strstartswith(haystack, needle) \ (!strncmp(haystack, needle, sizeof(needle) - 1)) /************* Constants and Global variables ***********/ #define XP_MAX_NAME_LEN 256 #define XP_MAX_FILE_LEN 65536 #define XP_MAX_STACK_LEN 256 char xp_file [XP_MAX_FILE_LEN + 1]; char *xp_position [XP_MAX_STACK_LEN]; int xp_stack = 0; /****************** Internal routines ********************/ static const char *xp_find_escape(const char *escape, size_t len) { static struct escape { const char *name; const char *value; } html_escapes[] = { { "amp", "&" }, { "gt", ">" }, { "lt", "<" }, { "quot", "\"" }, { NULL, NULL } }; struct escape *n; for (n = html_escapes; n->name; ++n) { if (strncmp(escape, n->name, len) == 0) return n->value; } return NULL; } /* This finds the end of something like , and does not recurse * into other elements. */ static char *xp_find_start_tag_end(char *ptr) { while (*ptr) { if (*ptr == '<') { if (strstartswith(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 3; } else { return NULL; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { return ptr; } else if (*ptr == '"') { ptr++; while (*ptr) { if (*ptr == '\\') { ptr += 2; } else if (*ptr == '"') { ptr++; break; } else { ptr++; } } } else if (*ptr == '>') { return ptr; } else { ptr++; } } return ptr; } static char *xp_find_local_end() { char *ptr = xp_position[xp_stack]; int level = 0; while (*ptr) { if (*ptr == '<') { if (strstartswith(ptr, ""); if (!cdata_end) return NULL; ptr = cdata_end + 3; } else if (strstartswith(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 3; } else if (*(ptr+1) == '/') { level--; if (level < 0) return ptr; } else { level++; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { level--; if (level < 0) return ptr; } else if (*ptr == '"') { ptr++; while (*ptr) { if (*ptr == '\\') { ptr++; /* Skip the slash. */ } else if (*ptr == '"') { break; } ptr++; } } ptr++; } return ptr; } /********************* Interface routines ********************/ int xp_unescape(const char *source, char *dest) { const char *from; char *to; size_t pos; if (!source || !dest) { return -1; } from = source; to = dest; pos = strcspn(from, "&"); for (; from[pos] != '\0'; pos = strcspn(from, "&")) { size_t term; size_t escape_len; const char *escape; const char c = from[pos]; memcpy(to, from, pos); to += pos; from += pos + 1; if (c != '&') continue; term = strcspn(from, ";"); if (from[term] == '\0') { *to++ = '&'; pos = term; break; } escape = xp_find_escape(from, term); if (!escape) { *to++ = '&'; continue; } escape_len = strlen(escape); memcpy(to, escape, escape_len); to += escape_len; from += term + 1; } if (pos) { memcpy(to, from, pos); to += pos; } to[0] = '\0'; return to - dest; } int xp_set_xml_buffer_from_string(const char *str) { size_t len = strlen(str); if (len > XP_MAX_FILE_LEN) { return 0; } strcpy(xp_file, str); xp_stack = 0; xp_position[xp_stack] = xp_file; if (!strstartswith(xp_position[xp_stack], "")) return 0; xp_position[xp_stack] = xp_position[xp_stack] + 2; return 1; } int xp_set_xml_buffer_from_file(const char *filename) { FILE *f = fopen(filename, "rb"); char *pos; int index = 0; int c; if (!f) { return 0; } while ((c = fgetc(f)) != EOF) { if (c == '\r') continue; xp_file[index++] = c; if (index >= XP_MAX_FILE_LEN) { xp_file[index++] = 0; xp_stack = 0; xp_position[xp_stack] = xp_file; fclose(f); return 0; } } xp_file[index++] = 0; fclose(f); xp_stack = 0; xp_position[xp_stack] = xp_file; if (!strstartswith(xp_position[xp_stack], ""))) return 0; xp_position[xp_stack] = pos + 2; return 1; } char *xp_open_element(int index) { char *ptr = xp_position[xp_stack]; int level = 0; static char name[XP_MAX_NAME_LEN]; while (*ptr) { if (*ptr == '<') { if ((*(ptr+1) == '!') && (*(ptr+2) == '[') && (strstr(ptr, ""); if (!cdata_end) return NULL; ptr = cdata_end + 2; } else if ((*(ptr+1) == '!') && (*(ptr+2) == '-') && (strstr(ptr, ""); if (!comment_end) return NULL; ptr = comment_end + 2; } else if (strstartswith(ptr, ""); if (!doctype_end) return NULL; ptr = doctype_end; } else if (*(ptr+1) == '/') { level--; if (level < 0) return NULL; } else { if (level == 0) { if (index) { index--; } else { char *end = xp_find_start_tag_end(ptr + 1); char *p; if (!end) { return NULL; } p = strchr(ptr, ' '); if (p && (p < end)) { end = p; } p = strchr(ptr, '\t'); if (p && (p < end)) { end = p; } p = strchr(ptr, '\r'); if (p && (p < end)) { end = p; } p = strchr(ptr, '\n'); if (p && (p < end)) { end = p; } p = strchr(ptr, '/'); if (p && (p < end)) { end = p; } memcpy(name, ptr + 1, end-ptr-1); name[end-ptr-1] = 0; xp_position[++xp_stack] = end; return name; } } /* We want to skip over this particular element .*/ ptr = xp_find_start_tag_end(ptr + 1); if (!ptr) return NULL; ptr--; level++; } } else if ((*ptr == '/') && (*(ptr+1) == '>')) { level--; if (level < 0) return NULL; } ptr++; } return NULL; } void xp_close_element(void) { if (xp_stack) { xp_stack--; } } char *xp_get_value(const char *name) { int index = 0; static char buffer[XP_MAX_FILE_LEN + 1]; char *ptr, *end, *check; end = xp_find_start_tag_end(xp_position[xp_stack] + 1); if (!end) return NULL; ptr = xp_position[xp_stack]; while (*ptr) { ptr = strstr(ptr, name); if (!ptr) return NULL; if (ptr > end) return NULL; /* FIXME: potential BUG in parser: we must retrieve full word, * so the use of strstr as it is is not enough. * we should check that the retrieved word is not a piece of * another one. */ check = ptr - 1; if (check >= xp_position[xp_stack]) { if ((*check != '\r') && (*check != '\n') && (*check != '\t') && (*check != ' ' )) { ptr += strlen(name); continue; } } else return(NULL); ptr += strlen(name); while ((*ptr == '\r') || (*ptr == '\n') || (*ptr == '\t') || (*ptr == ' ' ) ) { ptr++; } if (*ptr != '=') continue; ptr++; while ((*ptr == '\r') || (*ptr == '\n') || (*ptr == '\t') || (*ptr == ' ') ) { ptr++; } ptr++; if (*ptr) { while (*ptr) { if (*ptr == '\\') { ptr++; switch(*ptr) { case '\\': buffer[index++] = '\\'; break; case '"': buffer[index++] = '"'; break; case 'n': buffer[index++] = '\n'; break; case 't': buffer[index++] = '\t'; break; case 'r': buffer[index++] = '\r'; break; default: buffer[index++] = '\\'; buffer[index++] = *ptr; break; } ptr++; } else if (*ptr == '"') { break; } else { buffer[index++] = *ptr++; } if (index > XP_MAX_FILE_LEN) return NULL; } buffer[index] = 0; return buffer; } } return NULL; } char* xp_get_cdata(void) { static char buffer[XP_MAX_FILE_LEN + 1]; const char *end = xp_find_local_end(); const char *ptr; ptr = strstr(xp_position[xp_stack], " end) return NULL; end = strstr(ptr, "]]>"); if (!end) { return NULL; } if ((end - ptr) > XP_MAX_FILE_LEN) return NULL; memcpy(buffer, ptr, (end - ptr)); buffer[end-ptr] = 0; return buffer; } int xp_get_content_length(const char *P_buffer) { const char *L_ctl_hdr; int L_content_length = -1; unsigned char short_form; short_form = 0; L_ctl_hdr = strstr(P_buffer, "\nContent-Length:"); if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nContent-length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\ncontent-Length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\ncontent-length:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nCONTENT-LENGTH:"); } if (!L_ctl_hdr) { L_ctl_hdr = strstr(P_buffer, "\nl:"); short_form = 1; } if (L_ctl_hdr) { if (short_form) { L_ctl_hdr += 3; } else { L_ctl_hdr += 16; } while (isspace(*L_ctl_hdr)) L_ctl_hdr++; sscanf(L_ctl_hdr, "%d", &L_content_length); } /* L_content_length = -1 the message does not contain content-length */ return (L_content_length); } sipp-3.5.1/src/deadcall.cpp0000644000175000017500000000573712672462535014601 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #ifdef PCAPPLAY #include "send_packets.h" #endif #include "sipp.hpp" #include "deadcall.hpp" #include "assert.h" /* Defined in call.cpp. */ extern timewheel paused_calls; deadcall::deadcall(const char *id, const char *reason) : listener(id, true) { this->expiration = clock_tick + deadcall_wait; this->reason = strdup(reason); setPaused(); } deadcall::~deadcall() { free(reason); } bool deadcall::process_incoming(char * msg, struct sockaddr_storage * /*src*/) { char buffer[MAX_HEADER_LEN]; CStat::globalStat(CStat::E_DEAD_CALL_MSGS); setRunning(); snprintf(buffer, MAX_HEADER_LEN, "Dead call %s (%s)", id, reason); WARNING("%s, received '%s'", buffer, msg); TRACE_MSG("-----------------------------------------------\n" "Dead call %s received a %s message:\n\n%s\n", id, TRANSPORT_TO_STRING(transport), msg); expiration = clock_tick + deadcall_wait; return run(); } bool deadcall::process_twinSippCom(char * msg) { CStat::globalStat(CStat::E_DEAD_CALL_MSGS); TRACE_MSG("Received twin message for dead (%s) call %s:%s\n", reason, id, msg); return true; } bool deadcall::run() { if (clock_tick > expiration) { delete this; return false; } else { setPaused(); return true; } } unsigned int deadcall::wake() { return expiration; } /* Dump call info to error log. */ void deadcall::dump() { WARNING("%s: Dead Call (%s) expiring at %lu", id, reason, expiration); } sipp-3.5.1/src/rijndael.c0000644000175000017500000007171512672462535014277 0ustar vsevavseva/*------------------------------------------------------------------- * Rijndael Implementation *------------------------------------------------------------------- * * A sample 32-bit orientated implementation of Rijndael, the * suggested kernel for the example 3GPP authentication and key * agreement functions. * * This implementation draws on the description in section 5.2 of * the AES proposal and also on the implementation by * Dr B. R. Gladman 9th October 2000. * It uses a number of large (4k) lookup tables to implement the * algorithm in an efficient manner. * * Note: in this implementation the State is stored in four 32-bit * words, one per column of the State, with the top byte of the * column being the _least_ significant byte of the word. * *-----------------------------------------------------------------*/ #include "rijndael.h" #include #define LITTLE_ENDIAN /* For INTEL architecture */ /* Circular byte rotates of 32 bit values */ #define rot1(x) ((x << 8) | (x >> 24)) #define rot2(x) ((x << 16) | (x >> 16)) #define rot3(x) ((x << 24) | (x >> 8)) /* Extract a byte from a 32-bit uint32_t */ #define byte0(x) ((uint8_t)(x)) #define byte1(x) ((uint8_t)(x >> 8)) #define byte2(x) ((uint8_t)(x >> 16)) #define byte3(x) ((uint8_t)(x >> 24)) /* Put or get a 32 bit uint32_t (v) in machine order from a byte * * address in (x) */ #ifdef LITTLE_ENDIAN #define u32_in(x) (*(uint32_t*)(x)) #define u32_out(x,y) (*(uint32_t*)(x) = y) #else /* Invert byte order in a 32 bit variable */ __inline uint32_t byte_swap(const uint32_t x) { return rot1(x) & 0x00ff00ff | rot3(x) & 0xff00ff00; } __inline uint32_t u32_in(const uint8_t x[]) { return byte_swap(*(uint32_t*)x); }; __inline void u32_out(uint8_t x[], const uint32_t v) { *(uint32_t*)x = byte_swap(v); }; #endif /*--------------- The lookup tables ----------------------------*/ static uint32_t rnd_con[10] = { 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1B, 0x36 }; static uint32_t ft_tab[4][256] = { { 0xA56363C6,0x847C7CF8,0x997777EE,0x8D7B7BF6,0x0DF2F2FF,0xBD6B6BD6,0xB16F6FDE,0x54C5C591, 0x50303060,0x03010102,0xA96767CE,0x7D2B2B56,0x19FEFEE7,0x62D7D7B5,0xE6ABAB4D,0x9A7676EC, 0x45CACA8F,0x9D82821F,0x40C9C989,0x877D7DFA,0x15FAFAEF,0xEB5959B2,0xC947478E,0x0BF0F0FB, 0xECADAD41,0x67D4D4B3,0xFDA2A25F,0xEAAFAF45,0xBF9C9C23,0xF7A4A453,0x967272E4,0x5BC0C09B, 0xC2B7B775,0x1CFDFDE1,0xAE93933D,0x6A26264C,0x5A36366C,0x413F3F7E,0x02F7F7F5,0x4FCCCC83, 0x5C343468,0xF4A5A551,0x34E5E5D1,0x08F1F1F9,0x937171E2,0x73D8D8AB,0x53313162,0x3F15152A, 0x0C040408,0x52C7C795,0x65232346,0x5EC3C39D,0x28181830,0xA1969637,0x0F05050A,0xB59A9A2F, 0x0907070E,0x36121224,0x9B80801B,0x3DE2E2DF,0x26EBEBCD,0x6927274E,0xCDB2B27F,0x9F7575EA, 0x1B090912,0x9E83831D,0x742C2C58,0x2E1A1A34,0x2D1B1B36,0xB26E6EDC,0xEE5A5AB4,0xFBA0A05B, 0xF65252A4,0x4D3B3B76,0x61D6D6B7,0xCEB3B37D,0x7B292952,0x3EE3E3DD,0x712F2F5E,0x97848413, 0xF55353A6,0x68D1D1B9,0000000000,0x2CEDEDC1,0x60202040,0x1FFCFCE3,0xC8B1B179,0xED5B5BB6, 0xBE6A6AD4,0x46CBCB8D,0xD9BEBE67,0x4B393972,0xDE4A4A94,0xD44C4C98,0xE85858B0,0x4ACFCF85, 0x6BD0D0BB,0x2AEFEFC5,0xE5AAAA4F,0x16FBFBED,0xC5434386,0xD74D4D9A,0x55333366,0x94858511, 0xCF45458A,0x10F9F9E9,0x06020204,0x817F7FFE,0xF05050A0,0x443C3C78,0xBA9F9F25,0xE3A8A84B, 0xF35151A2,0xFEA3A35D,0xC0404080,0x8A8F8F05,0xAD92923F,0xBC9D9D21,0x48383870,0x04F5F5F1, 0xDFBCBC63,0xC1B6B677,0x75DADAAF,0x63212142,0x30101020,0x1AFFFFE5,0x0EF3F3FD,0x6DD2D2BF, 0x4CCDCD81,0x140C0C18,0x35131326,0x2FECECC3,0xE15F5FBE,0xA2979735,0xCC444488,0x3917172E, 0x57C4C493,0xF2A7A755,0x827E7EFC,0x473D3D7A,0xAC6464C8,0xE75D5DBA,0x2B191932,0x957373E6, 0xA06060C0,0x98818119,0xD14F4F9E,0x7FDCDCA3,0x66222244,0x7E2A2A54,0xAB90903B,0x8388880B, 0xCA46468C,0x29EEEEC7,0xD3B8B86B,0x3C141428,0x79DEDEA7,0xE25E5EBC,0x1D0B0B16,0x76DBDBAD, 0x3BE0E0DB,0x56323264,0x4E3A3A74,0x1E0A0A14,0xDB494992,0x0A06060C,0x6C242448,0xE45C5CB8, 0x5DC2C29F,0x6ED3D3BD,0xEFACAC43,0xA66262C4,0xA8919139,0xA4959531,0x37E4E4D3,0x8B7979F2, 0x32E7E7D5,0x43C8C88B,0x5937376E,0xB76D6DDA,0x8C8D8D01,0x64D5D5B1,0xD24E4E9C,0xE0A9A949, 0xB46C6CD8,0xFA5656AC,0x07F4F4F3,0x25EAEACF,0xAF6565CA,0x8E7A7AF4,0xE9AEAE47,0x18080810, 0xD5BABA6F,0x887878F0,0x6F25254A,0x722E2E5C,0x241C1C38,0xF1A6A657,0xC7B4B473,0x51C6C697, 0x23E8E8CB,0x7CDDDDA1,0x9C7474E8,0x211F1F3E,0xDD4B4B96,0xDCBDBD61,0x868B8B0D,0x858A8A0F, 0x907070E0,0x423E3E7C,0xC4B5B571,0xAA6666CC,0xD8484890,0x05030306,0x01F6F6F7,0x120E0E1C, 0xA36161C2,0x5F35356A,0xF95757AE,0xD0B9B969,0x91868617,0x58C1C199,0x271D1D3A,0xB99E9E27, 0x38E1E1D9,0x13F8F8EB,0xB398982B,0x33111122,0xBB6969D2,0x70D9D9A9,0x898E8E07,0xA7949433, 0xB69B9B2D,0x221E1E3C,0x92878715,0x20E9E9C9,0x49CECE87,0xFF5555AA,0x78282850,0x7ADFDFA5, 0x8F8C8C03,0xF8A1A159,0x80898909,0x170D0D1A,0xDABFBF65,0x31E6E6D7,0xC6424284,0xB86868D0, 0xC3414182,0xB0999929,0x772D2D5A,0x110F0F1E,0xCBB0B07B,0xFC5454A8,0xD6BBBB6D,0x3A16162C }, { 0x6363C6A5,0x7C7CF884,0x7777EE99,0x7B7BF68D,0xF2F2FF0D,0x6B6BD6BD,0x6F6FDEB1,0xC5C59154, 0x30306050,0x01010203,0x6767CEA9,0x2B2B567D,0xFEFEE719,0xD7D7B562,0xABAB4DE6,0x7676EC9A, 0xCACA8F45,0x82821F9D,0xC9C98940,0x7D7DFA87,0xFAFAEF15,0x5959B2EB,0x47478EC9,0xF0F0FB0B, 0xADAD41EC,0xD4D4B367,0xA2A25FFD,0xAFAF45EA,0x9C9C23BF,0xA4A453F7,0x7272E496,0xC0C09B5B, 0xB7B775C2,0xFDFDE11C,0x93933DAE,0x26264C6A,0x36366C5A,0x3F3F7E41,0xF7F7F502,0xCCCC834F, 0x3434685C,0xA5A551F4,0xE5E5D134,0xF1F1F908,0x7171E293,0xD8D8AB73,0x31316253,0x15152A3F, 0x0404080C,0xC7C79552,0x23234665,0xC3C39D5E,0x18183028,0x969637A1,0x05050A0F,0x9A9A2FB5, 0x07070E09,0x12122436,0x80801B9B,0xE2E2DF3D,0xEBEBCD26,0x27274E69,0xB2B27FCD,0x7575EA9F, 0x0909121B,0x83831D9E,0x2C2C5874,0x1A1A342E,0x1B1B362D,0x6E6EDCB2,0x5A5AB4EE,0xA0A05BFB, 0x5252A4F6,0x3B3B764D,0xD6D6B761,0xB3B37DCE,0x2929527B,0xE3E3DD3E,0x2F2F5E71,0x84841397, 0x5353A6F5,0xD1D1B968,0000000000,0xEDEDC12C,0x20204060,0xFCFCE31F,0xB1B179C8,0x5B5BB6ED, 0x6A6AD4BE,0xCBCB8D46,0xBEBE67D9,0x3939724B,0x4A4A94DE,0x4C4C98D4,0x5858B0E8,0xCFCF854A, 0xD0D0BB6B,0xEFEFC52A,0xAAAA4FE5,0xFBFBED16,0x434386C5,0x4D4D9AD7,0x33336655,0x85851194, 0x45458ACF,0xF9F9E910,0x02020406,0x7F7FFE81,0x5050A0F0,0x3C3C7844,0x9F9F25BA,0xA8A84BE3, 0x5151A2F3,0xA3A35DFE,0x404080C0,0x8F8F058A,0x92923FAD,0x9D9D21BC,0x38387048,0xF5F5F104, 0xBCBC63DF,0xB6B677C1,0xDADAAF75,0x21214263,0x10102030,0xFFFFE51A,0xF3F3FD0E,0xD2D2BF6D, 0xCDCD814C,0x0C0C1814,0x13132635,0xECECC32F,0x5F5FBEE1,0x979735A2,0x444488CC,0x17172E39, 0xC4C49357,0xA7A755F2,0x7E7EFC82,0x3D3D7A47,0x6464C8AC,0x5D5DBAE7,0x1919322B,0x7373E695, 0x6060C0A0,0x81811998,0x4F4F9ED1,0xDCDCA37F,0x22224466,0x2A2A547E,0x90903BAB,0x88880B83, 0x46468CCA,0xEEEEC729,0xB8B86BD3,0x1414283C,0xDEDEA779,0x5E5EBCE2,0x0B0B161D,0xDBDBAD76, 0xE0E0DB3B,0x32326456,0x3A3A744E,0x0A0A141E,0x494992DB,0x06060C0A,0x2424486C,0x5C5CB8E4, 0xC2C29F5D,0xD3D3BD6E,0xACAC43EF,0x6262C4A6,0x919139A8,0x959531A4,0xE4E4D337,0x7979F28B, 0xE7E7D532,0xC8C88B43,0x37376E59,0x6D6DDAB7,0x8D8D018C,0xD5D5B164,0x4E4E9CD2,0xA9A949E0, 0x6C6CD8B4,0x5656ACFA,0xF4F4F307,0xEAEACF25,0x6565CAAF,0x7A7AF48E,0xAEAE47E9,0x08081018, 0xBABA6FD5,0x7878F088,0x25254A6F,0x2E2E5C72,0x1C1C3824,0xA6A657F1,0xB4B473C7,0xC6C69751, 0xE8E8CB23,0xDDDDA17C,0x7474E89C,0x1F1F3E21,0x4B4B96DD,0xBDBD61DC,0x8B8B0D86,0x8A8A0F85, 0x7070E090,0x3E3E7C42,0xB5B571C4,0x6666CCAA,0x484890D8,0x03030605,0xF6F6F701,0x0E0E1C12, 0x6161C2A3,0x35356A5F,0x5757AEF9,0xB9B969D0,0x86861791,0xC1C19958,0x1D1D3A27,0x9E9E27B9, 0xE1E1D938,0xF8F8EB13,0x98982BB3,0x11112233,0x6969D2BB,0xD9D9A970,0x8E8E0789,0x949433A7, 0x9B9B2DB6,0x1E1E3C22,0x87871592,0xE9E9C920,0xCECE8749,0x5555AAFF,0x28285078,0xDFDFA57A, 0x8C8C038F,0xA1A159F8,0x89890980,0x0D0D1A17,0xBFBF65DA,0xE6E6D731,0x424284C6,0x6868D0B8, 0x414182C3,0x999929B0,0x2D2D5A77,0x0F0F1E11,0xB0B07BCB,0x5454A8FC,0xBBBB6DD6,0x16162C3A }, { 0x63C6A563,0x7CF8847C,0x77EE9977,0x7BF68D7B,0xF2FF0DF2,0x6BD6BD6B,0x6FDEB16F,0xC59154C5, 0x30605030,0x01020301,0x67CEA967,0x2B567D2B,0xFEE719FE,0xD7B562D7,0xAB4DE6AB,0x76EC9A76, 0xCA8F45CA,0x821F9D82,0xC98940C9,0x7DFA877D,0xFAEF15FA,0x59B2EB59,0x478EC947,0xF0FB0BF0, 0xAD41ECAD,0xD4B367D4,0xA25FFDA2,0xAF45EAAF,0x9C23BF9C,0xA453F7A4,0x72E49672,0xC09B5BC0, 0xB775C2B7,0xFDE11CFD,0x933DAE93,0x264C6A26,0x366C5A36,0x3F7E413F,0xF7F502F7,0xCC834FCC, 0x34685C34,0xA551F4A5,0xE5D134E5,0xF1F908F1,0x71E29371,0xD8AB73D8,0x31625331,0x152A3F15, 0x04080C04,0xC79552C7,0x23466523,0xC39D5EC3,0x18302818,0x9637A196,0x050A0F05,0x9A2FB59A, 0x070E0907,0x12243612,0x801B9B80,0xE2DF3DE2,0xEBCD26EB,0x274E6927,0xB27FCDB2,0x75EA9F75, 0x09121B09,0x831D9E83,0x2C58742C,0x1A342E1A,0x1B362D1B,0x6EDCB26E,0x5AB4EE5A,0xA05BFBA0, 0x52A4F652,0x3B764D3B,0xD6B761D6,0xB37DCEB3,0x29527B29,0xE3DD3EE3,0x2F5E712F,0x84139784, 0x53A6F553,0xD1B968D1,0000000000,0xEDC12CED,0x20406020,0xFCE31FFC,0xB179C8B1,0x5BB6ED5B, 0x6AD4BE6A,0xCB8D46CB,0xBE67D9BE,0x39724B39,0x4A94DE4A,0x4C98D44C,0x58B0E858,0xCF854ACF, 0xD0BB6BD0,0xEFC52AEF,0xAA4FE5AA,0xFBED16FB,0x4386C543,0x4D9AD74D,0x33665533,0x85119485, 0x458ACF45,0xF9E910F9,0x02040602,0x7FFE817F,0x50A0F050,0x3C78443C,0x9F25BA9F,0xA84BE3A8, 0x51A2F351,0xA35DFEA3,0x4080C040,0x8F058A8F,0x923FAD92,0x9D21BC9D,0x38704838,0xF5F104F5, 0xBC63DFBC,0xB677C1B6,0xDAAF75DA,0x21426321,0x10203010,0xFFE51AFF,0xF3FD0EF3,0xD2BF6DD2, 0xCD814CCD,0x0C18140C,0x13263513,0xECC32FEC,0x5FBEE15F,0x9735A297,0x4488CC44,0x172E3917, 0xC49357C4,0xA755F2A7,0x7EFC827E,0x3D7A473D,0x64C8AC64,0x5DBAE75D,0x19322B19,0x73E69573, 0x60C0A060,0x81199881,0x4F9ED14F,0xDCA37FDC,0x22446622,0x2A547E2A,0x903BAB90,0x880B8388, 0x468CCA46,0xEEC729EE,0xB86BD3B8,0x14283C14,0xDEA779DE,0x5EBCE25E,0x0B161D0B,0xDBAD76DB, 0xE0DB3BE0,0x32645632,0x3A744E3A,0x0A141E0A,0x4992DB49,0x060C0A06,0x24486C24,0x5CB8E45C, 0xC29F5DC2,0xD3BD6ED3,0xAC43EFAC,0x62C4A662,0x9139A891,0x9531A495,0xE4D337E4,0x79F28B79, 0xE7D532E7,0xC88B43C8,0x376E5937,0x6DDAB76D,0x8D018C8D,0xD5B164D5,0x4E9CD24E,0xA949E0A9, 0x6CD8B46C,0x56ACFA56,0xF4F307F4,0xEACF25EA,0x65CAAF65,0x7AF48E7A,0xAE47E9AE,0x08101808, 0xBA6FD5BA,0x78F08878,0x254A6F25,0x2E5C722E,0x1C38241C,0xA657F1A6,0xB473C7B4,0xC69751C6, 0xE8CB23E8,0xDDA17CDD,0x74E89C74,0x1F3E211F,0x4B96DD4B,0xBD61DCBD,0x8B0D868B,0x8A0F858A, 0x70E09070,0x3E7C423E,0xB571C4B5,0x66CCAA66,0x4890D848,0x03060503,0xF6F701F6,0x0E1C120E, 0x61C2A361,0x356A5F35,0x57AEF957,0xB969D0B9,0x86179186,0xC19958C1,0x1D3A271D,0x9E27B99E, 0xE1D938E1,0xF8EB13F8,0x982BB398,0x11223311,0x69D2BB69,0xD9A970D9,0x8E07898E,0x9433A794, 0x9B2DB69B,0x1E3C221E,0x87159287,0xE9C920E9,0xCE8749CE,0x55AAFF55,0x28507828,0xDFA57ADF, 0x8C038F8C,0xA159F8A1,0x89098089,0x0D1A170D,0xBF65DABF,0xE6D731E6,0x4284C642,0x68D0B868, 0x4182C341,0x9929B099,0x2D5A772D,0x0F1E110F,0xB07BCBB0,0x54A8FC54,0xBB6DD6BB,0x162C3A16 }, { 0xC6A56363,0xF8847C7C,0xEE997777,0xF68D7B7B,0xFF0DF2F2,0xD6BD6B6B,0xDEB16F6F,0x9154C5C5, 0x60503030,0x02030101,0xCEA96767,0x567D2B2B,0xE719FEFE,0xB562D7D7,0x4DE6ABAB,0xEC9A7676, 0x8F45CACA,0x1F9D8282,0x8940C9C9,0xFA877D7D,0xEF15FAFA,0xB2EB5959,0x8EC94747,0xFB0BF0F0, 0x41ECADAD,0xB367D4D4,0x5FFDA2A2,0x45EAAFAF,0x23BF9C9C,0x53F7A4A4,0xE4967272,0x9B5BC0C0, 0x75C2B7B7,0xE11CFDFD,0x3DAE9393,0x4C6A2626,0x6C5A3636,0x7E413F3F,0xF502F7F7,0x834FCCCC, 0x685C3434,0x51F4A5A5,0xD134E5E5,0xF908F1F1,0xE2937171,0xAB73D8D8,0x62533131,0x2A3F1515, 0x080C0404,0x9552C7C7,0x46652323,0x9D5EC3C3,0x30281818,0x37A19696,0x0A0F0505,0x2FB59A9A, 0x0E090707,0x24361212,0x1B9B8080,0xDF3DE2E2,0xCD26EBEB,0x4E692727,0x7FCDB2B2,0xEA9F7575, 0x121B0909,0x1D9E8383,0x58742C2C,0x342E1A1A,0x362D1B1B,0xDCB26E6E,0xB4EE5A5A,0x5BFBA0A0, 0xA4F65252,0x764D3B3B,0xB761D6D6,0x7DCEB3B3,0x527B2929,0xDD3EE3E3,0x5E712F2F,0x13978484, 0xA6F55353,0xB968D1D1,0000000000,0xC12CEDED,0x40602020,0xE31FFCFC,0x79C8B1B1,0xB6ED5B5B, 0xD4BE6A6A,0x8D46CBCB,0x67D9BEBE,0x724B3939,0x94DE4A4A,0x98D44C4C,0xB0E85858,0x854ACFCF, 0xBB6BD0D0,0xC52AEFEF,0x4FE5AAAA,0xED16FBFB,0x86C54343,0x9AD74D4D,0x66553333,0x11948585, 0x8ACF4545,0xE910F9F9,0x04060202,0xFE817F7F,0xA0F05050,0x78443C3C,0x25BA9F9F,0x4BE3A8A8, 0xA2F35151,0x5DFEA3A3,0x80C04040,0x058A8F8F,0x3FAD9292,0x21BC9D9D,0x70483838,0xF104F5F5, 0x63DFBCBC,0x77C1B6B6,0xAF75DADA,0x42632121,0x20301010,0xE51AFFFF,0xFD0EF3F3,0xBF6DD2D2, 0x814CCDCD,0x18140C0C,0x26351313,0xC32FECEC,0xBEE15F5F,0x35A29797,0x88CC4444,0x2E391717, 0x9357C4C4,0x55F2A7A7,0xFC827E7E,0x7A473D3D,0xC8AC6464,0xBAE75D5D,0x322B1919,0xE6957373, 0xC0A06060,0x19988181,0x9ED14F4F,0xA37FDCDC,0x44662222,0x547E2A2A,0x3BAB9090,0x0B838888, 0x8CCA4646,0xC729EEEE,0x6BD3B8B8,0x283C1414,0xA779DEDE,0xBCE25E5E,0x161D0B0B,0xAD76DBDB, 0xDB3BE0E0,0x64563232,0x744E3A3A,0x141E0A0A,0x92DB4949,0x0C0A0606,0x486C2424,0xB8E45C5C, 0x9F5DC2C2,0xBD6ED3D3,0x43EFACAC,0xC4A66262,0x39A89191,0x31A49595,0xD337E4E4,0xF28B7979, 0xD532E7E7,0x8B43C8C8,0x6E593737,0xDAB76D6D,0x018C8D8D,0xB164D5D5,0x9CD24E4E,0x49E0A9A9, 0xD8B46C6C,0xACFA5656,0xF307F4F4,0xCF25EAEA,0xCAAF6565,0xF48E7A7A,0x47E9AEAE,0x10180808, 0x6FD5BABA,0xF0887878,0x4A6F2525,0x5C722E2E,0x38241C1C,0x57F1A6A6,0x73C7B4B4,0x9751C6C6, 0xCB23E8E8,0xA17CDDDD,0xE89C7474,0x3E211F1F,0x96DD4B4B,0x61DCBDBD,0x0D868B8B,0x0F858A8A, 0xE0907070,0x7C423E3E,0x71C4B5B5,0xCCAA6666,0x90D84848,0x06050303,0xF701F6F6,0x1C120E0E, 0xC2A36161,0x6A5F3535,0xAEF95757,0x69D0B9B9,0x17918686,0x9958C1C1,0x3A271D1D,0x27B99E9E, 0xD938E1E1,0xEB13F8F8,0x2BB39898,0x22331111,0xD2BB6969,0xA970D9D9,0x07898E8E,0x33A79494, 0x2DB69B9B,0x3C221E1E,0x15928787,0xC920E9E9,0x8749CECE,0xAAFF5555,0x50782828,0xA57ADFDF, 0x038F8C8C,0x59F8A1A1,0x09808989,0x1A170D0D,0x65DABFBF,0xD731E6E6,0x84C64242,0xD0B86868, 0x82C34141,0x29B09999,0x5A772D2D,0x1E110F0F,0x7BCBB0B0,0xA8FC5454,0x6DD6BBBB,0x2C3A1616 } }; static uint32_t fl_tab[4][256] = { { 0x00000063,0x0000007C,0x00000077,0x0000007B,0x000000F2,0x0000006B,0x0000006F,0x000000C5, 0x00000030,0x00000001,0x00000067,0x0000002B,0x000000FE,0x000000D7,0x000000AB,0x00000076, 0x000000CA,0x00000082,0x000000C9,0x0000007D,0x000000FA,0x00000059,0x00000047,0x000000F0, 0x000000AD,0x000000D4,0x000000A2,0x000000AF,0x0000009C,0x000000A4,0x00000072,0x000000C0, 0x000000B7,0x000000FD,0x00000093,0x00000026,0x00000036,0x0000003F,0x000000F7,0x000000CC, 0x00000034,0x000000A5,0x000000E5,0x000000F1,0x00000071,0x000000D8,0x00000031,0x00000015, 0x00000004,0x000000C7,0x00000023,0x000000C3,0x00000018,0x00000096,0x00000005,0x0000009A, 0x00000007,0x00000012,0x00000080,0x000000E2,0x000000EB,0x00000027,0x000000B2,0x00000075, 0x00000009,0x00000083,0x0000002C,0x0000001A,0x0000001B,0x0000006E,0x0000005A,0x000000A0, 0x00000052,0x0000003B,0x000000D6,0x000000B3,0x00000029,0x000000E3,0x0000002F,0x00000084, 0x00000053,0x000000D1,0x00000000,0x000000ED,0x00000020,0x000000FC,0x000000B1,0x0000005B, 0x0000006A,0x000000CB,0x000000BE,0x00000039,0x0000004A,0x0000004C,0x00000058,0x000000CF, 0x000000D0,0x000000EF,0x000000AA,0x000000FB,0x00000043,0x0000004D,0x00000033,0x00000085, 0x00000045,0x000000F9,0x00000002,0x0000007F,0x00000050,0x0000003C,0x0000009F,0x000000A8, 0x00000051,0x000000A3,0x00000040,0x0000008F,0x00000092,0x0000009D,0x00000038,0x000000F5, 0x000000BC,0x000000B6,0x000000DA,0x00000021,0x00000010,0x000000FF,0x000000F3,0x000000D2, 0x000000CD,0x0000000C,0x00000013,0x000000EC,0x0000005F,0x00000097,0x00000044,0x00000017, 0x000000C4,0x000000A7,0x0000007E,0x0000003D,0x00000064,0x0000005D,0x00000019,0x00000073, 0x00000060,0x00000081,0x0000004F,0x000000DC,0x00000022,0x0000002A,0x00000090,0x00000088, 0x00000046,0x000000EE,0x000000B8,0x00000014,0x000000DE,0x0000005E,0x0000000B,0x000000DB, 0x000000E0,0x00000032,0x0000003A,0x0000000A,0x00000049,0x00000006,0x00000024,0x0000005C, 0x000000C2,0x000000D3,0x000000AC,0x00000062,0x00000091,0x00000095,0x000000E4,0x00000079, 0x000000E7,0x000000C8,0x00000037,0x0000006D,0x0000008D,0x000000D5,0x0000004E,0x000000A9, 0x0000006C,0x00000056,0x000000F4,0x000000EA,0x00000065,0x0000007A,0x000000AE,0x00000008, 0x000000BA,0x00000078,0x00000025,0x0000002E,0x0000001C,0x000000A6,0x000000B4,0x000000C6, 0x000000E8,0x000000DD,0x00000074,0x0000001F,0x0000004B,0x000000BD,0x0000008B,0x0000008A, 0x00000070,0x0000003E,0x000000B5,0x00000066,0x00000048,0x00000003,0x000000F6,0x0000000E, 0x00000061,0x00000035,0x00000057,0x000000B9,0x00000086,0x000000C1,0x0000001D,0x0000009E, 0x000000E1,0x000000F8,0x00000098,0x00000011,0x00000069,0x000000D9,0x0000008E,0x00000094, 0x0000009B,0x0000001E,0x00000087,0x000000E9,0x000000CE,0x00000055,0x00000028,0x000000DF, 0x0000008C,0x000000A1,0x00000089,0x0000000D,0x000000BF,0x000000E6,0x00000042,0x00000068, 0x00000041,0x00000099,0x0000002D,0x0000000F,0x000000B0,0x00000054,0x000000BB,0x00000016 }, { 0x00006300,0x00007C00,0x00007700,0x00007B00,0x0000F200,0x00006B00,0x00006F00,0x0000C500, 0x00003000,0x00000100,0x00006700,0x00002B00,0x0000FE00,0x0000D700,0x0000AB00,0x00007600, 0x0000CA00,0x00008200,0x0000C900,0x00007D00,0x0000FA00,0x00005900,0x00004700,0x0000F000, 0x0000AD00,0x0000D400,0x0000A200,0x0000AF00,0x00009C00,0x0000A400,0x00007200,0x0000C000, 0x0000B700,0x0000FD00,0x00009300,0x00002600,0x00003600,0x00003F00,0x0000F700,0x0000CC00, 0x00003400,0x0000A500,0x0000E500,0x0000F100,0x00007100,0x0000D800,0x00003100,0x00001500, 0x00000400,0x0000C700,0x00002300,0x0000C300,0x00001800,0x00009600,0x00000500,0x00009A00, 0x00000700,0x00001200,0x00008000,0x0000E200,0x0000EB00,0x00002700,0x0000B200,0x00007500, 0x00000900,0x00008300,0x00002C00,0x00001A00,0x00001B00,0x00006E00,0x00005A00,0x0000A000, 0x00005200,0x00003B00,0x0000D600,0x0000B300,0x00002900,0x0000E300,0x00002F00,0x00008400, 0x00005300,0x0000D100,0000000000,0x0000ED00,0x00002000,0x0000FC00,0x0000B100,0x00005B00, 0x00006A00,0x0000CB00,0x0000BE00,0x00003900,0x00004A00,0x00004C00,0x00005800,0x0000CF00, 0x0000D000,0x0000EF00,0x0000AA00,0x0000FB00,0x00004300,0x00004D00,0x00003300,0x00008500, 0x00004500,0x0000F900,0x00000200,0x00007F00,0x00005000,0x00003C00,0x00009F00,0x0000A800, 0x00005100,0x0000A300,0x00004000,0x00008F00,0x00009200,0x00009D00,0x00003800,0x0000F500, 0x0000BC00,0x0000B600,0x0000DA00,0x00002100,0x00001000,0x0000FF00,0x0000F300,0x0000D200, 0x0000CD00,0x00000C00,0x00001300,0x0000EC00,0x00005F00,0x00009700,0x00004400,0x00001700, 0x0000C400,0x0000A700,0x00007E00,0x00003D00,0x00006400,0x00005D00,0x00001900,0x00007300, 0x00006000,0x00008100,0x00004F00,0x0000DC00,0x00002200,0x00002A00,0x00009000,0x00008800, 0x00004600,0x0000EE00,0x0000B800,0x00001400,0x0000DE00,0x00005E00,0x00000B00,0x0000DB00, 0x0000E000,0x00003200,0x00003A00,0x00000A00,0x00004900,0x00000600,0x00002400,0x00005C00, 0x0000C200,0x0000D300,0x0000AC00,0x00006200,0x00009100,0x00009500,0x0000E400,0x00007900, 0x0000E700,0x0000C800,0x00003700,0x00006D00,0x00008D00,0x0000D500,0x00004E00,0x0000A900, 0x00006C00,0x00005600,0x0000F400,0x0000EA00,0x00006500,0x00007A00,0x0000AE00,0x00000800, 0x0000BA00,0x00007800,0x00002500,0x00002E00,0x00001C00,0x0000A600,0x0000B400,0x0000C600, 0x0000E800,0x0000DD00,0x00007400,0x00001F00,0x00004B00,0x0000BD00,0x00008B00,0x00008A00, 0x00007000,0x00003E00,0x0000B500,0x00006600,0x00004800,0x00000300,0x0000F600,0x00000E00, 0x00006100,0x00003500,0x00005700,0x0000B900,0x00008600,0x0000C100,0x00001D00,0x00009E00, 0x0000E100,0x0000F800,0x00009800,0x00001100,0x00006900,0x0000D900,0x00008E00,0x00009400, 0x00009B00,0x00001E00,0x00008700,0x0000E900,0x0000CE00,0x00005500,0x00002800,0x0000DF00, 0x00008C00,0x0000A100,0x00008900,0x00000D00,0x0000BF00,0x0000E600,0x00004200,0x00006800, 0x00004100,0x00009900,0x00002D00,0x00000F00,0x0000B000,0x00005400,0x0000BB00,0x00001600 }, { 0x00630000,0x007C0000,0x00770000,0x007B0000,0x00F20000,0x006B0000,0x006F0000,0x00C50000, 0x00300000,0x00010000,0x00670000,0x002B0000,0x00FE0000,0x00D70000,0x00AB0000,0x00760000, 0x00CA0000,0x00820000,0x00C90000,0x007D0000,0x00FA0000,0x00590000,0x00470000,0x00F00000, 0x00AD0000,0x00D40000,0x00A20000,0x00AF0000,0x009C0000,0x00A40000,0x00720000,0x00C00000, 0x00B70000,0x00FD0000,0x00930000,0x00260000,0x00360000,0x003F0000,0x00F70000,0x00CC0000, 0x00340000,0x00A50000,0x00E50000,0x00F10000,0x00710000,0x00D80000,0x00310000,0x00150000, 0x00040000,0x00C70000,0x00230000,0x00C30000,0x00180000,0x00960000,0x00050000,0x009A0000, 0x00070000,0x00120000,0x00800000,0x00E20000,0x00EB0000,0x00270000,0x00B20000,0x00750000, 0x00090000,0x00830000,0x002C0000,0x001A0000,0x001B0000,0x006E0000,0x005A0000,0x00A00000, 0x00520000,0x003B0000,0x00D60000,0x00B30000,0x00290000,0x00E30000,0x002F0000,0x00840000, 0x00530000,0x00D10000,0000000000,0x00ED0000,0x00200000,0x00FC0000,0x00B10000,0x005B0000, 0x006A0000,0x00CB0000,0x00BE0000,0x00390000,0x004A0000,0x004C0000,0x00580000,0x00CF0000, 0x00D00000,0x00EF0000,0x00AA0000,0x00FB0000,0x00430000,0x004D0000,0x00330000,0x00850000, 0x00450000,0x00F90000,0x00020000,0x007F0000,0x00500000,0x003C0000,0x009F0000,0x00A80000, 0x00510000,0x00A30000,0x00400000,0x008F0000,0x00920000,0x009D0000,0x00380000,0x00F50000, 0x00BC0000,0x00B60000,0x00DA0000,0x00210000,0x00100000,0x00FF0000,0x00F30000,0x00D20000, 0x00CD0000,0x000C0000,0x00130000,0x00EC0000,0x005F0000,0x00970000,0x00440000,0x00170000, 0x00C40000,0x00A70000,0x007E0000,0x003D0000,0x00640000,0x005D0000,0x00190000,0x00730000, 0x00600000,0x00810000,0x004F0000,0x00DC0000,0x00220000,0x002A0000,0x00900000,0x00880000, 0x00460000,0x00EE0000,0x00B80000,0x00140000,0x00DE0000,0x005E0000,0x000B0000,0x00DB0000, 0x00E00000,0x00320000,0x003A0000,0x000A0000,0x00490000,0x00060000,0x00240000,0x005C0000, 0x00C20000,0x00D30000,0x00AC0000,0x00620000,0x00910000,0x00950000,0x00E40000,0x00790000, 0x00E70000,0x00C80000,0x00370000,0x006D0000,0x008D0000,0x00D50000,0x004E0000,0x00A90000, 0x006C0000,0x00560000,0x00F40000,0x00EA0000,0x00650000,0x007A0000,0x00AE0000,0x00080000, 0x00BA0000,0x00780000,0x00250000,0x002E0000,0x001C0000,0x00A60000,0x00B40000,0x00C60000, 0x00E80000,0x00DD0000,0x00740000,0x001F0000,0x004B0000,0x00BD0000,0x008B0000,0x008A0000, 0x00700000,0x003E0000,0x00B50000,0x00660000,0x00480000,0x00030000,0x00F60000,0x000E0000, 0x00610000,0x00350000,0x00570000,0x00B90000,0x00860000,0x00C10000,0x001D0000,0x009E0000, 0x00E10000,0x00F80000,0x00980000,0x00110000,0x00690000,0x00D90000,0x008E0000,0x00940000, 0x009B0000,0x001E0000,0x00870000,0x00E90000,0x00CE0000,0x00550000,0x00280000,0x00DF0000, 0x008C0000,0x00A10000,0x00890000,0x000D0000,0x00BF0000,0x00E60000,0x00420000,0x00680000, 0x00410000,0x00990000,0x002D0000,0x000F0000,0x00B00000,0x00540000,0x00BB0000,0x00160000 }, { 0x63000000,0x7C000000,0x77000000,0x7B000000,0xF2000000,0x6B000000,0x6F000000,0xC5000000, 0x30000000,0x01000000,0x67000000,0x2B000000,0xFE000000,0xD7000000,0xAB000000,0x76000000, 0xCA000000,0x82000000,0xC9000000,0x7D000000,0xFA000000,0x59000000,0x47000000,0xF0000000, 0xAD000000,0xD4000000,0xA2000000,0xAF000000,0x9C000000,0xA4000000,0x72000000,0xC0000000, 0xB7000000,0xFD000000,0x93000000,0x26000000,0x36000000,0x3F000000,0xF7000000,0xCC000000, 0x34000000,0xA5000000,0xE5000000,0xF1000000,0x71000000,0xD8000000,0x31000000,0x15000000, 0x04000000,0xC7000000,0x23000000,0xC3000000,0x18000000,0x96000000,0x05000000,0x9A000000, 0x07000000,0x12000000,0x80000000,0xE2000000,0xEB000000,0x27000000,0xB2000000,0x75000000, 0x09000000,0x83000000,0x2C000000,0x1A000000,0x1B000000,0x6E000000,0x5A000000,0xA0000000, 0x52000000,0x3B000000,0xD6000000,0xB3000000,0x29000000,0xE3000000,0x2F000000,0x84000000, 0x53000000,0xD1000000,0000000000,0xED000000,0x20000000,0xFC000000,0xB1000000,0x5B000000, 0x6A000000,0xCB000000,0xBE000000,0x39000000,0x4A000000,0x4C000000,0x58000000,0xCF000000, 0xD0000000,0xEF000000,0xAA000000,0xFB000000,0x43000000,0x4D000000,0x33000000,0x85000000, 0x45000000,0xF9000000,0x02000000,0x7F000000,0x50000000,0x3C000000,0x9F000000,0xA8000000, 0x51000000,0xA3000000,0x40000000,0x8F000000,0x92000000,0x9D000000,0x38000000,0xF5000000, 0xBC000000,0xB6000000,0xDA000000,0x21000000,0x10000000,0xFF000000,0xF3000000,0xD2000000, 0xCD000000,0x0C000000,0x13000000,0xEC000000,0x5F000000,0x97000000,0x44000000,0x17000000, 0xC4000000,0xA7000000,0x7E000000,0x3D000000,0x64000000,0x5D000000,0x19000000,0x73000000, 0x60000000,0x81000000,0x4F000000,0xDC000000,0x22000000,0x2A000000,0x90000000,0x88000000, 0x46000000,0xEE000000,0xB8000000,0x14000000,0xDE000000,0x5E000000,0x0B000000,0xDB000000, 0xE0000000,0x32000000,0x3A000000,0x0A000000,0x49000000,0x06000000,0x24000000,0x5C000000, 0xC2000000,0xD3000000,0xAC000000,0x62000000,0x91000000,0x95000000,0xE4000000,0x79000000, 0xE7000000,0xC8000000,0x37000000,0x6D000000,0x8D000000,0xD5000000,0x4E000000,0xA9000000, 0x6C000000,0x56000000,0xF4000000,0xEA000000,0x65000000,0x7A000000,0xAE000000,0x08000000, 0xBA000000,0x78000000,0x25000000,0x2E000000,0x1C000000,0xA6000000,0xB4000000,0xC6000000, 0xE8000000,0xDD000000,0x74000000,0x1F000000,0x4B000000,0xBD000000,0x8B000000,0x8A000000, 0x70000000,0x3E000000,0xB5000000,0x66000000,0x48000000,0x03000000,0xF6000000,0x0E000000, 0x61000000,0x35000000,0x57000000,0xB9000000,0x86000000,0xC1000000,0x1D000000,0x9E000000, 0xE1000000,0xF8000000,0x98000000,0x11000000,0x69000000,0xD9000000,0x8E000000,0x94000000, 0x9B000000,0x1E000000,0x87000000,0xE9000000,0xCE000000,0x55000000,0x28000000,0xDF000000, 0x8C000000,0xA1000000,0x89000000,0x0D000000,0xBF000000,0xE6000000,0x42000000,0x68000000, 0x41000000,0x99000000,0x2D000000,0x0F000000,0xB0000000,0x54000000,0xBB000000,0x16000000 } }; /*----------------- The workspace ------------------------------*/ static uint32_t Ekey[44]; /* The expanded key */ /*------ The round Function. 4 table lookups and 4 Exors ------*/ #define f_rnd(x, n) \ ( ft_tab[0][byte0(x[n])] \ ^ ft_tab[1][byte1(x[(n + 1) & 3])] \ ^ ft_tab[2][byte2(x[(n + 2) & 3])] \ ^ ft_tab[3][byte3(x[(n + 3) & 3])] ) #define f_round(bo, bi, k) \ bo[0] = f_rnd(bi, 0) ^ k[0]; \ bo[1] = f_rnd(bi, 1) ^ k[1]; \ bo[2] = f_rnd(bi, 2) ^ k[2]; \ bo[3] = f_rnd(bi, 3) ^ k[3]; \ k += 4 /*--- The S Box lookup used in constructing the Key schedule ---*/ #define ls_box(x) \ ( fl_tab[0][byte0(x)] \ ^ fl_tab[1][byte1(x)] \ ^ fl_tab[2][byte2(x)] \ ^ fl_tab[3][byte3(x)] ) /*------------ The last round function (no MixColumn) ----------*/ #define lf_rnd(x, n) \ ( fl_tab[0][byte0(x[n])] \ ^ fl_tab[1][byte1(x[(n + 1) & 3])] \ ^ fl_tab[2][byte2(x[(n + 2) & 3])] \ ^ fl_tab[3][byte3(x[(n + 3) & 3])] ) /*----------------------------------------------------------- * RijndaelKeySchedule * Initialise the key schedule from a supplied key */ void RijndaelKeySchedule(uint8_t key[16]) { uint32_t t; uint32_t *ek=Ekey, /* pointer to the expanded key */ *rc=rnd_con; /* pointer to the round constant */ Ekey[0] = u32_in(key ); Ekey[1] = u32_in(key + 4); Ekey[2] = u32_in(key + 8); Ekey[3] = u32_in(key + 12); while(ek < Ekey + 40) { t = rot3(ek[3]); ek[4] = ek[0] ^ ls_box(t) ^ *rc++; ek[5] = ek[1] ^ ek[4]; ek[6] = ek[2] ^ ek[5]; ek[7] = ek[3] ^ ek[6]; ek += 4; } } /*----------------------------------------------------------- * RijndaelEncrypt * Encrypt an input block */ void RijndaelEncrypt(uint8_t in[16], uint8_t out[16]) { uint32_t b0[4], b1[4], *kp = Ekey; b0[0] = u32_in(in ) ^ *kp++; b0[1] = u32_in(in + 4) ^ *kp++; b0[2] = u32_in(in + 8) ^ *kp++; b0[3] = u32_in(in + 12) ^ *kp++; f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); f_round(b0, b1, kp); f_round(b1, b0, kp); u32_out(out, lf_rnd(b1, 0) ^ kp[0]); u32_out(out + 4, lf_rnd(b1, 1) ^ kp[1]); u32_out(out + 8, lf_rnd(b1, 2) ^ kp[2]); u32_out(out + 12, lf_rnd(b1, 3) ^ kp[3]); } sipp-3.5.1/src/strings.cpp0000644000175000017500000001752212672462535014534 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include "strings.hpp" #include #include #include #include void get_host_and_port(const char * addr, char * host, int * port) { /* Separate the port number (if any) from the host name. * Thing is, the separator is a colon (':'). The colon may also exist * in the host portion if the host is specified as an IPv6 address (see * RFC 2732). If that's the case, then we need to skip past the IPv6 * address, which should be contained within square brackets ('[',']'). */ const char *has_brackets; int len; int port_result = 0; has_brackets = strchr(addr, '['); if (has_brackets != NULL) { has_brackets = strchr(has_brackets, ']'); } if (has_brackets == NULL) { /* addr is not a []-enclosed IPv6 address, but might still be IPv6 (without * a port), or IPv4 or a hostname (with or without a port) */ char *first_colon_location; char *second_colon_location; len = strlen(addr) + 1; memmove(host, addr, len); first_colon_location = strchr(host, ':'); if (first_colon_location == NULL) { /* No colon - just set the port to 0 */ port_result = 0; } else { second_colon_location = strchr(first_colon_location + 1, ':'); if (second_colon_location != NULL) { /* Found a second colon in addr - so this is an IPv6 address * without a port. Set the port to 0 */ port_result = 0; } else { /* IPv4 address or hostname with a colon in it - convert the colon to * a NUL terminator, and set the value after it as the port */ *first_colon_location = '\0'; port_result = atol(first_colon_location + 1); } } } else { /* If '['..']' found, */ const char *initial_bracket; /* extract the remote_host */ char *second_bracket; char *colon_before_port; initial_bracket = strchr( addr, '[' ); initial_bracket++; /* Step forward one character */ len = strlen(initial_bracket) + 1; memmove(host, initial_bracket, len); second_bracket = strchr( host, ']' ); *second_bracket = '\0'; /* Check for a port specified after the ] */ colon_before_port = strchr(second_bracket + 1, ':'); if (colon_before_port != NULL) { port_result = atol(colon_before_port + 1); } else { port_result = 0; } } // Set the port argument if it wasn't NULL if (port != NULL) { *port = port_result; } } static unsigned char tolower_table[256]; void init_tolower_table() { for (int i = 0; i < 256; i++) { tolower_table[i] = tolower(i); } } /* This is simpler than doing a regular tolower, because there are no branches. * We also inline it, so that we don't have function call overheads. * * An alternative to a table would be to do (c | 0x20), but that only works if * we are sure that we are searching for characters (or don't care if they are * not characters. */ unsigned char inline mytolower(unsigned char c) { return tolower_table[c]; } char * strcasestr2(char *s, const char *find) { char c, sc; size_t len; if ((c = *find++) != 0) { c = mytolower((unsigned char)c); len = strlen(find); do { do { if ((sc = *s++) == 0) return (NULL); } while ((char)mytolower((unsigned char)sc) != c); } while (strncasecmp(s, find, len) != 0); s--; } return ((char *)s); } char * strncasestr(char *s, const char *find, size_t n) { char *end = s + n; char c, sc; size_t len; if ((c = *find++) != 0) { c = mytolower((unsigned char)c); len = strlen(find); end -= (len - 1); do { do { if ((sc = *s++) == 0) return (NULL); if (s >= end) return (NULL); } while ((char)mytolower((unsigned char)sc) != c); } while (strncasecmp(s, find, len) != 0); s--; } return ((char *)s); } int get_decimal_from_hex(char hex) { if (isdigit(hex)) return hex - '0'; else return tolower(hex) - 'a' + 10; } void trim(char *s) { char *p = s; while(isspace(*p)) { p++; } int l = strlen(p); for (int i = l - 1; i >= 0 && isspace(p[i]); i--) { p[i] = '\0'; } memmove(s, p, l + 1); } #ifdef GTEST #include "gtest/gtest.h" TEST(GetHostAndPort, IPv6) { int port_result = -1; char host_result[255]; get_host_and_port("fe80::92a4:deff:fe74:7af5", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv6Brackets) { int port_result = -1; char host_result[255]; get_host_and_port("[fe80::92a4:deff:fe74:7af5]", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv6BracketsAndPort) { int port_result = -1; char host_result[255]; get_host_and_port("[fe80::92a4:deff:fe74:7af5]:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("fe80::92a4:deff:fe74:7af5", host_result); } TEST(GetHostAndPort, IPv4) { int port_result = -1; char host_result[255]; get_host_and_port("127.0.0.1", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, IPv4AndPort) { int port_result = -1; char host_result[255]; get_host_and_port("127.0.0.1:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, IgnorePort) { char host_result[255]; get_host_and_port("127.0.0.1", host_result, NULL); EXPECT_STREQ("127.0.0.1", host_result); } TEST(GetHostAndPort, DNS) { int port_result = -1; char host_result[255]; get_host_and_port("sipp.sf.net", host_result, &port_result); EXPECT_EQ(0, port_result); EXPECT_STREQ("sipp.sf.net", host_result); } TEST(GetHostAndPort, DNSAndPort) { int port_result = -1; char host_result[255]; get_host_and_port("sipp.sf.net:999", host_result, &port_result); EXPECT_EQ(999, port_result); EXPECT_STREQ("sipp.sf.net", host_result); } #endif //GTEST sipp-3.5.1/src/milenage.c0000644000175000017500000001721012672462535014256 0ustar vsevavseva/*------------------------------------------------------------------- * Example algorithms f1, f1*, f2, f3, f4, f5, f5* *------------------------------------------------------------------- * * A sample implementation of the example 3GPP authentication and * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is * a byte-oriented implementation of the functions, and of the block * cipher kernel function Rijndael. * * This has been coded for clarity, not necessarily for efficiency. * * The functions f2, f3, f4 and f5 share the same inputs and have * been coded together as a single function. f1, f1* and f5* are * all coded separately. * *-----------------------------------------------------------------*/ #include "milenage.h" #include "rijndael.h" #include /*--------------------------- prototypes --------------------------*/ /*------------------------------------------------------------------- * Algorithm f1 *------------------------------------------------------------------- * * Computes network authentication code MAC-A from key K, random * challenge RAND, sequence number SQN and authentication management * field AMF. * *-----------------------------------------------------------------*/ void f1(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_a[8], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t in1[16]; uint8_t out1[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); for (i=0; i<6; i++) { in1[i] = sqn[i]; in1[i+8] = sqn[i]; } for (i=0; i<2; i++) { in1[i+6] = amf[i]; in1[i+14] = amf[i]; } /* XOR op_c and in1, rotate by r1=64, and XOR * * on the constant c1 (which is all zeroes) */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = in1[i] ^ op_c[i]; /* XOR on the value temp computed before */ for (i=0; i<16; i++) rijndaelInput[i] ^= temp[i]; RijndaelEncrypt( rijndaelInput, out1 ); for (i=0; i<16; i++) out1[i] ^= op_c[i]; for (i=0; i<8; i++) mac_a[i] = out1[i]; return; } /* end of function f1 */ /*------------------------------------------------------------------- * Algorithms f2-f5 *------------------------------------------------------------------- * * Takes key K and random challenge RAND, and returns response RES, * confidentiality key CK, integrity key IK and anonymity key AK. * *-----------------------------------------------------------------*/ void f2345(uint8_t k[16], uint8_t rand[16], uint8_t res[8], uint8_t ck[16], uint8_t ik[16], uint8_t ak[6], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t out[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); /* To obtain output block OUT2: XOR OPc and TEMP, * * rotate by r2=0, and XOR on the constant c2 (which * * is all zeroes except that the last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[i] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 1; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<8; i++) res[i] = out[i+8]; for (i=0; i<6; i++) ak[i] = out[i]; /* To obtain output block OUT3: XOR OPc and TEMP, * * rotate by r3=32, and XOR on the constant c3 (which * * is all zeroes except that the next to last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+12) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 2; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<16; i++) ck[i] = out[i]; /* To obtain output block OUT4: XOR OPc and TEMP, * * rotate by r4=64, and XOR on the constant c4 (which * * is all zeroes except that the 2nd from last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 4; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<16; i++) ik[i] = out[i]; return; } /* end of function f2345 */ /*------------------------------------------------------------------- * Algorithm f1* *------------------------------------------------------------------- * * Computes resynch authentication code MAC-S from key K, random * challenge RAND, sequence number SQN and authentication management * field AMF. * *-----------------------------------------------------------------*/ void f1star(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_s[8], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t in1[16]; uint8_t out1[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); for (i=0; i<6; i++) { in1[i] = sqn[i]; in1[i+8] = sqn[i]; } for (i=0; i<2; i++) { in1[i+6] = amf[i]; in1[i+14] = amf[i]; } /* XOR op_c and in1, rotate by r1=64, and XOR * * on the constant c1 (which is all zeroes) */ for (i=0; i<16; i++) rijndaelInput[(i+8) % 16] = in1[i] ^ op_c[i]; /* XOR on the value temp computed before */ for (i=0; i<16; i++) rijndaelInput[i] ^= temp[i]; RijndaelEncrypt( rijndaelInput, out1 ); for (i=0; i<16; i++) out1[i] ^= op_c[i]; for (i=0; i<8; i++) mac_s[i] = out1[i+8]; return; } /* end of function f1star */ /*------------------------------------------------------------------- * Algorithm f5* *------------------------------------------------------------------- * * Takes key K and random challenge RAND, and returns resynch * anonymity key AK. * *-----------------------------------------------------------------*/ void f5star(uint8_t k[16], uint8_t rand[16], uint8_t ak[6], uint8_t op[16]) { uint8_t op_c[16]; uint8_t temp[16]; uint8_t out[16]; uint8_t rijndaelInput[16]; uint8_t i; RijndaelKeySchedule( k ); ComputeOPc( op_c, op ); for (i=0; i<16; i++) rijndaelInput[i] = rand[i] ^ op_c[i]; RijndaelEncrypt( rijndaelInput, temp ); /* To obtain output block OUT5: XOR OPc and TEMP, * * rotate by r5=96, and XOR on the constant c5 (which * * is all zeroes except that the 3rd from last bit is 1). */ for (i=0; i<16; i++) rijndaelInput[(i+4) % 16] = temp[i] ^ op_c[i]; rijndaelInput[15] ^= 8; RijndaelEncrypt( rijndaelInput, out ); for (i=0; i<16; i++) out[i] ^= op_c[i]; for (i=0; i<6; i++) ak[i] = out[i]; return; } /* end of function f5star */ /*------------------------------------------------------------------- * Function to compute OPc from OP and K. Assumes key schedule has already been performed. *-----------------------------------------------------------------*/ void ComputeOPc(uint8_t op_c[16], uint8_t op[16]) { uint8_t i; RijndaelEncrypt( op, op_c ); for (i=0; i<16; i++) op_c[i] ^= op[i]; return; } /* end of function ComputeOPc */ sipp-3.5.1/src/fortune.cpp0000644000175000017500000000463412672462535014525 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Charles P Wright from IBM Research */ #include "sipp.hpp" /* This is a fun sample of creating your own extensible keyword. */ int fortune(call *call, MessageComponent *comp, char *buf, int len) { int pipes[2]; char localbuf[SIPP_MAX_MSG_SIZE]; char *p = localbuf; int ret; int written = 0; if (pipe(pipes) == -1) { ERROR("Could not create pipes!\n"); } switch (fork()) { case -1: ERROR("Fork failed: %s\n", strerror(errno)); case 0: /* We are the child. */ close(pipes[0]); dup2(pipes[1], fileno(stdout)); dup2(pipes[1], fileno(stderr)); close(fileno(stdin)); system("/usr/bin/fortune"); exit (127); default: /* We are the parent*/ close(pipes[1]); while ((ret = read(pipes[0], p, sizeof(localbuf) - (p - localbuf))) > 0) { p += ret; } *p = '\0'; close(pipes[0]); if (len > p - localbuf) { len = p -localbuf; } p = localbuf; while(len-- > 0) { if (*p == '\n') { if (len < 3) { break; } *buf++ = '\r'; *buf++ = '\n'; *buf++ = ' '; written += 3; p++; } else { *buf++ = *p++; written++; } } break; } return written; } /* On initialization we register our keywords. */ extern "C" int init(void) { registerKeyword("fortune", fortune); return 0; } sipp-3.5.1/src/prepare_pcap.c0000644000175000017500000002567212672462535015151 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Guillaume TEISSIER from FTR&D 02/02/2006 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #if defined(__HPUX) || defined(__CYGWIN) || defined(__FreeBSD__) #include #endif #include #ifndef __CYGWIN #include #endif #include #include "defines.h" #include "endianshim.h" #include "prepare_pcap.h" /* We define our own structures for Ethernet Header and IPv6 Header as they are not available on CYGWIN. * We only need the fields, which are necessary to determine the type of the next header. * we could also define our own structures for UDP and IPv4. We currently use the structures * made available by the platform, as we had no problems to get them on all supported platforms. */ typedef struct _ether_type_hdr { uint16_t ether_type; /* we only need the type, so we can determine, if the next header is IPv4 or IPv6 */ } ether_type_hdr; typedef struct _ipv6_hdr { char dontcare[6]; uint8_t nxt_header; /* we only need the next header, so we can determine, if the next header is UDP or not */ char dontcare2[33]; } ipv6_hdr; #ifdef __HPUX int check(uint16_t *buffer, int len) { #else inline int check(uint16_t *buffer, int len) { #endif int sum; int i; sum = 0; for (i=0; i<(len&~1); i+= 2) sum += *buffer++; if (len & 1) { sum += htons((*(const uint8_t*)buffer) << 8); } return sum; } #ifdef __HPUX uint16_t checksum_carry(int s) { #else inline uint16_t checksum_carry(int s) { #endif int s_c = (s >> 16) + (s & 0xffff); return (~(s_c + (s_c >> 16)) & 0xffff); } char errbuf[PCAP_ERRBUF_SIZE]; /* get octet offset to EtherType block in 802.11 frame */ size_t get_802_11_ethertype_offset(int link, const uint8_t* pktdata) { size_t offset = 0; uint8_t frame_type = 0; /* 2 bits */ uint8_t frame_sub_type = 0; /* 4 bits */ uint16_t frame_ctl_fld; /* Frame Control Field */ /* get RadioTap header length */ if (link == DLT_IEEE802_11_RADIO) { uint16_t rdtap_hdr_len = 0; /* http://www.radiotap.org */ /* rdtap_version[1], pad[1], rdtap_hdr_len[2], rdtap_flds[4] */ memcpy(&rdtap_hdr_len, pktdata + 2, sizeof(rdtap_hdr_len)); /* http://radiotap.org */ /* all data fields in the radiotap header are to be specified * in little-endian order */ rdtap_hdr_len = le16toh(rdtap_hdr_len); offset += rdtap_hdr_len; } memcpy(&frame_ctl_fld, pktdata + offset, sizeof(frame_ctl_fld)); /* extract frame type and subtype from Frame Control Field */ frame_type = frame_sub_type = frame_ctl_fld>>8; frame_type = frame_type>>2 & 0x03; frame_sub_type >>= 4; if (frame_type < 0x02) { /* Control or Management frame, so ignore it and try to get * EtherType from next one */ offset = 0; } else if (frame_type == 0x02) { /* only Data frames carry the relevant payload and EtherType */ if (frame_sub_type < 0x04 || (frame_sub_type > 0x07 && frame_sub_type < 0x0c)) { /* MAC header of a Data frame is at least 24 and at most 36 * octets long */ size_t mac_hdr_len = 24; uint8_t llc_hdr[8] = { 0x00 }; while (mac_hdr_len <= 36) { /* attempt to get Logical-Link Control header */ /* dsap[1],ssap[1],ctrl_fld[1],org_code[3],ethertype[2] */ memcpy(llc_hdr, pktdata + offset + mac_hdr_len, sizeof(llc_hdr)); /* check if Logical-Link Control header */ if (llc_hdr[0] == 0xaa && llc_hdr[1] == 0xaa && llc_hdr[2] == 0x03) { /* get EtherType and convert to host byte-order. * (reduce by sizeof(eth_type)) */ offset += mac_hdr_len + (sizeof(llc_hdr) - sizeof(uint16_t)); break; } mac_hdr_len++; } } else { /* could be Null Data frame, so ignore it and try to get * EtherType from next one */ offset = 0; } } else { ERROR("Unsupported frame type %d", frame_type); } return offset; } /* get octet offset to EtherType block */ size_t get_ethertype_offset(int link, const uint8_t* pktdata) { int is_le_encoded = 0; /* little endian */ uint16_t eth_type = 0; size_t offset = 0; /* http://www.tcpdump.org/linktypes.html */ if (link == DLT_EN10MB) { /* srcmac[6], dstmac[6], ethertype[2] */ offset = 12; } else if (link == DLT_LINUX_SLL) { /* http://www.tcpdump.org/linktypes/LINKTYPE_LINUX_SLL.html */ /* pkttype[2], arphrd_type[2], lladdrlen[2], lladdr[8], ethertype[2] */ offset = 14; } else if (link == DLT_IEEE802_11 || link == DLT_IEEE802_11_RADIO) { offset = get_802_11_ethertype_offset(link, pktdata); /* multi-octet fields in 802.11 frame are to be specified in * little-endian order */ is_le_encoded = 1; } else { ERROR("Unsupported link-type %d", link); } if (offset) { /* get EtherType and convert to host byte order */ memcpy(ð_type, pktdata + offset, sizeof(eth_type)); eth_type = (is_le_encoded) ? le16toh(eth_type) : ntohs(eth_type); if (eth_type != 0x0800 && eth_type != 0x86dd) { /* check if Ethernet 802.1Q VLAN */ if (eth_type == 0x8100) { /* vlan_tag[4] */ offset += 4; } else { ERROR("Unsupported ethernet type %d", eth_type); } } } return offset; } /* prepare a pcap file */ int prepare_pkts(char *file, pcap_pkts *pkts) { pcap_t* pcap; #ifdef HAVE_PCAP_NEXT_EX struct pcap_pkthdr* pkthdr = NULL; #else struct pcap_pkthdr pkthdr_storage; struct pcap_pkthdr* pkthdr = &pkthdr_storage; #endif const uint8_t* pktdata = NULL; int n_pkts = 0; uint64_t max_length = 0; size_t ether_type_offset = 0; uint16_t base = 0xffff; uint64_t pktlen; pcap_pkt* pkt_index; ether_type_hdr* ethhdr; struct iphdr* iphdr; ipv6_hdr* ip6hdr; struct udphdr* udphdr; pkts->pkts = NULL; pcap = pcap_open_offline(file, errbuf); if (!pcap) ERROR_NO("Can't open PCAP file '%s'", file); #ifdef HAVE_PCAP_NEXT_EX while (pcap_next_ex(pcap, &pkthdr, &pktdata) == 1) { #else while ((pktdata = pcap_next(pcap, pkthdr)) != NULL) { #endif if (pkthdr->len != pkthdr->caplen) { ERROR("You got truncated packets. Please create a new dump with -s0"); } /* Determine offset from packet to ether type only once. */ if (!ether_type_offset) { int datalink = pcap_datalink(pcap); ether_type_offset = get_ethertype_offset(datalink, pktdata); } ethhdr = (ether_type_hdr *)(pktdata + ether_type_offset); if (ntohs(ethhdr->ether_type) != 0x0800 /* IPv4 */ && ntohs(ethhdr->ether_type) != 0x86dd) { /* IPv6 */ fprintf(stderr, "Ignoring non IP{4,6} packet, got ether_type %hu!\n", ntohs(ethhdr->ether_type)); continue; } iphdr = (struct iphdr*)((char*)ethhdr + sizeof(*ethhdr)); if (iphdr && iphdr->version == 6) { /* ipv6 */ pktlen = (uint64_t)pkthdr->len - sizeof(*ethhdr) - sizeof(*ip6hdr); ip6hdr = (ipv6_hdr*)(void*)iphdr; if (ip6hdr->nxt_header != IPPROTO_UDP) { fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); continue; } udphdr = (struct udphdr*)((char*)ip6hdr + sizeof(*ip6hdr)); } else { /* ipv4 */ if (iphdr->protocol != IPPROTO_UDP) { fprintf(stderr, "prepare_pcap.c: Ignoring non UDP packet!\n"); continue; } #if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) udphdr = (struct udphdr*)((char*)iphdr + (iphdr->ihl << 2) + 4); pktlen = (uint64_t)(ntohs(udphdr->uh_ulen)); #elif defined ( __HPUX) udphdr = (struct udphdr*)((char*)iphdr + (iphdr->ihl << 2)); pktlen = (uint64_t) pkthdr->len - sizeof(*ethhdr) - sizeof(*iphdr); #else udphdr = (struct udphdr*)((char*)iphdr + (iphdr->ihl << 2)); pktlen = (uint64_t)(ntohs(udphdr->len)); #endif } if (pktlen > PCAP_MAXPACKET) { ERROR("Packet size is too big! Recompile with bigger PCAP_MAXPACKET in prepare_pcap.h"); } pkts->pkts = (pcap_pkt *)realloc(pkts->pkts, sizeof(*(pkts->pkts)) * (n_pkts + 1)); if (!pkts->pkts) ERROR("Can't re-allocate memory for pcap pkt"); pkt_index = pkts->pkts + n_pkts; pkt_index->pktlen = pktlen; pkt_index->ts = pkthdr->ts; pkt_index->data = (unsigned char *) malloc(pktlen); if (!pkt_index->data) ERROR("Can't allocate memory for pcap pkt data"); memcpy(pkt_index->data, udphdr, pktlen); #if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) udphdr->uh_sum = 0 ; #else udphdr->check = 0; #endif /* compute a partial udp checksum */ /* not including port that will be changed */ /* when sending RTP */ #if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) pkt_index->partial_check = check((uint16_t*)&udphdr->uh_ulen, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); #else pkt_index->partial_check = check((uint16_t*)&udphdr->len, pktlen - 4) + ntohs(IPPROTO_UDP + pktlen); #endif if (max_length < pktlen) max_length = pktlen; #if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) if (base > ntohs(udphdr->uh_dport)) base = ntohs(udphdr->uh_dport); #else if (base > ntohs(udphdr->dest)) base = ntohs(udphdr->dest); #endif n_pkts++; } pkts->max = pkts->pkts + n_pkts; pkts->max_length = max_length; pkts->base = base; fprintf(stderr, "In pcap %s, npkts %d\nmax pkt length %ld\nbase port %d\n", file, n_pkts, max_length, base); pcap_close(pcap); return 0; } sipp-3.5.1/src/sipp.cpp0000644000175000017500000026345512672462535014026 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include #define GLOBALS_FULL_DEFINITION #include "sipp.hpp" #include "sip_parser.hpp" #include "socket.hpp" #include "logger.hpp" #include "assert.h" #include "config.h" #include "version.h" extern struct sipp_socket *ctrl_socket; extern struct sipp_socket *stdin_socket; /* These could be local to main, but for the option processing table. */ static int argiFileName; /***************** Option Handling Table *****************/ struct sipp_option { const char *option; const char *help; int type; void *data; /* Pass 0: Help and other options that should exit immediately. */ /* Pass 1: All other options. */ /* Pass 2: Scenario parsing. */ int pass; }; #define SIPP_OPTION_HELP 1 #define SIPP_OPTION_INT 2 #define SIPP_OPTION_SETFLAG 3 #define SIPP_OPTION_UNSETFLAG 4 #define SIPP_OPTION_STRING 5 #define SIPP_OPTION_ARGI 6 #define SIPP_OPTION_TIME_SEC 7 #define SIPP_OPTION_FLOAT 8 #define SIPP_OPTION_BOOL 10 #define SIPP_OPTION_VERSION 11 #define SIPP_OPTION_TRANSPORT 12 #define SIPP_OPTION_NEED_SSL 13 #define SIPP_OPTION_IP 14 #define SIPP_OPTION_MAX_SOCKET 15 #define SIPP_OPTION_CSEQ 16 #define SIPP_OPTION_SCENARIO 17 #define SIPP_OPTION_RSA 18 #define SIPP_OPTION_LIMIT 19 #define SIPP_OPTION_USERS 20 #define SIPP_OPTION_KEY 21 #define SIPP_OPTION_3PCC 22 #define SIPP_OPTION_TDMMAP 23 #define SIPP_OPTION_TIME_MS 24 #define SIPP_OPTION_SLAVE_CFG 25 #define SIPP_OPTION_3PCC_EXTENDED 26 #define SIPP_OPTION_INPUT_FILE 27 #define SIPP_OPTION_TIME_MS_LONG 28 #define SIPP_OPTION_LONG 29 #define SIPP_OPTION_LONG_LONG 30 #define SIPP_OPTION_DEFAULTS 31 #define SIPP_OPTION_OOC_SCENARIO 32 #define SIPP_OPTION_INDEX_FILE 33 #define SIPP_OPTION_VAR 34 #define SIPP_OPTION_RTCHECK 35 #define SIPP_OPTION_LFNAME 36 #define SIPP_OPTION_LFOVERWRITE 37 #define SIPP_OPTION_PLUGIN 38 #define SIPP_OPTION_NEED_SCTP 39 #define SIPP_HELP_TEXT_HEADER 255 /* Put each option, its help text, and type in this table. */ struct sipp_option options_table[] = { {"h", NULL, SIPP_OPTION_HELP, NULL, 0}, {"help", NULL, SIPP_OPTION_HELP, NULL, 0}, {"", "Scenario file options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"sd", "Dumps a default scenario (embedded in the SIPp executable)", SIPP_OPTION_SCENARIO, NULL, 0}, {"sf", "Loads an alternate XML scenario file. To learn more about XML scenario syntax, use the -sd option to dump embedded scenarios. They contain all the necessary help.", SIPP_OPTION_SCENARIO, NULL, 2}, {"oocsf", "Load out-of-call scenario.", SIPP_OPTION_OOC_SCENARIO, NULL, 2}, {"oocsn", "Load out-of-call scenario.", SIPP_OPTION_OOC_SCENARIO, NULL, 2}, { "sn", "Use a default scenario (embedded in the SIPp executable). If this option is omitted, the Standard SipStone UAC scenario is loaded.\n" "Available values in this version:\n\n" "- 'uac' : Standard SipStone UAC (default).\n" "- 'uas' : Simple UAS responder.\n" "- 'regexp' : Standard SipStone UAC - with regexp and variables.\n" "- 'branchc' : Branching and conditional branching in scenarios - client.\n" "- 'branchs' : Branching and conditional branching in scenarios - server.\n\n" "Default 3pcc scenarios (see -3pcc option):\n\n" "- '3pcc-C-A' : Controller A side (must be started after all other 3pcc scenarios)\n" "- '3pcc-C-B' : Controller B side.\n" "- '3pcc-A' : A side.\n" "- '3pcc-B' : B side.\n", SIPP_OPTION_SCENARIO, NULL, 2 }, {"", "IP, port and protocol options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, { "t", "Set the transport mode:\n" "- u1: UDP with one socket (default),\n" "- un: UDP with one socket per call,\n" "- ui: UDP with one socket per IP address. The IP addresses must be defined in the injection file.\n" "- t1: TCP with one socket,\n" "- tn: TCP with one socket per call,\n" #ifdef USE_OPENSSL "- l1: TLS with one socket,\n" "- ln: TLS with one socket per call,\n" #endif #ifdef USE_SCTP "- s1: SCTP with one socket,\n" "- sn: SCTP with one socket per call,\n" #endif "- c1: u1 + compression (only if compression plugin loaded),\n" "- cn: un + compression (only if compression plugin loaded). This plugin is not provided with SIPp.\n" , SIPP_OPTION_TRANSPORT, NULL, 1 }, {"i", "Set the local IP address for 'Contact:','Via:', and 'From:' headers. Default is primary host IP address.\n", SIPP_OPTION_IP, local_ip, 1}, {"p", "Set the local port number. Default is a random free port chosen by the system.", SIPP_OPTION_INT, &user_port, 1}, {"bind_local", "Bind socket to local IP address, i.e. the local IP address is used as the source IP address. If SIPp runs in server mode it will only listen on the local IP address instead of all IP addresses.", SIPP_OPTION_SETFLAG, &bind_local, 1}, {"ci", "Set the local control IP address", SIPP_OPTION_IP, control_ip, 1}, {"cp", "Set the local control port number. Default is 8888.", SIPP_OPTION_INT, &control_port, 1}, {"max_socket", "Set the max number of sockets to open simultaneously. This option is significant if you use one socket per call. Once this limit is reached, traffic is distributed over the sockets already opened. Default value is 50000", SIPP_OPTION_MAX_SOCKET, NULL, 1}, {"max_reconnect", "Set the the maximum number of reconnection.", SIPP_OPTION_INT, &reset_number, 1}, {"reconnect_close", "Should calls be closed on reconnect?", SIPP_OPTION_BOOL, &reset_close, 1}, {"reconnect_sleep", "How long (in milliseconds) to sleep between the close and reconnect?", SIPP_OPTION_TIME_MS, &reset_sleep, 1}, {"rsa", "Set the remote sending address to host:port for sending the messages.", SIPP_OPTION_RSA, NULL, 1}, #ifdef USE_OPENSSL {"tls_cert", "Set the name for TLS Certificate file. Default is 'cacert.pem", SIPP_OPTION_STRING, &tls_cert_name, 1}, {"tls_key", "Set the name for TLS Private Key file. Default is 'cakey.pem'", SIPP_OPTION_STRING, &tls_key_name, 1}, {"tls_crl", "Set the name for Certificate Revocation List file. If not specified, X509 CRL is not activated.", SIPP_OPTION_STRING, &tls_crl_name, 1}, #else {"tls_cert", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_key", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, {"tls_crl", NULL, SIPP_OPTION_NEED_SSL, NULL, 1}, #endif #ifdef USE_SCTP {"multihome", "Set multihome address for SCTP", SIPP_OPTION_IP, multihome_ip, 1}, {"heartbeat", "Set heartbeat interval in ms for SCTP", SIPP_OPTION_INT, &heartbeat, 1}, {"assocmaxret", "Set association max retransmit counter for SCTP", SIPP_OPTION_INT, &assocmaxret, 1}, {"pathmaxret", "Set path max retransmit counter for SCTP", SIPP_OPTION_INT, &pathmaxret, 1}, {"pmtu", "Set path MTU for SCTP", SIPP_OPTION_INT, &pmtu, 1}, {"gracefulclose", "If true, SCTP association will be closed with SHUTDOWN (default).\n If false, SCTP association will be closed by ABORT.\n", SIPP_OPTION_BOOL, &gracefulclose, 1}, #else {"multihome", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"heartbeat", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"assocmaxret", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"pathmaxret", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"pmtu", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, {"gracefulclose", NULL, SIPP_OPTION_NEED_SCTP, NULL, 1}, #endif {"", "SIPp overall behavior options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"v", "Display version and copyright information.", SIPP_OPTION_VERSION, NULL, 0}, {"bg", "Launch SIPp in background mode.", SIPP_OPTION_SETFLAG, &backgroundMode, 1}, {"nostdin", "Disable stdin.\n", SIPP_OPTION_SETFLAG, &nostdin, 1}, {"plugin", "Load a plugin.", SIPP_OPTION_PLUGIN, NULL, 1}, {"sleep", "How long to sleep for at startup. Default unit is seconds.", SIPP_OPTION_TIME_SEC, &sleeptime, 1}, {"skip_rlimit", "Do not perform rlimit tuning of file descriptor limits. Default: false.", SIPP_OPTION_SETFLAG, &skip_rlimit, 1}, {"buff_size", "Set the send and receive buffer size.", SIPP_OPTION_INT, &buff_size, 1}, {"sendbuffer_warn", "Produce warnings instead of errors on SendBuffer failures.", SIPP_OPTION_BOOL, &sendbuffer_warn, 1}, {"lost", "Set the number of packets to lose by default (scenario specifications override this value).", SIPP_OPTION_FLOAT, &global_lost, 1}, {"key", "keyword value\nSet the generic parameter named \"keyword\" to \"value\".", SIPP_OPTION_KEY, NULL, 1}, {"set", "variable value\nSet the global variable parameter named \"variable\" to \"value\".", SIPP_OPTION_VAR, NULL, 3}, {"tdmmap", "Generate and handle a table of TDM circuits.\n" "A circuit must be available for the call to be placed.\n" "Format: -tdmmap {0-3}{99}{5-8}{1-31}", SIPP_OPTION_TDMMAP, NULL, 1}, {"dynamicStart", "variable value\nSet the start offset of dynamic_id variable", SIPP_OPTION_INT, &startDynamicId, 1}, {"dynamicMax", "variable value\nSet the maximum of dynamic_id variable ", SIPP_OPTION_INT, &maxDynamicId, 1}, {"dynamicStep", "variable value\nSet the increment of dynamic_id variable", SIPP_OPTION_INT, &stepDynamicId, 1}, {"", "Call behavior options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"aa", "Enable automatic 200 OK answer for INFO, NOTIFY, OPTIONS and UPDATE.", SIPP_OPTION_SETFLAG, &auto_answer, 1}, {"base_cseq", "Start value of [cseq] for each call.", SIPP_OPTION_CSEQ, NULL, 1}, {"cid_str", "Call ID string (default %u-%p@%s). %u=call_number, %s=ip_address, %p=process_number, %%=% (in any order).", SIPP_OPTION_STRING, &call_id_string, 1}, {"d", "Controls the length of calls. More precisely, this controls the duration of 'pause' instructions in the scenario, if they do not have a 'milliseconds' section. Default value is 0 and default unit is milliseconds.", SIPP_OPTION_TIME_MS, &duration, 1}, {"deadcall_wait", "How long the Call-ID and final status of calls should be kept to improve message and error logs (default unit is ms).", SIPP_OPTION_TIME_MS, &deadcall_wait, 1}, {"auth_uri", "Force the value of the URI for authentication.\n" "By default, the URI is composed of remote_ip:remote_port.", SIPP_OPTION_STRING, &auth_uri, 1}, {"au", "Set authorization username for authentication challenges. Default is taken from -s argument", SIPP_OPTION_STRING, &auth_username, 1}, {"ap", "Set the password for authentication challenges. Default is 'password'", SIPP_OPTION_STRING, &auth_password, 1}, {"s", "Set the username part of the request URI. Default is 'service'.", SIPP_OPTION_STRING, &service, 1}, {"default_behaviors", "Set the default behaviors that SIPp will use. Possible values are:\n" "- all\tUse all default behaviors\n" "- none\tUse no default behaviors\n" "- bye\tSend byes for aborted calls\n" "- abortunexp\tAbort calls on unexpected messages\n" "- pingreply\tReply to ping requests\n" "If a behavior is prefaced with a -, then it is turned off. Example: all,-bye\n", SIPP_OPTION_DEFAULTS, &default_behaviors, 1}, {"nd", "No Default. Disable all default behavior of SIPp which are the following:\n" "- On UDP retransmission timeout, abort the call by sending a BYE or a CANCEL\n" "- On receive timeout with no ontimeout attribute, abort the call by sending a BYE or a CANCEL\n" "- On unexpected BYE send a 200 OK and close the call\n" "- On unexpected CANCEL send a 200 OK and close the call\n" "- On unexpected PING send a 200 OK and continue the call\n" "- On any other unexpected message, abort the call by sending a BYE or a CANCEL\n", SIPP_OPTION_UNSETFLAG, &default_behaviors, 1}, {"pause_msg_ign", "Ignore the messages received during a pause defined in the scenario ", SIPP_OPTION_SETFLAG, &pause_msg_ign, 1}, {"callid_slash_ign", "Don't treat a triple-slash in Call-IDs as indicating an extra SIPp prefix.", SIPP_OPTION_SETFLAG, &callidSlash, 1}, {"", "Injection file options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"inf", "Inject values from an external CSV file during calls into the scenarios.\n" "First line of this file say whether the data is to be read in sequence (SEQUENTIAL), random (RANDOM), or user (USER) order.\n" "Each line corresponds to one call and has one or more ';' delimited data fields. Those fields can be referred as [field0], [field1], ... in the xml scenario file. Several CSV files can be used simultaneously (syntax: -inf f1.csv -inf f2.csv ...)", SIPP_OPTION_INPUT_FILE, NULL, 1}, {"infindex", "file field\nCreate an index of file using field. For example -inf users.csv -infindex users.csv 0 creates an index on the first key.", SIPP_OPTION_INDEX_FILE, NULL, 1 }, {"ip_field", "Set which field from the injection file contains the IP address from which the client will send its messages.\n" "If this option is omitted and the '-t ui' option is present, then field 0 is assumed.\n" "Use this option together with '-t ui'", SIPP_OPTION_INT, &peripfield, 1}, {"", "RTP behaviour options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"mi", "Set the local media IP address (default: local primary host IP address)", SIPP_OPTION_IP, media_ip, 1}, {"rtp_echo", "Enable RTP echo. RTP/UDP packets received on port defined by -mp are echoed to their sender.\n" "RTP/UDP packets coming on this port + 2 are also echoed to their sender (used for sound and video echo).", SIPP_OPTION_SETFLAG, &rtp_echo_enabled, 1}, {"mb", "Set the RTP echo buffer size (default: 2048).", SIPP_OPTION_INT, &media_bufsize, 1}, {"mp", "Set the local RTP echo port number. Default is 6000.", SIPP_OPTION_INT, &user_media_port, 1}, #ifdef RTP_STREAM {"min_rtp_port", "Minimum port number for RTP socket range.", SIPP_OPTION_INT, &min_rtp_port, 1}, {"max_rtp_port", "Maximum port number for RTP socket range.", SIPP_OPTION_INT, &max_rtp_port, 1}, {"rtp_payload", "RTP default payload type.", SIPP_OPTION_INT, &rtp_default_payload, 1}, {"rtp_threadtasks", "RTP number of playback tasks per thread.", SIPP_OPTION_INT, &rtp_tasks_per_thread, 1}, {"rtp_buffsize", "Set the rtp socket send/receive buffer size.", SIPP_OPTION_INT, &rtp_buffsize, 1}, #endif {"", "Call rate options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"r", "Set the call rate (in calls per seconds). This value can be" "changed during test by pressing '+', '_', '*' or '/'. Default is 10.\n" "pressing '+' key to increase call rate by 1 * rate_scale,\n" "pressing '-' key to decrease call rate by 1 * rate_scale,\n" "pressing '*' key to increase call rate by 10 * rate_scale,\n" "pressing '/' key to decrease call rate by 10 * rate_scale.\n", SIPP_OPTION_FLOAT, &rate, 1}, {"rp", "Specify the rate period for the call rate. Default is 1 second and default unit is milliseconds. This allows you to have n calls every m milliseconds (by using -r n -rp m).\n" "Example: -r 7 -rp 2000 ==> 7 calls every 2 seconds.\n -r 10 -rp 5s => 10 calls every 5 seconds.", SIPP_OPTION_TIME_MS, &rate_period_ms, 1}, {"rate_scale", "Control the units for the '+', '-', '*', and '/' keys.", SIPP_OPTION_FLOAT, &rate_scale, 1}, {"rate_increase", "Specify the rate increase every -rate_interval units (default is seconds). This allows you to increase the load for each independent logging period.\n" "Example: -rate_increase 10 -rate_interval 10s\n" " ==> increase calls by 10 every 10 seconds.", SIPP_OPTION_INT, &rate_increase, 1}, {"rate_max", "If -rate_increase is set, then quit after the rate reaches this value.\n" "Example: -rate_increase 10 -rate_max 100\n" " ==> increase calls by 10 until 100 cps is hit.", SIPP_OPTION_INT, &rate_max, 1}, {"rate_interval", "Set the interval by which the call rate is increased. Defaults to the value of -fd.", SIPP_OPTION_TIME_SEC, &rate_increase_freq, 1}, {"no_rate_quit", "If -rate_increase is set, do not quit after the rate reaches -rate_max.", SIPP_OPTION_UNSETFLAG, &rate_quit, 1}, {"l", "Set the maximum number of simultaneous calls. Once this limit is reached, traffic is decreased until the number of open calls goes down. Default:\n" " (3 * call_duration (s) * rate).", SIPP_OPTION_LIMIT, NULL, 1}, {"m", "Stop the test and exit when 'calls' calls are processed", SIPP_OPTION_LONG, &stop_after, 1}, {"users", "Instead of starting calls at a fixed rate, begin 'users' calls at startup, and keep the number of calls constant.", SIPP_OPTION_USERS, NULL, 1}, {"", "Retransmission and timeout options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"recv_timeout", "Global receive timeout. Default unit is milliseconds. If the expected message is not received, the call times out and is aborted.", SIPP_OPTION_TIME_MS_LONG, &defl_recv_timeout, 1}, {"send_timeout", "Global send timeout. Default unit is milliseconds. If a message is not sent (due to congestion), the call times out and is aborted.", SIPP_OPTION_TIME_MS_LONG, &defl_send_timeout, 1}, {"timeout", "Global timeout. Default unit is seconds. If this option is set, SIPp quits after nb units (-timeout 20s quits after 20 seconds).", SIPP_OPTION_TIME_SEC, &global_timeout, 1}, {"timeout_error", "SIPp fails if the global timeout is reached is set (-timeout option required).", SIPP_OPTION_SETFLAG, &timeout_error, 1}, {"max_retrans", "Maximum number of UDP retransmissions before call ends on timeout. Default is 5 for INVITE transactions and 7 for others.", SIPP_OPTION_INT, &max_udp_retrans, 1}, {"max_invite_retrans", "Maximum number of UDP retransmissions for invite transactions before call ends on timeout.", SIPP_OPTION_INT, &max_invite_retrans, 1}, {"max_non_invite_retrans", "Maximum number of UDP retransmissions for non-invite transactions before call ends on timeout.", SIPP_OPTION_INT, &max_non_invite_retrans, 1}, {"nr", "Disable retransmission in UDP mode.", SIPP_OPTION_UNSETFLAG, &retrans_enabled, 1}, {"rtcheck", "Select the retransmission detection method: full (default) or loose.", SIPP_OPTION_RTCHECK, &rtcheck, 1}, {"T2", "Global T2-timer in milli seconds", SIPP_OPTION_TIME_MS, &global_t2, 1}, {"", "Third-party call control options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"3pcc", "Launch the tool in 3pcc mode (\"Third Party call control\"). The passed IP address depends on the 3PCC role.\n" "- When the first twin command is 'sendCmd' then this is the address of the remote twin socket. SIPp will try to connect to this address:port to send the twin command (This instance must be started after all other 3PCC scenarios).\n" " Example: 3PCC-C-A scenario.\n" "- When the first twin command is 'recvCmd' then this is the address of the local twin socket. SIPp will open this address:port to listen for twin command.\n" " Example: 3PCC-C-B scenario.", SIPP_OPTION_3PCC, NULL, 1}, {"master","3pcc extended mode: indicates the master number", SIPP_OPTION_3PCC_EXTENDED, &master_name, 1}, {"slave", "3pcc extended mode: indicates the slave number", SIPP_OPTION_3PCC_EXTENDED, &slave_number, 1}, {"slave_cfg", "3pcc extended mode: indicates the file where the master and slave addresses are stored", SIPP_OPTION_SLAVE_CFG, NULL, 1}, {"", "Performance and watchdog options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"timer_resol", "Set the timer resolution. Default unit is milliseconds. This option has an impact on timers precision." "Small values allow more precise scheduling but impacts CPU usage." "If the compression is on, the value is set to 50ms. The default value is 10ms.", SIPP_OPTION_TIME_MS, &timer_resolution, 1}, {"max_recv_loops", "Set the maximum number of messages received read per cycle. Increase this value for high traffic level. The default value is 1000.", SIPP_OPTION_INT, &max_recv_loops, 1}, {"max_sched_loops", "Set the maximum number of calls run per event loop. Increase this value for high traffic level. The default value is 1000.", SIPP_OPTION_INT, &max_sched_loops, 1}, {"watchdog_interval", "Set gap between watchdog timer firings. Default is 400.", SIPP_OPTION_TIME_MS, &watchdog_interval, 1}, {"watchdog_reset", "If the watchdog timer has not fired in more than this time period, then reset the max triggers counters. Default is 10 minutes.", SIPP_OPTION_TIME_MS, &watchdog_reset, 1}, {"watchdog_minor_threshold", "If it has been longer than this period between watchdog executions count a minor trip. Default is 500.", SIPP_OPTION_TIME_MS, &watchdog_minor_threshold, 1}, {"watchdog_major_threshold", "If it has been longer than this period between watchdog executions count a major trip. Default is 3000.", SIPP_OPTION_TIME_MS, &watchdog_major_threshold, 1}, {"watchdog_major_maxtriggers", "How many times the major watchdog timer can be tripped before the test is terminated. Default is 10.", SIPP_OPTION_INT, &watchdog_major_maxtriggers, 1}, {"watchdog_minor_maxtriggers", "How many times the minor watchdog timer can be tripped before the test is terminated. Default is 120.", SIPP_OPTION_INT, &watchdog_minor_maxtriggers, 1}, {"", "Tracing, logging and statistics options:", SIPP_HELP_TEXT_HEADER, NULL, 0}, {"f", "Set the statistics report frequency on screen. Default is 1 and default unit is seconds.", SIPP_OPTION_TIME_SEC, &report_freq, 1}, {"trace_stat", "Dumps all statistics in _.csv file. Use the '-h stat' option for a detailed description of the statistics file content.", SIPP_OPTION_SETFLAG, &dumpInFile, 1}, {"stat_delimiter", "Set the delimiter for the statistics file", SIPP_OPTION_STRING, &stat_delimiter, 1}, {"stf", "Set the file name to use to dump statistics", SIPP_OPTION_ARGI, &argiFileName, 1}, {"fd", "Set the statistics dump log report frequency. Default is 60 and default unit is seconds.", SIPP_OPTION_TIME_SEC, &report_freq_dumpLog, 1}, {"periodic_rtd", "Reset response time partition counters each logging interval.", SIPP_OPTION_SETFLAG, &periodic_rtd, 1}, {"trace_msg", "Displays sent and received SIP messages in __messages.log", SIPP_OPTION_SETFLAG, &useMessagef, 1}, {"message_file", "Set the name of the message log file.", SIPP_OPTION_LFNAME, &message_lfi, 1}, {"message_overwrite", "Overwrite the message log file (default true).", SIPP_OPTION_LFOVERWRITE, &message_lfi, 1}, {"trace_shortmsg", "Displays sent and received SIP messages as CSV in __shortmessages.log", SIPP_OPTION_SETFLAG, &useShortMessagef, 1}, {"shortmessage_file", "Set the name of the short message log file.", SIPP_OPTION_LFNAME, &shortmessage_lfi, 1}, {"shortmessage_overwrite", "Overwrite the short message log file (default true).", SIPP_OPTION_LFOVERWRITE, &shortmessage_lfi, 1}, {"trace_counts", "Dumps individual message counts in a CSV file.", SIPP_OPTION_SETFLAG, &useCountf, 1}, {"trace_err", "Trace all unexpected messages in __errors.log.", SIPP_OPTION_SETFLAG, &print_all_responses, 1}, {"error_file", "Set the name of the error log file.", SIPP_OPTION_LFNAME, &error_lfi, 1}, {"error_overwrite", "Overwrite the error log file (default true).", SIPP_OPTION_LFOVERWRITE, &error_lfi, 1}, {"trace_error_codes", "Dumps the SIP response codes of unexpected messages to __error_codes.log.", SIPP_OPTION_SETFLAG, &useErrorCodesf, 1}, // {"trace_timeout", "Displays call ids for calls with timeouts in __timeout.log", SIPP_OPTION_SETFLAG, &useTimeoutf, 1}, {"trace_calldebug", "Dumps debugging information about aborted calls to __calldebug.log file.", SIPP_OPTION_SETFLAG, &useCallDebugf, 1}, {"calldebug_file", "Set the name of the call debug file.", SIPP_OPTION_LFNAME, &calldebug_lfi, 1}, {"calldebug_overwrite", "Overwrite the call debug file (default true).", SIPP_OPTION_LFOVERWRITE, &calldebug_lfi, 1}, {"trace_screen", "Dump statistic screens in the __screens.log file when quitting SIPp. Useful to get a final status report in background mode (-bg option).", SIPP_OPTION_SETFLAG, &useScreenf, 1}, {"screen_file", "Set the name of the screen file.", SIPP_OPTION_LFNAME, &screen_lfi, 1}, {"screen_overwrite", "Overwrite the screen file (default true).", SIPP_OPTION_LFOVERWRITE, &screen_lfi, 1}, {"trace_rtt", "Allow tracing of all response times in __rtt.csv.", SIPP_OPTION_SETFLAG, &dumpInRtt, 1}, {"rtt_freq", "freq is mandatory. Dump response times every freq calls in the log file defined by -trace_rtt. Default value is 200.", SIPP_OPTION_LONG, &report_freq_dumpRtt, 1}, {"trace_logs", "Allow tracing of actions in __logs.log.", SIPP_OPTION_SETFLAG, &useLogf, 1}, {"log_file", "Set the name of the log actions log file.", SIPP_OPTION_LFNAME, &log_lfi, 1}, {"log_overwrite", "Overwrite the log actions log file (default true).", SIPP_OPTION_LFOVERWRITE, &log_lfi, 1}, {"ringbuffer_files", "How many error, message, shortmessage and calldebug files should be kept after rotation?", SIPP_OPTION_INT, &ringbuffer_files, 1}, {"ringbuffer_size", "How large should error, message, shortmessage and calldebug files be before they get rotated?", SIPP_OPTION_LONG_LONG, &ringbuffer_size, 1}, {"max_log_size", "What is the limit for error, message, shortmessage and calldebug file sizes.", SIPP_OPTION_LONG_LONG, &max_log_size, 1}, }; static struct sipp_option *find_option(const char* option) { int i; int max = sizeof(options_table)/sizeof(options_table[0]); /* Allow options to start with '-' or '--' */ if (option[0] != '-') { return NULL; } option++; if (option[0] == '-') { option++; } for (i = 0; i < max; i++) { if (!strcmp(options_table[i].option, option)) { return &(options_table[i]); } } return NULL; } /******************** Recv Poll Processing *********************/ extern unsigned pollnfds; #ifdef HAVE_EPOLL extern int epollfd; extern struct epoll_event epollfiles[SIPP_MAXFDS]; extern struct epoll_event* epollevents; #else extern struct pollfd pollfiles[SIPP_MAXFDS]; #endif extern struct sipp_socket *sockets[SIPP_MAXFDS]; extern int pending_messages; /************** Statistics display & User control *************/ static void sipp_sigusr1(int /* not used */) { /* Smooth exit: do not place any new calls and exit */ quitting+=10; } static void sipp_sigusr2(int /* not used */) { if (!signalDump) { signalDump = true; } } static void pollset_process(int wait) { int rs; /* Number of times to execute recv(). For TCP with 1 socket per call: no. of events returned by poll For UDP and TCP with 1 global socket: recv_count is a flag that stays up as long as there's data to read */ #ifndef HAVE_EPOLL /* What index should we try reading from? */ static size_t read_index; int loops = max_recv_loops; // If not using epoll, we have a queue of pending messages to spin through. if (read_index >= pollnfds) { read_index = 0; } /* We need to process any messages that we have left over. */ while (pending_messages && loops > 0) { getmilliseconds(); if (sockets[read_index]->ss_msglen) { struct sockaddr_storage src; char msg[SIPP_MAX_MSG_SIZE]; ssize_t len = read_message(sockets[read_index], msg, sizeof(msg), &src); if (len > 0) { process_message(sockets[read_index], msg, len, &src); } else { assert(0); } loops--; } read_index = (read_index + 1) % pollnfds; } /* Don't read more data if we still have some left over. */ if (pending_messages) { return; } #endif /* Get socket events. */ #ifdef HAVE_EPOLL /* Ignore the wait parameter and always wait - when establishing TCP * connections, the alternative is that we tight-loop. */ rs = epoll_wait(epollfd, epollevents, max_recv_loops, 1); // If we're receiving as many epollevents as possible, flag CPU congestion cpu_max = (rs > (max_recv_loops - 2)); #else rs = poll(pollfiles, pollnfds, wait ? 1 : 0); #endif if (rs < 0 && errno == EINTR) { return; } /* We need to flush all sockets and pull data into all of our buffers. */ #ifdef HAVE_EPOLL for (int event_idx = 0; event_idx < rs; event_idx++) { int poll_idx = (int)epollevents[event_idx].data.u32; #else for (size_t poll_idx = 0; rs > 0 && poll_idx < pollnfds; poll_idx++) { #endif struct sipp_socket *sock = sockets[poll_idx]; int events = 0; int ret = 0; assert(sock); #ifdef HAVE_EPOLL if (epollevents[event_idx].events & EPOLLOUT) { #else if (pollfiles[poll_idx].revents & POLLOUT) { #endif #ifdef USE_SCTP if (transport == T_SCTP && sock->sctpstate != SCTP_UP); else #endif { /* We can flush this socket. */ TRACE_MSG("Exit problem event on socket %d \n", sock->ss_fd); #ifdef HAVE_EPOLL epollfiles[poll_idx].events &= ~EPOLLOUT; int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, sock->ss_fd, &epollfiles[poll_idx]); if (rc == -1) { ERROR_NO("Failed to clear EPOLLOUT"); } #else pollfiles[poll_idx].events &= ~POLLOUT; #endif sock->ss_congested = false; flush_socket(sock); events++; } } #ifdef HAVE_EPOLL if (epollevents[event_idx].events & EPOLLIN) { #else if (pollfiles[poll_idx].revents & POLLIN) { #endif /* We can empty this socket. */ if ((transport == T_TCP || transport == T_TLS || transport == T_SCTP) && sock == main_socket) { struct sipp_socket *new_sock = sipp_accept_socket(sock); if (!new_sock) { ERROR_NO("Accepting new TCP connection.\n"); } } else if (sock == ctrl_socket) { handle_ctrl_socket(); } else if (sock == stdin_socket) { handle_stdin_socket(); } else if (sock == localTwinSippSocket) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { twinSippSocket = sipp_accept_socket(sock); if (!twinSippMode) { ERROR_NO("Accepting new TCP connection on Twin SIPp Socket.\n"); } twinSippSocket->ss_control = 1; } else { /* 3pcc extended mode: open a local socket which will be used for reading the infos sent by this remote twin sipp instance (slave or master) */ if (local_nb == MAX_LOCAL_TWIN_SOCKETS) { ERROR("Max number of twin instances reached\n"); } struct sipp_socket *localSocket = sipp_accept_socket(sock); localSocket->ss_control = 1; local_sockets[local_nb] = localSocket; local_nb++; if (!peers_connected) { connect_to_all_peers(); } } } else { if ((ret = empty_socket(sock)) <= 0) { #ifdef USE_SCTP if (sock->ss_transport == T_SCTP && ret == -2); else #endif { ret = read_error(sock, ret); if (ret == 0) { /* If read_error() then the poll_idx now belongs * to the newest/last socket added to the sockets[]. * Need to re-do the same poll_idx for the "new" socket. * We do this differently when using epoll. */ #ifdef HAVE_EPOLL for (int event_idx2 = event_idx + 1; event_idx2 < rs; event_idx2++) { if (epollevents[event_idx2].data.u32 == pollnfds) { epollevents[event_idx2].data.u32 = poll_idx; } } #else poll_idx--; events++; rs--; #endif continue; } } } } events++; } /* Here the logic diverges; if we're using epoll, we want to stay in the * for-each-socket loop and handle messages on that socket. If we're not using * epoll, we want to wait until after that loop, and spin through our * pending_messages queue again. */ #ifdef HAVE_EPOLL unsigned old_pollnfds = pollnfds; getmilliseconds(); /* Keep processing messages until this socket is freed (changing the number of file descriptors) or we run out of messages. */ while ((pollnfds == old_pollnfds) && (sock->ss_msglen)) { char msg[SIPP_MAX_MSG_SIZE]; struct sockaddr_storage src; ssize_t len; len = read_message(sock, msg, sizeof(msg), &src); if (len > 0) { process_message(sock, msg, len, &src); } else { assert(0); } } if (pollnfds != old_pollnfds) { /* Processing messages has changed the number of pollnfds, so update any remaining events */ for (int event_idx2 = event_idx + 1; event_idx2 < rs; event_idx2++) { if (epollevents[event_idx2].data.u32 == pollnfds) { epollevents[event_idx2].data.u32 = poll_idx; } } } #else if (events) { rs--; } pollfiles[poll_idx].revents = 0; #endif } #ifndef HAVE_EPOLL if (read_index >= pollnfds) { read_index = 0; } /* We need to process any new messages that we read. */ while (pending_messages && (loops > 0)) { getmilliseconds(); if (sockets[read_index]->ss_msglen) { char msg[SIPP_MAX_MSG_SIZE]; struct sockaddr_storage src; ssize_t len; len = read_message(sockets[read_index], msg, sizeof(msg), &src); if (len > 0) { process_message(sockets[read_index], msg, len, &src); } else { assert(0); } loops--; } read_index = (read_index + 1) % pollnfds; } cpu_max = (loops <= 0); #endif } void timeout_alarm(int /*param*/) { if (timeout_error) { ERROR("%s timed out after '%.3lf' seconds", scenario_file, ((double)clock_tick / 1000LL)); } quitting = 1; timeout_exit = true; } /* Send loop & trafic generation*/ static bool traffic_thread() { /* create the file */ char L_file_name[MAX_PATH]; sprintf(L_file_name, "%s_%d_screen.log", scenario_file, getpid()); getmilliseconds(); /* Arm the global timer if needed */ if (global_timeout > 0) { signal(SIGALRM, timeout_alarm); alarm(global_timeout / 1000); } // Dump (to create file on disk) and showing screen at the beginning even if // the report period is not reached stattask::report(); screentask::report(false); while (1) { scheduling_loops++; getmilliseconds(); if (signalDump) { /* Screen dumping in a file */ if (useScreenf == 1) { print_screens(); } else { /* If the -trace_screen option has not been set, */ /* create the file at this occasion */ rotate_screenf(); print_screens(); } if (dumpInRtt) { main_scenario->stats->dumpDataRtt(); } signalDump = false; } while (sockets_pending_reset.begin() != sockets_pending_reset.end()) { reset_connection(*(sockets_pending_reset.begin())); sockets_pending_reset.erase(sockets_pending_reset.begin()); } if ((main_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + main_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated)) >= stop_after) { quitting = 1; } if (quitting) { if (quitting > 11) { /* Force exit: abort all calls */ abort_all_tasks(); } /* Quitting and no more openned calls, close all */ if (!main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall)) { /* We can have calls that do not count towards our open-call count (e.g., dead calls). */ abort_all_tasks(); #ifdef RTP_STREAM rtpstream_shutdown(); #endif for (unsigned i = 0; i < pollnfds; i++) { sipp_close_socket(sockets[i]); } screentask::report(true); stattask::report(); if (useScreenf == 1) { print_screens(); } return false; } } getmilliseconds(); /* Schedule all pending calls and process their timers */ task_list *running_tasks; if ((clock_tick - last_timer_cycle) > timer_resolution) { /* Just for the count. */ running_tasks = get_running_tasks(); last_running_calls = running_tasks->size(); /* If we have expired paused calls, move them to the run queue. */ last_woken_calls += expire_paused_tasks(); last_paused_calls = paused_tasks_count(); last_timer_cycle = clock_tick; } /* We should never get so busy with running calls that we can't process some messages. */ int loops = max_sched_loops; /* Now we process calls that are on the run queue. */ running_tasks = get_running_tasks(); /* Workaround hpux problem with iterators. Deleting the * current object when iterating breaks the iterator and * leads to iterate again on the destroyed (deleted) * object. Thus, we have to wait ont step befere actual * deletion of the object*/ task * last = NULL; task_list::iterator iter; for(iter = running_tasks->begin(); iter != running_tasks->end(); iter++) { if (last) { last -> run(); if (sockets_pending_reset.begin() != sockets_pending_reset.end()) { last = NULL; break; } } last = *iter; if (--loops <= 0) { break; } } if (last) { last -> run(); } while (sockets_pending_reset.begin() != sockets_pending_reset.end()) { reset_connection(*(sockets_pending_reset.begin())); sockets_pending_reset.erase(sockets_pending_reset.begin()); } /* Update the clock. */ getmilliseconds(); /* Receive incoming messages */ pollset_process(running_tasks->empty()); } return true; } /*************** RTP ECHO THREAD ***********************/ /* param is a pointer to RTP socket */ static void rtp_echo_thread(void* param) { char* msg = (char*)alloca(media_bufsize); size_t nr, ns; sipp_socklen_t len; struct sockaddr_storage remote_rtp_addr; int rc; sigset_t mask; sigfillset(&mask); /* Mask all allowed signals */ rc = pthread_sigmask(SIG_BLOCK, &mask, NULL); if (rc) { WARNING("pthread_sigmask returned %d", rc); return; } for (;;) { len = sizeof(remote_rtp_addr); nr = recvfrom(*(int*)param, msg, media_bufsize, 0, (sockaddr*)&remote_rtp_addr, &len); if (((long)nr) < 0) { WARNING("%s %i", "Error on RTP echo reception - stopping echo - errno=", errno); return; } ns = sendto(*(int*)param, msg, nr, 0, (sockaddr*)&remote_rtp_addr, len); if (ns != nr) { WARNING("%s %i", "Error on RTP echo transmission - stopping echo - errno=", errno); return; } if (*(int*)param == media_socket) { rtp_pckts++; rtp_bytes += ns; } else { /* packets on the second RTP stream */ rtp2_pckts++; rtp2_bytes += ns; } } } /* Wrap the help text. */ static char* wrap(const char* in, int offset, int size) { int pos = 0; int i, j; int l = strlen(in); int alloced = l + 1; char* out = (char*)malloc(alloced); int indent = 0; if (!out) { ERROR_NO("malloc"); } for (i = j = 0; i < l; i++) { out[j++] = in[i]; if (in[i] == '\n') { out = (char*)realloc(out, alloced += offset); if (!out) { ERROR_NO("realloc"); } pos = 0; for (int k = 0; k < offset; k++) { out[j++] = ' '; } if (indent) { indent = 0; } } if (in[i] == '-' && i > 0 && in[i - 1] == '\n') { indent = 1; } if (++pos > size) { int k; for (k = j - 1; k > 0 && !isspace(out[k]); k--); int useoffset = offset; if (indent) { useoffset += 2; } if (k == 0 || out[k] == '\n') { pos = 0; out[j++] = '\n'; out = (char*)realloc(out, alloced += useoffset); if (!out) { ERROR_NO("realloc"); } for (k = 0; k < useoffset; k++) { out[j++] = ' '; } } else { int m; int move_back = 0; out[k] = '\n'; pos = j - k; // move_back is used to step back in the in and out buffers when a // word is longer than useoffset. if (i > (k + useoffset)) { move_back = i - (k + useoffset); i -= move_back; } k++; out = (char*)realloc(out, alloced += useoffset); if (!out) { ERROR_NO("realloc"); } for (m = 0; m < useoffset; m++) { if (k + useoffset + m < alloced) { out[k + useoffset + m] = out[k + m]; } out[k + m] = ' '; } j += useoffset - move_back; } } } out[j] = '\0'; return out; } /* Help screen */ static void help() { int i, max; printf ("\n" "Usage:\n" "\n" " sipp remote_host[:remote_port] [options]\n" "\n" "Example:\n" "\n" " Run SIPp with embedded server (uas) scenario:\n" " ./sipp -sn uas\n" " On the same host, run SIPp with embedded client (uac) scenario:\n" " ./sipp -sn uac 127.0.0.1\n" "\n" " Available options:\n" "\n"); /* We automatically generate the help messages based on the options array. * This should hopefully encourage people to write help text when they * introduce a new option and keep the code a bit cleaner. */ max = sizeof(options_table) / sizeof(options_table[0]); for (i = 0; i < max; i++) { char *formatted; if (!options_table[i].help) { continue; } formatted = wrap(options_table[i].help, 22, 77); if (options_table[i].type == SIPP_HELP_TEXT_HEADER) { printf("\n*** %s\n\n", formatted); } else { printf(" -%-16s: %s\n", options_table[i].option, formatted); } free(formatted); } printf ( "\n\nSignal handling:\n" "\n" " SIPp can be controlled using POSIX signals. The following signals\n" " are handled:\n" " USR1: Similar to pressing the 'q' key. It triggers a soft exit\n" " of SIPp. No more new calls are placed and all ongoing calls\n" " are finished before SIPp exits.\n" " Example: kill -SIGUSR1 732\n" " USR2: Triggers a dump of all statistics screens in\n" " __screens.log file. Especially useful \n" " in background mode to know what the current status is.\n" " Example: kill -SIGUSR2 732\n" "\n" "Exit codes:\n" "\n" " Upon exit (on fatal error or when the number of asked calls (-m\n" " option) is reached, SIPp exits with one of the following exit\n" " code:\n" " 0: All calls were successful\n" " 1: At least one call failed\n" " 97: Exit on internal command. Calls may have been processed\n" " 99: Normal exit without calls processed\n" " -1: Fatal error\n" " -2: Fatal error binding a socket\n"); } static void help_stats() { printf( "\n" " The -trace_stat option dumps all statistics in the\n" " file. The dump starts with one header\n" " line with all counters. All following lines are 'snapshots' of \n" " statistics counter given the statistics report frequency\n" " (-fd option). This file can be easily imported in any\n" " spreadsheet application, like Excel.\n" "\n" " In counter names, (P) means 'Periodic' - since last\n" " statistic row and (C) means 'Cumulative' - since SIPp was\n" " started.\n" "\n" " Available statistics are:\n" "\n" " - StartTime: \n" " Date and time when the test has started.\n" "\n" " - LastResetTime:\n" " Date and time when periodic counters were last reset.\n" "\n" " - CurrentTime:\n" " Date and time of the statistic row.\n" "\n" " - ElapsedTime:\n" " Elapsed time.\n" "\n" " - CallRate:\n" " Call rate (calls per seconds).\n" "\n" " - IncomingCall:\n" " Number of incoming calls.\n" "\n" " - OutgoingCall:\n" " Number of outgoing calls.\n" "\n" " - TotalCallCreated:\n" " Number of calls created.\n" "\n" " - CurrentCall:\n" " Number of calls currently ongoing.\n" "\n" " - SuccessfulCall:\n" " Number of successful calls.\n" "\n" " - FailedCall:\n" " Number of failed calls (all reasons).\n" "\n" " - FailedCannotSendMessage:\n" " Number of failed calls because SIPp cannot send the\n" " message (transport issue).\n" "\n" " - FailedMaxUDPRetrans:\n" " Number of failed calls because the maximum number of\n" " UDP retransmission attempts has been reached.\n" "\n" " - FailedUnexpectedMessage:\n" " Number of failed calls because the SIP message received\n" " is not expected in the scenario.\n" "\n" " - FailedCallRejected:\n" " Number of failed calls because of SIPp internal error.\n" " (a scenario sync command is not recognized, a scenario\n" " action failed or a scenario variable assignment failed).\n" "\n" " - FailedCmdNotSent:\n" " Number of failed calls because of inter-SIPp\n" " communication error (a scenario sync command failed to\n" " be sent).\n" "\n" " - FailedRegexpDoesntMatch:\n" " Number of failed calls because of regexp that doesn't\n" " match (there might be several regexp that don't match\n" " during the call but the counter is increased only by\n" " one).\n" "\n" " - FailedRegexpShouldntMatch:\n" " Number of failed calls because of regexp that shouldn't\n" " match but does (there might be several regexp that shouldn't match\n" " during the call but the counter is increased only by\n" " one).\n" "\n" " - FailedRegexpHdrNotFound:\n" " Number of failed calls because of regexp with 'hdr'\n" " option but no matching header found.\n" "\n" " - OutOfCallMsgs:\n" " Number of SIP messages received that cannot be associated\n" " to an existing call.\n" "\n" " - AutoAnswered:\n" " Number of unexpected specific messages received for new Call-ID.\n" " The message has been automatically answered by a 200 OK\n" " Currently, implemented for 'NOTIFY', 'INFO' and 'PING' messages.\n" "\n"); } /************* exit handler *****************/ static void print_last_stats() { interrupt = 1; // print last current screen print_statistics(1); // and print statistics screen currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_statistics(1); if (main_scenario) { stattask::report(); } } static void stop_all_traces() { message_lfi.fptr = NULL; log_lfi.fptr = NULL; dumpInRtt = 0; dumpInFile = 0; } static void freeInFiles() { for (file_map::iterator file_it = inFiles.begin(); file_it != inFiles.end(); file_it++) { delete file_it->second; } } static void freeUserVarMap() { for (int_vt_map::iterator vt_it = userVarMap.begin(); vt_it != userVarMap.end(); vt_it++) { vt_it->second->putTable(); userVarMap[vt_it->first] = NULL; } } static void manage_oversized_file(int signum) { FILE *f; char L_file_name[MAX_PATH]; struct timeval currentTime; static int managing = 0; // we can receive this signal more than once if (managing) { return; } managing = 1; snprintf(L_file_name, MAX_PATH, "%s_%d_traces_oversized.log", scenario_file, getpid()); f = fopen(L_file_name, "w"); if (!f) { ERROR_NO("Unable to open oversized log file\n"); } GET_TIME(¤tTime); fprintf(f, "-------------------------------------------- %s\n" "Max file size reached - no more logs\n", CStat::formatTime(¤tTime)); fflush(f); stop_all_traces(); print_all_responses = 0; error_lfi.fptr = NULL; } static void releaseGlobalAllocations() { delete main_scenario; delete ooc_scenario; delete aa_scenario; free_default_messages(); freeInFiles(); freeUserVarMap(); delete userVariables; delete globalVariables; } void sipp_exit(int rc) { unsigned long counter_value_failed = 0; unsigned long counter_value_success = 0; /* Some signals may be delivered twice during exit() execution, and we must prevent all this from beeing done twice */ { static int already_exited = 0; if (already_exited) { return; } already_exited = 1; } screen_exit(); print_last_stats(); screen_show_errors(); /* Close open files. */ struct logfile_info** logfile_ptr; struct logfile_info* logfiles[] = { &screen_lfi, &calldebug_lfi, &message_lfi, &shortmessage_lfi, &log_lfi, &error_lfi, NULL}; for (logfile_ptr = logfiles; *logfile_ptr; ++logfile_ptr) { if ((*logfile_ptr)->fptr) { fclose((*logfile_ptr)->fptr); (*logfile_ptr)->fptr = NULL; } } // Get failed calls counter value before releasing objects if (display_scenario) { counter_value_failed = display_scenario->stats->GetStat(CStat::CPT_C_FailedCall); counter_value_success = display_scenario->stats->GetStat(CStat::CPT_C_SuccessfulCall); } else { rc = EXIT_TEST_FAILED; } releaseGlobalAllocations(); if (rc != EXIT_TEST_RES_UNKNOWN) { // Exit is not a normal exit. Just use the passed exit code. exit(rc); } else { // Normal exit: we need to determine if the calls were all // successful or not. In order to compute the return code, get // the counter of failed calls. If there is 0 failed calls, // then everything is OK! if (counter_value_failed == 0) { if (timeout_exit && counter_value_success < 1) { exit(EXIT_TEST_RES_INTERNAL); } else { exit(EXIT_TEST_OK); } } else { exit(EXIT_TEST_FAILED); } } } static void sipp_sighandler(int signum) { sipp_exit(EXIT_TEST_RES_UNKNOWN); } static void sighandle_set() { struct sigaction action_quit = {}; struct sigaction action_file_size_exceeded = {}; action_quit.sa_handler = sipp_sighandler; action_file_size_exceeded.sa_handler = manage_oversized_file; sigaction(SIGTERM, &action_quit, NULL); sigaction(SIGINT, &action_quit, NULL); sigaction(SIGXFSZ, &action_file_size_exceeded, NULL); // avoid core dump if the max file size is exceeded } static void set_scenario(const char* name) { free(scenario_file); free(scenario_path); const char* ext = strrchr(name, '.'); if (ext && strcmp(ext, ".xml") == 0) { scenario_file = strndup(name, ext - name); } else { scenario_file = strdup(name); } const char* sep = strrchr(scenario_file, '/'); if (sep) { scenario_path = strndup(scenario_file, sep - scenario_file); } else { scenario_path = NULL; } } /* Main */ int main(int argc, char *argv[]) { int argi = 0; struct sockaddr_storage media_sockaddr; pthread_t pthread2_id = 0, pthread3_id = 0; unsigned int generic_count = 0; bool slave_masterSet = false; generic[0] = NULL; /* At least one argument is needed */ if (argc < 2) { help(); exit(EXIT_OTHER); } { /* Ignore the SIGPIPE signal */ struct sigaction action_pipe; memset(&action_pipe, 0, sizeof(action_pipe)); action_pipe.sa_handler=SIG_IGN; sigaction(SIGPIPE, &action_pipe, NULL); /* The Window Size change Signal is also useless, and causes failures. */ #ifdef SIGWINCH sigaction(SIGWINCH, &action_pipe, NULL); #endif /* sig usr1 management */ struct sigaction action_usr1; memset(&action_usr1, 0, sizeof(action_usr1)); action_usr1.sa_handler = sipp_sigusr1; sigaction(SIGUSR1, &action_usr1, NULL); /* sig usr2 management */ struct sigaction action_usr2; memset(&action_usr2, 0, sizeof(action_usr2)); action_usr2.sa_handler = sipp_sigusr2; sigaction(SIGUSR2, &action_usr2, NULL); } screen_set_exename("sipp"); pid = getpid(); memset(local_ip, 0, 40); #ifdef USE_SCTP memset(multihome_ip, 0, 40); #endif memset(media_ip, 0, 40); memset(control_ip, 0, 40); memset(media_ip_escaped, 0, 42); /* Initialize the tolower table. */ init_tolower_table(); /* Initialize our global variable structure. */ globalVariables = new AllocVariableTable(NULL); userVariables = new AllocVariableTable(globalVariables); /* Command line parsing */ #define REQUIRE_ARG() if ((++argi) >= argc) { \ ERROR("Missing argument for param '%s'.\nUse 'sipp -h' for details", argv[argi - 1]); } #define CHECK_PASS() if (option->pass != pass) { break; } for (int pass = 0; pass <= 3; pass++) { for(argi = 1; argi < argc; argi++) { struct sipp_option *option = find_option(argv[argi]); if (!option) { if (argv[argi][0] != '-') { strncpy(remote_host, argv[argi], sizeof(remote_host) - 1); continue; } help(); ERROR("Invalid argument: '%s'.\n" "Use 'sipp -h' for details", argv[argi]); } switch(option->type) { case SIPP_OPTION_HELP: if (argi + 1 < argc && !strcmp(argv[argi + 1], "stat")) { help_stats(); } else { help(); } exit(EXIT_OTHER); case SIPP_OPTION_VERSION: printf("\n %s.\n\n", /* SIPp v1.2.3-TLS-PCAP built YMD, HMS */ "SIPp " SIPP_VERSION #ifdef USE_OPENSSL "-TLS" #endif #ifdef USE_SCTP "-SCTP" #endif #ifdef PCAPPLAY "-PCAP" #endif #ifdef RTP_STREAM "-RTPSTREAM" #endif " built " __DATE__ ", " __TIME__); printf (" This program is free software; you can redistribute it and/or\n" " modify it under the terms of the GNU General Public License as\n" " published by the Free Software Foundation; either version 2 of\n" " the License, or (at your option) any later version.\n" "\n" " This program is distributed in the hope that it will be useful,\n" " but WITHOUT ANY WARRANTY; without even the implied warranty of\n" " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" " GNU General Public License for more details.\n" "\n" " You should have received a copy of the GNU General Public\n" " License along with this program; if not, write to the\n" " Free Software Foundation, Inc.,\n" " 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n" "\n" " Author: see source files.\n\n"); exit(EXIT_OTHER); case SIPP_OPTION_INT: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = get_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_LONG: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_LONG_LONG: REQUIRE_ARG(); CHECK_PASS(); *((unsigned long long*)option->data) = get_long_long(argv[argi], argv[argi-1]); break; case SIPP_OPTION_TIME_SEC: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_time(argv[argi], argv[argi-1], 1000); break; case SIPP_OPTION_TIME_MS: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = get_time(argv[argi], argv[argi-1], 1); break; case SIPP_OPTION_TIME_MS_LONG: REQUIRE_ARG(); CHECK_PASS(); *((long*)option->data) = get_time(argv[argi], argv[argi-1], 1); break; case SIPP_OPTION_BOOL: REQUIRE_ARG(); CHECK_PASS(); *((bool*)option->data) = get_bool(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_FLOAT: REQUIRE_ARG(); CHECK_PASS(); *((double*)option->data) = get_double(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_STRING: REQUIRE_ARG(); CHECK_PASS(); *((char**)option->data) = argv[argi]; break; case SIPP_OPTION_ARGI: REQUIRE_ARG(); CHECK_PASS(); *((int*)option->data) = argi; break; case SIPP_OPTION_INPUT_FILE: { REQUIRE_ARG(); CHECK_PASS(); FileContents *data = new FileContents(argv[argi]); char *name = argv[argi]; if (strrchr(name, '/')) { name = strrchr(name, '/') + 1; } else if (strrchr(name, '\\')) { name = strrchr(name, '\\') + 1; } assert(name); inFiles[name] = data; /* By default, the first file is used for IP address input. */ if (!ip_file) { ip_file = name; } if (!default_file) { default_file = name; } } break; case SIPP_OPTION_INDEX_FILE: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); { char *fileName = argv[argi - 1]; char *endptr; int field; if (inFiles.find(fileName) == inFiles.end()) { ERROR("Could not find file for -infindex: %s", argv[argi - 1]); } field = strtoul(argv[argi], &endptr, 0); if (*endptr) { ERROR("Invalid field specification for -infindex: %s", argv[argi]); } inFiles[fileName]->index(field); } break; case SIPP_OPTION_SETFLAG: CHECK_PASS(); *((bool*)option->data) = true; break; case SIPP_OPTION_UNSETFLAG: CHECK_PASS(); *((bool*)option->data) = false; break; case SIPP_OPTION_TRANSPORT: REQUIRE_ARG(); CHECK_PASS(); if (strlen(argv[argi]) != 2) { ERROR("Invalid argument for -t param : '%s'.\n" "Use 'sipp -h' for details", argv[argi]); } switch(argv[argi][0]) { case 'u': transport = T_UDP; break; case 't': transport = T_TCP; break; case 's': #ifdef USE_SCTP transport = T_SCTP; #else ERROR("To use SCTP transport you must compile SIPp with lksctp"); #endif break; case 'l': #ifdef USE_OPENSSL transport = T_TLS; if (init_OpenSSL() != 1) { printf("OpenSSL Initialization problem\n"); exit(-1); } #else ERROR("To use a TLS transport you must compile SIPp with OpenSSL"); #endif break; case 'c': if (strlen(comp_error)) { ERROR("No " COMP_PLUGGIN " plugin available:\n%s", comp_error); } transport = T_UDP; compression = 1; } switch(argv[argi][1]) { case '1': multisocket = 0; peripsocket = 0; break; case 'n': multisocket = 1; peripsocket = 0; break; case 'i': multisocket = 1; peripsocket = 1; socket_close = false; break; } if (peripsocket && transport != T_UDP) { ERROR("You can only use a perip socket with UDP!\n"); } break; case SIPP_OPTION_NEED_SCTP: CHECK_PASS(); ERROR("SCTP support is required for the %s option.", argv[argi]); break; case SIPP_OPTION_NEED_SSL: CHECK_PASS(); ERROR("OpenSSL is required for the %s option.", argv[argi]); break; case SIPP_OPTION_MAX_SOCKET: REQUIRE_ARG(); CHECK_PASS(); max_multi_socket = get_long(argv[argi], argv[argi - 1]); maxSocketPresent = true; break; case SIPP_OPTION_CSEQ: REQUIRE_ARG(); CHECK_PASS(); base_cseq = get_long(argv[argi], argv[argi - 1]); base_cseq--; break; case SIPP_OPTION_IP: { int dummy_port; char* ptr = (char*)option->data; REQUIRE_ARG(); CHECK_PASS(); strcpy(ptr, argv[argi]); get_host_and_port(ptr, ptr, &dummy_port); } break; case SIPP_OPTION_LIMIT: REQUIRE_ARG(); CHECK_PASS(); if (users >= 0) { ERROR("Can not set open call limit (-l) when -users is specified."); } open_calls_allowed = get_long(argv[argi], argv[argi - 1]); open_calls_user_setting = 1; break; case SIPP_OPTION_USERS: REQUIRE_ARG(); CHECK_PASS(); users = open_calls_allowed = get_long(argv[argi], argv[argi - 1]); open_calls_user_setting = 1; break; case SIPP_OPTION_KEY: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); if (generic_count + 1 >= sizeof(generic)/sizeof(generic[0])) { ERROR("Too many generic parameters %d",generic_count + 1); } generic[generic_count++] = &argv[argi - 1]; generic[generic_count] = NULL; break; case SIPP_OPTION_VAR: REQUIRE_ARG(); REQUIRE_ARG(); CHECK_PASS(); { int varId = globalVariables->find(argv[argi - 1], false); if (varId == -1) { globalVariables->dump(); ERROR("Can not set the global variable %s, because it does not exist.", argv[argi - 1]); } globalVariables->getVar(varId)->setString(strdup(argv[argi])); } break; case SIPP_OPTION_3PCC: if (slave_masterSet) { ERROR("-3PCC option is not compatible with -master and -slave options\n"); } if (extendedTwinSippMode) { ERROR("-3pcc and -slave_cfg options are not compatible\n"); } REQUIRE_ARG(); CHECK_PASS(); twinSippMode = true; strcpy(twinSippHost, argv[argi]); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); break; case SIPP_OPTION_SCENARIO: REQUIRE_ARG(); CHECK_PASS(); if (!strcmp(argv[argi - 1], "-sf")) { set_scenario(argv[argi]); if (useLogf == 1) { rotate_logfile(); } main_scenario = new scenario(argv[argi], 0); main_scenario->stats->setFileName(scenario_file, ".csv"); } else if (!strcmp(argv[argi - 1], "-sn")) { int i = find_scenario(argv[argi]); main_scenario = new scenario(0, i); set_scenario(argv[argi]); main_scenario->stats->setFileName(argv[argi], ".csv"); } else if (!strcmp(argv[argi - 1], "-sd")) { int i = find_scenario(argv[argi]); fprintf(stdout, "%s", default_scenario[i]); exit(EXIT_OTHER); } else { ERROR("Internal error, I don't recognize %s as a scenario option\n", argv[argi] - 1); } break; case SIPP_OPTION_OOC_SCENARIO: REQUIRE_ARG(); CHECK_PASS(); if (!strcmp(argv[argi - 1], "-oocsf")) { ooc_scenario = new scenario(argv[argi], 0); } else if (!strcmp(argv[argi - 1], "-oocsn")) { int i = find_scenario(argv[argi]); ooc_scenario = new scenario(0, i); } else { ERROR("Internal error, I don't recognize %s as a scenario option\n", argv[argi] - 1); } break; case SIPP_OPTION_SLAVE_CFG: REQUIRE_ARG(); CHECK_PASS(); if (twinSippMode) { ERROR("-slave_cfg and -3pcc options are not compatible\n"); } extendedTwinSippMode = true; slave_cfg_file = new char [strlen(argv[argi]) + 1]; sprintf(slave_cfg_file,"%s", argv[argi]); parse_slave_cfg(); break; case SIPP_OPTION_3PCC_EXTENDED: REQUIRE_ARG(); CHECK_PASS(); if (slave_masterSet) { ERROR("-slave and -master options are not compatible\n"); } if (twinSippMode) { ERROR("-master and -slave options are not compatible with -3PCC option\n"); } *((char**)option->data) = argv[argi]; slave_masterSet = true; break; case SIPP_OPTION_RSA: { REQUIRE_ARG(); CHECK_PASS(); char *remote_s_address; int remote_s_p = DEFAULT_PORT; int temp_remote_s_p; temp_remote_s_p = 0; remote_s_address = argv[argi]; get_host_and_port(remote_s_address, remote_s_address, &temp_remote_s_p); if (temp_remote_s_p != 0) { remote_s_p = temp_remote_s_p; } struct addrinfo hints; struct addrinfo * local_addr; printf("Resolving remote sending address %s...\n", remote_s_address); memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; /* FIXME: add DNS SRV support using liburli? */ if (getaddrinfo(remote_s_address, NULL, &hints, &local_addr) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", remote_s_address); } memcpy(&remote_sending_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); if (remote_sending_sockaddr.ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, &remote_sending_sockaddr))->sin_port = htons(remote_s_p); } else { (_RCAST(struct sockaddr_in6*, &remote_sending_sockaddr))->sin6_port = htons(remote_s_p); } use_remote_sending_addr = 1; freeaddrinfo(local_addr); break; } case SIPP_OPTION_RTCHECK: REQUIRE_ARG(); CHECK_PASS(); if (!strcmp(argv[argi], "full")) { *((int*)option->data) = RTCHECK_FULL; } else if (!strcmp(argv[argi], "loose")) { *((int*)option->data) = RTCHECK_LOOSE; } else { ERROR("Unknown retransmission detection method: %s\n", argv[argi]); } break; case SIPP_OPTION_TDMMAP: { REQUIRE_ARG(); CHECK_PASS(); int i1, i2, i3, i4, i5, i6, i7; if (sscanf(argv[argi], "{%d-%d}{%d}{%d-%d}{%d-%d}", &i1, &i2, &i3, &i4, &i5, &i6, &i7) == 7) { use_tdmmap = true; tdm_map_a = i2 - i1; tdm_map_x = i1; tdm_map_h = i3; tdm_map_b = i5 - i4; tdm_map_y = i4; tdm_map_c = i7 - i6; tdm_map_z = i6; } else { ERROR("Parameter -tdmmap must be of form {%%d-%%d}{%%d}{%%d-%%d}{%%d-%%d}"); } break; } case SIPP_OPTION_DEFAULTS: { unsigned long *ptr = (unsigned long*)option->data; char *token; REQUIRE_ARG(); CHECK_PASS(); *ptr = 0; token = argv[argi]; while ((token = strtok(token, ","))) { if (!strcmp(token, "none")) { *ptr = 0; } else { unsigned long mask = 0; int mode = 1; char *p = token; if (token[0] == '+') { mode = 1; p++; } else if (token[0] == '-') { mode = -1; p++; } if (!strcmp(p, "all")) { mask = DEFAULT_BEHAVIOR_ALL; } else if (!strcmp(p, "bye")) { mask = DEFAULT_BEHAVIOR_BYE; } else if (!strcmp(p, "abortunexp")) { mask = DEFAULT_BEHAVIOR_ABORTUNEXP; } else if (!strcmp(p, "pingreply")) { mask = DEFAULT_BEHAVIOR_PINGREPLY; } else { ERROR("Unknown default behavior: '%s'\n", token); } switch(mode) { case 0: *ptr = mask; break; case 1: *ptr |= mask; break; case -1: *ptr &= ~mask; break; default: assert(0); } } token = NULL; } break; } case SIPP_OPTION_LFNAME: REQUIRE_ARG(); CHECK_PASS(); ((struct logfile_info*)option->data)->fixedname = true; strcpy(((struct logfile_info*)option->data)->file_name, argv[argi]); break; case SIPP_OPTION_LFOVERWRITE: REQUIRE_ARG(); CHECK_PASS(); ((struct logfile_info*)option->data)->fixedname = true; ((struct logfile_info*)option->data)->overwrite = get_bool(argv[argi], argv[argi - 1]); break; case SIPP_OPTION_PLUGIN: { int ret; REQUIRE_ARG(); CHECK_PASS(); void* handle = dlopen(argv[argi], RTLD_NOW); if (!handle) { ERROR("Could not open plugin %s: %s", argv[argi], dlerror()); } int (*init)(); void* funcptr = dlsym(handle, "init"); /* http://stackoverflow.com/questions/1096341/function-pointers-casting-in-c */ *reinterpret_cast(&init) = funcptr; // yuck const char* error; if ((error = dlerror())) { ERROR("Could not locate init function in %s: %s", argv[argi], error); } ret = init(); if (ret != 0) { ERROR("Plugin %s initialization failed.", argv[argi]); } } break; default: ERROR("Internal error: I don't recognize the option type for %s\n", argv[argi]); } } } /* Load compression plugin if needed/available. */ if (compression) { comp_load(); } if ((extendedTwinSippMode && !slave_masterSet) || (!extendedTwinSippMode && slave_masterSet)) { ERROR("-slave_cfg option must be used with -slave or -master option\n"); } if (peripsocket) { if (!ip_file) { ERROR("You must use the -inf option when using -t ui.\n" "Use 'sipp -h' for details"); } } if (ringbuffer_size && max_log_size) { ERROR("Ring Buffer options and maximum log size are mutually exclusive."); } if (global_lost) { lose_packets = 1; } /* trace file setting */ if (scenario_file == NULL) { set_scenario("sipp"); } #ifdef USE_OPENSSL if ((transport == T_TLS) && (FI_init_ssl_context() != SSL_INIT_NORMAL)) { ERROR("FI_init_ssl_context() failed"); } #endif if (useMessagef == 1) { rotate_messagef(); } if (useShortMessagef == 1) { rotate_shortmessagef(); } if (useCallDebugf) { rotate_calldebugf(); } if (useScreenf == 1) { rotate_screenf(); } // TODO: finish the -trace_timeout option implementation /* if (useTimeoutf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%d_timeout.log", scenario_file, getpid()); timeoutf = fopen(L_file_name, "w"); if (!timeoutf) { ERROR("Unable to create '%s'", L_file_name); } } */ if (useCountf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%d_counts.csv", scenario_file, getpid()); countf = fopen(L_file_name, "w"); if (!countf) { ERROR("Unable to create '%s'", L_file_name); } print_count_file(countf, 1); } if (useErrorCodesf == 1) { char L_file_name [MAX_PATH]; sprintf(L_file_name, "%s_%d_error_codes.csv", scenario_file, getpid()); codesf = fopen(L_file_name, "w"); if (!codesf) { ERROR("Unable to create '%s'", L_file_name); } } if (dumpInRtt == 1) { main_scenario->stats->initRtt((char*)scenario_file, (char*)".csv", report_freq_dumpRtt); } if (rate_increase_freq == 0) { rate_increase_freq = report_freq_dumpLog; } // Check the soft limit on the number of open files, // error out if this does not allow us to open the // required number of signalling channels, and warn // if this may not allow enough media channels. if (!skip_rlimit) { struct rlimit rlimit; unsigned max_sockets_needed = multisocket ? max_multi_socket : 1; if (getrlimit (RLIMIT_NOFILE, &rlimit) < 0) { ERROR_NO("getrlimit error"); } if (max_sockets_needed > rlimit.rlim_cur) { ERROR("Maximum number of open sockets (%d) should be less than the maximum number " "of open files (%lu). Tune this with the `ulimit` command or the -max_socket " "option", max_sockets_needed, (unsigned long)rlimit.rlim_cur); } if ((open_calls_allowed + max_sockets_needed) > rlimit.rlim_cur) { WARNING("Maximum number of open sockets (%d) plus number of open calls (%d) " "should be less than the maximum number of open files (%lu) to " "allow for media support. Tune this with the `ulimit` command, " "the -l option or the -max_socket option", max_sockets_needed, open_calls_allowed, (unsigned long)rlimit.rlim_cur); } } /* Load default scenario in case nothing was loaded */ if (!main_scenario) { main_scenario = new scenario(0, 0); main_scenario->stats->setFileName("uac", ".csv"); sprintf(scenario_file,"uac"); } /* if (!ooc_scenario) { ooc_scenario = new scenario(0, find_scenario("ooc_default")); ooc_scenario->stats->setFileName((char*)"ooc_default", (char*)".csv"); } */ display_scenario = main_scenario; aa_scenario = new scenario(0, find_scenario("ooc_dummy")); aa_scenario->stats->setFileName("ooc_dummy", ".csv"); init_default_messages(); for (int i = 1; i <= users; i++) { freeUsers.push_back(i); userVarMap[i] = new VariableTable(userVariables); } if (argiFileName) { main_scenario->stats->setFileName(argv[argiFileName]); } // setup option form cmd line call::maxDynamicId = maxDynamicId; call::startDynamicId = startDynamicId; call::dynamicId = startDynamicId; call::stepDynamicId = stepDynamicId; /* Now Initialize the scenarios. */ main_scenario->runInit(); if (ooc_scenario) { ooc_scenario->runInit(); } /* In which mode the tool is launched ? */ main_scenario->computeSippMode(); if (ooc_scenario && sendMode == MODE_SERVER) { ERROR("SIPp cannot use out-of-call scenarios when running in server mode"); } if (!isatty(fileno(stdout))) use_curses = false; if (use_curses) screen_init(); sighandle_set(); /* checking if we need to launch the tool in background mode */ if (backgroundMode == true) { pid_t l_pid; switch (l_pid = fork()) { case -1: // error when forking ! ERROR_NO("Forking error"); exit(EXIT_FATAL_ERROR); case 0: // child process - poursuing the execution // close all of our file descriptors { int nullfd = open("/dev/null", O_RDWR); dup2(nullfd, fileno(stdin)); dup2(nullfd, fileno(stdout)); dup2(nullfd, fileno(stderr)); close(nullfd); } break; default: // parent process - killing the parent - the child get the parent pid printf("Background mode - PID=[%d]\n", l_pid); exit(EXIT_OTHER); } } sipp_usleep(sleeptime * 1000); /* Create the statistics reporting task. */ stattask::initialize(); /* Create the screen update task. */ screentask::initialize(); /* Create the rate increase task. */ ratetask::initialize(); /* Create a watchdog task. */ if (watchdog_interval) { new watchdog(watchdog_interval, watchdog_reset, watchdog_major_threshold, watchdog_major_maxtriggers, watchdog_minor_threshold, watchdog_minor_maxtriggers); } /* Setting the rate and its dependant params (open_calls_allowed) */ /* If we are a client, then create the task to open new calls. */ if (creationMode == MODE_CLIENT) { CallGenerationTask::initialize(); CallGenerationTask::set_rate(rate); } #ifdef HAVE_EPOLL epollevents = (struct epoll_event*)malloc(sizeof(struct epoll_event) * max_recv_loops); epollfd = epoll_create(SIPP_MAXFDS); if (epollfd == -1) { ERROR_NO("Failed to open epoll FD"); } #endif open_connections(); /* Defaults for media sockets */ if (media_ip[0] == '\0') { strcpy(media_ip, local_ip); } if (media_ip_escaped[0] == '\0') { // Use get_host_and_port to remove square brackets from an // IPv6 address get_host_and_port(local_ip, media_ip_escaped, NULL); } if (local_ip_is_ipv6) { media_ip_is_ipv6 = true; } else { media_ip_is_ipv6 = false; } /* Always create and Bind RTP socket */ /* to avoid ICMP */ if (1) { /* retrieve RTP local addr */ struct addrinfo hints; struct addrinfo * local_addr; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; /* Resolving local IP */ if (getaddrinfo(media_ip, NULL, &hints, &local_addr) != 0) { ERROR("Unknown RTP address '%s'.\n" "Use 'sipp -h' for details", media_ip); } memset(&media_sockaddr,0,sizeof(struct sockaddr_storage)); media_sockaddr.ss_family = local_addr->ai_addr->sa_family; memcpy(&media_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *,local_addr->ai_addr))); freeaddrinfo(local_addr); if ((media_socket = socket(media_ip_is_ipv6 ? AF_INET6 : AF_INET, SOCK_DGRAM, 0)) == -1) { ERROR_NO("Unable to get the audio RTP socket (IP=%s, port=%d)", media_ip, media_port); } /* create a second socket for video */ if ((media_socket_video = socket(media_ip_is_ipv6 ? AF_INET6 : AF_INET, SOCK_DGRAM, 0)) == -1) { ERROR_NO("Unable to get the video RTP socket (IP=%s, port=%d)", media_ip, media_port + 2); } int try_counter; int max_tries = user_media_port ? 1 : 100; media_port = user_media_port ? user_media_port : DEFAULT_MEDIA_PORT; for (try_counter = 0; try_counter < max_tries; try_counter++) { if (media_sockaddr.ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, &media_sockaddr))->sin_port = htons(media_port); } else { (_RCAST(struct sockaddr_in6*, &media_sockaddr))->sin6_port = htons(media_port); media_ip_is_ipv6 = true; } // Use get_host_and_port to remove square brackets from an // IPv6 address get_host_and_port(media_ip, media_ip_escaped, NULL); if (::bind(media_socket, (sockaddr*)&media_sockaddr, SOCK_ADDR_SIZE(&media_sockaddr)) == 0) { break; } media_port++; } if (try_counter >= max_tries) { ERROR_NO("Unable to bind audio RTP socket (IP=%s, port=%d)", media_ip, media_port); } /*--------------------------------------------------------- Bind the second socket to media_port+2 (+1 is reserved for RTCP) ----------------------------------------------------------*/ if (media_sockaddr.ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, &media_sockaddr))->sin_port = htons(media_port + 2); // Use get_host_and_port to remove square brackets from an // IPv6 address get_host_and_port(media_ip, media_ip_escaped, NULL); } else { (_RCAST(struct sockaddr_in6*, &media_sockaddr))->sin6_port = htons(media_port + 2); media_ip_is_ipv6 = true; // Use get_host_and_port to remove square brackets from an // IPv6 address get_host_and_port(media_ip, media_ip_escaped, NULL); } if (::bind(media_socket_video, (sockaddr*)&media_sockaddr, SOCK_ADDR_SIZE(&media_sockaddr))) { ERROR_NO("Unable to bind video RTP socket (IP=%s, port=%d)", media_ip, media_port + 2); } /* Second socket bound */ } /* Creating the remote control socket thread. */ setup_ctrl_socket(); if (!nostdin) { setup_stdin_socket(); } if ((media_socket > 0) && (rtp_echo_enabled)) { if (pthread_create (&pthread2_id, NULL, (void *(*)(void *)) rtp_echo_thread, &media_socket) == -1) { ERROR_NO("Unable to create RTP echo thread"); } } /* Creating second RTP echo thread for video. */ if ((media_socket_video > 0) && (rtp_echo_enabled)) { if (pthread_create (&pthread3_id, NULL, (void *(*)(void *)) rtp_echo_thread, &media_socket_video) == -1) { ERROR_NO("Unable to create second RTP echo thread"); } } if (traffic_thread()) { if (!nostdin) { sipp_close_socket(stdin_socket); } sipp_close_socket(ctrl_socket); } /* Cancel and join other threads. */ if (pthread2_id) { pthread_cancel(pthread2_id); } if (pthread3_id) { pthread_cancel(pthread3_id); } if (pthread2_id) { pthread_join(pthread2_id, NULL); } if (pthread3_id) { pthread_join(pthread3_id, NULL); } #ifdef HAVE_EPOLL close(epollfd); free(epollevents); #endif if (local_addr_storage) { freeaddrinfo(local_addr_storage); } free(scenario_file); sipp_exit(EXIT_TEST_RES_UNKNOWN); } sipp-3.5.1/src/rtpstream.cpp0000644000175000017500000011344112672462535015061 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Deon van der Westhuysen - June 2012 - Vodacom PTY LTD */ #include #include #include #include #include "sipp.hpp" #include #include #include #include #include #include "rtpstream.hpp" /* stub to add extra debugging/logging... */ static void debugprint(const char *Format, ...) { } #define RTPSTREAM_FILESPERBLOCK 16 #define BIND_MAX_TRIES 100 #define RTPSTREAM_THREADBLOCKSIZE 16 #define MAX_UDP_RECV_BUFFER 8192 #define TI_NULL_AUDIOIP 0x01 #define TI_NULL_VIDEOIP 0x02 #define TI_NULLIP (TI_NULL_AUDIOIP|TI_NULL_VIDEOIP) #define TI_PAUSERTP 0x04 #define TI_ECHORTP 0x08 /* Not currently implemented */ #define TI_KILLTASK 0x10 #define TI_RECONNECTSOCKET 0x20 #define TI_PLAYFILE 0x40 #define TI_CONFIGFLAGS (TI_KILLTASK|TI_RECONNECTSOCKET|TI_PLAYFILE) struct rtp_header_t { uint16_t flags; uint16_t seq; uint32_t timestamp; uint32_t ssrc_id; }; struct taskentry_t { threaddata_t *parent_thread; unsigned long nextwake_ms; volatile int flags; /* rtp stream information */ unsigned long long last_timestamp; unsigned short seq; char payload_type; unsigned int ssrc_id; /* current playback information */ int loop_count; char *file_bytes_start; char *current_file_bytes; int file_num_bytes; int file_bytes_left; /* playback timing information */ int ms_per_packet; int bytes_per_packet; int timeticks_per_packet; int timeticks_per_ms; /* new file playback information */ char new_payload_type; int new_loop_count; int new_file_size; char *new_file_bytes; int new_ms_per_packet; int new_bytes_per_packet; int new_timeticks_per_packet; /* sockets for audio/video rtp_rtcp */ int audio_rtp_socket; int audio_rtcp_socket; int video_rtp_socket; int video_rtcp_socket; /* rtp peer address structures */ struct sockaddr_storage remote_audio_rtp_addr; struct sockaddr_storage remote_audio_rtcp_addr; struct sockaddr_storage remote_video_rtp_addr; struct sockaddr_storage remote_video_rtcp_addr; /* we will have a mutex per call. should we consider refactoring to */ /* share mutexes across calls? makes the per-call code more complex */ /* thread mananagment structures */ pthread_mutex_t mutex; }; struct threaddata_t { pthread_mutex_t tasklist_mutex; int busy_list_index; int max_tasks; volatile int num_tasks; volatile int del_pending; volatile int exit_flag; taskentry_t *tasklist; }; struct cached_file_t { char filename[RTPSTREAM_MAX_FILENAMELEN]; char *bytes; int filesize; }; cached_file_t *cached_files= NULL; int num_cached_files= 0; int next_rtp_port= 0; threaddata_t **ready_threads= NULL; threaddata_t **busy_threads= NULL; int num_busy_threads= 0; int num_ready_threads= 0; int busy_threads_max= 0; int ready_threads_max= 0; unsigned int global_ssrc_id= 0xCA110000; //=================================================================================================== /* code checked */ static void rtpstream_free_taskinfo(taskentry_t* taskinfo) { if (taskinfo) { /* close sockets associated with this call */ if (taskinfo->audio_rtp_socket!=-1) { close (taskinfo->audio_rtp_socket); } if (taskinfo->audio_rtcp_socket!=-1) { close (taskinfo->audio_rtcp_socket); } if (taskinfo->video_rtp_socket!=-1) { close (taskinfo->video_rtp_socket); } if (taskinfo->video_rtcp_socket!=-1) { close (taskinfo->video_rtcp_socket); } /* cleanup pthread library structure */ pthread_mutex_destroy(&(taskinfo->mutex)); free (taskinfo); } } /* code checked */ static void rtpstream_process_task_flags(taskentry_t* taskinfo) { if (taskinfo->flags&TI_RECONNECTSOCKET) { int remote_addr_len; int rc; remote_addr_len = media_ip_is_ipv6 ? sizeof(struct sockaddr_in6) : sizeof(struct sockaddr_in); /* enter critical section to lock address updates */ /* may want to leave this out -- low chance of race condition */ pthread_mutex_lock (&(taskinfo->mutex)); /* If we have valid ip and port numbers for audio rtp stream */ if (!(taskinfo->flags & TI_NULL_AUDIOIP)) { if (taskinfo->audio_rtcp_socket != -1) { rc = connect(taskinfo->audio_rtcp_socket, (struct sockaddr *)&taskinfo->remote_audio_rtcp_addr, remote_addr_len); if (rc < 0) { debugprint("closing audio rtcp socket %d due to error %d in rtpstream_process_task_flags taskinfo=%p\n", taskinfo->audio_rtcp_socket, errno, taskinfo); close(taskinfo->audio_rtcp_socket); taskinfo->audio_rtcp_socket = -1; } } if (taskinfo->audio_rtp_socket != -1) { rc = connect(taskinfo->audio_rtp_socket, (struct sockaddr *)&taskinfo->remote_audio_rtp_addr, remote_addr_len); if (rc < 0) { debugprint("closing audio rtp socket %d due to error %d in rtpstream_process_task_flags taskinfo=%p\n", taskinfo->audio_rtp_socket, errno, taskinfo); close(taskinfo->audio_rtp_socket); taskinfo->audio_rtp_socket = -1; } } } /* If we have valid ip and port numbers for video rtp stream */ if (!(taskinfo->flags & TI_NULL_VIDEOIP)) { if (taskinfo->video_rtcp_socket != -1) { rc = connect(taskinfo->video_rtcp_socket, (struct sockaddr *)&taskinfo->remote_video_rtcp_addr, remote_addr_len); if (rc < 0) { debugprint("closing video rtcp socket %d due to error %d in rtpstream_process_task_flags taskinfo=%p\n", taskinfo->video_rtcp_socket, errno, taskinfo); close(taskinfo->video_rtcp_socket); taskinfo->video_rtcp_socket = -1; } } if (taskinfo->video_rtp_socket != -1) { rc = connect(taskinfo->video_rtp_socket, (struct sockaddr *)&taskinfo->remote_video_rtp_addr, remote_addr_len); if (rc < 0) { debugprint("closing video rtp socket %d due to error %d in rtpstream_process_task_flags taskinfo=%p\n", taskinfo->video_rtp_socket, errno, taskinfo); close(taskinfo->video_rtp_socket); taskinfo->video_rtp_socket = -1; } } } taskinfo->flags&= ~TI_RECONNECTSOCKET; pthread_mutex_unlock (&(taskinfo->mutex)); } if (taskinfo->flags&TI_PLAYFILE) { /* copy playback information */ taskinfo->loop_count= taskinfo->new_loop_count; taskinfo->file_bytes_start= taskinfo->new_file_bytes; taskinfo->current_file_bytes= taskinfo->new_file_bytes; taskinfo->file_num_bytes= taskinfo->new_file_size; taskinfo->file_bytes_left= taskinfo->new_file_size; taskinfo->payload_type= taskinfo->new_payload_type; taskinfo->ms_per_packet= taskinfo->new_ms_per_packet; taskinfo->bytes_per_packet= taskinfo->new_bytes_per_packet; taskinfo->timeticks_per_packet= taskinfo->new_timeticks_per_packet; taskinfo->timeticks_per_ms= taskinfo->timeticks_per_packet/taskinfo->ms_per_packet; taskinfo->last_timestamp= getmilliseconds()*taskinfo->timeticks_per_ms; taskinfo->flags&= ~TI_PLAYFILE; } } /**** todo - check code ****/ static unsigned long rtpstream_playrtptask(taskentry_t *taskinfo, unsigned long timenow_ms) { int rc; unsigned long next_wake; unsigned long long target_timestamp; union { rtp_header_t hdr; char buffer[MAX_UDP_RECV_BUFFER]; } udp; /* OK, now to play - sockets are supposed to be non-blocking */ /* no support for video stream at this stage. will need some work */ next_wake = timenow_ms + 100; /* default next wakeup time */ if (taskinfo->audio_rtcp_socket != -1) { /* just keep listening on rtcp socket (is this really required?) - ignore any errors */ while ((rc = recv(taskinfo->audio_rtcp_socket, udp.buffer, sizeof(udp), 0)) >= 0) { /* * rtpstream_bytes_in+= rc; */ } } if (taskinfo->video_rtp_socket != -1) { /* just keep listening on rtp socket (is this really required?) - ignore any errors */ while ((rc = recv(taskinfo->video_rtp_socket, udp.buffer, sizeof(udp), 0)) >= 0) { /* * rtpstream_bytes_in += rc; */ } } if (taskinfo->video_rtcp_socket != -1) { /* just keep listening on rtcp socket (is this really required?) - ignore any errors */ while ((rc = recv(taskinfo->video_rtcp_socket, udp.buffer, sizeof(udp), 0)) >= 0) { /* * rtpstream_bytes_in+= rc; */ } } if (taskinfo->audio_rtp_socket != -1) { /* this is temp code - will have to reorganize if/when we include echo functionality */ /* just keep listening on rtcp socket (is this really required?) - ignore any errors */ while ((rc = recv(taskinfo->audio_rtp_socket, udp.buffer, sizeof(udp), 0)) >= 0) { /* for now we will just ignore any received data or receive errors */ /* separate code path for RTP echo */ rtpstream_bytes_in += rc; } /* are we playing back an audio file? */ if (taskinfo->loop_count) { target_timestamp = timenow_ms * taskinfo->timeticks_per_ms; next_wake = timenow_ms + taskinfo->ms_per_packet - timenow_ms % taskinfo->ms_per_packet; if (taskinfo->flags & (TI_NULL_AUDIOIP|TI_PAUSERTP)) { /* when paused, set timestamp so stream appears to be up to date */ taskinfo->last_timestamp = target_timestamp; } if (taskinfo->last_timestamp < target_timestamp) { /* need to send rtp payload - build rtp packet header... */ udp.hdr.flags = htons(0x8000 | taskinfo->payload_type); udp.hdr.seq = htons(taskinfo->seq); udp.hdr.timestamp = htonl((uint32_t)(taskinfo->last_timestamp & 0xFFFFFFFF)); udp.hdr.ssrc_id = htonl(taskinfo->ssrc_id); /* add payload data to the packet - handle buffer wraparound */ if (taskinfo->file_bytes_left >= taskinfo->bytes_per_packet) { /* no need for fancy acrobatics */ memcpy(udp.buffer + sizeof(rtp_header_t), taskinfo->current_file_bytes, taskinfo->bytes_per_packet); } else { /* copy from end and then begining of file. does not handle the */ /* case where file is shorter than the packet length!! */ memcpy(udp.buffer + sizeof(rtp_header_t), taskinfo->current_file_bytes, taskinfo->file_bytes_left); memcpy(udp.buffer + sizeof(rtp_header_t) + taskinfo->file_bytes_left, taskinfo->file_bytes_start, taskinfo->bytes_per_packet-taskinfo->file_bytes_left); } /* now send the actual packet */ rc = send(taskinfo->audio_rtp_socket, udp.buffer, taskinfo->bytes_per_packet + sizeof(rtp_header_t), 0); if (rc < 0) { /* handle sending errors */ if (errno == EAGAIN || errno == EWOULDBLOCK || errno == EINTR) { next_wake= timenow_ms + 2; /* retry after short sleep */ } else { /* this looks like a permanent error - should we ignore ENETUNREACH? */ debugprint("closing rtp socket %d due to error %d in rtpstream_new_call taskinfo=%p\n", taskinfo->audio_rtp_socket, errno, taskinfo); close(taskinfo->audio_rtp_socket); taskinfo->audio_rtp_socket= -1; } } else { /* statistics - only count successful sends */ rtpstream_bytes_out += taskinfo->bytes_per_packet + sizeof(rtp_header_t); rtpstream_pckts++; /* advance playback pointer to next packet */ taskinfo->seq++; /* must change if timer ticks per packet can be fractional */ taskinfo->last_timestamp += taskinfo->timeticks_per_packet; taskinfo->file_bytes_left -= taskinfo->bytes_per_packet; if (taskinfo->file_bytes_left > 0) { taskinfo->current_file_bytes += taskinfo->bytes_per_packet; } else { taskinfo->current_file_bytes = taskinfo->file_bytes_start-taskinfo->file_bytes_left; taskinfo->file_bytes_left += taskinfo->file_num_bytes; if (taskinfo->loop_count > 0) { /* one less loop to play. -1 (infinite loops) will stay as is */ taskinfo->loop_count--; } } if (taskinfo->last_timestamp < target_timestamp) { /* no sleep if we are behind */ next_wake= timenow_ms; } } } } else { /* not busy playing back a file - put possible rtp echo code here. */ } } return next_wake; } /*********************************************************************************/ /*********************************************************************************/ /*********************************************************************************/ /* code checked */ static void* rtpstream_playback_thread(void* params) { threaddata_t *threaddata= (threaddata_t *) params; taskentry_t *taskinfo; int taskindex; unsigned long timenow_ms; unsigned long waketime_ms; int sleeptime_us; rtpstream_numthreads++; /* perhaps wrap this in a mutex? */ while (!threaddata->exit_flag) { timenow_ms= getmilliseconds(); waketime_ms= timenow_ms+ 100; /* default sleep 100ms */ /* iterate through tasks and handle playback and other actions */ for (taskindex=0;taskindexnum_tasks;taskindex++) { taskinfo= (&threaddata->tasklist)[taskindex]; if (taskinfo->flags&TI_CONFIGFLAGS) { if (taskinfo->flags&TI_KILLTASK) { /* remove this task entry and release its resources */ pthread_mutex_lock (&(threaddata->tasklist_mutex)); (&threaddata->tasklist)[taskindex--]= (&threaddata->tasklist)[--threaddata->num_tasks]; threaddata->del_pending--; /* must decrease del_pending after num_tasks */ pthread_mutex_unlock (&(threaddata->tasklist_mutex)); rtpstream_free_taskinfo (taskinfo); continue; } /* handle any other config related flags */ rtpstream_process_task_flags (taskinfo); } /* should we update current time inbetween tasks? */ if (taskinfo->nextwake_ms<=timenow_ms) { /* task needs to execute now */ taskinfo->nextwake_ms= rtpstream_playrtptask (taskinfo,timenow_ms); } if (waketime_ms>taskinfo->nextwake_ms) { waketime_ms= taskinfo->nextwake_ms; } } /* sleep until next iteration of playback loop */ sleeptime_us= (waketime_ms-getmilliseconds())*1000; if (sleeptime_us>0) { usleep (sleeptime_us); } } /* Free all task and thread resources and exit the thread */ for (taskindex=0;taskindexnum_tasks;taskindex++) { /* check if we should delete this thread, else let owner call clear it */ /* small chance of race condition in this code */ taskinfo= (&threaddata->tasklist)[taskindex]; if (taskinfo->flags&TI_KILLTASK) { rtpstream_free_taskinfo (taskinfo); } else { taskinfo->parent_thread= NULL; /* no longer associated with a thread */ } } pthread_mutex_destroy(&(threaddata->tasklist_mutex)); free (threaddata); rtpstream_numthreads--; /* perhaps wrap this in a mutex? */ return NULL; } /* code checked */ static int rtpstream_start_task (rtpstream_callinfo_t *callinfo) { int ready_index; int allocsize; threaddata_t **threadlist; threaddata_t *threaddata; pthread_t newthread; /* safety check... */ if (!callinfo->taskinfo) { return 0; } /* we count on the fact that only one thread can add/remove playback tasks */ /* thus we don't have mutexes to protect the thread list objects. */ for (ready_index=0;ready_indexnum_tasksmax_tasks) { /* we found a thread with an open task slot. */ break; } } if (ready_index==num_ready_threads) { /* did not find a thread with spare task slots, thus we create one here */ if (num_ready_threads>=ready_threads_max) { /* need to allocate more memory for thread list */ ready_threads_max+= RTPSTREAM_THREADBLOCKSIZE; threadlist= (threaddata_t **) realloc (ready_threads,sizeof(*ready_threads)*ready_threads_max); if (!threadlist) { /* could not allocate bigger block... worry [about it later] */ ready_threads_max-= RTPSTREAM_THREADBLOCKSIZE; return 0; } ready_threads= threadlist; } /* create and initialise data structure for new thread */ allocsize= sizeof(*threaddata)+sizeof(threaddata->tasklist)*(rtp_tasks_per_thread-1); threaddata= (threaddata_t *) malloc (allocsize); if (!threaddata) { return 0; } memset (threaddata,0,allocsize); threaddata->max_tasks= rtp_tasks_per_thread; threaddata->busy_list_index= -1; pthread_mutex_init(&(threaddata->tasklist_mutex),NULL); /* create the thread itself */ if (pthread_create(&newthread,NULL,rtpstream_playback_thread,threaddata)) { /* error creating the thread */ free (threaddata); return 0; } /* Add thread to list of ready (spare capacity) threads */ ready_threads[num_ready_threads++]= threaddata; } /* now add new task to a spare slot in our thread tasklist */ threaddata= ready_threads[ready_index]; callinfo->taskinfo->parent_thread= threaddata; pthread_mutex_lock (&(threaddata->tasklist_mutex)); (&threaddata->tasklist)[threaddata->num_tasks++]= callinfo->taskinfo; pthread_mutex_unlock (&(threaddata->tasklist_mutex)); /* this check relies on playback thread to decrement num_tasks before */ /* decrementing del_pending -- else we need to lock before this test */ if ((threaddata->del_pending==0)&&(threaddata->num_tasks>=threaddata->max_tasks)) { /* move this thread to the busy list - no free task slots */ /* first check if the busy list is big enough to hold new thread */ if (num_busy_threads>=busy_threads_max) { /* need to allocate more memory for thread list */ busy_threads_max+= RTPSTREAM_THREADBLOCKSIZE; threadlist= (threaddata_t **) realloc (busy_threads,sizeof(*busy_threads)*busy_threads_max); if (!threadlist) { /* could not allocate bigger block... leave thread in ready list */ busy_threads_max-= RTPSTREAM_THREADBLOCKSIZE; return 1; /* success, sort of */ } busy_threads= threadlist; } /* add to busy list */ threaddata->busy_list_index= num_busy_threads; busy_threads[num_busy_threads++]= threaddata; /* remove from ready list */ ready_threads[ready_index]= ready_threads[--num_ready_threads]; } return 1; /* done! */ } /* code checked */ static void rtpstream_stop_task(rtpstream_callinfo_t* callinfo) { threaddata_t **threadlist; taskentry_t *taskinfo= callinfo->taskinfo; int busy_index; if (taskinfo) { if (taskinfo->parent_thread) { /* this call's task is registered with an executing thread */ /* first move owning thread to the ready list - will be ready soon */ busy_index= taskinfo->parent_thread->busy_list_index; if (busy_index>=0) { /* make sure we have enough entries in ready list */ if (num_ready_threads>=ready_threads_max) { /* need to allocate more memory for thread list */ ready_threads_max+= RTPSTREAM_THREADBLOCKSIZE; threadlist= (threaddata_t **) realloc (ready_threads,sizeof(*ready_threads)*ready_threads_max); if (!threadlist) { /* could not allocate bigger block... reset max threads */ /* this is a problem - ready thread gets "lost" on busy list */ ready_threads_max-= RTPSTREAM_THREADBLOCKSIZE; } else { ready_threads= threadlist; } } if (num_ready_threadsbusy_list_index= -1; ready_threads[num_ready_threads++]= busy_threads[busy_index]; num_busy_threads--; /* fill up gap in the busy thread list */ if (busy_index!=num_busy_threads) { busy_threads[busy_index]= busy_threads[num_busy_threads]; busy_threads[busy_index]->busy_list_index= busy_index; } } } /* then ask the thread to destory this task (and its memory) */ pthread_mutex_lock (&(taskinfo->parent_thread->tasklist_mutex)); taskinfo->parent_thread->del_pending++; taskinfo->flags|= TI_KILLTASK; pthread_mutex_unlock (&(taskinfo->parent_thread->tasklist_mutex)); } else { /* no playback thread owner, just free it */ rtpstream_free_taskinfo (taskinfo); } callinfo->taskinfo= NULL; } } /* code checked */ int rtpstream_new_call (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_new_call callinfo=%p\n",callinfo); taskentry_t *taskinfo; /* general init */ memset (callinfo,0,sizeof(*callinfo)); taskinfo= (taskentry_t *) malloc (sizeof(*taskinfo)); if (!taskinfo) { /* cannot allocate taskinfo memory - bubble error up */ return 0; } callinfo->taskinfo= taskinfo; memset (taskinfo,0,sizeof(*taskinfo)); taskinfo->flags= TI_NULLIP; /* socket descriptors */ taskinfo->audio_rtp_socket= -1; taskinfo->audio_rtcp_socket= -1; taskinfo->video_rtp_socket= -1; taskinfo->video_rtcp_socket= -1; /* rtp stream members */ taskinfo->ssrc_id= global_ssrc_id++; /* pthread mutexes */ pthread_mutex_init(&(callinfo->taskinfo->mutex),NULL); return 1; } /* code checked */ void rtpstream_end_call (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_end_call callinfo=%p\n",callinfo); /* stop playback thread(s) for this call */ rtpstream_stop_task (callinfo); } /* code checked */ int rtpstream_cache_file (char *filename) { int count= 0; cached_file_t *newcachelist; char *filecontents; struct stat statbuffer; FILE *f; debugprint ("rtpstream_cache_file filename=%s\n",filename); /* cached file entries are stored in a dynamically grown array. */ /* could use a binary (or avl) tree but number of files should */ /* be small and doesn't really justify the effort. */ while (countsin6_addr)): inet_pton(AF_INET,media_ip,&((_RCAST(struct sockaddr_in *,&address))->sin_addr)))!=1) { WARNING("Could not set up media IP for RTP streaming"); return 0; } /* create new UDP listen socket */ *rtpsocket= socket(media_ip_is_ipv6?PF_INET6:PF_INET,SOCK_DGRAM,0); if (*rtpsocket==-1) { WARNING("Could not open socket for RTP streaming: %s", strerror(errno)); return 0; } for (tries=0;tries(max_rtp_port-1)) { next_rtp_port= min_rtp_port; } if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port = htons((short)port_number); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)port_number); } if (::bind(*rtpsocket,(sockaddr *)(void *)&address, SOCK_ADDR_SIZE(&address)) == 0) { break; } } /* Exit here if we didn't get a suitable port for rtp stream */ if (tries==BIND_MAX_TRIES) { close (*rtpsocket); *rtpsocket= -1; WARNING("Could not bind port for RTP streaming after %d tries", tries); return 0; } if (!rtpstream_setsocketoptions (*rtpsocket)) { close (*rtpsocket); *rtpsocket= -1; WARNING("Could not set socket options for RTP streaming"); return 0; } /* create socket for rtcp - ignore any errors */ *rtcpsocket= socket(media_ip_is_ipv6?PF_INET6:PF_INET,SOCK_DGRAM,0); if (*rtcpsocket!=-1) { /* try to bind it to our preferred address */ if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port = htons((short)port_number+1); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)port_number+1); } if (::bind(*rtcpsocket,(sockaddr *)(void *)&address, SOCK_ADDR_SIZE(&address))) { /* could not bind the rtcp socket to required port. so we delete it */ close (*rtcpsocket); *rtcpsocket= -1; } if (!rtpstream_setsocketoptions (*rtcpsocket)) { close (*rtcpsocket); *rtcpsocket= -1; } } return port_number; } /* code checked */ int rtpstream_get_audioport (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_get_audioport callinfo=%p",callinfo); int rtp_socket; int rtcp_socket; if (!callinfo->taskinfo) { return 0; } if (callinfo->audioport) { /* already a port assigned to this call */ debugprint (" ==> %d\n",callinfo->audioport); return callinfo->audioport; } callinfo->audioport= rtpstream_get_localport (&rtp_socket,&rtcp_socket); debugprint (" ==> %d\n",callinfo->audioport); /* assign rtp and rtcp sockets to callinfo. must assign rtcp socket first */ callinfo->taskinfo->audio_rtcp_socket= rtcp_socket; callinfo->taskinfo->audio_rtp_socket= rtp_socket; /* start playback task if not already started */ if (!callinfo->taskinfo->parent_thread) { if (!rtpstream_start_task (callinfo)) { /* error starting playback task */ return 0; } } /* make sure the new socket gets bound to destination address (if any) */ callinfo->taskinfo->flags|= TI_RECONNECTSOCKET; return callinfo->audioport; } /* code checked */ int rtpstream_get_videoport (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_get_videoport callinfo=%p",callinfo); int rtp_socket; int rtcp_socket; if (!callinfo->taskinfo) { return 0; } if (callinfo->videoport) { /* already a port assigned to this call */ debugprint (" ==> %d\n",callinfo->videoport); return callinfo->videoport; } callinfo->videoport= rtpstream_get_localport (&rtp_socket,&rtcp_socket); debugprint (" ==> %d\n",callinfo->videoport); /* assign rtp and rtcp sockets to callinfo. must assign rtcp socket first */ callinfo->taskinfo->video_rtcp_socket= rtcp_socket; callinfo->taskinfo->video_rtp_socket= rtp_socket; /* start playback task if not already started */ if (!callinfo->taskinfo->parent_thread) { if (!rtpstream_start_task (callinfo)) { /* error starting playback task */ return 0; } } /* make sure the new socket gets bound to destination address (if any) */ callinfo->taskinfo->flags|= TI_RECONNECTSOCKET; return callinfo->videoport; } /* code checked */ void rtpstream_set_remote (rtpstream_callinfo_t *callinfo, int ip_ver, char *ip_addr, int audio_port, int video_port) { struct sockaddr_storage address; struct in_addr *ip4_addr; struct in6_addr *ip6_addr; taskentry_t *taskinfo; unsigned count; int nonzero_ip; debugprint("rtpstream_set_remote callinfo=%p, ip_ver %d ip_addr %s audio %d video %d\n", callinfo, ip_ver, ip_addr, audio_port, video_port); taskinfo= callinfo->taskinfo; if (!taskinfo) { /* no task info found - cannot set remote data. just return */ return; } nonzero_ip= 0; taskinfo->flags|= TI_NULLIP; /// TODO: this (may) cause a gap in playback, if playback thread gets to exec while this is set and before new IP is checked. /* test that media ip address version match remote ip address version? */ /* initialise address family and IP address for remote socket */ memset(&address,0,sizeof(address)); if (media_ip_is_ipv6) { /* process ipv6 address */ address.ss_family= AF_INET6; ip6_addr= &((_RCAST(struct sockaddr_in6 *,&address))->sin6_addr); if (inet_pton(AF_INET6,ip_addr,ip6_addr)==1) { for (count=0;countsin_addr); if (inet_pton(AF_INET,ip_addr,ip4_addr)==1) { for (count=0;countmutex)); /* clear out existing addresses */ memset (&(taskinfo->remote_audio_rtp_addr),0,sizeof(taskinfo->remote_audio_rtp_addr)); memset (&(taskinfo->remote_audio_rtcp_addr),0,sizeof(taskinfo->remote_audio_rtcp_addr)); memset (&(taskinfo->remote_video_rtp_addr),0,sizeof(taskinfo->remote_video_rtp_addr)); memset (&(taskinfo->remote_video_rtcp_addr),0,sizeof(taskinfo->remote_video_rtcp_addr)); /* Audio */ if (audio_port) { if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port= htons((short)audio_port); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)audio_port); } memcpy (&(taskinfo->remote_audio_rtp_addr),&address,sizeof(address)); if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port= htons((short)audio_port+1); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)audio_port+1); } memcpy (&(taskinfo->remote_audio_rtcp_addr),&address,sizeof(address)); taskinfo->flags&= ~TI_NULL_AUDIOIP; } /* Video */ if (video_port) { if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port= htons((short)video_port); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)video_port); } memcpy (&(taskinfo->remote_video_rtp_addr),&address,sizeof(address)); if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *,&address))->sin6_port= htons((short)video_port+1); } else { (_RCAST(struct sockaddr_in *,&address))->sin_port= htons((short)video_port+1); } memcpy (&(taskinfo->remote_video_rtcp_addr),&address,sizeof(address)); taskinfo->flags&= ~TI_NULL_VIDEOIP; } /* ok, we are done with the shared memory objects. let go mutex */ pthread_mutex_unlock (&(taskinfo->mutex)); taskinfo->flags|= TI_RECONNECTSOCKET; /* may want to start a playback (listen) task here if no task running? */ /* only makes sense if we decide to send 0-filled packets on idle */ } /* code checked */ void rtpstream_play (rtpstream_callinfo_t *callinfo, rtpstream_actinfo_t *actioninfo) { debugprint ("rtpstream_play callinfo=%p filename %s loop %d bytes %d payload %d ptime %d tick %d\n",callinfo,actioninfo->filename,actioninfo->loop_count,actioninfo->bytes_per_packet,actioninfo->payload_type,actioninfo->ms_per_packet,actioninfo->ticks_per_packet); int file_index= rtpstream_cache_file (actioninfo->filename); taskentry_t *taskinfo= callinfo->taskinfo; if (file_index<0) { return; /* cannot find file to play */ } if (!taskinfo) { return; /* no task data structure */ } /* make sure we have an open socket from which to play the audio file */ rtpstream_get_audioport (callinfo); /* save file parameter in taskinfo structure */ taskinfo->new_loop_count= actioninfo->loop_count; taskinfo->new_bytes_per_packet= actioninfo->bytes_per_packet; taskinfo->new_file_size= cached_files[file_index].filesize; taskinfo->new_file_bytes= cached_files[file_index].bytes; taskinfo->new_ms_per_packet= actioninfo->ms_per_packet; taskinfo->new_timeticks_per_packet= actioninfo->ticks_per_packet; taskinfo->new_payload_type= actioninfo->payload_type; /* set flag that we have a new file to play */ taskinfo->flags|= TI_PLAYFILE; } /* code checked */ void rtpstream_pause (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_pause callinfo=%p\n",callinfo); if (callinfo->taskinfo) { callinfo->taskinfo->flags|= TI_PAUSERTP; } } /* code checked */ void rtpstream_resume (rtpstream_callinfo_t *callinfo) { debugprint ("rtpstream_resume callinfo=%p\n",callinfo); if (callinfo->taskinfo) { callinfo->taskinfo->flags&= ~TI_PAUSERTP; } } /* code checked */ void rtpstream_shutdown (void) { int count= 0; debugprint ("rtpstream_shutdown\n"); /* signal all playback threads that they should exit */ if (ready_threads) { for (count=0;countexit_flag= 1; } free (ready_threads); ready_threads= NULL; } if (busy_threads) { for (count=0;countexit_flag= 1; } free(busy_threads); busy_threads = NULL; } /* first make sure no playback threads are accessing the file buffers */ /* else small chance the playback thread tries to access freed memory */ while (rtpstream_numthreads) { usleep (50000); } /* now free cached file bytes and structure */ for (count=0;count #include #include #include #include "sipp.hpp" #include "scenario.hpp" #include "screen.hpp" #ifdef HAVE_GSL #include #include #include #endif /* ** Local definitions (macros) */ /* ** Warning! All DISPLAY_ macros must be called where f FILE is ** defined. This is to allow printing to stdout or a file. */ #define DISPLAY_LINE()\ fprintf(f," ------------------------------------------------------------------------------ \r\n") #define DISPLAY_DLINE()\ fprintf(f,"================================================================================\r\n") #define DISPLAY_CROSS_LINE()\ fprintf(f,"-------------------------+---------------------------+--------------------------\r\n") #define DISPLAY_HEADER()\ fprintf(f," Counter Name | Periodic value | Cumulative value\r\n") #define DISPLAY_TXT_COL(T1, V1, V2)\ fprintf(f," %-22.22s | %-25.25s |", T1, V1); fprintf(f," %-24.24s \r\n", V2) #define DISPLAY_VAL_RATEF_COL(T1, V1, V2)\ fprintf(f," %-22.22s | %8.3f cps | %8.3f cps \r\n", T1, V1, V2) #define DISPLAY_2VAL(T1, V1, V2)\ fprintf(f," %-22.22s | %8llu | %8llu \r\n", T1, V1, V2) #define DISPLAY_CUMUL(T1, V1)\ fprintf(f," %-22.22s | | %8llu \r\n", T1, V1) #define DISPLAY_PERIO(T1, V1)\ fprintf(f," %-22.22s | %8llu | \r\n", T1, V1) #define DISPLAY_VALF(T1, V1)\ fprintf(f," %-22.22s | %8.3f ms \r\n", T1, V1) #define DISPLAY_VAL_RATEF(T1, V1)\ fprintf(f," %-22.22s | %8.3f cps \r\n", T1, V1) #define DISPLAY_VAL_RATE(T1, V1)\ fprintf(f," %-22.22s | %8d cps \r\n", T1, V1) #define DISPLAY_VAL(T1, V1)\ fprintf(f," %-22.22s : %8d \r\n", T1, V1) #define DISPLAY_2VALF(T1, V1, T2, V2)\ fprintf(f," %-22.22s : %8.2f | %-7.7s : %8.2f \r\n", T1, V1, T2, V2) #define DISPLAY_3VAL(T1, V1, T2, V2, T3, V3)\ fprintf(f," %-22.22s : %8d | %-7.7s : %8d | %-12.12s : %5d \r\n", T1, V1, T2, V2, T3, V3) #define DISPLAY_3VALF(T1, V1, T2, V2, T3, V3)\ fprintf(f," %-22.22s : %8.3f | %-7.7s : %8.3f | %-12.12s : %5.1f \r\n", T1, V1, T2, V2, T3, V3) #define DISPLAY_TXT(T1, V1)\ fprintf(f," %-22.22s | %-52.52s \r\n", T1, V1) #define DISPLAY_INFO(T1)\ fprintf(f," %-77.77s \r\n", T1) #define DISPLAY_REPART(T1, T2, V1)\ fprintf(f," %8d ms <= n < %8d ms : %10lu %-29.29s \r\n", T1, T2, V1, "") #define DISPLAY_LAST_REPART(T1, V1)\ fprintf(f," %14.14s n >= %8d ms : %10lu %-29.29s \r\n", "", T1, V1, "") #define RESET_COUNTERS(PT)\ memset (PT, 0, CStat::E_NB_COUNTER * sizeof(unsigned long long)) #define RESET_C_COUNTERS \ { \ int i; \ for (i=CStat::CPT_G_C_OutOfCallMsgs; \ i<=CStat::CPT_G_C_AutoAnswered; \ i++) \ M_G_counters[i - E_NB_COUNTER - 1] = (unsigned long) 0; \ for (i=CStat::CPT_C_IncomingCallCreated; \ i<=CStat::CPT_C_Retransmissions; \ i++) \ M_counters[i] = (unsigned long) 0; \ for (unsigned int j=0;jclose(); delete M_outputStream; } if(M_fileName != NULL) delete [] M_fileName; if(M_outputStreamRtt != NULL) { M_outputStreamRtt->close(); delete M_outputStreamRtt; } if(M_fileNameRtt != NULL) delete [] M_fileNameRtt; if(M_dumpRespTime != NULL) delete [] M_dumpRespTime ; free(M_rtdInfo); for (int_str_map::iterator i = M_revRtdMap.begin(); i != M_revRtdMap.end(); ++i) { free(i->second); } M_SizeOfResponseTimeRepartition = 0; M_SizeOfCallLengthRepartition = 0; M_CallLengthRepartition = NULL; M_fileName = NULL; M_outputStream = NULL; M_outputStreamRtt = NULL; M_fileNameRtt = NULL; M_dumpRespTime = NULL; } int CStat::init () { // reset of all counter RESET_COUNTERS(M_counters); GET_TIME (&M_startTime); memcpy (&M_pdStartTime, &M_startTime, sizeof (struct timeval)); memcpy (&M_plStartTime, &M_startTime, sizeof (struct timeval)); M_outputStream = NULL; M_headerAlreadyDisplayed = false; M_outputStreamRtt = NULL; M_headerAlreadyDisplayedRtt = false; std::vector error_codes(0); return(1); } int CStat::isWellFormed(char * P_listeStr, int * nombre) { char * ptr = P_listeStr; int sizeOf; bool isANumber; (*nombre) = 0; sizeOf = strlen(P_listeStr); // getting the number if(sizeOf > 0) { // is the string well formed ? [0-9] [,] isANumber = false; for(int i=0; i<=sizeOf; i++) { switch(ptr[i]) { case ',': if(isANumber == false) { return(0); } else { (*nombre)++; } isANumber = false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': isANumber = true; break; case '\t': case ' ' : break; case '\0': if(isANumber == false) { return(0); } else { (*nombre)++; } break; default: return(0); } } // enf for } return(1); } int CStat::createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList) { int nb=0; char * ptr = P_listeStr; char * ptr_prev = P_listeStr; unsigned int current_int; if(isWellFormed(P_listeStr, sizeOfList) == 1) { (*listeInteger) = new unsigned int[(*sizeOfList)]; while((*ptr) != ('\0')) { if((*ptr) == ',') { sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; ptr_prev = ptr+1; } ptr++; } // on lit le dernier sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; return(1); } return(0); } void CStat::setFileName(const char* P_name, const char* P_extension) { int sizeOf, sizeOfExtension; if(P_name != NULL) { // +6 for PID sizeOf = strlen(P_name) + 6; if(sizeOf > 0) { if(P_extension != NULL) { sizeOfExtension = strlen(P_extension); if(sizeOfExtension > 0) { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%d_", P_name, getpid()); strcat(M_fileName, P_extension); } else { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%d_", P_name, getpid()); strcat(M_fileName, DEFAULT_EXTENSION); } } else { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[MAX_PATH]; sprintf(M_fileName, "%s_%d_", P_name, getpid()); strcat(M_fileName, DEFAULT_EXTENSION); } } else { cerr << "new file name length is null - " << "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } void CStat::setFileName(const char* P_name) { int sizeOf; if(P_name != NULL) { sizeOf = strlen(P_name); if(sizeOf > 0) { if(M_fileName != NULL) delete [] M_fileName; M_fileName = new char[sizeOf+1]; strcpy(M_fileName, P_name); } else { cerr << "new file name length is null - " "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } void CStat::initRtt(const char* P_name, const char* P_extension, unsigned long P_report_freq_dumpRtt) { int sizeOf, sizeOfExtension; if(P_name != NULL) { sizeOf = strlen(P_name) ; if(sizeOf > 0) { // 4 for '_rtt' and 6 for pid sizeOf += 10 ; sizeOfExtension = strlen(P_extension); if(M_fileNameRtt != NULL) delete [] M_fileNameRtt; sizeOf += sizeOfExtension; M_fileNameRtt = new char[sizeOf+1]; sprintf (M_fileNameRtt, "%s_%d_rtt%s", P_name, getpid(),P_extension); } else { cerr << "new file name length is null - " << "keeping the default filename : " << DEFAULT_FILE_NAME << endl; } } else { cerr << "new file name is NULL ! - keeping the default filename : " << DEFAULT_FILE_NAME << endl; } // initiate the table dump response time M_report_freq_dumpRtt = P_report_freq_dumpRtt ; M_dumpRespTime = new T_value_rtt [P_report_freq_dumpRtt] ; if ( M_dumpRespTime == NULL ) { cerr << "Memory allocation failure" << endl; exit(EXIT_FATAL_ERROR); } for (unsigned L_i = 0 ; L_i < P_report_freq_dumpRtt; L_i ++) { M_dumpRespTime[L_i].date = 0.0; M_dumpRespTime[L_i].rtd_no = 0; M_dumpRespTime[L_i].rtt = 0.0; } } void CStat::setRepartitionCallLength(char * P_listeStr) { unsigned int * listeInteger; int sizeOfListe; if(createIntegerTable(P_listeStr, &listeInteger, &sizeOfListe) == 1) { initRepartition(listeInteger, sizeOfListe, &M_CallLengthRepartition, &M_SizeOfCallLengthRepartition); } else { ERROR("Could not create table for call length repartition '%s'\n", P_listeStr); } delete [] listeInteger; listeInteger = NULL; } void CStat::setRepartitionResponseTime (char * P_listeStr) { unsigned int * listeInteger; int sizeOfListe; int i; for (i = 0; i < nRtds(); i++) { if(createIntegerTable(P_listeStr, &listeInteger, &sizeOfListe) == 1) { initRepartition(listeInteger, sizeOfListe, &M_ResponseTimeRepartition[i], &M_SizeOfResponseTimeRepartition); } else { ERROR("Could not create table for response time repartition '%s'\n", P_listeStr); } delete [] listeInteger; listeInteger = NULL; } } void CStat::setRepartitionCallLength(unsigned int* repartition, int nombre) { initRepartition(repartition, nombre, &M_CallLengthRepartition, &M_SizeOfCallLengthRepartition); } void CStat::setRepartitionResponseTime(unsigned int* repartition, int nombre) { for (int i = 0; i < nRtds(); i++) { initRepartition(repartition, nombre, &M_ResponseTimeRepartition[i], &M_SizeOfResponseTimeRepartition); } } void CStat::initRepartition(unsigned int* repartition, int nombre, T_dynamicalRepartition ** tabRepartition, int* tabNb) { bool sortDone; int i; unsigned int swap; if((nombre <= 0) || (repartition == NULL) ) { (*tabNb) = 0; (*tabRepartition) = NULL; return; } (*tabNb) = nombre + 1; (*tabRepartition) = new T_dynamicalRepartition[(*tabNb)]; // copying the repartition table in the local table for(i=0; i (*tabRepartition)[i+1].borderMax) { // swapping this two value and setting sortDone to false swap = (*tabRepartition)[i].borderMax; (*tabRepartition)[i].borderMax = (*tabRepartition)[i+1].borderMax; (*tabRepartition)[i+1].borderMax = swap; sortDone = false; } } } // setting the range for max <= value < infinity (*tabRepartition)[nombre].borderMax = (*tabRepartition)[nombre-1].borderMax; (*tabRepartition)[nombre].nbInThisBorder = 0; } int CStat::computeStat (E_Action P_action) { switch (P_action) { case E_CREATE_OUTGOING_CALL : M_counters [CPT_C_OutgoingCallCreated]++; M_counters [CPT_PD_OutgoingCallCreated]++; M_counters [CPT_PL_OutgoingCallCreated]++; M_counters [CPT_C_CurrentCall]++; if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_C_CurrentCallPeak]) { M_counters [CPT_C_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_C_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PD_CurrentCallPeak]) { M_counters [CPT_PD_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PD_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PL_CurrentCallPeak]) { M_counters [CPT_PL_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PL_CurrentCallPeakTime] = clock_tick / 1000; } break; case E_CREATE_INCOMING_CALL : M_counters [CPT_C_IncomingCallCreated]++; M_counters [CPT_PD_IncomingCallCreated]++; M_counters [CPT_PL_IncomingCallCreated]++; M_counters [CPT_C_CurrentCall]++; if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_C_CurrentCallPeak]) { M_counters [CPT_C_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_C_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PD_CurrentCallPeak]) { M_counters [CPT_PD_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PD_CurrentCallPeakTime] = clock_tick / 1000; } if (M_counters[CPT_C_CurrentCall] > M_counters[CPT_PL_CurrentCallPeak]) { M_counters [CPT_PL_CurrentCallPeak] = M_counters[CPT_C_CurrentCall]; M_counters [CPT_PL_CurrentCallPeakTime] = clock_tick / 1000; } break; case E_CALL_FAILED : M_counters [CPT_C_FailedCall]++; M_counters [CPT_PD_FailedCall]++; M_counters [CPT_PL_FailedCall]++; M_counters [CPT_C_CurrentCall]--; break; case E_CALL_SUCCESSFULLY_ENDED : M_counters [CPT_C_SuccessfulCall]++; M_counters [CPT_PD_SuccessfulCall]++; M_counters [CPT_PL_SuccessfulCall]++; M_counters [CPT_C_CurrentCall]--; break; case E_FAILED_CANNOT_SEND_MSG : M_counters [CPT_C_FailedCallCannotSendMessage]++; M_counters [CPT_PD_FailedCallCannotSendMessage]++; M_counters [CPT_PL_FailedCallCannotSendMessage]++; break; case E_FAILED_MAX_UDP_RETRANS : M_counters [CPT_C_FailedCallMaxUdpRetrans]++; M_counters [CPT_PD_FailedCallMaxUdpRetrans]++; M_counters [CPT_PL_FailedCallMaxUdpRetrans]++; break; case E_FAILED_TCP_CONNECT : M_counters [CPT_C_FailedCallTcpConnect]++; M_counters [CPT_PD_FailedCallTcpConnect]++; M_counters [CPT_PL_FailedCallTcpConnect]++; break; case E_FAILED_TCP_CLOSED : M_counters [CPT_C_FailedCallTcpClosed]++; M_counters [CPT_PD_FailedCallTcpClosed]++; M_counters [CPT_PL_FailedCallTcpClosed]++; break; case E_FAILED_UNEXPECTED_MSG : M_counters [CPT_C_FailedCallUnexpectedMessage]++; M_counters [CPT_PD_FailedCallUnexpectedMessage]++; M_counters [CPT_PL_FailedCallUnexpectedMessage]++; break; case E_FAILED_CALL_REJECTED : M_counters [CPT_C_FailedCallCallRejected]++; M_counters [CPT_PD_FailedCallCallRejected]++; M_counters [CPT_PL_FailedCallCallRejected]++; break; case E_FAILED_CMD_NOT_SENT : M_counters [CPT_C_FailedCallCmdNotSent]++; M_counters [CPT_PD_FailedCallCmdNotSent]++; M_counters [CPT_PL_FailedCallCmdNotSent]++; break; case E_FAILED_REGEXP_DOESNT_MATCH : M_counters [CPT_C_FailedCallRegexpDoesntMatch]++; M_counters [CPT_PD_FailedCallRegexpDoesntMatch]++; M_counters [CPT_PL_FailedCallRegexpDoesntMatch]++; break; case E_FAILED_REGEXP_SHOULDNT_MATCH : M_counters [CPT_C_FailedCallRegexpShouldntMatch]++; M_counters [CPT_PD_FailedCallRegexpShouldntMatch]++; M_counters [CPT_PL_FailedCallRegexpShouldntMatch]++; break; case E_FAILED_REGEXP_HDR_NOT_FOUND : M_counters [CPT_C_FailedCallRegexpHdrNotFound]++; M_counters [CPT_PD_FailedCallRegexpHdrNotFound]++; M_counters [CPT_PL_FailedCallRegexpHdrNotFound]++; break; case E_FAILED_OUTBOUND_CONGESTION : M_counters [CPT_C_FailedOutboundCongestion]++; M_counters [CPT_PD_FailedOutboundCongestion]++; M_counters [CPT_PL_FailedOutboundCongestion]++; break; case E_FAILED_TIMEOUT_ON_RECV : M_counters [CPT_C_FailedTimeoutOnRecv]++; M_counters [CPT_PD_FailedTimeoutOnRecv]++; M_counters [CPT_PL_FailedTimeoutOnRecv]++; break; case E_FAILED_TIMEOUT_ON_SEND : M_counters [CPT_C_FailedTimeoutOnSend]++; M_counters [CPT_PD_FailedTimeoutOnSend]++; M_counters [CPT_PL_FailedTimeoutOnSend]++; break; case E_RETRANSMISSION : M_counters [CPT_C_Retransmissions]++; M_counters [CPT_PD_Retransmissions]++; M_counters [CPT_PL_Retransmissions]++; break; case E_RESET_C_COUNTERS : RESET_C_COUNTERS; GET_TIME (&M_startTime); break; case E_RESET_PD_COUNTERS : //DEBUG (C_Debug::E_LEVEL_4, "ENTER CASE", "%s", // "CStat::computeStat : RESET_PD_COUNTERS"); RESET_PD_COUNTERS; GET_TIME (&M_pdStartTime); break; case E_RESET_PL_COUNTERS : //DEBUG (C_Debug::E_LEVEL_4, "ENTER CASE", "%s", // "C_Stat::computeStat : RESET_PL_COUNTERS"); RESET_PL_COUNTERS; GET_TIME (&M_plStartTime); if (periodic_rtd) { resetRepartition(M_CallLengthRepartition, M_SizeOfCallLengthRepartition); for (int i = 0; i < nRtds(); i++) { resetRepartition(M_ResponseTimeRepartition[i], M_SizeOfResponseTimeRepartition); } } break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d\n", P_action); return (-1); } /* end switch */ return (0); } int CStat::globalStat (E_Action P_action) { switch (P_action) { case E_OUT_OF_CALL_MSGS : M_G_counters [CPT_G_C_OutOfCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_OutOfCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_OutOfCallMsgs - E_NB_COUNTER - 1]++; break; case E_WATCHDOG_MAJOR : M_G_counters [CPT_G_C_WatchdogMajor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_WatchdogMajor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_WatchdogMajor - E_NB_COUNTER - 1]++; break; case E_WATCHDOG_MINOR : M_G_counters [CPT_G_C_WatchdogMinor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_WatchdogMinor - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_WatchdogMinor - E_NB_COUNTER - 1]++; break; case E_DEAD_CALL_MSGS : M_G_counters [CPT_G_C_DeadCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_DeadCallMsgs - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_DeadCallMsgs - E_NB_COUNTER - 1]++; break; case E_FATAL_ERRORS : M_G_counters [CPT_G_C_FatalErrors - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_FatalErrors - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_FatalErrors - E_NB_COUNTER - 1]++; break; case E_WARNING : M_G_counters [CPT_G_C_Warnings - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_Warnings - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_Warnings - E_NB_COUNTER - 1]++; break; case E_AUTO_ANSWERED : // Let's count the automatic answered calls M_G_counters [CPT_G_C_AutoAnswered - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PD_AutoAnswered - E_NB_COUNTER - 1]++; M_G_counters [CPT_G_PL_AutoAnswered - E_NB_COUNTER - 1]++; break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d\n", P_action); return (-1); } /* end switch */ return (0); } void CStat::computeRtt (unsigned long long P_start_time, unsigned long long P_stop_time, int which) { M_dumpRespTime[M_counterDumpRespTime].date = (double)P_stop_time / (double)1000; M_dumpRespTime[M_counterDumpRespTime].rtd_no = which; M_dumpRespTime[M_counterDumpRespTime].rtt = ((double)(P_stop_time - P_start_time)) / (double)1000; M_counterDumpRespTime++ ; if (M_counterDumpRespTime > (M_report_freq_dumpRtt - 1)) { dumpDataRtt () ; } } unsigned long long CStat::GetStat (E_CounterName P_counter) { if (P_counter < E_NB_COUNTER) { return M_counters [P_counter]; } else { return M_G_counters [P_counter - E_NB_COUNTER - 1]; } } /* Get the current start time. */ void CStat::getStartTime(struct timeval *t) { memcpy(t, &M_startTime, sizeof(M_startTime)); } /* Use the short form standard deviation formula given the sum of the squares * and the sum. */ double CStat::computeStdev(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares) { if (M_counters[P_NbOfCallUsed] <= 0) return 0.0; double numerator = ((double)(M_counters[P_NbOfCallUsed]) * (double)(M_counters[P_Squares])) - ((double)(M_counters[P_SumCounter] * M_counters[P_SumCounter])); double denominator = (double)(M_counters[P_NbOfCallUsed]) * (((double)(M_counters[P_NbOfCallUsed])) - 1.0); return sqrt(numerator/denominator); } double CStat::computeMean(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed) { if (M_counters[P_NbOfCallUsed] == 0) return 0.0; return ((double)(M_counters[P_SumCounter]) / (double)(M_counters[P_NbOfCallUsed])); } double CStat::computeRtdMean(int which, int type) { unsigned long long count = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_COUNT]; unsigned long long sum = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUM]; if (count == 0) return 0.0; return ((double)(sum) / (double)(count)); } double CStat::computeRtdStdev(int which, int type) { unsigned long long count = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_COUNT]; unsigned long long sum = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUM]; unsigned long long sumsq = M_rtdInfo[((which - 1) * RTD_TYPES * GENERIC_TYPES) + (type * RTD_TYPES) + RTD_SUMSQ]; if (count <= 1) return 0.0; double numerator = ((double)count * (double)sumsq) - (double)(sum * sum); double denominator = (double)(count) * ((double)(count) - 1.0); return sqrt(numerator/denominator); } void CStat::updateAverageCounter(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares, unsigned long P_value) { if (M_counters [P_NbOfCallUsed] <= 0) { M_counters [P_NbOfCallUsed] ++; M_counters [P_SumCounter] = P_value; M_counters [P_Squares] = (P_value * P_value); } else { M_counters [P_SumCounter] += P_value; M_counters [P_Squares] += (P_value * P_value); M_counters [P_NbOfCallUsed] ++; } } int CStat::computeStat (E_Action P_action, unsigned long P_value) { return computeStat(P_action, P_value, 0); } int CStat::findCounter(const char *counter, bool alloc) { str_int_map::iterator it = M_genericMap.find(str_int_map::key_type(counter)); if (it != M_genericMap.end()) { return it->second; } if (!alloc) { return -1; } int ret = M_genericMap.size() + 1; M_genericMap[str_int_map::key_type(counter)] = ret; bool numeric = true; const char *p = counter; while (*p) { if (!isdigit(*p)) { numeric = false; break; } p++; } if (numeric) { char *s = new char[20]; snprintf(s, 20, "GenericCounter%s", counter); M_revGenericMap[ret] = s; M_genericDisplay[ret] = strdup(counter); } else { M_revGenericMap[ret] = strdup(counter); M_genericDisplay[ret] = strdup(counter); } M_genericCounters = (unsigned long long *)realloc(M_genericCounters, sizeof(unsigned long long) * GENERIC_TYPES * M_genericMap.size()); if (!M_genericCounters) { ERROR("Could not allocate generic counters!\n"); } M_genericCounters[(ret - 1) * GENERIC_TYPES + GENERIC_C] = 0; M_genericCounters[(ret - 1) * GENERIC_TYPES + GENERIC_PD] = 0; M_genericCounters[(ret - 1)* GENERIC_TYPES + GENERIC_PL] = 0; return ret; } int CStat::findRtd(const char *name, bool start) { str_int_map::iterator it = M_rtdMap.find(str_int_map::key_type(name)); if (it != M_rtdMap.end()) { if (start) { rtd_started[it->first] = true; } else { rtd_stopped[it->first] = true; } return it->second; } int ret = M_rtdMap.size() + 1; M_rtdMap[str_int_map::key_type(name)] = ret; M_revRtdMap[ret] = strdup(name); M_rtdInfo = (unsigned long long *)realloc(M_rtdInfo, sizeof(unsigned long long) * RTD_TYPES * GENERIC_TYPES * M_rtdMap.size()); if (!M_rtdInfo) { ERROR("Could not allocate RTD info!\n"); } M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUMSQ] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUMSQ] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_COUNT] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUM] = 0; M_rtdInfo[((ret - 1) * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUMSQ] = 0; M_ResponseTimeRepartition = (T_dynamicalRepartition **)realloc(M_ResponseTimeRepartition, sizeof(T_dynamicalRepartition *) * M_rtdMap.size()); if (!M_ResponseTimeRepartition) { ERROR("Could not allocate RTD info!\n"); } M_ResponseTimeRepartition[ret - 1] = NULL; if (start) { rtd_started[name] = true; } else { rtd_stopped[name] = true; } return ret; } int CStat::nRtds() { return M_rtdMap.size(); } /* If you start an RTD, then you should be interested in collecting statistics for it. */ void CStat::validateRtds() { for (str_int_map::iterator it = rtd_started.begin(); it != rtd_started.end(); it++) { str_int_map::iterator stopit = rtd_stopped.find(it->first); if (stopit == rtd_stopped.end() || !stopit->second) { ERROR("You have started Response Time Duration %s, but have never stopped it!", it->first.c_str()); } } } int CStat::computeStat (E_Action P_action, unsigned long P_value, int which) { switch (P_action) { case E_ADD_CALL_DURATION : // Updating Cumulative Counter updateAverageCounter(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength, CPT_C_AverageCallLength_Squares, P_value); updateRepartition(M_CallLengthRepartition, M_SizeOfCallLengthRepartition, P_value); // Updating Periodical Diplayed counter updateAverageCounter(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength, CPT_PD_AverageCallLength_Squares, P_value); // Updating Periodical Logging counter updateAverageCounter(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength, CPT_PL_AverageCallLength_Squares, P_value); break; case E_ADD_GENERIC_COUNTER : M_genericCounters[which * GENERIC_TYPES + GENERIC_C] += P_value; M_genericCounters[which * GENERIC_TYPES + GENERIC_PD] += P_value; M_genericCounters[which * GENERIC_TYPES + GENERIC_PL] += P_value; break; case E_ADD_RESPONSE_TIME_DURATION : // Updating Cumulative Counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_C * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); updateRepartition(M_ResponseTimeRepartition[which], M_SizeOfResponseTimeRepartition, P_value); // Updating Periodical Diplayed counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PD * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); // Updating Periodical Logging counter M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_COUNT]++; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUM] += P_value; M_rtdInfo[(which * RTD_TYPES * GENERIC_TYPES) + (GENERIC_PL * RTD_TYPES) + RTD_SUMSQ] += (P_value * P_value); break; default : ERROR("CStat::ComputeStat() - Unrecognized Action %d\n", P_action); return (-1); } /* end switch */ return (0); } void CStat::updateRepartition(T_dynamicalRepartition* P_tabReport, int P_sizeOfTab, unsigned long P_value) { if(P_tabReport == NULL) { return; } for (int i = 0; i < P_sizeOfTab - 1; i++) { if (P_value < P_tabReport[i].borderMax) { P_tabReport[i].nbInThisBorder++; return; } } /* If this is not true, we never should have gotten here. */ assert(P_value >= P_tabReport[P_sizeOfTab-1].borderMax); P_tabReport[P_sizeOfTab-1].nbInThisBorder ++; } void CStat::resetRepartition(T_dynamicalRepartition* P_tabReport, int P_sizeOfTab) { if(P_tabReport == NULL) { return; } for (int i = 0; i < P_sizeOfTab; i++) { P_tabReport[i].nbInThisBorder = 0; } } CStat::CStat () { size_t L_size = 0; L_size += strlen(DEFAULT_FILE_NAME) ; L_size += strlen(DEFAULT_EXTENSION) ; L_size += 1 ; M_fileName = new char[L_size]; strcpy(M_fileName, DEFAULT_FILE_NAME); strcat(M_fileName, DEFAULT_EXTENSION); M_ResponseTimeRepartition = NULL; M_CallLengthRepartition = NULL; M_SizeOfResponseTimeRepartition = 0; M_SizeOfCallLengthRepartition = 0; M_fileNameRtt = NULL; M_genericCounters = NULL; M_time_ref = 0.0 ; M_dumpRespTime = NULL ; M_counterDumpRespTime = 0 ; M_dumpRespTime = NULL; M_fileNameRtt = NULL; M_rtdInfo = NULL; init(); } char* CStat::sRepartitionHeader(T_dynamicalRepartition * tabRepartition, int sizeOfTab, const char * P_repartitionName) { static char *repartitionHeader = NULL; char buffer[MAX_CHAR_BUFFER_SIZE]; int dlen = strlen(stat_delimiter); if(tabRepartition != NULL) { repartitionHeader = (char *)realloc(repartitionHeader, strlen(P_repartitionName) + dlen + 1); sprintf(repartitionHeader, "%s%s", P_repartitionName, stat_delimiter); for(int i=0; i<(sizeOfTab-1); i++) { sprintf(buffer, "%s_<%d%s", P_repartitionName, tabRepartition[i].borderMax, stat_delimiter); repartitionHeader = (char *)realloc(repartitionHeader, strlen(repartitionHeader) + strlen(buffer) + 1); strcat(repartitionHeader, buffer); } sprintf(buffer, "%s_>=%d%s", P_repartitionName, tabRepartition[sizeOfTab-1].borderMax, stat_delimiter); repartitionHeader = (char *)realloc(repartitionHeader, strlen(repartitionHeader) + strlen(buffer) + 1); strcat(repartitionHeader, buffer); } else { repartitionHeader = (char *)realloc(repartitionHeader, 2); strcpy(repartitionHeader, ""); } return(repartitionHeader); } char* CStat::sRepartitionInfo(T_dynamicalRepartition * tabRepartition, int sizeOfTab) { static char *repartitionInfo; char buffer[MAX_CHAR_BUFFER_SIZE]; int dlen = strlen(stat_delimiter); if(tabRepartition != NULL) { // if a repartition is present, this field match the repartition name repartitionInfo = (char *)realloc(repartitionInfo, dlen + 1); sprintf(repartitionInfo, "%s", stat_delimiter); for(int i=0; i<(sizeOfTab-1); i++) { sprintf(buffer, "%lu%s", tabRepartition[i].nbInThisBorder, stat_delimiter); repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); strcat(repartitionInfo, buffer); } sprintf(buffer, "%lu%s", tabRepartition[sizeOfTab-1].nbInThisBorder, stat_delimiter); repartitionInfo = (char *)realloc(repartitionInfo, strlen(repartitionInfo) + strlen(buffer) + 1); strcat(repartitionInfo, buffer); } else { repartitionInfo = (char *)realloc(repartitionInfo, 2); repartitionInfo[0] = '\0'; } return(repartitionInfo); } void CStat::displayRepartition(FILE *f, T_dynamicalRepartition * tabRepartition, int sizeOfTab) { if(tabRepartition != NULL) { for(int i=0; i<(sizeOfTab-1); i++) { if(i==0) { DISPLAY_REPART(0, tabRepartition[i].borderMax, tabRepartition[i].nbInThisBorder); } else { DISPLAY_REPART(tabRepartition[i-1].borderMax, tabRepartition[i].borderMax, tabRepartition[i].nbInThisBorder); } } DISPLAY_LAST_REPART (tabRepartition[sizeOfTab-1].borderMax, tabRepartition[sizeOfTab-1].nbInThisBorder); } else { DISPLAY_INFO (" "); } } void CStat::displayData (FILE *f) { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; GET_TIME (¤tTime); // computing the real call rate globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_pdStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]; averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PD_IncomingCallCreated] + M_counters[CPT_PD_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); // display info DISPLAY_DLINE (); // build and display header info DISPLAY_TXT ("Start Time ", formatTime(&M_startTime)); DISPLAY_TXT ("Last Reset Time", formatTime(&M_pdStartTime)); DISPLAY_TXT ("Current Time", formatTime(¤tTime)); // printing the header in the middle DISPLAY_CROSS_LINE(); DISPLAY_HEADER(); DISPLAY_CROSS_LINE(); DISPLAY_TXT_COL ("Elapsed Time", msToHHMMSSus(localElapsedTime), msToHHMMSSus(globalElapsedTime)); DISPLAY_VAL_RATEF_COL ("Call Rate", realInstantCallRate, averageCallRate); DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Incoming call created", M_counters[CPT_PD_IncomingCallCreated], M_counters[CPT_C_IncomingCallCreated]); DISPLAY_2VAL ("OutGoing call created", M_counters[CPT_PD_OutgoingCallCreated], M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_CUMUL ("Total Call created", M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_PERIO ("Current Call", M_counters[CPT_C_CurrentCall]); if (M_genericMap.size()) { DISPLAY_CROSS_LINE (); } for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { char *s = (char *)malloc(20 + strlen(M_genericDisplay[i])); sprintf(s, "Counter %s", M_genericDisplay[i]); DISPLAY_2VAL(s, M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_PD], M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_C]); free(s); } DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Successful call", M_counters[CPT_PD_SuccessfulCall], M_counters[CPT_C_SuccessfulCall]); DISPLAY_2VAL ("Failed call", M_counters[CPT_PD_FailedCall], M_counters[CPT_C_FailedCall]); // DISPLAY_2VAL ("Unexpected msg", // M_counters[CPT_PD_UnexpectedMessage], // M_counters[CPT_C_UnexpectedMessage]); DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { char s[80]; /* Skip if we aren't stopped. */ assert(rtd_stopped[M_revRtdMap[i]] == true); sprintf(s, "Response Time %s", M_revRtdMap[i]); DISPLAY_TXT_COL (s, msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PD)), msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C))); } /* I Broke this! DISPLAY_TXT_COL ("Call Length", msToHHMMSSus( (unsigned long)computeMean(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength)), msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) )); */ DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { displayRtdRepartition(f, i); } DISPLAY_INFO("Average Call Length Repartition"); displayRepartition(f, M_CallLengthRepartition, M_SizeOfCallLengthRepartition); // DISPLAY_VAL ("NbCall Average RT(P)", // M_counters[CPT_PD_NbOfCallUsedForAverageResponseTime]); // DISPLAY_VAL ("NbCall Average RT", // M_counters[CPT_C_NbOfCallUsedForAverageResponseTime]); // DISPLAY_VAL ("NbCall Average CL", // M_counters[CPT_C_NbOfCallUsedForAverageCallLength]); // DISPLAY_VAL ("NbCall Average CL(P)", // M_counters[CPT_PD_NbOfCallUsedForAverageCallLength]); DISPLAY_DLINE (); fflush(f); } /* end of displayData () */ void CStat::displayStat (FILE *f) { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; GET_TIME (¤tTime); // computing the real call rate globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_pdStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = (M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PD_IncomingCallCreated] + M_counters[CPT_PD_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); // build and display header info DISPLAY_TXT ("Start Time ", formatTime(&M_startTime)); DISPLAY_TXT ("Last Reset Time", formatTime(&M_pdStartTime)); DISPLAY_TXT ("Current Time", formatTime(¤tTime)); // printing the header in the middle DISPLAY_CROSS_LINE(); DISPLAY_HEADER(); DISPLAY_CROSS_LINE(); DISPLAY_TXT_COL ("Elapsed Time", msToHHMMSSus(localElapsedTime), msToHHMMSSus(globalElapsedTime)); DISPLAY_VAL_RATEF_COL ("Call Rate", realInstantCallRate, averageCallRate); DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Incoming call created", M_counters[CPT_PD_IncomingCallCreated], M_counters[CPT_C_IncomingCallCreated]); DISPLAY_2VAL ("OutGoing call created", M_counters[CPT_PD_OutgoingCallCreated], M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_CUMUL ("Total Call created", M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); DISPLAY_PERIO ("Current Call", M_counters[CPT_C_CurrentCall]); if (M_genericMap.size()) { DISPLAY_CROSS_LINE (); } for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { char *s = (char *)malloc(20 + strlen(M_genericDisplay[i])); sprintf(s, "Counter %s", M_genericDisplay[i]); DISPLAY_2VAL(s, M_genericCounters[(i - 1)* GENERIC_TYPES + GENERIC_PD], M_genericCounters[(i - 1) * GENERIC_TYPES + GENERIC_C]); free(s); } DISPLAY_CROSS_LINE (); DISPLAY_2VAL ("Successful call", M_counters[CPT_PD_SuccessfulCall], M_counters[CPT_C_SuccessfulCall]); DISPLAY_2VAL ("Failed call", M_counters[CPT_PD_FailedCall], M_counters[CPT_C_FailedCall]); //DISPLAY_2VAL ("Unexpected msg", // M_counters[CPT_PD_UnexpectedMessage], // M_counters[CPT_C_UnexpectedMessage]); DISPLAY_CROSS_LINE (); for (int i = 1; i <= nRtds(); i++) { char s[80]; sprintf(s, "Response Time %s", M_revRtdMap[i]); DISPLAY_TXT_COL (s, msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PD)), msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C))); } DISPLAY_TXT_COL ("Call Length", msToHHMMSSus( (unsigned long)computeMean(CPT_PD_AverageCallLength_Sum, CPT_PD_NbOfCallUsedForAverageCallLength ) ), msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) )); fflush(f); } void CStat::displayRepartition (FILE *f) { displayRtdRepartition(f, 1); DISPLAY_INFO("Average Call Length Repartition"); displayRepartition(f, M_CallLengthRepartition, M_SizeOfCallLengthRepartition); } void CStat::displayRtdRepartition (FILE *f, int which) { if (which > nRtds()) { DISPLAY_INFO (" "); return; } char s[80]; snprintf(s, sizeof(s), "Average Response Time Repartition %s", M_revRtdMap[which]); DISPLAY_INFO(s); displayRepartition(f, M_ResponseTimeRepartition[which - 1], M_SizeOfResponseTimeRepartition); } void CStat::dumpData () { long localElapsedTime, globalElapsedTime ; struct timeval currentTime; float averageCallRate; float realInstantCallRate; unsigned long numberOfCall; // computing the real call rate GET_TIME (¤tTime); globalElapsedTime = computeDiffTimeInMs (¤tTime, &M_startTime); localElapsedTime = computeDiffTimeInMs (¤tTime, &M_plStartTime); // the call rate is for all the call : incoming and outgoing numberOfCall = (M_counters[CPT_C_IncomingCallCreated] + M_counters[CPT_C_OutgoingCallCreated]); averageCallRate = (globalElapsedTime > 0 ? 1000*(float)numberOfCall/(float)globalElapsedTime : 0.0); numberOfCall = (M_counters[CPT_PL_IncomingCallCreated] + M_counters[CPT_PL_OutgoingCallCreated]); realInstantCallRate = (localElapsedTime > 0 ? 1000*(float)numberOfCall / (float)localElapsedTime : 0.0); if(M_outputStream == NULL) { // if the file is still not opened, we opened it now M_outputStream = new ofstream(M_fileName); M_headerAlreadyDisplayed = false; if(M_outputStream == NULL) { cerr << "Unable to open stat file '" << M_fileName << "' !" << endl; exit(EXIT_FATAL_ERROR); } #ifndef __osf__ if(!M_outputStream->is_open()) { cerr << "Unable to open stat file '" << M_fileName << "' !" << endl; exit(EXIT_FATAL_ERROR); } #endif } if(M_headerAlreadyDisplayed == false) { // header - it's dump in file only one time at the beginning of the file (*M_outputStream) << "StartTime" << stat_delimiter << "LastResetTime" << stat_delimiter << "CurrentTime" << stat_delimiter << "ElapsedTime(P)" << stat_delimiter << "ElapsedTime(C)" << stat_delimiter << "TargetRate" << stat_delimiter << "CallRate(P)" << stat_delimiter << "CallRate(C)" << stat_delimiter << "IncomingCall(P)" << stat_delimiter << "IncomingCall(C)" << stat_delimiter << "OutgoingCall(P)" << stat_delimiter << "OutgoingCall(C)" << stat_delimiter << "TotalCallCreated" << stat_delimiter << "CurrentCall" << stat_delimiter << "SuccessfulCall(P)" << stat_delimiter << "SuccessfulCall(C)" << stat_delimiter << "FailedCall(P)" << stat_delimiter << "FailedCall(C)" << stat_delimiter << "FailedCannotSendMessage(P)" << stat_delimiter << "FailedCannotSendMessage(C)" << stat_delimiter << "FailedMaxUDPRetrans(P)" << stat_delimiter << "FailedMaxUDPRetrans(C)" << stat_delimiter << "FailedTcpConnect(P)" << stat_delimiter << "FailedTcpConnect(C)" << stat_delimiter << "FailedTcpClosed(P)" << stat_delimiter << "FailedTcpClosed(C)" << stat_delimiter << "FailedUnexpectedMessage(P)" << stat_delimiter << "FailedUnexpectedMessage(C)" << stat_delimiter << "FailedCallRejected(P)" << stat_delimiter << "FailedCallRejected(C)" << stat_delimiter << "FailedCmdNotSent(P)" << stat_delimiter << "FailedCmdNotSent(C)" << stat_delimiter << "FailedRegexpDoesntMatch(P)" << stat_delimiter << "FailedRegexpDoesntMatch(C)" << stat_delimiter << "FailedRegexpShouldntMatch(P)" << stat_delimiter << "FailedRegexpShouldntMatch(C)" << stat_delimiter << "FailedRegexpHdrNotFound(P)" << stat_delimiter << "FailedRegexpHdrNotFound(C)" << stat_delimiter << "FailedOutboundCongestion(P)" << stat_delimiter << "FailedOutboundCongestion(C)" << stat_delimiter << "FailedTimeoutOnRecv(P)" << stat_delimiter << "FailedTimeoutOnRecv(C)" << stat_delimiter << "FailedTimeoutOnSend(P)" << stat_delimiter << "FailedTimeoutOnSend(C)" << stat_delimiter << "OutOfCallMsgs(P)" << stat_delimiter << "OutOfCallMsgs(C)" << stat_delimiter << "DeadCallMsgs(P)" << stat_delimiter << "DeadCallMsgs(C)" << stat_delimiter << "Retransmissions(P)" << stat_delimiter << "Retransmissions(C)" << stat_delimiter << "AutoAnswered(P)" << stat_delimiter << "AutoAnswered(C)" << stat_delimiter << "Warnings(P)" << stat_delimiter << "Warnings(C)" << stat_delimiter << "FatalErrors(P)" << stat_delimiter << "FatalErrors(C)" << stat_delimiter << "WatchdogMajor(P)" << stat_delimiter << "WatchdogMajor(C)" << stat_delimiter << "WatchdogMinor(P)" << stat_delimiter << "WatchdogMinor(C)" << stat_delimiter; for (int i = 1; i <= nRtds(); i++) { char s_P[80]; char s_C[80]; sprintf(s_P, "ResponseTime%s(P)%s", M_revRtdMap[i], stat_delimiter); sprintf(s_C, "ResponseTime%s(C)%s", M_revRtdMap[i], stat_delimiter); (*M_outputStream) << s_P << s_C; sprintf(s_P, "ResponseTime%sStDev(P)%s", M_revRtdMap[i], stat_delimiter); sprintf(s_C, "ResponseTime%sStDev(C)%s", M_revRtdMap[i], stat_delimiter); (*M_outputStream) << s_P << s_C; } (*M_outputStream) << "CallLength(P)" << stat_delimiter << "CallLength(C)" << stat_delimiter; (*M_outputStream) << "CallLengthStDev(P)" << stat_delimiter << "CallLengthStDev(C)" << stat_delimiter; for (unsigned int i = 1; i < M_genericMap.size() + 1; i++) { (*M_outputStream) << M_revGenericMap[i] << "(P)" << stat_delimiter; (*M_outputStream) << M_revGenericMap[i] << "(C)" << stat_delimiter; } for (int i = 1; i <= nRtds(); i++) { char s[80]; sprintf(s, "ResponseTimeRepartition%s", M_revRtdMap[i]); (*M_outputStream) << sRepartitionHeader(M_ResponseTimeRepartition[i - 1], M_SizeOfResponseTimeRepartition, s); } (*M_outputStream) << sRepartitionHeader(M_CallLengthRepartition, M_SizeOfCallLengthRepartition, "CallLengthRepartition"); (*M_outputStream) << endl; M_headerAlreadyDisplayed = true; } // content (*M_outputStream) << formatTime(&M_startTime) << stat_delimiter; (*M_outputStream) << formatTime(&M_plStartTime) << stat_delimiter; (*M_outputStream) << formatTime(¤tTime) << stat_delimiter << msToHHMMSS(localElapsedTime) << stat_delimiter; (*M_outputStream) << msToHHMMSS(globalElapsedTime) << stat_delimiter; if (users >= 0) { (*M_outputStream) << users << stat_delimiter; } else { (*M_outputStream) << rate << stat_delimiter; } (*M_outputStream) << realInstantCallRate << stat_delimiter << averageCallRate << stat_delimiter << M_counters[CPT_PL_IncomingCallCreated] << stat_delimiter << M_counters[CPT_C_IncomingCallCreated] << stat_delimiter << M_counters[CPT_PL_OutgoingCallCreated] << stat_delimiter << M_counters[CPT_C_OutgoingCallCreated] << stat_delimiter << (M_counters[CPT_C_IncomingCallCreated]+ M_counters[CPT_C_OutgoingCallCreated])<< stat_delimiter << M_counters[CPT_C_CurrentCall] << stat_delimiter << M_counters[CPT_PL_SuccessfulCall] << stat_delimiter << M_counters[CPT_C_SuccessfulCall] << stat_delimiter << M_counters[CPT_PL_FailedCall] << stat_delimiter << M_counters[CPT_C_FailedCall] << stat_delimiter << M_counters[CPT_PL_FailedCallCannotSendMessage] << stat_delimiter << M_counters[CPT_C_FailedCallCannotSendMessage] << stat_delimiter << M_counters[CPT_PL_FailedCallMaxUdpRetrans] << stat_delimiter << M_counters[CPT_C_FailedCallMaxUdpRetrans ] << stat_delimiter << M_counters[CPT_PL_FailedCallTcpConnect] << stat_delimiter << M_counters[CPT_C_FailedCallTcpConnect] << stat_delimiter << M_counters[CPT_PL_FailedCallTcpClosed] << stat_delimiter << M_counters[CPT_C_FailedCallTcpClosed] << stat_delimiter << M_counters[CPT_PL_FailedCallUnexpectedMessage] << stat_delimiter << M_counters[CPT_C_FailedCallUnexpectedMessage] << stat_delimiter << M_counters[CPT_PL_FailedCallCallRejected] << stat_delimiter << M_counters[CPT_C_FailedCallCallRejected] << stat_delimiter << M_counters[CPT_PL_FailedCallCmdNotSent] << stat_delimiter << M_counters[CPT_C_FailedCallCmdNotSent] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpDoesntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpDoesntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpShouldntMatch] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpShouldntMatch] << stat_delimiter << M_counters[CPT_PL_FailedCallRegexpHdrNotFound] << stat_delimiter << M_counters[CPT_C_FailedCallRegexpHdrNotFound] << stat_delimiter << M_counters[CPT_PL_FailedOutboundCongestion] << stat_delimiter << M_counters[CPT_C_FailedOutboundCongestion] << stat_delimiter << M_counters[CPT_PL_FailedTimeoutOnRecv] << stat_delimiter << M_counters[CPT_C_FailedTimeoutOnRecv] << stat_delimiter << M_counters[CPT_PL_FailedTimeoutOnSend] << stat_delimiter << M_counters[CPT_C_FailedTimeoutOnSend] << stat_delimiter << M_G_counters[CPT_G_PL_OutOfCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_OutOfCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_DeadCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_DeadCallMsgs - E_NB_COUNTER - 1] << stat_delimiter << M_counters[CPT_PL_Retransmissions] << stat_delimiter << M_counters[CPT_C_Retransmissions] << stat_delimiter << M_G_counters[CPT_G_PL_AutoAnswered - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_AutoAnswered - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_Warnings - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_Warnings - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_FatalErrors - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_FatalErrors - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_WatchdogMajor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_WatchdogMajor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_PL_WatchdogMinor - E_NB_COUNTER - 1] << stat_delimiter << M_G_counters[CPT_G_C_WatchdogMinor - E_NB_COUNTER - 1] << stat_delimiter; // SF917289 << M_counters[CPT_C_UnexpectedMessage] << stat_delimiter; for (int i = 1; i <= nRtds(); i++) { (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_PL)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdMean(i, GENERIC_C)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdStdev(i, GENERIC_PL)) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeRtdStdev(i, GENERIC_C)) << stat_delimiter; } (*M_outputStream) << msToHHMMSSus( (unsigned long)computeMean(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength) ) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeMean(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength) ) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeStdev(CPT_PL_AverageCallLength_Sum, CPT_PL_NbOfCallUsedForAverageCallLength, CPT_PL_AverageCallLength_Squares )) << stat_delimiter; (*M_outputStream) << msToHHMMSSus( (unsigned long)computeStdev(CPT_C_AverageCallLength_Sum, CPT_C_NbOfCallUsedForAverageCallLength, CPT_C_AverageCallLength_Squares )) << stat_delimiter; for (unsigned int i = 0; i < M_genericMap.size(); i++) { (*M_outputStream) << M_genericCounters[GENERIC_TYPES * i + GENERIC_PL] << stat_delimiter; (*M_outputStream) << M_genericCounters[GENERIC_TYPES * i + GENERIC_C] << stat_delimiter; } for (int i = 0; i < nRtds(); i++) { (*M_outputStream) << sRepartitionInfo(M_ResponseTimeRepartition[i], M_SizeOfResponseTimeRepartition); } (*M_outputStream) << sRepartitionInfo(M_CallLengthRepartition, M_SizeOfCallLengthRepartition); (*M_outputStream) << endl; // flushing the output file to let the tail -f working ! (*M_outputStream).flush(); } /* end of logData () */ void CStat::dumpDataRtt () { if(M_outputStreamRtt == NULL) { // if the file is still not opened, we opened it now M_outputStreamRtt = new ofstream(M_fileNameRtt); M_headerAlreadyDisplayedRtt = false; if(M_outputStreamRtt == NULL) { cerr << "Unable to open rtt file '" << M_fileNameRtt << "' !" << endl; exit(EXIT_FATAL_ERROR); } #ifndef __osf__ if(!M_outputStreamRtt->is_open()) { cerr << "Unable to open rtt file '" << M_fileNameRtt << "' !" << endl; exit(EXIT_FATAL_ERROR); } #endif } if(M_headerAlreadyDisplayedRtt == false) { (*M_outputStreamRtt) << "Date_ms" << stat_delimiter << "response_time_ms" << stat_delimiter << "rtd_no" << endl; M_headerAlreadyDisplayedRtt = true; } for (unsigned int L_i = 0; L_i < M_counterDumpRespTime ; L_i ++) { (*M_outputStreamRtt) << M_dumpRespTime[L_i].date << stat_delimiter ; (*M_outputStreamRtt) << M_dumpRespTime[L_i].rtt << stat_delimiter ; (*M_outputStreamRtt) << M_revRtdMap[M_dumpRespTime[L_i].rtd_no] << endl; (*M_outputStreamRtt).flush(); M_dumpRespTime[L_i].date = 0.0; M_dumpRespTime[L_i].rtt = 0.0; M_dumpRespTime[L_i].rtd_no = 0; } // flushing the output file (*M_outputStreamRtt).flush(); M_counterDumpRespTime = 0; } /* Time Gestion */ char* CStat::msToHHMMSS (unsigned long P_ms) { static char L_time [TIME_LENGTH]; unsigned long hh, mm, ss; P_ms = P_ms / 1000; hh = P_ms / 3600; mm = (P_ms - hh * 3600) / 60; ss = P_ms - (hh * 3600) - (mm * 60); sprintf (L_time, "%2.2lu:%2.2lu:%2.2lu", hh, mm, ss); return (L_time); } /* end of msToHHMMSS */ char* CStat::msToHHMMSSus (unsigned long P_ms) { static char L_time [TIME_LENGTH]; unsigned long sec, hh, mm, ss, us; sec = P_ms / 1000; hh = sec / 3600; mm = (sec - hh * 3600) / 60; ss = sec - (hh * 3600) - (mm * 60); us = 1000*(P_ms - (hh * 3600000) - (mm * 60000) - (ss*1000)); sprintf (L_time, "%2.2lu:%2.2lu:%2.2lu:%06lu", hh, mm, ss, us); return (L_time); } /* end of msToHHMMSSus */ char* CStat::formatTime (struct timeval* P_tv, bool with_epoch) { static char L_time [TIME_LENGTH]; struct tm * L_currentDate; // Get the current date and time L_currentDate = localtime ((const time_t *)&P_tv->tv_sec); // Format the time if (L_currentDate == NULL) { memset (L_time, 0, TIME_LENGTH); } else { if (with_epoch) { sprintf(L_time, "%4.4d-%2.2d-%2.2d %2.2d:%2.2d:%2.2d.%06ld", L_currentDate->tm_year + 1900, L_currentDate->tm_mon + 1, L_currentDate->tm_mday, L_currentDate->tm_hour, L_currentDate->tm_min, L_currentDate->tm_sec, (long)P_tv->tv_usec); } else { sprintf(L_time, "%4.4d-%2.2d-%2.2d\t%2.2d:%2.2d:%2.2d.%06ld\t%10.10ld.%06ld", L_currentDate->tm_year + 1900, L_currentDate->tm_mon + 1, L_currentDate->tm_mday, L_currentDate->tm_hour, L_currentDate->tm_min, L_currentDate->tm_sec, (long)P_tv->tv_usec, (long)P_tv->tv_sec, /* time_t is int on some bsds */ (long)P_tv->tv_usec); } } return (L_time); } /* end of formatTime */ long CStat::computeDiffTimeInMs (struct timeval* tf, struct timeval* ti) { long v1, v2; v1 = tf->tv_sec - ti->tv_sec; v2 = tf->tv_usec - ti->tv_usec; if (v2 < 0) v2 += 1000000, v1--; return (v1*1000 + v2/1000); } CSample::~CSample() { } /* Implementation of a fixed distribution. */ CFixed::CFixed(double value) { this->value = value; } double CFixed::sample() { return value; } int CFixed::textDescr(char *s, int len) { return snprintf(s, len, "%lf", value); } int CFixed::timeDescr(char *s, int len) { return time_string(value, s, len); } double CFixed::cdfInv(double /*percentile*/) { return value; } /* Implementation of the default pause time. */ CDefaultPause::CDefaultPause() { } double CDefaultPause::sample() { return (double)duration; } int CDefaultPause::textDescr(char *s, int len) { return snprintf(s, len, "%d", duration); } int CDefaultPause::timeDescr(char *s, int len) { return time_string(duration, s, len); } double CDefaultPause::cdfInv(double /*percentile*/) { return duration; } /* Implementation of a uniform distribution. */ static bool uniform_init = false; CUniform::CUniform(double min, double max) { if (!uniform_init) { uniform_init = true; srand(time(NULL)); } this->min = min; this->max = max; } double CUniform::sample() { double rval = ((double)rand())/((double)RAND_MAX); return min + (rval * (max - min)); } int CUniform::textDescr(char *s, int len) { return snprintf(s, len, "%lf/%lf", min, max); } int CUniform::timeDescr(char *s, int len) { int used = time_string(min, s, len); used += snprintf(s + used, len - used, "/"); used += time_string(max, s + used, len - used); return used; } double CUniform::cdfInv(double percentile) { return min + (max * percentile); } #ifdef HAVE_GSL gsl_rng *gsl_init() { static gsl_rng *rng = NULL; if (rng) { return rng; } gsl_rng_env_setup(); rng = gsl_rng_alloc(gsl_rng_default); if (!rng) { ERROR("Could not initialize GSL random number generator.\n"); } return rng; } /* Normal distribution. */ CNormal::CNormal(double mean, double stdev) { this->mean = mean; this->stdev = stdev; rng = gsl_init(); } double CNormal::sample() { double val = gsl_ran_gaussian(rng, stdev); return val + mean; } int CNormal::textDescr(char *s, int len) { return snprintf(s, len, "N(%.3lf,%.3lf)", mean, stdev); } int CNormal::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "N("); used += time_string(mean, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(stdev, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CNormal::cdfInv(double percentile) { return mean + gsl_cdf_gaussian_Pinv(percentile, stdev); } /* Lognormal distribution. */ double CLogNormal::sample() { return gsl_ran_lognormal(rng, mean, stdev); } int CLogNormal::textDescr(char *s, int len) { if (len == 0) return 0; s[0] = 'L'; return 1 + this->CNormal::textDescr(s + 1, len - 1); } int CLogNormal::timeDescr(char *s, int len) { if (len == 0) return 0; s[0] = 'L'; return 1 + this->CNormal::timeDescr(s + 1, len - 1); } double CLogNormal::cdfInv(double percentile) { return gsl_cdf_lognormal_Pinv(percentile, mean, stdev); } /* Exponential distribution. */ CExponential::CExponential(double mean) { this->mean = mean; rng = gsl_init(); } double CExponential::sample() { return gsl_ran_exponential(rng, mean); } int CExponential::textDescr(char *s, int len) { return snprintf(s, len, "Exp(%lf)", mean); } int CExponential::timeDescr(char *s, int len) { int used = snprintf(s, len, "Exp("); used += time_string(mean, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CExponential::cdfInv(double percentile) { return gsl_cdf_exponential_Pinv(percentile, mean); } /* Weibull distribution. */ CWeibull::CWeibull(double lambda, double k) { this->lambda = lambda; this->k = k; rng = gsl_init(); } double CWeibull::sample() { return gsl_ran_weibull(rng, lambda, k); } int CWeibull::textDescr(char *s, int len) { return snprintf(s, len, "Wb(%.3lf,%.3lf)", lambda, k); } int CWeibull::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "Wb("); used += time_string(lambda, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CWeibull::cdfInv(double percentile) { return gsl_cdf_weibull_Pinv(percentile, lambda, k); } /* Pareto distribution. */ CPareto::CPareto(double k, double xsubm) { this->k = k; this->xsubm = xsubm; rng = gsl_init(); } double CPareto::sample() { return gsl_ran_pareto(rng, k, xsubm); } int CPareto::textDescr(char *s, int len) { return snprintf(s, len, "P(%.3lf,%.3lf)", k, xsubm); } int CPareto::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "P("); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(xsubm, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CPareto::cdfInv(double percentile) { return gsl_cdf_pareto_Pinv(percentile, k, xsubm); } /* Generalized Pareto distribution. */ CGPareto::CGPareto(double shape, double scale, double location) { this->shape = shape; this->scale = scale; this->location = location; rng = gsl_init(); } double CGPareto::sample() { return cdfInv(gsl_ran_flat(rng, 0.0, 1.0)); } int CGPareto::textDescr(char *s, int len) { return snprintf(s, len, "P(%.3lf,%.3lf,%.3f)", shape, scale, location); } int CGPareto::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "P("); used += time_string(shape, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(scale, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(location, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CGPareto::cdfInv(double percentile) { return location + ((scale * (pow(percentile, -shape) - 1))/shape); } /* Gamma distribution. */ CGamma::CGamma(double k, double theta) { this->k = k; this->theta = theta; rng = gsl_init(); } double CGamma::sample() { return gsl_ran_gamma(rng, k, theta); } int CGamma::textDescr(char *s, int len) { return snprintf(s, len, "G(%.3lf,%.3lf)", k, theta); } int CGamma::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "G("); used += time_string(k, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(theta, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } double CGamma::cdfInv(double percentile) { return gsl_cdf_gamma_Pinv(percentile, k, theta); } /* NegBin distribution. */ CNegBin::CNegBin(double p, double n) { this->p = p; this->n = n; rng = gsl_init(); } double CNegBin::sample() { return gsl_ran_negative_binomial(rng, n, p); } int CNegBin::textDescr(char *s, int len) { return snprintf(s, len, "NB(%.3lf,%.3lf)", p, n); } int CNegBin::timeDescr(char *s, int len) { int used = 0; used += snprintf(s, len, "NB("); used += time_string(p, s + used, len - used); used += snprintf(s + used, len - used, ","); used += time_string(n, s + used, len - used); used += snprintf(s + used, len - used, ")"); return used; } /* We really don't implement this, but should so that sanity checking will * work. For now, just return zero. */ double CNegBin::cdfInv(double percentile) { return 0; } #endif sipp-3.5.1/src/variables.cpp0000644000175000017500000002150712672462535015011 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. * */ #include "sipp.hpp" /* __________________________________________________________________________ C L A S S C C a l l V a r i a b l e __________________________________________________________________________ */ bool CCallVariable::isSet() { if (M_type == E_VT_REGEXP) { if(M_nbOfMatchingValue >= 1) return(true); else return(false); } else if (M_type == E_VT_BOOL) { return M_bool; } else if (M_type == E_VT_DOUBLE) { return M_double; } return (M_type != E_VT_UNDEFINED); } bool CCallVariable::isDouble() { return (M_type == E_VT_DOUBLE); } bool CCallVariable::isBool() { return (M_type == E_VT_BOOL); } bool CCallVariable::isRegExp() { return (M_type == E_VT_REGEXP); } bool CCallVariable::isString() { return (M_type == E_VT_STRING); } // WARNING : setMatchingValue does't allocate the memory for the matching value // but the destructor free the memory void CCallVariable::setMatchingValue(char* P_matchingVal) { M_type = E_VT_REGEXP; if(M_matchingValue != NULL) { delete [] M_matchingValue; } M_matchingValue = P_matchingVal; M_nbOfMatchingValue++; } char* CCallVariable::getMatchingValue() { if (M_type != E_VT_REGEXP) { return NULL; } return(M_matchingValue); } void CCallVariable::setDouble(double val) { M_type = E_VT_DOUBLE; M_double = val; } double CCallVariable::getDouble() { if (M_type != E_VT_DOUBLE) { return 0.0; } return(M_double); } void CCallVariable::setString(char *P_val) { M_type = E_VT_STRING; free(M_stringValue); M_stringValue = P_val; } char *CCallVariable::getString() { if (M_type == E_VT_STRING) { return(M_stringValue); } else if (M_type == E_VT_REGEXP && M_matchingValue) { return(M_matchingValue); } else { return const_cast(""); /* BUG BUT NOT SO SERIOUS */ } } /* Convert this variable to a double. Returns true on success, false on failure. */ bool CCallVariable::toDouble(double *newValue) { char *p; switch(M_type) { case E_VT_REGEXP: if(M_nbOfMatchingValue < 1) { return false; } *newValue = strtod(M_matchingValue, &p); if (*p) { return false; } break; case E_VT_STRING: *newValue = strtod(M_stringValue, &p); if (*p) { return false; } break; case E_VT_DOUBLE: *newValue = getDouble(); break; case E_VT_BOOL: *newValue = (double)getBool(); break; default: return false; } return true; } void CCallVariable::setBool(bool val) { M_type = E_VT_BOOL; M_bool = val; } bool CCallVariable::getBool() { if (M_type != E_VT_BOOL) { return false; } return(M_bool); } // Constuctor and destructor CCallVariable::CCallVariable() { M_matchingValue = NULL; M_stringValue = NULL; M_nbOfMatchingValue = 0; M_type = E_VT_UNDEFINED; } CCallVariable::~CCallVariable() { if(M_matchingValue != NULL) { delete [] M_matchingValue; } M_matchingValue = NULL; free(M_stringValue); } #define LEVEL_BITS 8 VariableTable::VariableTable(VariableTable *parent, int size) { if (parent) { level = parent->level + 1; assert(level < (1 << LEVEL_BITS)); this->parent = parent->getTable(); } else { level = 0; this->parent = NULL; } count = 1; this->size = size; if (size == 0) { variableTable = NULL; return; } variableTable = (CCallVariable **)malloc(size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not allocate variable table!"); } for (int i = 0; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } } VariableTable::VariableTable(AllocVariableTable *src) { count = 1; this->level = src->level; if (src->parent) { this->parent = src->parent->getTable(); } else { this->parent = NULL; } if (level > 0) { assert(this->parent); } this->size = src->size; if (size == 0) { variableTable = NULL; return; } variableTable = (CCallVariable **)malloc(size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not allocate variable table!"); } for (int i = 0; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } } void VariableTable::expand(int size) { assert(size > this->size); if (size == this->size) { return; } variableTable = (CCallVariable **)realloc(variableTable, size * sizeof(CCallVariable *)); if (!variableTable) { ERROR("Could not expand variable table!"); } for (int i = this->size; i < size; i++) { variableTable[i] = new CCallVariable(); if (variableTable[i] == NULL) { ERROR ("Call variable allocation failed"); } } this->size = size; } VariableTable::~VariableTable() { if (parent) { parent->putTable(); } for (int i = 0; i < size; i++) { delete variableTable[i]; } free(variableTable); } VariableTable *VariableTable::getTable() { count++; return this; } void VariableTable::putTable() { if (--count == 0) { delete this; } } CCallVariable *VariableTable::getVar(int i) { int thisLevel = i & ((1 << LEVEL_BITS) - 1); assert(thisLevel <= level); if (thisLevel == level) { i = i >> LEVEL_BITS; assert(i > 0); assert(i <= size ); return variableTable[i - 1]; } assert(parent); return parent->getVar(i); } AllocVariableTable::AllocVariableTable(AllocVariableTable *av_parent) : VariableTable((VariableTable *)av_parent, 0) { this->av_parent = av_parent; } AllocVariableTable::~AllocVariableTable() { clear_str_int(variableMap); clear_int_str(variableRevMap); clear_int_int(variableReferences); } int AllocVariableTable::find(const char *varName, bool allocate) { /* If this variable has already been used, then we have nothing to do. */ str_int_map::iterator var_it = variableMap.find(varName); if (var_it != variableMap.end()) { variableReferences[var_it->second]++; return var_it->second; } if (av_parent) { int ret = av_parent->find(varName, false); if (ret > 0) { return ret; } } if (allocate) { int varNum = size + 1; expand(varNum); varNum = (varNum << LEVEL_BITS) | level; variableMap[varName] = varNum; variableReferences[varNum] = 1; variableRevMap[varNum] = strdup(varName); return varNum; } return -1; } char *AllocVariableTable::getName(int i) { int thisLevel = i & ((1 << LEVEL_BITS) - 1); assert(thisLevel <= level); if (thisLevel == level) { return variableRevMap[i]; } assert(av_parent); return av_parent->getName(i); } void AllocVariableTable::dump() { if (av_parent) { av_parent->dump(); } WARNING("%zu level %d variables:", variableMap.size(), level); for (str_int_map::iterator i = variableMap.begin(); i != variableMap.end(); i++) { WARNING("%s", i->first.c_str()); } } void AllocVariableTable::validate() { for (str_int_map::iterator var_it = variableMap.begin(); var_it != variableMap.end(); var_it++) { if (variableReferences[var_it->second] < 2) { const char *varName = var_it->first.c_str(); int varRef = variableReferences[var_it->second]; if (strcmp(varName, "_") != 0) { ERROR("Variable $%s is referenced %d times!\n", varName, varRef); } } } if (av_parent) { av_parent->validate(); } } sipp-3.5.1/src/task.cpp0000644000175000017500000002126212672462535014001 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #include #include "sipp.hpp" task_list all_tasks; task_list running_tasks; timewheel paused_tasks; /* Get the overall list of running tasks. */ task_list* get_running_tasks() { return &running_tasks; } void abort_all_tasks() { for (task_list::iterator task_it = all_tasks.begin(); task_it != all_tasks.end(); task_it = all_tasks.begin()) { (*task_it)->abort(); } } void dump_tasks() { WARNING("---- %zu Active Tasks ----\n", all_tasks.size()); for (task_list::iterator task_it = all_tasks.begin(); task_it != all_tasks.end(); task_it++) { (*task_it)->dump(); } } int expire_paused_tasks() { return paused_tasks.expire_paused_tasks(); } int paused_tasks_count() { return paused_tasks.size(); } // Methods for the task class task::task() { this->taskit = all_tasks.insert(all_tasks.end(), this); add_to_runqueue(); } task::~task() { if (running) { remove_from_runqueue(); } else { paused_tasks.remove_paused_task(this); } all_tasks.erase(taskit); } /* Put this task in the run queue. */ void task::add_to_runqueue() { this->runit = running_tasks.insert(running_tasks.end(), this); this->running = true; } void task::add_to_paused_tasks(bool increment) { paused_tasks.add_paused_task(this, increment); } void task::recalculate_wheel() { add_to_paused_tasks(false); } /* Remove this task from the run queue. */ bool task::remove_from_runqueue() { if (!this->running) { return false; } running_tasks.erase(this->runit); this->running = false; return true; } void task::setRunning() { if (!running) { paused_tasks.remove_paused_task(this); add_to_runqueue(); } } void task::setPaused() { if (running) { if (!remove_from_runqueue()) { WARNING("Tried to remove a running call that wasn't running!\n"); assert(0); } } else { paused_tasks.remove_paused_task(this); } assert(running == false); add_to_paused_tasks(true); } void task::abort() { delete this; } // Methods for the timewheel class // Based on the time a given task should next be woken up, finds the // correct time wheel for it and returns a list of other tasks // occuring at that point. task_list *timewheel::task2list(task *task) { unsigned int wake = task->wake(); if (wake == 0) { return &forever_list; } assert(wake >= wheel_base); if (wheel_base > clock_tick) { ERROR("wheel_base is %lu, clock_tick is %lu - expected wheel_base to be less than or equal to clock_tick", wheel_base, clock_tick); assert(wheel_base <= clock_tick); } unsigned int slot_in_first_wheel = wake % LEVEL_ONE_SLOTS; unsigned int slot_in_second_wheel = (wake / LEVEL_ONE_SLOTS) % LEVEL_TWO_SLOTS; unsigned int slot_in_third_wheel = (wake / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS)); bool fits_in_first_wheel = ((wake / LEVEL_ONE_SLOTS) == (wheel_base / LEVEL_ONE_SLOTS)); bool fits_in_second_wheel = ((wake / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS)) == (wheel_base / (LEVEL_ONE_SLOTS * LEVEL_TWO_SLOTS))); bool fits_in_third_wheel = (slot_in_third_wheel < LEVEL_THREE_SLOTS); if (fits_in_first_wheel) { return &wheel_one[slot_in_first_wheel]; } else if (fits_in_second_wheel) { return &wheel_two[slot_in_second_wheel]; } else if (fits_in_third_wheel) { return &wheel_three[slot_in_third_wheel]; } else{ ERROR("Attempted to schedule a task too far in the future"); return NULL; } } /* Iterate through our sorted set of paused tasks, removing those that * should no longer be paused, and adding them to the run queue. */ int timewheel::expire_paused_tasks() { int found = 0; // This while loop counts up from the wheel_base (i.e. the time // this function last ran) to the current scheduler time (i.e. clock_tick). while (wheel_base < clock_tick) { int slot1 = wheel_base % LEVEL_ONE_SLOTS; /* If slot1 is 0 (i.e. wheel_base is a multiple of 4096ms), * we need to repopulate the first timer wheel with the * contents of the first available slot of the second wheel. */ if (slot1 == 0) { /* slot2 represents the slot in the second timer wheel * containing the tasks for the next ~4s. So when * wheel_base is 4096, wheel2[1] will be moved into wheel 1, * when wheel_base of 8192 wheel2[2] will be moved into * wheel 1, etc. */ int slot2 = (wheel_base / LEVEL_ONE_SLOTS) % LEVEL_TWO_SLOTS; /* If slot2 is also zero, we must migrate tasks from slot3 into slot2. */ if (slot2 == 0) { /* Same logic above, except that each slot of wheel3 contains the next 69 minutes of tasks, enough to completely fill wheel 2. */ int slot3 = ((wheel_base / LEVEL_ONE_SLOTS) / LEVEL_TWO_SLOTS); assert(slot3 < LEVEL_THREE_SLOTS); for (task_list::iterator l3it = wheel_three[slot3].begin(); l3it != wheel_three[slot3].end(); l3it++) { /* Migrate this task to wheel two. */ (*l3it)->recalculate_wheel(); } wheel_three[slot3].clear(); } /* Repopulate wheel 1 from wheel 2 (which will now be full of the tasks pulled from wheel 3, if that was necessary) */ for (task_list::iterator l2it = wheel_two[slot2].begin(); l2it != wheel_two[slot2].end(); l2it++) { /* Migrate this task to wheel one. */ (*l2it)->recalculate_wheel(); } wheel_two[slot2].clear(); } /* Move tasks from the current slot of wheel 1 (i.e. the tasks scheduled to fire in the 1ms interval represented by wheel_base) onto a run queue. */ found += wheel_one[slot1].size(); for(task_list::iterator it = wheel_one[slot1].begin(); it != wheel_one[slot1].end(); it++) { (*it)->add_to_runqueue(); // Decrement the total number of tasks in this wheel. count--; } wheel_one[slot1].clear(); wheel_base++; // Move wheel_base to the next 1ms interval } return found; } // Adds a task to the correct timewheel. When increment is false, does // not increment the count of tasks owned by this timewheel, and so // can be used for recalculating the wheel of an existing task. void timewheel::add_paused_task(task *task, bool increment) { task_list::iterator task_it; if (task->wake() && task->wake() < wheel_base) { task->add_to_runqueue(); return; } task_list *list = task2list(task); task_it = list->insert(list->end(), task); task->pauselist = list; task->pauseit = task_it; if (increment) { count++; } } void timewheel::remove_paused_task(task *task) { task_list *list = task->pauselist; list->erase(task->pauseit); count--; } timewheel::timewheel() { count = 0; wheel_base = clock_tick; } int timewheel::size() { return count; } sipp-3.5.1/src/scenario.cpp0000644000175000017500000037431612672462535014655 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Venkatesh * Lee Ballard * Guillaume TEISSIER from FTR&D * Wolfgang Beck * Marc Van Diest from Belgacom * Charles P. Wright from IBM Research * Michael Stovenour */ #include #include "sipp.hpp" #ifdef HAVE_GSL #include #include #include #endif /************************ Class Constructor *************************/ message::message(int index, const char *desc) { this->index = index; this->desc = desc; pause_distribution = NULL; // delete on exit pause_variable = -1; pause_desc = NULL; // free on exit sessions = 0; bShouldRecordRoutes = 0; bShouldAuthenticate = 0; send_scheme = NULL; // delete on exit retrans_delay = 0; timeout = 0; recv_response = 0; recv_request = NULL; // free on exit optional = 0; advance_state = true; regexp_match = 0; regexp_compile = NULL; // regfree (if not NULL) and free on exit /* Anyway */ start_rtd = 0; stop_rtd = 0; repeat_rtd = 0; lost = -1; crlf = 0; hide = 0; display_str = NULL; // free on exit test = -1; condexec = -1; condexec_inverse = false; chance = 0;/* meaning always */ next = -1; nextLabel = NULL; // free on exit on_timeout = -1; onTimeoutLabel = NULL; // free on exit timewait = false; /* 3pcc extended mode */ peer_dest = NULL; // free on exit peer_src = NULL; // free on exit /* Statistics */ nb_sent = 0; nb_recv = 0; nb_sent_retrans = 0; nb_recv_retrans = 0; nb_timeout = 0; nb_unexp = 0; nb_lost = 0; counter = 0; M_actions = NULL; // delete on exit M_type = 0; M_sendCmdData = NULL; // delete on exit M_nbCmdSent = 0; M_nbCmdRecv = 0; content_length_flag = ContentLengthNoPresent; /* How to match responses to this message. */ start_txn = 0; response_txn = 0; ack_txn = 0; recv_response_for_cseq_method_list = NULL; // free on exit } message::~message() { delete(pause_distribution); free(pause_desc); delete(send_scheme); free(recv_request); if (regexp_compile != NULL) { regfree(regexp_compile); } free(regexp_compile); free(display_str); free(nextLabel); free(onTimeoutLabel); free(peer_dest); free(peer_src); delete(M_actions); delete(M_sendCmdData); free(recv_response_for_cseq_method_list); } /******** Global variables which compose the scenario file **********/ scenario *main_scenario; scenario *ooc_scenario; scenario *aa_scenario; scenario *display_scenario; /* This mode setting refers to whether we open calls autonomously (MODE_CLIENT) * or in response to requests (MODE_SERVER). */ int creationMode = MODE_CLIENT; /* Send mode. Do we send to a fixed address or to the last one we got. */ int sendMode = MODE_CLIENT; /* This describes what our 3PCC behavior is. */ int thirdPartyMode = MODE_3PCC_NONE; /*************** Helper functions for various types *****************/ long get_long(const char *ptr, const char *what) { char *endptr; long ret; ret = strtol(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid integer!\n", what, ptr); } return ret; } unsigned long long get_long_long(const char *ptr, const char *what) { char *endptr; unsigned long long ret; ret = strtoull(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid integer!\n", what, ptr); } return ret; } /* This function returns a time in milliseconds from a string. * The multiplier is used to convert from the default input type into * milliseconds. For example, for seconds you should use 1000 and for * milliseconds use 1. */ long get_time(const char *ptr, const char *what, int multiplier) { char *endptr; const char *p; long ret; double dret; int i; if (!isdigit(*ptr)) { ERROR("%s, \"%s\" is not a valid time!\n", what, ptr); } for (i = 0, p = ptr; *p; p++) { if (*p == ':') { i++; } } if (i == 1) { /* mm:ss */ ERROR("%s, \"%s\" mm:ss not implemented yet!\n", what, ptr); } else if (i == 2) { /* hh:mm:ss */ ERROR("%s, \"%s\" hh:mm:ss not implemented yet!\n", what, ptr); } else if (i != 0) { ERROR("%s, \"%s\" is not a valid time!\n", what, ptr); } dret = strtod(ptr, &endptr); if (*endptr) { if (!strcmp(endptr, "s")) { /* Seconds */ ret = (long)(dret * 1000); } else if (!strcmp(endptr, "ms")) { /* Milliseconds. */ ret = (long)dret; } else if (!strcmp(endptr, "m")) { /* Minutes. */ ret = (long)(dret * 60000); } else if (!strcmp(endptr, "h")) { /* Hours. */ ret = (long)(dret * 60 * 60 * 1000); } else { ERROR("%s, \"%s\" is not a valid time!\n", what, ptr); } } else { ret = (long)(dret * multiplier); } return ret; } double get_double(const char *ptr, const char *what) { char *endptr; double ret; ret = strtod(ptr, &endptr); if (*endptr) { ERROR("%s, \"%s\" is not a floating point number!\n", what, ptr); } return ret; } #ifdef PCAPPLAY /* Return static buffer to xml value, as with xp_get_value(). * If the value is enclosed in [brackets], it is assumed to be * a command-line supplied keyword value (-key). */ static const char* xp_get_keyword_value(const char *name) { const char* ptr = xp_get_value(name); size_t len; if (ptr && ptr[0] == '[' && (len = strlen(ptr)) && ptr[len - 1] == ']') { int i = 0; len -= 2; /* without the brackets */ while (generic[i]) { const char* keyword = *generic[i]; if (strncmp(ptr + 1, keyword, len) == 0 && strlen(keyword) == len) { const char* value = *(generic[i] + 1); return strdup(value); } ++i; } ERROR("%s \"%s\" looks like a keyword value, but keyword not supplied!\n", name, ptr); } return ptr; } #endif static char* xp_get_string(const char *name, const char *what) { char *ptr; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } return strdup(ptr); } static double xp_get_double(const char *name, const char *what) { char *ptr; char *helptext; double val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_double(ptr, helptext); free(helptext); return val; } static long xp_get_long(const char *name, const char *what) { char *ptr; char *helptext; long val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_long(ptr, helptext); free(helptext); return val; } static long xp_get_long(const char *name, const char *what, long defval) { if (!(xp_get_value(name))) { return defval; } return xp_get_long(name, what); } static bool xp_get_bool(const char *name, const char *what) { char *ptr; char *helptext; bool val; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' parameter.", what, name); } helptext = (char *)malloc(100 + strlen(name) + strlen(what)); sprintf(helptext, "%s '%s' parameter", what, name); val = get_bool(ptr, helptext); free(helptext); return val; } static bool xp_get_bool(const char *name, const char *what, bool defval) { if (!(xp_get_value(name))) { return defval; } return xp_get_bool(name, what); } int scenario::get_txn(const char *txnName, const char *what, bool start, bool isInvite, bool isAck) { /* Check the name's validity. */ if (txnName[0] == '\0') { ERROR("Variable names may not be empty for %s\n", what); } if (strcspn(txnName, "$,") != strlen(txnName)) { ERROR("Variable names may not contain $ or , for %s\n", what); } /* If this transaction has already been used, then we have nothing to do. */ str_int_map::iterator txn_it = txnMap.find(txnName); if (txn_it != txnMap.end()) { if (start) { /* We need to fill in the invite field. */ transactions[txn_it->second - 1].started++; } else if (isAck) { transactions[txn_it->second - 1].acks++; } else { transactions[txn_it->second - 1].responses++; } return txn_it->second; } /* Assign this variable the next slot. */ struct txnControlInfo transaction; transaction.name = strdup(txnName); if (start) { transaction.started = 1; transaction.responses = 0; transaction.acks = 0; transaction.isInvite = isInvite; } else if (isAck) { /* Does not start or respond to this txn. */ transaction.started = 0; transaction.responses = 0; transaction.acks = 1; transaction.isInvite = false; } else { transaction.started = 0; transaction.responses = 1; transaction.acks = 0; transaction.isInvite = false; } transactions.push_back(transaction); int txnNum = transactions.size(); txnMap[txnName] = txnNum; return txnNum; } int scenario::find_var(const char *varName) { return allocVars->find(varName, false); } int scenario::get_var(const char *varName, const char *what) { /* Check the name's validity. */ if (varName[0] == '\0') { ERROR("Transaction names may not be empty for %s\n", what); } if (strcspn(varName, "$,") != strlen(varName)) { ERROR("Transaction names may not contain $ or , for %s\n", what); } return allocVars->find(varName, true); } int scenario::xp_get_var(const char *name, const char *what) { char *ptr; if (!(ptr = xp_get_value(name))) { ERROR("%s is missing the required '%s' variable parameter.", what, name); } return get_var(ptr, what); } static int xp_get_optional(const char *name, const char *what) { char *ptr = xp_get_value(name); if (!ptr) { return OPTIONAL_FALSE; } if(!strcmp(ptr, "true")) { return OPTIONAL_TRUE; } else if(!strcmp(ptr, "global")) { return OPTIONAL_GLOBAL; } else if(!strcmp(ptr, "false")) { return OPTIONAL_FALSE; } else { ERROR("Could not understand optional value for %s: %s", what, ptr); } return OPTIONAL_FALSE; } int scenario::xp_get_var(const char *name, const char *what, int defval) { char *ptr; if (!(ptr = xp_get_value(name))) { return defval; } return xp_get_var(name, what); } bool get_bool(const char *ptr, const char *what) { char *endptr; long ret; if (!strcasecmp(ptr, "true")) { return true; } if (!strcasecmp(ptr, "false")) { return false; } ret = strtol(ptr, &endptr, 0); if (*endptr) { ERROR("%s, \"%s\" is not a valid boolean!\n", what, ptr); } return ret ? true : false; } /* Pretty print a time. */ int time_string(double ms, char *res, int reslen) { if (ms < 10000) { /* Less then 10 seconds we represent accurately. */ if ((int)(ms + 0.9999) == (int)(ms)) { /* We have an integer, or close enough to it. */ return snprintf(res, reslen, "%dms", (int)ms); } else { if (ms < 1000) { return snprintf(res, reslen, "%.2lfms", ms); } else { return snprintf(res, reslen, "%.1lfms", ms); } } } else if (ms < 60000) { /* We round to 100ms for times less than a minute. */ return snprintf(res, reslen, "%.1fs", ms/1000); } else if (ms < 60 * 60000) { /* We round to 1s for times more than a minute. */ int s = (unsigned int)(ms / 1000); int m = s / 60; s %= 60; return snprintf(res, reslen, "%d:%02d", m, s); } else { int s = (unsigned int)(ms / 1000); int m = s / 60; int h = m / 60; s %= 60; m %= 60; return snprintf(res, reslen, "%d:%02d:%02d", h, m, s); } } /* For backwards compatibility, we assign "true" to slot 1, false to 0, and * allow other valid integers. */ int scenario::get_rtd(const char *ptr, bool start) { if(!strcmp(ptr, (char *)"false")) return 0; if(!strcmp(ptr, (char *)"true")) return stats->findRtd("1", start); return stats->findRtd(ptr, start); } /* Get a counter */ int scenario::get_counter(const char *ptr, const char *what) { /* Check the name's validity. */ if (ptr[0] == '\0') { ERROR("Counter names names may not be empty for %s\n", what); } if (strcspn(ptr, "$,") != strlen(ptr)) { ERROR("Counter names may not contain $ or , for %s\n", what); } return stats->findCounter(ptr, true); } /* Some validation functions. */ void scenario::validate_variable_usage() { allocVars->validate(); } void scenario::validate_txn_usage() { for (unsigned int i = 0; i < transactions.size(); i++) { if(transactions[i].started == 0) { ERROR("Transaction %s is never started!\n", transactions[i].name); } else if(transactions[i].responses == 0) { ERROR("Transaction %s has no responses defined!\n", transactions[i].name); } if (transactions[i].isInvite && transactions[i].acks == 0) { ERROR("Transaction %s is an INVITE transaction without an ACK!\n", transactions[i].name); } if (!transactions[i].isInvite && (transactions[i].acks > 0)) { ERROR("Transaction %s is a non-INVITE transaction with an ACK!\n", transactions[i].name); } } } /* Apply the next and ontimeout labels according to our map. */ void scenario::apply_labels(msgvec v, str_int_map labels) { for (unsigned int i = 0; i < v.size(); i++) { if (v[i]->nextLabel) { str_int_map::iterator label_it = labels.find(v[i]->nextLabel); if (label_it == labels.end()) { ERROR("The label '%s' was not defined (index %d, next attribute)\n", v[i]->nextLabel, i); } v[i]->next = label_it->second; } if (v[i]->onTimeoutLabel) { str_int_map::iterator label_it = labels.find(v[i]->onTimeoutLabel); if (label_it == labels.end()) { ERROR("The label '%s' was not defined (index %d, ontimeout attribute)\n", v[i]->onTimeoutLabel, i); } v[i]->on_timeout = label_it->second; } } } int get_cr_number(const char *src) { int res=0; while(*src) { if(*src == '\n') res++; src++; } return res; } static char* clean_cdata(char *ptr, int *removed_crlf = NULL) { char * msg; while((*ptr == ' ') || (*ptr == '\t') || (*ptr == '\n')) ptr++; msg = (char *) malloc(strlen(ptr) + 3); if(!msg) { ERROR("Memory Overflow"); } strcpy(msg, ptr); ptr = msg + strlen(msg); ptr --; while((ptr >= msg) && ((*ptr == ' ') || (*ptr == '\t') || (*ptr == '\n'))) { if(*ptr == '\n' && removed_crlf) { (*removed_crlf)++; } *ptr-- = 0; } if(!strstr(msg, "\n\n")) { strcat(msg, "\n\n"); } if(ptr == msg) { ERROR("Empty cdata in xml scenario file"); } while ((ptr = strstr(msg, "\n "))) { memmove(ptr + 1, ptr + 2, strlen(ptr) - 1); } while ((ptr = strstr(msg, " \n"))) { memmove(ptr, ptr + 1, strlen(ptr)); } while ((ptr = strstr(msg, "\n\t"))) { memmove(ptr + 1, ptr + 2, strlen(ptr) - 1); } while ((ptr = strstr(msg, "\t\n"))) { memmove(ptr, ptr + 1, strlen(ptr)); } return msg; } /********************** Scenario File analyser **********************/ void scenario::checkOptionalRecv(char *elem, unsigned int scenario_file_cursor) { if (last_recv_optional) { ERROR(" before <%s> sequence without a mandatory message. Please remove one 'optional=true' (element %d).", elem, scenario_file_cursor); } last_recv_optional = false; } scenario::scenario(char * filename, int deflt) { char * elem; char *method_list = NULL; unsigned int scenario_file_cursor = 0; int L_content_length = 0 ; char * peer; const char* cptr; last_recv_optional = false; if(filename) { if(!xp_set_xml_buffer_from_file(filename)) { ERROR("Unable to load or parse '%s' xml scenario file", filename); } } else { if(!xp_set_xml_buffer_from_string(default_scenario[deflt])) { ERROR("Unable to load default xml scenario file"); } } stats = new CStat(); allocVars = new AllocVariableTable(userVariables); hidedefault = false; elem = xp_open_element(0); if (!elem) { ERROR("No element in xml scenario file"); } if(strcmp("scenario", elem)) { ERROR("No 'scenario' section in xml scenario file"); } if ((cptr = xp_get_value("name"))) { name = strdup(cptr); } else { name = strdup(""); } duration = 0; found_timewait = false; scenario_file_cursor = 0; while ((elem = xp_open_element(scenario_file_cursor))) { char * ptr; scenario_file_cursor ++; if(!strcmp(elem, "CallLengthRepartition")) { ptr = xp_get_string("value", "CallLengthRepartition"); stats->setRepartitionCallLength(ptr); free(ptr); } else if(!strcmp(elem, "ResponseTimeRepartition")) { ptr = xp_get_string("value", "ResponseTimeRepartition"); stats->setRepartitionResponseTime(ptr); free(ptr); } else if(!strcmp(elem, "Global")) { ptr = xp_get_string("variables", "Global"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { globalVariables->find(currentTabVarName[i], true); } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "User")) { ptr = xp_get_string("variables", "User"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { userVariables->find(currentTabVarName[i], true); } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "Reference")) { ptr = xp_get_string("variables", "Reference"); char ** currentTabVarName = NULL; int currentNbVarNames; createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); for (int i = 0; i < currentNbVarNames; i++) { int id = allocVars->find(currentTabVarName[i], false); if (id == -1) { ERROR("Could not reference non-existant variable '%s'", currentTabVarName[i]); } } freeStringTable(currentTabVarName, currentNbVarNames); free(ptr); } else if(!strcmp(elem, "DefaultMessage")) { char *id = xp_get_string("id", "DefaultMessage"); if(!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'send' section of xml scenario file"); } char *msg = clean_cdata(ptr); set_default_message(id, msg); free(id); /* XXX: This should really be per scenario. */ } else if(!strcmp(elem, "label")) { ptr = xp_get_string("id", "label"); if (labelMap.find(ptr) != labelMap.end()) { ERROR("The label name '%s' is used twice.", ptr); } labelMap[ptr] = messages.size(); free(ptr); } else if (!strcmp(elem, "init")) { /* We have an init section, which must be full of nops or labels. */ int nop_cursor = 0; char *initelem; while ((initelem = xp_open_element(nop_cursor++))) { if (!strcmp(initelem, "nop")) { /* We should parse this. */ message *nopmsg = new message(initmessages.size(), "scenario initialization"); initmessages.push_back(nopmsg); nopmsg->M_type = MSG_TYPE_NOP; getCommonAttributes(nopmsg); } else if (!strcmp(initelem, "label")) { /* Add an init label. */ cptr = xp_get_value("id"); if (initLabelMap.find(cptr) != initLabelMap.end()) { ERROR("The label name '%s' is used twice.", cptr); } initLabelMap[cptr] = initmessages.size(); } else { ERROR("Invalid element in an init stanza: '%s'", initelem); } xp_close_element(); } } else { /** Message Case */ if (found_timewait) { ERROR(" can only be the last message in a scenario!\n"); } message *curmsg = new message(messages.size(), name ? name : "unknown scenario"); messages.push_back(curmsg); if(!strcmp(elem, "send")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_SEND; /* Sent messages descriptions */ if(!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'send' section of xml scenario file"); } int removed_clrf = 0; char * msg = clean_cdata(ptr, &removed_clrf); L_content_length = xp_get_content_length(msg); switch (L_content_length) { case -1 : // the msg does not contain content-length field break ; case 0 : curmsg -> content_length_flag = message::ContentLengthValueZero; // Initialize to No present break ; default : curmsg -> content_length_flag = message::ContentLengthValueNoZero; // Initialize to No present break ; } if((msg[strlen(msg) - 1] != '\n') && (removed_clrf)) { strcat(msg, "\n"); } char *tsrc = msg; while(*tsrc++); curmsg -> send_scheme = new SendingMessage(this, msg); free(msg); // If this is a request we are sending, then store our transaction/method matching information. if (!curmsg->send_scheme->isResponse()) { char *method = curmsg->send_scheme->getMethod(); bool isInvite = !strcmp(method, "INVITE"); bool isAck = !strcmp(method, "ACK"); if ((cptr = xp_get_value("start_txn"))) { if (isAck) { ERROR("An ACK message can not start a transaction!"); } curmsg->start_txn = get_txn(cptr, "start transaction", true, isInvite, false); } else if ((cptr = xp_get_value("ack_txn"))) { if (!isAck) { ERROR("The ack_txn attribute is valid only for ACK messages!"); } curmsg->ack_txn = get_txn(cptr, "ack transaction", false, false, true); } else { int len = method_list ? strlen(method_list) : 0; method_list = (char *)realloc(method_list, len + strlen(method) + 1); if (!method_list) { ERROR_NO("Out of memory allocating method_list!"); } strcpy(method_list + len, method); } } else { if (xp_get_value("start_txn")) { ERROR("Responses can not start a transaction"); } if (xp_get_value("ack_txn")) { ERROR("Responses can not ACK a transaction"); } } if (xp_get_value("response_txn")) { ERROR("response_txn can only be used for received messages."); } curmsg -> retrans_delay = xp_get_long("retrans", "retransmission timer", 0); curmsg -> timeout = xp_get_long("timeout", "message send timeout", 0); } else if (!strcmp(elem, "recv")) { curmsg->M_type = MSG_TYPE_RECV; /* Received messages descriptions */ if((cptr = xp_get_value("response"))) { curmsg ->recv_response = get_long(cptr, "response code"); if (method_list) { curmsg->recv_response_for_cseq_method_list = strdup(method_list); } if ((cptr = xp_get_value("response_txn"))) { curmsg->response_txn = get_txn(cptr, "transaction response", false, false, false); } } if ((cptr = xp_get_value("request"))) { curmsg->recv_request = strdup(cptr); if (xp_get_value("response_txn")) { ERROR("response_txn can only be used for received responses."); } } curmsg->optional = xp_get_optional("optional", "recv"); last_recv_optional = curmsg->optional; curmsg->advance_state = xp_get_bool("advance_state", "recv", true); if (!curmsg->advance_state && curmsg->optional == OPTIONAL_FALSE) { ERROR("advance_state is allowed only for optional messages (index = %zu)\n", messages.size() - 1); } if ((cptr = xp_get_value("regexp_match"))) { if (!strcmp(cptr, "true")) { curmsg->regexp_match = 1; } } curmsg->timeout = xp_get_long("timeout", "message timeout", 0); /* record the route set */ /* TODO disallow optional and rrs to coexist? */ if ((cptr = xp_get_value("rrs"))) { curmsg->bShouldRecordRoutes = get_bool(cptr, "record route set"); } /* record the authentication credentials */ if ((cptr = xp_get_value("auth"))) { bool temp = get_bool(cptr, "message authentication"); curmsg->bShouldAuthenticate = temp; } } else if(!strcmp(elem, "pause") || !strcmp(elem, "timewait")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_PAUSE; if (!strcmp(elem, "timewait")) { curmsg->timewait = true; found_timewait = true; } int var; if ((var = xp_get_var("variable", "pause", -1)) != -1) { curmsg->pause_variable = var; } else { CSample *distribution = parse_distribution(true); bool sanity_check = xp_get_bool("sanity_check", "pause", true); double pause_duration = distribution->cdfInv(0.99); if (sanity_check && (pause_duration > INT_MAX)) { char percentile[100]; char desc[100]; distribution->timeDescr(desc, sizeof(desc)); time_string(pause_duration, percentile, sizeof(percentile)); ERROR("The distribution %s has a 99th percentile of %s, which is larger than INT_MAX. You should chose different parameters.", desc, percentile); } curmsg->pause_distribution = distribution; /* Update scenario duration with max duration */ duration += (int)pause_duration; } } else if(!strcmp(elem, "nop")) { checkOptionalRecv(elem, scenario_file_cursor); /* Does nothing at SIP level. This message type can be used to handle * actions, increment counters, or for RTDs. */ curmsg->M_type = MSG_TYPE_NOP; } else if(!strcmp(elem, "recvCmd")) { curmsg->M_type = MSG_TYPE_RECVCMD; curmsg->optional = xp_get_optional("optional", "recv"); last_recv_optional = curmsg->optional; /* 3pcc extended mode */ if ((cptr = xp_get_value("src"))) { curmsg->peer_src = strdup(cptr); } else if (extendedTwinSippMode) { ERROR("You must specify a 'src' for recvCmd when using extended 3pcc mode!"); } } else if(!strcmp(elem, "sendCmd")) { checkOptionalRecv(elem, scenario_file_cursor); curmsg->M_type = MSG_TYPE_SENDCMD; /* Sent messages descriptions */ /* 3pcc extended mode */ if ((cptr = xp_get_value("dest"))) { peer = strdup(cptr); curmsg->peer_dest = peer; peer_map::iterator peer_it; peer_it = peers.find(peer_map::key_type(peer)); if(peer_it == peers.end()) /* the peer (slave or master) has not been added in the map (first occurrence in the scenario) */ { T_peer_infos infos = {}; infos.peer_socket = 0; strncpy(infos.peer_host, get_peer_addr(peer), sizeof(infos.peer_host) - 1); peers[std::string(peer)] = infos; } } else if (extendedTwinSippMode) { ERROR("You must specify a 'dest' for sendCmd with extended 3pcc mode!"); } if (!(ptr = xp_get_cdata())) { ERROR("No CDATA in 'sendCmd' section of xml scenario file"); } char *msg = clean_cdata(ptr); curmsg -> M_sendCmdData = new SendingMessage(this, msg, true /* skip sanity */); free(msg); } else { ERROR("Unknown element '%s' in xml scenario file", elem); } getCommonAttributes(curmsg); } /** end * Message case */ xp_close_element(); } // end while free(method_list); str_int_map::iterator label_it = labelMap.find("_unexp.main"); if (label_it != labelMap.end()) { unexpected_jump = label_it->second; } else { unexpected_jump = -1; } retaddr = find_var("_unexp.retaddr"); pausedaddr = find_var("_unexp.pausedaddr"); /* Patch up the labels. */ apply_labels(messages, labelMap); apply_labels(initmessages, initLabelMap); /* Some post-scenario loading validation. */ stats->validateRtds(); /* Make sure that all variables are used more than once. */ validate_variable_usage(); /* Make sure that all started transactions have responses, and vice versa. */ validate_txn_usage(); if (messages.size() == 0) { ERROR("Did not find any messages inside of scenario!"); } } void scenario::runInit() { call *initcall; if (initmessages.size() > 0) { initcall = new call(main_scenario, NULL, NULL, "///main-init", 0, false, false, true); initcall->run(); } } void clear_int_str(int_str_map m) { for(int_str_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { free(it->second); m.erase(it); } } void clear_str_int(str_int_map m) { for(str_int_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { m.erase(it); } } void clear_int_int(int_int_map m) { for(int_int_map::iterator it = m.begin(); it != m.end(); it = m.begin()) { m.erase(it); } } scenario::~scenario() { for (msgvec::iterator i = messages.begin(); i != messages.end(); i++) { delete *i; } messages.clear(); free(name); allocVars->putTable(); delete stats; for (unsigned int i = 0; i < transactions.size(); i++) { free(transactions[i].name); } transactions.clear(); clear_str_int(labelMap); clear_str_int(initLabelMap); clear_str_int(txnMap); } CSample *parse_distribution(bool oldstyle = false) { CSample *distribution; const char *distname; const char *ptr = 0; if(!(distname = xp_get_value("distribution"))) { if (!oldstyle) { ERROR("statistically distributed actions or pauses requires 'distribution' parameter"); } if ((ptr = xp_get_value("normal"))) { distname = "normal"; } else if ((ptr = xp_get_value("exponential"))) { distname = "exponential"; } else if ((ptr = xp_get_value("lognormal"))) { distname = "lognormal"; } else if ((ptr = xp_get_value("weibull"))) { distname = "weibull"; } else if ((ptr = xp_get_value("pareto"))) { distname = "pareto"; } else if ((ptr = xp_get_value("gamma"))) { distname = "gamma"; } else if ((ptr = xp_get_value("min"))) { distname = "uniform"; } else if ((ptr = xp_get_value("max"))) { distname = "uniform"; } else if ((ptr = xp_get_value("milliseconds"))) { double val = get_double(ptr, "Pause milliseconds"); return new CFixed(val); } else { return new CDefaultPause(); } } if (!strcmp(distname, "fixed")) { double value = xp_get_double("value", "Fixed distribution"); distribution = new CFixed(value); } else if (!strcmp(distname, "uniform")) { double min = xp_get_double("min", "Uniform distribution"); double max = xp_get_double("max", "Uniform distribution"); distribution = new CUniform(min, max); #ifdef HAVE_GSL } else if (!strcmp(distname, "normal")) { double mean = xp_get_double("mean", "Normal distribution"); double stdev = xp_get_double("stdev", "Normal distribution"); distribution = new CNormal(mean, stdev); } else if (!strcmp(distname, "lognormal")) { double mean = xp_get_double("mean", "Lognormal distribution"); double stdev = xp_get_double("stdev", "Lognormal distribution"); distribution = new CLogNormal(mean, stdev); } else if (!strcmp(distname, "exponential")) { double mean = xp_get_double("mean", "Exponential distribution"); distribution = new CExponential(mean); } else if (!strcmp(distname, "weibull")) { double lambda = xp_get_double("lambda", "Weibull distribution"); double k = xp_get_double("k", "Weibull distribution"); distribution = new CWeibull(lambda, k); } else if (!strcmp(distname, "pareto")) { double k = xp_get_double("k", "Pareto distribution"); double xsubm = xp_get_double("x_m", "Pareto distribution"); distribution = new CPareto(k, xsubm); } else if (!strcmp(distname, "gpareto")) { double shape = xp_get_double("shape", "Generalized Pareto distribution"); double scale = xp_get_double("scale", "Generalized Pareto distribution"); double location = xp_get_double("location", "Generalized Pareto distribution"); distribution = new CGPareto(shape, scale, location); } else if (!strcmp(distname, "gamma")) { double k = xp_get_double("k", "Gamma distribution"); double theta = xp_get_double("theta", "Gamma distribution"); distribution = new CGamma(k, theta); } else if (!strcmp(distname, "negbin")) { double n = xp_get_double("n", "Negative Binomial distribution"); double p = xp_get_double("p", "Negative Binomial distribution"); distribution = new CNegBin(n, p); #else } else if (!strcmp(distname, "normal") || !strcmp(distname, "lognormal") || !strcmp(distname, "exponential") || !strcmp(distname, "pareto") || !strcmp(distname, "gamma") || !strcmp(distname, "negbin") || !strcmp(distname, "weibull")) { ERROR("The distribution '%s' is only available with GSL.", distname); #endif } else { ERROR("Unknown distribution: %s\n", ptr); } return distribution; } /* 3pcc extended mode: get the correspondances between slave and master names and their addresses */ void parse_slave_cfg() { FILE * f; char line[MAX_PEER_SIZE]; char * temp_peer; char * temp_host; char * peer_host; f = fopen(slave_cfg_file, "r"); if(f) { while (fgets(line, MAX_PEER_SIZE, f) != NULL) { temp_peer = strtok(line, ";"); if (!temp_peer) continue; temp_host = strtok(NULL, ";"); if (!temp_host) continue; peer_host = strdup(temp_host); if (!peer_host) ERROR("Cannot allocate memory!\n"); peer_addrs[std::string(temp_peer)] = peer_host; } } else { ERROR("Can not open slave_cfg file %s\n", slave_cfg_file); } fclose(f); } // Determine in which mode the sipp tool has been // launched (client, server, 3pcc client, 3pcc server, 3pcc extended master or slave) void scenario::computeSippMode() { bool isRecvCmdFound = false; bool isSendCmdFound = false; creationMode = -1; sendMode = -1; thirdPartyMode = MODE_3PCC_NONE; assert(messages.size() > 0); for(unsigned int i=0; iM_type) { case MSG_TYPE_PAUSE: case MSG_TYPE_NOP: /* Allow pauses or nops to go first. */ continue; case MSG_TYPE_SEND: if (sendMode == -1) { sendMode = MODE_CLIENT; } if (creationMode == -1) { creationMode = MODE_CLIENT; } break; case MSG_TYPE_RECV: if (sendMode == -1) { sendMode = MODE_SERVER; } if (creationMode == -1) { creationMode = MODE_SERVER; } break; case MSG_TYPE_SENDCMD: isSendCmdFound = true; if (creationMode == -1) { creationMode = MODE_CLIENT; } if(!isRecvCmdFound) { if (creationMode == MODE_SERVER) { /* * If it is a server already, then start it in * 3PCC A passive mode */ if(twinSippMode) { thirdPartyMode = MODE_3PCC_A_PASSIVE; } else if (extendedTwinSippMode) { thirdPartyMode = MODE_MASTER_PASSIVE; } } else { if(twinSippMode) { thirdPartyMode = MODE_3PCC_CONTROLLER_A; } else if (extendedTwinSippMode) { thirdPartyMode = MODE_MASTER; } } if((thirdPartyMode == MODE_MASTER_PASSIVE || thirdPartyMode == MODE_MASTER) && !master_name) { ERROR("Inconsistency between command line and scenario: master scenario but -master option not set\n"); } if(!twinSippMode && !extendedTwinSippMode) ERROR("sendCmd message found in scenario but no twin sipp" " address has been passed! Use -3pcc option or 3pcc extended mode.\n"); } break; case MSG_TYPE_RECVCMD: if (creationMode == -1) { creationMode = MODE_SERVER; } isRecvCmdFound = true; if(!isSendCmdFound) { if(twinSippMode) { thirdPartyMode = MODE_3PCC_CONTROLLER_B; } else if(extendedTwinSippMode) { thirdPartyMode = MODE_SLAVE; if(!slave_number) { ERROR("Inconsistency between command line and scenario: slave scenario but -slave option not set\n"); } else { thirdPartyMode = MODE_SLAVE; } } if(!twinSippMode && !extendedTwinSippMode) ERROR("recvCmd message found in scenario but no " "twin sipp address has been passed! Use " "-3pcc option\n"); } break; default: break; } } if(creationMode == -1) ERROR("Unable to determine creation mode of the tool (server, client)\n"); if(sendMode == -1) ERROR("Unable to determine send mode of the tool (server, client)\n"); } void scenario::handle_rhs(CAction *tmpAction, const char *what) { if (xp_get_value("value")) { tmpAction->setDoubleValue(xp_get_double("value", what)); if (xp_get_value("variable")) { ERROR("Value and variable are mutually exclusive for %s action!", what); } } else if (xp_get_value("variable")) { tmpAction->setVarInId(xp_get_var("variable", what)); if (xp_get_value("value")) { ERROR("Value and variable are mutually exclusive for %s action!", what); } } else { ERROR("No value or variable defined for %s action!", what); } } void scenario::handle_arithmetic(CAction *tmpAction, const char *what) { tmpAction->setVarId(xp_get_var("assign_to", what)); handle_rhs(tmpAction, what); } void scenario::parseAction(CActions *actions) { char * actionElem; unsigned int recvScenarioLen = 0; char * currentRegExp = NULL; char ** currentTabVarName = NULL; int currentNbVarNames; int sub_currentNbVarId; char* ptr; const char* cptr; while((actionElem = xp_open_element(recvScenarioLen))) { CAction *tmpAction = new CAction(this); if(!strcmp(actionElem, "ereg")) { ptr = xp_get_string("regexp", "ereg"); // keeping regexp expression in memory if(currentRegExp != NULL) delete[] currentRegExp; currentRegExp = new char[strlen(ptr)+1]; xp_unescape(ptr, currentRegExp); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_REGEXP); // warning - although these are detected for both msg and hdr // they are only implemented for search_in="hdr" tmpAction->setCaseIndep(xp_get_bool("case_indep", "ereg", false)); tmpAction->setHeadersOnly(xp_get_bool("start_line", "ereg", false)); free(ptr); if ((cptr = xp_get_value("search_in"))) { tmpAction->setOccurrence(1); if (strcmp(cptr, "msg") == 0) { tmpAction->setLookingPlace(CAction::E_LP_MSG); tmpAction->setLookingChar (NULL); } else if (strcmp(cptr, "body") == 0) { tmpAction->setLookingPlace(CAction::E_LP_BODY); tmpAction->setLookingChar (NULL); } else if (strcmp(cptr, "var") == 0) { tmpAction->setVarInId(xp_get_var("variable", "ereg")); tmpAction->setLookingPlace(CAction::E_LP_VAR); } else if (strcmp(cptr, "hdr") == 0) { cptr = xp_get_value("header"); if (!cptr || !strlen(cptr)) { ERROR("search_in=\"hdr\" requires header field"); } tmpAction->setLookingPlace(CAction::E_LP_HDR); tmpAction->setLookingChar(cptr); if ((cptr = xp_get_value("occurrence"))) { tmpAction->setOccurrence(atol(cptr)); } else if ((cptr = xp_get_value("occurence"))) { /* old misspelling */ tmpAction->setOccurrence(atol(cptr)); } } else { ERROR("Unknown search_in value %s", cptr); } } else { tmpAction->setLookingPlace(CAction::E_LP_MSG); tmpAction->setLookingChar(NULL); } // end if-else search_in if (xp_get_value("check_it")) { tmpAction->setCheckIt(xp_get_bool("check_it", "ereg", false)); if (xp_get_value("check_it_inverse")) { ERROR("Can not have both check_it and check_it_inverse for ereg!"); } } else { tmpAction->setCheckItInverse(xp_get_bool("check_it_inverse", "ereg", false)); } if (!(ptr = xp_get_value("assign_to"))) { ERROR("assign_to value is missing"); } createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); int varId = get_var(currentTabVarName[0], "assign_to"); tmpAction->setVarId(varId); tmpAction->setRegExp(currentRegExp); if (currentNbVarNames > 1 ) { sub_currentNbVarId = currentNbVarNames - 1 ; tmpAction->setNbSubVarId(sub_currentNbVarId); for(int i=1; i<= sub_currentNbVarId; i++) { int varId = get_var(currentTabVarName[i], "sub expression assign_to"); tmpAction->setSubVarId(varId); } } freeStringTable(currentTabVarName, currentNbVarNames); if(currentRegExp != NULL) { delete[] currentRegExp; } currentRegExp = NULL; } /* end !strcmp(actionElem, "ereg") */ else if(!strcmp(actionElem, "log")) { ptr = xp_get_string("message", "log"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_TO_FILE); } else if(!strcmp(actionElem, "warning")) { ptr = xp_get_string("message", "warning"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_WARNING); } else if(!strcmp(actionElem, "error")) { ptr = xp_get_string("message", "error"); tmpAction->setMessage(ptr); free(ptr); tmpAction->setActionType(CAction::E_AT_LOG_ERROR); } else if(!strcmp(actionElem, "assign")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_VALUE); handle_arithmetic(tmpAction, "assign"); } else if(!strcmp(actionElem, "assignstr")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_STRING); tmpAction->setVarId(xp_get_var("assign_to", "assignstr")); ptr = xp_get_string("value", "assignstr"); tmpAction->setMessage(ptr); free(ptr); } else if(!strcmp(actionElem, "gettimeofday")) { tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_GETTIMEOFDAY); if (!(ptr = xp_get_value("assign_to"))) { ERROR("assign_to value is missing"); } createStringTable(ptr, ¤tTabVarName, ¤tNbVarNames); if (currentNbVarNames != 2 ) { ERROR("The gettimeofday action requires two output variables!"); } tmpAction->setNbSubVarId(1); int varId = get_var(currentTabVarName[0], "gettimeofday seconds assign_to"); tmpAction->setVarId(varId); varId = get_var(currentTabVarName[1], "gettimeofday useconds assign_to"); tmpAction->setSubVarId(varId); freeStringTable(currentTabVarName, currentNbVarNames); } else if(!strcmp(actionElem, "index")) { tmpAction->setVarId(xp_get_var("assign_to", "index")); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_INDEX); } else if(!strcmp(actionElem, "jump")) { tmpAction->setActionType(CAction::E_AT_JUMP); handle_rhs(tmpAction, "jump"); } else if(!strcmp(actionElem, "pauserestore")) { tmpAction->setActionType(CAction::E_AT_PAUSE_RESTORE); handle_rhs(tmpAction, "pauserestore"); } else if(!strcmp(actionElem, "add")) { tmpAction->setActionType(CAction::E_AT_VAR_ADD); handle_arithmetic(tmpAction, "add"); } else if(!strcmp(actionElem, "subtract")) { tmpAction->setActionType(CAction::E_AT_VAR_SUBTRACT); handle_arithmetic(tmpAction, "subtract"); } else if(!strcmp(actionElem, "multiply")) { tmpAction->setActionType(CAction::E_AT_VAR_MULTIPLY); handle_arithmetic(tmpAction, "multiply"); } else if(!strcmp(actionElem, "divide")) { tmpAction->setActionType(CAction::E_AT_VAR_DIVIDE); handle_arithmetic(tmpAction, "divide"); if (tmpAction->getVarInId() == 0) { if (tmpAction->getDoubleValue() == 0.0) { ERROR("divide actions can not have a value of zero!"); } } } else if(!strcmp(actionElem, "sample")) { tmpAction->setVarId(xp_get_var("assign_to", "sample")); tmpAction->setActionType(CAction::E_AT_ASSIGN_FROM_SAMPLE); tmpAction->setDistribution(parse_distribution()); } else if(!strcmp(actionElem, "todouble")) { tmpAction->setActionType(CAction::E_AT_VAR_TO_DOUBLE); tmpAction->setVarId(xp_get_var("assign_to", "todouble")); tmpAction->setVarInId(xp_get_var("variable", "todouble")); } else if(!strcmp(actionElem, "test")) { tmpAction->setVarId(xp_get_var("assign_to", "test")); tmpAction->setVarInId(xp_get_var("variable", "test")); if (xp_get_value("value")) { tmpAction->setDoubleValue(xp_get_double("value", "test")); if (xp_get_value("variable2")) { ERROR("Can not have both a value and a variable2 for test!"); } } else { tmpAction->setVarIn2Id(xp_get_var("variable2", "test")); } tmpAction->setActionType(CAction::E_AT_VAR_TEST); ptr = xp_get_string("compare", "test"); if (!strcmp(ptr, "equal")) { tmpAction->setComparator(CAction::E_C_EQ); } else if (!strcmp(ptr, "not_equal")) { tmpAction->setComparator(CAction::E_C_NE); } else if (!strcmp(ptr, "greater_than")) { tmpAction->setComparator(CAction::E_C_GT); } else if (!strcmp(ptr, "less_than")) { tmpAction->setComparator(CAction::E_C_LT); } else if (!strcmp(ptr, "greater_than_equal")) { tmpAction->setComparator(CAction::E_C_GEQ); } else if (!strcmp(ptr, "less_than_equal")) { tmpAction->setComparator(CAction::E_C_LEQ); } else { ERROR("Invalid 'compare' parameter: %s", ptr); } free(ptr); } else if(!strcmp(actionElem, "verifyauth")) { tmpAction->setVarId(xp_get_var("assign_to", "verifyauth")); char* username_ptr = xp_get_string("username", "verifyauth"); char* password_ptr = xp_get_string("password", "verifyauth"); tmpAction->setMessage(username_ptr, 0); tmpAction->setMessage(password_ptr, 1); tmpAction->setActionType(CAction::E_AT_VERIFY_AUTH); free(username_ptr); free(password_ptr); username_ptr = password_ptr = NULL; } else if(!strcmp(actionElem, "lookup")) { tmpAction->setVarId(xp_get_var("assign_to", "lookup")); tmpAction->setMessage(xp_get_string("file", "lookup"), 0); tmpAction->setMessage(xp_get_string("key", "lookup"), 1); tmpAction->setActionType(CAction::E_AT_LOOKUP); } else if(!strcmp(actionElem, "insert")) { tmpAction->setMessage(xp_get_string("file", "insert"), 0); tmpAction->setMessage(xp_get_string("value", "insert"), 1); tmpAction->setActionType(CAction::E_AT_INSERT); } else if(!strcmp(actionElem, "replace")) { tmpAction->setMessage(xp_get_string("file", "replace"), 0); tmpAction->setMessage(xp_get_string("line", "replace"), 1); tmpAction->setMessage(xp_get_string("value", "replace"), 2); tmpAction->setActionType(CAction::E_AT_REPLACE); } else if(!strcmp(actionElem, "setdest")) { tmpAction->setMessage(xp_get_string("host", actionElem), 0); tmpAction->setMessage(xp_get_string("port", actionElem), 1); tmpAction->setMessage(xp_get_string("protocol", actionElem), 2); tmpAction->setActionType(CAction::E_AT_SET_DEST); } else if(!strcmp(actionElem, "closecon")) { tmpAction->setActionType(CAction::E_AT_CLOSE_CON); } else if(!strcmp(actionElem, "strcmp")) { tmpAction->setVarId(xp_get_var("assign_to", "strcmp")); tmpAction->setVarInId(xp_get_var("variable", "strcmp")); if (xp_get_value("value")) { tmpAction->setStringValue(xp_get_string("value", "strcmp")); if (xp_get_value("variable2")) { ERROR("Can not have both a value and a variable2 for strcmp!"); } } else { tmpAction->setVarIn2Id(xp_get_var("variable2", "strcmp")); } tmpAction->setActionType(CAction::E_AT_VAR_STRCMP); } else if(!strcmp(actionElem, "trim")) { tmpAction->setVarId(xp_get_var("assign_to", "trim")); tmpAction->setActionType(CAction::E_AT_VAR_TRIM); } else if(!strcmp(actionElem, "exec")) { if ((ptr = xp_get_value("command"))) { tmpAction->setActionType(CAction::E_AT_EXECUTE_CMD); tmpAction->setMessage(ptr); } else if((cptr = xp_get_value("int_cmd"))) { CAction::T_IntCmdType type(CAction::E_INTCMD_STOPCALL); /* assume the default */ if (strcmp(cptr, "stop_now") == 0) { type = CAction::E_INTCMD_STOP_NOW; } else if (strcmp(cptr, "stop_gracefully") == 0) { type = CAction::E_INTCMD_STOP_ALL; } else if (strcmp(cptr, "stop_call") == 0) { type = CAction::E_INTCMD_STOPCALL; } /* the action is well formed, adding it in the */ /* tmpActionTable */ tmpAction->setActionType(CAction::E_AT_EXEC_INTCMD); tmpAction->setIntCmd(type); #ifdef PCAPPLAY } else if ((cptr = xp_get_keyword_value("play_pcap_audio"))) { tmpAction->setPcapArgs(cptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_AUDIO); hasMedia = 1; } else if ((cptr = xp_get_keyword_value("play_pcap_image"))) { tmpAction->setPcapArgs(cptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_IMAGE); hasMedia = 1; } else if ((cptr = xp_get_keyword_value("play_pcap_video"))) { tmpAction->setPcapArgs(cptr); tmpAction->setActionType(CAction::E_AT_PLAY_PCAP_VIDEO); hasMedia = 1; #else } else if (xp_get_value("play_pcap_audio")) { ERROR("Scenario specifies a play_pcap_audio action, but this version of SIPp does not have PCAP support"); } else if (xp_get_value("play_pcap_image")) { ERROR("Scenario specifies a play_pcap_image action, but this version of SIPp does not have PCAP support"); } else if (xp_get_value("play_pcap_video")) { ERROR("Scenario specifies a play_pcap_video action, but this version of SIPp does not have PCAP support"); #endif } else if ((cptr = xp_get_value("rtp_stream"))) { #ifdef RTP_STREAM hasMedia = 1; if (strcmp(cptr, "pause") == 0) { tmpAction->setActionType(CAction::E_AT_RTP_STREAM_PAUSE); } else if (strcmp(cptr, "resume") == 0) { tmpAction->setActionType(CAction::E_AT_RTP_STREAM_RESUME); } else { tmpAction->setRTPStreamActInfo(cptr); tmpAction->setActionType(CAction::E_AT_RTP_STREAM_PLAY); } #else ERROR("Scenario specifies a rtp_stream action, but this version of SIPp does not have RTP stream support"); #endif } else { ERROR("illegal in the scenario\n"); } } else { ERROR("Unknown action: %s", actionElem); } /* If the action was not well-formed, there should have already been an * ERROR declaration, thus it is safe to add it here at the end of the loop. */ actions->setAction(tmpAction); xp_close_element(); recvScenarioLen++; } // end while } // Action list for the message indexed by message_index in // the scenario void scenario::getActionForThisMessage(message *message) { char * actionElem; if(!(actionElem = xp_open_element(0))) { return; } if(strcmp(actionElem, "action")) { return; } /* We actually have an action element. */ if(message->M_actions != NULL) { ERROR("Duplicate action for %s index %d", message->desc, message->index); } message->M_actions = new CActions(); parseAction(message->M_actions); xp_close_element(); } void scenario::getBookKeeping(message *message) { const char *ptr; if ((ptr = xp_get_value("rtd"))) { message->stop_rtd = get_rtd(ptr, false); } if ((ptr = xp_get_value("repeat_rtd"))) { if (message->stop_rtd) { message->repeat_rtd = get_bool(ptr, "repeat_rtd"); } else { ERROR("There is a repeat_rtd element without an rtd element"); } } if ((ptr = xp_get_value("start_rtd"))) { message->start_rtd = get_rtd(ptr, true); } if ((ptr = xp_get_value("counter"))) { message->counter = get_counter(ptr, "counter"); } } void scenario::getCommonAttributes(message *message) { char *ptr; getBookKeeping(message); getActionForThisMessage(message); if((ptr = xp_get_value((char *)"lost"))) { message -> lost = get_double(ptr, "lost percentage"); lose_packets = 1; } if((ptr = xp_get_value((char *)"crlf"))) { message -> crlf = 1; } if (xp_get_value("hiderest")) { hidedefault = xp_get_bool("hiderest", "hiderest"); } message -> hide = xp_get_bool("hide", "hide", hidedefault); if((ptr = xp_get_value((char *)"display"))) { message -> display_str = strdup(ptr); } message -> condexec = xp_get_var("condexec", "condexec variable", -1); message -> condexec_inverse = xp_get_bool("condexec_inverse", "condexec_inverse", false); if ((ptr = xp_get_value("next"))) { if (found_timewait) { ERROR("next labels are not allowed in elements."); } message->nextLabel = strdup(ptr); message->test = xp_get_var("test", "test variable", -1); if ( 0 != ( ptr = xp_get_value((char *)"chance") ) ) { float chance = get_double(ptr,"chance"); /* probability of branch to next */ if (( chance < 0.0 ) || (chance > 1.0 )) { ERROR("Chance %s not in range [0..1]", ptr); } message -> chance = (int)((1.0-chance)*RAND_MAX); } else { message -> chance = 0; /* always */ } } if ((ptr = xp_get_value((char *)"ontimeout"))) { if (found_timewait) { ERROR("ontimeout labels are not allowed in elements."); } message -> onTimeoutLabel = strdup(ptr); } } // char* manipulation : create a int[] from a char* // test first is the char* is formed by int separeted by coma // and then create the table int isWellFormed(char * P_listeStr, int * nombre) { char * ptr = P_listeStr; int sizeOf; bool isANumber; (*nombre) = 0; sizeOf = strlen(P_listeStr); // getting the number if(sizeOf > 0) { // is the string well formed ? [0-9] [,] isANumber = false; for(int i=0; i<=sizeOf; i++) { switch(ptr[i]) { case ',': if(isANumber == false) { return(0); } else { (*nombre)++; } isANumber = false; break; case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': isANumber = true; break; case '\t': case ' ' : break; case '\0': if(isANumber == false) { return(0); } else { (*nombre)++; } break; default: return(0); } } // end for } return(1); } int createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList) { int nb=0; char * ptr = P_listeStr; char * ptr_prev = P_listeStr; unsigned int current_int; if(P_listeStr) { if(isWellFormed(P_listeStr, sizeOfList) == 1) { (*listeInteger) = new unsigned int[(*sizeOfList)]; while((*ptr) != ('\0')) { if((*ptr) == ',') { sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; ptr_prev = ptr+1; } ptr++; } // Read the last sscanf(ptr_prev, "%u", ¤t_int); if (nb<(*sizeOfList)) (*listeInteger)[nb] = current_int; nb++; return(1); } return(0); } else return(0); } int createStringTable(char * inputString, char *** stringList, int *sizeOfList) { if(!inputString) { return 0; } *stringList = NULL; *sizeOfList = 0; do { char *p = strchr(inputString, ','); if (p) { *p++ = '\0'; } *stringList = (char **)realloc(*stringList, sizeof(char *) * (*sizeOfList + 1)); (*stringList)[*sizeOfList] = strdup(inputString); (*sizeOfList)++; inputString = p; } while (inputString); return 1; } void freeStringTable(char ** stringList, int sizeOfList) { for (int i = 0; i < sizeOfList; i++) { free(stringList[i]); } free(stringList); } /* These are the names of the scenarios, they must match the default_scenario table. */ const char *scenario_table[] = { "uac", "uas", "regexp", "3pcc-C-A", "3pcc-C-B", "3pcc-A", "3pcc-B", "branchc", "branchs", "uac_pcap", "ooc_default", "ooc_dummy", }; int find_scenario(const char *scenario) { int i, max; max = sizeof(scenario_table)/sizeof(scenario_table[0]); for (i = 0; i < max; i++) { if (!strcmp(scenario_table[i], scenario)) { return i; } } ERROR("Invalid default scenario name '%s'.\n", scenario); return -1; } // TIP: to integrate an existing XML scenario, use the following sed line: // cat ../3pcc-controller-B.xml | sed -e 's/\"/\\\"/g' -e 's/\(.*\)/\"\1\\n\"/' const char * default_scenario [] = { /************* Default_scenario[0] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag00[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n" , /************* Default_scenario[1] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[2] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " retrievedIp: [$1]\n" " retrievedContact:[$6]\n" " retrievedSdpOrigin:[$3]\n" " retrievedSdpOrigin-username:[$4]\n" " retrievedSdpOrigin-session-id:[$5]\n" " retrievedSdpOrigin-version:[$8]\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag02[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[3] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " [$2]\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag03[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" "\n" "\n", /************* Default_scenario[4] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " [$1]\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag04[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" "\n" "\n" "\n", /************* Default_scenario[5] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" "\n", /************* Default_scenario[6] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[media_ip_type] [media_ip]\n" " t=0 0\n" " m=audio [media_port] RTP/AVP 0\n" " a=rtpmap:0 PCMU/8000\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n", /************* Default_scenario[7] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " ;tag=[pid]SIPpTag07[call_number]\n" " To: ua1 \n" " Call-ID: [call_id]\n" " CSeq: 1 REGISTER\n" " Contact: sip:ua1@[local_ip]:[local_port]\n" " Content-Length: 0\n" " Expires: 300\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" "\n", /************* Default_scenario[8] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" " Expires: 300\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" "\n", /* Although this scenario will not work without pcap play enabled, there is no * harm in including it in the binary anyway, because the user could have * dumped it and passed it with -sf. */ /************* Default_scenario[9] ***************/ "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] \n" " Call-ID: [call_id]\n" " CSeq: 1 INVITE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Type: application/sdp\n" " Content-Length: [len]\n" "\n" " v=0\n" " o=user1 53655765 2353687637 IN IP[local_ip_type] [local_ip]\n" " s=-\n" " c=IN IP[local_ip_type] [local_ip]\n" " t=0 0\n" " m=audio [auto_media_port] RTP/AVP 8 101\n" " a=rtpmap:8 PCMA/8000\n" " a=rtpmap:101 telephone-event/8000\n" " a=fmtp:101 0-11,16\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 1 ACK\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" "\n" " \n" " \n" " \n" " \n" " \n" " \n" "\n" " \n" "\n" " \n" " \n" " ;tag=[pid]SIPpTag09[call_number]\n" " To: [service] [peer_tag_param]\n" " Call-ID: [call_id]\n" " CSeq: 2 BYE\n" " Contact: sip:sipp@[local_ip]:[local_port]\n" " Max-Forwards: 70\n" " Subject: Performance Test\n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n" "\n", "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" " Content-Length: 0\n" "\n" " ]]>\n" " \n" "\n" " \n" " \n" " \n" "\n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n", "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" "\n" " \n" "\n" " \n" " \n" "\n" " \n" " \n" "\n" "\n", }; sipp-3.5.1/src/sip_parser.cpp0000644000175000017500000004020612672462535015205 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken * Walter Doekes */ #include #include #include "screen.hpp" #include "strings.hpp" #include "sip_parser.hpp" /*************************** Mini SIP parser (internals) ***************/ /* * SIP ABNF can be found here: * http://tools.ietf.org/html/rfc3261#section-25 * In 2014, there is a very helpful site that lets you browse the ABNF * easily: * http://www.in2eps.com/fo-abnf/tk-fo-abnf-sip.html */ static const char *internal_find_param(const char *ptr, const char *name); static const char *internal_find_header(const char *msg, const char *name, const char *shortname, bool content); static const char *internal_skip_lws(const char *ptr); /* Search for a character, but only inside this header. Returns NULL if * not found. */ static const char *internal_hdrchr(const char *ptr, const char needle); /* Seek to end of this header. Returns the position the next character, * which must be at the header-delimiting-CRLF or, if the message is * broken, at the ASCIIZ NUL. */ static const char *internal_hdrend(const char *ptr); /*************************** Mini SIP parser (externals) ***************/ char * get_peer_tag(const char *msg) { static char tag[MAX_HEADER_LEN]; const char * to_hdr; const char * ptr; int tag_i = 0; /* Find start of header */ to_hdr = internal_find_header(msg, "To", "t", true); if (!to_hdr) { WARNING("No valid To: header in reply"); return NULL; } /* Skip past display-name */ /* FIXME */ /* Skip past LA/RA-quoted addr-spec if any */ ptr = internal_hdrchr(to_hdr, '>'); if (!ptr) { /* Maybe an addr-spec without quotes */ ptr = to_hdr; } /* Find tag in this header */ ptr = internal_find_param(ptr, "tag"); if (!ptr) { return NULL; } while (*ptr && *ptr != ' ' && *ptr != ';' && *ptr != '\t' && *ptr != '\r' && *ptr != '\n') { tag[tag_i++] = *(ptr++); } tag[tag_i] = '\0'; return tag; } char * get_header_content(const char* message, const char * name) { return get_header(message, name, true); } /* If content is true, we only return the header's contents. */ char * get_header(const char* message, const char * name, bool content) { /* non reentrant. consider accepting char buffer as param */ static char last_header[MAX_HEADER_LEN * 10]; char *src, *src_orig, *dest, *start, *ptr; /* Are we searching for a short form header? */ bool short_form = false; bool first_time = true; char header_with_newline[MAX_HEADER_LEN + 1]; /* returns empty string in case of error */ last_header[0] = '\0'; if (!message || !*message) { return last_header; } /* for safety's sake */ if (!name || !strrchr(name, ':')) { WARNING("Can not search for header (no colon): %s", name ? name : "(null)"); return last_header; } src_orig = strdup(message); do { /* We want to start from the beginning of the message each time * through this loop, because we may be searching for a short form. */ src = src_orig; snprintf(header_with_newline, MAX_HEADER_LEN, "\n%s", name); dest = last_header; while ((src = strcasestr2(src, header_with_newline))) { if (content || !first_time) { /* Just want the header's content, so skip over the header * and newline */ src += strlen(name) + 1; } else { /* Just skip the newline */ src++; } first_time = false; ptr = strchr(src, '\n'); /* Multiline headers always begin with a tab or a space * on the subsequent lines. Skip those lines. */ while (ptr && (*(ptr+1) == ' ' || *(ptr+1) == '\t')) { ptr = strchr(ptr + 1, '\n'); } if (ptr) { *ptr = 0; } // Add "," when several headers are present if (dest != last_header) { /* Remove trailing whitespaces, tabs, and CRs */ while (dest > last_header && (*(dest-1) == ' ' || *(dest-1) == '\r' || *(dest-1) == '\n' || *(dest-1) == '\t')) { *(--dest) = 0; } dest += sprintf(dest, ","); } dest += sprintf(dest, "%s", src); if (ptr) { *ptr = '\n'; } src++; } /* We found the header. */ if (dest != last_header) { break; } /* We didn't find the header, even in its short form. */ if (short_form) { free(src_orig); return last_header; } /* We should retry with the short form. */ short_form = true; if (!strcasecmp(name, "call-id:")) { name = "i:"; } else if (!strcasecmp(name, "contact:")) { name = "m:"; } else if (!strcasecmp(name, "content-encoding:")) { name = "e:"; } else if (!strcasecmp(name, "content-length:")) { name = "l:"; } else if (!strcasecmp(name, "content-type:")) { name = "c:"; } else if (!strcasecmp(name, "from:")) { name = "f:"; } else if (!strcasecmp(name, "to:")) { name = "t:"; } else if (!strcasecmp(name, "via:")) { name = "v:"; } else { /* There is no short form to try. */ free(src_orig); return last_header; } } while (1); *(dest--) = 0; /* Remove trailing whitespaces, tabs, and CRs */ while (dest > last_header && (*dest == ' ' || *dest == '\r' || *dest == '\t')) { *(dest--) = 0; } /* Remove leading whitespaces */ for (start = last_header; *start == ' '; start++); /* remove enclosed CRs in multilines */ /* don't remove enclosed CRs for multiple headers (e.g. Via) (Rhys) */ while ((ptr = strstr(last_header, "\r\n")) != NULL && (*(ptr + 2) == ' ' || *(ptr + 2) == '\r' || *(ptr + 2) == '\t')) { /* Use strlen(ptr) to include trailing zero */ memmove(ptr, ptr+1, strlen(ptr)); } /* Remove illegal double CR characters */ while ((ptr = strstr(last_header, "\r\r")) != NULL) { memmove(ptr, ptr+1, strlen(ptr)); } /* Remove illegal double Newline characters */ while ((ptr = strstr(last_header, "\n\n")) != NULL) { memmove(ptr, ptr+1, strlen(ptr)); } free(src_orig); return start; } char * get_first_line(const char * message) { /* non reentrant. consider accepting char buffer as param */ static char last_header[MAX_HEADER_LEN * 10]; const char * src; /* returns empty string in case of error */ memset(last_header, 0, sizeof(last_header)); if (!message || !*message) { return last_header; } src = message; int i=0; while (*src) { if (*src == '\n' || *src == '\r') { break; } last_header[i] = *src; i++; src++; } return last_header; } char * get_call_id(const char *msg) { static char call_id[MAX_HEADER_LEN]; const char *content, *end_of_header; unsigned length; call_id[0] = '\0'; content = internal_find_header(msg, "Call-ID", "i", true); if (!content) { WARNING("(1) No valid Call-ID: header in reply '%s'", msg); return call_id; } /* Always returns something */ end_of_header = internal_hdrend(content); length = end_of_header - content; if (length + 1 > MAX_HEADER_LEN) { WARNING("(1) Call-ID: header too long in reply '%s'", msg); return call_id; } memcpy(call_id, content, length); call_id[length] = '\0'; return call_id; } unsigned long int get_cseq_value(char *msg) { char *ptr1; // no short form for CSeq: ptr1 = strstr(msg, "\r\nCSeq:"); if (!ptr1) { ptr1 = strstr(msg, "\r\nCSEQ:"); } if (!ptr1) { ptr1 = strstr(msg, "\r\ncseq:"); } if (!ptr1) { ptr1 = strstr(msg, "\r\nCseq:"); } if (!ptr1) { WARNING("No valid Cseq header in request %s", msg); return 0; } ptr1 += 7; while (*ptr1 == ' ' || *ptr1 == '\t') { ++ptr1; } if (!*ptr1) { WARNING("No valid Cseq data in header"); return 0; } return strtoul(ptr1, NULL, 10); } unsigned long get_reply_code(char *msg) { while (msg && *msg != ' ' && *msg != '\t') ++msg; while (msg && (*msg == ' ' || *msg == '\t')) ++msg; if (msg && strlen(msg) > 0) { return atol(msg); } return 0; } static const char *internal_find_header(const char *msg, const char *name, const char *shortname, bool content) { const char *ptr = msg; int namelen = strlen(name); int shortnamelen = shortname ? strlen(shortname) : 0; while (1) { int is_short = 0; /* RFC3261, 7.3.1: When comparing header fields, field names * are always case-insensitive. Unless otherwise stated in * the definition of a particular header field, field values, * parameter names, and parameter values are case-insensitive. * Tokens are always case-insensitive. Unless specified * otherwise, values expressed as quoted strings are case- * sensitive. * * Ergo, strcasecmp, because: * To:...;tag=bla == TO:...;TAG=BLA * But: * Warning: "something" != Warning: "SoMeThInG" */ if (strncasecmp(ptr, name, namelen) == 0 || (shortname && (is_short = 1) && strncasecmp(ptr, shortname, shortnamelen) == 0)) { const char *tmp = ptr + (is_short ? strlen(shortname) : strlen(name)); while (*tmp == ' ' || *tmp == '\t') { ++tmp; } if (*tmp == ':') { /* Found */ if (content) { /* We just want the content */ ptr = internal_skip_lws(tmp + 1); } break; } } /* Seek to next line, but not past EOH */ ptr = strchr(ptr, '\n'); if (!ptr || ptr[-1] != '\r' || (ptr[1] == '\r' && ptr[2] == '\n')) { return NULL; } ++ptr; } return ptr; } static const char *internal_hdrchr(const char *ptr, const char needle) { if (*ptr == '\n') { return NULL; /* stray LF */ } while (1) { if (*ptr == '\0') { return NULL; } else if (*ptr == needle) { return ptr; } else if (*ptr == '\n') { if (ptr[-1] == '\r' && ptr[1] != ' ' && ptr[1] != '\t') { return NULL; /* end of header */ } } ++ptr; } return NULL; /* never gets here */ } static const char *internal_hdrend(const char *ptr) { const char *p = ptr; while (*p) { if (p[0] == '\r' && p[1] == '\n' && (p[2] != ' ' && p[2] != '\t')) { return p; } ++p; } return p; } static const char *internal_find_param(const char *ptr, const char *name) { int namelen = strlen(name); while (1) { ptr = internal_hdrchr(ptr, ';'); if (!ptr) { return NULL; } ++ptr; ptr = internal_skip_lws(ptr); if (!ptr || !*ptr) { return NULL; } /* Case insensitive, see RFC 3261 7.3.1 notes above. */ if (strncasecmp(ptr, name, namelen) == 0 && *(ptr + namelen) == '=') { ptr += namelen + 1; return ptr; } } return NULL; /* never gets here */ } static const char *internal_skip_lws(const char *ptr) { while (1) { while (*ptr == ' ' || *ptr == '\t') { ++ptr; } if (ptr[0] == '\r' && ptr[1] == '\n') { if (ptr[2] == ' ' || ptr[2] == '\t') { ptr += 3; continue; } return NULL; /* end of this header */ } return ptr; } return NULL; /* never gets here */ } #ifdef GTEST #include "gtest/gtest.h" TEST(Parser, internal_find_header) { char data[] = "OPTIONS sip:server SIP/2.0\r\n" "Took: abc1\r\n" "To k: abc2\r\n" "To\t :\r\n abc3\r\n" "From: def\r\n" "\r\n"; const char *eq = strstr(data, "To\t :"); EXPECT_STREQ(eq, internal_find_header(data, "To", "t", false)); EXPECT_STREQ(eq + 8, internal_find_header(data, "To", "t", true)); } TEST(Parser, get_peer_tag__notag) { EXPECT_STREQ(NULL, get_peer_tag("...\r\nTo: \r\n;tag=notag\r\n\r\n")); } TEST(Parser, get_peer_tag__normal) { EXPECT_STREQ("normal", get_peer_tag("...\r\nTo: ;t2=x;tag=normal;t3=y\r\n\r\n")); } TEST(Parser, get_peer_tag__upper) { EXPECT_STREQ("upper", get_peer_tag("...\r\nTo: ;t2=x;TAG=upper;t3=y\r\n\r\n")); } TEST(Parser, get_peer_tag__normal_2) { EXPECT_STREQ("normal2", get_peer_tag("...\r\nTo: abc;tag=normal2\r\n\r\n")); } TEST(Parser, get_peer_tag__folded) { EXPECT_STREQ("folded", get_peer_tag("...\r\nTo: \r\n ;tag=folded\r\n\r\n")); } TEST(Parser, get_peer_tag__space) { EXPECT_STREQ("space", get_peer_tag("...\r\nTo: ;tag=space\r\n\r\n")); } TEST(Parser, get_peer_tag__space_2) { EXPECT_STREQ("space2", get_peer_tag("...\r\nTo \t:\r\n abc\r\n ;tag=space2\r\n\r\n")); } TEST(Parser, get_call_id_1) { EXPECT_STREQ("test1", get_call_id("...\r\nCall-ID: test1\r\n\r\n")); } TEST(Parser, get_call_id_2) { EXPECT_STREQ("test2", get_call_id("...\r\nCALL-ID:\r\n test2\r\n\r\n")); } TEST(Parser, get_call_id_3) { EXPECT_STREQ("test3", get_call_id("...\r\ncall-id:\r\n\t test3\r\n\r\n")); } TEST(Parser, get_call_id_short_1) { EXPECT_STREQ("testshort1", get_call_id("...\r\ni: testshort1\r\n\r\n")); } TEST(Parser, get_call_id_short_2) { /* The WS surrounding the colon belongs with HCOLON, but the * trailing WS does not. */ EXPECT_STREQ("testshort2 \t ", get_call_id("...\r\nI:\r\n \r\n \t testshort2 \t \r\n\r\n")); } /* The 3pcc-A script sends "invalid" SIP that is parsed by this * sip_parser. We must accept headers without any leading request/ * response line: * * * * */ TEST(Parser, get_call_id_github_0101) { // github-#0101 const char *input = "Call-ID: 1-18220@127.0.0.1\r\n" "Content-Type: application/sdp\r\n" "Content-Length: 129\r\n\r\n" "v=0\r\no=user1 53655765 2353687637 IN IP4 127.0.0.1\r\n" "s=-\r\nc=IN IP4 127.0.0.1\r\nt=0 0\r\n" "m=audio 6000 RTP/AVP 0\r\na=rtpmap:0 PCMU/8000"; EXPECT_STREQ("1-18220@127.0.0.1", get_call_id(input)); } #endif //GTEST sipp-3.5.1/src/infile.cpp0000644000175000017500000002562712672462535014316 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #include "sipp.hpp" #include "screen.hpp" #include "stat.hpp" #include "infile.hpp" #include #include /* Read MAX_CHAR_BUFFER_SIZE size lines from the "fileName" and populate it in * the fileContents vector. Each line should be terminated with a '\n' */ FileContents::FileContents(const char *fileName) { ifstream *inFile = new ifstream(fileName); char line[MAX_CHAR_BUFFER_SIZE]; int virtualLines = 0; if (!inFile->good()) { ERROR("Unable to open file %s", fileName); } this->fileName = fileName; realLinesInFile = lineCounter = numLinesInFile = 0; /* Initialize printf info. */ printfFile = false; printfOffset = 0; printfMultiple = 1; line[0] = '\0'; inFile->getline(line, MAX_CHAR_BUFFER_SIZE); if (NULL != strstr(line, "RANDOM")) { usage = InputFileRandomOrder; } else if (NULL != strstr(line, "SEQUENTIAL")) { usage = InputFileSequentialOrder; } else if (NULL != strstr(line, "USER")) { usage = InputFileUser; } else { ERROR("Unknown file type (valid values are RANDOM, SEQUENTIAL, and USER) for %s:%s\n", fileName, line); } char *useprintf; if ((useprintf = strstr(line, "PRINTF"))) { /* We are going to operate in printf mode, which uses the line as a format * string for printf with the line number. */ useprintf += strlen("PRINTF"); if (*useprintf != '=') { ERROR("Invalid file printf specification (requires =) for %s:%s\n", fileName, line); } useprintf++; char *endptr; virtualLines = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\r' && *endptr != '\n' && *endptr != ',') { ERROR("Invalid file printf specification for (invalid end character '%c') %s:%s\n", *endptr, fileName, line); } if (virtualLines == 0) { ERROR("A printf file must have at least one virtual line %s:%s\n", fileName, line); } printfFile = true; } if ((useprintf = strstr(line, "PRINTFOFFSET"))) { useprintf += strlen("PRINTFOFFSET"); if (*useprintf != '=') { ERROR("Invalid file PRINTFOFFSET specification (requires =) for %s:%s\n", fileName, line); } useprintf++; char *endptr; printfOffset = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\n' && *endptr != ',') { ERROR("Invalid PRINTFOFFSET specification for (invalid end character '%c') %s:%s\n", *endptr, fileName, line); } } if ((useprintf = strstr(line, "PRINTFMULTIPLE"))) { useprintf += strlen("PRINTFMULTIPLE"); if (*useprintf != '=') { ERROR("Invalid PRINTFMULTIPLE specification (requires =) for %s:%s\n", fileName, line); } useprintf++; char *endptr; printfMultiple = strtoul(useprintf, &endptr, 0); if (*endptr && *endptr != '\n' && *endptr != ',') { ERROR("Invalid PRINTFOFFSET specification for (invalid end character '%c') %s:%s\n", *endptr, fileName, line); } } while (!inFile->eof()) { line[0] = '\0'; inFile->getline(line, MAX_CHAR_BUFFER_SIZE); if (line[0]) { if ('#' != line[0]) { fileLines.push_back(line); realLinesInFile++; /* this counts number of valid data lines */ } } else { break; } } if (realLinesInFile == 0) { ERROR("Input file has zero lines: %s\n", fileName); } if (printfFile) { numLinesInFile = virtualLines; } else { numLinesInFile = realLinesInFile; } delete inFile; indexMap = NULL; indexField = -1; } int FileContents::getLine(int line, char *dest, int len) { if (printfFile) { line %= realLinesInFile; } return snprintf(dest, len, "%s", fileLines[line].c_str()); } int FileContents::getField(int lineNum, int field, char *dest, int len) { int curfield = field; int curline = lineNum; dest[0] = '\0'; if (lineNum >= numLinesInFile) { return 0; } if (printfFile) { curline %= realLinesInFile; } const string & line = fileLines[curline]; size_t pos(0), oldpos(0); do { oldpos = pos; size_t localpos = line.find(';', oldpos); if (localpos != string::npos) { pos = localpos + 1; } else { pos = localpos; break; } if (curfield == 0) { break; } curfield --; } while (oldpos != string::npos); if (curfield) { WARNING("Field %d not found in the file %s", field, fileName); return 0; } if (string::npos == oldpos) { return 0; } if (string::npos != pos) { // should not be decremented for fieldN pos -= (oldpos + 1); } string x = line.substr(oldpos, pos); if (x.length()) { if (printfFile) { const char *s = x.c_str(); int l = strlen(s); int copied = 0; for (int i = 0; i < l; i++) { if (s[i] == '%') { if (s[i + 1] == '%') { dest[copied++] = s[i]; } else { const char *format = s + i; i++; while (s[i] != 'd') { if (i == l) { ERROR("Invalid printf injection field (ran off end of line): %s", s); } if (!(isdigit(s[i]) || s[i] == '.' || s[i] == '-')) { ERROR("Invalid printf injection field (only decimal values allowed '%c'): %s", s[i], s); } i++; } assert(s[i] == 'd'); char *tmp = (char *)malloc(s + i + 2 - format); if (!tmp) { ERROR("Out of memory!\n"); } memcpy(tmp, format, s + i + 1 - format); tmp[s + i + 1 - format] = '\0'; copied += sprintf(dest + copied, tmp, printfOffset + (lineNum * printfMultiple)); free(tmp); } } else { dest[copied++] = s[i]; } } dest[copied] = '\0'; return copied; } else { return snprintf(dest, len, "%s", x.c_str()); } } else { return 0; } } int FileContents::numLines() { return numLinesInFile; } int FileContents::nextLine(int userId) { switch(usage) { case InputFileRandomOrder: return rand() % numLinesInFile; case InputFileSequentialOrder: { int ret = lineCounter; lineCounter = (lineCounter + 1) % numLinesInFile; return ret; } case InputFileUser: if (userId == 0) { return -1; } if ((userId - 1) >= numLinesInFile) { ERROR("%s has only %d lines, yet user %d was requested.", fileName, numLinesInFile, userId); } return userId - 1; default: ERROR("Internal error: unknown file usage mode!"); return -1; } } void FileContents::dump(void) { WARNING("Line choosing strategy is [%s]. m_counter [%d] numLinesInFile [%d] realLinesInFile [%d]", usage == InputFileSequentialOrder ? "SEQUENTIAL" : usage == InputFileRandomOrder ? "RANDOM" : usage == InputFileUser ? "USER" : "UNKNOWN", lineCounter, numLinesInFile, realLinesInFile); for (int i = 0; i < realLinesInFile && fileLines[i][0]; i++) { WARNING("%s:%d reads [%s]", fileName, i, fileLines[i].c_str()); } } void FileContents::index(int field) { this->indexField = field; indexMap = new str_int_map; for (int line = 0; line < numLines(); line++) { reIndex(line); } } int FileContents::lookup(char *key) { if (indexField == -1) { ERROR("Invalid Index File: %s", fileName); } if (!indexMap) { ERROR("Invalid Index File: %s", fileName); } str_int_map::iterator index_it = indexMap->find(key); if (index_it == indexMap->end()) { return -1; } return index_it->second; } void FileContents::insert(char *value) { if (printfFile) { ERROR("Can not insert or replace into a printf file: %s", fileName); } fileLines.push_back(value); realLinesInFile++; numLinesInFile++; if (indexField != -1) { reIndex(realLinesInFile - 1); } char line[1024]; getLine(realLinesInFile - 1, line, sizeof(line)); char tmp[1024]; getField(realLinesInFile - 1, 0, tmp, sizeof(tmp)); } void FileContents::replace(int line, char *value) { if (printfFile) { ERROR("Can not insert or replace into a printf file: %s", fileName); } if (line >= realLinesInFile || line < 0) { ERROR("Invalid line number (%d) for file: %s (%d lines)", line, fileName, realLinesInFile); } deIndex(line); fileLines[line] = value; reIndex(line); } void FileContents::reIndex(int line) { if (indexField == -1) { return; } assert(line >= 0); assert(line < realLinesInFile); char tmp[SIPP_MAX_MSG_SIZE]; getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE); str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp)); if (index_it != indexMap->end()) { indexMap->erase(index_it); } indexMap->insert(pair(str_int_map::key_type(tmp), line)); } void FileContents::deIndex(int line) { if (indexField == -1) { return; } assert(line >= 0); assert(line < realLinesInFile); char tmp[SIPP_MAX_MSG_SIZE]; getField(line, indexField, tmp, SIPP_MAX_MSG_SIZE); str_int_map::iterator index_it = indexMap->find(str_int_map::key_type(tmp)); if (index_it != indexMap->end()) { if (index_it->second == line) { indexMap->erase(index_it); } } } sipp-3.5.1/src/sslthreadsafe.c0000644000175000017500000000624112672462535015327 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Gundu RAO - 16 Jul 2004 * From Hewlett Packard Company. */ #define SSL_MAIN #include "sslcommon.h" /* ** Call back function for locking function */ /* extern mutex_buf; */ MUTEX_TYPE *mutex_buf = NULL; void locking_function(int mode, int n, const char *file, int line) { (void)file; /* unused, avoid warnings */ (void)line; /* unused, avoid warnings */ if (mode & CRYPTO_LOCK) MUTEX_LOCK(mutex_buf[n]); else MUTEX_UNLOCK(mutex_buf[n]); } /* ** Call back id_function */ unsigned long id_function(void) { return ((unsigned long)THREAD_ID); } int Thread_setup(void) { int i; mutex_buf = (MUTEX_TYPE *)malloc(sizeof(MUTEX_TYPE) * CRYPTO_num_locks()); if(!mutex_buf) return 0; for ( i = 0 ; i < CRYPTO_num_locks() ; i++) MUTEX_SETUP(mutex_buf[i]); CRYPTO_set_id_callback(id_function); CRYPTO_set_locking_callback(locking_function); /* ** Dynamic locking routine registration **/ #ifdef _DYNAMIC_LOCKING_MECHANISM_ CRYPTO_set_dynlock_create_callback(dyn_create_function); CRYPTO_set_dynlock_lock_callback(dyn_lock_function); CRYPTO_set_dynlock_destroy_callback(dyn_destroy_function); #endif return 1; } /* ** Thread clean up function - After closing open ssl - we need to call this once */ int Thread_cleanup(void) { int i; if (!mutex_buf) return 0; CRYPTO_set_id_callback(NULL); CRYPTO_set_locking_callback(NULL); #ifdef _DYNAMIC_LOCKING_MECHANISM_ CRYPTO_set_dynlock_create_callback(NULL); CRYPTO_set_dynlock_lock_callback(NULL); CRYPTO_set_dynlock_destroy_callback(NULL); #endif for (i=0 ; i < CRYPTO_num_locks(); i++) MUTEX_CLEANUP(mutex_buf[i]); mutex_buf = NULL ; return 1; } #ifdef _DYNAMIC_LOCKING_MECHANISM_ struct CRYPTO_dynlock_value * CRYPTO_dynlock_value(const char *file,int line) { struct CRYPTO_dynlock_value *value; value = (CRYPTO_dynlock_value *)malloc(sizeof(struct CRYPTO_dynlock_value)); if(!value) return NULL; MUTEX_SETUP(value -> mutex); return value; } void dyn_lock_function( int mode , struct CRYPTO_dynlock_value *val,\ const char *file , int line ) { if (mode &CRYPTO_LOCK) MUTEX_LOCK(val -> mutex); else MUTEX_UNLOCK(val -> mutex); } void dyn_destroy_function( struct CRYPTO_dynlock_value *val,\ const char *file , int line ) { MUTEX_CLEANUP(val -> mutex); } #endif sipp-3.5.1/src/watchdog.cpp0000644000175000017500000001161712672462535014642 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" void watchdog::dump() { WARNING("Watchdog Task: interval = %d, major_threshold = %d (%d triggers left), minor_threshold = %d (%d triggers left)", interval, major_threshold, major_maxtriggers, minor_threshold, minor_maxtriggers); } watchdog::watchdog(int interval, int reset_interval, int major_threshold, int major_maxtriggers, int minor_threshold, int minor_maxtriggers) { this->interval = interval; this->reset_interval = reset_interval; this->major_threshold = major_threshold; this->major_maxtriggers = major_maxtriggers; this->minor_threshold = minor_threshold; this->minor_maxtriggers = minor_maxtriggers; major_triggers = 0; minor_triggers = 0; last_trigger = last_fire = getmilliseconds(); } bool watchdog::run() { getmilliseconds(); unsigned expected_major_trigger_time = last_fire + this->major_threshold; unsigned expected_minor_trigger_time = last_fire + this->minor_threshold; bool major_watchdog_tripped = clock_tick > expected_major_trigger_time; bool minor_watchdog_tripped = clock_tick > expected_minor_trigger_time; // Check if either watchdog has taken longer than expected to run, // and if so, warn that we are overloaded. if (major_watchdog_tripped) { major_triggers++; CStat::globalStat(CStat::E_WATCHDOG_MAJOR); last_trigger = clock_tick; WARNING("Overload warning: the major watchdog timer %dms has been tripped (%lu), %d trips remaining.", major_threshold, clock_tick - last_fire, major_maxtriggers - major_triggers); } else if (minor_watchdog_tripped) { minor_triggers++; last_trigger = clock_tick; CStat::globalStat(CStat::E_WATCHDOG_MINOR); WARNING("Overload warning: the minor watchdog timer %dms has been tripped (%lu), %d trips remaining.", minor_threshold, clock_tick - last_fire, minor_maxtriggers - minor_triggers); } bool major_watchdog_failure = ((this->major_maxtriggers != -1) && (major_triggers > this->major_maxtriggers)); bool minor_watchdog_failure = ((this->minor_maxtriggers != -1) && (minor_triggers > this->minor_maxtriggers)); // If the watchdogs have tripped too many times, end the SIPp run. if (major_watchdog_failure) { ERROR("Overload error: the watchdog timer has tripped the major threshold of %dms too many times (%d out of %d allowed) (%d out of %d minor %dms timeouts tripped)\n", major_threshold, major_triggers, major_maxtriggers, minor_triggers, minor_maxtriggers, minor_threshold); } else if (minor_watchdog_failure) { ERROR("Overload error: the watchdog timer has tripped the minor threshold of %dms too many times (%d out of %d allowed) (%d out of %d major %dms timeouts tripped)\n", minor_threshold, minor_triggers, minor_maxtriggers, major_triggers, major_maxtriggers, major_threshold); } if ((reset_interval > 0) && (major_triggers || minor_triggers) && (clock_tick > (last_trigger + reset_interval))) { WARNING("Resetting watchdog timer trigger counts, as it has not been triggered in over %lums.", clock_tick - last_trigger); major_triggers = minor_triggers = 0; } last_fire = clock_tick; setPaused(); // Return this task to a paused state return true; } // Returns the clock_tick when this task should next run unsigned int watchdog::wake() { return last_fire + interval; } sipp-3.5.1/src/md5.c0000644000175000017500000003120012672462535013155 0ustar vsevavseva/* Copyright (C) 1999, 2000, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.c,v 1.6 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.c is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Clarified derivation from RFC 1321; now handles byte order either statically or dynamically; added missing #include in library. 2002-03-11 lpd Corrected argument list for main(), and added int return type, in test program and T value program. 2002-02-21 lpd Added missing #include in test program. 2000-07-03 lpd Patched to eliminate warnings about "constant is unsigned in ANSI C, signed in traditional"; made test program self-checking. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5). 1999-05-03 lpd Original version. */ #include "md5.h" #include #undef BYTE_ORDER /* 1 = big-endian, -1 = little-endian, 0 = unknown */ #ifdef ARCH_IS_BIG_ENDIAN # define BYTE_ORDER (ARCH_IS_BIG_ENDIAN ? 1 : -1) #else # define BYTE_ORDER 0 #endif #define T_MASK ((md5_word_t)~0) #define T1 /* 0xd76aa478 */ (T_MASK ^ 0x28955b87) #define T2 /* 0xe8c7b756 */ (T_MASK ^ 0x173848a9) #define T3 0x242070db #define T4 /* 0xc1bdceee */ (T_MASK ^ 0x3e423111) #define T5 /* 0xf57c0faf */ (T_MASK ^ 0x0a83f050) #define T6 0x4787c62a #define T7 /* 0xa8304613 */ (T_MASK ^ 0x57cfb9ec) #define T8 /* 0xfd469501 */ (T_MASK ^ 0x02b96afe) #define T9 0x698098d8 #define T10 /* 0x8b44f7af */ (T_MASK ^ 0x74bb0850) #define T11 /* 0xffff5bb1 */ (T_MASK ^ 0x0000a44e) #define T12 /* 0x895cd7be */ (T_MASK ^ 0x76a32841) #define T13 0x6b901122 #define T14 /* 0xfd987193 */ (T_MASK ^ 0x02678e6c) #define T15 /* 0xa679438e */ (T_MASK ^ 0x5986bc71) #define T16 0x49b40821 #define T17 /* 0xf61e2562 */ (T_MASK ^ 0x09e1da9d) #define T18 /* 0xc040b340 */ (T_MASK ^ 0x3fbf4cbf) #define T19 0x265e5a51 #define T20 /* 0xe9b6c7aa */ (T_MASK ^ 0x16493855) #define T21 /* 0xd62f105d */ (T_MASK ^ 0x29d0efa2) #define T22 0x02441453 #define T23 /* 0xd8a1e681 */ (T_MASK ^ 0x275e197e) #define T24 /* 0xe7d3fbc8 */ (T_MASK ^ 0x182c0437) #define T25 0x21e1cde6 #define T26 /* 0xc33707d6 */ (T_MASK ^ 0x3cc8f829) #define T27 /* 0xf4d50d87 */ (T_MASK ^ 0x0b2af278) #define T28 0x455a14ed #define T29 /* 0xa9e3e905 */ (T_MASK ^ 0x561c16fa) #define T30 /* 0xfcefa3f8 */ (T_MASK ^ 0x03105c07) #define T31 0x676f02d9 #define T32 /* 0x8d2a4c8a */ (T_MASK ^ 0x72d5b375) #define T33 /* 0xfffa3942 */ (T_MASK ^ 0x0005c6bd) #define T34 /* 0x8771f681 */ (T_MASK ^ 0x788e097e) #define T35 0x6d9d6122 #define T36 /* 0xfde5380c */ (T_MASK ^ 0x021ac7f3) #define T37 /* 0xa4beea44 */ (T_MASK ^ 0x5b4115bb) #define T38 0x4bdecfa9 #define T39 /* 0xf6bb4b60 */ (T_MASK ^ 0x0944b49f) #define T40 /* 0xbebfbc70 */ (T_MASK ^ 0x4140438f) #define T41 0x289b7ec6 #define T42 /* 0xeaa127fa */ (T_MASK ^ 0x155ed805) #define T43 /* 0xd4ef3085 */ (T_MASK ^ 0x2b10cf7a) #define T44 0x04881d05 #define T45 /* 0xd9d4d039 */ (T_MASK ^ 0x262b2fc6) #define T46 /* 0xe6db99e5 */ (T_MASK ^ 0x1924661a) #define T47 0x1fa27cf8 #define T48 /* 0xc4ac5665 */ (T_MASK ^ 0x3b53a99a) #define T49 /* 0xf4292244 */ (T_MASK ^ 0x0bd6ddbb) #define T50 0x432aff97 #define T51 /* 0xab9423a7 */ (T_MASK ^ 0x546bdc58) #define T52 /* 0xfc93a039 */ (T_MASK ^ 0x036c5fc6) #define T53 0x655b59c3 #define T54 /* 0x8f0ccc92 */ (T_MASK ^ 0x70f3336d) #define T55 /* 0xffeff47d */ (T_MASK ^ 0x00100b82) #define T56 /* 0x85845dd1 */ (T_MASK ^ 0x7a7ba22e) #define T57 0x6fa87e4f #define T58 /* 0xfe2ce6e0 */ (T_MASK ^ 0x01d3191f) #define T59 /* 0xa3014314 */ (T_MASK ^ 0x5cfebceb) #define T60 0x4e0811a1 #define T61 /* 0xf7537e82 */ (T_MASK ^ 0x08ac817d) #define T62 /* 0xbd3af235 */ (T_MASK ^ 0x42c50dca) #define T63 0x2ad7d2bb #define T64 /* 0xeb86d391 */ (T_MASK ^ 0x14792c6e) static void md5_process(md5_state_t *pms, const md5_byte_t *data /*[64]*/) { md5_word_t a = pms->abcd[0], b = pms->abcd[1], c = pms->abcd[2], d = pms->abcd[3]; md5_word_t t; #if BYTE_ORDER > 0 /* Define storage only for big-endian CPUs. */ md5_word_t X[16]; #else /* Define storage for little-endian or both types of CPUs. */ md5_word_t xbuf[16]; const md5_word_t *X; #endif { #if BYTE_ORDER == 0 /* * Determine dynamically whether this is a big-endian or * little-endian machine, since we can use a more efficient * algorithm on the latter. */ static const int w = 1; if (*((const md5_byte_t *)&w)) /* dynamic little-endian */ #endif #if BYTE_ORDER <= 0 /* little-endian */ { /* * On little-endian machines, we can process properly aligned * data without copying it. */ if (!((data - (const md5_byte_t *)0) & 3)) { /* data are properly aligned */ X = (const md5_word_t *)data; } else { /* not aligned */ memcpy(xbuf, data, 64); X = xbuf; } } #endif #if BYTE_ORDER == 0 else /* dynamic big-endian */ #endif #if BYTE_ORDER >= 0 /* big-endian */ { /* * On big-endian machines, we must arrange the bytes in the * right order. */ const md5_byte_t *xp = data; int i; # if BYTE_ORDER == 0 X = xbuf; /* (dynamic only) */ # else # define xbuf X /* (static only) */ # endif for (i = 0; i < 16; ++i, xp += 4) xbuf[i] = xp[0] + (xp[1] << 8) + (xp[2] << 16) + (xp[3] << 24); } #endif } #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* Round 1. */ /* Let [abcd k s i] denote the operation a = b + ((a + F(b,c,d) + X[k] + T[i]) <<< s). */ #define F(x, y, z) (((x) & (y)) | (~(x) & (z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + F(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 7, T1); SET(d, a, b, c, 1, 12, T2); SET(c, d, a, b, 2, 17, T3); SET(b, c, d, a, 3, 22, T4); SET(a, b, c, d, 4, 7, T5); SET(d, a, b, c, 5, 12, T6); SET(c, d, a, b, 6, 17, T7); SET(b, c, d, a, 7, 22, T8); SET(a, b, c, d, 8, 7, T9); SET(d, a, b, c, 9, 12, T10); SET(c, d, a, b, 10, 17, T11); SET(b, c, d, a, 11, 22, T12); SET(a, b, c, d, 12, 7, T13); SET(d, a, b, c, 13, 12, T14); SET(c, d, a, b, 14, 17, T15); SET(b, c, d, a, 15, 22, T16); #undef SET /* Round 2. */ /* Let [abcd k s i] denote the operation a = b + ((a + G(b,c,d) + X[k] + T[i]) <<< s). */ #define G(x, y, z) (((x) & (z)) | ((y) & ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + G(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 1, 5, T17); SET(d, a, b, c, 6, 9, T18); SET(c, d, a, b, 11, 14, T19); SET(b, c, d, a, 0, 20, T20); SET(a, b, c, d, 5, 5, T21); SET(d, a, b, c, 10, 9, T22); SET(c, d, a, b, 15, 14, T23); SET(b, c, d, a, 4, 20, T24); SET(a, b, c, d, 9, 5, T25); SET(d, a, b, c, 14, 9, T26); SET(c, d, a, b, 3, 14, T27); SET(b, c, d, a, 8, 20, T28); SET(a, b, c, d, 13, 5, T29); SET(d, a, b, c, 2, 9, T30); SET(c, d, a, b, 7, 14, T31); SET(b, c, d, a, 12, 20, T32); #undef SET /* Round 3. */ /* Let [abcd k s t] denote the operation a = b + ((a + H(b,c,d) + X[k] + T[i]) <<< s). */ #define H(x, y, z) ((x) ^ (y) ^ (z)) #define SET(a, b, c, d, k, s, Ti)\ t = a + H(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 5, 4, T33); SET(d, a, b, c, 8, 11, T34); SET(c, d, a, b, 11, 16, T35); SET(b, c, d, a, 14, 23, T36); SET(a, b, c, d, 1, 4, T37); SET(d, a, b, c, 4, 11, T38); SET(c, d, a, b, 7, 16, T39); SET(b, c, d, a, 10, 23, T40); SET(a, b, c, d, 13, 4, T41); SET(d, a, b, c, 0, 11, T42); SET(c, d, a, b, 3, 16, T43); SET(b, c, d, a, 6, 23, T44); SET(a, b, c, d, 9, 4, T45); SET(d, a, b, c, 12, 11, T46); SET(c, d, a, b, 15, 16, T47); SET(b, c, d, a, 2, 23, T48); #undef SET /* Round 4. */ /* Let [abcd k s t] denote the operation a = b + ((a + I(b,c,d) + X[k] + T[i]) <<< s). */ #define I(x, y, z) ((y) ^ ((x) | ~(z))) #define SET(a, b, c, d, k, s, Ti)\ t = a + I(b,c,d) + X[k] + Ti;\ a = ROTATE_LEFT(t, s) + b /* Do the following 16 operations. */ SET(a, b, c, d, 0, 6, T49); SET(d, a, b, c, 7, 10, T50); SET(c, d, a, b, 14, 15, T51); SET(b, c, d, a, 5, 21, T52); SET(a, b, c, d, 12, 6, T53); SET(d, a, b, c, 3, 10, T54); SET(c, d, a, b, 10, 15, T55); SET(b, c, d, a, 1, 21, T56); SET(a, b, c, d, 8, 6, T57); SET(d, a, b, c, 15, 10, T58); SET(c, d, a, b, 6, 15, T59); SET(b, c, d, a, 13, 21, T60); SET(a, b, c, d, 4, 6, T61); SET(d, a, b, c, 11, 10, T62); SET(c, d, a, b, 2, 15, T63); SET(b, c, d, a, 9, 21, T64); #undef SET /* Then perform the following additions. (That is increment each of the four registers by the value it had before this block was started.) */ pms->abcd[0] += a; pms->abcd[1] += b; pms->abcd[2] += c; pms->abcd[3] += d; } void md5_init(md5_state_t *pms) { pms->count[0] = pms->count[1] = 0; pms->abcd[0] = 0x67452301; pms->abcd[1] = /*0xefcdab89*/ T_MASK ^ 0x10325476; pms->abcd[2] = /*0x98badcfe*/ T_MASK ^ 0x67452301; pms->abcd[3] = 0x10325476; } void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes) { const md5_byte_t *p = data; int left = nbytes; int offset = (pms->count[0] >> 3) & 63; md5_word_t nbits = (md5_word_t)(nbytes << 3); if (nbytes <= 0) return; /* Update the message length. */ pms->count[1] += nbytes >> 29; pms->count[0] += nbits; if (pms->count[0] < nbits) pms->count[1]++; /* Process an initial partial block. */ if (offset) { int copy = (offset + nbytes > 64 ? 64 - offset : nbytes); memcpy(pms->buf + offset, p, copy); if (offset + copy < 64) return; p += copy; left -= copy; md5_process(pms, pms->buf); } /* Process full blocks. */ for (; left >= 64; p += 64, left -= 64) md5_process(pms, p); /* Process a final partial block. */ if (left) memcpy(pms->buf, p, left); } void md5_finish(md5_state_t *pms, md5_byte_t digest[16]) { static const md5_byte_t pad[64] = { 0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; md5_byte_t data[8]; int i; /* Save the length before padding. */ for (i = 0; i < 8; ++i) data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3)); /* Pad to 56 bytes mod 64. */ md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1); /* Append the length. */ md5_append(pms, data, 8); for (i = 0; i < 16; ++i) digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3)); } sipp-3.5.1/src/xp_parser_ut.cpp0000644000175000017500000001147312672462535015555 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Walter Doekes - 24 Sep 2014 */ /* This is a separate file because xp_parser.c is a C file, and GTEST * only works with C++ files. */ #include "xp_parser.h" #ifdef GTEST #include "gtest/gtest.h" TEST(xp_parser, set_xml_buffer_from_string__good) { int res; int i; const char *buffers[] = { ("\r\n" "\r\n" "\r\n" "\r\n" " \r\n" "\r\n"), // 1 ("" "" "" "" " " ""), // 2 ("" "" "" " " ""), // 3 ("" "" " " ""), // 4 NULL }; for (i = 0; buffers[i]; ++i) { const char *elem, *prop; res = xp_set_xml_buffer_from_string(buffers[i]); EXPECT_EQ(i + 1, res * (i + 1)); // res == 1 if (!res) continue; elem = xp_open_element(0); EXPECT_STREQ("scenario", elem); prop = xp_get_value("name"); EXPECT_STREQ("Some Scenario", prop); } } TEST(xp_parser, set_xml_buffer_from_string__bad) { int res; int i; const char *buffers[] = { // No " "" "" " " ""), // -1 // Missing ?> ("" "" " " ""), // -2 // Not even a DOCTYPE. ("" " " ""), // -3 NULL }; for (i = 0; buffers[i]; ++i) { const char *elem, *prop; res = xp_set_xml_buffer_from_string(buffers[i]); EXPECT_EQ(-1 - i, (res - 1) * (i + 1)); // res == 0 if (!res) continue; elem = xp_open_element(0); EXPECT_STREQ("scenario", elem); prop = xp_get_value("name"); EXPECT_STREQ("Some Scenario", prop); } } TEST(xp_unescape, empty) { char buffer[] = ""; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("", dst); } TEST(xp_unescape, noop) { char buffer[] = "no escape sequences"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("no escape sequences", dst); } TEST(xp_unescape, begin_and_end) { char buffer[] = "<xml>this && thatthis && that", dst); } TEST(xp_unescape, single_double_quote) { char buffer[] = """; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("\"", dst); } TEST(xp_unescape, escaped_escape) { char buffer[] = "&amp;"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("&", dst); } TEST(xp_unescape, unclosed_escape) { char buffer[] = "< & &"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("< & &", dst); } TEST(xp_unescape, late_closed_escape) { char buffer[] = "< & & >"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("< & & >", dst); } TEST(xp_unescape, unknown_escape) { char buffer[] = "<&garbage;>"; char dst[sizeof(buffer)]; xp_unescape(buffer, dst); EXPECT_STREQ("<&garbage;>", dst); } #endif //GTEST sipp-3.5.1/src/listener.cpp0000644000175000017500000000367012672462535014667 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #include #include #include #include #include #include #include "sipp.hpp" listener_map listeners; listener::listener(const char *id, bool listening) { this->id = strdup(id); this->listening = false; if (listening) { startListening(); } } void listener::startListening() { assert(!listening); listeners.insert(pair(listener_map::key_type(id),this)); listening = true; } void listener::stopListening() { assert(listening); listener_map::iterator listener_it; listener_it = listeners.find(listener_map::key_type(id)); listeners.erase(listener_it); listening = false; } char *listener::getId() { return id; } listener::~listener() { if (listening) { stopListening(); } free(id); id = NULL; } listener *get_listener(const char *id) { listener_map::iterator listener_it = listeners.find(listener_map::key_type(id)); if (listener_it == listeners.end()) { return NULL; } return listener_it->second; } sipp-3.5.1/src/screen.cpp0000644000175000017500000001260112672462535014313 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ /**** * Screen.cpp : Simple curses & logfile encapsulation */ #include "stat.hpp" #include "sipp.hpp" #include #include #include #include #include #include #include #include #include #ifdef __SUNOS #include #endif #include extern bool timeout_exit; unsigned long screen_errors; int screen_inited = 0; char screen_exename[255]; extern bool backgroundMode; /* Clock must be a pointer to struct timeval */ #define GET_TIME(clock) \ { \ struct timezone tzp; \ gettimeofday (clock, &tzp); \ } /* ERR is actually -1, but this prevents us from needing to use curses.h in * sipp.cpp. */ int screen_readkey() { int c = getch(); if (c == ERR) { return -1; } return c; } void screen_exit() { if (!screen_inited) { return; } endwin(); } void screen_show_errors() { if (!screen_errors) { return; } fprintf(stderr, "%s", screen_last_error); if (screen_errors > 1) { if (screen_logfile[0] != '\0') { fprintf(stderr, "%s: There were more errors, see '%s' file\n", screen_exename, screen_logfile); } else { fprintf(stderr, "%s: There were more errors, enable -trace_err to log them.\n", screen_exename); } } fflush(stderr); } void screen_clear() { printf("\033[2J"); } void screen_set_exename(const char* exe_name) { strncpy(screen_exename, exe_name, sizeof(screen_exename) - 1); } void screen_init() { if (backgroundMode) { return; } screen_inited = 1; initscr(); noecho(); screen_clear(); } static void _screen_error(int fatal, bool use_errno, int error, const char *fmt, va_list ap) { static unsigned long long count = 0; char *c = screen_last_error; struct timeval currentTime; CStat::globalStat(fatal ? CStat::E_FATAL_ERRORS : CStat::E_WARNING); GET_TIME (¤tTime); c+= sprintf(c, "%s: ", CStat::formatTime(¤tTime)); c+= vsprintf(c, fmt, ap); if (use_errno) { c += sprintf(c, ", errno = %d (%s)", error, strerror(error)); } c+= sprintf(c, ".\n"); screen_errors++; if (!error_lfi.fptr && print_all_responses) { rotate_errorf(); if (error_lfi.fptr) { fprintf(error_lfi.fptr, "%s: The following events occured:\n", screen_exename); fflush(error_lfi.fptr); } else { if (screen_inited) { sprintf(c, "%s: Unable to create '%s': %s.\n", screen_exename, screen_logfile, strerror(errno)); } sipp_exit(EXIT_FATAL_ERROR); } } if (error_lfi.fptr) { count += fprintf(error_lfi.fptr, "%s", screen_last_error); fflush(error_lfi.fptr); if (ringbuffer_size && count > ringbuffer_size) { rotate_errorf(); count = 0; } if (max_log_size && count > max_log_size) { print_all_responses = 0; if (error_lfi.fptr) { fflush(error_lfi.fptr); fclose(error_lfi.fptr); error_lfi.fptr = NULL; error_lfi.overwrite = false; } } } else if (fatal) { fprintf(stderr, "%s", screen_last_error); fflush(stderr); } if (fatal) { if (!screen_inited) { if (error == EADDRINUSE) { exit(EXIT_BIND_ERROR); } else { exit(EXIT_FATAL_ERROR); } } else { if (error == EADDRINUSE) { sipp_exit(EXIT_BIND_ERROR); } else { sipp_exit(EXIT_FATAL_ERROR); } } } } extern "C" { void ERROR(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(true, false, 0, fmt, ap); va_end(ap); assert(0); } void ERROR_NO(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(true, true, errno, fmt, ap); va_end(ap); assert(0); } void WARNING(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(false, false, 0, fmt, ap); va_end(ap); } void WARNING_NO(const char *fmt, ...) { va_list ap; va_start(ap, fmt); _screen_error(false, true, errno, fmt, ap); va_end(ap); } } sipp-3.5.1/src/call_generation_task.cpp0000644000175000017500000002112612672462535017206 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class CallGenerationTask *CallGenerationTask::instance = NULL; unsigned long CallGenerationTask::calls_since_last_rate_change = 0; unsigned long CallGenerationTask::last_rate_change_time = 0; void CallGenerationTask::initialize() { assert(instance == NULL); instance = new CallGenerationTask(); } CallGenerationTask::CallGenerationTask() { setRunning(); } CallGenerationTask::~CallGenerationTask() { instance = NULL; } void CallGenerationTask::dump() { WARNING("Uniform rate call generation task: %f", rate); } unsigned int CallGenerationTask::wake() { int retval; if (paused || (users >= 0)) { // When paused or when we're doing user-based rather than // rate-based calls, return a sentinel value to indicate that // this task should wait forever before rescheduling. retval = DONT_RESCHEDULE; } else { float ms_per_call = rate_period_ms/MAX(rate, 1); /* We need to compute when the next call is going to be * opened. The current time is the time when the rate last * changed, plus the number of calls since then multiplied by * the number of milliseconds between each call. * * We then add the number of milliseconds between each call to that * figure. */ retval = (unsigned long) last_rate_change_time + (calls_since_last_rate_change * ms_per_call) + ms_per_call; /* On startup, when last_rate_change_time is 0, this calculation can be 0 (if we're opening multiple calls per ms). But 0 indicates that we should wait forever, so avoid that and return 1 instead. */ if (retval == 0 /* DONT_RESCHEDULE */) { retval = 1; } } return retval; } bool CallGenerationTask::run() { int calls_to_open = 0; if (quitting) { delete this; return false; } if (paused) { setPaused(); return true; } unsigned long long current_calls = main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall); unsigned long long total_calls = main_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + main_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated); if (users >= 0) { calls_to_open = users - current_calls; } else { float calls_per_ms = rate/rate_period_ms; unsigned int ms_since_last_rate_change = clock_tick - last_rate_change_time; unsigned int expected_total_calls = ms_since_last_rate_change * calls_per_ms; calls_to_open = expected_total_calls - calls_since_last_rate_change; } if (total_calls + calls_to_open > stop_after) { calls_to_open = stop_after - total_calls; } /* We base our scheduling on the number of calls made since the last rate * change, but if we reduce the number of calls we open in order to keep * within the limit, that throws this calculation off and brings CPU% up to * 100%. To avoid this, we increment calls_since_last_rate_change here. */ calls_since_last_rate_change += calls_to_open; if (open_calls_allowed && (current_calls + calls_to_open > open_calls_allowed)) { calls_to_open = open_calls_allowed - current_calls; } if (calls_to_open <= 0) { calls_to_open = 0; } unsigned int start_clock = getmilliseconds(); while(calls_to_open--) { /* Associate a user with this call, if we are in users mode. */ int userid = 0; if (users >= 0) { userid = freeUsers.back(); freeUsers.pop_back(); } // Adding a new outgoing call main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); call* call_ptr = call::add_call(userid, local_ip_is_ipv6, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); if(!call_ptr) { ERROR("Out of memory allocating call!"); } outbound_congestion = false; if (!multisocket) { switch(transport) { case T_UDP: call_ptr->associate_socket(main_socket); main_socket->ss_count++; break; case T_TCP: case T_SCTP: case T_TLS: call_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; break; } } // We shouldn't run for more than 1ms, so as not to tie up the scheduler if (getmilliseconds() > start_clock) { break; } } if (calls_to_open <= 0) { setPaused(); } else { // We stopped before opening all the calls we needed to so as // not to tie up the scheduler - don't pause this task, so // that it gets rescheduled ASAP and can continue. } // Quit after asked number of calls is reached if(total_calls >= stop_after) { quitting = 1; return false; } return true; } void CallGenerationTask::set_paused(bool new_paused) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ return; } if (new_paused) { instance->setPaused(); } else { instance->setRunning(); if (users >= 0) { set_users(users); } else { set_rate(rate); } } paused = new_paused; } void CallGenerationTask::set_rate(double new_rate) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ } rate = new_rate; if(rate < 0) { rate = 0; } last_rate_change_time = getmilliseconds(); calls_since_last_rate_change = 0; if(!open_calls_user_setting) { // Calculate the maximum number of open calls from the rate // and the call duration, unless the user has set a fixed value. int call_duration_min = main_scenario->duration; if (duration > call_duration_min) { call_duration_min = duration; } if (call_duration_min < 1000) { call_duration_min = 1000; } open_calls_allowed = (int)((3.0 * rate * call_duration_min) / (double)rate_period_ms); if(!open_calls_allowed) { open_calls_allowed = 1; } } } void CallGenerationTask::set_users(int new_users) { if (!instance) { /* Doesn't do anything, we must be in server mode. */ return; } if (new_users < 0) { new_users = 0; } assert(users >= 0); while (users < new_users) { int userid; if (!retiredUsers.empty()) { userid = retiredUsers.back(); retiredUsers.pop_back(); } else { userid = users + 1; userVarMap[userid] = new VariableTable(userVariables); } freeUsers.push_front(userid); users++; } users = open_calls_allowed = new_users; last_rate_change_time = clock_tick; calls_since_last_rate_change = 0; assert(open_calls_user_setting); instance->setRunning(); } void CallGenerationTask::free_user(int userId) { if (main_scenario->stats->GetStat(CStat::CPT_C_CurrentCall) > open_calls_allowed) { retiredUsers.push_front(userId); } else { freeUsers.push_front(userId); /* Wake up the call creation thread. */ if (instance) { instance->setRunning(); } } } sipp-3.5.1/src/socketowner.cpp0000644000175000017500000001010412672462535015373 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation */ #include #include #include #include #include #include #include #include "sipp.hpp" socket_owner_map_map socket_to_owners; struct sipp_socket *socketowner::associate_socket(struct sipp_socket *socket) { if (socket) { this->call_socket = socket; add_owner_to_socket(socket); } return socket; } struct sipp_socket *socketowner::dissociate_socket() { struct sipp_socket *ret = this->call_socket; remove_owner_from_socket(this->call_socket); this->call_socket = NULL; return ret; } unsigned long socketowner::nextownerid = 1; socketowner::socketowner() { this->call_socket = NULL; this->ownerid = socketowner::nextownerid++; } socketowner::~socketowner() { if (this->call_socket) { sipp_close_socket(dissociate_socket()); } } void socketowner::add_owner_to_socket(struct sipp_socket *socket) { socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* No map defined for this socket. */ if (map_it == socket_to_owners.end()) { socket_to_owners.insert(socket_map_pair(socket, new owner_map)); map_it = socket_to_owners.find(socket); assert(map_it != socket_to_owners.end()); } owner_map *socket_owner_map = (owner_map *) map_it->second; socket_owner_map->insert(long_owner_pair(this->ownerid, this)); } void socketowner::remove_owner_from_socket(struct sipp_socket *socket) { socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* We must have a map for this socket. */ assert(map_it != socket_to_owners.end()); owner_map *socket_owner_map = (owner_map *) map_it->second; owner_map::iterator owner_it = socket_owner_map->find(this->ownerid); /* And our owner must exist in the map. */ assert(owner_it != socket_owner_map->end()); socket_owner_map->erase(owner_it); /* If we have no more calls, we can delete this entry. */ if (socket_owner_map->begin() == socket_owner_map->end()) { delete socket_owner_map; socket_to_owners.erase(map_it); } } /* The caller must delete this list. */ owner_list *get_owners_for_socket(struct sipp_socket *socket) { owner_list *l = new owner_list; socket_owner_map_map::iterator map_it = socket_to_owners.find(socket); /* No map defined for this socket. */ if (map_it == socket_to_owners.end()) { return l; } owner_map *socket_owner_map = (owner_map *) map_it->second; owner_map::iterator owner_it; for (owner_it = socket_owner_map->begin(); owner_it != socket_owner_map->end(); owner_it++) { l->insert(l->end(), owner_it->second); } return l; } sipp-3.5.1/src/reporttask.cpp0000644000175000017500000000553412672462535015241 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class stattask *stattask::instance = NULL; class screentask *screentask::instance = NULL; void stattask::initialize() { assert(instance == NULL); if (dumpInFile || useCountf || useErrorCodesf) { instance = new stattask(); } } void screentask::initialize() { assert(instance == NULL); if (report_freq) { instance = new screentask(); } } void stattask::dump() { WARNING("Statistics reporting task."); } void screentask::dump() { WARNING("Screen update task."); } void screentask::report(bool last) { print_statistics(last); display_scenario->stats->computeStat(CStat::E_RESET_PD_COUNTERS); last_report_time = getmilliseconds(); scheduling_loops = 0; } bool screentask::run() { if (quitting > 11) { delete this; return false; } if (getmilliseconds() - last_report_time >= report_freq) { report(false); } setPaused(); return true; } unsigned int screentask::wake() { return last_report_time + report_freq; } void stattask::report() { if(dumpInFile) { main_scenario->stats->dumpData(); } if (useCountf) { print_count_file(countf, 0); } if (useErrorCodesf) { print_error_codes_file(codesf); } main_scenario->stats->computeStat(CStat::E_RESET_PL_COUNTERS); last_dump_time = clock_tick; } bool stattask::run() { /* Statistics Logs. */ if((getmilliseconds() - last_dump_time) >= report_freq_dumpLog) { report(); } setPaused(); return true; } unsigned int stattask::wake() { return last_dump_time + report_freq_dumpLog; } sipp-3.5.1/src/auth.cpp0000644000175000017500000006255712672462535014014 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : F. Tarek Rogers - 01 Sept 2004 * Russell Roy * Wolfgang Beck * Dragos Vingarzan - 02 February 2006 vingarzan@gmail.com * - split in the auth architecture * - introduced AKAv1-MD5 * Frederique Aurouet */ #if defined( __FreeBSD__) || defined(__DARWIN) || defined(__SUNOS) #include #endif #include #include #include #include extern "C" { #include "md5.h" #include "milenage.h" } #include "screen.hpp" #include "logger.hpp" #include "auth.hpp" #define MAX_HEADER_LEN 2049 #define MD5_HASH_SIZE 16 #define HASH_HEX_SIZE 2*MD5_HASH_SIZE extern char *auth_uri; /* AKA */ #define KLEN 16 typedef u_char K[KLEN]; #define RANDLEN 16 typedef u_char RAND[RANDLEN]; #define AUTNLEN 16 typedef u_char AUTN[AUTNLEN]; #define AKLEN 6 typedef u_char AK[AKLEN]; #define AMFLEN 2 typedef u_char AMF[AMFLEN]; #define MACLEN 8 typedef u_char MAC[MACLEN]; #define CKLEN 16 typedef u_char CK[CKLEN]; #define IKLEN 16 typedef u_char IK[IKLEN]; #define SQNLEN 6 typedef u_char SQN[SQNLEN]; #define AUTSLEN 14 typedef char AUTS[AUTSLEN]; #define AUTS64LEN 29 typedef char AUTS64[AUTS64LEN]; #define RESLEN 8 typedef unsigned char RES[RESLEN+1]; #define RESHEXLEN 17 typedef char RESHEX[RESHEXLEN]; #define OPLEN 16 typedef u_char OP[OPLEN]; AMF amfstar="\0"; SQN sqn_he= {0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; /* end AKA */ int createAuthHeaderMD5(const char *user, const char *password, int password_len, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result); int createAuthHeaderAKAv1MD5(const char *user, const char *OP, const char *AMF, const char *K, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char * result); /* This function is from RFC 2617 Section 5 */ static void hashToHex(md5_byte_t* _b_raw, unsigned char* _h) { unsigned short i; unsigned char j; unsigned char *_b = (unsigned char *) _b_raw; for (i = 0; i < MD5_HASH_SIZE; i++) { j = (_b[i] >> 4) & 0xf; if (j <= 9) { _h[i * 2] = (j + '0'); } else { _h[i * 2] = (j + 'a' - 10); } j = _b[i] & 0xf; if (j <= 9) { _h[i * 2 + 1] = (j + '0'); } else { _h[i * 2 + 1] = (j + 'a' - 10); } }; _h[HASH_HEX_SIZE] = '\0'; } static char *stristr(const char* s1, const char* s2) { char *cp = (char*) s1; char *p1, *p2, *endp; char l, r; endp = (char*)s1 + (strlen(s1) - strlen(s2)) ; while (*cp && (cp <= endp)) { p1 = cp; p2 = (char*)s2; while (*p1 && *p2) { l = toupper(*p1); r = toupper(*p2); if (l != r) { break; } p1++; p2++; } if (*p2 == 0) { return cp; } cp++; } return 0; } int createAuthHeader(const char *user, const char *password, const char *method, const char *uri, const char *msgbody, const char *auth, const char *aka_OP, const char *aka_AMF, const char *aka_K, char *result) { char algo[32]="MD5"; char *start, *end; if ((start = stristr(auth, "Digest")) == NULL) { sprintf(result, "createAuthHeader: authentication must be digest"); return 0; } if ((start = stristr(auth, "algorithm=")) != NULL) { start = start + strlen("algorithm="); if (*start == '"') { start++; } end = start + strcspn(start, " ,\"\r\n"); strncpy(algo, start, end - start); algo[end - start] ='\0'; } if (strncasecmp(algo, "MD5", 3)==0) { return createAuthHeaderMD5(user, password, strlen(password), method, uri, msgbody, auth, algo, result); } else if (strncasecmp(algo, "AKAv1-MD5", 9)==0) { if (!aka_K) { sprintf(result, "createAuthHeader: AKAv1-MD5 authentication requires a key"); return 0; } return createAuthHeaderAKAv1MD5(user, aka_OP, aka_AMF, aka_K, method, uri, msgbody, auth, algo, result); } else { sprintf(result, "createAuthHeader: authentication must use MD5 or AKAv1-MD5"); return 0; } } int getAuthParameter(const char *name, const char *header, char *result, int len) { char *start, *end; start = stristr(header, name); while (start) { // Ensure that the preceding character is "," or whitespace - this // stops us finding "cnonce" when we search for "nonce". char preceding_char = start[-1]; if ((preceding_char == ',') || isspace(preceding_char)) { break; } start = stristr(start+1, name); } if (!start) { result[0] = '\0'; return 0; } start += strlen(name); if (*start++ != '=') { return getAuthParameter(name, start, result, len); } if (*start == '"') { start++; end = start; while (*end != '"' && *end) { end++; } } else { end = start + strcspn(start, " ,\"\r\n"); } if (end - start >= len) { strncpy(result, start, len - 1); result[len - 1] = '\0'; } else { strncpy(result, start, end - start); result[end - start] = '\0'; } return end - start; } static int createAuthResponseMD5(const char* user, const char* password, int password_len, const char* method, const char* uri, const char* authtype, const char* msgbody, const char* realm, const char* nonce, const char* cnonce, const char* nc, unsigned char* result) { md5_byte_t ha1[MD5_HASH_SIZE], ha2[MD5_HASH_SIZE]; md5_byte_t resp[MD5_HASH_SIZE], body[MD5_HASH_SIZE]; unsigned char body_hex[HASH_HEX_SIZE+1]; unsigned char ha1_hex[HASH_HEX_SIZE+1], ha2_hex[HASH_HEX_SIZE+1]; char tmp[MAX_HEADER_LEN]; md5_state_t Md5Ctx; // Load in A1 md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) user, strlen(user)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) realm, strlen(realm)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) password, password_len); md5_finish(&Md5Ctx, ha1); hashToHex(&ha1[0], &ha1_hex[0]); if (auth_uri) { sprintf(tmp, "sip:%s", auth_uri); } else { strncpy(tmp, uri, sizeof(tmp) - 1); } // If using Auth-Int make a hash of the body - which is NULL for REG if (stristr(authtype, "auth-int") != NULL) { md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) msgbody, strlen(msgbody)); md5_finish(&Md5Ctx, body); hashToHex(&body[0], &body_hex[0]); } // Load in A2 md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) method, strlen(method)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) tmp, strlen(tmp)); if (stristr(authtype, "auth-int") != NULL) { md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) &body_hex, HASH_HEX_SIZE); } md5_finish(&Md5Ctx, ha2); hashToHex(&ha2[0], &ha2_hex[0]); md5_init(&Md5Ctx); md5_append(&Md5Ctx, (md5_byte_t *) &ha1_hex, HASH_HEX_SIZE); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) nonce, strlen(nonce)); if (cnonce[0] != '\0') { md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) nc, strlen(nc)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) cnonce, strlen(cnonce)); md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) authtype, strlen(authtype)); } md5_append(&Md5Ctx, (md5_byte_t *) ":", 1); md5_append(&Md5Ctx, (md5_byte_t *) &ha2_hex, HASH_HEX_SIZE); md5_finish(&Md5Ctx, resp); hashToHex(&resp[0], result); return 1; } int createAuthHeaderMD5(const char *user, const char *password, int password_len, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result) { unsigned char resp_hex[HASH_HEX_SIZE+1]; char tmp[MAX_HEADER_LEN], tmp2[MAX_HEADER_LEN], realm[MAX_HEADER_LEN], sipuri[MAX_HEADER_LEN], nonce[MAX_HEADER_LEN], authtype[16], cnonce[32], nc[32], opaque[64]; static unsigned int mync = 1; int has_opaque = 0; // Extract the Auth Type - If not present, using 'none' cnonce[0] = '\0'; if (getAuthParameter("qop", auth, authtype, sizeof(authtype))) { // Sloppy auth type recognition (may be "auth,auth-int") if (stristr(authtype, "auth-int")) { strncpy(authtype, "auth-int", sizeof(authtype) - 1); } else if (stristr(authtype, "auth")) { strncpy(authtype, "auth", sizeof(authtype) - 1); } sprintf(cnonce, "%x", rand()); sprintf(nc, "%08x", mync); } // Extract the Opaque value - if present if (getAuthParameter("opaque", auth, opaque, sizeof(opaque))) { has_opaque = 1; } // Extract the Realm if (!getAuthParameter("realm", auth, realm, sizeof(realm))) { sprintf(result, "createAuthHeaderMD5: couldn't parse realm in '%s'", auth); return 0; } sprintf(result, "Digest username=\"%s\",realm=\"%s\"", user, realm); // Construct the URI if (auth_uri == NULL) { sprintf(sipuri, "sip:%s", uri); } else { sprintf(sipuri, "sip:%s", auth_uri); } if (cnonce[0] != '\0') { // No double quotes around nc and qop (RFC3261): // // dig-resp = username / realm / nonce / digest-uri / dresponse // / algorithm / cnonce / opaque / message-qop // message-qop = "qop" EQUAL ("auth" / "auth-int" / token) // nonce-count = "nc" EQUAL 8LHEX // // The digest challenge does have double quotes however: // // digest-cln = realm / domain / nonce / opaque / stale / algorithm // / qop-options / auth-param // qop-options = "qop" EQUAL LDQUOT qop-value *("," qop-value) RDQUOT snprintf(tmp, sizeof(tmp), ",cnonce=\"%s\",nc=%s,qop=%s", cnonce, nc, authtype); strcat(result, tmp); } snprintf(tmp, sizeof(tmp), ",uri=\"%s\"", sipuri); strcat(result, tmp); // Extract the Nonce if (!getAuthParameter("nonce", auth, nonce, sizeof(nonce))) { sprintf(result, "createAuthHeader: couldn't parse nonce"); return 0; } createAuthResponseMD5(user, password, strlen(password), method, sipuri, authtype, msgbody, realm, nonce, cnonce, nc, &resp_hex[0]); snprintf(tmp2, sizeof(tmp2), ",nonce=\"%s\",response=\"%s\",algorithm=%s", nonce, resp_hex, algo); strcat(result, tmp2); if (has_opaque) { snprintf(tmp2, sizeof(tmp2), ",opaque=\"%s\"", opaque); strcat(result, tmp2); } return 1; } int verifyAuthHeader(const char *user, const char *password, const char *method, const char *auth, const char *msgbody) { char algo[MAX_HEADER_LEN]; unsigned char result[HASH_HEX_SIZE + 1]; char response[HASH_HEX_SIZE + 1]; char realm[MAX_HEADER_LEN]; char nonce[MAX_HEADER_LEN]; char cnonce[MAX_HEADER_LEN]; char authtype[MAX_HEADER_LEN]; char nc[MAX_HEADER_LEN]; char uri[MAX_HEADER_LEN]; char *start; if ((start = stristr(auth, "Digest")) == NULL) { WARNING("verifyAuthHeader: authentication must be digest is %s", auth); return 0; } getAuthParameter("algorithm", auth, algo, sizeof(algo)); if (algo[0] == '\0') { strcpy(algo, "MD5"); } if (strncasecmp(algo, "MD5", 3)==0) { getAuthParameter("realm", auth, realm, sizeof(realm)); getAuthParameter("uri", auth, uri, sizeof(uri)); getAuthParameter("nonce", auth, nonce, sizeof(nonce)); getAuthParameter("cnonce", auth, cnonce, sizeof(cnonce)); getAuthParameter("nc", auth, nc, sizeof(nc)); getAuthParameter("qop", auth, authtype, sizeof(authtype)); createAuthResponseMD5(user, password, strlen(password), method, uri, authtype, msgbody, realm, nonce, cnonce, nc, result); getAuthParameter("response", auth, response, sizeof(response)); TRACE_CALLDEBUG("Processing verifyauth command - user %s, password %s, method %s, uri %s, realm %s, nonce %s, result expected %s, response from user %s\n", user, password, method, uri, realm, nonce, (char*)result, response); return !strcmp((char *)result, response); } else { WARNING("createAuthHeader: authentication must use MD5 or AKAv1-MD5, value is '%s'", algo); return 0; } } /*" ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";*/ static int base64_val(char x) { switch(x) { case '=': return -1; case 'A': return 0; case 'B': return 1; case 'C': return 2; case 'D': return 3; case 'E': return 4; case 'F': return 5; case 'G': return 6; case 'H': return 7; case 'I': return 8; case 'J': return 9; case 'K': return 10; case 'L': return 11; case 'M': return 12; case 'N': return 13; case 'O': return 14; case 'P': return 15; case 'Q': return 16; case 'R': return 17; case 'S': return 18; case 'T': return 19; case 'U': return 20; case 'V': return 21; case 'W': return 22; case 'X': return 23; case 'Y': return 24; case 'Z': return 25; case 'a': return 26; case 'b': return 27; case 'c': return 28; case 'd': return 29; case 'e': return 30; case 'f': return 31; case 'g': return 32; case 'h': return 33; case 'i': return 34; case 'j': return 35; case 'k': return 36; case 'l': return 37; case 'm': return 38; case 'n': return 39; case 'o': return 40; case 'p': return 41; case 'q': return 42; case 'r': return 43; case 's': return 44; case 't': return 45; case 'u': return 46; case 'v': return 47; case 'w': return 48; case 'x': return 49; case 'y': return 50; case 'z': return 51; case '0': return 52; case '1': return 53; case '2': return 54; case '3': return 55; case '4': return 56; case '5': return 57; case '6': return 58; case '7': return 59; case '8': return 60; case '9': return 61; case '+': return 62; case '/': return 63; } return 0; } static char* base64_decode_string(const char* buf, unsigned int len, int* newlen) { unsigned long i; int j, x1, x2, x3, x4; char *out; out = (char *)malloc( ( len * 3/4 ) + 8 ); for(i=0, j=0; i + 3 < len; i += 4) { x1=base64_val(buf[i]); x2=base64_val(buf[i+1]); x3=base64_val(buf[i+2]); x4=base64_val(buf[i+3]); out[j++]=(x1<<2) | ((x2 & 0x30)>>4); out[j++]=((x2 & 0x0F)<<4) | ((x3 & 0x3C)>>2); out[j++]=((x3 & 0x03)<<6) | (x4 & 0x3F); } if (i>4); if (x3==-1) { out[j++]=((x2 & 0x0F)<<4) | ((x3 & 0x3C)>>2); if (x4==-1) { out[j++]=((x3 & 0x03)<<6) | (x4 & 0x3F); } } } } out[j++] = 0; *newlen=j; return out; } char base64[65]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; char hexa[17]="0123456789abcdef"; int createAuthHeaderAKAv1MD5(const char *user, const char *aka_OP, const char *aka_AMF, const char *aka_K, const char *method, const char *uri, const char *msgbody, const char *auth, const char *algo, char *result) { char tmp[MAX_HEADER_LEN]; char *start, *end; int has_auts = 0, resuf = 1; char *nonce64, *nonce; int noncelen; AMF amf; OP op; RAND rnd; AUTS auts_bin; AUTS64 auts_hex; MAC mac, xmac; SQN sqn, sqnxoraka, sqn_ms; K k; RES res; CK ck; IK ik; AK ak; int i; // Extract the Nonce if ((start = stristr(auth, "nonce=")) == NULL) { sprintf(result, "createAuthHeaderAKAv1MD5: couldn't parse nonce"); return 0; } start = start + strlen("nonce="); if (*start == '"') { start++; } end = start + strcspn(start, " ,\"\r\n"); strncpy(tmp, start, end - start); tmp[end - start] ='\0'; /* Compute the AKA RES */ nonce64 = tmp; nonce = base64_decode_string(nonce64, end-start, &noncelen); if (noncelen < RANDLEN + AUTNLEN) { sprintf(result, "createAuthHeaderAKAv1MD5 : Nonce is too short %d < %d expected \n", noncelen, RANDLEN + AUTNLEN); if (nonce) free(nonce); return 0; } memcpy(rnd, nonce, RANDLEN); memcpy(sqnxoraka, nonce + RANDLEN, SQNLEN); memcpy(mac, nonce + RANDLEN + SQNLEN + AMFLEN, MACLEN); memcpy(k, aka_K, KLEN); memcpy(amf, aka_AMF, AMFLEN); memcpy(op, aka_OP, OPLEN); /* Compute the AK, response and keys CK IK */ f2345(k, rnd, res, ck, ik, ak, op); res[RESLEN] = '\0'; /* Compute sqn encoded in AUTN */ for (i=0; i < SQNLEN; i++) sqn[i] = sqnxoraka[i] ^ ak[i]; /* compute XMAC */ f1(k, rnd, sqn, (unsigned char *) aka_AMF, xmac, op); if (memcmp(mac, xmac, MACLEN) != 0) { free(nonce); sprintf(result, "createAuthHeaderAKAv1MD5 : MAC != eXpectedMAC -> Server might not know the secret (man-in-the-middle attack?) \n"); return 0; } /* Check SQN, compute AUTS if needed and authorization parameter */ /* the condition below is wrong. * Should trigger synchronization when sqn_ms>>3!=sqn_he>>3 for example. * Also, we need to store the SQN per user or put it as auth parameter. */ if (1/*sqn[5] > sqn_he[5]*/) { sqn_he[5] = sqn[5]; has_auts = 0; /* RES has to be used as password to compute response */ resuf = createAuthHeaderMD5(user, (char *) res, RESLEN, method, uri, msgbody, auth, algo, result); if (resuf == 0) { sprintf(result, "createAuthHeaderAKAv1MD5 : Unexpected return value from createAuthHeaderMD5\n"); free(nonce); return 0; } } else { sqn_ms[5] = sqn_he[5] + 1; f5star(k, rnd, ak, op); for(i=0; i>4]; auts_hex[2*i+1]=hexa[auts_bin[i]&0x0F]; } auts_hex[AUTS64LEN-1]=0; sprintf(tmp, "%s,auts=\"%s\"", result, auts_hex); strcat(result, tmp); } free(nonce); return 1; } #ifdef GTEST #include "gtest/gtest.h" TEST(DigestAuth, nonce) { char nonce[40]; getAuthParameter("nonce", " Authorization: Digest cnonce=\"c7e1249f\",nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", nonce, sizeof(nonce)); EXPECT_STREQ("a6ca2bf13de1433183f7c48781bd9304", nonce); getAuthParameter("nonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\", cnonce=\"c7e1249f\"", nonce, sizeof(nonce)); EXPECT_STREQ("a6ca2bf13de1433183f7c48781bd9304", nonce); } TEST(DigestAuth, cnonce) { char cnonce[10]; getAuthParameter("cnonce", " Authorization: Digest cnonce=\"c7e1249f\",nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", cnonce, sizeof(cnonce)); EXPECT_STREQ("c7e1249f", cnonce); getAuthParameter("cnonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\", cnonce=\"c7e1249f\"", cnonce, sizeof(cnonce)); EXPECT_STREQ("c7e1249f", cnonce); } TEST(DigestAuth, MissingParameter) { char cnonce[10]; getAuthParameter("cnonce", " Authorization: Digest nonce=\"a6ca2bf13de1433183f7c48781bd9304\"", cnonce, sizeof(cnonce)); EXPECT_EQ('\0', cnonce[0]); } TEST(DigestAuth, BasicVerification) { char* header = strdup(("Digest \r\n" " realm=\"testrealm@host.com\",\r\n" " nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\"\r\n," " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"")); char result[255]; createAuthHeader("testuser", "secret", "REGISTER", "sip:example.com", "hello world", header, NULL, NULL, NULL, result); EXPECT_STREQ("Digest username=\"testuser\",realm=\"testrealm@host.com\",uri=\"sip:sip:example.com\",nonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\",response=\"db94e01e92f2b09a52a234eeca8b90f7\",algorithm=MD5,opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"", result); EXPECT_EQ(1, verifyAuthHeader("testuser", "secret", "REGISTER", result, "hello world")); free(header); } TEST(DigestAuth, qop) { char result[1024]; char* header = strdup(("Digest \r\n" "\trealm=\"testrealm@host.com\",\r\n" "\tqop=\"auth,auth-int\",\r\n" "\tnonce=\"dcd98b7102dd2f0e8b11d0f600bfb0c093\"\r\n," "\topaque=\"5ccc069c403ebaf9f0171e9517f40e41\"")); createAuthHeader("testuser", "secret", "REGISTER", "sip:example.com", "hello world", header, NULL, NULL, NULL, result); EXPECT_EQ(1, !!strstr(result, ",qop=auth-int,")); // no double quotes around qop-value EXPECT_EQ(1, verifyAuthHeader("testuser", "secret", "REGISTER", result, "hello world")); free(header); } #endif //GTEST sipp-3.5.1/src/time.cpp0000644000175000017500000000635312672462535014001 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken */ #include #include #include #ifdef __MACH__ #include #include #endif #include "time.hpp" #include "sipp.hpp" #define MICROSECONDS_PER_SECOND 1000000LL #define MICROSECONDS_PER_MILLISECOND 1000LL #define NANOSECONDS_PER_MICROSECOND 1000LL // Returns the number of microseconds that have passed since SIPp // started. Also updates the current clock_tick. unsigned long long getmicroseconds() { struct timespec time; unsigned long long microseconds; static unsigned long long start_time = 0; #ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time clock_serv_t cclock; mach_timespec_t mts; host_get_clock_service(mach_host_self(), SYSTEM_CLOCK, &cclock); clock_get_time(cclock, &mts); mach_port_deallocate(mach_task_self(), cclock); time.tv_sec = mts.tv_sec; time.tv_nsec = mts.tv_nsec; #else #if defined(CLOCK_MONOTONIC_COARSE) clock_gettime(CLOCK_MONOTONIC_COARSE, &time); #else clock_gettime(CLOCK_MONOTONIC, &time); #endif #endif microseconds = (MICROSECONDS_PER_SECOND * time.tv_sec) + (time.tv_nsec / NANOSECONDS_PER_MICROSECOND); if (start_time == 0) { start_time = microseconds - 1; } microseconds = microseconds - start_time; // Static global from sipp.hpp clock_tick = microseconds / MICROSECONDS_PER_MILLISECOND; return microseconds; } // Returns the number of milliseconds that have passed since SIPp // started. Also updates the current clock_tick. unsigned long getmilliseconds() { return getmicroseconds() / MICROSECONDS_PER_MILLISECOND; } // Sleeps for the given number of microseconds. Avoids the potential // EINVAL when using usleep() to sleep for a second or more. void sipp_usleep(unsigned long usec) { if (usec >= 1000000) { sleep(usec / 1000000); } usec %= 1000000; usleep(usec); } sipp-3.5.1/src/actions.cpp0000644000175000017500000005432212672462535014502 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. * Guillaume Teissier from FTR&D */ #include "sipp.hpp" #include #ifdef PCAPPLAY #include "prepare_pcap.h" #endif static const char* strIntCmd(CAction::T_IntCmdType type) { switch (type) { case CAction::E_INTCMD_STOPCALL: return "stop_call"; case CAction::E_INTCMD_STOP_ALL: return "stop_gracefully"; case CAction::E_INTCMD_STOP_NOW: return "stop_now"; default: case CAction::E_INTCMD_INVALID: return "invalid"; } return "invalid"; } const char * CAction::comparatorToString(T_Comparator comp) { switch(comp) { case E_C_EQ: return "=="; case E_C_NE: return "!="; case E_C_GT: return ">"; case E_C_LT: return "<"; case E_C_GEQ: return ">="; case E_C_LEQ: return "<="; default: return "invalid"; } } bool CAction::compare(VariableTable *variableTable) { double lhs = variableTable->getVar(M_varInId)->getDouble(); double rhs = M_varIn2Id ? variableTable->getVar(M_varIn2Id)->getDouble() : M_doubleValue; switch(M_comp) { case E_C_EQ: return lhs == rhs; case E_C_NE: return lhs != rhs; case E_C_GT: return lhs > rhs; case E_C_LT: return lhs < rhs; case E_C_GEQ: return lhs >= rhs; case E_C_LEQ: return lhs <= rhs; default: ERROR("Internal error: Invalid comparison type %d", M_comp); return false; /* Shut up warning. */ } } void CAction::afficheInfo() { if (M_action == E_AT_ASSIGN_FROM_REGEXP) { if(M_lookingPlace == E_LP_MSG) { printf("Type[%d] - regexp[%s] where[%s] - checkIt[%d] - checkItInverse[%d] - $%s", M_action, M_regularExpression, "Full Msg", M_checkIt, M_checkItInverse, display_scenario->allocVars->getName(M_varId)); } else { printf("Type[%d] - regexp[%s] where[%s-%s] - checkIt[%d] - checkItInverse[%d] - $%s", M_action, M_regularExpression, "Header", M_lookingChar, M_checkIt, M_checkItInverse, display_scenario->allocVars->getName(M_varId)); } } else if (M_action == E_AT_EXECUTE_CMD) { printf("Type[%d] - command[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_EXEC_INTCMD) { printf("Type[%d] - intcmd[%-32.32s]", M_action, strIntCmd(M_IntCmd)); } else if (M_action == E_AT_LOG_TO_FILE) { printf("Type[%d] - message[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_LOG_WARNING) { printf("Type[%d] - warning[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_LOG_ERROR) { printf("Type[%d] - error[%-32.32s]", M_action, M_message_str[0]); } else if (M_action == E_AT_ASSIGN_FROM_SAMPLE) { char tmp[40]; M_distribution->textDescr(tmp, sizeof(tmp)); printf("Type[%d] - sample varId[%s] %s", M_action, display_scenario->allocVars->getName(M_varId), tmp); } else if (M_action == E_AT_ASSIGN_FROM_VALUE) { printf("Type[%d] - assign varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_ASSIGN_FROM_INDEX) { printf("Type[%d] - assign index[%s]", M_action, display_scenario->allocVars->getName(M_varId)); } else if (M_action == E_AT_ASSIGN_FROM_GETTIMEOFDAY) { printf("Type[%d] - assign gettimeofday[%s, %s]", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_subVarId[0])); } else if (M_action == E_AT_ASSIGN_FROM_STRING) { printf("Type[%d] - string assign varId[%s] [%-32.32s]", M_action, display_scenario->allocVars->getName(M_varId), M_message_str[0]); } else if (M_action == E_AT_JUMP) { printf("Type[%d] - jump varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue); } else if (M_action == E_AT_PAUSE_RESTORE) { printf("Type[%d] - restore pause varInId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varInId), M_doubleValue); } else if (M_action == E_AT_VAR_ADD) { printf("Type[%d] - add varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_MULTIPLY) { printf("Type[%d] - multiply varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_DIVIDE) { printf("Type[%d] - divide varId[%s] %lf", M_action, display_scenario->allocVars->getName(M_varId), M_doubleValue); } else if (M_action == E_AT_VAR_TRIM) { printf("Type[%d] - trim varId[%s]", M_action, display_scenario->allocVars->getName(M_varId)); } else if (M_action == E_AT_VAR_TEST) { printf("Type[%d] - divide varId[%s] varInId[%s] %s %lf", M_action, display_scenario->allocVars->getName(M_varId), display_scenario->allocVars->getName(M_varInId), comparatorToString(M_comp), M_doubleValue); } else if (M_action == E_AT_VAR_TO_DOUBLE) { printf("Type[%d] - toDouble varId[%s]", M_action, display_scenario->allocVars->getName(M_varId)); #ifdef PCAPPLAY } else if ((M_action == E_AT_PLAY_PCAP_AUDIO) || (M_action == E_AT_PLAY_PCAP_IMAGE) || (M_action == E_AT_PLAY_PCAP_VIDEO)) { printf("Type[%d] - file[%s]", M_action, M_pcapArgs->file); #endif #ifdef RTP_STREAM } else if (M_action == E_AT_RTP_STREAM_PLAY) { printf("Type[%d] - rtp_stream playfile file %s loop=%d payload %d bytes per packet=%d ms per packet=%d ticks per packet=%d", M_action,M_rtpstream_actinfo.filename,M_rtpstream_actinfo.loop_count,M_rtpstream_actinfo.payload_type,M_rtpstream_actinfo.bytes_per_packet,M_rtpstream_actinfo.ms_per_packet,M_rtpstream_actinfo.ticks_per_packet); } else if (M_action == E_AT_RTP_STREAM_PAUSE) { printf("Type[%d] - rtp_stream pause", M_action); } else if (M_action == E_AT_RTP_STREAM_RESUME) { printf("Type[%d] - rtp_stream resume", M_action); #endif } else { printf("Type[%d] - unknown action type ... ", M_action); } } CAction::T_ActionType CAction::getActionType() { return(M_action); } CAction::T_LookingPlace CAction::getLookingPlace() { return(M_lookingPlace); } CAction::T_IntCmdType CAction::getIntCmd () { return(M_IntCmd); } CAction::T_Comparator CAction::getComparator () { return(M_comp); } bool CAction::getCheckIt() { return(M_checkIt); } bool CAction::getCheckItInverse() { return(M_checkItInverse); } bool CAction::getCaseIndep() { return(M_caseIndep); } bool CAction::getHeadersOnly() { return(M_headersOnly); } int CAction::getOccurrence() { return(M_occurrence); } int CAction::getVarId() { return(M_varId); } int CAction::getVarInId() { return(M_varInId); } int CAction::getVarIn2Id() { return(M_varIn2Id); } char* CAction::getLookingChar() { return(M_lookingChar); } SendingMessage *CAction::getMessage(int n) { return(M_message[n]); } CSample* CAction::getDistribution() { return(M_distribution); } double CAction::getDoubleValue() { return(M_doubleValue); } char* CAction::getStringValue() { return(M_stringValue); } #ifdef PCAPPLAY pcap_pkts * CAction::getPcapPkts() { return(M_pcapArgs); } #endif #ifdef RTP_STREAM rtpstream_actinfo_t *CAction::getRTPStreamActInfo() { return (&M_rtpstream_actinfo); } #endif void CAction::setActionType (CAction::T_ActionType P_value) { M_action = P_value; } void CAction::setLookingPlace (CAction::T_LookingPlace P_value) { M_lookingPlace = P_value; } void CAction::setCheckIt (bool P_value) { M_checkIt = P_value; } void CAction::setCheckItInverse (bool P_value) { M_checkItInverse = P_value; } void CAction::setVarId (int P_value) { M_varId = P_value; } void CAction::setVarInId (int P_value) { M_varInId = P_value; } void CAction::setVarIn2Id (int P_value) { M_varIn2Id = P_value; } void CAction::setCaseIndep (bool P_value) { M_caseIndep = P_value; } void CAction::setOccurrence (int P_value) { M_occurrence = P_value; } void CAction::setHeadersOnly (bool P_value) { M_headersOnly = P_value; } void CAction::setIntCmd (T_IntCmdType P_type) { M_IntCmd = P_type; } void CAction::setComparator (T_Comparator P_value) { M_comp = P_value; } /* sample specific function. */ void CAction::setDistribution (CSample *P_value) { M_distribution = P_value; } /* assign from value specific function. */ void CAction::setDoubleValue (double P_value) { M_doubleValue = P_value; } /* strcmp specific function. */ void CAction::setStringValue (char *P_value) { M_stringValue = P_value; } void CAction::setSubVarId (int P_value) { if ( M_nbSubVarId < M_maxNbSubVarId ) { M_subVarId[M_nbSubVarId] = P_value; M_nbSubVarId++; } } int CAction::getSubVarId(int P_index) { return(M_subVarId[P_index]); } int* CAction::getSubVarId() { return(M_subVarId); } void CAction::setNbSubVarId (int P_value) { M_maxNbSubVarId = P_value; if(M_subVarId != NULL) { delete [] M_subVarId; M_subVarId = NULL; } M_subVarId = new int[M_maxNbSubVarId] ; M_nbSubVarId = 0 ; } int CAction::getNbSubVarId () { return(M_nbSubVarId); } void CAction::setLookingChar(const char* P_value) { if(M_lookingChar != NULL) { delete [] M_lookingChar; M_lookingChar = NULL; } if(P_value != NULL) { M_lookingChar = new char[strlen(P_value)+1]; strcpy(M_lookingChar, P_value); } } void CAction::setMessage (char* P_value, int n) { if(M_message[n] != NULL) { delete M_message[n]; M_message[n] = NULL; } free(M_message_str[n]); M_message_str[n] = NULL; if(P_value != NULL) { M_message_str[n] = strdup(P_value); M_message[n] = new SendingMessage(M_scenario, P_value, true /* skip sanity */); } } void CAction::setRegExp(const char *P_value) { int errorCode; free(M_regularExpression); M_regularExpression = strdup(P_value); M_regExpSet = true; errorCode = regcomp(&M_internalRegExp, P_value, REGEXP_PARAMS); if(errorCode != 0) { char buffer[MAX_HEADER_LEN]; regerror(errorCode, &M_internalRegExp, buffer, sizeof(buffer)); ERROR("recomp error : regular expression '%s' - error '%s'\n", M_regularExpression, buffer); } } char *CAction::getRegularExpression() { if (!M_regExpSet) { ERROR("Trying to get a regular expression for an action that does not have one!"); } return M_regularExpression; } int CAction::executeRegExp(const char* P_string, VariableTable *P_callVarTable) { regmatch_t pmatch[10]; int error; int nbOfMatch = 0; char* result = NULL ; if (!M_regExpSet) { ERROR("Trying to perform regular expression match on action that does not have one!"); } if (getNbSubVarId() > 9) { ERROR("You can only have nine sub expressions!"); } memset((void*)pmatch, 0, sizeof(regmatch_t)*10); error = regexec(&M_internalRegExp, P_string, 10, pmatch, REGEXP_PARAMS); if ( error == 0) { CCallVariable* L_callVar = P_callVarTable->getVar(getVarId()); for(int i = 0; i <= getNbSubVarId(); i++) { if(pmatch[i].rm_eo == -1) break ; setSubString(&result, P_string, pmatch[i].rm_so, pmatch[i].rm_eo); L_callVar->setMatchingValue(result); nbOfMatch++; if (i == getNbSubVarId()) break ; L_callVar = P_callVarTable->getVar(getSubVarId(i)); } } return(nbOfMatch); } void CAction::setSubString(char** P_target, const char* P_source, int P_start, int P_stop) { int sizeOf; if(P_source != NULL) { sizeOf = P_stop - P_start; (*P_target) = new char[sizeOf + 1]; if (sizeOf > 0) { memcpy((*P_target), &(P_source[P_start]), sizeOf); } (*P_target)[sizeOf] = '\0'; } else { *P_target = NULL ; } } #ifdef PCAPPLAY void CAction::setPcapArgs (pcap_pkts * P_value) { if(M_pcapArgs != NULL) { free(M_pcapArgs); M_pcapArgs = NULL; } if(P_value != NULL) { M_pcapArgs = (pcap_pkts *)malloc(sizeof(*M_pcapArgs)); memcpy(M_pcapArgs, P_value, sizeof(*M_pcapArgs)); } } void CAction::setPcapArgs(const char* P_value) { if(M_pcapArgs != NULL) { free(M_pcapArgs); M_pcapArgs = NULL; } if(P_value != NULL) { M_pcapArgs = (pcap_pkts *) malloc(sizeof(*M_pcapArgs)); if (parse_play_args(P_value, M_pcapArgs) == -1) { ERROR("Play pcap error"); } if (access(M_pcapArgs->file, F_OK)) { ERROR("Cannot read file %s\n", M_pcapArgs->file); } } } #endif #ifdef RTP_STREAM void CAction::setRTPStreamActInfo(const char* P_value) { char *ParamString; char *NextComma; if (strlen(P_value)>=sizeof (M_rtpstream_actinfo.filename)) { ERROR("Filename %s is too long, maximum supported length %zu\n", P_value, sizeof(M_rtpstream_actinfo.filename) - 1); } strcpy (M_rtpstream_actinfo.filename,P_value); ParamString= strchr(M_rtpstream_actinfo.filename,','); NextComma= NULL; M_rtpstream_actinfo.loop_count= 1; if (ParamString) { /* we have a loop count parameter */ *(ParamString++)= 0; NextComma= strchr (ParamString,','); if (NextComma) { *(NextComma++)= 0; } M_rtpstream_actinfo.loop_count= atoi(ParamString); ParamString= NextComma; } M_rtpstream_actinfo.payload_type= rtp_default_payload; if (ParamString) { /* we have a payload type parameter */ NextComma= strchr (ParamString,','); if (NextComma) { *(NextComma++)= 0; } M_rtpstream_actinfo.payload_type= atoi(ParamString); } /* Setup based on what we know of payload types */ switch (M_rtpstream_actinfo.payload_type) { case 0: M_rtpstream_actinfo.ms_per_packet= 20; M_rtpstream_actinfo.bytes_per_packet= 160; M_rtpstream_actinfo.ticks_per_packet= 160; break; case 8: M_rtpstream_actinfo.ms_per_packet= 20; M_rtpstream_actinfo.bytes_per_packet= 160; M_rtpstream_actinfo.ticks_per_packet= 160; break; case 18: M_rtpstream_actinfo.ms_per_packet= 20; M_rtpstream_actinfo.bytes_per_packet= 20; M_rtpstream_actinfo.ticks_per_packet= 160; break; default: M_rtpstream_actinfo.ms_per_packet= -1; M_rtpstream_actinfo.bytes_per_packet= -1; M_rtpstream_actinfo.ticks_per_packet= -1; ERROR("Unknown rtp payload type %d - cannot set playback parameters\n",M_rtpstream_actinfo.payload_type); break; } if (rtpstream_cache_file(M_rtpstream_actinfo.filename)<0) { ERROR("Cannot read/cache rtpstream file %s\n",M_rtpstream_actinfo.filename); } } void CAction::setRTPStreamActInfo (rtpstream_actinfo_t *P_value) { /* At this stage the entire rtpstream action info structure can simply be */ /* copied. No members need to be individually duplicated/processed. */ memcpy (&M_rtpstream_actinfo,P_value,sizeof(M_rtpstream_actinfo)); } #endif void CAction::setScenario(scenario * P_scenario) { M_scenario = P_scenario; } void CAction::setAction(CAction P_action) { if (P_action.getActionType() == CAction::E_AT_ASSIGN_FROM_SAMPLE) { assert(P_action.getDistribution() != NULL); } int L_i; setActionType ( P_action.getActionType() ); setLookingPlace ( P_action.getLookingPlace() ); setVarId ( P_action.getVarId() ); setVarInId ( P_action.getVarInId() ); setDoubleValue ( P_action.getDoubleValue() ); setDistribution ( P_action.getDistribution() ); setScenario ( P_action.M_scenario ); setNbSubVarId ( P_action.getNbSubVarId() ); for (L_i = 0; L_i < P_action.getNbSubVarId() ; L_i++ ) { setSubVarId (P_action.getSubVarId(L_i)); } setLookingChar ( P_action.getLookingChar() ); setCheckIt ( P_action.getCheckIt() ); setCheckItInverse ( P_action.getCheckItInverse() ); setCaseIndep ( P_action.getCaseIndep() ); setOccurrence ( P_action.getOccurrence() ); setHeadersOnly ( P_action.getHeadersOnly() ); for (L_i = 0; L_i < MAX_ACTION_MESSAGE; L_i++) { setMessage(P_action.M_message_str[L_i], L_i); } setRegExp ( P_action.M_regularExpression); setIntCmd ( P_action.M_IntCmd ); #ifdef PCAPPLAY setPcapArgs ( P_action.M_pcapArgs ); #endif #ifdef RTP_STREAM setRTPStreamActInfo (&(P_action.M_rtpstream_actinfo)); #endif } CAction::CAction(scenario *scenario) { M_action = E_AT_NO_ACTION; M_varId = 0; M_varInId = 0; M_varIn2Id = 0; M_nbSubVarId = 0; M_maxNbSubVarId = 0; M_subVarId = NULL; M_checkIt = false; M_checkItInverse = false; M_lookingPlace = E_LP_MSG; M_lookingChar = NULL; M_caseIndep = false; M_occurrence = 1; M_headersOnly = true; for (int i = 0; i < MAX_ACTION_MESSAGE; i++) { M_message[i] = NULL; M_message_str[i] = NULL; } M_IntCmd = E_INTCMD_INVALID; M_doubleValue = 0; M_stringValue = NULL; M_distribution = NULL; #ifdef PCAPPLAY M_pcapArgs = NULL; #endif #ifdef RTP_STREAM memset(&M_rtpstream_actinfo, 0, sizeof(M_rtpstream_actinfo)); #endif M_scenario = scenario; M_regExpSet = false; M_regularExpression = NULL; } CAction::~CAction() { if(M_lookingChar != NULL) { delete [] M_lookingChar; M_lookingChar = NULL; } for (int i = 0; i < MAX_ACTION_MESSAGE; i++) { if(M_message[i] != NULL) { delete M_message[i]; M_message[i] = NULL; } free(M_message_str[i]); M_message_str[i] = NULL; } if(M_subVarId != NULL) { delete [] M_subVarId; M_subVarId = NULL; } free(M_stringValue); #ifdef PCAPPLAY if (M_pcapArgs != NULL) { free_pcaps(M_pcapArgs); M_pcapArgs = NULL; } #endif if (M_regExpSet) { regfree(&M_internalRegExp); free(M_regularExpression); } if (M_distribution) { delete M_distribution; } } /****************************** CActions class ************************/ void CActions::afficheInfo() { printf("Action Size = [%d]\n", M_nbAction); for(int i=0; iafficheInfo(); } } void CActions::reset() { for (int i = 0; i < M_nbAction; i++) { delete M_actionList[i]; M_actionList[i] = NULL; } M_nbAction = 0; } int CActions::getActionSize() { return(M_nbAction); } void CActions::setAction(CAction *P_action) { CAction **newActions = new CAction*[M_nbAction + 1]; if (!newActions) { ERROR("Could not allocate new action list."); } for (int i = 0; i < M_nbAction; i++) { newActions[i] = M_actionList[i]; } if (M_actionList) { delete [] M_actionList; } M_actionList = newActions; M_actionList[M_nbAction] = P_action; M_nbAction++; } CAction* CActions::getAction(int i) { if(i < M_nbAction) { return(M_actionList[i]); } else return(NULL); } CActions::CActions() { M_nbAction = 0; M_actionList = NULL; } CActions::~CActions() { for (int i = 0; i < M_nbAction; i++) { delete M_actionList[i]; } delete [] M_actionList; M_actionList = NULL; } #ifdef GTEST #include "gtest/gtest.h" TEST(actions, MatchingRegexp) { AllocVariableTable vt(NULL); int id = vt.find("1", true); int sub1_id = vt.find("2", true); int sub2_id = vt.find("3", true); int sub3_id = vt.find("4", true); int sub4_id = vt.find("5", true); CAction re(NULL); re.setVarId(id); re.setNbSubVarId(4); re.setSubVarId(sub1_id); re.setSubVarId(sub2_id); re.setSubVarId(sub3_id); re.setSubVarId(sub4_id); re.setRegExp("(.+)(o) (.+)(d)"); int results = re.executeRegExp("hello world", &vt); ASSERT_EQ(5, results); ASSERT_STREQ("hello world", vt.getVar(id)->getString()); ASSERT_STREQ("hell", vt.getVar(sub1_id)->getString()); ASSERT_STREQ("o", vt.getVar(sub2_id)->getString()); ASSERT_STREQ("worl", vt.getVar(sub3_id)->getString()); ASSERT_STREQ("d", vt.getVar(sub4_id)->getString()); } TEST(actions, NonMatchingRegexp) { AllocVariableTable vt(NULL); int id = vt.find("1", true); int sub1_id = vt.find("2", true); int sub2_id = vt.find("3", true); int sub3_id = vt.find("4", true); int sub4_id = vt.find("5", true); CAction re(NULL); re.setVarId(id); re.setNbSubVarId(4); re.setSubVarId(sub1_id); re.setSubVarId(sub2_id); re.setSubVarId(sub3_id); re.setSubVarId(sub4_id); re.setRegExp("(.+)(o) (.+)(d)"); int results = re.executeRegExp("", &vt); ASSERT_EQ(0, results); ASSERT_STREQ("", vt.getVar(id)->getString()); ASSERT_STREQ("", vt.getVar(sub1_id)->getString()); } #endif sipp-3.5.1/src/call.cpp0000644000175000017500000045311612672462535013761 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Michael Dwyer from Cibation * Roland Meub * Andy Aicken * Martin H. VanLeeuwen */ #include #include #include #include #include #include #include #include #ifdef PCAPPLAY #include "send_packets.h" #endif #include "sipp.hpp" #include "auth.hpp" #include "deadcall.hpp" #include "config.h" #include "version.h" #define callDebug(...) do { if (useCallDebugf) { _callDebug( __VA_ARGS__ ); } } while (0) extern map map_perip_fd; #ifdef PCAPPLAY /* send_packets pthread wrapper */ void *send_wrapper(void *); #endif int call::dynamicId = 0; int call::maxDynamicId = 10000+2000*4; // FIXME both param to be in command line !!!! int call::startDynamicId = 10000; // FIXME both param to be in command line !!!! int call::stepDynamicId = 4; // FIXME both param to be in command line !!!! /************** Call map and management routines **************/ static unsigned int next_number = 1; static unsigned int get_tdm_map_number() { unsigned int nb = 0; unsigned int i=0; unsigned int interval=0; unsigned int random=0; bool found = false; /* Find a number in the tdm_map which is not in use */ interval = (tdm_map_a+1) * (tdm_map_b+1) * (tdm_map_c+1); random = rand() % interval; while ((i return no address */ return INADDR_NONE; } begin += sizeof(pattern) - 1; end = find_sdp_eol(begin); if (!end) { free(my_msg); return INADDR_NONE; } *end = '\0'; memset(ip, 0, 32); strncpy(ip, begin, sizeof(ip) - 1); ip[sizeof(ip) - 1] = '\0'; free(my_msg); return inet_addr(ip); } /* * Look for "c=IN IP6 " pattern in the message and extract the following value * which should be IPv6 address */ uint8_t get_remote_ipv6_media(char *msg, struct in6_addr *addr) { char pattern[] = "c=IN IP6 "; char *begin, *end; char ip[128]; char *my_msg = strdup(msg); memset(addr, 0, sizeof(*addr)); memset(ip, 0, 128); if (!my_msg) { return 0; } begin = strstr(my_msg,pattern); if (!begin) { free(my_msg); /* Can't find what we're looking at -> return no address */ return 0; } begin += sizeof(pattern) - 1; end = find_sdp_eol(begin); if (!end) { free(my_msg); return 0; } *end = '\0'; strncpy(ip, begin, sizeof(ip) -1); ip[sizeof(ip) - 1] = '\0'; free(my_msg); if (!inet_pton(AF_INET6, ip, addr)) { return 0; } return 1; } /* * Look for "m=audio ", "m=image " or "m=video " pattern in the message * and extract the following value which should be port number. */ enum media_ptn { PAT_AUDIO, PAT_IMAGE, PAT_VIDEO }; uint16_t get_remote_port_media(const char *msg, enum media_ptn pattype) { const char *pattern; char *begin, *end; char number[6]; if (pattype == PAT_AUDIO) { pattern = "m=audio "; } else if (pattype == PAT_IMAGE) { pattern = "m=image "; } else if (pattype == PAT_VIDEO) { pattern = "m=video "; } else { ERROR("Internal error: Undefined media pattern %d\n", 3); } char *my_msg = strdup(msg); if (!my_msg) { return 0; } begin = strstr(my_msg, pattern); if (!begin) { free(my_msg); /* m=audio not found */ return 0; } begin += strlen(pattern); end = find_sdp_eol(begin); if (!end) { free(my_msg); ERROR("get_remote_port_media: no CRLF found"); return 0; } *end = '\0'; memset(number, 0, sizeof(number)); strncpy(number, begin, sizeof(number) - 1); number[sizeof(number) - 1] = '\0'; free(my_msg); return atoi(number); } /* * IPv{4,6} compliant */ void call::get_remote_media_addr(char *msg) { uint16_t audio_port, image_port, video_port; if (media_ip_is_ipv6) { struct in6_addr ip_media; if (get_remote_ipv6_media(msg, &ip_media)) { audio_port = get_remote_port_media(msg, PAT_AUDIO); if (audio_port) { /* We have audio in the SDP: set the to_audio addr */ (_RCAST(struct sockaddr_in6 *, &(play_args_a.to)))->sin6_flowinfo = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_a.to)))->sin6_scope_id = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_a.to)))->sin6_family = AF_INET6; (_RCAST(struct sockaddr_in6 *, &(play_args_a.to)))->sin6_port = htons(audio_port); (_RCAST(struct sockaddr_in6 *, &(play_args_a.to)))->sin6_addr = ip_media; } image_port = get_remote_port_media(msg, PAT_IMAGE); if (image_port) { /* We have image in the SDP: set the to_image addr */ (_RCAST(struct sockaddr_in6 *, &(play_args_i.to)))->sin6_flowinfo = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_i.to)))->sin6_scope_id = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_i.to)))->sin6_family = AF_INET6; (_RCAST(struct sockaddr_in6 *, &(play_args_i.to)))->sin6_port = htons(image_port); (_RCAST(struct sockaddr_in6 *, &(play_args_i.to)))->sin6_addr = ip_media; } video_port = get_remote_port_media(msg, PAT_VIDEO); if (video_port) { /* We have video in the SDP: set the to_video addr */ (_RCAST(struct sockaddr_in6 *, &(play_args_v.to)))->sin6_flowinfo = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_v.to)))->sin6_scope_id = 0; (_RCAST(struct sockaddr_in6 *, &(play_args_v.to)))->sin6_family = AF_INET6; (_RCAST(struct sockaddr_in6 *, &(play_args_v.to)))->sin6_port = htons(video_port); (_RCAST(struct sockaddr_in6 *, &(play_args_v.to)))->sin6_addr = ip_media; } hasMediaInformation = 1; } } else { uint32_t ip_media; ip_media = get_remote_ip_media(msg); if (ip_media != INADDR_NONE) { audio_port = get_remote_port_media(msg, PAT_AUDIO); if (audio_port) { /* We have audio in the SDP: set the to_audio addr */ (_RCAST(struct sockaddr_in *, &(play_args_a.to)))->sin_family = AF_INET; (_RCAST(struct sockaddr_in *, &(play_args_a.to)))->sin_port = htons(audio_port); (_RCAST(struct sockaddr_in *, &(play_args_a.to)))->sin_addr.s_addr = ip_media; } image_port = get_remote_port_media(msg, PAT_IMAGE); if (image_port) { /* We have image in the SDP: set the to_image addr */ (_RCAST(struct sockaddr_in *, &(play_args_i.to)))->sin_family = AF_INET; (_RCAST(struct sockaddr_in *, &(play_args_i.to)))->sin_port = htons(image_port); (_RCAST(struct sockaddr_in *, &(play_args_i.to)))->sin_addr.s_addr = ip_media; } video_port = get_remote_port_media(msg, PAT_VIDEO); if (video_port) { /* We have video in the SDP: set the to_video addr */ (_RCAST(struct sockaddr_in *, &(play_args_v.to)))->sin_family = AF_INET; (_RCAST(struct sockaddr_in *, &(play_args_v.to)))->sin_port = htons(video_port); (_RCAST(struct sockaddr_in *, &(play_args_v.to)))->sin_addr.s_addr = ip_media; } hasMediaInformation = 1; } } } #endif #ifdef RTP_STREAM /******* Extract RTP remote media infomartion from SDP *******/ /***** Similar to the routines used by the PCAP play code *****/ #define SDP_IPADDR_PREFIX "\nc=IN IP" #define SDP_AUDIOPORT_PREFIX "\nm=audio" #define SDP_IMAGEPORT_PREFIX "\nm=image" #define SDP_VIDEOPORT_PREFIX "\nm=video" void call::extract_rtp_remote_addr (char * msg) { char *search; char *copy; char ip_addr[128]; int ip_ver; int audio_port = 0; int image_port = 0; int video_port = 0; /* Look for start of message body */ search= strstr(msg,"\r\n\r\n"); if (!search) { ERROR("extract_rtp_remote_addr: SDP message body not found"); } msg = search + 2; /* skip past header. point to blank line before body */ /* Now search for IP address field */ search= strstr(msg,SDP_IPADDR_PREFIX); if (search) { search+= strlen(SDP_IPADDR_PREFIX); /* Get IP version number from c= */ if (*search=='4') { ip_ver= 4; } else if (*search=='6') { ip_ver= 6; } else { ERROR("extract_rtp_remote_addr: invalid IP version '%c' in SDP message body",*search); } search++; copy= ip_addr; while ( (*search==' ') || (*search=='\t') ) { search++; } while (!( (*search==' ') || (*search=='\t') || (*search=='\r') || (*search=='\n') )) { *(copy++)= *(search++); } *copy= 0; } else { ERROR("extract_rtp_remote_addr: no IP address found in SDP message body"); *ip_addr= 0; } /* Now try to find the port number for the audio stream */ search= strstr(msg,SDP_AUDIOPORT_PREFIX); if (search) { search+= strlen(SDP_AUDIOPORT_PREFIX); while ( (*search==' ') || (*search=='\t') ) { search++; } sscanf (search,"%d",&audio_port); } /* And find the port number for the image stream */ search= strstr(msg,SDP_IMAGEPORT_PREFIX); if (search) { search+= strlen(SDP_IMAGEPORT_PREFIX); while ( (*search==' ') || (*search=='\t') ) { search++; } sscanf (search,"%d",&image_port); } /* And find the port number for the video stream */ search= strstr(msg,SDP_VIDEOPORT_PREFIX); if (search) { search+= strlen(SDP_VIDEOPORT_PREFIX); while ( (*search==' ') || (*search=='\t') ) { search++; } sscanf (search,"%d",&video_port); } if (audio_port == 0 && image_port == 0 && video_port == 0) { ERROR("extract_rtp_remote_addr: no m=audio, m=image or m=video line found in SDP message body"); } /* If we get an image_port only, we won't set anything useful. * We cannot use rtpstream for udptl/t38 data because it has * non-linear timing and data size. */ rtpstream_set_remote(&rtpstream_callinfo, ip_ver, ip_addr, audio_port, video_port); } #endif /******* Very simple hash for retransmission detection *******/ unsigned long call::hash(const char * msg) { unsigned long hash = 0; int c; if (rtcheck == RTCHECK_FULL) { while ((c = *msg++)) hash = c + (hash << 6) + (hash << 16) - hash; } else if (rtcheck == RTCHECK_LOOSE) { /* Based on section 11.5 (bullet 2) of RFC2543 we only take into account * the To, From, Call-ID, and CSeq values. */ const char *hdr = get_header_content(msg,"To:"); while ((c = *hdr++)) hash = c + (hash << 6) + (hash << 16) - hash; hdr = get_header_content(msg,"From:"); while ((c = *hdr++)) hash = c + (hash << 6) + (hash << 16) - hash; hdr = get_header_content(msg,"Call-ID:"); while ((c = *hdr++)) hash = c + (hash << 6) + (hash << 16) - hash; hdr = get_header_content(msg,"CSeq:"); while ((c = *hdr++)) hash = c + (hash << 6) + (hash << 16) - hash; /* For responses, we should also consider the code and body (if any), * because they are not nearly as well defined as the request retransmission. */ if (!strncmp(msg, "SIP/2.0", strlen("SIP/2.0"))) { /* Add the first line into the hash. */ hdr = msg + strlen("SIP/2.0"); while ((c = *hdr++) && (c != '\r')) hash = c + (hash << 6) + (hash << 16) - hash; /* Add the body (if any) into the hash. */ hdr = strstr(msg, "\r\n\r\n"); if (hdr) { hdr += strlen("\r\n\r\n"); while ((c = *hdr++)) hash = c + (hash << 6) + (hash << 16) - hash; } } } else { ERROR("Internal error: Invalid rtcheck %d\n", rtcheck); } return hash; } /******************* Call class implementation ****************/ call::call(const char *p_id, bool use_ipv6, int userId, struct sockaddr_storage *dest) : listener(p_id, true) { init(main_scenario, NULL, dest, p_id, userId, use_ipv6, false, false); } call::call(const char *p_id, struct sipp_socket *socket, struct sockaddr_storage *dest) : listener(p_id, true) { init(main_scenario, socket, dest, p_id, 0 /* No User. */, socket->ss_ipv6, false /* Not Auto. */, false); } call::call(scenario * call_scenario, struct sipp_socket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitialization) : listener(p_id, true) { init(call_scenario, socket, dest, p_id, userId, ipv6, isAutomatic, isInitialization); } call *call::add_call(int userId, bool ipv6, struct sockaddr_storage *dest) { static char call_id[MAX_HEADER_LEN]; const char * src = call_id_string; int count = 0; if(!next_number) { next_number ++; } while (*src && count < MAX_HEADER_LEN-1) { if (*src == '%') { ++src; switch(*src++) { case 'u': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%u", next_number); break; case 'p': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%u", pid); break; case 's': count += snprintf(&call_id[count], MAX_HEADER_LEN-count-1,"%s", local_ip); break; default: // treat all unknown sequences as %% call_id[count++] = '%'; break; } } else { call_id[count++] = *src++; } } call_id[count] = 0; return new call(main_scenario, NULL, dest, call_id, userId, ipv6, false /* Not Auto. */, false); } void call::init(scenario * call_scenario, struct sipp_socket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitCall) { this->call_scenario = call_scenario; zombie = false; debugBuffer = NULL; debugLength = 0; msg_index = 0; last_send_index = 0; last_send_msg = NULL; last_send_len = 0; last_recv_hash = 0; last_recv_index = -1; last_recv_msg = NULL; recv_retrans_hash = 0; recv_retrans_recv_index = -1; recv_retrans_send_index = -1; dialog_route_set = NULL; next_req_url = NULL; cseq = 0; next_retrans = 0; nb_retrans = 0; nb_last_delay = 0; paused_until = 0; call_port = 0; comp_state = NULL; start_time = clock_tick; call_established=false ; ack_is_pending=false ; last_recv_msg = NULL; cseq = base_cseq; nb_last_delay = 0; use_ipv6 = ipv6; queued_msg = NULL; dialog_authentication = NULL; dialog_challenge_type = 0; #ifdef USE_OPENSSL m_ctx_ssl = NULL ; m_bio = NULL ; #endif #ifdef RTP_STREAM /* check and warn on rtpstream_new_call result? -> error alloc'ing mem */ rtpstream_new_call (&rtpstream_callinfo); #endif #ifdef PCAPPLAY hasMediaInformation = 0; #endif call_remote_socket = NULL; if (socket) { associate_socket(socket); socket->ss_count++; } else { call_socket = NULL; } if (dest) { memcpy(&call_peer, dest, SOCK_ADDR_SIZE(dest)); } else { memset(&call_peer, 0, sizeof(call_peer)); } // initialising the CallVariable with the Scenario variable int i; VariableTable *userVars = NULL; bool putUserVars = false; if (userId) { int_vt_map::iterator it = userVarMap.find(userId); if (it != userVarMap.end()) { userVars = it->second; } } else { userVars = new VariableTable(userVariables); /* Creating this table creates a reference to it, but if it is really used, * then the refcount will be increased. */ putUserVars = true; } if (call_scenario->allocVars->size > 0) { M_callVariableTable = new VariableTable(userVars, call_scenario->allocVars->size); } else if (userVars && userVars->size > 0) { M_callVariableTable = userVars->getTable(); } else if (globalVariables->size > 0) { M_callVariableTable = globalVariables->getTable(); } else { M_callVariableTable = NULL; } if (putUserVars) { userVars->putTable(); } if (call_scenario->transactions.size() > 0) { transactions = (struct txnInstanceInfo *)malloc(sizeof(txnInstanceInfo) * call_scenario->transactions.size()); memset(transactions, 0, sizeof(struct txnInstanceInfo) * call_scenario->transactions.size()); } else { transactions = NULL; } // If not updated by a message we use the start time // information to compute rtd information start_time_rtd = (unsigned long long *)malloc(sizeof(unsigned long long) * call_scenario->stats->nRtds()); if (!start_time_rtd) { ERROR("Could not allocate RTD times!"); } rtd_done = (bool *)malloc(sizeof(bool) * call_scenario->stats->nRtds()); if (!start_time_rtd) { ERROR("Could not allocate RTD done!"); } for (i = 0; i < call_scenario->stats->nRtds(); i++) { start_time_rtd[i] = getmicroseconds(); rtd_done[i] = false; } // by default, last action result is NO_ERROR last_action_result = call::E_AR_NO_ERROR; this->userId = userId; /* For automatic answer calls to an out of call request, we must not */ /* increment the input files line numbers to not disturb */ /* the input files read mechanism (otherwise some lines risk */ /* to be systematically skipped */ if (!isAutomatic) { m_lineNumber = new file_line_map(); for (file_map::iterator file_it = inFiles.begin(); file_it != inFiles.end(); file_it++) { (*m_lineNumber)[file_it->first] = file_it->second->nextLine(userId); } } else { m_lineNumber = NULL; } this->initCall = isInitCall; #ifdef PCAPPLAY memset(&(play_args_a.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_i.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_v.to), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_a.from), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_i.from), 0, sizeof(struct sockaddr_storage)); memset(&(play_args_v.from), 0, sizeof(struct sockaddr_storage)); hasMediaInformation = 0; media_thread = 0; #endif peer_tag = NULL; recv_timeout = 0; send_timeout = 0; timewait = false; if (!isAutomatic) { /* Not advancing the number is safe, because for automatic calls we do not * assign the identifier, the only other place it is used is for the auto * media port. */ number = next_number++; if (use_tdmmap) { tdm_map_number = get_tdm_map_number(); if (tdm_map_number == 0) { /* Can't create the new call */ WARNING("Can't create new outgoing call: all tdm_map circuits busy"); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_OUTBOUND_CONGESTION); this->zombie = true; return; } /* Mark the entry in the list as busy */ tdm_map[tdm_map_number - 1] = true; } else { tdm_map_number = 0; } } callDebug("Starting call %s\n", id); setRunning(); } int call::_callDebug(const char *fmt, ...) { va_list ap; if (!useCallDebugf) { return 0; } /* First we figure out how much to allocate. */ va_start(ap, fmt); int ret = vsnprintf(NULL, 0, fmt, ap); va_end(ap); debugBuffer = (char *)realloc(debugBuffer, debugLength + ret + TIME_LENGTH + 2); if (!debugBuffer) { ERROR("Could not allocate buffer (%d bytes) for callDebug file!", debugLength + ret + TIME_LENGTH + 2); } struct timeval now; gettimeofday(&now, NULL); debugLength += snprintf(debugBuffer + debugLength, TIME_LENGTH + 2, "%s ", CStat::formatTime(&now)); va_start(ap, fmt); debugLength += vsnprintf(debugBuffer + debugLength, ret + 1, fmt, ap); va_end(ap); return ret; } call::~call() { computeStat(CStat::E_ADD_CALL_DURATION, clock_tick - start_time); if(comp_state) { comp_free(&comp_state); } if (call_remote_socket && (call_remote_socket != main_remote_socket)) { sipp_close_socket(call_remote_socket); } /* Deletion of the call variable */ if(M_callVariableTable) { M_callVariableTable->putTable(); } if (m_lineNumber) { delete m_lineNumber; } if (userId) { CallGenerationTask::free_user(userId); } if (transactions) { for (unsigned int i = 0; i < call_scenario->transactions.size(); i++) { free(transactions[i].txnID); } free(transactions); } if(last_recv_msg) { free(last_recv_msg); } if(last_send_msg) { free(last_send_msg); } if(peer_tag) { free(peer_tag); } if(dialog_route_set) { free(dialog_route_set); } if(next_req_url) { free(next_req_url); } #ifdef RTP_STREAM rtpstream_end_call (&rtpstream_callinfo); #endif if(dialog_authentication) { free(dialog_authentication); } if (use_tdmmap) { tdm_map[tdm_map_number] = false; } # ifdef PCAPPLAY if (media_thread != 0) { pthread_cancel(media_thread); pthread_join(media_thread, NULL); } #endif free(start_time_rtd); free(rtd_done); free(debugBuffer); } void call::computeStat (CStat::E_Action P_action) { if (initCall) { return; } call_scenario->stats->computeStat(P_action); } void call::computeStat (CStat::E_Action P_action, unsigned long P_value) { if (initCall) { return; } call_scenario->stats->computeStat(P_action, P_value); } void call::computeStat (CStat::E_Action P_action, unsigned long P_value, int which) { if (initCall) { return; } call_scenario->stats->computeStat(P_action, P_value, which); } /* Dump call info to error log. */ void call::dump() { char s[MAX_HEADER_LEN]; char tmpbuf[MAX_HEADER_LEN]; sprintf(s, "%s: State %d", id, msg_index); if (next_retrans) { snprintf(tmpbuf, 64, "%s (next retrans %u)", s, next_retrans); strcat(s, tmpbuf); } if (paused_until) { snprintf(tmpbuf, 64, "%s (paused until %u)", s, paused_until); strcat(s, tmpbuf); } if (recv_timeout) { snprintf(tmpbuf, 64, "%s (recv timeout %u)", s, recv_timeout); strcat(s, tmpbuf); } if (send_timeout) { snprintf(tmpbuf, 64, "%s (send timeout %u)", s, send_timeout); strcat(s, tmpbuf); } WARNING("%s", s); } bool call::connect_socket_if_needed() { bool existing; if(call_socket) return true; if(!multisocket) return true; if(transport == T_UDP) { struct sockaddr_storage saddr; if(sendMode != MODE_CLIENT) return true; char peripaddr[256]; if (!peripsocket) { if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a UDP socket (1)"); } } else { char *tmp = peripaddr; getFieldFromInputFile(ip_file, peripfield, NULL, tmp); map::iterator i; i = map_perip_fd.find(peripaddr); if (i == map_perip_fd.end()) { // Socket does not exist if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a UDP socket (2)"); } else { /* Ensure that it stays persistent, because it is recorded in the map. */ call_socket->ss_count++; map_perip_fd[peripaddr] = call_socket; } } else { // Socket exists already associate_socket(i->second); existing = true; i->second->ss_count++; } } if (existing) { return true; } memset(&saddr, 0, sizeof(struct sockaddr_storage)); memcpy(&saddr, local_addr_storage->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *,local_addr_storage->ai_addr))); if (use_ipv6) { saddr.ss_family = AF_INET6; } else { saddr.ss_family = AF_INET; } if (peripsocket) { struct addrinfo * h ; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; getaddrinfo(peripaddr, NULL, &hints, &h); memcpy(&saddr, h->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage*, h->ai_addr))); if (use_ipv6) { (_RCAST(struct sockaddr_in6*, &saddr))->sin6_port = htons(local_port); } else { (_RCAST(struct sockaddr_in*, &saddr))->sin_port = htons(local_port); } freeaddrinfo(h); } if (sipp_bind_socket(call_socket, &saddr, &call_port)) { ERROR_NO("Unable to bind UDP socket"); } } else { /* TCP, SCTP or TLS. */ struct sockaddr_storage *L_dest = &remote_sockaddr; if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { ERROR_NO("Unable to get a TCP/SCTP/TLS socket"); } if (existing) { return true; } sipp_customize_socket(call_socket); if (use_remote_sending_addr) { L_dest = &remote_sending_sockaddr; } if (sipp_connect_socket(call_socket, L_dest)) { if (reconnect_allowed()) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { WARNING("Unable to connect a TCP/SCTP/TLS socket"); } /* This connection failed. We must be in multisocket mode, because * otherwise we would already have a call_socket. This call can not * succeed, but does not affect any of our other calls. We do decrement * the reconnection counter however. */ if (reset_number != -1) { reset_number--; } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TCP_CONNECT); delete this; return false; } else { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } } return true; } bool call::lost(int index) { static int inited = 0; double percent = global_lost; if(!lose_packets) return false; if (call_scenario->messages[index]->lost >= 0) { percent = call_scenario->messages[index]->lost; } if (percent == 0) { return false; } if(!inited) { srand((unsigned int) time(NULL)); inited = 1; } return (((double)rand() / (double)RAND_MAX) < (percent / 100.0)); } int call::send_raw(const char * msg, int index, int len) { struct sipp_socket *sock; int rc; callDebug("Sending %s message for call %s (index %d, hash %lu):\n%s\n\n", TRANSPORT_TO_STRING(transport), id, index, hash(msg), msg); if((index!=-1) && (lost(index))) { TRACE_MSG("%s message voluntary lost (while sending).", TRANSPORT_TO_STRING(transport)); callDebug("%s message voluntary lost (while sending) (index %d, hash %lu).\n", TRANSPORT_TO_STRING(transport), index, hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[index] -> nb_lost++; return 0; } sock = call_socket; if ((use_remote_sending_addr) && (sendMode == MODE_SERVER)) { if (!call_remote_socket) { if (multisocket || !main_remote_socket) { struct sockaddr_storage *L_dest = &remote_sending_sockaddr; if((call_remote_socket= new_sipp_socket(use_ipv6, transport)) == NULL) { ERROR_NO("Unable to get a socket for rsa option"); } sipp_customize_socket(call_remote_socket); if(transport != T_UDP) { if (sipp_connect_socket(call_remote_socket, L_dest)) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a %s socket for rsa option, remote peer error", TRANSPORT_TO_STRING(transport)); } else { ERROR_NO("Unable to connect a socket for rsa option"); } } } if (!multisocket) { main_remote_socket = call_remote_socket; } } if (!multisocket) { call_remote_socket = main_remote_socket; main_remote_socket->ss_count++; } } sock=call_remote_socket ; } // If the length hasn't been explicitly specified, treat the message as a string if (len==0) { len = strlen(msg); } assert(sock); rc = write_socket(sock, msg, len, WS_BUFFER, &call_peer); if(rc < 0 && errno == EWOULDBLOCK) { return rc; } if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CANNOT_SEND_MSG); delete this; } return rc; /* OK */ } /* This method is used to send messages that are not */ /* part of the XML scenario */ void call::sendBuffer(char * msg, int len) { /* call send_raw but with a special scenario index */ if (send_raw(msg, -1, len) < 0) { if (sendbuffer_warn) { ERROR_NO("Error sending raw message"); } else { WARNING_NO("Error sending raw message"); } } } char * call::get_header_field_code(const char *msg, const char * name) { static char code[MAX_HEADER_LEN]; const char * last_header; int i; last_header = NULL; i = 0; /* If we find the field in msg */ last_header = get_header_content(msg, name); if(last_header) { /* Extract the integer value of the field */ while(isspace(*last_header)) last_header++; sscanf(last_header,"%d", &i); sprintf(code, "%s %d", name, i); } return code; } char * call::get_last_header(const char * name) { int len; if((!last_recv_msg) || (!strlen(last_recv_msg))) { return NULL; } len = strlen(name); /* Ideally this check should be moved to the XML parser so that it is not * along a critical path. We could also handle lowercasing there. */ if (len > MAX_HEADER_LEN) { ERROR("call::get_last_header: Header to parse bigger than %d (%zu)", MAX_HEADER_LEN, strlen(name)); } if (name[len - 1] == ':') { return get_header(last_recv_msg, name, false); } else { char with_colon[MAX_HEADER_LEN]; sprintf(with_colon, "%s:", name); return get_header(last_recv_msg, with_colon, false); } } /* Return the last request URI from the To header. On any error returns the * empty string. The caller must free the result. */ char * call::get_last_request_uri() { char * tmp; char * tmp2; char * last_request_uri; int tmp_len; char * last_To = get_last_header("To:"); if (!last_To) { return strdup(""); } tmp = strchr(last_To, '<'); if (!tmp) { return strdup(""); } tmp++; tmp2 = strchr(last_To, '>'); if (!tmp2) { return strdup(""); } tmp_len = strlen(tmp) - strlen(tmp2); if (tmp_len < 0) { return strdup(""); } if (!(last_request_uri = (char *)malloc(tmp_len + 1))) { ERROR("Cannot allocate !\n"); } last_request_uri[0] = '\0'; if (tmp && (tmp_len > 0)) { strncpy(last_request_uri, tmp, tmp_len); } last_request_uri[tmp_len] = '\0'; return last_request_uri; } char * call::send_scene(int index, int *send_status, int *len) { #define MAX_MSG_NAME_SIZE 30 static char msg_name[MAX_MSG_NAME_SIZE]; char *L_ptr1 ; char *L_ptr2 ; int uselen = 0; int tmplen; char *hdrbdry; assert(send_status); /* Socket port must be known before string substitution */ if (!connect_socket_if_needed()) { *send_status = -2; return NULL; } assert(call_socket); assert(call_scenario->messages[index]->send_scheme); if (!len) { len = &uselen; } char * dest; dest = createSendingMessage(call_scenario->messages[index] -> send_scheme, index, len); if (!dest) { *send_status = -2; return NULL; } L_ptr1=msg_name ; L_ptr2=dest ; while ((*L_ptr2 != ' ') && (*L_ptr2 != '\n') && (*L_ptr2 != '\t')) { *L_ptr1 = *L_ptr2; L_ptr1 ++; L_ptr2 ++; } *L_ptr1 = '\0' ; if (strcmp(msg_name,"ACK") == 0) { call_established = true ; ack_is_pending = false ; } /* Fix: Remove extra "\r\n" if message body ends with "\r\n\r\n" */ tmplen = (*len) - 1; if ((dest[tmplen] == dest[tmplen-2] && dest[tmplen] == '\n') && (dest[tmplen-1] == dest[tmplen-3] && dest[tmplen-1] == '\r')) { hdrbdry = strstr(dest, "\r\n\r\n"); if (NULL != hdrbdry && hdrbdry != dest+(tmplen-3)) { *len = (*len) - 2; } } *send_status = send_raw(dest, index, *len); return dest; } void call::do_bookkeeping(message *curmsg) { /* If this message increments a counter, do it now. */ if(int counter = curmsg -> counter) { computeStat(CStat::E_ADD_GENERIC_COUNTER, 1, counter - 1); } /* If this message can be used to compute RTD, do it now */ if(int rtd = curmsg -> start_rtd) { start_time_rtd[rtd - 1] = getmicroseconds(); } if(int rtd = curmsg -> stop_rtd) { if (!rtd_done[rtd - 1]) { unsigned long long start = start_time_rtd[rtd - 1]; unsigned long long end = getmicroseconds(); if(dumpInRtt) { call_scenario->stats->computeRtt(start, end, rtd); } computeStat(CStat::E_ADD_RESPONSE_TIME_DURATION, (end - start) / 1000, rtd - 1); if (!curmsg -> repeat_rtd) { rtd_done[rtd - 1] = true; } } } } void call::tcpClose() { terminate(CStat::E_FAILED_TCP_CLOSED); } void call::terminate(CStat::E_Action reason) { char reason_str[100]; stopListening(); // Call end -> was it successful? if(call::last_action_result != call::E_AR_NO_ERROR) { switch(call::last_action_result) { case call::E_AR_REGEXP_DOESNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_DOESNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp match failure at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_REGEXP_SHOULDNT_MATCH: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_SHOULDNT_MATCH); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp matched, but shouldn't at index %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_HDR_NOT_FOUND: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_REGEXP_HDR_NOT_FOUND); if (deadcall_wait && !initCall) { sprintf(reason_str, "regexp header not found at index %d", msg_index); new deadcall(id, reason_str); } break; case E_AR_CONNECT_FAILED: computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TCP_CONNECT); if (deadcall_wait && !initCall) { sprintf(reason_str, "connection failed %d", msg_index); new deadcall(id, reason_str); } break; case call::E_AR_NO_ERROR: case call::E_AR_STOP_CALL: /* Do nothing. */ break; } } else { if (reason == CStat::E_CALL_SUCCESSFULLY_ENDED || timewait) { computeStat(CStat::E_CALL_SUCCESSFULLY_ENDED); if (deadcall_wait && !initCall) { new deadcall(id, "successful"); } } else { computeStat(CStat::E_CALL_FAILED); if (reason != CStat::E_NO_ACTION) { computeStat(reason); } if (deadcall_wait && !initCall) { sprintf(reason_str, "failed at index %d", msg_index); new deadcall(id, reason_str); } } } delete this; } bool call::next() { msgvec * msgs = &call_scenario->messages; if (initCall) { msgs = &call_scenario->initmessages; } int test; /* What is the next message index? */ /* Default without branching: use the next message */ int new_msg_index = msg_index + 1; /* If branch needed, overwrite this default */ if (msg_index >= 0 && ((*msgs)[msg_index]->next >= 0) && (((test = ((*msgs)[msg_index]->test)) == -1) || M_callVariableTable->getVar(test)->isSet())) { /* Branching possible, check the probability */ int chance = (*msgs)[msg_index]->chance; if ((chance <= 0) || (rand() > chance )) { /* Branch == overwrite with the 'next' attribute value */ new_msg_index = (*msgs)[msg_index]->next; } } msg_index = new_msg_index; recv_timeout = 0; if (msg_index >= (int)((*msgs).size())) { terminate(CStat::E_CALL_SUCCESSFULLY_ENDED); return false; } return true; } bool call::executeMessage(message *curmsg) { if (curmsg->pause_distribution || curmsg->pause_variable != -1) { unsigned int pause; if (curmsg->pause_distribution) { double actualpause = curmsg->pause_distribution->sample(); if (actualpause < 1) { // Protect against distribution samples that give // negative results (and so pause for ~50 hours when // cast to a unsigned int). pause = 0; } else { pause = (unsigned int)actualpause; }; } else { int varId = curmsg->pause_variable; pause = (int) M_callVariableTable->getVar(varId)->getDouble(); } if (pause > INT_MAX) { pause = INT_MAX; } paused_until = clock_tick + pause; /* This state is used as the last message of a scenario, just for handling * final retransmissions. If the connection closes, we do not mark it is * failed. */ this->timewait = curmsg->timewait; /* Increment the number of sessions in pause state */ curmsg->sessions++; do_bookkeeping(curmsg); executeAction(NULL, curmsg); callDebug("Pausing call until %d (is now %ld).\n", paused_until, clock_tick); setPaused(); return true; } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { int send_status; if(next_retrans) { return true; } send_status = sendCmdMessage(curmsg); if(send_status != 0) { /* Send error */ return false; /* call deleted */ } curmsg -> M_nbCmdSent++; next_retrans = 0; do_bookkeeping(curmsg); executeAction(NULL, curmsg); return(next()); } else if(curmsg -> M_type == MSG_TYPE_NOP) { callDebug("Executing NOP at index %d.\n", curmsg->index); do_bookkeeping(curmsg); executeAction(NULL, curmsg); return(next()); } else if(curmsg -> send_scheme) { char * msg_snd; int msgLen; int send_status; /* Do not send a new message until the previous one which had * retransmission enabled is acknowledged */ if(next_retrans) { setPaused(); return true; } /* Handle counters and RTDs for this message. */ do_bookkeeping(curmsg); /* decide whether to increment cseq or not * basically increment for anything except response, ACK or CANCEL * Note that cseq is only used by the [cseq] keyword, and * not by default */ int incr_cseq = 0; if (!curmsg->send_scheme->isAck() && !curmsg->send_scheme->isCancel() && !curmsg->send_scheme->isResponse()) { ++cseq; incr_cseq = 1; } msg_snd = send_scene(msg_index, &send_status, &msgLen); if(send_status < 0 && errno == EWOULDBLOCK) { if (incr_cseq) --cseq; /* Have we set the timeout yet? */ if (send_timeout) { /* If we have actually timed out. */ if (clock_tick > send_timeout) { WARNING("Call-Id: %s, send timeout on message %s:%d: aborting call", id, curmsg->desc, curmsg->index); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_SEND); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } } else if (curmsg->timeout) { /* Initialize the send timeout to the per message timeout. */ send_timeout = clock_tick + curmsg->timeout; } else if (defl_send_timeout) { /* Initialize the send timeout to the global timeout. */ send_timeout = clock_tick + defl_send_timeout; } return true; /* No step, nothing done, retry later */ } else if(send_status < 0) { /* Send error */ /* The call was already deleted by connect_socket_if_needed or send_raw, * so we should no longer access members. */ return false; } /* We have sent the message, so the timeout is no longer needed. */ send_timeout = 0; last_send_index = curmsg->index; last_send_len = msgLen; realloc_ptr = (char *) realloc(last_send_msg, msgLen+1); if (realloc_ptr) { last_send_msg = realloc_ptr; } else { free(last_send_msg); ERROR("Out of memory!"); return false; } memcpy(last_send_msg, msg_snd, msgLen); last_send_msg[msgLen] = '\0'; if (curmsg->start_txn) { transactions[curmsg->start_txn - 1].txnID = (char *)realloc(transactions[curmsg->start_txn - 1].txnID, MAX_HEADER_LEN); extract_transaction(transactions[curmsg->start_txn - 1].txnID, last_send_msg); } if (curmsg->ack_txn) { transactions[curmsg->ack_txn - 1].ackIndex = curmsg->index; } if(last_recv_index >= 0) { /* We are sending just after msg reception. There is a great * chance that we will be asked to retransmit this message */ recv_retrans_hash = last_recv_hash; recv_retrans_recv_index = last_recv_index; recv_retrans_send_index = curmsg->index; callDebug("Set Retransmission Hash: %lu (recv index %d, send index %d)\n", recv_retrans_hash, recv_retrans_recv_index, recv_retrans_send_index); /* Prevent from detecting the cause relation between send and recv * in the next valid send */ last_recv_hash = 0; } /* Update retransmission information */ if(curmsg -> retrans_delay) { if((transport == T_UDP) && (retrans_enabled)) { next_retrans = clock_tick + curmsg -> retrans_delay; nb_retrans = 0; nb_last_delay = curmsg->retrans_delay; } } else { next_retrans = 0; } executeAction(msg_snd, curmsg); /* Update scenario statistics */ curmsg -> nb_sent++; return next(); } else if (curmsg->M_type == MSG_TYPE_RECV || curmsg->M_type == MSG_TYPE_RECVCMD ) { if (queued_msg) { char *msg = queued_msg; queued_msg = NULL; bool ret = process_incoming(msg); free(msg); return ret; } else if (recv_timeout) { if(recv_timeout > getmilliseconds()) { setPaused(); return true; } recv_timeout = 0; curmsg->nb_timeout++; if (curmsg->on_timeout < 0) { // if you set a timeout but not a label, the call is aborted WARNING("Call-Id: %s, receive timeout on message %s:%d without label to jump to (ontimeout attribute): aborting call", id, curmsg->desc, curmsg->index); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_RECV); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } WARNING("Call-Id: %s, receive timeout on message %s:%d, jumping to label %d", id, curmsg->desc, curmsg->index, curmsg->on_timeout); /* FIXME: We should do something like set index here, but it probably * does not matter too much as only nops are allowed in the init stanza. */ msg_index = curmsg->on_timeout; recv_timeout = 0; if (msg_index < (int)call_scenario->messages.size()) return true; // special case - the label points to the end - finish the call computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_TIMEOUT_ON_RECV); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } else if (curmsg->timeout || defl_recv_timeout) { if (curmsg->timeout) // If timeout is specified on message receive, use it recv_timeout = getmilliseconds() + curmsg->timeout; else // Else use the default timeout if specified recv_timeout = getmilliseconds() + defl_recv_timeout; return true; } else { /* We are going to wait forever. */ setPaused(); } } else { WARNING("Unknown message type at %s:%d: %d", curmsg->desc, curmsg->index, curmsg->M_type); } return true; } bool call::run() { bool bInviteTransaction = false; assert(running); if (zombie) { delete this; return false; } getmilliseconds(); message *curmsg; if (initCall) { if(msg_index >= (int)call_scenario->initmessages.size()) { ERROR("Scenario initialization overrun for call %s (%p) (index = %d)\n", id, _RCAST(void*, this), msg_index); } curmsg = call_scenario->initmessages[msg_index]; } else { if(msg_index >= (int)call_scenario->messages.size()) { ERROR("Scenario overrun for call %s (%p) (index = %d)\n", id, _RCAST(void*, this), msg_index); } curmsg = call_scenario->messages[msg_index]; } callDebug("Processing message %d of type %d for call %s at %lu.\n", msg_index, curmsg->M_type, id, clock_tick); if (curmsg->condexec != -1) { bool exec = M_callVariableTable->getVar(curmsg->condexec)->isSet(); if (curmsg->condexec_inverse) { exec = !exec; } if (!exec) { callDebug("Conditional variable %s %s set, so skipping message %d.\n", call_scenario->allocVars->getName(curmsg->condexec), curmsg->condexec_inverse ? "" : "not", msg_index); return next(); } } /* Manages retransmissions or delete if max retrans reached */ if(next_retrans && (next_retrans < clock_tick)) { nb_retrans++; if ( (0 == strncmp (last_send_msg, "INVITE", 6)) ) { bInviteTransaction = true; } int rtAllowed = min(bInviteTransaction ? max_invite_retrans : max_non_invite_retrans, max_udp_retrans); callDebug("Retransmisison required (%d retransmissions, max %d)\n", nb_retrans, rtAllowed); if(nb_retrans > rtAllowed) { call_scenario->messages[last_send_index] -> nb_timeout ++; if (call_scenario->messages[last_send_index]->on_timeout >= 0) { // action on timeout WARNING("Call-Id: %s, timeout on max UDP retrans for message %d, jumping to label %d ", id, msg_index, call_scenario->messages[last_send_index]->on_timeout); msg_index = call_scenario->messages[last_send_index]->on_timeout; next_retrans = 0; recv_timeout = 0; if (msg_index < (int)call_scenario->messages.size()) { return true; } // here if asked to go to the last label delete the call computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_MAX_UDP_RETRANS); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { // Abort the call by sending proper SIP message return(abortCall(true)); } else { // Just delete existing call delete this; return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_MAX_UDP_RETRANS); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { // Abort the call by sending proper SIP message WARNING("Aborting call on UDP retransmission timeout for Call-ID '%s'", id); return(abortCall(true)); } else { // Just delete existing call delete this; return false; } } else { nb_last_delay *= 2; if (global_t2 < nb_last_delay) { if (!bInviteTransaction) { nb_last_delay = global_t2; } } if(send_raw(last_send_msg, last_send_index, last_send_len) < -1) { return false; } call_scenario->messages[last_send_index] -> nb_sent_retrans++; computeStat(CStat::E_RETRANSMISSION); next_retrans = clock_tick + nb_last_delay; } } if(paused_until) { /* Process a pending pause instruction until delay expiration */ if(paused_until > clock_tick) { callDebug("Call is paused until %d (now %ld).\n", paused_until, clock_tick); setPaused(); callDebug("Running: %d (wake %d).\n", running, wake()); return true; } /* Our pause is over. */ callDebug("Pause complete, waking up.\n"); paused_until = 0; return next(); } return executeMessage(curmsg); } const char *default_message_names[] = { "3pcc_abort", "ack", "ack2", "bye", "cancel", "200", }; const char *default_message_strings[] = { /* 3pcc_abort */ "call-id: [call_id]\ninternal-cmd: abort_call\n\n", /* ack */ "ACK [last_Request_URI] SIP/2.0\n" "[last_Via]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] ACK\n" "Contact: \n" "Max-Forwards: 70\n" "Subject: Performance Test\n" "Content-Length: 0\n\n", /* ack2, the only difference is Via, I don't quite know why. */ "ACK [last_Request_URI] SIP/2.0\n" "Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] ACK\n" "Contact: \n" "Max-Forwards: 70\n" "Subject: Performance Test\n" "Content-Length: 0\n\n", /* bye */ "BYE [last_Request_URI] SIP/2.0\n" "Via: SIP/2.0/[transport] [local_ip]:[local_port];branch=[branch]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number+1] BYE\n" "Max-Forwards: 70\n" "Contact: \n" "Content-Length: 0\n\n", /* cancel */ "CANCEL [last_Request_URI] SIP/2.0\n" "[last_Via]\n" "[last_From]\n" "[last_To]\n" "Call-ID: [call_id]\n" "CSeq: [last_cseq_number] CANCEL\n" "Max-Forwards: 70\n" "Contact: \n" "Content-Length: 0\n\n", /* 200 */ "SIP/2.0 200 OK\n" "[last_Via:]\n" "[last_From:]\n" "[last_To:]\n" "[last_Call-ID:]\n" "[last_CSeq:]\n" "Contact: \n" "Content-Length: 0\n\n" }; SendingMessage **default_messages; void init_default_messages() { int messages = sizeof(default_message_strings)/sizeof(default_message_strings[0]); default_messages = new SendingMessage* [messages]; for (int i = 0; i < messages; i++) { default_messages[i] = new SendingMessage(main_scenario, const_cast(default_message_strings[i])); } } void free_default_messages() { int messages = sizeof(default_message_strings)/sizeof(default_message_strings[0]); if (!default_messages) { return; } for (int i = 0; i < messages; i++) { delete default_messages[i]; } delete [] default_messages; } SendingMessage *get_default_message(const char *which) { int messages = sizeof(default_message_names)/sizeof(default_message_names[0]); for (int i = 0; i < messages; i++) { if (!strcmp(which, default_message_names[i])) { return default_messages[i]; } } ERROR("Internal Error: Unknown default message: %s!", which); } void set_default_message(const char *which, char *msg) { int messages = sizeof(default_message_names)/sizeof(default_message_names[0]); for (int i = 0; i < messages; i++) { if (!strcmp(which, default_message_names[i])) { default_message_strings[i] = msg; return; } } ERROR("Internal Error: Unknown default message: %s!", which); } bool call::process_unexpected(char * msg) { char buffer[MAX_HEADER_LEN]; char *desc = buffer; int res = 0; message *curmsg = call_scenario->messages[msg_index]; curmsg->nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "Aborting "); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "Continuing "); } desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "call on unexpected message for Call-Id '%s': ", id); if (curmsg -> M_type == MSG_TYPE_RECV) { if (curmsg -> recv_request) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting '%s' ", curmsg -> recv_request); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting '%d' ", curmsg -> recv_response); } } else if (curmsg -> M_type == MSG_TYPE_SEND) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while sending "); } else if (curmsg -> M_type == MSG_TYPE_PAUSE) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while pausing "); } else if (curmsg -> M_type == MSG_TYPE_SENDCMD) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while sending command "); } else if (curmsg -> M_type == MSG_TYPE_RECVCMD) { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while expecting command "); } else { desc += snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "while in message type %d ", curmsg->M_type); } snprintf(desc, MAX_HEADER_LEN - (desc - buffer), "(index %d)", msg_index); WARNING("%s, received '%s'", buffer, msg); TRACE_MSG("-----------------------------------------------\n" "Unexpected %s message received:\n\n%s\n", TRANSPORT_TO_STRING(transport), msg); callDebug("Unexpected %s message received (index %d, hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), msg_index, hash(msg), msg); if (get_reply_code(msg)) { this->call_scenario->stats->error_codes.push_back(get_reply_code(msg)); } if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res < 0) { WARNING("sendCmdBuffer returned %d", res); return false; } } // usage of last_ keywords => for call aborting realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, msg); computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { return (abortCall(true)); } else { delete this; return false; } } else { // Do not abort call nor send anything in reply if default behavior is disabled return false; } } void call::abort() { WARNING("Aborted call with Call-ID '%s'", id); abortCall(false); } bool call::abortCall(bool writeLog) { int is_inv; char * src_recv = NULL ; callDebug("Aborting call %s (index %d).\n", id, msg_index); if (last_send_msg != NULL) { is_inv = !strncmp(last_send_msg, "INVITE", 6); } else { is_inv = false; } if ((creationMode != MODE_SERVER) && (msg_index > 0)) { if ((call_established == false) && (is_inv)) { src_recv = last_recv_msg ; // Answer unexpected errors (4XX, 5XX and beyond) with an ACK // Contributed by F. Tarek Rogers if((src_recv) && (get_reply_code(src_recv) >= 400)) { sendBuffer(createSendingMessage(get_default_message("ack"), -2)); } else if (src_recv) { /* Call is not established and the reply is not a 4XX, 5XX */ /* And we already received a message. */ if (ack_is_pending == true) { /* If an ACK is expected from the other side, send it * and send a BYE afterwards */ ack_is_pending = false; /* Send an ACK */ sendBuffer(createSendingMessage(get_default_message("ack"), -1)); /* Send the BYE */ sendBuffer(createSendingMessage(get_default_message("bye"), -1)); } else { /* Send a CANCEL */ sendBuffer(createSendingMessage(get_default_message("cancel"), -1)); } } else { /* Call is not established and the reply is not a 4XX, 5XX */ /* and we didn't received any message. This is the case when */ /* we are aborting after having send an INVITE and not received */ /* any answer. */ /* Do nothing ! */ } } else if (last_recv_msg) { /* The call may not be established, if we haven't yet received a message, * because the earlier check depends on the first message being an INVITE * (although it could be something like a message message, therefore we * check that we received a message. */ sendBuffer(createSendingMessage(get_default_message("bye"), -1)); } } if (writeLog && useCallDebugf) { TRACE_CALLDEBUG ("-------------------------------------------------------------------------------\n"); TRACE_CALLDEBUG ("Call debugging information for call %s:\n", id); TRACE_CALLDEBUG("%s", debugBuffer); } stopListening(); if (deadcall_wait && !initCall) { char reason[100]; sprintf(reason, "aborted at index %d", msg_index); new deadcall(id, reason); } delete this; return false; } bool call::rejectCall() { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CALL_REJECTED); delete this; return false; } int call::sendCmdMessage(message *curmsg) { char * dest; char delimitor[2]; delimitor[0]=27; delimitor[1]=0; /* 3pcc extended mode */ char * peer_dest; struct sipp_socket **peer_socket; if(curmsg -> M_sendCmdData) { // WARNING("---PREPARING_TWIN_CMD---%s---", scenario[index] -> M_sendCmdData); dest = createSendingMessage(curmsg -> M_sendCmdData, -1); strcat(dest, delimitor); //WARNING("---SEND_TWIN_CMD---%s---", dest); int rc; /* 3pcc extended mode */ peer_dest = curmsg->peer_dest; if(peer_dest) { peer_socket = get_peer_socket(peer_dest); rc = write_socket(*peer_socket, dest, strlen(dest), WS_BUFFER, &call_peer); } else { rc = write_socket(twinSippSocket, dest, strlen(dest), WS_BUFFER, &call_peer); } if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CMD_NOT_SENT); delete this; return(-1); } return(0); } else return(-1); } int call::sendCmdBuffer(char* cmd) { char * dest; char delimitor[2]; int rc; delimitor[0]=27; delimitor[1]=0; dest = cmd ; strcat(dest, delimitor); rc = write_socket(twinSippSocket, dest, strlen(dest), WS_BUFFER, &twinSippSocket->ss_remote_sockaddr); if(rc < 0) { computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_CMD_NOT_SENT); delete this; return(-1); } return(0); } char* call::createSendingMessage(SendingMessage *src, int P_index, int *msgLen) { static char msg_buffer[SIPP_MAX_MSG_SIZE+2]; return createSendingMessage(src, P_index, msg_buffer, sizeof(msg_buffer), msgLen); } char* call::createSendingMessage(SendingMessage *src, int P_index, char *msg_buffer, int buf_len, int *msgLen) { char * length_marker = NULL; char * auth_marker = NULL; MessageComponent *auth_comp = NULL; bool auth_comp_allocated = false; int len_offset = 0; char *dest = msg_buffer; bool suppresscrlf = false; *dest = '\0'; for (int i = 0; i < src->numComponents(); i++) { MessageComponent *comp = src->getComponent(i); int left = buf_len - (dest - msg_buffer); switch(comp->type) { case E_Message_Literal: if (suppresscrlf) { char *ptr = comp->literal; while (isspace(*ptr)) ptr++; dest += snprintf(dest, left, "%s", ptr); suppresscrlf = false; } else { memcpy(dest, comp->literal, comp->literalLen); dest += comp->literalLen; *dest = '\0'; } break; case E_Message_Remote_IP: dest += snprintf(dest, left, "%s", remote_ip_escaped); break; case E_Message_Remote_Host: dest += snprintf(dest, left, "%s", remote_host); break; case E_Message_Remote_Port: dest += snprintf(dest, left, "%d", remote_port + comp->offset); break; case E_Message_Local_IP: dest += snprintf(dest, left, "%s", local_ip_escaped); break; case E_Message_Local_Port: int port; if((transport == T_UDP) && (multisocket) && (sendMode != MODE_SERVER)) { port = call_port; } else { port = local_port; } dest += snprintf(dest, left, "%d", port + comp->offset); break; case E_Message_Transport: dest += snprintf(dest, left, "%s", TRANSPORT_TO_STRING(transport)); break; case E_Message_Local_IP_Type: dest += snprintf(dest, left, "%s", (local_ip_is_ipv6 ? "6" : "4")); break; case E_Message_Server_IP: { /* We should do this conversion once per socket creation, rather than * repeating it every single time. */ struct sockaddr_storage server_sockaddr; sipp_socklen_t len = sizeof(server_sockaddr); getsockname(call_socket->ss_fd, (sockaddr *)(void *)&server_sockaddr, &len); char address[INET6_ADDRSTRLEN]; if (getnameinfo(_RCAST(sockaddr*, &server_sockaddr), len, address, sizeof(address), NULL, 0, NI_NUMERICHOST) < 0) { ERROR_NO("Unable to get socket name information"); } dest += snprintf(dest, left, "%s", address); } break; case E_Message_Media_IP: dest += snprintf(dest, left, "%s", media_ip_escaped); break; case E_Message_Media_Port: case E_Message_Auto_Media_Port: { int port = media_port + comp->offset; if (comp->type == E_Message_Auto_Media_Port) { port = media_port + (4 * (number - 1)) % 10000 + comp->offset; } #ifdef PCAPPLAY char *begin = dest; while (begin > msg_buffer) { if (*begin == '\n') { break; } begin--; } if (begin == msg_buffer) { ERROR("Can not find beginning of a line for the media port!\n"); } play_args_t *play_args = NULL; if (strstr(begin, "audio")) { play_args = &play_args_a; } else if (strstr(begin, "image")) { play_args = &play_args_i; } else if (strstr(begin, "video")) { play_args = &play_args_v; } else { ERROR("media_port keyword with no audio or video on the current line (%s)", begin); } if (media_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *, &(play_args->from)))->sin6_port = htons(port); } else { (_RCAST(struct sockaddr_in *, &(play_args->from)))->sin_port = htons(port); } #endif dest += sprintf(dest, "%u", port); break; } #ifdef RTP_STREAM case E_Message_RTPStream_Audio_Port: { int temp_audio_port= rtpstream_get_audioport (&rtpstream_callinfo); if (!temp_audio_port) { /* Make this a warning instead? */ ERROR("cannot assign a free audio port to this call - using 0 for [rtpstream_audio_port]"); } dest += snprintf(dest, left, "%d",temp_audio_port); } break; case E_Message_RTPStream_Video_Port: { int temp_video_port= rtpstream_get_videoport (&rtpstream_callinfo); if (!temp_video_port) { /* Make this a warning instead? */ ERROR("cannot assign a free video port to this call - using 0 for [rtpstream_video_port]"); } dest += snprintf(dest, left, "%d",temp_video_port); } break; #endif case E_Message_Media_IP_Type: dest += snprintf(dest, left, "%s", (media_ip_is_ipv6 ? "6" : "4")); break; case E_Message_Call_Number: dest += snprintf(dest, left, "%u", number); break; case E_Message_DynamicId: dest += snprintf(dest, left, "%u", call::dynamicId); // increment at each request dynamicId += stepDynamicId; if ( this->dynamicId > maxDynamicId ) { call::dynamicId = call::startDynamicId; } ; break; case E_Message_Call_ID: dest += snprintf(dest, left, "%s", id); break; case E_Message_CSEQ: dest += snprintf(dest, left, "%u", cseq + comp->offset); break; case E_Message_PID: dest += snprintf(dest, left, "%d", pid); break; case E_Message_Service: dest += snprintf(dest, left, "%s", service); break; case E_Message_Branch: /* Branch is magic cookie + call number + message index in scenario */ if(P_index == -2) { dest += snprintf(dest, left, "z9hG4bK-%u-%u-%d", pid, number, msg_index-1 + comp->offset); } else { dest += snprintf(dest, left, "z9hG4bK-%u-%u-%d", pid, number, P_index + comp->offset); } break; case E_Message_Index: dest += snprintf(dest, left, "%d", P_index); break; case E_Message_Next_Url: if (next_req_url) { dest += sprintf(dest, "%s", next_req_url); } break; case E_Message_Len: length_marker = dest; dest += snprintf(dest, left, " "); len_offset = comp->offset; break; case E_Message_Authentication: if (auth_marker) { ERROR("Only one [authentication] keyword is currently supported!\n"); } auth_marker = dest; dest += snprintf(dest, left, "[authentication place holder]"); auth_comp = comp; break; case E_Message_Peer_Tag_Param: if(peer_tag) { dest += snprintf(dest, left, ";tag=%s", peer_tag); } break; case E_Message_Routes: if (dialog_route_set) { dest += sprintf(dest, "Route: %s", dialog_route_set); } else if (*(dest - 1) == '\n') { suppresscrlf = true; } break; case E_Message_ClockTick: dest += snprintf(dest, left, "%lu", clock_tick); break; case E_Message_Timestamp: struct timeval currentTime; gettimeofday(¤tTime, NULL); dest += snprintf(dest, left, "%s", CStat::formatTime(¤tTime)); break; case E_Message_Date: char buf[256]; time_t t; struct tm *tm; t = time(NULL); tm = gmtime(&t); strftime(buf, 256, "%a, %d %b %Y %T %Z", tm); dest += snprintf(dest, left, "%s", buf); break; case E_Message_Users: dest += snprintf(dest, left, "%d", users); break; case E_Message_UserID: dest += snprintf(dest, left, "%d", userId); break; case E_Message_SippVersion: /* Drop the initial "v" from the VERSION string for legacy reasons. */ dest += snprintf(dest, left, "%s", (const char*)VERSION + 1); break; case E_Message_Variable: { int varId = comp->varId; CCallVariable *var = M_callVariableTable->getVar(varId); if(var->isSet()) { if (var->isRegExp()) { dest += sprintf(dest, "%s", var->getMatchingValue()); } else if (var->isDouble()) { dest += sprintf(dest, "%lf", var->getDouble()); } else if (var->isString()) { dest += sprintf(dest, "%s", var->getString()); } else if (var->isBool()) { dest += sprintf(dest, "true"); } } else if (var->isBool()) { dest += sprintf(dest, "false"); } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Fill: { int varId = comp->varId; int length = (int) M_callVariableTable->getVar(varId)->getDouble(); if (length < 0) { length = 0; } char *filltext = comp->literal; int filllen = strlen(filltext); if (filllen == 0) { ERROR("Internal error: [fill] keyword has zero-length text."); } for (int i = 0, j = 0; i < length; i++, j++) { *dest++ = filltext[j % filllen]; } *dest = '\0'; break; } case E_Message_File: { char buffer[MAX_HEADER_LEN]; createSendingMessage(comp->comp_param.filename, -2, buffer, sizeof(buffer)); FILE *f = fopen(buffer, "r"); if (!f) { ERROR("Could not open '%s': %s\n", buffer, strerror(errno)); } int ret; while ((ret = fread(dest, 1, left, f)) > 0) { left -= ret; dest += ret; } if (ret < 0) { ERROR("Error reading '%s': %s\n", buffer, strerror(errno)); } fclose(f); break; } case E_Message_Injection: { char *orig_dest = dest; getFieldFromInputFile(comp->comp_param.field_param.filename, comp->comp_param.field_param.field, comp->comp_param.field_param.line, dest); /* We are injecting an authentication line. */ if (char *tmp = strstr(orig_dest, "[authentication")) { if (auth_marker) { ERROR("Only one [authentication] keyword is currently supported!\n"); } auth_marker = tmp; auth_comp = (struct MessageComponent *)calloc(1, sizeof(struct MessageComponent)); if (!auth_comp) { ERROR("Out of memory!"); } auth_comp_allocated = true; tmp = strchr(auth_marker, ']'); char c = *tmp; *tmp = '\0'; SendingMessage::parseAuthenticationKeyword(call_scenario, auth_comp, auth_marker); *tmp = c; } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Last_Header: { char * last_header = get_last_header(comp->literal); if(last_header) { dest += sprintf(dest, "%s", last_header); } if (*(dest - 1) == '\n') { suppresscrlf = true; } break; } case E_Message_Custom: { dest += comp->comp_param.fxn(this, comp, dest, left); break; } case E_Message_Last_Message: if(last_recv_msg && strlen(last_recv_msg)) { dest += sprintf(dest, "%s", last_recv_msg); } break; case E_Message_Last_Request_URI: { char * last_request_uri = get_last_request_uri(); dest += sprintf(dest, "%s", last_request_uri); free(last_request_uri); break; } case E_Message_Last_CSeq_Number: { int last_cseq = 0; char *last_header = get_last_header("CSeq:"); if(last_header) { last_header += 5; /* Extract the integer value of the field */ while(isspace(*last_header)) last_header++; sscanf(last_header,"%d", &last_cseq); } dest += sprintf(dest, "%d", last_cseq + comp->offset); break; } case E_Message_TDM_Map: if (!use_tdmmap) ERROR("[tdmmap] keyword without -tdmmap parameter on command line"); dest += snprintf(dest, left, "%d.%d.%d/%d", tdm_map_x+(int((tdm_map_number)/((tdm_map_b+1)*(tdm_map_c+1))))%(tdm_map_a+1), tdm_map_h, tdm_map_y+(int((tdm_map_number)/(tdm_map_c+1)))%(tdm_map_b+1), tdm_map_z+(tdm_map_number)%(tdm_map_c+1) ); break; } } /* Need the body for length and auth-int calculation */ char *body; const char *auth_body = NULL; if (length_marker || auth_marker) { body = strstr(msg_buffer, "\r\n\r\n"); if (body) { auth_body = body; auth_body += strlen("\r\n\r\n"); } } if (!auth_body) { auth_body = ""; } /* Fix up the length. */ if (length_marker) { if (auth_marker > body) { ERROR("The authentication keyword should appear in the message header, not the body!"); } if (body && dest - body > 4 && dest - body < 100004) { char tmp = length_marker[5]; sprintf(length_marker, "%5u", (unsigned)(dest - body - 4 + len_offset)); length_marker[5] = tmp; } else { // Other cases: Content-Length is 0 sprintf(length_marker, " 0\r\n\r\n"); } } if (msgLen) { *msgLen = dest - msg_buffer; } /* * The authentication substitution must be done outside the above * loop because auth-int will use the body (which must have already * been keyword substituted) to build the md5 hash */ if (auth_marker) { if (!dialog_authentication) { ERROR("Authentication keyword without dialog_authentication!"); } int auth_marker_len; char * tmp; int authlen; auth_marker_len = (strchr(auth_marker, ']') + 1) - auth_marker; /* Need the Method name from the CSeq of the Challenge */ char method[MAX_HEADER_LEN]; tmp = get_last_header("CSeq:"); if(!tmp) { ERROR("Could not extract method from cseq of challenge"); } tmp += 5; while(isspace(*tmp) || isdigit(*tmp)) tmp++; sscanf(tmp,"%s", method); /* Determine the type of credentials. */ char result[MAX_HEADER_LEN]; if (dialog_challenge_type == 401) { /* Registrars use Authorization */ authlen = sprintf(result, "Authorization: "); } else { /* Proxies use Proxy-Authorization */ authlen = sprintf(result, "Proxy-Authorization: "); } /* Build the auth credenticals */ char uri[MAX_HEADER_LEN]; sprintf (uri, "%s:%d", remote_ip, remote_port); /* These cause this function to not be reentrant. */ static char my_auth_user[MAX_HEADER_LEN + 2]; static char my_auth_pass[MAX_HEADER_LEN + 2]; static char my_aka_OP[MAX_HEADER_LEN + 2]; static char my_aka_AMF[MAX_HEADER_LEN + 2]; static char my_aka_K[MAX_HEADER_LEN + 2]; createSendingMessage(auth_comp->comp_param.auth_param.auth_user, -2, my_auth_user, sizeof(my_auth_user)); createSendingMessage(auth_comp->comp_param.auth_param.auth_pass, -2, my_auth_pass, sizeof(my_auth_pass)); createSendingMessage(auth_comp->comp_param.auth_param.aka_K, -2, my_aka_K, sizeof(my_aka_K)); createSendingMessage(auth_comp->comp_param.auth_param.aka_AMF, -2, my_aka_AMF, sizeof(my_aka_AMF)); createSendingMessage(auth_comp->comp_param.auth_param.aka_OP, -2, my_aka_OP, sizeof(my_aka_OP)); if (createAuthHeader(my_auth_user, my_auth_pass, method, uri, auth_body, dialog_authentication, my_aka_OP, my_aka_AMF, my_aka_K, result + authlen) == 0) { ERROR("%s", result + authlen); } authlen = strlen(result); /* Shift the end of the message to its rightful place. */ memmove(auth_marker + authlen, auth_marker + auth_marker_len, strlen(auth_marker + auth_marker_len) + 1); /* Copy our result into the hole. */ memcpy(auth_marker, result, authlen); if (msgLen) { *msgLen += (authlen - auth_marker_len); } } if (auth_comp_allocated) { SendingMessage::freeMessageComponent(auth_comp); } return msg_buffer; } bool call::process_twinSippCom(char * msg) { int search_index; bool found = false; T_ActionResult actionResult; callDebug("Processing incoming command for call-ID %s:\n%s\n\n", id, msg); setRunning(); if (checkInternalCmd(msg) == false) { for(search_index = msg_index; search_index < (int)call_scenario->messages.size(); search_index++) { if(call_scenario->messages[search_index] -> M_type != MSG_TYPE_RECVCMD) { if ((call_scenario->messages[search_index] -> optional) || (call_scenario->messages[search_index] -> M_type == MSG_TYPE_NOP)) { continue; } /* The received message is different from the expected one */ TRACE_MSG("Unexpected control message received (I was expecting a different type of message):\n%s\n", msg); callDebug("Unexpected control message received (I was expecting a different type of message):\n%s\n\n", msg); return rejectCall(); } else { if(extendedTwinSippMode) { // 3pcc extended mode if(check_peer_src(msg, search_index)) { found = true; break; } else { WARNING("Unexpected sender for the received peer message \n%s\n", msg); return rejectCall(); } } else { found = true; break; } } } if (found) { call_scenario->messages[search_index]->M_nbCmdRecv ++; do_bookkeeping(call_scenario->messages[search_index]); // variable treatment // Remove \r, \n at the end of a received command // (necessary for transport, to be removed for usage) while ( (msg[strlen(msg)-1] == '\n') && (msg[strlen(msg)-2] == '\r') ) { msg[strlen(msg)-2] = 0; } actionResult = executeAction(msg, call_scenario->messages[search_index]); if(actionResult != call::E_AR_NO_ERROR) { // Store last action result if it is an error // and go on with the scenario call::last_action_result = actionResult; if (actionResult == E_AR_STOP_CALL) { return rejectCall(); } else if (actionResult == E_AR_CONNECT_FAILED) { terminate(CStat::E_FAILED_TCP_CONNECT); return false; } } } else { TRACE_MSG("Unexpected control message received (no such message found):\n%s\n", msg); callDebug("Unexpected control message received (no such message found):\n%s\n\n", msg); return rejectCall(); } msg_index = search_index; //update the state machine return(next()); } else { return (false); } } bool call::checkInternalCmd(char * cmd) { char * L_ptr1, * L_ptr2, L_backup; L_ptr1 = strstr(cmd, "internal-cmd:"); if (!L_ptr1) { return (false); } L_ptr1 += 13 ; while((*L_ptr1 == ' ') || (*L_ptr1 == '\t')) { L_ptr1++; } if (!(*L_ptr1)) { return (false); } L_ptr2 = L_ptr1; while((*L_ptr2) && (*L_ptr2 != ' ') && (*L_ptr2 != '\t') && (*L_ptr2 != '\r') && (*L_ptr2 != '\n')) { L_ptr2 ++; } if(!*L_ptr2) { return (false); } L_backup = *L_ptr2; *L_ptr2 = 0; if (strcmp(L_ptr1, "abort_call") == 0) { *L_ptr2 = L_backup; computeStat(CStat::E_CALL_FAILED); abortCall(true); return (true); } *L_ptr2 = L_backup; return (false); } bool call::check_peer_src(char * msg, int search_index) { char * L_ptr1, * L_ptr2, L_backup ; L_ptr1 = strstr(msg, "From:"); if (!L_ptr1) { return (false); } L_ptr1 += 5 ; while((*L_ptr1 == ' ') || (*L_ptr1 == '\t')) { L_ptr1++; } if (!(*L_ptr1)) { return (false); } L_ptr2 = L_ptr1; while((*L_ptr2) && (*L_ptr2 != ' ') && (*L_ptr2 != '\t') && (*L_ptr2 != '\r') && (*L_ptr2 != '\n')) { L_ptr2 ++; } if(!*L_ptr2) { return (false); } L_backup = *L_ptr2; *L_ptr2 = 0; if (strcmp(L_ptr1, call_scenario->messages[search_index] -> peer_src) == 0) { *L_ptr2 = L_backup; return(true); } *L_ptr2 = L_backup; return (false); } void call::extract_cseq_method (char* method, char* msg) { char* cseq ; if ((cseq = strstr (msg, "CSeq"))) { char * value ; if (( value = strchr (cseq, ':'))) { value++; while ( isspace(*value)) value++; // ignore any white spaces after the : while ( !isspace(*value)) value++; // ignore the CSEQ number while ( isspace(*value)) value++; // ignore spaces after CSEQ number char *end = value; int nbytes = 0; /* A '\r' terminates the line, so we want to catch that too. */ while ((*end != '\r') && (*end != '\n')) { end++; nbytes++; } if (nbytes > 0) strncpy (method, value, nbytes); method[nbytes] = '\0'; } } } void call::extract_transaction (char* txn, char* msg) { char *via = get_header_content(msg, "via:"); if (!via) { txn[0] = '\0'; return; } char *branch = strstr(via, ";branch="); if (!branch) { txn[0] = '\0'; return; } branch += strlen(";branch="); while (*branch && *branch != ';' && *branch != ',' && !isspace(*branch)) { *txn++ = *branch++; } *txn = '\0'; } void call::formatNextReqUrl (char* next_req_url) { /* clean up the next_req_url -- Record routes may have extra gunk that needs to be removed */ char* actual_req_url = strchr(next_req_url, '<'); if (actual_req_url) { /* using a temporary buffer */ char tempBuffer[MAX_HEADER_LEN]; strncpy(tempBuffer, actual_req_url + 1, sizeof(tempBuffer) - 1); actual_req_url = strrchr(tempBuffer, '>'); *actual_req_url = '\0'; strcpy(next_req_url, tempBuffer); } } void call::computeRouteSetAndRemoteTargetUri (char* rr, char* contact, bool bRequestIncoming) { if (0 >=strlen (rr)) { // // there are no RR headers. Simply set up the contact as our target uri // if (0 < strlen(contact)) { strcpy (next_req_url, contact); } formatNextReqUrl(next_req_url); return; } char actual_rr[MAX_HEADER_LEN]; char targetURI[MAX_HEADER_LEN]; memset(actual_rr, 0, sizeof(actual_rr)); bool isFirst = true; bool bCopyContactToRR = false; while (1) { char* pointer = NULL; if (bRequestIncoming) { pointer = strchr (rr, ','); } else { pointer = strrchr(rr, ','); } if (pointer) { if (!isFirst) { if (strlen(actual_rr) ) { strcat(actual_rr, pointer + 1); } else { strcpy(actual_rr, pointer + 1); } strcat(actual_rr, ","); } else { isFirst = false; if (NULL == strstr (pointer, ";lr")) { /* bottom most RR is the next_req_url */ strncpy(targetURI, pointer + 1, sizeof(targetURI) - 1); bCopyContactToRR = true; } else { /* the hop is a loose router. Thus, the target URI should be the * contact */ strcpy (targetURI, contact); strcpy(actual_rr, pointer + 1); strcat(actual_rr, ","); } } } else { if (!isFirst) { strcat(actual_rr, rr); } // // this is the *only* RR header that was found // else { if (NULL == strstr (rr, ";lr")) { /* bottom most RR is the next_req_url */ strcpy (targetURI, rr); bCopyContactToRR = true; } else { /* the hop is a loose router. Thus, the target URI should be the * contact */ strcpy (actual_rr, rr); strcpy (targetURI, contact); } } break; } *pointer = '\0'; } if (bCopyContactToRR) { if (0 < strlen (actual_rr)) { strcat(actual_rr, ","); strcat(actual_rr, contact); } else { strcpy(actual_rr, contact); } } if (strlen(actual_rr)) { dialog_route_set = (char *) calloc(1, strlen(actual_rr) + 2); sprintf(dialog_route_set, "%s", actual_rr); } if (strlen (targetURI)) { strcpy (next_req_url, targetURI); formatNextReqUrl (next_req_url); } } bool call::matches_scenario(unsigned int index, int reply_code, char * request, char * responsecseqmethod, char *txn) { message *curmsg = call_scenario->messages[index]; if ((curmsg -> recv_request)) { if (curmsg->regexp_match) { if (curmsg -> regexp_compile == NULL) { regex_t *re = new regex_t; if (regcomp(re, curmsg -> recv_request, REG_EXTENDED|REG_NOSUB)) { ERROR("Invalid regular expression for index %d: %s", index, curmsg->recv_request); } curmsg -> regexp_compile = re; } return !regexec(curmsg -> regexp_compile, request, (size_t)0, NULL, 0); } else { return !strcmp(curmsg -> recv_request, request); } } else if (curmsg->recv_response && (curmsg->recv_response == reply_code)) { /* This is a potential candidate, we need to match transactions. */ if (curmsg->response_txn) { if (transactions[curmsg->response_txn - 1].txnID && !strcmp(transactions[curmsg->response_txn - 1].txnID, txn)) { return true; } else { return false; } } else if (index == 0) { /* Always true for the first message. */ return true; } else if (curmsg->recv_response_for_cseq_method_list && strstr(curmsg->recv_response_for_cseq_method_list, responsecseqmethod)) { /* If we do not have a transaction defined, we just check the CSEQ method. */ return true; } else { return false; } } return false; } void call::queue_up(char *msg) { free(queued_msg); queued_msg = strdup(msg); } bool call::process_incoming(char * msg, struct sockaddr_storage *src) { int reply_code; static char request[65]; char responsecseqmethod[65]; char txn[MAX_HEADER_LEN]; unsigned long cookie = 0; char * ptr; int search_index; bool found = false; T_ActionResult actionResult; getmilliseconds(); callDebug("Processing %zu byte incoming message for call-ID %s (hash %lu):\n%s\n\n", strlen(msg), id, hash(msg), msg); setRunning(); /* Ignore the messages received during a pause if -pause_msg_ign is set */ if(call_scenario->messages[msg_index] -> M_type == MSG_TYPE_PAUSE && pause_msg_ign) return(true); /* Get our destination if we have none. */ if (call_peer.ss_family == AF_UNSPEC && src) { memcpy(&call_peer, src, SOCK_ADDR_SIZE(src)); } /* Authorize nop as a first command, even in server mode */ if((msg_index == 0) && (call_scenario->messages[msg_index] -> M_type == MSG_TYPE_NOP)) { queue_up (msg); paused_until = 0; return run(); } responsecseqmethod[0] = '\0'; txn[0] = '\0'; /* Check that we have a To:-header */ if (!get_header(msg, "To:", false)[0] && !process_unexpected(msg)) { return false; } if ((transport == T_UDP) && (retrans_enabled)) { /* Detects retransmissions from peer and retransmit the * message which was sent just after this one was received */ cookie = hash(msg); if((recv_retrans_recv_index >= 0) && (recv_retrans_hash == cookie)) { int status; if(lost(recv_retrans_recv_index)) { TRACE_MSG("%s message (retrans) lost (recv).", TRANSPORT_TO_STRING(transport)); callDebug("%s message (retrans) lost (recv) (hash %lu)\n", TRANSPORT_TO_STRING(transport), hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[recv_retrans_recv_index] -> nb_lost++; return true; } call_scenario->messages[recv_retrans_recv_index] -> nb_recv_retrans++; send_scene(recv_retrans_send_index, &status, NULL); if(status >= 0) { call_scenario->messages[recv_retrans_send_index] -> nb_sent_retrans++; computeStat(CStat::E_RETRANSMISSION); } else if(status < 0) { return false; } return true; } if((last_recv_index >= 0) && (last_recv_hash == cookie)) { /* This one has already been received, but not processed * yet => (has not triggered something yet) so we can discard. * * This case appears when the UAS has send a 200 but not received * a ACK yet. Thus, the UAS retransmit the 200 (invite transaction) * until it receives a ACK. In this case, it nevers sends the 200 * from the BYE, until it has reveiced the previous 200. Thus, * the UAC retransmit the BYE, and this BYE is considered as an * unexpected. * * This case can also appear in case of message duplication by * the network. This should not be considered as an unexpected. */ call_scenario->messages[last_recv_index]->nb_recv_retrans++; return true; } } #ifdef RTP_STREAM /* Check if message has a SDP in it; and extract media information. */ if (!strcmp(get_header_content(msg, (char*)"Content-Type:"),"application/sdp") && (hasMedia == 1)) { extract_rtp_remote_addr(msg); } #endif /* Is it a response ? */ if((msg[0] == 'S') && (msg[1] == 'I') && (msg[2] == 'P') && (msg[3] == '/') && (msg[4] == '2') && (msg[5] == '.') && (msg[6] == '0') ) { reply_code = get_reply_code(msg); if(!reply_code) { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } #ifdef PCAPPLAY } else if ((hasMedia == 1) && *(strstr(msg, "\r\n\r\n")+4) != '\0') { /* Get media info if we find something like an SDP */ get_remote_media_addr(msg); #endif } /* It is a response: update peer_tag */ ptr = get_peer_tag(msg); if (ptr) { if(strlen(ptr) > (MAX_HEADER_LEN - 1)) { ERROR("Peer tag too long. Change MAX_HEADER_LEN and recompile sipp"); } if(peer_tag) { free(peer_tag); } peer_tag = strdup(ptr); if (!peer_tag) { ERROR("Out of memory allocating peer tag."); } } request[0]=0; // extract the cseq method from the response extract_cseq_method (responsecseqmethod, msg); extract_transaction (txn, msg); } else if((ptr = strchr(msg, ' '))) { if((ptr - msg) < 64) { memcpy(request, msg, ptr - msg); request[ptr - msg] = 0; // Check if we received an ACK => call established if (strcmp(request,"ACK")==0) { call_established=true; } #ifdef PCAPPLAY /* In case of INVITE or re-INVITE, ACK or PRACK get the media info if needed (= we got a pcap play action) */ if (((strncmp(request, "INVITE", 6) == 0) || (strncmp(request, "ACK", 3) == 0) || (strncmp(request, "PRACK", 5) == 0)) && (hasMedia == 1)) get_remote_media_addr(msg); #endif reply_code = 0; } else { ERROR("SIP method too long in received message '%s'", msg); } } else { ERROR("Invalid sip message received '%s'", msg); } /* Try to find it in the expected non mandatory responses * until the first mandatory response in the scenario */ for(search_index = msg_index; search_index < (int)call_scenario->messages.size(); search_index++) { if(!matches_scenario(search_index, reply_code, request, responsecseqmethod, txn)) { if(call_scenario->messages[search_index] -> optional) { continue; } /* The received message is different for the expected one */ break; } found = true; /* TODO : this is a little buggy: If a 100 trying from an INVITE * is delayed by the network until the BYE is sent, it may * stop BYE transmission erroneously, if the BYE also expects * a 100 trying. */ break; } /* Try to find it in the old non-mandatory receptions */ if(!found) { bool contig = true; for(search_index = msg_index - 1; search_index >= 0; search_index--) { if (call_scenario->messages[search_index]->optional == OPTIONAL_FALSE) contig = false; if(matches_scenario(search_index, reply_code, request, responsecseqmethod, txn)) { if (contig || call_scenario->messages[search_index]->optional == OPTIONAL_GLOBAL) { found = true; break; } else { if (int checkTxn = call_scenario->messages[search_index]->response_txn) { /* This is a reply to an old transaction. */ if (!strcmp(transactions[checkTxn - 1].txnID, txn)) { /* This reply is provisional, so it should have no effect if we recieve it out-of-order. */ if (reply_code >= 100 && reply_code <= 199) { TRACE_MSG("-----------------------------------------------\n" "Ignoring provisional %s message for transaction %s:\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, msg); callDebug("Ignoring provisional %s message for transaction %s (hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); return true; } else if (int ackIndex = transactions[checkTxn - 1].ackIndex) { /* This is the message before an ACK, so verify that this is an invite transaction. */ assert (call_scenario->transactions[checkTxn - 1].isInvite); sendBuffer(createSendingMessage(call_scenario->messages[ackIndex] -> send_scheme, ackIndex)); return true; } else { assert (!call_scenario->transactions[checkTxn - 1].isInvite); /* This is a non-provisional message for the transaction, and * we have already gotten our allowable response. Just make sure * that it is not a retransmission of the final response. */ if (transactions[checkTxn - 1].txnResp == hash(msg)) { /* We have gotten this retransmission out-of-order, let's just ignore it. */ TRACE_MSG("-----------------------------------------------\n" "Ignoring final %s message for transaction %s:\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, msg); callDebug("Ignoring final %s message for transaction %s (hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); WARNING("Ignoring final %s message for transaction %s (hash %lu):\n\n%s\n", TRANSPORT_TO_STRING(transport), call_scenario->transactions[checkTxn - 1].name, hash(msg), msg); return true; } } } } else { /* * we received a non mandatory msg for an old transaction (this could be due to a retransmit. * If this response is for an INVITE transaction, retransmit the ACK to quench retransmits. */ if ( (reply_code) && (0 == strncmp (responsecseqmethod, "INVITE", strlen(responsecseqmethod)) ) && (call_scenario->messages[search_index+1]->M_type == MSG_TYPE_SEND) && (call_scenario->messages[search_index+1]->send_scheme->isAck()) ) { sendBuffer(createSendingMessage(call_scenario->messages[search_index+1] -> send_scheme, (search_index+1))); return true; } } } } } } /* If it is still not found, process an unexpected message */ if(!found) { if (call_scenario->unexpected_jump >= 0) { bool recursive = false; if (call_scenario->retaddr >= 0) { if (M_callVariableTable->getVar(call_scenario->retaddr)->getDouble() != 0) { /* We are already in a jump! */ recursive = true; } else { M_callVariableTable->getVar(call_scenario->retaddr)->setDouble(msg_index); } } if (!recursive) { if (call_scenario->pausedaddr >= 0) { M_callVariableTable->getVar(call_scenario->pausedaddr)->setDouble(paused_until); } msg_index = call_scenario->unexpected_jump; queue_up(msg); paused_until = 0; return run(); } else { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } } } else { T_AutoMode L_case; if ((L_case = checkAutomaticResponseMode(request)) == 0) { if (!process_unexpected(msg)) { return false; // Call aborted by unexpected message handling } } else { // call aborted by automatic response mode if needed return automaticResponseMode(L_case, msg); } } } int test = (!found) ? -1 : call_scenario->messages[search_index]->test; /* test==0: No branching" * test==-1 branching without testing" * test>0 branching with testing */ /* Simulate loss of messages */ if(lost(search_index)) { TRACE_MSG("%s message lost (recv).", TRANSPORT_TO_STRING(transport)); callDebug("%s message lost (recv) (hash %lu).\n", TRANSPORT_TO_STRING(transport), hash(msg)); if(comp_state) { comp_free(&comp_state); } call_scenario->messages[search_index] -> nb_lost++; return true; } /* If we are part of a transaction, mark this as the final response. */ if (int checkTxn = call_scenario->messages[search_index]->response_txn) { transactions[checkTxn - 1].txnResp = hash(msg); } /* Handle counters and RTDs for this message. */ do_bookkeeping(call_scenario->messages[search_index]); /* Increment the recv counter */ call_scenario->messages[search_index] -> nb_recv++; // Action treatment if (found) { //WARNING("---EXECUTE_ACTION_ON_MSG---%s---", msg); actionResult = executeAction(msg, call_scenario->messages[search_index]); if(actionResult != call::E_AR_NO_ERROR) { // Store last action result if it is an error // and go on with the scenario call::last_action_result = actionResult; if (actionResult == E_AR_STOP_CALL) { return rejectCall(); } else if (actionResult == E_AR_CONNECT_FAILED) { terminate(CStat::E_FAILED_TCP_CONNECT); return false; } } } if (*request) { // update [cseq] with received CSeq unsigned long int rcseq = get_cseq_value(msg); if (rcseq > cseq) cseq = rcseq; } /* This is an ACK/PRACK or a response, and its index is greater than the * current active retransmission message, so we stop the retrans timer. * True also for CANCEL and BYE that we also want to answer to */ if(((reply_code) || ((!strcmp(request, "ACK")) || (!strcmp(request, "CANCEL")) || (!strcmp(request, "BYE")) || (!strcmp(request, "PRACK")))) && (search_index > last_send_index)) { /* * We should stop any retransmission timers on receipt of a provisional response only for INVITE * transactions. Non INVITE transactions continue to retransmit at T2 until a final response is * received */ if ( (0 == reply_code) || // means this is a request. (200 <= reply_code) || // final response ((0 != reply_code) && (0 == strncmp (responsecseqmethod, "INVITE", strlen(responsecseqmethod)))) ) { // prov for INVITE next_retrans = 0; } else { /* * We are here due to a provisional response for non INVITE. Update our next retransmit. */ next_retrans = clock_tick + global_t2; nb_last_delay = global_t2; } } /* This is a response with 200 so set the flag indicating that an * ACK is pending (used to prevent from release a call with CANCEL * when an ACK+BYE should be sent instead) */ if (reply_code == 200) { ack_is_pending = true; } /* store the route set only once. TODO: does not support target refreshes!! */ if (call_scenario->messages[search_index] -> bShouldRecordRoutes && NULL == dialog_route_set ) { realloc_ptr = (char*) realloc(next_req_url, MAX_HEADER_LEN); if (realloc_ptr) { next_req_url = realloc_ptr; } else { free(next_req_url); ERROR("Out of memory!"); return false; } char rr[MAX_HEADER_LEN]; memset(rr, 0, sizeof(rr)); strncpy(rr, get_header_content(msg, (char*)"Record-Route:"), sizeof(rr) - 1); // WARNING("rr [%s]", rr); char ch[MAX_HEADER_LEN]; strncpy(ch, get_header_content(msg, (char*)"Contact:"), sizeof(rr) - 1); /* decorate the contact with '<' and '>' if it does not have it */ char* contDecorator = strchr(ch, '<'); if (NULL == contDecorator) { char tempBuffer[MAX_HEADER_LEN]; sprintf(tempBuffer, "<%s>", ch); strcpy(ch, tempBuffer); } /* should cache the route set */ if (reply_code) { computeRouteSetAndRemoteTargetUri (rr, ch, false); } else { computeRouteSetAndRemoteTargetUri (rr, ch, true); } // WARNING("next_req_url is [%s]", next_req_url); } /* store the authentication info */ if ((call_scenario->messages[search_index] -> bShouldAuthenticate) && (reply_code == 401 || reply_code == 407)) { /* is a challenge */ char auth[MAX_HEADER_LEN]; memset(auth, 0, sizeof(auth)); strncpy(auth, get_header_content(msg, (char*)"Proxy-Authenticate:"), sizeof(auth) - 1); if (auth[0] == 0) { strncpy(auth, get_header_content(msg, (char*)"WWW-Authenticate:"), sizeof(auth) - 1); } if (auth[0] == 0) { ERROR("Couldn't find 'Proxy-Authenticate' or 'WWW-Authenticate' in 401 or 407!"); } realloc_ptr = (char *) realloc(dialog_authentication, strlen(auth) + 2); if (realloc_ptr) { dialog_authentication = realloc_ptr; } else { free(dialog_authentication); ERROR("Out of memory!"); return false; } sprintf(dialog_authentication, "%s", auth); /* Store the code of the challenge for building the proper header */ dialog_challenge_type = reply_code; } /* If we are not advancing state, we should quite before we change this stuff. */ if (!call_scenario->messages[search_index]->advance_state) { return true; } /* Store last received message information for all messages so that we can * correctly identify retransmissions, and use its body for inclusion * in our messages. */ last_recv_index = search_index; last_recv_hash = cookie; callDebug("Set Last Recv Hash: %lu (recv index %d)\n", last_recv_hash, last_recv_index); realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, msg); /* If this was a mandatory message, or if there is an explicit next label set * we must update our state machine. */ if (!call_scenario->messages[search_index]->optional || (call_scenario->messages[search_index]->next && (test == -1 || M_callVariableTable->getVar(test)->isSet()))) { /* If we are paused, then we need to wake up so that we properly go through the state machine. */ paused_until = 0; msg_index = search_index; return next(); } else { unsigned int timeout = wake(); unsigned int candidate; if (call_scenario->messages[search_index]->next && M_callVariableTable->getVar(test)->isSet()) { WARNING("Last message generates an error and will not be used for next sends (for last_ variables):\r\n%s",msg); } /* We are just waiting for a message to be received, if any of the * potential messages have a timeout we set it as our timeout. We * start from the next message and go until any non-receives. */ for(search_index++; search_index < (int)call_scenario->messages.size(); search_index++) { if(call_scenario->messages[search_index] -> M_type != MSG_TYPE_RECV) { break; } candidate = call_scenario->messages[search_index] -> timeout; if (candidate == 0) { if (defl_recv_timeout == 0) { continue; } candidate = defl_recv_timeout; } if (!timeout || (clock_tick + candidate < timeout)) { timeout = clock_tick + candidate; } } setPaused(); } return true; } double call::get_rhs(CAction *currentAction) { if (currentAction->getVarInId()) { return M_callVariableTable->getVar(currentAction->getVarInId())->getDouble(); } else { return currentAction->getDoubleValue(); } } call::T_ActionResult call::executeAction(char * msg, message *curmsg) { CActions* actions; CAction* currentAction; actions = curmsg->M_actions; // looking for action to do on this message if(actions == NULL) { return(call::E_AR_NO_ERROR); } for(int i=0; igetActionSize(); i++) { currentAction = actions->getAction(i); if(currentAction == NULL) { continue; } if(currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_REGEXP) { char msgPart[MAX_SUB_MESSAGE_LENGTH]; /* Where to look. */ char *haystack; if(currentAction->getLookingPlace() == CAction::E_LP_HDR) { extractSubMessage (msg, currentAction->getLookingChar(), msgPart, currentAction->getCaseIndep(), currentAction->getOccurrence(), currentAction->getHeadersOnly()); if(currentAction->getCheckIt() == true && (strlen(msgPart) == 0)) { // the sub message is not found and the checking action say it // MUST match --> Call will be marked as failed but will go on WARNING("Failed regexp match: header %s not found in message %s\n", currentAction->getLookingChar(), msg); return(call::E_AR_HDR_NOT_FOUND); } haystack = msgPart; } else if(currentAction->getLookingPlace() == CAction::E_LP_BODY) { haystack = strstr(msg, "\r\n\r\n"); if (!haystack) { if (currentAction->getCheckIt() == true) { WARNING("Failed regexp match: body not found in message %s\n", msg); return(call::E_AR_HDR_NOT_FOUND); } msgPart[0] = '\0'; haystack = msgPart; } haystack += strlen("\r\n\r\n"); } else if(currentAction->getLookingPlace() == CAction::E_LP_MSG) { haystack = msg; } else if(currentAction->getLookingPlace() == CAction::E_LP_VAR) { /* Get the input variable. */ haystack = M_callVariableTable->getVar(currentAction->getVarInId())->getString(); if (!haystack) { if (currentAction->getCheckIt() == true) { WARNING("Failed regexp match: variable $%d not set\n", currentAction->getVarInId()); return(call::E_AR_HDR_NOT_FOUND); } } } else { ERROR("Invalid looking place: %d\n", currentAction->getLookingPlace()); } bool did_match = (currentAction->executeRegExp(haystack, M_callVariableTable) > 0); if (!did_match && currentAction->getCheckIt()) { // the message doesn't match and the checkit action say it MUST match // Allow easier regexp debugging WARNING("Failed regexp match: looking in '%s', with regexp '%s'", haystack, currentAction->getRegularExpression()); return(call::E_AR_REGEXP_DOESNT_MATCH); } else if (did_match && currentAction->getCheckItInverse()) { // The inverse of the above WARNING("Regexp matched but should not: looking in '%s', with regexp '%s'", haystack, currentAction->getRegularExpression()); return(call::E_AR_REGEXP_SHOULDNT_MATCH); } } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_VALUE) { double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(operand); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_INDEX) { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(msg_index); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_GETTIMEOFDAY) { struct timeval tv; gettimeofday(&tv, NULL); M_callVariableTable->getVar(currentAction->getVarId())->setDouble((double)tv.tv_sec); M_callVariableTable->getVar(currentAction->getSubVarId(0))->setDouble((double)tv.tv_usec); } else if (currentAction->getActionType() == CAction::E_AT_LOOKUP) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *key = strdup(createSendingMessage(currentAction->getMessage(1), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for insert: %s", file); } double value = inFiles[file]->lookup(key); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); free(file); free(key); } else if (currentAction->getActionType() == CAction::E_AT_INSERT) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *value = strdup(createSendingMessage(currentAction->getMessage(1), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for insert: %s", file); } inFiles[file]->insert(value); free(file); free(value); } else if (currentAction->getActionType() == CAction::E_AT_REPLACE) { /* Create strings from the sending messages. */ char *file = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *line = strdup(createSendingMessage(currentAction->getMessage(1), -2)); char *value = strdup(createSendingMessage(currentAction->getMessage(2), -2)); if (inFiles.find(file) == inFiles.end()) { ERROR("Invalid injection file for replace: %s", file); } char *endptr; int lineNum = (int)strtod(line, &endptr); if (*endptr) { ERROR("Invalid line number for replace: %s", line); } inFiles[file]->replace(lineNum, value); free(file); free(line); free(value); } else if (currentAction->getActionType() == CAction::E_AT_CLOSE_CON) { if (call_socket) { sipp_socket_invalidate(call_socket); sipp_close_socket(call_socket); call_socket = NULL; } } else if (currentAction->getActionType() == CAction::E_AT_SET_DEST) { /* Change the destination for this call. */ char *str_host = strdup(createSendingMessage(currentAction->getMessage(0), -2)); char *str_port = strdup(createSendingMessage(currentAction->getMessage(1), -2)); char *str_protocol = strdup(createSendingMessage(currentAction->getMessage(2), -2)); char *endptr; int port = (int)strtod(str_port, &endptr); if (*endptr) { ERROR("Invalid port for setdest: %s", str_port); } int protocol; if (!strcmp(str_protocol, "udp") || !strcmp(str_protocol, "UDP")) { protocol = T_UDP; } else if (!strcmp(str_protocol, "tcp") || !strcmp(str_protocol, "TCP")) { protocol = T_TCP; } else if (!strcmp(str_protocol, "tls") || !strcmp(str_protocol, "TLS")) { protocol = T_TLS; } else if (!strcmp(str_protocol, "sctp") || !strcmp(str_protocol, "SCTP")) { protocol = T_SCTP; } else { ERROR("Unknown transport for setdest: '%s'", str_protocol); } if (!call_socket && ((protocol == T_TCP && transport == T_TCP) || (protocol == T_SCTP && transport == T_SCTP))) { bool existing; if ((associate_socket(new_sipp_call_socket(use_ipv6, transport, &existing))) == NULL) { switch (protocol) { case T_SCTP: ERROR_NO("Unable to get a SCTP socket"); break; default: ERROR_NO("Unable to get a TCP socket"); } } if (!existing) { sipp_customize_socket(call_socket); } } if (!call_socket) { ERROR("Unable to get a socket"); } if (protocol != call_socket->ss_transport) { ERROR("Can not switch protocols during setdest."); } if (protocol == T_UDP) { /* Nothing to do. */ } else if (protocol == T_TLS) { ERROR("Changing destinations is not supported for TLS."); } else if (protocol == T_TCP || protocol == T_SCTP) { if (!multisocket) { ERROR("Changing destinations for TCP or SCTP requires multisocket mode."); } if (call_socket->ss_count > 1) { ERROR("Can not change destinations for a TCP/SCTP socket that has more than one user."); } } struct addrinfo hints; struct addrinfo * local_addr; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; is_ipv6 = false; if (getaddrinfo(str_host, NULL, &hints, &local_addr) != 0) { ERROR("Unknown host '%s' for setdest", str_host); } if (_RCAST(struct sockaddr_storage *, local_addr->ai_addr)->ss_family != call_peer.ss_family) { ERROR("Can not switch between IPv4 and IPV6 using setdest!"); } memcpy(&call_peer, local_addr->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage*, local_addr->ai_addr))); freeaddrinfo(local_addr); if (call_peer.ss_family == AF_INET) { (_RCAST(struct sockaddr_in*, &call_peer))->sin_port = htons(port); } else { (_RCAST(struct sockaddr_in6*, &call_peer))->sin6_port = htons(port); } memcpy(&call_socket->ss_dest, &call_peer, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage*, &call_peer))); free(str_host); free(str_port); free(str_protocol); if (protocol == T_TCP || protocol == T_SCTP) { close(call_socket->ss_fd); call_socket->ss_fd = -1; call_socket->ss_changed_dest = true; if (sipp_reconnect_socket(call_socket)) { if (reconnect_allowed()) { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ WARNING("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { WARNING("Unable to connect a TCP/SCTP/TLS socket"); } /* This connection failed. We must be in multisocket mode, because * otherwise we would already have a call_socket. This call can not * succeed, but does not affect any of our other calls. We do decrement * the reconnection counter however. */ if (reset_number != -1) { reset_number--; } return E_AR_CONNECT_FAILED; } else { if(errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR("Unable to connect a TCP/SCTP/TLS socket, remote peer error"); } else { ERROR_NO("Unable to connect a TCP/SCTP/TLS socket"); } } } } } else if (currentAction->getActionType() == CAction::E_AT_VERIFY_AUTH) { bool result; char *lf; char *end; lf = strchr(msg, '\n'); end = strchr(msg, ' '); if (!lf || !end) { result = false; } else if (lf < end) { result = false; } else { char *auth = get_header(msg, "Authorization:", true); char *method = (char *)malloc(end - msg + 1); strncpy(method, msg, end - msg); method[end - msg] = '\0'; /* Generate the username to verify it against. */ char *tmp = createSendingMessage(currentAction->getMessage(0), -2 /* do not add crlf*/); char *username = strdup(tmp); /* Generate the password to verify it against. */ tmp= createSendingMessage(currentAction->getMessage(1), -2 /* do not add crlf*/); char *password = strdup(tmp); /* Need the body for length and auth-int calculation */ char *body; const char *auth_body = NULL; body = strstr(msg, "\r\n\r\n"); if (body) { auth_body = body; auth_body += strlen("\r\n\r\n"); } else { auth_body = ""; } result = verifyAuthHeader(username, password, method, auth, auth_body); free(username); free(password); free(method); } M_callVariableTable->getVar(currentAction->getVarId())->setBool(result); } else if (currentAction->getActionType() == CAction::E_AT_JUMP) { double operand = get_rhs(currentAction); if (msg_index == ((int)operand)) { ERROR("Jump statement at index %d jumps to itself and causes an infinite loop", msg_index); } msg_index = (int)operand - 1; /* -1 is allowed to go to the first label, but watch out * when using msg_index. */ if (msg_index < -1 || msg_index >= (int)call_scenario->messages.size()) { ERROR("Jump statement out of range (not 0 <= %d <= %zu)", msg_index + 1, call_scenario->messages.size()); } } else if (currentAction->getActionType() == CAction::E_AT_PAUSE_RESTORE) { double operand = get_rhs(currentAction); paused_until = (int)operand; } else if (currentAction->getActionType() == CAction::E_AT_VAR_ADD) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value + operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_SUBTRACT) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value - operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_MULTIPLY) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value * operand); } else if (currentAction->getActionType() == CAction::E_AT_VAR_DIVIDE) { double value = M_callVariableTable->getVar(currentAction->getVarId())->getDouble(); double operand = get_rhs(currentAction); if (operand == 0) { WARNING("Action failure: Can not divide by zero ($%d/$%d)!\n", currentAction->getVarId(), currentAction->getVarInId()); } else { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value / operand); } } else if (currentAction->getActionType() == CAction::E_AT_VAR_TEST) { double value = currentAction->compare(M_callVariableTable); M_callVariableTable->getVar(currentAction->getVarId())->setBool(value); } else if (currentAction->getActionType() == CAction::E_AT_VAR_STRCMP) { char *rhs = M_callVariableTable->getVar(currentAction->getVarInId())->getString(); char *lhs; if (currentAction->getVarIn2Id()) { lhs = M_callVariableTable->getVar(currentAction->getVarIn2Id())->getString(); } else { lhs = currentAction->getStringValue(); } int value = strcmp(rhs, lhs); M_callVariableTable->getVar(currentAction->getVarId())->setDouble((double)value); } else if (currentAction->getActionType() == CAction::E_AT_VAR_TRIM) { CCallVariable *var = M_callVariableTable->getVar(currentAction->getVarId()); char *in = var->getString(); char *p = in; while (isspace(*p)) { p++; } char *q = strdup(p); var->setString(q); int l = strlen(q); for (int i = l - 1; (i >= 0) && isspace(q[i]); i--) { q[i] = '\0'; } } else if (currentAction->getActionType() == CAction::E_AT_VAR_TO_DOUBLE) { double value; if (M_callVariableTable->getVar(currentAction->getVarInId())->toDouble(&value)) { M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); } else { WARNING("Invalid double conversion from $%d to $%d", currentAction->getVarInId(), currentAction->getVarId()); } } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_SAMPLE) { double value = currentAction->getDistribution()->sample(); M_callVariableTable->getVar(currentAction->getVarId())->setDouble(value); } else if (currentAction->getActionType() == CAction::E_AT_ASSIGN_FROM_STRING) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); char *str = strdup(x); if (!str) { ERROR("Out of memory duplicating string for assignment!"); } M_callVariableTable->getVar(currentAction->getVarId())->setString(str); } else if (currentAction->getActionType() == CAction::E_AT_LOG_TO_FILE) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); LOG_MSG("%s\n", x); } else if (currentAction->getActionType() == CAction::E_AT_LOG_WARNING) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); WARNING("%s", x); } else if (currentAction->getActionType() == CAction::E_AT_LOG_ERROR) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); ERROR("%s", x); } else if (currentAction->getActionType() == CAction::E_AT_EXECUTE_CMD) { char* x = createSendingMessage(currentAction->getMessage(), -2 /* do not add crlf*/); // TRACE_MSG("Trying to execute [%s]", x); pid_t l_pid; switch(l_pid = fork()) { case -1: // error when forking ! ERROR_NO("Forking error main"); break; case 0: // first child process - execute the command if((l_pid = fork()) < 0) { ERROR_NO("Forking error child"); } else { if( l_pid == 0) { int ret; ret = system(x); // second child runs if(ret == -1) { WARNING("system call error for %s",x); } } exit(EXIT_OTHER); } break; default: // parent process continue // reap first child immediately pid_t ret; while ((ret=waitpid(l_pid, NULL, 0)) != l_pid) { if (ret != -1) { ERROR("waitpid returns %1d for child %1d",ret,l_pid); } } break; } } else if (currentAction->getActionType() == CAction::E_AT_EXEC_INTCMD) { switch (currentAction->getIntCmd()) { case CAction::E_INTCMD_STOP_ALL: quitting = 1; break; case CAction::E_INTCMD_STOP_NOW: sipp_exit(EXIT_TEST_RES_INTERNAL); break; case CAction::E_INTCMD_STOPCALL: default: return(call::E_AR_STOP_CALL); break; } #ifdef PCAPPLAY } else if ((currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) || (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_IMAGE) || (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO)) { play_args_t *play_args; if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_AUDIO) { play_args = &(this->play_args_a); } else if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_IMAGE) { play_args = &(this->play_args_i); } else if (currentAction->getActionType() == CAction::E_AT_PLAY_PCAP_VIDEO) { play_args = &(this->play_args_v); } else { ERROR("Can't find pcap data to play"); } play_args->pcap = currentAction->getPcapPkts(); /* port number is set in [auto_]media_port interpolation */ if (media_ip_is_ipv6) { struct sockaddr_in6 *from = (struct sockaddr_in6 *)(void *) &(play_args->from); from->sin6_family = AF_INET6; inet_pton(AF_INET6, media_ip, &(from->sin6_addr)); } else { struct sockaddr_in *from = (struct sockaddr_in *)(void *) &(play_args->from); from->sin_family = AF_INET; from->sin_addr.s_addr = inet_addr(media_ip); } /* Create a thread to send RTP or UDPTL packets */ pthread_attr_t attr; pthread_attr_init(&attr); #ifndef PTHREAD_STACK_MIN #define PTHREAD_STACK_MIN 16384 #endif //pthread_attr_setstacksize(&attr, PTHREAD_STACK_MIN); if (media_thread != 0) { // If a media_thread is already active, kill it before starting a new one pthread_cancel(media_thread); pthread_join(media_thread, NULL); media_thread = 0; } int ret = pthread_create(&media_thread, &attr, send_wrapper, (void *) play_args); if(ret) ERROR("Can't create thread to send RTP packets"); pthread_attr_destroy(&attr); #endif #ifdef RTP_STREAM } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_PAUSE) { rtpstream_pause (&rtpstream_callinfo); } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_RESUME) { rtpstream_resume (&rtpstream_callinfo); } else if (currentAction->getActionType() == CAction::E_AT_RTP_STREAM_PLAY) { rtpstream_play (&rtpstream_callinfo,currentAction->getRTPStreamActInfo()); #endif } else { ERROR("call::executeAction unknown action"); } } // end for return(call::E_AR_NO_ERROR); } void call::extractSubMessage(char * msg, char * matchingString, char* result, bool case_indep, int occurrence, bool headers) { char *ptr, *ptr1; int sizeOf; int i = 0; int len = strlen(matchingString); char mat1 = tolower(*matchingString); char mat2 = toupper(*matchingString); ptr = msg; while (*ptr) { if (!case_indep) { ptr = strstr(ptr, matchingString); if (ptr == NULL) break; if (headers == true && ptr != msg && *(ptr-1) != '\n') { ++ptr; continue; } } else { if (headers) { if (ptr != msg) { ptr = strchr(ptr, '\n'); if (ptr == NULL) break; ++ptr; if (*ptr == 0) break; } } else { ptr1 = strchr(ptr, mat1); ptr = strchr(ptr, mat2); if (ptr == NULL) { if (ptr1 == NULL) break; ptr = ptr1; } else { if (ptr1 != NULL && ptr1 < ptr) ptr = ptr1; } } if (strncasecmp(ptr, matchingString, len) != 0) { ++ptr; continue; } } // here with ptr pointing to a matching string if (occurrence <= 1) break; --occurrence; ++ptr; } if(ptr != NULL && *ptr != 0) { strncpy(result, ptr+len, MAX_SUB_MESSAGE_LENGTH); sizeOf = strlen(result); if(sizeOf >= MAX_SUB_MESSAGE_LENGTH) sizeOf = MAX_SUB_MESSAGE_LENGTH-1; while((i inFiles[fileName]->numLines()) { line = -1; } } if (line < 0) { return; } dest += inFiles[fileName]->getField(line, field, dest, SIPP_MAX_MSG_SIZE); } call::T_AutoMode call::checkAutomaticResponseMode(char * P_recv) { if (strcmp(P_recv, "BYE")==0) { return E_AM_UNEXP_BYE; } else if (strcmp(P_recv, "CANCEL") == 0) { return E_AM_UNEXP_CANCEL; } else if (strcmp(P_recv, "PING") == 0) { return E_AM_PING; } else if (auto_answer && ((strcmp(P_recv, "INFO") == 0) || (strcmp(P_recv, "NOTIFY") == 0) || (strcmp(P_recv, "OPTIONS") == 0) || (strcmp(P_recv, "UPDATE") == 0))) { return E_AM_AA; } else { return E_AM_DEFAULT; } } void call::setLastMsg(const char *msg) { realloc_ptr = (char *) realloc(last_recv_msg, strlen(msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return; } strcpy(last_recv_msg, msg); } bool call::automaticResponseMode(T_AutoMode P_case, char * P_recv) { int res ; char * old_last_recv_msg = NULL; bool last_recv_msg_saved = false; switch (P_case) { case E_AM_UNEXP_BYE: // response for an unexpected BYE // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); // The BYE is unexpected, count it call_scenario->messages[msg_index] -> nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { WARNING("Aborting call on an unexpected BYE for call: %s", (id==NULL)?"none":id); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { sendBuffer(createSendingMessage(get_default_message("200"), -1)); } // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); delete this; } else { WARNING("Continuing call on an unexpected BYE for call: %s", (id==NULL)?"none":id); } break ; case E_AM_UNEXP_CANCEL: // response for an unexpected cancel // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); // The CANCEL is unexpected, count it call_scenario->messages[msg_index] -> nb_unexp++; if (default_behaviors & DEFAULT_BEHAVIOR_ABORTUNEXP) { WARNING("Aborting call on an unexpected CANCEL for call: %s", (id==NULL)?"none":id); if (default_behaviors & DEFAULT_BEHAVIOR_BYE) { sendBuffer(createSendingMessage(get_default_message("200"), -1)); } // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } computeStat(CStat::E_CALL_FAILED); computeStat(CStat::E_FAILED_UNEXPECTED_MSG); delete this; } else { WARNING("Continuing call on unexpected CANCEL for call: %s", (id==NULL)?"none":id); } break ; case E_AM_PING: // response for a random ping // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); if (default_behaviors & DEFAULT_BEHAVIOR_PINGREPLY) { WARNING("Automatic response mode for an unexpected PING for call: %s", (id==NULL)?"none":id); sendBuffer(createSendingMessage(get_default_message("200"), -1)); // Note: the call ends here but it is not marked as bad. PING is a // normal message. // if twin socket call => reset the other part here if (twinSippSocket && (msg_index > 0)) { res = sendCmdBuffer(createSendingMessage(get_default_message("3pcc_abort"), -1)); if (res) { WARNING("sendCmdBuffer returned %d", res); return false; } } CStat::globalStat(CStat::E_AUTO_ANSWERED); delete this; } else { WARNING("Do not answer on an unexpected PING for call: %s", (id==NULL)?"none":id); } break ; case E_AM_AA: // response for a random INFO, NOTIFY, OPTIONS or UPDATE // store previous last msg if msg is INFO, NOTIFY, OPTIONS or UPDATE // restore last_recv_msg to previous one // after sending ok old_last_recv_msg = NULL; if (last_recv_msg != NULL) { last_recv_msg_saved = true; old_last_recv_msg = (char *) malloc(strlen(last_recv_msg)+1); strcpy(old_last_recv_msg,last_recv_msg); } // usage of last_ keywords realloc_ptr = (char *) realloc(last_recv_msg, strlen(P_recv) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); free(old_last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, P_recv); WARNING("Automatic response mode for an unexpected INFO, NOTIFY, OPTIONS or UPDATE for call: %s", (id == NULL) ? "none" : id); sendBuffer(createSendingMessage(get_default_message("200"), -1)); // restore previous last msg if (last_recv_msg_saved == true) { realloc_ptr = (char *) realloc(last_recv_msg, strlen(old_last_recv_msg) + 1); if (realloc_ptr) { last_recv_msg = realloc_ptr; } else { free(last_recv_msg); ERROR("Out of memory!"); return false; } strcpy(last_recv_msg, old_last_recv_msg); if (old_last_recv_msg != NULL) { free(old_last_recv_msg); old_last_recv_msg = NULL; } } CStat::globalStat(CStat::E_AUTO_ANSWERED); return true; break; default: ERROR("Internal error for automaticResponseMode - mode %d is not implemented!", P_case); break ; } return false; } #ifdef PCAPPLAY void *send_wrapper(void *arg) { play_args_t *s = (play_args_t *) arg; //struct sched_param param; //int ret; //param.sched_priority = 10; //ret = pthread_setschedparam(pthread_self(), SCHED_RR, ¶m); //if(ret) // ERROR("Can't set RTP play thread realtime parameters"); pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); pthread_setcanceltype(PTHREAD_CANCEL_DEFERRED, NULL); send_packets(s); pthread_exit(NULL); return NULL; } #endif sipp-3.5.1/src/sipp_unittest.cpp0000644000175000017500000000261312672462535015750 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Rob Day - 11 May 2014 */ #define GLOBALS_FULL_DEFINITION #include "sipp.hpp" #include "gtest/gtest.h" #include "gmock/gmock.h" #include namespace testing { std::string FLAGS_gmock_verbose = "verbose"; } int main(int argc, char* argv[]) { globalVariables = new AllocVariableTable(NULL); userVariables = new AllocVariableTable(globalVariables); main_scenario = new scenario(0, 0); ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); } /* Quickfix to fix unittests that depend on sipp_exit availability, * now that sipp_exit has been moved into sipp.cpp which is not * included. */ void sipp_exit(int rc) { exit(rc); } sipp-3.5.1/src/message.cpp0000644000175000017500000004772512672462535014477 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Stefan Esser * Andy Aicken */ #include "sipp.hpp" #include "message.hpp" struct KeywordMap { const char *keyword; MessageCompType type; }; typedef std::map kw_map; kw_map keyword_map; /* These keywords take no parameters. */ struct KeywordMap SimpleKeywords[] = { {"remote_ip", E_Message_Remote_IP }, {"remote_host", E_Message_Remote_Host }, {"remote_port", E_Message_Remote_Port }, {"transport", E_Message_Transport }, {"local_ip", E_Message_Local_IP }, {"local_ip_type", E_Message_Local_IP_Type }, {"local_port", E_Message_Local_Port }, {"server_ip", E_Message_Server_IP }, {"media_ip", E_Message_Media_IP }, #ifdef PCAPPLAY {"auto_media_port", E_Message_Auto_Media_Port }, #endif #ifdef RTP_STREAM {"rtpstream_audio_port", E_Message_RTPStream_Audio_Port }, {"rtpstream_video_port", E_Message_RTPStream_Video_Port }, #endif {"media_port", E_Message_Media_Port }, {"media_ip_type", E_Message_Media_IP_Type }, {"call_number", E_Message_Call_Number }, {"dynamic_id", E_Message_DynamicId }, // wrapping global counter {"call_id", E_Message_Call_ID }, {"cseq", E_Message_CSEQ }, {"pid", E_Message_PID }, {"service", E_Message_Service }, {"branch", E_Message_Branch }, {"msg_index", E_Message_Index }, {"next_url", E_Message_Next_Url }, {"len", E_Message_Len }, {"peer_tag_param", E_Message_Peer_Tag_Param }, {"last_Request_URI", E_Message_Last_Request_URI }, {"last_cseq_number", E_Message_Last_CSeq_Number }, {"last_message", E_Message_Last_Message }, {"routes", E_Message_Routes }, {"tdmmap", E_Message_TDM_Map }, {"clock_tick", E_Message_ClockTick }, {"users", E_Message_Users }, {"userid", E_Message_UserID }, {"timestamp", E_Message_Timestamp }, {"date", E_Message_Date }, {"sipp_version", E_Message_SippVersion }, }; #define KEYWORD_SIZE 256 static char* quoted_strchr(const char* s, int c) { const char* p; for (p = s; *p && *p != c; p++) { if (*p == '"') { p++; p += strcspn(p, "\""); } } return *p == c ? const_cast(p) : NULL; } SendingMessage::SendingMessage(scenario *msg_scenario, char *const_src, bool skip_sanity) { char * src = strdup(const_src); char * osrc = src; char * literal; int literalLen; char * dest; char * key; char current_line[MAX_HEADER_LEN]; char * line_mark = NULL; char * tsrc; int num_cr = get_cr_number(src); this->msg_scenario = msg_scenario; dest = literal = (char *)malloc(strlen(src) + num_cr + 1); current_line[0] = '\0'; *dest = 0; while(*src) { if (current_line[0] == '\0') { line_mark = strchr(src, '\n'); if (line_mark) { int header_len = line_mark - src; if (header_len > MAX_HEADER_LEN-1) header_len = MAX_HEADER_LEN-1; memcpy(current_line, src, header_len); current_line[header_len] = '\0'; } } /* This hex encoding could be done in XML parsing, allowing us to skip * these conditionals and branches. */ if ((*src == '\\') && (*(src+1) == 'x')) { /* Allows any hex coded char like '\x5B' ([) */ src += 2; if (isxdigit(*src)) { int val = get_decimal_from_hex(*src); src++; if (isxdigit(*src)) { val = (val << 4) + get_decimal_from_hex(*src); } *dest++ = val & 0xff; } src++; } else if (*src == '\n') { *dest++ = '\r'; *dest++ = *src++; current_line[0] = '\0'; } else if (*src != '[') { *dest++ = *src++; } else { /* We have found a keyword, store the literal that we have been generating. */ literalLen = dest - literal; if (literalLen) { *dest = '\0'; literal = (char *)realloc(literal, literalLen + 1); if (!literal) { ERROR("Out of memory!"); } MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } newcomp->type = E_Message_Literal; newcomp->literal = literal; newcomp->literalLen = literalLen; // length without the terminator messageComponents.push_back(newcomp); } else { free(literal); } dest = literal = (char *)malloc(strlen(src) + num_cr + 1); *dest = '\0'; /* Now lets determine which keyword we have. */ MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } char keyword [KEYWORD_SIZE+1]; src++; tsrc = quoted_strchr(src, '['); key = quoted_strchr(src, ']'); if ((tsrc) && (tsrc KEYWORD_SIZE) || (!(key - src))) { ERROR("Syntax error or invalid [keyword] in scenario while parsing '%s'", current_line); } memcpy(keyword, src, key - src); keyword[key - src] = 0; src = key + 1; // allow +/-n for numeric variables newcomp->offset = 0; if ((strncmp(keyword, "authentication", strlen("authentication")) && strncmp(keyword, "tdmmap", strlen("tdmmap"))) && ((key = strchr(keyword,'+')) || (key = strchr(keyword,'-')))) { if (isdigit(*(key+1))) { newcomp->offset = atoi(key); *key = 0; } } char *spc = NULL; char ospc; if ((spc = strchr(keyword, ' '))) { ospc = *spc; *spc = '\0'; } kw_map::iterator it = keyword_map.find(keyword); if (spc) { *spc = ospc; } if (it != keyword_map.end()) { newcomp->type = E_Message_Custom; newcomp->comp_param.fxn = it->second; messageComponents.push_back(newcomp); continue; } bool simple_keyword = false; for (unsigned int i = 0; i < sizeof(SimpleKeywords)/sizeof(SimpleKeywords[0]); i++) { if (!strcmp(keyword, SimpleKeywords[i].keyword)) { newcomp->type = SimpleKeywords[i].type; simple_keyword = true; break; } } if (simple_keyword) { messageComponents.push_back(newcomp); continue; } if(!strncmp(keyword, "field", strlen("field"))) { newcomp->type = E_Message_Injection; /* Parse out the interesting things like file and number. */ newcomp->comp_param.field_param.field = atoi(keyword + strlen("field")); char fileName[KEYWORD_SIZE]; getKeywordParam(keyword, "file=", fileName); if (fileName[0] == '\0') { if (!default_file) { ERROR("No injection file was specified!\n"); } newcomp->comp_param.field_param.filename = strdup(default_file); } else { newcomp->comp_param.field_param.filename = strdup(fileName); } if (inFiles.find(newcomp->comp_param.field_param.filename) == inFiles.end()) { ERROR("Invalid injection file: %s\n", fileName); } char line[KEYWORD_SIZE]; getKeywordParam(keyword, "line=", line); if (line[0]) { /* Turn this into a new message component. */ newcomp->comp_param.field_param.line = new SendingMessage(msg_scenario, line, true); } } else if(!strncmp(keyword, "file", strlen("file"))) { newcomp->type = E_Message_File; /* Parse out the interesting things like file and number. */ char fileName[KEYWORD_SIZE]; getKeywordParam(keyword, "name=", fileName); if (fileName[0] == '\0') { ERROR("No name specified for 'file' keyword!\n"); } /* Turn this into a new message component. */ newcomp->comp_param.filename = new SendingMessage(msg_scenario, fileName, true); } else if(*keyword == '$') { newcomp->type = E_Message_Variable; if (!msg_scenario) { ERROR("SendingMessage with variable usage outside of scenario!"); } newcomp->varId = msg_scenario->get_var(keyword + 1, "Variable keyword"); } else if(!strncmp(keyword, "fill", strlen("fill"))) { newcomp->type = E_Message_Fill; char filltext[KEYWORD_SIZE]; char varName[KEYWORD_SIZE]; getKeywordParam(keyword, "text=", filltext); if (filltext[0] == '\0') { strcpy(filltext, "X"); } getKeywordParam(keyword, "variable=", varName); newcomp->literal = strdup(filltext); newcomp->literalLen = strlen(newcomp->literal); if (!msg_scenario) { ERROR("SendingMessage with variable usage outside of scenario!"); } newcomp->varId = msg_scenario->get_var(varName, "Fill Variable"); } else if(!strncmp(keyword, "last_", strlen("last_"))) { newcomp->type = E_Message_Last_Header; newcomp->literal = strdup(keyword + strlen("last_")); newcomp->literalLen = strlen(newcomp->literal); } else if(!strncmp(keyword, "authentication", strlen("authentication"))) { parseAuthenticationKeyword(msg_scenario, newcomp, keyword); } #ifndef PCAPPLAY else if(!strcmp(keyword, "auto_media_port")) { ERROR("The %s keyword requires PCAPPLAY.\n", keyword); } #endif else { // scan for the generic parameters - must be last test int i = 0; while (generic[i]) { char *msg1 = *generic[i]; char *msg2 = *(generic[i] + 1); if(!strcmp(keyword, msg1)) { newcomp->type = E_Message_Literal; newcomp->literal = strdup(msg2); newcomp->literalLen = strlen(newcomp->literal); break; } ++i; } if (!generic[i]) { ERROR("Unsupported keyword '%s' in xml scenario file", keyword); } } messageComponents.push_back(newcomp); } } if (literal[0]) { *dest++ = '\0'; literalLen = dest - literal; literal = (char *)realloc(literal, literalLen); if (!literal) { ERROR("Out of memory!"); } MessageComponent *newcomp = (MessageComponent *)calloc(1, sizeof(MessageComponent)); if (!newcomp) { ERROR("Out of memory!"); } newcomp->type = E_Message_Literal; newcomp->literal = literal; newcomp->literalLen = literalLen-1; messageComponents.push_back(newcomp); } else { free(literal); } if (skip_sanity) { cancel = response = ack = false; method = NULL; free(osrc); return; } if (numComponents() < 1) { ERROR("Can not create a message that is empty!"); } if (getComponent(0)->type != E_Message_Literal) { ERROR("You can not use a keyword for the METHOD or to generate \"SIP/2.0\" to ensure proper [cseq] operation!\n%s\n", osrc); } char *p = method = strdup(getComponent(0)->literal); char *q; while (isspace(*p)) { p++; } if (!(q = strchr(method, ' '))) { ERROR("You can not use a keyword for the METHOD or to generate \"SIP/2.0\" to ensure proper [cseq] operation!%s\n", osrc); } *q++ = '\0'; while (isspace(*q)) { q++; } if (!strcmp(method, "SIP/2.0")) { char *endptr; code = strtol(q, &endptr, 10); if (*endptr && !isspace(*endptr)) { ERROR("Invalid reply code: %s\n", q); } if (code < 100 || code >= 700) { ERROR("Response codes must be in the range of 100-700"); } response = true; ack = false; cancel = false; free(method); method = NULL; } else { if (p != method) { memmove(method, p, strlen(p) + 1); } method = (char *)realloc(method, strlen(method) + 1); if (!method) { ERROR("Out of memory"); } ack = (!strcmp(method, "ACK")); cancel = (!strcmp(method, "CANCEL")); response = false; }; free(osrc); } SendingMessage::~SendingMessage() { for (int i = 0; i < numComponents(); i++) { freeMessageComponent(messageComponents[i]); } free(method); } bool SendingMessage::isAck() { return ack; } bool SendingMessage::isCancel() { return cancel; } bool SendingMessage::isResponse() { return response; } char *SendingMessage::getMethod() { return method; } int SendingMessage::getCode() { return code; } void SendingMessage::getQuotedParam(char * dest, char * src, int * len) { *len=0; /* Allows any hex coded string like '0x5B07F6' */ while (char c = *src++) { switch(c) { case '"': (*len)++; *dest = '\0'; return; case '\\': c = *src++; (*len)++; if (c == 0) { *dest = '\0'; return; } /* Fall-Through. */ default: *dest++ = c; (*len)++; } } *dest = '\0'; } void SendingMessage::getHexStringParam(char * dest, char * src, int * len) { *len=0; /* Allows any hex coded string like '0x5B07F6' */ while (isxdigit(*src)) { int val = get_decimal_from_hex(*src); src++; if (isxdigit(*src)) { val = (val << 4) + get_decimal_from_hex(*src); src++; } *dest++ = val & 0xff; (*len)++; } } void SendingMessage::getKeywordParam(char * src, const char * param, char * output) { char *key, *tmp; int len; len = 0; key = NULL; if ((tmp = strstr(src, param))) { tmp += strlen(param); key = tmp; if ((*key == '0') && (*(key+1) == 'x')) { key += 2; getHexStringParam(output, key, &len); } else if (*key == '\"') { key++; getQuotedParam(output, key, &len); } else { while (*key) { if (((key - src) > KEYWORD_SIZE) || (!(key - src))) { ERROR("Syntax error parsing '%s' parameter", param); } else if (*key == ']' || *key < 33 || *key > 126) { break; } key++; } strncpy(output, tmp, key-tmp); output[key-tmp] = '\0'; } } else { output[0] = '\0'; } } void SendingMessage::parseAuthenticationKeyword(scenario *msg_scenario, struct MessageComponent *dst, char *keyword) { char my_auth_user[KEYWORD_SIZE + 1]; char my_auth_pass[KEYWORD_SIZE + 1]; char my_aka[KEYWORD_SIZE + 1]; dst->type = E_Message_Authentication; memset(my_auth_user,0,KEYWORD_SIZE); memset(my_auth_pass,0,KEYWORD_SIZE); /* Look for optional username and password parameters */ getKeywordParam(keyword, "username=", my_auth_user); getKeywordParam(keyword, "password=", my_auth_pass); if(*my_auth_user == '\0') { strncpy(my_auth_user, auth_username ? auth_username : service, sizeof(my_auth_user) - 1); } if(*my_auth_pass == '\0') { strncpy(my_auth_pass, auth_password, sizeof(my_auth_pass) - 1); } dst->comp_param.auth_param.auth_user = new SendingMessage(msg_scenario, my_auth_user, true /* skip sanity */); dst->comp_param.auth_param.auth_pass = new SendingMessage(msg_scenario, my_auth_pass, true); /* add aka_OP, aka_AMF, aka_K */ getKeywordParam(keyword, "aka_K=", my_aka); if (my_aka[0]==0) { memcpy(my_aka,my_auth_pass,16); my_aka[16]=0; } dst->comp_param.auth_param.aka_K = new SendingMessage(msg_scenario, my_aka, true); getKeywordParam(keyword, "aka_OP=", my_aka); dst->comp_param.auth_param.aka_OP = new SendingMessage(msg_scenario, my_aka, true); getKeywordParam(keyword, "aka_AMF=", my_aka); dst->comp_param.auth_param.aka_AMF = new SendingMessage(msg_scenario, my_aka, true); } void SendingMessage::freeMessageComponent(struct MessageComponent *comp) { free(comp->literal); if (comp->type == E_Message_Authentication) { if (comp->comp_param.auth_param.auth_user) { delete comp->comp_param.auth_param.auth_user; } if (comp->comp_param.auth_param.auth_pass) { delete comp->comp_param.auth_param.auth_pass; } if (comp->comp_param.auth_param.aka_K) { delete comp->comp_param.auth_param.aka_K; } if (comp->comp_param.auth_param.aka_AMF) { delete comp->comp_param.auth_param.aka_AMF; } if (comp->comp_param.auth_param.aka_OP) { delete comp->comp_param.auth_param.aka_OP; } } else if (comp->type == E_Message_Injection) { free(comp->comp_param.field_param.filename); } free(comp); } int SendingMessage::numComponents() { return messageComponents.size(); } struct MessageComponent *SendingMessage::getComponent(int i) { return messageComponents[i]; } /* This is very simplistic and does not yet allow any arguments, but it is a start. */ int registerKeyword(char *keyword, customKeyword fxn) { if (keyword_map.find(keyword) != keyword_map.end()) { ERROR("Can not register keyword '%s', already registered!\n", keyword); } keyword_map[keyword] = fxn; return 0; } sipp-3.5.1/src/ratetask.cpp0000644000175000017500000000424712672462535014661 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #include "sipp.hpp" class ratetask *ratetask::instance = NULL; void ratetask::initialize() { assert(instance == NULL); if (rate_increase) { instance = new ratetask(); } } void ratetask::dump() { WARNING("Increasing call rate task."); } bool ratetask::run() { if (quitting >= 10) { delete this; return false; } /* Statistics Logs. */ if ((getmilliseconds() - last_rate_increase_time) >= rate_increase_freq) { if (rate_increase) { rate += rate_increase; if (rate_max && (rate > rate_max)) { rate = rate_max; if (rate_quit) { quitting += 10; } } CallGenerationTask::set_rate(rate); last_rate_increase_time = clock_tick; } } setPaused(); return true; } unsigned int ratetask::wake() { return last_rate_increase_time + rate_increase_freq; } sipp-3.5.1/src/comp.c0000644000175000017500000000323712672462535013437 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * */ #define COMP_MAIN #include "comp.h" #include #include char * comp_load(void) { void *handle; char *error; comp_error[0] = 0; handle = dlopen(COMP_PLUGGIN, RTLD_LAZY); if (!handle) { strcpy(comp_error, dlerror()); return comp_error; } *(void **)(&comp_compress) = dlsym(handle, "comp_compress"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } *(void **)(&comp_uncompress) = dlsym(handle, "comp_uncompress"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } *(void **)(&comp_free) = dlsym(handle, "comp_free"); if((error = (char *) dlerror())) { strcpy(comp_error, error); return comp_error; } return 0; } sipp-3.5.1/src/send_packets.c0000644000175000017500000002635212672462535015147 0ustar vsevavseva/* * send_packets.c: from tcpreplay tools by Aaron Turner * http://tcpreplay.sourceforge.net/ * send_packets.c is under BSD license (see below) * SIPp is under GPL license * * * Copyright (c) 2001-2004 Aaron Turner. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright owners nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include #include #include #if defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) #include #endif #ifndef __CYGWIN #include #endif #include #include #include #include #include "defines.h" #include "send_packets.h" #include "prepare_pcap.h" extern char* scenario_path; extern volatile unsigned long rtp_pckts_pcap; extern volatile unsigned long rtp_bytes_pcap; extern bool media_ip_is_ipv6; inline void timerdiv (struct timeval *tvp, float div) { double interval; if (div == 0 || div == 1) return; interval = ((double) tvp->tv_sec * 1000000 + tvp->tv_usec) / (double) div; tvp->tv_sec = interval / (int) 1000000; tvp->tv_usec = interval - (tvp->tv_sec * 1000000); } /* * converts a float to a timeval structure */ inline void float2timer (float time, struct timeval *tvp) { float n; n = time; tvp->tv_sec = n; n -= tvp->tv_sec; tvp->tv_usec = n * 100000; } static char* find_file(const char* filename) { char *fullpath; if (filename[0] == '/' || !scenario_path) { return strdup(filename); } fullpath = malloc(MAX_PATH); snprintf(fullpath, MAX_PATH, "%s/%s", scenario_path, filename); if (access(fullpath, R_OK) < 0) { free(fullpath); WARNING("SIPp now prefers looking for pcap files next to the scenario. " "%s couldn't be found next to the scenario, falling back to " "using the current working directory", filename); return strdup(filename); } return fullpath; } int parse_play_args(const char* filename, pcap_pkts* pkts) { pkts->file = find_file(filename); prepare_pkts(pkts->file, pkts); return 1; } void free_pcaps(pcap_pkts *pkts) { pcap_pkt *it; for (it = pkts->pkts; it != pkts->max; ++it) { free(it->data); } free(pkts->pkts); free(pkts->file); free(pkts); } void hexdump(char *p, int s) { int i; for (i = 0; i < s; i++) { fprintf(stderr, "%02x ", *(char *)(p+i)); } fprintf(stderr, "\n"); } /* Safe threaded version */ void do_sleep (struct timeval *, struct timeval *, struct timeval *, struct timeval *); void send_packets_cleanup(void *arg) { int * sock = (int *) arg; /* Close send socket */ close(*sock); } int send_packets (play_args_t * play_args) { int ret, sock, port_diff; pcap_pkt *pkt_index, *pkt_max; uint16_t *from_port, *to_port; struct timeval didsleep = { 0, 0 }; struct timeval start = { 0, 0 }; struct timeval last = { 0, 0 }; pcap_pkts *pkts = play_args->pcap; /* to and from are pointers in case play_args (call sticky) gets modified! */ struct sockaddr_storage *to = &(play_args->to); struct sockaddr_storage *from = &(play_args->from); struct udphdr *udp; struct sockaddr_in6 to6, from6; char buffer[PCAP_MAXPACKET]; int temp_sum; int len; #ifndef MSG_DONTWAIT int fd_flags; #endif if (media_ip_is_ipv6) { sock = socket(PF_INET6, SOCK_RAW, IPPROTO_UDP); if (sock < 0) { ERROR("Can't create raw IPv6 socket (need to run as root?): %s", strerror(errno)); } from_port = &(((struct sockaddr_in6 *)(void *) from )->sin6_port); len = sizeof(struct sockaddr_in6); to_port = &(((struct sockaddr_in6 *)(void *) to )->sin6_port); } else { sock = socket(PF_INET, SOCK_RAW, IPPROTO_UDP); from_port = &(((struct sockaddr_in *)(void *) from )->sin_port); len = sizeof(struct sockaddr_in); to_port = &(((struct sockaddr_in *)(void *) to )->sin_port); if (sock < 0) { ERROR("Can't create raw IPv4 socket (need to run as root?): %s", strerror(errno)); return ret; } } if ((ret = bind(sock, (struct sockaddr *)(void *)from, len))) { ERROR("Can't bind media raw socket"); return ret; } #ifndef MSG_DONTWAIT fd_flags = fcntl(sock, F_GETFL , NULL); fd_flags |= O_NONBLOCK; fcntl(sock, F_SETFL , fd_flags); #endif udp = (struct udphdr *)buffer; pkt_index = pkts->pkts; pkt_max = pkts->max; if (media_ip_is_ipv6) { memset(&to6, 0, sizeof(to6)); memset(&from6, 0, sizeof(from6)); to6.sin6_family = AF_INET6; from6.sin6_family = AF_INET6; memcpy(&(to6.sin6_addr.s6_addr), &(((struct sockaddr_in6 *)(void *) to)->sin6_addr.s6_addr), sizeof(to6.sin6_addr.s6_addr)); memcpy(&(from6.sin6_addr.s6_addr), &(((struct sockaddr_in6 *)(void *) from)->sin6_addr.s6_addr), sizeof(from6.sin6_addr.s6_addr)); } /* Ensure the sender socket is closed when the thread exits - this * allows the thread to be cancelled cleanly. */ pthread_cleanup_push(send_packets_cleanup, ((void *) &sock)); while (pkt_index < pkt_max) { memcpy(udp, pkt_index->data, pkt_index->pktlen); #if defined(__HPUX) || defined(__DARWIN) || (defined __CYGWIN) || defined(__FreeBSD__) port_diff = ntohs(udp->uh_dport) - pkts->base; /* modify UDP ports */ udp->uh_sport = htons(port_diff + ntohs(*from_port)); udp->uh_dport = htons(port_diff + ntohs(*to_port)); if (!media_ip_is_ipv6) { temp_sum = checksum_carry( pkt_index->partial_check + check((u_int16_t *) &(((struct sockaddr_in *)(void *) from)->sin_addr.s_addr), 4) + check((u_int16_t *) &(((struct sockaddr_in *)(void *) to)->sin_addr.s_addr), 4) + check((u_int16_t *) &udp->uh_sport, 4)); } else { temp_sum = checksum_carry( pkt_index->partial_check + check((u_int16_t *) &(from6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &(to6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &udp->uh_sport, 4)); } #if !defined(_HPUX_LI) && defined(__HPUX) udp->uh_sum = (temp_sum>>16)+((temp_sum & 0xffff)<<16); #else udp->uh_sum = temp_sum; #endif #else port_diff = ntohs(udp->dest) - pkts->base; /* modify UDP ports */ udp->source = htons(port_diff + ntohs(*from_port)); udp->dest = htons(port_diff + ntohs(*to_port)); if (!media_ip_is_ipv6) { temp_sum = checksum_carry( pkt_index->partial_check + check((u_int16_t *) &(((struct sockaddr_in *)(void *) from)->sin_addr.s_addr), 4) + check((u_int16_t *) &(((struct sockaddr_in *)(void *) to)->sin_addr.s_addr), 4) + check((u_int16_t *) &udp->source, 4)); } else { temp_sum = checksum_carry( pkt_index->partial_check + check((u_int16_t *) &(from6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &(to6.sin6_addr.s6_addr), 16) + check((u_int16_t *) &udp->source, 4)); } udp->check = temp_sum; #endif do_sleep ((struct timeval *) &pkt_index->ts, &last, &didsleep, &start); #ifdef MSG_DONTWAIT if (!media_ip_is_ipv6) { ret = sendto(sock, buffer, pkt_index->pktlen, MSG_DONTWAIT, (struct sockaddr *)(void *) to, sizeof(struct sockaddr_in)); } else { ret = sendto(sock, buffer, pkt_index->pktlen, MSG_DONTWAIT, (struct sockaddr *)(void *) &to6, sizeof(struct sockaddr_in6)); } #else if (!media_ip_is_ipv6) { ret = sendto(sock, buffer, pkt_index->pktlen, 0, (struct sockaddr *)(void *) to, sizeof(struct sockaddr_in)); } else { ret = sendto(sock, buffer, pkt_index->pktlen, 0, (struct sockaddr *)(void *) &to6, sizeof(struct sockaddr_in6)); } #endif if (ret < 0) { close(sock); WARNING("send_packets.c: sendto failed with error: %s", strerror(errno)); return( -1); } rtp_pckts_pcap++; rtp_bytes_pcap += pkt_index->pktlen - sizeof(*udp); memcpy (&last, &(pkt_index->ts), sizeof (struct timeval)); pkt_index++; } /* Closing the socket is handled by pthread_cleanup_push()/pthread_cleanup_pop() */ pthread_cleanup_pop(1); return 0; } /* * Given the timestamp on the current packet and the last packet sent, * calculate the appropriate amount of time to sleep and do so. */ void do_sleep (struct timeval *time, struct timeval *last, struct timeval *didsleep, struct timeval *start) { struct timeval nap, now, delta; struct timespec sleep; if (gettimeofday (&now, NULL) < 0) { fprintf (stderr, "Error gettimeofday: %s\n", strerror (errno)); } /* First time through for this file */ if (!timerisset (last)) { *start = now; timerclear (&delta); timerclear (didsleep); } else { timersub (&now, start, &delta); } if (timerisset (last) && timercmp (time, last, >)) { timersub (time, last, &nap); } else { /* * Don't sleep if this is our first packet, or if the * this packet appears to have been sent before the * last packet. */ timerclear (&nap); } timeradd (didsleep, &nap, didsleep); if (timercmp (didsleep, &delta, >)) { timersub (didsleep, &delta, &nap); sleep.tv_sec = nap.tv_sec; sleep.tv_nsec = nap.tv_usec * 1000; /* convert ms to ns */ while ((nanosleep (&sleep, &sleep) == -1) && (errno == -EINTR)); } } sipp-3.5.1/src/sslinit.c0000644000175000017500000000351312672462535014163 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Gundu RAO - 16 Jul 2004 * From Hewlett Packard Company. */ #define SSL_MAIN #include "sslcommon.h" int init_OpenSSL(void) { if (!Thread_setup() || !SSL_library_init() ) { return (-1) ; } SSL_load_error_strings(); return 1; } SSL_CTX *setup_ssl_context(SSL_METHOD *method) { SSL_CTX *ctx; if ((ctx = SSL_CTX_new(method)) == NULL) { SSL_ERROR(); } return ctx; } int SSL_ERROR(void) { int flags; int line; const char *data; const char *file; unsigned long code; code = ERR_get_error_line_data(&file,&line,&data,&flags); while (code) { char temp_buffer[1024]; sprintf(temp_buffer,"Error code: %lu in %s Line %d.\n",code,file,line); /*WARNING("SSL Error : %s\n",temp_buffer);*/ if (data && (flags & ERR_TXT_STRING)) { sprintf(temp_buffer,"Error data : %s\n",data); /*WARNING("SSL Error : %s\n",temp_buffer);*/ } code = ERR_get_error_line_data(&file,&line,&data,&flags); } return 1; } sipp-3.5.1/src/logger.cpp0000644000175000017500000010760312672462535014322 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include #include #include #include #include #include #include "logger.hpp" #include "screen.hpp" #include "sipp.hpp" #define SIPP_ENDL "\r\n" #ifdef RTP_STREAM double last_rtpstream_rate_out= 0; double last_rtpstream_rate_in= 0; #endif extern void print_stats_in_file(FILE * f); bool do_hide = true; bool show_index = false; void print_header_line(FILE *f) { switch(currentScreenToDisplay) { case DISPLAY_STAT_SCREEN : fprintf(f,"----------------------------- Statistics Screen ------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_REPARTITION_SCREEN : fprintf(f,"---------------------------- Repartition Screen ------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_VARIABLE_SCREEN : fprintf(f,"----------------------------- Variables Screen -------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_TDM_MAP_SCREEN : fprintf(f,"------------------------------ TDM map Screen --------- [1-9]: Change Screen --" SIPP_ENDL); break; case DISPLAY_SECONDARY_REPARTITION_SCREEN : fprintf(f,"--------------------------- Repartition %d Screen ------ [1-9]: Change Screen --" SIPP_ENDL, currentRepartitionToDisplay); break; case DISPLAY_SCENARIO_SCREEN : default: fprintf(f,"------------------------------ Scenario Screen -------- [1-9]: Change Screen --" SIPP_ENDL); break; } } void print_bottom_line(FILE *f, int last) { if(last) { fprintf(f,"------------------------------ Test Terminated --------------------------------" SIPP_ENDL); } else if(quitting) { fprintf(f,"------- Waiting for active calls to end. Press [q] again to force exit. -------" SIPP_ENDL ); } else if(paused) { fprintf(f,"----------------- Traffic Paused - Press [p] again to resume ------------------" SIPP_ENDL ); } else if(cpu_max) { fprintf(f,"-------------------------------- CPU CONGESTED ---------------------------------" SIPP_ENDL); } else if(outbound_congestion) { fprintf(f,"------------------------------ OUTBOUND CONGESTION -----------------------------" SIPP_ENDL); } else { if (creationMode == MODE_CLIENT) { switch(thirdPartyMode) { case MODE_MASTER : fprintf(f,"-----------------------3PCC extended mode - Master side -------------------------" SIPP_ENDL); break; case MODE_3PCC_CONTROLLER_A : fprintf(f,"----------------------- 3PCC Mode - Controller A side -------------------------" SIPP_ENDL); break; case MODE_3PCC_NONE: fprintf(f,"------ [+|-|*|/]: Adjust rate ---- [q]: Soft exit ---- [p]: Pause traffic -----" SIPP_ENDL); break; default: ERROR("Internal error: creationMode=%d, thirdPartyMode=%d", creationMode, thirdPartyMode); } } else { assert(creationMode == MODE_SERVER); switch(thirdPartyMode) { case MODE_3PCC_A_PASSIVE : fprintf(f,"------------------ 3PCC Mode - Controller A side (passive) --------------------" SIPP_ENDL); break; case MODE_3PCC_CONTROLLER_B : fprintf(f,"----------------------- 3PCC Mode - Controller B side -------------------------" SIPP_ENDL); break; case MODE_MASTER_PASSIVE : fprintf(f,"------------------ 3PCC extended mode - Master side (passive) --------------------" SIPP_ENDL); break; case MODE_SLAVE : fprintf(f,"----------------------- 3PCC extended mode - Slave side -------------------------" SIPP_ENDL); break; case MODE_3PCC_NONE: fprintf(f,"------------------------------ Sipp Server Mode -------------------------------" SIPP_ENDL); break; default: ERROR("Internal error: creationMode=%d, thirdPartyMode=%d", creationMode, thirdPartyMode); } } } fprintf(f,SIPP_ENDL); fflush(stdout); } void print_tdm_map() { int i = 0; int in_use = 0; int interval = (tdm_map_a+1) * (tdm_map_b+1) * (tdm_map_c+1); printf("TDM Circuits in use:" SIPP_ENDL); while (imessages.size() + 8 - int(interval/(tdm_map_c+1))); i++) { printf(SIPP_ENDL); } } void print_variable_list() { CActions * actions; CAction * action; int printed = 0; bool found; printf("Action defined Per Message :" SIPP_ENDL); printed++; found = false; for(unsigned int i=0; imessages.size(); i++) { message *curmsg = display_scenario->messages[i]; actions = curmsg->M_actions; if(actions != NULL) { switch(curmsg->M_type) { case MSG_TYPE_RECV: printf("=> Message[%u] (Receive Message) - " "[%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; case MSG_TYPE_RECVCMD: printf("=> Message[%u] (Receive Command Message) - " "[%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; default: printf("=> Message[%u] - [%d] action(s) defined :" SIPP_ENDL, i, actions->getActionSize()); printed++; break; } for(int j=0; jgetActionSize(); j++) { action = actions->getAction(j); if(action != NULL) { printf(" --> action[%d] = ", j); action->afficheInfo(); printf(SIPP_ENDL); printed++; found = true; } } } } if(!found) { printed++; printf("=> No action found on any messages" SIPP_ENDL); } printf(SIPP_ENDL); for(unsigned int i=0; i<(display_scenario->messages.size() + 5 - printed); i++) { printf(SIPP_ENDL); } } void print_statistics(int last) { static int first = 1; extern int command_mode; extern char *command_buffer; if (backgroundMode == false && display_scenario) { if (use_curses && !last) { screen_clear(); } if (use_curses && first) { first = 0; printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"); } if (command_mode) { printf(SIPP_ENDL); } print_header_line(stdout); switch(currentScreenToDisplay) { case DISPLAY_STAT_SCREEN : display_scenario->stats->displayStat(stdout); break; case DISPLAY_REPARTITION_SCREEN : display_scenario->stats->displayRepartition(stdout); break; case DISPLAY_VARIABLE_SCREEN : print_variable_list(); break; case DISPLAY_TDM_MAP_SCREEN : print_tdm_map(); break; case DISPLAY_SECONDARY_REPARTITION_SCREEN : display_scenario->stats->displayRtdRepartition(stdout, currentRepartitionToDisplay); break; case DISPLAY_SCENARIO_SCREEN : default: print_stats_in_file(stdout); break; } print_bottom_line(stdout,last); if (!last && screen_last_error[0]) { char *errstart = screen_last_error; int colonsleft = 3;/* We want to skip the time. */ while (*errstart && colonsleft) { if (*errstart == ':') { colonsleft--; } errstart++; } while (isspace(*errstart)) { errstart++; } if (strlen(errstart) > 60) { printf("Last Error: %.60s..." SIPP_ENDL, errstart); } else { printf("Last Error: %s" SIPP_ENDL, errstart); } sipp_usleep(100); fflush(stdout); } if (command_mode) { printf("Command: %s", command_buffer ? command_buffer : ""); fflush(stdout); } if(last) { fprintf(stdout,"\n"); } } } void log_off(struct logfile_info *lfi) { if (lfi->fptr) { fflush(lfi->fptr); fclose(lfi->fptr); lfi->fptr = NULL; lfi->overwrite = false; } } void print_stats_in_file(FILE * f) { static char temp_str[256]; int divisor; extern int pollnfds; #define NOTLAST 0 #define SIPP_ENDL "\r\n" /* We are not initialized yet. */ if (!display_scenario) { return; } /* Optional timestamp line for files only */ if(f != stdout) { time_t tim; time(&tim); fprintf(f, " Timestamp: %s" SIPP_ENDL, ctime(&tim)); } /* Header line with global parameters */ if (users >= 0) { sprintf(temp_str, "%d (%d ms)", users, duration); } else { sprintf(temp_str, "%3.1f(%d ms)/%5.3fs", rate, duration, (double)rate_period_ms / 1000.0); } unsigned long long total_calls = display_scenario->stats->GetStat(CStat::CPT_C_IncomingCallCreated) + display_scenario->stats->GetStat(CStat::CPT_C_OutgoingCallCreated); if( creationMode == MODE_SERVER) { fprintf (f, " Port Total-time Total-calls Transport" SIPP_ENDL " %-5d %6lu.%02lu s %8llu %s" SIPP_ENDL SIPP_ENDL, local_port, clock_tick / 1000, (clock_tick % 1000) / 10, total_calls, TRANSPORT_TO_STRING(transport)); } else { assert(creationMode == MODE_CLIENT); if (users >= 0) { fprintf(f, " Users (length)"); } else { fprintf(f, " Call-rate(length)"); } fprintf(f, " Port Total-time Total-calls Remote-host" SIPP_ENDL "%19s %-5d %6lu.%02lu s %8llu %s:%d(%s)" SIPP_ENDL SIPP_ENDL, temp_str, local_port, clock_tick / 1000, (clock_tick % 1000) / 10, total_calls, remote_ip, remote_port, TRANSPORT_TO_STRING(transport)); } /* 1st line */ if(total_calls < stop_after) { sprintf(temp_str, "%llu new calls during %lu.%03lu s period ", display_scenario->stats->GetStat(CStat::CPT_PD_IncomingCallCreated) + display_scenario->stats->GetStat(CStat::CPT_PD_OutgoingCallCreated), (clock_tick-last_report_time) / 1000, ((clock_tick-last_report_time) % 1000)); } else { sprintf(temp_str, "Call limit reached (-m %lu), %lu.%03lu s period ", stop_after, (clock_tick-last_report_time) / 1000, ((clock_tick-last_report_time) % 1000)); } divisor = scheduling_loops; if(!divisor) { divisor = 1; } fprintf(f," %-38s %lu ms scheduler resolution" SIPP_ENDL, temp_str, (clock_tick-last_report_time) / divisor); /* 2nd line */ if( creationMode == MODE_SERVER) { sprintf(temp_str, "%llu calls", display_scenario->stats->GetStat(CStat::CPT_C_CurrentCall)); } else { sprintf(temp_str, "%llu calls (limit %u)", display_scenario->stats->GetStat(CStat::CPT_C_CurrentCall), open_calls_allowed); } fprintf(f," %-38s Peak was %llu calls, after %llu s" SIPP_ENDL, temp_str, display_scenario->stats->GetStat(CStat::CPT_C_CurrentCallPeak), display_scenario->stats->GetStat(CStat::CPT_C_CurrentCallPeakTime)); fprintf(f," %d Running, %d Paused, %d Woken up" SIPP_ENDL, last_running_calls, last_paused_calls, last_woken_calls); last_woken_calls = 0; /* 3rd line dead call msgs, and optional out-of-call msg */ sprintf(temp_str,"%llu dead call msg (discarded)", display_scenario->stats->GetStat(CStat::CPT_G_C_DeadCallMsgs)); fprintf(f," %-37s", temp_str); if( creationMode == MODE_CLIENT) { sprintf(temp_str,"%llu out-of-call msg (discarded)", display_scenario->stats->GetStat(CStat::CPT_G_C_OutOfCallMsgs)); fprintf(f," %-37s", temp_str); } fprintf(f,SIPP_ENDL); if(compression) { fprintf(f," Comp resync: %d sent, %d recv" , resynch_send, resynch_recv); fprintf(f,SIPP_ENDL); } /* 4th line , sockets and optional errors */ sprintf(temp_str,"%d open sockets", pollnfds); fprintf(f," %-38s", temp_str); if(nb_net_recv_errors || nb_net_send_errors || nb_net_cong) { fprintf(f," %lu/%lu/%lu %s errors (send/recv/cong)" SIPP_ENDL, nb_net_send_errors, nb_net_recv_errors, nb_net_cong, TRANSPORT_TO_STRING(transport)); } else { fprintf(f,SIPP_ENDL); } #ifdef PCAPPLAY /* if has media abilities */ if (hasMedia != 0) { sprintf(temp_str, "%lu Total RTP pckts sent ", rtp_pckts_pcap); if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp_bytes_pcap)/(clock_tick-last_report_time), (rtp_bytes_pcap)%(clock_tick-last_report_time)); } rtp_bytes_pcap = 0; rtp2_bytes_pcap = 0; } #endif #ifdef RTP_STREAM /* if we have rtp stream thread running */ if (rtpstream_numthreads) { unsigned long TempBytes; unsigned long last_tick= clock_tick; /* Saved clock_tick to last_tick and use that in calcs since clock tick */ /* can change during calculations. */ if (last_tick-last_report_time) { TempBytes= rtpstream_bytes_out; /* Calculate integer and fraction parts of rtp bandwidth; this value * will be saved and reused in the case where last_tick==last_report_time */ last_rtpstream_rate_out= ((double)TempBytes)/(last_tick-last_report_time); /* Potential race condition betwen multiple threads updating the * rtpstream_bytes value. We subtract the saved TempBytes value * rather than setting it to zero to minimise the chances of missing * an update to rtpstream_bytes [update between printing stats and * zeroing the counter]. Ideally we would atomically subtract * TempBytes from rtpstream_bytes. */ rtpstream_bytes_out-= TempBytes; TempBytes= rtpstream_bytes_in; last_rtpstream_rate_in= ((double)TempBytes)/(last_tick-last_report_time); rtpstream_bytes_in-= TempBytes; } sprintf(temp_str, "%lu Total RTP pckts sent",rtpstream_pckts); fprintf(f," %-38s %.3f kB/s RTP OUT" SIPP_ENDL, temp_str,last_rtpstream_rate_out); sprintf(temp_str, "%lu RTP sending threads active",rtpstream_numthreads); fprintf(f," %-38s %.3f kB/s RTP IN" SIPP_ENDL, temp_str,last_rtpstream_rate_in); } #endif /* 5th line, RTP echo statistics */ if (rtp_echo_enabled && (media_socket > 0)) { sprintf(temp_str, "%lu Total echo RTP pckts 1st stream", rtp_pckts); // AComment: Fix for random coredump when using RTP echo if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp_bytes)/(clock_tick-last_report_time), (rtp_bytes)%(clock_tick-last_report_time)); } /* second stream statitics: */ sprintf(temp_str, "%lu Total echo RTP pckts 2nd stream", rtp2_pckts); // AComment: Fix for random coredump when using RTP echo if (clock_tick-last_report_time) { fprintf(f," %-38s %lu.%03lu last period RTP rate (kB/s)" SIPP_ENDL, temp_str, (rtp2_bytes)/(clock_tick-last_report_time), (rtp2_bytes)%(clock_tick-last_report_time)); } rtp_bytes = 0; rtp2_bytes = 0; } /* Scenario counters */ fprintf(f,SIPP_ENDL); if(!lose_packets) { fprintf(f," " "Messages Retrans Timeout Unexpected-Msg" SIPP_ENDL); } else { fprintf(f," " "Messages Retrans Timeout Unexp. Lost" SIPP_ENDL); } for(unsigned long index = 0; index < display_scenario->messages.size(); index ++) { message *curmsg = display_scenario->messages[index]; if(do_hide && curmsg->hide) { continue; } if (show_index) { fprintf(f, "%-2lu:", index); } if(SendingMessage *src = curmsg -> send_scheme) { if (src->isResponse()) { sprintf(temp_str, "%d", src->getCode()); } else { sprintf(temp_str, "%s", src->getMethod()); } if(creationMode == MODE_SERVER) { fprintf(f," <---------- %-10s ", temp_str); } else { fprintf(f," %10s ----------> ", temp_str); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } if(curmsg -> retrans_delay) { fprintf(f,"%-9lu %-9lu %-9lu %-9s" , curmsg -> nb_sent, curmsg -> nb_sent_retrans, curmsg -> nb_timeout, "" /* Unexpected */); } else { fprintf(f,"%-9lu %-9lu %-9s %-9s" , curmsg -> nb_sent, curmsg -> nb_sent_retrans, "", /* Timeout. */ "" /* Unexpected. */); } } else if(curmsg -> recv_response) { if(creationMode == MODE_SERVER) { fprintf(f," ----------> %-10d ", curmsg -> recv_response); } else { fprintf(f," %10d <---------- ", curmsg -> recv_response); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } fprintf(f,"%-9ld %-9ld %-9ld %-9ld" , curmsg->nb_recv, curmsg->nb_recv_retrans, curmsg->nb_timeout, curmsg->nb_unexp); } else if (curmsg -> pause_distribution || (curmsg -> pause_variable != -1)) { char *desc = curmsg->pause_desc; if (!desc) { desc = (char *)malloc(24); if (curmsg->pause_distribution) { desc[0] = '\0'; curmsg->pause_distribution->timeDescr(desc, 23); } else { snprintf(desc, 23, "$%s", display_scenario->allocVars->getName(curmsg->pause_variable)); } desc[23] = '\0'; curmsg->pause_desc = desc; } int len = strlen(desc) < 9 ? 9 : strlen(desc); if(creationMode == MODE_SERVER) { fprintf(f," [%9s] Pause%*s", desc, 23 - len > 0 ? 23 - len : 0, ""); } else { fprintf(f," Pause [%9s]%*s", desc, 18 - len > 0 ? 18 - len : 0, ""); } fprintf(f,"%-9d", curmsg->sessions); fprintf(f," %-9lu" , curmsg->nb_unexp); } else if(curmsg -> recv_request) { if(creationMode == MODE_SERVER) { fprintf(f," ----------> %-10s ", curmsg -> recv_request); } else { fprintf(f," %10s <---------- ", curmsg -> recv_request); } if (curmsg -> start_rtd) { fprintf(f, " B-RTD%d ", curmsg -> start_rtd); } else if (curmsg -> stop_rtd) { fprintf(f, " E-RTD%d ", curmsg -> stop_rtd); } else { fprintf(f, " "); } fprintf(f,"%-9ld %-9ld %-9ld %-9ld" , curmsg -> nb_recv, curmsg -> nb_recv_retrans, curmsg -> nb_timeout, curmsg -> nb_unexp); } else if(curmsg -> M_type == MSG_TYPE_NOP) { if (curmsg->display_str) { fprintf(f," %s", curmsg->display_str); } else { fprintf(f," [ NOP ] "); } } else if(curmsg -> M_type == MSG_TYPE_RECVCMD) { fprintf(f," [ Received Command ] "); if(curmsg->retrans_delay) { fprintf(f,"%-9ld %-9s %-9ld %-9s" , curmsg->M_nbCmdRecv, "", curmsg->nb_timeout, ""); } else { fprintf(f,"%-9ld %-9s %-9s" , curmsg -> M_nbCmdRecv, "", ""); } } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { fprintf(f," [ Sent Command ] "); fprintf(f,"%-9lu %-9s %-9s" , curmsg -> M_nbCmdSent, "", ""); } else { ERROR("Scenario command not implemented in display\n"); } if(lose_packets && (curmsg -> nb_lost)) { fprintf(f," %-9lu" SIPP_ENDL, curmsg -> nb_lost); } else { fprintf(f,SIPP_ENDL); } if(curmsg -> crlf) { fprintf(f,SIPP_ENDL); } } } void print_count_file(FILE *f, int header) { char temp_str[256]; if (!main_scenario || (!header && !main_scenario->stats)) { return; } if (header) { fprintf(f, "CurrentTime%sElapsedTime%s", stat_delimiter, stat_delimiter); } else { struct timeval currentTime, startTime; GET_TIME(¤tTime); main_scenario->stats->getStartTime(&startTime); unsigned long globalElapsedTime = CStat::computeDiffTimeInMs (¤tTime, &startTime); fprintf(f, "%s%s", CStat::formatTime(¤tTime), stat_delimiter); fprintf(f, "%s%s", CStat::msToHHMMSSus(globalElapsedTime), stat_delimiter); } for(unsigned int index = 0; index < main_scenario->messages.size(); index ++) { message *curmsg = main_scenario->messages[index]; if(curmsg->hide) { continue; } if(SendingMessage *src = curmsg -> send_scheme) { if(header) { if (src->isResponse()) { sprintf(temp_str, "%u_%d_", index, src->getCode()); } else { sprintf(temp_str, "%u_%s_", index, src->getMethod()); } fprintf(f, "%sSent%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); if(curmsg -> retrans_delay) { fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); } if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_sent, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_sent_retrans, stat_delimiter); if(curmsg -> retrans_delay) { fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); } if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if(curmsg -> recv_response) { if(header) { sprintf(temp_str, "%u_%d_", index, curmsg->recv_response); fprintf(f, "%sRecv%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_recv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_recv_retrans, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if(curmsg -> recv_request) { if(header) { sprintf(temp_str, "%u_%s_", index, curmsg->recv_request); fprintf(f, "%sRecv%s", temp_str, stat_delimiter); fprintf(f, "%sRetrans%s", temp_str, stat_delimiter); fprintf(f, "%sTimeout%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); if(lose_packets) { fprintf(f, "%sLost%s", temp_str, stat_delimiter); } } else { fprintf(f, "%lu%s", curmsg->nb_recv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_recv_retrans, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); if(lose_packets) { fprintf(f, "%lu%s", curmsg->nb_lost, stat_delimiter); } } } else if (curmsg -> pause_distribution || curmsg -> pause_variable) { if(header) { sprintf(temp_str, "%u_Pause_", index); fprintf(f, "%sSessions%s", temp_str, stat_delimiter); fprintf(f, "%sUnexp%s", temp_str, stat_delimiter); } else { fprintf(f, "%d%s", curmsg->sessions, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_unexp, stat_delimiter); } } else if(curmsg -> M_type == MSG_TYPE_NOP) { /* No output. */ } else if(curmsg -> M_type == MSG_TYPE_RECVCMD) { if(header) { sprintf(temp_str, "%u_RecvCmd", index); fprintf(f, "%s%s", temp_str, stat_delimiter); fprintf(f, "%s_Timeout%s", temp_str, stat_delimiter); } else { fprintf(f, "%lu%s", curmsg->M_nbCmdRecv, stat_delimiter); fprintf(f, "%lu%s", curmsg->nb_timeout, stat_delimiter); } } else if(curmsg -> M_type == MSG_TYPE_SENDCMD) { if(header) { sprintf(temp_str, "%u_SendCmd", index); fprintf(f, "%s%s", temp_str, stat_delimiter); } else { fprintf(f, "%lu%s", curmsg->M_nbCmdSent, stat_delimiter); } } else { ERROR("Unknown count file message type:"); } } fprintf(f, "\n"); fflush(f); } void print_error_codes_file(FILE *f) { if (!main_scenario || !main_scenario->stats) { return; } // Print time and elapsed time to file struct timeval currentTime, startTime; GET_TIME(¤tTime); main_scenario->stats->getStartTime(&startTime); unsigned long globalElapsedTime = CStat::computeDiffTimeInMs (¤tTime, &startTime); fprintf(f, "%s%s", CStat::formatTime(¤tTime), stat_delimiter); fprintf(f, "%s%s", CStat::msToHHMMSSus(globalElapsedTime), stat_delimiter); // Print comma-separated list of all error codes seen since the last time this function was called for (; main_scenario->stats->error_codes.size() != 0;) { fprintf(f, "%d,", main_scenario->stats->error_codes[main_scenario->stats->error_codes.size() - 1]); main_scenario->stats->error_codes.pop_back(); } fprintf(f, "\n"); fflush(f); } /* Function to dump all available screens in a file */ void print_screens(void) { int oldScreen = currentScreenToDisplay; int oldRepartition = currentRepartitionToDisplay; currentScreenToDisplay = DISPLAY_SCENARIO_SCREEN; print_header_line( screen_lfi.fptr); print_stats_in_file( screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_header_line( screen_lfi.fptr); display_scenario->stats->displayStat(screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_REPARTITION_SCREEN; print_header_line( screen_lfi.fptr); display_scenario->stats->displayRepartition(screen_lfi.fptr); print_bottom_line( screen_lfi.fptr, NOTLAST); currentScreenToDisplay = DISPLAY_SECONDARY_REPARTITION_SCREEN; for (currentRepartitionToDisplay = 2; currentRepartitionToDisplay <= display_scenario->stats->nRtds(); currentRepartitionToDisplay++) { print_header_line( screen_lfi.fptr); display_scenario->stats->displayRtdRepartition(screen_lfi.fptr, currentRepartitionToDisplay); print_bottom_line( screen_lfi.fptr, NOTLAST); } currentScreenToDisplay = oldScreen; currentRepartitionToDisplay = oldRepartition; } static void rotatef(struct logfile_info* lfi) { char L_rotate_file_name [MAX_PATH]; if (!lfi->fixedname) { sprintf (lfi->file_name, "%s_%d_%s.log", scenario_file, getpid(), lfi->name); } if (ringbuffer_files > 0) { if (!lfi->ftimes) { lfi->ftimes = (struct logfile_id *)calloc(ringbuffer_files, sizeof(struct logfile_id)); } /* We need to rotate away an existing file. */ if (lfi->nfiles == ringbuffer_files) { if ((lfi->ftimes)[0].n) { sprintf(L_rotate_file_name, "%s_%d_%s_%lu.%d.log", scenario_file, getpid(), lfi->name, (unsigned long)(lfi->ftimes)[0].start, (lfi->ftimes)[0].n); } else { sprintf(L_rotate_file_name, "%s_%d_%s_%lu.log", scenario_file, getpid(), lfi->name, (unsigned long)(lfi->ftimes)[0].start); } unlink(L_rotate_file_name); lfi->nfiles--; memmove(lfi->ftimes, &((lfi->ftimes)[1]), sizeof(struct logfile_id) * (lfi->nfiles)); } if (lfi->starttime) { (lfi->ftimes)[lfi->nfiles].start = lfi->starttime; (lfi->ftimes)[lfi->nfiles].n = 0; /* If we have the same time, then we need to append an identifier. */ if (lfi->nfiles && ((lfi->ftimes)[lfi->nfiles].start == (lfi->ftimes)[lfi->nfiles - 1].start)) { (lfi->ftimes)[lfi->nfiles].n = (lfi->ftimes)[lfi->nfiles - 1].n + 1; } if ((lfi->ftimes)[lfi->nfiles].n) { sprintf(L_rotate_file_name, "%s_%d_%s_%lu.%d.log", scenario_file, getpid(), lfi->name, (unsigned long)(lfi->ftimes)[lfi->nfiles].start, (lfi->ftimes)[lfi->nfiles].n); } else { sprintf(L_rotate_file_name, "%s_%d_%s_%lu.log", scenario_file, getpid(), lfi->name, (unsigned long)(lfi->ftimes)[lfi->nfiles].start); } lfi->nfiles++; fflush(lfi->fptr); fclose(lfi->fptr); lfi->fptr = NULL; rename(lfi->file_name, L_rotate_file_name); } } time(&lfi->starttime); if (lfi->overwrite) { lfi->fptr = fopen(lfi->file_name, "w"); } else { lfi->fptr = fopen(lfi->file_name, "a"); lfi->overwrite = true; } if(lfi->check && !lfi->fptr) { /* We can not use the error functions from this function, as we may be rotating the error log itself! */ ERROR("Unable to create '%s'", lfi->file_name); } } void rotate_screenf() { rotatef(&screen_lfi); } void rotate_calldebugf() { rotatef(&calldebug_lfi); } void rotate_messagef() { rotatef(&message_lfi); } void rotate_shortmessagef() { rotatef(&shortmessage_lfi); } void rotate_logfile() { rotatef(&log_lfi); } void rotate_errorf() { rotatef(&error_lfi); strcpy(screen_logfile, error_lfi.file_name); } /*#ifdef __cplusplus extern "C" { #endif * w */ static int _trace(struct logfile_info* lfi, const char* fmt, va_list ap) { int ret = 0; if(lfi->fptr) { ret = vfprintf(lfi->fptr, fmt, ap); fflush(lfi->fptr); lfi->count += ret; if (max_log_size && lfi->count > max_log_size) { fclose(lfi->fptr); lfi->fptr = NULL; } if (ringbuffer_size && lfi->count > ringbuffer_size) { rotatef(lfi); lfi->count = 0; } } return ret; } int TRACE_MSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&message_lfi, fmt, ap); va_end(ap); return ret; } int TRACE_SHORTMSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&shortmessage_lfi, fmt, ap); va_end(ap); return ret; } int LOG_MSG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&log_lfi, fmt, ap); va_end(ap); return ret; } int TRACE_CALLDEBUG(const char *fmt, ...) { int ret; va_list ap; va_start(ap, fmt); ret = _trace(&calldebug_lfi, fmt, ap); va_end(ap); return ret; } /* #ifdef __cplusplus } #endif */ sipp-3.5.1/src/socket.cpp0000644000175000017500000027735612672462535014350 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * Francois Draperi (for dynamic_id) * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research * Martin Van Leeuwen * Andy Aicken * Michael Hirschbichler */ #include #include #include #include "sipp.hpp" #include "socket.hpp" #include "logger.hpp" extern bool do_hide; extern bool show_index; struct sipp_socket *ctrl_socket = NULL; struct sipp_socket *stdin_socket = NULL; static int stdin_mode; /******************** Recv Poll Processing *********************/ int pollnfds; #ifdef HAVE_EPOLL int epollfd; struct epoll_event epollfiles[SIPP_MAXFDS]; struct epoll_event* epollevents; #else struct pollfd pollfiles[SIPP_MAXFDS]; #endif struct sipp_socket *sockets[SIPP_MAXFDS]; int pending_messages = 0; map map_perip_fd; static void process_set(char* what) { char *rest = strchr(what, ' '); if (rest) { *rest++ = '\0'; trim(rest); } else { WARNING("The set command requires two arguments (attribute and value)"); return; } if (!strcmp(what, "rate")) { char *end; double drest = strtod(rest, &end); if (users >= 0) { WARNING("Rates can not be set in a user-based benchmark."); } else if (*end) { WARNING("Invalid rate value: \"%s\"", rest); } else { CallGenerationTask::set_rate(drest); } } else if (!strcmp(what, "rate-scale")) { char *end; double drest = strtod(rest, &end); if (*end) { WARNING("Invalid rate-scale value: \"%s\"", rest); } else { rate_scale = drest; } } else if (!strcmp(what, "users")) { char *end; int urest = strtol(rest, &end, 0); if (users < 0) { WARNING("Users can not be changed at run time for a rate-based benchmark."); } else if (*end) { WARNING("Invalid users value: \"%s\"", rest); } else if (urest < 0) { WARNING("Invalid users value: \"%s\"", rest); } else { CallGenerationTask::set_users(urest); } } else if (!strcmp(what, "limit")) { char *end; unsigned long lrest = strtoul(rest, &end, 0); if (users >= 0) { WARNING("Can not set call limit for a user-based benchmark."); } else if (*end) { WARNING("Invalid limit value: \"%s\"", rest); } else { open_calls_allowed = lrest; open_calls_user_setting = 1; } } else if (!strcmp(what, "display")) { if (!strcmp(rest, "main")) { display_scenario = main_scenario; } else if (!strcmp(rest, "ooc")) { display_scenario = ooc_scenario; } else { WARNING("Unknown display scenario: %s", rest); } } else if (!strcmp(what, "hide")) { if (!strcmp(rest, "true")) { do_hide = true; } else if (!strcmp(rest, "false")) { do_hide = false; } else { WARNING("Invalid bool: %s", rest); } } else if (!strcmp(what, "index")) { if (!strcmp(rest, "true")) { show_index = true; } else if (!strcmp(rest, "false")) { show_index = false; } else { WARNING("Invalid bool: %s", rest); } } else { WARNING("Unknown set attribute: %s", what); } } static void process_trace(char* what) { bool on = false; char *rest = strchr(what, ' '); if (rest) { *rest++ = '\0'; trim(rest); } else { WARNING("The trace command requires two arguments (log and [on|off])"); return; } if (!strcmp(rest, "on")) { on = true; } else if (!strcmp(rest, "off")) { on = false; } else if (!strcmp(rest, "true")) { on = true; } else if (!strcmp(rest, "false")) { on = false; } else { WARNING("The trace command's second argument must be on or off."); return; } if (!strcmp(what, "error")) { if (on == !!print_all_responses) { return; } if (on) { print_all_responses = 1; } else { print_all_responses = 0; log_off(&error_lfi); } } else if (!strcmp(what, "logs")) { if (on == !!log_lfi.fptr) { return; } if (on) { useLogf = 1; rotate_logfile(); } else { useLogf = 0; log_off(&log_lfi); } } else if (!strcmp(what, "messages")) { if (on == !!message_lfi.fptr) { return; } if (on) { useMessagef = 1; rotate_logfile(); } else { useMessagef = 0; log_off(&message_lfi); } } else if (!strcmp(what, "shortmessages")) { if (on == !!shortmessage_lfi.fptr) { return; } if (on) { useShortMessagef = 1; rotate_shortmessagef(); } else { useShortMessagef = 0; log_off(&shortmessage_lfi); } } else { WARNING("Unknown log file: %s", what); } } static void process_dump(char* what) { if (!strcmp(what, "tasks")) { dump_tasks(); } else if (!strcmp(what, "variables")) { display_scenario->allocVars->dump(); } else { WARNING("Unknown dump type: %s", what); } } static void process_reset(char* what) { if (!strcmp(what, "stats")) { main_scenario->stats->computeStat(CStat::E_RESET_C_COUNTERS); } else { WARNING("Unknown reset type: %s", what); } } static bool process_command(char* command) { trim(command); char *rest = strchr(command, ' '); if (rest) { *rest++ = '\0'; trim(rest); } if (!rest) { WARNING("The %s command requires at least one argument", command); } else if (!strcmp(command, "set")) { process_set(rest); } else if (!strcmp(command, "trace")) { process_trace(rest); } else if (!strcmp(command, "dump")) { process_dump(rest); } else if (!strcmp(command, "reset")) { process_reset(rest); } else { WARNING("Unrecognized command: \"%s\"", command); } return false; } int command_mode = 0; char *command_buffer = NULL; extern bool sipMsgCheck (const char *P_msg, struct sipp_socket *socket); static const char* get_trimmed_call_id(const char* msg) { /* A call_id identifies a call and is generated by SIPp for each * new call. In client mode, it is mandatory to use the value * generated by SIPp in the "Call-ID" header. Otherwise, SIPp will * not recognise the answer to the message sent as being part of an * existing call. * * Note: [call_id] can be pre-pended with an arbitrary string using * '///'. * Example: Call-ID: ABCDEFGHIJ///[call_id] * - it will still be recognized by SIPp as part of the same call. */ const char *call_id = get_call_id(msg); const char *slashes = strstr(call_id, "///"); if ((!callidSlash) && slashes) { return slashes + 3; } return call_id; } #ifdef USE_OPENSSL SSL_CTX *sip_trp_ssl_ctx = NULL; /* For SSL cserver context */ SSL_CTX *sip_trp_ssl_ctx_client = NULL; /* For SSL cserver context */ SSL_CTX *twinSipp_sip_trp_ssl_ctx_client = NULL; /* For SSL cserver context */ #define CALL_BACK_USER_DATA "ksgr" int passwd_call_back_routine(char *buf, int size, int /*flag*/, void *passwd) { strncpy(buf, (char *)(passwd), size); buf[size - 1] = '\0'; return(strlen(buf)); } /****** SSL error handling *************/ const char *sip_tls_error_string(SSL *ssl, int size) { int err; err=SSL_get_error(ssl, size); switch(err) { case SSL_ERROR_NONE: return "No error"; case SSL_ERROR_WANT_WRITE: return "SSL_read returned SSL_ERROR_WANT_WRITE"; case SSL_ERROR_WANT_READ: return "SSL_read returned SSL_ERROR_WANT_READ"; case SSL_ERROR_WANT_X509_LOOKUP: return "SSL_read returned SSL_ERROR_WANT_X509_LOOKUP"; case SSL_ERROR_SYSCALL: if (size < 0) { /* not EOF */ return strerror(errno); } else { /* EOF */ return "SSL socket closed on SSL_read"; } } return "Unknown SSL Error."; } #endif static char* get_inet_address(const struct sockaddr_storage* addr, char* dst, int len) { if (getnameinfo(_RCAST(struct sockaddr*, addr), sizeof(*addr), dst, len, NULL, 0, NI_NUMERICHOST) != 0) { snprintf(dst, len, "addr not supported"); } return dst; } static bool process_key(int c) { switch (c) { case '1': currentScreenToDisplay = DISPLAY_SCENARIO_SCREEN; print_statistics(0); break; case '2': currentScreenToDisplay = DISPLAY_STAT_SCREEN; print_statistics(0); break; case '3': currentScreenToDisplay = DISPLAY_REPARTITION_SCREEN; print_statistics(0); break; case '4': currentScreenToDisplay = DISPLAY_VARIABLE_SCREEN; print_statistics(0); break; case '5': if (use_tdmmap) { currentScreenToDisplay = DISPLAY_TDM_MAP_SCREEN; print_statistics(0); } break; /* Screens 6, 7, 8, 9 are for the extra RTD repartitions. */ case '6': case '7': case '8': case '9': currentScreenToDisplay = DISPLAY_SECONDARY_REPARTITION_SCREEN; currentRepartitionToDisplay = (c - '6') + 2; print_statistics(0); break; case '+': if (users >= 0) { CallGenerationTask::set_users((int)(users + 1 * rate_scale)); } else { CallGenerationTask::set_rate(rate + 1 * rate_scale); } print_statistics(0); break; case '-': if (users >= 0) { CallGenerationTask::set_users((int)(users - 1 * rate_scale)); } else { CallGenerationTask::set_rate(rate - 1 * rate_scale); } print_statistics(0); break; case '*': if (users >= 0) { CallGenerationTask::set_users((int)(users + 10 * rate_scale)); } else { CallGenerationTask::set_rate(rate + 10 * rate_scale); } print_statistics(0); break; case '/': if (users >= 0) { CallGenerationTask::set_users((int)(users - 10 * rate_scale)); } else { CallGenerationTask::set_rate(rate - 10 * rate_scale); } print_statistics(0); break; case 'p': if (paused) { CallGenerationTask::set_paused(false); } else { CallGenerationTask::set_paused(true); } print_statistics(0); break; case 's': if (screenf) { print_screens(); } break; case 'q': quitting+=10; print_statistics(0); break; case 'Q': /* We are going to break, so we never have a chance to press q twice. */ quitting+=20; print_statistics(0); break; } return false; } int handle_ctrl_socket() { unsigned char bufrcv [SIPP_MAX_MSG_SIZE]; int ret = recv(ctrl_socket->ss_fd, bufrcv, sizeof(bufrcv) - 1, 0); if (ret <= 0) { return ret; } if (bufrcv[0] == 'c') { /* No 'c', but we need one for '\0'. */ char *command = (char *)malloc(ret); if (!command) { ERROR("Out of memory allocated command buffer."); } memcpy(command, bufrcv + 1, ret - 1); command[ret - 1] = '\0'; process_command(command); free(command); } else { process_key(bufrcv[0]); } return 0; } void setup_ctrl_socket() { int port, firstport; int try_counter = 60; struct sockaddr_storage ctl_sa; int sock = socket(AF_INET, SOCK_DGRAM, 0); if (sock == -1) { ERROR_NO("Unable to create remote control socket!"); } if (control_port) { port = control_port; /* If the user specified the control port, then we must assume they know * what they want, and should not cycle. */ try_counter = 1; } else { /* Allow 60 control sockets on the same system */ /* (several SIPp instances) */ port = DEFAULT_CTRL_SOCKET_PORT; } firstport = port; memset(&ctl_sa, 0, sizeof(struct sockaddr_storage)); if (control_ip[0]) { struct addrinfo hints; struct addrinfo *addrinfo; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; if (getaddrinfo(control_ip, NULL, &hints, &addrinfo) != 0) { ERROR("Unknown control address '%s'.\n" "Use 'sipp -h' for details", control_ip); } memcpy(&ctl_sa, addrinfo->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage *, addrinfo->ai_addr))); freeaddrinfo(addrinfo); } else { ((struct sockaddr_in *)&ctl_sa)->sin_family = AF_INET; ((struct sockaddr_in *)&ctl_sa)->sin_addr.s_addr = INADDR_ANY; } while (try_counter) { ((struct sockaddr_in *)&ctl_sa)->sin_port = htons(port); if (!::bind(sock, (struct sockaddr *)&ctl_sa, sizeof(struct sockaddr_in))) { /* Bind successful */ break; } try_counter--; port++; } if (try_counter == 0) { if (control_port) { ERROR_NO("Unable to bind remote control socket to UDP port %d", control_port); } else { WARNING("Unable to bind remote control socket (tried UDP ports %d-%d): %s", firstport, port - 1, strerror(errno)); } return; } ctrl_socket = sipp_allocate_socket(0, T_UDP, sock, 0); if (!ctrl_socket) { ERROR_NO("Could not setup control socket!\n"); } } static void reset_stdin() { fcntl(fileno(stdin), F_SETFL, stdin_mode); } void setup_stdin_socket() { stdin_mode = fcntl(fileno(stdin), F_GETFL); fcntl(fileno(stdin), F_SETFL, stdin_mode | O_NONBLOCK); atexit(reset_stdin); stdin_socket = sipp_allocate_socket(0, T_UDP, fileno(stdin), 0); if (!stdin_socket) { ERROR_NO("Could not setup keyboard (stdin) socket!\n"); } } #define SIPP_ENDL "\r\n" void handle_stdin_socket() { int c; int chars = 0; if (feof(stdin)) { sipp_close_socket(stdin_socket); stdin_socket = NULL; return; } while (((c = screen_readkey()) != -1)) { chars++; if (command_mode) { if (c == '\n') { bool quit = process_command(command_buffer); if (quit) { return; } command_buffer[0] = '\0'; command_mode = 0; printf(SIPP_ENDL); } #ifndef __SUNOS else if (c == KEY_BACKSPACE || c == KEY_DC) #else else if (c == 14) #endif { int command_len = strlen(command_buffer); if (command_len > 0) { command_buffer[command_len--] = '\0'; } } else { int command_len = strlen(command_buffer); char *realloc_ptr = (char *)realloc(command_buffer, command_len + 2); if (realloc_ptr) { command_buffer = realloc_ptr; } else { free(command_buffer); ERROR("Out of memory"); return; } command_buffer[command_len++] = c; command_buffer[command_len] = '\0'; putchar(c); fflush(stdout); } } else if (c == 'c') { command_mode = 1; char *realloc_ptr = (char *)realloc(command_buffer, 1); if (realloc_ptr) { command_buffer = realloc_ptr; } else { free(command_buffer); ERROR("Out of memory"); return; } command_buffer[0] = '\0'; printf("Command: "); fflush(stdout); } else { process_key(c); } } if (chars == 0) { /* We did not read any characters, even though we should have. */ sipp_close_socket(stdin_socket); stdin_socket = NULL; } } /****************************** Network Interface *******************/ /* Our message detection states: */ #define CFM_NORMAL 0 /* No CR Found, searchign for \r\n\r\n. */ #define CFM_CONTROL 1 /* Searching for 27 */ #define CFM_CR 2 /* CR Found, Searching for \n\r\n */ #define CFM_CRLF 3 /* CRLF Found, Searching for \r\n */ #define CFM_CRLFCR 4 /* CRLFCR Found, Searching for \n */ #define CFM_CRLFCRLF 5 /* We've found the end of the headers! */ static void merge_socketbufs(struct socketbuf* socketbuf) { struct socketbuf *next = socketbuf->next; int newsize; char *newbuf; if (!next) { return; } if (next->offset) { ERROR("Internal error: can not merge a socketbuf with a non-zero offset."); } if (socketbuf->offset) { memmove(socketbuf->buf, socketbuf->buf + socketbuf->offset, socketbuf->len - socketbuf->offset); socketbuf->len -= socketbuf->offset; socketbuf->offset = 0; } newsize = socketbuf->len + next->len; newbuf = (char *)realloc(socketbuf->buf, newsize); if (!newbuf) { ERROR("Could not allocate memory to merge socket buffers!"); } memcpy(newbuf + socketbuf->len, next->buf, next->len); socketbuf->buf = newbuf; socketbuf->len = newsize; socketbuf->next = next->next; free_socketbuf(next); } /* Check for a message in the socket and return the length of the first * message. If this is UDP, the only check is if we have buffers. If this is * TCP or TLS we need to parse out the content-length. */ static int check_for_message(struct sipp_socket* socket) { struct socketbuf *socketbuf = socket->ss_in; int state = socket->ss_control ? CFM_CONTROL : CFM_NORMAL; const char *l; if (!socketbuf) return 0; if (socket->ss_transport == T_UDP || socket->ss_transport == T_SCTP) { return socketbuf->len; } int len = 0; while (socketbuf->offset + len < socketbuf->len) { char c = socketbuf->buf[socketbuf->offset + len]; switch(state) { case CFM_CONTROL: /* For CMD Message the escape char is the end of message */ if (c == 27) { return len + 1; /* The plus one includes the control character. */ } break; case CFM_NORMAL: if (c == '\r') { state = CFM_CR; } break; case CFM_CR: if (c == '\n') { state = CFM_CRLF; } else { state = CFM_NORMAL; } break; case CFM_CRLF: if (c == '\r') { state = CFM_CRLFCR; } else { state = CFM_NORMAL; } break; case CFM_CRLFCR: if (c == '\n') { state = CFM_CRLFCRLF; } else { state = CFM_NORMAL; } break; } /* Head off failing because the buffer does not contain the whole header. */ if (socketbuf->offset + len == socketbuf->len - 1) { merge_socketbufs(socketbuf); } if (state == CFM_CRLFCRLF) { break; } len++; } /* We did not find the end-of-header marker. */ if (state != CFM_CRLFCRLF) { return 0; } /* Find the content-length header. */ if ((l = strncasestr(socketbuf->buf + socketbuf->offset, "\r\nContent-Length:", len))) { l += strlen("\r\nContent-Length:"); } else if ((l = strncasestr(socketbuf->buf + socketbuf->offset, "\r\nl:", len))) { l += strlen("\r\nl:"); } else { /* There is no header, so the content-length is zero. */ return len + 1; } /* Skip spaces. */ while (isspace(*l)) { if (*l == '\r' || *l == '\n') { /* We ran into an end-of-line, so there is no content-length. */ return len + 1; } l++; } /* Do the integer conversion, we only allow '\r' or spaces after the integer. */ char *endptr; int content_length = strtol(l, &endptr, 10); if (*endptr != '\r' && !isspace(*endptr)) { content_length = 0; } /* Now that we know how large this message is, we make sure we have the whole thing. */ do { /* It is in this buffer. */ if (socketbuf->offset + len + content_length < socketbuf->len) { return len + content_length + 1; } if (socketbuf->next == NULL) { /* There is no buffer to merge, so we fail. */ return 0; } /* We merge ourself with the next buffer. */ merge_socketbufs(socketbuf); } while (1); } #ifdef USE_SCTP static int handleSCTPNotify(struct sipp_socket* socket, char* buffer) { union sctp_notification *notifMsg; notifMsg = (union sctp_notification *)buffer; TRACE_MSG("SCTP Notification: %d\n", ntohs(notifMsg->sn_header.sn_type)); if (notifMsg->sn_header.sn_type == SCTP_ASSOC_CHANGE) { TRACE_MSG("SCTP_ASSOC_CHANGE\n"); if (notifMsg->sn_assoc_change.sac_state == SCTP_COMM_UP) { TRACE_MSG("SCTP_COMM_UP\n"); socket->sctpstate = SCTP_UP; sipp_sctp_peer_params(socket); /* Send SCTP message right after association is up */ socket->ss_congested = false; flush_socket(socket); return -2; } else { TRACE_MSG("else: %d\n", notifMsg->sn_assoc_change.sac_state); return 0; } } else if (notifMsg->sn_header.sn_type == SCTP_SHUTDOWN_EVENT) { TRACE_MSG("SCTP_SHUTDOWN_EVENT\n"); return 0; } return -2; } void set_multihome_addr(struct sipp_socket* socket, int port) { if (strlen(multihome_ip)>0) { struct addrinfo * multi_addr; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; if (getaddrinfo(multihome_ip, NULL, &hints, &multi_addr) != 0) { ERROR("Can't get multihome IP address in getaddrinfo, multihome_ip='%s'", multihome_ip); } struct sockaddr_storage secondaryaddress; memset(&secondaryaddress, 0, sizeof(secondaryaddress)); memcpy(&secondaryaddress, multi_addr->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage *, multi_addr->ai_addr))); freeaddrinfo(multi_addr); if (port>0) { if (secondaryaddress.ss_family==AF_INET) ((struct sockaddr_in*)&secondaryaddress)->sin_port=htons(port); else if (secondaryaddress.ss_family==AF_INET6) ((struct sockaddr_in6*)&secondaryaddress)->sin6_port=htons(port); } int ret = sctp_bindx(socket->ss_fd, (struct sockaddr *) &secondaryaddress, 1, SCTP_BINDX_ADD_ADDR); if (ret < 0) { WARNING("Can't bind to multihome address, errno='%d'", errno); } } } #endif /* Pull up to tcp_readsize data bytes out of the socket into our local buffer. */ int empty_socket(struct sipp_socket *socket) { int readsize=0; if (socket->ss_transport == T_UDP || socket->ss_transport == T_SCTP) { readsize = SIPP_MAX_MSG_SIZE; } else { readsize = tcp_readsize; } struct socketbuf *socketbuf; char *buffer; int ret = -1; /* Where should we start sending packets to, ideally we should begin to parse * the Via, Contact, and Route headers. But for now SIPp always sends to the * host specified on the command line; or for UAS mode to the address that * sent the last message. */ sipp_socklen_t addrlen = sizeof(struct sockaddr_storage); buffer = (char *)malloc(readsize); if (!buffer) { ERROR("Could not allocate memory for read!"); } socketbuf = alloc_socketbuf(buffer, readsize, NO_COPY, NULL); switch(socket->ss_transport) { case T_TCP: case T_UDP: ret = recvfrom(socket->ss_fd, buffer, readsize, 0, (struct sockaddr *)&socketbuf->addr, &addrlen); break; case T_TLS: #ifdef USE_OPENSSL ret = SSL_read(socket->ss_ssl, buffer, readsize); /* XXX: Check for clean shutdown. */ #else ERROR("TLS support is not enabled!"); #endif break; case T_SCTP: #ifdef USE_SCTP struct sctp_sndrcvinfo recvinfo; memset(&recvinfo, 0, sizeof(recvinfo)); int msg_flags = 0; ret = sctp_recvmsg(socket->ss_fd, (void*)buffer, readsize, (struct sockaddr *) &socketbuf->addr, &addrlen, &recvinfo, &msg_flags); if (MSG_NOTIFICATION & msg_flags) { errno = 0; handleSCTPNotify(socket, buffer); ret = -2; } #else ERROR("SCTP support is not enabled!"); #endif break; } if (ret <= 0) { free_socketbuf(socketbuf); return ret; } socketbuf->len = ret; buffer_read(socket, socketbuf); /* Do we have a complete SIP message? */ if (!socket->ss_msglen) { if (int msg_len = check_for_message(socket)) { socket->ss_msglen = msg_len; pending_messages++; } } return ret; } void sipp_socket_invalidate(struct sipp_socket *socket) { int pollidx; if (socket->ss_invalid) { return; } #ifdef USE_OPENSSL if (SSL *ssl = socket->ss_ssl) { SSL_set_shutdown(ssl, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); SSL_free(ssl); } #endif /* In some error conditions, the socket FD has already been closed - if it hasn't, do so now. */ if (socket->ss_fd != -1) { #ifdef HAVE_EPOLL int rc = epoll_ctl(epollfd, EPOLL_CTL_DEL, socket->ss_fd, NULL); if (rc == -1) { WARNING_NO("Failed to delete FD from epoll"); } #endif shutdown(socket->ss_fd, SHUT_RDWR); #ifdef USE_SCTP if (socket->ss_transport == T_SCTP && !gracefulclose) { struct linger ling = {1, 0}; if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_LINGER, &ling, sizeof(ling)) < 0) { WARNING("Unable to set SO_LINGER option for SCTP close"); } } #endif sipp_abort_connection(socket->ss_fd); socket->ss_fd = -1; } if ((pollidx = socket->ss_pollidx) >= pollnfds) { ERROR("Pollset error: index %d is greater than number of fds %d!", pollidx, pollnfds); } socket->ss_invalid = true; socket->ss_pollidx = -1; /* Adds call sockets in the array */ assert(pollnfds > 0); pollnfds--; #ifdef HAVE_EPOLL if (pollidx < pollnfds) { epollfiles[pollidx] = epollfiles[pollnfds]; epollfiles[pollidx].data.u32 = pollidx; if (sockets[pollnfds]->ss_fd != -1) { int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, sockets[pollnfds]->ss_fd, &epollfiles[pollidx]); if ((rc == -1) && (errno != EPERM)) { // Ignore "Operation not supported" errors - // otherwise we get log spam when redirecting stdout // to /dev/null WARNING_NO("Failed to update FD within epoll"); } } } #else pollfiles[pollidx] = pollfiles[pollnfds]; #endif sockets[pollidx] = sockets[pollnfds]; sockets[pollidx]->ss_pollidx = pollidx; sockets[pollnfds] = NULL; if (socket->ss_msglen) { pending_messages--; } #ifdef USE_SCTP if (socket->ss_transport == T_SCTP) { socket->sctpstate = SCTP_DOWN; } #endif } void sipp_abort_connection(int fd) { /* Disable linger - we'll send a RST when we close. */ struct linger flush; flush.l_onoff = 1; flush.l_linger = 0; setsockopt(fd, SOL_SOCKET, SO_LINGER, &flush, sizeof(flush)); /* Mark the socket as non-blocking. It's not clear whether this is required but can't hurt. */ int flags = fcntl(fd, F_GETFL, 0); fcntl(fd, F_SETFL, flags | O_NONBLOCK); /* Actually close the socket. */ close(fd); } void sipp_close_socket (struct sipp_socket *socket) { int count = --socket->ss_count; if (count > 0) { return; } sipp_socket_invalidate(socket); sockets_pending_reset.erase(socket); free(socket); } ssize_t read_message(struct sipp_socket *socket, char *buf, size_t len, struct sockaddr_storage *src) { size_t avail; if (!socket->ss_msglen) return 0; if (socket->ss_msglen > len) ERROR("There is a message waiting in sockfd(%d) that is bigger (%zu bytes) than the read size.", socket->ss_fd, socket->ss_msglen); len = socket->ss_msglen; avail = socket->ss_in->len - socket->ss_in->offset; if (avail > len) { avail = len; } memcpy(buf, socket->ss_in->buf + socket->ss_in->offset, avail); memcpy(src, &socket->ss_in->addr, SOCK_ADDR_SIZE(&socket->ss_in->addr)); /* Update our buffer and return value. */ buf[avail] = '\0'; /* For CMD Message the escape char is the end of message */ if ((socket->ss_control) && buf[avail-1] == 27) buf[avail-1] = '\0'; socket->ss_in->offset += avail; /* Have we emptied the buffer? */ if (socket->ss_in->offset == socket->ss_in->len) { struct socketbuf *next = socket->ss_in->next; free_socketbuf(socket->ss_in); socket->ss_in = next; } if (int msg_len = check_for_message(socket)) { socket->ss_msglen = msg_len; } else { socket->ss_msglen = 0; pending_messages--; } return avail; } void process_message(struct sipp_socket *socket, char *msg, ssize_t msg_size, struct sockaddr_storage *src) { // TRACE_MSG(" msg_size %d and pollset_index is %d \n", msg_size, pollset_index)); if (msg_size <= 0) { return; } if (sipMsgCheck(msg, socket) == false) { if (msg_size == 4 && (memcmp(msg, "\r\n\r\n", 4) == 0 || memcmp(msg, "\x00\x00\x00\x00", 4) == 0)) { /* Common keepalives */; } else { WARNING("non SIP message discarded: \"%.*s\" (%zu)", (int)msg_size, msg, msg_size); } return; } const char *call_id = get_trimmed_call_id(msg); if (call_id[0] == '\0') { WARNING("SIP message without Call-ID discarded"); return; } listener *listener_ptr = get_listener(call_id); struct timeval currentTime; GET_TIME (¤tTime); if (useShortMessagef == 1) { TRACE_SHORTMSG("%s\tR\t%s\tCSeq:%s\t%s\n", CStat::formatTime(¤tTime), call_id, get_header_content(msg, "CSeq:"), get_first_line(msg)); } if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "%s %smessage received [%zu] bytes :\n\n%s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(socket->ss_transport), socket->ss_control ? "control " : "", msg_size, msg); } if (!listener_ptr) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_B || thirdPartyMode == MODE_3PCC_A_PASSIVE || thirdPartyMode == MODE_MASTER_PASSIVE || thirdPartyMode == MODE_SLAVE) { // Adding a new OUTGOING call ! main_scenario->stats->computeStat(CStat::E_CREATE_OUTGOING_CALL); call *new_ptr = new call(call_id, local_ip_is_ipv6, 0, use_remote_sending_addr ? &remote_sending_sockaddr : &remote_sockaddr); if (!new_ptr) { ERROR("Out of memory allocating a call!"); } outbound_congestion = false; if ((socket != main_socket) && (socket != tcp_multiplex) && (socket != localTwinSippSocket) && (socket != twinSippSocket) && (!is_a_local_socket(socket))) { new_ptr->associate_socket(socket); socket->ss_count++; } else { /* We need to hook this call up to a real *call* socket. */ if (!multisocket) { switch(transport) { case T_UDP: new_ptr->associate_socket(main_socket); main_socket->ss_count++; break; case T_TCP: case T_SCTP: case T_TLS: new_ptr->associate_socket(tcp_multiplex); tcp_multiplex->ss_count++; break; } } } listener_ptr = new_ptr; } else if (creationMode == MODE_SERVER) { if (quitting >= 1) { CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); TRACE_MSG("Discarded message for new calls while quitting\n"); return; } // Adding a new INCOMING call ! main_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); listener_ptr = new call(call_id, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src); if (!listener_ptr) { ERROR("Out of memory allocating a call!"); } } else { // mode != from SERVER and 3PCC Controller B // This is a message that is not relating to any known call if (ooc_scenario) { if (!get_reply_code(msg)) { char *msg_start = strdup(msg); char *msg_start_end = msg_start; while (!isspace(*msg_start_end) && (*msg_start_end != '\0')) { msg_start_end++; } *msg_start_end = '\0'; ooc_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); WARNING("Received out-of-call %s message, using the out-of-call scenario", msg_start); free(msg_start); /* This should have the real address that the message came from. */ call *call_ptr = new call(ooc_scenario, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src, call_id, 0 /* no user. */, socket->ss_ipv6, true, false); if (!call_ptr) { ERROR("Out of memory allocating a call!"); } CStat::globalStat(CStat::E_AUTO_ANSWERED); call_ptr->process_incoming(msg, src); } else { /* We received a response not relating to any known call */ /* Do nothing, even if in auto answer mode */ CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); } } else if (auto_answer && ((strstr(msg, "INFO") == msg) || (strstr(msg, "NOTIFY") == msg) || (strstr(msg, "OPTIONS") == msg) || (strstr(msg, "UPDATE") == msg))) { // If auto answer mode, try to answer the incoming message // with automaticResponseMode // call is discarded before exiting the block if (!get_reply_code(msg)) { aa_scenario->stats->computeStat(CStat::E_CREATE_INCOMING_CALL); /* This should have the real address that the message came from. */ call *call_ptr = new call(aa_scenario, socket, use_remote_sending_addr ? &remote_sending_sockaddr : src, call_id, 0 /* no user. */, socket->ss_ipv6, true, false); if (!call_ptr) { ERROR("Out of memory allocating a call!"); } CStat::globalStat(CStat::E_AUTO_ANSWERED); call_ptr->process_incoming(msg, src); } else { fprintf(stderr, "%s", msg); /* We received a response not relating to any known call */ /* Do nothing, even if in auto answer mode */ CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); } } else { CStat::globalStat(CStat::E_OUT_OF_CALL_MSGS); WARNING("Discarding message which can't be mapped to a known SIPp call:\n%s", msg); } } } /* If the call was not created above, we just drop this message. */ if (!listener_ptr) { return; } if ((socket == localTwinSippSocket) || (socket == twinSippSocket) || (is_a_local_socket(socket))) { listener_ptr -> process_twinSippCom(msg); } else { listener_ptr -> process_incoming(msg, src); } } struct sipp_socket *sipp_allocate_socket(bool use_ipv6, int transport, int fd, int accepting) { struct sipp_socket *ret = (struct sipp_socket *)malloc(sizeof(struct sipp_socket)); if (!ret) { ERROR("Could not allocate a sipp_socket structure."); } memset(ret, 0, sizeof(struct sipp_socket)); ret->ss_transport = transport; ret->ss_control = false; ret->ss_ipv6 = use_ipv6; ret->ss_fd = fd; ret->ss_comp_state = NULL; ret->ss_count = 1; ret->ss_changed_dest = false; /* Initialize all sockets with our destination address. */ memcpy(&ret->ss_remote_sockaddr, &remote_sockaddr, sizeof(ret->ss_remote_sockaddr)); #ifdef USE_OPENSSL ret->ss_ssl = NULL; if ( transport == T_TLS ) { if ((ret->ss_bio = BIO_new_socket(fd, BIO_NOCLOSE)) == NULL) { ERROR("Unable to create BIO object:Problem with BIO_new_socket()\n"); } if (!(ret->ss_ssl = SSL_new(accepting ? sip_trp_ssl_ctx : sip_trp_ssl_ctx_client))) { ERROR("Unable to create SSL object : Problem with SSL_new() \n"); } SSL_set_bio(ret->ss_ssl, ret->ss_bio, ret->ss_bio); } #endif ret->ss_in = NULL; ret->ss_out = NULL; ret->ss_msglen = 0; ret->ss_congested = false; ret->ss_invalid = false; /* Store this socket in the tables. */ ret->ss_pollidx = pollnfds++; sockets[ret->ss_pollidx] = ret; #ifdef HAVE_EPOLL epollfiles[ret->ss_pollidx].data.u32 = ret->ss_pollidx; epollfiles[ret->ss_pollidx].events = EPOLLIN; int rc = epoll_ctl(epollfd, EPOLL_CTL_ADD, ret->ss_fd, &epollfiles[ret->ss_pollidx]); if (rc == -1) { if (errno == EPERM) { // Attempted to use epoll on a file that does not support // it - this may happen legitimately when stdin/stdout is // redirected to /dev/null, so don't warn } else { ERROR_NO("Failed to add FD to epoll"); } } #else pollfiles[ret->ss_pollidx].fd = ret->ss_fd; pollfiles[ret->ss_pollidx].events = POLLIN | POLLERR; pollfiles[ret->ss_pollidx].revents = 0; #endif return ret; } static struct sipp_socket* sipp_allocate_socket(bool use_ipv6, int transport, int fd) { return sipp_allocate_socket(use_ipv6, transport, fd, 0); } static int socket_fd(bool use_ipv6, int transport) { int socket_type = -1; int protocol = 0; int fd; switch(transport) { case T_UDP: socket_type = SOCK_DGRAM; protocol = IPPROTO_UDP; break; case T_SCTP: #ifndef USE_SCTP ERROR("You do not have SCTP support enabled!\n"); #else socket_type = SOCK_STREAM; protocol = IPPROTO_SCTP; #endif break; case T_TLS: #ifndef USE_OPENSSL ERROR("You do not have TLS support enabled!\n"); #endif case T_TCP: socket_type = SOCK_STREAM; break; } if ((fd = socket(use_ipv6 ? AF_INET6 : AF_INET, socket_type, protocol))== -1) { ERROR("Unable to get a %s socket (3)", TRANSPORT_TO_STRING(transport)); } return fd; } struct sipp_socket *new_sipp_socket(bool use_ipv6, int transport) { struct sipp_socket *ret; int fd = socket_fd(use_ipv6, transport); #if defined(__SUNOS) if (fd < 256) { int newfd = fcntl(fd, F_DUPFD, 256); if (newfd <= 0) { // Typically, (24)(Too many open files) is the error here WARNING("Unable to get a different %s socket, errno=%d(%s)", TRANSPORT_TO_STRING(transport), errno, strerror(errno)); // Keep the original socket fd. newfd = fd; } else { close(fd); } fd = newfd; } #endif ret = sipp_allocate_socket(use_ipv6, transport, fd); if (!ret) { close(fd); ERROR("Could not allocate new socket structure!"); } return ret; } struct sipp_socket *new_sipp_call_socket(bool use_ipv6, int transport, bool *existing) { struct sipp_socket *sock = NULL; static int next_socket; if (pollnfds >= max_multi_socket) { // we must take the main socket into account /* Find an existing socket that matches transport and ipv6 parameters. */ int first = next_socket; do { int test_socket = next_socket; next_socket = (next_socket + 1) % pollnfds; if (sockets[test_socket]->ss_call_socket) { /* Here we need to check that the address is the default. */ if (sockets[test_socket]->ss_ipv6 != use_ipv6) { continue; } if (sockets[test_socket]->ss_transport != transport) { continue; } if (sockets[test_socket]->ss_changed_dest) { continue; } sock = sockets[test_socket]; sock->ss_count++; *existing = true; break; } } while (next_socket != first); if (next_socket == first) { ERROR("Could not find an existing call socket to re-use!"); } } else { sock = new_sipp_socket(use_ipv6, transport); sock->ss_call_socket = true; *existing = false; } return sock; } struct sipp_socket *sipp_accept_socket(struct sipp_socket *accept_socket) { struct sipp_socket *ret; struct sockaddr_storage remote_sockaddr; int fd; sipp_socklen_t addrlen = sizeof(remote_sockaddr); if ((fd = accept(accept_socket->ss_fd, (struct sockaddr *)&remote_sockaddr, &addrlen))== -1) { ERROR("Unable to accept on a %s socket: %s", TRANSPORT_TO_STRING(transport), strerror(errno)); } #if defined(__SUNOS) if (fd < 256) { int newfd = fcntl(fd, F_DUPFD, 256); if (newfd <= 0) { // Typically, (24)(Too many open files) is the error here WARNING("Unable to get a different %s socket, errno=%d(%s)", TRANSPORT_TO_STRING(transport), errno, strerror(errno)); // Keep the original socket fd. newfd = fd; } else { close(fd); } fd = newfd; } #endif ret = sipp_allocate_socket(accept_socket->ss_ipv6, accept_socket->ss_transport, fd, 1); if (!ret) { close(fd); ERROR_NO("Could not allocate new socket!"); } memcpy(&ret->ss_remote_sockaddr, &remote_sockaddr, sizeof(ret->ss_remote_sockaddr)); /* We should connect back to the address which connected to us if we * experience a TCP failure. */ memcpy(&ret->ss_dest, &remote_sockaddr, sizeof(ret->ss_remote_sockaddr)); if (ret->ss_transport == T_TLS) { #ifdef USE_OPENSSL int err; if ((err = SSL_accept(ret->ss_ssl)) < 0) { ERROR("Error in SSL_accept: %s\n", sip_tls_error_string(accept_socket->ss_ssl, err)); } #else ERROR("You need to compile SIPp with TLS support"); #endif } return ret; } int sipp_bind_socket(struct sipp_socket *socket, struct sockaddr_storage *saddr, int *port) { int ret; int len; #ifdef USE_SCTP if (transport==T_SCTP && multisocket==1 && *port==-1) { if (socket->ss_ipv6) { (_RCAST(struct sockaddr_in6 *, saddr))->sin6_port=0; } else { (_RCAST(struct sockaddr_in *, saddr))->sin_port=0; } } #endif if (socket->ss_ipv6) { len = sizeof(struct sockaddr_in6); } else { len = sizeof(struct sockaddr_in); } if ((ret = ::bind(socket->ss_fd, (sockaddr *)saddr, len))) { return ret; } if (!port) { return 0; } if ((ret = getsockname(socket->ss_fd, (sockaddr *)saddr, (sipp_socklen_t *) &len))) { return ret; } if (socket->ss_ipv6) { *port = ntohs((short)((_RCAST(struct sockaddr_in6 *, saddr))->sin6_port)); } else { *port = ntohs((short)((_RCAST(struct sockaddr_in *, saddr))->sin_port)); } #ifdef USE_SCTP if (transport == T_SCTP) { bool isany = false; if (socket->ss_ipv6) { if (memcmp(&(_RCAST(struct sockaddr_in6 *, saddr)->sin6_addr), &in6addr_any, sizeof(in6_addr)) == 0) isany = true; } else { isany = (_RCAST(struct sockaddr_in *, saddr)->sin_addr.s_addr == INADDR_ANY); } if (!isany) { set_multihome_addr(socket, *port); } } #endif return 0; } static int sipp_do_connect_socket(struct sipp_socket* socket) { int ret; assert(socket->ss_transport == T_TCP || socket->ss_transport == T_TLS || socket->ss_transport == T_SCTP); if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS) { struct sockaddr_storage local_without_port; int port = -1; memcpy(&local_without_port, &local_sockaddr, sizeof(struct sockaddr_storage)); if (local_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *, &local_without_port))->sin6_port = htons(0); } else { (_RCAST(struct sockaddr_in *, &local_without_port))->sin_port = htons(0); } sipp_bind_socket(socket, &local_without_port, &port); } #ifdef USE_SCTP if (socket->ss_transport == T_SCTP) { int port = -1; sipp_bind_socket(socket, &local_sockaddr, &port); } #endif int flags = fcntl(socket->ss_fd, F_GETFL, 0); fcntl(socket->ss_fd, F_SETFL, flags | O_NONBLOCK); errno = 0; ret = connect(socket->ss_fd, (struct sockaddr *)&socket->ss_dest, SOCK_ADDR_SIZE(&socket->ss_dest)); if (ret < 0) { if (errno == EINPROGRESS) { /* Block this socket until the connect completes - this is very similar to entering congestion, but we don't want to increment congestion statistics. */ enter_congestion(socket, 0); nb_net_cong--; } else { return ret; } } fcntl(socket->ss_fd, F_SETFL, flags); if (socket->ss_transport == T_TLS) { #ifdef USE_OPENSSL int err; if ((err = SSL_connect(socket->ss_ssl)) < 0) { ERROR("Error in SSL connection: %s\n", sip_tls_error_string(socket->ss_ssl, err)); } #else ERROR("You need to compile SIPp with TLS support"); #endif } #ifdef USE_SCTP if (socket->ss_transport == T_SCTP) { socket->sctpstate = SCTP_CONNECTING; } #endif return 0; } int sipp_connect_socket(struct sipp_socket *socket, struct sockaddr_storage *dest) { memcpy(&socket->ss_dest, dest, SOCK_ADDR_SIZE(dest)); return sipp_do_connect_socket(socket); } int sipp_reconnect_socket(struct sipp_socket *socket) { if ((!socket->ss_invalid) && (socket->ss_fd != -1)) { WARNING("When reconnecting socket, already have file descriptor %d", socket->ss_fd); sipp_abort_connection(socket->ss_fd); socket->ss_fd = -1; } socket->ss_fd = socket_fd(socket->ss_ipv6, socket->ss_transport); if (socket->ss_fd == -1) { ERROR_NO("Could not obtain new socket: "); } if (socket->ss_invalid) { #ifdef USE_OPENSSL socket->ss_ssl = NULL; if (transport == T_TLS) { if ((socket->ss_bio = BIO_new_socket(socket->ss_fd, BIO_NOCLOSE)) == NULL) { ERROR("Unable to create BIO object:Problem with BIO_new_socket()\n"); } if (!(socket->ss_ssl = SSL_new(sip_trp_ssl_ctx_client))) { ERROR("Unable to create SSL object : Problem with SSL_new() \n"); } SSL_set_bio(socket->ss_ssl, socket->ss_bio, socket->ss_bio); } #endif /* Store this socket in the tables. */ socket->ss_pollidx = pollnfds++; sockets[socket->ss_pollidx] = socket; #ifdef HAVE_EPOLL epollfiles[socket->ss_pollidx].data.u32 = socket->ss_pollidx; epollfiles[socket->ss_pollidx].events = EPOLLIN; #else pollfiles[socket->ss_pollidx].fd = socket->ss_fd; pollfiles[socket->ss_pollidx].events = POLLIN | POLLERR; pollfiles[socket->ss_pollidx].revents = 0; #endif socket->ss_invalid = false; } #ifdef HAVE_EPOLL int rc = epoll_ctl(epollfd, EPOLL_CTL_ADD, socket->ss_fd, &epollfiles[socket->ss_pollidx]); if (rc == -1) { ERROR_NO("Failed to add FD to epoll"); } #endif return sipp_do_connect_socket(socket); } /*************************** I/O functions ***************************/ /* Allocate a socket buffer. */ struct socketbuf *alloc_socketbuf(char *buffer, size_t size, int copy, struct sockaddr_storage *dest) { struct socketbuf *socketbuf; socketbuf = (struct socketbuf *)malloc(sizeof(struct socketbuf)); if (!socketbuf) { ERROR("Could not allocate socket buffer!\n"); } memset(socketbuf, 0, sizeof(struct socketbuf)); if (copy) { socketbuf->buf = (char *)malloc(size); if (!socketbuf->buf) { ERROR("Could not allocate socket buffer data!\n"); } memcpy(socketbuf->buf, buffer, size); } else { socketbuf->buf = buffer; } socketbuf->len = size; socketbuf->offset = 0; if (dest) { memcpy(&socketbuf->addr, dest, SOCK_ADDR_SIZE(dest)); } socketbuf->next = NULL; return socketbuf; } /* Free a poll buffer. */ void free_socketbuf(struct socketbuf *socketbuf) { free(socketbuf->buf); free(socketbuf); } #ifdef USE_SCTP void sipp_sctp_peer_params(struct sipp_socket *socket) { if (heartbeat > 0 || pathmaxret > 0) { struct sctp_paddrparams peerparam; memset(&peerparam, 0, sizeof(peerparam)); sockaddr* addresses; int addresscount = sctp_getpaddrs(socket->ss_fd, 0, &addresses); if (addresscount < 1) WARNING("sctp_getpaddrs, errno=%d", errno); for (int i = 0; i < addresscount; i++) { memset(&peerparam.spp_address, 0, sizeof(peerparam.spp_address)); struct sockaddr_storage* peeraddress = (struct sockaddr_storage*) &addresses[i]; memcpy(&peerparam.spp_address, peeraddress, SOCK_ADDR_SIZE(peeraddress)); peerparam.spp_hbinterval = heartbeat; peerparam.spp_pathmaxrxt = pathmaxret; if (heartbeat > 0) peerparam.spp_flags = SPP_HB_ENABLE; if (pmtu > 0) { peerparam.spp_pathmtu = pmtu; peerparam.spp_flags |= SPP_PMTUD_DISABLE; } if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &peerparam, sizeof(peerparam)) == -1) { sctp_freepaddrs(addresses); WARNING("setsockopt(SCTP_PEER_ADDR_PARAMS) failed, errno=%d", errno); } } sctp_freepaddrs(addresses); } } #endif void sipp_customize_socket(struct sipp_socket *socket) { unsigned int buffsize = buff_size; /* Allows fast TCP reuse of the socket */ if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS || socket->ss_transport == T_SCTP) { int sock_opt = 1; if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_REUSEADDR, (void *)&sock_opt, sizeof (sock_opt)) == -1) { ERROR_NO("setsockopt(SO_REUSEADDR) failed"); } #ifdef USE_SCTP if (socket->ss_transport == T_SCTP) { struct sctp_event_subscribe event; memset(&event, 0, sizeof(event)); event.sctp_data_io_event = 1; event.sctp_association_event = 1; event.sctp_shutdown_event = 1; if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_EVENTS, &event, sizeof(event)) == -1) { ERROR_NO("setsockopt(SCTP_EVENTS) failed, errno=%d", errno); } if (assocmaxret > 0) { struct sctp_assocparams associnfo; memset(&associnfo, 0, sizeof(associnfo)); associnfo.sasoc_asocmaxrxt = assocmaxret; if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_ASSOCINFO, &associnfo, sizeof(associnfo)) == -1) { WARNING("setsockopt(SCTP_ASSOCINFO) failed, errno=%d", errno); } } if (setsockopt(socket->ss_fd, IPPROTO_SCTP, SCTP_NODELAY, (void *)&sock_opt, sizeof (sock_opt)) == -1) { WARNING("setsockopt(SCTP_NODELAY) failed, errno=%d", errno); } } #endif #ifndef SOL_TCP #define SOL_TCP 6 #endif if (socket->ss_transport != T_SCTP) { if (setsockopt(socket->ss_fd, SOL_TCP, TCP_NODELAY, (void *)&sock_opt, sizeof (sock_opt)) == -1) { { ERROR_NO("setsockopt(TCP_NODELAY) failed"); } } } { struct linger linger; linger.l_onoff = 1; linger.l_linger = 1; if (setsockopt (socket->ss_fd, SOL_SOCKET, SO_LINGER, &linger, sizeof (linger)) < 0) { ERROR_NO("Unable to set SO_LINGER option"); } } } /* Increase buffer sizes for this sockets */ if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_SNDBUF, &buffsize, sizeof(buffsize))) { ERROR_NO("Unable to set socket sndbuf"); } buffsize = buff_size; if (setsockopt(socket->ss_fd, SOL_SOCKET, SO_RCVBUF, &buffsize, sizeof(buffsize))) { ERROR_NO("Unable to set socket rcvbuf"); } } /* This socket is congested, mark it as such and add it to the poll files. */ int enter_congestion(struct sipp_socket *socket, int again) { if (!socket->ss_congested) { nb_net_cong++; } socket->ss_congested = true; TRACE_MSG("Problem %s on socket %d and poll_idx is %d \n", again == EWOULDBLOCK ? "EWOULDBLOCK" : "EAGAIN", socket->ss_fd, socket->ss_pollidx); #ifdef HAVE_EPOLL epollfiles[socket->ss_pollidx].events |= EPOLLOUT; int rc = epoll_ctl(epollfd, EPOLL_CTL_MOD, socket->ss_fd, &epollfiles[socket->ss_pollidx]); if (rc == -1) { WARNING_NO("Failed to set EPOLLOUT"); } #else pollfiles[socket->ss_pollidx].events |= POLLOUT; #endif #ifdef USE_SCTP if (socket->ss_transport == T_SCTP && socket->sctpstate == SCTP_CONNECTING) return 0; #endif return -1; } static int write_error(struct sipp_socket* socket, int ret) { const char *errstring = strerror(errno); #ifndef EAGAIN int again = (errno == EWOULDBLOCK) ? errno : 0; #else int again = ((errno == EAGAIN) || (errno == EWOULDBLOCK)) ? errno : 0; /* Scrub away EAGAIN from the rest of the code. */ if (errno == EAGAIN) { errno = EWOULDBLOCK; } #endif if (again) { return enter_congestion(socket, again); } if ((socket->ss_transport == T_TCP || socket->ss_transport == T_SCTP) && errno == EPIPE) { nb_net_send_errors++; sipp_abort_connection(socket->ss_fd); socket->ss_fd = -1; sockets_pending_reset.insert(socket); if (reconnect_allowed()) { WARNING("Broken pipe on TCP connection, remote peer " "probably closed the socket"); } else { ERROR("Broken pipe on TCP connection, remote peer " "probably closed the socket"); } return -1; } #ifdef USE_OPENSSL if (socket->ss_transport == T_TLS) { errstring = sip_tls_error_string(socket->ss_ssl, ret); } #endif WARNING("Unable to send %s message: %s", TRANSPORT_TO_STRING(socket->ss_transport), errstring); nb_net_send_errors++; return -1; } int read_error(struct sipp_socket *socket, int ret) { const char *errstring = strerror(errno); #ifdef USE_OPENSSL if (socket->ss_transport == T_TLS) { errstring = sip_tls_error_string(socket->ss_ssl, ret); } #endif assert(ret <= 0); #ifdef EAGAIN /* Scrub away EAGAIN from the rest of the code. */ if (errno == EAGAIN) { errno = EWOULDBLOCK; } #endif /* We have only non-blocking reads, so this should not occur. */ if (ret < 0) { assert(errno != EAGAIN); } if (socket->ss_transport == T_TCP || socket->ss_transport == T_TLS) { if (ret == 0) { /* The remote side closed the connection. */ if (socket->ss_control) { if (localTwinSippSocket) sipp_close_socket(localTwinSippSocket); if (extendedTwinSippMode) { close_peer_sockets(); close_local_sockets(); free_peer_addr_map(); WARNING("One of the twin instances has ended -> exiting"); quitting += 20; } else if (twinSippMode) { if (twinSippSocket) sipp_close_socket(twinSippSocket); if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { WARNING("3PCC controller A has ended -> exiting"); quitting += 20; } else { quitting = 1; } } } else { /* The socket was closed "cleanly", but we may have calls that need to * be destroyed. Also, if these calls are not complete, and attempt to * send again we may "ressurect" the socket by reconnecting it.*/ sipp_socket_invalidate(socket); if (reset_close) { close_calls(socket); } } return 0; } sipp_abort_connection(socket->ss_fd); socket->ss_fd = -1; sockets_pending_reset.insert(socket); nb_net_recv_errors++; if (reconnect_allowed()) { WARNING("Error on TCP connection, remote peer probably closed the socket: %s", errstring); } else { ERROR("Error on TCP connection, remote peer probably closed the socket: %s", errstring); } return -1; } WARNING("Unable to receive %s message: %s", TRANSPORT_TO_STRING(socket->ss_transport), errstring); nb_net_recv_errors++; return -1; } void buffer_write(struct sipp_socket *socket, const char *buffer, size_t len, struct sockaddr_storage *dest) { struct socketbuf *buf = socket->ss_out; if (!buf) { socket->ss_out = alloc_socketbuf(const_cast(buffer), len, DO_COPY, dest); /* NO BUG BECAUSE OF DO_COPY */ TRACE_MSG("Added first buffered message to socket %d\n", socket->ss_fd); return; } while (buf->next) { buf = buf->next; } buf->next = alloc_socketbuf(const_cast(buffer), len, DO_COPY, dest); /* NO BUG BECAUSE OF DO_COPY */ TRACE_MSG("Appended buffered message to socket %d\n", socket->ss_fd); } void buffer_read(struct sipp_socket *socket, struct socketbuf *newbuf) { struct socketbuf *buf = socket->ss_in; struct socketbuf *prev = buf; if (!buf) { socket->ss_in = newbuf; return; } while (buf->next) { prev = buf; buf = buf->next; } prev->next = newbuf; } #ifdef USE_OPENSSL /****** Certificate Verification Callback FACILITY *************/ int sip_tls_verify_callback(int ok , X509_STORE_CTX *store) { char data[512]; if (!ok) { X509 *cert = X509_STORE_CTX_get_current_cert(store); X509_NAME_oneline(X509_get_issuer_name(cert), data, 512); WARNING("TLS verification error for issuer: '%s'", data); X509_NAME_oneline(X509_get_subject_name(cert), data, 512); WARNING("TLS verification error for subject: '%s'", data); } return ok; } /*********** Load the CRL's into SSL_CTX **********************/ static int sip_tls_load_crls(SSL_CTX* ctx , const char* crlfile) { X509_STORE *store; X509_LOOKUP *lookup; /* Get the X509_STORE from SSL context */ if (!(store = SSL_CTX_get_cert_store(ctx))) { return (-1); } /* Add lookup file to X509_STORE */ if (!(lookup = X509_STORE_add_lookup(store, X509_LOOKUP_file()))) { return (-1); } /* Add the CRLS to the lookpup object */ if (X509_load_crl_file(lookup, crlfile, X509_FILETYPE_PEM) != 1) { return (-1); } /* Set the flags of the store so that CRLS's are consulted */ #if OPENSSL_VERSION_NUMBER >= 0x00907000L X509_STORE_set_flags(store, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL); #else #warning This version of OpenSSL (<0.9.7) cannot handle CRL files in capath ERROR("This version of OpenSSL (<0.9.7) cannot handle CRL files in capath"); #endif return (1); } /************* Prepare the SSL context ************************/ ssl_init_status FI_init_ssl_context (void) { sip_trp_ssl_ctx = SSL_CTX_new( TLSv1_method() ); if ( sip_trp_ssl_ctx == NULL ) { ERROR("FI_init_ssl_context: SSL_CTX_new with TLSv1_method failed"); return SSL_INIT_ERROR; } sip_trp_ssl_ctx_client = SSL_CTX_new( TLSv1_method() ); if ( sip_trp_ssl_ctx_client == NULL) { ERROR("FI_init_ssl_context: SSL_CTX_new with TLSv1_method failed"); return SSL_INIT_ERROR; } /* Load the trusted CA's */ SSL_CTX_load_verify_locations(sip_trp_ssl_ctx, tls_cert_name, NULL); SSL_CTX_load_verify_locations(sip_trp_ssl_ctx_client, tls_cert_name, NULL); /* CRL load from application specified only if specified on the command line */ if (strlen(tls_crl_name) != 0) { if (sip_tls_load_crls(sip_trp_ssl_ctx, tls_crl_name) == -1) { ERROR("FI_init_ssl_context: Unable to load CRL file (%s)", tls_crl_name); return SSL_INIT_ERROR; } if (sip_tls_load_crls(sip_trp_ssl_ctx_client, tls_crl_name) == -1) { ERROR("FI_init_ssl_context: Unable to load CRL (client) file (%s)", tls_crl_name); return SSL_INIT_ERROR; } /* The following call forces to process the certificates with the */ /* initialised SSL_CTX */ SSL_CTX_set_verify(sip_trp_ssl_ctx, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, sip_tls_verify_callback); SSL_CTX_set_verify(sip_trp_ssl_ctx_client, SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT, sip_tls_verify_callback); } /* Selection Cipher suits - load the application specified ciphers */ SSL_CTX_set_default_passwd_cb_userdata(sip_trp_ssl_ctx, (void *)CALL_BACK_USER_DATA ); SSL_CTX_set_default_passwd_cb_userdata(sip_trp_ssl_ctx_client, (void *)CALL_BACK_USER_DATA ); SSL_CTX_set_default_passwd_cb( sip_trp_ssl_ctx, passwd_call_back_routine ); SSL_CTX_set_default_passwd_cb( sip_trp_ssl_ctx_client, passwd_call_back_routine ); if ( SSL_CTX_use_certificate_file(sip_trp_ssl_ctx, tls_cert_name, SSL_FILETYPE_PEM ) != 1 ) { ERROR("FI_init_ssl_context: SSL_CTX_use_certificate_file failed"); return SSL_INIT_ERROR; } if ( SSL_CTX_use_certificate_file(sip_trp_ssl_ctx_client, tls_cert_name, SSL_FILETYPE_PEM ) != 1 ) { ERROR("FI_init_ssl_context: SSL_CTX_use_certificate_file (client) failed"); return SSL_INIT_ERROR; } if ( SSL_CTX_use_PrivateKey_file(sip_trp_ssl_ctx, tls_key_name, SSL_FILETYPE_PEM ) != 1 ) { ERROR("FI_init_ssl_context: SSL_CTX_use_PrivateKey_file failed"); return SSL_INIT_ERROR; } if ( SSL_CTX_use_PrivateKey_file(sip_trp_ssl_ctx_client, tls_key_name, SSL_FILETYPE_PEM ) != 1 ) { ERROR("FI_init_ssl_context: SSL_CTX_use_PrivateKey_file (client) failed"); return SSL_INIT_ERROR; } return SSL_INIT_NORMAL; } static int send_nowait_tls(SSL* ssl, const void* msg, int len, int /*flags*/) { int initial_fd_flags; int rc; int fd; int fd_flags; if ( (fd = SSL_get_fd(ssl)) == -1 ) { return (-1); } fd_flags = fcntl(fd, F_GETFL, NULL); initial_fd_flags = fd_flags; fd_flags |= O_NONBLOCK; fcntl(fd, F_SETFL, fd_flags); rc = SSL_write(ssl, msg, len); if ( rc <= 0 ) { return(rc); } fcntl(fd, F_SETFL, initial_fd_flags); return rc; } #endif static int send_nowait(int s, const void* msg, int len, int flags) { #if defined(MSG_DONTWAIT) && !defined(__SUNOS) return send(s, msg, len, flags | MSG_DONTWAIT); #else int fd_flags = fcntl(s, F_GETFL , NULL); int initial_fd_flags; int rc; initial_fd_flags = fd_flags; // fd_flags &= ~O_ACCMODE; // Remove the access mode from the value fd_flags |= O_NONBLOCK; fcntl(s, F_SETFL , fd_flags); rc = send(s, msg, len, flags); fcntl(s, F_SETFL , initial_fd_flags); return rc; #endif } #ifdef USE_SCTP int send_sctp_nowait(int s, const void *msg, int len, int flags) { struct sctp_sndrcvinfo sinfo; memset(&sinfo, 0, sizeof(sinfo)); sinfo.sinfo_flags = SCTP_UNORDERED; // according to RFC4168 5.1 sinfo.sinfo_stream = 0; #if defined(MSG_DONTWAIT) && !defined(__SUNOS) return sctp_send(s, msg, len, &sinfo, flags | MSG_DONTWAIT); #else int fd_flags = fcntl(s, F_GETFL, NULL); int initial_fd_flags; int rc; initial_fd_flags = fd_flags; fd_flags |= O_NONBLOCK; fcntl(s, F_SETFL , fd_flags); rc = sctp_send(s, msg, len, &sinfo, flags); fcntl(s, F_SETFL, initial_fd_flags); return rc; #endif } #endif static ssize_t socket_write_primitive(struct sipp_socket* socket, const char* buffer, size_t len, struct sockaddr_storage* dest) { ssize_t rc; /* Refuse to write to invalid sockets. */ if (socket->ss_invalid) { WARNING("Returning EPIPE on invalid socket: %p (%d)\n", _RCAST(void*, socket), socket->ss_fd); errno = EPIPE; return -1; } /* Always check congestion before sending. */ if (socket->ss_congested) { errno = EWOULDBLOCK; return -1; } switch(socket->ss_transport) { case T_TLS: #ifdef USE_OPENSSL rc = send_nowait_tls(socket->ss_ssl, buffer, len, 0); #else errno = EOPNOTSUPP; rc = -1; #endif break; case T_SCTP: #ifdef USE_SCTP { TRACE_MSG("socket_write_primitive %d\n", socket->sctpstate); if (socket->sctpstate == SCTP_DOWN) { errno = EPIPE; return -1; } else if (socket->sctpstate == SCTP_CONNECTING) { errno = EWOULDBLOCK; return -1; } rc = send_sctp_nowait(socket->ss_fd, buffer, len, 0); } #else errno = EOPNOTSUPP; rc = -1; #endif break; case T_TCP: rc = send_nowait(socket->ss_fd, buffer, len, 0); break; case T_UDP: if (compression) { static char comp_msg[SIPP_MAX_MSG_SIZE]; strncpy(comp_msg, buffer, sizeof(comp_msg) - 1); if (comp_compress(&socket->ss_comp_state, comp_msg, (unsigned int *) &len) != COMP_OK) { ERROR("Compression plugin error"); } buffer = (char *)comp_msg; TRACE_MSG("---\nCompressed message len: %zu\n", len); } rc = sendto(socket->ss_fd, buffer, len, 0, (struct sockaddr *)dest, SOCK_ADDR_SIZE(dest)); break; default: ERROR("Internal error, unknown transport type %d\n", socket->ss_transport); } return rc; } /* Flush any output buffers for this socket. */ int flush_socket(struct sipp_socket *socket) { struct socketbuf *buf; int ret; while ((buf = socket->ss_out)) { ssize_t size = buf->len - buf->offset; ret = socket_write_primitive(socket, buf->buf + buf->offset, size, &buf->addr); TRACE_MSG("Wrote %d of %zu bytes in an output buffer.\n", ret, size); if (ret == size) { /* Everything is great, throw away this buffer. */ socket->ss_out = buf->next; free_socketbuf(buf); } else if (ret <= 0) { /* Handle connection closes and errors. */ return write_error(socket, ret); } else { /* We have written more of the partial buffer. */ buf->offset += ret; errno = EWOULDBLOCK; enter_congestion(socket, EWOULDBLOCK); return -1; } } return 0; } /* Write data to a socket. */ int write_socket(struct sipp_socket *socket, const char *buffer, ssize_t len, int flags, struct sockaddr_storage *dest) { int rc; if ( socket == NULL ) { //FIX coredump when trying to send data but no master yet ... ( for example after unexpected mesdsage) return 0; } if (socket->ss_out) { rc = flush_socket(socket); TRACE_MSG("Attempted socket flush returned %d\r\n", rc); if (rc < 0) { if ((errno == EWOULDBLOCK) && (flags & WS_BUFFER)) { buffer_write(socket, buffer, len, dest); return len; } else { return rc; } } } rc = socket_write_primitive(socket, buffer, len, dest); struct timeval currentTime; GET_TIME (¤tTime); if (rc == len) { /* Everything is great. */ if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "%s %smessage sent (%zu bytes):\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(socket->ss_transport), socket->ss_control ? "control " : "", len, (int)len, buffer); } if (useShortMessagef == 1) { char *msg = strdup(buffer); const char *call_id = get_trimmed_call_id(msg); TRACE_SHORTMSG("%s\tS\t%s\tCSeq:%s\t%s\n", CStat::formatTime(¤tTime), call_id, get_header_content(msg, "CSeq:"), get_first_line(msg)); free(msg); } } else if (rc <= 0) { if ((errno == EWOULDBLOCK) && (flags & WS_BUFFER)) { buffer_write(socket, buffer, len, dest); enter_congestion(socket, errno); return len; } if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "Error sending %s message:\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(socket->ss_transport), (int)len, buffer); } return write_error(socket, errno); } else { /* We have a truncated message, which must be handled internally to the write function. */ if (useMessagef == 1) { TRACE_MSG("----------------------------------------------- %s\n" "Truncation sending %s message (%d of %zu sent):\n\n%.*s\n", CStat::formatTime(¤tTime, true), TRANSPORT_TO_STRING(socket->ss_transport), rc, len, (int)len, buffer); } buffer_write(socket, buffer + rc, len - rc, dest); enter_congestion(socket, errno); } return rc; } bool reconnect_allowed() { if (reset_number == -1) { return true; } return (reset_number > 0); } void reset_connection(struct sipp_socket *socket) { if (!reconnect_allowed()) { ERROR_NO("Max number of reconnections reached"); } if (reset_number != -1) { reset_number--; } if (reset_close) { WARNING("Closing calls, because of TCP reset or close!"); close_calls(socket); } /* Sleep for some period of time before the reconnection. */ usleep(1000 * reset_sleep); if (sipp_reconnect_socket(socket) < 0) { WARNING_NO("Could not reconnect TCP socket"); close_calls(socket); } else { WARNING("Socket required a reconnection."); } } /* Close just those calls for a given socket (e.g., if the remote end closes * the connection. */ void close_calls(struct sipp_socket *socket) { owner_list *owners = get_owners_for_socket(socket); owner_list::iterator owner_it; socketowner *owner_ptr = NULL; for (owner_it = owners->begin(); owner_it != owners->end(); owner_it++) { owner_ptr = *owner_it; if (owner_ptr) { owner_ptr->tcpClose(); } } delete owners; } int open_connections() { int status=0; local_port = 0; if (!strlen(remote_host)) { if ((sendMode != MODE_SERVER)) { ERROR("Missing remote host parameter. This scenario requires it"); } } else { int temp_remote_port; get_host_and_port(remote_host, remote_host, &temp_remote_port); if (temp_remote_port != 0) { remote_port = temp_remote_port; } /* Resolving the remote IP */ { struct addrinfo hints; struct addrinfo * local_addr; fprintf(stderr, "Resolving remote host '%s'... ", remote_host); memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; /* FIXME: add DNS SRV support using liburli? */ if (getaddrinfo(remote_host, NULL, &hints, &local_addr) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", remote_host); } memset(&remote_sockaddr, 0, sizeof( remote_sockaddr )); memcpy(&remote_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE(_RCAST(struct sockaddr_storage*, local_addr->ai_addr))); freeaddrinfo(local_addr); get_inet_address(&remote_sockaddr, remote_ip, sizeof(remote_ip)); if (remote_sockaddr.ss_family == AF_INET) { (_RCAST(struct sockaddr_in *, &remote_sockaddr))->sin_port = htons((short)remote_port); strcpy(remote_ip_escaped, remote_ip); } else { (_RCAST(struct sockaddr_in6 *, &remote_sockaddr))->sin6_port = htons((short)remote_port); sprintf(remote_ip_escaped, "[%s]", remote_ip); } fprintf(stderr, "Done.\n"); } } if (gethostname(hostname, 64) != 0) { ERROR_NO("Can't get local hostname in 'gethostname(hostname, 64)'"); } { char * local_host = NULL; struct addrinfo * local_addr; struct addrinfo hints; if (!strlen(local_ip)) { local_host = (char *)hostname; } else { local_host = (char *)local_ip; } memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; /* Resolving local IP */ if (getaddrinfo(local_host, NULL, &hints, &local_addr) != 0) { ERROR("Can't get local IP address in getaddrinfo, local_host='%s', local_ip='%s'", local_host, local_ip); } // store local addr info for rsa option getaddrinfo(local_host, NULL, &hints, &local_addr_storage); memset(&local_sockaddr, 0, sizeof(struct sockaddr_storage)); local_sockaddr.ss_family = local_addr->ai_addr->sa_family; if (!strlen(local_ip)) { get_inet_address(_RCAST(struct sockaddr_storage*, local_addr->ai_addr), local_ip, sizeof(local_ip)); } else { memcpy(&local_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); } freeaddrinfo(local_addr); if (local_sockaddr.ss_family == AF_INET6) { local_ip_is_ipv6 = true; sprintf(local_ip_escaped, "[%s]", local_ip); } else { strcpy(local_ip_escaped, local_ip); } } /* Creating and binding the local socket */ if ((main_socket = new_sipp_socket(local_ip_is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get the local socket"); } sipp_customize_socket(main_socket); /* Trying to bind local port */ char peripaddr[256]; if (!user_port) { unsigned short l_port; for (l_port = DEFAULT_PORT; l_port < (DEFAULT_PORT + 60); l_port++) { // Bind socket to local_ip if (bind_local || peripsocket) { struct addrinfo * local_addr; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; if (peripsocket) { // On some machines it fails to bind to the self computed local // IP address. // For the socket per IP mode, bind the main socket to the // first IP address specified in the inject file. inFiles[ip_file]->getField(0, peripfield, peripaddr, sizeof(peripaddr)); if (getaddrinfo(peripaddr, NULL, &hints, &local_addr) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } else { if (getaddrinfo(local_ip, NULL, &hints, &local_addr) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } memcpy(&local_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); freeaddrinfo(local_addr); } if (local_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *, &local_sockaddr))->sin6_port = htons((short)l_port); } else { (_RCAST(struct sockaddr_in *, &local_sockaddr))->sin_port = htons((short)l_port); } if (sipp_bind_socket(main_socket, &local_sockaddr, &local_port) == 0) { break; } } } if (!local_port) { /* Not already bound, use user_port of 0 to leave * the system choose a port. */ if (bind_local || peripsocket) { struct addrinfo * local_addr; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; if (peripsocket) { // On some machines it fails to bind to the self computed local // IP address. // For the socket per IP mode, bind the main socket to the // first IP address specified in the inject file. inFiles[ip_file]->getField(0, peripfield, peripaddr, sizeof(peripaddr)); if (getaddrinfo(peripaddr, NULL, &hints, &local_addr) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } else { if (getaddrinfo(local_ip, NULL, &hints, &local_addr) != 0) { ERROR("Unknown host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } } memcpy(&local_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); freeaddrinfo(local_addr); } if (local_ip_is_ipv6) { (_RCAST(struct sockaddr_in6 *, &local_sockaddr))->sin6_port = htons((short)user_port); } else { (_RCAST(struct sockaddr_in *, &local_sockaddr))->sin_port = htons((short)user_port); } if (sipp_bind_socket(main_socket, &local_sockaddr, &local_port)) { ERROR_NO("Unable to bind main socket"); } } if (peripsocket) { // Add the main socket to the socket per subscriber map map_perip_fd[peripaddr] = main_socket; } // Create additional server sockets when running in socket per // IP address mode. if (peripsocket && sendMode == MODE_SERVER) { struct sockaddr_storage server_sockaddr; struct addrinfo * local_addr; struct addrinfo hints; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; char peripaddr[256]; struct sipp_socket *sock; unsigned int lines = inFiles[ip_file]->numLines(); for (unsigned int i = 0; i < lines; i++) { inFiles[ip_file]->getField(i, peripfield, peripaddr, sizeof(peripaddr)); map::iterator j; j = map_perip_fd.find(peripaddr); if (j == map_perip_fd.end()) { if ((sock = new_sipp_socket(is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get server socket"); } if (getaddrinfo(peripaddr, NULL, &hints, &local_addr) != 0) { ERROR("Unknown remote host '%s'.\n" "Use 'sipp -h' for details", peripaddr); } memcpy(&server_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); freeaddrinfo(local_addr); if (is_ipv6) { (_RCAST(struct sockaddr_in6 *, &server_sockaddr))->sin6_port = htons((short)local_port); } else { (_RCAST(struct sockaddr_in *, &server_sockaddr))->sin_port = htons((short)local_port); } sipp_customize_socket(sock); if (sipp_bind_socket(sock, &server_sockaddr, NULL)) { ERROR_NO("Unable to bind server socket"); } map_perip_fd[peripaddr] = sock; } } } if ((!multisocket) && (transport == T_TCP || transport == T_TLS || transport == T_SCTP) && (sendMode != MODE_SERVER)) { if ((tcp_multiplex = new_sipp_socket(local_ip_is_ipv6, transport)) == NULL) { ERROR_NO("Unable to get a TCP socket"); } /* OJA FIXME: is it correct? */ if (use_remote_sending_addr) { remote_sockaddr = remote_sending_sockaddr; } sipp_customize_socket(tcp_multiplex); if (user_port) { int sock_opt = 1; if (setsockopt(tcp_multiplex->ss_fd, SOL_SOCKET, SO_REUSEADDR, (void *)&sock_opt, sizeof (sock_opt)) == -1) { ERROR_NO("setsockopt(SO_REUSEADDR) failed"); } if (tcp_multiplex->ss_ipv6) { struct sockaddr_in6 sa_loc = {AF_INET6}; sa_loc.sin6_port = htons(local_port); sipp_bind_socket(tcp_multiplex, (struct sockaddr_storage*)&sa_loc, NULL); } else { struct sockaddr_in sa_loc = {AF_INET}; sa_loc.sin_port = htons(local_port); sipp_bind_socket(tcp_multiplex, (struct sockaddr_storage*)&sa_loc, NULL); } } if (sipp_connect_socket(tcp_multiplex, &remote_sockaddr)) { if (reset_number > 0) { WARNING("Failed to reconnect\n"); sipp_close_socket(main_socket); reset_number--; return 1; } else { if (errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR_NO("Unable to connect a TCP socket, remote peer error.\n" "Use 'sipp -h' for details"); } else { ERROR_NO("Unable to connect a TCP socket.\n" "Use 'sipp -h' for details"); } } } } if (transport == T_TCP || transport == T_TLS || transport == T_SCTP) { if (listen(main_socket->ss_fd, 100)) { ERROR_NO("Unable to listen main socket"); } } /* Trying to connect to Twin Sipp in 3PCC mode */ if (twinSippMode) { if (thirdPartyMode == MODE_3PCC_CONTROLLER_A || thirdPartyMode == MODE_3PCC_A_PASSIVE) { connect_to_peer(twinSippHost, twinSippPort, &twinSipp_sockaddr, twinSippIp, &twinSippSocket); } else if (thirdPartyMode == MODE_3PCC_CONTROLLER_B) { connect_local_twin_socket(twinSippHost); } else { ERROR("TwinSipp Mode enabled but thirdPartyMode is different " "from 3PCC_CONTROLLER_B and 3PCC_CONTROLLER_A\n"); } } else if (extendedTwinSippMode) { if (thirdPartyMode == MODE_MASTER || thirdPartyMode == MODE_MASTER_PASSIVE) { strncpy(twinSippHost, get_peer_addr(master_name), sizeof(twinSippHost) - 1); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); connect_local_twin_socket(twinSippHost); connect_to_all_peers(); } else if (thirdPartyMode == MODE_SLAVE) { strncpy(twinSippHost, get_peer_addr(slave_number), sizeof(twinSippHost) - 1); get_host_and_port(twinSippHost, twinSippHost, &twinSippPort); connect_local_twin_socket(twinSippHost); } else { ERROR("extendedTwinSipp Mode enabled but thirdPartyMode is different " "from MASTER and SLAVE\n"); } } return status; } void connect_to_peer(char *peer_host, int peer_port, struct sockaddr_storage *peer_sockaddr, char *peer_ip, struct sipp_socket **peer_socket) { /* Resolving the peer IP */ printf("Resolving peer address : %s...\n", peer_host); struct addrinfo hints; struct addrinfo * local_addr; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; is_ipv6 = false; /* Resolving twin IP */ if (getaddrinfo(peer_host, NULL, &hints, &local_addr) != 0) { ERROR("Unknown peer host '%s'.\n" "Use 'sipp -h' for details", peer_host); } memcpy(peer_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage *, local_addr->ai_addr))); freeaddrinfo(local_addr); if (peer_sockaddr->ss_family == AF_INET) { (_RCAST(struct sockaddr_in *, peer_sockaddr))->sin_port = htons((short)peer_port); } else { (_RCAST(struct sockaddr_in6 *, peer_sockaddr))->sin6_port = htons((short)peer_port); is_ipv6 = true; } get_inet_address(peer_sockaddr, peer_ip, sizeof(peer_ip)); if ((*peer_socket = new_sipp_socket(is_ipv6, T_TCP)) == NULL) { ERROR_NO("Unable to get a twin sipp TCP socket"); } /* Mark this as a control socket. */ (*peer_socket)->ss_control = 1; if (sipp_connect_socket(*peer_socket, peer_sockaddr)) { if (errno == EINVAL) { /* This occurs sometime on HPUX but is not a true INVAL */ ERROR_NO("Unable to connect a twin sipp TCP socket\n " ", remote peer error.\n" "Use 'sipp -h' for details"); } else { ERROR_NO("Unable to connect a twin sipp socket " "\n" "Use 'sipp -h' for details"); } } sipp_customize_socket(*peer_socket); } struct sipp_socket **get_peer_socket(char * peer) { peer_map::iterator peer_it; peer_it = peers.find(peer_map::key_type(peer)); if (peer_it != peers.end()) { return &peer_it->second.peer_socket; } else { ERROR("get_peer_socket: Peer %s not found\n", peer); } return NULL; } char * get_peer_addr(char * peer) { char * addr; peer_addr_map::iterator peer_addr_it; peer_addr_it = peer_addrs.find(peer_addr_map::key_type(peer)); if (peer_addr_it != peer_addrs.end()) { addr = peer_addr_it->second; return addr; } else { ERROR("get_peer_addr: Peer %s not found\n", peer); } return NULL; } bool is_a_peer_socket(struct sipp_socket *peer_socket) { peer_socket_map::iterator peer_socket_it; peer_socket_it = peer_sockets.find(peer_socket_map::key_type(peer_socket)); if (peer_socket_it == peer_sockets.end()) { return false; } else { return true; } } void connect_local_twin_socket(char * twinSippHost) { /* Resolving the listener IP */ printf("Resolving listener address : %s...\n", twinSippHost); struct addrinfo hints; struct addrinfo * local_addr; memset((char*)&hints, 0, sizeof(hints)); hints.ai_flags = AI_PASSIVE; hints.ai_family = PF_UNSPEC; is_ipv6 = false; /* Resolving twin IP */ if (getaddrinfo(twinSippHost, NULL, &hints, &local_addr) != 0) { ERROR("Unknown twin host '%s'.\n" "Use 'sipp -h' for details", twinSippHost); } memcpy(&twinSipp_sockaddr, local_addr->ai_addr, SOCK_ADDR_SIZE( _RCAST(struct sockaddr_storage*, local_addr->ai_addr))); freeaddrinfo(local_addr); if (twinSipp_sockaddr.ss_family == AF_INET) { (_RCAST(struct sockaddr_in *, &twinSipp_sockaddr))->sin_port = htons((short)twinSippPort); } else { (_RCAST(struct sockaddr_in6 *, &twinSipp_sockaddr))->sin6_port = htons((short)twinSippPort); is_ipv6 = true; } get_inet_address(&twinSipp_sockaddr, twinSippIp, sizeof(twinSippIp)); if ((localTwinSippSocket = new_sipp_socket(is_ipv6, T_TCP)) == NULL) { ERROR_NO("Unable to get a listener TCP socket "); } memset(&localTwin_sockaddr, 0, sizeof(struct sockaddr_storage)); if (!is_ipv6) { localTwin_sockaddr.ss_family = AF_INET; (_RCAST(struct sockaddr_in *, &localTwin_sockaddr))->sin_port = htons((short)twinSippPort); } else { localTwin_sockaddr.ss_family = AF_INET6; (_RCAST(struct sockaddr_in6 *, &localTwin_sockaddr))->sin6_port = htons((short)twinSippPort); } // add socket option to allow the use of it without the TCP timeout // This allows to re-start the controller B (or slave) without timeout after its exit int reuse = 1; setsockopt(localTwinSippSocket->ss_fd, SOL_SOCKET, SO_REUSEADDR, (int *)&reuse, sizeof(reuse)); sipp_customize_socket(localTwinSippSocket); if (sipp_bind_socket(localTwinSippSocket, &localTwin_sockaddr, 0)) { ERROR_NO("Unable to bind twin sipp socket "); } if (listen(localTwinSippSocket->ss_fd, 100)) { ERROR_NO("Unable to listen twin sipp socket in "); } } void close_peer_sockets() { peer_map::iterator peer_it; T_peer_infos infos; for (peer_it = peers.begin(); peer_it != peers.end(); peer_it++) { infos = peer_it->second; sipp_close_socket(infos.peer_socket); infos.peer_socket = NULL; peers[std::string(peer_it->first)] = infos; } peers_connected = 0; } void close_local_sockets() { for (int i = 0; i< local_nb; i++) { sipp_close_socket(local_sockets[i]); local_sockets[i] = NULL; } } void connect_to_all_peers() { peer_map::iterator peer_it; T_peer_infos infos; for (peer_it = peers.begin(); peer_it != peers.end(); peer_it++) { infos = peer_it->second; get_host_and_port(infos.peer_host, infos.peer_host, &infos.peer_port); connect_to_peer(infos.peer_host, infos.peer_port, &(infos.peer_sockaddr), infos.peer_ip, &(infos.peer_socket)); peer_sockets[infos.peer_socket] = peer_it->first; peers[std::string(peer_it->first)] = infos; } peers_connected = 1; } bool is_a_local_socket(struct sipp_socket *s) { for (int i = 0; i< local_nb + 1; i++) { if (local_sockets[i] == s) return true; } return (false); } void free_peer_addr_map() { peer_addr_map::iterator peer_addr_it; for (peer_addr_it = peer_addrs.begin(); peer_addr_it != peer_addrs.end(); peer_addr_it++) { free(peer_addr_it->second); } } /***************** Check of the message received ***************/ bool sipMsgCheck (const char *P_msg, struct sipp_socket *socket) { const char C_sipHeader[] = "SIP/2.0"; if (socket == twinSippSocket || socket == localTwinSippSocket || is_a_peer_socket(socket) || is_a_local_socket(socket)) return true; if (strstr(P_msg, C_sipHeader) != NULL) { return true; } return false; } #ifdef GTEST #include "gtest/gtest.h" TEST(get_trimmed_call_id, noslashes) { EXPECT_STREQ("abc", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc\r\nCall-ID: def\r\n\r\n")); } TEST(get_trimmed_call_id, withslashes) { EXPECT_STREQ("abc2", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: ///abc2\r\nCall-ID: def\r\n\r\n")); EXPECT_STREQ("abc3", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc2///abc3\r\nCall-ID: def\r\n\r\n")); EXPECT_STREQ("abc4///abc5", get_trimmed_call_id("OPTIONS..\r\nBla: X\r\nCall-ID: abc3///abc4///abc5\r\nCall-ID: def\r\n\r\n")); } #endif //GTEST sipp-3.5.1/autom4te.cache/0000755000175000017500000000000012672463320014336 5ustar vsevavsevasipp-3.5.1/autom4te.cache/traces.00000644000175000017500000015141612672463316015715 0ustar vsevavsevam4trace:/usr/local/share/aclocal-1.13/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) m4trace:/usr/local/share/aclocal-1.13/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) m4trace:/usr/local/share/aclocal-1.13/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) m4trace:/usr/local/share/aclocal-1.13/cond.m4:12: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) m4trace:/usr/local/share/aclocal-1.13/depend.m4:26: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) m4trace:/usr/local/share/aclocal-1.13/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) m4trace:/usr/local/share/aclocal-1.13/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) m4trace:/usr/local/share/aclocal-1.13/depout.m4:12: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ]) m4trace:/usr/local/share/aclocal-1.13/depout.m4:71: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) m4trace:/usr/local/share/aclocal-1.13/init.m4:23: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) m4trace:/usr/local/share/aclocal-1.13/init.m4:136: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) m4trace:/usr/local/share/aclocal-1.13/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) m4trace:/usr/local/share/aclocal-1.13/lead-dot.m4:10: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) m4trace:/usr/local/share/aclocal-1.13/make.m4:12: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) m4trace:/usr/local/share/aclocal-1.13/missing.m4:11: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) m4trace:/usr/local/share/aclocal-1.13/missing.m4:20: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) m4trace:/usr/local/share/aclocal-1.13/options.m4:11: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) m4trace:/usr/local/share/aclocal-1.13/options.m4:17: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) m4trace:/usr/local/share/aclocal-1.13/options.m4:23: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) m4trace:/usr/local/share/aclocal-1.13/options.m4:29: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) m4trace:/usr/local/share/aclocal-1.13/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) m4trace:/usr/local/share/aclocal-1.13/sanity.m4:11: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) m4trace:/usr/local/share/aclocal-1.13/silent.m4:12: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) m4trace:/usr/local/share/aclocal-1.13/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4trace:/usr/local/share/aclocal-1.13/substnot.m4:12: -1- AC_DEFUN([_AM_SUBST_NOTMAKE]) m4trace:/usr/local/share/aclocal-1.13/substnot.m4:17: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) m4trace:/usr/local/share/aclocal-1.13/tar.m4:23: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:3: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:3: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:8: -1- m4_include([m4/am_git_version.m4]) m4trace:m4/am_git_version.m4:1: -1- m4_pattern_allow([^AM_GIT_VERSION$]) m4trace:configure.ac:9: -1- m4_include([m4/ax_check_compile_flag.m4]) m4trace:m4/ax_check_compile_flag.m4:60: -1- AC_DEFUN([AX_CHECK_COMPILE_FLAG], [AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl ]) m4trace:configure.ac:10: -1- m4_include([m4/ax_config_feature.m4]) m4trace:m4/ax_config_feature.m4:93: -1- AC_DEFUN([AX_CONFIG_FEATURE], [ dnl m4_pushdef([FEATURE], patsubst([$1], -, _))dnl AC_ARG_ENABLE([$1],AS_HELP_STRING([--enable-$1],[$2]),[ case "${enableval}" in yes) ax_config_feature_[]FEATURE[]="yes" ;; no) ax_config_feature_[]FEATURE[]="no" ;; *) AC_MSG_ERROR([bad value ${enableval} for feature --$1]) ;; esac ]) AS_IF([test "$ax_config_feature_[]FEATURE[]" = yes],[ dnl AC_DEFINE([$3]) $5 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is enabled]) ]) ],[ dnl $6 AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl AC_MSG_NOTICE([Feature $1 is disabled]) ]) ]) AH_TEMPLATE([$3],[$4]) m4_popdef([FEATURE])dnl ]) m4trace:m4/ax_config_feature.m4:129: -1- AC_DEFUN([AX_CONFIG_FEATURE_VERBOSE], [ dnl ax_config_feature_verbose=yes ]) m4trace:m4/ax_config_feature.m4:134: -1- AC_DEFUN([AX_CONFIG_FEATURE_SILENT], [ dnl ax_config_feature_verbose=no ]) m4trace:m4/ax_config_feature.m4:139: -1- AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_ENABLED], [ ax_config_feature_[]FEATURE[]_default=yes ]) m4trace:m4/ax_config_feature.m4:144: -1- AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_DISABLED], [ ax_config_feature_[]FEATURE[]_default=no ]) m4trace:m4/ax_config_feature.m4:149: -1- AC_DEFUN([AX_CONFIG_FEATURE_ENABLE], [ dnl ax_config_feature_[]patsubst([$1], -, _)[]=yes ]) m4trace:m4/ax_config_feature.m4:154: -1- AC_DEFUN([AX_CONFIG_FEATURE_DISABLE], [ dnl ax_config_feature_[]patsubst([$1], -, _)[]=no ]) m4trace:configure.ac:11: -1- m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4trace:m4/ax_cxx_compile_stdcxx_11.m4:93: -1- AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl m4_if([$1], [], [], [$1], [ext], [], [$1], [noext], [], [m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], [$2], [mandatory], [ax_cxx_compile_cxx11_required=true], [$2], [optional], [ax_cxx_compile_cxx11_required=false], [m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports C++11 features by default, ax_cv_cxx_compile_cxx11, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [ax_cv_cxx_compile_cxx11=yes], [ax_cv_cxx_compile_cxx11=no])]) if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi m4_if([$1], [noext], [], [dnl if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) m4_if([$1], [ext], [], [dnl if test x$ac_success = xno; then dnl HP's aCC needs +std=c++11 according to: dnl http://h21007.www2.hp.com/portal/download/files/unprot/aCxx/PDF_Release_Notes/769149-001.pdf for switch in -std=c++11 -std=c++0x +std=c++11; do cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, $cachevar, [ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) CXXFLAGS="$ac_save_CXXFLAGS"]) if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi]) AC_LANG_POP([C++]) if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) fi else if test x$ac_success = xno; then HAVE_CXX11=0 AC_MSG_NOTICE([No compiler with C++11 support was found]) else HAVE_CXX11=1 AC_DEFINE(HAVE_CXX11,1, [define if the compiler supports basic C++11 syntax]) fi AC_SUBST(HAVE_CXX11) fi ]) m4trace:configure.ac:12: -1- m4_include([m4/ax_have_epoll.m4]) m4trace:m4/ax_have_epoll.m4:47: -1- AC_DEFUN([AX_HAVE_EPOLL], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface]) AC_CACHE_VAL([ax_cv_have_epoll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0);])], [ax_cv_have_epoll=yes], [ax_cv_have_epoll=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ]) m4trace:m4/ax_have_epoll.m4:75: -1- AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension]) AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # error linux kernel version is too old to have epoll_pwait # endif #endif #include #include ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])], [ax_cv_have_epoll_pwait=yes], [ax_cv_have_epoll_pwait=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:18: -1- AM_INIT_AUTOMAKE([foreign subdir-objects]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:18: -1- AM_SET_CURRENT_AUTOMAKE_VERSION m4trace:configure.ac:18: -1- AM_AUTOMAKE_VERSION([1.13.4]) m4trace:configure.ac:18: -1- _AM_AUTOCONF_VERSION([2.69]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:18: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:18: -1- _AM_SET_OPTIONS([foreign subdir-objects]) m4trace:configure.ac:18: -1- _AM_SET_OPTION([foreign]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([foreign]) m4trace:configure.ac:18: -1- _AM_SET_OPTION([subdir-objects]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([subdir-objects]) m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:18: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([no-define]) m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:18: -1- AM_SANITY_CHECK m4trace:configure.ac:18: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) m4trace:configure.ac:18: -1- AM_MISSING_HAS_RUN m4trace:configure.ac:18: -1- AM_AUX_DIR_EXPAND m4trace:configure.ac:18: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOCONF], [autoconf]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:18: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:18: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo]) m4trace:configure.ac:18: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:18: -1- AM_PROG_INSTALL_SH m4trace:configure.ac:18: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:18: -1- AM_PROG_INSTALL_STRIP m4trace:configure.ac:18: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:18: -1- AM_SET_LEADING_DOT m4trace:configure.ac:18: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:18: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([tar-ustar]) m4trace:configure.ac:18: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([tar-pax]) m4trace:configure.ac:18: -1- _AM_PROG_TAR([v7]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:18: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) m4trace:configure.ac:18: -2- _AM_MANGLE_OPTION([no-dependencies]) m4trace:configure.ac:18: -1- AM_SILENT_RULES m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_V$]) m4trace:configure.ac:18: -1- AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_DEFAULT_V$]) m4trace:configure.ac:18: -1- AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_BACKSLASH$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) m4trace:configure.ac:20: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:20: the top level]) m4trace:configure.ac:21: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:21: the top level]) m4trace:configure.ac:22: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:22: the top level]) m4trace:configure.ac:23: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:23: the top level]) m4trace:configure.ac:24: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:24: the top level]) m4trace:configure.ac:27: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:27: the top level]) m4trace:configure.ac:34: -1- m4_pattern_allow([^HELP2MAN$]) m4trace:configure.ac:35: -1- AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"]) m4trace:configure.ac:35: -1- m4_pattern_allow([^HAVE_HELP2MAN_TRUE$]) m4trace:configure.ac:35: -1- m4_pattern_allow([^HAVE_HELP2MAN_FALSE$]) m4trace:configure.ac:35: -1- _AM_SUBST_NOTMAKE([HAVE_HELP2MAN_TRUE]) m4trace:configure.ac:35: -1- _AM_SUBST_NOTMAKE([HAVE_HELP2MAN_FALSE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:42: -1- _AM_DEPENDENCIES([CC]) m4trace:configure.ac:42: -1- AM_SET_DEPDIR m4trace:configure.ac:42: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:42: -1- AM_OUTPUT_DEPENDENCY_COMMANDS m4trace:configure.ac:42: -1- AM_MAKE_INCLUDE m4trace:configure.ac:42: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:42: -1- AM_DEP_TRACK m4trace:configure.ac:42: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__nodep$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__nodep]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:42: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.ac:43: -1- _AM_DEPENDENCIES([CXX]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.ac:43: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:43: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.ac:43: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:44: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:44: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:44: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:48: -1- AX_CXX_COMPILE_STDCXX_11([ext], [optional]) m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_CXX11$]) m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_CXX11$]) m4trace:configure.ac:49: -1- AX_CHECK_COMPILE_FLAG([-std=gnu11], [CFLAGS+=" -std=gnu11"], []) m4trace:configure.ac:87: -1- m4_pattern_allow([^HAVE_LIBCURSES$]) m4trace:configure.ac:140: -1- m4_pattern_allow([^HAVE_OPENSSL_MD5_H$]) m4trace:configure.ac:141: -1- m4_pattern_allow([^HAVE_OPENSSL_BIO_H$]) m4trace:configure.ac:142: -1- m4_pattern_allow([^HAVE_OPENSSL_ERR_H$]) m4trace:configure.ac:143: -1- m4_pattern_allow([^HAVE_OPENSSL_RAND_H$]) m4trace:configure.ac:144: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$]) m4trace:configure.ac:145: -1- m4_pattern_allow([^HAVE_OPENSSL_X509V3_H$]) m4trace:configure.ac:146: -1- m4_pattern_allow([^HAVE_LIBSSL$]) m4trace:configure.ac:147: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) m4trace:configure.ac:150: -1- AM_CONDITIONAL([HAVE_OPENSSL], [test "$openssl" = "yes"]) m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_OPENSSL_TRUE$]) m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_OPENSSL_FALSE$]) m4trace:configure.ac:150: -1- _AM_SUBST_NOTMAKE([HAVE_OPENSSL_TRUE]) m4trace:configure.ac:150: -1- _AM_SUBST_NOTMAKE([HAVE_OPENSSL_FALSE]) m4trace:configure.ac:154: -1- m4_pattern_allow([^HAVE_NETINET_SCTP_H$]) m4trace:configure.ac:161: -1- AM_CONDITIONAL([HAVE_SCTP], [test "$sctp" = "yes"]) m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_SCTP_TRUE$]) m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_SCTP_FALSE$]) m4trace:configure.ac:161: -1- _AM_SUBST_NOTMAKE([HAVE_SCTP_TRUE]) m4trace:configure.ac:161: -1- _AM_SUBST_NOTMAKE([HAVE_SCTP_FALSE]) m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE_PCAP_H$]) m4trace:configure.ac:169: -2- m4_pattern_allow([^HAVE_PCAP_NEXT_EX$]) m4trace:configure.ac:172: -1- AM_CONDITIONAL([HAVE_PCAP], [test "$pcap" = "yes"]) m4trace:configure.ac:172: -1- m4_pattern_allow([^HAVE_PCAP_TRUE$]) m4trace:configure.ac:172: -1- m4_pattern_allow([^HAVE_PCAP_FALSE$]) m4trace:configure.ac:172: -1- _AM_SUBST_NOTMAKE([HAVE_PCAP_TRUE]) m4trace:configure.ac:172: -1- _AM_SUBST_NOTMAKE([HAVE_PCAP_FALSE]) m4trace:configure.ac:174: -1- AM_CONDITIONAL([HAVE_RTP], [test "$rtp" = "yes"]) m4trace:configure.ac:174: -1- m4_pattern_allow([^HAVE_RTP_TRUE$]) m4trace:configure.ac:174: -1- m4_pattern_allow([^HAVE_RTP_FALSE$]) m4trace:configure.ac:174: -1- _AM_SUBST_NOTMAKE([HAVE_RTP_TRUE]) m4trace:configure.ac:174: -1- _AM_SUBST_NOTMAKE([HAVE_RTP_FALSE]) m4trace:configure.ac:178: -1- m4_pattern_allow([^HAVE_GSL_GSL_RANDIST_H$]) m4trace:configure.ac:179: -1- m4_pattern_allow([^HAVE_GSL_GSL_RNG_H$]) m4trace:configure.ac:180: -1- m4_pattern_allow([^HAVE_GSL_GSL_CDF_H$]) m4trace:configure.ac:181: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:182: -1- m4_pattern_allow([^HAVE_LIBGSLCBLAS$]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_CFLAGS$]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_CXXFLAGS$]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_LIBS$]) m4trace:configure.ac:195: -1- AM_CONDITIONAL([HAVE_GSL], [test "$gsl" = "yes"]) m4trace:configure.ac:195: -1- m4_pattern_allow([^HAVE_GSL_TRUE$]) m4trace:configure.ac:195: -1- m4_pattern_allow([^HAVE_GSL_FALSE$]) m4trace:configure.ac:195: -1- _AM_SUBST_NOTMAKE([HAVE_GSL_TRUE]) m4trace:configure.ac:195: -1- _AM_SUBST_NOTMAKE([HAVE_GSL_FALSE]) m4trace:configure.ac:198: -1- AX_HAVE_EPOLL([AX_CONFIG_FEATURE_ENABLE(epoll)], [AX_CONFIG_FEATURE_DISABLE(epoll)]) m4trace:configure.ac:198: -1- AX_CONFIG_FEATURE_ENABLE([epoll]) m4trace:configure.ac:198: -1- AX_CONFIG_FEATURE_DISABLE([epoll]) m4trace:configure.ac:200: -1- AX_CONFIG_FEATURE([epoll], [This platform supports epoll(7)], [HAVE_EPOLL], [This platform supports epoll(7).], [epoll="yes"], [epoll="no"]) m4trace:configure.ac:200: -1- m4_pattern_allow([^HAVE_EPOLL$]) m4trace:configure.ac:205: -1- AM_CONDITIONAL([HAVE_EPOLL], [test "$epoll" = "yes"]) m4trace:configure.ac:205: -1- m4_pattern_allow([^HAVE_EPOLL_TRUE$]) m4trace:configure.ac:205: -1- m4_pattern_allow([^HAVE_EPOLL_FALSE$]) m4trace:configure.ac:205: -1- _AM_SUBST_NOTMAKE([HAVE_EPOLL_TRUE]) m4trace:configure.ac:205: -1- _AM_SUBST_NOTMAKE([HAVE_EPOLL_FALSE]) m4trace:configure.ac:208: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^HAVE_ALLOCA$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^ALLOCA$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^C_ALLOCA$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) m4trace:configure.ac:208: -1- m4_pattern_allow([^STACK_DIRECTION$]) m4trace:configure.ac:213: -1- m4_pattern_allow([^HAVE__BOOL$]) m4trace:configure.ac:213: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) m4trace:configure.ac:215: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:216: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:217: -1- m4_pattern_allow([^ssize_t$]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_VFORK_H$]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.ac:225: -1- m4_pattern_allow([^vfork$]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.ac:245: -1- AC_DEFUN([AX_CXX_HAS_IS_DEFAULT_CONSTRUCTIBLE], [dnl AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports is_default_constructible (used by gmock), ax_cv_cxx_has_is_default_constructible, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } ])], [ax_cv_cxx_has_is_default_constructible=yes], [ax_cv_cxx_has_is_default_constructible=no])]) if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi AC_LANG_POP([C++]) ]) m4trace:configure.ac:268: -1- AX_CXX_HAS_IS_DEFAULT_CONSTRUCTIBLE([]) m4trace:configure.ac:273: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:273: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:273: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:273: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:273: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:273: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:273: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:273: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) m4trace:configure.ac:273: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS sipp-3.5.1/autom4te.cache/output.10000644000175000017500000111053412672463320015765 0ustar vsevavseva@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69 for SIPp see-include/version.h. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: sipp-users@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='SIPp' PACKAGE_TARNAME='sipp' PACKAGE_VERSION='see-include/version.h' PACKAGE_STRING='SIPp see-include/version.h' PACKAGE_BUGREPORT='sipp-users@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="src/sipp.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS ALLOCA HAVE_EPOLL_FALSE HAVE_EPOLL_TRUE HAVE_GSL_FALSE HAVE_GSL_TRUE GSL_LIBS GSL_CXXFLAGS GSL_CFLAGS HAVE_RTP_FALSE HAVE_RTP_TRUE HAVE_PCAP_FALSE HAVE_PCAP_TRUE HAVE_SCTP_FALSE HAVE_SCTP_TRUE HAVE_OPENSSL_FALSE HAVE_OPENSSL_TRUE HAVE_CXX11 EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC HAVE_HELP2MAN_FALSE HAVE_HELP2MAN_TRUE HELP2MAN AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='AM_GIT_VERSION' ac_user_opts=' enable_option_checking enable_silent_rules with_openssl with_pcap with_sctp with_gsl with_rtpstream enable_epoll enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures SIPp see-include/version.h to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/sipp@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of SIPp see-include/version.h:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-epoll build with epoll backend --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-epoll This platform supports epoll(7) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openssl build with OpenSSL support --with-pcap build with pcap support --with-sctp build with SCTP support --with-gsl build with GSL (GNU Scientific Library) support --without-rtpstream build without RTP streaming support Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF SIPp configure see-include/version.h generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_cxx_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------------- ## ## Report this to sipp-users@lists.sourceforge.net ## ## ----------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Load non-standard m4 files from ./m4/*.m4. # AC_CONFIG_MACRO_DIR([m4]) does not work on pre-1.13 aclocal, so we # have to include all files by hand. AM_GIT_VERSION=$srcdir/m4/am_git_version.mh # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 # ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_config_headers="$ac_config_headers include/config.h" am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null @%:@ Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='sipp' VERSION='see-include/version.h' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @%:@ Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; openssl="$withval" else openssl="no" fi @%:@ Check whether --with-pcap was given. if test "${with_pcap+set}" = set; then : withval=$with_pcap; pcap="$withval" else pcap="no" fi @%:@ Check whether --with-sctp was given. if test "${with_sctp+set}" = set; then : withval=$with_sctp; sctp="$withval" else sctp="no" fi @%:@ Check whether --with-gsl was given. if test "${with_gsl+set}" = set; then : withval=$with_gsl; gsl="$withval" else gsl="no" fi @%:@ Check whether --with-rtpstream was given. if test "${with_rtpstream+set}" = set; then : withval=$with_rtpstream; rtp="$withval" else rtp="yes" fi @%:@ Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "$enableval" in yes | no) epoll="$enableval" ;; *) as_fn_error $? "bad value $enableval for --enable-epoll" "$LINENO" 5 ;; esac else epoll="yes" fi # Extract the first word of "help2man", so it can be a program name with args. set dummy help2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $HELP2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HELP2MAN=$ac_cv_path_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$HELP2MAN"; then HAVE_HELP2MAN_TRUE= HAVE_HELP2MAN_FALSE='#' else HAVE_HELP2MAN_TRUE='#' HAVE_HELP2MAN_FALSE= fi if test x"$HELP2MAN" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find help2man, you will not be able to generate manpages" >&5 $as_echo "$as_me: WARNING: cannot find help2man, you will not be able to generate manpages" >&2;} fi # ==================== basic compiler settings ========================== ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # Prefer ext (gnu++11) over noext (c++11) because on some platforms the # noext (stricter) mode disables non-posix features like stdio fileno(). ax_cxx_compile_cxx11_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compile_cxx11=yes else ax_cv_cxx_compile_cxx11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$ac_save_CXXFLAGS" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi else if test x$ac_success = xno; then HAVE_CXX11=0 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 $as_echo "@%:@define HAVE_CXX11 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu11" >&5 $as_echo_n "checking whether C compiler accepts -std=gnu11... " >&6; } if ${ax_cv_check_cflags___std_gnu11+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -std=gnu11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___std_gnu11=yes else ax_cv_check_cflags___std_gnu11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___std_gnu11" >&5 $as_echo "$ax_cv_check_cflags___std_gnu11" >&6; } if test "x$ax_cv_check_cflags___std_gnu11" = xyes; then : CFLAGS+=" -std=gnu11" else : fi case "$host" in *-linux*) CFLAGS="$CFLAGS -D__LINUX" CPPFLAGS="$CPPFLAGS -D__LINUX" ;; *-darwin*) CFLAGS="$CFLAGS -D__DARWIN" CPPFLAGS="$CPPFLAGS -D__DARWIN" ;; *-hpux*) CFLAGS="$CFLAGS -D__HPUX" CPPFLAGS="$CPPFLAGS -D__HPUX" ;; *-freebsd*) CFLAGS="$CFLAGS -D__LINUX -I/usr/local/include" CPPFLAGS="$CPPFLAGS -D__LINUX -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-sunos*) CFLAGS="$CFLAGS -D__SUNOS" CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) CFLAGS="$CFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" CPPFLAGS="$CPPFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" LDFLAGS="$LDFLAGS -L /usr/lib/WpdPack/Lib -L /usr/lib/SctpDrv" ;; *-tru64*) CFLAGS="$CFLAGS -D__OSF1" CPPFLAGS="$CPPFLAGS -D__OSF1" ;; esac # ==================== checks for libraries ============================= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 $as_echo_n "checking for initscr in -lcurses... " >&6; } if ${ac_cv_lib_curses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_initscr=yes else ac_cv_lib_curses_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5 $as_echo "$ac_cv_lib_curses_initscr" >&6; } if test "x$ac_cv_lib_curses_initscr" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCURSES 1 _ACEOF LIBS="-lcurses $LIBS" else as_fn_error $? "ncurses library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : THREAD_LIBS="-lpthread" else as_fn_error $? "pthread library needed!" "$LINENO" 5 fi # For Linux and SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlerror" >&5 $as_echo_n "checking for library containing dlerror... " >&6; } if ${ac_cv_search_dlerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlerror (); int main () { return dlerror (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlerror+:} false; then : break fi done if ${ac_cv_search_dlerror+:} false; then : else ac_cv_search_dlerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlerror" >&5 $as_echo "$ac_cv_search_dlerror" >&6; } ac_res=$ac_cv_search_dlerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 $as_echo_n "checking for library containing dlsym... " >&6; } if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlsym (); int main () { return dlsym (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlsym+:} false; then : break fi done if ${ac_cv_search_dlsym+:} false; then : else ac_cv_search_dlsym=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 $as_echo "$ac_cv_search_dlsym" >&6; } ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For glibc pre-2.17 we need -rt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5 $as_echo_n "checking for library containing inet_addr... " >&6; } if ${ac_cv_search_inet_addr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_addr (); int main () { return inet_addr (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_addr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_addr+:} false; then : break fi done if ${ac_cv_search_inet_addr+:} false; then : else ac_cv_search_inet_addr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5 $as_echo "$ac_cv_search_inet_addr" >&6; } ac_res=$ac_cv_search_inet_addr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_init" >&5 $as_echo_n "checking for library containing pthread_mutex_init... " >&6; } if ${ac_cv_search_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_init+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_init+:} false; then : else ac_cv_search_pthread_mutex_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_init" >&5 $as_echo "$ac_cv_search_pthread_mutex_init" >&6; } ac_res=$ac_cv_search_pthread_mutex_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5 $as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; } if ${ac_cv_search_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_destroy (); int main () { return pthread_mutex_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_destroy+:} false; then : else ac_cv_search_pthread_mutex_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_destroy" >&5 $as_echo "$ac_cv_search_pthread_mutex_destroy" >&6; } ac_res=$ac_cv_search_pthread_mutex_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 $as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } if ${ac_cv_search_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_lock (); int main () { return pthread_mutex_lock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_lock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_lock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_lock+:} false; then : else ac_cv_search_pthread_mutex_lock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5 $as_echo "$ac_cv_search_pthread_mutex_lock" >&6; } ac_res=$ac_cv_search_pthread_mutex_lock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_unlock" >&5 $as_echo_n "checking for library containing pthread_mutex_unlock... " >&6; } if ${ac_cv_search_pthread_mutex_unlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_unlock (); int main () { return pthread_mutex_unlock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_unlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_unlock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_unlock+:} false; then : else ac_cv_search_pthread_mutex_unlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_unlock" >&5 $as_echo "$ac_cv_search_pthread_mutex_unlock" >&6; } ac_res=$ac_cv_search_pthread_mutex_unlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_self" >&5 $as_echo_n "checking for library containing pthread_self... " >&6; } if ${ac_cv_search_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_self (); int main () { return pthread_self (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_self=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_self+:} false; then : break fi done if ${ac_cv_search_pthread_self+:} false; then : else ac_cv_search_pthread_self=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_self" >&5 $as_echo "$ac_cv_search_pthread_self" >&6; } ac_res=$ac_cv_search_pthread_self if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_cancel" >&5 $as_echo_n "checking for library containing pthread_cancel... " >&6; } if ${ac_cv_search_pthread_cancel+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_cancel (); int main () { return pthread_cancel (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_cancel=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_cancel+:} false; then : break fi done if ${ac_cv_search_pthread_cancel+:} false; then : else ac_cv_search_pthread_cancel=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_cancel" >&5 $as_echo "$ac_cv_search_pthread_cancel" >&6; } ac_res=$ac_cv_search_pthread_cancel if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5 $as_echo_n "checking for library containing pthread_join... " >&6; } if ${ac_cv_search_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_join=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_join+:} false; then : break fi done if ${ac_cv_search_pthread_join+:} false; then : else ac_cv_search_pthread_join=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5 $as_echo "$ac_cv_search_pthread_join" >&6; } ac_res=$ac_cv_search_pthread_join if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_init" >&5 $as_echo_n "checking for library containing pthread_attr_init... " >&6; } if ${ac_cv_search_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_init+:} false; then : break fi done if ${ac_cv_search_pthread_attr_init+:} false; then : else ac_cv_search_pthread_attr_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_init" >&5 $as_echo "$ac_cv_search_pthread_attr_init" >&6; } ac_res=$ac_cv_search_pthread_attr_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_setstacksize" >&5 $as_echo_n "checking for library containing pthread_attr_setstacksize... " >&6; } if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_setstacksize (); int main () { return pthread_attr_setstacksize (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_setstacksize=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : break fi done if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : else ac_cv_search_pthread_attr_setstacksize=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_setstacksize" >&5 $as_echo "$ac_cv_search_pthread_attr_setstacksize" >&6; } ac_res=$ac_cv_search_pthread_attr_setstacksize if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_create+:} false; then : break fi done if ${ac_cv_search_pthread_create+:} false; then : else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 $as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_destroy" >&5 $as_echo_n "checking for library containing pthread_attr_destroy... " >&6; } if ${ac_cv_search_pthread_attr_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_destroy (); int main () { return pthread_attr_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_attr_destroy+:} false; then : else ac_cv_search_pthread_attr_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_destroy" >&5 $as_echo "$ac_cv_search_pthread_attr_destroy" >&6; } ac_res=$ac_cv_search_pthread_attr_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setschedparam" >&5 $as_echo_n "checking for library containing pthread_setschedparam... " >&6; } if ${ac_cv_search_pthread_setschedparam+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setschedparam (); int main () { return pthread_setschedparam (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setschedparam=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setschedparam+:} false; then : break fi done if ${ac_cv_search_pthread_setschedparam+:} false; then : else ac_cv_search_pthread_setschedparam=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setschedparam" >&5 $as_echo "$ac_cv_search_pthread_setschedparam" >&6; } ac_res=$ac_cv_search_pthread_setschedparam if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcancelstate" >&5 $as_echo_n "checking for library containing pthread_setcancelstate... " >&6; } if ${ac_cv_search_pthread_setcancelstate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcancelstate (); int main () { return pthread_setcancelstate (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcancelstate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcancelstate+:} false; then : break fi done if ${ac_cv_search_pthread_setcancelstate+:} false; then : else ac_cv_search_pthread_setcancelstate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcancelstate" >&5 $as_echo "$ac_cv_search_pthread_setcancelstate" >&6; } ac_res=$ac_cv_search_pthread_setcancelstate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcanceltype" >&5 $as_echo_n "checking for library containing pthread_setcanceltype... " >&6; } if ${ac_cv_search_pthread_setcanceltype+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcanceltype (); int main () { return pthread_setcanceltype (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcanceltype=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcanceltype+:} false; then : break fi done if ${ac_cv_search_pthread_setcanceltype+:} false; then : else ac_cv_search_pthread_setcanceltype=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcanceltype" >&5 $as_echo "$ac_cv_search_pthread_setcanceltype" >&6; } ac_res=$ac_cv_search_pthread_setcanceltype if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_exit" >&5 $as_echo_n "checking for library containing pthread_exit... " >&6; } if ${ac_cv_search_pthread_exit+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_exit (); int main () { return pthread_exit (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_exit=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_exit+:} false; then : break fi done if ${ac_cv_search_pthread_exit+:} false; then : else ac_cv_search_pthread_exit=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_exit" >&5 $as_echo "$ac_cv_search_pthread_exit" >&6; } ac_res=$ac_cv_search_pthread_exit if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 $as_echo_n "checking for library containing pthread_sigmask... " >&6; } if ${ac_cv_search_pthread_sigmask+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_sigmask (); int main () { return pthread_sigmask (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_sigmask=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_sigmask+:} false; then : break fi done if ${ac_cv_search_pthread_sigmask+:} false; then : else ac_cv_search_pthread_sigmask=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 $as_echo "$ac_cv_search_pthread_sigmask" >&6; } ac_res=$ac_cv_search_pthread_sigmask if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi #AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro #AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5 $as_echo_n "checking for library containing pow... " >&6; } if ${ac_cv_search_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pow=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pow+:} false; then : break fi done if ${ac_cv_search_pow+:} false; then : else ac_cv_search_pow=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5 $as_echo "$ac_cv_search_pow" >&6; } ac_res=$ac_cv_search_pow if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing htons" >&5 $as_echo_n "checking for library containing htons... " >&6; } if ${ac_cv_search_htons+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char htons (); int main () { return htons (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_htons=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_htons+:} false; then : break fi done if ${ac_cv_search_htons+:} false; then : else ac_cv_search_htons=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_htons" >&5 $as_echo "$ac_cv_search_htons" >&6; } ac_res=$ac_cv_search_htons if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ntohs" >&5 $as_echo_n "checking for library containing ntohs... " >&6; } if ${ac_cv_search_ntohs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ntohs (); int main () { return ntohs (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_ntohs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_ntohs+:} false; then : break fi done if ${ac_cv_search_ntohs+:} false; then : else ac_cv_search_ntohs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ntohs" >&5 $as_echo "$ac_cv_search_ntohs" >&6; } ac_res=$ac_cv_search_ntohs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind" >&5 $as_echo_n "checking for library containing bind... " >&6; } if ${ac_cv_search_bind+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind (); int main () { return bind (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bind=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bind+:} false; then : break fi done if ${ac_cv_search_bind+:} false; then : else ac_cv_search_bind=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind" >&5 $as_echo "$ac_cv_search_bind" >&6; } ac_res=$ac_cv_search_bind if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing freeaddrinfo" >&5 $as_echo_n "checking for library containing freeaddrinfo... " >&6; } if ${ac_cv_search_freeaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char freeaddrinfo (); int main () { return freeaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_freeaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_freeaddrinfo+:} false; then : break fi done if ${ac_cv_search_freeaddrinfo+:} false; then : else ac_cv_search_freeaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_freeaddrinfo" >&5 $as_echo "$ac_cv_search_freeaddrinfo" >&6; } ac_res=$ac_cv_search_freeaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if ${ac_cv_search_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_getaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_getaddrinfo+:} false; then : break fi done if ${ac_cv_search_getaddrinfo+:} false; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing listen" >&5 $as_echo_n "checking for library containing listen... " >&6; } if ${ac_cv_search_listen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char listen (); int main () { return listen (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_listen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_listen+:} false; then : break fi done if ${ac_cv_search_listen+:} false; then : else ac_cv_search_listen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_listen" >&5 $as_echo "$ac_cv_search_listen" >&6; } ac_res=$ac_cv_search_listen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing recvfrom" >&5 $as_echo_n "checking for library containing recvfrom... " >&6; } if ${ac_cv_search_recvfrom+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char recvfrom (); int main () { return recvfrom (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_recvfrom=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_recvfrom+:} false; then : break fi done if ${ac_cv_search_recvfrom+:} false; then : else ac_cv_search_recvfrom=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_recvfrom" >&5 $as_echo "$ac_cv_search_recvfrom" >&6; } ac_res=$ac_cv_search_recvfrom if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shutdown" >&5 $as_echo_n "checking for library containing shutdown... " >&6; } if ${ac_cv_search_shutdown+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shutdown (); int main () { return shutdown (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shutdown=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_shutdown+:} false; then : break fi done if ${ac_cv_search_shutdown+:} false; then : else ac_cv_search_shutdown=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shutdown" >&5 $as_echo "$ac_cv_search_shutdown" >&6; } ac_res=$ac_cv_search_shutdown if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For Linux, SunOS and Cygwin #AC_CHECK_LIB(stdc++,main,,[AC_MSG_ERROR([stdc++ library missing])]) # Conditional build with OpenSSL if test "$openssl" = 'yes'; then # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in openssl/md5.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_md5_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_MD5_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/bio.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/bio.h" "ac_cv_header_openssl_bio_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_bio_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_BIO_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/err.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_ERR_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/rand.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_rand_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_RAND_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/ssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_SSL_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/x509v3.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509v3.h" "ac_cv_header_openssl_x509v3_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_x509v3_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_X509V3_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_library_init=yes else ac_cv_lib_ssl_SSL_library_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBSSL 1 _ACEOF LIBS="-lssl $LIBS" else as_fn_error $? "ssl library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_num_locks in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_num_locks in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_CRYPTO_num_locks+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char CRYPTO_num_locks (); int main () { return CRYPTO_num_locks (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_CRYPTO_num_locks=yes else ac_cv_lib_crypto_CRYPTO_num_locks=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_num_locks" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_num_locks" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_num_locks" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else as_fn_error $? "crypto library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$openssl" = "yes"; then HAVE_OPENSSL_TRUE= HAVE_OPENSSL_FALSE='#' else HAVE_OPENSSL_TRUE='#' HAVE_OPENSSL_FALSE= fi # Conditional build with SCTP if test "$sctp" = 'yes'; then for ac_header in netinet/sctp.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_NETINET_SCTP_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&5 $as_echo "$as_me: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_send" >&5 $as_echo_n "checking for library containing sctp_send... " >&6; } if ${ac_cv_search_sctp_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_send (); int main () { return sctp_send (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_send=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_send+:} false; then : break fi done if ${ac_cv_search_sctp_send+:} false; then : else ac_cv_search_sctp_send=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_send" >&5 $as_echo "$ac_cv_search_sctp_send" >&6; } ac_res=$ac_cv_search_sctp_send if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_freepaddrs" >&5 $as_echo_n "checking for library containing sctp_freepaddrs... " >&6; } if ${ac_cv_search_sctp_freepaddrs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_freepaddrs (); int main () { return sctp_freepaddrs (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_freepaddrs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_freepaddrs+:} false; then : break fi done if ${ac_cv_search_sctp_freepaddrs+:} false; then : else ac_cv_search_sctp_freepaddrs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_freepaddrs" >&5 $as_echo "$ac_cv_search_sctp_freepaddrs" >&6; } ac_res=$ac_cv_search_sctp_freepaddrs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_bindx" >&5 $as_echo_n "checking for library containing sctp_bindx... " >&6; } if ${ac_cv_search_sctp_bindx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_bindx (); int main () { return sctp_bindx (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_bindx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_bindx+:} false; then : break fi done if ${ac_cv_search_sctp_bindx+:} false; then : else ac_cv_search_sctp_bindx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_bindx" >&5 $as_echo "$ac_cv_search_sctp_bindx" >&6; } ac_res=$ac_cv_search_sctp_bindx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_recvmsg" >&5 $as_echo_n "checking for library containing sctp_recvmsg... " >&6; } if ${ac_cv_search_sctp_recvmsg+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_recvmsg (); int main () { return sctp_recvmsg (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_recvmsg=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_recvmsg+:} false; then : break fi done if ${ac_cv_search_sctp_recvmsg+:} false; then : else ac_cv_search_sctp_recvmsg=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_recvmsg" >&5 $as_echo "$ac_cv_search_sctp_recvmsg" >&6; } ac_res=$ac_cv_search_sctp_recvmsg if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$sctp" = "yes"; then HAVE_SCTP_TRUE= HAVE_SCTP_FALSE='#' else HAVE_SCTP_TRUE='#' HAVE_SCTP_FALSE= fi # Conditional build with pcap if test "$pcap" = 'yes'; then for ac_header in pcap.h do : ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_PCAP_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_open_offline" >&5 $as_echo_n "checking for library containing pcap_open_offline... " >&6; } if ${ac_cv_search_pcap_open_offline+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_open_offline (); int main () { return pcap_open_offline (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_open_offline=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_open_offline+:} false; then : break fi done if ${ac_cv_search_pcap_open_offline+:} false; then : else ac_cv_search_pcap_open_offline=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_open_offline" >&5 $as_echo "$ac_cv_search_pcap_open_offline" >&6; } ac_res=$ac_cv_search_pcap_open_offline if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_next" >&5 $as_echo_n "checking for library containing pcap_next... " >&6; } if ${ac_cv_search_pcap_next+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next (); int main () { return pcap_next (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_next=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_next+:} false; then : break fi done if ${ac_cv_search_pcap_next+:} false; then : else ac_cv_search_pcap_next=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_next" >&5 $as_echo "$ac_cv_search_pcap_next" >&6; } ac_res=$ac_cv_search_pcap_next if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_close" >&5 $as_echo_n "checking for library containing pcap_close... " >&6; } if ${ac_cv_search_pcap_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_close (); int main () { return pcap_close (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_close=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_close+:} false; then : break fi done if ${ac_cv_search_pcap_close+:} false; then : else ac_cv_search_pcap_close=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_close" >&5 $as_echo "$ac_cv_search_pcap_close" >&6; } ac_res=$ac_cv_search_pcap_close if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_next_ex in -lpcap" >&5 $as_echo_n "checking for pcap_next_ex in -lpcap... " >&6; } if ${ac_cv_lib_pcap_pcap_next_ex+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next_ex (); int main () { return pcap_next_ex (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_pcap_next_ex=yes else ac_cv_lib_pcap_pcap_next_ex=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_next_ex" >&5 $as_echo "$ac_cv_lib_pcap_pcap_next_ex" >&6; } if test "x$ac_cv_lib_pcap_pcap_next_ex" = xyes; then : $as_echo "@%:@define HAVE_PCAP_NEXT_EX 1" >>confdefs.h fi fi # For Makefile.am if test "$pcap" = "yes"; then HAVE_PCAP_TRUE= HAVE_PCAP_FALSE='#' else HAVE_PCAP_TRUE='#' HAVE_PCAP_FALSE= fi if test "$rtp" = "yes"; then HAVE_RTP_TRUE= HAVE_RTP_FALSE='#' else HAVE_RTP_TRUE='#' HAVE_RTP_FALSE= fi # Conditional build with pcap if test "$gsl" = 'yes'; then for ac_header in gsl/gsl_randist.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_randist.h" "ac_cv_header_gsl_gsl_randist_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_randist_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_RANDIST_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_rng.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_rng.h" "ac_cv_header_gsl_gsl_rng_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_rng_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_RNG_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_cdf.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_cdf.h" "ac_cv_header_gsl_gsl_cdf_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_cdf_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_CDF_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_dgemm=yes else ac_cv_lib_gslcblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_rng_alloc in -lgsl" >&5 $as_echo_n "checking for gsl_rng_alloc in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_rng_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_rng_alloc (); int main () { return gsl_rng_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_rng_alloc=yes else ac_cv_lib_gsl_gsl_rng_alloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_rng_alloc" >&5 $as_echo "$ac_cv_lib_gsl_gsl_rng_alloc" >&6; } if test "x$ac_cv_lib_gsl_gsl_rng_alloc" = xyes; then : GSL_CFLAGS=`pkg-config gsl --cflags` GSL_CXXFLAGS=`pkg-config gsl --cflags` GSL_LIBS=`pkg-config gsl --libs` else as_fn_error $? "gsl library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$gsl" = "yes"; then HAVE_GSL_TRUE= HAVE_GSL_FALSE='#' else HAVE_GSL_TRUE='#' HAVE_GSL_FALSE= fi if test "$epoll" = 'yes'; then ax_have_epoll_cppflags="${CPPFLAGS}" ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default" if test "x$ac_cv_header_linux_version_h" = xyes; then : CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(7) interface" >&5 $as_echo_n "checking for Linux epoll(7) interface... " >&6; } if ${ax_cv_have_epoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif int main () { int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_epoll=yes else ax_cv_have_epoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="${ax_have_epoll_cppflags}" if test "${ax_cv_have_epoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ax_config_feature_epoll=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ax_config_feature_epoll=no fi @%:@ Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "${enableval}" in yes) ax_config_feature_epoll="yes" ;; no) ax_config_feature_epoll="no" ;; *) as_fn_error $? "bad value ${enableval} for feature --epoll" "$LINENO" 5 ;; esac fi if test "$ax_config_feature_epoll" = yes; then : $as_echo "@%:@define HAVE_EPOLL 1" >>confdefs.h epoll="yes" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is enabled" >&5 $as_echo "$as_me: Feature epoll is enabled" >&6;} fi else epoll="no" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is disabled" >&5 $as_echo "$as_me: Feature epoll is disabled" >&6;} fi fi fi if test "$epoll" = "yes"; then HAVE_EPOLL_TRUE= HAVE_EPOLL_FALSE='#' else HAVE_EPOLL_TRUE='#' HAVE_EPOLL_FALSE= fi # ==================== checks for header files ========================== ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "@%:@define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF @%:@define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # ===== checks for typedefs, structures and compiler characteristics ==== { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "@%:@define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define ssize_t int _ACEOF fi # These conflict with netinet/in.h typedefs. #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT8_T # ==================== checks for library functions ===================== for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "@%:@define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_FORK 1" >>confdefs.h fi #AC_FUNC_MALLOC #AC_FUNC_REALLOC #AC_FUNC_STRTOD for ac_func in alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # ==================== check for clang/gmock workaround ================= # clang++ falls over the use of is_default_constructible, suggesting # is_nothrow_constructible instead. # # ./gmock/include/gmock/gmock-actions.h:107:19: error: no template named # 'is_default_constructible' in namespace 'std'; did you mean # 'is_nothrow_constructible'? # T, ::std::is_default_constructible::value>::Get(); # ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # is_nothrow_constructible # /usr/include/c++/4.6/type_traits:705:12: note: # 'is_nothrow_constructible' declared here # ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports is_default_constructible (used by gmock)" >&5 $as_echo_n "checking whether $CXX supports is_default_constructible (used by gmock)... " >&6; } if ${ax_cv_cxx_has_is_default_constructible+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_has_is_default_constructible=yes else ax_cv_cxx_has_is_default_constructible=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_has_is_default_constructible" >&5 $as_echo "$ax_cv_cxx_has_is_default_constructible" >&6; } if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ==================== generate files =================================== ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SCTP_TRUE}" && test -z "${HAVE_SCTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_SCTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PCAP_TRUE}" && test -z "${HAVE_PCAP_FALSE}"; then as_fn_error $? "conditional \"HAVE_PCAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RTP_TRUE}" && test -z "${HAVE_RTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_RTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GSL_TRUE}" && test -z "${HAVE_GSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_GSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EPOLL_TRUE}" && test -z "${HAVE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_EPOLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ SIPp config.status see-include/version.h configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi sipp-3.5.1/autom4te.cache/traces.10000644000175000017500000014233312672463320015707 0ustar vsevavsevam4trace:configure.ac:3: -1- AC_INIT([SIPp], [see-include/version.h], [sipp-users@lists.sourceforge.net], [sipp]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([_AC_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.ac:3: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.ac:3: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.ac:3: -1- AC_SUBST([SHELL]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.ac:3: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.ac:3: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:3: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:3: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.ac:3: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.ac:3: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.ac:3: -1- m4_pattern_allow([^prefix$]) m4trace:configure.ac:3: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.ac:3: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.ac:3: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^bindir$]) m4trace:configure.ac:3: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.ac:3: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.ac:3: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.ac:3: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^datadir$]) m4trace:configure.ac:3: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.ac:3: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.ac:3: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.ac:3: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^includedir$]) m4trace:configure.ac:3: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.ac:3: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^docdir$]) m4trace:configure.ac:3: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^infodir$]) m4trace:configure.ac:3: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.ac:3: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.ac:3: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.ac:3: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^psdir$]) m4trace:configure.ac:3: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^libdir$]) m4trace:configure.ac:3: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^localedir$]) m4trace:configure.ac:3: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.ac:3: -1- m4_pattern_allow([^mandir$]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.ac:3: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.ac:3: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.ac:3: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.ac:3: -1- AC_SUBST([DEFS]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.ac:3: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.ac:3: -1- AC_SUBST([ECHO_C]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.ac:3: -1- AC_SUBST([ECHO_N]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.ac:3: -1- AC_SUBST([ECHO_T]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.ac:3: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.ac:3: -1- AC_SUBST([LIBS]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:3: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:3: -1- AC_SUBST([build_alias]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.ac:3: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.ac:3: -1- AC_SUBST([host_alias]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.ac:3: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.ac:3: -1- AC_SUBST([target_alias]) m4trace:configure.ac:3: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.ac:3: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.ac:8: -1- m4_include([m4/am_git_version.m4]) m4trace:m4/am_git_version.m4:1: -1- m4_pattern_allow([^AM_GIT_VERSION$]) m4trace:configure.ac:9: -1- m4_include([m4/ax_check_compile_flag.m4]) m4trace:configure.ac:10: -1- m4_include([m4/ax_config_feature.m4]) m4trace:configure.ac:11: -1- m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4trace:configure.ac:12: -1- m4_include([m4/ax_have_epoll.m4]) m4trace:configure.ac:14: -1- AC_CANONICAL_TARGET m4trace:configure.ac:14: -1- AC_CANONICAL_HOST m4trace:configure.ac:14: -1- AC_CANONICAL_BUILD m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([config.sub]) m4trace:configure.ac:14: -1- AC_REQUIRE_AUX_FILE([config.guess]) m4trace:configure.ac:14: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build$]) m4trace:configure.ac:14: -1- AC_SUBST([build_cpu], [$[1]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_cpu]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.ac:14: -1- AC_SUBST([build_vendor], [$[2]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_vendor]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.ac:14: -1- AC_SUBST([build_os]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([build_os]) m4trace:configure.ac:14: -1- m4_pattern_allow([^build_os$]) m4trace:configure.ac:14: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host$]) m4trace:configure.ac:14: -1- AC_SUBST([host_cpu], [$[1]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_cpu]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.ac:14: -1- AC_SUBST([host_vendor], [$[2]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_vendor]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.ac:14: -1- AC_SUBST([host_os]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([host_os]) m4trace:configure.ac:14: -1- m4_pattern_allow([^host_os$]) m4trace:configure.ac:14: -1- AC_SUBST([target], [$ac_cv_target]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([target]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target$]) m4trace:configure.ac:14: -1- AC_SUBST([target_cpu], [$[1]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([target_cpu]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.ac:14: -1- AC_SUBST([target_vendor], [$[2]]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([target_vendor]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.ac:14: -1- AC_SUBST([target_os]) m4trace:configure.ac:14: -1- AC_SUBST_TRACE([target_os]) m4trace:configure.ac:14: -1- m4_pattern_allow([^target_os$]) m4trace:configure.ac:17: -1- AC_CONFIG_HEADERS([include/config.h]) m4trace:configure.ac:18: -1- AM_INIT_AUTOMAKE([foreign subdir-objects]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) m4trace:configure.ac:18: -1- AM_AUTOMAKE_VERSION([1.13.4]) m4trace:configure.ac:18: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:18: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.ac:18: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.ac:18: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.ac:18: -1- AC_SUBST([am__isrc], [' -I$(srcdir)']) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__isrc]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__isrc$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([am__isrc]) m4trace:configure.ac:18: -1- AC_SUBST([CYGPATH_W]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([CYGPATH_W]) m4trace:configure.ac:18: -1- m4_pattern_allow([^CYGPATH_W$]) m4trace:configure.ac:18: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME']) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([PACKAGE]) m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:18: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION']) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([VERSION]) m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE]) m4trace:configure.ac:18: -1- m4_pattern_allow([^PACKAGE$]) m4trace:configure.ac:18: -1- AH_OUTPUT([PACKAGE], [/* Name of package */ @%:@undef PACKAGE]) m4trace:configure.ac:18: -1- AC_DEFINE_TRACE_LITERAL([VERSION]) m4trace:configure.ac:18: -1- m4_pattern_allow([^VERSION$]) m4trace:configure.ac:18: -1- AH_OUTPUT([VERSION], [/* Version number of package */ @%:@undef VERSION]) m4trace:configure.ac:18: -1- AC_REQUIRE_AUX_FILE([missing]) m4trace:configure.ac:18: -1- AC_SUBST([ACLOCAL]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([ACLOCAL]) m4trace:configure.ac:18: -1- m4_pattern_allow([^ACLOCAL$]) m4trace:configure.ac:18: -1- AC_SUBST([AUTOCONF]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOCONF]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOCONF$]) m4trace:configure.ac:18: -1- AC_SUBST([AUTOMAKE]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOMAKE]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOMAKE$]) m4trace:configure.ac:18: -1- AC_SUBST([AUTOHEADER]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AUTOHEADER]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AUTOHEADER$]) m4trace:configure.ac:18: -1- AC_SUBST([MAKEINFO]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([MAKEINFO]) m4trace:configure.ac:18: -1- m4_pattern_allow([^MAKEINFO$]) m4trace:configure.ac:18: -1- AC_SUBST([install_sh]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([install_sh]) m4trace:configure.ac:18: -1- m4_pattern_allow([^install_sh$]) m4trace:configure.ac:18: -1- AC_SUBST([STRIP]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([STRIP]) m4trace:configure.ac:18: -1- m4_pattern_allow([^STRIP$]) m4trace:configure.ac:18: -1- AC_SUBST([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM]) m4trace:configure.ac:18: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$]) m4trace:configure.ac:18: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.ac:18: -1- AC_SUBST([MKDIR_P]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([MKDIR_P]) m4trace:configure.ac:18: -1- m4_pattern_allow([^MKDIR_P$]) m4trace:configure.ac:18: -1- AC_SUBST([mkdir_p], ['$(MKDIR_P)']) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([mkdir_p]) m4trace:configure.ac:18: -1- m4_pattern_allow([^mkdir_p$]) m4trace:configure.ac:18: -1- AC_SUBST([AWK]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AWK$]) m4trace:configure.ac:18: -1- AC_SUBST([SET_MAKE]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.ac:18: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.ac:18: -1- AC_SUBST([am__leading_dot]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__leading_dot]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__leading_dot$]) m4trace:configure.ac:18: -1- AC_SUBST([AMTAR], ['$${TAR-tar}']) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AMTAR]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AMTAR$]) m4trace:configure.ac:18: -1- AC_SUBST([am__tar]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__tar]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__tar$]) m4trace:configure.ac:18: -1- AC_SUBST([am__untar]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.ac:18: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.ac:18: -1- AM_SILENT_RULES m4trace:configure.ac:18: -1- AC_SUBST([AM_V]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AM_V]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_V$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_V]) m4trace:configure.ac:18: -1- AC_SUBST([AM_DEFAULT_V]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AM_DEFAULT_V]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_DEFAULT_V$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_DEFAULT_V]) m4trace:configure.ac:18: -1- AC_SUBST([AM_DEFAULT_VERBOSITY]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$]) m4trace:configure.ac:18: -1- AC_SUBST([AM_BACKSLASH]) m4trace:configure.ac:18: -1- AC_SUBST_TRACE([AM_BACKSLASH]) m4trace:configure.ac:18: -1- m4_pattern_allow([^AM_BACKSLASH$]) m4trace:configure.ac:18: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH]) m4trace:configure.ac:20: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:20: the top level]) m4trace:configure.ac:21: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:21: the top level]) m4trace:configure.ac:22: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:22: the top level]) m4trace:configure.ac:23: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:23: the top level]) m4trace:configure.ac:24: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:24: the top level]) m4trace:configure.ac:27: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... configure.ac:27: the top level]) m4trace:configure.ac:34: -1- AC_SUBST([HELP2MAN]) m4trace:configure.ac:34: -1- AC_SUBST_TRACE([HELP2MAN]) m4trace:configure.ac:34: -1- m4_pattern_allow([^HELP2MAN$]) m4trace:configure.ac:35: -1- AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"]) m4trace:configure.ac:35: -1- AC_SUBST([HAVE_HELP2MAN_TRUE]) m4trace:configure.ac:35: -1- AC_SUBST_TRACE([HAVE_HELP2MAN_TRUE]) m4trace:configure.ac:35: -1- m4_pattern_allow([^HAVE_HELP2MAN_TRUE$]) m4trace:configure.ac:35: -1- AC_SUBST([HAVE_HELP2MAN_FALSE]) m4trace:configure.ac:35: -1- AC_SUBST_TRACE([HAVE_HELP2MAN_FALSE]) m4trace:configure.ac:35: -1- m4_pattern_allow([^HAVE_HELP2MAN_FALSE$]) m4trace:configure.ac:35: -1- _AM_SUBST_NOTMAKE([HAVE_HELP2MAN_TRUE]) m4trace:configure.ac:35: -1- _AM_SUBST_NOTMAKE([HAVE_HELP2MAN_FALSE]) m4trace:configure.ac:42: -1- AC_SUBST([CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- AC_SUBST([CFLAGS]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.ac:42: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:42: -1- AC_SUBST([LIBS]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:42: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:42: -1- AC_SUBST([CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- AC_SUBST([CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- AC_SUBST([CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- AC_SUBST([CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CC$]) m4trace:configure.ac:42: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.ac:42: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.ac:42: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.ac:42: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.ac:42: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.ac:42: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.ac:42: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([DEPDIR]) m4trace:configure.ac:42: -1- m4_pattern_allow([^DEPDIR$]) m4trace:configure.ac:42: -1- AC_SUBST([am__include]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([am__include]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__include$]) m4trace:configure.ac:42: -1- AC_SUBST([am__quote]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([am__quote]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__quote$]) m4trace:configure.ac:42: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) m4trace:configure.ac:42: -1- AC_SUBST([AMDEP_TRUE]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([AMDEP_TRUE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEP_TRUE$]) m4trace:configure.ac:42: -1- AC_SUBST([AMDEP_FALSE]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([AMDEP_FALSE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEP_FALSE$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE]) m4trace:configure.ac:42: -1- AC_SUBST([AMDEPBACKSLASH]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([AMDEPBACKSLASH]) m4trace:configure.ac:42: -1- m4_pattern_allow([^AMDEPBACKSLASH$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH]) m4trace:configure.ac:42: -1- AC_SUBST([am__nodep]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([am__nodep]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__nodep$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__nodep]) m4trace:configure.ac:42: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([CCDEPMODE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^CCDEPMODE$]) m4trace:configure.ac:42: -1- AM_CONDITIONAL([am__fastdepCC], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:42: -1- AC_SUBST([am__fastdepCC_TRUE]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__fastdepCC_TRUE$]) m4trace:configure.ac:42: -1- AC_SUBST([am__fastdepCC_FALSE]) m4trace:configure.ac:42: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE]) m4trace:configure.ac:42: -1- m4_pattern_allow([^am__fastdepCC_FALSE$]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE]) m4trace:configure.ac:42: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE]) m4trace:configure.ac:43: -1- AC_SUBST([CXX]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:43: -1- AC_SUBST([CXXFLAGS]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([CXXFLAGS]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXXFLAGS$]) m4trace:configure.ac:43: -1- AC_SUBST([LDFLAGS]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.ac:43: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.ac:43: -1- AC_SUBST([LIBS]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.ac:43: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.ac:43: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:43: -1- AC_SUBST([CXX]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([CXX]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXX$]) m4trace:configure.ac:43: -1- AC_SUBST([ac_ct_CXX]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([ac_ct_CXX]) m4trace:configure.ac:43: -1- m4_pattern_allow([^ac_ct_CXX$]) m4trace:configure.ac:43: -1- AC_SUBST([CXXDEPMODE], [depmode=$am_cv_CXX_dependencies_compiler_type]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([CXXDEPMODE]) m4trace:configure.ac:43: -1- m4_pattern_allow([^CXXDEPMODE$]) m4trace:configure.ac:43: -1- AM_CONDITIONAL([am__fastdepCXX], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3]) m4trace:configure.ac:43: -1- AC_SUBST([am__fastdepCXX_TRUE]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([am__fastdepCXX_TRUE]) m4trace:configure.ac:43: -1- m4_pattern_allow([^am__fastdepCXX_TRUE$]) m4trace:configure.ac:43: -1- AC_SUBST([am__fastdepCXX_FALSE]) m4trace:configure.ac:43: -1- AC_SUBST_TRACE([am__fastdepCXX_FALSE]) m4trace:configure.ac:43: -1- m4_pattern_allow([^am__fastdepCXX_FALSE$]) m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_TRUE]) m4trace:configure.ac:43: -1- _AM_SUBST_NOTMAKE([am__fastdepCXX_FALSE]) m4trace:configure.ac:44: -1- AC_SUBST([CPP]) m4trace:configure.ac:44: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:44: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.ac:44: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.ac:44: -1- AC_SUBST([CPP]) m4trace:configure.ac:44: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.ac:44: -1- m4_pattern_allow([^CPP$]) m4trace:configure.ac:44: -1- AC_SUBST([GREP]) m4trace:configure.ac:44: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.ac:44: -1- m4_pattern_allow([^GREP$]) m4trace:configure.ac:44: -1- AC_SUBST([EGREP]) m4trace:configure.ac:44: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.ac:44: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.ac:44: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.ac:44: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.ac:44: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.ac:48: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CXX11]) m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_CXX11$]) m4trace:configure.ac:48: -1- AH_OUTPUT([HAVE_CXX11], [/* define if the compiler supports basic C++11 syntax */ @%:@undef HAVE_CXX11]) m4trace:configure.ac:48: -1- AC_SUBST([HAVE_CXX11]) m4trace:configure.ac:48: -1- AC_SUBST_TRACE([HAVE_CXX11]) m4trace:configure.ac:48: -1- m4_pattern_allow([^HAVE_CXX11$]) m4trace:configure.ac:87: -1- AH_OUTPUT([HAVE_LIBCURSES], [/* Define to 1 if you have the `curses\' library (-lcurses). */ @%:@undef HAVE_LIBCURSES]) m4trace:configure.ac:87: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCURSES]) m4trace:configure.ac:87: -1- m4_pattern_allow([^HAVE_LIBCURSES$]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_OPENSSL_MD5_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_MD5_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.ac:140: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:140: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_MD5_H]) m4trace:configure.ac:140: -1- m4_pattern_allow([^HAVE_OPENSSL_MD5_H$]) m4trace:configure.ac:141: -1- AH_OUTPUT([HAVE_OPENSSL_BIO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_BIO_H]) m4trace:configure.ac:141: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_BIO_H]) m4trace:configure.ac:141: -1- m4_pattern_allow([^HAVE_OPENSSL_BIO_H$]) m4trace:configure.ac:142: -1- AH_OUTPUT([HAVE_OPENSSL_ERR_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_ERR_H]) m4trace:configure.ac:142: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_ERR_H]) m4trace:configure.ac:142: -1- m4_pattern_allow([^HAVE_OPENSSL_ERR_H$]) m4trace:configure.ac:143: -1- AH_OUTPUT([HAVE_OPENSSL_RAND_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_RAND_H]) m4trace:configure.ac:143: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_RAND_H]) m4trace:configure.ac:143: -1- m4_pattern_allow([^HAVE_OPENSSL_RAND_H$]) m4trace:configure.ac:144: -1- AH_OUTPUT([HAVE_OPENSSL_SSL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_SSL_H]) m4trace:configure.ac:144: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_SSL_H]) m4trace:configure.ac:144: -1- m4_pattern_allow([^HAVE_OPENSSL_SSL_H$]) m4trace:configure.ac:145: -1- AH_OUTPUT([HAVE_OPENSSL_X509V3_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_OPENSSL_X509V3_H]) m4trace:configure.ac:145: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OPENSSL_X509V3_H]) m4trace:configure.ac:145: -1- m4_pattern_allow([^HAVE_OPENSSL_X509V3_H$]) m4trace:configure.ac:146: -1- AH_OUTPUT([HAVE_LIBSSL], [/* Define to 1 if you have the `ssl\' library (-lssl). */ @%:@undef HAVE_LIBSSL]) m4trace:configure.ac:146: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBSSL]) m4trace:configure.ac:146: -1- m4_pattern_allow([^HAVE_LIBSSL$]) m4trace:configure.ac:147: -1- AH_OUTPUT([HAVE_LIBCRYPTO], [/* Define to 1 if you have the `crypto\' library (-lcrypto). */ @%:@undef HAVE_LIBCRYPTO]) m4trace:configure.ac:147: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBCRYPTO]) m4trace:configure.ac:147: -1- m4_pattern_allow([^HAVE_LIBCRYPTO$]) m4trace:configure.ac:150: -1- AM_CONDITIONAL([HAVE_OPENSSL], [test "$openssl" = "yes"]) m4trace:configure.ac:150: -1- AC_SUBST([HAVE_OPENSSL_TRUE]) m4trace:configure.ac:150: -1- AC_SUBST_TRACE([HAVE_OPENSSL_TRUE]) m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_OPENSSL_TRUE$]) m4trace:configure.ac:150: -1- AC_SUBST([HAVE_OPENSSL_FALSE]) m4trace:configure.ac:150: -1- AC_SUBST_TRACE([HAVE_OPENSSL_FALSE]) m4trace:configure.ac:150: -1- m4_pattern_allow([^HAVE_OPENSSL_FALSE$]) m4trace:configure.ac:150: -1- _AM_SUBST_NOTMAKE([HAVE_OPENSSL_TRUE]) m4trace:configure.ac:150: -1- _AM_SUBST_NOTMAKE([HAVE_OPENSSL_FALSE]) m4trace:configure.ac:154: -1- AH_OUTPUT([HAVE_NETINET_SCTP_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETINET_SCTP_H]) m4trace:configure.ac:154: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETINET_SCTP_H]) m4trace:configure.ac:154: -1- m4_pattern_allow([^HAVE_NETINET_SCTP_H$]) m4trace:configure.ac:161: -1- AM_CONDITIONAL([HAVE_SCTP], [test "$sctp" = "yes"]) m4trace:configure.ac:161: -1- AC_SUBST([HAVE_SCTP_TRUE]) m4trace:configure.ac:161: -1- AC_SUBST_TRACE([HAVE_SCTP_TRUE]) m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_SCTP_TRUE$]) m4trace:configure.ac:161: -1- AC_SUBST([HAVE_SCTP_FALSE]) m4trace:configure.ac:161: -1- AC_SUBST_TRACE([HAVE_SCTP_FALSE]) m4trace:configure.ac:161: -1- m4_pattern_allow([^HAVE_SCTP_FALSE$]) m4trace:configure.ac:161: -1- _AM_SUBST_NOTMAKE([HAVE_SCTP_TRUE]) m4trace:configure.ac:161: -1- _AM_SUBST_NOTMAKE([HAVE_SCTP_FALSE]) m4trace:configure.ac:165: -1- AH_OUTPUT([HAVE_PCAP_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_PCAP_H]) m4trace:configure.ac:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PCAP_H]) m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE_PCAP_H$]) m4trace:configure.ac:169: -2- AC_DEFINE_TRACE_LITERAL([HAVE_PCAP_NEXT_EX]) m4trace:configure.ac:169: -2- m4_pattern_allow([^HAVE_PCAP_NEXT_EX$]) m4trace:configure.ac:169: -2- AH_OUTPUT([HAVE_PCAP_NEXT_EX], [/* Define to 1 if libpcap has the pcap_next_ex function. */ @%:@undef HAVE_PCAP_NEXT_EX]) m4trace:configure.ac:172: -1- AM_CONDITIONAL([HAVE_PCAP], [test "$pcap" = "yes"]) m4trace:configure.ac:172: -1- AC_SUBST([HAVE_PCAP_TRUE]) m4trace:configure.ac:172: -1- AC_SUBST_TRACE([HAVE_PCAP_TRUE]) m4trace:configure.ac:172: -1- m4_pattern_allow([^HAVE_PCAP_TRUE$]) m4trace:configure.ac:172: -1- AC_SUBST([HAVE_PCAP_FALSE]) m4trace:configure.ac:172: -1- AC_SUBST_TRACE([HAVE_PCAP_FALSE]) m4trace:configure.ac:172: -1- m4_pattern_allow([^HAVE_PCAP_FALSE$]) m4trace:configure.ac:172: -1- _AM_SUBST_NOTMAKE([HAVE_PCAP_TRUE]) m4trace:configure.ac:172: -1- _AM_SUBST_NOTMAKE([HAVE_PCAP_FALSE]) m4trace:configure.ac:174: -1- AM_CONDITIONAL([HAVE_RTP], [test "$rtp" = "yes"]) m4trace:configure.ac:174: -1- AC_SUBST([HAVE_RTP_TRUE]) m4trace:configure.ac:174: -1- AC_SUBST_TRACE([HAVE_RTP_TRUE]) m4trace:configure.ac:174: -1- m4_pattern_allow([^HAVE_RTP_TRUE$]) m4trace:configure.ac:174: -1- AC_SUBST([HAVE_RTP_FALSE]) m4trace:configure.ac:174: -1- AC_SUBST_TRACE([HAVE_RTP_FALSE]) m4trace:configure.ac:174: -1- m4_pattern_allow([^HAVE_RTP_FALSE$]) m4trace:configure.ac:174: -1- _AM_SUBST_NOTMAKE([HAVE_RTP_TRUE]) m4trace:configure.ac:174: -1- _AM_SUBST_NOTMAKE([HAVE_RTP_FALSE]) m4trace:configure.ac:178: -1- AH_OUTPUT([HAVE_GSL_GSL_RANDIST_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_GSL_GSL_RANDIST_H]) m4trace:configure.ac:178: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSL_GSL_RANDIST_H]) m4trace:configure.ac:178: -1- m4_pattern_allow([^HAVE_GSL_GSL_RANDIST_H$]) m4trace:configure.ac:179: -1- AH_OUTPUT([HAVE_GSL_GSL_RNG_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_GSL_GSL_RNG_H]) m4trace:configure.ac:179: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSL_GSL_RNG_H]) m4trace:configure.ac:179: -1- m4_pattern_allow([^HAVE_GSL_GSL_RNG_H$]) m4trace:configure.ac:180: -1- AH_OUTPUT([HAVE_GSL_GSL_CDF_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_GSL_GSL_CDF_H]) m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSL_GSL_CDF_H]) m4trace:configure.ac:180: -1- m4_pattern_allow([^HAVE_GSL_GSL_CDF_H$]) m4trace:configure.ac:181: -1- AH_OUTPUT([HAVE_LIBM], [/* Define to 1 if you have the `m\' library (-lm). */ @%:@undef HAVE_LIBM]) m4trace:configure.ac:181: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBM]) m4trace:configure.ac:181: -1- m4_pattern_allow([^HAVE_LIBM$]) m4trace:configure.ac:182: -1- AH_OUTPUT([HAVE_LIBGSLCBLAS], [/* Define to 1 if you have the `gslcblas\' library (-lgslcblas). */ @%:@undef HAVE_LIBGSLCBLAS]) m4trace:configure.ac:182: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBGSLCBLAS]) m4trace:configure.ac:182: -1- m4_pattern_allow([^HAVE_LIBGSLCBLAS$]) m4trace:configure.ac:183: -1- AC_SUBST([GSL_CFLAGS]) m4trace:configure.ac:183: -1- AC_SUBST_TRACE([GSL_CFLAGS]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_CFLAGS$]) m4trace:configure.ac:183: -1- AC_SUBST([GSL_CXXFLAGS]) m4trace:configure.ac:183: -1- AC_SUBST_TRACE([GSL_CXXFLAGS]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_CXXFLAGS$]) m4trace:configure.ac:183: -1- AC_SUBST([GSL_LIBS]) m4trace:configure.ac:183: -1- AC_SUBST_TRACE([GSL_LIBS]) m4trace:configure.ac:183: -1- m4_pattern_allow([^GSL_LIBS$]) m4trace:configure.ac:195: -1- AM_CONDITIONAL([HAVE_GSL], [test "$gsl" = "yes"]) m4trace:configure.ac:195: -1- AC_SUBST([HAVE_GSL_TRUE]) m4trace:configure.ac:195: -1- AC_SUBST_TRACE([HAVE_GSL_TRUE]) m4trace:configure.ac:195: -1- m4_pattern_allow([^HAVE_GSL_TRUE$]) m4trace:configure.ac:195: -1- AC_SUBST([HAVE_GSL_FALSE]) m4trace:configure.ac:195: -1- AC_SUBST_TRACE([HAVE_GSL_FALSE]) m4trace:configure.ac:195: -1- m4_pattern_allow([^HAVE_GSL_FALSE$]) m4trace:configure.ac:195: -1- _AM_SUBST_NOTMAKE([HAVE_GSL_TRUE]) m4trace:configure.ac:195: -1- _AM_SUBST_NOTMAKE([HAVE_GSL_FALSE]) m4trace:configure.ac:200: -1- AC_DEFINE_TRACE_LITERAL([HAVE_EPOLL]) m4trace:configure.ac:200: -1- m4_pattern_allow([^HAVE_EPOLL$]) m4trace:configure.ac:200: -1- AH_OUTPUT([HAVE_EPOLL], [/* This platform supports epoll(7). */ @%:@undef HAVE_EPOLL]) m4trace:configure.ac:205: -1- AM_CONDITIONAL([HAVE_EPOLL], [test "$epoll" = "yes"]) m4trace:configure.ac:205: -1- AC_SUBST([HAVE_EPOLL_TRUE]) m4trace:configure.ac:205: -1- AC_SUBST_TRACE([HAVE_EPOLL_TRUE]) m4trace:configure.ac:205: -1- m4_pattern_allow([^HAVE_EPOLL_TRUE$]) m4trace:configure.ac:205: -1- AC_SUBST([HAVE_EPOLL_FALSE]) m4trace:configure.ac:205: -1- AC_SUBST_TRACE([HAVE_EPOLL_FALSE]) m4trace:configure.ac:205: -1- m4_pattern_allow([^HAVE_EPOLL_FALSE$]) m4trace:configure.ac:205: -1- _AM_SUBST_NOTMAKE([HAVE_EPOLL_TRUE]) m4trace:configure.ac:205: -1- _AM_SUBST_NOTMAKE([HAVE_EPOLL_FALSE]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.ac:208: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:208: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) m4trace:configure.ac:208: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) m4trace:configure.ac:208: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have and it should be used (not on Ultrix). */ @%:@undef HAVE_ALLOCA_H]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) m4trace:configure.ac:208: -1- m4_pattern_allow([^HAVE_ALLOCA$]) m4trace:configure.ac:208: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */ @%:@undef HAVE_ALLOCA]) m4trace:configure.ac:208: -1- AC_LIBSOURCE([alloca.c]) m4trace:configure.ac:208: -1- AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext]) m4trace:configure.ac:208: -1- AC_SUBST_TRACE([ALLOCA]) m4trace:configure.ac:208: -1- m4_pattern_allow([^ALLOCA$]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA]) m4trace:configure.ac:208: -1- m4_pattern_allow([^C_ALLOCA$]) m4trace:configure.ac:208: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */ @%:@undef C_ALLOCA]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END]) m4trace:configure.ac:208: -1- m4_pattern_allow([^CRAY_STACKSEG_END$]) m4trace:configure.ac:208: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c\' support on those systems. */ @%:@undef CRAY_STACKSEG_END]) m4trace:configure.ac:208: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ @%:@undef STACK_DIRECTION]) m4trace:configure.ac:208: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION]) m4trace:configure.ac:208: -1- m4_pattern_allow([^STACK_DIRECTION$]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_ARPA_INET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_ARPA_INET_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_FCNTL_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_LIMITS_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_NETDB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETDB_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_NETINET_IN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NETINET_IN_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SOCKET_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) m4trace:configure.ac:209: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.ac:213: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL]) m4trace:configure.ac:213: -1- m4_pattern_allow([^HAVE__BOOL$]) m4trace:configure.ac:213: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */ @%:@undef HAVE__BOOL]) m4trace:configure.ac:213: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H]) m4trace:configure.ac:213: -1- m4_pattern_allow([^HAVE_STDBOOL_H$]) m4trace:configure.ac:213: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */ @%:@undef HAVE_STDBOOL_H]) m4trace:configure.ac:214: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.ac:215: -1- AC_DEFINE_TRACE_LITERAL([pid_t]) m4trace:configure.ac:215: -1- m4_pattern_allow([^pid_t$]) m4trace:configure.ac:215: -1- AH_OUTPUT([pid_t], [/* Define to `int\' if does not define. */ @%:@undef pid_t]) m4trace:configure.ac:216: -1- AC_DEFINE_TRACE_LITERAL([size_t]) m4trace:configure.ac:216: -1- m4_pattern_allow([^size_t$]) m4trace:configure.ac:216: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if does not define. */ @%:@undef size_t]) m4trace:configure.ac:217: -1- AC_DEFINE_TRACE_LITERAL([ssize_t]) m4trace:configure.ac:217: -1- m4_pattern_allow([^ssize_t$]) m4trace:configure.ac:217: -1- AH_OUTPUT([ssize_t], [/* Define to `int\' if does not define. */ @%:@undef ssize_t]) m4trace:configure.ac:225: -1- AH_OUTPUT([HAVE_VFORK_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_VFORK_H]) m4trace:configure.ac:225: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VFORK_H]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_VFORK_H$]) m4trace:configure.ac:225: -1- AH_OUTPUT([HAVE_FORK], [/* Define to 1 if you have the `fork\' function. */ @%:@undef HAVE_FORK]) m4trace:configure.ac:225: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */ @%:@undef HAVE_VFORK]) m4trace:configure.ac:225: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_VFORK]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_WORKING_VFORK$]) m4trace:configure.ac:225: -1- AH_OUTPUT([HAVE_WORKING_VFORK], [/* Define to 1 if `vfork\' works. */ @%:@undef HAVE_WORKING_VFORK]) m4trace:configure.ac:225: -1- AC_DEFINE_TRACE_LITERAL([vfork]) m4trace:configure.ac:225: -1- m4_pattern_allow([^vfork$]) m4trace:configure.ac:225: -1- AH_OUTPUT([vfork], [/* Define as `fork\' if `vfork\' does not work. */ @%:@undef vfork]) m4trace:configure.ac:225: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_FORK]) m4trace:configure.ac:225: -1- m4_pattern_allow([^HAVE_WORKING_FORK$]) m4trace:configure.ac:225: -1- AH_OUTPUT([HAVE_WORKING_FORK], [/* Define to 1 if `fork\' works. */ @%:@undef HAVE_WORKING_FORK]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ @%:@undef HAVE_ALARM]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_DUP2], [/* Define to 1 if you have the `dup2\' function. */ @%:@undef HAVE_DUP2]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_FLOOR], [/* Define to 1 if you have the `floor\' function. */ @%:@undef HAVE_FLOOR]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */ @%:@undef HAVE_GETHOSTNAME]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ @%:@undef HAVE_GETTIMEOFDAY]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_INET_NTOA], [/* Define to 1 if you have the `inet_ntoa\' function. */ @%:@undef HAVE_INET_NTOA]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */ @%:@undef HAVE_MEMMOVE]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ @%:@undef HAVE_MEMSET]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_POW], [/* Define to 1 if you have the `pow\' function. */ @%:@undef HAVE_POW]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_REGCOMP], [/* Define to 1 if you have the `regcomp\' function. */ @%:@undef HAVE_REGCOMP]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_SOCKET], [/* Define to 1 if you have the `socket\' function. */ @%:@undef HAVE_SOCKET]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_SQRT], [/* Define to 1 if you have the `sqrt\' function. */ @%:@undef HAVE_SQRT]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ @%:@undef HAVE_STRCASECMP]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ @%:@undef HAVE_STRCHR]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRCSPN], [/* Define to 1 if you have the `strcspn\' function. */ @%:@undef HAVE_STRCSPN]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */ @%:@undef HAVE_STRDUP]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRNCASECMP], [/* Define to 1 if you have the `strncasecmp\' function. */ @%:@undef HAVE_STRNCASECMP]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRRCHR], [/* Define to 1 if you have the `strrchr\' function. */ @%:@undef HAVE_STRRCHR]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRSTR], [/* Define to 1 if you have the `strstr\' function. */ @%:@undef HAVE_STRSTR]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ @%:@undef HAVE_STRTOL]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ @%:@undef HAVE_STRTOUL]) m4trace:configure.ac:229: -1- AH_OUTPUT([HAVE_STRTOULL], [/* Define to 1 if you have the `strtoull\' function. */ @%:@undef HAVE_STRTOULL]) m4trace:configure.ac:272: -1- AC_CONFIG_FILES([Makefile]) m4trace:configure.ac:273: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.ac:273: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.ac:273: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.ac:273: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.ac:273: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) m4trace:configure.ac:273: -1- AC_SUBST([am__EXEEXT_TRUE]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) m4trace:configure.ac:273: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) m4trace:configure.ac:273: -1- AC_SUBST([am__EXEEXT_FALSE]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) m4trace:configure.ac:273: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) m4trace:configure.ac:273: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) m4trace:configure.ac:273: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([INSTALL]) m4trace:configure.ac:273: -1- AC_SUBST_TRACE([MKDIR_P]) sipp-3.5.1/autom4te.cache/output.00000644000175000017500000111053412672463316015771 0ustar vsevavseva@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69 for SIPp see-include/version.h. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: sipp-users@lists.sourceforge.net about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='SIPp' PACKAGE_TARNAME='sipp' PACKAGE_VERSION='see-include/version.h' PACKAGE_STRING='SIPp see-include/version.h' PACKAGE_BUGREPORT='sipp-users@lists.sourceforge.net' PACKAGE_URL='' ac_unique_file="src/sipp.cpp" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIB@&t@OBJS ALLOCA HAVE_EPOLL_FALSE HAVE_EPOLL_TRUE HAVE_GSL_FALSE HAVE_GSL_TRUE GSL_LIBS GSL_CXXFLAGS GSL_CFLAGS HAVE_RTP_FALSE HAVE_RTP_TRUE HAVE_PCAP_FALSE HAVE_PCAP_TRUE HAVE_SCTP_FALSE HAVE_SCTP_TRUE HAVE_OPENSSL_FALSE HAVE_OPENSSL_TRUE HAVE_CXX11 EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC HAVE_HELP2MAN_FALSE HAVE_HELP2MAN_TRUE HELP2MAN AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='AM_GIT_VERSION' ac_user_opts=' enable_option_checking enable_silent_rules with_openssl with_pcap with_sctp with_gsl with_rtpstream enable_epoll enable_dependency_tracking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures SIPp see-include/version.h to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/sipp@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of SIPp see-include/version.h:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-epoll build with epoll backend --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-epoll This platform supports epoll(7) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-openssl build with OpenSSL support --with-pcap build with pcap support --with-sctp build with SCTP support --with-gsl build with GSL (GNU Scientific Library) support --without-rtpstream build without RTP streaming support Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF SIPp configure see-include/version.h generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_cxx_try_compile LINENO @%:@ ---------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ----------------------------------------------- ## ## Report this to sipp-users@lists.sourceforge.net ## ## ----------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES @%:@ ------------------------------------------- @%:@ Tests whether TYPE exists after having included INCLUDES, setting cache @%:@ variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type @%:@ ac_fn_c_check_func LINENO FUNC VAR @%:@ ---------------------------------- @%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Load non-standard m4 files from ./m4/*.m4. # AC_CONFIG_MACRO_DIR([m4]) does not work on pre-1.13 aclocal, so we # have to include all files by hand. AM_GIT_VERSION=$srcdir/m4/am_git_version.mh # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_check_compile_flag.html # =========================================================================== # # SYNOPSIS # # AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # # Check whether the given FLAG works with the current language's compiler # or gives an error. (Warnings, however, are ignored) # # ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on # success/failure. # # If EXTRA-FLAGS is defined, it is added to the current language's default # flags (e.g. CFLAGS) when the check is done. The check is thus made with # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # # INPUT gives an alternative input source to AC_COMPILE_IFELSE. # # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # # LICENSE # # Copyright (c) 2008 Guido U. Draheim # Copyright (c) 2011 Maarten Bosmans # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 4 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_config_feature.html # =========================================================================== # # SYNOPSIS # # AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]]) # # DESCRIPTION # # AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the # feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the # user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED # and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is # enabled by default, in order to change this behaviour use the # AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED # macros. # # A simple example: # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # # ... # # AX_CONFIG_FEATURE_DEFAULT_DISABLED # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"]) # # AX_CONFIG_FEATURE_DEFAULT_ENABLED # AX_CONFIG_FEATURE(...) # # ... # # If you have lot of features and you want a verbose dumping of each user # selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in # order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default # features are silent. # # Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to # enable or disable a specific feature. # # Another simple example: # # AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[]) # # AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support], # HAVE_XXXXX, [Define if you want XXXXX support]) # AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support], # HAVE_YYYYY, [Define if you want YYYYY support], # [enable_yyyyy="yes"], [enable_yyyyy="no"]) # # ... # # NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative # AX_CONFIG_FEATURE() macro ... # # LICENSE # # Copyright (c) 2008 Francesco Salvestrini # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Archive. When you make and distribute a # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. #serial 10 # ============================================================================ # http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html # ============================================================================ # # SYNOPSIS # # AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) # # DESCRIPTION # # Check for baseline language coverage in the compiler for the C++11 # standard; if necessary, add switches to CXXFLAGS to enable support. # # The first argument, if specified, indicates whether you insist on an # extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. # -std=c++11). If neither is specified, you get whatever works, with # preference for an extended mode. # # The second argument, if specified 'mandatory' or if left unspecified, # indicates that baseline C++11 support is required and that the macro # should error out if no mode with that support is found. If specified # 'optional', then configuration proceeds regardless, after defining # HAVE_CXX11 if and only if a supporting mode is found. # # LICENSE # # Copyright (c) 2008 Benjamin Kosnik # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014, 2015 Google Inc.; contributed by Alexey Sokolov # Copyright (c) 2015 Paul Norman # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 # =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- ac_config_headers="$ac_config_headers include/config.h" am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null @%:@ Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='sipp' VERSION='see-include/version.h' cat >>confdefs.h <<_ACEOF @%:@define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @%:@ Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; openssl="$withval" else openssl="no" fi @%:@ Check whether --with-pcap was given. if test "${with_pcap+set}" = set; then : withval=$with_pcap; pcap="$withval" else pcap="no" fi @%:@ Check whether --with-sctp was given. if test "${with_sctp+set}" = set; then : withval=$with_sctp; sctp="$withval" else sctp="no" fi @%:@ Check whether --with-gsl was given. if test "${with_gsl+set}" = set; then : withval=$with_gsl; gsl="$withval" else gsl="no" fi @%:@ Check whether --with-rtpstream was given. if test "${with_rtpstream+set}" = set; then : withval=$with_rtpstream; rtp="$withval" else rtp="yes" fi @%:@ Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "$enableval" in yes | no) epoll="$enableval" ;; *) as_fn_error $? "bad value $enableval for --enable-epoll" "$LINENO" 5 ;; esac else epoll="yes" fi # Extract the first word of "help2man", so it can be a program name with args. set dummy help2man; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_HELP2MAN+:} false; then : $as_echo_n "(cached) " >&6 else case $HELP2MAN in [\\/]* | ?:[\\/]*) ac_cv_path_HELP2MAN="$HELP2MAN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_HELP2MAN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi HELP2MAN=$ac_cv_path_HELP2MAN if test -n "$HELP2MAN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HELP2MAN" >&5 $as_echo "$HELP2MAN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$HELP2MAN"; then HAVE_HELP2MAN_TRUE= HAVE_HELP2MAN_FALSE='#' else HAVE_HELP2MAN_TRUE='#' HAVE_HELP2MAN_FALSE= fi if test x"$HELP2MAN" = x; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find help2man, you will not be able to generate manpages" >&5 $as_echo "$as_me: WARNING: cannot find help2man, you will not be able to generate manpages" >&2;} fi # ==================== basic compiler settings ========================== ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf @%:@ Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # Prefer ext (gnu++11) over noext (c++11) because on some platforms the # noext (stricter) mode disables non-posix features like stdio fileno(). ax_cxx_compile_cxx11_required=false ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } if ${ax_cv_cxx_compile_cxx11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_compile_cxx11=yes else ax_cv_cxx_compile_cxx11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } if test x$ax_cv_cxx_compile_cxx11 = xyes; then ac_success=yes fi if test x$ac_success = xno; then for switch in -std=gnu++11 -std=gnu++0x; do cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } if eval \${$cachevar+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $switch" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ template struct check { static_assert(sizeof(int) <= sizeof(T), "not big enough"); }; struct Base { virtual void f() {} }; struct Child : public Base { virtual void f() override {} }; typedef check> right_angle_brackets; int a; decltype(a) b; typedef check check_type; check_type c; check_type&& cr = static_cast(c); auto d = a; auto l = [](){}; // Prevent Clang error: unused variable 'l' [-Werror,-Wunused-variable] struct use_l { use_l() { l(); } }; // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this namespace test_template_alias_sfinae { struct foo {}; template using member = typename T::member_type; template void func(...) {} template void func(member*) {} void test(); void test() { func(0); } } // Check for C++11 attribute support void noret [[noreturn]] () { throw 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval $cachevar=yes else eval $cachevar=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="$ac_save_CXXFLAGS" fi eval ac_res=\$$cachevar { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test x\$$cachevar = xyes; then CXXFLAGS="$CXXFLAGS $switch" ac_success=yes break fi done fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test x$ax_cxx_compile_cxx11_required = xtrue; then if test x$ac_success = xno; then as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 fi else if test x$ac_success = xno; then HAVE_CXX11=0 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 $as_echo "$as_me: No compiler with C++11 support was found" >&6;} else HAVE_CXX11=1 $as_echo "@%:@define HAVE_CXX11 1" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts -std=gnu11" >&5 $as_echo_n "checking whether C compiler accepts -std=gnu11... " >&6; } if ${ax_cv_check_cflags___std_gnu11+:} false; then : $as_echo_n "(cached) " >&6 else ax_check_save_flags=$CFLAGS CFLAGS="$CFLAGS -std=gnu11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ax_cv_check_cflags___std_gnu11=yes else ax_cv_check_cflags___std_gnu11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_check_save_flags fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_check_cflags___std_gnu11" >&5 $as_echo "$ax_cv_check_cflags___std_gnu11" >&6; } if test "x$ax_cv_check_cflags___std_gnu11" = xyes; then : CFLAGS+=" -std=gnu11" else : fi case "$host" in *-linux*) CFLAGS="$CFLAGS -D__LINUX" CPPFLAGS="$CPPFLAGS -D__LINUX" ;; *-darwin*) CFLAGS="$CFLAGS -D__DARWIN" CPPFLAGS="$CPPFLAGS -D__DARWIN" ;; *-hpux*) CFLAGS="$CFLAGS -D__HPUX" CPPFLAGS="$CPPFLAGS -D__HPUX" ;; *-freebsd*) CFLAGS="$CFLAGS -D__LINUX -I/usr/local/include" CPPFLAGS="$CPPFLAGS -D__LINUX -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-sunos*) CFLAGS="$CFLAGS -D__SUNOS" CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) CFLAGS="$CFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" CPPFLAGS="$CPPFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" LDFLAGS="$LDFLAGS -L /usr/lib/WpdPack/Lib -L /usr/lib/SctpDrv" ;; *-tru64*) CFLAGS="$CFLAGS -D__OSF1" CPPFLAGS="$CPPFLAGS -D__OSF1" ;; esac # ==================== checks for libraries ============================= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lcurses" >&5 $as_echo_n "checking for initscr in -lcurses... " >&6; } if ${ac_cv_lib_curses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_curses_initscr=yes else ac_cv_lib_curses_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_initscr" >&5 $as_echo "$ac_cv_lib_curses_initscr" >&6; } if test "x$ac_cv_lib_curses_initscr" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCURSES 1 _ACEOF LIBS="-lcurses $LIBS" else as_fn_error $? "ncurses library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_mutex_init in -lpthread" >&5 $as_echo_n "checking for pthread_mutex_init in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_mutex_init=yes else ac_cv_lib_pthread_pthread_mutex_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_mutex_init" >&5 $as_echo "$ac_cv_lib_pthread_pthread_mutex_init" >&6; } if test "x$ac_cv_lib_pthread_pthread_mutex_init" = xyes; then : THREAD_LIBS="-lpthread" else as_fn_error $? "pthread library needed!" "$LINENO" 5 fi # For Linux and SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlerror" >&5 $as_echo_n "checking for library containing dlerror... " >&6; } if ${ac_cv_search_dlerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlerror (); int main () { return dlerror (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlerror+:} false; then : break fi done if ${ac_cv_search_dlerror+:} false; then : else ac_cv_search_dlerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlerror" >&5 $as_echo "$ac_cv_search_dlerror" >&6; } ac_res=$ac_cv_search_dlerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 $as_echo_n "checking for library containing dlsym... " >&6; } if ${ac_cv_search_dlsym+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlsym (); int main () { return dlsym (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlsym=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlsym+:} false; then : break fi done if ${ac_cv_search_dlsym+:} false; then : else ac_cv_search_dlsym=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 $as_echo "$ac_cv_search_dlsym" >&6; } ac_res=$ac_cv_search_dlsym if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For glibc pre-2.17 we need -rt { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_addr" >&5 $as_echo_n "checking for library containing inet_addr... " >&6; } if ${ac_cv_search_inet_addr+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_addr (); int main () { return inet_addr (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_addr=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_addr+:} false; then : break fi done if ${ac_cv_search_inet_addr+:} false; then : else ac_cv_search_inet_addr=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_addr" >&5 $as_echo "$ac_cv_search_inet_addr" >&6; } ac_res=$ac_cv_search_inet_addr if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntoa" >&5 $as_echo_n "checking for library containing inet_ntoa... " >&6; } if ${ac_cv_search_inet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char inet_ntoa (); int main () { return inet_ntoa (); ; return 0; } _ACEOF for ac_lib in '' nsl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_inet_ntoa=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_inet_ntoa+:} false; then : break fi done if ${ac_cv_search_inet_ntoa+:} false; then : else ac_cv_search_inet_ntoa=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntoa" >&5 $as_echo "$ac_cv_search_inet_ntoa" >&6; } ac_res=$ac_cv_search_inet_ntoa if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_init" >&5 $as_echo_n "checking for library containing pthread_mutex_init... " >&6; } if ${ac_cv_search_pthread_mutex_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_init (); int main () { return pthread_mutex_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_init+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_init+:} false; then : else ac_cv_search_pthread_mutex_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_init" >&5 $as_echo "$ac_cv_search_pthread_mutex_init" >&6; } ac_res=$ac_cv_search_pthread_mutex_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_destroy" >&5 $as_echo_n "checking for library containing pthread_mutex_destroy... " >&6; } if ${ac_cv_search_pthread_mutex_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_destroy (); int main () { return pthread_mutex_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_destroy+:} false; then : else ac_cv_search_pthread_mutex_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_destroy" >&5 $as_echo "$ac_cv_search_pthread_mutex_destroy" >&6; } ac_res=$ac_cv_search_pthread_mutex_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_lock" >&5 $as_echo_n "checking for library containing pthread_mutex_lock... " >&6; } if ${ac_cv_search_pthread_mutex_lock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_lock (); int main () { return pthread_mutex_lock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_lock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_lock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_lock+:} false; then : else ac_cv_search_pthread_mutex_lock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_lock" >&5 $as_echo "$ac_cv_search_pthread_mutex_lock" >&6; } ac_res=$ac_cv_search_pthread_mutex_lock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_mutex_unlock" >&5 $as_echo_n "checking for library containing pthread_mutex_unlock... " >&6; } if ${ac_cv_search_pthread_mutex_unlock+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_mutex_unlock (); int main () { return pthread_mutex_unlock (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_mutex_unlock=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_mutex_unlock+:} false; then : break fi done if ${ac_cv_search_pthread_mutex_unlock+:} false; then : else ac_cv_search_pthread_mutex_unlock=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_mutex_unlock" >&5 $as_echo "$ac_cv_search_pthread_mutex_unlock" >&6; } ac_res=$ac_cv_search_pthread_mutex_unlock if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_self" >&5 $as_echo_n "checking for library containing pthread_self... " >&6; } if ${ac_cv_search_pthread_self+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_self (); int main () { return pthread_self (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_self=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_self+:} false; then : break fi done if ${ac_cv_search_pthread_self+:} false; then : else ac_cv_search_pthread_self=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_self" >&5 $as_echo "$ac_cv_search_pthread_self" >&6; } ac_res=$ac_cv_search_pthread_self if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_cancel" >&5 $as_echo_n "checking for library containing pthread_cancel... " >&6; } if ${ac_cv_search_pthread_cancel+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_cancel (); int main () { return pthread_cancel (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_cancel=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_cancel+:} false; then : break fi done if ${ac_cv_search_pthread_cancel+:} false; then : else ac_cv_search_pthread_cancel=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_cancel" >&5 $as_echo "$ac_cv_search_pthread_cancel" >&6; } ac_res=$ac_cv_search_pthread_cancel if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_join" >&5 $as_echo_n "checking for library containing pthread_join... " >&6; } if ${ac_cv_search_pthread_join+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_join=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_join+:} false; then : break fi done if ${ac_cv_search_pthread_join+:} false; then : else ac_cv_search_pthread_join=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_join" >&5 $as_echo "$ac_cv_search_pthread_join" >&6; } ac_res=$ac_cv_search_pthread_join if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_init" >&5 $as_echo_n "checking for library containing pthread_attr_init... " >&6; } if ${ac_cv_search_pthread_attr_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_init (); int main () { return pthread_attr_init (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_init=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_init+:} false; then : break fi done if ${ac_cv_search_pthread_attr_init+:} false; then : else ac_cv_search_pthread_attr_init=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_init" >&5 $as_echo "$ac_cv_search_pthread_attr_init" >&6; } ac_res=$ac_cv_search_pthread_attr_init if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_setstacksize" >&5 $as_echo_n "checking for library containing pthread_attr_setstacksize... " >&6; } if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_setstacksize (); int main () { return pthread_attr_setstacksize (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_setstacksize=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : break fi done if ${ac_cv_search_pthread_attr_setstacksize+:} false; then : else ac_cv_search_pthread_attr_setstacksize=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_setstacksize" >&5 $as_echo "$ac_cv_search_pthread_attr_setstacksize" >&6; } ac_res=$ac_cv_search_pthread_attr_setstacksize if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_create" >&5 $as_echo_n "checking for library containing pthread_create... " >&6; } if ${ac_cv_search_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_create=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_create+:} false; then : break fi done if ${ac_cv_search_pthread_create+:} false; then : else ac_cv_search_pthread_create=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_create" >&5 $as_echo "$ac_cv_search_pthread_create" >&6; } ac_res=$ac_cv_search_pthread_create if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_attr_destroy" >&5 $as_echo_n "checking for library containing pthread_attr_destroy... " >&6; } if ${ac_cv_search_pthread_attr_destroy+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_attr_destroy (); int main () { return pthread_attr_destroy (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_attr_destroy=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_attr_destroy+:} false; then : break fi done if ${ac_cv_search_pthread_attr_destroy+:} false; then : else ac_cv_search_pthread_attr_destroy=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_attr_destroy" >&5 $as_echo "$ac_cv_search_pthread_attr_destroy" >&6; } ac_res=$ac_cv_search_pthread_attr_destroy if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setschedparam" >&5 $as_echo_n "checking for library containing pthread_setschedparam... " >&6; } if ${ac_cv_search_pthread_setschedparam+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setschedparam (); int main () { return pthread_setschedparam (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setschedparam=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setschedparam+:} false; then : break fi done if ${ac_cv_search_pthread_setschedparam+:} false; then : else ac_cv_search_pthread_setschedparam=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setschedparam" >&5 $as_echo "$ac_cv_search_pthread_setschedparam" >&6; } ac_res=$ac_cv_search_pthread_setschedparam if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcancelstate" >&5 $as_echo_n "checking for library containing pthread_setcancelstate... " >&6; } if ${ac_cv_search_pthread_setcancelstate+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcancelstate (); int main () { return pthread_setcancelstate (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcancelstate=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcancelstate+:} false; then : break fi done if ${ac_cv_search_pthread_setcancelstate+:} false; then : else ac_cv_search_pthread_setcancelstate=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcancelstate" >&5 $as_echo "$ac_cv_search_pthread_setcancelstate" >&6; } ac_res=$ac_cv_search_pthread_setcancelstate if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_setcanceltype" >&5 $as_echo_n "checking for library containing pthread_setcanceltype... " >&6; } if ${ac_cv_search_pthread_setcanceltype+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_setcanceltype (); int main () { return pthread_setcanceltype (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_setcanceltype=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_setcanceltype+:} false; then : break fi done if ${ac_cv_search_pthread_setcanceltype+:} false; then : else ac_cv_search_pthread_setcanceltype=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_setcanceltype" >&5 $as_echo "$ac_cv_search_pthread_setcanceltype" >&6; } ac_res=$ac_cv_search_pthread_setcanceltype if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_exit" >&5 $as_echo_n "checking for library containing pthread_exit... " >&6; } if ${ac_cv_search_pthread_exit+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_exit (); int main () { return pthread_exit (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_exit=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_exit+:} false; then : break fi done if ${ac_cv_search_pthread_exit+:} false; then : else ac_cv_search_pthread_exit=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_exit" >&5 $as_echo "$ac_cv_search_pthread_exit" >&6; } ac_res=$ac_cv_search_pthread_exit if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pthread_sigmask" >&5 $as_echo_n "checking for library containing pthread_sigmask... " >&6; } if ${ac_cv_search_pthread_sigmask+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_sigmask (); int main () { return pthread_sigmask (); ; return 0; } _ACEOF for ac_lib in '' pthread; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pthread_sigmask=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pthread_sigmask+:} false; then : break fi done if ${ac_cv_search_pthread_sigmask+:} false; then : else ac_cv_search_pthread_sigmask=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pthread_sigmask" >&5 $as_echo "$ac_cv_search_pthread_sigmask" >&6; } ac_res=$ac_cv_search_pthread_sigmask if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi #AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro #AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing floor" >&5 $as_echo_n "checking for library containing floor... " >&6; } if ${ac_cv_search_floor+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char floor (); int main () { return floor (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_floor=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_floor+:} false; then : break fi done if ${ac_cv_search_floor+:} false; then : else ac_cv_search_floor=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_floor" >&5 $as_echo "$ac_cv_search_floor" >&6; } ac_res=$ac_cv_search_floor if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pow" >&5 $as_echo_n "checking for library containing pow... " >&6; } if ${ac_cv_search_pow+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pow (); int main () { return pow (); ; return 0; } _ACEOF for ac_lib in '' m; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pow=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pow+:} false; then : break fi done if ${ac_cv_search_pow+:} false; then : else ac_cv_search_pow=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pow" >&5 $as_echo "$ac_cv_search_pow" >&6; } ac_res=$ac_cv_search_pow if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For SunOS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing htons" >&5 $as_echo_n "checking for library containing htons... " >&6; } if ${ac_cv_search_htons+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char htons (); int main () { return htons (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_htons=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_htons+:} false; then : break fi done if ${ac_cv_search_htons+:} false; then : else ac_cv_search_htons=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_htons" >&5 $as_echo "$ac_cv_search_htons" >&6; } ac_res=$ac_cv_search_htons if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing ntohs" >&5 $as_echo_n "checking for library containing ntohs... " >&6; } if ${ac_cv_search_ntohs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ntohs (); int main () { return ntohs (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_ntohs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_ntohs+:} false; then : break fi done if ${ac_cv_search_ntohs+:} false; then : else ac_cv_search_ntohs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_ntohs" >&5 $as_echo "$ac_cv_search_ntohs" >&6; } ac_res=$ac_cv_search_ntohs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing bind" >&5 $as_echo_n "checking for library containing bind... " >&6; } if ${ac_cv_search_bind+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bind (); int main () { return bind (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_bind=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_bind+:} false; then : break fi done if ${ac_cv_search_bind+:} false; then : else ac_cv_search_bind=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_bind" >&5 $as_echo "$ac_cv_search_bind" >&6; } ac_res=$ac_cv_search_bind if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing freeaddrinfo" >&5 $as_echo_n "checking for library containing freeaddrinfo... " >&6; } if ${ac_cv_search_freeaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char freeaddrinfo (); int main () { return freeaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_freeaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_freeaddrinfo+:} false; then : break fi done if ${ac_cv_search_freeaddrinfo+:} false; then : else ac_cv_search_freeaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_freeaddrinfo" >&5 $as_echo "$ac_cv_search_freeaddrinfo" >&6; } ac_res=$ac_cv_search_freeaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getaddrinfo" >&5 $as_echo_n "checking for library containing getaddrinfo... " >&6; } if ${ac_cv_search_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_getaddrinfo=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_getaddrinfo+:} false; then : break fi done if ${ac_cv_search_getaddrinfo+:} false; then : else ac_cv_search_getaddrinfo=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getaddrinfo" >&5 $as_echo "$ac_cv_search_getaddrinfo" >&6; } ac_res=$ac_cv_search_getaddrinfo if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing listen" >&5 $as_echo_n "checking for library containing listen... " >&6; } if ${ac_cv_search_listen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char listen (); int main () { return listen (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_listen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_listen+:} false; then : break fi done if ${ac_cv_search_listen+:} false; then : else ac_cv_search_listen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_listen" >&5 $as_echo "$ac_cv_search_listen" >&6; } ac_res=$ac_cv_search_listen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing recvfrom" >&5 $as_echo_n "checking for library containing recvfrom... " >&6; } if ${ac_cv_search_recvfrom+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char recvfrom (); int main () { return recvfrom (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_recvfrom=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_recvfrom+:} false; then : break fi done if ${ac_cv_search_recvfrom+:} false; then : else ac_cv_search_recvfrom=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_recvfrom" >&5 $as_echo "$ac_cv_search_recvfrom" >&6; } ac_res=$ac_cv_search_recvfrom if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing shutdown" >&5 $as_echo_n "checking for library containing shutdown... " >&6; } if ${ac_cv_search_shutdown+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shutdown (); int main () { return shutdown (); ; return 0; } _ACEOF for ac_lib in '' socket; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_shutdown=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_shutdown+:} false; then : break fi done if ${ac_cv_search_shutdown+:} false; then : else ac_cv_search_shutdown=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_shutdown" >&5 $as_echo "$ac_cv_search_shutdown" >&6; } ac_res=$ac_cv_search_shutdown if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # For Linux, SunOS and Cygwin #AC_CHECK_LIB(stdc++,main,,[AC_MSG_ERROR([stdc++ library missing])]) # Conditional build with OpenSSL if test "$openssl" = 'yes'; then # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in openssl/md5.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/md5.h" "ac_cv_header_openssl_md5_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_md5_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_MD5_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/bio.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/bio.h" "ac_cv_header_openssl_bio_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_bio_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_BIO_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/err.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/err.h" "ac_cv_header_openssl_err_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_err_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_ERR_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/rand.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/rand.h" "ac_cv_header_openssl_rand_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_rand_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_RAND_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/ssl.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_ssl_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_SSL_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in openssl/x509v3.h do : ac_fn_c_check_header_mongrel "$LINENO" "openssl/x509v3.h" "ac_cv_header_openssl_x509v3_h" "$ac_includes_default" if test "x$ac_cv_header_openssl_x509v3_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_OPENSSL_X509V3_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_library_init in -lssl" >&5 $as_echo_n "checking for SSL_library_init in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_library_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char SSL_library_init (); int main () { return SSL_library_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_library_init=yes else ac_cv_lib_ssl_SSL_library_init=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_SSL_library_init" >&5 $as_echo "$ac_cv_lib_ssl_SSL_library_init" >&6; } if test "x$ac_cv_lib_ssl_SSL_library_init" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBSSL 1 _ACEOF LIBS="-lssl $LIBS" else as_fn_error $? "ssl library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CRYPTO_num_locks in -lcrypto" >&5 $as_echo_n "checking for CRYPTO_num_locks in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_CRYPTO_num_locks+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char CRYPTO_num_locks (); int main () { return CRYPTO_num_locks (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_CRYPTO_num_locks=yes else ac_cv_lib_crypto_CRYPTO_num_locks=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_CRYPTO_num_locks" >&5 $as_echo "$ac_cv_lib_crypto_CRYPTO_num_locks" >&6; } if test "x$ac_cv_lib_crypto_CRYPTO_num_locks" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBCRYPTO 1 _ACEOF LIBS="-lcrypto $LIBS" else as_fn_error $? "crypto library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$openssl" = "yes"; then HAVE_OPENSSL_TRUE= HAVE_OPENSSL_FALSE='#' else HAVE_OPENSSL_TRUE='#' HAVE_OPENSSL_FALSE= fi # Conditional build with SCTP if test "$sctp" = 'yes'; then for ac_header in netinet/sctp.h do : ac_fn_c_check_header_mongrel "$LINENO" "netinet/sctp.h" "ac_cv_header_netinet_sctp_h" "$ac_includes_default" if test "x$ac_cv_header_netinet_sctp_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_NETINET_SCTP_H 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&5 $as_echo "$as_me: WARNING: header missing, but this is acceptable on Mac OS X Lion" >&2;} fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_send" >&5 $as_echo_n "checking for library containing sctp_send... " >&6; } if ${ac_cv_search_sctp_send+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_send (); int main () { return sctp_send (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_send=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_send+:} false; then : break fi done if ${ac_cv_search_sctp_send+:} false; then : else ac_cv_search_sctp_send=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_send" >&5 $as_echo "$ac_cv_search_sctp_send" >&6; } ac_res=$ac_cv_search_sctp_send if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_freepaddrs" >&5 $as_echo_n "checking for library containing sctp_freepaddrs... " >&6; } if ${ac_cv_search_sctp_freepaddrs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_freepaddrs (); int main () { return sctp_freepaddrs (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_freepaddrs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_freepaddrs+:} false; then : break fi done if ${ac_cv_search_sctp_freepaddrs+:} false; then : else ac_cv_search_sctp_freepaddrs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_freepaddrs" >&5 $as_echo "$ac_cv_search_sctp_freepaddrs" >&6; } ac_res=$ac_cv_search_sctp_freepaddrs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_bindx" >&5 $as_echo_n "checking for library containing sctp_bindx... " >&6; } if ${ac_cv_search_sctp_bindx+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_bindx (); int main () { return sctp_bindx (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_bindx=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_bindx+:} false; then : break fi done if ${ac_cv_search_sctp_bindx+:} false; then : else ac_cv_search_sctp_bindx=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_bindx" >&5 $as_echo "$ac_cv_search_sctp_bindx" >&6; } ac_res=$ac_cv_search_sctp_bindx if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sctp_recvmsg" >&5 $as_echo_n "checking for library containing sctp_recvmsg... " >&6; } if ${ac_cv_search_sctp_recvmsg+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sctp_recvmsg (); int main () { return sctp_recvmsg (); ; return 0; } _ACEOF for ac_lib in '' sctp sctpsp; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sctp_recvmsg=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sctp_recvmsg+:} false; then : break fi done if ${ac_cv_search_sctp_recvmsg+:} false; then : else ac_cv_search_sctp_recvmsg=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sctp_recvmsg" >&5 $as_echo "$ac_cv_search_sctp_recvmsg" >&6; } ac_res=$ac_cv_search_sctp_recvmsg if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "SCTP library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$sctp" = "yes"; then HAVE_SCTP_TRUE= HAVE_SCTP_FALSE='#' else HAVE_SCTP_TRUE='#' HAVE_SCTP_FALSE= fi # Conditional build with pcap if test "$pcap" = 'yes'; then for ac_header in pcap.h do : ac_fn_c_check_header_mongrel "$LINENO" "pcap.h" "ac_cv_header_pcap_h" "$ac_includes_default" if test "x$ac_cv_header_pcap_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_PCAP_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_open_offline" >&5 $as_echo_n "checking for library containing pcap_open_offline... " >&6; } if ${ac_cv_search_pcap_open_offline+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_open_offline (); int main () { return pcap_open_offline (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_open_offline=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_open_offline+:} false; then : break fi done if ${ac_cv_search_pcap_open_offline+:} false; then : else ac_cv_search_pcap_open_offline=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_open_offline" >&5 $as_echo "$ac_cv_search_pcap_open_offline" >&6; } ac_res=$ac_cv_search_pcap_open_offline if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_next" >&5 $as_echo_n "checking for library containing pcap_next... " >&6; } if ${ac_cv_search_pcap_next+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next (); int main () { return pcap_next (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_next=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_next+:} false; then : break fi done if ${ac_cv_search_pcap_next+:} false; then : else ac_cv_search_pcap_next=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_next" >&5 $as_echo "$ac_cv_search_pcap_next" >&6; } ac_res=$ac_cv_search_pcap_next if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing pcap_close" >&5 $as_echo_n "checking for library containing pcap_close... " >&6; } if ${ac_cv_search_pcap_close+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_close (); int main () { return pcap_close (); ; return 0; } _ACEOF for ac_lib in '' pcap wpcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_pcap_close=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_pcap_close+:} false; then : break fi done if ${ac_cv_search_pcap_close+:} false; then : else ac_cv_search_pcap_close=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_pcap_close" >&5 $as_echo "$ac_cv_search_pcap_close" >&6; } ac_res=$ac_cv_search_pcap_close if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" else as_fn_error $? "pcap library missing" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pcap_next_ex in -lpcap" >&5 $as_echo_n "checking for pcap_next_ex in -lpcap... " >&6; } if ${ac_cv_lib_pcap_pcap_next_ex+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpcap $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pcap_next_ex (); int main () { return pcap_next_ex (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pcap_pcap_next_ex=yes else ac_cv_lib_pcap_pcap_next_ex=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_pcap_next_ex" >&5 $as_echo "$ac_cv_lib_pcap_pcap_next_ex" >&6; } if test "x$ac_cv_lib_pcap_pcap_next_ex" = xyes; then : $as_echo "@%:@define HAVE_PCAP_NEXT_EX 1" >>confdefs.h fi fi # For Makefile.am if test "$pcap" = "yes"; then HAVE_PCAP_TRUE= HAVE_PCAP_FALSE='#' else HAVE_PCAP_TRUE='#' HAVE_PCAP_FALSE= fi if test "$rtp" = "yes"; then HAVE_RTP_TRUE= HAVE_RTP_FALSE='#' else HAVE_RTP_TRUE='#' HAVE_RTP_FALSE= fi # Conditional build with pcap if test "$gsl" = 'yes'; then for ac_header in gsl/gsl_randist.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_randist.h" "ac_cv_header_gsl_gsl_randist_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_randist_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_RANDIST_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_rng.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_rng.h" "ac_cv_header_gsl_gsl_rng_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_rng_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_RNG_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done for ac_header in gsl/gsl_cdf.h do : ac_fn_c_check_header_mongrel "$LINENO" "gsl/gsl_cdf.h" "ac_cv_header_gsl_gsl_cdf_h" "$ac_includes_default" if test "x$ac_cv_header_gsl_gsl_cdf_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSL_GSL_CDF_H 1 _ACEOF else as_fn_error $? " header missing" "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_dgemm=yes else ac_cv_lib_gslcblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_rng_alloc in -lgsl" >&5 $as_echo_n "checking for gsl_rng_alloc in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_rng_alloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_rng_alloc (); int main () { return gsl_rng_alloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_rng_alloc=yes else ac_cv_lib_gsl_gsl_rng_alloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_rng_alloc" >&5 $as_echo "$ac_cv_lib_gsl_gsl_rng_alloc" >&6; } if test "x$ac_cv_lib_gsl_gsl_rng_alloc" = xyes; then : GSL_CFLAGS=`pkg-config gsl --cflags` GSL_CXXFLAGS=`pkg-config gsl --cflags` GSL_LIBS=`pkg-config gsl --libs` else as_fn_error $? "gsl library missing" "$LINENO" 5 fi fi # For Makefile.am if test "$gsl" = "yes"; then HAVE_GSL_TRUE= HAVE_GSL_FALSE='#' else HAVE_GSL_TRUE='#' HAVE_GSL_FALSE= fi if test "$epoll" = 'yes'; then ax_have_epoll_cppflags="${CPPFLAGS}" ac_fn_c_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default" if test "x$ac_cv_header_linux_version_h" = xyes; then : CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(7) interface" >&5 $as_echo_n "checking for Linux epoll(7) interface... " >&6; } if ${ax_cv_have_epoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif int main () { int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ax_cv_have_epoll=yes else ax_cv_have_epoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="${ax_have_epoll_cppflags}" if test "${ax_cv_have_epoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ax_config_feature_epoll=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ax_config_feature_epoll=no fi @%:@ Check whether --enable-epoll was given. if test "${enable_epoll+set}" = set; then : enableval=$enable_epoll; case "${enableval}" in yes) ax_config_feature_epoll="yes" ;; no) ax_config_feature_epoll="no" ;; *) as_fn_error $? "bad value ${enableval} for feature --epoll" "$LINENO" 5 ;; esac fi if test "$ax_config_feature_epoll" = yes; then : $as_echo "@%:@define HAVE_EPOLL 1" >>confdefs.h epoll="yes" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is enabled" >&5 $as_echo "$as_me: Feature epoll is enabled" >&6;} fi else epoll="no" if test "$ax_config_feature_verbose" = yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: Feature epoll is disabled" >&5 $as_echo "$as_me: Feature epoll is disabled" >&6;} fi fi fi if test "$epoll" = "yes"; then HAVE_EPOLL_TRUE= HAVE_EPOLL_FALSE='#' else HAVE_EPOLL_TRUE='#' HAVE_EPOLL_FALSE= fi # ==================== checks for header files ========================== ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "@%:@define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF @%:@define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # ===== checks for typedefs, structures and compiler characteristics ==== { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "@%:@define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define pid_t int _ACEOF fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define size_t unsigned int _ACEOF fi ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF @%:@define ssize_t int _ACEOF fi # These conflict with netinet/in.h typedefs. #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT8_T # ==================== checks for library functions ===================== for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "@%:@define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "@%:@define HAVE_WORKING_FORK 1" >>confdefs.h fi #AC_FUNC_MALLOC #AC_FUNC_REALLOC #AC_FUNC_STRTOD for ac_func in alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # ==================== check for clang/gmock workaround ================= # clang++ falls over the use of is_default_constructible, suggesting # is_nothrow_constructible instead. # # ./gmock/include/gmock/gmock-actions.h:107:19: error: no template named # 'is_default_constructible' in namespace 'std'; did you mean # 'is_nothrow_constructible'? # T, ::std::is_default_constructible::value>::Get(); # ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # is_nothrow_constructible # /usr/include/c++/4.6/type_traits:705:12: note: # 'is_nothrow_constructible' declared here # ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_success=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports is_default_constructible (used by gmock)" >&5 $as_echo_n "checking whether $CXX supports is_default_constructible (used by gmock)... " >&6; } if ${ax_cv_cxx_has_is_default_constructible+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ax_cv_cxx_has_is_default_constructible=yes else ax_cv_cxx_has_is_default_constructible=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_has_is_default_constructible" >&5 $as_echo "$ax_cv_cxx_has_is_default_constructible" >&6; } if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # ==================== generate files =================================== ac_config_files="$ac_config_files Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${HAVE_HELP2MAN_TRUE}" && test -z "${HAVE_HELP2MAN_FALSE}"; then as_fn_error $? "conditional \"HAVE_HELP2MAN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SCTP_TRUE}" && test -z "${HAVE_SCTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_SCTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PCAP_TRUE}" && test -z "${HAVE_PCAP_FALSE}"; then as_fn_error $? "conditional \"HAVE_PCAP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_RTP_TRUE}" && test -z "${HAVE_RTP_FALSE}"; then as_fn_error $? "conditional \"HAVE_RTP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_GSL_TRUE}" && test -z "${HAVE_GSL_FALSE}"; then as_fn_error $? "conditional \"HAVE_GSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EPOLL_TRUE}" && test -z "${HAVE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_EPOLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? to STATUS, without forking. as_fn_set_status () { return $1 } @%:@ as_fn_set_status @%:@ as_fn_exit STATUS @%:@ ----------------- @%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } @%:@ as_fn_exit @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by SIPp $as_me see-include/version.h, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ SIPp config.status see-include/version.h configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "include/config.h") CONFIG_HEADERS="$CONFIG_HEADERS include/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then if $AWK 'BEGIN { getline <"/dev/null" }' /dev/null; then ac_cs_awk_getline=: ac_cs_awk_pipe_init= ac_cs_awk_read_file=' while ((getline aline < (F[key])) > 0) print(aline) close(F[key])' ac_cs_awk_pipe_fini= else ac_cs_awk_getline=false ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" ac_cs_awk_read_file=' print "|#_!!_#|" print "cat " F[key] " &&" '$ac_cs_awk_pipe_init # The final `:' finishes the AND list. ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' fi ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF # Create commands to substitute file output variables. { echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && echo "$ac_subst_files" | sed 's/.*/F@<:@"&"@:>@="$&"/' && echo "_ACAWK" && echo "_ACEOF" } >conf$$files.sh && . ./conf$$files.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 rm -f conf$$files.sh { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" \$ac_cs_awk_pipe_init } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } if (nfields == 3 && !substed) { key = field[2] if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { \$ac_cs_awk_read_file next } } print line } \$ac_cs_awk_pipe_fini _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | if $ac_cs_awk_getline; then $AWK -f "$ac_tmp/subs.awk" else $AWK -f "$ac_tmp/subs.awk" | $SHELL fi \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi sipp-3.5.1/autom4te.cache/requests0000644000175000017500000001712012672463320016135 0ustar vsevavseva# This file was generated by Autom4te Thu Apr 10 10:06:43 UTC 2014. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', '-', '/usr/local/share/aclocal-1.13/internal/ac-config-macro-dirs.m4', '/usr/local/share/aclocal-1.13/amversion.m4', '/usr/local/share/aclocal-1.13/auxdir.m4', '/usr/local/share/aclocal-1.13/cond.m4', '/usr/local/share/aclocal-1.13/depend.m4', '/usr/local/share/aclocal-1.13/depout.m4', '/usr/local/share/aclocal-1.13/init.m4', '/usr/local/share/aclocal-1.13/install-sh.m4', '/usr/local/share/aclocal-1.13/lead-dot.m4', '/usr/local/share/aclocal-1.13/make.m4', '/usr/local/share/aclocal-1.13/missing.m4', '/usr/local/share/aclocal-1.13/options.m4', '/usr/local/share/aclocal-1.13/runlog.m4', '/usr/local/share/aclocal-1.13/sanity.m4', '/usr/local/share/aclocal-1.13/silent.m4', '/usr/local/share/aclocal-1.13/strip.m4', '/usr/local/share/aclocal-1.13/substnot.m4', '/usr/local/share/aclocal-1.13/tar.m4', 'configure.ac' ], { '_AM_CONFIG_MACRO_DIRS' => 1, 'AC_CONFIG_MACRO_DIR_TRACE' => 1, 'AX_CXX_HAS_IS_DEFAULT_CONSTRUCTIBLE' => 1, 'AM_SET_DEPDIR' => 1, 'AM_CONDITIONAL' => 1, '_AM_DEPENDENCIES' => 1, 'AU_DEFUN' => 1, 'AX_CONFIG_FEATURE_VERBOSE' => 1, 'AM_RUN_LOG' => 1, '_AM_SUBST_NOTMAKE' => 1, '_m4_warn' => 1, 'AX_CONFIG_FEATURE_SILENT' => 1, 'AX_HAVE_EPOLL_PWAIT' => 1, 'AX_CONFIG_FEATURE_DISABLE' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'AM_MISSING_PROG' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'm4_pattern_allow' => 1, 'AM_MISSING_HAS_RUN' => 1, 'AX_CXX_COMPILE_STDCXX_11' => 1, 'AM_PROG_INSTALL_STRIP' => 1, 'AM_AUX_DIR_EXPAND' => 1, 'AM_SILENT_RULES' => 1, 'AX_CONFIG_FEATURE' => 1, 'AM_DEP_TRACK' => 1, 'AM_SET_LEADING_DOT' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, '_AM_AUTOCONF_VERSION' => 1, '_AM_PROG_TAR' => 1, 'AM_PROG_INSTALL_SH' => 1, 'include' => 1, 'AM_MAKE_INCLUDE' => 1, '_AM_MANGLE_OPTION' => 1, 'AC_DEFUN_ONCE' => 1, 'AX_HAVE_EPOLL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AX_CONFIG_FEATURE_DEFAULT_ENABLED' => 1, 'AX_CHECK_COMPILE_FLAG' => 1, 'AX_CONFIG_FEATURE_ENABLE' => 1, '_AM_SET_OPTIONS' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, 'AM_SANITY_CHECK' => 1, 'm4_include' => 1, 'm4_pattern_forbid' => 1, 'AC_CONFIG_MACRO_DIR' => 1, 'AX_CONFIG_FEATURE_DEFAULT_DISABLED' => 1, 'AM_SUBST_NOTMAKE' => 1, '_AM_SET_OPTION' => 1, '_AM_IF_OPTION' => 1, 'AC_DEFUN' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.ac' ], { 'm4_pattern_allow' => 1, 'AM_PROG_AR' => 1, 'AM_SILENT_RULES' => 1, 'sinclude' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, 'AC_FC_PP_SRCEXT' => 1, 'AM_XGETTEXT_OPTION' => 1, 'AM_PROG_FC_C_O' => 1, '_AM_MAKEFILE_INCLUDE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_POT_TOOLS' => 1, 'AC_CANONICAL_BUILD' => 1, 'AM_GNU_GETTEXT' => 1, 'AM_PROG_CC_C_O' => 1, 'AM_CONDITIONAL' => 1, '_AM_COND_ENDIF' => 1, 'LT_INIT' => 1, 'AM_PROG_MKDIR_P' => 1, 'AC_PROG_LIBTOOL' => 1, '_AM_SUBST_NOTMAKE' => 1, '_m4_warn' => 1, 'AC_FC_FREEFORM' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_PROG_F77_C_O' => 1, 'AM_PATH_GUILE' => 1, '_AM_COND_IF' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AM_AUTOMAKE_VERSION' => 1, '_LT_AC_TAGCONFIG' => 1, 'AM_PROG_CXX_C_O' => 1, 'AM_MAKEFILE_INCLUDE' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AC_CONFIG_LINKS' => 1, 'AM_MAINTAINER_MODE' => 1, 'm4_include' => 1, 'AC_LIBSOURCE' => 1, 'm4_pattern_forbid' => 1, 'AH_OUTPUT' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'AM_PROG_MOC' => 1, 'AC_CONFIG_FILES' => 1, 'AM_NLS' => 1, 'AM_EXTRA_RECURSIVE_TARGETS' => 1, 'AC_INIT' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'AC_FC_SRCEXT' => 1, 'AC_SUBST' => 1, 'AC_CANONICAL_TARGET' => 1, 'LT_SUPPORTED_TAG' => 1, 'AC_CONFIG_HEADERS' => 1, 'm4_sinclude' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'include' => 1, 'AC_CANONICAL_HOST' => 1, '_AM_COND_ELSE' => 1, 'AC_FC_PP_DEFINE' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_SUBST_TRACE' => 1 } ], 'Autom4te::Request' ) ); sipp-3.5.1/THANKS0000644000175000017500000000173412672462535012461 0ustar vsevavsevaThe following people have contributed code or other elements to SIPp: Richard Gayraud Marc Lamberton Olivier Jacques Herve Pellan David Mansutti Francois-Xavier Kowalski Gerard Lyonnaz Francois Draperi F. Tarek Rogers Peter Higginson Vincent Luba Shriram Natarajan Guillaume Teissier Clement Chen Wolfgang Beck Charles P Wright Martin Van Leeuwen Andy Aicken Michael Hirschbichler Rob Day Dmitry Semyonov Jordan Walbesser Ken Crowell Peter Lemenkov Menyus Hegedűs Mitko Mitev Matt Williams Richard Brady Natanael Copa Walter Doekes (OSSO B.V.) Simon Gomizelj (Sangoma) Peter Wu Ben Langfeld Richard van den Berg Mustafa Kocaturk Konstantin S. Vishnivetsky SIPp also uses code originally by Aaron Turner (send_packets.c) and L Peter Deutsch (md5.c). The following people have contributed to SIPp in other useful ways (bug reports, testing, etc.): Paul Belanger Jan Stanek Enrico Hartung Daniel Swärd Paul D Smith Ferenc Wágner Carlo R. Carrano Kayode Olajide Daniel Goepp Vijay Goje sipp-3.5.1/missing0000755000175000017500000001533112672463320013134 0ustar vsevavseva#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: sipp-3.5.1/config.sub0000755000175000017500000010530112672463320013515 0ustar vsevavseva#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-04-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: sipp-3.5.1/configure.ac0000644000175000017500000002476312672462535014043 0ustar vsevavseva# ======================== initialization =============================== AC_INIT([SIPp], [see-include/version.h], [sipp-users@lists.sourceforge.net], [sipp]) # Load non-standard m4 files from ./m4/*.m4. # AC_CONFIG_MACRO_DIR([m4]) does not work on pre-1.13 aclocal, so we # have to include all files by hand. m4_include([m4/am_git_version.m4]) m4_include([m4/ax_check_compile_flag.m4]) m4_include([m4/ax_config_feature.m4]) m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) m4_include([m4/ax_have_epoll.m4]) AC_CANONICAL_TARGET AC_CONFIG_SRCDIR([src/sipp.cpp]) AC_CONFIG_HEADERS([include/config.h]) AM_INIT_AUTOMAKE([foreign subdir-objects]) AC_ARG_WITH([openssl],AC_HELP_STRING([--with-openssl], [build with OpenSSL support]), [openssl="$withval"],[openssl="no"]) AC_ARG_WITH([pcap],AC_HELP_STRING([--with-pcap], [build with pcap support]), [pcap="$withval"],[pcap="no"]) AC_ARG_WITH([sctp],AC_HELP_STRING([--with-sctp], [build with SCTP support]), [sctp="$withval"],[sctp="no"]) AC_ARG_WITH([gsl],AC_HELP_STRING([--with-gsl], [build with GSL (GNU Scientific Library) support]), [gsl="$withval"],[gsl="no"]) AC_ARG_WITH([rtpstream],AC_HELP_STRING([--without-rtpstream], [build without RTP streaming support]), [rtp="$withval"],[rtp="yes"]) AC_ARG_ENABLE([epoll], AC_HELP_STRING([--enable-epoll], [build with epoll backend]), [case "$enableval" in yes | no) epoll="$enableval" ;; *) AC_MSG_ERROR(bad value $enableval for --enable-epoll) ;; esac], [epoll="yes"]) AC_PATH_PROG([HELP2MAN], help2man) AM_CONDITIONAL([HAVE_HELP2MAN], [test -n "$HELP2MAN"]) if test x"$HELP2MAN" = x; then AC_MSG_WARN([cannot find help2man, you will not be able to generate manpages]) fi # ==================== basic compiler settings ========================== AC_PROG_CC AC_PROG_CXX AC_HEADER_STDC # Prefer ext (gnu++11) over noext (c++11) because on some platforms the # noext (stricter) mode disables non-posix features like stdio fileno(). AX_CXX_COMPILE_STDCXX_11(ext,optional) AX_CHECK_COMPILE_FLAG([-std=gnu11], [CFLAGS+=" -std=gnu11"], []) case "$host" in *-linux*) CFLAGS="$CFLAGS -D__LINUX" CPPFLAGS="$CPPFLAGS -D__LINUX" ;; *-darwin*) CFLAGS="$CFLAGS -D__DARWIN" CPPFLAGS="$CPPFLAGS -D__DARWIN" ;; *-hpux*) CFLAGS="$CFLAGS -D__HPUX" CPPFLAGS="$CPPFLAGS -D__HPUX" ;; *-freebsd*) CFLAGS="$CFLAGS -D__LINUX -I/usr/local/include" CPPFLAGS="$CPPFLAGS -D__LINUX -I/usr/local/include" LDFLAGS="$LDFLAGS -L/usr/local/lib" ;; *-sunos*) CFLAGS="$CFLAGS -D__SUNOS" CPPFLAGS="$CPPFLAGS -D__SUNOS" ;; *-cygwin*) CFLAGS="$CFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" CPPFLAGS="$CPPFLAGS -D__CYGWIN -I /usr/include/ncurses -I /usr/lib/WpdPack/Include -I /usr/include/SctpDrv" LDFLAGS="$LDFLAGS -L /usr/lib/WpdPack/Lib -L /usr/lib/SctpDrv" ;; *-tru64*) CFLAGS="$CFLAGS -D__OSF1" CPPFLAGS="$CPPFLAGS -D__OSF1" ;; esac # ==================== checks for libraries ============================= AC_CHECK_LIB(curses,initscr,,[AC_MSG_ERROR([ncurses library missing])]) AC_CHECK_LIB(pthread, pthread_mutex_init, THREAD_LIBS="-lpthread", AC_MSG_ERROR(pthread library needed!)) # For Linux and SunOS AC_SEARCH_LIBS([dlopen], [dl]) AC_SEARCH_LIBS([dlerror], [dl]) AC_SEARCH_LIBS([dlsym], [dl]) # For glibc pre-2.17 we need -rt AC_SEARCH_LIBS([clock_gettime], [rt]) # For SunOS AC_SEARCH_LIBS([inet_addr], [nsl]) AC_SEARCH_LIBS([inet_ntoa], [nsl]) AC_SEARCH_LIBS([pthread_mutex_init], [pthread]) AC_SEARCH_LIBS([pthread_mutex_destroy], [pthread]) AC_SEARCH_LIBS([pthread_mutex_lock], [pthread]) AC_SEARCH_LIBS([pthread_mutex_unlock], [pthread]) AC_SEARCH_LIBS([pthread_self], [pthread]) AC_SEARCH_LIBS([pthread_cancel], [pthread]) AC_SEARCH_LIBS([pthread_join], [pthread]) AC_SEARCH_LIBS([pthread_attr_init], [pthread]) AC_SEARCH_LIBS([pthread_attr_setstacksize], [pthread]) AC_SEARCH_LIBS([pthread_create], [pthread]) AC_SEARCH_LIBS([pthread_attr_destroy], [pthread]) AC_SEARCH_LIBS([pthread_setschedparam], [pthread]) AC_SEARCH_LIBS([pthread_setcancelstate], [pthread]) AC_SEARCH_LIBS([pthread_setcanceltype], [pthread]) AC_SEARCH_LIBS([pthread_exit], [pthread]) AC_SEARCH_LIBS([pthread_sigmask], [pthread]) #AC_SEARCH_LIBS([pthread_cleanup_push], [pthread]) <- macro #AC_SEARCH_LIBS([pthread_cleanup_pop], [pthread]) <- macro AC_SEARCH_LIBS([floor], [m]) AC_SEARCH_LIBS([pow], [m]) # For SunOS AC_SEARCH_LIBS([htons], [socket]) AC_SEARCH_LIBS([ntohs], [socket]) AC_SEARCH_LIBS([bind], [socket]) AC_SEARCH_LIBS([freeaddrinfo], [socket]) AC_SEARCH_LIBS([getaddrinfo], [socket]) AC_SEARCH_LIBS([listen], [socket]) AC_SEARCH_LIBS([recvfrom], [socket]) AC_SEARCH_LIBS([shutdown], [socket]) # For Linux, SunOS and Cygwin #AC_CHECK_LIB(stdc++,main,,[AC_MSG_ERROR([stdc++ library missing])]) # Conditional build with OpenSSL if test "$openssl" = 'yes'; then AC_CHECK_HEADERS([openssl/md5.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([openssl/bio.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([openssl/err.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([openssl/rand.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([openssl/ssl.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([openssl/x509v3.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_LIB([ssl], [SSL_library_init],,[AC_MSG_ERROR([ssl library missing])]) AC_CHECK_LIB([crypto], [CRYPTO_num_locks],,[AC_MSG_ERROR([crypto library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_OPENSSL, test "$openssl" = "yes") # Conditional build with SCTP if test "$sctp" = 'yes'; then AC_CHECK_HEADERS([netinet/sctp.h],,[AC_MSG_WARN([ header missing, but this is acceptable on Mac OS X Lion])]) AC_SEARCH_LIBS([sctp_send],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) AC_SEARCH_LIBS([sctp_freepaddrs],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) AC_SEARCH_LIBS([sctp_bindx],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) AC_SEARCH_LIBS([sctp_recvmsg],[sctp sctpsp],,[AC_MSG_ERROR([SCTP library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_SCTP, test "$sctp" = "yes") # Conditional build with pcap if test "$pcap" = 'yes'; then AC_CHECK_HEADERS([pcap.h],,[AC_MSG_ERROR([ header missing])]) AC_SEARCH_LIBS([pcap_open_offline],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) AC_SEARCH_LIBS([pcap_next],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) AC_SEARCH_LIBS([pcap_close],[pcap wpcap],,[AC_MSG_ERROR([pcap library missing])]) AC_CHECK_LIB([pcap],[pcap_next_ex],AC_DEFINE([HAVE_PCAP_NEXT_EX],[1],[Define to 1 if libpcap has the pcap_next_ex function.])) fi # For Makefile.am AM_CONDITIONAL(HAVE_PCAP, test "$pcap" = "yes") AM_CONDITIONAL(HAVE_RTP, test "$rtp" = "yes") # Conditional build with pcap if test "$gsl" = 'yes'; then AC_CHECK_HEADERS([gsl/gsl_randist.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([gsl/gsl_rng.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_HEADERS([gsl/gsl_cdf.h],,[AC_MSG_ERROR([ header missing])]) AC_CHECK_LIB([m],[cos]) AC_CHECK_LIB([gslcblas], [cblas_dgemm]) AC_CHECK_LIB([gsl], [gsl_rng_alloc], [ GSL_CFLAGS=`pkg-config gsl --cflags` GSL_CXXFLAGS=`pkg-config gsl --cflags` GSL_LIBS=`pkg-config gsl --libs` AC_SUBST([GSL_CFLAGS]) AC_SUBST([GSL_CXXFLAGS]) AC_SUBST([GSL_LIBS]) ] ,[AC_MSG_ERROR([gsl library missing])]) fi # For Makefile.am AM_CONDITIONAL(HAVE_GSL, test "$gsl" = "yes") if test "$epoll" = 'yes'; then AX_HAVE_EPOLL([AX_CONFIG_FEATURE_ENABLE(epoll)], [AX_CONFIG_FEATURE_DISABLE(epoll)]) AX_CONFIG_FEATURE([epoll], [This platform supports epoll(7)], [HAVE_EPOLL], [This platform supports epoll(7).], [epoll="yes"], [epoll="no"]) fi AM_CONDITIONAL(HAVE_EPOLL, test "$epoll" = "yes") # ==================== checks for header files ========================== AC_FUNC_ALLOCA AC_CHECK_HEADERS([arpa/inet.h fcntl.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) # ===== checks for typedefs, structures and compiler characteristics ==== AC_HEADER_STDBOOL AC_C_INLINE AC_TYPE_PID_T AC_TYPE_SIZE_T AC_TYPE_SSIZE_T # These conflict with netinet/in.h typedefs. #AC_TYPE_UINT16_T #AC_TYPE_UINT32_T #AC_TYPE_UINT8_T # ==================== checks for library functions ===================== AC_FUNC_FORK #AC_FUNC_MALLOC #AC_FUNC_REALLOC #AC_FUNC_STRTOD AC_CHECK_FUNCS([alarm dup2 floor gethostname gettimeofday inet_ntoa memmove memset pow regcomp socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strrchr strstr strtol strtoul strtoull]) # ==================== check for clang/gmock workaround ================= # clang++ falls over the use of is_default_constructible, suggesting # is_nothrow_constructible instead. # # ./gmock/include/gmock/gmock-actions.h:107:19: error: no template named # 'is_default_constructible' in namespace 'std'; did you mean # 'is_nothrow_constructible'? # T, ::std::is_default_constructible::value>::Get(); # ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ # is_nothrow_constructible # /usr/include/c++/4.6/type_traits:705:12: note: # 'is_nothrow_constructible' declared here # AC_DEFUN([AX_CXX_HAS_IS_DEFAULT_CONSTRUCTIBLE], [dnl AC_LANG_PUSH([C++])dnl ac_success=no AC_CACHE_CHECK(whether $CXX supports is_default_constructible (used by gmock), ax_cv_cxx_has_is_default_constructible, [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include template void test_is_default_constructible() { static_assert(std::is_default_constructible::value, ""); } int main() { test_is_default_constructible(); return 0; } ])], [ax_cv_cxx_has_is_default_constructible=yes], [ax_cv_cxx_has_is_default_constructible=no])]) if test x$ax_cv_cxx_has_is_default_constructible = xno; then CPPFLAGS="$CPPFLAGS -Dis_default_constructible=is_nothrow_constructible" fi AC_LANG_POP([C++]) ]) AX_CXX_HAS_IS_DEFAULT_CONSTRUCTIBLE() # ==================== generate files =================================== AC_CONFIG_FILES([Makefile]) AC_OUTPUT sipp-3.5.1/include/0000755000175000017500000000000012672463443013163 5ustar vsevavsevasipp-3.5.1/include/infile.hpp0000644000175000017500000000336512672462535015152 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #ifndef __FILECONTENTS__ #define __FILECONTENTS__ #include class FileContents { public: FileContents(const char *file); int getLine(int line, char *dest, int len); int getField(int line, int field, char *dest, int len); int numLines(); int nextLine(int userId); void dump(); void index(int field); int lookup(char *key); void insert(char *value); void replace(int line, char *value); private: void reIndex(int line); void deIndex(int line); typedef enum { InputFileSequentialOrder = 0, InputFileRandomOrder, InputFileUser } InputFileUsage; int usage; int lineCounter; std::vector fileLines; const char *fileName; bool printfFile; int printfOffset; int printfMultiple; int numLinesInFile; int realLinesInFile; int indexField; str_int_map *indexMap; }; #endif sipp-3.5.1/include/sipp.10000644000175000017500000004611312672463443014225 0ustar vsevavseva.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.44.1. .TH SIPP "1" "March 2016" "sipp " "User Commands" .SH NAME sipp \- SIP testing tool and traffic generator .SH DESCRIPTION Usage: .IP sipp remote_host[:remote_port] [options] .PP Example: .IP Run SIPp with embedded server (uas) scenario: .IP \&./sipp \fB\-sn\fR uas .IP On the same host, run SIPp with embedded client (uac) scenario: .IP \&./sipp \fB\-sn\fR uac 127.0.0.1 .IP Available options: .PP *** Scenario file options: .TP \fB\-sd\fR : Dumps a default scenario (embedded in the SIPp executable) .TP \fB\-sf\fR : Loads an alternate XML scenario file. To learn more about XML scenario syntax, use the \fB\-sd\fR option to dump embedded scenarios. They contain all the necessary help. .TP \fB\-oocsf\fR : Load out\-of\-call scenario. .TP \fB\-oocsn\fR : Load out\-of\-call scenario. .TP \fB\-sn\fR : Use a default scenario (embedded in the SIPp executable). If this option is omitted, the Standard SipStone UAC scenario is loaded. Available values in this version: .TP \- 'uac' : Standard SipStone UAC (default). .TP \- 'uas' : Simple UAS responder. .TP \- 'regexp' : Standard SipStone UAC \- with regexp and variables. .TP \- 'branchc' : Branching and conditional branching in scenarios \- client. .TP \- 'branchs' : Branching and conditional branching in scenarios \- server. .IP Default 3pcc scenarios (see \fB\-3pcc\fR option): .IP \- '3pcc\-C\-A' : Controller A side (must be started after all other 3pcc .IP scenarios) .IP \- '3pcc\-C\-B' : Controller B side. \- '3pcc\-A' : A side. \- '3pcc\-B' : B side. .PP *** IP, port and protocol options: .TP \fB\-t\fR : Set the transport mode: \- u1: UDP with one socket (default), \- un: UDP with one socket per call, \- ui: UDP with one socket per IP address. The IP addresses must be defined .IP in the injection file. .IP \- t1: TCP with one socket, \- tn: TCP with one socket per call, \- l1: TLS with one socket, \- ln: TLS with one socket per call, \- s1: SCTP with one socket, \- sn: SCTP with one socket per call, \- c1: u1 + compression (only if compression plugin loaded), \- cn: un + compression (only if compression plugin loaded). This plugin is .IP not provided with SIPp. .TP \fB\-i\fR : Set the local IP address for 'Contact:','Via:', and 'From:' headers. Default is primary host IP address. .TP \fB\-p\fR : Set the local port number. Default is a random free port chosen by the system. .TP \fB\-bind_local\fR : Bind socket to local IP address, i.e. the local IP address is used as the source IP address. If SIPp runs in server mode it will only listen on the local IP address instead of all IP addresses. .TP \fB\-ci\fR : Set the local control IP address .TP \fB\-cp\fR : Set the local control port number. Default is 8888. .TP \fB\-max_socket\fR : Set the max number of sockets to open simultaneously. This option is significant if you use one socket per call. Once this limit is reached, traffic is distributed over the sockets already opened. Default value is 50000 .TP \fB\-max_reconnect\fR : Set the the maximum number of reconnection. .HP \fB\-reconnect_close\fR : Should calls be closed on reconnect? .HP \fB\-reconnect_sleep\fR : How long (in milliseconds) to sleep between the close and reconnect? .TP \fB\-rsa\fR : Set the remote sending address to host:port for sending the messages. .TP \fB\-tls_cert\fR : Set the name for TLS Certificate file. Default is 'cacert.pem .TP \fB\-tls_key\fR : Set the name for TLS Private Key file. Default is 'cakey.pem' .TP \fB\-tls_crl\fR : Set the name for Certificate Revocation List file. If not specified, X509 CRL is not activated. .TP \fB\-multihome\fR : Set multihome address for SCTP .TP \fB\-heartbeat\fR : Set heartbeat interval in ms for SCTP .TP \fB\-assocmaxret\fR : Set association max retransmit counter for SCTP .TP \fB\-pathmaxret\fR : Set path max retransmit counter for SCTP .TP \fB\-pmtu\fR : Set path MTU for SCTP .TP \fB\-gracefulclose\fR : If true, SCTP association will be closed with SHUTDOWN (default). If false, SCTP association will be closed by ABORT. .PP *** SIPp overall behavior options: .TP \fB\-v\fR : Display version and copyright information. .TP \fB\-bg\fR : Launch SIPp in background mode. .TP \fB\-nostdin\fR : Disable stdin. .TP \fB\-plugin\fR : Load a plugin. .TP \fB\-sleep\fR : How long to sleep for at startup. Default unit is seconds. .TP \fB\-skip_rlimit\fR : Do not perform rlimit tuning of file descriptor limits. Default: false. .TP \fB\-buff_size\fR : Set the send and receive buffer size. .HP \fB\-sendbuffer_warn\fR : Produce warnings instead of errors on SendBuffer failures. .TP \fB\-lost\fR : Set the number of packets to lose by default (scenario specifications override this value). .TP \fB\-key\fR : keyword value Set the generic parameter named "keyword" to "value". .TP \fB\-set\fR : variable value Set the global variable parameter named "variable" to "value". .TP \fB\-tdmmap\fR : Generate and handle a table of TDM circuits. A circuit must be available for the call to be placed. Format: \fB\-tdmmap\fR {0\-3}{99}{5\-8}{1\-31} .TP \fB\-dynamicStart\fR : variable value Set the start offset of dynamic_id variable .TP \fB\-dynamicMax\fR : variable value Set the maximum of dynamic_id variable .TP \fB\-dynamicStep\fR : variable value Set the increment of dynamic_id variable .PP *** Call behavior options: .TP \fB\-aa\fR : Enable automatic 200 OK answer for INFO, NOTIFY, OPTIONS and UPDATE. .TP \fB\-base_cseq\fR : Start value of [cseq] for each call. .TP \fB\-cid_str\fR : Call ID string (default %u\-%p@%s). %u=call_number, %s=ip_address, %p=process_number, %%=% (in any order). .TP \fB\-d\fR : Controls the length of calls. More precisely, this controls the duration of \&'pause' instructions in the scenario, if they do not have a 'milliseconds' section. Default value is 0 and default unit is milliseconds. .TP \fB\-deadcall_wait\fR : How long the Call\-ID and final status of calls should be kept to improve message and error logs (default unit is ms). .TP \fB\-auth_uri\fR : Force the value of the URI for authentication. By default, the URI is composed of remote_ip:remote_port. .TP \fB\-au\fR : Set authorization username for authentication challenges. Default is taken from \fB\-s\fR argument .TP \fB\-ap\fR : Set the password for authentication challenges. Default is 'password' .TP \fB\-s\fR : Set the username part of the request URI. Default is 'service'. .TP \fB\-default_behaviors\fR: Set the default behaviors that SIPp will use. Possible values are: \- all Use all default behaviors \- none Use no default behaviors \- bye Send byes for aborted calls \- abortunexp Abort calls on unexpected messages \- pingreply Reply to ping requests If a behavior is prefaced with a \-, then it is turned off. Example: all,\-bye .TP \fB\-nd\fR : No Default. Disable all default behavior of SIPp which are the following: \- On UDP retransmission timeout, abort the call by sending a BYE or a CANCEL \- On receive timeout with no ontimeout attribute, abort the call by sending .IP a BYE or a CANCEL .IP \- On unexpected BYE send a 200 OK and close the call \- On unexpected CANCEL send a 200 OK and close the call \- On unexpected PING send a 200 OK and continue the call \- On any other unexpected message, abort the call by sending a BYE or a .IP CANCEL .TP \fB\-pause_msg_ign\fR : Ignore the messages received during a pause defined in the scenario .HP \fB\-callid_slash_ign\fR: Don't treat a triple\-slash in Call\-IDs as indicating an extra SIPp prefix. .PP *** Injection file options: .TP \fB\-inf\fR : Inject values from an external CSV file during calls into the scenarios. First line of this file say whether the data is to be read in sequence (SEQUENTIAL), random (RANDOM), or user (USER) order. Each line corresponds to one call and has one or more ';' delimited data fields. Those fields can be referred as [field0], [field1], ... in the xml scenario file. Several CSV files can be used simultaneously (syntax: \fB\-inf\fR f1.csv \fB\-inf\fR f2.csv ...) .TP \fB\-infindex\fR : file field Create an index of file using field. For example \fB\-inf\fR users.csv \fB\-infindex\fR users.csv 0 creates an index on the first key. .TP \fB\-ip_field\fR : Set which field from the injection file contains the IP address from which the client will send its messages. If this option is omitted and the '\-t ui' option is present, then field 0 is assumed. Use this option together with '\-t ui' .PP *** RTP behaviour options: .TP \fB\-mi\fR : Set the local media IP address (default: local primary host IP address) .TP \fB\-rtp_echo\fR : Enable RTP echo. RTP/UDP packets received on port defined by \fB\-mp\fR are echoed to their sender. RTP/UDP packets coming on this port + 2 are also echoed to their sender (used for sound and video echo). .TP \fB\-mb\fR : Set the RTP echo buffer size (default: 2048). .TP \fB\-mp\fR : Set the local RTP echo port number. Default is 6000. .TP \fB\-min_rtp_port\fR : Minimum port number for RTP socket range. .TP \fB\-max_rtp_port\fR : Maximum port number for RTP socket range. .TP \fB\-rtp_payload\fR : RTP default payload type. .HP \fB\-rtp_threadtasks\fR : RTP number of playback tasks per thread. .TP \fB\-rtp_buffsize\fR : Set the rtp socket send/receive buffer size. .PP *** Call rate options: .TP \fB\-r\fR : Set the call rate (in calls per seconds). This value can bechanged during test by pressing '+', '_', '*' or '/'. Default is 10. pressing '+' key to increase call rate by 1 * rate_scale, pressing '\-' key to decrease call rate by 1 * rate_scale, pressing '*' key to increase call rate by 10 * rate_scale, pressing '/' key to decrease call rate by 10 * rate_scale. .TP \fB\-rp\fR : Specify the rate period for the call rate. Default is 1 second and default unit is milliseconds. This allows you to have n calls every m milliseconds (by using \fB\-r\fR n \fB\-rp\fR m). Example: \fB\-r\fR 7 \fB\-rp\fR 2000 ==> 7 calls every 2 seconds. .IP \fB\-r\fR 10 \fB\-rp\fR 5s => 10 calls every 5 seconds. .TP \fB\-rate_scale\fR : Control the units for the '+', '\-', '*', and '/' keys. .TP \fB\-rate_increase\fR : Specify the rate increase every \fB\-rate_interval\fR units (default is seconds). This allows you to increase the load for each independent logging period. Example: \fB\-rate_increase\fR 10 \fB\-rate_interval\fR 10s .IP ==> increase calls by 10 every 10 seconds. .TP \fB\-rate_max\fR : If \fB\-rate_increase\fR is set, then quit after the rate reaches this value. Example: \fB\-rate_increase\fR 10 \fB\-rate_max\fR 100 .IP ==> increase calls by 10 until 100 cps is hit. .TP \fB\-rate_interval\fR : Set the interval by which the call rate is increased. Defaults to the value of \fB\-fd\fR. .TP \fB\-no_rate_quit\fR : If \fB\-rate_increase\fR is set, do not quit after the rate reaches \fB\-rate_max\fR. .TP \fB\-l\fR : Set the maximum number of simultaneous calls. Once this limit is reached, traffic is decreased until the number of open calls goes down. Default: .IP (3 * call_duration (s) * rate). .TP \fB\-m\fR : Stop the test and exit when 'calls' calls are processed .TP \fB\-users\fR : Instead of starting calls at a fixed rate, begin 'users' calls at startup, and keep the number of calls constant. .PP *** Retransmission and timeout options: .TP \fB\-recv_timeout\fR : Global receive timeout. Default unit is milliseconds. If the expected message is not received, the call times out and is aborted. .TP \fB\-send_timeout\fR : Global send timeout. Default unit is milliseconds. If a message is not sent (due to congestion), the call times out and is aborted. .TP \fB\-timeout\fR : Global timeout. Default unit is seconds. If this option is set, SIPp quits after nb units (\fB\-timeout\fR 20s quits after 20 seconds). .TP \fB\-timeout_error\fR : SIPp fails if the global timeout is reached is set (\fB\-timeout\fR option required). .TP \fB\-max_retrans\fR : Maximum number of UDP retransmissions before call ends on timeout. Default is 5 for INVITE transactions and 7 for others. .TP \fB\-max_invite_retrans\fR: Maximum number of UDP retransmissions for invite transactions before call ends on timeout. .TP \fB\-max_non_invite_retrans\fR: Maximum number of UDP retransmissions for non\-invite transactions before call ends on timeout. .TP \fB\-nr\fR : Disable retransmission in UDP mode. .TP \fB\-rtcheck\fR : Select the retransmission detection method: full (default) or loose. .TP \fB\-T2\fR : Global T2\-timer in milli seconds .PP *** Third\-party call control options: .TP \fB\-3pcc\fR : Launch the tool in 3pcc mode ("Third Party call control"). The passed IP address depends on the 3PCC role. \- When the first twin command is 'sendCmd' then this is the address of the .TP remote twin socket. SIPp will try to connect to this address:port to send .IP the twin command (This instance must be started after all other 3PCC scenarios). .IP Example: 3PCC\-C\-A scenario. .IP \- When the first twin command is 'recvCmd' then this is the address of the .IP local twin socket. SIPp will open this address:port to listen for twin command. .IP Example: 3PCC\-C\-B scenario. .TP \fB\-master\fR : 3pcc extended mode: indicates the master number .TP \fB\-slave\fR : 3pcc extended mode: indicates the slave number .TP \fB\-slave_cfg\fR : 3pcc extended mode: indicates the file where the master and slave addresses are stored .PP *** Performance and watchdog options: .TP \fB\-timer_resol\fR : Set the timer resolution. Default unit is milliseconds. This option has an impact on timers precision.Small values allow more precise scheduling but impacts CPU usage.If the compression is on, the value is set to 50ms. The default value is 10ms. .TP \fB\-max_recv_loops\fR : Set the maximum number of messages received read per cycle. Increase this value for high traffic level. The default value is 1000. .TP \fB\-max_sched_loops\fR : Set the maximum number of calls run per event loop. Increase this value for high traffic level. The default value is 1000. .TP \fB\-watchdog_interval\fR: Set gap between watchdog timer firings. Default is 400. .TP \fB\-watchdog_reset\fR : If the watchdog timer has not fired in more than this time period, then reset the max triggers counters. Default is 10 minutes. .TP \fB\-watchdog_minor_threshold\fR: If it has been longer than this period between watchdog executions count a minor trip. Default is 500. .TP \fB\-watchdog_major_threshold\fR: If it has been longer than this period between watchdog executions count a major trip. Default is 3000. .TP \fB\-watchdog_major_maxtriggers\fR: How many times the major watchdog timer can be tripped before the test is terminated. Default is 10. .TP \fB\-watchdog_minor_maxtriggers\fR: How many times the minor watchdog timer can be tripped before the test is terminated. Default is 120. .PP *** Tracing, logging and statistics options: .TP \fB\-f\fR : Set the statistics report frequency on screen. Default is 1 and default unit is seconds. .TP \fB\-trace_stat\fR : Dumps all statistics in _.csv file. Use the '\-h stat' option for a detailed description of the statistics file content. .TP \fB\-stat_delimiter\fR : Set the delimiter for the statistics file .TP \fB\-stf\fR : Set the file name to use to dump statistics .TP \fB\-fd\fR : Set the statistics dump log report frequency. Default is 60 and default unit is seconds. .TP \fB\-periodic_rtd\fR : Reset response time partition counters each logging interval. .TP \fB\-trace_msg\fR : Displays sent and received SIP messages in __messages.log .TP \fB\-message_file\fR : Set the name of the message log file. .HP \fB\-message_overwrite\fR: Overwrite the message log file (default true). .TP \fB\-trace_shortmsg\fR : Displays sent and received SIP messages as CSV in __shortmessages.log .HP \fB\-shortmessage_file\fR: Set the name of the short message log file. .HP \fB\-shortmessage_overwrite\fR: Overwrite the short message log file (default true). .TP \fB\-trace_counts\fR : Dumps individual message counts in a CSV file. .TP \fB\-trace_err\fR : Trace all unexpected messages in __errors.log. .TP \fB\-error_file\fR : Set the name of the error log file. .HP \fB\-error_overwrite\fR : Overwrite the error log file (default true). .TP \fB\-trace_error_codes\fR: Dumps the SIP response codes of unexpected messages to __error_codes.log. .TP \fB\-trace_calldebug\fR : Dumps debugging information about aborted calls to __calldebug.log file. .TP \fB\-calldebug_file\fR : Set the name of the call debug file. .HP \fB\-calldebug_overwrite\fR: Overwrite the call debug file (default true). .TP \fB\-trace_screen\fR : Dump statistic screens in the __screens.log file when quitting SIPp. Useful to get a final status report in background mode (\fB\-bg\fR option). .TP \fB\-screen_file\fR : Set the name of the screen file. .HP \fB\-screen_overwrite\fR: Overwrite the screen file (default true). .TP \fB\-trace_rtt\fR : Allow tracing of all response times in __rtt.csv. .TP \fB\-rtt_freq\fR : freq is mandatory. Dump response times every freq calls in the log file defined by \fB\-trace_rtt\fR. Default value is 200. .TP \fB\-trace_logs\fR : Allow tracing of actions in __logs.log. .TP \fB\-log_file\fR : Set the name of the log actions log file. .TP \fB\-log_overwrite\fR : Overwrite the log actions log file (default true). .TP \fB\-ringbuffer_files\fR: How many error, message, shortmessage and calldebug files should be kept after rotation? .TP \fB\-ringbuffer_size\fR : How large should error, message, shortmessage and calldebug files be before they get rotated? .TP \fB\-max_log_size\fR : What is the limit for error, message, shortmessage and calldebug file sizes. .PP Signal handling: .IP SIPp can be controlled using POSIX signals. The following signals are handled: USR1: Similar to pressing the 'q' key. It triggers a soft exit .IP of SIPp. No more new calls are placed and all ongoing calls are finished before SIPp exits. Example: kill \fB\-SIGUSR1\fR 732 .IP USR2: Triggers a dump of all statistics screens in .IP __screens.log file. Especially useful in background mode to know what the current status is. Example: kill \fB\-SIGUSR2\fR 732 .PP Exit codes: .IP Upon exit (on fatal error or when the number of asked calls (\fB\-m\fR option) is reached, SIPp exits with one of the following exit code: .IP 0: All calls were successful 1: At least one call failed .IP 97: Exit on internal command. Calls may have been processed 99: Normal exit without calls processed \fB\-1\fR: Fatal error \fB\-2\fR: Fatal error binding a socket .IP SIPp v3.5.1\-TLS\-SCTP\-PCAP\-RTPSTREAM built Mar 17 2016, 09:12:46. .IP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. .IP This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. .IP You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111\-1307 USA .IP Author: see source files. sipp-3.5.1/include/socketowner.hpp0000644000175000017500000000357212672462535016247 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #ifndef __SOCKETOWNER__ #define __SOCKETOWNER__ class socketowner { public: socketowner(); virtual ~socketowner(); /* Associate/Dissociate this call with a socket. */ struct sipp_socket *associate_socket(struct sipp_socket *socket); struct sipp_socket *dissociate_socket(); /* Notification of TCP Close events. */ virtual void tcpClose() = 0; protected: /* What socket is this call bound to. */ struct sipp_socket *call_socket; unsigned long ownerid; static unsigned long nextownerid; private: void add_owner_to_socket(struct sipp_socket *socket); void remove_owner_from_socket(struct sipp_socket *socket); }; typedef std::map owner_map; typedef std::pair socket_map_pair; typedef std::map socket_owner_map_map; typedef std::list owner_list; typedef std::pair long_owner_pair; owner_list *get_owners_for_socket(struct sipp_socket *socket); #endif sipp-3.5.1/include/call.hpp0000644000175000017500000002545112672462535014617 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research * Andy Aicken */ #ifndef __CALL__ #define __CALL__ #include #include #include #include #include #include "scenario.hpp" #include "stat.hpp" #ifdef USE_OPENSSL #include "sslcommon.h" #endif #ifdef PCAPPLAY #include "send_packets.h" #endif #ifdef RTP_STREAM #include "rtpstream.hpp" #endif #ifndef MAX #define MAX(a, b) ((a) > (b) ? (a) : (b)) #endif #include "sip_parser.hpp" #define UDP_MAX_RETRANS_INVITE_TRANSACTION 5 #define UDP_MAX_RETRANS_NON_INVITE_TRANSACTION 9 #define UDP_MAX_RETRANS MAX(UDP_MAX_RETRANS_INVITE_TRANSACTION, UDP_MAX_RETRANS_NON_INVITE_TRANSACTION) #define MAX_SUB_MESSAGE_LENGTH 2049 #define DEFAULT_T2_TIMER_VALUE 4000 #define SIP_TRANSACTION_TIMEOUT 32000 /* Retransmission check methods. */ #define RTCHECK_FULL 1 #define RTCHECK_LOOSE 2 struct txnInstanceInfo { char *txnID; unsigned long txnResp; int ackIndex; }; class call : virtual public task, virtual public listener, public virtual socketowner { public: /* These are wrappers for various circumstances, (private) init does the real work. */ //call(char * p_id, int userId, bool ipv6, bool isAutomatic); call(const char *p_id, bool use_ipv6, int userId, struct sockaddr_storage *dest); call(const char *p_id, struct sipp_socket *socket, struct sockaddr_storage *dest); static call *add_call(int userId, bool ipv6, struct sockaddr_storage *dest); call(scenario * call_scenario, struct sipp_socket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitCall); virtual ~call(); virtual bool process_incoming(char * msg, struct sockaddr_storage *src = NULL); virtual bool process_twinSippCom(char * msg); virtual bool run(); /* Terminate this call, depending on action results and timewait. */ virtual void terminate(CStat::E_Action reason); virtual void tcpClose(); /* When should this call wake up? */ virtual unsigned int wake(); virtual bool abortCall(bool writeLog); // call aborted with BYE or CANCEL virtual void abort(); /* Dump call info to error log. */ virtual void dump(); /* Automatic */ enum T_AutoMode { E_AM_DEFAULT, E_AM_UNEXP_BYE, E_AM_UNEXP_CANCEL, E_AM_PING, E_AM_AA, E_AM_OOCALL }; void setLastMsg(const char *msg); bool automaticResponseMode(T_AutoMode P_case, char* P_recv); const char *getLastReceived() { return last_recv_msg; }; private: /* This is the core constructor function. */ void init(scenario * call_scenario, struct sipp_socket *socket, struct sockaddr_storage *dest, const char * p_id, int userId, bool ipv6, bool isAutomatic, bool isInitCall); /* This this call for initialization? */ bool initCall; struct sockaddr_storage call_peer; scenario *call_scenario; unsigned int number; public: static int maxDynamicId; // max value for dynamicId; this value is reached ! static int startDynamicId; // offset for first dynamicId FIXME:in CmdLine static int stepDynamicId; // step of increment for dynamicId static int dynamicId; // a counter for general use, incrementing by stepDynamicId starting at startDynamicId wrapping at maxDynamicId GLOBALY private: unsigned int tdm_map_number; int msg_index; int zombie; char * realloc_ptr; /* Last message sent from scenario step (retransmitions do not * change this index. Only message sent from the scenario * are kept in this index.) */ int last_send_index; char * last_send_msg; int last_send_len; /* How long until sending this message times out. */ unsigned int send_timeout; /* Last received message (expected, not optional, and not * retransmitted) and the associated hash. Stills setted until a new * scenario steps sends a message */ unsigned long last_recv_hash; int last_recv_index; char * last_recv_msg; /* Recv message characteristics when we sent a valid message * (scneario, no retrans) just after a valid reception. This was * a cause relationship, so the next time this cookie will be recvd, * we will retransmit the same message we sent this time */ unsigned long recv_retrans_hash; int recv_retrans_recv_index; int recv_retrans_send_index; unsigned int recv_timeout; /* holds the route set */ char * dialog_route_set; char * next_req_url; /* cseq value for [cseq] keyword */ unsigned int cseq; #ifdef PCAPPLAY int hasMediaInformation; pthread_t media_thread; play_args_t play_args_a; play_args_t play_args_i; play_args_t play_args_v; #endif #ifdef RTP_STREAM rtpstream_callinfo_t rtpstream_callinfo; #endif /* holds the auth header and if the challenge was 401 or 407 */ char * dialog_authentication; int dialog_challenge_type; unsigned int next_retrans; int nb_retrans; unsigned int nb_last_delay; unsigned int paused_until; unsigned long start_time; unsigned long long *start_time_rtd; bool *rtd_done; char *peer_tag; struct sipp_socket *call_remote_socket; int call_port; void * comp_state; int deleted; bool call_established; // == true when the call is established // ie ACK received or sent // => init to false bool ack_is_pending; // == true if an ACK is pending // Needed to avoid abortCall sending a // CANCEL instead of BYE in some extreme // cases for 3PCC scenario. // => init to false /* Call Variable Table */ VariableTable *M_callVariableTable; /* Our transaction IDs. */ struct txnInstanceInfo *transactions; /* result of execute action */ enum T_ActionResult { E_AR_NO_ERROR = 0, E_AR_REGEXP_DOESNT_MATCH, E_AR_REGEXP_SHOULDNT_MATCH, E_AR_STOP_CALL, E_AR_CONNECT_FAILED, E_AR_HDR_NOT_FOUND }; /* Store the last action result to allow */ /* call to continue and mark it as failed */ T_ActionResult last_action_result; /* rc == true means call not deleted by processing */ void formatNextReqUrl (char* next_req_url); void computeRouteSetAndRemoteTargetUri (char* rrList, char* contact, bool bRequestIncoming); bool matches_scenario(unsigned int index, int reply_code, char * request, char * responsecseqmethod, char *txn); bool executeMessage(message *curmsg); T_ActionResult executeAction(char * msg, message *message); void extractSubMessage(char * msg, char * matchingString, char* result, bool case_indep, int occurrence, bool headers); bool rejectCall(); double get_rhs(CAction *currentAction); // P_index use for message index in scenario and ctrl of CRLF // P_index = -2 No ctrl of CRLF // P_index = -1 Add crlf to end of message char* createSendingMessage(SendingMessage *src, int P_index, int *msgLen=NULL); char* createSendingMessage(char * src, int P_index, bool skip_sanity = false); char* createSendingMessage(SendingMessage *src, int P_index, char *msg_buffer, int buflen, int *msgLen=NULL); // method for the management of unexpected messages bool checkInternalCmd(char* cmd); // check of specific internal command // received from the twin socket // used for example to cancel the call // of the third party bool check_peer_src(char* msg, int search_index); // 3pcc extended mode:check if // the twin message received // comes from the expected sender void sendBuffer(char *buf, int len = 0); // send a message out of a scenario // execution T_AutoMode checkAutomaticResponseMode(char * P_recv); int sendCmdMessage(message *curmsg); // 3PCC int sendCmdBuffer(char* cmd); // for 3PCC, send a command out of a // scenario execution static void readInputFileContents(const char* fileName); static void dumpFileContents(void); void getFieldFromInputFile(const char* fileName, int field, SendingMessage *line, char*& dest); /* Associate a user with this call. */ void setUser(int userId); /* Is this call just around for final retransmissions. */ bool timewait; /* rc == true means call not deleted by processing */ bool next(); bool process_unexpected(char * msg); void do_bookkeeping(message *curmsg); void extract_cseq_method (char* responseCseq, char* msg); void extract_transaction (char* txn, char* msg); int send_raw(const char * msg, int index, int len); char * send_scene(int index, int *send_status, int *msgLen); bool connect_socket_if_needed(); char * get_header_field_code(const char * msg, const char * code); char * get_last_header(const char * name); char * get_last_request_uri(); unsigned long hash(const char * msg); typedef std::map file_line_map; file_line_map *m_lineNumber; int userId; bool use_ipv6; void get_remote_media_addr(char * message); #ifdef RTP_STREAM void extract_rtp_remote_addr (char * message); #endif bool lost(int index); void computeStat (CStat::E_Action P_action); void computeStat (CStat::E_Action P_action, unsigned long P_value); void computeStat (CStat::E_Action P_action, unsigned long P_value, int which); void queue_up(char *msg); char *queued_msg; #ifdef USE_OPENSSL SSL_CTX *m_ctx_ssl; BIO *m_bio; #endif int _callDebug(const char *fmt, ...) __attribute__((format(printf, 2, 3))); char *debugBuffer; int debugLength; }; /* Default Message Functions. */ void init_default_messages(); void free_default_messages(); SendingMessage *get_default_message(const char *which); void set_default_message(const char *which, char *message); #endif sipp-3.5.1/include/sipp.hpp0000644000175000017500000005016712672462535014661 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #ifndef __SIPP__ #define __SIPP__ /* Std C includes */ #include #include #include #include #include #include #include #include #ifdef USE_SCTP #ifndef __DARWIN #include #endif #endif #include #include #ifdef HAVE_EPOLL #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifndef __SUNOS #include #else #include #endif #if defined(__HPUX) || defined(__SUNOS) #include #endif /* Sipp includes */ #include "xp_parser.h" #include "scenario.hpp" #include "screen.hpp" #include "task.hpp" #include "listener.hpp" #include "socketowner.hpp" #include "socket.hpp" #include "call.hpp" #include "comp.h" #include "variables.hpp" #include "stat.hpp" #include "actions.hpp" #include "infile.hpp" #include "call_generation_task.hpp" #include "reporttask.hpp" #include "ratetask.hpp" #include "watchdog.hpp" /* Open SSL stuff */ #ifdef USE_OPENSSL #include "sslcommon.h" #endif /* * If this files is included in the Main, then extern definitions * are removed, and the _DEFAULT macro becomes '= value;'. Else * extern definition does not contain default values assignment */ #ifdef GLOBALS_FULL_DEFINITION #define extern #define _DEFVAL(value) = value #define extern_c #else #define _DEFVAL(value) #ifdef __cplusplus #define extern_c extern "C" #else #define extern_c #endif #endif /************************** Constants **************************/ #define T_UDP 0 #define T_TCP 1 #define T_TLS 2 #define T_SCTP 3 #ifdef USE_OPENSSL #define DEFAULT_TLS_CERT "cacert.pem" #define DEFAULT_TLS_KEY "cakey.pem" #define DEFAULT_TLS_CRL "" #endif #define TRANSPORT_TO_STRING(p) ((p==T_TCP) ? "TCP" : ((p==T_TLS)? "TLS" : ((p==T_UDP)? "UDP" : "SCTP"))) #define SIPP_MAXFDS 65536 #define SIPP_MAX_MSG_SIZE 65536 #define MSG_RETRANS_FIRST 0 #define MSG_RETRANS_RETRANSMISSION 1 #define MSG_RETRANS_NEVER 2 #define DISPLAY_STAT_SCREEN 1 #define DISPLAY_REPARTITION_SCREEN 2 #define DISPLAY_SCENARIO_SCREEN 3 #define DISPLAY_VARIABLE_SCREEN 4 #define DISPLAY_TDM_MAP_SCREEN 5 #define DISPLAY_SECONDARY_REPARTITION_SCREEN 6 #define MAX_RECV_LOOPS_PER_CYCLE 1000 #define MAX_SCHED_LOOPS_PER_CYCLE 1000 #define NB_UPDATE_PER_CYCLE 1 #define MAX_PEER_SIZE 4096 /* 3pcc extended mode: max size of peer names */ #define MAX_LOCAL_TWIN_SOCKETS 10 /*3pcc extended mode:max number of peers from which cmd messages are received */ /******************** Default parameters ***********************/ #define DEFAULT_RATE 10.0 #define DEFAULT_RATE_SCALE 1.0 #define DEFAULT_RATE_PERIOD_MS 1000 #define DEFAULT_TRANSPORT T_UDP #define DEFAULT_PORT 5060 #define DEFAULT_MEDIA_PORT 6000 #define DEFAULT_3PCC_PORT 6060 #define DEFAULT_SERVICE "service" #define DEFAULT_AUTH_PASSWORD "password" #define DEFAULT_REPORT_FREQ 1000 #define DEFAULT_RATE_INCR_FREQ 0 #define DEFAULT_REPORT_FREQ_DUMP_LOG 60000 #define DEFAULT_TIMER_RESOLUTION 1 #define DEFAULT_FREQ_DUMP_RTT 200 #define DEFAULT_MAX_MULTI_SOCKET 50000 #define DEFAULT_CTRL_SOCKET_PORT 8888 #define DEFAULT_DEADCALL_WAIT 33000 #define DEFAULT_BEHAVIOR_NONE 0 #define DEFAULT_BEHAVIOR_BYE 1 #define DEFAULT_BEHAVIOR_ABORTUNEXP 2 #define DEFAULT_BEHAVIOR_PINGREPLY 4 #define DEFAULT_BEHAVIOR_ALL (DEFAULT_BEHAVIOR_BYE | DEFAULT_BEHAVIOR_ABORTUNEXP | DEFAULT_BEHAVIOR_PINGREPLY) #ifdef RTP_STREAM #define DEFAULT_MIN_RTP_PORT 8192 #define DEFAULT_MAX_RTP_PORT 65535 #define DEFAULT_RTP_PAYLOAD 8 #define DEFAULT_RTP_THREADTASKS 20 #endif /************ User controls and command line options ***********/ extern int duration _DEFVAL(0); extern double rate _DEFVAL(DEFAULT_RATE); extern double rate_scale _DEFVAL(DEFAULT_RATE_SCALE); extern int rate_increase _DEFVAL(0); extern int rate_max _DEFVAL(0); extern unsigned long rate_increase_freq _DEFVAL(DEFAULT_RATE_INCR_FREQ); extern bool rate_quit _DEFVAL(true); extern int users _DEFVAL(-1); extern int rate_period_ms _DEFVAL(DEFAULT_RATE_PERIOD_MS); extern int sleeptime _DEFVAL(0); extern unsigned long defl_recv_timeout _DEFVAL(0); extern unsigned long defl_send_timeout _DEFVAL(0); extern unsigned long global_timeout _DEFVAL(0); extern int transport _DEFVAL(DEFAULT_TRANSPORT); extern bool retrans_enabled _DEFVAL(1); extern int rtcheck _DEFVAL(RTCHECK_FULL); extern int max_udp_retrans _DEFVAL(UDP_MAX_RETRANS); extern int max_invite_retrans _DEFVAL(UDP_MAX_RETRANS_INVITE_TRANSACTION); extern int max_non_invite_retrans _DEFVAL(UDP_MAX_RETRANS_NON_INVITE_TRANSACTION); extern unsigned long default_behaviors _DEFVAL(DEFAULT_BEHAVIOR_ALL); extern unsigned long deadcall_wait _DEFVAL(DEFAULT_DEADCALL_WAIT); extern bool pause_msg_ign _DEFVAL(0); extern bool auto_answer _DEFVAL(false); extern int multisocket _DEFVAL(0); extern int compression _DEFVAL(0); extern int peripsocket _DEFVAL(0); extern int peripfield _DEFVAL(0); extern bool bind_local _DEFVAL(false); extern void * monosocket_comp_state _DEFVAL(0); extern const char * service _DEFVAL(DEFAULT_SERVICE); extern const char * auth_password _DEFVAL(DEFAULT_AUTH_PASSWORD); extern const char * auth_username _DEFVAL(0); extern unsigned long report_freq _DEFVAL(DEFAULT_REPORT_FREQ); extern unsigned long report_freq_dumpLog _DEFVAL (DEFAULT_REPORT_FREQ_DUMP_LOG); extern bool periodic_rtd _DEFVAL(false); extern const char * stat_delimiter _DEFVAL(";"); extern bool timeout_exit _DEFVAL(false); extern bool timeout_error _DEFVAL(false); extern unsigned long report_freq_dumpRtt _DEFVAL (DEFAULT_FREQ_DUMP_RTT); extern int max_multi_socket _DEFVAL (DEFAULT_MAX_MULTI_SOCKET); extern bool skip_rlimit _DEFVAL(false); extern unsigned int timer_resolution _DEFVAL(DEFAULT_TIMER_RESOLUTION); extern int max_recv_loops _DEFVAL(MAX_RECV_LOOPS_PER_CYCLE); extern int max_sched_loops _DEFVAL(MAX_SCHED_LOOPS_PER_CYCLE); extern unsigned int global_t2 _DEFVAL(DEFAULT_T2_TIMER_VALUE); extern char local_ip[40]; extern char local_ip_escaped[42]; extern bool local_ip_is_ipv6; extern int local_port _DEFVAL(0); #ifdef USE_SCTP extern char multihome_ip[40]; extern int heartbeat _DEFVAL(0); extern int assocmaxret _DEFVAL(0); extern int pathmaxret _DEFVAL(0); extern int pmtu _DEFVAL(0); extern bool gracefulclose _DEFVAL(true); #endif extern char control_ip[40]; extern int control_port _DEFVAL(0); extern int buff_size _DEFVAL(65535); extern int tcp_readsize _DEFVAL(65535); #if defined(PCAPPLAY) || defined(RTP_STREAM) extern int hasMedia _DEFVAL(0); #endif #ifdef RTP_STREAM extern int min_rtp_port _DEFVAL(DEFAULT_MIN_RTP_PORT); extern int max_rtp_port _DEFVAL(DEFAULT_MAX_RTP_PORT); extern int rtp_default_payload _DEFVAL(DEFAULT_RTP_PAYLOAD); extern int rtp_tasks_per_thread _DEFVAL(DEFAULT_RTP_THREADTASKS); extern int rtp_buffsize _DEFVAL(65535); #endif extern bool rtp_echo_enabled _DEFVAL(0); extern char media_ip[40]; extern char media_ip_escaped[42]; extern int user_media_port _DEFVAL(0); extern int media_port _DEFVAL(0); extern size_t media_bufsize _DEFVAL(2048); extern_c bool media_ip_is_ipv6 _DEFVAL(false); extern char remote_ip[40]; extern char remote_ip_escaped[42]; extern int remote_port _DEFVAL(DEFAULT_PORT); extern unsigned int pid _DEFVAL(0); extern bool print_all_responses _DEFVAL(false); extern unsigned long stop_after _DEFVAL(0xffffffff); extern int quitting _DEFVAL(0); extern int interrupt _DEFVAL(0); extern bool paused _DEFVAL(false); extern int lose_packets _DEFVAL(0); extern double global_lost _DEFVAL(0.0); extern char remote_host[255]; extern char twinSippHost[255]; extern char twinSippIp[40]; extern char * master_name; extern char * slave_number; extern int twinSippPort _DEFVAL(DEFAULT_3PCC_PORT); extern bool twinSippMode _DEFVAL(false); extern bool extendedTwinSippMode _DEFVAL(false); extern bool nostdin _DEFVAL(false); extern bool use_curses _DEFVAL(true); extern bool backgroundMode _DEFVAL(false); extern bool signalDump _DEFVAL(false); extern int currentScreenToDisplay _DEFVAL (DISPLAY_SCENARIO_SCREEN); extern int currentRepartitionToDisplay _DEFVAL(1); extern unsigned int base_cseq _DEFVAL(0); extern char * auth_uri _DEFVAL(0); extern const char * call_id_string _DEFVAL("%u-%p@%s"); extern char **generic[100]; extern bool callidSlash _DEFVAL(false); /* TDM map */ extern bool use_tdmmap _DEFVAL(false); extern unsigned int tdm_map_a _DEFVAL(0); extern unsigned int tdm_map_b _DEFVAL(0); extern unsigned int tdm_map_c _DEFVAL(0); extern unsigned int tdm_map_x _DEFVAL(0); extern unsigned int tdm_map_y _DEFVAL(0); extern unsigned int tdm_map_z _DEFVAL(0); extern unsigned int tdm_map_h _DEFVAL(0); extern bool tdm_map[1024]; #ifdef USE_OPENSSL extern BIO * twinSipp_bio; extern SSL * twinSipp_ssl; extern const char * tls_cert_name _DEFVAL(DEFAULT_TLS_CERT); extern const char * tls_key_name _DEFVAL(DEFAULT_TLS_KEY); extern const char * tls_crl_name _DEFVAL(DEFAULT_TLS_CRL); #endif extern char* scenario_file _DEFVAL(NULL); extern_c char* scenario_path _DEFVAL(NULL); // extern field file management typedef std::map file_map; extern file_map inFiles; typedef std::map file_index; extern char *ip_file _DEFVAL(NULL); extern char *default_file _DEFVAL(NULL); // free user id list extern list freeUsers; extern list retiredUsers; extern AllocVariableTable *globalVariables _DEFVAL(NULL); extern AllocVariableTable *userVariables _DEFVAL(NULL); typedef std::map int_vt_map; extern int_vt_map userVarMap; //extern int new_socket(bool P_use_ipv6, int P_type_socket, int * P_status); extern struct sipp_socket *new_sipp_socket(bool use_ipv6, int transport); struct sipp_socket *new_sipp_call_socket(bool use_ipv6, int transport, bool *existing); struct sipp_socket *sipp_accept_socket(struct sipp_socket *accept_socket); extern int sipp_bind_socket(struct sipp_socket *socket, struct sockaddr_storage *saddr, int *port); extern int sipp_connect_socket(struct sipp_socket *socket, struct sockaddr_storage *dest); extern int sipp_reconnect_socket(struct sipp_socket *socket); extern void sipp_customize_socket(struct sipp_socket *socket); extern int delete_socket(int P_socket); extern int min_socket _DEFVAL(65535); extern int select_socket _DEFVAL(0); extern bool socket_close _DEFVAL(true); extern bool test_socket _DEFVAL(true); extern bool maxSocketPresent _DEFVAL(false); #include "time.hpp" /************************ Statistics **************************/ extern unsigned long last_report_calls _DEFVAL(0); extern unsigned long nb_net_send_errors _DEFVAL(0); extern unsigned long nb_net_cong _DEFVAL(0); extern unsigned long nb_net_recv_errors _DEFVAL(0); extern bool cpu_max _DEFVAL(false); extern bool outbound_congestion _DEFVAL(false); extern int open_calls_user_setting _DEFVAL(0); extern int resynch_send _DEFVAL(0); extern int resynch_recv _DEFVAL(0); extern unsigned long rtp_pckts _DEFVAL(0); extern unsigned long rtp_bytes _DEFVAL(0); extern_c unsigned long rtp_pckts_pcap _DEFVAL(0); extern_c unsigned long rtp_bytes_pcap _DEFVAL(0); extern unsigned long rtp2_pckts _DEFVAL(0); extern unsigned long rtp2_bytes _DEFVAL(0); extern unsigned long rtp2_pckts_pcap _DEFVAL(0); extern unsigned long rtp2_bytes_pcap _DEFVAL(0); #ifdef RTP_STREAM extern volatile unsigned long rtpstream_numthreads _DEFVAL(0); extern volatile unsigned long rtpstream_bytes_in _DEFVAL(0); extern volatile unsigned long rtpstream_bytes_out _DEFVAL(0); extern volatile unsigned long rtpstream_pckts _DEFVAL(0); #endif /************* Rate Control & Contexts variables **************/ extern int last_running_calls _DEFVAL(0); extern int last_woken_calls _DEFVAL(0); extern int last_paused_calls _DEFVAL(0); extern unsigned int open_calls_allowed _DEFVAL(0); extern unsigned long last_report_time _DEFVAL(0); extern unsigned long last_dump_time _DEFVAL(0); extern unsigned long last_rate_increase_time _DEFVAL(0); /********************** Clock variables ***********************/ extern unsigned long clock_tick _DEFVAL(0); extern unsigned long scheduling_loops _DEFVAL(0); extern unsigned long last_timer_cycle _DEFVAL(0); extern unsigned long watchdog_interval _DEFVAL(400); extern unsigned long watchdog_minor_threshold _DEFVAL(500); extern unsigned long watchdog_minor_maxtriggers _DEFVAL(120); extern unsigned long watchdog_major_threshold _DEFVAL(3000); extern unsigned long watchdog_major_maxtriggers _DEFVAL(10); extern unsigned long watchdog_reset _DEFVAL(600000); /********************* dynamic Id ************************* */ extern int maxDynamicId _DEFVAL(12000); // max value for dynamicId; this value is reached extern int startDynamicId _DEFVAL(10000); // offset for first dynamicId FIXME:in CmdLine extern int stepDynamicId _DEFVAL(4); // step of increment for dynamicId #define GET_TIME(clock) \ { \ struct timezone tzp; \ gettimeofday (clock, &tzp); \ } /*********************** Global Sockets **********************/ extern struct sipp_socket *main_socket _DEFVAL(NULL); extern struct sipp_socket *main_remote_socket _DEFVAL(NULL); extern struct sipp_socket *tcp_multiplex _DEFVAL(NULL); extern int media_socket _DEFVAL(0); extern int media_socket_video _DEFVAL(0); extern struct sockaddr_storage local_sockaddr; extern struct sockaddr_storage localTwin_sockaddr; extern int user_port _DEFVAL(0); extern char hostname[80]; extern bool is_ipv6 _DEFVAL(false); extern int reset_number _DEFVAL(0); extern bool reset_close _DEFVAL(true); extern int reset_sleep _DEFVAL(1000); extern bool sendbuffer_warn _DEFVAL(false); /* A list of sockets pending reset. */ extern set sockets_pending_reset; extern struct addrinfo *local_addr_storage; extern struct sipp_socket *twinSippSocket _DEFVAL(NULL); extern struct sipp_socket *localTwinSippSocket _DEFVAL(NULL); extern struct sockaddr_storage twinSipp_sockaddr; /* 3pcc extended mode */ typedef struct _T_peer_infos { char peer_host[40]; int peer_port; struct sockaddr_storage peer_sockaddr; char peer_ip[40]; struct sipp_socket *peer_socket; } T_peer_infos; typedef std::map peer_addr_map; extern peer_addr_map peer_addrs; typedef std::map peer_map; extern peer_map peers; typedef std::map peer_socket_map; extern peer_socket_map peer_sockets; extern struct sipp_socket *local_sockets[MAX_LOCAL_TWIN_SOCKETS]; extern int local_nb _DEFVAL(0); extern int peers_connected _DEFVAL(0); extern struct sockaddr_storage remote_sockaddr; extern short use_remote_sending_addr _DEFVAL(0); extern struct sockaddr_storage remote_sending_sockaddr; enum E_Alter_YesNo { E_ALTER_YES=0, E_ALTER_NO }; #include "logger.hpp" /********************* Utilities functions *******************/ #include "strings.hpp" void sipp_exit(int rc); char *get_peer_addr(char *); bool reconnect_allowed(); void reset_connection(struct sipp_socket *); void close_calls(struct sipp_socket *); int close_connections(); int open_connections(); void timeout_alarm(int); /* extended 3PCC mode */ struct sipp_socket **get_peer_socket(char *); bool is_a_peer_socket(struct sipp_socket *); bool is_a_local_socket(struct sipp_socket *); void connect_to_peer (char *, int , sockaddr_storage *, char *, struct sipp_socket **); void connect_to_all_peers (); void connect_local_twin_socket(char *); void close_peer_sockets(); void close_local_sockets(); void free_peer_addr_map(); /********************* Reset global kludge *******************/ #ifdef GLOBALS_FULL_DEFINITION #undef extern #endif #endif // __SIPP__ sipp-3.5.1/include/milenage.h0000644000175000017500000000247412672462535015125 0ustar vsevavseva/*------------------------------------------------------------------- * Example algorithms f1, f1*, f2, f3, f4, f5, f5* *------------------------------------------------------------------- * * A sample implementation of the example 3GPP authentication and * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is * a byte-oriented implementation of the functions, and of the block * cipher kernel function Rijndael. * * This has been coded for clarity, not necessarily for efficiency. * * The functions f2, f3, f4 and f5 share the same inputs and have * been coded together as a single function. f1, f1* and f5* are * all coded separately. * *-----------------------------------------------------------------*/ #ifndef MILENAGE_H #define MILENAGE_H #include void f1(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_a[8], uint8_t op[16]); void f2345(uint8_t k[16], uint8_t rand[16], uint8_t res[8], uint8_t ck[16], uint8_t ik[16], uint8_t ak[6], uint8_t op[16]); void f1star(uint8_t k[16], uint8_t rand[16], uint8_t sqn[6], uint8_t amf[2], uint8_t mac_s[8], uint8_t op[16]); void f5star(uint8_t k[16], uint8_t rand[16], uint8_t ak[6], uint8_t op[16]); void ComputeOPc(uint8_t op_c[16], uint8_t op[16]); #endif sipp-3.5.1/include/stat.hpp0000644000175000017500000005337712672462535014667 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. */ #ifndef __STAT_H__ #define __STAT_H__ #define TIME_LENGTH 64 #define DEFAULT_FILE_NAME (char*)"dumpFile" #define DEFAULT_EXTENSION (char*)".csv" #define MAX_CHAR_BUFFER_SIZE 1024 #include #include #include #include #include #include #include #include #ifdef HAVE_GSL #include #include #include #endif #include "variables.hpp" using namespace std; /* __________________________________________________________________________ C S t a t C L A S S __________________________________________________________________________ */ /** * This class provides some means to compute and display statistics. * This is a singleton class. */ class CStat { public: std::vector error_codes; /* * This struct is used for repartition table * border max is the max value allow for this range * nbInThisBorder is the counter of value in this range */ typedef struct _T_dynamicalRepartition { unsigned int borderMax; unsigned long nbInThisBorder; } T_dynamicalRepartition; typedef struct _T_value_rtt { double date ; int rtd_no ; double rtt ; } T_value_rtt, *T_pValue_rtt ; /** * Actions on counters */ enum E_Action { E_NO_ACTION, E_CREATE_OUTGOING_CALL, E_CREATE_INCOMING_CALL, E_CALL_FAILED, E_CALL_SUCCESSFULLY_ENDED, E_RESET_C_COUNTERS, E_RESET_PD_COUNTERS, E_RESET_PL_COUNTERS, E_ADD_CALL_DURATION, E_ADD_RESPONSE_TIME_DURATION, E_FAILED_CANNOT_SEND_MSG, E_FAILED_MAX_UDP_RETRANS, E_FAILED_TCP_CONNECT, E_FAILED_TCP_CLOSED, E_FAILED_UNEXPECTED_MSG, E_FAILED_CALL_REJECTED, E_FAILED_CMD_NOT_SENT, E_FAILED_REGEXP_DOESNT_MATCH, E_FAILED_REGEXP_SHOULDNT_MATCH, E_FAILED_REGEXP_HDR_NOT_FOUND, E_FAILED_OUTBOUND_CONGESTION, E_FAILED_TIMEOUT_ON_RECV, E_FAILED_TIMEOUT_ON_SEND, E_OUT_OF_CALL_MSGS, E_WATCHDOG_MAJOR, E_WATCHDOG_MINOR, E_DEAD_CALL_MSGS, E_FATAL_ERRORS, E_WARNING, E_RETRANSMISSION, E_AUTO_ANSWERED, E_ADD_GENERIC_COUNTER }; /** * Counters management */ enum E_CounterName { // Per-Scenario Counters // Cumulative counters CPT_C_IncomingCallCreated, CPT_C_OutgoingCallCreated, CPT_C_SuccessfulCall, CPT_C_FailedCall, CPT_C_CurrentCall, CPT_C_CurrentCallPeak, CPT_C_CurrentCallPeakTime, CPT_C_NbOfCallUsedForAverageCallLength, CPT_C_AverageCallLength_Sum, CPT_C_AverageCallLength_Squares, CPT_C_FailedCallCannotSendMessage, CPT_C_FailedCallMaxUdpRetrans, CPT_C_FailedCallTcpConnect, CPT_C_FailedCallTcpClosed, CPT_C_FailedCallUnexpectedMessage, CPT_C_FailedCallCallRejected, CPT_C_FailedCallCmdNotSent, CPT_C_FailedCallRegexpDoesntMatch, CPT_C_FailedCallRegexpShouldntMatch, CPT_C_FailedCallRegexpHdrNotFound, CPT_C_FailedOutboundCongestion, CPT_C_FailedTimeoutOnRecv, CPT_C_FailedTimeoutOnSend, CPT_C_Retransmissions, // Periodic Display counter CPT_PD_IncomingCallCreated, // must be first (RESET_PD_COUNTER macro) CPT_PD_OutgoingCallCreated, CPT_PD_SuccessfulCall, CPT_PD_FailedCall, CPT_PD_CurrentCallPeak, CPT_PD_CurrentCallPeakTime, CPT_PD_NbOfCallUsedForAverageCallLength, CPT_PD_AverageCallLength_Sum, CPT_PD_AverageCallLength_Squares, CPT_PD_NbOfCallUsedForAverageResponseTime, CPT_PD_NbOfCallUsedForAverageResponseTime_2, // This must match or exceed MAX_RTD_INFO CPT_PD_NbOfCallUsedForAverageResponseTime_3, // This must match or exceed MAX_RTD_INFO CPT_PD_NbOfCallUsedForAverageResponseTime_4, // This must match or exceed MAX_RTD_INFO CPT_PD_NbOfCallUsedForAverageResponseTime_5, // This must match or exceed MAX_RTD_INFO CPT_PD_AverageResponseTime_Sum, CPT_PD_AverageResponseTime_Sum_2, CPT_PD_AverageResponseTime_Sum_3, CPT_PD_AverageResponseTime_Sum_4, CPT_PD_AverageResponseTime_Sum_5, CPT_PD_AverageResponseTime_Squares, CPT_PD_AverageResponseTime_Squares_2, CPT_PD_AverageResponseTime_Squares_3, CPT_PD_AverageResponseTime_Squares_4, CPT_PD_AverageResponseTime_Squares_5, CPT_PD_FailedCallCannotSendMessage, CPT_PD_FailedCallMaxUdpRetrans, CPT_PD_FailedCallTcpConnect, CPT_PD_FailedCallTcpClosed, CPT_PD_FailedCallUnexpectedMessage, CPT_PD_FailedCallCallRejected, CPT_PD_FailedCallCmdNotSent, CPT_PD_FailedCallRegexpDoesntMatch, CPT_PD_FailedCallRegexpShouldntMatch, CPT_PD_FailedCallRegexpHdrNotFound, CPT_PD_FailedOutboundCongestion, CPT_PD_FailedTimeoutOnRecv, CPT_PD_FailedTimeoutOnSend, CPT_PD_Retransmissions, // Periodic logging counter CPT_PL_IncomingCallCreated, // must be first (RESET_PL_COUNTER macro) CPT_PL_OutgoingCallCreated, CPT_PL_SuccessfulCall, CPT_PL_FailedCall, CPT_PL_CurrentCallPeak, CPT_PL_CurrentCallPeakTime, CPT_PL_NbOfCallUsedForAverageCallLength, CPT_PL_AverageCallLength_Sum, /* The squares let us compute the standard deviation. */ CPT_PL_AverageCallLength_Squares, CPT_PL_NbOfCallUsedForAverageResponseTime, CPT_PL_NbOfCallUsedForAverageResponseTime_2, CPT_PL_NbOfCallUsedForAverageResponseTime_3, CPT_PL_NbOfCallUsedForAverageResponseTime_4, CPT_PL_NbOfCallUsedForAverageResponseTime_5, CPT_PL_AverageResponseTime_Sum, CPT_PL_AverageResponseTime_Sum_2, CPT_PL_AverageResponseTime_Sum_3, CPT_PL_AverageResponseTime_Sum_4, CPT_PL_AverageResponseTime_Sum_5, CPT_PL_AverageResponseTime_Squares, CPT_PL_AverageResponseTime_Squares_2, CPT_PL_AverageResponseTime_Squares_3, CPT_PL_AverageResponseTime_Squares_4, CPT_PL_AverageResponseTime_Squares_5, CPT_PL_FailedCallCannotSendMessage, CPT_PL_FailedCallMaxUdpRetrans, CPT_PL_FailedCallTcpConnect, CPT_PL_FailedCallTcpClosed, CPT_PL_FailedCallUnexpectedMessage, CPT_PL_FailedCallCallRejected, CPT_PL_FailedCallCmdNotSent, CPT_PL_FailedCallRegexpDoesntMatch, CPT_PL_FailedCallRegexpShouldntMatch, CPT_PL_FailedCallRegexpHdrNotFound, CPT_PL_FailedOutboundCongestion, CPT_PL_FailedTimeoutOnRecv, CPT_PL_FailedTimeoutOnSend, CPT_PL_Retransmissions, E_NB_COUNTER, // Global Counters // Cumulative counters CPT_G_C_OutOfCallMsgs, CPT_G_C_DeadCallMsgs, CPT_G_C_FatalErrors, CPT_G_C_Warnings, CPT_G_C_WatchdogMajor, CPT_G_C_WatchdogMinor, CPT_G_C_AutoAnswered, // Periodic Display counter CPT_G_PD_OutOfCallMsgs, CPT_G_PD_DeadCallMsgs, CPT_G_PD_FatalErrors, CPT_G_PD_Warnings, CPT_G_PD_WatchdogMajor, CPT_G_PD_WatchdogMinor, CPT_G_PD_AutoAnswered, // must be last (RESET_PD_COUNTER) // Periodic logging counter CPT_G_PL_OutOfCallMsgs, CPT_G_PL_DeadCallMsgs, CPT_G_PL_FatalErrors, CPT_G_PL_Warnings, CPT_G_PL_WatchdogMajor, CPT_G_PL_WatchdogMinor, CPT_G_PL_AutoAnswered, // must be last (RESET_PL_COUNTER) E_NB_G_COUNTER }; /* ** exported methods */ /** * Constructor. */ CStat (); /** * Destructor. */ ~CStat (); /** * Delete the single instance of the class. * * Only one instance of CStat exists in the component. This * instance is deleted when the close method is called. */ void close (); /** * ComputeStat Methods are used to modify counter value * It's the main interface to update counter * * @return 0 if the action is known * -1 else */ int computeStat (E_Action P_action); int computeStat (E_Action P_action, unsigned long P_value); int computeStat (E_Action P_action, unsigned long P_value, int which); /* This works for global counters and does not require an instance. */ static int globalStat (E_Action P_action); /** * ComputeRtt Methods are used to calculate the response time */ void computeRtt ( unsigned long long P_start_time, unsigned long long P_stop_time, int which); /** * GetStat Method is used to retrieve a counter value * * @return the counter value **/ unsigned long long GetStat (E_CounterName P_counter); /* Get the current start time. */ void getStartTime(struct timeval *t); /** * formatTime. * * This method converts a struct timeval parameter into a printable string * in the format given in parameter. * * @param P_tv. * @return a pointer on a static string containing formated time */ static char* formatTime (struct timeval* P_tv, bool with_epoch = false); /** * setRepartitionCallLength * - set the unsigned int table passed in parameter as the repartition table * for call length. This is done by calling the initRepartition methode on * the M_CallLengthRepartition variable. * - set the char* list of int (must be separeted with coma as the * repartition table for call length * This is done by calling the createIntegerTable to transform the char* * list into unsigned int list. Then the initRepartition methode is * call with the created unsigned int list and the M_CallLengthRepartition * variable * * setRepartitionResponseTime * Same than setRepartitionCallLength with the variable * M_ResponseTimeRepartition variableinstead of M_CallLengthRepartition * variable */ void setRepartitionCallLength (unsigned int* repartition, int nombre); void setRepartitionCallLength (char * liste); void setRepartitionResponseTime (unsigned int* repartition, int nombre); void setRepartitionResponseTime (char * liste); /* define the file name to use to dump statistic in file */ void setFileName(const char* name); void setFileName(const char* name, const char* extension); void initRtt(const char* name, const char* extension, unsigned long P_value); /** * Display data periodically updated on screen. */ void displayData (FILE *f); void displayStat(FILE *f); void displayRepartition(FILE *f); void displayRtdRepartition (FILE *f, int which); /** * Dump data periodically in the file M_FileName */ void dumpData (); void dumpDataRtt (); /** * initialize the class variable member */ int init(); /** * computeDiffTimeInMs. * * This method calculates elaped time in ms * * @param tf = final date * @param ti = initial date * * @return number of ms between the 2 dates */ static long computeDiffTimeInMs (struct timeval* tf, struct timeval* ti); /** * msToHHMMSS. * * This converts an unsigned long containing a number of ms * into a string expressing the same value in format HH:MM:SS. * * @param P_ms. * * @return a pointer on a static string containing formated time */ static char* msToHHMMSS (unsigned long P_ms); /** * msToHHMMSSmm. * * This converts an unsigned long containing a number of ms * into a string expressing the same value in format HH:MM:SS:mmm. * * @param P_ms. * * @return a pointer on a static string containing formated time */ static char* msToHHMMSSus (unsigned long P_ms); /* Get a counter ID by name. */ int findCounter(const char *counter, bool alloc); int findRtd(const char *name, bool start); void validateRtds(); int nRtds(); private: unsigned long long M_counters[E_NB_COUNTER]; static unsigned long long M_G_counters[E_NB_G_COUNTER - E_NB_COUNTER]; #define GENERIC_C 0 #define GENERIC_PD 1 #define GENERIC_PL 2 #define GENERIC_TYPES 3 unsigned long long *M_genericCounters; str_int_map M_genericMap; int_str_map M_revGenericMap; int_str_map M_genericDisplay; str_int_map rtd_started; str_int_map rtd_stopped; #define RTD_COUNT 0 #define RTD_SUM 1 #define RTD_SUMSQ 2 #define RTD_TYPES 3 unsigned long long *M_rtdInfo; str_int_map M_rtdMap; int_str_map M_revRtdMap; T_dynamicalRepartition** M_ResponseTimeRepartition; T_dynamicalRepartition* M_CallLengthRepartition; int M_SizeOfResponseTimeRepartition; int M_SizeOfCallLengthRepartition; struct timeval M_startTime; struct timeval M_pdStartTime; struct timeval M_plStartTime; bool M_headerAlreadyDisplayed; char* M_fileName; ofstream* M_outputStream; bool M_headerAlreadyDisplayedRtt ; char* M_fileNameRtt ; ofstream* M_outputStreamRtt ; double M_time_ref ; T_pValue_rtt M_dumpRespTime ; unsigned int M_counterDumpRespTime ; unsigned long M_report_freq_dumpRtt ; /** * initRepartition * This methode is used to create the repartition table with a table of * unsigned int the reparition is created like following, with Vi the given * value in the table * 0 <= x < V1 * V1 <= x < V2 * ... * Vn-1 <= x < Vn * x >= Vn * So the repartition table have the size n+1 if the given table has a size * of n */ void initRepartition(unsigned int* repartition, int nombre, T_dynamicalRepartition ** tabRepartition, int* nbTab); /** * createIntegerTable * this method try to create a table of unsigned int with the list of char* * passed in parameters * if it succed, it's return true (1) * else it's return false (0) */ int createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList); /** * isWellFormed * this method check if the char* passed in parameter in really a list of * integer separated with comma. * if yes, it's return true (1) * else, it's return false (0) */ int isWellFormed(char * P_listeStr, int * nombre); /** * updateRepartition * The method looks for the place to set the value passed in parameter * Once found, the associated counter is incremented */ void updateRepartition( T_dynamicalRepartition* tabRepart, int sizeOfTab, unsigned long value); /** * resetRepartition * Zeros out all repartition counters. */ void resetRepartition(T_dynamicalRepartition* P_tabReport, int P_sizeOfTab); /** * displayRepartition * Display the repartition passed in parameter at the screen */ void displayRepartition(FILE *f, T_dynamicalRepartition * tabRepartition, int sizeOfTab); /** * sRepartitionHeader * return a string with the range description of the given repartition */ char* sRepartitionHeader(T_dynamicalRepartition * tabRepartition, int sizeOfTab, const char* P_repartitionName); /** * sRepartitionInfo * return a string with the number of value in the differente range of the * given repartition */ char* sRepartitionInfo(T_dynamicalRepartition * tabRepartition, int sizeOfTab); /** * UpdateAverageCounter * This methode compute the real moyenne with the passed value on the given * counter */ void updateAverageCounter(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares, unsigned long P_value); /** * computeStdev * This method computes the standard deviation using our recorded mean * and recorded mean square. */ double computeStdev(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed, E_CounterName P_Squares); /** * computeMean * This method computes the recorded sum and count. */ double computeMean(E_CounterName P_SumCounter, E_CounterName P_NbOfCallUsed); double computeRtdMean(int which, int type); double computeRtdStdev(int which, int type); /** * Effective C++ * * To prevent public copy ctor usage: no implementation */ CStat (const CStat&); /** * Effective C++ * * To prevent public operator= usage: no implementation */ CStat& operator=(const CStat&); }; /** * This abstract class provides the ability to sample from a distribution. */ class CSample { public: virtual double sample() = 0; virtual int textDescr(char *s, int len) = 0; virtual int timeDescr(char *s, int len) = 0; virtual double cdfInv(double percentile) = 0; virtual ~CSample(); private: }; /* Always return a fixed value for the sample. */ class CFixed : public CSample { public: CFixed(double value); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); private: double value; }; /* Return the default scenario duration. */ class CDefaultPause : public CSample { public: CDefaultPause(); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); private: }; /* Uniform distribution. */ class CUniform : public CSample { public: CUniform(double min, double max); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); private: double min, max; }; #ifdef HAVE_GSL /* Normal distribution. */ class CNormal : public CSample { public: CNormal(double mean, double stdev); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); protected: double mean, stdev; gsl_rng *rng; }; /* Lognormal distribution. */ class CLogNormal : public CNormal { public: CLogNormal(double mean, double stdev) : CNormal(mean, stdev) {}; double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); }; /* Exponential distribution. */ class CExponential : public CSample { public: CExponential(double mean); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); private: double mean; gsl_rng *rng; }; /* Weibull distribution. */ class CWeibull : public CSample { public: CWeibull(double lambda, double k); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); private: double lambda, k; gsl_rng *rng; }; /* Pareto distribution. */ class CPareto : public CSample { public: CPareto(double k, double xsubm); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); protected: double k, xsubm; gsl_rng *rng; }; /* Generalized Pareto distribution. */ class CGPareto : public CSample { public: CGPareto(double shape, double scale, double location); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); protected: double shape, scale, location; gsl_rng *rng; }; /* Gamma distribution. */ class CGamma : public CSample { public: CGamma(double k, double theta); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); protected: double k, theta; gsl_rng *rng; }; /* Negative Binomial distribution. */ class CNegBin : public CSample { public: CNegBin(double p, double n); double sample(); int textDescr(char *s, int len); int timeDescr(char *s, int len); double cdfInv(double percentile); protected: double p, n; gsl_rng *rng; }; #endif #endif // __STAT_H__ sipp-3.5.1/include/config.h.in0000644000175000017500000001572412672463317015217 0ustar vsevavseva/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* define if the compiler supports basic C++11 syntax */ #undef HAVE_CXX11 /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* This platform supports epoll(7). */ #undef HAVE_EPOLL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_CDF_H /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_RANDIST_H /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_RNG_H /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO /* Define to 1 if you have the `curses' library (-lcurses). */ #undef HAVE_LIBCURSES /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `ssl' library (-lssl). */ #undef HAVE_LIBSSL /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_SCTP_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_BIO_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ERR_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_MD5_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SSL_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_X509V3_H /* Define to 1 if you have the header file. */ #undef HAVE_PCAP_H /* Define to 1 if libpcap has the pcap_next_ex function. */ #undef HAVE_PCAP_NEXT_EX /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define as `fork' if `vfork' does not work. */ #undef vfork sipp-3.5.1/include/ratetask.hpp0000644000175000017500000000274112672462535015517 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #ifndef RATETASK_HPP #define RATETASK_HPP #include "task.hpp" class ratetask : public task { public: unsigned int wake(); static void initialize(); bool run(); void dump(); private: static class ratetask *instance; }; #endif sipp-3.5.1/include/comp.h0000644000175000017500000000327612672462535014303 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #include #include #ifdef __cplusplus extern "C" { #endif char* comp_load(void); #ifndef COMP_MAIN extern #endif int (*comp_compress) (void ** state, char * msg, unsigned int * msg_len); #ifndef COMP_MAIN extern #endif int (*comp_uncompress) (void ** state, char * msg, unsigned int * msg_len); #ifndef COMP_MAIN extern #endif void (*comp_free) (void ** state); #ifndef COMP_MAIN extern #endif char comp_error[255]; #ifdef __hpux #define COMP_PLUGGIN "sippcomp.sl" #else #define COMP_PLUGGIN "sippcomp.so" #endif #define COMP_OK 0 #define COMP_DISCARD 1 #define COMP_REPLY 2 #define COMP_KO -1 #ifdef __cplusplus } #endif sipp-3.5.1/include/reporttask.hpp0000644000175000017500000000332712672462535016100 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #ifndef REPORTTASK_HPP #define REPORTTASK_HPP #include "task.hpp" class screentask : public task { public: unsigned int wake(); static void report(bool last); static void initialize(); bool run(); void dump(); private: static class screentask *instance; }; class stattask : public task { public: unsigned int wake(); static void report(); static void initialize(); bool run(); void dump(); private: static class stattask *instance; }; #endif sipp-3.5.1/include/prepare_pcap.h0000644000175000017500000000363012672462535016000 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Guillaume TEISSIER from FTR&D 02/02/2006 */ #ifndef PREPARE_PCAP_H #define PREPARE_PCAP_H 1 #include #include #include #include #if defined(__HPUX) || defined(__DARWIN) || defined(__CYGWIN) || defined(__FreeBSD__) #define u_int8_t uint8_t #define u_int16_t uint16_t #define u_int32_t uint32_t struct iphdr { #ifdef _HPUX_LI unsigned int ihl:4; unsigned int version:4; #else unsigned int version:4; unsigned int ihl:4; #endif u_int8_t tos; u_int16_t tot_len; u_int16_t id; u_int16_t frag_off; u_int8_t ttl; u_int8_t protocol; u_int16_t check; u_int32_t saddr; u_int32_t daddr; /*The options start here. */ }; #endif typedef struct { u_char *data; u_long pktlen; struct timeval ts; int partial_check; } pcap_pkt; #define PCAP_MAXPACKET 1500 typedef struct { char *file; u_int16_t base; u_long max_length; pcap_pkt *max; pcap_pkt *pkts; } pcap_pkts; #ifdef __cplusplus extern "C" { #endif int check(u_int16_t *, int); u_int16_t checksum_carry(int); int prepare_pkts(char *, pcap_pkts *); #ifdef __cplusplus } #endif #endif /* PREPARE_PCAP_H */ sipp-3.5.1/include/rijndael.h0000644000175000017500000000164012672462535015126 0ustar vsevavseva/*------------------------------------------------------------------- * Example algorithms f1, f1*, f2, f3, f4, f5, f5* *------------------------------------------------------------------- * * A sample implementation of the example 3GPP authentication and * key agreement functions f1, f1*, f2, f3, f4, f5 and f5*. This is * a byte-oriented implementation of the functions, and of the block * cipher kernel function Rijndael. * * This has been coded for clarity, not necessarily for efficiency. * * The functions f2, f3, f4 and f5 share the same inputs and have * been coded together as a single function. f1, f1* and f5* are * all coded separately. * *-----------------------------------------------------------------*/ #ifndef RIJNDAEL_H #define RIJNDAEL_H #include void RijndaelKeySchedule(uint8_t key[16]); void RijndaelEncrypt(uint8_t input[16], uint8_t output[16]); #endif sipp-3.5.1/include/defines.h0000644000175000017500000000302012672462535014745 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors */ #ifndef __DEFINES_H__ #define __DEFINES_H__ #ifdef __cplusplus extern "C" { #endif void ERROR(const char *fmt, ...) __attribute__ ((format(printf, 1, 2), noreturn)); void WARNING(const char *fmt, ...) __attribute__((format(printf, 1, 2))); void ERROR_NO(const char *fmt, ...) __attribute__ ((format(printf, 1, 2), noreturn)); void WARNING_NO(const char *fmt, ...) __attribute__((format(printf, 1, 2))); #ifdef __cplusplus } #endif #define MAX_PATH 250 #define EXIT_TEST_OK 0 #define EXIT_TEST_FAILED 1 #define EXIT_TEST_RES_INTERNAL 97 #define EXIT_TEST_RES_UNKNOWN 98 #define EXIT_OTHER 99 #define EXIT_FATAL_ERROR -1 #define EXIT_BIND_ERROR -2 #endif /* __DEFINES_H__ */ sipp-3.5.1/include/time.hpp0000644000175000017500000000200012672462535014623 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #ifndef __SIPP_TIME_H__ #define __SIPP_TIME_H__ extern unsigned long getmilliseconds(); extern unsigned long long getmicroseconds(); void sipp_usleep(unsigned long usec); #endif /* __SIPP_TIME_H__ */ sipp-3.5.1/include/endianshim.h0000644000175000017500000000103312672462535015451 0ustar vsevavseva#ifndef ENDIANSHIM_H #define ENDIANSHIM_H 1 #if defined(__CYGWIN) || defined(__LINUX) #include #elif defined(__FreeBSD__) #include #elif defined(__DARWIN) #include #endif #ifdef __DARWIN #define le16toh(x) OSSwapLittleToHostInt16(x) #endif /* HP-UX 11 is missing byteswap.h, so we provide our own bswap_16() */ #ifdef __HPUX #define bswap_16(x) ((uint16_t)( \ (((uint16_t)(x)) << 8) | \ (((uint16_t)(x)) >> 8))) #define le16toh(x) bswap_16(x) #endif #endif /* ENDIANSHIM_H */ sipp-3.5.1/include/sip_parser.hpp0000644000175000017500000000260312672462535016045 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. */ #ifndef __SIPP_SIP_PARSER_H__ #define __SIPP_SIP_PARSER_H__ #define MAX_HEADER_LEN 2049 char *get_call_id(const char *msg); char *get_peer_tag(const char *msg); int get_method(char *msg); unsigned long int get_cseq_value(char *msg); unsigned long get_reply_code(char *msg); char *get_header_content(const char * message, const char * name); char *get_header(const char * message, const char * name, bool content); char *get_first_line(const char * message); #endif /* __SIPP_SIP_PARSER_H__ */ sipp-3.5.1/include/screen.hpp0000644000175000017500000000225112672462535015154 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ /**** * Screen.hpp : Simple curses & logfile encapsulation */ #ifndef __SCREEN_H__ #define __SCREEN_H__ #include #include "defines.h" void screen_set_exename(const char* exe_name); void screen_init(); void screen_clear(); int screen_readkey(); void screen_exit(); void screen_show_errors(); #endif // __SCREEN_H__ sipp-3.5.1/include/variables.hpp0000644000175000017500000000671412672462535015655 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. */ #ifndef _CVARIABLE #define _CVARIABLE #include #include #include #include typedef std::map str_int_map; typedef std::map int_str_map; typedef std::map int_int_map; #define BUFFER_SIZE 512 #define MAX_MATCHING_EXPR 50 #define REGEXP_PARAMS REG_EXTENDED enum T_VarType { E_VT_REGEXP = 0, E_VT_DOUBLE, E_VT_BOOL, E_VT_STRING, E_VT_UNDEFINED }; class CCallVariable { public: bool isSet(); bool isDouble(); bool isBool(); bool isRegExp(); bool isString(); // WARNING : setMatchingValue does't allocate the memory for the matching value // but the destructor free the memory void setMatchingValue(char* P_matchingValue); char* getMatchingValue(); /* When the variable is used for a string, these functions should be called. */ // WARNING : setString does't allocate the memory for the matching value // but the destructor free the memory void setString(char *s); char *getString(); /* When the variable is used for a double, these functions should be called. */ void setDouble(double val); double getDouble(); /* When the variable is used for a bool, these functions should be called. */ void setBool(bool val); bool getBool(); /* Cast this to a double variable, return the result in newValue. */ bool toDouble(double *newValue); // constructor and destructor CCallVariable(); ~CCallVariable(); private: T_VarType M_type; char* M_matchingValue; int M_nbOfMatchingValue; double M_double; char* M_stringValue; bool M_bool; }; class AllocVariableTable; class VariableTable { public: VariableTable(VariableTable *parent, int size); VariableTable(AllocVariableTable *src); VariableTable *getTable(); void putTable(); int size; CCallVariable *getVar(int i); protected: virtual ~VariableTable(); void expand(int size); int count; int level; CCallVariable **variableTable; VariableTable *parent; }; class AllocVariableTable : public VariableTable { public: AllocVariableTable(AllocVariableTable *av_parent); ~AllocVariableTable(); int find(const char *name, bool allocate); char *getName(int i); void validate(); void dump(); private: AllocVariableTable *av_parent; str_int_map variableMap; int_str_map variableRevMap; int_int_map variableReferences; }; void clear_int_str(int_str_map m); void clear_str_int(str_int_map m); void clear_int_int(int_int_map m); #endif sipp-3.5.1/include/strings.hpp0000644000175000017500000000225312672462535015370 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #ifndef __SIPP_STRINGS_H__ #define __SIPP_STRINGS_H__ #include char *strcasestr2 (char *__haystack, const char *__needle); char *strncasestr (char *s, const char *find, size_t n); void init_tolower_table(); int get_decimal_from_hex(char hex); void get_host_and_port(const char *addr, char *host, int *port); void trim(char *s); #endif /* __SIPP_STRINGS_H__ */ sipp-3.5.1/include/call_generation_task.hpp0000644000175000017500000000357312672462535020055 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #ifndef CALLGENERATIONTASK_HPP #define CALLGENERATIONTASK_HPP #include "task.hpp" #define DONT_RESCHEDULE 0 class CallGenerationTask : public task { public: static void initialize(); static void set_rate(double new_rate); static void set_users(int new_users); static void set_paused(bool paused); static void free_user(int userId); bool run(); void dump(); protected: unsigned int wake(); private: CallGenerationTask(); virtual ~CallGenerationTask(); static class CallGenerationTask *instance; static unsigned long calls_since_last_rate_change; static unsigned long last_rate_change_time; }; #endif sipp-3.5.1/include/send_packets.h0000644000175000017500000001245612672462535016010 0ustar vsevavseva/* * send_packets.h: from tcpreplay tools by Aaron Turner * http://tcpreplay.sourceforge.net/ * send_packets.h is under BSD license (see below) * SIPp is under GPL license * * Copyright (c) 2001-2004 Aaron Turner. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the names of the copyright owners nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef _SIPP_SEND_PACKETS_H_ #define _SIPP_SEND_PACKETS_H_ #include #include #include #include #include #include "prepare_pcap.h" inline void timerdiv (struct timeval *tvp, float div); inline void float2timer (float time, struct timeval *tvp); #ifndef TIMEVAL_TO_TIMESPEC #define TIMEVAL_TO_TIMESPEC(tv, ts) { \ (ts)->tv_sec = (tv)->tv_sec; \ (ts)->tv_nsec = (tv)->tv_usec * 1000; } #endif /* zero out a timer */ #ifndef timerclear #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0 #endif /* is timer non-zero? */ #ifndef timerisset #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) #endif /* add tvp and uvp and store in vvp */ #ifndef timeradd #define timeradd(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \ if ((vvp)->tv_usec >= 1000000) { \ (vvp)->tv_sec++; \ (vvp)->tv_usec -= 1000000; \ } \ } while (0) #endif /* subtract uvp from tvp and store in vvp */ #ifndef timersub #define timersub(tvp, uvp, vvp) \ do { \ (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \ (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \ if ((vvp)->tv_usec < 0) { \ (vvp)->tv_sec--; \ (vvp)->tv_usec += 1000000; \ } \ } while (0) #endif /* compare tvp and uvp using cmp */ #ifndef timercmp #define timercmp(tvp, uvp, cmp) \ (((tvp)->tv_sec == (uvp)->tv_sec) ? \ ((tvp)->tv_usec cmp (uvp)->tv_usec) : \ ((tvp)->tv_sec cmp (uvp)->tv_sec)) #endif /* multiply tvp by x and store in uvp */ #define timermul(tvp, uvp, x) \ do { \ (uvp)->tv_sec = (tvp)->tv_sec * x; \ (uvp)->tv_usec = (tvp)->tv_usec * x; \ while((uvp)->tv_usec > 1000000) { \ (uvp)->tv_sec++; \ (uvp)->tv_usec -= 1000000; \ } \ } while(0) /* device tvp by x. store in tvp */ #define timerdiv2(tvp, x) \ do { \ (tvp)->tv_sec = (tvp)->tv_sec / x; \ (tvp)->tv_usec = (tvp)->tv_usec / x; \ } while(0) /* call specific vars for RTP sending */ typedef struct { /* pointer to a RTP pkts container */ pcap_pkts *pcap; /* Used in send_packets thread */ struct sockaddr_storage to; struct sockaddr_storage from; } play_args_t; #ifdef __cplusplus extern "C" { #endif int parse_play_args(const char*, pcap_pkts*); void free_pcaps(pcap_pkts *pkts); int send_packets(play_args_t*); #ifdef __cplusplus } #endif #endif/*_SIPP_SEND_PACKETS_H_*/ sipp-3.5.1/include/logger.hpp0000644000175000017500000000620312672462535015155 0ustar vsevavseva#ifndef __SIPP_LOGGER_H__ #define __SIPP_LOGGER_H__ /************************** Trace Files ***********************/ #include #include "sipp.hpp" #ifdef GLOBALS_FULL_DEFINITION #define extern #define _DEFVAL(value) = value #else #define _DEFVAL(value) #endif extern FILE * screenf _DEFVAL(0); extern FILE * countf _DEFVAL(0); extern FILE * codesf _DEFVAL(0); // extern FILE * timeoutf _DEFVAL(0); extern bool useMessagef _DEFVAL(0); extern bool useErrorCodesf _DEFVAL(0); extern bool useCallDebugf _DEFVAL(0); extern bool useShortMessagef _DEFVAL(0); extern bool useScreenf _DEFVAL(0); extern bool useLogf _DEFVAL(0); // extern bool useTimeoutf _DEFVAL(0); extern bool dumpInFile _DEFVAL(0); extern bool dumpInRtt _DEFVAL(0); extern bool useCountf _DEFVAL(0); extern char * slave_cfg_file; extern unsigned long long max_log_size _DEFVAL(0); extern unsigned long long ringbuffer_size _DEFVAL(0); extern int ringbuffer_files _DEFVAL(0); extern char screen_last_error[32768]; extern char screen_logfile[MAX_PATH] _DEFVAL(""); /* Log Rotation Functions. */ struct logfile_id { time_t start; int n; }; struct logfile_info { const char *name; bool check; FILE *fptr; int nfiles; struct logfile_id *ftimes; char file_name[MAX_PATH]; bool overwrite; bool fixedname; time_t starttime; unsigned int count; }; void print_header_line(FILE *f); void print_bottom_line(FILE *f, int last); void print_variable_list(); void print_tdm_map(); void print_screens(void); void log_off(struct logfile_info *lfi); #ifdef GLOBALS_FULL_DEFINITION #define LOGFILE(name, s, check) \ struct logfile_info name = { s, check, NULL, 0, NULL, "", true, false, 0, 0} #else #define LOGFILE(name, s, check) \ extern struct logfile_info name #endif LOGFILE(calldebug_lfi, "calldebug", true); LOGFILE(message_lfi, "messages", true); LOGFILE(screen_lfi, "screen", true); LOGFILE(shortmessage_lfi, "shortmessages", true); LOGFILE(log_lfi, "logs", true); LOGFILE(error_lfi, "errors", false); void rotate_logfile(); void rotate_shortmessagef(); void rotate_errorf(); void rotate_messagef(); void rotate_screenf(); void rotate_calldebugf(); /* Screen/Statistics Printing Functions. */ void print_statistics(int last); void print_count_file(FILE* f, int header); void print_error_codes_file(FILE* f); /* This must go after the GLOBALS_FULL_DEFINITION, because we need the extern keyword. */ int TRACE_MSG(const char* fmt, ...) __attribute__((format(printf, 1, 2))); int TRACE_CALLDEBUG(const char* fmt, ...) __attribute__((format(printf, 1, 2))); int TRACE_SHORTMSG(const char* fmt, ...) __attribute__((format(printf, 1, 2))); int LOG_MSG(const char* fmt, ...) __attribute__((format(printf, 1, 2))); #endif /* __SIPP_LOGGER_H__ */ sipp-3.5.1/include/task.hpp0000644000175000017500000001006512672462535014641 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #ifndef __TASK__ #define __TASK__ #include #include #include #include /* Forward declaration of call, so that we can define the call_list iterator * that is referenced from call. */ class task; typedef std::list task_list; /* This arrangement of wheels lets us support up to 32 bit timers. * * If we were to put a minimum bound on timer_resol (or do some kind of dynamic * allocation), then we could reduce the level one order by a factor of * timer_resol. */ #define LEVEL_ONE_ORDER 12 #define LEVEL_TWO_ORDER 10 #define LEVEL_THREE_ORDER 10 #define LEVEL_ONE_SLOTS (1 << LEVEL_ONE_ORDER) #define LEVEL_TWO_SLOTS (1 << LEVEL_TWO_ORDER) #define LEVEL_THREE_SLOTS (1 << LEVEL_THREE_ORDER) /* A time wheel structure as defined in Varghese and Lauck's 1996 journal * article (based on their 1987 SOSP paper). */ class timewheel { public: timewheel(); int expire_paused_tasks(); /* Add a paused task and increment count. */ void add_paused_task(task *task, bool increment); void remove_paused_task(task *task); int size(); private: /* How many task are in this wheel. */ int count; unsigned long wheel_base; /* The actual wheels. This is a variation on having one wheel for * seconds, another for minutes and a third for hours - in this * model, the first wheel holds tasks that should be scheduled in * the next 2^12ms (~4s), the second wheel holds tasks that * should be scheduled between 2^12 and 2^22ms (~4s-~69m), and * the third wheel holds tasks that should be scheduled between * 2^22ms and 2^32ms (~69m-~8 years). */ task_list wheel_one[LEVEL_ONE_SLOTS]; task_list wheel_two[LEVEL_TWO_SLOTS]; task_list wheel_three[LEVEL_THREE_SLOTS]; /* Calls that are paused indefinitely. */ task_list forever_list; /* Turn a task into a list (based on wakeup). */ task_list *task2list(task *task); }; class task { public: task(); virtual ~task(); virtual bool run() = 0; /* Our abort action. */ virtual void abort(); /* Dump task info to error log. */ virtual void dump() = 0; protected: /* Wake this up, if we are not already awake. */ void setRunning(); /* Put us to sleep (we must be running). */ void setPaused(); /* When should this task wake up? */ virtual unsigned int wake() = 0; /* Is this task paused or running? */ bool running; private: /* Run and Pause Queue Maintenance. */ void add_to_runqueue(); bool remove_from_runqueue(); void add_to_paused_tasks(bool increment); void recalculate_wheel(); /* This is for our complete task list. */ task_list::iterator taskit; /* If we are running, the iterator to remove us from the running list. */ task_list::iterator runit; /* If we are paused, the iterator to remove us from the paused list. */ task_list::iterator pauseit; /* The list that we are stored in (only when paused) . */ task_list *pauselist; /* The timing wheel is our friend so that it can update our list pointer. */ friend class timewheel; }; task_list * get_running_tasks(); int expire_paused_tasks(); int paused_tasks_count(); void abort_all_tasks(); void dump_tasks(); #endif sipp-3.5.1/include/deadcall.hpp0000644000175000017500000000100312672462535015420 0ustar vsevavseva#include "call.hpp" class deadcall : public virtual task, public virtual listener { public: deadcall(const char *id, const char * reason); ~deadcall(); virtual bool process_incoming(char * msg, struct sockaddr_storage *); virtual bool process_twinSippCom(char * msg); virtual bool run(); /* When should this call wake up? */ virtual unsigned int wake(); /* Dump call info to error log. */ virtual void dump(); protected: unsigned long expiration; char *reason; }; sipp-3.5.1/include/sslcommon.h0000644000175000017500000000334512672462535015354 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Gundu RAO - 16 Jul 2004 * From Hewlett Packard Company. */ #ifndef _ccnv_2_common_h_H #define _ccnv_2_common_h_H #include #include #include #include #include #include #define MUTEX_TYPE pthread_mutex_t #define MUTEX_SETUP(x) pthread_mutex_init(&(x), NULL) #define MUTEX_CLEANUP(x) pthread_mutex_destroy(&(x)) #define MUTEX_LOCK(x) pthread_mutex_lock(&(x)) #define MUTEX_UNLOCK(x) pthread_mutex_unlock(&(x)) #define THREAD_ID pthread_self( ) /* ** Define a global variable for the SSL context */ /* Initialises an SSL context and makes the lib thread safe */ #ifdef __cplusplus extern "C" { #endif #ifndef SSL_MAIN extern #endif int init_OpenSSL(void); #ifndef SSL_MAIN extern #endif int Thread_setup(void); #ifndef SSL_MAIN extern #endif SSL_CTX *setup_ssl_context(SSL_METHOD *); #ifndef SSL_MAIN extern #endif int SSL_ERROR(void); #ifdef __cplusplus } #endif #endif sipp-3.5.1/include/socket.hpp0000644000175000017500000001276612672462535015201 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #ifndef __SIPP_SOCKET_H__ #define __SIPP_SOCKET_H__ #ifdef USE_OPENSSL #include "sslcommon.h" enum ssl_init_status { SSL_INIT_NORMAL, /* 0 Normal completion */ SSL_INIT_ERROR /* 1 Unspecified error */ }; extern SSL_CTX *sip_trp_ssl_ctx; extern SSL_CTX *sip_trp_ssl_ctx_client; const char *sip_tls_error_string(SSL *ssl, int size); ssl_init_status FI_init_ssl_context (void); #endif int flush_socket(struct sipp_socket *socket); int write_socket(struct sipp_socket *socket, const char *buffer, ssize_t len, int flags, struct sockaddr_storage *dest); void sipp_sctp_peer_params(struct sipp_socket *socket); void buffer_read(struct sipp_socket *socket, struct socketbuf *newbuf); int read_error(struct sipp_socket *socket, int ret); struct socketbuf *alloc_socketbuf(char *buffer, size_t size, int copy, struct sockaddr_storage *dest); ssize_t read_message(struct sipp_socket *socket, char *buf, size_t len, struct sockaddr_storage *src); int empty_socket(struct sipp_socket *socket); struct sipp_socket *sipp_allocate_socket(bool use_ipv6, int transport, int fd, int accepting); void setup_ctrl_socket(); void setup_stdin_socket(); int handle_ctrl_socket(); void handle_stdin_socket(); void process_message(struct sipp_socket *socket, char *msg, ssize_t msg_size, struct sockaddr_storage *src); //int write_error(struct sipp_socket *socket, int ret); int enter_congestion(struct sipp_socket *socket, int again); void buffer_write(struct sipp_socket *socket, const char *buffer, size_t len, struct sockaddr_storage *dest); /********************** Network Interfaces ********************/ int send_message(int s, void ** comp_state, char * msg); #ifdef USE_OPENSSL int send_message_tls(SSL *s, void ** comp_state, char * msg); #endif /* Socket Buffer Management. */ #define NO_COPY 0 #define DO_COPY 1 struct socketbuf *alloc_socketbuf(char *buffer, size_t size, int copy); void free_socketbuf(struct socketbuf *socketbuf); /* These buffers lets us read past the end of the message, and then split it if * required. This eliminates the need for reading a message octet by octet and * performing a second read for the content length. */ struct socketbuf { char *buf; size_t len; size_t offset; struct sockaddr_storage addr; struct socketbuf *next; }; #ifdef USE_SCTP #define SCTP_DOWN 0 #define SCTP_CONNECTING 1 #define SCTP_UP 2 #endif /* This is an abstraction of a socket, which provides buffers for input and * output. */ struct sipp_socket { int ss_count; /* How many users are there of this socket? */ int ss_transport; /* T_TCP, T_UDP, or T_TLS. */ bool ss_ipv6; bool ss_control; /* Is this a control socket? */ bool ss_call_socket; /* Is this a call socket? */ bool ss_changed_dest; /* Has the destination changed from default. */ int ss_fd; /* The underlying file descriptor for this socket. */ void *ss_comp_state; /* The compression state. */ #ifdef USE_OPENSSL SSL *ss_ssl; /* The underlying SSL descriptor for this socket. */ BIO *ss_bio; /* The underlying BIO descriptor for this socket. */ #endif struct sockaddr_storage ss_remote_sockaddr; /* Who we are talking to. */ struct sockaddr_storage ss_dest; /* Who we are talking to. */ int ss_pollidx; /* The index of this socket in our poll structures. */ bool ss_congested; /* Is this socket congested? */ bool ss_invalid; /* Has this socket been closed remotely? */ struct socketbuf *ss_in; /* Buffered input. */ size_t ss_msglen; /* Is there a complete SIP message waiting, and if so how big? */ struct socketbuf *ss_out; /* Buffered output. */ #ifdef USE_SCTP int sctpstate; #endif }; /* Write data to a socket. */ int write_socket(struct sipp_socket *socket, const char *buffer, ssize_t len, int flags, struct sockaddr_storage *dest); /* Mark a socket as "bad". */ void sipp_socket_invalidate(struct sipp_socket *socket); /* Abort a connection - close the socket quickly. */ void sipp_abort_connection(int fd); /* Actually free the socket. */ void sipp_close_socket(struct sipp_socket *socket); #define WS_EAGAIN 1 /* Return EAGAIN if there is no room for writing the message. */ #define WS_BUFFER 2 /* Buffer the message if there is no room for writing the message. */ #if defined (__hpux) || defined (__alpha) && !defined (__FreeBSD__) #define sipp_socklen_t int #else #define sipp_socklen_t socklen_t #endif #define SOCK_ADDR_SIZE(a) \ (((a)->ss_family == AF_INET) ? sizeof(struct sockaddr_in) \ : sizeof(struct sockaddr_in6)) #if defined(__cplusplus) && defined (__hpux) #define _RCAST(type, val) (reinterpret_cast (val)) #else #define _RCAST(type, val) ((type)(val)) #endif #endif /* __SIPP_SOCKET_H__ */ sipp-3.5.1/include/rtpstream.hpp0000644000175000017500000000363012672462535015720 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * * Author : Deon van der Westhuysen - June 2012 - Vodacom PTY LTD */ #ifndef __RTPSTREAM__ #define __RTPSTREAM__ #define RTPSTREAM_MAX_FILENAMELEN 256 struct threaddata_t; struct taskentry_t; struct rtpstream_callinfo_t { taskentry_t *taskinfo; int audioport; int videoport; }; struct rtpstream_actinfo_t { char filename[RTPSTREAM_MAX_FILENAMELEN]; int loop_count; int bytes_per_packet; int ms_per_packet; int ticks_per_packet; /* need rework for 11.025 sample rate */ int payload_type; }; int rtpstream_new_call (rtpstream_callinfo_t *callinfo); void rtpstream_end_call (rtpstream_callinfo_t *callinfo); void rtpstream_shutdown (void); int rtpstream_get_audioport (rtpstream_callinfo_t *callinfo); int rtpstream_get_videoport (rtpstream_callinfo_t *callinfo); void rtpstream_set_remote (rtpstream_callinfo_t *callinfo, int ip_ver, char *ip_addr, int audio_port, int video_port); int rtpstream_cache_file (char *filename); void rtpstream_play (rtpstream_callinfo_t *callinfo, rtpstream_actinfo_t *actioninfo); void rtpstream_pause (rtpstream_callinfo_t *callinfo); void rtpstream_resume (rtpstream_callinfo_t *callinfo); #endif sipp-3.5.1/include/xp_parser.h0000644000175000017500000000235612672462535015346 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Copyright (C) 2003 - The Authors * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. */ #ifdef __cplusplus extern "C" { #endif int xp_unescape(const char *source, char *dest); int xp_set_xml_buffer_from_string(const char *str); int xp_set_xml_buffer_from_file(const char *filename); char* xp_open_element(int index); void xp_close_element(void); char* xp_get_value(const char *name); char* xp_get_cdata(void); int xp_get_content_length(const char *P_buffer); #ifdef __cplusplus } #endif sipp-3.5.1/include/scenario.hpp0000644000175000017500000001645312672462535015511 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Peter Higginson * JPeG * Guillaume TEISSIER from FTR&D */ #ifndef __SCENARIO__ #define __SCENARIO__ #include #include #include "actions.hpp" #include "variables.hpp" #include "message.hpp" #include "stat.hpp" #define MSG_TYPE_SENDCMD 0 #define MSG_TYPE_RECVCMD 1 #define MSG_TYPE_SEND 2 #define MSG_TYPE_RECV 3 #define MSG_TYPE_PAUSE 4 #define MSG_TYPE_NOP 5 #define MODE_CLIENT 0 #define MODE_SERVER 1 #define MODE_3PCC_NONE 0 #define MODE_3PCC_CONTROLLER_A 2 #define MODE_3PCC_CONTROLLER_B 3 #define MODE_3PCC_A_PASSIVE 4 /* 3pcc extended mode*/ #define MODE_MASTER 5 #define MODE_MASTER_PASSIVE 6 #define MODE_SLAVE 7 #define OPTIONAL_TRUE 1 #define OPTIONAL_FALSE 0 #define OPTIONAL_GLOBAL 2 class message { public: /* If this is a pause */ CSample *pause_distribution; int pause_variable; /* This string is used for the display screen. */ char *pause_desc; /* Is this a final pause, intended for catching retransmissions? */ bool timewait; /* Number of sessions in a pause */ int sessions; /* should collect route set? */ bool bShouldRecordRoutes; /* should collect authentication info? */ bool bShouldAuthenticate; /* If this is a send */ SendingMessage *send_scheme; unsigned int retrans_delay; /* The receive/send timeout. */ unsigned int timeout; /* 3pcc extended mode: if this is a sendCmd */ char * peer_dest; /* 3pcc extended mode: if this is a recvCmd */ char * peer_src; /* If this is a recv */ int recv_response; char * recv_request; int optional; bool advance_state; int regexp_match; regex_t * regexp_compile; /* Anyway */ int start_rtd; int stop_rtd; bool repeat_rtd; int counter; double lost; int crlf; bool hide; char * display_str; int next; char * nextLabel; int test; int condexec; bool condexec_inverse; int chance;/* 0=always, RAND_MAX+1=never (test rand() >= chance) */ int on_timeout; char * onTimeoutLabel; /* Statistics */ unsigned long nb_sent; unsigned long nb_recv; unsigned long nb_sent_retrans; unsigned long nb_recv_retrans; unsigned long nb_timeout; unsigned long nb_unexp; unsigned long nb_lost; CActions* M_actions; int M_type; SendingMessage *M_sendCmdData; unsigned long M_nbCmdSent; unsigned long M_nbCmdRecv; typedef enum { ContentLengthNoPresent = 0, ContentLengthValueZero, ContentLengthValueNoZero } ContentLengthFlag; ContentLengthFlag content_length_flag ; char *recv_response_for_cseq_method_list; int start_txn; int ack_txn; int response_txn; int index; const char * desc; message(int index, const char *desc); ~message(); }; typedef std::vector msgvec; struct txnControlInfo { char *name; bool isInvite; int acks; int started; int responses; }; typedef std::vector txnvec; class scenario { public: scenario(char * filename, int deflt); ~scenario(); void runInit(); msgvec messages; msgvec initmessages; char *name; int duration; txnvec transactions; int unexpected_jump; int retaddr; int pausedaddr; void computeSippMode(); int get_var(const char *varName, const char *what); int get_counter(const char *varName, const char *what); int get_rtd(const char *ptr, bool start); int find_var(const char *varName); CStat *stats; AllocVariableTable *allocVars; private: /* The mapping of labels to IDs. */ str_int_map labelMap; str_int_map initLabelMap; str_int_map txnMap; bool found_timewait; void getBookKeeping(message *message); void getCommonAttributes(message *message); void getActionForThisMessage(message *message); void parseAction(CActions *actions); void handle_arithmetic(CAction *tmpAction, const char *what); void handle_rhs(CAction *tmpAction, const char *what); void checkOptionalRecv(char *elem, unsigned int scenario_file_cursor); void apply_labels(msgvec v, str_int_map labels); void validate_variable_usage(); void validate_txn_usage(); int get_txn(const char *txnName, const char *what, bool start, bool isInvite, bool isAck); int xp_get_var(const char *name, const char *what); int xp_get_var(const char *name, const char *what, int defval); bool hidedefault; bool last_recv_optional; }; /* There are external variable containing the current scenario */ extern scenario *main_scenario; extern scenario *ooc_scenario; extern scenario *aa_scenario; extern scenario *display_scenario; extern int creationMode; extern int sendMode; extern int thirdPartyMode; extern message::ContentLengthFlag content_length_flag; void load_scenario(char * filename, int deflt); /* 3pcc extended mode */ void parse_slave_cfg(); void getActionForThisMessage(); CSample *parse_distribution(bool oldstyle); int createIntegerTable(char * P_listeStr, unsigned int ** listeInteger, int * sizeOfList); int isWellFormed(char * P_listeStr, int * nombre); /* String table functions. */ int createStringTable(char * inputString, char *** stringList, int *sizeOfList); void freeStringTable(char ** stringList, int sizeOfList); int find_scenario(const char *scenario); extern const char * default_scenario[12]; /* Useful utility functions for parsing integers, etc. */ long get_long(const char *ptr, const char *what); unsigned long long get_long_long(const char *ptr, const char *what); long get_time(const char *ptr, const char *what, int multiplier); double get_double(const char *ptr, const char *what); bool get_bool(const char *ptr, const char *what); int time_string(double ms, char *res, int reslen); int get_var(const char *varName, const char *what); extern int get_cr_number(const char *msg); #endif sipp-3.5.1/include/message.hpp0000644000175000017500000001073612672462535015330 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Olivier Jacques * From Hewlett Packard Company. * Shriram Natarajan * Peter Higginson * Eric Miller * Venkatesh * Enrico Hartung * Nasir Khan * Lee Ballard * Guillaume Teissier from FTR&D * Wolfgang Beck * Venkatesh * Vlad Troyanker * Charles P Wright from IBM Research * Amit On from Followap * Jan Andres from Freenet * Ben Evans from Open Cloud * Marc Van Diest from Belgacom * Andy Aicken */ #ifndef __MESSAGE__ #define __MESSAGE__ #include class scenario; struct MessageComponent; typedef enum { E_Message_Literal, E_Message_Remote_IP, E_Message_Remote_Host, E_Message_Remote_Port, E_Message_Transport, E_Message_Local_IP, E_Message_Local_IP_Type, E_Message_Local_Port, E_Message_Server_IP, E_Message_Media_IP, E_Message_Auto_Media_Port, E_Message_Media_Port, E_Message_Media_IP_Type, E_Message_Call_Number, E_Message_DynamicId, // general usage, global, autoincrementing and wrapping counter E_Message_Call_ID, E_Message_CSEQ, E_Message_PID, E_Message_Service, E_Message_Branch, E_Message_Index, E_Message_Next_Url, E_Message_Len, E_Message_Peer_Tag_Param, E_Message_Routes, E_Message_Variable, E_Message_Fill, E_Message_Injection, E_Message_Last_Header, E_Message_Last_Request_URI, E_Message_Last_CSeq_Number, E_Message_Last_Message, E_Message_TDM_Map, E_Message_Authentication, E_Message_ClockTick, E_Message_Users, E_Message_UserID, E_Message_Timestamp, E_Message_Date, E_Message_SippVersion, E_Message_File, E_Message_Custom #ifdef RTP_STREAM , E_Message_RTPStream_Audio_Port, E_Message_RTPStream_Video_Port #endif } MessageCompType; class SendingMessage { public: SendingMessage(scenario *msg_scenario, char *msg, bool skip_sanity = false); ~SendingMessage(); struct MessageComponent *getComponent(int); int numComponents(); char *getMethod(); int getCode(); bool isResponse(); bool isAck(); bool isCancel(); static void parseAuthenticationKeyword(scenario *msg_scenario, struct MessageComponent *dst, char *keyword); static void freeMessageComponent(struct MessageComponent *comp); private: std::vector messageComponents; char *method; int code; bool ack; bool cancel; bool response; scenario *msg_scenario; // Get parameters from a [keyword] static void getQuotedParam(char * dest, char * src, int * len); static void getHexStringParam(char * dest, char * src, int * len); static void getKeywordParam(char * src, const char * param, char * output); }; /* Custom Keyword Function Type. */ struct MessageComponent; class call; typedef int (*customKeyword)(call *, struct MessageComponent *, char *, int); /* Custom Keyword Registration Function. */ int registerKeyword(char *keyword, customKeyword fxn); struct MessageComponent { MessageCompType type; char *literal; int literalLen; int offset; int varId; union u { /* Authentication Parameters. */ struct { SendingMessage *auth_user; SendingMessage *auth_pass; SendingMessage *aka_OP; SendingMessage *aka_AMF; SendingMessage *aka_K; } auth_param; /* Field Substitution. */ struct { char *filename; int field; SendingMessage *line; } field_param; SendingMessage *filename; customKeyword fxn; } comp_param; }; #endif sipp-3.5.1/include/md5.h0000644000175000017500000000660212672462535014026 0ustar vsevavseva/* Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. L. Peter Deutsch ghost@aladdin.com */ /* $Id: md5.h,v 1.4 2002/04/13 19:20:28 lpd Exp $ */ /* Independent implementation of MD5 (RFC 1321). This code implements the MD5 Algorithm defined in RFC 1321, whose text is available at http://www.ietf.org/rfc/rfc1321.txt . The code is derived from the text of the RFC, including the test suite (section A.5) but excluding the rest of Appendix A. It does not include any code or documentation that is identified in the RFC as being copyrighted. The original and principal author of md5.h is L. Peter Deutsch . Other authors are noted in the change history that follows (in reverse chronological order): 2002-04-13 lpd Removed support for non-ANSI compilers; removed references to Ghostscript; clarified derivation from RFC 1321; now handles byte order either statically or dynamically. 1999-11-04 lpd Edited comments slightly for automatic TOC extraction. 1999-10-18 lpd Fixed typo in header comment (ansi2knr rather than md5); added conditionalization for C++ compilation from Martin Purschke . 1999-05-03 lpd Original version. */ #ifndef md5_INCLUDED # define md5_INCLUDED /* * This package supports both compile-time and run-time determination of CPU * byte order. If ARCH_IS_BIG_ENDIAN is defined as 0, the code will be * compiled to run only on little-endian CPUs; if ARCH_IS_BIG_ENDIAN is * defined as non-zero, the code will be compiled to run only on big-endian * CPUs; if ARCH_IS_BIG_ENDIAN is not defined, the code will be compiled to * run on either big- or little-endian CPUs, but will run slightly less * efficiently on either one than if ARCH_IS_BIG_ENDIAN is defined. */ typedef unsigned char md5_byte_t; /* 8-bit byte */ typedef unsigned int md5_word_t; /* 32-bit word */ /* Define the state of the MD5 Algorithm. */ typedef struct md5_state_s { md5_word_t count[2]; /* message length in bits, lsw first */ md5_word_t abcd[4]; /* digest buffer */ md5_byte_t buf[64]; /* accumulate block */ } md5_state_t; #ifdef __cplusplus extern "C" { #endif /* Initialize the algorithm. */ void md5_init(md5_state_t *pms); /* Append a string to the message. */ void md5_append(md5_state_t *pms, const md5_byte_t *data, int nbytes); /* Finish the message and return the digest. */ void md5_finish(md5_state_t *pms, md5_byte_t digest[16]); #ifdef __cplusplus } /* end extern "C" */ #endif #endif /* md5_INCLUDED */ sipp-3.5.1/include/auth.hpp0000644000175000017500000000257012672462535014642 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ int createAuthHeader(const char *user, const char *password, const char *method, const char *uri, const char *msgbody, const char *auth, const char *aka_OP, const char *aka_AMF, const char *aka_K, char *result); int verifyAuthHeader(const char *user, const char *password, const char *method, const char *auth, const char *msgbody); int getAuthParameter(const char *name, const char *header, char *result, int len); sipp-3.5.1/include/actions.hpp0000644000175000017500000001647412672462535015351 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors : Benjamin GAUTHIER - 24 Mar 2004 * Joseph BANINO * Olivier JACQUES * Richard GAYRAUD * From Hewlett Packard Company. */ #ifndef _CACTIONS #define _CACTIONS #include "variables.hpp" #include "message.hpp" class CSample; #ifdef PCAPPLAY #include "prepare_pcap.h" #endif #ifdef RTP_STREAM #include "rtpstream.hpp" #endif #define MAX_ACTION_MESSAGE 3 class CAction { public: enum T_ActionType { E_AT_NO_ACTION = 0, E_AT_ASSIGN_FROM_REGEXP, E_AT_CHECK, E_AT_ASSIGN_FROM_VALUE, E_AT_ASSIGN_FROM_SAMPLE, E_AT_ASSIGN_FROM_STRING, E_AT_ASSIGN_FROM_INDEX, E_AT_ASSIGN_FROM_GETTIMEOFDAY, E_AT_JUMP, E_AT_LOOKUP, E_AT_INSERT, E_AT_REPLACE, E_AT_PAUSE_RESTORE, E_AT_LOG_TO_FILE, E_AT_LOG_WARNING, E_AT_LOG_ERROR, E_AT_EXECUTE_CMD, E_AT_EXEC_INTCMD, E_AT_VAR_ADD, E_AT_VAR_SUBTRACT, E_AT_VAR_MULTIPLY, E_AT_VAR_DIVIDE, E_AT_VAR_TEST, E_AT_VAR_TO_DOUBLE, E_AT_VAR_STRCMP, E_AT_VAR_TRIM, E_AT_VERIFY_AUTH, E_AT_SET_DEST, E_AT_CLOSE_CON, #ifdef PCAPPLAY E_AT_PLAY_PCAP_AUDIO, E_AT_PLAY_PCAP_IMAGE, E_AT_PLAY_PCAP_VIDEO, #endif #ifdef RTP_STREAM E_AT_RTP_STREAM_PAUSE, E_AT_RTP_STREAM_RESUME, E_AT_RTP_STREAM_PLAY, #endif E_AT_NB_ACTION }; enum T_LookingPlace { E_LP_MSG = 0, E_LP_HDR, E_LP_BODY, E_LP_VAR, E_LP_NB_LOOKING_PLACE }; enum T_Comparator { E_C_EQ, E_C_NE, E_C_GT, E_C_LT, E_C_GEQ, E_C_LEQ, E_C_NB_COMPARATOR }; enum T_IntCmdType { E_INTCMD_INVALID = 0, E_INTCMD_STOPCALL, E_INTCMD_STOP_ALL, E_INTCMD_STOP_NOW }; typedef struct _T_Action { } T_Action; void afficheInfo(); const char *comparatorToString(T_Comparator comp); bool compare(VariableTable *variableTable); T_ActionType getActionType(); T_VarType getVarType(); T_LookingPlace getLookingPlace(); T_Comparator getComparator(); bool getCheckIt(); bool getCheckItInverse(); bool getCaseIndep(); bool getHeadersOnly(); int getVarId(); int getVarInId(); int getVarIn2Id(); int getOccurrence(); char* getLookingChar(); char* getRegularExpression(); SendingMessage *getMessage(int n = 0); /* log specific function */ T_IntCmdType getIntCmd(); /* exec specific function */ #ifdef PCAPPLAY pcap_pkts *getPcapPkts(); /* send_packets specific function */ #endif #ifdef RTP_STREAM rtpstream_actinfo_t *getRTPStreamActInfo(); /* return stored rtp stream playback params */ #endif void setActionType (T_ActionType P_value); void setLookingPlace (T_LookingPlace P_value); void setComparator (T_Comparator P_value); void setCheckIt (bool P_value); void setCheckItInverse (bool P_value); void setVarId (int P_value); void setVarInId (int P_value); void setVarIn2Id (int P_value); void setLookingChar(const char* P_value); void setAction (CAction P_action); void setCaseIndep (bool P_action); void setOccurrence (int P_value); void setHeadersOnly (bool P_value); void setScenario (scenario * P_scenario); void setRegExp (const char* P_value); /* ereg specific function. */ int executeRegExp (const char* P_string, VariableTable *P_callVarTable); void setMessage (char* P_value, int n = 0); /* log specific function */ void setIntCmd (T_IntCmdType P_type ); /* exec specific function */ void setDistribution (CSample * P_value); /* sample specific function */ void setDoubleValue (double P_value); /* assign value specific function */ void setStringValue (char * P_value); /* strcmp value specific function */ #ifdef PCAPPLAY void setPcapArgs(const char* P_value); /* send_packets specific function */ void setPcapArgs (pcap_pkts * P_value); /* send_packets specific function */ #endif #ifdef RTP_STREAM void setRTPStreamActInfo(const char* P_value); /* parse rtp stream playback values from string */ void setRTPStreamActInfo (rtpstream_actinfo_t *P_value); /* copy stored rtp stream playback params */ #endif void setSubVarId (int P_value); int getSubVarId (int P_index); void setNbSubVarId (int P_value); int getNbSubVarId (); int* getSubVarId() ; CSample *getDistribution (); /* sample specific function */ double getDoubleValue (); /* assign value specific function */ char * getStringValue (); /* strcmp specific function */ CAction(scenario *scenario); ~CAction(); private: T_ActionType M_action; T_LookingPlace M_lookingPlace; T_Comparator M_comp; bool M_checkIt; bool M_checkItInverse; bool M_caseIndep; bool M_headersOnly; int M_varId; int M_varInId; int M_varIn2Id; int M_occurrence; int M_nbSubVarId; int M_maxNbSubVarId; int * M_subVarId; char * M_lookingChar; /* log specific member */ SendingMessage * M_message[MAX_ACTION_MESSAGE]; char * M_message_str[MAX_ACTION_MESSAGE]; /* exec specific member */ T_IntCmdType M_IntCmd; /* sample specific member. */ CSample * M_distribution; /* assign value specific member. */ double M_doubleValue; /* strcmp specific member. */ char * M_stringValue; /* what scenario we belong to. */ scenario * M_scenario; /* Our regular expression. */ bool M_regExpSet; regex_t M_internalRegExp; char * M_regularExpression; #ifdef PCAPPLAY /* pcap specific member */ pcap_pkts * M_pcapArgs; #endif #ifdef RTP_STREAM rtpstream_actinfo_t M_rtpstream_actinfo; #endif void setSubString(char** P_target, const char* P_source, int P_start, int P_stop); }; class CActions { public: void afficheInfo(); void setAction(CAction *P_action); void reset(); int getActionSize(); CAction* getAction(int i); CActions(); ~CActions(); private: CAction ** M_actionList; int M_nbAction; }; #endif sipp-3.5.1/include/config.h.in~0000644000175000017500000001572412672462535015416 0ustar vsevavseva/* include/config.h.in. Generated from configure.ac by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define to 1 if you have the `alarm' function. */ #undef HAVE_ALARM /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* define if the compiler supports basic C++11 syntax */ #undef HAVE_CXX11 /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* This platform supports epoll(7). */ #undef HAVE_EPOLL /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `floor' function. */ #undef HAVE_FLOOR /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_CDF_H /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_RANDIST_H /* Define to 1 if you have the header file. */ #undef HAVE_GSL_GSL_RNG_H /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `crypto' library (-lcrypto). */ #undef HAVE_LIBCRYPTO /* Define to 1 if you have the `curses' library (-lcurses). */ #undef HAVE_LIBCURSES /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `ssl' library (-lssl). */ #undef HAVE_LIBSSL /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_SCTP_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_BIO_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_ERR_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_MD5_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_RAND_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_SSL_H /* Define to 1 if you have the header file. */ #undef HAVE_OPENSSL_X509V3_H /* Define to 1 if you have the header file. */ #undef HAVE_PCAP_H /* Define to 1 if libpcap has the pcap_next_ex function. */ #undef HAVE_PCAP_NEXT_EX /* Define to 1 if you have the `pow' function. */ #undef HAVE_POW /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `sqrt' function. */ #undef HAVE_SQRT /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strcspn' function. */ #undef HAVE_STRCSPN /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the `strtoull' function. */ #undef HAVE_STRTOULL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define as `fork' if `vfork' does not work. */ #undef vfork sipp-3.5.1/include/watchdog.hpp0000644000175000017500000000343412672462535015501 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * Marc LAMBERTON * Olivier JACQUES * Herve PELLAN * David MANSUTTI * Francois-Xavier Kowalski * Gerard Lyonnaz * From Hewlett Packard Company. * F. Tarek Rogers * Peter Higginson * Vincent Luba * Shriram Natarajan * Guillaume Teissier from FTR&D * Clement Chen * Wolfgang Beck * Charles P Wright from IBM Research */ #ifndef WATCHDOG_HPP #define WATCHDOG_HPP #include "task.hpp" class watchdog : public task { public: unsigned int wake(); watchdog(int interval, int reset, int major_threshold, int major_maxtriggers, int minor_threshold, int minor_maxtriggers); bool run(); void dump(); private: int interval; int reset_interval; int minor_threshold; int major_threshold; int minor_maxtriggers; int major_maxtriggers; unsigned long last_fire; unsigned long last_trigger; int major_triggers; int minor_triggers; }; #endif sipp-3.5.1/include/listener.hpp0000644000175000017500000000274312672462535015530 0ustar vsevavseva/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Author : Richard GAYRAUD - 04 Nov 2003 * From Hewlett Packard Company. * Charles P. Wright from IBM Research */ #ifndef __LISTENER__ #define __LISTENER__ #include #include #include #include #include #include #include "sipp.hpp" class listener { public: listener(const char *id, bool listening); virtual ~listener(); char *getId(); virtual bool process_incoming(char * msg, struct sockaddr_storage *src) = 0; virtual bool process_twinSippCom(char * msg) = 0; protected: void startListening(); void stopListening(); char *id; bool listening; }; typedef std::map listener_map; listener * get_listener(const char *); #endif sipp-3.5.1/include/version.h0000644000175000017500000000003612672463430015014 0ustar vsevavseva#define SIPP_VERSION "v3.5.1"