Changeset 770 for pjproject/trunk


Ignore:
Timestamp:
Oct 13, 2006 5:57:42 PM (18 years ago)
Author:
bennylp
Message:

Updated PortAudio? to latest version for Mac

Location:
pjproject/trunk
Files:
8 added
7 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/aconfigure

    r751 r770  
    11#! /bin/sh 
    22# Guess values for system-dependent variables and create Makefiles. 
    3 # Generated by GNU Autoconf 2.59 for pjproject 0.5.8. 
     3# Generated by Autoconf 2.52 for pjproject 0.5.8. 
    44# 
    5 # Copyright (C) 2003 Free Software Foundation, Inc. 
     5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 
     6# Free Software Foundation, Inc. 
    67# This configure script is free software; the Free Software Foundation 
    78# gives unlimited permission to copy, distribute and modify it. 
    8 ## --------------------- ## 
    9 ## M4sh Initialization.  ## 
    10 ## --------------------- ## 
    11  
    12 # Be Bourne compatible 
    13 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 
    14   emulate sh 
    15   NULLCMD=: 
    16   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 
    17   # is contrary to our usage.  Disable this feature. 
    18   alias -g '${1+"$@"}'='"$@"' 
    19 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 
    20   set -o posix 
    21 fi 
    22 DUALCASE=1; export DUALCASE # for MKS sh 
    23  
    24 # Support unset when possible. 
    25 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 
    26   as_unset=unset 
    27 else 
    28   as_unset=false 
    29 fi 
    30  
    31  
    32 # Work around bugs in pre-3.0 UWIN ksh. 
    33 $as_unset ENV MAIL MAILPATH 
    34 PS1='$ ' 
    35 PS2='> ' 
    36 PS4='+ ' 
    37  
    38 # NLS nuisances. 
    39 for as_var in \ 
    40   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 
    41   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 
    42   LC_TELEPHONE LC_TIME 
    43 do 
    44   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 
    45     eval $as_var=C; export $as_var 
    46   else 
    47     $as_unset $as_var 
    48   fi 
    49 done 
    50  
    51 # Required to use basename. 
    52 if expr a : '\(a\)' >/dev/null 2>&1; then 
    53   as_expr=expr 
    54 else 
    55   as_expr=false 
    56 fi 
    57  
    58 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then 
    59   as_basename=basename 
    60 else 
    61   as_basename=false 
    62 fi 
    63  
    64  
    65 # Name of the executable. 
    66 as_me=`$as_basename "$0" || 
    67 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 
    68          X"$0" : 'X\(//\)$' \| \ 
    69          X"$0" : 'X\(/\)$' \| \ 
    70          .     : '\(.\)' 2>/dev/null || 
    71 echo X/"$0" | 
    72     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } 
    73           /^X\/\(\/\/\)$/{ s//\1/; q; } 
    74           /^X\/\(\/\).*/{ s//\1/; q; } 
    75           s/.*/./; q'` 
    76  
    77  
    78 # PATH needs CR, and LINENO needs CR and PATH. 
     9 
    7910# Avoid depending upon Character Ranges. 
    8011as_cr_letters='abcdefghijklmnopqrstuvwxyz' 
     
    8415as_cr_alnum=$as_cr_Letters$as_cr_digits 
    8516 
    86 # The user is always right. 
    87 if test "${PATH_SEPARATOR+set}" != set; then 
    88   echo "#! /bin/sh" >conf$$.sh 
    89   echo  "exit 0"   >>conf$$.sh 
    90   chmod +x conf$$.sh 
    91   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 
    92     PATH_SEPARATOR=';' 
    93   else 
    94     PATH_SEPARATOR=: 
    95   fi 
    96   rm -f conf$$.sh 
    97 fi 
    98  
    99  
    100   as_lineno_1=$LINENO 
    101   as_lineno_2=$LINENO 
    102   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 
    103   test "x$as_lineno_1" != "x$as_lineno_2" && 
    104   test "x$as_lineno_3"  = "x$as_lineno_2"  || { 
    105   # Find who we are.  Look in the path if we contain no path at all 
    106   # relative or not. 
    107   case $0 in 
    108     *[\\/]* ) as_myself=$0 ;; 
    109     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    110 for as_dir in $PATH 
    111 do 
    112   IFS=$as_save_IFS 
    113   test -z "$as_dir" && as_dir=. 
    114   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 
    115 done 
    116  
    117        ;; 
    118   esac 
    119   # We did not find ourselves, most probably we were run as `sh COMMAND' 
    120   # in which case we are not to be found in the path. 
    121   if test "x$as_myself" = x; then 
    122     as_myself=$0 
    123   fi 
    124   if test ! -f "$as_myself"; then 
    125     { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 
    126    { (exit 1); exit 1; }; } 
    127   fi 
    128   case $CONFIG_SHELL in 
    129   '') 
    130     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    131 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 
    132 do 
    133   IFS=$as_save_IFS 
    134   test -z "$as_dir" && as_dir=. 
    135   for as_base in sh bash ksh sh5; do 
    136          case $as_dir in 
    137          /*) 
    138            if ("$as_dir/$as_base" -c ' 
    139   as_lineno_1=$LINENO 
    140   as_lineno_2=$LINENO 
    141   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 
    142   test "x$as_lineno_1" != "x$as_lineno_2" && 
    143   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then 
    144              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } 
    145              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } 
    146              CONFIG_SHELL=$as_dir/$as_base 
    147              export CONFIG_SHELL 
    148              exec "$CONFIG_SHELL" "$0" ${1+"$@"} 
    149            fi;; 
    150          esac 
    151        done 
    152 done 
    153 ;; 
    154   esac 
    155  
    156   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 
    157   # uniformly replaced by the line number.  The first 'sed' inserts a 
    158   # line-number line before each line; the second 'sed' does the real 
    159   # work.  The second script uses 'N' to pair each line-number line 
    160   # with the numbered line, and appends trailing '-' during 
    161   # substitution so that $LINENO is not a special case at line end. 
    162   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 
    163   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-) 
    164   sed '=' <$as_myself | 
    165     sed ' 
    166       N 
    167       s,$,-, 
    168       : loop 
    169       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, 
    170       t loop 
    171       s,-$,, 
    172       s,^['$as_cr_digits']*\n,, 
    173     ' >$as_me.lineno && 
    174   chmod +x $as_me.lineno || 
    175     { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 
    176    { (exit 1); exit 1; }; } 
    177  
    178   # Don't try to exec as it changes $[0], causing all sort of problems 
    179   # (the dirname of $[0] is not the place where we might find the 
    180   # original and so on.  Autoconf is especially sensible to this). 
    181   . ./$as_me.lineno 
    182   # Exit status is that of the last command. 
    183   exit 
    184 } 
    185  
    186  
    187 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 
    188   *c*,-n*) ECHO_N= ECHO_C=' 
    189 ' ECHO_T='      ' ;; 
    190   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;; 
    191   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;; 
    192 esac 
     17# Sed expression to map a string onto a valid variable name. 
     18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" 
     19 
     20# Sed expression to map a string onto a valid CPP name. 
     21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" 
     22 
     23# Be Bourne compatible 
     24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 
     25  emulate sh 
     26  NULLCMD=: 
     27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 
     28  set -o posix 
     29fi 
     30 
     31# Name of the executable. 
     32as_me=`echo "$0" |sed 's,.*[\\/],,'` 
    19333 
    19434if expr a : '\(a\)' >/dev/null 2>&1; then 
     
    21656rm -f conf$$ conf$$.exe conf$$.file 
    21757 
    218 if mkdir -p . 2>/dev/null; then 
    219   as_mkdir_p=: 
    220 else 
    221   test -d ./-p && rmdir ./-p 
    222   as_mkdir_p=false 
    223 fi 
    224  
    22558as_executable_p="test -f" 
    22659 
    227 # Sed expression to map a string onto a valid CPP name. 
    228 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 
    229  
    230 # Sed expression to map a string onto a valid variable name. 
    231 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 
    232  
     60# Support unset when possible. 
     61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then 
     62  as_unset=unset 
     63else 
     64  as_unset=false 
     65fi 
     66 
     67# NLS nuisances. 
     68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } 
     69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } 
     70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } 
     71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } 
     72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } 
     73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } 
     74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } 
     75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } 
    23376 
    23477# IFS 
     
    23982 
    24083# CDPATH. 
    241 $as_unset CDPATH 
    242  
     84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } 
    24385 
    24486# Name of the host. 
     
    25395# 
    25496ac_default_prefix=/usr/local 
    255 ac_config_libobj_dir=. 
    25697cross_compiling=no 
    25798subdirs= 
    258 MFLAGS= 
    259 MAKEFLAGS= 
     99MFLAGS= MAKEFLAGS= 
    260100SHELL=${CONFIG_SHELL-/bin/sh} 
    261101 
     
    264104# only ac_max_sed_lines should be used. 
    265105: ${ac_max_here_lines=38} 
    266  
    267 # Identity of this package. 
    268 PACKAGE_NAME='pjproject' 
    269 PACKAGE_TARNAME='pjproject' 
    270 PACKAGE_VERSION='0.5.8' 
    271 PACKAGE_STRING='pjproject 0.5.8' 
    272 PACKAGE_BUGREPORT='' 
    273  
    274 # Factoring default headers for most tests. 
    275 ac_includes_default="\ 
    276 #include <stdio.h> 
    277 #if HAVE_SYS_TYPES_H 
    278 # include <sys/types.h> 
    279 #endif 
    280 #if HAVE_SYS_STAT_H 
    281 # include <sys/stat.h> 
    282 #endif 
    283 #if STDC_HEADERS 
    284 # include <stdlib.h> 
    285 # include <stddef.h> 
    286 #else 
    287 # if HAVE_STDLIB_H 
    288 #  include <stdlib.h> 
    289 # endif 
    290 #endif 
    291 #if HAVE_STRING_H 
    292 # if !STDC_HEADERS && HAVE_MEMORY_H 
    293 #  include <memory.h> 
    294 # endif 
    295 # include <string.h> 
    296 #endif 
    297 #if HAVE_STRINGS_H 
    298 # include <strings.h> 
    299 #endif 
    300 #if HAVE_INTTYPES_H 
    301 # include <inttypes.h> 
    302 #else 
    303 # if HAVE_STDINT_H 
    304 #  include <stdint.h> 
    305 # endif 
    306 #endif 
    307 #if HAVE_UNISTD_H 
    308 # include <unistd.h> 
    309 #endif" 
    310  
    311 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CXX CXXFLAGS ac_ct_CXX CPP EGREP ac_os_objs ac_pjmedia_snd ac_pa_use_alsa ac_no_small_filter ac_no_large_filter ac_no_g711_plc ac_no_speex_aec ac_no_g711_codec ac_no_l16_codec ac_no_gsm_codec ac_no_speex_codec ac_no_ilbc_codec ac_cross_compile ac_linux_poll ac_host ac_main_obj LIBOBJS LTLIBOBJS' 
    312 ac_subst_files='' 
    313106 
    314107# Initialize some variables set by options. 
     
    350143mandir='${prefix}/man' 
    351144 
     145# Identity of this package. 
     146PACKAGE_NAME='pjproject' 
     147PACKAGE_TARNAME='pjproject' 
     148PACKAGE_VERSION='0.5.8' 
     149PACKAGE_STRING='pjproject 0.5.8' 
     150PACKAGE_BUGREPORT='' 
     151 
    352152ac_prev= 
    353153for ac_option 
     
    482282 
    483283  -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 
    484   | --no-cr | --no-c | -n) 
     284  | --no-cr | --no-c) 
    485285    no_create=yes ;; 
    486286 
     
    661461  case $ac_val in 
    662462    [\\/$]* | ?:[\\/]* | NONE | '' ) ;; 
    663     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 
     463    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 
    664464   { (exit 1); exit 1; }; };; 
    665465  esac 
     
    668468# Be sure to have absolute paths. 
    669469for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ 
    670               localstatedir libdir includedir oldincludedir infodir mandir 
     470              localstatedir libdir includedir oldincludedir infodir mandir 
    671471do 
    672472  eval ac_val=$`echo $ac_var` 
    673473  case $ac_val in 
    674474    [\\/$]* | ?:[\\/]* ) ;; 
    675     *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 
     475    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2 
    676476   { (exit 1); exit 1; }; };; 
    677477  esac 
     
    680480# There might be people who depend on the old broken behavior: `$host' 
    681481# used to hold the argument of --host etc. 
    682 # FIXME: To remove some day. 
    683482build=$build_alias 
    684483host=$host_alias 
    685484target=$target_alias 
    686485 
    687 # FIXME: To remove some day. 
     486# FIXME: should be removed in autoconf 3.0. 
    688487if test "x$host_alias" != x; then 
    689488  if test "x$build_alias" = x; then 
     
    701500test "$silent" = yes && exec 6>/dev/null 
    702501 
    703  
    704502# Find the source files, if location was not specified. 
    705503if test -z "$srcdir"; then 
    706504  ac_srcdir_defaulted=yes 
    707505  # Try the directory containing this script, then its parent. 
    708   ac_confdir=`(dirname "$0") 2>/dev/null || 
    709 $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
    710          X"$0" : 'X\(//\)[^/]' \| \ 
    711          X"$0" : 'X\(//\)$' \| \ 
    712          X"$0" : 'X\(/\)' \| \ 
    713          .     : '\(.\)' 2>/dev/null || 
    714 echo X"$0" | 
    715     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 
    716           /^X\(\/\/\)[^/].*/{ s//\1/; q; } 
    717           /^X\(\/\/\)$/{ s//\1/; q; } 
    718           /^X\(\/\).*/{ s//\1/; q; } 
    719           s/.*/./; q'` 
     506  ac_prog=$0 
     507  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'` 
     508  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. 
    720509  srcdir=$ac_confdir 
    721510  if test ! -r $srcdir/$ac_unique_file; then 
     
    727516if test ! -r $srcdir/$ac_unique_file; then 
    728517  if test "$ac_srcdir_defaulted" = yes; then 
    729     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 
     518    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2 
    730519   { (exit 1); exit 1; }; } 
    731520  else 
    732     { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 
     521    { echo "$as_me: error: cannot find sources in $srcdir" >&2 
    733522   { (exit 1); exit 1; }; } 
    734523  fi 
    735524fi 
    736 (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || 
    737   { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 
    738    { (exit 1); exit 1; }; } 
    739525srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` 
    740526ac_env_build_alias_set=${build_alias+set} 
     
    785571  # Omit some internal or obsolete options to make the list less imposing. 
    786572  # This message is too long to be a string in the A/UX 3.1 sh. 
    787   cat <<_ACEOF 
     573  cat <<EOF 
    788574\`configure' configures pjproject 0.5.8 to adapt to many kinds of systems. 
    789575 
     
    806592      --srcdir=DIR        find the sources in DIR [configure dir or \`..'] 
    807593 
    808 _ACEOF 
    809  
    810   cat <<_ACEOF 
     594EOF 
     595 
     596  cat <<EOF 
    811597Installation directories: 
    812598  --prefix=PREFIX         install architecture-independent files in PREFIX 
    813                           [$ac_default_prefix] 
     599                          [$ac_default_prefix] 
    814600  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX 
    815                           [PREFIX] 
     601                          [PREFIX] 
    816602 
    817603By default, \`make install' will install all the files in 
     
    835621  --infodir=DIR          info documentation [PREFIX/info] 
    836622  --mandir=DIR           man documentation [PREFIX/man] 
    837 _ACEOF 
    838  
    839   cat <<\_ACEOF 
     623EOF 
     624 
     625  cat <<\EOF 
    840626 
    841627System types: 
    842628  --build=BUILD     configure for building on BUILD [guessed] 
    843   --host=HOST       cross-compile to build programs to run on HOST [BUILD] 
     629  --host=HOST       build programs to run on HOST [BUILD] 
    844630  --target=TARGET   configure for building compilers for TARGET [HOST] 
    845 _ACEOF 
     631EOF 
    846632fi 
    847633 
     
    850636     short | recursive ) echo "Configuration of pjproject 0.5.8:";; 
    851637   esac 
    852   cat <<\_ACEOF 
     638  cat <<\EOF 
    853639 
    854640Optional Features: 
     
    882668it to find libraries and programs with nonstandard names/locations. 
    883669 
    884 _ACEOF 
     670EOF 
    885671fi 
    886672 
     
    888674  # If there are subdirs, report their specific --help. 
    889675  ac_popdir=`pwd` 
    890   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 
    891     test -d $ac_dir || continue 
    892     ac_builddir=. 
    893  
    894 if test "$ac_dir" != .; then 
    895   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 
    896   # A "../" for each directory in $ac_dir_suffix. 
    897   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` 
    898 else 
    899   ac_dir_suffix= ac_top_builddir= 
    900 fi 
    901  
    902 case $srcdir in 
    903   .)  # No --srcdir option.  We are building in place. 
    904     ac_srcdir=. 
    905     if test -z "$ac_top_builddir"; then 
    906        ac_top_srcdir=. 
    907     else 
    908        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` 
    909     fi ;; 
    910   [\\/]* | ?:[\\/]* )  # Absolute path. 
    911     ac_srcdir=$srcdir$ac_dir_suffix; 
    912     ac_top_srcdir=$srcdir ;; 
    913   *) # Relative path. 
    914     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix 
    915     ac_top_srcdir=$ac_top_builddir$srcdir ;; 
    916 esac 
    917  
    918 # Do not use `cd foo && pwd` to compute absolute paths, because 
    919 # the directories may not exist. 
    920 case `pwd` in 
    921 .) ac_abs_builddir="$ac_dir";; 
    922 *) 
    923   case "$ac_dir" in 
    924   .) ac_abs_builddir=`pwd`;; 
    925   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; 
    926   *) ac_abs_builddir=`pwd`/"$ac_dir";; 
    927   esac;; 
    928 esac 
    929 case $ac_abs_builddir in 
    930 .) ac_abs_top_builddir=${ac_top_builddir}.;; 
    931 *) 
    932   case ${ac_top_builddir}. in 
    933   .) ac_abs_top_builddir=$ac_abs_builddir;; 
    934   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; 
    935   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; 
    936   esac;; 
    937 esac 
    938 case $ac_abs_builddir in 
    939 .) ac_abs_srcdir=$ac_srcdir;; 
    940 *) 
    941   case $ac_srcdir in 
    942   .) ac_abs_srcdir=$ac_abs_builddir;; 
    943   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; 
    944   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; 
    945   esac;; 
    946 esac 
    947 case $ac_abs_builddir in 
    948 .) ac_abs_top_srcdir=$ac_top_srcdir;; 
    949 *) 
    950   case $ac_top_srcdir in 
    951   .) ac_abs_top_srcdir=$ac_abs_builddir;; 
    952   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; 
    953   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; 
    954   esac;; 
    955 esac 
    956  
    957     cd $ac_dir 
     676  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue 
     677    cd $ac_subdir 
     678    # A "../" for each directory in /$ac_subdir. 
     679    ac_dots=`echo $ac_subdir | 
     680             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'` 
     681 
     682    case $srcdir in 
     683    .) # No --srcdir option.  We are building in place. 
     684      ac_sub_srcdir=$srcdir ;; 
     685    [\\/]* | ?:[\\/]* ) # Absolute path. 
     686      ac_sub_srcdir=$srcdir/$ac_subdir ;; 
     687    *) # Relative path. 
     688      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;; 
     689    esac 
     690 
    958691    # Check for guested configure; otherwise get Cygnus style configure. 
    959     if test -f $ac_srcdir/configure.gnu; then 
     692    if test -f $ac_sub_srcdir/configure.gnu; then 
    960693      echo 
    961       $SHELL $ac_srcdir/configure.gnu  --help=recursive 
    962     elif test -f $ac_srcdir/configure; then 
     694      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive 
     695    elif test -f $ac_sub_srcdir/configure; then 
    963696      echo 
    964       $SHELL $ac_srcdir/configure  --help=recursive 
    965     elif test -f $ac_srcdir/configure.ac || 
    966            test -f $ac_srcdir/configure.in; then 
     697      $SHELL $ac_sub_srcdir/configure  --help=recursive 
     698    elif test -f $ac_sub_srcdir/configure.ac || 
     699           test -f $ac_sub_srcdir/configure.in; then 
    967700      echo 
    968701      $ac_configure --help 
    969702    else 
    970       echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 
     703      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2 
    971704    fi 
    972705    cd $ac_popdir 
     
    976709test -n "$ac_init_help" && exit 0 
    977710if $ac_init_version; then 
    978   cat <<\_ACEOF 
     711  cat <<\EOF 
    979712pjproject configure 0.5.8 
    980 generated by GNU Autoconf 2.59 
    981  
    982 Copyright (C) 2003 Free Software Foundation, Inc. 
     713generated by GNU Autoconf 2.52 
     714 
     715Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 
     716Free Software Foundation, Inc. 
    983717This configure script is free software; the Free Software Foundation 
    984718gives unlimited permission to copy, distribute and modify it. 
    985 _ACEOF 
     719EOF 
    986720  exit 0 
    987721fi 
    988722exec 5>config.log 
    989 cat >&5 <<_ACEOF 
     723cat >&5 <<EOF 
    990724This file contains any messages produced by compilers while 
    991725running configure, to aid debugging if configure makes a mistake. 
    992726 
    993727It was created by pjproject $as_me 0.5.8, which was 
    994 generated by GNU Autoconf 2.59.  Invocation command line was 
     728generated by GNU Autoconf 2.52.  Invocation command line was 
    995729 
    996730  $ $0 $@ 
    997731 
    998 _ACEOF 
     732EOF 
    999733{ 
    1000734cat <<_ASUNAME 
    1001 ## --------- ## 
    1002 ## Platform. ## 
    1003 ## --------- ## 
     735## ---------- ## 
     736## Platform.  ## 
     737## ---------- ## 
    1004738 
    1005739hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 
     
    1020754/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown` 
    1021755 
     756PATH = $PATH 
     757 
    1022758_ASUNAME 
    1023  
    1024 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1025 for as_dir in $PATH 
    1026 do 
    1027   IFS=$as_save_IFS 
    1028   test -z "$as_dir" && as_dir=. 
    1029   echo "PATH: $as_dir" 
    1030 done 
    1031  
    1032759} >&5 
    1033760 
    1034 cat >&5 <<_ACEOF 
    1035  
    1036  
    1037 ## ----------- ## 
    1038 ## Core tests. ## 
    1039 ## ----------- ## 
    1040  
    1041 _ACEOF 
    1042  
     761cat >&5 <<EOF 
     762## ------------ ## 
     763## Core tests.  ## 
     764## ------------ ## 
     765 
     766EOF 
    1043767 
    1044768# Keep a trace of the command line. 
    1045769# Strip out --no-create and --no-recursion so they do not pile up. 
    1046 # Strip out --silent because we don't want to record it for future runs. 
    1047770# Also quote any args containing shell meta-characters. 
    1048 # Make two passes to allow for proper duplicate-argument suppression. 
    1049771ac_configure_args= 
    1050 ac_configure_args0= 
    1051 ac_configure_args1= 
    1052772ac_sep= 
    1053 ac_must_keep_next=false 
    1054 for ac_pass in 1 2 
     773for ac_arg 
    1055774do 
    1056   for ac_arg 
    1057   do 
    1058     case $ac_arg in 
    1059     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 
    1060     -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 
    1061     | -silent | --silent | --silen | --sile | --sil) 
    1062       continue ;; 
    1063     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 
    1064       ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 
    1065     esac 
    1066     case $ac_pass in 
    1067     1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 
    1068     2) 
    1069       ac_configure_args1="$ac_configure_args1 '$ac_arg'" 
    1070       if test $ac_must_keep_next = true; then 
    1071         ac_must_keep_next=false # Got value, back to normal. 
    1072       else 
    1073         case $ac_arg in 
    1074           *=* | --config-cache | -C | -disable-* | --disable-* \ 
    1075           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 
    1076           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 
    1077           | -with-* | --with-* | -without-* | --without-* | --x) 
    1078             case "$ac_configure_args0 " in 
    1079               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 
    1080             esac 
    1081             ;; 
    1082           -* ) ac_must_keep_next=true ;; 
    1083         esac 
    1084       fi 
    1085       ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" 
    1086       # Get rid of the leading space. 
    1087       ac_sep=" " 
    1088       ;; 
    1089     esac 
    1090   done 
     775  case $ac_arg in 
     776  -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 
     777  | --no-cr | --no-c) ;; 
     778  -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 
     779  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; 
     780  *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 
     781    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` 
     782    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" 
     783    ac_sep=" " ;; 
     784  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg" 
     785     ac_sep=" " ;; 
     786  esac 
     787  # Get rid of the leading space. 
    1091788done 
    1092 $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } 
    1093 $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } 
    1094789 
    1095790# When interrupted or exit'd, cleanup temporary files, and complete 
    1096791# config.log.  We remove comments because anyway the quotes in there 
    1097792# would cause problems or look ugly. 
    1098 # WARNING: Be sure not to use single quotes in there, as some shells, 
    1099 # such as our DU 5.0 friend, will then `close' the trap. 
    1100793trap 'exit_status=$? 
    1101794  # Save into config.log some information that might help in debugging. 
    1102   { 
    1103     echo 
    1104  
    1105     cat <<\_ASBOX 
    1106 ## ---------------- ## 
    1107 ## Cache variables. ## 
    1108 ## ---------------- ## 
    1109 _ASBOX 
    1110     echo 
    1111     # The following way of writing the cache mishandles newlines in values, 
     795  echo >&5 
     796  echo "## ----------------- ##" >&5 
     797  echo "## Cache variables.  ##" >&5 
     798  echo "## ----------------- ##" >&5 
     799  echo >&5 
     800  # The following way of writing the cache mishandles newlines in values, 
    1112801{ 
    1113802  (set) 2>&1 | 
     
    1115804    *ac_space=\ *) 
    1116805      sed -n \ 
    1117         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; 
    1118           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" 
     806        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; 
     807          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" 
    1119808      ;; 
    1120809    *) 
    1121810      sed -n \ 
    1122         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" 
     811        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" 
    1123812      ;; 
    1124813    esac; 
    1125 } 
    1126     echo 
    1127  
    1128     cat <<\_ASBOX 
    1129 ## ----------------- ## 
    1130 ## Output variables. ## 
    1131 ## ----------------- ## 
    1132 _ASBOX 
    1133     echo 
    1134     for ac_var in $ac_subst_vars 
    1135     do 
    1136       eval ac_val=$`echo $ac_var` 
    1137       echo "$ac_var='"'"'$ac_val'"'"'" 
    1138     done | sort 
    1139     echo 
    1140  
    1141     if test -n "$ac_subst_files"; then 
    1142       cat <<\_ASBOX 
    1143 ## ------------- ## 
    1144 ## Output files. ## 
    1145 ## ------------- ## 
    1146 _ASBOX 
    1147       echo 
    1148       for ac_var in $ac_subst_files 
    1149       do 
    1150         eval ac_val=$`echo $ac_var` 
    1151         echo "$ac_var='"'"'$ac_val'"'"'" 
    1152       done | sort 
    1153       echo 
    1154     fi 
    1155  
    1156     if test -s confdefs.h; then 
    1157       cat <<\_ASBOX 
    1158 ## ----------- ## 
    1159 ## confdefs.h. ## 
    1160 ## ----------- ## 
    1161 _ASBOX 
    1162       echo 
    1163       sed "/^$/d" confdefs.h | sort 
    1164       echo 
    1165     fi 
    1166     test "$ac_signal" != 0 && 
    1167       echo "$as_me: caught signal $ac_signal" 
    1168     echo "$as_me: exit $exit_status" 
    1169   } >&5 
    1170   rm -f core *.core && 
    1171   rm -rf conftest* confdefs* conf$$* $ac_clean_files && 
     814} >&5 
     815  sed "/^$/d" confdefs.h >conftest.log 
     816  if test -s conftest.log; then 
     817    echo >&5 
     818    echo "## ------------ ##" >&5 
     819    echo "## confdefs.h.  ##" >&5 
     820    echo "## ------------ ##" >&5 
     821    echo >&5 
     822    cat conftest.log >&5 
     823  fi 
     824  (echo; echo) >&5 
     825  test "$ac_signal" != 0 && 
     826    echo "$as_me: caught signal $ac_signal" >&5 
     827  echo "$as_me: exit $exit_status" >&5 
     828  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files && 
    1172829    exit $exit_status 
    1173830     ' 0 
     
    1181838# AIX cpp loses on an empty file, so make sure it contains at least a newline. 
    1182839echo >confdefs.h 
    1183  
    1184 # Predefined preprocessor variables. 
    1185  
    1186 cat >>confdefs.h <<_ACEOF 
    1187 #define PACKAGE_NAME "$PACKAGE_NAME" 
    1188 _ACEOF 
    1189  
    1190  
    1191 cat >>confdefs.h <<_ACEOF 
    1192 #define PACKAGE_TARNAME "$PACKAGE_TARNAME" 
    1193 _ACEOF 
    1194  
    1195  
    1196 cat >>confdefs.h <<_ACEOF 
    1197 #define PACKAGE_VERSION "$PACKAGE_VERSION" 
    1198 _ACEOF 
    1199  
    1200  
    1201 cat >>confdefs.h <<_ACEOF 
    1202 #define PACKAGE_STRING "$PACKAGE_STRING" 
    1203 _ACEOF 
    1204  
    1205  
    1206 cat >>confdefs.h <<_ACEOF 
    1207 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 
    1208 _ACEOF 
    1209  
    1210840 
    1211841# Let the site file select an alternate cache file if it wants to. 
     
    1220850for ac_site_file in $CONFIG_SITE; do 
    1221851  if test -r "$ac_site_file"; then 
    1222     { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 
     852    { echo "$as_me:852: loading site script $ac_site_file" >&5 
    1223853echo "$as_me: loading site script $ac_site_file" >&6;} 
    1224     sed 's/^/| /' "$ac_site_file" >&5 
     854    cat "$ac_site_file" >&5 
    1225855    . "$ac_site_file" 
    1226856  fi 
     
    1231861  # files actually), so we avoid doing that. 
    1232862  if test -f "$cache_file"; then 
    1233     { echo "$as_me:$LINENO: loading cache $cache_file" >&5 
     863    { echo "$as_me:863: loading cache $cache_file" >&5 
    1234864echo "$as_me: loading cache $cache_file" >&6;} 
    1235865    case $cache_file in 
     
    1239869  fi 
    1240870else 
    1241   { echo "$as_me:$LINENO: creating cache $cache_file" >&5 
     871  { echo "$as_me:871: creating cache $cache_file" >&5 
    1242872echo "$as_me: creating cache $cache_file" >&6;} 
    1243873  >$cache_file 
     
    1248878ac_cache_corrupted=false 
    1249879for ac_var in `(set) 2>&1 | 
    1250                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do 
     880               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do 
    1251881  eval ac_old_set=\$ac_cv_env_${ac_var}_set 
    1252882  eval ac_new_set=\$ac_env_${ac_var}_set 
     
    1255885  case $ac_old_set,$ac_new_set in 
    1256886    set,) 
    1257       { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 
     887      { echo "$as_me:887: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 
    1258888echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 
    1259889      ac_cache_corrupted=: ;; 
    1260890    ,set) 
    1261       { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 
     891      { echo "$as_me:891: error: \`$ac_var' was not set in the previous run" >&5 
    1262892echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 
    1263893      ac_cache_corrupted=: ;; 
     
    1265895    *) 
    1266896      if test "x$ac_old_val" != "x$ac_new_val"; then 
    1267         { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 
     897        { echo "$as_me:897: error: \`$ac_var' has changed since the previous run:" >&5 
    1268898echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 
    1269         { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5 
     899        { echo "$as_me:899:   former value:  $ac_old_val" >&5 
    1270900echo "$as_me:   former value:  $ac_old_val" >&2;} 
    1271         { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5 
     901        { echo "$as_me:901:   current value: $ac_new_val" >&5 
    1272902echo "$as_me:   current value: $ac_new_val" >&2;} 
    1273         ac_cache_corrupted=: 
     903        ac_cache_corrupted=: 
    1274904      fi;; 
    1275905  esac 
    1276   # Pass precious variables to config.status. 
     906  # Pass precious variables to config.status.  It doesn't matter if 
     907  # we pass some twice (in addition to the command line arguments). 
    1277908  if test "$ac_new_set" = set; then 
    1278909    case $ac_new_val in 
    1279910    *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) 
    1280       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 
    1281     *) ac_arg=$ac_var=$ac_new_val ;; 
    1282     esac 
    1283     case " $ac_configure_args " in 
    1284       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy. 
    1285       *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; 
     911      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` 
     912      ac_configure_args="$ac_configure_args '$ac_arg'" 
     913      ;; 
     914    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val" 
     915       ;; 
    1286916    esac 
    1287917  fi 
    1288918done 
    1289919if $ac_cache_corrupted; then 
    1290   { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 
     920  { echo "$as_me:920: error: changes in the environment can compromise the build" >&5 
    1291921echo "$as_me: error: changes in the environment can compromise the build" >&2;} 
    1292   { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 
     922  { { echo "$as_me:922: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 
    1293923echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} 
    1294924   { (exit 1); exit 1; }; } 
     
    1301931ac_compiler_gnu=$ac_cv_c_compiler_gnu 
    1302932 
    1303  
    1304  
    1305  
    1306  
    1307  
    1308  
    1309  
    1310  
    1311  
    1312  
    1313  
    1314  
    1315  
    1316  
    1317  
    1318  
    1319  
    1320  
    1321  
    1322  
    1323  
    1324  
    1325  
    1326  
    1327  
    1328  
     933case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 
     934  *c*,-n*) ECHO_N= ECHO_C=' 
     935' ECHO_T='      ' ;; 
     936  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;; 
     937  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;; 
     938esac 
     939echo "#! $SHELL" >conftest.sh 
     940echo  "exit 0"   >>conftest.sh 
     941chmod +x conftest.sh 
     942if { (echo "$as_me:942: PATH=\".;.\"; conftest.sh") >&5 
     943  (PATH=".;."; conftest.sh) 2>&5 
     944  ac_status=$? 
     945  echo "$as_me:945: \$? = $ac_status" >&5 
     946  (exit $ac_status); }; then 
     947  ac_path_separator=';' 
     948else 
     949  ac_path_separator=: 
     950fi 
     951PATH_SEPARATOR="$ac_path_separator" 
     952rm -f conftest.sh 
    1329953 
    1330954host_orig="$host" 
     
    1347971done 
    1348972if test -z "$ac_aux_dir"; then 
    1349   { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 
     973  { { echo "$as_me:973: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 
    1350974echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} 
    1351975   { (exit 1); exit 1; }; } 
     
    1357981# Make sure we can run config.sub. 
    1358982$ac_config_sub sun4 >/dev/null 2>&1 || 
    1359   { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 
     983  { { echo "$as_me:983: error: cannot run $ac_config_sub" >&5 
    1360984echo "$as_me: error: cannot run $ac_config_sub" >&2;} 
    1361985   { (exit 1); exit 1; }; } 
    1362986 
    1363 echo "$as_me:$LINENO: checking build system type" >&5 
     987echo "$as_me:987: checking build system type" >&5 
    1364988echo $ECHO_N "checking build system type... $ECHO_C" >&6 
    1365989if test "${ac_cv_build+set}" = set; then 
     
    1370994  ac_cv_build_alias=`$ac_config_guess` 
    1371995test -z "$ac_cv_build_alias" && 
    1372   { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 
     996  { { echo "$as_me:996: error: cannot guess build type; you must specify one" >&5 
    1373997echo "$as_me: error: cannot guess build type; you must specify one" >&2;} 
    1374998   { (exit 1); exit 1; }; } 
    1375999ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || 
    1376   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 
    1377 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} 
     1000  { { echo "$as_me:1000: error: $ac_config_sub $ac_cv_build_alias failed." >&5 
     1001echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;} 
    13781002   { (exit 1); exit 1; }; } 
    13791003 
    13801004fi 
    1381 echo "$as_me:$LINENO: result: $ac_cv_build" >&5 
     1005echo "$as_me:1005: result: $ac_cv_build" >&5 
    13821006echo "${ECHO_T}$ac_cv_build" >&6 
    13831007build=$ac_cv_build 
     
    13861010build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 
    13871011 
    1388  
    1389 echo "$as_me:$LINENO: checking host system type" >&5 
     1012echo "$as_me:1012: checking host system type" >&5 
    13901013echo $ECHO_N "checking host system type... $ECHO_C" >&6 
    13911014if test "${ac_cv_host+set}" = set; then 
     
    13961019  ac_cv_host_alias=$ac_cv_build_alias 
    13971020ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || 
    1398   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 
     1021  { { echo "$as_me:1021: error: $ac_config_sub $ac_cv_host_alias failed" >&5 
    13991022echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} 
    14001023   { (exit 1); exit 1; }; } 
    14011024 
    14021025fi 
    1403 echo "$as_me:$LINENO: result: $ac_cv_host" >&5 
     1026echo "$as_me:1026: result: $ac_cv_host" >&5 
    14041027echo "${ECHO_T}$ac_cv_host" >&6 
    14051028host=$ac_cv_host 
     
    14081031host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 
    14091032 
    1410  
    1411 echo "$as_me:$LINENO: checking target system type" >&5 
     1033echo "$as_me:1033: checking target system type" >&5 
    14121034echo $ECHO_N "checking target system type... $ECHO_C" >&6 
    14131035if test "${ac_cv_target+set}" = set; then 
     
    14181040  ac_cv_target_alias=$ac_cv_host_alias 
    14191041ac_cv_target=`$ac_config_sub $ac_cv_target_alias` || 
    1420   { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_target_alias failed" >&5 
     1042  { { echo "$as_me:1042: error: $ac_config_sub $ac_cv_target_alias failed" >&5 
    14211043echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;} 
    14221044   { (exit 1); exit 1; }; } 
    14231045 
    14241046fi 
    1425 echo "$as_me:$LINENO: result: $ac_cv_target" >&5 
     1047echo "$as_me:1047: result: $ac_cv_target" >&5 
    14261048echo "${ECHO_T}$ac_cv_target" >&6 
    14271049target=$ac_cv_target 
     
    14291051target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` 
    14301052target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` 
    1431  
    14321053 
    14331054# The aliases save the names the user supplied, while $host etc. 
     
    14371058    NONENONEs,x,x, && 
    14381059  program_prefix=${target_alias}- 
    1439                     ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h" 
    1440  
    1441                                                             ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak" 
    1442  
     1060ac_config_headers="$ac_config_headers pjlib/include/pj/compat/os_auto.h pjlib/include/pj/compat/m_auto.h" 
     1061 
     1062ac_config_files="$ac_config_files build.mak build/os-auto.mak pjlib/build/os-auto.mak pjlib-util/build/os-auto.mak pjmedia/build/os-auto.mak pjsip/build/os-auto.mak" 
    14431063 
    14441064if test "$CFLAGS" = ""; then 
     
    14581078  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 
    14591079set dummy ${ac_tool_prefix}gcc; ac_word=$2 
    1460 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1080echo "$as_me:1080: checking for $ac_word" >&5 
    14611081echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    14621082if test "${ac_cv_prog_CC+set}" = set; then 
     
    14661086  ac_cv_prog_CC="$CC" # Let the user override the test. 
    14671087else 
    1468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1469 for as_dir in $PATH 
    1470 do 
    1471   IFS=$as_save_IFS 
    1472   test -z "$as_dir" && as_dir=. 
    1473   for ac_exec_ext in '' $ac_executable_extensions; do 
    1474   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1475     ac_cv_prog_CC="${ac_tool_prefix}gcc" 
    1476     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1477     break 2 
    1478   fi 
    1479 done 
     1088  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1089ac_dummy="$PATH" 
     1090for ac_dir in $ac_dummy; do 
     1091  IFS=$ac_save_IFS 
     1092  test -z "$ac_dir" && ac_dir=. 
     1093  $as_executable_p "$ac_dir/$ac_word" || continue 
     1094ac_cv_prog_CC="${ac_tool_prefix}gcc" 
     1095echo "$as_me:1095: found $ac_dir/$ac_word" >&5 
     1096break 
    14801097done 
    14811098 
     
    14841101CC=$ac_cv_prog_CC 
    14851102if test -n "$CC"; then 
    1486   echo "$as_me:$LINENO: result: $CC" >&5 
     1103  echo "$as_me:1103: result: $CC" >&5 
    14871104echo "${ECHO_T}$CC" >&6 
    14881105else 
    1489   echo "$as_me:$LINENO: result: no" >&5 
     1106  echo "$as_me:1106: result: no" >&5 
    14901107echo "${ECHO_T}no" >&6 
    14911108fi 
     
    14961113  # Extract the first word of "gcc", so it can be a program name with args. 
    14971114set dummy gcc; ac_word=$2 
    1498 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1115echo "$as_me:1115: checking for $ac_word" >&5 
    14991116echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    15001117if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 
     
    15041121  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 
    15051122else 
    1506 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1507 for as_dir in $PATH 
    1508 do 
    1509   IFS=$as_save_IFS 
    1510   test -z "$as_dir" && as_dir=. 
    1511   for ac_exec_ext in '' $ac_executable_extensions; do 
    1512   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1513     ac_cv_prog_ac_ct_CC="gcc" 
    1514     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1515     break 2 
    1516   fi 
    1517 done 
     1123  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1124ac_dummy="$PATH" 
     1125for ac_dir in $ac_dummy; do 
     1126  IFS=$ac_save_IFS 
     1127  test -z "$ac_dir" && ac_dir=. 
     1128  $as_executable_p "$ac_dir/$ac_word" || continue 
     1129ac_cv_prog_ac_ct_CC="gcc" 
     1130echo "$as_me:1130: found $ac_dir/$ac_word" >&5 
     1131break 
    15181132done 
    15191133 
     
    15221136ac_ct_CC=$ac_cv_prog_ac_ct_CC 
    15231137if test -n "$ac_ct_CC"; then 
    1524   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 
     1138  echo "$as_me:1138: result: $ac_ct_CC" >&5 
    15251139echo "${ECHO_T}$ac_ct_CC" >&6 
    15261140else 
    1527   echo "$as_me:$LINENO: result: no" >&5 
     1141  echo "$as_me:1141: result: no" >&5 
    15281142echo "${ECHO_T}no" >&6 
    15291143fi 
     
    15381152  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 
    15391153set dummy ${ac_tool_prefix}cc; ac_word=$2 
    1540 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1154echo "$as_me:1154: checking for $ac_word" >&5 
    15411155echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    15421156if test "${ac_cv_prog_CC+set}" = set; then 
     
    15461160  ac_cv_prog_CC="$CC" # Let the user override the test. 
    15471161else 
    1548 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1549 for as_dir in $PATH 
    1550 do 
    1551   IFS=$as_save_IFS 
    1552   test -z "$as_dir" && as_dir=. 
    1553   for ac_exec_ext in '' $ac_executable_extensions; do 
    1554   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1555     ac_cv_prog_CC="${ac_tool_prefix}cc" 
    1556     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1557     break 2 
    1558   fi 
    1559 done 
     1162  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1163ac_dummy="$PATH" 
     1164for ac_dir in $ac_dummy; do 
     1165  IFS=$ac_save_IFS 
     1166  test -z "$ac_dir" && ac_dir=. 
     1167  $as_executable_p "$ac_dir/$ac_word" || continue 
     1168ac_cv_prog_CC="${ac_tool_prefix}cc" 
     1169echo "$as_me:1169: found $ac_dir/$ac_word" >&5 
     1170break 
    15601171done 
    15611172 
     
    15641175CC=$ac_cv_prog_CC 
    15651176if test -n "$CC"; then 
    1566   echo "$as_me:$LINENO: result: $CC" >&5 
     1177  echo "$as_me:1177: result: $CC" >&5 
    15671178echo "${ECHO_T}$CC" >&6 
    15681179else 
    1569   echo "$as_me:$LINENO: result: no" >&5 
     1180  echo "$as_me:1180: result: no" >&5 
    15701181echo "${ECHO_T}no" >&6 
    15711182fi 
     
    15761187  # Extract the first word of "cc", so it can be a program name with args. 
    15771188set dummy cc; ac_word=$2 
    1578 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1189echo "$as_me:1189: checking for $ac_word" >&5 
    15791190echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    15801191if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 
     
    15841195  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 
    15851196else 
    1586 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1587 for as_dir in $PATH 
    1588 do 
    1589   IFS=$as_save_IFS 
    1590   test -z "$as_dir" && as_dir=. 
    1591   for ac_exec_ext in '' $ac_executable_extensions; do 
    1592   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1593     ac_cv_prog_ac_ct_CC="cc" 
    1594     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1595     break 2 
    1596   fi 
    1597 done 
     1197  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1198ac_dummy="$PATH" 
     1199for ac_dir in $ac_dummy; do 
     1200  IFS=$ac_save_IFS 
     1201  test -z "$ac_dir" && ac_dir=. 
     1202  $as_executable_p "$ac_dir/$ac_word" || continue 
     1203ac_cv_prog_ac_ct_CC="cc" 
     1204echo "$as_me:1204: found $ac_dir/$ac_word" >&5 
     1205break 
    15981206done 
    15991207 
     
    16021210ac_ct_CC=$ac_cv_prog_ac_ct_CC 
    16031211if test -n "$ac_ct_CC"; then 
    1604   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 
     1212  echo "$as_me:1212: result: $ac_ct_CC" >&5 
    16051213echo "${ECHO_T}$ac_ct_CC" >&6 
    16061214else 
    1607   echo "$as_me:$LINENO: result: no" >&5 
     1215  echo "$as_me:1215: result: no" >&5 
    16081216echo "${ECHO_T}no" >&6 
    16091217fi 
     
    16181226  # Extract the first word of "cc", so it can be a program name with args. 
    16191227set dummy cc; ac_word=$2 
    1620 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1228echo "$as_me:1228: checking for $ac_word" >&5 
    16211229echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    16221230if test "${ac_cv_prog_CC+set}" = set; then 
     
    16271235else 
    16281236  ac_prog_rejected=no 
    1629 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1630 for as_dir in $PATH 
    1631 do 
    1632   IFS=$as_save_IFS 
    1633   test -z "$as_dir" && as_dir=. 
    1634   for ac_exec_ext in '' $ac_executable_extensions; do 
    1635   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1636     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 
    1637        ac_prog_rejected=yes 
    1638        continue 
    1639      fi 
    1640     ac_cv_prog_CC="cc" 
    1641     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1642     break 2 
    1643   fi 
    1644 done 
     1237  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1238ac_dummy="$PATH" 
     1239for ac_dir in $ac_dummy; do 
     1240  IFS=$ac_save_IFS 
     1241  test -z "$ac_dir" && ac_dir=. 
     1242  $as_executable_p "$ac_dir/$ac_word" || continue 
     1243if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then 
     1244  ac_prog_rejected=yes 
     1245  continue 
     1246fi 
     1247ac_cv_prog_CC="cc" 
     1248echo "$as_me:1248: found $ac_dir/$ac_word" >&5 
     1249break 
    16451250done 
    16461251 
     
    16541259    # first if we set CC to just the basename; use the full file name. 
    16551260    shift 
    1656     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 
     1261    set dummy "$ac_dir/$ac_word" ${1+"$@"} 
     1262    shift 
     1263    ac_cv_prog_CC="$@" 
    16571264  fi 
    16581265fi 
     
    16611268CC=$ac_cv_prog_CC 
    16621269if test -n "$CC"; then 
    1663   echo "$as_me:$LINENO: result: $CC" >&5 
     1270  echo "$as_me:1270: result: $CC" >&5 
    16641271echo "${ECHO_T}$CC" >&6 
    16651272else 
    1666   echo "$as_me:$LINENO: result: no" >&5 
     1273  echo "$as_me:1273: result: no" >&5 
    16671274echo "${ECHO_T}no" >&6 
    16681275fi 
     
    16751282    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 
    16761283set dummy $ac_tool_prefix$ac_prog; ac_word=$2 
    1677 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1284echo "$as_me:1284: checking for $ac_word" >&5 
    16781285echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    16791286if test "${ac_cv_prog_CC+set}" = set; then 
     
    16831290  ac_cv_prog_CC="$CC" # Let the user override the test. 
    16841291else 
    1685 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1686 for as_dir in $PATH 
    1687 do 
    1688   IFS=$as_save_IFS 
    1689   test -z "$as_dir" && as_dir=. 
    1690   for ac_exec_ext in '' $ac_executable_extensions; do 
    1691   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1692     ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 
    1693     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1694     break 2 
    1695   fi 
    1696 done 
     1292  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1293ac_dummy="$PATH" 
     1294for ac_dir in $ac_dummy; do 
     1295  IFS=$ac_save_IFS 
     1296  test -z "$ac_dir" && ac_dir=. 
     1297  $as_executable_p "$ac_dir/$ac_word" || continue 
     1298ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 
     1299echo "$as_me:1299: found $ac_dir/$ac_word" >&5 
     1300break 
    16971301done 
    16981302 
     
    17011305CC=$ac_cv_prog_CC 
    17021306if test -n "$CC"; then 
    1703   echo "$as_me:$LINENO: result: $CC" >&5 
     1307  echo "$as_me:1307: result: $CC" >&5 
    17041308echo "${ECHO_T}$CC" >&6 
    17051309else 
    1706   echo "$as_me:$LINENO: result: no" >&5 
     1310  echo "$as_me:1310: result: no" >&5 
    17071311echo "${ECHO_T}no" >&6 
    17081312fi 
     
    17171321  # Extract the first word of "$ac_prog", so it can be a program name with args. 
    17181322set dummy $ac_prog; ac_word=$2 
    1719 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1323echo "$as_me:1323: checking for $ac_word" >&5 
    17201324echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    17211325if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 
     
    17251329  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 
    17261330else 
    1727 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    1728 for as_dir in $PATH 
    1729 do 
    1730   IFS=$as_save_IFS 
    1731   test -z "$as_dir" && as_dir=. 
    1732   for ac_exec_ext in '' $ac_executable_extensions; do 
    1733   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    1734     ac_cv_prog_ac_ct_CC="$ac_prog" 
    1735     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    1736     break 2 
    1737   fi 
    1738 done 
     1331  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1332ac_dummy="$PATH" 
     1333for ac_dir in $ac_dummy; do 
     1334  IFS=$ac_save_IFS 
     1335  test -z "$ac_dir" && ac_dir=. 
     1336  $as_executable_p "$ac_dir/$ac_word" || continue 
     1337ac_cv_prog_ac_ct_CC="$ac_prog" 
     1338echo "$as_me:1338: found $ac_dir/$ac_word" >&5 
     1339break 
    17391340done 
    17401341 
     
    17431344ac_ct_CC=$ac_cv_prog_ac_ct_CC 
    17441345if test -n "$ac_ct_CC"; then 
    1745   echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 
     1346  echo "$as_me:1346: result: $ac_ct_CC" >&5 
    17461347echo "${ECHO_T}$ac_ct_CC" >&6 
    17471348else 
    1748   echo "$as_me:$LINENO: result: no" >&5 
     1349  echo "$as_me:1349: result: no" >&5 
    17491350echo "${ECHO_T}no" >&6 
    17501351fi 
     
    17581359fi 
    17591360 
    1760  
    1761 test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 
    1762 See \`config.log' for more details." >&5 
    1763 echo "$as_me: error: no acceptable C compiler found in \$PATH 
    1764 See \`config.log' for more details." >&2;} 
     1361test -z "$CC" && { { echo "$as_me:1361: error: no acceptable cc found in \$PATH" >&5 
     1362echo "$as_me: error: no acceptable cc found in \$PATH" >&2;} 
    17651363   { (exit 1); exit 1; }; } 
    17661364 
    17671365# Provide some information about the compiler. 
    1768 echo "$as_me:$LINENO:" \ 
     1366echo "$as_me:1366:" \ 
    17691367     "checking for C compiler version" >&5 
    17701368ac_compiler=`set X $ac_compile; echo $2` 
    1771 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 
     1369{ (eval echo "$as_me:1369: \"$ac_compiler --version </dev/null >&5\"") >&5 
    17721370  (eval $ac_compiler --version </dev/null >&5) 2>&5 
    17731371  ac_status=$? 
    1774   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1372  echo "$as_me:1372: \$? = $ac_status" >&5 
    17751373  (exit $ac_status); } 
    1776 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 
     1374{ (eval echo "$as_me:1374: \"$ac_compiler -v </dev/null >&5\"") >&5 
    17771375  (eval $ac_compiler -v </dev/null >&5) 2>&5 
    17781376  ac_status=$? 
    1779   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1377  echo "$as_me:1377: \$? = $ac_status" >&5 
    17801378  (exit $ac_status); } 
    1781 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 
     1379{ (eval echo "$as_me:1379: \"$ac_compiler -V </dev/null >&5\"") >&5 
    17821380  (eval $ac_compiler -V </dev/null >&5) 2>&5 
    17831381  ac_status=$? 
    1784   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1382  echo "$as_me:1382: \$? = $ac_status" >&5 
    17851383  (exit $ac_status); } 
    17861384 
    17871385cat >conftest.$ac_ext <<_ACEOF 
    1788 /* confdefs.h.  */ 
    1789 _ACEOF 
    1790 cat confdefs.h >>conftest.$ac_ext 
    1791 cat >>conftest.$ac_ext <<_ACEOF 
    1792 /* end confdefs.h.  */ 
     1386#line 1386 "configure" 
     1387#include "confdefs.h" 
    17931388 
    17941389int 
     
    18011396_ACEOF 
    18021397ac_clean_files_save=$ac_clean_files 
    1803 ac_clean_files="$ac_clean_files a.out a.exe b.out" 
     1398ac_clean_files="$ac_clean_files a.out a.exe" 
    18041399# Try to create an executable without -o first, disregard a.out. 
    18051400# It will help us diagnose broken compilers, and finding out an intuition 
    18061401# of exeext. 
    1807 echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 
    1808 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 
     1402echo "$as_me:1402: checking for C compiler default output" >&5 
     1403echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 
    18091404ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 
    1810 if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 
     1405if { (eval echo "$as_me:1405: \"$ac_link_default\"") >&5 
    18111406  (eval $ac_link_default) 2>&5 
    18121407  ac_status=$? 
    1813   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1408  echo "$as_me:1408: \$? = $ac_status" >&5 
    18141409  (exit $ac_status); }; then 
    18151410  # Find the output, starting from the most likely.  This scheme is 
    18161411# not robust to junk in `.', hence go to wildcards (a.*) only as a last 
    18171412# resort. 
    1818  
    1819 # Be careful to initialize this variable, since it used to be cached. 
    1820 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. 
    1821 ac_cv_exeext= 
    1822 # b.out is created by i960 compilers. 
    1823 for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out 
    1824 do 
    1825   test -f "$ac_file" || continue 
     1413for ac_file in `ls a.exe conftest.exe 2>/dev/null; 
     1414                ls a.out conftest 2>/dev/null; 
     1415                ls a.* conftest.* 2>/dev/null`; do 
    18261416  case $ac_file in 
    1827     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) 
    1828         ;; 
    1829     conftest.$ac_ext ) 
    1830         # This is the source file. 
    1831         ;; 
    1832     [ab].out ) 
    1833         # We found the default executable, but exeext='' is most 
    1834         # certainly right. 
    1835         break;; 
    1836     *.* ) 
    1837         ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 
    1838         # FIXME: I believe we export ac_cv_exeext for Libtool, 
    1839         # but it would be cool to find out if it's true.  Does anybody 
    1840         # maintain Libtool? --akim. 
    1841         export ac_cv_exeext 
    1842         break;; 
    1843     * ) 
    1844         break;; 
     1417    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; 
     1418    a.out ) # We found the default executable, but exeext='' is most 
     1419            # certainly right. 
     1420            break;; 
     1421    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 
     1422          # FIXME: I believe we export ac_cv_exeext for Libtool --akim. 
     1423          export ac_cv_exeext 
     1424          break;; 
     1425    * ) break;; 
    18451426  esac 
    18461427done 
    18471428else 
    18481429  echo "$as_me: failed program was:" >&5 
    1849 sed 's/^/| /' conftest.$ac_ext >&5 
    1850  
    1851 { { echo "$as_me:$LINENO: error: C compiler cannot create executables 
    1852 See \`config.log' for more details." >&5 
    1853 echo "$as_me: error: C compiler cannot create executables 
    1854 See \`config.log' for more details." >&2;} 
     1430cat conftest.$ac_ext >&5 
     1431{ { echo "$as_me:1431: error: C compiler cannot create executables" >&5 
     1432echo "$as_me: error: C compiler cannot create executables" >&2;} 
    18551433   { (exit 77); exit 77; }; } 
    18561434fi 
    18571435 
    18581436ac_exeext=$ac_cv_exeext 
    1859 echo "$as_me:$LINENO: result: $ac_file" >&5 
     1437echo "$as_me:1437: result: $ac_file" >&5 
    18601438echo "${ECHO_T}$ac_file" >&6 
    18611439 
    18621440# Check the compiler produces executables we can run.  If not, either 
    18631441# the compiler is broken, or we cross compile. 
    1864 echo "$as_me:$LINENO: checking whether the C compiler works" >&5 
     1442echo "$as_me:1442: checking whether the C compiler works" >&5 
    18651443echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 
    18661444# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 
     
    18681446if test "$cross_compiling" != yes; then 
    18691447  if { ac_try='./$ac_file' 
    1870   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1448  { (eval echo "$as_me:1448: \"$ac_try\"") >&5 
    18711449  (eval $ac_try) 2>&5 
    18721450  ac_status=$? 
    1873   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1451  echo "$as_me:1451: \$? = $ac_status" >&5 
    18741452  (exit $ac_status); }; }; then 
    18751453    cross_compiling=no 
     
    18781456        cross_compiling=yes 
    18791457    else 
    1880         { { echo "$as_me:$LINENO: error: cannot run C compiled programs. 
    1881 If you meant to cross compile, use \`--host'. 
    1882 See \`config.log' for more details." >&5 
     1458        { { echo "$as_me:1458: error: cannot run C compiled programs. 
     1459If you meant to cross compile, use \`--host'." >&5 
    18831460echo "$as_me: error: cannot run C compiled programs. 
    1884 If you meant to cross compile, use \`--host'. 
    1885 See \`config.log' for more details." >&2;} 
     1461If you meant to cross compile, use \`--host'." >&2;} 
    18861462   { (exit 1); exit 1; }; } 
    18871463    fi 
    18881464  fi 
    18891465fi 
    1890 echo "$as_me:$LINENO: result: yes" >&5 
     1466echo "$as_me:1466: result: yes" >&5 
    18911467echo "${ECHO_T}yes" >&6 
    18921468 
    1893 rm -f a.out a.exe conftest$ac_cv_exeext b.out 
     1469rm -f a.out a.exe conftest$ac_cv_exeext 
    18941470ac_clean_files=$ac_clean_files_save 
    18951471# Check the compiler produces executables we can run.  If not, either 
    18961472# the compiler is broken, or we cross compile. 
    1897 echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 
     1473echo "$as_me:1473: checking whether we are cross compiling" >&5 
    18981474echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 
    1899 echo "$as_me:$LINENO: result: $cross_compiling" >&5 
     1475echo "$as_me:1475: result: $cross_compiling" >&5 
    19001476echo "${ECHO_T}$cross_compiling" >&6 
    19011477 
    1902 echo "$as_me:$LINENO: checking for suffix of executables" >&5 
    1903 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 
    1904 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     1478echo "$as_me:1478: checking for executable suffix" >&5 
     1479echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6 
     1480if { (eval echo "$as_me:1480: \"$ac_link\"") >&5 
    19051481  (eval $ac_link) 2>&5 
    19061482  ac_status=$? 
    1907   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1483  echo "$as_me:1483: \$? = $ac_status" >&5 
    19081484  (exit $ac_status); }; then 
    19091485  # If both `conftest.exe' and `conftest' are `present' (well, observable) 
     
    19111487# work properly (i.e., refer to `conftest.exe'), while it won't with 
    19121488# `rm'. 
    1913 for ac_file in conftest.exe conftest conftest.*; do 
    1914   test -f "$ac_file" || continue 
     1489for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do 
    19151490  case $ac_file in 
    1916     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; 
     1491    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;; 
    19171492    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 
    1918           export ac_cv_exeext 
    1919           break;; 
     1493          export ac_cv_exeext 
     1494          break;; 
    19201495    * ) break;; 
    19211496  esac 
    19221497done 
    19231498else 
    1924   { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link 
    1925 See \`config.log' for more details." >&5 
    1926 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link 
    1927 See \`config.log' for more details." >&2;} 
     1499  { { echo "$as_me:1499: error: cannot compute EXEEXT: cannot compile and link" >&5 
     1500echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;} 
    19281501   { (exit 1); exit 1; }; } 
    19291502fi 
    19301503 
    19311504rm -f conftest$ac_cv_exeext 
    1932 echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 
     1505echo "$as_me:1505: result: $ac_cv_exeext" >&5 
    19331506echo "${ECHO_T}$ac_cv_exeext" >&6 
    19341507 
     
    19361509EXEEXT=$ac_cv_exeext 
    19371510ac_exeext=$EXEEXT 
    1938 echo "$as_me:$LINENO: checking for suffix of object files" >&5 
    1939 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 
     1511echo "$as_me:1511: checking for object suffix" >&5 
     1512echo $ECHO_N "checking for object suffix... $ECHO_C" >&6 
    19401513if test "${ac_cv_objext+set}" = set; then 
    19411514  echo $ECHO_N "(cached) $ECHO_C" >&6 
    19421515else 
    19431516  cat >conftest.$ac_ext <<_ACEOF 
    1944 /* confdefs.h.  */ 
    1945 _ACEOF 
    1946 cat confdefs.h >>conftest.$ac_ext 
    1947 cat >>conftest.$ac_ext <<_ACEOF 
    1948 /* end confdefs.h.  */ 
     1517#line 1517 "configure" 
     1518#include "confdefs.h" 
    19491519 
    19501520int 
     
    19571527_ACEOF 
    19581528rm -f conftest.o conftest.obj 
    1959 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
     1529if { (eval echo "$as_me:1529: \"$ac_compile\"") >&5 
    19601530  (eval $ac_compile) 2>&5 
    19611531  ac_status=$? 
    1962   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1532  echo "$as_me:1532: \$? = $ac_status" >&5 
    19631533  (exit $ac_status); }; then 
    19641534  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do 
    19651535  case $ac_file in 
    1966     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; 
     1536    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;; 
    19671537    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 
    19681538       break;; 
     
    19711541else 
    19721542  echo "$as_me: failed program was:" >&5 
    1973 sed 's/^/| /' conftest.$ac_ext >&5 
    1974  
    1975 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile 
    1976 See \`config.log' for more details." >&5 
    1977 echo "$as_me: error: cannot compute suffix of object files: cannot compile 
    1978 See \`config.log' for more details." >&2;} 
     1543cat conftest.$ac_ext >&5 
     1544{ { echo "$as_me:1544: error: cannot compute OBJEXT: cannot compile" >&5 
     1545echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;} 
    19791546   { (exit 1); exit 1; }; } 
    19801547fi 
     
    19821549rm -f conftest.$ac_cv_objext conftest.$ac_ext 
    19831550fi 
    1984 echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 
     1551echo "$as_me:1551: result: $ac_cv_objext" >&5 
    19851552echo "${ECHO_T}$ac_cv_objext" >&6 
    19861553OBJEXT=$ac_cv_objext 
    19871554ac_objext=$OBJEXT 
    1988 echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 
     1555echo "$as_me:1555: checking whether we are using the GNU C compiler" >&5 
    19891556echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 
    19901557if test "${ac_cv_c_compiler_gnu+set}" = set; then 
     
    19921559else 
    19931560  cat >conftest.$ac_ext <<_ACEOF 
    1994 /* confdefs.h.  */ 
    1995 _ACEOF 
    1996 cat confdefs.h >>conftest.$ac_ext 
    1997 cat >>conftest.$ac_ext <<_ACEOF 
    1998 /* end confdefs.h.  */ 
     1561#line 1561 "configure" 
     1562#include "confdefs.h" 
    19991563 
    20001564int 
     
    20101574_ACEOF 
    20111575rm -f conftest.$ac_objext 
    2012 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2013   (eval $ac_compile) 2>conftest.er1 
    2014   ac_status=$? 
    2015   grep -v '^ *+' conftest.er1 >conftest.err 
    2016   rm -f conftest.er1 
    2017   cat conftest.err >&5 
    2018   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1576if { (eval echo "$as_me:1576: \"$ac_compile\"") >&5 
     1577  (eval $ac_compile) 2>&5 
     1578  ac_status=$? 
     1579  echo "$as_me:1579: \$? = $ac_status" >&5 
    20191580  (exit $ac_status); } && 
    2020          { ac_try='test -z "$ac_c_werror_flag" 
    2021                          || test ! -s conftest.err' 
    2022   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1581         { ac_try='test -s conftest.$ac_objext' 
     1582  { (eval echo "$as_me:1582: \"$ac_try\"") >&5 
    20231583  (eval $ac_try) 2>&5 
    20241584  ac_status=$? 
    2025   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2026   (exit $ac_status); }; } && 
    2027          { ac_try='test -s conftest.$ac_objext' 
    2028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2029   (eval $ac_try) 2>&5 
    2030   ac_status=$? 
    2031   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1585  echo "$as_me:1585: \$? = $ac_status" >&5 
    20321586  (exit $ac_status); }; }; then 
    20331587  ac_compiler_gnu=yes 
    20341588else 
    20351589  echo "$as_me: failed program was:" >&5 
    2036 sed 's/^/| /' conftest.$ac_ext >&5 
    2037  
     1590cat conftest.$ac_ext >&5 
    20381591ac_compiler_gnu=no 
    20391592fi 
    2040 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     1593rm -f conftest.$ac_objext conftest.$ac_ext 
    20411594ac_cv_c_compiler_gnu=$ac_compiler_gnu 
    20421595 
    20431596fi 
    2044 echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 
     1597echo "$as_me:1597: result: $ac_cv_c_compiler_gnu" >&5 
    20451598echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 
    20461599GCC=`test $ac_compiler_gnu = yes && echo yes` 
     
    20481601ac_save_CFLAGS=$CFLAGS 
    20491602CFLAGS="-g" 
    2050 echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 
     1603echo "$as_me:1603: checking whether $CC accepts -g" >&5 
    20511604echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 
    20521605if test "${ac_cv_prog_cc_g+set}" = set; then 
     
    20541607else 
    20551608  cat >conftest.$ac_ext <<_ACEOF 
    2056 /* confdefs.h.  */ 
    2057 _ACEOF 
    2058 cat confdefs.h >>conftest.$ac_ext 
    2059 cat >>conftest.$ac_ext <<_ACEOF 
    2060 /* end confdefs.h.  */ 
     1609#line 1609 "configure" 
     1610#include "confdefs.h" 
    20611611 
    20621612int 
     
    20691619_ACEOF 
    20701620rm -f conftest.$ac_objext 
    2071 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2072   (eval $ac_compile) 2>conftest.er1 
    2073   ac_status=$? 
    2074   grep -v '^ *+' conftest.er1 >conftest.err 
    2075   rm -f conftest.er1 
    2076   cat conftest.err >&5 
    2077   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1621if { (eval echo "$as_me:1621: \"$ac_compile\"") >&5 
     1622  (eval $ac_compile) 2>&5 
     1623  ac_status=$? 
     1624  echo "$as_me:1624: \$? = $ac_status" >&5 
    20781625  (exit $ac_status); } && 
    2079          { ac_try='test -z "$ac_c_werror_flag" 
    2080                          || test ! -s conftest.err' 
    2081   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1626         { ac_try='test -s conftest.$ac_objext' 
     1627  { (eval echo "$as_me:1627: \"$ac_try\"") >&5 
    20821628  (eval $ac_try) 2>&5 
    20831629  ac_status=$? 
    2084   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2085   (exit $ac_status); }; } && 
    2086          { ac_try='test -s conftest.$ac_objext' 
    2087   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2088   (eval $ac_try) 2>&5 
    2089   ac_status=$? 
    2090   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1630  echo "$as_me:1630: \$? = $ac_status" >&5 
    20911631  (exit $ac_status); }; }; then 
    20921632  ac_cv_prog_cc_g=yes 
    20931633else 
    20941634  echo "$as_me: failed program was:" >&5 
    2095 sed 's/^/| /' conftest.$ac_ext >&5 
    2096  
     1635cat conftest.$ac_ext >&5 
    20971636ac_cv_prog_cc_g=no 
    20981637fi 
    2099 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    2100 fi 
    2101 echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 
     1638rm -f conftest.$ac_objext conftest.$ac_ext 
     1639fi 
     1640echo "$as_me:1640: result: $ac_cv_prog_cc_g" >&5 
    21021641echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 
    21031642if test "$ac_test_CFLAGS" = set; then 
     
    21161655  fi 
    21171656fi 
    2118 echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 
    2119 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 
    2120 if test "${ac_cv_prog_cc_stdc+set}" = set; then 
    2121   echo $ECHO_N "(cached) $ECHO_C" >&6 
    2122 else 
    2123   ac_cv_prog_cc_stdc=no 
    2124 ac_save_CC=$CC 
    2125 cat >conftest.$ac_ext <<_ACEOF 
    2126 /* confdefs.h.  */ 
    2127 _ACEOF 
    2128 cat confdefs.h >>conftest.$ac_ext 
    2129 cat >>conftest.$ac_ext <<_ACEOF 
    2130 /* end confdefs.h.  */ 
    2131 #include <stdarg.h> 
    2132 #include <stdio.h> 
    2133 #include <sys/types.h> 
    2134 #include <sys/stat.h> 
    2135 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */ 
    2136 struct buf { int x; }; 
    2137 FILE * (*rcsopen) (struct buf *, struct stat *, int); 
    2138 static char *e (p, i) 
    2139      char **p; 
    2140      int i; 
    2141 { 
    2142   return p[i]; 
    2143 } 
    2144 static char *f (char * (*g) (char **, int), char **p, ...) 
    2145 { 
    2146   char *s; 
    2147   va_list v; 
    2148   va_start (v,p); 
    2149   s = g (p, va_arg (v,int)); 
    2150   va_end (v); 
    2151   return s; 
    2152 } 
    2153  
    2154 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has 
    2155    function prototypes and stuff, but not '\xHH' hex character constants. 
    2156    These don't provoke an error unfortunately, instead are silently treated 
    2157    as 'x'.  The following induces an error, until -std1 is added to get 
    2158    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an 
    2159    array size at least.  It's necessary to write '\x00'==0 to get something 
    2160    that's true only with -std1.  */ 
    2161 int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 
    2162  
    2163 int test (int i, double x); 
    2164 struct s1 {int (*f) (int a);}; 
    2165 struct s2 {int (*f) (double a);}; 
    2166 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 
    2167 int argc; 
    2168 char **argv; 
    2169 int 
    2170 main () 
    2171 { 
    2172 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1]; 
    2173   ; 
    2174   return 0; 
    2175 } 
    2176 _ACEOF 
    2177 # Don't try gcc -ansi; that turns off useful extensions and 
    2178 # breaks some systems' header files. 
    2179 # AIX                   -qlanglvl=ansi 
    2180 # Ultrix and OSF/1      -std1 
    2181 # HP-UX 10.20 and later -Ae 
    2182 # HP-UX older versions  -Aa -D_HPUX_SOURCE 
    2183 # SVR4                  -Xc -D__EXTENSIONS__ 
    2184 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 
    2185 do 
    2186   CC="$ac_save_CC $ac_arg" 
    2187   rm -f conftest.$ac_objext 
    2188 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2189   (eval $ac_compile) 2>conftest.er1 
    2190   ac_status=$? 
    2191   grep -v '^ *+' conftest.er1 >conftest.err 
    2192   rm -f conftest.er1 
    2193   cat conftest.err >&5 
    2194   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2195   (exit $ac_status); } && 
    2196          { ac_try='test -z "$ac_c_werror_flag" 
    2197                          || test ! -s conftest.err' 
    2198   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2199   (eval $ac_try) 2>&5 
    2200   ac_status=$? 
    2201   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2202   (exit $ac_status); }; } && 
    2203          { ac_try='test -s conftest.$ac_objext' 
    2204   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2205   (eval $ac_try) 2>&5 
    2206   ac_status=$? 
    2207   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2208   (exit $ac_status); }; }; then 
    2209   ac_cv_prog_cc_stdc=$ac_arg 
    2210 break 
    2211 else 
    2212   echo "$as_me: failed program was:" >&5 
    2213 sed 's/^/| /' conftest.$ac_ext >&5 
    2214  
    2215 fi 
    2216 rm -f conftest.err conftest.$ac_objext 
    2217 done 
    2218 rm -f conftest.$ac_ext conftest.$ac_objext 
    2219 CC=$ac_save_CC 
    2220  
    2221 fi 
    2222  
    2223 case "x$ac_cv_prog_cc_stdc" in 
    2224   x|xno) 
    2225     echo "$as_me:$LINENO: result: none needed" >&5 
    2226 echo "${ECHO_T}none needed" >&6 ;; 
    2227   *) 
    2228     echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 
    2229 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 
    2230     CC="$CC $ac_cv_prog_cc_stdc" ;; 
    2231 esac 
    2232  
    22331657# Some people use a C++ compiler to compile C.  Since we use `exit', 
    22341658# in C++ we need to declare it.  In case someone uses the same compiler 
     
    22411665_ACEOF 
    22421666rm -f conftest.$ac_objext 
    2243 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2244   (eval $ac_compile) 2>conftest.er1 
    2245   ac_status=$? 
    2246   grep -v '^ *+' conftest.er1 >conftest.err 
    2247   rm -f conftest.er1 
    2248   cat conftest.err >&5 
    2249   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1667if { (eval echo "$as_me:1667: \"$ac_compile\"") >&5 
     1668  (eval $ac_compile) 2>&5 
     1669  ac_status=$? 
     1670  echo "$as_me:1670: \$? = $ac_status" >&5 
    22501671  (exit $ac_status); } && 
    2251          { ac_try='test -z "$ac_c_werror_flag" 
    2252                          || test ! -s conftest.err' 
    2253   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1672         { ac_try='test -s conftest.$ac_objext' 
     1673  { (eval echo "$as_me:1673: \"$ac_try\"") >&5 
    22541674  (eval $ac_try) 2>&5 
    22551675  ac_status=$? 
    2256   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2257   (exit $ac_status); }; } && 
    2258          { ac_try='test -s conftest.$ac_objext' 
    2259   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2260   (eval $ac_try) 2>&5 
    2261   ac_status=$? 
    2262   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1676  echo "$as_me:1676: \$? = $ac_status" >&5 
    22631677  (exit $ac_status); }; }; then 
    22641678  for ac_declaration in \ 
    2265    '' \ 
     1679   ''\ 
     1680   '#include <stdlib.h>' \ 
    22661681   'extern "C" void std::exit (int) throw (); using std::exit;' \ 
    22671682   'extern "C" void std::exit (int); using std::exit;' \ 
     
    22711686do 
    22721687  cat >conftest.$ac_ext <<_ACEOF 
    2273 /* confdefs.h.  */ 
    2274 _ACEOF 
    2275 cat confdefs.h >>conftest.$ac_ext 
    2276 cat >>conftest.$ac_ext <<_ACEOF 
    2277 /* end confdefs.h.  */ 
    2278 $ac_declaration 
     1688#line 1688 "configure" 
     1689#include "confdefs.h" 
    22791690#include <stdlib.h> 
    2280 int 
    2281 main () 
    2282 { 
    2283 exit (42); 
    2284   ; 
    2285   return 0; 
    2286 } 
    2287 _ACEOF 
    2288 rm -f conftest.$ac_objext 
    2289 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2290   (eval $ac_compile) 2>conftest.er1 
    2291   ac_status=$? 
    2292   grep -v '^ *+' conftest.er1 >conftest.err 
    2293   rm -f conftest.er1 
    2294   cat conftest.err >&5 
    2295   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2296   (exit $ac_status); } && 
    2297          { ac_try='test -z "$ac_c_werror_flag" 
    2298                          || test ! -s conftest.err' 
    2299   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2300   (eval $ac_try) 2>&5 
    2301   ac_status=$? 
    2302   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2303   (exit $ac_status); }; } && 
    2304          { ac_try='test -s conftest.$ac_objext' 
    2305   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2306   (eval $ac_try) 2>&5 
    2307   ac_status=$? 
    2308   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2309   (exit $ac_status); }; }; then 
    2310   : 
    2311 else 
    2312   echo "$as_me: failed program was:" >&5 
    2313 sed 's/^/| /' conftest.$ac_ext >&5 
    2314  
    2315 continue 
    2316 fi 
    2317 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    2318   cat >conftest.$ac_ext <<_ACEOF 
    2319 /* confdefs.h.  */ 
    2320 _ACEOF 
    2321 cat confdefs.h >>conftest.$ac_ext 
    2322 cat >>conftest.$ac_ext <<_ACEOF 
    2323 /* end confdefs.h.  */ 
    23241691$ac_declaration 
    23251692int 
     
    23321699_ACEOF 
    23331700rm -f conftest.$ac_objext 
    2334 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2335   (eval $ac_compile) 2>conftest.er1 
    2336   ac_status=$? 
    2337   grep -v '^ *+' conftest.er1 >conftest.err 
    2338   rm -f conftest.er1 
    2339   cat conftest.err >&5 
    2340   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1701if { (eval echo "$as_me:1701: \"$ac_compile\"") >&5 
     1702  (eval $ac_compile) 2>&5 
     1703  ac_status=$? 
     1704  echo "$as_me:1704: \$? = $ac_status" >&5 
    23411705  (exit $ac_status); } && 
    2342          { ac_try='test -z "$ac_c_werror_flag" 
    2343                          || test ! -s conftest.err' 
    2344   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1706         { ac_try='test -s conftest.$ac_objext' 
     1707  { (eval echo "$as_me:1707: \"$ac_try\"") >&5 
    23451708  (eval $ac_try) 2>&5 
    23461709  ac_status=$? 
    2347   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2348   (exit $ac_status); }; } && 
    2349          { ac_try='test -s conftest.$ac_objext' 
    2350   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1710  echo "$as_me:1710: \$? = $ac_status" >&5 
     1711  (exit $ac_status); }; }; then 
     1712  : 
     1713else 
     1714  echo "$as_me: failed program was:" >&5 
     1715cat conftest.$ac_ext >&5 
     1716continue 
     1717fi 
     1718rm -f conftest.$ac_objext conftest.$ac_ext 
     1719  cat >conftest.$ac_ext <<_ACEOF 
     1720#line 1720 "configure" 
     1721#include "confdefs.h" 
     1722$ac_declaration 
     1723int 
     1724main () 
     1725{ 
     1726exit (42); 
     1727  ; 
     1728  return 0; 
     1729} 
     1730_ACEOF 
     1731rm -f conftest.$ac_objext 
     1732if { (eval echo "$as_me:1732: \"$ac_compile\"") >&5 
     1733  (eval $ac_compile) 2>&5 
     1734  ac_status=$? 
     1735  echo "$as_me:1735: \$? = $ac_status" >&5 
     1736  (exit $ac_status); } && 
     1737         { ac_try='test -s conftest.$ac_objext' 
     1738  { (eval echo "$as_me:1738: \"$ac_try\"") >&5 
    23511739  (eval $ac_try) 2>&5 
    23521740  ac_status=$? 
    2353   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1741  echo "$as_me:1741: \$? = $ac_status" >&5 
    23541742  (exit $ac_status); }; }; then 
    23551743  break 
    23561744else 
    23571745  echo "$as_me: failed program was:" >&5 
    2358 sed 's/^/| /' conftest.$ac_ext >&5 
    2359  
    2360 fi 
    2361 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     1746cat conftest.$ac_ext >&5 
     1747fi 
     1748rm -f conftest.$ac_objext conftest.$ac_ext 
    23621749done 
    23631750rm -f conftest* 
     
    23701757else 
    23711758  echo "$as_me: failed program was:" >&5 
    2372 sed 's/^/| /' conftest.$ac_ext >&5 
    2373  
    2374 fi 
    2375 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     1759cat conftest.$ac_ext >&5 
     1760fi 
     1761rm -f conftest.$ac_objext conftest.$ac_ext 
    23761762ac_ext=c 
    23771763ac_cpp='$CPP $CPPFLAGS' 
     
    23901776    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 
    23911777set dummy $ac_tool_prefix$ac_prog; ac_word=$2 
    2392 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1778echo "$as_me:1778: checking for $ac_word" >&5 
    23931779echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    23941780if test "${ac_cv_prog_CXX+set}" = set; then 
     
    23981784  ac_cv_prog_CXX="$CXX" # Let the user override the test. 
    23991785else 
    2400 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    2401 for as_dir in $PATH 
    2402 do 
    2403   IFS=$as_save_IFS 
    2404   test -z "$as_dir" && as_dir=. 
    2405   for ac_exec_ext in '' $ac_executable_extensions; do 
    2406   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    2407     ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 
    2408     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    2409     break 2 
    2410   fi 
    2411 done 
     1786  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1787ac_dummy="$PATH" 
     1788for ac_dir in $ac_dummy; do 
     1789  IFS=$ac_save_IFS 
     1790  test -z "$ac_dir" && ac_dir=. 
     1791  $as_executable_p "$ac_dir/$ac_word" || continue 
     1792ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 
     1793echo "$as_me:1793: found $ac_dir/$ac_word" >&5 
     1794break 
    24121795done 
    24131796 
     
    24161799CXX=$ac_cv_prog_CXX 
    24171800if test -n "$CXX"; then 
    2418   echo "$as_me:$LINENO: result: $CXX" >&5 
     1801  echo "$as_me:1801: result: $CXX" >&5 
    24191802echo "${ECHO_T}$CXX" >&6 
    24201803else 
    2421   echo "$as_me:$LINENO: result: no" >&5 
     1804  echo "$as_me:1804: result: no" >&5 
    24221805echo "${ECHO_T}no" >&6 
    24231806fi 
     
    24321815  # Extract the first word of "$ac_prog", so it can be a program name with args. 
    24331816set dummy $ac_prog; ac_word=$2 
    2434 echo "$as_me:$LINENO: checking for $ac_word" >&5 
     1817echo "$as_me:1817: checking for $ac_word" >&5 
    24351818echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 
    24361819if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then 
     
    24401823  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 
    24411824else 
    2442 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    2443 for as_dir in $PATH 
    2444 do 
    2445   IFS=$as_save_IFS 
    2446   test -z "$as_dir" && as_dir=. 
    2447   for ac_exec_ext in '' $ac_executable_extensions; do 
    2448   if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 
    2449     ac_cv_prog_ac_ct_CXX="$ac_prog" 
    2450     echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 
    2451     break 2 
    2452   fi 
    2453 done 
     1825  ac_save_IFS=$IFS; IFS=$ac_path_separator 
     1826ac_dummy="$PATH" 
     1827for ac_dir in $ac_dummy; do 
     1828  IFS=$ac_save_IFS 
     1829  test -z "$ac_dir" && ac_dir=. 
     1830  $as_executable_p "$ac_dir/$ac_word" || continue 
     1831ac_cv_prog_ac_ct_CXX="$ac_prog" 
     1832echo "$as_me:1832: found $ac_dir/$ac_word" >&5 
     1833break 
    24541834done 
    24551835 
     
    24581838ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 
    24591839if test -n "$ac_ct_CXX"; then 
    2460   echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 
     1840  echo "$as_me:1840: result: $ac_ct_CXX" >&5 
    24611841echo "${ECHO_T}$ac_ct_CXX" >&6 
    24621842else 
    2463   echo "$as_me:$LINENO: result: no" >&5 
     1843  echo "$as_me:1843: result: no" >&5 
    24641844echo "${ECHO_T}no" >&6 
    24651845fi 
     
    24721852fi 
    24731853 
    2474  
    24751854# Provide some information about the compiler. 
    2476 echo "$as_me:$LINENO:" \ 
     1855echo "$as_me:1855:" \ 
    24771856     "checking for C++ compiler version" >&5 
    24781857ac_compiler=`set X $ac_compile; echo $2` 
    2479 { (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5 
     1858{ (eval echo "$as_me:1858: \"$ac_compiler --version </dev/null >&5\"") >&5 
    24801859  (eval $ac_compiler --version </dev/null >&5) 2>&5 
    24811860  ac_status=$? 
    2482   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1861  echo "$as_me:1861: \$? = $ac_status" >&5 
    24831862  (exit $ac_status); } 
    2484 { (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5 
     1863{ (eval echo "$as_me:1863: \"$ac_compiler -v </dev/null >&5\"") >&5 
    24851864  (eval $ac_compiler -v </dev/null >&5) 2>&5 
    24861865  ac_status=$? 
    2487   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1866  echo "$as_me:1866: \$? = $ac_status" >&5 
    24881867  (exit $ac_status); } 
    2489 { (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5 
     1868{ (eval echo "$as_me:1868: \"$ac_compiler -V </dev/null >&5\"") >&5 
    24901869  (eval $ac_compiler -V </dev/null >&5) 2>&5 
    24911870  ac_status=$? 
    2492   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1871  echo "$as_me:1871: \$? = $ac_status" >&5 
    24931872  (exit $ac_status); } 
    24941873 
    2495 echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 
     1874echo "$as_me:1874: checking whether we are using the GNU C++ compiler" >&5 
    24961875echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 
    24971876if test "${ac_cv_cxx_compiler_gnu+set}" = set; then 
     
    24991878else 
    25001879  cat >conftest.$ac_ext <<_ACEOF 
    2501 /* confdefs.h.  */ 
    2502 _ACEOF 
    2503 cat confdefs.h >>conftest.$ac_ext 
    2504 cat >>conftest.$ac_ext <<_ACEOF 
    2505 /* end confdefs.h.  */ 
     1880#line 1880 "configure" 
     1881#include "confdefs.h" 
    25061882 
    25071883int 
     
    25171893_ACEOF 
    25181894rm -f conftest.$ac_objext 
    2519 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2520   (eval $ac_compile) 2>conftest.er1 
    2521   ac_status=$? 
    2522   grep -v '^ *+' conftest.er1 >conftest.err 
    2523   rm -f conftest.er1 
    2524   cat conftest.err >&5 
    2525   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1895if { (eval echo "$as_me:1895: \"$ac_compile\"") >&5 
     1896  (eval $ac_compile) 2>&5 
     1897  ac_status=$? 
     1898  echo "$as_me:1898: \$? = $ac_status" >&5 
    25261899  (exit $ac_status); } && 
    2527          { ac_try='test -z "$ac_cxx_werror_flag" 
    2528                          || test ! -s conftest.err' 
    2529   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1900         { ac_try='test -s conftest.$ac_objext' 
     1901  { (eval echo "$as_me:1901: \"$ac_try\"") >&5 
    25301902  (eval $ac_try) 2>&5 
    25311903  ac_status=$? 
    2532   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2533   (exit $ac_status); }; } && 
    2534          { ac_try='test -s conftest.$ac_objext' 
    2535   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2536   (eval $ac_try) 2>&5 
    2537   ac_status=$? 
    2538   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1904  echo "$as_me:1904: \$? = $ac_status" >&5 
    25391905  (exit $ac_status); }; }; then 
    25401906  ac_compiler_gnu=yes 
    25411907else 
    25421908  echo "$as_me: failed program was:" >&5 
    2543 sed 's/^/| /' conftest.$ac_ext >&5 
    2544  
     1909cat conftest.$ac_ext >&5 
    25451910ac_compiler_gnu=no 
    25461911fi 
    2547 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     1912rm -f conftest.$ac_objext conftest.$ac_ext 
    25481913ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 
    25491914 
    25501915fi 
    2551 echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 
     1916echo "$as_me:1916: result: $ac_cv_cxx_compiler_gnu" >&5 
    25521917echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 
    25531918GXX=`test $ac_compiler_gnu = yes && echo yes` 
     
    25551920ac_save_CXXFLAGS=$CXXFLAGS 
    25561921CXXFLAGS="-g" 
    2557 echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 
     1922echo "$as_me:1922: checking whether $CXX accepts -g" >&5 
    25581923echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 
    25591924if test "${ac_cv_prog_cxx_g+set}" = set; then 
     
    25611926else 
    25621927  cat >conftest.$ac_ext <<_ACEOF 
    2563 /* confdefs.h.  */ 
    2564 _ACEOF 
    2565 cat confdefs.h >>conftest.$ac_ext 
    2566 cat >>conftest.$ac_ext <<_ACEOF 
    2567 /* end confdefs.h.  */ 
     1928#line 1928 "configure" 
     1929#include "confdefs.h" 
    25681930 
    25691931int 
     
    25761938_ACEOF 
    25771939rm -f conftest.$ac_objext 
    2578 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2579   (eval $ac_compile) 2>conftest.er1 
    2580   ac_status=$? 
    2581   grep -v '^ *+' conftest.er1 >conftest.err 
    2582   rm -f conftest.er1 
    2583   cat conftest.err >&5 
    2584   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1940if { (eval echo "$as_me:1940: \"$ac_compile\"") >&5 
     1941  (eval $ac_compile) 2>&5 
     1942  ac_status=$? 
     1943  echo "$as_me:1943: \$? = $ac_status" >&5 
    25851944  (exit $ac_status); } && 
    2586          { ac_try='test -z "$ac_cxx_werror_flag" 
    2587                          || test ! -s conftest.err' 
    2588   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     1945         { ac_try='test -s conftest.$ac_objext' 
     1946  { (eval echo "$as_me:1946: \"$ac_try\"") >&5 
    25891947  (eval $ac_try) 2>&5 
    25901948  ac_status=$? 
    2591   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2592   (exit $ac_status); }; } && 
    2593          { ac_try='test -s conftest.$ac_objext' 
    2594   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2595   (eval $ac_try) 2>&5 
    2596   ac_status=$? 
    2597   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1949  echo "$as_me:1949: \$? = $ac_status" >&5 
    25981950  (exit $ac_status); }; }; then 
    25991951  ac_cv_prog_cxx_g=yes 
    26001952else 
    26011953  echo "$as_me: failed program was:" >&5 
    2602 sed 's/^/| /' conftest.$ac_ext >&5 
    2603  
     1954cat conftest.$ac_ext >&5 
    26041955ac_cv_prog_cxx_g=no 
    26051956fi 
    2606 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    2607 fi 
    2608 echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 
     1957rm -f conftest.$ac_objext conftest.$ac_ext 
     1958fi 
     1959echo "$as_me:1959: result: $ac_cv_prog_cxx_g" >&5 
    26091960echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 
    26101961if test "$ac_test_CXXFLAGS" = set; then 
     
    26241975fi 
    26251976for ac_declaration in \ 
    2626    '' \ 
     1977   ''\ 
     1978   '#include <stdlib.h>' \ 
    26271979   'extern "C" void std::exit (int) throw (); using std::exit;' \ 
    26281980   'extern "C" void std::exit (int); using std::exit;' \ 
     
    26321984do 
    26331985  cat >conftest.$ac_ext <<_ACEOF 
    2634 /* confdefs.h.  */ 
    2635 _ACEOF 
    2636 cat confdefs.h >>conftest.$ac_ext 
    2637 cat >>conftest.$ac_ext <<_ACEOF 
    2638 /* end confdefs.h.  */ 
    2639 $ac_declaration 
     1986#line 1986 "configure" 
     1987#include "confdefs.h" 
    26401988#include <stdlib.h> 
    2641 int 
    2642 main () 
    2643 { 
    2644 exit (42); 
    2645   ; 
    2646   return 0; 
    2647 } 
    2648 _ACEOF 
    2649 rm -f conftest.$ac_objext 
    2650 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2651   (eval $ac_compile) 2>conftest.er1 
    2652   ac_status=$? 
    2653   grep -v '^ *+' conftest.er1 >conftest.err 
    2654   rm -f conftest.er1 
    2655   cat conftest.err >&5 
    2656   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2657   (exit $ac_status); } && 
    2658          { ac_try='test -z "$ac_cxx_werror_flag" 
    2659                          || test ! -s conftest.err' 
    2660   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2661   (eval $ac_try) 2>&5 
    2662   ac_status=$? 
    2663   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2664   (exit $ac_status); }; } && 
    2665          { ac_try='test -s conftest.$ac_objext' 
    2666   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2667   (eval $ac_try) 2>&5 
    2668   ac_status=$? 
    2669   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2670   (exit $ac_status); }; }; then 
    2671   : 
    2672 else 
    2673   echo "$as_me: failed program was:" >&5 
    2674 sed 's/^/| /' conftest.$ac_ext >&5 
    2675  
    2676 continue 
    2677 fi 
    2678 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    2679   cat >conftest.$ac_ext <<_ACEOF 
    2680 /* confdefs.h.  */ 
    2681 _ACEOF 
    2682 cat confdefs.h >>conftest.$ac_ext 
    2683 cat >>conftest.$ac_ext <<_ACEOF 
    2684 /* end confdefs.h.  */ 
    26851989$ac_declaration 
    26861990int 
     
    26931997_ACEOF 
    26941998rm -f conftest.$ac_objext 
    2695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    2696   (eval $ac_compile) 2>conftest.er1 
    2697   ac_status=$? 
    2698   grep -v '^ *+' conftest.er1 >conftest.err 
    2699   rm -f conftest.er1 
    2700   cat conftest.err >&5 
    2701   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     1999if { (eval echo "$as_me:1999: \"$ac_compile\"") >&5 
     2000  (eval $ac_compile) 2>&5 
     2001  ac_status=$? 
     2002  echo "$as_me:2002: \$? = $ac_status" >&5 
    27022003  (exit $ac_status); } && 
    2703          { ac_try='test -z "$ac_cxx_werror_flag" 
    2704                          || test ! -s conftest.err' 
    2705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2004         { ac_try='test -s conftest.$ac_objext' 
     2005  { (eval echo "$as_me:2005: \"$ac_try\"") >&5 
    27062006  (eval $ac_try) 2>&5 
    27072007  ac_status=$? 
    2708   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2709   (exit $ac_status); }; } && 
    2710          { ac_try='test -s conftest.$ac_objext' 
    2711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2008  echo "$as_me:2008: \$? = $ac_status" >&5 
     2009  (exit $ac_status); }; }; then 
     2010  : 
     2011else 
     2012  echo "$as_me: failed program was:" >&5 
     2013cat conftest.$ac_ext >&5 
     2014continue 
     2015fi 
     2016rm -f conftest.$ac_objext conftest.$ac_ext 
     2017  cat >conftest.$ac_ext <<_ACEOF 
     2018#line 2018 "configure" 
     2019#include "confdefs.h" 
     2020$ac_declaration 
     2021int 
     2022main () 
     2023{ 
     2024exit (42); 
     2025  ; 
     2026  return 0; 
     2027} 
     2028_ACEOF 
     2029rm -f conftest.$ac_objext 
     2030if { (eval echo "$as_me:2030: \"$ac_compile\"") >&5 
     2031  (eval $ac_compile) 2>&5 
     2032  ac_status=$? 
     2033  echo "$as_me:2033: \$? = $ac_status" >&5 
     2034  (exit $ac_status); } && 
     2035         { ac_try='test -s conftest.$ac_objext' 
     2036  { (eval echo "$as_me:2036: \"$ac_try\"") >&5 
    27122037  (eval $ac_try) 2>&5 
    27132038  ac_status=$? 
    2714   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2039  echo "$as_me:2039: \$? = $ac_status" >&5 
    27152040  (exit $ac_status); }; }; then 
    27162041  break 
    27172042else 
    27182043  echo "$as_me: failed program was:" >&5 
    2719 sed 's/^/| /' conftest.$ac_ext >&5 
    2720  
    2721 fi 
    2722 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     2044cat conftest.$ac_ext >&5 
     2045fi 
     2046rm -f conftest.$ac_objext conftest.$ac_ext 
    27232047done 
    27242048rm -f conftest* 
     
    27412065ac_compiler_gnu=$ac_cv_c_compiler_gnu 
    27422066 
    2743  
    2744  
    2745  
    2746 echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5 
     2067echo "$as_me:2067: checking for pthread_create in -lpthread" >&5 
    27472068echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6 
    27482069if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then 
     
    27522073LIBS="-lpthread  $LIBS" 
    27532074cat >conftest.$ac_ext <<_ACEOF 
    2754 /* confdefs.h.  */ 
    2755 _ACEOF 
    2756 cat confdefs.h >>conftest.$ac_ext 
    2757 cat >>conftest.$ac_ext <<_ACEOF 
    2758 /* end confdefs.h.  */ 
     2075#line 2075 "configure" 
     2076#include "confdefs.h" 
    27592077 
    27602078/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    27742092_ACEOF 
    27752093rm -f conftest.$ac_objext conftest$ac_exeext 
    2776 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    2777   (eval $ac_link) 2>conftest.er1 
    2778   ac_status=$? 
    2779   grep -v '^ *+' conftest.er1 >conftest.err 
    2780   rm -f conftest.er1 
    2781   cat conftest.err >&5 
    2782   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2094if { (eval echo "$as_me:2094: \"$ac_link\"") >&5 
     2095  (eval $ac_link) 2>&5 
     2096  ac_status=$? 
     2097  echo "$as_me:2097: \$? = $ac_status" >&5 
    27832098  (exit $ac_status); } && 
    2784          { ac_try='test -z "$ac_c_werror_flag" 
    2785                          || test ! -s conftest.err' 
    2786   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2099         { ac_try='test -s conftest$ac_exeext' 
     2100  { (eval echo "$as_me:2100: \"$ac_try\"") >&5 
    27872101  (eval $ac_try) 2>&5 
    27882102  ac_status=$? 
    2789   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2790   (exit $ac_status); }; } && 
    2791          { ac_try='test -s conftest$ac_exeext' 
    2792   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2793   (eval $ac_try) 2>&5 
    2794   ac_status=$? 
    2795   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2103  echo "$as_me:2103: \$? = $ac_status" >&5 
    27962104  (exit $ac_status); }; }; then 
    27972105  ac_cv_lib_pthread_pthread_create=yes 
    27982106else 
    27992107  echo "$as_me: failed program was:" >&5 
    2800 sed 's/^/| /' conftest.$ac_ext >&5 
    2801  
     2108cat conftest.$ac_ext >&5 
    28022109ac_cv_lib_pthread_pthread_create=no 
    28032110fi 
    2804 rm -f conftest.err conftest.$ac_objext \ 
    2805       conftest$ac_exeext conftest.$ac_ext 
     2111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    28062112LIBS=$ac_check_lib_save_LIBS 
    28072113fi 
    2808 echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5 
     2114echo "$as_me:2114: result: $ac_cv_lib_pthread_pthread_create" >&5 
    28092115echo "${ECHO_T}$ac_cv_lib_pthread_pthread_create" >&6 
    28102116if test $ac_cv_lib_pthread_pthread_create = yes; then 
    2811   cat >>confdefs.h <<_ACEOF 
     2117  cat >>confdefs.h <<EOF 
    28122118#define HAVE_LIBPTHREAD 1 
    2813 _ACEOF 
     2119EOF 
    28142120 
    28152121  LIBS="-lpthread $LIBS" 
     
    28172123fi 
    28182124 
    2819  
    2820 echo "$as_me:$LINENO: checking for puts in -lwsock32" >&5 
     2125echo "$as_me:2125: checking for puts in -lwsock32" >&5 
    28212126echo $ECHO_N "checking for puts in -lwsock32... $ECHO_C" >&6 
    28222127if test "${ac_cv_lib_wsock32_puts+set}" = set; then 
     
    28262131LIBS="-lwsock32  $LIBS" 
    28272132cat >conftest.$ac_ext <<_ACEOF 
    2828 /* confdefs.h.  */ 
    2829 _ACEOF 
    2830 cat confdefs.h >>conftest.$ac_ext 
    2831 cat >>conftest.$ac_ext <<_ACEOF 
    2832 /* end confdefs.h.  */ 
     2133#line 2133 "configure" 
     2134#include "confdefs.h" 
    28332135 
    28342136/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    28482150_ACEOF 
    28492151rm -f conftest.$ac_objext conftest$ac_exeext 
    2850 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    2851   (eval $ac_link) 2>conftest.er1 
    2852   ac_status=$? 
    2853   grep -v '^ *+' conftest.er1 >conftest.err 
    2854   rm -f conftest.er1 
    2855   cat conftest.err >&5 
    2856   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2152if { (eval echo "$as_me:2152: \"$ac_link\"") >&5 
     2153  (eval $ac_link) 2>&5 
     2154  ac_status=$? 
     2155  echo "$as_me:2155: \$? = $ac_status" >&5 
    28572156  (exit $ac_status); } && 
    2858          { ac_try='test -z "$ac_c_werror_flag" 
    2859                          || test ! -s conftest.err' 
    2860   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2157         { ac_try='test -s conftest$ac_exeext' 
     2158  { (eval echo "$as_me:2158: \"$ac_try\"") >&5 
    28612159  (eval $ac_try) 2>&5 
    28622160  ac_status=$? 
    2863   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2864   (exit $ac_status); }; } && 
    2865          { ac_try='test -s conftest$ac_exeext' 
    2866   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2867   (eval $ac_try) 2>&5 
    2868   ac_status=$? 
    2869   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2161  echo "$as_me:2161: \$? = $ac_status" >&5 
    28702162  (exit $ac_status); }; }; then 
    28712163  ac_cv_lib_wsock32_puts=yes 
    28722164else 
    28732165  echo "$as_me: failed program was:" >&5 
    2874 sed 's/^/| /' conftest.$ac_ext >&5 
    2875  
     2166cat conftest.$ac_ext >&5 
    28762167ac_cv_lib_wsock32_puts=no 
    28772168fi 
    2878 rm -f conftest.err conftest.$ac_objext \ 
    2879       conftest$ac_exeext conftest.$ac_ext 
     2169rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    28802170LIBS=$ac_check_lib_save_LIBS 
    28812171fi 
    2882 echo "$as_me:$LINENO: result: $ac_cv_lib_wsock32_puts" >&5 
     2172echo "$as_me:2172: result: $ac_cv_lib_wsock32_puts" >&5 
    28832173echo "${ECHO_T}$ac_cv_lib_wsock32_puts" >&6 
    28842174if test $ac_cv_lib_wsock32_puts = yes; then 
    2885   cat >>confdefs.h <<_ACEOF 
     2175  cat >>confdefs.h <<EOF 
    28862176#define HAVE_LIBWSOCK32 1 
    2887 _ACEOF 
     2177EOF 
    28882178 
    28892179  LIBS="-lwsock32 $LIBS" 
     
    28912181fi 
    28922182 
    2893  
    2894 echo "$as_me:$LINENO: checking for puts in -lws2_32" >&5 
     2183echo "$as_me:2183: checking for puts in -lws2_32" >&5 
    28952184echo $ECHO_N "checking for puts in -lws2_32... $ECHO_C" >&6 
    28962185if test "${ac_cv_lib_ws2_32_puts+set}" = set; then 
     
    29002189LIBS="-lws2_32  $LIBS" 
    29012190cat >conftest.$ac_ext <<_ACEOF 
    2902 /* confdefs.h.  */ 
    2903 _ACEOF 
    2904 cat confdefs.h >>conftest.$ac_ext 
    2905 cat >>conftest.$ac_ext <<_ACEOF 
    2906 /* end confdefs.h.  */ 
     2191#line 2191 "configure" 
     2192#include "confdefs.h" 
    29072193 
    29082194/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    29222208_ACEOF 
    29232209rm -f conftest.$ac_objext conftest$ac_exeext 
    2924 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    2925   (eval $ac_link) 2>conftest.er1 
    2926   ac_status=$? 
    2927   grep -v '^ *+' conftest.er1 >conftest.err 
    2928   rm -f conftest.er1 
    2929   cat conftest.err >&5 
    2930   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2210if { (eval echo "$as_me:2210: \"$ac_link\"") >&5 
     2211  (eval $ac_link) 2>&5 
     2212  ac_status=$? 
     2213  echo "$as_me:2213: \$? = $ac_status" >&5 
    29312214  (exit $ac_status); } && 
    2932          { ac_try='test -z "$ac_c_werror_flag" 
    2933                          || test ! -s conftest.err' 
    2934   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2215         { ac_try='test -s conftest$ac_exeext' 
     2216  { (eval echo "$as_me:2216: \"$ac_try\"") >&5 
    29352217  (eval $ac_try) 2>&5 
    29362218  ac_status=$? 
    2937   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    2938   (exit $ac_status); }; } && 
    2939          { ac_try='test -s conftest$ac_exeext' 
    2940   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    2941   (eval $ac_try) 2>&5 
    2942   ac_status=$? 
    2943   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2219  echo "$as_me:2219: \$? = $ac_status" >&5 
    29442220  (exit $ac_status); }; }; then 
    29452221  ac_cv_lib_ws2_32_puts=yes 
    29462222else 
    29472223  echo "$as_me: failed program was:" >&5 
    2948 sed 's/^/| /' conftest.$ac_ext >&5 
    2949  
     2224cat conftest.$ac_ext >&5 
    29502225ac_cv_lib_ws2_32_puts=no 
    29512226fi 
    2952 rm -f conftest.err conftest.$ac_objext \ 
    2953       conftest$ac_exeext conftest.$ac_ext 
     2227rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    29542228LIBS=$ac_check_lib_save_LIBS 
    29552229fi 
    2956 echo "$as_me:$LINENO: result: $ac_cv_lib_ws2_32_puts" >&5 
     2230echo "$as_me:2230: result: $ac_cv_lib_ws2_32_puts" >&5 
    29572231echo "${ECHO_T}$ac_cv_lib_ws2_32_puts" >&6 
    29582232if test $ac_cv_lib_ws2_32_puts = yes; then 
    2959   cat >>confdefs.h <<_ACEOF 
     2233  cat >>confdefs.h <<EOF 
    29602234#define HAVE_LIBWS2_32 1 
    2961 _ACEOF 
     2235EOF 
    29622236 
    29632237  LIBS="-lws2_32 $LIBS" 
     
    29652239fi 
    29662240 
    2967  
    2968 echo "$as_me:$LINENO: checking for puts in -lole32" >&5 
     2241echo "$as_me:2241: checking for puts in -lole32" >&5 
    29692242echo $ECHO_N "checking for puts in -lole32... $ECHO_C" >&6 
    29702243if test "${ac_cv_lib_ole32_puts+set}" = set; then 
     
    29742247LIBS="-lole32  $LIBS" 
    29752248cat >conftest.$ac_ext <<_ACEOF 
    2976 /* confdefs.h.  */ 
    2977 _ACEOF 
    2978 cat confdefs.h >>conftest.$ac_ext 
    2979 cat >>conftest.$ac_ext <<_ACEOF 
    2980 /* end confdefs.h.  */ 
     2249#line 2249 "configure" 
     2250#include "confdefs.h" 
    29812251 
    29822252/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    29962266_ACEOF 
    29972267rm -f conftest.$ac_objext conftest$ac_exeext 
    2998 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    2999   (eval $ac_link) 2>conftest.er1 
    3000   ac_status=$? 
    3001   grep -v '^ *+' conftest.er1 >conftest.err 
    3002   rm -f conftest.er1 
    3003   cat conftest.err >&5 
    3004   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2268if { (eval echo "$as_me:2268: \"$ac_link\"") >&5 
     2269  (eval $ac_link) 2>&5 
     2270  ac_status=$? 
     2271  echo "$as_me:2271: \$? = $ac_status" >&5 
    30052272  (exit $ac_status); } && 
    3006          { ac_try='test -z "$ac_c_werror_flag" 
    3007                          || test ! -s conftest.err' 
    3008   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2273         { ac_try='test -s conftest$ac_exeext' 
     2274  { (eval echo "$as_me:2274: \"$ac_try\"") >&5 
    30092275  (eval $ac_try) 2>&5 
    30102276  ac_status=$? 
    3011   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3012   (exit $ac_status); }; } && 
    3013          { ac_try='test -s conftest$ac_exeext' 
    3014   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3015   (eval $ac_try) 2>&5 
    3016   ac_status=$? 
    3017   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2277  echo "$as_me:2277: \$? = $ac_status" >&5 
    30182278  (exit $ac_status); }; }; then 
    30192279  ac_cv_lib_ole32_puts=yes 
    30202280else 
    30212281  echo "$as_me: failed program was:" >&5 
    3022 sed 's/^/| /' conftest.$ac_ext >&5 
    3023  
     2282cat conftest.$ac_ext >&5 
    30242283ac_cv_lib_ole32_puts=no 
    30252284fi 
    3026 rm -f conftest.err conftest.$ac_objext \ 
    3027       conftest$ac_exeext conftest.$ac_ext 
     2285rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    30282286LIBS=$ac_check_lib_save_LIBS 
    30292287fi 
    3030 echo "$as_me:$LINENO: result: $ac_cv_lib_ole32_puts" >&5 
     2288echo "$as_me:2288: result: $ac_cv_lib_ole32_puts" >&5 
    30312289echo "${ECHO_T}$ac_cv_lib_ole32_puts" >&6 
    30322290if test $ac_cv_lib_ole32_puts = yes; then 
    3033   cat >>confdefs.h <<_ACEOF 
     2291  cat >>confdefs.h <<EOF 
    30342292#define HAVE_LIBOLE32 1 
    3035 _ACEOF 
     2293EOF 
    30362294 
    30372295  LIBS="-lole32 $LIBS" 
     
    30392297fi 
    30402298 
    3041  
    3042 echo "$as_me:$LINENO: checking for puts in -lwinmm" >&5 
     2299echo "$as_me:2299: checking for puts in -lwinmm" >&5 
    30432300echo $ECHO_N "checking for puts in -lwinmm... $ECHO_C" >&6 
    30442301if test "${ac_cv_lib_winmm_puts+set}" = set; then 
     
    30482305LIBS="-lwinmm  $LIBS" 
    30492306cat >conftest.$ac_ext <<_ACEOF 
    3050 /* confdefs.h.  */ 
    3051 _ACEOF 
    3052 cat confdefs.h >>conftest.$ac_ext 
    3053 cat >>conftest.$ac_ext <<_ACEOF 
    3054 /* end confdefs.h.  */ 
     2307#line 2307 "configure" 
     2308#include "confdefs.h" 
    30552309 
    30562310/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    30702324_ACEOF 
    30712325rm -f conftest.$ac_objext conftest$ac_exeext 
    3072 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    3073   (eval $ac_link) 2>conftest.er1 
    3074   ac_status=$? 
    3075   grep -v '^ *+' conftest.er1 >conftest.err 
    3076   rm -f conftest.er1 
    3077   cat conftest.err >&5 
    3078   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2326if { (eval echo "$as_me:2326: \"$ac_link\"") >&5 
     2327  (eval $ac_link) 2>&5 
     2328  ac_status=$? 
     2329  echo "$as_me:2329: \$? = $ac_status" >&5 
    30792330  (exit $ac_status); } && 
    3080          { ac_try='test -z "$ac_c_werror_flag" 
    3081                          || test ! -s conftest.err' 
    3082   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2331         { ac_try='test -s conftest$ac_exeext' 
     2332  { (eval echo "$as_me:2332: \"$ac_try\"") >&5 
    30832333  (eval $ac_try) 2>&5 
    30842334  ac_status=$? 
    3085   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3086   (exit $ac_status); }; } && 
    3087          { ac_try='test -s conftest$ac_exeext' 
    3088   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3089   (eval $ac_try) 2>&5 
    3090   ac_status=$? 
    3091   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2335  echo "$as_me:2335: \$? = $ac_status" >&5 
    30922336  (exit $ac_status); }; }; then 
    30932337  ac_cv_lib_winmm_puts=yes 
    30942338else 
    30952339  echo "$as_me: failed program was:" >&5 
    3096 sed 's/^/| /' conftest.$ac_ext >&5 
    3097  
     2340cat conftest.$ac_ext >&5 
    30982341ac_cv_lib_winmm_puts=no 
    30992342fi 
    3100 rm -f conftest.err conftest.$ac_objext \ 
    3101       conftest$ac_exeext conftest.$ac_ext 
     2343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    31022344LIBS=$ac_check_lib_save_LIBS 
    31032345fi 
    3104 echo "$as_me:$LINENO: result: $ac_cv_lib_winmm_puts" >&5 
     2346echo "$as_me:2346: result: $ac_cv_lib_winmm_puts" >&5 
    31052347echo "${ECHO_T}$ac_cv_lib_winmm_puts" >&6 
    31062348if test $ac_cv_lib_winmm_puts = yes; then 
    3107   cat >>confdefs.h <<_ACEOF 
     2349  cat >>confdefs.h <<EOF 
    31082350#define HAVE_LIBWINMM 1 
    3109 _ACEOF 
     2351EOF 
    31102352 
    31112353  LIBS="-lwinmm $LIBS" 
     
    31132355fi 
    31142356 
    3115  
    3116 echo "$as_me:$LINENO: checking for puts in -lsocket" >&5 
     2357echo "$as_me:2357: checking for puts in -lsocket" >&5 
    31172358echo $ECHO_N "checking for puts in -lsocket... $ECHO_C" >&6 
    31182359if test "${ac_cv_lib_socket_puts+set}" = set; then 
     
    31222363LIBS="-lsocket  $LIBS" 
    31232364cat >conftest.$ac_ext <<_ACEOF 
    3124 /* confdefs.h.  */ 
    3125 _ACEOF 
    3126 cat confdefs.h >>conftest.$ac_ext 
    3127 cat >>conftest.$ac_ext <<_ACEOF 
    3128 /* end confdefs.h.  */ 
     2365#line 2365 "configure" 
     2366#include "confdefs.h" 
    31292367 
    31302368/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    31442382_ACEOF 
    31452383rm -f conftest.$ac_objext conftest$ac_exeext 
    3146 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    3147   (eval $ac_link) 2>conftest.er1 
    3148   ac_status=$? 
    3149   grep -v '^ *+' conftest.er1 >conftest.err 
    3150   rm -f conftest.er1 
    3151   cat conftest.err >&5 
    3152   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2384if { (eval echo "$as_me:2384: \"$ac_link\"") >&5 
     2385  (eval $ac_link) 2>&5 
     2386  ac_status=$? 
     2387  echo "$as_me:2387: \$? = $ac_status" >&5 
    31532388  (exit $ac_status); } && 
    3154          { ac_try='test -z "$ac_c_werror_flag" 
    3155                          || test ! -s conftest.err' 
    3156   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2389         { ac_try='test -s conftest$ac_exeext' 
     2390  { (eval echo "$as_me:2390: \"$ac_try\"") >&5 
    31572391  (eval $ac_try) 2>&5 
    31582392  ac_status=$? 
    3159   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3160   (exit $ac_status); }; } && 
    3161          { ac_try='test -s conftest$ac_exeext' 
    3162   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3163   (eval $ac_try) 2>&5 
    3164   ac_status=$? 
    3165   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2393  echo "$as_me:2393: \$? = $ac_status" >&5 
    31662394  (exit $ac_status); }; }; then 
    31672395  ac_cv_lib_socket_puts=yes 
    31682396else 
    31692397  echo "$as_me: failed program was:" >&5 
    3170 sed 's/^/| /' conftest.$ac_ext >&5 
    3171  
     2398cat conftest.$ac_ext >&5 
    31722399ac_cv_lib_socket_puts=no 
    31732400fi 
    3174 rm -f conftest.err conftest.$ac_objext \ 
    3175       conftest$ac_exeext conftest.$ac_ext 
     2401rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    31762402LIBS=$ac_check_lib_save_LIBS 
    31772403fi 
    3178 echo "$as_me:$LINENO: result: $ac_cv_lib_socket_puts" >&5 
     2404echo "$as_me:2404: result: $ac_cv_lib_socket_puts" >&5 
    31792405echo "${ECHO_T}$ac_cv_lib_socket_puts" >&6 
    31802406if test $ac_cv_lib_socket_puts = yes; then 
    3181   cat >>confdefs.h <<_ACEOF 
     2407  cat >>confdefs.h <<EOF 
    31822408#define HAVE_LIBSOCKET 1 
    3183 _ACEOF 
     2409EOF 
    31842410 
    31852411  LIBS="-lsocket $LIBS" 
     
    31872413fi 
    31882414 
    3189  
    3190 echo "$as_me:$LINENO: checking for puts in -lrt" >&5 
     2415echo "$as_me:2415: checking for puts in -lrt" >&5 
    31912416echo $ECHO_N "checking for puts in -lrt... $ECHO_C" >&6 
    31922417if test "${ac_cv_lib_rt_puts+set}" = set; then 
     
    31962421LIBS="-lrt  $LIBS" 
    31972422cat >conftest.$ac_ext <<_ACEOF 
    3198 /* confdefs.h.  */ 
    3199 _ACEOF 
    3200 cat confdefs.h >>conftest.$ac_ext 
    3201 cat >>conftest.$ac_ext <<_ACEOF 
    3202 /* end confdefs.h.  */ 
     2423#line 2423 "configure" 
     2424#include "confdefs.h" 
    32032425 
    32042426/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    32182440_ACEOF 
    32192441rm -f conftest.$ac_objext conftest$ac_exeext 
    3220 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    3221   (eval $ac_link) 2>conftest.er1 
    3222   ac_status=$? 
    3223   grep -v '^ *+' conftest.er1 >conftest.err 
    3224   rm -f conftest.er1 
    3225   cat conftest.err >&5 
    3226   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2442if { (eval echo "$as_me:2442: \"$ac_link\"") >&5 
     2443  (eval $ac_link) 2>&5 
     2444  ac_status=$? 
     2445  echo "$as_me:2445: \$? = $ac_status" >&5 
    32272446  (exit $ac_status); } && 
    3228          { ac_try='test -z "$ac_c_werror_flag" 
    3229                          || test ! -s conftest.err' 
    3230   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2447         { ac_try='test -s conftest$ac_exeext' 
     2448  { (eval echo "$as_me:2448: \"$ac_try\"") >&5 
    32312449  (eval $ac_try) 2>&5 
    32322450  ac_status=$? 
    3233   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3234   (exit $ac_status); }; } && 
    3235          { ac_try='test -s conftest$ac_exeext' 
    3236   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3237   (eval $ac_try) 2>&5 
    3238   ac_status=$? 
    3239   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2451  echo "$as_me:2451: \$? = $ac_status" >&5 
    32402452  (exit $ac_status); }; }; then 
    32412453  ac_cv_lib_rt_puts=yes 
    32422454else 
    32432455  echo "$as_me: failed program was:" >&5 
    3244 sed 's/^/| /' conftest.$ac_ext >&5 
    3245  
     2456cat conftest.$ac_ext >&5 
    32462457ac_cv_lib_rt_puts=no 
    32472458fi 
    3248 rm -f conftest.err conftest.$ac_objext \ 
    3249       conftest$ac_exeext conftest.$ac_ext 
     2459rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    32502460LIBS=$ac_check_lib_save_LIBS 
    32512461fi 
    3252 echo "$as_me:$LINENO: result: $ac_cv_lib_rt_puts" >&5 
     2462echo "$as_me:2462: result: $ac_cv_lib_rt_puts" >&5 
    32532463echo "${ECHO_T}$ac_cv_lib_rt_puts" >&6 
    32542464if test $ac_cv_lib_rt_puts = yes; then 
    3255   cat >>confdefs.h <<_ACEOF 
     2465  cat >>confdefs.h <<EOF 
    32562466#define HAVE_LIBRT 1 
    3257 _ACEOF 
     2467EOF 
    32582468 
    32592469  LIBS="-lrt $LIBS" 
     
    32612471fi 
    32622472 
    3263  
    3264 echo "$as_me:$LINENO: checking for puts in -lnsl" >&5 
     2473echo "$as_me:2473: checking for puts in -lnsl" >&5 
    32652474echo $ECHO_N "checking for puts in -lnsl... $ECHO_C" >&6 
    32662475if test "${ac_cv_lib_nsl_puts+set}" = set; then 
     
    32702479LIBS="-lnsl  $LIBS" 
    32712480cat >conftest.$ac_ext <<_ACEOF 
    3272 /* confdefs.h.  */ 
    3273 _ACEOF 
    3274 cat confdefs.h >>conftest.$ac_ext 
    3275 cat >>conftest.$ac_ext <<_ACEOF 
    3276 /* end confdefs.h.  */ 
     2481#line 2481 "configure" 
     2482#include "confdefs.h" 
    32772483 
    32782484/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    32922498_ACEOF 
    32932499rm -f conftest.$ac_objext conftest$ac_exeext 
    3294 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    3295   (eval $ac_link) 2>conftest.er1 
    3296   ac_status=$? 
    3297   grep -v '^ *+' conftest.er1 >conftest.err 
    3298   rm -f conftest.er1 
    3299   cat conftest.err >&5 
    3300   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2500if { (eval echo "$as_me:2500: \"$ac_link\"") >&5 
     2501  (eval $ac_link) 2>&5 
     2502  ac_status=$? 
     2503  echo "$as_me:2503: \$? = $ac_status" >&5 
    33012504  (exit $ac_status); } && 
    3302          { ac_try='test -z "$ac_c_werror_flag" 
    3303                          || test ! -s conftest.err' 
    3304   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2505         { ac_try='test -s conftest$ac_exeext' 
     2506  { (eval echo "$as_me:2506: \"$ac_try\"") >&5 
    33052507  (eval $ac_try) 2>&5 
    33062508  ac_status=$? 
    3307   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3308   (exit $ac_status); }; } && 
    3309          { ac_try='test -s conftest$ac_exeext' 
    3310   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3311   (eval $ac_try) 2>&5 
    3312   ac_status=$? 
    3313   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2509  echo "$as_me:2509: \$? = $ac_status" >&5 
    33142510  (exit $ac_status); }; }; then 
    33152511  ac_cv_lib_nsl_puts=yes 
    33162512else 
    33172513  echo "$as_me: failed program was:" >&5 
    3318 sed 's/^/| /' conftest.$ac_ext >&5 
    3319  
     2514cat conftest.$ac_ext >&5 
    33202515ac_cv_lib_nsl_puts=no 
    33212516fi 
    3322 rm -f conftest.err conftest.$ac_objext \ 
    3323       conftest$ac_exeext conftest.$ac_ext 
     2517rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    33242518LIBS=$ac_check_lib_save_LIBS 
    33252519fi 
    3326 echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_puts" >&5 
     2520echo "$as_me:2520: result: $ac_cv_lib_nsl_puts" >&5 
    33272521echo "${ECHO_T}$ac_cv_lib_nsl_puts" >&6 
    33282522if test $ac_cv_lib_nsl_puts = yes; then 
    3329   cat >>confdefs.h <<_ACEOF 
     2523  cat >>confdefs.h <<EOF 
    33302524#define HAVE_LIBNSL 1 
    3331 _ACEOF 
     2525EOF 
    33322526 
    33332527  LIBS="-lnsl $LIBS" 
     
    33352529fi 
    33362530 
    3337  
    3338 echo "$as_me:$LINENO: result: Setting PJ_M_NAME to $target_cpu" >&5 
     2531echo "$as_me:2531: result: Setting PJ_M_NAME to $target_cpu" >&5 
    33392532echo "${ECHO_T}Setting PJ_M_NAME to $target_cpu" >&6 
    3340 cat >>confdefs.h <<_ACEOF 
     2533cat >>confdefs.h <<EOF 
    33412534#define PJ_M_NAME "$target_cpu" 
    3342 _ACEOF 
    3343  
    3344  
    3345 echo "$as_me:$LINENO: checking memory alignment" >&5 
     2535EOF 
     2536 
     2537echo "$as_me:2537: checking memory alignment" >&5 
    33462538echo $ECHO_N "checking memory alignment... $ECHO_C" >&6 
    33472539case $target in 
    33482540    ia64-* | x86_64-* ) 
    3349         cat >>confdefs.h <<\_ACEOF 
     2541        cat >>confdefs.h <<\EOF 
    33502542#define PJ_POOL_ALIGNMENT 8 
    3351 _ACEOF 
    3352  
    3353         echo "$as_me:$LINENO: result: 8 bytes" >&5 
     2543EOF 
     2544 
     2545        echo "$as_me:2545: result: 8 bytes" >&5 
    33542546echo "${ECHO_T}8 bytes" >&6 
    33552547        ;; 
    33562548    * ) 
    3357         cat >>confdefs.h <<\_ACEOF 
     2549        cat >>confdefs.h <<\EOF 
    33582550#define PJ_POOL_ALIGNMENT 4 
    3359 _ACEOF 
    3360  
    3361         echo "$as_me:$LINENO: result: 4 bytes (default)" >&5 
     2551EOF 
     2552 
     2553        echo "$as_me:2553: result: 4 bytes (default)" >&5 
    33622554echo "${ECHO_T}4 bytes (default)" >&6 
    33632555        ;; 
    33642556esac 
    33652557 
    3366  
    3367 echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 
     2558echo "$as_me:2558: checking whether byte ordering is bigendian" >&5 
    33682559echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 
    33692560if test "${ac_cv_c_bigendian+set}" = set; then 
    33702561  echo $ECHO_N "(cached) $ECHO_C" >&6 
    33712562else 
    3372   # See if sys/param.h defines the BYTE_ORDER macro. 
     2563  ac_cv_c_bigendian=unknown 
     2564# See if sys/param.h defines the BYTE_ORDER macro. 
    33732565cat >conftest.$ac_ext <<_ACEOF 
    3374 /* confdefs.h.  */ 
    3375 _ACEOF 
    3376 cat confdefs.h >>conftest.$ac_ext 
    3377 cat >>conftest.$ac_ext <<_ACEOF 
    3378 /* end confdefs.h.  */ 
     2566#line 2566 "configure" 
     2567#include "confdefs.h" 
    33792568#include <sys/types.h> 
    33802569#include <sys/param.h> 
     
    33922581_ACEOF 
    33932582rm -f conftest.$ac_objext 
    3394 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    3395   (eval $ac_compile) 2>conftest.er1 
    3396   ac_status=$? 
    3397   grep -v '^ *+' conftest.er1 >conftest.err 
    3398   rm -f conftest.er1 
    3399   cat conftest.err >&5 
    3400   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2583if { (eval echo "$as_me:2583: \"$ac_compile\"") >&5 
     2584  (eval $ac_compile) 2>&5 
     2585  ac_status=$? 
     2586  echo "$as_me:2586: \$? = $ac_status" >&5 
    34012587  (exit $ac_status); } && 
    3402          { ac_try='test -z "$ac_c_werror_flag" 
    3403                          || test ! -s conftest.err' 
    3404   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2588         { ac_try='test -s conftest.$ac_objext' 
     2589  { (eval echo "$as_me:2589: \"$ac_try\"") >&5 
    34052590  (eval $ac_try) 2>&5 
    34062591  ac_status=$? 
    3407   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3408   (exit $ac_status); }; } && 
    3409          { ac_try='test -s conftest.$ac_objext' 
    3410   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3411   (eval $ac_try) 2>&5 
    3412   ac_status=$? 
    3413   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2592  echo "$as_me:2592: \$? = $ac_status" >&5 
    34142593  (exit $ac_status); }; }; then 
    34152594  # It does; now see whether it defined to BIG_ENDIAN or not. 
    34162595cat >conftest.$ac_ext <<_ACEOF 
    3417 /* confdefs.h.  */ 
    3418 _ACEOF 
    3419 cat confdefs.h >>conftest.$ac_ext 
    3420 cat >>conftest.$ac_ext <<_ACEOF 
    3421 /* end confdefs.h.  */ 
     2596#line 2596 "configure" 
     2597#include "confdefs.h" 
    34222598#include <sys/types.h> 
    34232599#include <sys/param.h> 
     
    34352611_ACEOF 
    34362612rm -f conftest.$ac_objext 
    3437 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    3438   (eval $ac_compile) 2>conftest.er1 
    3439   ac_status=$? 
    3440   grep -v '^ *+' conftest.er1 >conftest.err 
    3441   rm -f conftest.er1 
    3442   cat conftest.err >&5 
    3443   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2613if { (eval echo "$as_me:2613: \"$ac_compile\"") >&5 
     2614  (eval $ac_compile) 2>&5 
     2615  ac_status=$? 
     2616  echo "$as_me:2616: \$? = $ac_status" >&5 
    34442617  (exit $ac_status); } && 
    3445          { ac_try='test -z "$ac_c_werror_flag" 
    3446                          || test ! -s conftest.err' 
    3447   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2618         { ac_try='test -s conftest.$ac_objext' 
     2619  { (eval echo "$as_me:2619: \"$ac_try\"") >&5 
    34482620  (eval $ac_try) 2>&5 
    34492621  ac_status=$? 
    3450   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3451   (exit $ac_status); }; } && 
    3452          { ac_try='test -s conftest.$ac_objext' 
    3453   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3454   (eval $ac_try) 2>&5 
    3455   ac_status=$? 
    3456   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2622  echo "$as_me:2622: \$? = $ac_status" >&5 
    34572623  (exit $ac_status); }; }; then 
    34582624  ac_cv_c_bigendian=yes 
    34592625else 
    34602626  echo "$as_me: failed program was:" >&5 
    3461 sed 's/^/| /' conftest.$ac_ext >&5 
    3462  
     2627cat conftest.$ac_ext >&5 
    34632628ac_cv_c_bigendian=no 
    34642629fi 
    3465 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    3466 else 
    3467   echo "$as_me: failed program was:" >&5 
    3468 sed 's/^/| /' conftest.$ac_ext >&5 
    3469  
    3470 # It does not; compile a test program. 
     2630rm -f conftest.$ac_objext conftest.$ac_ext 
     2631else 
     2632  echo "$as_me: failed program was:" >&5 
     2633cat conftest.$ac_ext >&5 
     2634fi 
     2635rm -f conftest.$ac_objext conftest.$ac_ext 
     2636if test $ac_cv_c_bigendian = unknown; then 
    34712637if test "$cross_compiling" = yes; then 
    3472   # try to guess the endianness by grepping values into an object file 
    3473   ac_cv_c_bigendian=unknown 
     2638  { { echo "$as_me:2638: error: cannot run test program while cross compiling" >&5 
     2639echo "$as_me: error: cannot run test program while cross compiling" >&2;} 
     2640   { (exit 1); exit 1; }; } 
     2641else 
    34742642  cat >conftest.$ac_ext <<_ACEOF 
    3475 /* confdefs.h.  */ 
    3476 _ACEOF 
    3477 cat confdefs.h >>conftest.$ac_ext 
    3478 cat >>conftest.$ac_ext <<_ACEOF 
    3479 /* end confdefs.h.  */ 
    3480 short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 
    3481 short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 
    3482 void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } 
    3483 short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 
    3484 short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 
    3485 void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } 
    3486 int 
    3487 main () 
    3488 { 
    3489  _ascii (); _ebcdic (); 
    3490   ; 
    3491   return 0; 
    3492 } 
    3493 _ACEOF 
    3494 rm -f conftest.$ac_objext 
    3495 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    3496   (eval $ac_compile) 2>conftest.er1 
    3497   ac_status=$? 
    3498   grep -v '^ *+' conftest.er1 >conftest.err 
    3499   rm -f conftest.er1 
    3500   cat conftest.err >&5 
    3501   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3502   (exit $ac_status); } && 
    3503          { ac_try='test -z "$ac_c_werror_flag" 
    3504                          || test ! -s conftest.err' 
    3505   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3506   (eval $ac_try) 2>&5 
    3507   ac_status=$? 
    3508   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3509   (exit $ac_status); }; } && 
    3510          { ac_try='test -s conftest.$ac_objext' 
    3511   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3512   (eval $ac_try) 2>&5 
    3513   ac_status=$? 
    3514   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3515   (exit $ac_status); }; }; then 
    3516   if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then 
    3517   ac_cv_c_bigendian=yes 
    3518 fi 
    3519 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 
    3520   if test "$ac_cv_c_bigendian" = unknown; then 
    3521     ac_cv_c_bigendian=no 
    3522   else 
    3523     # finding both strings is unlikely to happen, but who knows? 
    3524     ac_cv_c_bigendian=unknown 
    3525   fi 
    3526 fi 
    3527 else 
    3528   echo "$as_me: failed program was:" >&5 
    3529 sed 's/^/| /' conftest.$ac_ext >&5 
    3530  
    3531 fi 
    3532 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    3533 else 
    3534   cat >conftest.$ac_ext <<_ACEOF 
    3535 /* confdefs.h.  */ 
    3536 _ACEOF 
    3537 cat confdefs.h >>conftest.$ac_ext 
    3538 cat >>conftest.$ac_ext <<_ACEOF 
    3539 /* end confdefs.h.  */ 
     2643#line 2643 "configure" 
     2644#include "confdefs.h" 
    35402645int 
    35412646main () 
     
    35522657_ACEOF 
    35532658rm -f conftest$ac_exeext 
    3554 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
     2659if { (eval echo "$as_me:2659: \"$ac_link\"") >&5 
    35552660  (eval $ac_link) 2>&5 
    35562661  ac_status=$? 
    3557   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2662  echo "$as_me:2662: \$? = $ac_status" >&5 
    35582663  (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 
    3559   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2664  { (eval echo "$as_me:2664: \"$ac_try\"") >&5 
    35602665  (eval $ac_try) 2>&5 
    35612666  ac_status=$? 
    3562   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2667  echo "$as_me:2667: \$? = $ac_status" >&5 
    35632668  (exit $ac_status); }; }; then 
    35642669  ac_cv_c_bigendian=no 
     
    35662671  echo "$as_me: program exited with status $ac_status" >&5 
    35672672echo "$as_me: failed program was:" >&5 
    3568 sed 's/^/| /' conftest.$ac_ext >&5 
    3569  
    3570 ( exit $ac_status ) 
     2673cat conftest.$ac_ext >&5 
    35712674ac_cv_c_bigendian=yes 
    35722675fi 
    3573 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 
    3574 fi 
    3575 fi 
    3576 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    3577 fi 
    3578 echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 
     2676rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 
     2677fi 
     2678fi 
     2679fi 
     2680echo "$as_me:2680: result: $ac_cv_c_bigendian" >&5 
    35792681echo "${ECHO_T}$ac_cv_c_bigendian" >&6 
    3580 case $ac_cv_c_bigendian in 
    3581   yes) 
    3582  
    3583 cat >>confdefs.h <<\_ACEOF 
     2682if test $ac_cv_c_bigendian = yes; then 
     2683 
     2684cat >>confdefs.h <<\EOF 
    35842685#define WORDS_BIGENDIAN 1 
    3585 _ACEOF 
    3586  ;; 
    3587   no) 
    3588      ;; 
    3589   *) 
    3590     { { echo "$as_me:$LINENO: error: unknown endianness 
    3591 presetting ac_cv_c_bigendian=no (or yes) will help" >&5 
    3592 echo "$as_me: error: unknown endianness 
    3593 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} 
    3594    { (exit 1); exit 1; }; } ;; 
    3595 esac 
    3596  
     2686EOF 
     2687 
     2688fi 
    35972689 
    35982690case $target in 
    35992691    *mingw* | *cygw* | *win32* | *w32* ) 
    3600         cat >>confdefs.h <<\_ACEOF 
     2692        cat >>confdefs.h <<\EOF 
    36012693#define PJ_WIN32 1 
    3602 _ACEOF 
    3603  
    3604         cat >>confdefs.h <<\_ACEOF 
     2694EOF 
     2695 
     2696        cat >>confdefs.h <<\EOF 
    36052697#define PJ_WIN32_WINNT 0x0400 
    3606 _ACEOF 
    3607  
    3608         cat >>confdefs.h <<\_ACEOF 
     2698EOF 
     2699 
     2700        cat >>confdefs.h <<\EOF 
    36092701#define WIN32_LEAN_AND_MEAN 1 
    3610 _ACEOF 
     2702EOF 
    36112703 
    36122704        ;; 
    36132705    *darwin*) 
    3614         cat >>confdefs.h <<\_ACEOF 
     2706        cat >>confdefs.h <<\EOF 
    36152707#define PJ_DARWINOS 1 
    3616 _ACEOF 
     2708EOF 
    36172709 
    36182710        ;; 
    36192711    *linux*) 
    3620         cat >>confdefs.h <<\_ACEOF 
     2712        cat >>confdefs.h <<\EOF 
    36212713#define PJ_LINUX 1 
    3622 _ACEOF 
     2714EOF 
    36232715 
    36242716        ;; 
    36252717    *rtems*) 
    3626         cat >>confdefs.h <<\_ACEOF 
     2718        cat >>confdefs.h <<\EOF 
    36272719#define PJ_RTEMS 1 
    3628 _ACEOF 
     2720EOF 
    36292721 
    36302722        ;; 
    36312723    *sunos* | *solaris* ) 
    3632         cat >>confdefs.h <<\_ACEOF 
     2724        cat >>confdefs.h <<\EOF 
    36332725#define PJ_SUNOS 1 
    3634 _ACEOF 
     2726EOF 
    36352727 
    36362728        ;; 
     
    36392731esac 
    36402732 
    3641  
    3642  
    3643  
    36442733# Check whether --enable-floating-point or --disable-floating-point was given. 
    36452734if test "${enable_floating_point+set}" = set; then 
    36462735  enableval="$enable_floating_point" 
    36472736  if test "$enable_floating_point" = "no"; then 
    3648                 cat >>confdefs.h <<\_ACEOF 
     2737                cat >>confdefs.h <<\EOF 
    36492738#define PJ_HAS_FLOATING_POINT 0 
    3650 _ACEOF 
    3651  
    3652                 echo "$as_me:$LINENO: result: Checking if floating point is disabled... yes" >&5 
     2739EOF 
     2740 
     2741                echo "$as_me:2741: result: Checking if floating point is disabled... yes" >&5 
    36532742echo "${ECHO_T}Checking if floating point is disabled... yes" >&6 
    36542743               fi 
    36552744else 
    36562745 
    3657                 cat >>confdefs.h <<\_ACEOF 
     2746                cat >>confdefs.h <<\EOF 
    36582747#define PJ_HAS_FLOATING_POINT 1 
    3659 _ACEOF 
    3660  
    3661                 echo "$as_me:$LINENO: result: Checking if floating point is disabled... no" >&5 
     2748EOF 
     2749 
     2750                echo "$as_me:2750: result: Checking if floating point is disabled... no" >&5 
    36622751echo "${ECHO_T}Checking if floating point is disabled... no" >&6 
    36632752 
    3664 echo "$as_me:$LINENO: checking for fmod in -lm" >&5 
     2753echo "$as_me:2753: checking for fmod in -lm" >&5 
    36652754echo $ECHO_N "checking for fmod in -lm... $ECHO_C" >&6 
    36662755if test "${ac_cv_lib_m_fmod+set}" = set; then 
     
    36702759LIBS="-lm  $LIBS" 
    36712760cat >conftest.$ac_ext <<_ACEOF 
    3672 /* confdefs.h.  */ 
    3673 _ACEOF 
    3674 cat confdefs.h >>conftest.$ac_ext 
    3675 cat >>conftest.$ac_ext <<_ACEOF 
    3676 /* end confdefs.h.  */ 
     2761#line 2761 "configure" 
     2762#include "confdefs.h" 
    36772763 
    36782764/* Override any gcc2 internal prototype to avoid an error.  */ 
     
    36922778_ACEOF 
    36932779rm -f conftest.$ac_objext conftest$ac_exeext 
    3694 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    3695   (eval $ac_link) 2>conftest.er1 
    3696   ac_status=$? 
    3697   grep -v '^ *+' conftest.er1 >conftest.err 
    3698   rm -f conftest.er1 
    3699   cat conftest.err >&5 
    3700   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2780if { (eval echo "$as_me:2780: \"$ac_link\"") >&5 
     2781  (eval $ac_link) 2>&5 
     2782  ac_status=$? 
     2783  echo "$as_me:2783: \$? = $ac_status" >&5 
    37012784  (exit $ac_status); } && 
    3702          { ac_try='test -z "$ac_c_werror_flag" 
    3703                          || test ! -s conftest.err' 
    3704   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     2785         { ac_try='test -s conftest$ac_exeext' 
     2786  { (eval echo "$as_me:2786: \"$ac_try\"") >&5 
    37052787  (eval $ac_try) 2>&5 
    37062788  ac_status=$? 
    3707   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    3708   (exit $ac_status); }; } && 
    3709          { ac_try='test -s conftest$ac_exeext' 
    3710   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    3711   (eval $ac_try) 2>&5 
    3712   ac_status=$? 
    3713   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2789  echo "$as_me:2789: \$? = $ac_status" >&5 
    37142790  (exit $ac_status); }; }; then 
    37152791  ac_cv_lib_m_fmod=yes 
    37162792else 
    37172793  echo "$as_me: failed program was:" >&5 
    3718 sed 's/^/| /' conftest.$ac_ext >&5 
    3719  
     2794cat conftest.$ac_ext >&5 
    37202795ac_cv_lib_m_fmod=no 
    37212796fi 
    3722 rm -f conftest.err conftest.$ac_objext \ 
    3723       conftest$ac_exeext conftest.$ac_ext 
     2797rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 
    37242798LIBS=$ac_check_lib_save_LIBS 
    37252799fi 
    3726 echo "$as_me:$LINENO: result: $ac_cv_lib_m_fmod" >&5 
     2800echo "$as_me:2800: result: $ac_cv_lib_m_fmod" >&5 
    37272801echo "${ECHO_T}$ac_cv_lib_m_fmod" >&6 
    37282802if test $ac_cv_lib_m_fmod = yes; then 
    3729   cat >>confdefs.h <<_ACEOF 
     2803  cat >>confdefs.h <<EOF 
    37302804#define HAVE_LIBM 1 
    3731 _ACEOF 
     2805EOF 
    37322806 
    37332807  LIBS="-lm $LIBS" 
     
    37352809fi 
    37362810 
    3737  
    37382811fi; 
    3739  
    37402812 
    37412813ac_ext=c 
     
    37442816ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 
    37452817ac_compiler_gnu=$ac_cv_c_compiler_gnu 
    3746 echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 
     2818echo "$as_me:2818: checking how to run the C preprocessor" >&5 
    37472819echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 
    37482820# On Suns, sometimes $CPP names a directory. 
     
    37622834  # Use a header file that comes with gcc, so configuring glibc 
    37632835  # with a fresh cross-compiler works. 
    3764   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 
    3765   # <limits.h> exists even on freestanding compilers. 
    37662836  # On the NeXT, cc -E runs the code through the compiler's parser, 
    37672837  # not just through cpp. "Syntax error" is here to catch this case. 
    37682838  cat >conftest.$ac_ext <<_ACEOF 
    3769 /* confdefs.h.  */ 
    3770 _ACEOF 
    3771 cat confdefs.h >>conftest.$ac_ext 
    3772 cat >>conftest.$ac_ext <<_ACEOF 
    3773 /* end confdefs.h.  */ 
    3774 #ifdef __STDC__ 
    3775 # include <limits.h> 
    3776 #else 
    3777 # include <assert.h> 
    3778 #endif 
    3779                      Syntax error 
    3780 _ACEOF 
    3781 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     2839#line 2839 "configure" 
     2840#include "confdefs.h" 
     2841#include <assert.h> 
     2842                     Syntax error 
     2843_ACEOF 
     2844if { (eval echo "$as_me:2844: \"$ac_cpp conftest.$ac_ext\"") >&5 
    37822845  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    37832846  ac_status=$? 
    3784   grep -v '^ *+' conftest.er1 >conftest.err 
     2847  egrep -v '^ *\+' conftest.er1 >conftest.err 
    37852848  rm -f conftest.er1 
    37862849  cat conftest.err >&5 
    3787   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2850  echo "$as_me:2850: \$? = $ac_status" >&5 
    37882851  (exit $ac_status); } >/dev/null; then 
    37892852  if test -s conftest.err; then 
    37902853    ac_cpp_err=$ac_c_preproc_warn_flag 
    3791     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    37922854  else 
    37932855    ac_cpp_err= 
     
    38002862else 
    38012863  echo "$as_me: failed program was:" >&5 
    3802 sed 's/^/| /' conftest.$ac_ext >&5 
    3803  
     2864  cat conftest.$ac_ext >&5 
    38042865  # Broken: fails on valid input. 
    38052866continue 
     
    38102871  # can be detected and how. 
    38112872  cat >conftest.$ac_ext <<_ACEOF 
    3812 /* confdefs.h.  */ 
    3813 _ACEOF 
    3814 cat confdefs.h >>conftest.$ac_ext 
    3815 cat >>conftest.$ac_ext <<_ACEOF 
    3816 /* end confdefs.h.  */ 
     2873#line 2873 "configure" 
     2874#include "confdefs.h" 
    38172875#include <ac_nonexistent.h> 
    38182876_ACEOF 
    3819 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     2877if { (eval echo "$as_me:2877: \"$ac_cpp conftest.$ac_ext\"") >&5 
    38202878  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    38212879  ac_status=$? 
    3822   grep -v '^ *+' conftest.er1 >conftest.err 
     2880  egrep -v '^ *\+' conftest.er1 >conftest.err 
    38232881  rm -f conftest.er1 
    38242882  cat conftest.err >&5 
    3825   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2883  echo "$as_me:2883: \$? = $ac_status" >&5 
    38262884  (exit $ac_status); } >/dev/null; then 
    38272885  if test -s conftest.err; then 
    38282886    ac_cpp_err=$ac_c_preproc_warn_flag 
    3829     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    38302887  else 
    38312888    ac_cpp_err= 
     
    38392896else 
    38402897  echo "$as_me: failed program was:" >&5 
    3841 sed 's/^/| /' conftest.$ac_ext >&5 
    3842  
     2898  cat conftest.$ac_ext >&5 
    38432899  # Passes both tests. 
    38442900ac_preproc_ok=: 
     
    38622918  ac_cv_prog_CPP=$CPP 
    38632919fi 
    3864 echo "$as_me:$LINENO: result: $CPP" >&5 
     2920echo "$as_me:2920: result: $CPP" >&5 
    38652921echo "${ECHO_T}$CPP" >&6 
    38662922ac_preproc_ok=false 
     
    38692925  # Use a header file that comes with gcc, so configuring glibc 
    38702926  # with a fresh cross-compiler works. 
    3871   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 
    3872   # <limits.h> exists even on freestanding compilers. 
    38732927  # On the NeXT, cc -E runs the code through the compiler's parser, 
    38742928  # not just through cpp. "Syntax error" is here to catch this case. 
    38752929  cat >conftest.$ac_ext <<_ACEOF 
    3876 /* confdefs.h.  */ 
    3877 _ACEOF 
    3878 cat confdefs.h >>conftest.$ac_ext 
    3879 cat >>conftest.$ac_ext <<_ACEOF 
    3880 /* end confdefs.h.  */ 
    3881 #ifdef __STDC__ 
    3882 # include <limits.h> 
    3883 #else 
    3884 # include <assert.h> 
    3885 #endif 
    3886                      Syntax error 
    3887 _ACEOF 
    3888 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     2930#line 2930 "configure" 
     2931#include "confdefs.h" 
     2932#include <assert.h> 
     2933                     Syntax error 
     2934_ACEOF 
     2935if { (eval echo "$as_me:2935: \"$ac_cpp conftest.$ac_ext\"") >&5 
    38892936  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    38902937  ac_status=$? 
    3891   grep -v '^ *+' conftest.er1 >conftest.err 
     2938  egrep -v '^ *\+' conftest.er1 >conftest.err 
    38922939  rm -f conftest.er1 
    38932940  cat conftest.err >&5 
    3894   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2941  echo "$as_me:2941: \$? = $ac_status" >&5 
    38952942  (exit $ac_status); } >/dev/null; then 
    38962943  if test -s conftest.err; then 
    38972944    ac_cpp_err=$ac_c_preproc_warn_flag 
    3898     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    38992945  else 
    39002946    ac_cpp_err= 
     
    39072953else 
    39082954  echo "$as_me: failed program was:" >&5 
    3909 sed 's/^/| /' conftest.$ac_ext >&5 
    3910  
     2955  cat conftest.$ac_ext >&5 
    39112956  # Broken: fails on valid input. 
    39122957continue 
     
    39172962  # can be detected and how. 
    39182963  cat >conftest.$ac_ext <<_ACEOF 
    3919 /* confdefs.h.  */ 
    3920 _ACEOF 
    3921 cat confdefs.h >>conftest.$ac_ext 
    3922 cat >>conftest.$ac_ext <<_ACEOF 
    3923 /* end confdefs.h.  */ 
     2964#line 2964 "configure" 
     2965#include "confdefs.h" 
    39242966#include <ac_nonexistent.h> 
    39252967_ACEOF 
    3926 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
     2968if { (eval echo "$as_me:2968: \"$ac_cpp conftest.$ac_ext\"") >&5 
    39272969  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    39282970  ac_status=$? 
    3929   grep -v '^ *+' conftest.er1 >conftest.err 
     2971  egrep -v '^ *\+' conftest.er1 >conftest.err 
    39302972  rm -f conftest.er1 
    39312973  cat conftest.err >&5 
    3932   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     2974  echo "$as_me:2974: \$? = $ac_status" >&5 
    39332975  (exit $ac_status); } >/dev/null; then 
    39342976  if test -s conftest.err; then 
    39352977    ac_cpp_err=$ac_c_preproc_warn_flag 
    3936     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    39372978  else 
    39382979    ac_cpp_err= 
     
    39462987else 
    39472988  echo "$as_me: failed program was:" >&5 
    3948 sed 's/^/| /' conftest.$ac_ext >&5 
    3949  
     2989  cat conftest.$ac_ext >&5 
    39502990  # Passes both tests. 
    39512991ac_preproc_ok=: 
     
    39603000  : 
    39613001else 
    3962   { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 
    3963 See \`config.log' for more details." >&5 
    3964 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 
    3965 See \`config.log' for more details." >&2;} 
     3002  { { echo "$as_me:3002: error: C preprocessor \"$CPP\" fails sanity check" >&5 
     3003echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;} 
    39663004   { (exit 1); exit 1; }; } 
    39673005fi 
     
    39733011ac_compiler_gnu=$ac_cv_c_compiler_gnu 
    39743012 
    3975  
    3976 echo "$as_me:$LINENO: checking for egrep" >&5 
    3977 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 
    3978 if test "${ac_cv_prog_egrep+set}" = set; then 
    3979   echo $ECHO_N "(cached) $ECHO_C" >&6 
    3980 else 
    3981   if echo a | (grep -E '(a|b)') >/dev/null 2>&1 
    3982     then ac_cv_prog_egrep='grep -E' 
    3983     else ac_cv_prog_egrep='egrep' 
    3984     fi 
    3985 fi 
    3986 echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 
    3987 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 
    3988  EGREP=$ac_cv_prog_egrep 
    3989  
    3990  
    3991 echo "$as_me:$LINENO: checking for ANSI C header files" >&5 
    3992 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 
    3993 if test "${ac_cv_header_stdc+set}" = set; then 
    3994   echo $ECHO_N "(cached) $ECHO_C" >&6 
    3995 else 
    3996   cat >conftest.$ac_ext <<_ACEOF 
    3997 /* confdefs.h.  */ 
    3998 _ACEOF 
    3999 cat confdefs.h >>conftest.$ac_ext 
    4000 cat >>conftest.$ac_ext <<_ACEOF 
    4001 /* end confdefs.h.  */ 
    4002 #include <stdlib.h> 
    4003 #include <stdarg.h> 
    4004 #include <string.h> 
    4005 #include <float.h> 
    4006  
    4007 int 
    4008 main () 
    4009 { 
    4010  
    4011   ; 
    4012   return 0; 
    4013 } 
    4014 _ACEOF 
    4015 rm -f conftest.$ac_objext 
    4016 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4017   (eval $ac_compile) 2>conftest.er1 
    4018   ac_status=$? 
    4019   grep -v '^ *+' conftest.er1 >conftest.err 
    4020   rm -f conftest.er1 
    4021   cat conftest.err >&5 
    4022   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4023   (exit $ac_status); } && 
    4024          { ac_try='test -z "$ac_c_werror_flag" 
    4025                          || test ! -s conftest.err' 
    4026   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4027   (eval $ac_try) 2>&5 
    4028   ac_status=$? 
    4029   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4030   (exit $ac_status); }; } && 
    4031          { ac_try='test -s conftest.$ac_objext' 
    4032   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4033   (eval $ac_try) 2>&5 
    4034   ac_status=$? 
    4035   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4036   (exit $ac_status); }; }; then 
    4037   ac_cv_header_stdc=yes 
    4038 else 
    4039   echo "$as_me: failed program was:" >&5 
    4040 sed 's/^/| /' conftest.$ac_ext >&5 
    4041  
    4042 ac_cv_header_stdc=no 
    4043 fi 
    4044 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4045  
    4046 if test $ac_cv_header_stdc = yes; then 
    4047   # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 
    4048   cat >conftest.$ac_ext <<_ACEOF 
    4049 /* confdefs.h.  */ 
    4050 _ACEOF 
    4051 cat confdefs.h >>conftest.$ac_ext 
    4052 cat >>conftest.$ac_ext <<_ACEOF 
    4053 /* end confdefs.h.  */ 
    4054 #include <string.h> 
    4055  
    4056 _ACEOF 
    4057 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 
    4058   $EGREP "memchr" >/dev/null 2>&1; then 
    4059   : 
    4060 else 
    4061   ac_cv_header_stdc=no 
    4062 fi 
    4063 rm -f conftest* 
    4064  
    4065 fi 
    4066  
    4067 if test $ac_cv_header_stdc = yes; then 
    4068   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 
    4069   cat >conftest.$ac_ext <<_ACEOF 
    4070 /* confdefs.h.  */ 
    4071 _ACEOF 
    4072 cat confdefs.h >>conftest.$ac_ext 
    4073 cat >>conftest.$ac_ext <<_ACEOF 
    4074 /* end confdefs.h.  */ 
    4075 #include <stdlib.h> 
    4076  
    4077 _ACEOF 
    4078 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 
    4079   $EGREP "free" >/dev/null 2>&1; then 
    4080   : 
    4081 else 
    4082   ac_cv_header_stdc=no 
    4083 fi 
    4084 rm -f conftest* 
    4085  
    4086 fi 
    4087  
    4088 if test $ac_cv_header_stdc = yes; then 
    4089   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 
    4090   if test "$cross_compiling" = yes; then 
    4091   : 
    4092 else 
    4093   cat >conftest.$ac_ext <<_ACEOF 
    4094 /* confdefs.h.  */ 
    4095 _ACEOF 
    4096 cat confdefs.h >>conftest.$ac_ext 
    4097 cat >>conftest.$ac_ext <<_ACEOF 
    4098 /* end confdefs.h.  */ 
    4099 #include <ctype.h> 
    4100 #if ((' ' & 0x0FF) == 0x020) 
    4101 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 
    4102 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 
    4103 #else 
    4104 # define ISLOWER(c) \ 
    4105                    (('a' <= (c) && (c) <= 'i') \ 
    4106                      || ('j' <= (c) && (c) <= 'r') \ 
    4107                      || ('s' <= (c) && (c) <= 'z')) 
    4108 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 
    4109 #endif 
    4110  
    4111 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 
    4112 int 
    4113 main () 
    4114 { 
    4115   int i; 
    4116   for (i = 0; i < 256; i++) 
    4117     if (XOR (islower (i), ISLOWER (i)) 
    4118         || toupper (i) != TOUPPER (i)) 
    4119       exit(2); 
    4120   exit (0); 
    4121 } 
    4122 _ACEOF 
    4123 rm -f conftest$ac_exeext 
    4124 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 
    4125   (eval $ac_link) 2>&5 
    4126   ac_status=$? 
    4127   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4128   (exit $ac_status); } && { ac_try='./conftest$ac_exeext' 
    4129   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4130   (eval $ac_try) 2>&5 
    4131   ac_status=$? 
    4132   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4133   (exit $ac_status); }; }; then 
    4134   : 
    4135 else 
    4136   echo "$as_me: program exited with status $ac_status" >&5 
    4137 echo "$as_me: failed program was:" >&5 
    4138 sed 's/^/| /' conftest.$ac_ext >&5 
    4139  
    4140 ( exit $ac_status ) 
    4141 ac_cv_header_stdc=no 
    4142 fi 
    4143 rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 
    4144 fi 
    4145 fi 
    4146 fi 
    4147 echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 
    4148 echo "${ECHO_T}$ac_cv_header_stdc" >&6 
    4149 if test $ac_cv_header_stdc = yes; then 
    4150  
    4151 cat >>confdefs.h <<\_ACEOF 
    4152 #define STDC_HEADERS 1 
    4153 _ACEOF 
    4154  
    4155 fi 
    4156  
    4157 # On IRIX 5.3, sys/types and inttypes.h are conflicting. 
    4158  
    4159  
    4160  
    4161  
    4162  
    4163  
    4164  
    4165  
    4166  
    4167 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 
    4168                   inttypes.h stdint.h unistd.h 
    4169 do 
    4170 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 
    4171 echo "$as_me:$LINENO: checking for $ac_header" >&5 
    4172 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 
    4173 if eval "test \"\${$as_ac_Header+set}\" = set"; then 
    4174   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4175 else 
    4176   cat >conftest.$ac_ext <<_ACEOF 
    4177 /* confdefs.h.  */ 
    4178 _ACEOF 
    4179 cat confdefs.h >>conftest.$ac_ext 
    4180 cat >>conftest.$ac_ext <<_ACEOF 
    4181 /* end confdefs.h.  */ 
    4182 $ac_includes_default 
    4183  
    4184 #include <$ac_header> 
    4185 _ACEOF 
    4186 rm -f conftest.$ac_objext 
    4187 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4188   (eval $ac_compile) 2>conftest.er1 
    4189   ac_status=$? 
    4190   grep -v '^ *+' conftest.er1 >conftest.err 
    4191   rm -f conftest.er1 
    4192   cat conftest.err >&5 
    4193   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4194   (exit $ac_status); } && 
    4195          { ac_try='test -z "$ac_c_werror_flag" 
    4196                          || test ! -s conftest.err' 
    4197   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4198   (eval $ac_try) 2>&5 
    4199   ac_status=$? 
    4200   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4201   (exit $ac_status); }; } && 
    4202          { ac_try='test -s conftest.$ac_objext' 
    4203   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4204   (eval $ac_try) 2>&5 
    4205   ac_status=$? 
    4206   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4207   (exit $ac_status); }; }; then 
    4208   eval "$as_ac_Header=yes" 
    4209 else 
    4210   echo "$as_me: failed program was:" >&5 
    4211 sed 's/^/| /' conftest.$ac_ext >&5 
    4212  
    4213 eval "$as_ac_Header=no" 
    4214 fi 
    4215 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4216 fi 
    4217 echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 
    4218 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 
    4219 if test `eval echo '${'$as_ac_Header'}'` = yes; then 
    4220   cat >>confdefs.h <<_ACEOF 
    4221 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 
    4222 _ACEOF 
    4223  
    4224 fi 
    4225  
    4226 done 
    4227  
    4228  
    4229 if test "${ac_cv_header_arpa_inet_h+set}" = set; then 
    4230   echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 
     3013echo "$as_me:3013: checking for arpa/inet.h" >&5 
    42313014echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 
    42323015if test "${ac_cv_header_arpa_inet_h+set}" = set; then 
    42333016  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4234 fi 
    4235 echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 
    4236 echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 
    4237 else 
    4238   # Is the header compilable? 
    4239 echo "$as_me:$LINENO: checking arpa/inet.h usability" >&5 
    4240 echo $ECHO_N "checking arpa/inet.h usability... $ECHO_C" >&6 
    4241 cat >conftest.$ac_ext <<_ACEOF 
    4242 /* confdefs.h.  */ 
    4243 _ACEOF 
    4244 cat confdefs.h >>conftest.$ac_ext 
    4245 cat >>conftest.$ac_ext <<_ACEOF 
    4246 /* end confdefs.h.  */ 
    4247 $ac_includes_default 
     3017else 
     3018  cat >conftest.$ac_ext <<_ACEOF 
     3019#line 3019 "configure" 
     3020#include "confdefs.h" 
    42483021#include <arpa/inet.h> 
    42493022_ACEOF 
    4250 rm -f conftest.$ac_objext 
    4251 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4252   (eval $ac_compile) 2>conftest.er1 
    4253   ac_status=$? 
    4254   grep -v '^ *+' conftest.er1 >conftest.err 
     3023if { (eval echo "$as_me:3023: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3024  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3025  ac_status=$? 
     3026  egrep -v '^ *\+' conftest.er1 >conftest.err 
    42553027  rm -f conftest.er1 
    42563028  cat conftest.err >&5 
    4257   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4258   (exit $ac_status); } && 
    4259          { ac_try='test -z "$ac_c_werror_flag" 
    4260                          || test ! -s conftest.err' 
    4261   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4262   (eval $ac_try) 2>&5 
    4263   ac_status=$? 
    4264   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4265   (exit $ac_status); }; } && 
    4266          { ac_try='test -s conftest.$ac_objext' 
    4267   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4268   (eval $ac_try) 2>&5 
    4269   ac_status=$? 
    4270   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4271   (exit $ac_status); }; }; then 
    4272   ac_header_compiler=yes 
    4273 else 
    4274   echo "$as_me: failed program was:" >&5 
    4275 sed 's/^/| /' conftest.$ac_ext >&5 
    4276  
    4277 ac_header_compiler=no 
    4278 fi 
    4279 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4280 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    4281 echo "${ECHO_T}$ac_header_compiler" >&6 
    4282  
    4283 # Is the header present? 
    4284 echo "$as_me:$LINENO: checking arpa/inet.h presence" >&5 
    4285 echo $ECHO_N "checking arpa/inet.h presence... $ECHO_C" >&6 
    4286 cat >conftest.$ac_ext <<_ACEOF 
    4287 /* confdefs.h.  */ 
    4288 _ACEOF 
    4289 cat confdefs.h >>conftest.$ac_ext 
    4290 cat >>conftest.$ac_ext <<_ACEOF 
    4291 /* end confdefs.h.  */ 
    4292 #include <arpa/inet.h> 
    4293 _ACEOF 
    4294 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    4295   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    4296   ac_status=$? 
    4297   grep -v '^ *+' conftest.er1 >conftest.err 
    4298   rm -f conftest.er1 
    4299   cat conftest.err >&5 
    4300   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3029  echo "$as_me:3029: \$? = $ac_status" >&5 
    43013030  (exit $ac_status); } >/dev/null; then 
    43023031  if test -s conftest.err; then 
    43033032    ac_cpp_err=$ac_c_preproc_warn_flag 
    4304     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    43053033  else 
    43063034    ac_cpp_err= 
     
    43103038fi 
    43113039if test -z "$ac_cpp_err"; then 
    4312   ac_header_preproc=yes 
    4313 else 
    4314   echo "$as_me: failed program was:" >&5 
    4315 sed 's/^/| /' conftest.$ac_ext >&5 
    4316  
    4317   ac_header_preproc=no 
     3040  ac_cv_header_arpa_inet_h=yes 
     3041else 
     3042  echo "$as_me: failed program was:" >&5 
     3043  cat conftest.$ac_ext >&5 
     3044  ac_cv_header_arpa_inet_h=no 
    43183045fi 
    43193046rm -f conftest.err conftest.$ac_ext 
    4320 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    4321 echo "${ECHO_T}$ac_header_preproc" >&6 
    4322  
    4323 # So?  What about this header? 
    4324 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    4325   yes:no: ) 
    4326     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    4327 echo "$as_me: WARNING: arpa/inet.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    4328     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the compiler's result" >&5 
    4329 echo "$as_me: WARNING: arpa/inet.h: proceeding with the compiler's result" >&2;} 
    4330     ac_header_preproc=yes 
    4331     ;; 
    4332   no:yes:* ) 
    4333     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: present but cannot be compiled" >&5 
    4334 echo "$as_me: WARNING: arpa/inet.h: present but cannot be compiled" >&2;} 
    4335     { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&5 
    4336 echo "$as_me: WARNING: arpa/inet.h:     check for missing prerequisite headers?" >&2;} 
    4337     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: see the Autoconf documentation" >&5 
    4338 echo "$as_me: WARNING: arpa/inet.h: see the Autoconf documentation" >&2;} 
    4339     { echo "$as_me:$LINENO: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&5 
    4340 echo "$as_me: WARNING: arpa/inet.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    4341     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&5 
    4342 echo "$as_me: WARNING: arpa/inet.h: proceeding with the preprocessor's result" >&2;} 
    4343     { echo "$as_me:$LINENO: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&5 
    4344 echo "$as_me: WARNING: arpa/inet.h: in the future, the compiler will take precedence" >&2;} 
    4345     ( 
    4346       cat <<\_ASBOX 
    4347 ## ------------------------------------ ## 
    4348 ## Report this to the pjproject lists.  ## 
    4349 ## ------------------------------------ ## 
    4350 _ASBOX 
    4351     ) | 
    4352       sed "s/^/$as_me: WARNING:     /" >&2 
    4353     ;; 
    4354 esac 
    4355 echo "$as_me:$LINENO: checking for arpa/inet.h" >&5 
    4356 echo $ECHO_N "checking for arpa/inet.h... $ECHO_C" >&6 
    4357 if test "${ac_cv_header_arpa_inet_h+set}" = set; then 
    4358   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4359 else 
    4360   ac_cv_header_arpa_inet_h=$ac_header_preproc 
    4361 fi 
    4362 echo "$as_me:$LINENO: result: $ac_cv_header_arpa_inet_h" >&5 
     3047fi 
     3048echo "$as_me:3048: result: $ac_cv_header_arpa_inet_h" >&5 
    43633049echo "${ECHO_T}$ac_cv_header_arpa_inet_h" >&6 
    4364  
    4365 fi 
    43663050if test $ac_cv_header_arpa_inet_h = yes; then 
    4367   cat >>confdefs.h <<\_ACEOF 
     3051  cat >>confdefs.h <<\EOF 
    43683052#define PJ_HAS_ARPA_INET_H 1 
    4369 _ACEOF 
    4370  
    4371 fi 
    4372  
    4373  
    4374 if test "${ac_cv_header_assert_h+set}" = set; then 
    4375   echo "$as_me:$LINENO: checking for assert.h" >&5 
     3053EOF 
     3054 
     3055fi 
     3056 
     3057echo "$as_me:3057: checking for assert.h" >&5 
    43763058echo $ECHO_N "checking for assert.h... $ECHO_C" >&6 
    43773059if test "${ac_cv_header_assert_h+set}" = set; then 
    43783060  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4379 fi 
    4380 echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5 
    4381 echo "${ECHO_T}$ac_cv_header_assert_h" >&6 
    4382 else 
    4383   # Is the header compilable? 
    4384 echo "$as_me:$LINENO: checking assert.h usability" >&5 
    4385 echo $ECHO_N "checking assert.h usability... $ECHO_C" >&6 
    4386 cat >conftest.$ac_ext <<_ACEOF 
    4387 /* confdefs.h.  */ 
    4388 _ACEOF 
    4389 cat confdefs.h >>conftest.$ac_ext 
    4390 cat >>conftest.$ac_ext <<_ACEOF 
    4391 /* end confdefs.h.  */ 
    4392 $ac_includes_default 
     3061else 
     3062  cat >conftest.$ac_ext <<_ACEOF 
     3063#line 3063 "configure" 
     3064#include "confdefs.h" 
    43933065#include <assert.h> 
    43943066_ACEOF 
    4395 rm -f conftest.$ac_objext 
    4396 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4397   (eval $ac_compile) 2>conftest.er1 
    4398   ac_status=$? 
    4399   grep -v '^ *+' conftest.er1 >conftest.err 
     3067if { (eval echo "$as_me:3067: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3068  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3069  ac_status=$? 
     3070  egrep -v '^ *\+' conftest.er1 >conftest.err 
    44003071  rm -f conftest.er1 
    44013072  cat conftest.err >&5 
    4402   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4403   (exit $ac_status); } && 
    4404          { ac_try='test -z "$ac_c_werror_flag" 
    4405                          || test ! -s conftest.err' 
    4406   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4407   (eval $ac_try) 2>&5 
    4408   ac_status=$? 
    4409   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4410   (exit $ac_status); }; } && 
    4411          { ac_try='test -s conftest.$ac_objext' 
    4412   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4413   (eval $ac_try) 2>&5 
    4414   ac_status=$? 
    4415   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4416   (exit $ac_status); }; }; then 
    4417   ac_header_compiler=yes 
    4418 else 
    4419   echo "$as_me: failed program was:" >&5 
    4420 sed 's/^/| /' conftest.$ac_ext >&5 
    4421  
    4422 ac_header_compiler=no 
    4423 fi 
    4424 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4425 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    4426 echo "${ECHO_T}$ac_header_compiler" >&6 
    4427  
    4428 # Is the header present? 
    4429 echo "$as_me:$LINENO: checking assert.h presence" >&5 
    4430 echo $ECHO_N "checking assert.h presence... $ECHO_C" >&6 
    4431 cat >conftest.$ac_ext <<_ACEOF 
    4432 /* confdefs.h.  */ 
    4433 _ACEOF 
    4434 cat confdefs.h >>conftest.$ac_ext 
    4435 cat >>conftest.$ac_ext <<_ACEOF 
    4436 /* end confdefs.h.  */ 
    4437 #include <assert.h> 
    4438 _ACEOF 
    4439 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    4440   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    4441   ac_status=$? 
    4442   grep -v '^ *+' conftest.er1 >conftest.err 
    4443   rm -f conftest.er1 
    4444   cat conftest.err >&5 
    4445   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3073  echo "$as_me:3073: \$? = $ac_status" >&5 
    44463074  (exit $ac_status); } >/dev/null; then 
    44473075  if test -s conftest.err; then 
    44483076    ac_cpp_err=$ac_c_preproc_warn_flag 
    4449     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    44503077  else 
    44513078    ac_cpp_err= 
     
    44553082fi 
    44563083if test -z "$ac_cpp_err"; then 
    4457   ac_header_preproc=yes 
    4458 else 
    4459   echo "$as_me: failed program was:" >&5 
    4460 sed 's/^/| /' conftest.$ac_ext >&5 
    4461  
    4462   ac_header_preproc=no 
     3084  ac_cv_header_assert_h=yes 
     3085else 
     3086  echo "$as_me: failed program was:" >&5 
     3087  cat conftest.$ac_ext >&5 
     3088  ac_cv_header_assert_h=no 
    44633089fi 
    44643090rm -f conftest.err conftest.$ac_ext 
    4465 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    4466 echo "${ECHO_T}$ac_header_preproc" >&6 
    4467  
    4468 # So?  What about this header? 
    4469 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    4470   yes:no: ) 
    4471     { echo "$as_me:$LINENO: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    4472 echo "$as_me: WARNING: assert.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    4473     { echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the compiler's result" >&5 
    4474 echo "$as_me: WARNING: assert.h: proceeding with the compiler's result" >&2;} 
    4475     ac_header_preproc=yes 
    4476     ;; 
    4477   no:yes:* ) 
    4478     { echo "$as_me:$LINENO: WARNING: assert.h: present but cannot be compiled" >&5 
    4479 echo "$as_me: WARNING: assert.h: present but cannot be compiled" >&2;} 
    4480     { echo "$as_me:$LINENO: WARNING: assert.h:     check for missing prerequisite headers?" >&5 
    4481 echo "$as_me: WARNING: assert.h:     check for missing prerequisite headers?" >&2;} 
    4482     { echo "$as_me:$LINENO: WARNING: assert.h: see the Autoconf documentation" >&5 
    4483 echo "$as_me: WARNING: assert.h: see the Autoconf documentation" >&2;} 
    4484     { echo "$as_me:$LINENO: WARNING: assert.h:     section \"Present But Cannot Be Compiled\"" >&5 
    4485 echo "$as_me: WARNING: assert.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    4486     { echo "$as_me:$LINENO: WARNING: assert.h: proceeding with the preprocessor's result" >&5 
    4487 echo "$as_me: WARNING: assert.h: proceeding with the preprocessor's result" >&2;} 
    4488     { echo "$as_me:$LINENO: WARNING: assert.h: in the future, the compiler will take precedence" >&5 
    4489 echo "$as_me: WARNING: assert.h: in the future, the compiler will take precedence" >&2;} 
    4490     ( 
    4491       cat <<\_ASBOX 
    4492 ## ------------------------------------ ## 
    4493 ## Report this to the pjproject lists.  ## 
    4494 ## ------------------------------------ ## 
    4495 _ASBOX 
    4496     ) | 
    4497       sed "s/^/$as_me: WARNING:     /" >&2 
    4498     ;; 
    4499 esac 
    4500 echo "$as_me:$LINENO: checking for assert.h" >&5 
    4501 echo $ECHO_N "checking for assert.h... $ECHO_C" >&6 
    4502 if test "${ac_cv_header_assert_h+set}" = set; then 
    4503   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4504 else 
    4505   ac_cv_header_assert_h=$ac_header_preproc 
    4506 fi 
    4507 echo "$as_me:$LINENO: result: $ac_cv_header_assert_h" >&5 
     3091fi 
     3092echo "$as_me:3092: result: $ac_cv_header_assert_h" >&5 
    45083093echo "${ECHO_T}$ac_cv_header_assert_h" >&6 
    4509  
    4510 fi 
    45113094if test $ac_cv_header_assert_h = yes; then 
    4512   cat >>confdefs.h <<\_ACEOF 
     3095  cat >>confdefs.h <<\EOF 
    45133096#define PJ_HAS_ASSERT_H 1 
    4514 _ACEOF 
    4515  
    4516 fi 
    4517  
    4518  
    4519 if test "${ac_cv_header_ctype_h+set}" = set; then 
    4520   echo "$as_me:$LINENO: checking for ctype.h" >&5 
     3097EOF 
     3098 
     3099fi 
     3100 
     3101echo "$as_me:3101: checking for ctype.h" >&5 
    45213102echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6 
    45223103if test "${ac_cv_header_ctype_h+set}" = set; then 
    45233104  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4524 fi 
    4525 echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5 
    4526 echo "${ECHO_T}$ac_cv_header_ctype_h" >&6 
    4527 else 
    4528   # Is the header compilable? 
    4529 echo "$as_me:$LINENO: checking ctype.h usability" >&5 
    4530 echo $ECHO_N "checking ctype.h usability... $ECHO_C" >&6 
    4531 cat >conftest.$ac_ext <<_ACEOF 
    4532 /* confdefs.h.  */ 
    4533 _ACEOF 
    4534 cat confdefs.h >>conftest.$ac_ext 
    4535 cat >>conftest.$ac_ext <<_ACEOF 
    4536 /* end confdefs.h.  */ 
    4537 $ac_includes_default 
     3105else 
     3106  cat >conftest.$ac_ext <<_ACEOF 
     3107#line 3107 "configure" 
     3108#include "confdefs.h" 
    45383109#include <ctype.h> 
    45393110_ACEOF 
    4540 rm -f conftest.$ac_objext 
    4541 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4542   (eval $ac_compile) 2>conftest.er1 
    4543   ac_status=$? 
    4544   grep -v '^ *+' conftest.er1 >conftest.err 
     3111if { (eval echo "$as_me:3111: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3112  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3113  ac_status=$? 
     3114  egrep -v '^ *\+' conftest.er1 >conftest.err 
    45453115  rm -f conftest.er1 
    45463116  cat conftest.err >&5 
    4547   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4548   (exit $ac_status); } && 
    4549          { ac_try='test -z "$ac_c_werror_flag" 
    4550                          || test ! -s conftest.err' 
    4551   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4552   (eval $ac_try) 2>&5 
    4553   ac_status=$? 
    4554   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4555   (exit $ac_status); }; } && 
    4556          { ac_try='test -s conftest.$ac_objext' 
    4557   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4558   (eval $ac_try) 2>&5 
    4559   ac_status=$? 
    4560   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4561   (exit $ac_status); }; }; then 
    4562   ac_header_compiler=yes 
    4563 else 
    4564   echo "$as_me: failed program was:" >&5 
    4565 sed 's/^/| /' conftest.$ac_ext >&5 
    4566  
    4567 ac_header_compiler=no 
    4568 fi 
    4569 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4570 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    4571 echo "${ECHO_T}$ac_header_compiler" >&6 
    4572  
    4573 # Is the header present? 
    4574 echo "$as_me:$LINENO: checking ctype.h presence" >&5 
    4575 echo $ECHO_N "checking ctype.h presence... $ECHO_C" >&6 
    4576 cat >conftest.$ac_ext <<_ACEOF 
    4577 /* confdefs.h.  */ 
    4578 _ACEOF 
    4579 cat confdefs.h >>conftest.$ac_ext 
    4580 cat >>conftest.$ac_ext <<_ACEOF 
    4581 /* end confdefs.h.  */ 
    4582 #include <ctype.h> 
    4583 _ACEOF 
    4584 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    4585   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    4586   ac_status=$? 
    4587   grep -v '^ *+' conftest.er1 >conftest.err 
    4588   rm -f conftest.er1 
    4589   cat conftest.err >&5 
    4590   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3117  echo "$as_me:3117: \$? = $ac_status" >&5 
    45913118  (exit $ac_status); } >/dev/null; then 
    45923119  if test -s conftest.err; then 
    45933120    ac_cpp_err=$ac_c_preproc_warn_flag 
    4594     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    45953121  else 
    45963122    ac_cpp_err= 
     
    46003126fi 
    46013127if test -z "$ac_cpp_err"; then 
    4602   ac_header_preproc=yes 
    4603 else 
    4604   echo "$as_me: failed program was:" >&5 
    4605 sed 's/^/| /' conftest.$ac_ext >&5 
    4606  
    4607   ac_header_preproc=no 
     3128  ac_cv_header_ctype_h=yes 
     3129else 
     3130  echo "$as_me: failed program was:" >&5 
     3131  cat conftest.$ac_ext >&5 
     3132  ac_cv_header_ctype_h=no 
    46083133fi 
    46093134rm -f conftest.err conftest.$ac_ext 
    4610 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    4611 echo "${ECHO_T}$ac_header_preproc" >&6 
    4612  
    4613 # So?  What about this header? 
    4614 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    4615   yes:no: ) 
    4616     { echo "$as_me:$LINENO: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    4617 echo "$as_me: WARNING: ctype.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    4618     { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the compiler's result" >&5 
    4619 echo "$as_me: WARNING: ctype.h: proceeding with the compiler's result" >&2;} 
    4620     ac_header_preproc=yes 
    4621     ;; 
    4622   no:yes:* ) 
    4623     { echo "$as_me:$LINENO: WARNING: ctype.h: present but cannot be compiled" >&5 
    4624 echo "$as_me: WARNING: ctype.h: present but cannot be compiled" >&2;} 
    4625     { echo "$as_me:$LINENO: WARNING: ctype.h:     check for missing prerequisite headers?" >&5 
    4626 echo "$as_me: WARNING: ctype.h:     check for missing prerequisite headers?" >&2;} 
    4627     { echo "$as_me:$LINENO: WARNING: ctype.h: see the Autoconf documentation" >&5 
    4628 echo "$as_me: WARNING: ctype.h: see the Autoconf documentation" >&2;} 
    4629     { echo "$as_me:$LINENO: WARNING: ctype.h:     section \"Present But Cannot Be Compiled\"" >&5 
    4630 echo "$as_me: WARNING: ctype.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    4631     { echo "$as_me:$LINENO: WARNING: ctype.h: proceeding with the preprocessor's result" >&5 
    4632 echo "$as_me: WARNING: ctype.h: proceeding with the preprocessor's result" >&2;} 
    4633     { echo "$as_me:$LINENO: WARNING: ctype.h: in the future, the compiler will take precedence" >&5 
    4634 echo "$as_me: WARNING: ctype.h: in the future, the compiler will take precedence" >&2;} 
    4635     ( 
    4636       cat <<\_ASBOX 
    4637 ## ------------------------------------ ## 
    4638 ## Report this to the pjproject lists.  ## 
    4639 ## ------------------------------------ ## 
    4640 _ASBOX 
    4641     ) | 
    4642       sed "s/^/$as_me: WARNING:     /" >&2 
    4643     ;; 
    4644 esac 
    4645 echo "$as_me:$LINENO: checking for ctype.h" >&5 
    4646 echo $ECHO_N "checking for ctype.h... $ECHO_C" >&6 
    4647 if test "${ac_cv_header_ctype_h+set}" = set; then 
    4648   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4649 else 
    4650   ac_cv_header_ctype_h=$ac_header_preproc 
    4651 fi 
    4652 echo "$as_me:$LINENO: result: $ac_cv_header_ctype_h" >&5 
     3135fi 
     3136echo "$as_me:3136: result: $ac_cv_header_ctype_h" >&5 
    46533137echo "${ECHO_T}$ac_cv_header_ctype_h" >&6 
    4654  
    4655 fi 
    46563138if test $ac_cv_header_ctype_h = yes; then 
    4657   cat >>confdefs.h <<\_ACEOF 
     3139  cat >>confdefs.h <<\EOF 
    46583140#define PJ_HAS_CTYPE_H 1 
    4659 _ACEOF 
    4660  
    4661 fi 
    4662  
    4663  
     3141EOF 
     3142 
     3143fi 
    46643144 
    46653145case $target in 
    46663146    *mingw* | *cygw* | *win32* | *w32* ) 
    4667         cat >>confdefs.h <<\_ACEOF 
     3147        cat >>confdefs.h <<\EOF 
    46683148#define PJ_HAS_ERRNO_H 0 
    4669 _ACEOF 
     3149EOF 
    46703150 
    46713151        ;; 
    46723152    *) 
    4673         if test "${ac_cv_header_errno_h+set}" = set; then 
    4674   echo "$as_me:$LINENO: checking for errno.h" >&5 
     3153        echo "$as_me:3153: checking for errno.h" >&5 
    46753154echo $ECHO_N "checking for errno.h... $ECHO_C" >&6 
    46763155if test "${ac_cv_header_errno_h+set}" = set; then 
    46773156  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4678 fi 
    4679 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 
    4680 echo "${ECHO_T}$ac_cv_header_errno_h" >&6 
    4681 else 
    4682   # Is the header compilable? 
    4683 echo "$as_me:$LINENO: checking errno.h usability" >&5 
    4684 echo $ECHO_N "checking errno.h usability... $ECHO_C" >&6 
    4685 cat >conftest.$ac_ext <<_ACEOF 
    4686 /* confdefs.h.  */ 
    4687 _ACEOF 
    4688 cat confdefs.h >>conftest.$ac_ext 
    4689 cat >>conftest.$ac_ext <<_ACEOF 
    4690 /* end confdefs.h.  */ 
    4691 $ac_includes_default 
     3157else 
     3158  cat >conftest.$ac_ext <<_ACEOF 
     3159#line 3159 "configure" 
     3160#include "confdefs.h" 
    46923161#include <errno.h> 
    46933162_ACEOF 
    4694 rm -f conftest.$ac_objext 
    4695 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4696   (eval $ac_compile) 2>conftest.er1 
    4697   ac_status=$? 
    4698   grep -v '^ *+' conftest.er1 >conftest.err 
     3163if { (eval echo "$as_me:3163: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3164  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3165  ac_status=$? 
     3166  egrep -v '^ *\+' conftest.er1 >conftest.err 
    46993167  rm -f conftest.er1 
    47003168  cat conftest.err >&5 
    4701   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4702   (exit $ac_status); } && 
    4703          { ac_try='test -z "$ac_c_werror_flag" 
    4704                          || test ! -s conftest.err' 
    4705   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4706   (eval $ac_try) 2>&5 
    4707   ac_status=$? 
    4708   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4709   (exit $ac_status); }; } && 
    4710          { ac_try='test -s conftest.$ac_objext' 
    4711   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4712   (eval $ac_try) 2>&5 
    4713   ac_status=$? 
    4714   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4715   (exit $ac_status); }; }; then 
    4716   ac_header_compiler=yes 
    4717 else 
    4718   echo "$as_me: failed program was:" >&5 
    4719 sed 's/^/| /' conftest.$ac_ext >&5 
    4720  
    4721 ac_header_compiler=no 
    4722 fi 
    4723 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4724 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    4725 echo "${ECHO_T}$ac_header_compiler" >&6 
    4726  
    4727 # Is the header present? 
    4728 echo "$as_me:$LINENO: checking errno.h presence" >&5 
    4729 echo $ECHO_N "checking errno.h presence... $ECHO_C" >&6 
    4730 cat >conftest.$ac_ext <<_ACEOF 
    4731 /* confdefs.h.  */ 
    4732 _ACEOF 
    4733 cat confdefs.h >>conftest.$ac_ext 
    4734 cat >>conftest.$ac_ext <<_ACEOF 
    4735 /* end confdefs.h.  */ 
    4736 #include <errno.h> 
    4737 _ACEOF 
    4738 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    4739   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    4740   ac_status=$? 
    4741   grep -v '^ *+' conftest.er1 >conftest.err 
    4742   rm -f conftest.er1 
    4743   cat conftest.err >&5 
    4744   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3169  echo "$as_me:3169: \$? = $ac_status" >&5 
    47453170  (exit $ac_status); } >/dev/null; then 
    47463171  if test -s conftest.err; then 
    47473172    ac_cpp_err=$ac_c_preproc_warn_flag 
    4748     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    47493173  else 
    47503174    ac_cpp_err= 
     
    47543178fi 
    47553179if test -z "$ac_cpp_err"; then 
    4756   ac_header_preproc=yes 
    4757 else 
    4758   echo "$as_me: failed program was:" >&5 
    4759 sed 's/^/| /' conftest.$ac_ext >&5 
    4760  
    4761   ac_header_preproc=no 
     3180  ac_cv_header_errno_h=yes 
     3181else 
     3182  echo "$as_me: failed program was:" >&5 
     3183  cat conftest.$ac_ext >&5 
     3184  ac_cv_header_errno_h=no 
    47623185fi 
    47633186rm -f conftest.err conftest.$ac_ext 
    4764 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    4765 echo "${ECHO_T}$ac_header_preproc" >&6 
    4766  
    4767 # So?  What about this header? 
    4768 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    4769   yes:no: ) 
    4770     { echo "$as_me:$LINENO: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    4771 echo "$as_me: WARNING: errno.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    4772     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the compiler's result" >&5 
    4773 echo "$as_me: WARNING: errno.h: proceeding with the compiler's result" >&2;} 
    4774     ac_header_preproc=yes 
    4775     ;; 
    4776   no:yes:* ) 
    4777     { echo "$as_me:$LINENO: WARNING: errno.h: present but cannot be compiled" >&5 
    4778 echo "$as_me: WARNING: errno.h: present but cannot be compiled" >&2;} 
    4779     { echo "$as_me:$LINENO: WARNING: errno.h:     check for missing prerequisite headers?" >&5 
    4780 echo "$as_me: WARNING: errno.h:     check for missing prerequisite headers?" >&2;} 
    4781     { echo "$as_me:$LINENO: WARNING: errno.h: see the Autoconf documentation" >&5 
    4782 echo "$as_me: WARNING: errno.h: see the Autoconf documentation" >&2;} 
    4783     { echo "$as_me:$LINENO: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&5 
    4784 echo "$as_me: WARNING: errno.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    4785     { echo "$as_me:$LINENO: WARNING: errno.h: proceeding with the preprocessor's result" >&5 
    4786 echo "$as_me: WARNING: errno.h: proceeding with the preprocessor's result" >&2;} 
    4787     { echo "$as_me:$LINENO: WARNING: errno.h: in the future, the compiler will take precedence" >&5 
    4788 echo "$as_me: WARNING: errno.h: in the future, the compiler will take precedence" >&2;} 
    4789     ( 
    4790       cat <<\_ASBOX 
    4791 ## ------------------------------------ ## 
    4792 ## Report this to the pjproject lists.  ## 
    4793 ## ------------------------------------ ## 
    4794 _ASBOX 
    4795     ) | 
    4796       sed "s/^/$as_me: WARNING:     /" >&2 
    4797     ;; 
    4798 esac 
    4799 echo "$as_me:$LINENO: checking for errno.h" >&5 
    4800 echo $ECHO_N "checking for errno.h... $ECHO_C" >&6 
    4801 if test "${ac_cv_header_errno_h+set}" = set; then 
    4802   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4803 else 
    4804   ac_cv_header_errno_h=$ac_header_preproc 
    4805 fi 
    4806 echo "$as_me:$LINENO: result: $ac_cv_header_errno_h" >&5 
     3187fi 
     3188echo "$as_me:3188: result: $ac_cv_header_errno_h" >&5 
    48073189echo "${ECHO_T}$ac_cv_header_errno_h" >&6 
    4808  
    4809 fi 
    48103190if test $ac_cv_header_errno_h = yes; then 
    4811   cat >>confdefs.h <<\_ACEOF 
     3191  cat >>confdefs.h <<\EOF 
    48123192#define PJ_HAS_ERRNO_H 1 
    4813 _ACEOF 
    4814  
    4815 fi 
    4816  
     3193EOF 
     3194 
     3195fi 
    48173196 
    48183197        ;; 
    48193198esac 
    48203199 
    4821 if test "${ac_cv_header_linux_socket_h+set}" = set; then 
    4822   echo "$as_me:$LINENO: checking for linux/socket.h" >&5 
     3200echo "$as_me:3200: checking for linux/socket.h" >&5 
    48233201echo $ECHO_N "checking for linux/socket.h... $ECHO_C" >&6 
    48243202if test "${ac_cv_header_linux_socket_h+set}" = set; then 
    48253203  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4826 fi 
    4827 echo "$as_me:$LINENO: result: $ac_cv_header_linux_socket_h" >&5 
    4828 echo "${ECHO_T}$ac_cv_header_linux_socket_h" >&6 
    4829 else 
    4830   # Is the header compilable? 
    4831 echo "$as_me:$LINENO: checking linux/socket.h usability" >&5 
    4832 echo $ECHO_N "checking linux/socket.h usability... $ECHO_C" >&6 
    4833 cat >conftest.$ac_ext <<_ACEOF 
    4834 /* confdefs.h.  */ 
    4835 _ACEOF 
    4836 cat confdefs.h >>conftest.$ac_ext 
    4837 cat >>conftest.$ac_ext <<_ACEOF 
    4838 /* end confdefs.h.  */ 
    4839 $ac_includes_default 
     3204else 
     3205  cat >conftest.$ac_ext <<_ACEOF 
     3206#line 3206 "configure" 
     3207#include "confdefs.h" 
    48403208#include <linux/socket.h> 
    48413209_ACEOF 
    4842 rm -f conftest.$ac_objext 
    4843 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4844   (eval $ac_compile) 2>conftest.er1 
    4845   ac_status=$? 
    4846   grep -v '^ *+' conftest.er1 >conftest.err 
     3210if { (eval echo "$as_me:3210: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3211  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3212  ac_status=$? 
     3213  egrep -v '^ *\+' conftest.er1 >conftest.err 
    48473214  rm -f conftest.er1 
    48483215  cat conftest.err >&5 
    4849   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4850   (exit $ac_status); } && 
    4851          { ac_try='test -z "$ac_c_werror_flag" 
    4852                          || test ! -s conftest.err' 
    4853   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4854   (eval $ac_try) 2>&5 
    4855   ac_status=$? 
    4856   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4857   (exit $ac_status); }; } && 
    4858          { ac_try='test -s conftest.$ac_objext' 
    4859   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4860   (eval $ac_try) 2>&5 
    4861   ac_status=$? 
    4862   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4863   (exit $ac_status); }; }; then 
    4864   ac_header_compiler=yes 
    4865 else 
    4866   echo "$as_me: failed program was:" >&5 
    4867 sed 's/^/| /' conftest.$ac_ext >&5 
    4868  
    4869 ac_header_compiler=no 
    4870 fi 
    4871 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    4872 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    4873 echo "${ECHO_T}$ac_header_compiler" >&6 
    4874  
    4875 # Is the header present? 
    4876 echo "$as_me:$LINENO: checking linux/socket.h presence" >&5 
    4877 echo $ECHO_N "checking linux/socket.h presence... $ECHO_C" >&6 
    4878 cat >conftest.$ac_ext <<_ACEOF 
    4879 /* confdefs.h.  */ 
    4880 _ACEOF 
    4881 cat confdefs.h >>conftest.$ac_ext 
    4882 cat >>conftest.$ac_ext <<_ACEOF 
    4883 /* end confdefs.h.  */ 
    4884 #include <linux/socket.h> 
    4885 _ACEOF 
    4886 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    4887   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    4888   ac_status=$? 
    4889   grep -v '^ *+' conftest.er1 >conftest.err 
    4890   rm -f conftest.er1 
    4891   cat conftest.err >&5 
    4892   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3216  echo "$as_me:3216: \$? = $ac_status" >&5 
    48933217  (exit $ac_status); } >/dev/null; then 
    48943218  if test -s conftest.err; then 
    48953219    ac_cpp_err=$ac_c_preproc_warn_flag 
    4896     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    48973220  else 
    48983221    ac_cpp_err= 
     
    49023225fi 
    49033226if test -z "$ac_cpp_err"; then 
    4904   ac_header_preproc=yes 
    4905 else 
    4906   echo "$as_me: failed program was:" >&5 
    4907 sed 's/^/| /' conftest.$ac_ext >&5 
    4908  
    4909   ac_header_preproc=no 
     3227  ac_cv_header_linux_socket_h=yes 
     3228else 
     3229  echo "$as_me: failed program was:" >&5 
     3230  cat conftest.$ac_ext >&5 
     3231  ac_cv_header_linux_socket_h=no 
    49103232fi 
    49113233rm -f conftest.err conftest.$ac_ext 
    4912 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    4913 echo "${ECHO_T}$ac_header_preproc" >&6 
    4914  
    4915 # So?  What about this header? 
    4916 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    4917   yes:no: ) 
    4918     { echo "$as_me:$LINENO: WARNING: linux/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    4919 echo "$as_me: WARNING: linux/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    4920     { echo "$as_me:$LINENO: WARNING: linux/socket.h: proceeding with the compiler's result" >&5 
    4921 echo "$as_me: WARNING: linux/socket.h: proceeding with the compiler's result" >&2;} 
    4922     ac_header_preproc=yes 
    4923     ;; 
    4924   no:yes:* ) 
    4925     { echo "$as_me:$LINENO: WARNING: linux/socket.h: present but cannot be compiled" >&5 
    4926 echo "$as_me: WARNING: linux/socket.h: present but cannot be compiled" >&2;} 
    4927     { echo "$as_me:$LINENO: WARNING: linux/socket.h:     check for missing prerequisite headers?" >&5 
    4928 echo "$as_me: WARNING: linux/socket.h:     check for missing prerequisite headers?" >&2;} 
    4929     { echo "$as_me:$LINENO: WARNING: linux/socket.h: see the Autoconf documentation" >&5 
    4930 echo "$as_me: WARNING: linux/socket.h: see the Autoconf documentation" >&2;} 
    4931     { echo "$as_me:$LINENO: WARNING: linux/socket.h:     section \"Present But Cannot Be Compiled\"" >&5 
    4932 echo "$as_me: WARNING: linux/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    4933     { echo "$as_me:$LINENO: WARNING: linux/socket.h: proceeding with the preprocessor's result" >&5 
    4934 echo "$as_me: WARNING: linux/socket.h: proceeding with the preprocessor's result" >&2;} 
    4935     { echo "$as_me:$LINENO: WARNING: linux/socket.h: in the future, the compiler will take precedence" >&5 
    4936 echo "$as_me: WARNING: linux/socket.h: in the future, the compiler will take precedence" >&2;} 
    4937     ( 
    4938       cat <<\_ASBOX 
    4939 ## ------------------------------------ ## 
    4940 ## Report this to the pjproject lists.  ## 
    4941 ## ------------------------------------ ## 
    4942 _ASBOX 
    4943     ) | 
    4944       sed "s/^/$as_me: WARNING:     /" >&2 
    4945     ;; 
    4946 esac 
    4947 echo "$as_me:$LINENO: checking for linux/socket.h" >&5 
    4948 echo $ECHO_N "checking for linux/socket.h... $ECHO_C" >&6 
    4949 if test "${ac_cv_header_linux_socket_h+set}" = set; then 
    4950   echo $ECHO_N "(cached) $ECHO_C" >&6 
    4951 else 
    4952   ac_cv_header_linux_socket_h=$ac_header_preproc 
    4953 fi 
    4954 echo "$as_me:$LINENO: result: $ac_cv_header_linux_socket_h" >&5 
     3234fi 
     3235echo "$as_me:3235: result: $ac_cv_header_linux_socket_h" >&5 
    49553236echo "${ECHO_T}$ac_cv_header_linux_socket_h" >&6 
    4956  
    4957 fi 
    49583237if test $ac_cv_header_linux_socket_h = yes; then 
    4959   cat >>confdefs.h <<\_ACEOF 
     3238  cat >>confdefs.h <<\EOF 
    49603239#define PJ_HAS_LINUX_SOCKET_H 1 
    4961 _ACEOF 
    4962  
    4963 fi 
    4964  
    4965  
    4966 if test "${ac_cv_header_malloc_h+set}" = set; then 
    4967   echo "$as_me:$LINENO: checking for malloc.h" >&5 
     3240EOF 
     3241 
     3242fi 
     3243 
     3244echo "$as_me:3244: checking for malloc.h" >&5 
    49683245echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 
    49693246if test "${ac_cv_header_malloc_h+set}" = set; then 
    49703247  echo $ECHO_N "(cached) $ECHO_C" >&6 
    4971 fi 
    4972 echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 
    4973 echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 
    4974 else 
    4975   # Is the header compilable? 
    4976 echo "$as_me:$LINENO: checking malloc.h usability" >&5 
    4977 echo $ECHO_N "checking malloc.h usability... $ECHO_C" >&6 
    4978 cat >conftest.$ac_ext <<_ACEOF 
    4979 /* confdefs.h.  */ 
    4980 _ACEOF 
    4981 cat confdefs.h >>conftest.$ac_ext 
    4982 cat >>conftest.$ac_ext <<_ACEOF 
    4983 /* end confdefs.h.  */ 
    4984 $ac_includes_default 
     3248else 
     3249  cat >conftest.$ac_ext <<_ACEOF 
     3250#line 3250 "configure" 
     3251#include "confdefs.h" 
    49853252#include <malloc.h> 
    49863253_ACEOF 
    4987 rm -f conftest.$ac_objext 
    4988 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    4989   (eval $ac_compile) 2>conftest.er1 
    4990   ac_status=$? 
    4991   grep -v '^ *+' conftest.er1 >conftest.err 
     3254if { (eval echo "$as_me:3254: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3255  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3256  ac_status=$? 
     3257  egrep -v '^ *\+' conftest.er1 >conftest.err 
    49923258  rm -f conftest.er1 
    49933259  cat conftest.err >&5 
    4994   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    4995   (exit $ac_status); } && 
    4996          { ac_try='test -z "$ac_c_werror_flag" 
    4997                          || test ! -s conftest.err' 
    4998   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    4999   (eval $ac_try) 2>&5 
    5000   ac_status=$? 
    5001   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5002   (exit $ac_status); }; } && 
    5003          { ac_try='test -s conftest.$ac_objext' 
    5004   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5005   (eval $ac_try) 2>&5 
    5006   ac_status=$? 
    5007   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5008   (exit $ac_status); }; }; then 
    5009   ac_header_compiler=yes 
    5010 else 
    5011   echo "$as_me: failed program was:" >&5 
    5012 sed 's/^/| /' conftest.$ac_ext >&5 
    5013  
    5014 ac_header_compiler=no 
    5015 fi 
    5016 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5017 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5018 echo "${ECHO_T}$ac_header_compiler" >&6 
    5019  
    5020 # Is the header present? 
    5021 echo "$as_me:$LINENO: checking malloc.h presence" >&5 
    5022 echo $ECHO_N "checking malloc.h presence... $ECHO_C" >&6 
    5023 cat >conftest.$ac_ext <<_ACEOF 
    5024 /* confdefs.h.  */ 
    5025 _ACEOF 
    5026 cat confdefs.h >>conftest.$ac_ext 
    5027 cat >>conftest.$ac_ext <<_ACEOF 
    5028 /* end confdefs.h.  */ 
    5029 #include <malloc.h> 
    5030 _ACEOF 
    5031 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5032   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5033   ac_status=$? 
    5034   grep -v '^ *+' conftest.er1 >conftest.err 
    5035   rm -f conftest.er1 
    5036   cat conftest.err >&5 
    5037   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3260  echo "$as_me:3260: \$? = $ac_status" >&5 
    50383261  (exit $ac_status); } >/dev/null; then 
    50393262  if test -s conftest.err; then 
    50403263    ac_cpp_err=$ac_c_preproc_warn_flag 
    5041     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    50423264  else 
    50433265    ac_cpp_err= 
     
    50473269fi 
    50483270if test -z "$ac_cpp_err"; then 
    5049   ac_header_preproc=yes 
    5050 else 
    5051   echo "$as_me: failed program was:" >&5 
    5052 sed 's/^/| /' conftest.$ac_ext >&5 
    5053  
    5054   ac_header_preproc=no 
     3271  ac_cv_header_malloc_h=yes 
     3272else 
     3273  echo "$as_me: failed program was:" >&5 
     3274  cat conftest.$ac_ext >&5 
     3275  ac_cv_header_malloc_h=no 
    50553276fi 
    50563277rm -f conftest.err conftest.$ac_ext 
    5057 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5058 echo "${ECHO_T}$ac_header_preproc" >&6 
    5059  
    5060 # So?  What about this header? 
    5061 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5062   yes:no: ) 
    5063     { echo "$as_me:$LINENO: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5064 echo "$as_me: WARNING: malloc.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5065     { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the compiler's result" >&5 
    5066 echo "$as_me: WARNING: malloc.h: proceeding with the compiler's result" >&2;} 
    5067     ac_header_preproc=yes 
    5068     ;; 
    5069   no:yes:* ) 
    5070     { echo "$as_me:$LINENO: WARNING: malloc.h: present but cannot be compiled" >&5 
    5071 echo "$as_me: WARNING: malloc.h: present but cannot be compiled" >&2;} 
    5072     { echo "$as_me:$LINENO: WARNING: malloc.h:     check for missing prerequisite headers?" >&5 
    5073 echo "$as_me: WARNING: malloc.h:     check for missing prerequisite headers?" >&2;} 
    5074     { echo "$as_me:$LINENO: WARNING: malloc.h: see the Autoconf documentation" >&5 
    5075 echo "$as_me: WARNING: malloc.h: see the Autoconf documentation" >&2;} 
    5076     { echo "$as_me:$LINENO: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5077 echo "$as_me: WARNING: malloc.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5078     { echo "$as_me:$LINENO: WARNING: malloc.h: proceeding with the preprocessor's result" >&5 
    5079 echo "$as_me: WARNING: malloc.h: proceeding with the preprocessor's result" >&2;} 
    5080     { echo "$as_me:$LINENO: WARNING: malloc.h: in the future, the compiler will take precedence" >&5 
    5081 echo "$as_me: WARNING: malloc.h: in the future, the compiler will take precedence" >&2;} 
    5082     ( 
    5083       cat <<\_ASBOX 
    5084 ## ------------------------------------ ## 
    5085 ## Report this to the pjproject lists.  ## 
    5086 ## ------------------------------------ ## 
    5087 _ASBOX 
    5088     ) | 
    5089       sed "s/^/$as_me: WARNING:     /" >&2 
    5090     ;; 
    5091 esac 
    5092 echo "$as_me:$LINENO: checking for malloc.h" >&5 
    5093 echo $ECHO_N "checking for malloc.h... $ECHO_C" >&6 
    5094 if test "${ac_cv_header_malloc_h+set}" = set; then 
    5095   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5096 else 
    5097   ac_cv_header_malloc_h=$ac_header_preproc 
    5098 fi 
    5099 echo "$as_me:$LINENO: result: $ac_cv_header_malloc_h" >&5 
     3278fi 
     3279echo "$as_me:3279: result: $ac_cv_header_malloc_h" >&5 
    51003280echo "${ECHO_T}$ac_cv_header_malloc_h" >&6 
    5101  
    5102 fi 
    51033281if test $ac_cv_header_malloc_h = yes; then 
    5104   cat >>confdefs.h <<\_ACEOF 
     3282  cat >>confdefs.h <<\EOF 
    51053283#define PJ_HAS_MALLOC_H 1 
    5106 _ACEOF 
    5107  
    5108 fi 
    5109  
    5110  
    5111 if test "${ac_cv_header_netdb_h+set}" = set; then 
    5112   echo "$as_me:$LINENO: checking for netdb.h" >&5 
     3284EOF 
     3285 
     3286fi 
     3287 
     3288echo "$as_me:3288: checking for netdb.h" >&5 
    51133289echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 
    51143290if test "${ac_cv_header_netdb_h+set}" = set; then 
    51153291  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5116 fi 
    5117 echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 
    5118 echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 
    5119 else 
    5120   # Is the header compilable? 
    5121 echo "$as_me:$LINENO: checking netdb.h usability" >&5 
    5122 echo $ECHO_N "checking netdb.h usability... $ECHO_C" >&6 
    5123 cat >conftest.$ac_ext <<_ACEOF 
    5124 /* confdefs.h.  */ 
    5125 _ACEOF 
    5126 cat confdefs.h >>conftest.$ac_ext 
    5127 cat >>conftest.$ac_ext <<_ACEOF 
    5128 /* end confdefs.h.  */ 
    5129 $ac_includes_default 
     3292else 
     3293  cat >conftest.$ac_ext <<_ACEOF 
     3294#line 3294 "configure" 
     3295#include "confdefs.h" 
    51303296#include <netdb.h> 
    51313297_ACEOF 
    5132 rm -f conftest.$ac_objext 
    5133 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5134   (eval $ac_compile) 2>conftest.er1 
    5135   ac_status=$? 
    5136   grep -v '^ *+' conftest.er1 >conftest.err 
     3298if { (eval echo "$as_me:3298: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3299  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3300  ac_status=$? 
     3301  egrep -v '^ *\+' conftest.er1 >conftest.err 
    51373302  rm -f conftest.er1 
    51383303  cat conftest.err >&5 
    5139   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5140   (exit $ac_status); } && 
    5141          { ac_try='test -z "$ac_c_werror_flag" 
    5142                          || test ! -s conftest.err' 
    5143   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5144   (eval $ac_try) 2>&5 
    5145   ac_status=$? 
    5146   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5147   (exit $ac_status); }; } && 
    5148          { ac_try='test -s conftest.$ac_objext' 
    5149   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5150   (eval $ac_try) 2>&5 
    5151   ac_status=$? 
    5152   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5153   (exit $ac_status); }; }; then 
    5154   ac_header_compiler=yes 
    5155 else 
    5156   echo "$as_me: failed program was:" >&5 
    5157 sed 's/^/| /' conftest.$ac_ext >&5 
    5158  
    5159 ac_header_compiler=no 
    5160 fi 
    5161 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5162 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5163 echo "${ECHO_T}$ac_header_compiler" >&6 
    5164  
    5165 # Is the header present? 
    5166 echo "$as_me:$LINENO: checking netdb.h presence" >&5 
    5167 echo $ECHO_N "checking netdb.h presence... $ECHO_C" >&6 
    5168 cat >conftest.$ac_ext <<_ACEOF 
    5169 /* confdefs.h.  */ 
    5170 _ACEOF 
    5171 cat confdefs.h >>conftest.$ac_ext 
    5172 cat >>conftest.$ac_ext <<_ACEOF 
    5173 /* end confdefs.h.  */ 
    5174 #include <netdb.h> 
    5175 _ACEOF 
    5176 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5177   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5178   ac_status=$? 
    5179   grep -v '^ *+' conftest.er1 >conftest.err 
    5180   rm -f conftest.er1 
    5181   cat conftest.err >&5 
    5182   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3304  echo "$as_me:3304: \$? = $ac_status" >&5 
    51833305  (exit $ac_status); } >/dev/null; then 
    51843306  if test -s conftest.err; then 
    51853307    ac_cpp_err=$ac_c_preproc_warn_flag 
    5186     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    51873308  else 
    51883309    ac_cpp_err= 
     
    51923313fi 
    51933314if test -z "$ac_cpp_err"; then 
    5194   ac_header_preproc=yes 
    5195 else 
    5196   echo "$as_me: failed program was:" >&5 
    5197 sed 's/^/| /' conftest.$ac_ext >&5 
    5198  
    5199   ac_header_preproc=no 
     3315  ac_cv_header_netdb_h=yes 
     3316else 
     3317  echo "$as_me: failed program was:" >&5 
     3318  cat conftest.$ac_ext >&5 
     3319  ac_cv_header_netdb_h=no 
    52003320fi 
    52013321rm -f conftest.err conftest.$ac_ext 
    5202 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5203 echo "${ECHO_T}$ac_header_preproc" >&6 
    5204  
    5205 # So?  What about this header? 
    5206 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5207   yes:no: ) 
    5208     { echo "$as_me:$LINENO: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5209 echo "$as_me: WARNING: netdb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5210     { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the compiler's result" >&5 
    5211 echo "$as_me: WARNING: netdb.h: proceeding with the compiler's result" >&2;} 
    5212     ac_header_preproc=yes 
    5213     ;; 
    5214   no:yes:* ) 
    5215     { echo "$as_me:$LINENO: WARNING: netdb.h: present but cannot be compiled" >&5 
    5216 echo "$as_me: WARNING: netdb.h: present but cannot be compiled" >&2;} 
    5217     { echo "$as_me:$LINENO: WARNING: netdb.h:     check for missing prerequisite headers?" >&5 
    5218 echo "$as_me: WARNING: netdb.h:     check for missing prerequisite headers?" >&2;} 
    5219     { echo "$as_me:$LINENO: WARNING: netdb.h: see the Autoconf documentation" >&5 
    5220 echo "$as_me: WARNING: netdb.h: see the Autoconf documentation" >&2;} 
    5221     { echo "$as_me:$LINENO: WARNING: netdb.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5222 echo "$as_me: WARNING: netdb.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5223     { echo "$as_me:$LINENO: WARNING: netdb.h: proceeding with the preprocessor's result" >&5 
    5224 echo "$as_me: WARNING: netdb.h: proceeding with the preprocessor's result" >&2;} 
    5225     { echo "$as_me:$LINENO: WARNING: netdb.h: in the future, the compiler will take precedence" >&5 
    5226 echo "$as_me: WARNING: netdb.h: in the future, the compiler will take precedence" >&2;} 
    5227     ( 
    5228       cat <<\_ASBOX 
    5229 ## ------------------------------------ ## 
    5230 ## Report this to the pjproject lists.  ## 
    5231 ## ------------------------------------ ## 
    5232 _ASBOX 
    5233     ) | 
    5234       sed "s/^/$as_me: WARNING:     /" >&2 
    5235     ;; 
    5236 esac 
    5237 echo "$as_me:$LINENO: checking for netdb.h" >&5 
    5238 echo $ECHO_N "checking for netdb.h... $ECHO_C" >&6 
    5239 if test "${ac_cv_header_netdb_h+set}" = set; then 
    5240   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5241 else 
    5242   ac_cv_header_netdb_h=$ac_header_preproc 
    5243 fi 
    5244 echo "$as_me:$LINENO: result: $ac_cv_header_netdb_h" >&5 
     3322fi 
     3323echo "$as_me:3323: result: $ac_cv_header_netdb_h" >&5 
    52453324echo "${ECHO_T}$ac_cv_header_netdb_h" >&6 
    5246  
    5247 fi 
    52483325if test $ac_cv_header_netdb_h = yes; then 
    5249   cat >>confdefs.h <<\_ACEOF 
     3326  cat >>confdefs.h <<\EOF 
    52503327#define PJ_HAS_NETDB_H 1 
    5251 _ACEOF 
    5252  
    5253 fi 
    5254  
    5255  
    5256 if test "${ac_cv_header_netinet_in_h+set}" = set; then 
    5257   echo "$as_me:$LINENO: checking for netinet/in.h" >&5 
     3328EOF 
     3329 
     3330fi 
     3331 
     3332echo "$as_me:3332: checking for netinet/in.h" >&5 
    52583333echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6 
    52593334if test "${ac_cv_header_netinet_in_h+set}" = set; then 
    52603335  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5261 fi 
    5262 echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5 
    5263 echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6 
    5264 else 
    5265   # Is the header compilable? 
    5266 echo "$as_me:$LINENO: checking netinet/in.h usability" >&5 
    5267 echo $ECHO_N "checking netinet/in.h usability... $ECHO_C" >&6 
    5268 cat >conftest.$ac_ext <<_ACEOF 
    5269 /* confdefs.h.  */ 
    5270 _ACEOF 
    5271 cat confdefs.h >>conftest.$ac_ext 
    5272 cat >>conftest.$ac_ext <<_ACEOF 
    5273 /* end confdefs.h.  */ 
    5274 $ac_includes_default 
     3336else 
     3337  cat >conftest.$ac_ext <<_ACEOF 
     3338#line 3338 "configure" 
     3339#include "confdefs.h" 
    52753340#include <netinet/in.h> 
    52763341_ACEOF 
    5277 rm -f conftest.$ac_objext 
    5278 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5279   (eval $ac_compile) 2>conftest.er1 
    5280   ac_status=$? 
    5281   grep -v '^ *+' conftest.er1 >conftest.err 
     3342if { (eval echo "$as_me:3342: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3343  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3344  ac_status=$? 
     3345  egrep -v '^ *\+' conftest.er1 >conftest.err 
    52823346  rm -f conftest.er1 
    52833347  cat conftest.err >&5 
    5284   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5285   (exit $ac_status); } && 
    5286          { ac_try='test -z "$ac_c_werror_flag" 
    5287                          || test ! -s conftest.err' 
    5288   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5289   (eval $ac_try) 2>&5 
    5290   ac_status=$? 
    5291   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5292   (exit $ac_status); }; } && 
    5293          { ac_try='test -s conftest.$ac_objext' 
    5294   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5295   (eval $ac_try) 2>&5 
    5296   ac_status=$? 
    5297   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5298   (exit $ac_status); }; }; then 
    5299   ac_header_compiler=yes 
    5300 else 
    5301   echo "$as_me: failed program was:" >&5 
    5302 sed 's/^/| /' conftest.$ac_ext >&5 
    5303  
    5304 ac_header_compiler=no 
    5305 fi 
    5306 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5307 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5308 echo "${ECHO_T}$ac_header_compiler" >&6 
    5309  
    5310 # Is the header present? 
    5311 echo "$as_me:$LINENO: checking netinet/in.h presence" >&5 
    5312 echo $ECHO_N "checking netinet/in.h presence... $ECHO_C" >&6 
    5313 cat >conftest.$ac_ext <<_ACEOF 
    5314 /* confdefs.h.  */ 
    5315 _ACEOF 
    5316 cat confdefs.h >>conftest.$ac_ext 
    5317 cat >>conftest.$ac_ext <<_ACEOF 
    5318 /* end confdefs.h.  */ 
    5319 #include <netinet/in.h> 
    5320 _ACEOF 
    5321 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5322   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5323   ac_status=$? 
    5324   grep -v '^ *+' conftest.er1 >conftest.err 
    5325   rm -f conftest.er1 
    5326   cat conftest.err >&5 
    5327   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3348  echo "$as_me:3348: \$? = $ac_status" >&5 
    53283349  (exit $ac_status); } >/dev/null; then 
    53293350  if test -s conftest.err; then 
    53303351    ac_cpp_err=$ac_c_preproc_warn_flag 
    5331     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    53323352  else 
    53333353    ac_cpp_err= 
     
    53373357fi 
    53383358if test -z "$ac_cpp_err"; then 
    5339   ac_header_preproc=yes 
    5340 else 
    5341   echo "$as_me: failed program was:" >&5 
    5342 sed 's/^/| /' conftest.$ac_ext >&5 
    5343  
    5344   ac_header_preproc=no 
     3359  ac_cv_header_netinet_in_h=yes 
     3360else 
     3361  echo "$as_me: failed program was:" >&5 
     3362  cat conftest.$ac_ext >&5 
     3363  ac_cv_header_netinet_in_h=no 
    53453364fi 
    53463365rm -f conftest.err conftest.$ac_ext 
    5347 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5348 echo "${ECHO_T}$ac_header_preproc" >&6 
    5349  
    5350 # So?  What about this header? 
    5351 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5352   yes:no: ) 
    5353     { echo "$as_me:$LINENO: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5354 echo "$as_me: WARNING: netinet/in.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5355     { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the compiler's result" >&5 
    5356 echo "$as_me: WARNING: netinet/in.h: proceeding with the compiler's result" >&2;} 
    5357     ac_header_preproc=yes 
    5358     ;; 
    5359   no:yes:* ) 
    5360     { echo "$as_me:$LINENO: WARNING: netinet/in.h: present but cannot be compiled" >&5 
    5361 echo "$as_me: WARNING: netinet/in.h: present but cannot be compiled" >&2;} 
    5362     { echo "$as_me:$LINENO: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&5 
    5363 echo "$as_me: WARNING: netinet/in.h:     check for missing prerequisite headers?" >&2;} 
    5364     { echo "$as_me:$LINENO: WARNING: netinet/in.h: see the Autoconf documentation" >&5 
    5365 echo "$as_me: WARNING: netinet/in.h: see the Autoconf documentation" >&2;} 
    5366     { echo "$as_me:$LINENO: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5367 echo "$as_me: WARNING: netinet/in.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5368     { echo "$as_me:$LINENO: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&5 
    5369 echo "$as_me: WARNING: netinet/in.h: proceeding with the preprocessor's result" >&2;} 
    5370     { echo "$as_me:$LINENO: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&5 
    5371 echo "$as_me: WARNING: netinet/in.h: in the future, the compiler will take precedence" >&2;} 
    5372     ( 
    5373       cat <<\_ASBOX 
    5374 ## ------------------------------------ ## 
    5375 ## Report this to the pjproject lists.  ## 
    5376 ## ------------------------------------ ## 
    5377 _ASBOX 
    5378     ) | 
    5379       sed "s/^/$as_me: WARNING:     /" >&2 
    5380     ;; 
    5381 esac 
    5382 echo "$as_me:$LINENO: checking for netinet/in.h" >&5 
    5383 echo $ECHO_N "checking for netinet/in.h... $ECHO_C" >&6 
    5384 if test "${ac_cv_header_netinet_in_h+set}" = set; then 
    5385   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5386 else 
    5387   ac_cv_header_netinet_in_h=$ac_header_preproc 
    5388 fi 
    5389 echo "$as_me:$LINENO: result: $ac_cv_header_netinet_in_h" >&5 
     3366fi 
     3367echo "$as_me:3367: result: $ac_cv_header_netinet_in_h" >&5 
    53903368echo "${ECHO_T}$ac_cv_header_netinet_in_h" >&6 
    5391  
    5392 fi 
    53933369if test $ac_cv_header_netinet_in_h = yes; then 
    5394   cat >>confdefs.h <<\_ACEOF 
     3370  cat >>confdefs.h <<\EOF 
    53953371#define PJ_HAS_NETINET_IN_H 1 
    5396 _ACEOF 
    5397  
    5398 fi 
    5399  
    5400  
    5401 if test "${ac_cv_header_setjmp_h+set}" = set; then 
    5402   echo "$as_me:$LINENO: checking for setjmp.h" >&5 
     3372EOF 
     3373 
     3374fi 
     3375 
     3376echo "$as_me:3376: checking for setjmp.h" >&5 
    54033377echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6 
    54043378if test "${ac_cv_header_setjmp_h+set}" = set; then 
    54053379  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5406 fi 
    5407 echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5 
    5408 echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6 
    5409 else 
    5410   # Is the header compilable? 
    5411 echo "$as_me:$LINENO: checking setjmp.h usability" >&5 
    5412 echo $ECHO_N "checking setjmp.h usability... $ECHO_C" >&6 
    5413 cat >conftest.$ac_ext <<_ACEOF 
    5414 /* confdefs.h.  */ 
    5415 _ACEOF 
    5416 cat confdefs.h >>conftest.$ac_ext 
    5417 cat >>conftest.$ac_ext <<_ACEOF 
    5418 /* end confdefs.h.  */ 
    5419 $ac_includes_default 
     3380else 
     3381  cat >conftest.$ac_ext <<_ACEOF 
     3382#line 3382 "configure" 
     3383#include "confdefs.h" 
    54203384#include <setjmp.h> 
    54213385_ACEOF 
    5422 rm -f conftest.$ac_objext 
    5423 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5424   (eval $ac_compile) 2>conftest.er1 
    5425   ac_status=$? 
    5426   grep -v '^ *+' conftest.er1 >conftest.err 
     3386if { (eval echo "$as_me:3386: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3387  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3388  ac_status=$? 
     3389  egrep -v '^ *\+' conftest.er1 >conftest.err 
    54273390  rm -f conftest.er1 
    54283391  cat conftest.err >&5 
    5429   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5430   (exit $ac_status); } && 
    5431          { ac_try='test -z "$ac_c_werror_flag" 
    5432                          || test ! -s conftest.err' 
    5433   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5434   (eval $ac_try) 2>&5 
    5435   ac_status=$? 
    5436   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5437   (exit $ac_status); }; } && 
    5438          { ac_try='test -s conftest.$ac_objext' 
    5439   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5440   (eval $ac_try) 2>&5 
    5441   ac_status=$? 
    5442   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5443   (exit $ac_status); }; }; then 
    5444   ac_header_compiler=yes 
    5445 else 
    5446   echo "$as_me: failed program was:" >&5 
    5447 sed 's/^/| /' conftest.$ac_ext >&5 
    5448  
    5449 ac_header_compiler=no 
    5450 fi 
    5451 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5452 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5453 echo "${ECHO_T}$ac_header_compiler" >&6 
    5454  
    5455 # Is the header present? 
    5456 echo "$as_me:$LINENO: checking setjmp.h presence" >&5 
    5457 echo $ECHO_N "checking setjmp.h presence... $ECHO_C" >&6 
    5458 cat >conftest.$ac_ext <<_ACEOF 
    5459 /* confdefs.h.  */ 
    5460 _ACEOF 
    5461 cat confdefs.h >>conftest.$ac_ext 
    5462 cat >>conftest.$ac_ext <<_ACEOF 
    5463 /* end confdefs.h.  */ 
    5464 #include <setjmp.h> 
    5465 _ACEOF 
    5466 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5468   ac_status=$? 
    5469   grep -v '^ *+' conftest.er1 >conftest.err 
    5470   rm -f conftest.er1 
    5471   cat conftest.err >&5 
    5472   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3392  echo "$as_me:3392: \$? = $ac_status" >&5 
    54733393  (exit $ac_status); } >/dev/null; then 
    54743394  if test -s conftest.err; then 
    54753395    ac_cpp_err=$ac_c_preproc_warn_flag 
    5476     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    54773396  else 
    54783397    ac_cpp_err= 
     
    54823401fi 
    54833402if test -z "$ac_cpp_err"; then 
    5484   ac_header_preproc=yes 
    5485 else 
    5486   echo "$as_me: failed program was:" >&5 
    5487 sed 's/^/| /' conftest.$ac_ext >&5 
    5488  
    5489   ac_header_preproc=no 
     3403  ac_cv_header_setjmp_h=yes 
     3404else 
     3405  echo "$as_me: failed program was:" >&5 
     3406  cat conftest.$ac_ext >&5 
     3407  ac_cv_header_setjmp_h=no 
    54903408fi 
    54913409rm -f conftest.err conftest.$ac_ext 
    5492 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5493 echo "${ECHO_T}$ac_header_preproc" >&6 
    5494  
    5495 # So?  What about this header? 
    5496 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5497   yes:no: ) 
    5498     { echo "$as_me:$LINENO: WARNING: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5499 echo "$as_me: WARNING: setjmp.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5500     { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the compiler's result" >&5 
    5501 echo "$as_me: WARNING: setjmp.h: proceeding with the compiler's result" >&2;} 
    5502     ac_header_preproc=yes 
    5503     ;; 
    5504   no:yes:* ) 
    5505     { echo "$as_me:$LINENO: WARNING: setjmp.h: present but cannot be compiled" >&5 
    5506 echo "$as_me: WARNING: setjmp.h: present but cannot be compiled" >&2;} 
    5507     { echo "$as_me:$LINENO: WARNING: setjmp.h:     check for missing prerequisite headers?" >&5 
    5508 echo "$as_me: WARNING: setjmp.h:     check for missing prerequisite headers?" >&2;} 
    5509     { echo "$as_me:$LINENO: WARNING: setjmp.h: see the Autoconf documentation" >&5 
    5510 echo "$as_me: WARNING: setjmp.h: see the Autoconf documentation" >&2;} 
    5511     { echo "$as_me:$LINENO: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5512 echo "$as_me: WARNING: setjmp.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5513     { echo "$as_me:$LINENO: WARNING: setjmp.h: proceeding with the preprocessor's result" >&5 
    5514 echo "$as_me: WARNING: setjmp.h: proceeding with the preprocessor's result" >&2;} 
    5515     { echo "$as_me:$LINENO: WARNING: setjmp.h: in the future, the compiler will take precedence" >&5 
    5516 echo "$as_me: WARNING: setjmp.h: in the future, the compiler will take precedence" >&2;} 
    5517     ( 
    5518       cat <<\_ASBOX 
    5519 ## ------------------------------------ ## 
    5520 ## Report this to the pjproject lists.  ## 
    5521 ## ------------------------------------ ## 
    5522 _ASBOX 
    5523     ) | 
    5524       sed "s/^/$as_me: WARNING:     /" >&2 
    5525     ;; 
    5526 esac 
    5527 echo "$as_me:$LINENO: checking for setjmp.h" >&5 
    5528 echo $ECHO_N "checking for setjmp.h... $ECHO_C" >&6 
    5529 if test "${ac_cv_header_setjmp_h+set}" = set; then 
    5530   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5531 else 
    5532   ac_cv_header_setjmp_h=$ac_header_preproc 
    5533 fi 
    5534 echo "$as_me:$LINENO: result: $ac_cv_header_setjmp_h" >&5 
     3410fi 
     3411echo "$as_me:3411: result: $ac_cv_header_setjmp_h" >&5 
    55353412echo "${ECHO_T}$ac_cv_header_setjmp_h" >&6 
    5536  
    5537 fi 
    55383413if test $ac_cv_header_setjmp_h = yes; then 
    5539   cat >>confdefs.h <<\_ACEOF 
     3414  cat >>confdefs.h <<\EOF 
    55403415#define PJ_HAS_SETJMP_H 1 
    5541 _ACEOF 
    5542  
    5543 fi 
    5544  
    5545  
    5546 if test "${ac_cv_header_stdarg_h+set}" = set; then 
    5547   echo "$as_me:$LINENO: checking for stdarg.h" >&5 
     3416EOF 
     3417 
     3418fi 
     3419 
     3420echo "$as_me:3420: checking for stdarg.h" >&5 
    55483421echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 
    55493422if test "${ac_cv_header_stdarg_h+set}" = set; then 
    55503423  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5551 fi 
    5552 echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 
    5553 echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 
    5554 else 
    5555   # Is the header compilable? 
    5556 echo "$as_me:$LINENO: checking stdarg.h usability" >&5 
    5557 echo $ECHO_N "checking stdarg.h usability... $ECHO_C" >&6 
    5558 cat >conftest.$ac_ext <<_ACEOF 
    5559 /* confdefs.h.  */ 
    5560 _ACEOF 
    5561 cat confdefs.h >>conftest.$ac_ext 
    5562 cat >>conftest.$ac_ext <<_ACEOF 
    5563 /* end confdefs.h.  */ 
    5564 $ac_includes_default 
     3424else 
     3425  cat >conftest.$ac_ext <<_ACEOF 
     3426#line 3426 "configure" 
     3427#include "confdefs.h" 
    55653428#include <stdarg.h> 
    55663429_ACEOF 
    5567 rm -f conftest.$ac_objext 
    5568 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5569   (eval $ac_compile) 2>conftest.er1 
    5570   ac_status=$? 
    5571   grep -v '^ *+' conftest.er1 >conftest.err 
     3430if { (eval echo "$as_me:3430: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3431  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3432  ac_status=$? 
     3433  egrep -v '^ *\+' conftest.er1 >conftest.err 
    55723434  rm -f conftest.er1 
    55733435  cat conftest.err >&5 
    5574   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5575   (exit $ac_status); } && 
    5576          { ac_try='test -z "$ac_c_werror_flag" 
    5577                          || test ! -s conftest.err' 
    5578   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5579   (eval $ac_try) 2>&5 
    5580   ac_status=$? 
    5581   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5582   (exit $ac_status); }; } && 
    5583          { ac_try='test -s conftest.$ac_objext' 
    5584   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5585   (eval $ac_try) 2>&5 
    5586   ac_status=$? 
    5587   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5588   (exit $ac_status); }; }; then 
    5589   ac_header_compiler=yes 
    5590 else 
    5591   echo "$as_me: failed program was:" >&5 
    5592 sed 's/^/| /' conftest.$ac_ext >&5 
    5593  
    5594 ac_header_compiler=no 
    5595 fi 
    5596 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5597 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5598 echo "${ECHO_T}$ac_header_compiler" >&6 
    5599  
    5600 # Is the header present? 
    5601 echo "$as_me:$LINENO: checking stdarg.h presence" >&5 
    5602 echo $ECHO_N "checking stdarg.h presence... $ECHO_C" >&6 
    5603 cat >conftest.$ac_ext <<_ACEOF 
    5604 /* confdefs.h.  */ 
    5605 _ACEOF 
    5606 cat confdefs.h >>conftest.$ac_ext 
    5607 cat >>conftest.$ac_ext <<_ACEOF 
    5608 /* end confdefs.h.  */ 
    5609 #include <stdarg.h> 
    5610 _ACEOF 
    5611 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5612   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5613   ac_status=$? 
    5614   grep -v '^ *+' conftest.er1 >conftest.err 
    5615   rm -f conftest.er1 
    5616   cat conftest.err >&5 
    5617   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3436  echo "$as_me:3436: \$? = $ac_status" >&5 
    56183437  (exit $ac_status); } >/dev/null; then 
    56193438  if test -s conftest.err; then 
    56203439    ac_cpp_err=$ac_c_preproc_warn_flag 
    5621     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    56223440  else 
    56233441    ac_cpp_err= 
     
    56273445fi 
    56283446if test -z "$ac_cpp_err"; then 
    5629   ac_header_preproc=yes 
    5630 else 
    5631   echo "$as_me: failed program was:" >&5 
    5632 sed 's/^/| /' conftest.$ac_ext >&5 
    5633  
    5634   ac_header_preproc=no 
     3447  ac_cv_header_stdarg_h=yes 
     3448else 
     3449  echo "$as_me: failed program was:" >&5 
     3450  cat conftest.$ac_ext >&5 
     3451  ac_cv_header_stdarg_h=no 
    56353452fi 
    56363453rm -f conftest.err conftest.$ac_ext 
    5637 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5638 echo "${ECHO_T}$ac_header_preproc" >&6 
    5639  
    5640 # So?  What about this header? 
    5641 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5642   yes:no: ) 
    5643     { echo "$as_me:$LINENO: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5644 echo "$as_me: WARNING: stdarg.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5645     { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the compiler's result" >&5 
    5646 echo "$as_me: WARNING: stdarg.h: proceeding with the compiler's result" >&2;} 
    5647     ac_header_preproc=yes 
    5648     ;; 
    5649   no:yes:* ) 
    5650     { echo "$as_me:$LINENO: WARNING: stdarg.h: present but cannot be compiled" >&5 
    5651 echo "$as_me: WARNING: stdarg.h: present but cannot be compiled" >&2;} 
    5652     { echo "$as_me:$LINENO: WARNING: stdarg.h:     check for missing prerequisite headers?" >&5 
    5653 echo "$as_me: WARNING: stdarg.h:     check for missing prerequisite headers?" >&2;} 
    5654     { echo "$as_me:$LINENO: WARNING: stdarg.h: see the Autoconf documentation" >&5 
    5655 echo "$as_me: WARNING: stdarg.h: see the Autoconf documentation" >&2;} 
    5656     { echo "$as_me:$LINENO: WARNING: stdarg.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5657 echo "$as_me: WARNING: stdarg.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5658     { echo "$as_me:$LINENO: WARNING: stdarg.h: proceeding with the preprocessor's result" >&5 
    5659 echo "$as_me: WARNING: stdarg.h: proceeding with the preprocessor's result" >&2;} 
    5660     { echo "$as_me:$LINENO: WARNING: stdarg.h: in the future, the compiler will take precedence" >&5 
    5661 echo "$as_me: WARNING: stdarg.h: in the future, the compiler will take precedence" >&2;} 
    5662     ( 
    5663       cat <<\_ASBOX 
    5664 ## ------------------------------------ ## 
    5665 ## Report this to the pjproject lists.  ## 
    5666 ## ------------------------------------ ## 
    5667 _ASBOX 
    5668     ) | 
    5669       sed "s/^/$as_me: WARNING:     /" >&2 
    5670     ;; 
    5671 esac 
    5672 echo "$as_me:$LINENO: checking for stdarg.h" >&5 
    5673 echo $ECHO_N "checking for stdarg.h... $ECHO_C" >&6 
    5674 if test "${ac_cv_header_stdarg_h+set}" = set; then 
    5675   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5676 else 
    5677   ac_cv_header_stdarg_h=$ac_header_preproc 
    5678 fi 
    5679 echo "$as_me:$LINENO: result: $ac_cv_header_stdarg_h" >&5 
     3454fi 
     3455echo "$as_me:3455: result: $ac_cv_header_stdarg_h" >&5 
    56803456echo "${ECHO_T}$ac_cv_header_stdarg_h" >&6 
    5681  
    5682 fi 
    56833457if test $ac_cv_header_stdarg_h = yes; then 
    5684   cat >>confdefs.h <<\_ACEOF 
     3458  cat >>confdefs.h <<\EOF 
    56853459#define PJ_HAS_STDARG_H 1 
    5686 _ACEOF 
    5687  
    5688 fi 
    5689  
    5690  
    5691 if test "${ac_cv_header_stddef_h+set}" = set; then 
    5692   echo "$as_me:$LINENO: checking for stddef.h" >&5 
     3460EOF 
     3461 
     3462fi 
     3463 
     3464echo "$as_me:3464: checking for stddef.h" >&5 
    56933465echo $ECHO_N "checking for stddef.h... $ECHO_C" >&6 
    56943466if test "${ac_cv_header_stddef_h+set}" = set; then 
    56953467  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5696 fi 
    5697 echo "$as_me:$LINENO: result: $ac_cv_header_stddef_h" >&5 
    5698 echo "${ECHO_T}$ac_cv_header_stddef_h" >&6 
    5699 else 
    5700   # Is the header compilable? 
    5701 echo "$as_me:$LINENO: checking stddef.h usability" >&5 
    5702 echo $ECHO_N "checking stddef.h usability... $ECHO_C" >&6 
    5703 cat >conftest.$ac_ext <<_ACEOF 
    5704 /* confdefs.h.  */ 
    5705 _ACEOF 
    5706 cat confdefs.h >>conftest.$ac_ext 
    5707 cat >>conftest.$ac_ext <<_ACEOF 
    5708 /* end confdefs.h.  */ 
    5709 $ac_includes_default 
     3468else 
     3469  cat >conftest.$ac_ext <<_ACEOF 
     3470#line 3470 "configure" 
     3471#include "confdefs.h" 
    57103472#include <stddef.h> 
    57113473_ACEOF 
    5712 rm -f conftest.$ac_objext 
    5713 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5714   (eval $ac_compile) 2>conftest.er1 
    5715   ac_status=$? 
    5716   grep -v '^ *+' conftest.er1 >conftest.err 
     3474if { (eval echo "$as_me:3474: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3475  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3476  ac_status=$? 
     3477  egrep -v '^ *\+' conftest.er1 >conftest.err 
    57173478  rm -f conftest.er1 
    57183479  cat conftest.err >&5 
    5719   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5720   (exit $ac_status); } && 
    5721          { ac_try='test -z "$ac_c_werror_flag" 
    5722                          || test ! -s conftest.err' 
    5723   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5724   (eval $ac_try) 2>&5 
    5725   ac_status=$? 
    5726   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5727   (exit $ac_status); }; } && 
    5728          { ac_try='test -s conftest.$ac_objext' 
    5729   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5730   (eval $ac_try) 2>&5 
    5731   ac_status=$? 
    5732   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5733   (exit $ac_status); }; }; then 
    5734   ac_header_compiler=yes 
    5735 else 
    5736   echo "$as_me: failed program was:" >&5 
    5737 sed 's/^/| /' conftest.$ac_ext >&5 
    5738  
    5739 ac_header_compiler=no 
    5740 fi 
    5741 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5742 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5743 echo "${ECHO_T}$ac_header_compiler" >&6 
    5744  
    5745 # Is the header present? 
    5746 echo "$as_me:$LINENO: checking stddef.h presence" >&5 
    5747 echo $ECHO_N "checking stddef.h presence... $ECHO_C" >&6 
    5748 cat >conftest.$ac_ext <<_ACEOF 
    5749 /* confdefs.h.  */ 
    5750 _ACEOF 
    5751 cat confdefs.h >>conftest.$ac_ext 
    5752 cat >>conftest.$ac_ext <<_ACEOF 
    5753 /* end confdefs.h.  */ 
    5754 #include <stddef.h> 
    5755 _ACEOF 
    5756 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5758   ac_status=$? 
    5759   grep -v '^ *+' conftest.er1 >conftest.err 
    5760   rm -f conftest.er1 
    5761   cat conftest.err >&5 
    5762   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3480  echo "$as_me:3480: \$? = $ac_status" >&5 
    57633481  (exit $ac_status); } >/dev/null; then 
    57643482  if test -s conftest.err; then 
    57653483    ac_cpp_err=$ac_c_preproc_warn_flag 
    5766     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    57673484  else 
    57683485    ac_cpp_err= 
     
    57723489fi 
    57733490if test -z "$ac_cpp_err"; then 
    5774   ac_header_preproc=yes 
    5775 else 
    5776   echo "$as_me: failed program was:" >&5 
    5777 sed 's/^/| /' conftest.$ac_ext >&5 
    5778  
    5779   ac_header_preproc=no 
     3491  ac_cv_header_stddef_h=yes 
     3492else 
     3493  echo "$as_me: failed program was:" >&5 
     3494  cat conftest.$ac_ext >&5 
     3495  ac_cv_header_stddef_h=no 
    57803496fi 
    57813497rm -f conftest.err conftest.$ac_ext 
    5782 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5783 echo "${ECHO_T}$ac_header_preproc" >&6 
    5784  
    5785 # So?  What about this header? 
    5786 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5787   yes:no: ) 
    5788     { echo "$as_me:$LINENO: WARNING: stddef.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5789 echo "$as_me: WARNING: stddef.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5790     { echo "$as_me:$LINENO: WARNING: stddef.h: proceeding with the compiler's result" >&5 
    5791 echo "$as_me: WARNING: stddef.h: proceeding with the compiler's result" >&2;} 
    5792     ac_header_preproc=yes 
    5793     ;; 
    5794   no:yes:* ) 
    5795     { echo "$as_me:$LINENO: WARNING: stddef.h: present but cannot be compiled" >&5 
    5796 echo "$as_me: WARNING: stddef.h: present but cannot be compiled" >&2;} 
    5797     { echo "$as_me:$LINENO: WARNING: stddef.h:     check for missing prerequisite headers?" >&5 
    5798 echo "$as_me: WARNING: stddef.h:     check for missing prerequisite headers?" >&2;} 
    5799     { echo "$as_me:$LINENO: WARNING: stddef.h: see the Autoconf documentation" >&5 
    5800 echo "$as_me: WARNING: stddef.h: see the Autoconf documentation" >&2;} 
    5801     { echo "$as_me:$LINENO: WARNING: stddef.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5802 echo "$as_me: WARNING: stddef.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5803     { echo "$as_me:$LINENO: WARNING: stddef.h: proceeding with the preprocessor's result" >&5 
    5804 echo "$as_me: WARNING: stddef.h: proceeding with the preprocessor's result" >&2;} 
    5805     { echo "$as_me:$LINENO: WARNING: stddef.h: in the future, the compiler will take precedence" >&5 
    5806 echo "$as_me: WARNING: stddef.h: in the future, the compiler will take precedence" >&2;} 
    5807     ( 
    5808       cat <<\_ASBOX 
    5809 ## ------------------------------------ ## 
    5810 ## Report this to the pjproject lists.  ## 
    5811 ## ------------------------------------ ## 
    5812 _ASBOX 
    5813     ) | 
    5814       sed "s/^/$as_me: WARNING:     /" >&2 
    5815     ;; 
    5816 esac 
    5817 echo "$as_me:$LINENO: checking for stddef.h" >&5 
    5818 echo $ECHO_N "checking for stddef.h... $ECHO_C" >&6 
    5819 if test "${ac_cv_header_stddef_h+set}" = set; then 
    5820   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5821 else 
    5822   ac_cv_header_stddef_h=$ac_header_preproc 
    5823 fi 
    5824 echo "$as_me:$LINENO: result: $ac_cv_header_stddef_h" >&5 
     3498fi 
     3499echo "$as_me:3499: result: $ac_cv_header_stddef_h" >&5 
    58253500echo "${ECHO_T}$ac_cv_header_stddef_h" >&6 
    5826  
    5827 fi 
    58283501if test $ac_cv_header_stddef_h = yes; then 
    5829   cat >>confdefs.h <<\_ACEOF 
     3502  cat >>confdefs.h <<\EOF 
    58303503#define PJ_HAS_STDDEF_H 1 
    5831 _ACEOF 
    5832  
    5833 fi 
    5834  
    5835  
    5836 if test "${ac_cv_header_stdio_h+set}" = set; then 
    5837   echo "$as_me:$LINENO: checking for stdio.h" >&5 
     3504EOF 
     3505 
     3506fi 
     3507 
     3508echo "$as_me:3508: checking for stdio.h" >&5 
    58383509echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6 
    58393510if test "${ac_cv_header_stdio_h+set}" = set; then 
    58403511  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5841 fi 
    5842 echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 
    5843 echo "${ECHO_T}$ac_cv_header_stdio_h" >&6 
    5844 else 
    5845   # Is the header compilable? 
    5846 echo "$as_me:$LINENO: checking stdio.h usability" >&5 
    5847 echo $ECHO_N "checking stdio.h usability... $ECHO_C" >&6 
    5848 cat >conftest.$ac_ext <<_ACEOF 
    5849 /* confdefs.h.  */ 
    5850 _ACEOF 
    5851 cat confdefs.h >>conftest.$ac_ext 
    5852 cat >>conftest.$ac_ext <<_ACEOF 
    5853 /* end confdefs.h.  */ 
    5854 $ac_includes_default 
     3512else 
     3513  cat >conftest.$ac_ext <<_ACEOF 
     3514#line 3514 "configure" 
     3515#include "confdefs.h" 
    58553516#include <stdio.h> 
    58563517_ACEOF 
    5857 rm -f conftest.$ac_objext 
    5858 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    5859   (eval $ac_compile) 2>conftest.er1 
    5860   ac_status=$? 
    5861   grep -v '^ *+' conftest.er1 >conftest.err 
     3518if { (eval echo "$as_me:3518: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3519  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3520  ac_status=$? 
     3521  egrep -v '^ *\+' conftest.er1 >conftest.err 
    58623522  rm -f conftest.er1 
    58633523  cat conftest.err >&5 
    5864   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5865   (exit $ac_status); } && 
    5866          { ac_try='test -z "$ac_c_werror_flag" 
    5867                          || test ! -s conftest.err' 
    5868   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5869   (eval $ac_try) 2>&5 
    5870   ac_status=$? 
    5871   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5872   (exit $ac_status); }; } && 
    5873          { ac_try='test -s conftest.$ac_objext' 
    5874   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    5875   (eval $ac_try) 2>&5 
    5876   ac_status=$? 
    5877   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    5878   (exit $ac_status); }; }; then 
    5879   ac_header_compiler=yes 
    5880 else 
    5881   echo "$as_me: failed program was:" >&5 
    5882 sed 's/^/| /' conftest.$ac_ext >&5 
    5883  
    5884 ac_header_compiler=no 
    5885 fi 
    5886 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    5887 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    5888 echo "${ECHO_T}$ac_header_compiler" >&6 
    5889  
    5890 # Is the header present? 
    5891 echo "$as_me:$LINENO: checking stdio.h presence" >&5 
    5892 echo $ECHO_N "checking stdio.h presence... $ECHO_C" >&6 
    5893 cat >conftest.$ac_ext <<_ACEOF 
    5894 /* confdefs.h.  */ 
    5895 _ACEOF 
    5896 cat confdefs.h >>conftest.$ac_ext 
    5897 cat >>conftest.$ac_ext <<_ACEOF 
    5898 /* end confdefs.h.  */ 
    5899 #include <stdio.h> 
    5900 _ACEOF 
    5901 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    5902   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    5903   ac_status=$? 
    5904   grep -v '^ *+' conftest.er1 >conftest.err 
    5905   rm -f conftest.er1 
    5906   cat conftest.err >&5 
    5907   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3524  echo "$as_me:3524: \$? = $ac_status" >&5 
    59083525  (exit $ac_status); } >/dev/null; then 
    59093526  if test -s conftest.err; then 
    59103527    ac_cpp_err=$ac_c_preproc_warn_flag 
    5911     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    59123528  else 
    59133529    ac_cpp_err= 
     
    59173533fi 
    59183534if test -z "$ac_cpp_err"; then 
    5919   ac_header_preproc=yes 
    5920 else 
    5921   echo "$as_me: failed program was:" >&5 
    5922 sed 's/^/| /' conftest.$ac_ext >&5 
    5923  
    5924   ac_header_preproc=no 
     3535  ac_cv_header_stdio_h=yes 
     3536else 
     3537  echo "$as_me: failed program was:" >&5 
     3538  cat conftest.$ac_ext >&5 
     3539  ac_cv_header_stdio_h=no 
    59253540fi 
    59263541rm -f conftest.err conftest.$ac_ext 
    5927 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    5928 echo "${ECHO_T}$ac_header_preproc" >&6 
    5929  
    5930 # So?  What about this header? 
    5931 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    5932   yes:no: ) 
    5933     { echo "$as_me:$LINENO: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    5934 echo "$as_me: WARNING: stdio.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    5935     { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the compiler's result" >&5 
    5936 echo "$as_me: WARNING: stdio.h: proceeding with the compiler's result" >&2;} 
    5937     ac_header_preproc=yes 
    5938     ;; 
    5939   no:yes:* ) 
    5940     { echo "$as_me:$LINENO: WARNING: stdio.h: present but cannot be compiled" >&5 
    5941 echo "$as_me: WARNING: stdio.h: present but cannot be compiled" >&2;} 
    5942     { echo "$as_me:$LINENO: WARNING: stdio.h:     check for missing prerequisite headers?" >&5 
    5943 echo "$as_me: WARNING: stdio.h:     check for missing prerequisite headers?" >&2;} 
    5944     { echo "$as_me:$LINENO: WARNING: stdio.h: see the Autoconf documentation" >&5 
    5945 echo "$as_me: WARNING: stdio.h: see the Autoconf documentation" >&2;} 
    5946     { echo "$as_me:$LINENO: WARNING: stdio.h:     section \"Present But Cannot Be Compiled\"" >&5 
    5947 echo "$as_me: WARNING: stdio.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    5948     { echo "$as_me:$LINENO: WARNING: stdio.h: proceeding with the preprocessor's result" >&5 
    5949 echo "$as_me: WARNING: stdio.h: proceeding with the preprocessor's result" >&2;} 
    5950     { echo "$as_me:$LINENO: WARNING: stdio.h: in the future, the compiler will take precedence" >&5 
    5951 echo "$as_me: WARNING: stdio.h: in the future, the compiler will take precedence" >&2;} 
    5952     ( 
    5953       cat <<\_ASBOX 
    5954 ## ------------------------------------ ## 
    5955 ## Report this to the pjproject lists.  ## 
    5956 ## ------------------------------------ ## 
    5957 _ASBOX 
    5958     ) | 
    5959       sed "s/^/$as_me: WARNING:     /" >&2 
    5960     ;; 
    5961 esac 
    5962 echo "$as_me:$LINENO: checking for stdio.h" >&5 
    5963 echo $ECHO_N "checking for stdio.h... $ECHO_C" >&6 
    5964 if test "${ac_cv_header_stdio_h+set}" = set; then 
    5965   echo $ECHO_N "(cached) $ECHO_C" >&6 
    5966 else 
    5967   ac_cv_header_stdio_h=$ac_header_preproc 
    5968 fi 
    5969 echo "$as_me:$LINENO: result: $ac_cv_header_stdio_h" >&5 
     3542fi 
     3543echo "$as_me:3543: result: $ac_cv_header_stdio_h" >&5 
    59703544echo "${ECHO_T}$ac_cv_header_stdio_h" >&6 
    5971  
    5972 fi 
    59733545if test $ac_cv_header_stdio_h = yes; then 
    5974   cat >>confdefs.h <<\_ACEOF 
     3546  cat >>confdefs.h <<\EOF 
    59753547#define PJ_HAS_STDIO_H 1 
    5976 _ACEOF 
    5977  
    5978 fi 
    5979  
    5980  
    5981 if test "${ac_cv_header_stdlib_h+set}" = set; then 
    5982   echo "$as_me:$LINENO: checking for stdlib.h" >&5 
     3548EOF 
     3549 
     3550fi 
     3551 
     3552echo "$as_me:3552: checking for stdlib.h" >&5 
    59833553echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 
    59843554if test "${ac_cv_header_stdlib_h+set}" = set; then 
    59853555  echo $ECHO_N "(cached) $ECHO_C" >&6 
    5986 fi 
    5987 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 
    5988 echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 
    5989 else 
    5990   # Is the header compilable? 
    5991 echo "$as_me:$LINENO: checking stdlib.h usability" >&5 
    5992 echo $ECHO_N "checking stdlib.h usability... $ECHO_C" >&6 
    5993 cat >conftest.$ac_ext <<_ACEOF 
    5994 /* confdefs.h.  */ 
    5995 _ACEOF 
    5996 cat confdefs.h >>conftest.$ac_ext 
    5997 cat >>conftest.$ac_ext <<_ACEOF 
    5998 /* end confdefs.h.  */ 
    5999 $ac_includes_default 
     3556else 
     3557  cat >conftest.$ac_ext <<_ACEOF 
     3558#line 3558 "configure" 
     3559#include "confdefs.h" 
    60003560#include <stdlib.h> 
    60013561_ACEOF 
    6002 rm -f conftest.$ac_objext 
    6003 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6004   (eval $ac_compile) 2>conftest.er1 
    6005   ac_status=$? 
    6006   grep -v '^ *+' conftest.er1 >conftest.err 
     3562if { (eval echo "$as_me:3562: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3563  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3564  ac_status=$? 
     3565  egrep -v '^ *\+' conftest.er1 >conftest.err 
    60073566  rm -f conftest.er1 
    60083567  cat conftest.err >&5 
    6009   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6010   (exit $ac_status); } && 
    6011          { ac_try='test -z "$ac_c_werror_flag" 
    6012                          || test ! -s conftest.err' 
    6013   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6014   (eval $ac_try) 2>&5 
    6015   ac_status=$? 
    6016   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6017   (exit $ac_status); }; } && 
    6018          { ac_try='test -s conftest.$ac_objext' 
    6019   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6020   (eval $ac_try) 2>&5 
    6021   ac_status=$? 
    6022   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6023   (exit $ac_status); }; }; then 
    6024   ac_header_compiler=yes 
    6025 else 
    6026   echo "$as_me: failed program was:" >&5 
    6027 sed 's/^/| /' conftest.$ac_ext >&5 
    6028  
    6029 ac_header_compiler=no 
    6030 fi 
    6031 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6032 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6033 echo "${ECHO_T}$ac_header_compiler" >&6 
    6034  
    6035 # Is the header present? 
    6036 echo "$as_me:$LINENO: checking stdlib.h presence" >&5 
    6037 echo $ECHO_N "checking stdlib.h presence... $ECHO_C" >&6 
    6038 cat >conftest.$ac_ext <<_ACEOF 
    6039 /* confdefs.h.  */ 
    6040 _ACEOF 
    6041 cat confdefs.h >>conftest.$ac_ext 
    6042 cat >>conftest.$ac_ext <<_ACEOF 
    6043 /* end confdefs.h.  */ 
    6044 #include <stdlib.h> 
    6045 _ACEOF 
    6046 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6047   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6048   ac_status=$? 
    6049   grep -v '^ *+' conftest.er1 >conftest.err 
    6050   rm -f conftest.er1 
    6051   cat conftest.err >&5 
    6052   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3568  echo "$as_me:3568: \$? = $ac_status" >&5 
    60533569  (exit $ac_status); } >/dev/null; then 
    60543570  if test -s conftest.err; then 
    60553571    ac_cpp_err=$ac_c_preproc_warn_flag 
    6056     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    60573572  else 
    60583573    ac_cpp_err= 
     
    60623577fi 
    60633578if test -z "$ac_cpp_err"; then 
    6064   ac_header_preproc=yes 
    6065 else 
    6066   echo "$as_me: failed program was:" >&5 
    6067 sed 's/^/| /' conftest.$ac_ext >&5 
    6068  
    6069   ac_header_preproc=no 
     3579  ac_cv_header_stdlib_h=yes 
     3580else 
     3581  echo "$as_me: failed program was:" >&5 
     3582  cat conftest.$ac_ext >&5 
     3583  ac_cv_header_stdlib_h=no 
    60703584fi 
    60713585rm -f conftest.err conftest.$ac_ext 
    6072 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6073 echo "${ECHO_T}$ac_header_preproc" >&6 
    6074  
    6075 # So?  What about this header? 
    6076 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6077   yes:no: ) 
    6078     { echo "$as_me:$LINENO: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6079 echo "$as_me: WARNING: stdlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6080     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the compiler's result" >&5 
    6081 echo "$as_me: WARNING: stdlib.h: proceeding with the compiler's result" >&2;} 
    6082     ac_header_preproc=yes 
    6083     ;; 
    6084   no:yes:* ) 
    6085     { echo "$as_me:$LINENO: WARNING: stdlib.h: present but cannot be compiled" >&5 
    6086 echo "$as_me: WARNING: stdlib.h: present but cannot be compiled" >&2;} 
    6087     { echo "$as_me:$LINENO: WARNING: stdlib.h:     check for missing prerequisite headers?" >&5 
    6088 echo "$as_me: WARNING: stdlib.h:     check for missing prerequisite headers?" >&2;} 
    6089     { echo "$as_me:$LINENO: WARNING: stdlib.h: see the Autoconf documentation" >&5 
    6090 echo "$as_me: WARNING: stdlib.h: see the Autoconf documentation" >&2;} 
    6091     { echo "$as_me:$LINENO: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6092 echo "$as_me: WARNING: stdlib.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6093     { echo "$as_me:$LINENO: WARNING: stdlib.h: proceeding with the preprocessor's result" >&5 
    6094 echo "$as_me: WARNING: stdlib.h: proceeding with the preprocessor's result" >&2;} 
    6095     { echo "$as_me:$LINENO: WARNING: stdlib.h: in the future, the compiler will take precedence" >&5 
    6096 echo "$as_me: WARNING: stdlib.h: in the future, the compiler will take precedence" >&2;} 
    6097     ( 
    6098       cat <<\_ASBOX 
    6099 ## ------------------------------------ ## 
    6100 ## Report this to the pjproject lists.  ## 
    6101 ## ------------------------------------ ## 
    6102 _ASBOX 
    6103     ) | 
    6104       sed "s/^/$as_me: WARNING:     /" >&2 
    6105     ;; 
    6106 esac 
    6107 echo "$as_me:$LINENO: checking for stdlib.h" >&5 
    6108 echo $ECHO_N "checking for stdlib.h... $ECHO_C" >&6 
    6109 if test "${ac_cv_header_stdlib_h+set}" = set; then 
    6110   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6111 else 
    6112   ac_cv_header_stdlib_h=$ac_header_preproc 
    6113 fi 
    6114 echo "$as_me:$LINENO: result: $ac_cv_header_stdlib_h" >&5 
     3586fi 
     3587echo "$as_me:3587: result: $ac_cv_header_stdlib_h" >&5 
    61153588echo "${ECHO_T}$ac_cv_header_stdlib_h" >&6 
    6116  
    6117 fi 
    61183589if test $ac_cv_header_stdlib_h = yes; then 
    6119   cat >>confdefs.h <<\_ACEOF 
     3590  cat >>confdefs.h <<\EOF 
    61203591#define PJ_HAS_STDLIB_H 1 
    6121 _ACEOF 
    6122  
    6123 fi 
    6124  
    6125  
    6126 if test "${ac_cv_header_string_h+set}" = set; then 
    6127   echo "$as_me:$LINENO: checking for string.h" >&5 
     3592EOF 
     3593 
     3594fi 
     3595 
     3596echo "$as_me:3596: checking for string.h" >&5 
    61283597echo $ECHO_N "checking for string.h... $ECHO_C" >&6 
    61293598if test "${ac_cv_header_string_h+set}" = set; then 
    61303599  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6131 fi 
    6132 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 
    6133 echo "${ECHO_T}$ac_cv_header_string_h" >&6 
    6134 else 
    6135   # Is the header compilable? 
    6136 echo "$as_me:$LINENO: checking string.h usability" >&5 
    6137 echo $ECHO_N "checking string.h usability... $ECHO_C" >&6 
    6138 cat >conftest.$ac_ext <<_ACEOF 
    6139 /* confdefs.h.  */ 
    6140 _ACEOF 
    6141 cat confdefs.h >>conftest.$ac_ext 
    6142 cat >>conftest.$ac_ext <<_ACEOF 
    6143 /* end confdefs.h.  */ 
    6144 $ac_includes_default 
     3600else 
     3601  cat >conftest.$ac_ext <<_ACEOF 
     3602#line 3602 "configure" 
     3603#include "confdefs.h" 
    61453604#include <string.h> 
    61463605_ACEOF 
    6147 rm -f conftest.$ac_objext 
    6148 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6149   (eval $ac_compile) 2>conftest.er1 
    6150   ac_status=$? 
    6151   grep -v '^ *+' conftest.er1 >conftest.err 
     3606if { (eval echo "$as_me:3606: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3607  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3608  ac_status=$? 
     3609  egrep -v '^ *\+' conftest.er1 >conftest.err 
    61523610  rm -f conftest.er1 
    61533611  cat conftest.err >&5 
    6154   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6155   (exit $ac_status); } && 
    6156          { ac_try='test -z "$ac_c_werror_flag" 
    6157                          || test ! -s conftest.err' 
    6158   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6159   (eval $ac_try) 2>&5 
    6160   ac_status=$? 
    6161   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6162   (exit $ac_status); }; } && 
    6163          { ac_try='test -s conftest.$ac_objext' 
    6164   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6165   (eval $ac_try) 2>&5 
    6166   ac_status=$? 
    6167   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6168   (exit $ac_status); }; }; then 
    6169   ac_header_compiler=yes 
    6170 else 
    6171   echo "$as_me: failed program was:" >&5 
    6172 sed 's/^/| /' conftest.$ac_ext >&5 
    6173  
    6174 ac_header_compiler=no 
    6175 fi 
    6176 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6177 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6178 echo "${ECHO_T}$ac_header_compiler" >&6 
    6179  
    6180 # Is the header present? 
    6181 echo "$as_me:$LINENO: checking string.h presence" >&5 
    6182 echo $ECHO_N "checking string.h presence... $ECHO_C" >&6 
    6183 cat >conftest.$ac_ext <<_ACEOF 
    6184 /* confdefs.h.  */ 
    6185 _ACEOF 
    6186 cat confdefs.h >>conftest.$ac_ext 
    6187 cat >>conftest.$ac_ext <<_ACEOF 
    6188 /* end confdefs.h.  */ 
    6189 #include <string.h> 
    6190 _ACEOF 
    6191 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6192   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6193   ac_status=$? 
    6194   grep -v '^ *+' conftest.er1 >conftest.err 
    6195   rm -f conftest.er1 
    6196   cat conftest.err >&5 
    6197   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3612  echo "$as_me:3612: \$? = $ac_status" >&5 
    61983613  (exit $ac_status); } >/dev/null; then 
    61993614  if test -s conftest.err; then 
    62003615    ac_cpp_err=$ac_c_preproc_warn_flag 
    6201     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    62023616  else 
    62033617    ac_cpp_err= 
     
    62073621fi 
    62083622if test -z "$ac_cpp_err"; then 
    6209   ac_header_preproc=yes 
    6210 else 
    6211   echo "$as_me: failed program was:" >&5 
    6212 sed 's/^/| /' conftest.$ac_ext >&5 
    6213  
    6214   ac_header_preproc=no 
     3623  ac_cv_header_string_h=yes 
     3624else 
     3625  echo "$as_me: failed program was:" >&5 
     3626  cat conftest.$ac_ext >&5 
     3627  ac_cv_header_string_h=no 
    62153628fi 
    62163629rm -f conftest.err conftest.$ac_ext 
    6217 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6218 echo "${ECHO_T}$ac_header_preproc" >&6 
    6219  
    6220 # So?  What about this header? 
    6221 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6222   yes:no: ) 
    6223     { echo "$as_me:$LINENO: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6224 echo "$as_me: WARNING: string.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6225     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the compiler's result" >&5 
    6226 echo "$as_me: WARNING: string.h: proceeding with the compiler's result" >&2;} 
    6227     ac_header_preproc=yes 
    6228     ;; 
    6229   no:yes:* ) 
    6230     { echo "$as_me:$LINENO: WARNING: string.h: present but cannot be compiled" >&5 
    6231 echo "$as_me: WARNING: string.h: present but cannot be compiled" >&2;} 
    6232     { echo "$as_me:$LINENO: WARNING: string.h:     check for missing prerequisite headers?" >&5 
    6233 echo "$as_me: WARNING: string.h:     check for missing prerequisite headers?" >&2;} 
    6234     { echo "$as_me:$LINENO: WARNING: string.h: see the Autoconf documentation" >&5 
    6235 echo "$as_me: WARNING: string.h: see the Autoconf documentation" >&2;} 
    6236     { echo "$as_me:$LINENO: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6237 echo "$as_me: WARNING: string.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6238     { echo "$as_me:$LINENO: WARNING: string.h: proceeding with the preprocessor's result" >&5 
    6239 echo "$as_me: WARNING: string.h: proceeding with the preprocessor's result" >&2;} 
    6240     { echo "$as_me:$LINENO: WARNING: string.h: in the future, the compiler will take precedence" >&5 
    6241 echo "$as_me: WARNING: string.h: in the future, the compiler will take precedence" >&2;} 
    6242     ( 
    6243       cat <<\_ASBOX 
    6244 ## ------------------------------------ ## 
    6245 ## Report this to the pjproject lists.  ## 
    6246 ## ------------------------------------ ## 
    6247 _ASBOX 
    6248     ) | 
    6249       sed "s/^/$as_me: WARNING:     /" >&2 
    6250     ;; 
    6251 esac 
    6252 echo "$as_me:$LINENO: checking for string.h" >&5 
    6253 echo $ECHO_N "checking for string.h... $ECHO_C" >&6 
    6254 if test "${ac_cv_header_string_h+set}" = set; then 
    6255   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6256 else 
    6257   ac_cv_header_string_h=$ac_header_preproc 
    6258 fi 
    6259 echo "$as_me:$LINENO: result: $ac_cv_header_string_h" >&5 
     3630fi 
     3631echo "$as_me:3631: result: $ac_cv_header_string_h" >&5 
    62603632echo "${ECHO_T}$ac_cv_header_string_h" >&6 
    6261  
    6262 fi 
    62633633if test $ac_cv_header_string_h = yes; then 
    6264   cat >>confdefs.h <<\_ACEOF 
     3634  cat >>confdefs.h <<\EOF 
    62653635#define PJ_HAS_STRING_H 1 
    6266 _ACEOF 
    6267  
    6268 fi 
    6269  
    6270  
    6271 if test "${ac_cv_header_sys_ioctl_h+set}" = set; then 
    6272   echo "$as_me:$LINENO: checking for sys/ioctl.h" >&5 
     3636EOF 
     3637 
     3638fi 
     3639 
     3640echo "$as_me:3640: checking for sys/ioctl.h" >&5 
    62733641echo $ECHO_N "checking for sys/ioctl.h... $ECHO_C" >&6 
    62743642if test "${ac_cv_header_sys_ioctl_h+set}" = set; then 
    62753643  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6276 fi 
    6277 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ioctl_h" >&5 
    6278 echo "${ECHO_T}$ac_cv_header_sys_ioctl_h" >&6 
    6279 else 
    6280   # Is the header compilable? 
    6281 echo "$as_me:$LINENO: checking sys/ioctl.h usability" >&5 
    6282 echo $ECHO_N "checking sys/ioctl.h usability... $ECHO_C" >&6 
    6283 cat >conftest.$ac_ext <<_ACEOF 
    6284 /* confdefs.h.  */ 
    6285 _ACEOF 
    6286 cat confdefs.h >>conftest.$ac_ext 
    6287 cat >>conftest.$ac_ext <<_ACEOF 
    6288 /* end confdefs.h.  */ 
    6289 $ac_includes_default 
     3644else 
     3645  cat >conftest.$ac_ext <<_ACEOF 
     3646#line 3646 "configure" 
     3647#include "confdefs.h" 
    62903648#include <sys/ioctl.h> 
    62913649_ACEOF 
    6292 rm -f conftest.$ac_objext 
    6293 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6294   (eval $ac_compile) 2>conftest.er1 
    6295   ac_status=$? 
    6296   grep -v '^ *+' conftest.er1 >conftest.err 
     3650if { (eval echo "$as_me:3650: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3651  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3652  ac_status=$? 
     3653  egrep -v '^ *\+' conftest.er1 >conftest.err 
    62973654  rm -f conftest.er1 
    62983655  cat conftest.err >&5 
    6299   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6300   (exit $ac_status); } && 
    6301          { ac_try='test -z "$ac_c_werror_flag" 
    6302                          || test ! -s conftest.err' 
    6303   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6304   (eval $ac_try) 2>&5 
    6305   ac_status=$? 
    6306   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6307   (exit $ac_status); }; } && 
    6308          { ac_try='test -s conftest.$ac_objext' 
    6309   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6310   (eval $ac_try) 2>&5 
    6311   ac_status=$? 
    6312   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6313   (exit $ac_status); }; }; then 
    6314   ac_header_compiler=yes 
    6315 else 
    6316   echo "$as_me: failed program was:" >&5 
    6317 sed 's/^/| /' conftest.$ac_ext >&5 
    6318  
    6319 ac_header_compiler=no 
    6320 fi 
    6321 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6322 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6323 echo "${ECHO_T}$ac_header_compiler" >&6 
    6324  
    6325 # Is the header present? 
    6326 echo "$as_me:$LINENO: checking sys/ioctl.h presence" >&5 
    6327 echo $ECHO_N "checking sys/ioctl.h presence... $ECHO_C" >&6 
    6328 cat >conftest.$ac_ext <<_ACEOF 
    6329 /* confdefs.h.  */ 
    6330 _ACEOF 
    6331 cat confdefs.h >>conftest.$ac_ext 
    6332 cat >>conftest.$ac_ext <<_ACEOF 
    6333 /* end confdefs.h.  */ 
    6334 #include <sys/ioctl.h> 
    6335 _ACEOF 
    6336 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6337   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6338   ac_status=$? 
    6339   grep -v '^ *+' conftest.er1 >conftest.err 
    6340   rm -f conftest.er1 
    6341   cat conftest.err >&5 
    6342   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3656  echo "$as_me:3656: \$? = $ac_status" >&5 
    63433657  (exit $ac_status); } >/dev/null; then 
    63443658  if test -s conftest.err; then 
    63453659    ac_cpp_err=$ac_c_preproc_warn_flag 
    6346     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    63473660  else 
    63483661    ac_cpp_err= 
     
    63523665fi 
    63533666if test -z "$ac_cpp_err"; then 
    6354   ac_header_preproc=yes 
    6355 else 
    6356   echo "$as_me: failed program was:" >&5 
    6357 sed 's/^/| /' conftest.$ac_ext >&5 
    6358  
    6359   ac_header_preproc=no 
     3667  ac_cv_header_sys_ioctl_h=yes 
     3668else 
     3669  echo "$as_me: failed program was:" >&5 
     3670  cat conftest.$ac_ext >&5 
     3671  ac_cv_header_sys_ioctl_h=no 
    63603672fi 
    63613673rm -f conftest.err conftest.$ac_ext 
    6362 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6363 echo "${ECHO_T}$ac_header_preproc" >&6 
    6364  
    6365 # So?  What about this header? 
    6366 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6367   yes:no: ) 
    6368     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6369 echo "$as_me: WARNING: sys/ioctl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6370     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: proceeding with the compiler's result" >&5 
    6371 echo "$as_me: WARNING: sys/ioctl.h: proceeding with the compiler's result" >&2;} 
    6372     ac_header_preproc=yes 
    6373     ;; 
    6374   no:yes:* ) 
    6375     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: present but cannot be compiled" >&5 
    6376 echo "$as_me: WARNING: sys/ioctl.h: present but cannot be compiled" >&2;} 
    6377     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h:     check for missing prerequisite headers?" >&5 
    6378 echo "$as_me: WARNING: sys/ioctl.h:     check for missing prerequisite headers?" >&2;} 
    6379     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: see the Autoconf documentation" >&5 
    6380 echo "$as_me: WARNING: sys/ioctl.h: see the Autoconf documentation" >&2;} 
    6381     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6382 echo "$as_me: WARNING: sys/ioctl.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6383     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: proceeding with the preprocessor's result" >&5 
    6384 echo "$as_me: WARNING: sys/ioctl.h: proceeding with the preprocessor's result" >&2;} 
    6385     { echo "$as_me:$LINENO: WARNING: sys/ioctl.h: in the future, the compiler will take precedence" >&5 
    6386 echo "$as_me: WARNING: sys/ioctl.h: in the future, the compiler will take precedence" >&2;} 
    6387     ( 
    6388       cat <<\_ASBOX 
    6389 ## ------------------------------------ ## 
    6390 ## Report this to the pjproject lists.  ## 
    6391 ## ------------------------------------ ## 
    6392 _ASBOX 
    6393     ) | 
    6394       sed "s/^/$as_me: WARNING:     /" >&2 
    6395     ;; 
    6396 esac 
    6397 echo "$as_me:$LINENO: checking for sys/ioctl.h" >&5 
    6398 echo $ECHO_N "checking for sys/ioctl.h... $ECHO_C" >&6 
    6399 if test "${ac_cv_header_sys_ioctl_h+set}" = set; then 
    6400   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6401 else 
    6402   ac_cv_header_sys_ioctl_h=$ac_header_preproc 
    6403 fi 
    6404 echo "$as_me:$LINENO: result: $ac_cv_header_sys_ioctl_h" >&5 
     3674fi 
     3675echo "$as_me:3675: result: $ac_cv_header_sys_ioctl_h" >&5 
    64053676echo "${ECHO_T}$ac_cv_header_sys_ioctl_h" >&6 
    6406  
    6407 fi 
    64083677if test $ac_cv_header_sys_ioctl_h = yes; then 
    6409   cat >>confdefs.h <<\_ACEOF 
     3678  cat >>confdefs.h <<\EOF 
    64103679#define PJ_HAS_SYS_IOCTL_H 1 
    6411 _ACEOF 
    6412  
    6413 fi 
    6414  
    6415  
    6416 if test "${ac_cv_header_sys_select_h+set}" = set; then 
    6417   echo "$as_me:$LINENO: checking for sys/select.h" >&5 
     3680EOF 
     3681 
     3682fi 
     3683 
     3684echo "$as_me:3684: checking for sys/select.h" >&5 
    64183685echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 
    64193686if test "${ac_cv_header_sys_select_h+set}" = set; then 
    64203687  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6421 fi 
    6422 echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 
    6423 echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 
    6424 else 
    6425   # Is the header compilable? 
    6426 echo "$as_me:$LINENO: checking sys/select.h usability" >&5 
    6427 echo $ECHO_N "checking sys/select.h usability... $ECHO_C" >&6 
    6428 cat >conftest.$ac_ext <<_ACEOF 
    6429 /* confdefs.h.  */ 
    6430 _ACEOF 
    6431 cat confdefs.h >>conftest.$ac_ext 
    6432 cat >>conftest.$ac_ext <<_ACEOF 
    6433 /* end confdefs.h.  */ 
    6434 $ac_includes_default 
     3688else 
     3689  cat >conftest.$ac_ext <<_ACEOF 
     3690#line 3690 "configure" 
     3691#include "confdefs.h" 
    64353692#include <sys/select.h> 
    64363693_ACEOF 
    6437 rm -f conftest.$ac_objext 
    6438 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6439   (eval $ac_compile) 2>conftest.er1 
    6440   ac_status=$? 
    6441   grep -v '^ *+' conftest.er1 >conftest.err 
     3694if { (eval echo "$as_me:3694: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3695  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3696  ac_status=$? 
     3697  egrep -v '^ *\+' conftest.er1 >conftest.err 
    64423698  rm -f conftest.er1 
    64433699  cat conftest.err >&5 
    6444   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6445   (exit $ac_status); } && 
    6446          { ac_try='test -z "$ac_c_werror_flag" 
    6447                          || test ! -s conftest.err' 
    6448   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6449   (eval $ac_try) 2>&5 
    6450   ac_status=$? 
    6451   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6452   (exit $ac_status); }; } && 
    6453          { ac_try='test -s conftest.$ac_objext' 
    6454   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6455   (eval $ac_try) 2>&5 
    6456   ac_status=$? 
    6457   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6458   (exit $ac_status); }; }; then 
    6459   ac_header_compiler=yes 
    6460 else 
    6461   echo "$as_me: failed program was:" >&5 
    6462 sed 's/^/| /' conftest.$ac_ext >&5 
    6463  
    6464 ac_header_compiler=no 
    6465 fi 
    6466 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6467 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6468 echo "${ECHO_T}$ac_header_compiler" >&6 
    6469  
    6470 # Is the header present? 
    6471 echo "$as_me:$LINENO: checking sys/select.h presence" >&5 
    6472 echo $ECHO_N "checking sys/select.h presence... $ECHO_C" >&6 
    6473 cat >conftest.$ac_ext <<_ACEOF 
    6474 /* confdefs.h.  */ 
    6475 _ACEOF 
    6476 cat confdefs.h >>conftest.$ac_ext 
    6477 cat >>conftest.$ac_ext <<_ACEOF 
    6478 /* end confdefs.h.  */ 
    6479 #include <sys/select.h> 
    6480 _ACEOF 
    6481 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6482   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6483   ac_status=$? 
    6484   grep -v '^ *+' conftest.er1 >conftest.err 
    6485   rm -f conftest.er1 
    6486   cat conftest.err >&5 
    6487   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3700  echo "$as_me:3700: \$? = $ac_status" >&5 
    64883701  (exit $ac_status); } >/dev/null; then 
    64893702  if test -s conftest.err; then 
    64903703    ac_cpp_err=$ac_c_preproc_warn_flag 
    6491     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    64923704  else 
    64933705    ac_cpp_err= 
     
    64973709fi 
    64983710if test -z "$ac_cpp_err"; then 
    6499   ac_header_preproc=yes 
    6500 else 
    6501   echo "$as_me: failed program was:" >&5 
    6502 sed 's/^/| /' conftest.$ac_ext >&5 
    6503  
    6504   ac_header_preproc=no 
     3711  ac_cv_header_sys_select_h=yes 
     3712else 
     3713  echo "$as_me: failed program was:" >&5 
     3714  cat conftest.$ac_ext >&5 
     3715  ac_cv_header_sys_select_h=no 
    65053716fi 
    65063717rm -f conftest.err conftest.$ac_ext 
    6507 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6508 echo "${ECHO_T}$ac_header_preproc" >&6 
    6509  
    6510 # So?  What about this header? 
    6511 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6512   yes:no: ) 
    6513     { echo "$as_me:$LINENO: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6514 echo "$as_me: WARNING: sys/select.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6515     { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the compiler's result" >&5 
    6516 echo "$as_me: WARNING: sys/select.h: proceeding with the compiler's result" >&2;} 
    6517     ac_header_preproc=yes 
    6518     ;; 
    6519   no:yes:* ) 
    6520     { echo "$as_me:$LINENO: WARNING: sys/select.h: present but cannot be compiled" >&5 
    6521 echo "$as_me: WARNING: sys/select.h: present but cannot be compiled" >&2;} 
    6522     { echo "$as_me:$LINENO: WARNING: sys/select.h:     check for missing prerequisite headers?" >&5 
    6523 echo "$as_me: WARNING: sys/select.h:     check for missing prerequisite headers?" >&2;} 
    6524     { echo "$as_me:$LINENO: WARNING: sys/select.h: see the Autoconf documentation" >&5 
    6525 echo "$as_me: WARNING: sys/select.h: see the Autoconf documentation" >&2;} 
    6526     { echo "$as_me:$LINENO: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6527 echo "$as_me: WARNING: sys/select.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6528     { echo "$as_me:$LINENO: WARNING: sys/select.h: proceeding with the preprocessor's result" >&5 
    6529 echo "$as_me: WARNING: sys/select.h: proceeding with the preprocessor's result" >&2;} 
    6530     { echo "$as_me:$LINENO: WARNING: sys/select.h: in the future, the compiler will take precedence" >&5 
    6531 echo "$as_me: WARNING: sys/select.h: in the future, the compiler will take precedence" >&2;} 
    6532     ( 
    6533       cat <<\_ASBOX 
    6534 ## ------------------------------------ ## 
    6535 ## Report this to the pjproject lists.  ## 
    6536 ## ------------------------------------ ## 
    6537 _ASBOX 
    6538     ) | 
    6539       sed "s/^/$as_me: WARNING:     /" >&2 
    6540     ;; 
    6541 esac 
    6542 echo "$as_me:$LINENO: checking for sys/select.h" >&5 
    6543 echo $ECHO_N "checking for sys/select.h... $ECHO_C" >&6 
    6544 if test "${ac_cv_header_sys_select_h+set}" = set; then 
    6545   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6546 else 
    6547   ac_cv_header_sys_select_h=$ac_header_preproc 
    6548 fi 
    6549 echo "$as_me:$LINENO: result: $ac_cv_header_sys_select_h" >&5 
     3718fi 
     3719echo "$as_me:3719: result: $ac_cv_header_sys_select_h" >&5 
    65503720echo "${ECHO_T}$ac_cv_header_sys_select_h" >&6 
    6551  
    6552 fi 
    65533721if test $ac_cv_header_sys_select_h = yes; then 
    6554   cat >>confdefs.h <<\_ACEOF 
     3722  cat >>confdefs.h <<\EOF 
    65553723#define PJ_HAS_SYS_SELECT_H 1 
    6556 _ACEOF 
    6557  
    6558 fi 
    6559  
    6560  
    6561 if test "${ac_cv_header_sys_socket_h+set}" = set; then 
    6562   echo "$as_me:$LINENO: checking for sys/socket.h" >&5 
     3724EOF 
     3725 
     3726fi 
     3727 
     3728echo "$as_me:3728: checking for sys/socket.h" >&5 
    65633729echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 
    65643730if test "${ac_cv_header_sys_socket_h+set}" = set; then 
    65653731  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6566 fi 
    6567 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 
    6568 echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 
    6569 else 
    6570   # Is the header compilable? 
    6571 echo "$as_me:$LINENO: checking sys/socket.h usability" >&5 
    6572 echo $ECHO_N "checking sys/socket.h usability... $ECHO_C" >&6 
    6573 cat >conftest.$ac_ext <<_ACEOF 
    6574 /* confdefs.h.  */ 
    6575 _ACEOF 
    6576 cat confdefs.h >>conftest.$ac_ext 
    6577 cat >>conftest.$ac_ext <<_ACEOF 
    6578 /* end confdefs.h.  */ 
    6579 $ac_includes_default 
     3732else 
     3733  cat >conftest.$ac_ext <<_ACEOF 
     3734#line 3734 "configure" 
     3735#include "confdefs.h" 
    65803736#include <sys/socket.h> 
    65813737_ACEOF 
    6582 rm -f conftest.$ac_objext 
    6583 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6584   (eval $ac_compile) 2>conftest.er1 
    6585   ac_status=$? 
    6586   grep -v '^ *+' conftest.er1 >conftest.err 
     3738if { (eval echo "$as_me:3738: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3739  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3740  ac_status=$? 
     3741  egrep -v '^ *\+' conftest.er1 >conftest.err 
    65873742  rm -f conftest.er1 
    65883743  cat conftest.err >&5 
    6589   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6590   (exit $ac_status); } && 
    6591          { ac_try='test -z "$ac_c_werror_flag" 
    6592                          || test ! -s conftest.err' 
    6593   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6594   (eval $ac_try) 2>&5 
    6595   ac_status=$? 
    6596   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6597   (exit $ac_status); }; } && 
    6598          { ac_try='test -s conftest.$ac_objext' 
    6599   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6600   (eval $ac_try) 2>&5 
    6601   ac_status=$? 
    6602   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6603   (exit $ac_status); }; }; then 
    6604   ac_header_compiler=yes 
    6605 else 
    6606   echo "$as_me: failed program was:" >&5 
    6607 sed 's/^/| /' conftest.$ac_ext >&5 
    6608  
    6609 ac_header_compiler=no 
    6610 fi 
    6611 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6612 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6613 echo "${ECHO_T}$ac_header_compiler" >&6 
    6614  
    6615 # Is the header present? 
    6616 echo "$as_me:$LINENO: checking sys/socket.h presence" >&5 
    6617 echo $ECHO_N "checking sys/socket.h presence... $ECHO_C" >&6 
    6618 cat >conftest.$ac_ext <<_ACEOF 
    6619 /* confdefs.h.  */ 
    6620 _ACEOF 
    6621 cat confdefs.h >>conftest.$ac_ext 
    6622 cat >>conftest.$ac_ext <<_ACEOF 
    6623 /* end confdefs.h.  */ 
    6624 #include <sys/socket.h> 
    6625 _ACEOF 
    6626 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6627   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6628   ac_status=$? 
    6629   grep -v '^ *+' conftest.er1 >conftest.err 
    6630   rm -f conftest.er1 
    6631   cat conftest.err >&5 
    6632   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3744  echo "$as_me:3744: \$? = $ac_status" >&5 
    66333745  (exit $ac_status); } >/dev/null; then 
    66343746  if test -s conftest.err; then 
    66353747    ac_cpp_err=$ac_c_preproc_warn_flag 
    6636     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    66373748  else 
    66383749    ac_cpp_err= 
     
    66423753fi 
    66433754if test -z "$ac_cpp_err"; then 
    6644   ac_header_preproc=yes 
    6645 else 
    6646   echo "$as_me: failed program was:" >&5 
    6647 sed 's/^/| /' conftest.$ac_ext >&5 
    6648  
    6649   ac_header_preproc=no 
     3755  ac_cv_header_sys_socket_h=yes 
     3756else 
     3757  echo "$as_me: failed program was:" >&5 
     3758  cat conftest.$ac_ext >&5 
     3759  ac_cv_header_sys_socket_h=no 
    66503760fi 
    66513761rm -f conftest.err conftest.$ac_ext 
    6652 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6653 echo "${ECHO_T}$ac_header_preproc" >&6 
    6654  
    6655 # So?  What about this header? 
    6656 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6657   yes:no: ) 
    6658     { echo "$as_me:$LINENO: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6659 echo "$as_me: WARNING: sys/socket.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6660     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the compiler's result" >&5 
    6661 echo "$as_me: WARNING: sys/socket.h: proceeding with the compiler's result" >&2;} 
    6662     ac_header_preproc=yes 
    6663     ;; 
    6664   no:yes:* ) 
    6665     { echo "$as_me:$LINENO: WARNING: sys/socket.h: present but cannot be compiled" >&5 
    6666 echo "$as_me: WARNING: sys/socket.h: present but cannot be compiled" >&2;} 
    6667     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&5 
    6668 echo "$as_me: WARNING: sys/socket.h:     check for missing prerequisite headers?" >&2;} 
    6669     { echo "$as_me:$LINENO: WARNING: sys/socket.h: see the Autoconf documentation" >&5 
    6670 echo "$as_me: WARNING: sys/socket.h: see the Autoconf documentation" >&2;} 
    6671     { echo "$as_me:$LINENO: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6672 echo "$as_me: WARNING: sys/socket.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6673     { echo "$as_me:$LINENO: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&5 
    6674 echo "$as_me: WARNING: sys/socket.h: proceeding with the preprocessor's result" >&2;} 
    6675     { echo "$as_me:$LINENO: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&5 
    6676 echo "$as_me: WARNING: sys/socket.h: in the future, the compiler will take precedence" >&2;} 
    6677     ( 
    6678       cat <<\_ASBOX 
    6679 ## ------------------------------------ ## 
    6680 ## Report this to the pjproject lists.  ## 
    6681 ## ------------------------------------ ## 
    6682 _ASBOX 
    6683     ) | 
    6684       sed "s/^/$as_me: WARNING:     /" >&2 
    6685     ;; 
    6686 esac 
    6687 echo "$as_me:$LINENO: checking for sys/socket.h" >&5 
    6688 echo $ECHO_N "checking for sys/socket.h... $ECHO_C" >&6 
    6689 if test "${ac_cv_header_sys_socket_h+set}" = set; then 
    6690   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6691 else 
    6692   ac_cv_header_sys_socket_h=$ac_header_preproc 
    6693 fi 
    6694 echo "$as_me:$LINENO: result: $ac_cv_header_sys_socket_h" >&5 
     3762fi 
     3763echo "$as_me:3763: result: $ac_cv_header_sys_socket_h" >&5 
    66953764echo "${ECHO_T}$ac_cv_header_sys_socket_h" >&6 
    6696  
    6697 fi 
    66983765if test $ac_cv_header_sys_socket_h = yes; then 
    6699   cat >>confdefs.h <<\_ACEOF 
     3766  cat >>confdefs.h <<\EOF 
    67003767#define PJ_HAS_SYS_SOCKET_H 1 
    6701 _ACEOF 
    6702  
    6703 fi 
    6704  
    6705  
    6706 if test "${ac_cv_header_sys_time_h+set}" = set; then 
    6707   echo "$as_me:$LINENO: checking for sys/time.h" >&5 
     3768EOF 
     3769 
     3770fi 
     3771 
     3772echo "$as_me:3772: checking for sys/time.h" >&5 
    67083773echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6 
    67093774if test "${ac_cv_header_sys_time_h+set}" = set; then 
    67103775  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6711 fi 
    6712 echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 
    6713 echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6 
    6714 else 
    6715   # Is the header compilable? 
    6716 echo "$as_me:$LINENO: checking sys/time.h usability" >&5 
    6717 echo $ECHO_N "checking sys/time.h usability... $ECHO_C" >&6 
    6718 cat >conftest.$ac_ext <<_ACEOF 
    6719 /* confdefs.h.  */ 
    6720 _ACEOF 
    6721 cat confdefs.h >>conftest.$ac_ext 
    6722 cat >>conftest.$ac_ext <<_ACEOF 
    6723 /* end confdefs.h.  */ 
    6724 $ac_includes_default 
     3776else 
     3777  cat >conftest.$ac_ext <<_ACEOF 
     3778#line 3778 "configure" 
     3779#include "confdefs.h" 
    67253780#include <sys/time.h> 
    67263781_ACEOF 
    6727 rm -f conftest.$ac_objext 
    6728 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6729   (eval $ac_compile) 2>conftest.er1 
    6730   ac_status=$? 
    6731   grep -v '^ *+' conftest.er1 >conftest.err 
     3782if { (eval echo "$as_me:3782: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3783  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3784  ac_status=$? 
     3785  egrep -v '^ *\+' conftest.er1 >conftest.err 
    67323786  rm -f conftest.er1 
    67333787  cat conftest.err >&5 
    6734   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6735   (exit $ac_status); } && 
    6736          { ac_try='test -z "$ac_c_werror_flag" 
    6737                          || test ! -s conftest.err' 
    6738   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6739   (eval $ac_try) 2>&5 
    6740   ac_status=$? 
    6741   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6742   (exit $ac_status); }; } && 
    6743          { ac_try='test -s conftest.$ac_objext' 
    6744   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6745   (eval $ac_try) 2>&5 
    6746   ac_status=$? 
    6747   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6748   (exit $ac_status); }; }; then 
    6749   ac_header_compiler=yes 
    6750 else 
    6751   echo "$as_me: failed program was:" >&5 
    6752 sed 's/^/| /' conftest.$ac_ext >&5 
    6753  
    6754 ac_header_compiler=no 
    6755 fi 
    6756 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6757 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6758 echo "${ECHO_T}$ac_header_compiler" >&6 
    6759  
    6760 # Is the header present? 
    6761 echo "$as_me:$LINENO: checking sys/time.h presence" >&5 
    6762 echo $ECHO_N "checking sys/time.h presence... $ECHO_C" >&6 
    6763 cat >conftest.$ac_ext <<_ACEOF 
    6764 /* confdefs.h.  */ 
    6765 _ACEOF 
    6766 cat confdefs.h >>conftest.$ac_ext 
    6767 cat >>conftest.$ac_ext <<_ACEOF 
    6768 /* end confdefs.h.  */ 
    6769 #include <sys/time.h> 
    6770 _ACEOF 
    6771 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6772   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6773   ac_status=$? 
    6774   grep -v '^ *+' conftest.er1 >conftest.err 
    6775   rm -f conftest.er1 
    6776   cat conftest.err >&5 
    6777   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3788  echo "$as_me:3788: \$? = $ac_status" >&5 
    67783789  (exit $ac_status); } >/dev/null; then 
    67793790  if test -s conftest.err; then 
    67803791    ac_cpp_err=$ac_c_preproc_warn_flag 
    6781     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    67823792  else 
    67833793    ac_cpp_err= 
     
    67873797fi 
    67883798if test -z "$ac_cpp_err"; then 
    6789   ac_header_preproc=yes 
    6790 else 
    6791   echo "$as_me: failed program was:" >&5 
    6792 sed 's/^/| /' conftest.$ac_ext >&5 
    6793  
    6794   ac_header_preproc=no 
     3799  ac_cv_header_sys_time_h=yes 
     3800else 
     3801  echo "$as_me: failed program was:" >&5 
     3802  cat conftest.$ac_ext >&5 
     3803  ac_cv_header_sys_time_h=no 
    67953804fi 
    67963805rm -f conftest.err conftest.$ac_ext 
    6797 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6798 echo "${ECHO_T}$ac_header_preproc" >&6 
    6799  
    6800 # So?  What about this header? 
    6801 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6802   yes:no: ) 
    6803     { echo "$as_me:$LINENO: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6804 echo "$as_me: WARNING: sys/time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6805     { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the compiler's result" >&5 
    6806 echo "$as_me: WARNING: sys/time.h: proceeding with the compiler's result" >&2;} 
    6807     ac_header_preproc=yes 
    6808     ;; 
    6809   no:yes:* ) 
    6810     { echo "$as_me:$LINENO: WARNING: sys/time.h: present but cannot be compiled" >&5 
    6811 echo "$as_me: WARNING: sys/time.h: present but cannot be compiled" >&2;} 
    6812     { echo "$as_me:$LINENO: WARNING: sys/time.h:     check for missing prerequisite headers?" >&5 
    6813 echo "$as_me: WARNING: sys/time.h:     check for missing prerequisite headers?" >&2;} 
    6814     { echo "$as_me:$LINENO: WARNING: sys/time.h: see the Autoconf documentation" >&5 
    6815 echo "$as_me: WARNING: sys/time.h: see the Autoconf documentation" >&2;} 
    6816     { echo "$as_me:$LINENO: WARNING: sys/time.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6817 echo "$as_me: WARNING: sys/time.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6818     { echo "$as_me:$LINENO: WARNING: sys/time.h: proceeding with the preprocessor's result" >&5 
    6819 echo "$as_me: WARNING: sys/time.h: proceeding with the preprocessor's result" >&2;} 
    6820     { echo "$as_me:$LINENO: WARNING: sys/time.h: in the future, the compiler will take precedence" >&5 
    6821 echo "$as_me: WARNING: sys/time.h: in the future, the compiler will take precedence" >&2;} 
    6822     ( 
    6823       cat <<\_ASBOX 
    6824 ## ------------------------------------ ## 
    6825 ## Report this to the pjproject lists.  ## 
    6826 ## ------------------------------------ ## 
    6827 _ASBOX 
    6828     ) | 
    6829       sed "s/^/$as_me: WARNING:     /" >&2 
    6830     ;; 
    6831 esac 
    6832 echo "$as_me:$LINENO: checking for sys/time.h" >&5 
    6833 echo $ECHO_N "checking for sys/time.h... $ECHO_C" >&6 
    6834 if test "${ac_cv_header_sys_time_h+set}" = set; then 
    6835   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6836 else 
    6837   ac_cv_header_sys_time_h=$ac_header_preproc 
    6838 fi 
    6839 echo "$as_me:$LINENO: result: $ac_cv_header_sys_time_h" >&5 
     3806fi 
     3807echo "$as_me:3807: result: $ac_cv_header_sys_time_h" >&5 
    68403808echo "${ECHO_T}$ac_cv_header_sys_time_h" >&6 
    6841  
    6842 fi 
    68433809if test $ac_cv_header_sys_time_h = yes; then 
    6844   cat >>confdefs.h <<\_ACEOF 
     3810  cat >>confdefs.h <<\EOF 
    68453811#define PJ_HAS_SYS_TIME_H 1 
    6846 _ACEOF 
    6847  
    6848 fi 
    6849  
    6850  
    6851 if test "${ac_cv_header_sys_timeb_h+set}" = set; then 
    6852   echo "$as_me:$LINENO: checking for sys/timeb.h" >&5 
     3812EOF 
     3813 
     3814fi 
     3815 
     3816echo "$as_me:3816: checking for sys/timeb.h" >&5 
    68533817echo $ECHO_N "checking for sys/timeb.h... $ECHO_C" >&6 
    68543818if test "${ac_cv_header_sys_timeb_h+set}" = set; then 
    68553819  echo $ECHO_N "(cached) $ECHO_C" >&6 
    6856 fi 
    6857 echo "$as_me:$LINENO: result: $ac_cv_header_sys_timeb_h" >&5 
    6858 echo "${ECHO_T}$ac_cv_header_sys_timeb_h" >&6 
    6859 else 
    6860   # Is the header compilable? 
    6861 echo "$as_me:$LINENO: checking sys/timeb.h usability" >&5 
    6862 echo $ECHO_N "checking sys/timeb.h usability... $ECHO_C" >&6 
    6863 cat >conftest.$ac_ext <<_ACEOF 
    6864 /* confdefs.h.  */ 
    6865 _ACEOF 
    6866 cat confdefs.h >>conftest.$ac_ext 
    6867 cat >>conftest.$ac_ext <<_ACEOF 
    6868 /* end confdefs.h.  */ 
    6869 $ac_includes_default 
     3820else 
     3821  cat >conftest.$ac_ext <<_ACEOF 
     3822#line 3822 "configure" 
     3823#include "confdefs.h" 
    68703824#include <sys/timeb.h> 
    68713825_ACEOF 
    6872 rm -f conftest.$ac_objext 
    6873 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    6874   (eval $ac_compile) 2>conftest.er1 
    6875   ac_status=$? 
    6876   grep -v '^ *+' conftest.er1 >conftest.err 
     3826if { (eval echo "$as_me:3826: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3827  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3828  ac_status=$? 
     3829  egrep -v '^ *\+' conftest.er1 >conftest.err 
    68773830  rm -f conftest.er1 
    68783831  cat conftest.err >&5 
    6879   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6880   (exit $ac_status); } && 
    6881          { ac_try='test -z "$ac_c_werror_flag" 
    6882                          || test ! -s conftest.err' 
    6883   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6884   (eval $ac_try) 2>&5 
    6885   ac_status=$? 
    6886   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6887   (exit $ac_status); }; } && 
    6888          { ac_try='test -s conftest.$ac_objext' 
    6889   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    6890   (eval $ac_try) 2>&5 
    6891   ac_status=$? 
    6892   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    6893   (exit $ac_status); }; }; then 
    6894   ac_header_compiler=yes 
    6895 else 
    6896   echo "$as_me: failed program was:" >&5 
    6897 sed 's/^/| /' conftest.$ac_ext >&5 
    6898  
    6899 ac_header_compiler=no 
    6900 fi 
    6901 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    6902 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    6903 echo "${ECHO_T}$ac_header_compiler" >&6 
    6904  
    6905 # Is the header present? 
    6906 echo "$as_me:$LINENO: checking sys/timeb.h presence" >&5 
    6907 echo $ECHO_N "checking sys/timeb.h presence... $ECHO_C" >&6 
    6908 cat >conftest.$ac_ext <<_ACEOF 
    6909 /* confdefs.h.  */ 
    6910 _ACEOF 
    6911 cat confdefs.h >>conftest.$ac_ext 
    6912 cat >>conftest.$ac_ext <<_ACEOF 
    6913 /* end confdefs.h.  */ 
    6914 #include <sys/timeb.h> 
    6915 _ACEOF 
    6916 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    6917   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    6918   ac_status=$? 
    6919   grep -v '^ *+' conftest.er1 >conftest.err 
    6920   rm -f conftest.er1 
    6921   cat conftest.err >&5 
    6922   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3832  echo "$as_me:3832: \$? = $ac_status" >&5 
    69233833  (exit $ac_status); } >/dev/null; then 
    69243834  if test -s conftest.err; then 
    69253835    ac_cpp_err=$ac_c_preproc_warn_flag 
    6926     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    69273836  else 
    69283837    ac_cpp_err= 
     
    69323841fi 
    69333842if test -z "$ac_cpp_err"; then 
    6934   ac_header_preproc=yes 
    6935 else 
    6936   echo "$as_me: failed program was:" >&5 
    6937 sed 's/^/| /' conftest.$ac_ext >&5 
    6938  
    6939   ac_header_preproc=no 
     3843  ac_cv_header_sys_timeb_h=yes 
     3844else 
     3845  echo "$as_me: failed program was:" >&5 
     3846  cat conftest.$ac_ext >&5 
     3847  ac_cv_header_sys_timeb_h=no 
    69403848fi 
    69413849rm -f conftest.err conftest.$ac_ext 
    6942 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    6943 echo "${ECHO_T}$ac_header_preproc" >&6 
    6944  
    6945 # So?  What about this header? 
    6946 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    6947   yes:no: ) 
    6948     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    6949 echo "$as_me: WARNING: sys/timeb.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    6950     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: proceeding with the compiler's result" >&5 
    6951 echo "$as_me: WARNING: sys/timeb.h: proceeding with the compiler's result" >&2;} 
    6952     ac_header_preproc=yes 
    6953     ;; 
    6954   no:yes:* ) 
    6955     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: present but cannot be compiled" >&5 
    6956 echo "$as_me: WARNING: sys/timeb.h: present but cannot be compiled" >&2;} 
    6957     { echo "$as_me:$LINENO: WARNING: sys/timeb.h:     check for missing prerequisite headers?" >&5 
    6958 echo "$as_me: WARNING: sys/timeb.h:     check for missing prerequisite headers?" >&2;} 
    6959     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: see the Autoconf documentation" >&5 
    6960 echo "$as_me: WARNING: sys/timeb.h: see the Autoconf documentation" >&2;} 
    6961     { echo "$as_me:$LINENO: WARNING: sys/timeb.h:     section \"Present But Cannot Be Compiled\"" >&5 
    6962 echo "$as_me: WARNING: sys/timeb.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    6963     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: proceeding with the preprocessor's result" >&5 
    6964 echo "$as_me: WARNING: sys/timeb.h: proceeding with the preprocessor's result" >&2;} 
    6965     { echo "$as_me:$LINENO: WARNING: sys/timeb.h: in the future, the compiler will take precedence" >&5 
    6966 echo "$as_me: WARNING: sys/timeb.h: in the future, the compiler will take precedence" >&2;} 
    6967     ( 
    6968       cat <<\_ASBOX 
    6969 ## ------------------------------------ ## 
    6970 ## Report this to the pjproject lists.  ## 
    6971 ## ------------------------------------ ## 
    6972 _ASBOX 
    6973     ) | 
    6974       sed "s/^/$as_me: WARNING:     /" >&2 
    6975     ;; 
    6976 esac 
    6977 echo "$as_me:$LINENO: checking for sys/timeb.h" >&5 
    6978 echo $ECHO_N "checking for sys/timeb.h... $ECHO_C" >&6 
    6979 if test "${ac_cv_header_sys_timeb_h+set}" = set; then 
    6980   echo $ECHO_N "(cached) $ECHO_C" >&6 
    6981 else 
    6982   ac_cv_header_sys_timeb_h=$ac_header_preproc 
    6983 fi 
    6984 echo "$as_me:$LINENO: result: $ac_cv_header_sys_timeb_h" >&5 
     3850fi 
     3851echo "$as_me:3851: result: $ac_cv_header_sys_timeb_h" >&5 
    69853852echo "${ECHO_T}$ac_cv_header_sys_timeb_h" >&6 
    6986  
    6987 fi 
    69883853if test $ac_cv_header_sys_timeb_h = yes; then 
    6989   cat >>confdefs.h <<\_ACEOF 
     3854  cat >>confdefs.h <<\EOF 
    69903855#define PJ_HAS_SYS_TIMEB_H 1 
    6991 _ACEOF 
    6992  
    6993 fi 
    6994  
    6995  
    6996 if test "${ac_cv_header_sys_types_h+set}" = set; then 
    6997   echo "$as_me:$LINENO: checking for sys/types.h" >&5 
     3856EOF 
     3857 
     3858fi 
     3859 
     3860echo "$as_me:3860: checking for sys/types.h" >&5 
    69983861echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 
    69993862if test "${ac_cv_header_sys_types_h+set}" = set; then 
    70003863  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7001 fi 
    7002 echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 
    7003 echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 
    7004 else 
    7005   # Is the header compilable? 
    7006 echo "$as_me:$LINENO: checking sys/types.h usability" >&5 
    7007 echo $ECHO_N "checking sys/types.h usability... $ECHO_C" >&6 
    7008 cat >conftest.$ac_ext <<_ACEOF 
    7009 /* confdefs.h.  */ 
    7010 _ACEOF 
    7011 cat confdefs.h >>conftest.$ac_ext 
    7012 cat >>conftest.$ac_ext <<_ACEOF 
    7013 /* end confdefs.h.  */ 
    7014 $ac_includes_default 
     3864else 
     3865  cat >conftest.$ac_ext <<_ACEOF 
     3866#line 3866 "configure" 
     3867#include "confdefs.h" 
    70153868#include <sys/types.h> 
    70163869_ACEOF 
    7017 rm -f conftest.$ac_objext 
    7018 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7019   (eval $ac_compile) 2>conftest.er1 
    7020   ac_status=$? 
    7021   grep -v '^ *+' conftest.er1 >conftest.err 
     3870if { (eval echo "$as_me:3870: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3871  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3872  ac_status=$? 
     3873  egrep -v '^ *\+' conftest.er1 >conftest.err 
    70223874  rm -f conftest.er1 
    70233875  cat conftest.err >&5 
    7024   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7025   (exit $ac_status); } && 
    7026          { ac_try='test -z "$ac_c_werror_flag" 
    7027                          || test ! -s conftest.err' 
    7028   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7029   (eval $ac_try) 2>&5 
    7030   ac_status=$? 
    7031   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7032   (exit $ac_status); }; } && 
    7033          { ac_try='test -s conftest.$ac_objext' 
    7034   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7035   (eval $ac_try) 2>&5 
    7036   ac_status=$? 
    7037   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7038   (exit $ac_status); }; }; then 
    7039   ac_header_compiler=yes 
    7040 else 
    7041   echo "$as_me: failed program was:" >&5 
    7042 sed 's/^/| /' conftest.$ac_ext >&5 
    7043  
    7044 ac_header_compiler=no 
    7045 fi 
    7046 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7047 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7048 echo "${ECHO_T}$ac_header_compiler" >&6 
    7049  
    7050 # Is the header present? 
    7051 echo "$as_me:$LINENO: checking sys/types.h presence" >&5 
    7052 echo $ECHO_N "checking sys/types.h presence... $ECHO_C" >&6 
    7053 cat >conftest.$ac_ext <<_ACEOF 
    7054 /* confdefs.h.  */ 
    7055 _ACEOF 
    7056 cat confdefs.h >>conftest.$ac_ext 
    7057 cat >>conftest.$ac_ext <<_ACEOF 
    7058 /* end confdefs.h.  */ 
    7059 #include <sys/types.h> 
    7060 _ACEOF 
    7061 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7062   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7063   ac_status=$? 
    7064   grep -v '^ *+' conftest.er1 >conftest.err 
    7065   rm -f conftest.er1 
    7066   cat conftest.err >&5 
    7067   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3876  echo "$as_me:3876: \$? = $ac_status" >&5 
    70683877  (exit $ac_status); } >/dev/null; then 
    70693878  if test -s conftest.err; then 
    70703879    ac_cpp_err=$ac_c_preproc_warn_flag 
    7071     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    70723880  else 
    70733881    ac_cpp_err= 
     
    70773885fi 
    70783886if test -z "$ac_cpp_err"; then 
    7079   ac_header_preproc=yes 
    7080 else 
    7081   echo "$as_me: failed program was:" >&5 
    7082 sed 's/^/| /' conftest.$ac_ext >&5 
    7083  
    7084   ac_header_preproc=no 
     3887  ac_cv_header_sys_types_h=yes 
     3888else 
     3889  echo "$as_me: failed program was:" >&5 
     3890  cat conftest.$ac_ext >&5 
     3891  ac_cv_header_sys_types_h=no 
    70853892fi 
    70863893rm -f conftest.err conftest.$ac_ext 
    7087 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7088 echo "${ECHO_T}$ac_header_preproc" >&6 
    7089  
    7090 # So?  What about this header? 
    7091 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7092   yes:no: ) 
    7093     { echo "$as_me:$LINENO: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7094 echo "$as_me: WARNING: sys/types.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7095     { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the compiler's result" >&5 
    7096 echo "$as_me: WARNING: sys/types.h: proceeding with the compiler's result" >&2;} 
    7097     ac_header_preproc=yes 
    7098     ;; 
    7099   no:yes:* ) 
    7100     { echo "$as_me:$LINENO: WARNING: sys/types.h: present but cannot be compiled" >&5 
    7101 echo "$as_me: WARNING: sys/types.h: present but cannot be compiled" >&2;} 
    7102     { echo "$as_me:$LINENO: WARNING: sys/types.h:     check for missing prerequisite headers?" >&5 
    7103 echo "$as_me: WARNING: sys/types.h:     check for missing prerequisite headers?" >&2;} 
    7104     { echo "$as_me:$LINENO: WARNING: sys/types.h: see the Autoconf documentation" >&5 
    7105 echo "$as_me: WARNING: sys/types.h: see the Autoconf documentation" >&2;} 
    7106     { echo "$as_me:$LINENO: WARNING: sys/types.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7107 echo "$as_me: WARNING: sys/types.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7108     { echo "$as_me:$LINENO: WARNING: sys/types.h: proceeding with the preprocessor's result" >&5 
    7109 echo "$as_me: WARNING: sys/types.h: proceeding with the preprocessor's result" >&2;} 
    7110     { echo "$as_me:$LINENO: WARNING: sys/types.h: in the future, the compiler will take precedence" >&5 
    7111 echo "$as_me: WARNING: sys/types.h: in the future, the compiler will take precedence" >&2;} 
    7112     ( 
    7113       cat <<\_ASBOX 
    7114 ## ------------------------------------ ## 
    7115 ## Report this to the pjproject lists.  ## 
    7116 ## ------------------------------------ ## 
    7117 _ASBOX 
    7118     ) | 
    7119       sed "s/^/$as_me: WARNING:     /" >&2 
    7120     ;; 
    7121 esac 
    7122 echo "$as_me:$LINENO: checking for sys/types.h" >&5 
    7123 echo $ECHO_N "checking for sys/types.h... $ECHO_C" >&6 
    7124 if test "${ac_cv_header_sys_types_h+set}" = set; then 
    7125   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7126 else 
    7127   ac_cv_header_sys_types_h=$ac_header_preproc 
    7128 fi 
    7129 echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h" >&5 
     3894fi 
     3895echo "$as_me:3895: result: $ac_cv_header_sys_types_h" >&5 
    71303896echo "${ECHO_T}$ac_cv_header_sys_types_h" >&6 
    7131  
    7132 fi 
    71333897if test $ac_cv_header_sys_types_h = yes; then 
    7134   cat >>confdefs.h <<\_ACEOF 
     3898  cat >>confdefs.h <<\EOF 
    71353899#define PJ_HAS_SYS_TYPES_H 1 
    7136 _ACEOF 
    7137  
    7138 fi 
    7139  
    7140  
    7141 if test "${ac_cv_header_time_h+set}" = set; then 
    7142   echo "$as_me:$LINENO: checking for time.h" >&5 
     3900EOF 
     3901 
     3902fi 
     3903 
     3904echo "$as_me:3904: checking for time.h" >&5 
    71433905echo $ECHO_N "checking for time.h... $ECHO_C" >&6 
    71443906if test "${ac_cv_header_time_h+set}" = set; then 
    71453907  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7146 fi 
    7147 echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 
    7148 echo "${ECHO_T}$ac_cv_header_time_h" >&6 
    7149 else 
    7150   # Is the header compilable? 
    7151 echo "$as_me:$LINENO: checking time.h usability" >&5 
    7152 echo $ECHO_N "checking time.h usability... $ECHO_C" >&6 
    7153 cat >conftest.$ac_ext <<_ACEOF 
    7154 /* confdefs.h.  */ 
    7155 _ACEOF 
    7156 cat confdefs.h >>conftest.$ac_ext 
    7157 cat >>conftest.$ac_ext <<_ACEOF 
    7158 /* end confdefs.h.  */ 
    7159 $ac_includes_default 
     3908else 
     3909  cat >conftest.$ac_ext <<_ACEOF 
     3910#line 3910 "configure" 
     3911#include "confdefs.h" 
    71603912#include <time.h> 
    71613913_ACEOF 
    7162 rm -f conftest.$ac_objext 
    7163 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7164   (eval $ac_compile) 2>conftest.er1 
    7165   ac_status=$? 
    7166   grep -v '^ *+' conftest.er1 >conftest.err 
     3914if { (eval echo "$as_me:3914: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3915  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3916  ac_status=$? 
     3917  egrep -v '^ *\+' conftest.er1 >conftest.err 
    71673918  rm -f conftest.er1 
    71683919  cat conftest.err >&5 
    7169   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7170   (exit $ac_status); } && 
    7171          { ac_try='test -z "$ac_c_werror_flag" 
    7172                          || test ! -s conftest.err' 
    7173   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7174   (eval $ac_try) 2>&5 
    7175   ac_status=$? 
    7176   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7177   (exit $ac_status); }; } && 
    7178          { ac_try='test -s conftest.$ac_objext' 
    7179   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7180   (eval $ac_try) 2>&5 
    7181   ac_status=$? 
    7182   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7183   (exit $ac_status); }; }; then 
    7184   ac_header_compiler=yes 
    7185 else 
    7186   echo "$as_me: failed program was:" >&5 
    7187 sed 's/^/| /' conftest.$ac_ext >&5 
    7188  
    7189 ac_header_compiler=no 
    7190 fi 
    7191 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7192 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7193 echo "${ECHO_T}$ac_header_compiler" >&6 
    7194  
    7195 # Is the header present? 
    7196 echo "$as_me:$LINENO: checking time.h presence" >&5 
    7197 echo $ECHO_N "checking time.h presence... $ECHO_C" >&6 
    7198 cat >conftest.$ac_ext <<_ACEOF 
    7199 /* confdefs.h.  */ 
    7200 _ACEOF 
    7201 cat confdefs.h >>conftest.$ac_ext 
    7202 cat >>conftest.$ac_ext <<_ACEOF 
    7203 /* end confdefs.h.  */ 
    7204 #include <time.h> 
    7205 _ACEOF 
    7206 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7207   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7208   ac_status=$? 
    7209   grep -v '^ *+' conftest.er1 >conftest.err 
    7210   rm -f conftest.er1 
    7211   cat conftest.err >&5 
    7212   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3920  echo "$as_me:3920: \$? = $ac_status" >&5 
    72133921  (exit $ac_status); } >/dev/null; then 
    72143922  if test -s conftest.err; then 
    72153923    ac_cpp_err=$ac_c_preproc_warn_flag 
    7216     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    72173924  else 
    72183925    ac_cpp_err= 
     
    72223929fi 
    72233930if test -z "$ac_cpp_err"; then 
    7224   ac_header_preproc=yes 
    7225 else 
    7226   echo "$as_me: failed program was:" >&5 
    7227 sed 's/^/| /' conftest.$ac_ext >&5 
    7228  
    7229   ac_header_preproc=no 
     3931  ac_cv_header_time_h=yes 
     3932else 
     3933  echo "$as_me: failed program was:" >&5 
     3934  cat conftest.$ac_ext >&5 
     3935  ac_cv_header_time_h=no 
    72303936fi 
    72313937rm -f conftest.err conftest.$ac_ext 
    7232 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7233 echo "${ECHO_T}$ac_header_preproc" >&6 
    7234  
    7235 # So?  What about this header? 
    7236 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7237   yes:no: ) 
    7238     { echo "$as_me:$LINENO: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7239 echo "$as_me: WARNING: time.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7240     { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the compiler's result" >&5 
    7241 echo "$as_me: WARNING: time.h: proceeding with the compiler's result" >&2;} 
    7242     ac_header_preproc=yes 
    7243     ;; 
    7244   no:yes:* ) 
    7245     { echo "$as_me:$LINENO: WARNING: time.h: present but cannot be compiled" >&5 
    7246 echo "$as_me: WARNING: time.h: present but cannot be compiled" >&2;} 
    7247     { echo "$as_me:$LINENO: WARNING: time.h:     check for missing prerequisite headers?" >&5 
    7248 echo "$as_me: WARNING: time.h:     check for missing prerequisite headers?" >&2;} 
    7249     { echo "$as_me:$LINENO: WARNING: time.h: see the Autoconf documentation" >&5 
    7250 echo "$as_me: WARNING: time.h: see the Autoconf documentation" >&2;} 
    7251     { echo "$as_me:$LINENO: WARNING: time.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7252 echo "$as_me: WARNING: time.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7253     { echo "$as_me:$LINENO: WARNING: time.h: proceeding with the preprocessor's result" >&5 
    7254 echo "$as_me: WARNING: time.h: proceeding with the preprocessor's result" >&2;} 
    7255     { echo "$as_me:$LINENO: WARNING: time.h: in the future, the compiler will take precedence" >&5 
    7256 echo "$as_me: WARNING: time.h: in the future, the compiler will take precedence" >&2;} 
    7257     ( 
    7258       cat <<\_ASBOX 
    7259 ## ------------------------------------ ## 
    7260 ## Report this to the pjproject lists.  ## 
    7261 ## ------------------------------------ ## 
    7262 _ASBOX 
    7263     ) | 
    7264       sed "s/^/$as_me: WARNING:     /" >&2 
    7265     ;; 
    7266 esac 
    7267 echo "$as_me:$LINENO: checking for time.h" >&5 
    7268 echo $ECHO_N "checking for time.h... $ECHO_C" >&6 
    7269 if test "${ac_cv_header_time_h+set}" = set; then 
    7270   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7271 else 
    7272   ac_cv_header_time_h=$ac_header_preproc 
    7273 fi 
    7274 echo "$as_me:$LINENO: result: $ac_cv_header_time_h" >&5 
     3938fi 
     3939echo "$as_me:3939: result: $ac_cv_header_time_h" >&5 
    72753940echo "${ECHO_T}$ac_cv_header_time_h" >&6 
    7276  
    7277 fi 
    72783941if test $ac_cv_header_time_h = yes; then 
    7279   cat >>confdefs.h <<\_ACEOF 
     3942  cat >>confdefs.h <<\EOF 
    72803943#define PJ_HAS_TIME_H 1 
    7281 _ACEOF 
    7282  
    7283 fi 
    7284  
    7285  
    7286 if test "${ac_cv_header_unistd_h+set}" = set; then 
    7287   echo "$as_me:$LINENO: checking for unistd.h" >&5 
     3944EOF 
     3945 
     3946fi 
     3947 
     3948echo "$as_me:3948: checking for unistd.h" >&5 
    72883949echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6 
    72893950if test "${ac_cv_header_unistd_h+set}" = set; then 
    72903951  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7291 fi 
    7292 echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 
    7293 echo "${ECHO_T}$ac_cv_header_unistd_h" >&6 
    7294 else 
    7295   # Is the header compilable? 
    7296 echo "$as_me:$LINENO: checking unistd.h usability" >&5 
    7297 echo $ECHO_N "checking unistd.h usability... $ECHO_C" >&6 
    7298 cat >conftest.$ac_ext <<_ACEOF 
    7299 /* confdefs.h.  */ 
    7300 _ACEOF 
    7301 cat confdefs.h >>conftest.$ac_ext 
    7302 cat >>conftest.$ac_ext <<_ACEOF 
    7303 /* end confdefs.h.  */ 
    7304 $ac_includes_default 
     3952else 
     3953  cat >conftest.$ac_ext <<_ACEOF 
     3954#line 3954 "configure" 
     3955#include "confdefs.h" 
    73053956#include <unistd.h> 
    73063957_ACEOF 
    7307 rm -f conftest.$ac_objext 
    7308 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7309   (eval $ac_compile) 2>conftest.er1 
    7310   ac_status=$? 
    7311   grep -v '^ *+' conftest.er1 >conftest.err 
     3958if { (eval echo "$as_me:3958: \"$ac_cpp conftest.$ac_ext\"") >&5 
     3959  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     3960  ac_status=$? 
     3961  egrep -v '^ *\+' conftest.er1 >conftest.err 
    73123962  rm -f conftest.er1 
    73133963  cat conftest.err >&5 
    7314   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7315   (exit $ac_status); } && 
    7316          { ac_try='test -z "$ac_c_werror_flag" 
    7317                          || test ! -s conftest.err' 
    7318   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7319   (eval $ac_try) 2>&5 
    7320   ac_status=$? 
    7321   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7322   (exit $ac_status); }; } && 
    7323          { ac_try='test -s conftest.$ac_objext' 
    7324   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7325   (eval $ac_try) 2>&5 
    7326   ac_status=$? 
    7327   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7328   (exit $ac_status); }; }; then 
    7329   ac_header_compiler=yes 
    7330 else 
    7331   echo "$as_me: failed program was:" >&5 
    7332 sed 's/^/| /' conftest.$ac_ext >&5 
    7333  
    7334 ac_header_compiler=no 
    7335 fi 
    7336 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7337 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7338 echo "${ECHO_T}$ac_header_compiler" >&6 
    7339  
    7340 # Is the header present? 
    7341 echo "$as_me:$LINENO: checking unistd.h presence" >&5 
    7342 echo $ECHO_N "checking unistd.h presence... $ECHO_C" >&6 
    7343 cat >conftest.$ac_ext <<_ACEOF 
    7344 /* confdefs.h.  */ 
    7345 _ACEOF 
    7346 cat confdefs.h >>conftest.$ac_ext 
    7347 cat >>conftest.$ac_ext <<_ACEOF 
    7348 /* end confdefs.h.  */ 
    7349 #include <unistd.h> 
    7350 _ACEOF 
    7351 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7352   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7353   ac_status=$? 
    7354   grep -v '^ *+' conftest.er1 >conftest.err 
    7355   rm -f conftest.er1 
    7356   cat conftest.err >&5 
    7357   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     3964  echo "$as_me:3964: \$? = $ac_status" >&5 
    73583965  (exit $ac_status); } >/dev/null; then 
    73593966  if test -s conftest.err; then 
    73603967    ac_cpp_err=$ac_c_preproc_warn_flag 
    7361     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    73623968  else 
    73633969    ac_cpp_err= 
     
    73673973fi 
    73683974if test -z "$ac_cpp_err"; then 
    7369   ac_header_preproc=yes 
    7370 else 
    7371   echo "$as_me: failed program was:" >&5 
    7372 sed 's/^/| /' conftest.$ac_ext >&5 
    7373  
    7374   ac_header_preproc=no 
     3975  ac_cv_header_unistd_h=yes 
     3976else 
     3977  echo "$as_me: failed program was:" >&5 
     3978  cat conftest.$ac_ext >&5 
     3979  ac_cv_header_unistd_h=no 
    73753980fi 
    73763981rm -f conftest.err conftest.$ac_ext 
    7377 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7378 echo "${ECHO_T}$ac_header_preproc" >&6 
    7379  
    7380 # So?  What about this header? 
    7381 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7382   yes:no: ) 
    7383     { echo "$as_me:$LINENO: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7384 echo "$as_me: WARNING: unistd.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7385     { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the compiler's result" >&5 
    7386 echo "$as_me: WARNING: unistd.h: proceeding with the compiler's result" >&2;} 
    7387     ac_header_preproc=yes 
    7388     ;; 
    7389   no:yes:* ) 
    7390     { echo "$as_me:$LINENO: WARNING: unistd.h: present but cannot be compiled" >&5 
    7391 echo "$as_me: WARNING: unistd.h: present but cannot be compiled" >&2;} 
    7392     { echo "$as_me:$LINENO: WARNING: unistd.h:     check for missing prerequisite headers?" >&5 
    7393 echo "$as_me: WARNING: unistd.h:     check for missing prerequisite headers?" >&2;} 
    7394     { echo "$as_me:$LINENO: WARNING: unistd.h: see the Autoconf documentation" >&5 
    7395 echo "$as_me: WARNING: unistd.h: see the Autoconf documentation" >&2;} 
    7396     { echo "$as_me:$LINENO: WARNING: unistd.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7397 echo "$as_me: WARNING: unistd.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7398     { echo "$as_me:$LINENO: WARNING: unistd.h: proceeding with the preprocessor's result" >&5 
    7399 echo "$as_me: WARNING: unistd.h: proceeding with the preprocessor's result" >&2;} 
    7400     { echo "$as_me:$LINENO: WARNING: unistd.h: in the future, the compiler will take precedence" >&5 
    7401 echo "$as_me: WARNING: unistd.h: in the future, the compiler will take precedence" >&2;} 
    7402     ( 
    7403       cat <<\_ASBOX 
    7404 ## ------------------------------------ ## 
    7405 ## Report this to the pjproject lists.  ## 
    7406 ## ------------------------------------ ## 
    7407 _ASBOX 
    7408     ) | 
    7409       sed "s/^/$as_me: WARNING:     /" >&2 
    7410     ;; 
    7411 esac 
    7412 echo "$as_me:$LINENO: checking for unistd.h" >&5 
    7413 echo $ECHO_N "checking for unistd.h... $ECHO_C" >&6 
    7414 if test "${ac_cv_header_unistd_h+set}" = set; then 
    7415   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7416 else 
    7417   ac_cv_header_unistd_h=$ac_header_preproc 
    7418 fi 
    7419 echo "$as_me:$LINENO: result: $ac_cv_header_unistd_h" >&5 
     3982fi 
     3983echo "$as_me:3983: result: $ac_cv_header_unistd_h" >&5 
    74203984echo "${ECHO_T}$ac_cv_header_unistd_h" >&6 
    7421  
    7422 fi 
    74233985if test $ac_cv_header_unistd_h = yes; then 
    7424   cat >>confdefs.h <<\_ACEOF 
     3986  cat >>confdefs.h <<\EOF 
    74253987#define PJ_HAS_UNISTD_H 1 
    7426 _ACEOF 
    7427  
    7428 fi 
    7429  
    7430  
    7431 if test "${ac_cv_header_mswsock_h+set}" = set; then 
    7432   echo "$as_me:$LINENO: checking for mswsock.h" >&5 
     3988EOF 
     3989 
     3990fi 
     3991 
     3992echo "$as_me:3992: checking for mswsock.h" >&5 
    74333993echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6 
    74343994if test "${ac_cv_header_mswsock_h+set}" = set; then 
    74353995  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7436 fi 
    7437 echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5 
    7438 echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6 
    7439 else 
    7440   # Is the header compilable? 
    7441 echo "$as_me:$LINENO: checking mswsock.h usability" >&5 
    7442 echo $ECHO_N "checking mswsock.h usability... $ECHO_C" >&6 
    7443 cat >conftest.$ac_ext <<_ACEOF 
    7444 /* confdefs.h.  */ 
    7445 _ACEOF 
    7446 cat confdefs.h >>conftest.$ac_ext 
    7447 cat >>conftest.$ac_ext <<_ACEOF 
    7448 /* end confdefs.h.  */ 
    7449 $ac_includes_default 
     3996else 
     3997  cat >conftest.$ac_ext <<_ACEOF 
     3998#line 3998 "configure" 
     3999#include "confdefs.h" 
    74504000#include <mswsock.h> 
    74514001_ACEOF 
    7452 rm -f conftest.$ac_objext 
    7453 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7454   (eval $ac_compile) 2>conftest.er1 
    7455   ac_status=$? 
    7456   grep -v '^ *+' conftest.er1 >conftest.err 
     4002if { (eval echo "$as_me:4002: \"$ac_cpp conftest.$ac_ext\"") >&5 
     4003  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     4004  ac_status=$? 
     4005  egrep -v '^ *\+' conftest.er1 >conftest.err 
    74574006  rm -f conftest.er1 
    74584007  cat conftest.err >&5 
    7459   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7460   (exit $ac_status); } && 
    7461          { ac_try='test -z "$ac_c_werror_flag" 
    7462                          || test ! -s conftest.err' 
    7463   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7464   (eval $ac_try) 2>&5 
    7465   ac_status=$? 
    7466   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7467   (exit $ac_status); }; } && 
    7468          { ac_try='test -s conftest.$ac_objext' 
    7469   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7470   (eval $ac_try) 2>&5 
    7471   ac_status=$? 
    7472   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7473   (exit $ac_status); }; }; then 
    7474   ac_header_compiler=yes 
    7475 else 
    7476   echo "$as_me: failed program was:" >&5 
    7477 sed 's/^/| /' conftest.$ac_ext >&5 
    7478  
    7479 ac_header_compiler=no 
    7480 fi 
    7481 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7482 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7483 echo "${ECHO_T}$ac_header_compiler" >&6 
    7484  
    7485 # Is the header present? 
    7486 echo "$as_me:$LINENO: checking mswsock.h presence" >&5 
    7487 echo $ECHO_N "checking mswsock.h presence... $ECHO_C" >&6 
    7488 cat >conftest.$ac_ext <<_ACEOF 
    7489 /* confdefs.h.  */ 
    7490 _ACEOF 
    7491 cat confdefs.h >>conftest.$ac_ext 
    7492 cat >>conftest.$ac_ext <<_ACEOF 
    7493 /* end confdefs.h.  */ 
    7494 #include <mswsock.h> 
    7495 _ACEOF 
    7496 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7497   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7498   ac_status=$? 
    7499   grep -v '^ *+' conftest.er1 >conftest.err 
    7500   rm -f conftest.er1 
    7501   cat conftest.err >&5 
    7502   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4008  echo "$as_me:4008: \$? = $ac_status" >&5 
    75034009  (exit $ac_status); } >/dev/null; then 
    75044010  if test -s conftest.err; then 
    75054011    ac_cpp_err=$ac_c_preproc_warn_flag 
    7506     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    75074012  else 
    75084013    ac_cpp_err= 
     
    75124017fi 
    75134018if test -z "$ac_cpp_err"; then 
    7514   ac_header_preproc=yes 
    7515 else 
    7516   echo "$as_me: failed program was:" >&5 
    7517 sed 's/^/| /' conftest.$ac_ext >&5 
    7518  
    7519   ac_header_preproc=no 
     4019  ac_cv_header_mswsock_h=yes 
     4020else 
     4021  echo "$as_me: failed program was:" >&5 
     4022  cat conftest.$ac_ext >&5 
     4023  ac_cv_header_mswsock_h=no 
    75204024fi 
    75214025rm -f conftest.err conftest.$ac_ext 
    7522 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7523 echo "${ECHO_T}$ac_header_preproc" >&6 
    7524  
    7525 # So?  What about this header? 
    7526 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7527   yes:no: ) 
    7528     { echo "$as_me:$LINENO: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7529 echo "$as_me: WARNING: mswsock.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7530     { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the compiler's result" >&5 
    7531 echo "$as_me: WARNING: mswsock.h: proceeding with the compiler's result" >&2;} 
    7532     ac_header_preproc=yes 
    7533     ;; 
    7534   no:yes:* ) 
    7535     { echo "$as_me:$LINENO: WARNING: mswsock.h: present but cannot be compiled" >&5 
    7536 echo "$as_me: WARNING: mswsock.h: present but cannot be compiled" >&2;} 
    7537     { echo "$as_me:$LINENO: WARNING: mswsock.h:     check for missing prerequisite headers?" >&5 
    7538 echo "$as_me: WARNING: mswsock.h:     check for missing prerequisite headers?" >&2;} 
    7539     { echo "$as_me:$LINENO: WARNING: mswsock.h: see the Autoconf documentation" >&5 
    7540 echo "$as_me: WARNING: mswsock.h: see the Autoconf documentation" >&2;} 
    7541     { echo "$as_me:$LINENO: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7542 echo "$as_me: WARNING: mswsock.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7543     { echo "$as_me:$LINENO: WARNING: mswsock.h: proceeding with the preprocessor's result" >&5 
    7544 echo "$as_me: WARNING: mswsock.h: proceeding with the preprocessor's result" >&2;} 
    7545     { echo "$as_me:$LINENO: WARNING: mswsock.h: in the future, the compiler will take precedence" >&5 
    7546 echo "$as_me: WARNING: mswsock.h: in the future, the compiler will take precedence" >&2;} 
    7547     ( 
    7548       cat <<\_ASBOX 
    7549 ## ------------------------------------ ## 
    7550 ## Report this to the pjproject lists.  ## 
    7551 ## ------------------------------------ ## 
    7552 _ASBOX 
    7553     ) | 
    7554       sed "s/^/$as_me: WARNING:     /" >&2 
    7555     ;; 
    7556 esac 
    7557 echo "$as_me:$LINENO: checking for mswsock.h" >&5 
    7558 echo $ECHO_N "checking for mswsock.h... $ECHO_C" >&6 
    7559 if test "${ac_cv_header_mswsock_h+set}" = set; then 
    7560   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7561 else 
    7562   ac_cv_header_mswsock_h=$ac_header_preproc 
    7563 fi 
    7564 echo "$as_me:$LINENO: result: $ac_cv_header_mswsock_h" >&5 
     4026fi 
     4027echo "$as_me:4027: result: $ac_cv_header_mswsock_h" >&5 
    75654028echo "${ECHO_T}$ac_cv_header_mswsock_h" >&6 
    7566  
    7567 fi 
    75684029if test $ac_cv_header_mswsock_h = yes; then 
    7569   cat >>confdefs.h <<\_ACEOF 
     4030  cat >>confdefs.h <<\EOF 
    75704031#define PJ_HAS_MSWSOCK_H 1 
    7571 _ACEOF 
    7572  
    7573 fi 
    7574  
    7575  
    7576 if test "${ac_cv_header_winsock_h+set}" = set; then 
    7577   echo "$as_me:$LINENO: checking for winsock.h" >&5 
     4032EOF 
     4033 
     4034fi 
     4035 
     4036echo "$as_me:4036: checking for winsock.h" >&5 
    75784037echo $ECHO_N "checking for winsock.h... $ECHO_C" >&6 
    75794038if test "${ac_cv_header_winsock_h+set}" = set; then 
    75804039  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7581 fi 
    7582 echo "$as_me:$LINENO: result: $ac_cv_header_winsock_h" >&5 
    7583 echo "${ECHO_T}$ac_cv_header_winsock_h" >&6 
    7584 else 
    7585   # Is the header compilable? 
    7586 echo "$as_me:$LINENO: checking winsock.h usability" >&5 
    7587 echo $ECHO_N "checking winsock.h usability... $ECHO_C" >&6 
    7588 cat >conftest.$ac_ext <<_ACEOF 
    7589 /* confdefs.h.  */ 
    7590 _ACEOF 
    7591 cat confdefs.h >>conftest.$ac_ext 
    7592 cat >>conftest.$ac_ext <<_ACEOF 
    7593 /* end confdefs.h.  */ 
    7594 $ac_includes_default 
     4040else 
     4041  cat >conftest.$ac_ext <<_ACEOF 
     4042#line 4042 "configure" 
     4043#include "confdefs.h" 
    75954044#include <winsock.h> 
    75964045_ACEOF 
    7597 rm -f conftest.$ac_objext 
    7598 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7599   (eval $ac_compile) 2>conftest.er1 
    7600   ac_status=$? 
    7601   grep -v '^ *+' conftest.er1 >conftest.err 
     4046if { (eval echo "$as_me:4046: \"$ac_cpp conftest.$ac_ext\"") >&5 
     4047  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     4048  ac_status=$? 
     4049  egrep -v '^ *\+' conftest.er1 >conftest.err 
    76024050  rm -f conftest.er1 
    76034051  cat conftest.err >&5 
    7604   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7605   (exit $ac_status); } && 
    7606          { ac_try='test -z "$ac_c_werror_flag" 
    7607                          || test ! -s conftest.err' 
    7608   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7609   (eval $ac_try) 2>&5 
    7610   ac_status=$? 
    7611   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7612   (exit $ac_status); }; } && 
    7613          { ac_try='test -s conftest.$ac_objext' 
    7614   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7615   (eval $ac_try) 2>&5 
    7616   ac_status=$? 
    7617   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7618   (exit $ac_status); }; }; then 
    7619   ac_header_compiler=yes 
    7620 else 
    7621   echo "$as_me: failed program was:" >&5 
    7622 sed 's/^/| /' conftest.$ac_ext >&5 
    7623  
    7624 ac_header_compiler=no 
    7625 fi 
    7626 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7627 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7628 echo "${ECHO_T}$ac_header_compiler" >&6 
    7629  
    7630 # Is the header present? 
    7631 echo "$as_me:$LINENO: checking winsock.h presence" >&5 
    7632 echo $ECHO_N "checking winsock.h presence... $ECHO_C" >&6 
    7633 cat >conftest.$ac_ext <<_ACEOF 
    7634 /* confdefs.h.  */ 
    7635 _ACEOF 
    7636 cat confdefs.h >>conftest.$ac_ext 
    7637 cat >>conftest.$ac_ext <<_ACEOF 
    7638 /* end confdefs.h.  */ 
    7639 #include <winsock.h> 
    7640 _ACEOF 
    7641 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7643   ac_status=$? 
    7644   grep -v '^ *+' conftest.er1 >conftest.err 
    7645   rm -f conftest.er1 
    7646   cat conftest.err >&5 
    7647   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4052  echo "$as_me:4052: \$? = $ac_status" >&5 
    76484053  (exit $ac_status); } >/dev/null; then 
    76494054  if test -s conftest.err; then 
    76504055    ac_cpp_err=$ac_c_preproc_warn_flag 
    7651     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    76524056  else 
    76534057    ac_cpp_err= 
     
    76574061fi 
    76584062if test -z "$ac_cpp_err"; then 
    7659   ac_header_preproc=yes 
    7660 else 
    7661   echo "$as_me: failed program was:" >&5 
    7662 sed 's/^/| /' conftest.$ac_ext >&5 
    7663  
    7664   ac_header_preproc=no 
     4063  ac_cv_header_winsock_h=yes 
     4064else 
     4065  echo "$as_me: failed program was:" >&5 
     4066  cat conftest.$ac_ext >&5 
     4067  ac_cv_header_winsock_h=no 
    76654068fi 
    76664069rm -f conftest.err conftest.$ac_ext 
    7667 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7668 echo "${ECHO_T}$ac_header_preproc" >&6 
    7669  
    7670 # So?  What about this header? 
    7671 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7672   yes:no: ) 
    7673     { echo "$as_me:$LINENO: WARNING: winsock.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7674 echo "$as_me: WARNING: winsock.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7675     { echo "$as_me:$LINENO: WARNING: winsock.h: proceeding with the compiler's result" >&5 
    7676 echo "$as_me: WARNING: winsock.h: proceeding with the compiler's result" >&2;} 
    7677     ac_header_preproc=yes 
    7678     ;; 
    7679   no:yes:* ) 
    7680     { echo "$as_me:$LINENO: WARNING: winsock.h: present but cannot be compiled" >&5 
    7681 echo "$as_me: WARNING: winsock.h: present but cannot be compiled" >&2;} 
    7682     { echo "$as_me:$LINENO: WARNING: winsock.h:     check for missing prerequisite headers?" >&5 
    7683 echo "$as_me: WARNING: winsock.h:     check for missing prerequisite headers?" >&2;} 
    7684     { echo "$as_me:$LINENO: WARNING: winsock.h: see the Autoconf documentation" >&5 
    7685 echo "$as_me: WARNING: winsock.h: see the Autoconf documentation" >&2;} 
    7686     { echo "$as_me:$LINENO: WARNING: winsock.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7687 echo "$as_me: WARNING: winsock.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7688     { echo "$as_me:$LINENO: WARNING: winsock.h: proceeding with the preprocessor's result" >&5 
    7689 echo "$as_me: WARNING: winsock.h: proceeding with the preprocessor's result" >&2;} 
    7690     { echo "$as_me:$LINENO: WARNING: winsock.h: in the future, the compiler will take precedence" >&5 
    7691 echo "$as_me: WARNING: winsock.h: in the future, the compiler will take precedence" >&2;} 
    7692     ( 
    7693       cat <<\_ASBOX 
    7694 ## ------------------------------------ ## 
    7695 ## Report this to the pjproject lists.  ## 
    7696 ## ------------------------------------ ## 
    7697 _ASBOX 
    7698     ) | 
    7699       sed "s/^/$as_me: WARNING:     /" >&2 
    7700     ;; 
    7701 esac 
    7702 echo "$as_me:$LINENO: checking for winsock.h" >&5 
    7703 echo $ECHO_N "checking for winsock.h... $ECHO_C" >&6 
    7704 if test "${ac_cv_header_winsock_h+set}" = set; then 
    7705   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7706 else 
    7707   ac_cv_header_winsock_h=$ac_header_preproc 
    7708 fi 
    7709 echo "$as_me:$LINENO: result: $ac_cv_header_winsock_h" >&5 
     4070fi 
     4071echo "$as_me:4071: result: $ac_cv_header_winsock_h" >&5 
    77104072echo "${ECHO_T}$ac_cv_header_winsock_h" >&6 
    7711  
    7712 fi 
    77134073if test $ac_cv_header_winsock_h = yes; then 
    7714   cat >>confdefs.h <<\_ACEOF 
     4074  cat >>confdefs.h <<\EOF 
    77154075#define PJ_HAS_WINSOCK_H 1 
    7716 _ACEOF 
    7717  
    7718 fi 
    7719  
    7720  
    7721 if test "${ac_cv_header_winsock2_h+set}" = set; then 
    7722   echo "$as_me:$LINENO: checking for winsock2.h" >&5 
     4076EOF 
     4077 
     4078fi 
     4079 
     4080echo "$as_me:4080: checking for winsock2.h" >&5 
    77234081echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6 
    77244082if test "${ac_cv_header_winsock2_h+set}" = set; then 
    77254083  echo $ECHO_N "(cached) $ECHO_C" >&6 
    7726 fi 
    7727 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5 
    7728 echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6 
    7729 else 
    7730   # Is the header compilable? 
    7731 echo "$as_me:$LINENO: checking winsock2.h usability" >&5 
    7732 echo $ECHO_N "checking winsock2.h usability... $ECHO_C" >&6 
    7733 cat >conftest.$ac_ext <<_ACEOF 
    7734 /* confdefs.h.  */ 
    7735 _ACEOF 
    7736 cat confdefs.h >>conftest.$ac_ext 
    7737 cat >>conftest.$ac_ext <<_ACEOF 
    7738 /* end confdefs.h.  */ 
    7739 $ac_includes_default 
     4084else 
     4085  cat >conftest.$ac_ext <<_ACEOF 
     4086#line 4086 "configure" 
     4087#include "confdefs.h" 
    77404088#include <winsock2.h> 
    77414089_ACEOF 
    7742 rm -f conftest.$ac_objext 
    7743 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7744   (eval $ac_compile) 2>conftest.er1 
    7745   ac_status=$? 
    7746   grep -v '^ *+' conftest.er1 >conftest.err 
     4090if { (eval echo "$as_me:4090: \"$ac_cpp conftest.$ac_ext\"") >&5 
     4091  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     4092  ac_status=$? 
     4093  egrep -v '^ *\+' conftest.er1 >conftest.err 
    77474094  rm -f conftest.er1 
    77484095  cat conftest.err >&5 
    7749   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7750   (exit $ac_status); } && 
    7751          { ac_try='test -z "$ac_c_werror_flag" 
    7752                          || test ! -s conftest.err' 
    7753   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7754   (eval $ac_try) 2>&5 
    7755   ac_status=$? 
    7756   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7757   (exit $ac_status); }; } && 
    7758          { ac_try='test -s conftest.$ac_objext' 
    7759   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7760   (eval $ac_try) 2>&5 
    7761   ac_status=$? 
    7762   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7763   (exit $ac_status); }; }; then 
    7764   ac_header_compiler=yes 
    7765 else 
    7766   echo "$as_me: failed program was:" >&5 
    7767 sed 's/^/| /' conftest.$ac_ext >&5 
    7768  
    7769 ac_header_compiler=no 
    7770 fi 
    7771 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7772 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    7773 echo "${ECHO_T}$ac_header_compiler" >&6 
    7774  
    7775 # Is the header present? 
    7776 echo "$as_me:$LINENO: checking winsock2.h presence" >&5 
    7777 echo $ECHO_N "checking winsock2.h presence... $ECHO_C" >&6 
    7778 cat >conftest.$ac_ext <<_ACEOF 
    7779 /* confdefs.h.  */ 
    7780 _ACEOF 
    7781 cat confdefs.h >>conftest.$ac_ext 
    7782 cat >>conftest.$ac_ext <<_ACEOF 
    7783 /* end confdefs.h.  */ 
    7784 #include <winsock2.h> 
    7785 _ACEOF 
    7786 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    7787   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    7788   ac_status=$? 
    7789   grep -v '^ *+' conftest.er1 >conftest.err 
    7790   rm -f conftest.er1 
    7791   cat conftest.err >&5 
    7792   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4096  echo "$as_me:4096: \$? = $ac_status" >&5 
    77934097  (exit $ac_status); } >/dev/null; then 
    77944098  if test -s conftest.err; then 
    77954099    ac_cpp_err=$ac_c_preproc_warn_flag 
    7796     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    77974100  else 
    77984101    ac_cpp_err= 
     
    78024105fi 
    78034106if test -z "$ac_cpp_err"; then 
    7804   ac_header_preproc=yes 
    7805 else 
    7806   echo "$as_me: failed program was:" >&5 
    7807 sed 's/^/| /' conftest.$ac_ext >&5 
    7808  
    7809   ac_header_preproc=no 
     4107  ac_cv_header_winsock2_h=yes 
     4108else 
     4109  echo "$as_me: failed program was:" >&5 
     4110  cat conftest.$ac_ext >&5 
     4111  ac_cv_header_winsock2_h=no 
    78104112fi 
    78114113rm -f conftest.err conftest.$ac_ext 
    7812 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    7813 echo "${ECHO_T}$ac_header_preproc" >&6 
    7814  
    7815 # So?  What about this header? 
    7816 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    7817   yes:no: ) 
    7818     { echo "$as_me:$LINENO: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    7819 echo "$as_me: WARNING: winsock2.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    7820     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the compiler's result" >&5 
    7821 echo "$as_me: WARNING: winsock2.h: proceeding with the compiler's result" >&2;} 
    7822     ac_header_preproc=yes 
    7823     ;; 
    7824   no:yes:* ) 
    7825     { echo "$as_me:$LINENO: WARNING: winsock2.h: present but cannot be compiled" >&5 
    7826 echo "$as_me: WARNING: winsock2.h: present but cannot be compiled" >&2;} 
    7827     { echo "$as_me:$LINENO: WARNING: winsock2.h:     check for missing prerequisite headers?" >&5 
    7828 echo "$as_me: WARNING: winsock2.h:     check for missing prerequisite headers?" >&2;} 
    7829     { echo "$as_me:$LINENO: WARNING: winsock2.h: see the Autoconf documentation" >&5 
    7830 echo "$as_me: WARNING: winsock2.h: see the Autoconf documentation" >&2;} 
    7831     { echo "$as_me:$LINENO: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&5 
    7832 echo "$as_me: WARNING: winsock2.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    7833     { echo "$as_me:$LINENO: WARNING: winsock2.h: proceeding with the preprocessor's result" >&5 
    7834 echo "$as_me: WARNING: winsock2.h: proceeding with the preprocessor's result" >&2;} 
    7835     { echo "$as_me:$LINENO: WARNING: winsock2.h: in the future, the compiler will take precedence" >&5 
    7836 echo "$as_me: WARNING: winsock2.h: in the future, the compiler will take precedence" >&2;} 
    7837     ( 
    7838       cat <<\_ASBOX 
    7839 ## ------------------------------------ ## 
    7840 ## Report this to the pjproject lists.  ## 
    7841 ## ------------------------------------ ## 
    7842 _ASBOX 
    7843     ) | 
    7844       sed "s/^/$as_me: WARNING:     /" >&2 
    7845     ;; 
    7846 esac 
    7847 echo "$as_me:$LINENO: checking for winsock2.h" >&5 
    7848 echo $ECHO_N "checking for winsock2.h... $ECHO_C" >&6 
    7849 if test "${ac_cv_header_winsock2_h+set}" = set; then 
    7850   echo $ECHO_N "(cached) $ECHO_C" >&6 
    7851 else 
    7852   ac_cv_header_winsock2_h=$ac_header_preproc 
    7853 fi 
    7854 echo "$as_me:$LINENO: result: $ac_cv_header_winsock2_h" >&5 
     4114fi 
     4115echo "$as_me:4115: result: $ac_cv_header_winsock2_h" >&5 
    78554116echo "${ECHO_T}$ac_cv_header_winsock2_h" >&6 
    7856  
    7857 fi 
    78584117if test $ac_cv_header_winsock2_h = yes; then 
    7859   cat >>confdefs.h <<\_ACEOF 
     4118  cat >>confdefs.h <<\EOF 
    78604119#define PJ_HAS_WINSOCK2_H 1 
    7861 _ACEOF 
    7862  
    7863 fi 
    7864  
    7865  
    7866  
    7867 echo "$as_me:$LINENO: result: Setting PJ_OS_NAME to $target" >&5 
     4120EOF 
     4121 
     4122fi 
     4123 
     4124echo "$as_me:4124: result: Setting PJ_OS_NAME to $target" >&5 
    78684125echo "${ECHO_T}Setting PJ_OS_NAME to $target" >&6 
    7869 cat >>confdefs.h <<_ACEOF 
     4126cat >>confdefs.h <<EOF 
    78704127#define PJ_OS_NAME "$target" 
    7871 _ACEOF 
    7872  
    7873  
    7874 echo "$as_me:$LINENO: result: Setting PJ_HAS_ERRNO_VAR to 1" >&5 
     4128EOF 
     4129 
     4130echo "$as_me:4130: result: Setting PJ_HAS_ERRNO_VAR to 1" >&5 
    78754131echo "${ECHO_T}Setting PJ_HAS_ERRNO_VAR to 1" >&6 
    7876 cat >>confdefs.h <<\_ACEOF 
     4132cat >>confdefs.h <<\EOF 
    78774133#define PJ_HAS_ERRNO_VAR 1 
    7878 _ACEOF 
    7879  
    7880  
    7881 echo "$as_me:$LINENO: result: Setting PJ_HAS_HIGH_RES_TIMER to 1" >&5 
     4134EOF 
     4135 
     4136echo "$as_me:4136: result: Setting PJ_HAS_HIGH_RES_TIMER to 1" >&5 
    78824137echo "${ECHO_T}Setting PJ_HAS_HIGH_RES_TIMER to 1" >&6 
    7883 cat >>confdefs.h <<\_ACEOF 
     4138cat >>confdefs.h <<\EOF 
    78844139#define PJ_HAS_HIGH_RES_TIMER 1 
    7885 _ACEOF 
    7886  
    7887  
    7888 echo "$as_me:$LINENO: result: Setting PJ_HAS_MALLOC to 1" >&5 
     4140EOF 
     4141 
     4142echo "$as_me:4142: result: Setting PJ_HAS_MALLOC to 1" >&5 
    78894143echo "${ECHO_T}Setting PJ_HAS_MALLOC to 1" >&6 
    7890 cat >>confdefs.h <<\_ACEOF 
     4144cat >>confdefs.h <<\EOF 
    78914145#define PJ_HAS_MALLOC 1 
    7892 _ACEOF 
    7893  
    7894  
    7895 echo "$as_me:$LINENO: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&5 
     4146EOF 
     4147 
     4148echo "$as_me:4148: result: Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&5 
    78964149echo "${ECHO_T}Setting PJ_NATIVE_STRING_IS_UNICODE to 0" >&6 
    7897 cat >>confdefs.h <<\_ACEOF 
     4150cat >>confdefs.h <<\EOF 
    78984151#define PJ_NATIVE_STRING_IS_UNICODE 0 
    7899 _ACEOF 
    7900  
    7901  
    7902 echo "$as_me:$LINENO: result: Setting PJ_ATOMIC_VALUE_TYPE to long" >&5 
     4152EOF 
     4153 
     4154echo "$as_me:4154: result: Setting PJ_ATOMIC_VALUE_TYPE to long" >&5 
    79034155echo "${ECHO_T}Setting PJ_ATOMIC_VALUE_TYPE to long" >&6 
    7904 cat >>confdefs.h <<\_ACEOF 
     4156cat >>confdefs.h <<\EOF 
    79054157#define PJ_ATOMIC_VALUE_TYPE long 
    7906 _ACEOF 
    7907  
    7908  
    7909 echo "$as_me:$LINENO: checking if inet_aton is available" >&5 
     4158EOF 
     4159 
     4160echo "$as_me:4160: checking if inet_aton is available" >&5 
    79104161echo $ECHO_N "checking if inet_aton is available... $ECHO_C" >&6 
    79114162cat >conftest.$ac_ext <<_ACEOF 
    7912 /* confdefs.h.  */ 
    7913 _ACEOF 
    7914 cat confdefs.h >>conftest.$ac_ext 
    7915 cat >>conftest.$ac_ext <<_ACEOF 
    7916 /* end confdefs.h.  */ 
     4163#line 4163 "configure" 
     4164#include "confdefs.h" 
    79174165#include <arpa/inet.h> 
    79184166int 
     
    79254173_ACEOF 
    79264174rm -f conftest.$ac_objext 
    7927 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7928   (eval $ac_compile) 2>conftest.er1 
    7929   ac_status=$? 
    7930   grep -v '^ *+' conftest.er1 >conftest.err 
    7931   rm -f conftest.er1 
    7932   cat conftest.err >&5 
    7933   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4175if { (eval echo "$as_me:4175: \"$ac_compile\"") >&5 
     4176  (eval $ac_compile) 2>&5 
     4177  ac_status=$? 
     4178  echo "$as_me:4178: \$? = $ac_status" >&5 
    79344179  (exit $ac_status); } && 
    7935          { ac_try='test -z "$ac_c_werror_flag" 
    7936                          || test ! -s conftest.err' 
    7937   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     4180         { ac_try='test -s conftest.$ac_objext' 
     4181  { (eval echo "$as_me:4181: \"$ac_try\"") >&5 
    79384182  (eval $ac_try) 2>&5 
    79394183  ac_status=$? 
    7940   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7941   (exit $ac_status); }; } && 
    7942          { ac_try='test -s conftest.$ac_objext' 
    7943   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    7944   (eval $ac_try) 2>&5 
    7945   ac_status=$? 
    7946   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4184  echo "$as_me:4184: \$? = $ac_status" >&5 
    79474185  (exit $ac_status); }; }; then 
    7948   cat >>confdefs.h <<\_ACEOF 
     4186  cat >>confdefs.h <<\EOF 
    79494187#define PJ_SOCK_HAS_INET_ATON 1 
    7950 _ACEOF 
    7951  
    7952                    echo "$as_me:$LINENO: result: yes" >&5 
     4188EOF 
     4189 
     4190                   echo "$as_me:4190: result: yes" >&5 
    79534191echo "${ECHO_T}yes" >&6 
    79544192else 
    79554193  echo "$as_me: failed program was:" >&5 
    7956 sed 's/^/| /' conftest.$ac_ext >&5 
    7957  
    7958 echo "$as_me:$LINENO: result: no" >&5 
     4194cat conftest.$ac_ext >&5 
     4195echo "$as_me:4195: result: no" >&5 
    79594196echo "${ECHO_T}no" >&6 
    79604197fi 
    7961 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    7962  
    7963 echo "$as_me:$LINENO: checking if sockaddr_in has sin_len member" >&5 
     4198rm -f conftest.$ac_objext conftest.$ac_ext 
     4199 
     4200echo "$as_me:4200: checking if sockaddr_in has sin_len member" >&5 
    79644201echo $ECHO_N "checking if sockaddr_in has sin_len member... $ECHO_C" >&6 
    79654202cat >conftest.$ac_ext <<_ACEOF 
    7966 /* confdefs.h.  */ 
    7967 _ACEOF 
    7968 cat confdefs.h >>conftest.$ac_ext 
    7969 cat >>conftest.$ac_ext <<_ACEOF 
    7970 /* end confdefs.h.  */ 
     4203#line 4203 "configure" 
     4204#include "confdefs.h" 
    79714205#include <sys/types.h> 
    79724206                                     #include <sys/socket.h> 
     
    79824216_ACEOF 
    79834217rm -f conftest.$ac_objext 
    7984 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    7985   (eval $ac_compile) 2>conftest.er1 
    7986   ac_status=$? 
    7987   grep -v '^ *+' conftest.er1 >conftest.err 
    7988   rm -f conftest.er1 
    7989   cat conftest.err >&5 
    7990   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4218if { (eval echo "$as_me:4218: \"$ac_compile\"") >&5 
     4219  (eval $ac_compile) 2>&5 
     4220  ac_status=$? 
     4221  echo "$as_me:4221: \$? = $ac_status" >&5 
    79914222  (exit $ac_status); } && 
    7992          { ac_try='test -z "$ac_c_werror_flag" 
    7993                          || test ! -s conftest.err' 
    7994   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     4223         { ac_try='test -s conftest.$ac_objext' 
     4224  { (eval echo "$as_me:4224: \"$ac_try\"") >&5 
    79954225  (eval $ac_try) 2>&5 
    79964226  ac_status=$? 
    7997   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    7998   (exit $ac_status); }; } && 
    7999          { ac_try='test -s conftest.$ac_objext' 
    8000   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8001   (eval $ac_try) 2>&5 
    8002   ac_status=$? 
    8003   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4227  echo "$as_me:4227: \$? = $ac_status" >&5 
    80044228  (exit $ac_status); }; }; then 
    8005   cat >>confdefs.h <<\_ACEOF 
     4229  cat >>confdefs.h <<\EOF 
    80064230#define PJ_SOCKADDR_HAS_LEN 1 
    8007 _ACEOF 
    8008  
    8009                    echo "$as_me:$LINENO: result: yes" >&5 
     4231EOF 
     4232 
     4233                   echo "$as_me:4233: result: yes" >&5 
    80104234echo "${ECHO_T}yes" >&6 
    80114235else 
    80124236  echo "$as_me: failed program was:" >&5 
    8013 sed 's/^/| /' conftest.$ac_ext >&5 
    8014  
    8015 echo "$as_me:$LINENO: result: no" >&5 
     4237cat conftest.$ac_ext >&5 
     4238echo "$as_me:4238: result: no" >&5 
    80164239echo "${ECHO_T}no" >&6 
    80174240fi 
    8018 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    8019  
    8020 echo "$as_me:$LINENO: checking if socklen_t is available" >&5 
     4241rm -f conftest.$ac_objext conftest.$ac_ext 
     4242 
     4243echo "$as_me:4243: checking if socklen_t is available" >&5 
    80214244echo $ECHO_N "checking if socklen_t is available... $ECHO_C" >&6 
    80224245cat >conftest.$ac_ext <<_ACEOF 
    8023 /* confdefs.h.  */ 
    8024 _ACEOF 
    8025 cat confdefs.h >>conftest.$ac_ext 
    8026 cat >>conftest.$ac_ext <<_ACEOF 
    8027 /* end confdefs.h.  */ 
     4246#line 4246 "configure" 
     4247#include "confdefs.h" 
    80284248#include <sys/socket.h> 
    80294249int 
     
    80364256_ACEOF 
    80374257rm -f conftest.$ac_objext 
    8038 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    8039   (eval $ac_compile) 2>conftest.er1 
    8040   ac_status=$? 
    8041   grep -v '^ *+' conftest.er1 >conftest.err 
    8042   rm -f conftest.er1 
    8043   cat conftest.err >&5 
    8044   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4258if { (eval echo "$as_me:4258: \"$ac_compile\"") >&5 
     4259  (eval $ac_compile) 2>&5 
     4260  ac_status=$? 
     4261  echo "$as_me:4261: \$? = $ac_status" >&5 
    80454262  (exit $ac_status); } && 
    8046          { ac_try='test -z "$ac_c_werror_flag" 
    8047                          || test ! -s conftest.err' 
    8048   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     4263         { ac_try='test -s conftest.$ac_objext' 
     4264  { (eval echo "$as_me:4264: \"$ac_try\"") >&5 
    80494265  (eval $ac_try) 2>&5 
    80504266  ac_status=$? 
    8051   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8052   (exit $ac_status); }; } && 
    8053          { ac_try='test -s conftest.$ac_objext' 
    8054   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8055   (eval $ac_try) 2>&5 
    8056   ac_status=$? 
    8057   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4267  echo "$as_me:4267: \$? = $ac_status" >&5 
    80584268  (exit $ac_status); }; }; then 
    8059   cat >>confdefs.h <<\_ACEOF 
     4269  cat >>confdefs.h <<\EOF 
    80604270#define PJ_HAS_SOCKLEN_T 1 
    8061 _ACEOF 
    8062  
    8063                    echo "$as_me:$LINENO: result: yes" >&5 
     4271EOF 
     4272 
     4273                   echo "$as_me:4273: result: yes" >&5 
    80644274echo "${ECHO_T}yes" >&6 
    80654275else 
    80664276  echo "$as_me: failed program was:" >&5 
    8067 sed 's/^/| /' conftest.$ac_ext >&5 
    8068  
    8069 echo "$as_me:$LINENO: result: no" >&5 
     4277cat conftest.$ac_ext >&5 
     4278echo "$as_me:4278: result: no" >&5 
    80704279echo "${ECHO_T}no" >&6 
    80714280fi 
    8072 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    8073  
    8074 echo "$as_me:$LINENO: checking if SO_ERROR is available" >&5 
     4281rm -f conftest.$ac_objext conftest.$ac_ext 
     4282 
     4283echo "$as_me:4283: checking if SO_ERROR is available" >&5 
    80754284echo $ECHO_N "checking if SO_ERROR is available... $ECHO_C" >&6 
    80764285case $target in 
    80774286    *mingw* | *cygw* | *win32* | *w32* ) 
    8078         cat >>confdefs.h <<\_ACEOF 
     4287        cat >>confdefs.h <<\EOF 
    80794288#define PJ_HAS_SO_ERROR 1 
    8080 _ACEOF 
    8081  
    8082         echo "$as_me:$LINENO: result: yes" >&5 
     4289EOF 
     4290 
     4291        echo "$as_me:4291: result: yes" >&5 
    80834292echo "${ECHO_T}yes" >&6 
    80844293        ;; 
    80854294    *) 
    80864295        cat >conftest.$ac_ext <<_ACEOF 
    8087 /* confdefs.h.  */ 
    8088 _ACEOF 
    8089 cat confdefs.h >>conftest.$ac_ext 
    8090 cat >>conftest.$ac_ext <<_ACEOF 
    8091 /* end confdefs.h.  */ 
     4296#line 4296 "configure" 
     4297#include "confdefs.h" 
    80924298#include <sys/types.h> 
    80934299                                             #include <sys/socket.h> 
     
    81034309_ACEOF 
    81044310rm -f conftest.$ac_objext 
    8105 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    8106   (eval $ac_compile) 2>conftest.er1 
    8107   ac_status=$? 
    8108   grep -v '^ *+' conftest.er1 >conftest.err 
    8109   rm -f conftest.er1 
    8110   cat conftest.err >&5 
    8111   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4311if { (eval echo "$as_me:4311: \"$ac_compile\"") >&5 
     4312  (eval $ac_compile) 2>&5 
     4313  ac_status=$? 
     4314  echo "$as_me:4314: \$? = $ac_status" >&5 
    81124315  (exit $ac_status); } && 
    8113          { ac_try='test -z "$ac_c_werror_flag" 
    8114                          || test ! -s conftest.err' 
    8115   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     4316         { ac_try='test -s conftest.$ac_objext' 
     4317  { (eval echo "$as_me:4317: \"$ac_try\"") >&5 
    81164318  (eval $ac_try) 2>&5 
    81174319  ac_status=$? 
    8118   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8119   (exit $ac_status); }; } && 
    8120          { ac_try='test -s conftest.$ac_objext' 
    8121   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8122   (eval $ac_try) 2>&5 
    8123   ac_status=$? 
    8124   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4320  echo "$as_me:4320: \$? = $ac_status" >&5 
    81254321  (exit $ac_status); }; }; then 
    8126   cat >>confdefs.h <<\_ACEOF 
     4322  cat >>confdefs.h <<\EOF 
    81274323#define PJ_HAS_SO_ERROR 1 
    8128 _ACEOF 
    8129  
    8130                            echo "$as_me:$LINENO: result: yes" >&5 
     4324EOF 
     4325 
     4326                           echo "$as_me:4326: result: yes" >&5 
    81314327echo "${ECHO_T}yes" >&6 
    81324328else 
    81334329  echo "$as_me: failed program was:" >&5 
    8134 sed 's/^/| /' conftest.$ac_ext >&5 
    8135  
    8136 echo "$as_me:$LINENO: result: no" >&5 
     4330cat conftest.$ac_ext >&5 
     4331echo "$as_me:4331: result: no" >&5 
    81374332echo "${ECHO_T}no" >&6 
    81384333fi 
    8139 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
     4334rm -f conftest.$ac_objext conftest.$ac_ext 
    81404335        ;; 
    81414336esac 
    81424337 
    8143  
    8144 echo "$as_me:$LINENO: checking if pthread_rwlock_t is available" >&5 
     4338echo "$as_me:4338: checking if pthread_rwlock_t is available" >&5 
    81454339echo $ECHO_N "checking if pthread_rwlock_t is available... $ECHO_C" >&6 
    81464340cat >conftest.$ac_ext <<_ACEOF 
    8147 /* confdefs.h.  */ 
    8148 _ACEOF 
    8149 cat confdefs.h >>conftest.$ac_ext 
    8150 cat >>conftest.$ac_ext <<_ACEOF 
    8151 /* end confdefs.h.  */ 
     4341#line 4341 "configure" 
     4342#include "confdefs.h" 
    81524343#include <pthread.h> 
    81534344int 
     
    81604351_ACEOF 
    81614352rm -f conftest.$ac_objext 
    8162 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    8163   (eval $ac_compile) 2>conftest.er1 
    8164   ac_status=$? 
    8165   grep -v '^ *+' conftest.er1 >conftest.err 
    8166   rm -f conftest.er1 
    8167   cat conftest.err >&5 
    8168   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4353if { (eval echo "$as_me:4353: \"$ac_compile\"") >&5 
     4354  (eval $ac_compile) 2>&5 
     4355  ac_status=$? 
     4356  echo "$as_me:4356: \$? = $ac_status" >&5 
    81694357  (exit $ac_status); } && 
    8170          { ac_try='test -z "$ac_c_werror_flag" 
    8171                          || test ! -s conftest.err' 
    8172   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
     4358         { ac_try='test -s conftest.$ac_objext' 
     4359  { (eval echo "$as_me:4359: \"$ac_try\"") >&5 
    81734360  (eval $ac_try) 2>&5 
    81744361  ac_status=$? 
    8175   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8176   (exit $ac_status); }; } && 
    8177          { ac_try='test -s conftest.$ac_objext' 
    8178   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8179   (eval $ac_try) 2>&5 
    8180   ac_status=$? 
    8181   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4362  echo "$as_me:4362: \$? = $ac_status" >&5 
    81824363  (exit $ac_status); }; }; then 
    8183   cat >>confdefs.h <<\_ACEOF 
     4364  cat >>confdefs.h <<\EOF 
    81844365#define PJ_EMULATE_RWMUTEX 0 
    8185 _ACEOF 
    8186  
    8187                    echo "$as_me:$LINENO: result: yes" >&5 
     4366EOF 
     4367 
     4368                   echo "$as_me:4368: result: yes" >&5 
    81884369echo "${ECHO_T}yes" >&6 
    81894370else 
    81904371  echo "$as_me: failed program was:" >&5 
    8191 sed 's/^/| /' conftest.$ac_ext >&5 
    8192  
    8193 cat >>confdefs.h <<\_ACEOF 
     4372cat conftest.$ac_ext >&5 
     4373cat >>confdefs.h <<\EOF 
    81944374#define PJ_EMULATE_RWMUTEX 1 
    8195 _ACEOF 
    8196  
    8197                    echo "$as_me:$LINENO: result: no" >&5 
     4375EOF 
     4376 
     4377                   echo "$as_me:4377: result: no" >&5 
    81984378echo "${ECHO_T}no" >&6 
    81994379fi 
    8200 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    8201  
     4380rm -f conftest.$ac_objext conftest.$ac_ext 
    82024381 
    82034382case $target in 
     
    82104389esac 
    82114390 
    8212  
    8213  
    8214  
    82154391# Check whether --enable-sound or --disable-sound was given. 
    82164392if test "${enable_sound+set}" = set; then 
     
    82184394  if test "$enable_sound" = "no"; then 
    82194395                ac_pjmedia_snd=null 
    8220                 echo "$as_me:$LINENO: result: Checking if sound is disabled... yes" >&5 
     4396                echo "$as_me:4396: result: Checking if sound is disabled... yes" >&5 
    82214397echo "${ECHO_T}Checking if sound is disabled... yes" >&6 
    82224398               fi 
     
    82294405 case $target in 
    82304406  *darwin*) 
    8231         ac_pjmedia_snd=pa_darwinos 
    8232         echo "$as_me:$LINENO: result: Checking sound device backend... coreaudio" >&5 
     4407        LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" 
     4408        if test "`uname -r`" = "6.8"; then 
     4409                #ac_pa_cflags="-DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" 
     4410                #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) 
     4411                ac_pjmedia_snd=pa_old_darwinos 
     4412                echo "$as_me:4412: result: Checking sound device backend... old coreaudio" >&5 
     4413echo "${ECHO_T}Checking sound device backend... old coreaudio" >&6 
     4414        else 
     4415                ac_pjmedia_snd=pa_darwinos 
     4416                echo "$as_me:4416: result: Checking sound device backend... coreaudio" >&5 
    82334417echo "${ECHO_T}Checking sound device backend... coreaudio" >&6 
    8234         LIBS="$LIBS -framework CoreAudio" 
     4418        fi 
    82354419        ;; 
    82364420  *cygwin* | *mingw*) 
    82374421        ac_pjmedia_snd=pa_win32 
    8238         echo "$as_me:$LINENO: result: Checking sound device backend... win32 sound" >&5 
     4422        echo "$as_me:4422: result: Checking sound device backend... win32 sound" >&5 
    82394423echo "${ECHO_T}Checking sound device backend... win32 sound" >&6 
    82404424        ;; 
    82414425  *rtems*) 
    82424426        ac_pjmedia_snd=null 
    8243         echo "$as_me:$LINENO: result: Checking sound device backend... null sound" >&5 
     4427        echo "$as_me:4427: result: Checking sound device backend... null sound" >&5 
    82444428echo "${ECHO_T}Checking sound device backend... null sound" >&6 
    82454429        ;; 
    82464430  *) 
    82474431        ac_pjmedia_snd=pa_unix 
    8248         if test "${ac_cv_header_alsa_version_h+set}" = set; then 
    8249   echo "$as_me:$LINENO: checking for alsa/version.h" >&5 
     4432        echo "$as_me:4432: checking for alsa/version.h" >&5 
    82504433echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 
    82514434if test "${ac_cv_header_alsa_version_h+set}" = set; then 
    82524435  echo $ECHO_N "(cached) $ECHO_C" >&6 
    8253 fi 
    8254 echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 
    8255 echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 
    8256 else 
    8257   # Is the header compilable? 
    8258 echo "$as_me:$LINENO: checking alsa/version.h usability" >&5 
    8259 echo $ECHO_N "checking alsa/version.h usability... $ECHO_C" >&6 
    8260 cat >conftest.$ac_ext <<_ACEOF 
    8261 /* confdefs.h.  */ 
    8262 _ACEOF 
    8263 cat confdefs.h >>conftest.$ac_ext 
    8264 cat >>conftest.$ac_ext <<_ACEOF 
    8265 /* end confdefs.h.  */ 
    8266 $ac_includes_default 
     4436else 
     4437  cat >conftest.$ac_ext <<_ACEOF 
     4438#line 4438 "configure" 
     4439#include "confdefs.h" 
    82674440#include <alsa/version.h> 
    82684441_ACEOF 
    8269 rm -f conftest.$ac_objext 
    8270 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 
    8271   (eval $ac_compile) 2>conftest.er1 
    8272   ac_status=$? 
    8273   grep -v '^ *+' conftest.er1 >conftest.err 
     4442if { (eval echo "$as_me:4442: \"$ac_cpp conftest.$ac_ext\"") >&5 
     4443  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
     4444  ac_status=$? 
     4445  egrep -v '^ *\+' conftest.er1 >conftest.err 
    82744446  rm -f conftest.er1 
    82754447  cat conftest.err >&5 
    8276   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8277   (exit $ac_status); } && 
    8278          { ac_try='test -z "$ac_c_werror_flag" 
    8279                          || test ! -s conftest.err' 
    8280   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8281   (eval $ac_try) 2>&5 
    8282   ac_status=$? 
    8283   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8284   (exit $ac_status); }; } && 
    8285          { ac_try='test -s conftest.$ac_objext' 
    8286   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 
    8287   (eval $ac_try) 2>&5 
    8288   ac_status=$? 
    8289   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
    8290   (exit $ac_status); }; }; then 
    8291   ac_header_compiler=yes 
    8292 else 
    8293   echo "$as_me: failed program was:" >&5 
    8294 sed 's/^/| /' conftest.$ac_ext >&5 
    8295  
    8296 ac_header_compiler=no 
    8297 fi 
    8298 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext 
    8299 echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 
    8300 echo "${ECHO_T}$ac_header_compiler" >&6 
    8301  
    8302 # Is the header present? 
    8303 echo "$as_me:$LINENO: checking alsa/version.h presence" >&5 
    8304 echo $ECHO_N "checking alsa/version.h presence... $ECHO_C" >&6 
    8305 cat >conftest.$ac_ext <<_ACEOF 
    8306 /* confdefs.h.  */ 
    8307 _ACEOF 
    8308 cat confdefs.h >>conftest.$ac_ext 
    8309 cat >>conftest.$ac_ext <<_ACEOF 
    8310 /* end confdefs.h.  */ 
    8311 #include <alsa/version.h> 
    8312 _ACEOF 
    8313 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 
    8314   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 
    8315   ac_status=$? 
    8316   grep -v '^ *+' conftest.er1 >conftest.err 
    8317   rm -f conftest.er1 
    8318   cat conftest.err >&5 
    8319   echo "$as_me:$LINENO: \$? = $ac_status" >&5 
     4448  echo "$as_me:4448: \$? = $ac_status" >&5 
    83204449  (exit $ac_status); } >/dev/null; then 
    83214450  if test -s conftest.err; then 
    83224451    ac_cpp_err=$ac_c_preproc_warn_flag 
    8323     ac_cpp_err=$ac_cpp_err$ac_c_werror_flag 
    83244452  else 
    83254453    ac_cpp_err= 
     
    83294457fi 
    83304458if test -z "$ac_cpp_err"; then 
    8331   ac_header_preproc=yes 
    8332 else 
    8333   echo "$as_me: failed program was:" >&5 
    8334 sed 's/^/| /' conftest.$ac_ext >&5 
    8335  
    8336   ac_header_preproc=no 
     4459  ac_cv_header_alsa_version_h=yes 
     4460else 
     4461  echo "$as_me: failed program was:" >&5 
     4462  cat conftest.$ac_ext >&5 
     4463  ac_cv_header_alsa_version_h=no 
    83374464fi 
    83384465rm -f conftest.err conftest.$ac_ext 
    8339 echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 
    8340 echo "${ECHO_T}$ac_header_preproc" >&6 
    8341  
    8342 # So?  What about this header? 
    8343 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 
    8344   yes:no: ) 
    8345     { echo "$as_me:$LINENO: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&5 
    8346 echo "$as_me: WARNING: alsa/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;} 
    8347     { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the compiler's result" >&5 
    8348 echo "$as_me: WARNING: alsa/version.h: proceeding with the compiler's result" >&2;} 
    8349     ac_header_preproc=yes 
    8350     ;; 
    8351   no:yes:* ) 
    8352     { echo "$as_me:$LINENO: WARNING: alsa/version.h: present but cannot be compiled" >&5 
    8353 echo "$as_me: WARNING: alsa/version.h: present but cannot be compiled" >&2;} 
    8354     { echo "$as_me:$LINENO: WARNING: alsa/version.h:     check for missing prerequisite headers?" >&5 
    8355 echo "$as_me: WARNING: alsa/version.h:     check for missing prerequisite headers?" >&2;} 
    8356     { echo "$as_me:$LINENO: WARNING: alsa/version.h: see the Autoconf documentation" >&5 
    8357 echo "$as_me: WARNING: alsa/version.h: see the Autoconf documentation" >&2;} 
    8358     { echo "$as_me:$LINENO: WARNING: alsa/version.h:     section \"Present But Cannot Be Compiled\"" >&5 
    8359 echo "$as_me: WARNING: alsa/version.h:     section \"Present But Cannot Be Compiled\"" >&2;} 
    8360     { echo "$as_me:$LINENO: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&5 
    8361 echo "$as_me: WARNING: alsa/version.h: proceeding with the preprocessor's result" >&2;} 
    8362     { echo "$as_me:$LINENO: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&5 
    8363 echo "$as_me: WARNING: alsa/version.h: in the future, the compiler will take precedence" >&2;} 
    8364     ( 
    8365       cat <<\_ASBOX 
    8366 ## ------------------------------------ ## 
    8367 ## Report this to the pjproject lists.  ## 
    8368 ## ------------------------------------ ## 
    8369 _ASBOX 
    8370     ) | 
    8371       sed "s/^/$as_me: WARNING:     /" >&2 
    8372     ;; 
    8373 esac 
    8374 echo "$as_me:$LINENO: checking for alsa/version.h" >&5 
    8375 echo $ECHO_N "checking for alsa/version.h... $ECHO_C" >&6 
    8376 if test "${ac_cv_header_alsa_version_h+set}" = set; then 
    8377   echo $ECHO_N "(cached) $ECHO_C" >&6 
    8378 else 
    8379   ac_cv_header_alsa_version_h=$ac_header_preproc 
    8380 fi 
    8381 echo "$as_me:$LINENO: result: $ac_cv_header_alsa_version_h" >&5 
     4466fi 
     4467echo "$as_me:4467: result: $ac_cv_header_alsa_version_h" >&5 
    83824468echo "${ECHO_T}$ac_cv_header_alsa_version_h" >&6 
    8383  
    8384 fi 
    83854469if test $ac_cv_header_alsa_version_h = yes; then 
    83864470  ac_pa_use_alsa=1 
     
    83934477fi 
    83944478 
    8395  
    8396         echo "$as_me:$LINENO: result: Checking sound device backend... unix" >&5 
     4479        echo "$as_me:4479: result: Checking sound device backend... unix" >&5 
    83974480echo "${ECHO_T}Checking sound device backend... unix" >&6 
    83984481        ;; 
    83994482 esac 
    84004483fi 
    8401  
    84024484 
    84034485# Check whether --enable-small-filter or --disable-small-filter was given. 
     
    84064488  if test "$enable_small_filter" = "no"; then 
    84074489                ac_no_small_filter='-DPJMEDIA_HAS_SMALL_FILTER=0' 
    8408                 echo "$as_me:$LINENO: result: Checking if small filter is disabled... yes" >&5 
     4490                echo "$as_me:4490: result: Checking if small filter is disabled... yes" >&5 
    84094491echo "${ECHO_T}Checking if small filter is disabled... yes" >&6 
    84104492               fi 
    84114493else 
    8412   echo "$as_me:$LINENO: result: Checking if small filter is disabled... no" >&5 
     4494  echo "$as_me:4494: result: Checking if small filter is disabled... no" >&5 
    84134495echo "${ECHO_T}Checking if small filter is disabled... no" >&6 
    84144496fi; 
    8415  
    84164497 
    84174498# Check whether --enable-large-filter or --disable-large-filter was given. 
     
    84204501  if test "$enable_large_filter" = "no"; then 
    84214502                ac_no_large_filter='-DPJMEDIA_HAS_LARGE_FILTER=0' 
    8422                 echo "$as_me:$LINENO: result: Checking if large filter is disabled... yes" >&5 
     4503                echo "$as_me:4503: result: Checking if large filter is disabled... yes" >&5 
    84234504echo "${ECHO_T}Checking if large filter is disabled... yes" >&6 
    84244505               fi 
    84254506else 
    8426   echo "$as_me:$LINENO: result: Checking if large filter is disabled... no" >&5 
     4507  echo "$as_me:4507: result: Checking if large filter is disabled... no" >&5 
    84274508echo "${ECHO_T}Checking if large filter is disabled... no" >&6 
    84284509fi; 
    8429  
    84304510 
    84314511# Check whether --enable-g711-plc or --disable-g711-plc was given. 
     
    84344514  if test "$enable_g711_plc" = "no"; then 
    84354515                ac_no_g711_plc='-DPJMEDIA_HAS_G711_PLC=0' 
    8436                 echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...yes" >&5 
     4516                echo "$as_me:4516: result: Checking if G.711 Annex A PLC is disabled...yes" >&5 
    84374517echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...yes" >&6 
    84384518               fi 
    84394519else 
    8440   echo "$as_me:$LINENO: result: Checking if G.711 Annex A PLC is disabled...no" >&5 
     4520  echo "$as_me:4520: result: Checking if G.711 Annex A PLC is disabled...no" >&5 
    84414521echo "${ECHO_T}Checking if G.711 Annex A PLC is disabled...no" >&6 
    84424522fi; 
    8443  
    84444523 
    84454524# Check whether --enable-speex-aec or --disable-speex-aec was given. 
     
    84484527  if test "$enable_speex_aec" = "no"; then 
    84494528                ac_no_speex_aec='-DPJMEDIA_HAS_SPEEX_AEC=0' 
    8450                 echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...yes" >&5 
     4529                echo "$as_me:4529: result: Checking if Speex AEC is disabled...yes" >&5 
    84514530echo "${ECHO_T}Checking if Speex AEC is disabled...yes" >&6 
    84524531               fi 
    84534532else 
    8454   echo "$as_me:$LINENO: result: Checking if Speex AEC is disabled...no" >&5 
     4533  echo "$as_me:4533: result: Checking if Speex AEC is disabled...no" >&5 
    84554534echo "${ECHO_T}Checking if Speex AEC is disabled...no" >&6 
    84564535fi; 
    8457  
    84584536 
    84594537# Check whether --enable-g711-codec or --disable-g711-codec was given. 
     
    84624540  if test "$enable_g711_codec" = "no"; then 
    84634541                ac_no_g711_codec=1 
    8464                 echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...yes" >&5 
     4542                echo "$as_me:4542: result: Checking if G.711 codec is disabled...yes" >&5 
    84654543echo "${ECHO_T}Checking if G.711 codec is disabled...yes" >&6 
    84664544               fi 
    84674545else 
    8468   echo "$as_me:$LINENO: result: Checking if G.711 codec is disabled...no" >&5 
     4546  echo "$as_me:4546: result: Checking if G.711 codec is disabled...no" >&5 
    84694547echo "${ECHO_T}Checking if G.711 codec is disabled...no" >&6 
    84704548fi; 
    8471  
    8472  
    84734549 
    84744550# Check whether --enable-l16-codec or --disable-l16-codec was given. 
     
    84774553  if test "$enable_l16_codec" = "no"; then 
    84784554                ac_no_l16_codec=1 
    8479                 echo "$as_me:$LINENO: result: Checking if L16 codecs are disabled...yes" >&5 
     4555                echo "$as_me:4555: result: Checking if L16 codecs are disabled...yes" >&5 
    84804556echo "${ECHO_T}Checking if L16 codecs are disabled...yes" >&6 
    84814557               fi 
    84824558else 
    8483   echo "$as_me:$LINENO: result: Checking if L16 codec is disabled...no" >&5 
     4559  echo "$as_me:4559: result: Checking if L16 codec is disabled...no" >&5 
    84844560echo "${ECHO_T}Checking if L16 codec is disabled...no" >&6 
    84854561fi; 
    8486  
    8487  
    84884562 
    84894563# Check whether --enable-gsm-codec or --disable-gsm-codec was given. 
     
    84924566  if test "$enable_gsm_codec" = "no"; then 
    84934567                ac_no_gsm_codec=1 
    8494                 echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...yes" >&5 
     4568                echo "$as_me:4568: result: Checking if GSM codec is disabled...yes" >&5 
    84954569echo "${ECHO_T}Checking if GSM codec is disabled...yes" >&6 
    84964570               fi 
    84974571else 
    8498   echo "$as_me:$LINENO: result: Checking if GSM codec is disabled...no" >&5 
     4572  echo "$as_me:4572: result: Checking if GSM codec is disabled...no" >&5 
    84994573echo "${ECHO_T}Checking if GSM codec is disabled...no" >&6 
    85004574fi; 
    8501  
    85024575 
    85034576# Check whether --enable-speex-codec or --disable-speex-codec was given. 
     
    85064579  if test "$enable_speex_codec" = "no"; then 
    85074580                ac_no_speex_codec=1 
    8508                 echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...yes" >&5 
     4581                echo "$as_me:4581: result: Checking if Speex codec is disabled...yes" >&5 
    85094582echo "${ECHO_T}Checking if Speex codec is disabled...yes" >&6 
    85104583               fi 
    85114584else 
    8512   echo "$as_me:$LINENO: result: Checking if Speex codec is disabled...no" >&5 
     4585  echo "$as_me:4585: result: Checking if Speex codec is disabled...no" >&5 
    85134586echo "${ECHO_T}Checking if Speex codec is disabled...no" >&6 
    85144587fi; 
    8515  
    85164588 
    85174589# Check whether --enable-ilbc-codec or --disable-ilbc-codec was given. 
     
    85204592  if test "$enable_ilbc_codec" = "no"; then 
    85214593                ac_no_ilbc_codec=1 
    8522                 echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...yes" >&5 
     4594                echo "$as_me:4594: result: Checking if iLBC codec is disabled...yes" >&5 
    85234595echo "${ECHO_T}Checking if iLBC codec is disabled...yes" >&6 
    85244596               fi 
    85254597else 
    8526   echo "$as_me:$LINENO: result: Checking if iLBC codec is disabled...no" >&5 
     4598  echo "$as_me:4598: result: Checking if iLBC codec is disabled...no" >&5 
    85274599echo "${ECHO_T}Checking if iLBC codec is disabled...no" >&6 
    85284600fi; 
    85294601 
    8530  
    8531  
    8532  
    8533  
    8534 echo "$as_me:$LINENO: checking if select() needs correct nfds" >&5 
     4602echo "$as_me:4602: checking if select() needs correct nfds" >&5 
    85354603echo $ECHO_N "checking if select() needs correct nfds... $ECHO_C" >&6 
    85364604case $target in 
    8537   *rtems*) cat >>confdefs.h <<\_ACEOF 
     4605  *rtems*) cat >>confdefs.h <<\EOF 
    85384606#define PJ_SELECT_NEEDS_NFDS 1 
    8539 _ACEOF 
    8540  
    8541            echo "$as_me:$LINENO: result: yes" >&5 
     4607EOF 
     4608 
     4609           echo "$as_me:4609: result: yes" >&5 
    85424610echo "${ECHO_T}yes" >&6 
    85434611        ;; 
    8544   *) cat >>confdefs.h <<\_ACEOF 
     4612  *) cat >>confdefs.h <<\EOF 
    85454613#define PJ_SELECT_NEEDS_NFDS 0 
    8546 _ACEOF 
    8547  
    8548      echo "$as_me:$LINENO: result: no (default)" >&5 
     4614EOF 
     4615 
     4616     echo "$as_me:4616: result: no (default)" >&5 
    85494617echo "${ECHO_T}no (default)" >&6 
    8550      echo "$as_me:$LINENO: result: ** Decided that select() doesn't need correct nfds (please check)" >&5 
     4618     echo "$as_me:4618: result: ** Decided that select() doesn't need correct nfds (please check)" >&5 
    85514619echo "${ECHO_T}** Decided that select() doesn't need correct nfds (please check)" >&6 
    85524620        ;; 
    85534621esac 
    85544622 
    8555 echo "$as_me:$LINENO: checking if pj_thread_create() should enforce stack size" >&5 
     4623echo "$as_me:4623: checking if pj_thread_create() should enforce stack size" >&5 
    85564624echo $ECHO_N "checking if pj_thread_create() should enforce stack size... $ECHO_C" >&6 
    85574625case $target in 
    8558   *rtems*) cat >>confdefs.h <<\_ACEOF 
     4626  *rtems*) cat >>confdefs.h <<\EOF 
    85594627#define PJ_THREAD_SET_STACK_SIZE 1 
    8560 _ACEOF 
    8561  
    8562            echo "$as_me:$LINENO: result: yes" >&5 
     4628EOF 
     4629 
     4630           echo "$as_me:4630: result: yes" >&5 
    85634631echo "${ECHO_T}yes" >&6 
    85644632        ;; 
    8565   *) cat >>confdefs.h <<\_ACEOF 
     4633  *) cat >>confdefs.h <<\EOF 
    85664634#define PJ_THREAD_SET_STACK_SIZE 0 
    8567 _ACEOF 
    8568  
    8569      echo "$as_me:$LINENO: result: no (default)" >&5 
     4635EOF 
     4636 
     4637     echo "$as_me:4637: result: no (default)" >&5 
    85704638echo "${ECHO_T}no (default)" >&6 
    85714639        ;; 
    85724640esac 
    85734641 
    8574 echo "$as_me:$LINENO: checking if pj_thread_create() should allocate stack" >&5 
     4642echo "$as_me:4642: checking if pj_thread_create() should allocate stack" >&5 
    85754643echo $ECHO_N "checking if pj_thread_create() should allocate stack... $ECHO_C" >&6 
    85764644case $target in 
    8577   *rtems*) cat >>confdefs.h <<\_ACEOF 
     4645  *rtems*) cat >>confdefs.h <<\EOF 
    85784646#define PJ_THREAD_ALLOCATE_STACK 1 
    8579 _ACEOF 
    8580  
    8581            echo "$as_me:$LINENO: result: yes" >&5 
     4647EOF 
     4648 
     4649           echo "$as_me:4649: result: yes" >&5 
    85824650echo "${ECHO_T}yes" >&6 
    85834651        ;; 
    8584   *) cat >>confdefs.h <<\_ACEOF 
     4652  *) cat >>confdefs.h <<\EOF 
    85854653#define PJ_THREAD_ALLOCATE_STACK 0 
    8586 _ACEOF 
    8587  
    8588      echo "$as_me:$LINENO: result: no (default)" >&5 
     4654EOF 
     4655 
     4656     echo "$as_me:4656: result: no (default)" >&5 
    85894657echo "${ECHO_T}no (default)" >&6 
    85904658        ;; 
     
    85934661case $target in 
    85944662  *mingw* | *cygw* | *win32* | *w32* ) 
    8595         cat >>confdefs.h <<\_ACEOF 
     4663        cat >>confdefs.h <<\EOF 
    85964664#define PJ_BLOCKING_ERROR_VAL WSAEWOULDBLOCK 
    8597 _ACEOF 
     4665EOF 
    85984666 
    85994667        ;; 
    8600   *) cat >>confdefs.h <<\_ACEOF 
     4668  *) cat >>confdefs.h <<\EOF 
    86014669#define PJ_BLOCKING_ERROR_VAL EAGAIN 
    8602 _ACEOF 
    8603  
    8604      echo "$as_me:$LINENO: result: ** Setting non-blocking recv() retval to EAGAIN (please check)" >&5 
     4670EOF 
     4671 
     4672     echo "$as_me:4672: result: ** Setting non-blocking recv() retval to EAGAIN (please check)" >&5 
    86054673echo "${ECHO_T}** Setting non-blocking recv() retval to EAGAIN (please check)" >&6 
    86064674        ;; 
     
    86094677case $target in 
    86104678  *mingw* | *cygw* | *win32* | *w32* ) 
    8611         cat >>confdefs.h <<\_ACEOF 
     4679        cat >>confdefs.h <<\EOF 
    86124680#define PJ_BLOCKING_CONNECT_ERROR_VAL WSAEWOULDBLOCK 
    8613 _ACEOF 
     4681EOF 
    86144682 
    86154683        ;; 
    8616   *) cat >>confdefs.h <<\_ACEOF 
     4684  *) cat >>confdefs.h <<\EOF 
    86174685#define PJ_BLOCKING_CONNECT_ERROR_VAL EINPROGRESS 
    8618 _ACEOF 
    8619  
    8620      echo "$as_me:$LINENO: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&5 
     4686EOF 
     4687 
     4688     echo "$as_me:4688: result: ** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&5 
    86214689echo "${ECHO_T}** Setting non-blocking connect() retval to EINPROGRESS (please check)" >&6 
    86224690        ;; 
    86234691esac 
    86244692 
    8625  
    8626  
    8627  
    86284693if test "$build" = "$host"; then 
    86294694    ac_cross_compile= 
     
    86344699 
    86354700ac_host=unix 
    8636  
    86374701 
    86384702case $target in 
     
    86554719# the --recheck option to rerun configure. 
    86564720# 
    8657 # `ac_cv_env_foo' variables (set or unset) will be overridden when 
     4721# `ac_cv_env_foo' variables (set or unset) will be overriden when 
    86584722# loading this file, other *unset* `ac_cv_foo' will be assigned the 
    86594723# following values. 
     
    86734737      # substitution turns \\\\ into \\, and sed turns \\ into \). 
    86744738      sed -n \ 
    8675         "s/'/'\\\\''/g; 
    8676           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 
     4739        "s/'/'\\\\''/g; 
     4740          s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 
    86774741      ;; 
    86784742    *) 
    86794743      # `set' quotes correctly as required by POSIX, so do not add quotes. 
    86804744      sed -n \ 
    8681         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" 
     4745        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" 
    86824746      ;; 
    86834747    esac; 
     
    86904754     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 
    86914755     : end' >>confcache 
    8692 if diff $cache_file confcache >/dev/null 2>&1; then :; else 
     4756if cmp -s $cache_file confcache; then :; else 
    86934757  if test -w $cache_file; then 
    86944758    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" 
     
    87094773# (actually we leave an empty line to preserve line numbers). 
    87104774if test "x$srcdir" = x.; then 
    8711   ac_vpsub='/^[  ]*VPATH[        ]*=/{ 
     4775  ac_vpsub='/^[         ]*VPATH[        ]*=/{ 
    87124776s/:*\$(srcdir):*/:/; 
    87134777s/:*\${srcdir}:*/:/; 
    87144778s/:*@srcdir@:*/:/; 
    8715 s/^\([^=]*=[     ]*\):*/\1/; 
     4779s/^\([^=]*=[    ]*\):*/\1/; 
    87164780s/:*$//; 
    8717 s/^[^=]*=[       ]*$//; 
     4781s/^[^=]*=[      ]*$//; 
    87184782}' 
    87194783fi 
    87204784 
    87214785DEFS=-DHAVE_CONFIG_H 
    8722  
    8723 ac_libobjs= 
    8724 ac_ltlibobjs= 
    8725 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 
    8726   # 1. Remove the extension, and $U if already installed. 
    8727   ac_i=`echo "$ac_i" | 
    8728          sed 's/\$U\././;s/\.o$//;s/\.obj$//'` 
    8729   # 2. Add them. 
    8730   ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" 
    8731   ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' 
    8732 done 
    8733 LIBOBJS=$ac_libobjs 
    8734  
    8735 LTLIBOBJS=$ac_ltlibobjs 
    8736  
    8737  
    87384786 
    87394787: ${CONFIG_STATUS=./config.status} 
    87404788ac_clean_files_save=$ac_clean_files 
    87414789ac_clean_files="$ac_clean_files $CONFIG_STATUS" 
    8742 { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 
     4790{ echo "$as_me:4790: creating $CONFIG_STATUS" >&5 
    87434791echo "$as_me: creating $CONFIG_STATUS" >&6;} 
    87444792cat >$CONFIG_STATUS <<_ACEOF 
    87454793#! $SHELL 
    8746 # Generated by $as_me. 
     4794# Generated automatically by configure. 
    87474795# Run this file to recreate the current configuration. 
    87484796# Compiler output produced by configure, useful for debugging 
     
    87504798 
    87514799debug=false 
    8752 ac_cs_recheck=false 
    8753 ac_cs_silent=false 
    87544800SHELL=\${CONFIG_SHELL-$SHELL} 
     4801ac_cs_invocation="\$0 \$@" 
     4802 
    87554803_ACEOF 
    87564804 
    87574805cat >>$CONFIG_STATUS <<\_ACEOF 
    8758 ## --------------------- ## 
    8759 ## M4sh Initialization.  ## 
    8760 ## --------------------- ## 
    8761  
    87624806# Be Bourne compatible 
    87634807if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 
    87644808  emulate sh 
    87654809  NULLCMD=: 
    8766   # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 
    8767   # is contrary to our usage.  Disable this feature. 
    8768   alias -g '${1+"$@"}'='"$@"' 
    87694810elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then 
    87704811  set -o posix 
    87714812fi 
    8772 DUALCASE=1; export DUALCASE # for MKS sh 
    8773  
    8774 # Support unset when possible. 
    8775 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 
    8776   as_unset=unset 
    8777 else 
    8778   as_unset=false 
    8779 fi 
    8780  
    8781  
    8782 # Work around bugs in pre-3.0 UWIN ksh. 
    8783 $as_unset ENV MAIL MAILPATH 
    8784 PS1='$ ' 
    8785 PS2='> ' 
    8786 PS4='+ ' 
    8787  
    8788 # NLS nuisances. 
    8789 for as_var in \ 
    8790   LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 
    8791   LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 
    8792   LC_TELEPHONE LC_TIME 
    8793 do 
    8794   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 
    8795     eval $as_var=C; export $as_var 
    8796   else 
    8797     $as_unset $as_var 
    8798   fi 
    8799 done 
    8800  
    8801 # Required to use basename. 
    8802 if expr a : '\(a\)' >/dev/null 2>&1; then 
    8803   as_expr=expr 
    8804 else 
    8805   as_expr=false 
    8806 fi 
    8807  
    8808 if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then 
    8809   as_basename=basename 
    8810 else 
    8811   as_basename=false 
    8812 fi 
    8813  
    88144813 
    88154814# Name of the executable. 
    8816 as_me=`$as_basename "$0" || 
    8817 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 
    8818          X"$0" : 'X\(//\)$' \| \ 
    8819          X"$0" : 'X\(/\)$' \| \ 
    8820          .     : '\(.\)' 2>/dev/null || 
    8821 echo X/"$0" | 
    8822     sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } 
    8823           /^X\/\(\/\/\)$/{ s//\1/; q; } 
    8824           /^X\/\(\/\).*/{ s//\1/; q; } 
    8825           s/.*/./; q'` 
    8826  
    8827  
    8828 # PATH needs CR, and LINENO needs CR and PATH. 
    8829 # Avoid depending upon Character Ranges. 
    8830 as_cr_letters='abcdefghijklmnopqrstuvwxyz' 
    8831 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 
    8832 as_cr_Letters=$as_cr_letters$as_cr_LETTERS 
    8833 as_cr_digits='0123456789' 
    8834 as_cr_alnum=$as_cr_Letters$as_cr_digits 
    8835  
    8836 # The user is always right. 
    8837 if test "${PATH_SEPARATOR+set}" != set; then 
    8838   echo "#! /bin/sh" >conf$$.sh 
    8839   echo  "exit 0"   >>conf$$.sh 
    8840   chmod +x conf$$.sh 
    8841   if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 
    8842     PATH_SEPARATOR=';' 
    8843   else 
    8844     PATH_SEPARATOR=: 
    8845   fi 
    8846   rm -f conf$$.sh 
    8847 fi 
    8848  
    8849  
    8850   as_lineno_1=$LINENO 
    8851   as_lineno_2=$LINENO 
    8852   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 
    8853   test "x$as_lineno_1" != "x$as_lineno_2" && 
    8854   test "x$as_lineno_3"  = "x$as_lineno_2"  || { 
    8855   # Find who we are.  Look in the path if we contain no path at all 
    8856   # relative or not. 
    8857   case $0 in 
    8858     *[\\/]* ) as_myself=$0 ;; 
    8859     *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    8860 for as_dir in $PATH 
    8861 do 
    8862   IFS=$as_save_IFS 
    8863   test -z "$as_dir" && as_dir=. 
    8864   test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 
    8865 done 
    8866  
    8867        ;; 
    8868   esac 
    8869   # We did not find ourselves, most probably we were run as `sh COMMAND' 
    8870   # in which case we are not to be found in the path. 
    8871   if test "x$as_myself" = x; then 
    8872     as_myself=$0 
    8873   fi 
    8874   if test ! -f "$as_myself"; then 
    8875     { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 
    8876 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} 
    8877    { (exit 1); exit 1; }; } 
    8878   fi 
    8879   case $CONFIG_SHELL in 
    8880   '') 
    8881     as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 
    8882 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 
    8883 do 
    8884   IFS=$as_save_IFS 
    8885   test -z "$as_dir" && as_dir=. 
    8886   for as_base in sh bash ksh sh5; do 
    8887          case $as_dir in 
    8888          /*) 
    8889            if ("$as_dir/$as_base" -c ' 
    8890   as_lineno_1=$LINENO 
    8891   as_lineno_2=$LINENO 
    8892   as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` 
    8893   test "x$as_lineno_1" != "x$as_lineno_2" && 
    8894   test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then 
    8895              $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } 
    8896              $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } 
    8897              CONFIG_SHELL=$as_dir/$as_base 
    8898              export CONFIG_SHELL 
    8899              exec "$CONFIG_SHELL" "$0" ${1+"$@"} 
    8900            fi;; 
    8901          esac 
    8902        done 
    8903 done 
    8904 ;; 
    8905   esac 
    8906  
    8907   # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 
    8908   # uniformly replaced by the line number.  The first 'sed' inserts a 
    8909   # line-number line before each line; the second 'sed' does the real 
    8910   # work.  The second script uses 'N' to pair each line-number line 
    8911   # with the numbered line, and appends trailing '-' during 
    8912   # substitution so that $LINENO is not a special case at line end. 
    8913   # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the 
    8914   # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-) 
    8915   sed '=' <$as_myself | 
    8916     sed ' 
    8917       N 
    8918       s,$,-, 
    8919       : loop 
    8920       s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, 
    8921       t loop 
    8922       s,-$,, 
    8923       s,^['$as_cr_digits']*\n,, 
    8924     ' >$as_me.lineno && 
    8925   chmod +x $as_me.lineno || 
    8926     { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 
    8927 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} 
    8928    { (exit 1); exit 1; }; } 
    8929  
    8930   # Don't try to exec as it changes $[0], causing all sort of problems 
    8931   # (the dirname of $[0] is not the place where we might find the 
    8932   # original and so on.  Autoconf is especially sensible to this). 
    8933   . ./$as_me.lineno 
    8934   # Exit status is that of the last command. 
    8935   exit 
    8936 } 
    8937  
    8938  
    8939 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in 
    8940   *c*,-n*) ECHO_N= ECHO_C=' 
    8941 ' ECHO_T='      ' ;; 
    8942   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;; 
    8943   *)       ECHO_N= ECHO_C='\c' ECHO_T= ;; 
    8944 esac 
     4815as_me=`echo "$0" |sed 's,.*[\\/],,'` 
    89454816 
    89464817if expr a : '\(a\)' >/dev/null 2>&1; then 
     
    89684839rm -f conf$$ conf$$.exe conf$$.file 
    89694840 
    8970 if mkdir -p . 2>/dev/null; then 
    8971   as_mkdir_p=: 
    8972 else 
    8973   test -d ./-p && rmdir ./-p 
    8974   as_mkdir_p=false 
    8975 fi 
    8976  
    89774841as_executable_p="test -f" 
    89784842 
    8979 # Sed expression to map a string onto a valid CPP name. 
    8980 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 
    8981  
    8982 # Sed expression to map a string onto a valid variable name. 
    8983 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 
    8984  
     4843# Support unset when possible. 
     4844if (FOO=FOO; unset FOO) >/dev/null 2>&1; then 
     4845  as_unset=unset 
     4846else 
     4847  as_unset=false 
     4848fi 
     4849 
     4850# NLS nuisances. 
     4851$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; } 
     4852$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; } 
     4853$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; } 
     4854$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; } 
     4855$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; } 
     4856$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; } 
     4857$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; } 
     4858$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; } 
    89854859 
    89864860# IFS 
     
    89914865 
    89924866# CDPATH. 
    8993 $as_unset CDPATH 
     4867$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; } 
    89944868 
    89954869exec 6>&1 
    89964870 
    8997 # Open the log real soon, to keep \$[0] and so on meaningful, and to 
    8998 # report actual input values of CONFIG_FILES etc. instead of their 
    8999 # values after options handling.  Logging --version etc. is OK. 
    9000 exec 5>>config.log 
    9001 { 
    9002   echo 
    9003   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 
    9004 ## Running $as_me. ## 
    9005 _ASBOX 
    9006 } >&5 
    9007 cat >&5 <<_CSEOF 
    9008  
    9009 This file was extended by pjproject $as_me 0.5.8, which was 
    9010 generated by GNU Autoconf 2.59.  Invocation command line was 
    9011  
    9012   CONFIG_FILES    = $CONFIG_FILES 
    9013   CONFIG_HEADERS  = $CONFIG_HEADERS 
    9014   CONFIG_LINKS    = $CONFIG_LINKS 
    9015   CONFIG_COMMANDS = $CONFIG_COMMANDS 
    9016   $ $0 $@ 
    9017  
    9018 _CSEOF 
    9019 echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 
    9020 echo >&5 
    90214871_ACEOF 
    90224872 
     
    90384888fi 
    90394889 
    9040 cat >>$CONFIG_STATUS <<\_ACEOF 
     4890cat >>$CONFIG_STATUS <<\EOF 
    90414891 
    90424892ac_cs_usage="\ 
     
    90484898  -h, --help       print this help, then exit 
    90494899  -V, --version    print version number, then exit 
    9050   -q, --quiet      do not print progress messages 
    90514900  -d, --debug      don't remove temporary files 
    90524901      --recheck    update $as_me by reconfiguring in the same conditions 
    90534902  --file=FILE[:TEMPLATE] 
    9054                    instantiate the configuration file FILE 
     4903                   instantiate the configuration file FILE 
    90554904  --header=FILE[:TEMPLATE] 
    9056                    instantiate the configuration header FILE 
     4905                   instantiate the configuration header FILE 
    90574906 
    90584907Configuration files: 
     
    90634912 
    90644913Report bugs to <bug-autoconf@gnu.org>." 
    9065 _ACEOF 
    9066  
    9067 cat >>$CONFIG_STATUS <<_ACEOF 
     4914EOF 
     4915 
     4916cat >>$CONFIG_STATUS <<EOF 
    90684917ac_cs_version="\\ 
    90694918pjproject config.status 0.5.8 
    9070 configured by $0, generated by GNU Autoconf 2.59, 
     4919configured by $0, generated by GNU Autoconf 2.52, 
    90714920  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" 
    90724921 
    9073 Copyright (C) 2003 Free Software Foundation, Inc. 
     4922Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 
     4923Free Software Foundation, Inc. 
    90744924This config.status script is free software; the Free Software Foundation 
    90754925gives unlimited permission to copy, distribute and modify it." 
    90764926srcdir=$srcdir 
    9077 _ACEOF 
    9078  
    9079 cat >>$CONFIG_STATUS <<\_ACEOF 
     4927EOF 
     4928 
     4929cat >>$CONFIG_STATUS <<\EOF 
    90804930# If no file are specified by the user, then we need to provide default 
    90814931# value.  By we need to know if files were specified by the user. 
     
    90874937    ac_option=`expr "x$1" : 'x\([^=]*\)='` 
    90884938    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` 
    9089     ac_shift=: 
     4939    shift 
     4940    set dummy "$ac_option" "$ac_optarg" ${1+"$@"} 
     4941    shift 
    90904942    ;; 
    9091   -*) 
    9092     ac_option=$1 
    9093     ac_optarg=$2 
    9094     ac_shift=shift 
    9095     ;; 
     4943  -*);; 
    90964944  *) # This is not an option, so the user has probably given explicit 
    90974945     # arguments. 
    9098      ac_option=$1 
    90994946     ac_need_defaults=false;; 
    91004947  esac 
    91014948 
    9102   case $ac_option in 
     4949  case $1 in 
    91034950  # Handling of the options. 
    9104 _ACEOF 
    9105 cat >>$CONFIG_STATUS <<\_ACEOF 
     4951EOF 
     4952cat >>$CONFIG_STATUS <<EOF 
    91064953  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 
    9107     ac_cs_recheck=: ;; 
     4954    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion" 
     4955    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;; 
     4956EOF 
     4957cat >>$CONFIG_STATUS <<\EOF 
    91084958  --version | --vers* | -V ) 
    91094959    echo "$ac_cs_version"; exit 0 ;; 
    91104960  --he | --h) 
    91114961    # Conflict between --help and --header 
    9112     { { echo "$as_me:$LINENO: error: ambiguous option: $1 
     4962    { { echo "$as_me:4962: error: ambiguous option: $1 
    91134963Try \`$0 --help' for more information." >&5 
    91144964echo "$as_me: error: ambiguous option: $1 
     
    91204970    debug=: ;; 
    91214971  --file | --fil | --fi | --f ) 
    9122     $ac_shift 
    9123     CONFIG_FILES="$CONFIG_FILES $ac_optarg" 
     4972    shift 
     4973    CONFIG_FILES="$CONFIG_FILES $1" 
    91244974    ac_need_defaults=false;; 
    91254975  --header | --heade | --head | --hea ) 
    9126     $ac_shift 
    9127     CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" 
     4976    shift 
     4977    CONFIG_HEADERS="$CONFIG_HEADERS $1" 
    91284978    ac_need_defaults=false;; 
    9129   -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 
    9130   | -silent | --silent | --silen | --sile | --sil | --si | --s) 
    9131     ac_cs_silent=: ;; 
    91324979 
    91334980  # This is an error. 
    9134   -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 
     4981  -*) { { echo "$as_me:4981: error: unrecognized option: $1 
    91354982Try \`$0 --help' for more information." >&5 
    91364983echo "$as_me: error: unrecognized option: $1 
     
    91444991done 
    91454992 
    9146 ac_configure_extra_args= 
    9147  
    9148 if $ac_cs_silent; then 
    9149   exec 6>/dev/null 
    9150   ac_configure_extra_args="$ac_configure_extra_args --silent" 
    9151 fi 
    9152  
    9153 _ACEOF 
    9154 cat >>$CONFIG_STATUS <<_ACEOF 
    9155 if \$ac_cs_recheck; then 
    9156   echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 
    9157   exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 
    9158 fi 
    9159  
    9160 _ACEOF 
    9161  
    9162  
    9163  
    9164  
    9165  
    9166 cat >>$CONFIG_STATUS <<\_ACEOF 
     4993exec 5>>config.log 
     4994cat >&5 << _ACEOF 
     4995 
     4996## ----------------------- ## 
     4997## Running config.status.  ## 
     4998## ----------------------- ## 
     4999 
     5000This file was extended by $as_me (pjproject 0.5.8) 2.52, executed with 
     5001  CONFIG_FILES    = $CONFIG_FILES 
     5002  CONFIG_HEADERS  = $CONFIG_HEADERS 
     5003  CONFIG_LINKS    = $CONFIG_LINKS 
     5004  CONFIG_COMMANDS = $CONFIG_COMMANDS 
     5005  > $ac_cs_invocation 
     5006on `(hostname || uname -n) 2>/dev/null | sed 1q` 
     5007 
     5008_ACEOF 
     5009EOF 
     5010 
     5011cat >>$CONFIG_STATUS <<\EOF 
    91675012for ac_config_target in $ac_config_targets 
    91685013do 
     
    91775022  "pjlib/include/pj/compat/os_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/os_auto.h" ;; 
    91785023  "pjlib/include/pj/compat/m_auto.h" ) CONFIG_HEADERS="$CONFIG_HEADERS pjlib/include/pj/compat/m_auto.h" ;; 
    9179   *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 
     5024  *) { { echo "$as_me:5024: error: invalid argument: $ac_config_target" >&5 
    91805025echo "$as_me: error: invalid argument: $ac_config_target" >&2;} 
    91815026   { (exit 1); exit 1; }; };; 
     
    91925037fi 
    91935038 
    9194 # Have a temporary directory for convenience.  Make it in the build tree 
    9195 # simply because there is no reason to put it here, and in addition, 
    9196 # creating and moving files from /tmp can sometimes cause problems. 
    91975039# Create a temporary directory, and hook for its removal unless debugging. 
    91985040$debug || 
     
    92035045 
    92045046# Create a (secure) tmp directory for tmp files. 
    9205  
     5047: ${TMPDIR=/tmp} 
    92065048{ 
    9207   tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && 
     5049  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` && 
    92085050  test -n "$tmp" && test -d "$tmp" 
    92095051}  || 
    92105052{ 
    9211   tmp=./confstat$$-$RANDOM 
     5053  tmp=$TMPDIR/cs$$-$RANDOM 
    92125054  (umask 077 && mkdir $tmp) 
    92135055} || 
    92145056{ 
    9215    echo "$me: cannot create a temporary directory in ." >&2 
     5057   echo "$me: cannot create a temporary directory in $TMPDIR" >&2 
    92165058   { (exit 1); exit 1; } 
    92175059} 
    92185060 
    9219 _ACEOF 
    9220  
    9221 cat >>$CONFIG_STATUS <<_ACEOF 
     5061EOF 
     5062 
     5063cat >>$CONFIG_STATUS <<EOF 
    92225064 
    92235065# 
     
    92325074   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF 
    92335075s,@SHELL@,$SHELL,;t t 
    9234 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t 
    9235 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t 
    9236 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t 
    9237 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t 
    9238 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t 
    9239 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t 
    92405076s,@exec_prefix@,$exec_prefix,;t t 
    92415077s,@prefix@,$prefix,;t t 
     
    92535089s,@infodir@,$infodir,;t t 
    92545090s,@mandir@,$mandir,;t t 
     5091s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t 
     5092s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t 
     5093s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t 
     5094s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t 
     5095s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t 
    92555096s,@build_alias@,$build_alias,;t t 
    92565097s,@host_alias@,$host_alias,;t t 
    92575098s,@target_alias@,$target_alias,;t t 
    9258 s,@DEFS@,$DEFS,;t t 
    92595099s,@ECHO_C@,$ECHO_C,;t t 
    92605100s,@ECHO_N@,$ECHO_N,;t t 
    92615101s,@ECHO_T@,$ECHO_T,;t t 
     5102s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t 
     5103s,@DEFS@,$DEFS,;t t 
    92625104s,@LIBS@,$LIBS,;t t 
    92635105s,@build@,$build,;t t 
     
    92845126s,@ac_ct_CXX@,$ac_ct_CXX,;t t 
    92855127s,@CPP@,$CPP,;t t 
    9286 s,@EGREP@,$EGREP,;t t 
    92875128s,@ac_os_objs@,$ac_os_objs,;t t 
    92885129s,@ac_pjmedia_snd@,$ac_pjmedia_snd,;t t 
     5130s,@ac_pa_cflags@,$ac_pa_cflags,;t t 
    92895131s,@ac_pa_use_alsa@,$ac_pa_use_alsa,;t t 
    92905132s,@ac_no_small_filter@,$ac_no_small_filter,;t t 
     
    93015143s,@ac_host@,$ac_host,;t t 
    93025144s,@ac_main_obj@,$ac_main_obj,;t t 
    9303 s,@LIBOBJS@,$LIBOBJS,;t t 
    9304 s,@LTLIBOBJS@,$LTLIBOBJS,;t t 
    93055145CEOF 
    93065146 
    9307 _ACEOF 
    9308  
    9309   cat >>$CONFIG_STATUS <<\_ACEOF 
     5147EOF 
     5148 
     5149  cat >>$CONFIG_STATUS <<\EOF 
    93105150  # Split the substitutions into bite-sized pieces for seds with 
    93115151  # small command number limits, like on Digital OSF/1 and HP-UX. 
     
    93325172  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed 
    93335173      if test -z "$ac_sed_cmds"; then 
    9334         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" 
     5174        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" 
    93355175      else 
    9336         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" 
     5176        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" 
    93375177      fi 
    93385178      ac_sed_frag=`expr $ac_sed_frag + 1` 
     
    93465186fi # test -n "$CONFIG_FILES" 
    93475187 
    9348 _ACEOF 
    9349 cat >>$CONFIG_STATUS <<\_ACEOF 
     5188EOF 
     5189cat >>$CONFIG_STATUS <<\EOF 
    93505190for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue 
    93515191  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". 
    93525192  case $ac_file in 
    93535193  - | *:- | *:-:* ) # input from stdin 
    9354         cat >$tmp/stdin 
    9355         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
    9356         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
     5194        cat >$tmp/stdin 
     5195        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
     5196        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
    93575197  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
    9358         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
     5198        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
    93595199  * )   ac_file_in=$ac_file.in ;; 
    93605200  esac 
    93615201 
    93625202  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. 
    9363   ac_dir=`(dirname "$ac_file") 2>/dev/null || 
    9364 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
    9365          X"$ac_file" : 'X\(//\)[^/]' \| \ 
    9366          X"$ac_file" : 'X\(//\)$' \| \ 
    9367          X"$ac_file" : 'X\(/\)' \| \ 
    9368          .     : '\(.\)' 2>/dev/null || 
     5203  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
     5204         X"$ac_file" : 'X\(//\)[^/]' \| \ 
     5205         X"$ac_file" : 'X\(//\)$' \| \ 
     5206         X"$ac_file" : 'X\(/\)' \| \ 
     5207         .     : '\(.\)' 2>/dev/null || 
    93695208echo X"$ac_file" | 
    93705209    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 
     
    93735212          /^X\(\/\).*/{ s//\1/; q; } 
    93745213          s/.*/./; q'` 
    9375   { if $as_mkdir_p; then 
    9376     mkdir -p "$ac_dir" 
     5214  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 
     5215    { case "$ac_dir" in 
     5216  [\\/]* | ?:[\\/]* ) as_incr_dir=;; 
     5217  *)                      as_incr_dir=.;; 
     5218esac 
     5219as_dummy="$ac_dir" 
     5220for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do 
     5221  case $as_mkdir_dir in 
     5222    # Skip DOS drivespec 
     5223    ?:) as_incr_dir=$as_mkdir_dir ;; 
     5224    *) 
     5225      as_incr_dir=$as_incr_dir/$as_mkdir_dir 
     5226      test -d "$as_incr_dir" || mkdir "$as_incr_dir" 
     5227    ;; 
     5228  esac 
     5229done; } 
     5230 
     5231    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`" 
     5232    # A "../" for each directory in $ac_dir_suffix. 
     5233    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'` 
    93775234  else 
    9378     as_dir="$ac_dir" 
    9379     as_dirs= 
    9380     while test ! -d "$as_dir"; do 
    9381       as_dirs="$as_dir $as_dirs" 
    9382       as_dir=`(dirname "$as_dir") 2>/dev/null || 
    9383 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
    9384          X"$as_dir" : 'X\(//\)[^/]' \| \ 
    9385          X"$as_dir" : 'X\(//\)$' \| \ 
    9386          X"$as_dir" : 'X\(/\)' \| \ 
    9387          .     : '\(.\)' 2>/dev/null || 
    9388 echo X"$as_dir" | 
    9389     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 
    9390           /^X\(\/\/\)[^/].*/{ s//\1/; q; } 
    9391           /^X\(\/\/\)$/{ s//\1/; q; } 
    9392           /^X\(\/\).*/{ s//\1/; q; } 
    9393           s/.*/./; q'` 
    9394     done 
    9395     test ! -n "$as_dirs" || mkdir $as_dirs 
    9396   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 
    9397 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} 
    9398    { (exit 1); exit 1; }; }; } 
    9399  
    9400   ac_builddir=. 
    9401  
    9402 if test "$ac_dir" != .; then 
    9403   ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 
    9404   # A "../" for each directory in $ac_dir_suffix. 
    9405   ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` 
    9406 else 
    9407   ac_dir_suffix= ac_top_builddir= 
    9408 fi 
    9409  
    9410 case $srcdir in 
    9411   .)  # No --srcdir option.  We are building in place. 
    9412     ac_srcdir=. 
    9413     if test -z "$ac_top_builddir"; then 
    9414        ac_top_srcdir=. 
    9415     else 
    9416        ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` 
    9417     fi ;; 
    9418   [\\/]* | ?:[\\/]* )  # Absolute path. 
    9419     ac_srcdir=$srcdir$ac_dir_suffix; 
    9420     ac_top_srcdir=$srcdir ;; 
     5235    ac_dir_suffix= ac_dots= 
     5236  fi 
     5237 
     5238  case $srcdir in 
     5239  .)  ac_srcdir=. 
     5240      if test -z "$ac_dots"; then 
     5241         ac_top_srcdir=. 
     5242      else 
     5243         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'` 
     5244      fi ;; 
     5245  [\\/]* | ?:[\\/]* ) 
     5246      ac_srcdir=$srcdir$ac_dir_suffix; 
     5247      ac_top_srcdir=$srcdir ;; 
    94215248  *) # Relative path. 
    9422     ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix 
    9423     ac_top_srcdir=$ac_top_builddir$srcdir ;; 
    9424 esac 
    9425  
    9426 # Do not use `cd foo && pwd` to compute absolute paths, because 
    9427 # the directories may not exist. 
    9428 case `pwd` in 
    9429 .) ac_abs_builddir="$ac_dir";; 
    9430 *) 
    9431   case "$ac_dir" in 
    9432   .) ac_abs_builddir=`pwd`;; 
    9433   [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; 
    9434   *) ac_abs_builddir=`pwd`/"$ac_dir";; 
    9435   esac;; 
    9436 esac 
    9437 case $ac_abs_builddir in 
    9438 .) ac_abs_top_builddir=${ac_top_builddir}.;; 
    9439 *) 
    9440   case ${ac_top_builddir}. in 
    9441   .) ac_abs_top_builddir=$ac_abs_builddir;; 
    9442   [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; 
    9443   *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; 
    9444   esac;; 
    9445 esac 
    9446 case $ac_abs_builddir in 
    9447 .) ac_abs_srcdir=$ac_srcdir;; 
    9448 *) 
    9449   case $ac_srcdir in 
    9450   .) ac_abs_srcdir=$ac_abs_builddir;; 
    9451   [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; 
    9452   *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; 
    9453   esac;; 
    9454 esac 
    9455 case $ac_abs_builddir in 
    9456 .) ac_abs_top_srcdir=$ac_top_srcdir;; 
    9457 *) 
    9458   case $ac_top_srcdir in 
    9459   .) ac_abs_top_srcdir=$ac_abs_builddir;; 
    9460   [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; 
    9461   *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; 
    9462   esac;; 
    9463 esac 
    9464  
    9465  
     5249    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix 
     5250    ac_top_srcdir=$ac_dots$srcdir ;; 
     5251  esac 
    94665252 
    94675253  if test x"$ac_file" != x-; then 
    9468     { echo "$as_me:$LINENO: creating $ac_file" >&5 
     5254    { echo "$as_me:5254: creating $ac_file" >&5 
    94695255echo "$as_me: creating $ac_file" >&6;} 
    94705256    rm -f "$ac_file" 
     
    94725258  # Let's still pretend it is `configure' which instantiates (i.e., don't 
    94735259  # use $as_me), people would be surprised to read: 
    9474   #    /* config.h.  Generated by config.status.  */ 
    9475   if test x"$ac_file" = x-; then 
    9476     configure_input= 
    9477   else 
    9478     configure_input="$ac_file.  " 
    9479   fi 
    9480   configure_input=$configure_input"Generated from `echo $ac_file_in | 
    9481                                      sed 's,.*/,,'` by configure." 
     5260  #    /* config.h.  Generated automatically by config.status.  */ 
     5261  configure_input="Generated automatically from `echo $ac_file_in | 
     5262                                                 sed 's,.*/,,'` by configure." 
    94825263 
    94835264  # First look for the input files in the build tree, otherwise in the 
     
    94885269      -) echo $tmp/stdin ;; 
    94895270      [\\/$]*) 
    9490         # Absolute (can't be DOS-style, as IFS=:) 
    9491          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 
     5271        # Absolute (can't be DOS-style, as IFS=:) 
     5272         test -f "$f" || { { echo "$as_me:5272: error: cannot find input file: $f" >&5 
    94925273echo "$as_me: error: cannot find input file: $f" >&2;} 
    94935274   { (exit 1); exit 1; }; } 
    9494          echo "$f";; 
     5275         echo $f;; 
    94955276      *) # Relative 
    9496         if test -f "$f"; then 
    9497            # Build tree 
    9498            echo "$f" 
    9499         elif test -f "$srcdir/$f"; then 
    9500            # Source tree 
    9501            echo "$srcdir/$f" 
    9502         else 
    9503            # /dev/null tree 
    9504            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 
     5277        if test -f "$f"; then 
     5278           # Build tree 
     5279           echo $f 
     5280        elif test -f "$srcdir/$f"; then 
     5281           # Source tree 
     5282           echo $srcdir/$f 
     5283        else 
     5284           # /dev/null tree 
     5285           { { echo "$as_me:5285: error: cannot find input file: $f" >&5 
    95055286echo "$as_me: error: cannot find input file: $f" >&2;} 
    95065287   { (exit 1); exit 1; }; } 
    9507         fi;; 
     5288        fi;; 
    95085289      esac 
    95095290    done` || { (exit 1); exit 1; } 
    9510 _ACEOF 
    9511 cat >>$CONFIG_STATUS <<_ACEOF 
     5291EOF 
     5292cat >>$CONFIG_STATUS <<EOF 
    95125293  sed "$ac_vpsub 
    95135294$extrasub 
    9514 _ACEOF 
    9515 cat >>$CONFIG_STATUS <<\_ACEOF 
     5295EOF 
     5296cat >>$CONFIG_STATUS <<\EOF 
    95165297:t 
    95175298/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 
    95185299s,@configure_input@,$configure_input,;t t 
    95195300s,@srcdir@,$ac_srcdir,;t t 
    9520 s,@abs_srcdir@,$ac_abs_srcdir,;t t 
    95215301s,@top_srcdir@,$ac_top_srcdir,;t t 
    9522 s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t 
    9523 s,@builddir@,$ac_builddir,;t t 
    9524 s,@abs_builddir@,$ac_abs_builddir,;t t 
    9525 s,@top_builddir@,$ac_top_builddir,;t t 
    9526 s,@abs_top_builddir@,$ac_abs_top_builddir,;t t 
    95275302" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out 
    95285303  rm -f $tmp/stdin 
     
    95355310 
    95365311done 
    9537 _ACEOF 
    9538 cat >>$CONFIG_STATUS <<\_ACEOF 
     5312EOF 
     5313cat >>$CONFIG_STATUS <<\EOF 
    95395314 
    95405315# 
     
    95465321# 
    95475322# ac_d sets the value in "#define NAME VALUE" lines. 
    9548 ac_dA='s,^\([    ]*\)#\([        ]*define[       ][      ]*\)' 
    9549 ac_dB='[         ].*$,\1#\2' 
     5323ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)' 
     5324ac_dB='[        ].*$,\1#\2' 
    95505325ac_dC=' ' 
    95515326ac_dD=',;t' 
    95525327# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". 
    9553 ac_uA='s,^\([    ]*\)#\([        ]*\)undef\([    ][      ]*\)' 
     5328ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)' 
    95545329ac_uB='$,\1#\2define\3' 
    95555330ac_uC=' ' 
     
    95605335  case $ac_file in 
    95615336  - | *:- | *:-:* ) # input from stdin 
    9562         cat >$tmp/stdin 
    9563         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
    9564         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
     5337        cat >$tmp/stdin 
     5338        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
     5339        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
    95655340  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` 
    9566         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
     5341        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; 
    95675342  * )   ac_file_in=$ac_file.in ;; 
    95685343  esac 
    95695344 
    9570   test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 
     5345  test x"$ac_file" != x- && { echo "$as_me:5345: creating $ac_file" >&5 
    95715346echo "$as_me: creating $ac_file" >&6;} 
    95725347 
     
    95785353      -) echo $tmp/stdin ;; 
    95795354      [\\/$]*) 
    9580         # Absolute (can't be DOS-style, as IFS=:) 
    9581          test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 
     5355        # Absolute (can't be DOS-style, as IFS=:) 
     5356         test -f "$f" || { { echo "$as_me:5356: error: cannot find input file: $f" >&5 
    95825357echo "$as_me: error: cannot find input file: $f" >&2;} 
    95835358   { (exit 1); exit 1; }; } 
    9584          # Do quote $f, to prevent DOS paths from being IFS'd. 
    9585          echo "$f";; 
     5359         echo $f;; 
    95865360      *) # Relative 
    9587         if test -f "$f"; then 
    9588            # Build tree 
    9589            echo "$f" 
    9590         elif test -f "$srcdir/$f"; then 
    9591            # Source tree 
    9592            echo "$srcdir/$f" 
    9593         else 
    9594            # /dev/null tree 
    9595            { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 
     5361        if test -f "$f"; then 
     5362           # Build tree 
     5363           echo $f 
     5364        elif test -f "$srcdir/$f"; then 
     5365           # Source tree 
     5366           echo $srcdir/$f 
     5367        else 
     5368           # /dev/null tree 
     5369           { { echo "$as_me:5369: error: cannot find input file: $f" >&5 
    95965370echo "$as_me: error: cannot find input file: $f" >&2;} 
    95975371   { (exit 1); exit 1; }; } 
    9598         fi;; 
     5372        fi;; 
    95995373      esac 
    96005374    done` || { (exit 1); exit 1; } 
    96015375  # Remove the trailing spaces. 
    9602   sed 's/[       ]*$//' $ac_file_inputs >$tmp/in 
    9603  
    9604 _ACEOF 
     5376  sed 's/[      ]*$//' $ac_file_inputs >$tmp/in 
     5377 
     5378EOF 
    96055379 
    96065380# Transform confdefs.h into two sed scripts, `conftest.defines' and 
     
    96185392# 0-ary CPP macros) applies to n-ary macro definitions. 
    96195393# See the Autoconf documentation for `clear'. 
    9620 cat >confdef2sed.sed <<\_ACEOF 
     5394cat >confdef2sed.sed <<\EOF 
    96215395s/[\\&,]/\\&/g 
    96225396s,[\\$`],\\&,g 
    96235397t clear 
    96245398: clear 
    9625 s,^[     ]*#[    ]*define[       ][      ]*\([^  (][^    (]*\)\(([^)]*)\)[       ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp 
     5399s,^[    ]*#[    ]*define[       ][      ]*\(\([^        (][^    (]*\)([^)]*)\)[         ]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp 
    96265400t end 
    9627 s,^[     ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp 
     5401s,^[    ]*#[    ]*define[       ][      ]*\([^  ][^     ]*\)[   ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp 
    96285402: end 
    9629 _ACEOF 
     5403EOF 
    96305404# If some macros were called several times there might be several times 
    96315405# the same #defines, which is useless.  Nevertheless, we may not want to 
     
    96385412# example, in the case of _POSIX_SOURCE, which is predefined and required 
    96395413# on some systems where configure will not decide to define it. 
    9640 cat >>conftest.undefs <<\_ACEOF 
    9641 s,^[     ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, 
    9642 _ACEOF 
     5414cat >>conftest.undefs <<\EOF 
     5415s,^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, 
     5416EOF 
    96435417 
    96445418# Break up conftest.defines because some shells have a limit on the size 
    96455419# of here documents, and old seds have small limits too (100 cmds). 
    96465420echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS 
    9647 echo '  if grep "^[      ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS 
     5421echo '  if egrep "^[    ]*#[    ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS 
    96485422echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS 
    96495423echo '  :' >>$CONFIG_STATUS 
     
    96545428  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS 
    96555429  # Speed up: don't consider the non `#define' lines. 
    9656   echo '/^[      ]*#[    ]*define/!b' >>$CONFIG_STATUS 
     5430  echo '/^[     ]*#[    ]*define/!b' >>$CONFIG_STATUS 
    96575431  # Work around the forget-to-reset-the-flag bug. 
    96585432  echo 't clr' >>$CONFIG_STATUS 
     
    96695443done 
    96705444rm -f conftest.defines 
    9671 echo '  fi # grep' >>$CONFIG_STATUS 
     5445echo '  fi # egrep' >>$CONFIG_STATUS 
    96725446echo >>$CONFIG_STATUS 
    96735447 
     
    96815455  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS 
    96825456  # Speed up: don't consider the non `#undef' 
    9683   echo '/^[      ]*#[    ]*undef/!b' >>$CONFIG_STATUS 
     5457  echo '/^[     ]*#[    ]*undef/!b' >>$CONFIG_STATUS 
    96845458  # Work around the forget-to-reset-the-flag bug. 
    96855459  echo 't clr' >>$CONFIG_STATUS 
     
    96975471rm -f conftest.undefs 
    96985472 
    9699 cat >>$CONFIG_STATUS <<\_ACEOF 
     5473cat >>$CONFIG_STATUS <<\EOF 
    97005474  # Let's still pretend it is `configure' which instantiates (i.e., don't 
    97015475  # use $as_me), people would be surprised to read: 
    9702   #    /* config.h.  Generated by config.status.  */ 
     5476  #    /* config.h.  Generated automatically by config.status.  */ 
    97035477  if test x"$ac_file" = x-; then 
    9704     echo "/* Generated by configure.  */" >$tmp/config.h 
     5478    echo "/* Generated automatically by configure.  */" >$tmp/config.h 
    97055479  else 
    9706     echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h 
     5480    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h 
    97075481  fi 
    97085482  cat $tmp/in >>$tmp/config.h 
    97095483  rm -f $tmp/in 
    97105484  if test x"$ac_file" != x-; then 
    9711     if diff $ac_file $tmp/config.h >/dev/null 2>&1; then 
    9712       { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 
     5485    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then 
     5486      { echo "$as_me:5486: $ac_file is unchanged" >&5 
    97135487echo "$as_me: $ac_file is unchanged" >&6;} 
    97145488    else 
    9715       ac_dir=`(dirname "$ac_file") 2>/dev/null || 
    9716 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
    9717          X"$ac_file" : 'X\(//\)[^/]' \| \ 
    9718          X"$ac_file" : 'X\(//\)$' \| \ 
    9719          X"$ac_file" : 'X\(/\)' \| \ 
    9720          .     : '\(.\)' 2>/dev/null || 
     5489      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
     5490         X"$ac_file" : 'X\(//\)[^/]' \| \ 
     5491         X"$ac_file" : 'X\(//\)$' \| \ 
     5492         X"$ac_file" : 'X\(/\)' \| \ 
     5493         .     : '\(.\)' 2>/dev/null || 
    97215494echo X"$ac_file" | 
    97225495    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 
     
    97255498          /^X\(\/\).*/{ s//\1/; q; } 
    97265499          s/.*/./; q'` 
    9727       { if $as_mkdir_p; then 
    9728     mkdir -p "$ac_dir" 
    9729   else 
    9730     as_dir="$ac_dir" 
    9731     as_dirs= 
    9732     while test ! -d "$as_dir"; do 
    9733       as_dirs="$as_dir $as_dirs" 
    9734       as_dir=`(dirname "$as_dir") 2>/dev/null || 
    9735 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 
    9736          X"$as_dir" : 'X\(//\)[^/]' \| \ 
    9737          X"$as_dir" : 'X\(//\)$' \| \ 
    9738          X"$as_dir" : 'X\(/\)' \| \ 
    9739          .     : '\(.\)' 2>/dev/null || 
    9740 echo X"$as_dir" | 
    9741     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } 
    9742           /^X\(\/\/\)[^/].*/{ s//\1/; q; } 
    9743           /^X\(\/\/\)$/{ s//\1/; q; } 
    9744           /^X\(\/\).*/{ s//\1/; q; } 
    9745           s/.*/./; q'` 
    9746     done 
    9747     test ! -n "$as_dirs" || mkdir $as_dirs 
    9748   fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 
    9749 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} 
    9750    { (exit 1); exit 1; }; }; } 
    9751  
     5500      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then 
     5501        { case "$ac_dir" in 
     5502  [\\/]* | ?:[\\/]* ) as_incr_dir=;; 
     5503  *)                      as_incr_dir=.;; 
     5504esac 
     5505as_dummy="$ac_dir" 
     5506for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do 
     5507  case $as_mkdir_dir in 
     5508    # Skip DOS drivespec 
     5509    ?:) as_incr_dir=$as_mkdir_dir ;; 
     5510    *) 
     5511      as_incr_dir=$as_incr_dir/$as_mkdir_dir 
     5512      test -d "$as_incr_dir" || mkdir "$as_incr_dir" 
     5513    ;; 
     5514  esac 
     5515done; } 
     5516 
     5517      fi 
    97525518      rm -f $ac_file 
    97535519      mv $tmp/config.h $ac_file 
     
    97585524  fi 
    97595525done 
    9760 _ACEOF 
    9761  
    9762 cat >>$CONFIG_STATUS <<\_ACEOF 
     5526EOF 
     5527 
     5528cat >>$CONFIG_STATUS <<\EOF 
    97635529 
    97645530{ (exit 0); exit 0; } 
    9765 _ACEOF 
     5531EOF 
    97665532chmod +x $CONFIG_STATUS 
    97675533ac_clean_files=$ac_clean_files_save 
    9768  
    97695534 
    97705535# configure is writing to config.log, and then calls config.status. 
     
    97785543if test "$no_create" != yes; then 
    97795544  ac_cs_success=: 
    9780   ac_config_status_args= 
    9781   test "$silent" = yes && 
    9782     ac_config_status_args="$ac_config_status_args --quiet" 
    97835545  exec 5>/dev/null 
    9784   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 
     5546  $SHELL $CONFIG_STATUS || ac_cs_success=false 
    97855547  exec 5>>config.log 
    97865548  # Use ||, not &&, to avoid exiting from the if with $? = 1, which 
     
    97895551fi 
    97905552 
    9791  
  • pjproject/trunk/aconfigure.ac

    r751 r770  
    244244              ) 
    245245 
     246AC_SUBST(ac_pa_cflags) 
    246247if test "$enable_sound" = "no"; then 
    247248  true; 
     
    249250 case $target in 
    250251  *darwin*) 
    251         ac_pjmedia_snd=pa_darwinos 
    252         AC_MSG_RESULT([Checking sound device backend... coreaudio]) 
    253         LIBS="$LIBS -framework CoreAudio" 
     252        LIBS="$LIBS -framework CoreAudio -framework CoreServices -framework AudioUnit -framework AudioToolbox" 
     253        if test "`uname -r`" = "6.8"; then 
     254                #ac_pa_cflags="-DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS" 
     255                #AC_MSG_RESULT([Setting additional PortAudio CFLAGS.. -DPA_OLD_CORE_AUDIO -DMOSX_USE_NON_ATOMIC_FLAG_BITS]) 
     256                ac_pjmedia_snd=pa_old_darwinos 
     257                AC_MSG_RESULT([Checking sound device backend... old coreaudio]) 
     258        else 
     259                ac_pjmedia_snd=pa_darwinos 
     260                AC_MSG_RESULT([Checking sound device backend... coreaudio]) 
     261        fi 
    254262        ;; 
    255263  *cygwin* | *mingw*) 
  • pjproject/trunk/pjmedia/build/os-auto.mak.in

    r699 r770  
    66# Define the desired sound device backend 
    77# Valid values are: 
    8 #   - pa_unix:      PortAudio on Unix (OSS or ALSA) 
    9 #   - pa_darwinos:  PortAudio on MacOSX (CoreAudio) 
    10 #   - pa_win32:     PortAudio on Win32 (WMME) 
    11 #   - ds:           Win32 DirectSound (dsound.c) 
    12 #   - null:         Null sound device (nullsound.c) 
     8#   - pa_unix:          PortAudio on Unix (OSS or ALSA) 
     9#   - pa_darwinos:      PortAudio on MacOSX (CoreAudio) 
     10#   - pa_old_darwinos:  PortAudio on MacOSX (old CoreAudio, for OSX 10.2) 
     11#   - pa_win32:         PortAudio on Win32 (WMME) 
     12#   - ds:               Win32 DirectSound (dsound.c) 
     13#   - null:             Null sound device (nullsound.c) 
    1314AC_PJMEDIA_SND=@ac_pjmedia_snd@ 
    1415 
    1516# For Unix, specify if ALSA should be supported 
    1617AC_PA_USE_ALSA=@ac_pa_use_alsa@ 
     18 
     19# Additional PortAudio CFLAGS are in @ac_pa_cflags@ 
    1720 
    1821# 
     
    7881 
    7982# 
    80 # PortAudio on MacOS X 
     83# PortAudio on MacOS X (using current PortAudio) 
    8184# 
    8285ifeq ($(AC_PJMEDIA_SND),pa_darwinos) 
    83 export PJMEDIA_OBJS += $(PA_DIR)/pa_mac_hostapis.o $(PA_DIR)/pa_unix_util.o \ 
    84                        $(PA_DIR)/pa_mac_core.o 
    85 export CFLAGS += -DPA_USE_COREAUDIO=1  \ 
     86export PJMEDIA_OBJS +=  $(PA_DIR)/pa_mac_hostapis.o \ 
     87                        $(PA_DIR)/pa_unix_util.o \ 
     88                        $(PA_DIR)/pa_mac_core.o \ 
     89                        $(PA_DIR)/pa_mac_core_blocking.o \ 
     90                        $(PA_DIR)/pa_mac_core_utilities.o \ 
     91                        $(PA_DIR)/ringbuffer.o 
     92export CFLAGS += -DPA_USE_COREAUDIO=1 \ 
    8693                 -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND 
     94export CFLAGS += @ac_pa_cflags@ 
    8795endif 
    8896 
     97# 
     98# PortAudio on MacOS X (using old PortAudio, for MacOS X 10.2.x) 
     99# 
     100ifeq ($(AC_PJMEDIA_SND),pa_old_darwinos) 
     101export PJMEDIA_OBJS +=  $(PA_DIR)/pa_mac_hostapis.o \ 
     102                        $(PA_DIR)/pa_unix_util.o \ 
     103                        $(PA_DIR)/pa_mac_core_old.o  
     104export CFLAGS += -DPA_USE_COREAUDIO=1 \ 
     105                 -DPJMEDIA_SOUND_IMPLEMENTATION=PJMEDIA_SOUND_PORTAUDIO_SOUND 
     106export CFLAGS += @ac_pa_cflags@ 
     107endif 
     108 
     109# 
    89110# 
    90111# PortAudio on Win32 (WMME) 
  • pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_mac_core.c

    r341 r770  
    11/* 
    2  * $Id$ 
    3  * pa_mac_core.c 
    4  * Implementation of PortAudio for Mac OS X CoreAudio        
    5  *                                                                                          
     2 * Implementation of the PortAudio API for Apple AUHAL 
     3 * 
    64 * PortAudio Portable Real-Time Audio Library 
    75 * Latest Version at: http://www.portaudio.com 
    86 * 
    9  * Authors: Ross Bencina and Phil Burk 
    10  * Copyright (c) 1999-2000 Ross Bencina and Phil Burk 
     7 * Written by Bjorn Roche of XO Audio LLC, from PA skeleton code. 
     8 * Portions copied from code by Dominic Mazzoni (who wrote a HAL implementation) 
     9 * 
     10 * Dominic's code was based on code by Phil Burk, Darren Gibbs, 
     11 * Gord Peters, Stephane Letz, and Greg Pfiel. 
     12 * 
     13 * The following people also deserve acknowledgements: 
     14 * 
     15 * Olivier Tristan for feedback and testing 
     16 * Glenn Zelniker and Z-Systems engineering for sponsoring the Blocking I/O 
     17 * interface. 
     18 *  
     19 * 
     20 * Based on the Open Source API proposed by Ross Bencina 
     21 * Copyright (c) 1999-2002 Ross Bencina, Phil Burk 
    1122 * 
    1223 * Permission is hereby granted, free of charge, to any person obtaining 
     
    2132 * included in all copies or substantial portions of the Software. 
    2233 * 
    23  * Any person wishing to distribute modifications to the Software is 
    24  * requested to send the modifications to the original developer so that 
    25  * they can be incorporated into the canonical version. 
    26  * 
    2734 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    2835 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     
    3239 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    3340 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     41 */ 
     42 
     43/* 
     44 * The text above constitutes the entire PortAudio license; however,  
     45 * the PortAudio community also makes the following non-binding requests: 
    3446 * 
     47 * Any person wishing to distribute modifications to the Software is 
     48 * requested to send the modifications to the original developer so that 
     49 * they can be incorporated into the canonical version. It is also  
     50 * requested that these non-binding requests be included along with the  
     51 * license above. 
    3552 */ 
    3653 
    37 #include <CoreAudio/CoreAudio.h> 
    38 #include <AudioToolbox/AudioToolbox.h> 
    39 #include <stdio.h> 
    40 #include <stdlib.h> 
    41 #include <math.h> 
    42 #include <assert.h> 
    43  
    44 #include "portaudio.h" 
    45 #include "pa_trace.h" 
    46 #include "pa_util.h" 
    47 #include "pa_allocation.h" 
    48 #include "pa_hostapi.h" 
    49 #include "pa_stream.h" 
    50 #include "pa_cpuload.h" 
    51 #include "pa_process.h" 
    52  
    53 // =====  constants  ===== 
    54  
    55 // =====  structs  ===== 
    56 #pragma mark structs 
    57  
    58 // PaMacCoreHostApiRepresentation - host api datastructure specific to this implementation 
    59 typedef struct PaMacCore_HAR 
     54/** 
     55 @file pa_mac_core 
     56 @ingroup hostapi_src 
     57 @author Bjorn Roche 
     58 @brief AUHAL implementation of PortAudio 
     59*/ 
     60 
     61/* FIXME: not all error conditions call PaUtil_SetLastHostErrorInfo() 
     62 * PaMacCore_SetError() will do this. 
     63 */ 
     64 
     65#include "pa_mac_core_internal.h" 
     66 
     67#include <string.h> /* strlen(), memcmp() etc. */ 
     68 
     69#include "pa_mac_core.h" 
     70#include "pa_mac_core_utilities.h" 
     71#include "pa_mac_core_blocking.h" 
     72 
     73 
     74 
     75/* prototypes for functions declared in this file */ 
     76 
     77#ifdef __cplusplus 
     78extern "C" 
    6079{ 
    61     PaUtilHostApiRepresentation inheritedHostApiRep; 
    62     PaUtilStreamInterface callbackStreamInterface; 
    63     PaUtilStreamInterface blockingStreamInterface; 
    64      
    65     PaUtilAllocationGroup *allocations; 
    66     AudioDeviceID *macCoreDeviceIds; 
     80#endif /* __cplusplus */ 
     81 
     82PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); 
     83 
     84#ifdef __cplusplus 
    6785} 
    68 PaMacCoreHostApiRepresentation; 
    69  
    70 typedef struct PaMacCore_DI 
     86#endif /* __cplusplus */ 
     87 
     88#define RING_BUFFER_ADVANCE_DENOMINATOR (4) 
     89 
     90static void Terminate( struct PaUtilHostApiRepresentation *hostApi ); 
     91static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi, 
     92                                  const PaStreamParameters *inputParameters, 
     93                                  const PaStreamParameters *outputParameters, 
     94                                  double sampleRate ); 
     95static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, 
     96                           PaStream** s, 
     97                           const PaStreamParameters *inputParameters, 
     98                           const PaStreamParameters *outputParameters, 
     99                           double sampleRate, 
     100                           unsigned long framesPerBuffer, 
     101                           PaStreamFlags streamFlags, 
     102                           PaStreamCallback *streamCallback, 
     103                           void *userData ); 
     104static PaError CloseStream( PaStream* stream ); 
     105static PaError StartStream( PaStream *stream ); 
     106static PaError StopStream( PaStream *stream ); 
     107static PaError AbortStream( PaStream *stream ); 
     108static PaError IsStreamStopped( PaStream *s ); 
     109static PaError IsStreamActive( PaStream *stream ); 
     110static PaTime GetStreamTime( PaStream *stream ); 
     111static void setStreamStartTime( PaStream *stream ); 
     112static OSStatus AudioIOProc( void *inRefCon, 
     113                               AudioUnitRenderActionFlags *ioActionFlags, 
     114                               const AudioTimeStamp *inTimeStamp, 
     115                               UInt32 inBusNumber, 
     116                               UInt32 inNumberFrames, 
     117                               AudioBufferList *ioData ); 
     118static double GetStreamCpuLoad( PaStream* stream ); 
     119 
     120static PaError GetChannelInfo( PaMacAUHAL *auhalHostApi, 
     121                               PaDeviceInfo *deviceInfo, 
     122                               AudioDeviceID macCoreDeviceId, 
     123                               int isInput); 
     124 
     125static PaError OpenAndSetupOneAudioUnit( 
     126                                   const PaStreamParameters *inStreamParams, 
     127                                   const PaStreamParameters *outStreamParams, 
     128                                   const unsigned long requestedFramesPerBuffer, 
     129                                   unsigned long *actualInputFramesPerBuffer, 
     130                                   unsigned long *actualOutputFramesPerBuffer, 
     131                                   const PaMacAUHAL *auhalHostApi, 
     132                                   AudioUnit *audioUnit, 
     133                                   AudioConverterRef *srConverter, 
     134                                   AudioDeviceID *audioDevice, 
     135                                   const double sampleRate, 
     136                                   void *refCon ); 
     137 
     138/* for setting errors. */ 
     139#define PA_AUHAL_SET_LAST_HOST_ERROR( errorCode, errorText ) \ 
     140    PaUtil_SetLastHostErrorInfo( paInDevelopment, errorCode, errorText ) 
     141 
     142 
     143/*currently, this is only used in initialization, but it might be modified 
     144  to be used when the list of devices changes.*/ 
     145static PaError gatherDeviceInfo(PaMacAUHAL *auhalHostApi) 
    71146{ 
    72     PaDeviceInfo inheritedDeviceInfo; 
     147    UInt32 size; 
     148    UInt32 propsize; 
     149    VVDBUG(("gatherDeviceInfo()\n")); 
     150    /* -- free any previous allocations -- */ 
     151    if( auhalHostApi->devIds ) 
     152        PaUtil_GroupFreeMemory(auhalHostApi->allocations, auhalHostApi->devIds); 
     153    auhalHostApi->devIds = NULL; 
     154 
     155    /* -- figure out how many devices there are -- */ 
     156    AudioHardwareGetPropertyInfo( kAudioHardwarePropertyDevices, 
     157                                  &propsize, 
     158                                  NULL ); 
     159    auhalHostApi->devCount = propsize / sizeof( AudioDeviceID ); 
     160 
     161    VDBUG( ( "Found %ld device(s).\n", auhalHostApi->devCount ) ); 
     162 
     163    /* -- copy the device IDs -- */ 
     164    auhalHostApi->devIds = (AudioDeviceID *)PaUtil_GroupAllocateMemory( 
     165                             auhalHostApi->allocations, 
     166                             propsize ); 
     167    if( !auhalHostApi->devIds ) 
     168        return paInsufficientMemory; 
     169    AudioHardwareGetProperty( kAudioHardwarePropertyDevices, 
     170                                  &propsize, 
     171                                  auhalHostApi->devIds ); 
     172#ifdef MAC_CORE_VERBOSE_DEBUG 
     173    { 
     174       int i; 
     175       for( i=0; i<auhalHostApi->devCount; ++i ) 
     176          printf( "Device %d\t: %ld\n", i, auhalHostApi->devIds[i] ); 
     177    } 
     178#endif 
     179 
     180    size = sizeof(AudioDeviceID); 
     181    auhalHostApi->defaultIn  = kAudioDeviceUnknown; 
     182    auhalHostApi->defaultOut = kAudioDeviceUnknown; 
     183 
     184    /* determine the default device. */ 
     185    /* I am not sure how these calls to AudioHardwareGetProperty() 
     186       could fail, but in case they do, we use the first available 
     187       device as the default. */ 
     188    if( 0 != AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, 
     189                     &size, 
     190                     &auhalHostApi->defaultIn) ) { 
     191       int i; 
     192       auhalHostApi->defaultIn  = kAudioDeviceUnknown; 
     193       VDBUG(("Failed to get default input device from OS.")); 
     194       VDBUG((" I will substitute the first available input Device.")); 
     195       for( i=0; i<auhalHostApi->devCount; ++i ) { 
     196          PaDeviceInfo devInfo; 
     197          if( 0 != GetChannelInfo( auhalHostApi, &devInfo, 
     198                                   auhalHostApi->devIds[i], TRUE ) ) 
     199             if( devInfo.maxInputChannels ) { 
     200                auhalHostApi->defaultIn = auhalHostApi->devIds[i]; 
     201                break; 
     202             } 
     203       } 
     204    }    
     205    if( 0 != AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, 
     206                     &size, 
     207                     &auhalHostApi->defaultOut) ) { 
     208       int i; 
     209       auhalHostApi->defaultIn  = kAudioDeviceUnknown; 
     210       VDBUG(("Failed to get default output device from OS.")); 
     211       VDBUG((" I will substitute the first available output Device.")); 
     212       for( i=0; i<auhalHostApi->devCount; ++i ) { 
     213          PaDeviceInfo devInfo; 
     214          if( 0 != GetChannelInfo( auhalHostApi, &devInfo, 
     215                                   auhalHostApi->devIds[i], FALSE ) ) 
     216             if( devInfo.maxOutputChannels ) { 
     217                auhalHostApi->defaultOut = auhalHostApi->devIds[i]; 
     218                break; 
     219             } 
     220       } 
     221    }    
     222 
     223    VDBUG( ( "Default in : %ld\n", auhalHostApi->defaultIn  ) ); 
     224    VDBUG( ( "Default out: %ld\n", auhalHostApi->defaultOut ) ); 
     225 
     226    return paNoError; 
    73227} 
    74 PaMacCoreDeviceInfo; 
    75  
    76 // PaMacCoreStream - a stream data structure specifically for this implementation 
    77 typedef struct PaMacCore_S 
    78 { 
    79     PaUtilStreamRepresentation streamRepresentation; 
    80     PaUtilCpuLoadMeasurer cpuLoadMeasurer; 
    81     PaUtilBufferProcessor bufferProcessor; 
    82      
    83     int primeStreamUsingCallback; 
    84      
    85     AudioDeviceID inputDevice; 
    86     AudioDeviceID outputDevice; 
    87      
    88     // Processing thread management -------------- 
    89 //    HANDLE abortEvent; 
    90 //    HANDLE processingThread; 
    91 //    DWORD processingThreadId; 
    92      
    93     char throttleProcessingThreadOnOverload; // 0 -> don't throtte, non-0 -> throttle 
    94     int processingThreadPriority; 
    95     int highThreadPriority; 
    96     int throttledThreadPriority; 
    97     unsigned long throttledSleepMsecs; 
    98      
    99     int isStopped; 
    100     volatile int isActive; 
    101     volatile int stopProcessing; // stop thread once existing buffers have been returned 
    102     volatile int abortProcessing; // stop thread immediately 
    103      
    104 //    DWORD allBuffersDurationMs; // used to calculate timeouts 
    105 } 
    106 PaMacCoreStream; 
    107  
    108 // Data needed by the CoreAudio callback functions 
    109 typedef struct PaMacCore_CD 
    110 { 
    111     PaMacCoreStream *stream; 
    112     PaStreamCallback *callback; 
    113     void *userData; 
    114     PaUtilConverter *inputConverter; 
    115     PaUtilConverter *outputConverter; 
    116     void *inputBuffer; 
    117     void *outputBuffer; 
    118     int inputChannelCount; 
    119     int outputChannelCount; 
    120     PaSampleFormat inputSampleFormat; 
    121     PaSampleFormat outputSampleFormat; 
    122     PaUtilTriangularDitherGenerator *ditherGenerator; 
    123 } 
    124 PaMacClientData; 
    125  
    126 // =====  CoreAudio-PortAudio bridge functions ===== 
    127 #pragma mark CoreAudio-PortAudio bridge functions 
    128  
    129 // Maps CoreAudio OSStatus codes to PortAudio PaError codes 
    130 static PaError conv_err(OSStatus error) 
    131 { 
    132     PaError result; 
    133      
    134     switch (error) { 
    135         case kAudioHardwareNoError: 
    136             result = paNoError; break; 
    137         case kAudioHardwareNotRunningError: 
    138             result = paInternalError; break; 
    139         case kAudioHardwareUnspecifiedError: 
    140             result = paInternalError; break; 
    141         case kAudioHardwareUnknownPropertyError: 
    142             result = paInternalError; break; 
    143         case kAudioHardwareBadPropertySizeError: 
    144             result = paInternalError; break; 
    145         case kAudioHardwareIllegalOperationError: 
    146             result = paInternalError; break; 
    147         case kAudioHardwareBadDeviceError: 
    148             result = paInvalidDevice; break; 
    149         case kAudioHardwareBadStreamError: 
    150             result = paBadStreamPtr; break; 
    151 //        case kAudioHardwareUnsupportedOperationError: 
    152 //            result = paInternalError; break; 
    153         case kAudioDeviceUnsupportedFormatError: 
    154             result = paSampleFormatNotSupported; break; 
    155         case kAudioDevicePermissionsError: 
    156             result = paDeviceUnavailable; break; 
    157         default: 
    158             result = paInternalError; 
    159     } 
    160      
    161     return result; 
    162 } 
    163  
    164 static AudioStreamBasicDescription *InitializeStreamDescription(const PaStreamParameters *parameters, double sampleRate) 
    165 { 
    166     struct AudioStreamBasicDescription *streamDescription = PaUtil_AllocateMemory(sizeof(AudioStreamBasicDescription)); 
    167     streamDescription->mSampleRate = sampleRate; 
    168     streamDescription->mFormatID = kAudioFormatLinearPCM; 
    169     streamDescription->mFormatFlags = 0; 
    170     streamDescription->mFramesPerPacket = 1; 
    171      
    172     if (parameters->sampleFormat & paNonInterleaved) { 
    173         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsNonInterleaved; 
    174         streamDescription->mChannelsPerFrame = 1; 
    175         streamDescription->mBytesPerFrame = Pa_GetSampleSize(parameters->sampleFormat); 
    176         streamDescription->mBytesPerPacket = Pa_GetSampleSize(parameters->sampleFormat); 
    177     } 
    178     else { 
    179         streamDescription->mChannelsPerFrame = parameters->channelCount; 
    180     } 
    181      
    182     streamDescription->mBytesPerFrame = Pa_GetSampleSize(parameters->sampleFormat) * streamDescription->mChannelsPerFrame; 
    183     streamDescription->mBytesPerPacket = streamDescription->mBytesPerFrame * streamDescription->mFramesPerPacket; 
    184      
    185     if (parameters->sampleFormat & paFloat32) { 
    186         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsFloat; 
    187         streamDescription->mBitsPerChannel = 32; 
    188     } 
    189     else if (parameters->sampleFormat & paInt32) { 
    190         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; 
    191         streamDescription->mBitsPerChannel = 32; 
    192     } 
    193     else if (parameters->sampleFormat & paInt24) { 
    194         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; 
    195         streamDescription->mBitsPerChannel = 24; 
    196     } 
    197     else if (parameters->sampleFormat & paInt16) { 
    198         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; 
    199         streamDescription->mBitsPerChannel = 16; 
    200     } 
    201     else if (parameters->sampleFormat & paInt8) { 
    202         streamDescription->mFormatFlags |= kLinearPCMFormatFlagIsSignedInteger; 
    203         streamDescription->mBitsPerChannel = 8; 
    204     }     
    205     else if (parameters->sampleFormat & paInt32) { 
    206         streamDescription->mBitsPerChannel = 8; 
    207     } 
    208      
    209     return streamDescription; 
    210 } 
    211  
    212 static PaStreamCallbackTimeInfo *InitializeTimeInfo(const AudioTimeStamp* now, const AudioTimeStamp* inputTime, const AudioTimeStamp* outputTime) 
    213 { 
    214     PaStreamCallbackTimeInfo *timeInfo = PaUtil_AllocateMemory(sizeof(PaStreamCallbackTimeInfo)); 
    215      
    216     timeInfo->inputBufferAdcTime = inputTime->mSampleTime; 
    217     timeInfo->currentTime = now->mSampleTime; 
    218     timeInfo->outputBufferDacTime = outputTime->mSampleTime; 
    219      
    220     return timeInfo; 
    221 } 
    222  
    223 // =====  support functions  ===== 
    224 #pragma mark support functions 
    225  
    226 static void CleanUp(PaMacCoreHostApiRepresentation *macCoreHostApi) 
    227 { 
    228     if( macCoreHostApi->allocations ) 
    229     { 
    230         PaUtil_FreeAllAllocations( macCoreHostApi->allocations ); 
    231         PaUtil_DestroyAllocationGroup( macCoreHostApi->allocations ); 
    232     } 
    233      
    234     PaUtil_FreeMemory( macCoreHostApi );     
    235 } 
    236  
    237 static PaError GetChannelInfo(PaDeviceInfo *deviceInfo, AudioDeviceID macCoreDeviceId, int isInput) 
     228 
     229static PaError GetChannelInfo( PaMacAUHAL *auhalHostApi, 
     230                               PaDeviceInfo *deviceInfo, 
     231                               AudioDeviceID macCoreDeviceId, 
     232                               int isInput) 
    238233{ 
    239234    UInt32 propSize; 
     
    241236    UInt32 i; 
    242237    int numChannels = 0; 
    243     AudioBufferList *buflist; 
    244  
    245     err = conv_err(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, NULL)); 
     238    AudioBufferList *buflist = NULL; 
     239    UInt32 frameLatency; 
     240 
     241    VVDBUG(("GetChannelInfo()\n")); 
     242 
     243    /* Get the number of channels from the stream configuration. 
     244       Fail if we can't get this. */ 
     245 
     246    err = ERR(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, NULL)); 
     247    if (err) 
     248        return err; 
     249 
    246250    buflist = PaUtil_AllocateMemory(propSize); 
    247     err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, buflist)); 
    248     if (!err) { 
    249         for (i = 0; i < buflist->mNumberBuffers; ++i) { 
    250             numChannels += buflist->mBuffers[i].mNumberChannels; 
     251    if( !buflist ) 
     252       return paInsufficientMemory; 
     253    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamConfiguration, &propSize, buflist)); 
     254    if (err) 
     255        goto error; 
     256 
     257    for (i = 0; i < buflist->mNumberBuffers; ++i) 
     258        numChannels += buflist->mBuffers[i].mNumberChannels; 
     259 
     260    if (isInput) 
     261        deviceInfo->maxInputChannels = numChannels; 
     262    else 
     263        deviceInfo->maxOutputChannels = numChannels; 
     264       
     265    if (numChannels > 0) /* do not try to retrieve the latency if there is no channels. */ 
     266    { 
     267       /* Get the latency.  Don't fail if we can't get this. */ 
     268       /* default to something reasonable */ 
     269       deviceInfo->defaultLowInputLatency = .01; 
     270       deviceInfo->defaultHighInputLatency = .10; 
     271       deviceInfo->defaultLowOutputLatency = .01; 
     272       deviceInfo->defaultHighOutputLatency = .10; 
     273       propSize = sizeof(UInt32); 
     274       err = WARNING(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &frameLatency)); 
     275       if (!err) 
     276       { 
     277          /** FEEDBACK: 
     278           * This code was arrived at by trial and error, and some extentive, but not exhaustive 
     279           * testing. Sebastien Beaulieu <seb@plogue.com> has suggested using 
     280           * kAudioDevicePropertyLatency + kAudioDevicePropertySafetyOffset + buffer size instead. 
     281           * At the time this code was written, many users were reporting dropouts with audio 
     282           * programs that probably used this formula. This was probably 
     283           * around 10.4.4, and the problem is probably fixed now. So perhaps 
     284           * his formula should be reviewed and used. 
     285           * */ 
     286          double secondLatency = frameLatency / deviceInfo->defaultSampleRate; 
     287          if (isInput) 
     288          { 
     289             deviceInfo->defaultLowInputLatency = 3 * secondLatency; 
     290             deviceInfo->defaultHighInputLatency = 3 * 10 * secondLatency; 
     291          } 
     292          else 
     293          { 
     294             deviceInfo->defaultLowOutputLatency = 3 * secondLatency; 
     295             deviceInfo->defaultHighOutputLatency = 3 * 10 * secondLatency; 
     296          } 
     297       } 
     298    } 
     299    PaUtil_FreeMemory( buflist ); 
     300    return paNoError; 
     301 error: 
     302    PaUtil_FreeMemory( buflist ); 
     303    return err; 
     304} 
     305 
     306static PaError InitializeDeviceInfo( PaMacAUHAL *auhalHostApi, 
     307                                     PaDeviceInfo *deviceInfo, 
     308                                     AudioDeviceID macCoreDeviceId, 
     309                                     PaHostApiIndex hostApiIndex ) 
     310{ 
     311    Float64 sampleRate; 
     312    char *name; 
     313    PaError err = paNoError; 
     314    UInt32 propSize; 
     315 
     316    VVDBUG(("InitializeDeviceInfo(): macCoreDeviceId=%ld\n", macCoreDeviceId)); 
     317 
     318    memset(deviceInfo, 0, sizeof(deviceInfo)); 
     319 
     320    deviceInfo->structVersion = 2; 
     321    deviceInfo->hostApi = hostApiIndex; 
     322 
     323    /* Get the device name.  Fail if we can't get it. */ 
     324    err = ERR(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, NULL)); 
     325    if (err) 
     326        return err; 
     327 
     328    name = PaUtil_GroupAllocateMemory(auhalHostApi->allocations,propSize); 
     329    if ( !name ) 
     330        return paInsufficientMemory; 
     331    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, name)); 
     332    if (err) 
     333        return err; 
     334    deviceInfo->name = name; 
     335 
     336    /* Try to get the default sample rate.  Don't fail if we can't get this. */ 
     337    propSize = sizeof(Float64); 
     338    err = ERR(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &sampleRate)); 
     339    if (err) 
     340        deviceInfo->defaultSampleRate = 0.0; 
     341    else 
     342        deviceInfo->defaultSampleRate = sampleRate; 
     343 
     344    /* Get the maximum number of input and output channels.  Fail if we can't get this. */ 
     345 
     346    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 1); 
     347    if (err) 
     348        return err; 
     349 
     350    err = GetChannelInfo(auhalHostApi, deviceInfo, macCoreDeviceId, 0); 
     351    if (err) 
     352        return err; 
     353 
     354    return paNoError; 
     355} 
     356 
     357PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex ) 
     358{ 
     359    PaError result = paNoError; 
     360    int i; 
     361    PaMacAUHAL *auhalHostApi; 
     362    PaDeviceInfo *deviceInfoArray; 
     363 
     364    VVDBUG(("PaMacCore_Initialize(): hostApiIndex=%d\n", hostApiIndex)); 
     365 
     366    auhalHostApi = (PaMacAUHAL*)PaUtil_AllocateMemory( sizeof(PaMacAUHAL) ); 
     367    if( !auhalHostApi ) 
     368    { 
     369        result = paInsufficientMemory; 
     370        goto error; 
     371    } 
     372 
     373    auhalHostApi->allocations = PaUtil_CreateAllocationGroup(); 
     374    if( !auhalHostApi->allocations ) 
     375    { 
     376        result = paInsufficientMemory; 
     377        goto error; 
     378    } 
     379 
     380    auhalHostApi->devIds = NULL; 
     381    auhalHostApi->devCount = 0; 
     382 
     383    /* get the info we need about the devices */ 
     384    result = gatherDeviceInfo( auhalHostApi ); 
     385    if( result != paNoError ) 
     386       goto error; 
     387 
     388    *hostApi = &auhalHostApi->inheritedHostApiRep; 
     389    (*hostApi)->info.structVersion = 1; 
     390    (*hostApi)->info.type = paCoreAudio; 
     391    (*hostApi)->info.name = "Core Audio"; 
     392 
     393    (*hostApi)->info.defaultInputDevice = paNoDevice; 
     394    (*hostApi)->info.defaultOutputDevice = paNoDevice; 
     395 
     396    (*hostApi)->info.deviceCount = 0;   
     397 
     398    if( auhalHostApi->devCount > 0 ) 
     399    { 
     400        (*hostApi)->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory( 
     401                auhalHostApi->allocations, sizeof(PaDeviceInfo*) * auhalHostApi->devCount); 
     402        if( !(*hostApi)->deviceInfos ) 
     403        { 
     404            result = paInsufficientMemory; 
     405            goto error; 
    251406        } 
    252                  
    253                 if (isInput) 
    254                         deviceInfo->maxInputChannels = numChannels; 
    255                 else 
    256                         deviceInfo->maxOutputChannels = numChannels; 
    257                  
    258         int frameLatency; 
    259         propSize = sizeof(UInt32); 
    260         err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyLatency, &propSize, &frameLatency)); 
    261         if (!err) { 
    262             double secondLatency = frameLatency / deviceInfo->defaultSampleRate; 
    263             if (isInput) { 
    264                 deviceInfo->defaultLowInputLatency = secondLatency; 
    265                 deviceInfo->defaultHighInputLatency = secondLatency; 
     407 
     408        /* allocate all device info structs in a contiguous block */ 
     409        deviceInfoArray = (PaDeviceInfo*)PaUtil_GroupAllocateMemory( 
     410                auhalHostApi->allocations, sizeof(PaDeviceInfo) * auhalHostApi->devCount ); 
     411        if( !deviceInfoArray ) 
     412        { 
     413            result = paInsufficientMemory; 
     414            goto error; 
     415        } 
     416 
     417        for( i=0; i < auhalHostApi->devCount; ++i ) 
     418        { 
     419            int err; 
     420            err = InitializeDeviceInfo( auhalHostApi, &deviceInfoArray[i], 
     421                                      auhalHostApi->devIds[i], 
     422                                      hostApiIndex ); 
     423            if (err == paNoError) 
     424            { /* copy some info and set the defaults */ 
     425                (*hostApi)->deviceInfos[(*hostApi)->info.deviceCount] = &deviceInfoArray[i]; 
     426                if (auhalHostApi->devIds[i] == auhalHostApi->defaultIn) 
     427                    (*hostApi)->info.defaultInputDevice = (*hostApi)->info.deviceCount; 
     428                if (auhalHostApi->devIds[i] == auhalHostApi->defaultOut) 
     429                    (*hostApi)->info.defaultOutputDevice = (*hostApi)->info.deviceCount; 
     430                (*hostApi)->info.deviceCount++; 
    266431            } 
    267             else { 
    268                 deviceInfo->defaultLowOutputLatency = secondLatency; 
    269                 deviceInfo->defaultHighOutputLatency = secondLatency; 
     432            else 
     433            { /* there was an error. we need to shift the devices down, so we ignore this one */ 
     434                int j; 
     435                auhalHostApi->devCount--; 
     436                for( j=i; j<auhalHostApi->devCount; ++j ) 
     437                   auhalHostApi->devIds[j] = auhalHostApi->devIds[j+1]; 
     438                i--; 
    270439            } 
    271440        } 
    272441    } 
    273     PaUtil_FreeMemory(buflist); 
    274      
    275     return err; 
    276 } 
    277  
    278 static PaError InitializeDeviceInfo(PaMacCoreDeviceInfo *macCoreDeviceInfo,  AudioDeviceID macCoreDeviceId, PaHostApiIndex hostApiIndex ) 
    279 { 
    280     PaDeviceInfo *deviceInfo = &macCoreDeviceInfo->inheritedDeviceInfo; 
    281     deviceInfo->structVersion = 2; 
    282     deviceInfo->hostApi = hostApiIndex; 
    283      
    284     PaError err = paNoError; 
    285     UInt32 propSize; 
    286  
    287     err = conv_err(AudioDeviceGetPropertyInfo(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, NULL)); 
    288     // FIXME: this allocation should be part of the allocations group 
    289     char *name = PaUtil_AllocateMemory(propSize); 
    290     err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyDeviceName, &propSize, name)); 
    291     if (!err) { 
    292         deviceInfo->name = name; 
    293     } 
    294      
    295     Float64 sampleRate; 
    296     propSize = sizeof(Float64); 
    297     err = conv_err(AudioDeviceGetProperty(macCoreDeviceId, 0, 0, kAudioDevicePropertyNominalSampleRate, &propSize, &sampleRate)); 
    298     if (!err) { 
    299         deviceInfo->defaultSampleRate = sampleRate; 
    300     } 
    301  
    302  
    303     // Get channel info 
    304     err = GetChannelInfo(deviceInfo, macCoreDeviceId, 1); 
    305     err = GetChannelInfo(deviceInfo, macCoreDeviceId, 0); 
    306  
    307     return err; 
    308 } 
    309  
    310 static PaError InitializeDeviceInfos( PaMacCoreHostApiRepresentation *macCoreHostApi, PaHostApiIndex hostApiIndex ) 
    311 { 
    312     PaError result = paNoError; 
    313     PaUtilHostApiRepresentation *hostApi; 
    314     PaMacCoreDeviceInfo *deviceInfoArray; 
    315  
    316     // initialise device counts and default devices under the assumption that there are no devices. These values are incremented below if and when devices are successfully initialized. 
    317     hostApi = &macCoreHostApi->inheritedHostApiRep; 
    318     hostApi->info.deviceCount = 0; 
    319     hostApi->info.defaultInputDevice = paNoDevice; 
    320     hostApi->info.defaultOutputDevice = paNoDevice; 
    321      
    322     UInt32 propsize; 
    323     AudioHardwareGetPropertyInfo(kAudioHardwarePropertyDevices, &propsize, NULL); 
    324     int numDevices = propsize / sizeof(AudioDeviceID); 
    325     hostApi->info.deviceCount = numDevices; 
    326     if (numDevices > 0) { 
    327         hostApi->deviceInfos = (PaDeviceInfo**)PaUtil_GroupAllocateMemory( 
    328                                             macCoreHostApi->allocations, sizeof(PaDeviceInfo*) * numDevices ); 
    329         if( !hostApi->deviceInfos ) 
     442 
     443    (*hostApi)->Terminate = Terminate; 
     444    (*hostApi)->OpenStream = OpenStream; 
     445    (*hostApi)->IsFormatSupported = IsFormatSupported; 
     446 
     447    PaUtil_InitializeStreamInterface( &auhalHostApi->callbackStreamInterface, 
     448                                      CloseStream, StartStream, 
     449                                      StopStream, AbortStream, IsStreamStopped, 
     450                                      IsStreamActive, 
     451                                      GetStreamTime, GetStreamCpuLoad, 
     452                                      PaUtil_DummyRead, PaUtil_DummyWrite, 
     453                                      PaUtil_DummyGetReadAvailable, 
     454                                      PaUtil_DummyGetWriteAvailable ); 
     455 
     456    PaUtil_InitializeStreamInterface( &auhalHostApi->blockingStreamInterface, 
     457                                      CloseStream, StartStream, 
     458                                      StopStream, AbortStream, IsStreamStopped, 
     459                                      IsStreamActive, 
     460                                      GetStreamTime, PaUtil_DummyGetCpuLoad, 
     461                                      ReadStream, WriteStream, 
     462                                      GetStreamReadAvailable, 
     463                                      GetStreamWriteAvailable ); 
     464 
     465    return result; 
     466 
     467error: 
     468    if( auhalHostApi ) 
     469    { 
     470        if( auhalHostApi->allocations ) 
    330471        { 
    331             return paInsufficientMemory; 
     472            PaUtil_FreeAllAllocations( auhalHostApi->allocations ); 
     473            PaUtil_DestroyAllocationGroup( auhalHostApi->allocations ); 
    332474        } 
    333  
    334         // allocate all device info structs in a contiguous block 
    335         deviceInfoArray = (PaMacCoreDeviceInfo*)PaUtil_GroupAllocateMemory( 
    336                                 macCoreHostApi->allocations, sizeof(PaMacCoreDeviceInfo) * numDevices ); 
    337         if( !deviceInfoArray ) 
    338         { 
    339             return paInsufficientMemory; 
    340         } 
    341          
    342         macCoreHostApi->macCoreDeviceIds = PaUtil_GroupAllocateMemory(macCoreHostApi->allocations, propsize); 
    343         AudioHardwareGetProperty(kAudioHardwarePropertyDevices, &propsize, macCoreHostApi->macCoreDeviceIds); 
    344  
    345         AudioDeviceID defaultInputDevice, defaultOutputDevice; 
    346         propsize = sizeof(AudioDeviceID); 
    347         AudioHardwareGetProperty(kAudioHardwarePropertyDefaultInputDevice, &propsize, &defaultInputDevice); 
    348         AudioHardwareGetProperty(kAudioHardwarePropertyDefaultOutputDevice, &propsize, &defaultOutputDevice); 
    349          
    350         UInt32 i; 
    351         for (i = 0; i < numDevices; ++i) { 
    352             if (macCoreHostApi->macCoreDeviceIds[i] == defaultInputDevice) { 
    353                 hostApi->info.defaultInputDevice = i; 
    354             } 
    355             if (macCoreHostApi->macCoreDeviceIds[i] == defaultOutputDevice) { 
    356                 hostApi->info.defaultOutputDevice = i; 
    357             } 
    358             InitializeDeviceInfo(&deviceInfoArray[i], macCoreHostApi->macCoreDeviceIds[i], hostApiIndex); 
    359             hostApi->deviceInfos[i] = &(deviceInfoArray[i].inheritedDeviceInfo);       
    360         } 
    361     } 
    362  
     475                 
     476        PaUtil_FreeMemory( auhalHostApi ); 
     477    } 
    363478    return result; 
    364479} 
    365480 
    366 static OSStatus CheckFormat(AudioDeviceID macCoreDeviceId, const PaStreamParameters *parameters, double sampleRate, int isInput) 
    367 { 
    368     UInt32 propSize = sizeof(AudioStreamBasicDescription); 
    369     AudioStreamBasicDescription *streamDescription = PaUtil_AllocateMemory(propSize); 
    370  
    371     streamDescription->mSampleRate = sampleRate; 
    372     streamDescription->mFormatID = 0; 
    373     streamDescription->mFormatFlags = 0; 
    374     streamDescription->mBytesPerPacket = 0; 
    375     streamDescription->mFramesPerPacket = 0; 
    376     streamDescription->mBytesPerFrame = 0; 
    377     streamDescription->mChannelsPerFrame = 0; 
    378     streamDescription->mBitsPerChannel = 0; 
    379     streamDescription->mReserved = 0; 
    380  
    381     OSStatus result = AudioDeviceGetProperty(macCoreDeviceId, 0, isInput, kAudioDevicePropertyStreamFormatSupported, &propSize, streamDescription); 
    382     PaUtil_FreeMemory(streamDescription); 
    383     return result; 
    384 } 
    385  
    386 static OSStatus CopyInputData(PaMacClientData* destination, const AudioBufferList *source, unsigned long frameCount) 
    387 { 
    388     int frameSpacing, channelSpacing; 
    389     if (destination->inputSampleFormat & paNonInterleaved) { 
    390         frameSpacing = 1; 
    391         channelSpacing = destination->inputChannelCount; 
    392     } 
    393     else { 
    394         frameSpacing = destination->inputChannelCount; 
    395         channelSpacing = 1; 
    396     } 
    397      
    398     AudioBuffer const *inputBuffer = &source->mBuffers[0]; 
    399     void *coreAudioBuffer = inputBuffer->mData; 
    400     void *portAudioBuffer = destination->inputBuffer; 
    401     UInt32 i, streamNumber, streamChannel; 
    402     for (i = streamNumber = streamChannel = 0; i < destination->inputChannelCount; ++i, ++streamChannel) { 
    403         if (streamChannel >= inputBuffer->mNumberChannels) { 
    404             ++streamNumber; 
    405             inputBuffer = &source->mBuffers[streamNumber]; 
    406             coreAudioBuffer = inputBuffer->mData; 
    407             streamChannel = 0; 
    408         } 
    409         destination->inputConverter(portAudioBuffer, frameSpacing, coreAudioBuffer, inputBuffer->mNumberChannels, frameCount, destination->ditherGenerator); 
    410         coreAudioBuffer += sizeof(Float32); 
    411         portAudioBuffer += Pa_GetSampleSize(destination->inputSampleFormat) * channelSpacing; 
    412     } 
    413     return 0; 
    414 } 
    415  
    416 static OSStatus CopyOutputData(AudioBufferList* destination, PaMacClientData *source, unsigned long frameCount) 
    417 { 
    418     int frameSpacing, channelSpacing; 
    419     if (source->outputSampleFormat & paNonInterleaved) { 
    420         frameSpacing = 1; 
    421         channelSpacing = source->outputChannelCount; 
    422     } 
    423     else { 
    424         frameSpacing = source->outputChannelCount; 
    425         channelSpacing = 1; 
    426     } 
    427      
    428     AudioBuffer *outputBuffer = &destination->mBuffers[0]; 
    429     void *coreAudioBuffer = outputBuffer->mData; 
    430     void *portAudioBuffer = source->outputBuffer; 
    431     UInt32 i, streamNumber, streamChannel; 
    432     for (i = streamNumber = streamChannel = 0; i < source->outputChannelCount; ++i, ++streamChannel) { 
    433         if (streamChannel >= outputBuffer->mNumberChannels) { 
    434             ++streamNumber; 
    435             outputBuffer = &destination->mBuffers[streamNumber]; 
    436             coreAudioBuffer = outputBuffer->mData; 
    437             streamChannel = 0; 
    438         } 
    439         source->outputConverter(coreAudioBuffer, outputBuffer->mNumberChannels, portAudioBuffer, frameSpacing, frameCount, NULL); 
    440         coreAudioBuffer += sizeof(Float32); 
    441         portAudioBuffer += Pa_GetSampleSize(source->outputSampleFormat) * channelSpacing; 
    442     }     
    443     return 0; 
    444 } 
    445  
    446 static OSStatus AudioIOProc( AudioDeviceID inDevice, 
    447                       const AudioTimeStamp* inNow, 
    448                       const AudioBufferList* inInputData, 
    449                       const AudioTimeStamp* inInputTime, 
    450                       AudioBufferList* outOutputData,  
    451                       const AudioTimeStamp* inOutputTime, 
    452                       void* inClientData) 
    453 { 
    454     PaMacClientData *clientData = (PaMacClientData *)inClientData; 
    455     PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime); 
    456      
    457     PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer ); 
    458      
    459     AudioBuffer *outputBuffer = &outOutputData->mBuffers[0]; 
    460     unsigned long frameCount = outputBuffer->mDataByteSize / (outputBuffer->mNumberChannels * sizeof(Float32)); 
    461  
    462     if (clientData->inputBuffer) { 
    463         CopyInputData(clientData, inInputData, frameCount); 
    464     } 
    465     PaStreamCallbackResult result = clientData->callback(clientData->inputBuffer, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData); 
    466     if (clientData->outputBuffer) { 
    467         CopyOutputData(outOutputData, clientData, frameCount); 
    468     } 
    469  
    470     PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount ); 
    471      
    472     if (result == paComplete || result == paAbort) { 
    473         Pa_StopStream(clientData->stream); 
    474     } 
    475     return 0; 
    476 } 
    477  
    478 // This is not for input-only streams, this is for streams where the input device is different from the output device 
    479 // TODO: This needs to store the output data in a buffer, to be written to the device the next time AudioOutputProc is called 
    480 static OSStatus AudioInputProc( AudioDeviceID inDevice, 
    481                          const AudioTimeStamp* inNow, 
    482                          const AudioBufferList* inInputData, 
    483                          const AudioTimeStamp* inInputTime, 
    484                          AudioBufferList* outOutputData,  
    485                          const AudioTimeStamp* inOutputTime, 
    486                          void* inClientData) 
    487 { 
    488     PaMacClientData *clientData = (PaMacClientData *)inClientData; 
    489     PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime); 
    490  
    491     PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer ); 
    492  
    493     AudioBuffer const *inputBuffer = &inInputData->mBuffers[0]; 
    494     unsigned long frameCount = inputBuffer->mDataByteSize / (inputBuffer->mNumberChannels * sizeof(Float32)); 
    495  
    496     CopyInputData(clientData, inInputData, frameCount); 
    497     clientData->callback(clientData->inputBuffer, NULL, frameCount, timeInfo, paNoFlag, clientData->userData); 
    498      
    499     PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount ); 
    500     return 0; 
    501 } 
    502  
    503 // This is not for output-only streams, this is for streams where the input device is different from the output device 
    504 static OSStatus AudioOutputProc( AudioDeviceID inDevice, 
    505                           const AudioTimeStamp* inNow, 
    506                           const AudioBufferList* inInputData, 
    507                           const AudioTimeStamp* inInputTime, 
    508                           AudioBufferList* outOutputData,  
    509                           const AudioTimeStamp* inOutputTime, 
    510                           void* inClientData) 
    511 { 
    512     PaMacClientData *clientData = (PaMacClientData *)inClientData; 
    513     PaStreamCallbackTimeInfo *timeInfo = InitializeTimeInfo(inNow, inInputTime, inOutputTime); 
    514  
    515     PaUtil_BeginCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer ); 
    516  
    517     AudioBuffer *outputBuffer = &outOutputData->mBuffers[0]; 
    518     unsigned long frameCount = outputBuffer->mDataByteSize / (outputBuffer->mNumberChannels * sizeof(Float32)); 
    519  
    520     clientData->callback(NULL, clientData->outputBuffer, frameCount, timeInfo, paNoFlag, clientData->userData); 
    521  
    522     CopyOutputData(outOutputData, clientData, frameCount); 
    523  
    524     PaUtil_EndCpuLoadMeasurement( &clientData->stream->cpuLoadMeasurer, frameCount ); 
    525     return 0; 
    526 } 
    527  
    528 static PaError SetSampleRate(AudioDeviceID device, double sampleRate, int isInput) 
    529 { 
    530     PaError result = paNoError; 
    531      
    532     double actualSampleRate; 
    533     UInt32 propSize = sizeof(double); 
    534     result = conv_err(AudioDeviceSetProperty(device, NULL, 0, isInput, kAudioDevicePropertyNominalSampleRate, propSize, &sampleRate)); 
    535      
    536     result = conv_err(AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyNominalSampleRate, &propSize, &actualSampleRate)); 
    537      
    538     if (result == paNoError && actualSampleRate != sampleRate) { 
    539         result = paInvalidSampleRate; 
    540     } 
    541      
    542     return result;     
    543 } 
    544  
    545 static PaError SetFramesPerBuffer(AudioDeviceID device, unsigned long framesPerBuffer, int isInput) 
    546 { 
    547     PaError result = paNoError; 
    548     UInt32 preferredFramesPerBuffer = framesPerBuffer; 
    549     //    while (preferredFramesPerBuffer > UINT32_MAX) { 
    550     //        preferredFramesPerBuffer /= 2; 
    551     //    } 
    552      
    553     UInt32 actualFramesPerBuffer; 
    554     UInt32 propSize = sizeof(UInt32); 
    555     result = conv_err(AudioDeviceSetProperty(device, NULL, 0, isInput, kAudioDevicePropertyBufferFrameSize, propSize, &preferredFramesPerBuffer)); 
    556      
    557     result = conv_err(AudioDeviceGetProperty(device, 0, isInput, kAudioDevicePropertyBufferFrameSize, &propSize, &actualFramesPerBuffer)); 
    558      
    559     if (result != paNoError) { 
    560         // do nothing 
    561     } 
    562     else if (actualFramesPerBuffer > framesPerBuffer) { 
    563         result = paBufferTooSmall; 
    564     } 
    565     else if (actualFramesPerBuffer < framesPerBuffer) { 
    566         result = paBufferTooBig; 
    567     } 
    568      
    569     return result;     
    570 } 
    571      
    572 static PaError SetUpUnidirectionalStream(AudioDeviceID device, double sampleRate, unsigned long framesPerBuffer, int isInput) 
    573 { 
    574     PaError err = paNoError; 
    575     err = SetSampleRate(device, sampleRate, isInput); 
    576     if( err == paNoError ) 
    577         err = SetFramesPerBuffer(device, framesPerBuffer, isInput); 
    578     return err; 
    579 } 
    580  
    581 // =====  PortAudio functions  ===== 
    582 #pragma mark PortAudio functions 
    583  
    584 #ifdef __cplusplus 
    585 extern "C" 
    586 { 
    587 #endif // __cplusplus 
    588      
    589     PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex index ); 
    590      
    591 #ifdef __cplusplus 
    592 } 
    593 #endif // __cplusplus 
    594481 
    595482static void Terminate( struct PaUtilHostApiRepresentation *hostApi ) 
    596483{ 
    597     PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation*)hostApi; 
    598      
    599     CleanUp(macCoreHostApi); 
     484    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi; 
     485 
     486    VVDBUG(("Terminate()\n")); 
     487 
     488    /* 
     489        IMPLEMENT ME: 
     490            - clean up any resources not handled by the allocation group 
     491        TODO: Double check that everything is handled by alloc group 
     492    */ 
     493 
     494    if( auhalHostApi->allocations ) 
     495    { 
     496        PaUtil_FreeAllAllocations( auhalHostApi->allocations ); 
     497        PaUtil_DestroyAllocationGroup( auhalHostApi->allocations ); 
     498    } 
     499 
     500    PaUtil_FreeMemory( auhalHostApi ); 
    600501} 
     502 
    601503 
    602504static PaError IsFormatSupported( struct PaUtilHostApiRepresentation *hostApi, 
     
    605507                                  double sampleRate ) 
    606508{ 
    607     PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation*)hostApi; 
    608     PaDeviceInfo *deviceInfo; 
    609      
    610     PaError result = paNoError; 
    611     if (inputParameters) { 
    612         deviceInfo = macCoreHostApi->inheritedHostApiRep.deviceInfos[inputParameters->device]; 
    613         if (inputParameters->channelCount > deviceInfo->maxInputChannels) 
    614             result = paInvalidChannelCount; 
    615         else if (CheckFormat(macCoreHostApi->macCoreDeviceIds[inputParameters->device], inputParameters, sampleRate, 1) != kAudioHardwareNoError) { 
    616             result = paInvalidSampleRate; 
    617         } 
    618     } 
    619     if (outputParameters && result == paNoError) { 
    620         deviceInfo = macCoreHostApi->inheritedHostApiRep.deviceInfos[outputParameters->device]; 
    621         if (outputParameters->channelCount > deviceInfo->maxOutputChannels) 
    622             result = paInvalidChannelCount; 
    623         else if (CheckFormat(macCoreHostApi->macCoreDeviceIds[outputParameters->device], outputParameters, sampleRate, 0) != kAudioHardwareNoError) { 
    624             result = paInvalidSampleRate; 
    625         } 
    626     } 
    627  
    628     return result; 
     509    int inputChannelCount, outputChannelCount; 
     510    PaSampleFormat inputSampleFormat, outputSampleFormat; 
     511 
     512    VVDBUG(("IsFormatSupported(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld sampleRate=%g\n", 
     513                inputParameters  ? inputParameters->channelCount  : -1, 
     514                inputParameters  ? inputParameters->sampleFormat  : -1, 
     515                outputParameters ? outputParameters->channelCount : -1, 
     516                outputParameters ? outputParameters->sampleFormat : -1, 
     517                (float) sampleRate )); 
     518  
     519    /** These first checks are standard PA checks. We do some fancier checks 
     520        later. */ 
     521    if( inputParameters ) 
     522    { 
     523        inputChannelCount = inputParameters->channelCount; 
     524        inputSampleFormat = inputParameters->sampleFormat; 
     525 
     526        /* all standard sample formats are supported by the buffer adapter, 
     527            this implementation doesn't support any custom sample formats */ 
     528        if( inputSampleFormat & paCustomFormat ) 
     529            return paSampleFormatNotSupported; 
     530             
     531        /* unless alternate device specification is supported, reject the use of 
     532            paUseHostApiSpecificDeviceSpecification */ 
     533 
     534        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification ) 
     535            return paInvalidDevice; 
     536 
     537        /* check that input device can support inputChannelCount */ 
     538        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels ) 
     539            return paInvalidChannelCount; 
     540    } 
     541    else 
     542    { 
     543        inputChannelCount = 0; 
     544    } 
     545 
     546    if( outputParameters ) 
     547    { 
     548        outputChannelCount = outputParameters->channelCount; 
     549        outputSampleFormat = outputParameters->sampleFormat; 
     550 
     551        /* all standard sample formats are supported by the buffer adapter, 
     552            this implementation doesn't support any custom sample formats */ 
     553        if( outputSampleFormat & paCustomFormat ) 
     554            return paSampleFormatNotSupported; 
     555             
     556        /* unless alternate device specification is supported, reject the use of 
     557            paUseHostApiSpecificDeviceSpecification */ 
     558 
     559        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification ) 
     560            return paInvalidDevice; 
     561 
     562        /* check that output device can support outputChannelCount */ 
     563        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels ) 
     564            return paInvalidChannelCount; 
     565 
     566    } 
     567    else 
     568    { 
     569        outputChannelCount = 0; 
     570    } 
     571  
     572    /* FEEDBACK */ 
     573    /*        I think the only way to check a given format SR combo is     */ 
     574    /*        to try opening it. This could be disruptive, is that Okay?   */ 
     575    /*        The alternative is to just read off available sample rates,  */ 
     576    /*        but this will not work %100 of the time (eg, a device that   */ 
     577    /*        supports N output at one rate but only N/2 at a higher rate.)*/ 
     578 
     579    /* The following code opens the device with the requested parameters to 
     580       see if it works. */ 
     581    { 
     582       PaError err; 
     583       PaStream *s; 
     584       err = OpenStream( hostApi, &s, inputParameters, outputParameters, 
     585                           sampleRate, 1024, 0, (PaStreamCallback *)1, NULL ); 
     586       if( err != paNoError && err != paInvalidSampleRate ) 
     587          DBUG( ( "OpenStream @ %g returned: %d: %s\n", 
     588                  (float) sampleRate, err, Pa_GetErrorText( err ) ) ); 
     589       if( err )  
     590          return err; 
     591       err = CloseStream( s ); 
     592       if( err ) { 
     593          /* FEEDBACK: is this more serious? should we assert? */ 
     594          DBUG( ( "WARNING: could not close Stream. %d: %s\n", 
     595                  err, Pa_GetErrorText( err ) ) ); 
     596       } 
     597    } 
     598 
     599    return paFormatIsSupported; 
    629600} 
    630601 
     602static PaError OpenAndSetupOneAudioUnit( 
     603                                   const PaStreamParameters *inStreamParams, 
     604                                   const PaStreamParameters *outStreamParams, 
     605                                   const unsigned long requestedFramesPerBuffer, 
     606                                   unsigned long *actualInputFramesPerBuffer, 
     607                                   unsigned long *actualOutputFramesPerBuffer, 
     608                                   const PaMacAUHAL *auhalHostApi, 
     609                                   AudioUnit *audioUnit, 
     610                                   AudioConverterRef *srConverter, 
     611                                   AudioDeviceID *audioDevice, 
     612                                   const double sampleRate, 
     613                                   void *refCon ) 
     614{ 
     615    ComponentDescription desc; 
     616    Component comp; 
     617    /*An Apple TN suggests using CAStreamBasicDescription, but that is C++*/ 
     618    AudioStreamBasicDescription desiredFormat; 
     619    OSErr result = noErr; 
     620    PaError paResult = paNoError; 
     621    int line = 0; 
     622    UInt32 callbackKey; 
     623    AURenderCallbackStruct rcbs; 
     624    unsigned long macInputStreamFlags  = paMacCorePlayNice; 
     625    unsigned long macOutputStreamFlags = paMacCorePlayNice; 
     626 
     627    VVDBUG(("OpenAndSetupOneAudioUnit(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld, requestedFramesPerBuffer=%ld\n", 
     628                inStreamParams  ? inStreamParams->channelCount  : -1, 
     629                inStreamParams  ? inStreamParams->sampleFormat  : -1, 
     630                outStreamParams ? outStreamParams->channelCount : -1, 
     631                outStreamParams ? outStreamParams->sampleFormat : -1, 
     632                requestedFramesPerBuffer )); 
     633 
     634    /* -- handle the degenerate case  -- */ 
     635    if( !inStreamParams && !outStreamParams ) { 
     636       *audioUnit = NULL; 
     637       *audioDevice = kAudioDeviceUnknown; 
     638       return paNoError; 
     639    } 
     640 
     641    /* -- get the user's api specific info, if they set any -- */ 
     642    if( inStreamParams && inStreamParams->hostApiSpecificStreamInfo ) 
     643       macInputStreamFlags= 
     644            ((paMacCoreStreamInfo*)inStreamParams->hostApiSpecificStreamInfo) 
     645                  ->flags; 
     646    if( outStreamParams && outStreamParams->hostApiSpecificStreamInfo ) 
     647       macOutputStreamFlags= 
     648            ((paMacCoreStreamInfo*)outStreamParams->hostApiSpecificStreamInfo) 
     649                  ->flags; 
     650    /* Override user's flags here, if desired for testing. */ 
     651 
     652    /* 
     653     * The HAL AU is a Mac OS style "component". 
     654     * the first few steps deal with that. 
     655     * Later steps work on a combination of Mac OS 
     656     * components and the slightly lower level 
     657     * HAL. 
     658     */ 
     659 
     660    /* -- describe the output type AudioUnit -- */ 
     661    /*  Note: for the default AudioUnit, we could use the 
     662     *  componentSubType value kAudioUnitSubType_DefaultOutput; 
     663     *  but I don't think that's relevant here. 
     664     */ 
     665    desc.componentType         = kAudioUnitType_Output; 
     666    desc.componentSubType      = kAudioUnitSubType_HALOutput; 
     667    desc.componentManufacturer = kAudioUnitManufacturer_Apple; 
     668    desc.componentFlags        = 0; 
     669    desc.componentFlagsMask    = 0; 
     670    /* -- find the component -- */ 
     671    comp = FindNextComponent( NULL, &desc ); 
     672    if( !comp ) 
     673    { 
     674       DBUG( ( "AUHAL component not found." ) ); 
     675       *audioUnit = NULL; 
     676       *audioDevice = kAudioDeviceUnknown; 
     677       return paUnanticipatedHostError; 
     678    } 
     679    /* -- open it -- */ 
     680    result = OpenAComponent( comp, audioUnit ); 
     681    if( result ) 
     682    { 
     683       DBUG( ( "Failed to open AUHAL component." ) ); 
     684       *audioUnit = NULL; 
     685       *audioDevice = kAudioDeviceUnknown; 
     686       return ERR( result ); 
     687    } 
     688    /* -- prepare a little error handling logic / hackery -- */ 
     689#define ERR_WRAP(mac_err) do { result = mac_err ; line = __LINE__ ; if ( result != noErr ) goto error ; } while(0) 
     690 
     691    /* -- if there is input, we have to explicitly enable input -- */ 
     692    if( inStreamParams ) 
     693    { 
     694       UInt32 enableIO; 
     695       enableIO = 1; 
     696       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     697                 kAudioOutputUnitProperty_EnableIO, 
     698                 kAudioUnitScope_Input, 
     699                 INPUT_ELEMENT, 
     700                 &enableIO, 
     701                 sizeof(enableIO) ) ); 
     702    } 
     703    /* -- if there is no output, we must explicitly disable output -- */ 
     704    if( !outStreamParams ) 
     705    { 
     706       UInt32 enableIO; 
     707       enableIO = 0; 
     708       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     709                 kAudioOutputUnitProperty_EnableIO, 
     710                 kAudioUnitScope_Output, 
     711                 OUTPUT_ELEMENT, 
     712                 &enableIO, 
     713                 sizeof(enableIO) ) ); 
     714    } 
     715    /* -- set the devices -- */ 
     716    /* make sure input and output are the same device if we are doing input and 
     717       output. */ 
     718    if( inStreamParams && outStreamParams ) 
     719       assert( outStreamParams->device == inStreamParams->device ); 
     720    if( inStreamParams ) 
     721    { 
     722       *audioDevice = auhalHostApi->devIds[inStreamParams->device] ; 
     723       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     724                    kAudioOutputUnitProperty_CurrentDevice, 
     725                    kAudioUnitScope_Global, 
     726                    INPUT_ELEMENT, 
     727                    audioDevice, 
     728                    sizeof(AudioDeviceID) ) ); 
     729    } 
     730    if( outStreamParams ) 
     731    { 
     732       *audioDevice = auhalHostApi->devIds[outStreamParams->device] ; 
     733       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     734                    kAudioOutputUnitProperty_CurrentDevice, 
     735                    kAudioUnitScope_Global, 
     736                    OUTPUT_ELEMENT, 
     737                    audioDevice, 
     738                    sizeof(AudioDeviceID) ) ); 
     739    } 
     740 
     741    /* -- set format -- */ 
     742    bzero( &desiredFormat, sizeof(desiredFormat) ); 
     743    desiredFormat.mFormatID         = kAudioFormatLinearPCM ; 
     744    desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked; 
     745    desiredFormat.mFramesPerPacket  = 1; 
     746    desiredFormat.mBitsPerChannel   = sizeof( float ) * 8; 
     747 
     748    result = 0; 
     749    /*  set device format first, but only touch the device if the user asked */ 
     750    if( inStreamParams ) { 
     751       /*The callback never calls back if we don't set the FPB */ 
     752       /*This seems wierd, because I would think setting anything on the device 
     753         would be disruptive.*/ 
     754       paResult = setBestFramesPerBuffer( *audioDevice, FALSE, 
     755                                          requestedFramesPerBuffer, 
     756                                          actualInputFramesPerBuffer ); 
     757       if( paResult ) goto error; 
     758       if( macInputStreamFlags & paMacCore_ChangeDeviceParameters ) { 
     759          bool requireExact; 
     760          requireExact=macInputStreamFlags&paMacCore_FailIfConversionRequired; 
     761          paResult = setBestSampleRateForDevice( *audioDevice, FALSE, 
     762                                                 requireExact, sampleRate ); 
     763          if( paResult ) goto error; 
     764       } 
     765       if( actualInputFramesPerBuffer && actualOutputFramesPerBuffer ) 
     766          *actualOutputFramesPerBuffer = *actualInputFramesPerBuffer ; 
     767    } 
     768    if( outStreamParams && !inStreamParams ) { 
     769       /*The callback never calls back if we don't set the FPB */ 
     770       /*This seems wierd, because I would think setting anything on the device 
     771         would be disruptive.*/ 
     772       paResult = setBestFramesPerBuffer( *audioDevice, TRUE, 
     773                                          requestedFramesPerBuffer, 
     774                                          actualOutputFramesPerBuffer ); 
     775       if( paResult ) goto error; 
     776       if( macOutputStreamFlags & paMacCore_ChangeDeviceParameters ) { 
     777          bool requireExact; 
     778          requireExact=macOutputStreamFlags&paMacCore_FailIfConversionRequired; 
     779          paResult = setBestSampleRateForDevice( *audioDevice, TRUE, 
     780                                                 requireExact, sampleRate ); 
     781          if( paResult ) goto error; 
     782       } 
     783    } 
     784 
     785    /* -- set the quality of the output converter -- */ 
     786    if( outStreamParams ) { 
     787       UInt32 value = kAudioConverterQuality_Max; 
     788       switch( macOutputStreamFlags & 0x0700 ) { 
     789       case 0x0100: /*paMacCore_ConversionQualityMin:*/ 
     790          value=kRenderQuality_Min; 
     791          break; 
     792       case 0x0200: /*paMacCore_ConversionQualityLow:*/ 
     793          value=kRenderQuality_Low; 
     794          break; 
     795       case 0x0300: /*paMacCore_ConversionQualityMedium:*/ 
     796          value=kRenderQuality_Medium; 
     797          break; 
     798       case 0x0400: /*paMacCore_ConversionQualityHigh:*/ 
     799          value=kRenderQuality_High; 
     800          break; 
     801       } 
     802       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     803                    kAudioUnitProperty_RenderQuality, 
     804                    kAudioUnitScope_Global, 
     805                    OUTPUT_ELEMENT, 
     806                    &value, 
     807                    sizeof(value) ) ); 
     808    } 
     809    /* now set the format on the Audio Units. */ 
     810    if( outStreamParams ) 
     811    { 
     812       desiredFormat.mSampleRate    =sampleRate; 
     813       desiredFormat.mBytesPerPacket=sizeof(float)*outStreamParams->channelCount; 
     814       desiredFormat.mBytesPerFrame =sizeof(float)*outStreamParams->channelCount; 
     815       desiredFormat.mChannelsPerFrame = outStreamParams->channelCount; 
     816       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     817                            kAudioUnitProperty_StreamFormat, 
     818                            kAudioUnitScope_Input, 
     819                            OUTPUT_ELEMENT, 
     820                            &desiredFormat, 
     821                            sizeof(AudioStreamBasicDescription) ) ); 
     822    } 
     823    if( inStreamParams ) 
     824    { 
     825       AudioStreamBasicDescription sourceFormat; 
     826       UInt32 size = sizeof( AudioStreamBasicDescription ); 
     827 
     828       /* keep the sample rate of the device, or we confuse AUHAL */ 
     829       ERR_WRAP( AudioUnitGetProperty( *audioUnit, 
     830                            kAudioUnitProperty_StreamFormat, 
     831                            kAudioUnitScope_Input, 
     832                            INPUT_ELEMENT, 
     833                            &sourceFormat, 
     834                            &size ) ); 
     835       desiredFormat.mSampleRate = sourceFormat.mSampleRate; 
     836       desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount; 
     837       desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount; 
     838       desiredFormat.mChannelsPerFrame = inStreamParams->channelCount; 
     839       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     840                            kAudioUnitProperty_StreamFormat, 
     841                            kAudioUnitScope_Output, 
     842                            INPUT_ELEMENT, 
     843                            &desiredFormat, 
     844                            sizeof(AudioStreamBasicDescription) ) ); 
     845    } 
     846    /* set the maximumFramesPerSlice */ 
     847    /* not doing this causes real problems 
     848       (eg. the callback might not be called). The idea of setting both this 
     849       and the frames per buffer on the device is that we'll be most likely 
     850       to actually get the frame size we requested in the callback with the 
     851       minimum latency. */ 
     852    if( outStreamParams ) { 
     853       UInt32 size = sizeof( *actualOutputFramesPerBuffer ); 
     854       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     855                            kAudioUnitProperty_MaximumFramesPerSlice, 
     856                            kAudioUnitScope_Input, 
     857                            OUTPUT_ELEMENT, 
     858                            actualOutputFramesPerBuffer, 
     859                            sizeof(unsigned long) ) ); 
     860       ERR_WRAP( AudioUnitGetProperty( *audioUnit, 
     861                            kAudioUnitProperty_MaximumFramesPerSlice, 
     862                            kAudioUnitScope_Global, 
     863                            OUTPUT_ELEMENT, 
     864                            actualOutputFramesPerBuffer, 
     865                            &size ) ); 
     866    } 
     867    if( inStreamParams ) { 
     868       /*UInt32 size = sizeof( *actualInputFramesPerBuffer );*/ 
     869       ERR_WRAP( AudioUnitSetProperty( *audioUnit, 
     870                            kAudioUnitProperty_MaximumFramesPerSlice, 
     871                            kAudioUnitScope_Output, 
     872                            INPUT_ELEMENT, 
     873                            actualInputFramesPerBuffer, 
     874                            sizeof(unsigned long) ) ); 
     875/* Don't know why this causes problems 
     876       ERR_WRAP( AudioUnitGetProperty( *audioUnit, 
     877                            kAudioUnitProperty_MaximumFramesPerSlice, 
     878                            kAudioUnitScope_Global, //Output, 
     879                            INPUT_ELEMENT, 
     880                            actualInputFramesPerBuffer, 
     881                            &size ) ); 
     882*/ 
     883    } 
     884 
     885    /* -- if we have input, we may need to setup an SR converter -- */ 
     886    /* even if we got the sample rate we asked for, we need to do 
     887       the conversion in case another program changes the underlying SR. */ 
     888    /* FIXME: I think we need to monitor stream and change the converter if the incoming format changes. */ 
     889    if( inStreamParams ) { 
     890       AudioStreamBasicDescription desiredFormat; 
     891       AudioStreamBasicDescription sourceFormat; 
     892       UInt32 sourceSize = sizeof( sourceFormat ); 
     893       bzero( &desiredFormat, sizeof(desiredFormat) ); 
     894       desiredFormat.mSampleRate       = sampleRate; 
     895       desiredFormat.mFormatID         = kAudioFormatLinearPCM ; 
     896       desiredFormat.mFormatFlags      = kAudioFormatFlagsNativeFloatPacked; 
     897       desiredFormat.mFramesPerPacket  = 1; 
     898       desiredFormat.mBitsPerChannel   = sizeof( float ) * 8; 
     899       desiredFormat.mBytesPerPacket=sizeof(float)*inStreamParams->channelCount; 
     900       desiredFormat.mBytesPerFrame =sizeof(float)*inStreamParams->channelCount; 
     901       desiredFormat.mChannelsPerFrame = inStreamParams->channelCount; 
     902 
     903       /* get the source format */ 
     904       ERR_WRAP( AudioUnitGetProperty( 
     905                         *audioUnit, 
     906                         kAudioUnitProperty_StreamFormat, 
     907                         kAudioUnitScope_Output, 
     908                         INPUT_ELEMENT, 
     909                         &sourceFormat, 
     910                         &sourceSize ) ); 
     911 
     912       if( desiredFormat.mSampleRate != sourceFormat.mSampleRate ) 
     913       { 
     914          UInt32 value = kAudioConverterQuality_Max; 
     915          switch( macInputStreamFlags & 0x0700 ) { 
     916          case 0x0100: /*paMacCore_ConversionQualityMin:*/ 
     917             value=kAudioConverterQuality_Min; 
     918             break; 
     919          case 0x0200: /*paMacCore_ConversionQualityLow:*/ 
     920             value=kAudioConverterQuality_Low; 
     921             break; 
     922          case 0x0300: /*paMacCore_ConversionQualityMedium:*/ 
     923             value=kAudioConverterQuality_Medium; 
     924             break; 
     925          case 0x0400: /*paMacCore_ConversionQualityHigh:*/ 
     926             value=kAudioConverterQuality_High; 
     927             break; 
     928          } 
     929          VDBUG(( "Creating sample rate converter for input" 
     930                  " to convert from %g to %g\n", 
     931                  (float)sourceFormat.mSampleRate, 
     932                  (float)desiredFormat.mSampleRate ) ); 
     933          /* create our converter */ 
     934          ERR_WRAP( AudioConverterNew(  
     935                             &sourceFormat, 
     936                             &desiredFormat, 
     937                             srConverter ) ); 
     938          /* Set quality */ 
     939          ERR_WRAP( AudioConverterSetProperty( 
     940                             *srConverter, 
     941                             kAudioConverterSampleRateConverterQuality, 
     942                             sizeof( value ), 
     943                             &value ) ); 
     944       } 
     945    } 
     946    /* -- set IOProc (callback) -- */ 
     947    callbackKey = outStreamParams ? kAudioUnitProperty_SetRenderCallback 
     948                                  : kAudioOutputUnitProperty_SetInputCallback ; 
     949    rcbs.inputProc = AudioIOProc; 
     950    rcbs.inputProcRefCon = refCon; 
     951    ERR_WRAP( AudioUnitSetProperty( 
     952                               *audioUnit, 
     953                               callbackKey, 
     954                               kAudioUnitScope_Output, 
     955                               outStreamParams ? OUTPUT_ELEMENT : INPUT_ELEMENT, 
     956                               &rcbs, 
     957                               sizeof(rcbs)) ); 
     958 
     959    if( inStreamParams && outStreamParams && *srConverter ) 
     960           ERR_WRAP( AudioUnitSetProperty( 
     961                               *audioUnit, 
     962                               kAudioOutputUnitProperty_SetInputCallback, 
     963                               kAudioUnitScope_Output, 
     964                               INPUT_ELEMENT, 
     965                               &rcbs, 
     966                               sizeof(rcbs)) ); 
     967 
     968    /*IMPLEMENTME: may need to worry about channel mapping.*/ 
     969 
     970    /* initialize the audio unit */ 
     971    ERR_WRAP( AudioUnitInitialize(*audioUnit) ); 
     972 
     973    if( inStreamParams && outStreamParams ) 
     974       VDBUG( ("Opened device %ld for input and output.\n", *audioDevice ) ); 
     975    else if( inStreamParams ) 
     976       VDBUG( ("Opened device %ld for input.\n", *audioDevice ) ); 
     977    else if( outStreamParams ) 
     978       VDBUG( ("Opened device %ld for output.\n", *audioDevice ) ); 
     979    return paNoError; 
     980#undef ERR_WRAP 
     981 
     982    error: 
     983       CloseComponent( *audioUnit ); 
     984       *audioUnit = NULL; 
     985       if( result ) 
     986          return PaMacCore_SetError( result, line, 1 ); 
     987       return paResult; 
     988} 
     989 
     990/* see pa_hostapi.h for a list of validity guarantees made about OpenStream parameters */ 
    631991static PaError OpenStream( struct PaUtilHostApiRepresentation *hostApi, 
    632992                           PaStream** s, 
     
    639999                           void *userData ) 
    6401000{ 
    641     PaError err = paNoError; 
    642     PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation *)hostApi; 
    643     PaMacCoreStream *stream = PaUtil_AllocateMemory(sizeof(PaMacCoreStream)); 
    644     stream->isActive = 0; 
    645     stream->isStopped = 1; 
    646     stream->inputDevice = kAudioDeviceUnknown; 
    647     stream->outputDevice = kAudioDeviceUnknown; 
    648      
    649     PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation, 
    650                                            ( (streamCallback) 
    651                                              ? &macCoreHostApi->callbackStreamInterface 
    652                                              : &macCoreHostApi->blockingStreamInterface ), 
    653                                            streamCallback, userData ); 
     1001    PaError result = paNoError; 
     1002    PaMacAUHAL *auhalHostApi = (PaMacAUHAL*)hostApi; 
     1003    PaMacCoreStream *stream = 0; 
     1004    int inputChannelCount, outputChannelCount; 
     1005    PaSampleFormat inputSampleFormat, outputSampleFormat; 
     1006    PaSampleFormat hostInputSampleFormat, hostOutputSampleFormat; 
     1007    VVDBUG(("OpenStream(): in chan=%d, in fmt=%ld, out chan=%d, out fmt=%ld SR=%g, FPB=%ld\n", 
     1008                inputParameters  ? inputParameters->channelCount  : -1, 
     1009                inputParameters  ? inputParameters->sampleFormat  : -1, 
     1010                outputParameters ? outputParameters->channelCount : -1, 
     1011                outputParameters ? outputParameters->sampleFormat : -1, 
     1012                (float) sampleRate, 
     1013                framesPerBuffer )); 
     1014    VDBUG( ("Opening Stream.\n") ); 
     1015 
     1016    /*These first few bits of code are from paSkeleton with few modifications.*/ 
     1017    if( inputParameters ) 
     1018    { 
     1019        inputChannelCount = inputParameters->channelCount; 
     1020        inputSampleFormat = inputParameters->sampleFormat; 
     1021 
     1022        /* unless alternate device specification is supported, reject the use of 
     1023            paUseHostApiSpecificDeviceSpecification */ 
     1024 
     1025        if( inputParameters->device == paUseHostApiSpecificDeviceSpecification ) 
     1026            return paInvalidDevice; 
     1027 
     1028        /* check that input device can support inputChannelCount */ 
     1029        if( inputChannelCount > hostApi->deviceInfos[ inputParameters->device ]->maxInputChannels ) 
     1030            return paInvalidChannelCount; 
     1031 
     1032        /* Host supports interleaved float32 */ 
     1033        hostInputSampleFormat = paFloat32; 
     1034    } 
     1035    else 
     1036    { 
     1037        inputChannelCount = 0; 
     1038        inputSampleFormat = hostInputSampleFormat = paFloat32; /* Surpress 'uninitialised var' warnings. */ 
     1039    } 
     1040 
     1041    if( outputParameters ) 
     1042    { 
     1043        outputChannelCount = outputParameters->channelCount; 
     1044        outputSampleFormat = outputParameters->sampleFormat; 
     1045         
     1046        /* unless alternate device specification is supported, reject the use of 
     1047            paUseHostApiSpecificDeviceSpecification */ 
     1048 
     1049        if( outputParameters->device == paUseHostApiSpecificDeviceSpecification ) 
     1050            return paInvalidDevice; 
     1051 
     1052        /* check that output device can support inputChannelCount */ 
     1053        if( outputChannelCount > hostApi->deviceInfos[ outputParameters->device ]->maxOutputChannels ) 
     1054            return paInvalidChannelCount; 
     1055 
     1056        /* Host supports interleaved float32 */ 
     1057        hostOutputSampleFormat = paFloat32; 
     1058    } 
     1059    else 
     1060    { 
     1061        outputChannelCount = 0; 
     1062        outputSampleFormat = hostOutputSampleFormat = paFloat32; /* Surpress 'uninitialized var' warnings. */ 
     1063    } 
     1064 
     1065    /* validate platform specific flags */ 
     1066    if( (streamFlags & paPlatformSpecificFlags) != 0 ) 
     1067        return paInvalidFlag; /* unexpected platform specific flag */ 
     1068 
     1069    stream = (PaMacCoreStream*)PaUtil_AllocateMemory( sizeof(PaMacCoreStream) ); 
     1070    if( !stream ) 
     1071    { 
     1072        result = paInsufficientMemory; 
     1073        goto error; 
     1074    } 
     1075 
     1076    /* If we fail after this point, we my be left in a bad state, with 
     1077       some data structures setup and others not. So, first thing we 
     1078       do is initialize everything so that if we fail, we know what hasn't 
     1079       been touched. 
     1080     */ 
     1081 
     1082    stream->inputAudioBufferList.mBuffers[0].mData = NULL; 
     1083    stream->inputRingBuffer.buffer = NULL; 
     1084    bzero( &stream->blio, sizeof( PaMacBlio ) ); 
     1085/* 
     1086    stream->blio.inputRingBuffer.buffer = NULL; 
     1087    stream->blio.outputRingBuffer.buffer = NULL; 
     1088    stream->blio.inputSampleFormat = inputParameters?inputParameters->sampleFormat:0; 
     1089    stream->blio.inputSampleSize = computeSampleSizeFromFormat(stream->blio.inputSampleFormat); 
     1090    stream->blio.outputSampleFormat=outputParameters?outputParameters->sampleFormat:0; 
     1091    stream->blio.outputSampleSize = computeSampleSizeFromFormat(stream->blio.outputSampleFormat); 
     1092*/ 
     1093    stream->inputSRConverter = NULL; 
     1094    stream->inputUnit = NULL; 
     1095    stream->outputUnit = NULL; 
     1096    stream->inputFramesPerBuffer = 0; 
     1097    stream->outputFramesPerBuffer = 0; 
     1098    stream->bufferProcessorIsInitialized = FALSE; 
     1099 
     1100    /* assert( streamCallback ) ; */ /* only callback mode is implemented */ 
     1101    if( streamCallback ) 
     1102    { 
     1103        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation, 
     1104                                        &auhalHostApi->callbackStreamInterface, 
     1105                                        streamCallback, userData ); 
     1106    } 
     1107    else 
     1108    { 
     1109        PaUtil_InitializeStreamRepresentation( &stream->streamRepresentation, 
     1110                                        &auhalHostApi->blockingStreamInterface, 
     1111                                        BlioCallback, &stream->blio ); 
     1112    } 
     1113 
    6541114    PaUtil_InitializeCpuLoadMeasurer( &stream->cpuLoadMeasurer, sampleRate ); 
    655      
     1115 
     1116    /* -- handle paFramesPerBufferUnspecified -- */ 
     1117    if( framesPerBuffer == paFramesPerBufferUnspecified ) { 
     1118       long requested = 64; 
     1119       if( inputParameters ) 
     1120          requested = MAX( requested, inputParameters->suggestedLatency * sampleRate / 2 ); 
     1121       if( outputParameters ) 
     1122          requested = MAX( requested, outputParameters->suggestedLatency *sampleRate / 2 ); 
     1123       VDBUG( ("Block Size unspecified. Based on Latency, the user wants a Block Size near: %ld.\n", 
     1124              requested ) ); 
     1125       if( requested <= 64 ) { 
     1126          /*requested a realtively low latency. make sure this is in range of devices */ 
     1127          /*try to get the device's min natural buffer size and use that (but no smaller than 64).*/ 
     1128          AudioValueRange audioRange; 
     1129          size_t size = sizeof( audioRange ); 
     1130          if( inputParameters ) { 
     1131             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[inputParameters->device], 
     1132                                          0, 
     1133                                          false, 
     1134                                          kAudioDevicePropertyBufferFrameSizeRange, 
     1135                                          &size, &audioRange ) ); 
     1136             if( result ) 
     1137                requested = MAX( requested, audioRange.mMinimum ); 
     1138          } 
     1139          if( outputParameters ) { 
     1140             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[outputParameters->device], 
     1141                                          0, 
     1142                                          false, 
     1143                                          kAudioDevicePropertyBufferFrameSizeRange, 
     1144                                          &size, &audioRange ) ); 
     1145             if( result ) 
     1146                requested = MAX( requested, audioRange.mMinimum ); 
     1147          } 
     1148       } else { 
     1149          /* requested a realtively high latency. make sure this is in range of devices */ 
     1150          /*try to get the device's max natural buffer size and use that (but no larger than 1024).*/ 
     1151          AudioValueRange audioRange; 
     1152          size_t size = sizeof( audioRange ); 
     1153          requested = MIN( requested, 1024 ); 
     1154          if( inputParameters ) { 
     1155             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[inputParameters->device], 
     1156                                          0, 
     1157                                          false, 
     1158                                          kAudioDevicePropertyBufferFrameSizeRange, 
     1159                                          &size, &audioRange ) ); 
     1160             if( result ) 
     1161                requested = MIN( requested, audioRange.mMaximum ); 
     1162          } 
     1163          if( outputParameters ) { 
     1164             WARNING( result = AudioDeviceGetProperty( auhalHostApi->devIds[outputParameters->device], 
     1165                                          0, 
     1166                                          false, 
     1167                                          kAudioDevicePropertyBufferFrameSizeRange, 
     1168                                          &size, &audioRange ) ); 
     1169             if( result ) 
     1170                requested = MIN( requested, audioRange.mMaximum ); 
     1171          } 
     1172       } 
     1173       /* -- double check ranges -- */ 
     1174       if( requested > 1024 ) requested = 1024; 
     1175       if( requested < 64 ) requested = 64; 
     1176       VDBUG(("After querying hardware, setting block size to %ld.\n", requested)); 
     1177       framesPerBuffer = requested; 
     1178    } 
     1179 
     1180    /* -- Now we actually open and setup streams. -- */ 
     1181    if( inputParameters && outputParameters && outputParameters->device == inputParameters->device ) 
     1182    { /* full duplex. One device. */ 
     1183       result = OpenAndSetupOneAudioUnit( inputParameters, 
     1184                                          outputParameters, 
     1185                                          framesPerBuffer, 
     1186                                          &(stream->inputFramesPerBuffer), 
     1187                                          &(stream->outputFramesPerBuffer), 
     1188                                          auhalHostApi, 
     1189                                          &(stream->inputUnit), 
     1190                                          &(stream->inputSRConverter), 
     1191                                          &(stream->inputDevice), 
     1192                                          sampleRate, 
     1193                                          stream ); 
     1194       stream->outputUnit = stream->inputUnit; 
     1195       stream->outputDevice = stream->inputDevice; 
     1196       if( result != paNoError ) 
     1197           goto error; 
     1198    } 
     1199    else 
     1200    { /* full duplex, different devices OR simplex */ 
     1201       result = OpenAndSetupOneAudioUnit( NULL, 
     1202                                          outputParameters, 
     1203                                          framesPerBuffer, 
     1204                                          NULL, 
     1205                                          &(stream->outputFramesPerBuffer), 
     1206                                          auhalHostApi, 
     1207                                          &(stream->outputUnit), 
     1208                                          NULL, 
     1209                                          &(stream->outputDevice), 
     1210                                          sampleRate, 
     1211                                          stream ); 
     1212       if( result != paNoError ) 
     1213           goto error; 
     1214       result = OpenAndSetupOneAudioUnit( inputParameters, 
     1215                                          NULL, 
     1216                                          framesPerBuffer, 
     1217                                          &(stream->inputFramesPerBuffer), 
     1218                                          NULL, 
     1219                                          auhalHostApi, 
     1220                                          &(stream->inputUnit), 
     1221                                          &(stream->inputSRConverter), 
     1222                                          &(stream->inputDevice), 
     1223                                          sampleRate, 
     1224                                          stream ); 
     1225       if( result != paNoError ) 
     1226           goto error; 
     1227    } 
     1228 
     1229    if( stream->inputUnit ) { 
     1230       const size_t szfl = sizeof(float); 
     1231       /* setup the AudioBufferList used for input */ 
     1232       bzero( &stream->inputAudioBufferList, sizeof( AudioBufferList ) ); 
     1233       stream->inputAudioBufferList.mNumberBuffers = 1; 
     1234       stream->inputAudioBufferList.mBuffers[0].mNumberChannels 
     1235                 = inputChannelCount; 
     1236       stream->inputAudioBufferList.mBuffers[0].mDataByteSize 
     1237                 = stream->inputFramesPerBuffer*inputChannelCount*szfl; 
     1238       stream->inputAudioBufferList.mBuffers[0].mData 
     1239                 = (float *) calloc( 
     1240                               stream->inputFramesPerBuffer*inputChannelCount, 
     1241                               szfl ); 
     1242       if( !stream->inputAudioBufferList.mBuffers[0].mData ) 
     1243       { 
     1244          result = paInsufficientMemory; 
     1245          goto error; 
     1246       } 
     1247         
     1248       /* 
     1249        * If input and output devs are different or we are doing SR conversion, 
     1250        * we also need a 
     1251        * ring buffer to store inpt data while waiting for output 
     1252        * data. 
     1253        */ 
     1254       if( (stream->outputUnit && stream->inputUnit != stream->outputUnit) 
     1255           || stream->inputSRConverter ) 
     1256       { 
     1257          /* May want the ringSize ot initial position in 
     1258             ring buffer to depend somewhat on sample rate change */ 
     1259 
     1260          void *data; 
     1261          long ringSize; 
     1262 
     1263          ringSize = computeRingBufferSize( inputParameters, 
     1264                                            outputParameters, 
     1265                                            stream->inputFramesPerBuffer, 
     1266                                            stream->outputFramesPerBuffer, 
     1267                                            sampleRate ); 
     1268          /*ringSize <<= 4; *//*16x bigger, for testing */ 
     1269 
     1270 
     1271          /*now, we need to allocate memory for the ring buffer*/ 
     1272          data = calloc( ringSize, szfl ); 
     1273          if( !data ) 
     1274          { 
     1275             result = paInsufficientMemory; 
     1276             goto error; 
     1277          } 
     1278 
     1279          /* now we can initialize the ring buffer */ 
     1280          assert( 0 == 
     1281            RingBuffer_Init( &stream->inputRingBuffer, 
     1282                             ringSize*szfl, data ) ); 
     1283          /* advance the read point a little, so we are reading from the 
     1284             middle of the buffer */ 
     1285          if( stream->outputUnit ) 
     1286             RingBuffer_AdvanceWriteIndex( &stream->inputRingBuffer, ringSize*szfl / RING_BUFFER_ADVANCE_DENOMINATOR ); 
     1287       } 
     1288    } 
     1289 
     1290    /* -- initialize Blio Buffer Processors -- */ 
     1291    if( !streamCallback ) 
     1292    { 
     1293       long ringSize; 
     1294 
     1295       ringSize = computeRingBufferSize( inputParameters, 
     1296                                         outputParameters, 
     1297                                         stream->inputFramesPerBuffer, 
     1298                                         stream->outputFramesPerBuffer, 
     1299                                         sampleRate ); 
     1300       result = initializeBlioRingBuffers( &stream->blio, 
     1301              inputParameters?inputParameters->sampleFormat:0 , 
     1302              outputParameters?outputParameters->sampleFormat:0 , 
     1303              MAX(stream->inputFramesPerBuffer,stream->outputFramesPerBuffer), 
     1304              ringSize, 
     1305              inputParameters?inputChannelCount:0 , 
     1306              outputParameters?outputChannelCount:0 ) ; 
     1307       if( result != paNoError ) 
     1308          goto error; 
     1309    } 
     1310 
     1311    /* -- initialize Buffer Processor -- */ 
     1312    { 
     1313       unsigned long maxHostFrames = stream->inputFramesPerBuffer; 
     1314       if( stream->outputFramesPerBuffer > maxHostFrames ) 
     1315          maxHostFrames = stream->outputFramesPerBuffer; 
     1316       result = PaUtil_InitializeBufferProcessor( &stream->bufferProcessor, 
     1317                 inputChannelCount, inputSampleFormat, 
     1318                 hostInputSampleFormat, 
     1319                 outputChannelCount, outputSampleFormat, 
     1320                 hostOutputSampleFormat, 
     1321                 sampleRate, 
     1322                 streamFlags, 
     1323                 framesPerBuffer, 
     1324                 /* If sample rate conversion takes place, the buffer size 
     1325                    will not be known. */ 
     1326                 maxHostFrames, 
     1327                 stream->inputSRConverter 
     1328                              ? paUtilUnknownHostBufferSize 
     1329                              : paUtilBoundedHostBufferSize, 
     1330                 streamCallback ? streamCallback : BlioCallback, 
     1331                 streamCallback ? userData : &stream->blio ); 
     1332       if( result != paNoError ) 
     1333           goto error; 
     1334    } 
     1335    stream->bufferProcessorIsInitialized = TRUE; 
     1336 
     1337    /* 
     1338        IMPLEMENT ME: initialise the following fields with estimated or actual 
     1339        values. 
     1340        I think this is okay the way it is br 12/1/05 
     1341        maybe need to change input latency estimate if IO devs differ 
     1342    */ 
     1343    stream->streamRepresentation.streamInfo.inputLatency = 
     1344            PaUtil_GetBufferProcessorInputLatency(&stream->bufferProcessor)/sampleRate; 
     1345    stream->streamRepresentation.streamInfo.outputLatency = 
     1346            PaUtil_GetBufferProcessorOutputLatency(&stream->bufferProcessor)/sampleRate; 
     1347    stream->streamRepresentation.streamInfo.sampleRate = sampleRate; 
     1348 
     1349    stream->sampleRate  = sampleRate; 
     1350    stream->outDeviceSampleRate = 0; 
     1351    if( stream->outputUnit ) { 
     1352       Float64 rate; 
     1353       UInt32 size = sizeof( rate ); 
     1354       result = ERR( AudioDeviceGetProperty( stream->outputDevice, 
     1355                                    0, 
     1356                                    FALSE, 
     1357                                    kAudioDevicePropertyNominalSampleRate, 
     1358                                    &size, &rate ) ); 
     1359       if( result ) 
     1360          goto error; 
     1361       stream->outDeviceSampleRate = rate; 
     1362    } 
     1363    stream->inDeviceSampleRate = 0; 
     1364    if( stream->inputUnit ) { 
     1365       Float64 rate; 
     1366       UInt32 size = sizeof( rate ); 
     1367       result = ERR( AudioDeviceGetProperty( stream->inputDevice, 
     1368                                    0, 
     1369                                    TRUE, 
     1370                                    kAudioDevicePropertyNominalSampleRate, 
     1371                                    &size, &rate ) ); 
     1372       if( result ) 
     1373          goto error; 
     1374       stream->inDeviceSampleRate = rate; 
     1375    } 
     1376    stream->userInChan  = inputChannelCount; 
     1377    stream->userOutChan = outputChannelCount; 
     1378 
     1379    stream->isTimeSet   = FALSE; 
     1380    stream->state = STOPPED; 
     1381    stream->xrunFlags = 0; 
     1382 
    6561383    *s = (PaStream*)stream; 
    657     PaMacClientData *clientData = PaUtil_AllocateMemory(sizeof(PaMacClientData)); 
    658     clientData->stream = stream; 
    659     clientData->callback = streamCallback; 
    660     clientData->userData = userData; 
    661     clientData->inputBuffer = 0; 
    662     clientData->outputBuffer = 0; 
    663     clientData->ditherGenerator = PaUtil_AllocateMemory(sizeof(PaUtilTriangularDitherGenerator)); 
    664     PaUtil_InitializeTriangularDitherState(clientData->ditherGenerator); 
    665      
    666     if (inputParameters != NULL) { 
    667         stream->inputDevice = macCoreHostApi->macCoreDeviceIds[inputParameters->device]; 
    668         clientData->inputConverter = PaUtil_SelectConverter(paFloat32, inputParameters->sampleFormat, streamFlags); 
    669         clientData->inputBuffer = PaUtil_AllocateMemory(Pa_GetSampleSize(inputParameters->sampleFormat) * framesPerBuffer * inputParameters->channelCount); 
    670         clientData->inputChannelCount = inputParameters->channelCount; 
    671         clientData->inputSampleFormat = inputParameters->sampleFormat; 
    672         err = SetUpUnidirectionalStream(stream->inputDevice, sampleRate, framesPerBuffer, 1); 
    673     } 
    674      
    675     if (err == paNoError && outputParameters != NULL) { 
    676         stream->outputDevice = macCoreHostApi->macCoreDeviceIds[outputParameters->device]; 
    677         clientData->outputConverter = PaUtil_SelectConverter(outputParameters->sampleFormat, paFloat32, streamFlags); 
    678         clientData->outputBuffer = PaUtil_AllocateMemory(Pa_GetSampleSize(outputParameters->sampleFormat) * framesPerBuffer * outputParameters->channelCount); 
    679         clientData->outputChannelCount = outputParameters->channelCount; 
    680         clientData->outputSampleFormat = outputParameters->sampleFormat; 
    681         err = SetUpUnidirectionalStream(stream->outputDevice, sampleRate, framesPerBuffer, 0); 
    682     } 
    683  
    684     if (inputParameters == NULL || outputParameters == NULL || stream->inputDevice == stream->outputDevice) { 
    685         AudioDeviceID device = (inputParameters == NULL) ? stream->outputDevice : stream->inputDevice; 
    686  
    687         AudioDeviceAddIOProc(device, AudioIOProc, clientData); 
    688     } 
    689     else { 
    690         // using different devices for input and output 
    691         AudioDeviceAddIOProc(stream->inputDevice, AudioInputProc, clientData); 
    692         AudioDeviceAddIOProc(stream->outputDevice, AudioOutputProc, clientData); 
    693     } 
    694      
    695     return err; 
     1384 
     1385    return result; 
     1386 
     1387error: 
     1388    CloseStream( stream ); 
     1389    return result; 
    6961390} 
    6971391 
    698 // Note: When CloseStream() is called, the multi-api layer ensures that the stream has already been stopped or aborted. 
     1392PaTime GetStreamTime( PaStream *s ) 
     1393{ 
     1394   /* FIXME: I am not at all sure this timing info stuff is right. 
     1395             patest_sine_time reports negative latencies, which is wierd.*/ 
     1396    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
     1397    AudioTimeStamp timeStamp; 
     1398 
     1399    VVDBUG(("GetStreamTime()\n")); 
     1400 
     1401    if ( !stream->isTimeSet ) 
     1402        return (PaTime)0; 
     1403 
     1404    if ( stream->outputDevice ) { 
     1405        AudioDeviceGetCurrentTime( stream->outputDevice, &timeStamp); 
     1406        return (PaTime)(timeStamp.mSampleTime - stream->startTime.mSampleTime)/stream->outDeviceSampleRate; 
     1407    } else if ( stream->inputDevice ) { 
     1408        AudioDeviceGetCurrentTime( stream->inputDevice, &timeStamp); 
     1409    return (PaTime)(timeStamp.mSampleTime - stream->startTime.mSampleTime)/stream->inDeviceSampleRate; 
     1410    } else { 
     1411        return (PaTime)0; 
     1412    } 
     1413} 
     1414 
     1415static void setStreamStartTime( PaStream *stream ) 
     1416{ 
     1417   /* FIXME: I am not at all sure this timing info stuff is right. 
     1418             patest_sine_time reports negative latencies, which is wierd.*/ 
     1419   PaMacCoreStream *s = (PaMacCoreStream *) stream; 
     1420   VVDBUG(("setStreamStartTime()\n")); 
     1421   if( s->outputDevice ) 
     1422      AudioDeviceGetCurrentTime( s->outputDevice, &s->startTime); 
     1423   else if( s->inputDevice ) 
     1424      AudioDeviceGetCurrentTime( s->inputDevice, &s->startTime); 
     1425   else 
     1426      bzero( &s->startTime, sizeof( s->startTime ) ); 
     1427 
     1428   //FIXME: we need a memory barier here 
     1429 
     1430   s->isTimeSet = TRUE; 
     1431} 
     1432 
     1433 
     1434static PaTime TimeStampToSecs(PaMacCoreStream *stream, const AudioTimeStamp* timeStamp) 
     1435{ 
     1436    VVDBUG(("TimeStampToSecs()\n")); 
     1437    //printf( "ATS: %lu, %g, %g\n", timeStamp->mFlags, timeStamp->mSampleTime, timeStamp->mRateScalar ); 
     1438    if (timeStamp->mFlags & kAudioTimeStampSampleTimeValid) 
     1439        return (timeStamp->mSampleTime / stream->sampleRate); 
     1440    else 
     1441        return 0; 
     1442} 
     1443 
     1444#define RING_BUFFER_EMPTY (1000) 
     1445 
     1446static OSStatus ringBufferIOProc( AudioConverterRef inAudioConverter,  
     1447                             UInt32*ioDataSize,  
     1448                             void** outData,  
     1449                             void*inUserData ) 
     1450{ 
     1451   void *dummyData; 
     1452   long dummySize; 
     1453   RingBuffer *rb = (RingBuffer *) inUserData; 
     1454 
     1455   VVDBUG(("ringBufferIOProc()\n")); 
     1456 
     1457   assert( sizeof( UInt32 ) == sizeof( long ) ); 
     1458   if( RingBuffer_GetReadAvailable( rb ) == 0 ) { 
     1459      *outData = NULL; 
     1460      *ioDataSize = 0; 
     1461      return RING_BUFFER_EMPTY; 
     1462   } 
     1463   RingBuffer_GetReadRegions( rb, *ioDataSize, 
     1464                              outData, (long *)ioDataSize,  
     1465                              &dummyData, &dummySize ); 
     1466       
     1467   assert( *ioDataSize ); 
     1468   RingBuffer_AdvanceReadIndex( rb, *ioDataSize ); 
     1469 
     1470   return noErr; 
     1471} 
     1472 
     1473/* 
     1474 * Called by the AudioUnit API to process audio from the sound card. 
     1475 * This is where the magic happens. 
     1476 */ 
     1477/* FEEDBACK: there is a lot of redundant code here because of how all the cases differ. This makes it hard to maintain, so if there are suggestinos for cleaning it up, I'm all ears. */ 
     1478static OSStatus AudioIOProc( void *inRefCon, 
     1479                               AudioUnitRenderActionFlags *ioActionFlags, 
     1480                               const AudioTimeStamp *inTimeStamp, 
     1481                               UInt32 inBusNumber, 
     1482                               UInt32 inNumberFrames, 
     1483                               AudioBufferList *ioData ) 
     1484{ 
     1485   unsigned long framesProcessed     = 0; 
     1486   PaStreamCallbackTimeInfo timeInfo = {0,0,0}; 
     1487   PaMacCoreStream *stream           = (PaMacCoreStream*)inRefCon; 
     1488   const bool isRender               = inBusNumber == OUTPUT_ELEMENT; 
     1489   int callbackResult                = paContinue ; 
     1490 
     1491   VVDBUG(("AudioIOProc()\n")); 
     1492 
     1493   PaUtil_BeginCpuLoadMeasurement( &stream->cpuLoadMeasurer ); 
     1494 
     1495   /* -----------------------------------------------------------------*\ 
     1496      This output may be useful for debugging, 
     1497      But printing durring the callback is a bad enough idea that 
     1498      this is not enabled by enableing the usual debugging calls. 
     1499   \* -----------------------------------------------------------------*/ 
     1500   /* 
     1501   static int renderCount = 0; 
     1502   static int inputCount = 0; 
     1503   printf( "-------------------  starting reder/input\n" ); 
     1504   if( isRender ) 
     1505      printf("Render callback (%d):\t", ++renderCount); 
     1506   else 
     1507      printf("Input callback  (%d):\t", ++inputCount); 
     1508   printf( "Call totals: %d (input), %d (render)\n", inputCount, renderCount ); 
     1509 
     1510   printf( "--- inBusNumber: %lu\n", inBusNumber ); 
     1511   printf( "--- inNumberFrames: %lu\n", inNumberFrames ); 
     1512   printf( "--- %x ioData\n", (unsigned) ioData ); 
     1513   if( ioData ) 
     1514   { 
     1515      int i=0; 
     1516      printf( "--- ioData.mNumBuffers %lu: \n", ioData->mNumberBuffers ); 
     1517      for( i=0; i<ioData->mNumberBuffers; ++i ) 
     1518         printf( "--- ioData buffer %d size: %lu.\n", i, ioData->mBuffers[i].mDataByteSize ); 
     1519   } 
     1520      ----------------------------------------------------------------- */ 
     1521 
     1522   if( !stream->isTimeSet ) 
     1523      setStreamStartTime( stream ); 
     1524 
     1525   if( isRender ) { 
     1526      AudioTimeStamp currentTime; 
     1527      timeInfo.outputBufferDacTime = TimeStampToSecs(stream, inTimeStamp); 
     1528      AudioDeviceGetCurrentTime(stream->outputDevice, &currentTime); 
     1529      timeInfo.currentTime = TimeStampToSecs(stream, &currentTime); 
     1530   } 
     1531   if( isRender && stream->inputUnit == stream->outputUnit ) 
     1532      timeInfo.inputBufferAdcTime = TimeStampToSecs(stream, inTimeStamp); 
     1533   if( !isRender ) { 
     1534      AudioTimeStamp currentTime; 
     1535      timeInfo.inputBufferAdcTime = TimeStampToSecs(stream, inTimeStamp); 
     1536      AudioDeviceGetCurrentTime(stream->inputDevice, &currentTime); 
     1537      timeInfo.currentTime = TimeStampToSecs(stream, &currentTime); 
     1538   } 
     1539 
     1540   //printf( "---%g, %g, %g\n", timeInfo.inputBufferAdcTime, timeInfo.currentTime, timeInfo.outputBufferDacTime ); 
     1541 
     1542   if( isRender && stream->inputUnit == stream->outputUnit 
     1543                && !stream->inputSRConverter ) 
     1544   { 
     1545      /* --------- Full Duplex, One Device, no SR Conversion ------- 
     1546       * 
     1547       * This is the lowest latency case, and also the simplest. 
     1548       * Input data and output data are available at the same time. 
     1549       * we do not use the input SR converter or the input ring buffer. 
     1550       * 
     1551       */ 
     1552      OSErr err = 0; 
     1553      unsigned long frames; 
     1554 
     1555      /* -- start processing -- */ 
     1556      PaUtil_BeginBufferProcessing( &(stream->bufferProcessor), 
     1557                                    &timeInfo, 
     1558                                    stream->xrunFlags ); 
     1559      stream->xrunFlags = 0; 
     1560 
     1561      /* -- compute frames. do some checks -- */ 
     1562      assert( ioData->mNumberBuffers == 1 ); 
     1563      assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan ); 
     1564      frames = ioData->mBuffers[0].mDataByteSize; 
     1565      frames /= sizeof( float ) * ioData->mBuffers[0].mNumberChannels; 
     1566      /* -- copy and process input data -- */ 
     1567      err= AudioUnitRender(stream->inputUnit, 
     1568                    ioActionFlags, 
     1569                    inTimeStamp, 
     1570                    INPUT_ELEMENT, 
     1571                    inNumberFrames, 
     1572                    &stream->inputAudioBufferList ); 
     1573      /* FEEDBACK: I'm not sure what to do when this call fails */ 
     1574      assert( !err ); 
     1575 
     1576      PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames ); 
     1577      PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1578                          0, 
     1579                          stream->inputAudioBufferList.mBuffers[0].mData, 
     1580                          stream->inputAudioBufferList.mBuffers[0].mNumberChannels); 
     1581      /* -- Copy and process output data -- */ 
     1582      PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames ); 
     1583      PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor), 
     1584                                        0, 
     1585                                        ioData->mBuffers[0].mData, 
     1586                                        ioData->mBuffers[0].mNumberChannels); 
     1587      /* -- complete processing -- */ 
     1588      framesProcessed = 
     1589                 PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1590                                             &callbackResult ); 
     1591   } 
     1592   else if( isRender ) 
     1593   { 
     1594      /* -------- Output Side of Full Duplex (Separate Devices or SR Conversion) 
     1595       *       -- OR Simplex Output 
     1596       * 
     1597       * This case handles output data as in the full duplex case, 
     1598       * and, if there is input data, reads it off the ring buffer  
     1599       * and into the PA buffer processor. If sample rate conversion 
     1600       * is required on input, that is done here as well. 
     1601       */ 
     1602      unsigned long frames; 
     1603 
     1604      /* Sometimes, when stopping a duplex stream we get erroneous 
     1605         xrun flags, so if this is our last run, clear the flags. */ 
     1606      int xrunFlags = stream->xrunFlags; 
     1607/* 
     1608      if( xrunFlags & paInputUnderflow ) 
     1609         printf( "input underflow.\n" ); 
     1610      if( xrunFlags & paInputOverflow ) 
     1611         printf( "input overflow.\n" ); 
     1612*/ 
     1613      if( stream->state == STOPPING || stream->state == CALLBACK_STOPPED ) 
     1614         xrunFlags = 0; 
     1615 
     1616      /* -- start processing -- */ 
     1617      PaUtil_BeginBufferProcessing( &(stream->bufferProcessor), 
     1618                                    &timeInfo, 
     1619                                    xrunFlags ); 
     1620      stream->xrunFlags = 0; /* FEEDBACK: we only send flags to Buf Proc once */ 
     1621 
     1622      /* -- Copy and process output data -- */ 
     1623      assert( ioData->mNumberBuffers == 1 ); 
     1624      frames = ioData->mBuffers[0].mDataByteSize; 
     1625      frames /= sizeof( float ) * ioData->mBuffers[0].mNumberChannels; 
     1626      assert( ioData->mBuffers[0].mNumberChannels == stream->userOutChan ); 
     1627      PaUtil_SetOutputFrameCount( &(stream->bufferProcessor), frames ); 
     1628      PaUtil_SetInterleavedOutputChannels( &(stream->bufferProcessor), 
     1629                                     0, 
     1630                                     ioData->mBuffers[0].mData, 
     1631                                     ioData->mBuffers[0].mNumberChannels); 
     1632 
     1633      /* -- copy and process input data, and complete processing -- */ 
     1634      if( stream->inputUnit ) { 
     1635         const int flsz = sizeof( float ); 
     1636         /* Here, we read the data out of the ring buffer, through the 
     1637            audio converter. */ 
     1638         int inChan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels; 
     1639         if( stream->inputSRConverter ) 
     1640         { 
     1641               OSStatus err; 
     1642               UInt32 size; 
     1643               float data[ inChan * frames ]; 
     1644               size = sizeof( data ); 
     1645               err = AudioConverterFillBuffer(  
     1646                             stream->inputSRConverter, 
     1647                             ringBufferIOProc, 
     1648                             &stream->inputRingBuffer, 
     1649                             &size, 
     1650                             (void *)&data ); 
     1651               if( err == RING_BUFFER_EMPTY ) 
     1652               { /*the ring buffer callback underflowed */ 
     1653                  err = 0; 
     1654                  bzero( ((char *)data) + size, sizeof(data)-size ); 
     1655                  stream->xrunFlags |= paInputUnderflow; 
     1656               } 
     1657               ERR( err ); 
     1658               assert( !err ); 
     1659                
     1660               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames ); 
     1661               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1662                                   0, 
     1663                                   data, 
     1664                                   inChan ); 
     1665               framesProcessed = 
     1666                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1667                                                &callbackResult ); 
     1668         } 
     1669         else 
     1670         { 
     1671            /* Without the AudioConverter is actually a bit more complex 
     1672               because we have to do a little buffer processing that the 
     1673               AudioConverter would otherwise handle for us. */ 
     1674            void *data1, *data2; 
     1675            long size1, size2; 
     1676            RingBuffer_GetReadRegions( &stream->inputRingBuffer, 
     1677                                       inChan*frames*flsz, 
     1678                                       &data1, &size1, 
     1679                                       &data2, &size2 ); 
     1680            if( size1 / ( flsz * inChan ) == frames ) { 
     1681               /* simplest case: all in first buffer */ 
     1682               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames ); 
     1683               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1684                                   0, 
     1685                                   data1, 
     1686                                   inChan ); 
     1687               framesProcessed = 
     1688                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1689                                                &callbackResult ); 
     1690               RingBuffer_AdvanceReadIndex(&stream->inputRingBuffer, size1 ); 
     1691            } else if( ( size1 + size2 ) / ( flsz * inChan ) < frames ) { 
     1692               /*we underflowed. take what data we can, zero the rest.*/ 
     1693               float data[frames*inChan]; 
     1694               if( size1 ) 
     1695                  memcpy( data, data1, size1 ); 
     1696               if( size2 ) 
     1697                  memcpy( data+size1, data2, size2 ); 
     1698               bzero( data+size1+size2, frames*flsz*inChan - size1 - size2 ); 
     1699 
     1700               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), frames ); 
     1701               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1702                                   0, 
     1703                                   data, 
     1704                                   inChan ); 
     1705               framesProcessed = 
     1706                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1707                                                &callbackResult ); 
     1708               RingBuffer_AdvanceReadIndex( &stream->inputRingBuffer, 
     1709                                            size1+size2 ); 
     1710               /* flag underflow */ 
     1711               stream->xrunFlags |= paInputUnderflow; 
     1712            } else { 
     1713               /*we got all the data, but split between buffers*/ 
     1714               PaUtil_SetInputFrameCount( &(stream->bufferProcessor), 
     1715                                          size1 / ( flsz * inChan ) ); 
     1716               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1717                                   0, 
     1718                                   data1, 
     1719                                   inChan ); 
     1720               PaUtil_Set2ndInputFrameCount( &(stream->bufferProcessor), 
     1721                                             size2 / ( flsz * inChan ) ); 
     1722               PaUtil_Set2ndInterleavedInputChannels( &(stream->bufferProcessor), 
     1723                                   0, 
     1724                                   data2, 
     1725                                   inChan ); 
     1726               framesProcessed = 
     1727                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1728                                                &callbackResult ); 
     1729               RingBuffer_AdvanceReadIndex(&stream->inputRingBuffer, size1+size2 ); 
     1730            } 
     1731         } 
     1732      } else { 
     1733         framesProcessed = 
     1734                 PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1735                                             &callbackResult ); 
     1736      } 
     1737 
     1738   } 
     1739   else 
     1740   { 
     1741      /* ------------------ Input 
     1742       * 
     1743       * First, we read off the audio data and put it in the ring buffer. 
     1744       * if this is an input-only stream, we need to process it more, 
     1745       * otherwise, we let the output case deal with it. 
     1746       */ 
     1747      OSErr err = 0; 
     1748      int chan = stream->inputAudioBufferList.mBuffers[0].mNumberChannels ; 
     1749      /* FIXME: looping here may not actually be necessary, but it was something I tried in testing. */ 
     1750      do { 
     1751         err= AudioUnitRender(stream->inputUnit, 
     1752                 ioActionFlags, 
     1753                 inTimeStamp, 
     1754                 INPUT_ELEMENT, 
     1755                 inNumberFrames, 
     1756                 &stream->inputAudioBufferList ); 
     1757         if( err == -10874 ) 
     1758            inNumberFrames /= 2; 
     1759      } while( err == -10874 && inNumberFrames > 1 ); 
     1760      /* FEEDBACK: I'm not sure what to do when this call fails */ 
     1761      ERR( err ); 
     1762      assert( !err ); 
     1763      if( stream->inputSRConverter || stream->outputUnit ) 
     1764      { 
     1765         /* If this is duplex or we use a converter, put the data 
     1766            into the ring buffer. */ 
     1767         long bytesIn, bytesOut; 
     1768         bytesIn = sizeof( float ) * inNumberFrames * chan; 
     1769         bytesOut = RingBuffer_Write( &stream->inputRingBuffer, 
     1770                                stream->inputAudioBufferList.mBuffers[0].mData, 
     1771                                bytesIn ); 
     1772         if( bytesIn != bytesOut ) 
     1773            stream->xrunFlags |= paInputOverflow ; 
     1774      } 
     1775      else 
     1776      { 
     1777         /* for simplex input w/o SR conversion, 
     1778            just pop the data into the buffer processor.*/ 
     1779         PaUtil_BeginBufferProcessing( &(stream->bufferProcessor), 
     1780                              &timeInfo, 
     1781                              stream->xrunFlags ); 
     1782         stream->xrunFlags = 0; 
     1783 
     1784         PaUtil_SetInputFrameCount( &(stream->bufferProcessor), inNumberFrames); 
     1785         PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1786                             0, 
     1787                             stream->inputAudioBufferList.mBuffers[0].mData, 
     1788                             chan ); 
     1789         framesProcessed = 
     1790              PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1791                                          &callbackResult ); 
     1792      } 
     1793      if( !stream->outputUnit && stream->inputSRConverter ) 
     1794      { 
     1795         /* ------------------ Simplex Input w/ SR Conversion 
     1796          * 
     1797          * if this is a simplex input stream, we need to read off the buffer, 
     1798          * do our sample rate conversion and pass the results to the buffer 
     1799          * processor. 
     1800          * The logic here is complicated somewhat by the fact that we don't 
     1801          * know how much data is available, so we loop on reasonably sized 
     1802          * chunks, and let the BufferProcessor deal with the rest. 
     1803          * 
     1804          */ 
     1805         /*This might be too big or small depending on SR conversion*/ 
     1806         float data[ chan * inNumberFrames ]; 
     1807         OSStatus err; 
     1808         do 
     1809         { /*Run the buffer processor until we are out of data*/ 
     1810            UInt32 size; 
     1811            long f; 
     1812 
     1813            size = sizeof( data ); 
     1814            err = AudioConverterFillBuffer(  
     1815                          stream->inputSRConverter, 
     1816                          ringBufferIOProc, 
     1817                          &stream->inputRingBuffer, 
     1818                          &size, 
     1819                          (void *)data ); 
     1820            if( err != RING_BUFFER_EMPTY ) 
     1821               ERR( err ); 
     1822            assert( err == 0 || err == RING_BUFFER_EMPTY ); 
     1823 
     1824            f = size / ( chan * sizeof(float) ); 
     1825            PaUtil_SetInputFrameCount( &(stream->bufferProcessor), f ); 
     1826            if( f ) 
     1827            { 
     1828               PaUtil_BeginBufferProcessing( &(stream->bufferProcessor), 
     1829                                             &timeInfo, 
     1830                                             stream->xrunFlags ); 
     1831               stream->xrunFlags = 0; 
     1832 
     1833               PaUtil_SetInterleavedInputChannels( &(stream->bufferProcessor), 
     1834                                0, 
     1835                                data, 
     1836                                chan ); 
     1837               framesProcessed = 
     1838                    PaUtil_EndBufferProcessing( &(stream->bufferProcessor), 
     1839                                                &callbackResult ); 
     1840            } 
     1841         } while( callbackResult == paContinue && !err ); 
     1842      } 
     1843   } 
     1844 
     1845   switch( callbackResult ) 
     1846   { 
     1847   case paContinue: break; 
     1848   case paComplete: 
     1849   case paAbort: 
     1850      stream->isTimeSet = FALSE; 
     1851      stream->state = CALLBACK_STOPPED ; 
     1852      if( stream->outputUnit ) 
     1853         AudioOutputUnitStop(stream->outputUnit); 
     1854      if( stream->inputUnit ) 
     1855         AudioOutputUnitStop(stream->inputUnit); 
     1856      break; 
     1857   } 
     1858 
     1859   PaUtil_EndCpuLoadMeasurement( &stream->cpuLoadMeasurer, framesProcessed ); 
     1860   return noErr; 
     1861} 
     1862 
     1863 
     1864/* 
     1865    When CloseStream() is called, the multi-api layer ensures that 
     1866    the stream has already been stopped or aborted. 
     1867*/ 
    6991868static PaError CloseStream( PaStream* s ) 
    7001869{ 
    701     PaError err = paNoError; 
     1870    /* This may be called from a failed OpenStream. 
     1871       Therefore, each piece of info is treated seperately. */ 
     1872    PaError result = paNoError; 
    7021873    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    7031874 
    704     PaUtil_ResetCpuLoadMeasurer( &stream->cpuLoadMeasurer ); 
    705  
    706     if (stream->inputDevice != kAudioDeviceUnknown) { 
    707         if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) { 
    708             err = conv_err(AudioDeviceRemoveIOProc(stream->inputDevice, AudioIOProc)); 
    709         } 
    710         else { 
    711             err = conv_err(AudioDeviceRemoveIOProc(stream->inputDevice, AudioInputProc)); 
    712             err = conv_err(AudioDeviceRemoveIOProc(stream->outputDevice, AudioOutputProc)); 
    713         } 
    714     } 
    715     else { 
    716         err = conv_err(AudioDeviceRemoveIOProc(stream->outputDevice, AudioIOProc)); 
    717     } 
    718      
    719     return err; 
     1875    VVDBUG(("CloseStream()\n")); 
     1876    VDBUG( ( "Closing stream.\n" ) ); 
     1877 
     1878    if( stream ) { 
     1879       if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) { 
     1880          AudioUnitUninitialize( stream->outputUnit ); 
     1881          CloseComponent( stream->outputUnit ); 
     1882       } 
     1883       stream->outputUnit = NULL; 
     1884       if( stream->inputUnit ) 
     1885       { 
     1886          AudioUnitUninitialize( stream->inputUnit ); 
     1887          CloseComponent( stream->inputUnit ); 
     1888          stream->inputUnit = NULL; 
     1889       } 
     1890       if( stream->inputRingBuffer.buffer ) 
     1891          free( (void *) stream->inputRingBuffer.buffer ); 
     1892       stream->inputRingBuffer.buffer = NULL; 
     1893       /*TODO: is there more that needs to be done on error 
     1894               from AudioConverterDispose?*/ 
     1895       if( stream->inputSRConverter ) 
     1896          ERR( AudioConverterDispose( stream->inputSRConverter ) ); 
     1897       stream->inputSRConverter = NULL; 
     1898       if( stream->inputAudioBufferList.mBuffers[0].mData ) 
     1899          free( stream->inputAudioBufferList.mBuffers[0].mData ); 
     1900       stream->inputAudioBufferList.mBuffers[0].mData = NULL; 
     1901 
     1902       result = destroyBlioRingBuffers( &stream->blio ); 
     1903       if( result ) 
     1904          return result; 
     1905       if( stream->bufferProcessorIsInitialized ) 
     1906          PaUtil_TerminateBufferProcessor( &stream->bufferProcessor ); 
     1907       PaUtil_TerminateStreamRepresentation( &stream->streamRepresentation ); 
     1908       PaUtil_FreeMemory( stream ); 
     1909    } 
     1910 
     1911    return result; 
    7201912} 
    7211913 
     
    7231915static PaError StartStream( PaStream *s ) 
    7241916{ 
    725     PaError err = paNoError; 
    7261917    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    727  
    728     if (stream->inputDevice != kAudioDeviceUnknown) { 
    729         if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) { 
    730             err = conv_err(AudioDeviceStart(stream->inputDevice, AudioIOProc)); 
    731         } 
    732         else { 
    733             err = conv_err(AudioDeviceStart(stream->inputDevice, AudioInputProc)); 
    734             err = conv_err(AudioDeviceStart(stream->outputDevice, AudioOutputProc)); 
    735         } 
    736     } 
    737     else { 
    738         err = conv_err(AudioDeviceStart(stream->outputDevice, AudioIOProc)); 
    739     } 
    740      
    741     stream->isActive = 1; 
    742     stream->isStopped = 0; 
    743     return err; 
     1918    OSErr result = noErr; 
     1919    VVDBUG(("StartStream()\n")); 
     1920    VDBUG( ( "Starting stream.\n" ) ); 
     1921 
     1922#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0) 
     1923 
     1924    /*FIXME: maybe want to do this on close/abort for faster start? */ 
     1925    PaUtil_ResetBufferProcessor( &stream->bufferProcessor ); 
     1926    if(  stream->inputSRConverter ) 
     1927       ERR_WRAP( AudioConverterReset( stream->inputSRConverter ) ); 
     1928 
     1929    /* -- start -- */ 
     1930    stream->state = ACTIVE; 
     1931    if( stream->inputUnit ) { 
     1932       ERR_WRAP( AudioOutputUnitStart(stream->inputUnit) ); 
     1933    } 
     1934    if( stream->outputUnit && stream->outputUnit != stream->inputUnit ) { 
     1935       ERR_WRAP( AudioOutputUnitStart(stream->outputUnit) ); 
     1936    } 
     1937 
     1938    //setStreamStartTime( stream ); 
     1939    //stream->isTimeSet = TRUE; 
     1940 
     1941    return paNoError; 
     1942#undef ERR_WRAP 
     1943} 
     1944 
     1945 
     1946static PaError StopStream( PaStream *s ) 
     1947{ 
     1948    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
     1949    OSErr result = noErr; 
     1950    PaError paErr; 
     1951    VVDBUG(("StopStream()\n")); 
     1952 
     1953    VDBUG( ("Waiting for BLIO.\n") ); 
     1954    waitUntilBlioWriteBufferIsFlushed( &stream->blio ); 
     1955    VDBUG( ( "Stopping stream.\n" ) ); 
     1956 
     1957    stream->isTimeSet = FALSE; 
     1958    stream->state = STOPPING; 
     1959 
     1960#define ERR_WRAP(mac_err) do { result = mac_err ; if ( result != noErr ) return ERR(result) ; } while(0) 
     1961    /* -- stop and reset -- */ 
     1962    if( stream->inputUnit == stream->outputUnit && stream->inputUnit ) 
     1963    { 
     1964       ERR_WRAP( AudioOutputUnitStop(stream->inputUnit) ); 
     1965       ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 1) ); 
     1966       ERR_WRAP( AudioUnitReset(stream->inputUnit, kAudioUnitScope_Global, 0) ); 
     1967    } 
     1968    else 
     1969    { 
     1970       if( stream->inputUnit ) 
     1971       { 
     1972          ERR_WRAP(AudioOutputUnitStop(stream->inputUnit) ); 
     1973          ERR_WRAP(AudioUnitReset(stream->inputUnit,kAudioUnitScope_Global,1)); 
     1974       } 
     1975       if( stream->outputUnit ) 
     1976       { 
     1977          ERR_WRAP(AudioOutputUnitStop(stream->outputUnit)); 
     1978          ERR_WRAP(AudioUnitReset(stream->outputUnit,kAudioUnitScope_Global,0)); 
     1979       } 
     1980    } 
     1981    if( stream->inputRingBuffer.buffer ) { 
     1982       RingBuffer_Flush( &stream->inputRingBuffer ); 
     1983       bzero( (void *)stream->inputRingBuffer.buffer, 
     1984              stream->inputRingBuffer.bufferSize ); 
     1985       /* advance the write point a little, so we are reading from the 
     1986          middle of the buffer. We'll need extra at the end because 
     1987          testing has shown that this helps. */ 
     1988       if( stream->outputUnit ) 
     1989          RingBuffer_AdvanceWriteIndex( &stream->inputRingBuffer, 
     1990                                    stream->inputRingBuffer.bufferSize 
     1991                                           / RING_BUFFER_ADVANCE_DENOMINATOR ); 
     1992    } 
     1993 
     1994    stream->xrunFlags = 0; 
     1995    stream->state = STOPPED; 
     1996 
     1997    paErr = resetBlioRingBuffers( &stream->blio ); 
     1998    if( paErr ) 
     1999       return paErr; 
     2000 
     2001/* 
     2002    //stream->isTimeSet = FALSE; 
     2003*/ 
     2004 
     2005    VDBUG( ( "Stream Stopped.\n" ) ); 
     2006    return paNoError; 
     2007#undef ERR_WRAP 
    7442008} 
    7452009 
    7462010static PaError AbortStream( PaStream *s ) 
    7472011{ 
    748     PaError err = paNoError; 
    749     PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    750      
    751     if (stream->inputDevice != kAudioDeviceUnknown) { 
    752         if (stream->outputDevice == kAudioDeviceUnknown || stream->outputDevice == stream->inputDevice) { 
    753             err = conv_err(AudioDeviceStop(stream->inputDevice, AudioIOProc)); 
    754         } 
    755         else { 
    756             err = conv_err(AudioDeviceStop(stream->inputDevice, AudioInputProc)); 
    757             err = conv_err(AudioDeviceStop(stream->outputDevice, AudioOutputProc)); 
    758         } 
    759     } 
    760     else { 
    761         err = conv_err(AudioDeviceStop(stream->outputDevice, AudioIOProc)); 
    762     } 
    763      
    764     stream->isActive = 0; 
    765     stream->isStopped = 1; 
    766     return err; 
    767 }     
    768  
    769 static PaError StopStream( PaStream *s ) 
    770 { 
    771     // TODO: this should be nicer than abort 
    772     return AbortStream(s); 
     2012    VVDBUG(("AbortStream()->StopStream()\n")); 
     2013    VDBUG( ( "Aborting stream.\n" ) ); 
     2014    /* We have nothing faster than StopStream. */ 
     2015    return StopStream(s); 
    7732016} 
     2017 
    7742018 
    7752019static PaError IsStreamStopped( PaStream *s ) 
    7762020{ 
    7772021    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    778      
    779     return stream->isStopped; 
     2022    VVDBUG(("IsStreamStopped()\n")); 
     2023 
     2024    return stream->state == STOPPED ? 1 : 0; 
    7802025} 
    7812026 
     
    7842029{ 
    7852030    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    786  
    787     return stream->isActive; 
    788 } 
    789  
    790  
    791 static PaTime GetStreamTime( PaStream *s ) 
    792 { 
    793     OSStatus err; 
    794     PaTime result; 
    795     PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    796  
    797     AudioTimeStamp *timeStamp = PaUtil_AllocateMemory(sizeof(AudioTimeStamp)); 
    798     if (stream->inputDevice != kAudioDeviceUnknown) { 
    799         err = AudioDeviceGetCurrentTime(stream->inputDevice, timeStamp); 
    800     } 
    801     else { 
    802         err = AudioDeviceGetCurrentTime(stream->outputDevice, timeStamp); 
    803     } 
    804      
    805     result = err ? 0 : timeStamp->mSampleTime; 
    806     PaUtil_FreeMemory(timeStamp); 
    807  
    808     return result; 
     2031    VVDBUG(("IsStreamActive()\n")); 
     2032    return ( stream->state == ACTIVE || stream->state == STOPPING ); 
    8092033} 
    8102034 
     
    8132037{ 
    8142038    PaMacCoreStream *stream = (PaMacCoreStream*)s; 
    815      
     2039    VVDBUG(("GetStreamCpuLoad()\n")); 
     2040 
    8162041    return PaUtil_GetCpuLoad( &stream->cpuLoadMeasurer ); 
    8172042} 
    818  
    819  
    820 // As separate stream interfaces are used for blocking and callback streams, the following functions can be guaranteed to only be called for blocking streams. 
    821  
    822 static PaError ReadStream( PaStream* s, 
    823                            void *buffer, 
    824                            unsigned long frames ) 
    825 { 
    826     return paInternalError; 
    827 } 
    828  
    829  
    830 static PaError WriteStream( PaStream* s, 
    831                             const void *buffer, 
    832                             unsigned long frames ) 
    833 { 
    834     return paInternalError; 
    835 } 
    836  
    837  
    838 static signed long GetStreamReadAvailable( PaStream* s ) 
    839 { 
    840     return paInternalError; 
    841 } 
    842  
    843  
    844 static signed long GetStreamWriteAvailable( PaStream* s ) 
    845 { 
    846     return paInternalError; 
    847 } 
    848  
    849 // HostAPI-specific initialization function 
    850 PaError PaMacCore_Initialize( PaUtilHostApiRepresentation **hostApi, PaHostApiIndex hostApiIndex ) 
    851 { 
    852     PaError result = paNoError; 
    853     PaMacCoreHostApiRepresentation *macCoreHostApi = (PaMacCoreHostApiRepresentation *)PaUtil_AllocateMemory( sizeof(PaMacCoreHostApiRepresentation) ); 
    854     if( !macCoreHostApi ) 
    855     { 
    856         result = paInsufficientMemory; 
    857         goto error; 
    858     } 
    859      
    860     macCoreHostApi->allocations = PaUtil_CreateAllocationGroup(); 
    861     if( !macCoreHostApi->allocations ) 
    862     { 
    863         result = paInsufficientMemory; 
    864         goto error; 
    865     } 
    866      
    867     *hostApi = &macCoreHostApi->inheritedHostApiRep; 
    868     (*hostApi)->info.structVersion = 1; 
    869     (*hostApi)->info.type = paCoreAudio; 
    870     (*hostApi)->info.name = "CoreAudio"; 
    871  
    872     result = InitializeDeviceInfos(macCoreHostApi, hostApiIndex); 
    873     if (result != paNoError) { 
    874         goto error; 
    875     } 
    876      
    877     // Set up the proper callbacks to this HostApi's functions 
    878     (*hostApi)->Terminate = Terminate; 
    879     (*hostApi)->OpenStream = OpenStream; 
    880     (*hostApi)->IsFormatSupported = IsFormatSupported; 
    881      
    882     PaUtil_InitializeStreamInterface( &macCoreHostApi->callbackStreamInterface, CloseStream, StartStream, 
    883                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive, 
    884                                       GetStreamTime, GetStreamCpuLoad, 
    885                                       PaUtil_DummyRead, PaUtil_DummyWrite, 
    886                                       PaUtil_DummyGetReadAvailable, PaUtil_DummyGetWriteAvailable ); 
    887      
    888     PaUtil_InitializeStreamInterface( &macCoreHostApi->blockingStreamInterface, CloseStream, StartStream, 
    889                                       StopStream, AbortStream, IsStreamStopped, IsStreamActive, 
    890                                       GetStreamTime, PaUtil_DummyGetCpuLoad, 
    891                                       ReadStream, WriteStream, GetStreamReadAvailable, GetStreamWriteAvailable ); 
    892      
    893     return result; 
    894      
    895 error: 
    896         if( macCoreHostApi ) { 
    897             CleanUp(macCoreHostApi); 
    898         } 
    899      
    900     return result; 
    901 } 
  • pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_mac_hostapis.c

    r340 r770  
    11/* 
    22 * $Id$ 
    3  * Portable Audio I/O Library Windows initialization table 
     3 * Portable Audio I/O Library Macintosh initialization table 
    44 * 
    55 * Based on the Open Source API proposed by Ross Bencina 
     
    1717 * included in all copies or substantial portions of the Software. 
    1818 * 
    19  * Any person wishing to distribute modifications to the Software is 
    20  * requested to send the modifications to the original developer so that 
    21  * they can be incorporated into the canonical version. 
    22  * 
    2319 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    2420 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     
    3026 */ 
    3127 
     28/* 
     29 * The text above constitutes the entire PortAudio license; however,  
     30 * the PortAudio community also makes the following non-binding requests: 
     31 * 
     32 * Any person wishing to distribute modifications to the Software is 
     33 * requested to send the modifications to the original developer so that 
     34 * they can be incorporated into the canonical version. It is also  
     35 * requested that these non-binding requests be included along with the  
     36 * license above. 
     37 */ 
     38 
    3239/** @file 
     40 @ingroup macosx_src 
    3341Mac OS host API initialization function table. 
    3442*/ 
  • pjproject/trunk/pjmedia/src/pjmedia/portaudio/ringbuffer.c

    r339 r770  
    55 * 
    66 * Author: Phil Burk, http://www.softsynth.com 
     7 * modified for SMP safety on Mac OS X by Bjorn Roche 
     8 * also, alowed for const where possible 
     9 * Note that this is safe only for a single-thread reader and a 
     10 * single-thread writer. 
    711 * 
    812 * This program uses the PortAudio Portable Audio Library. 
    9  * For more information see: http://www.audiomulch.com/portaudio/ 
     13 * For more information see: http://www.portaudio.com 
    1014 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk 
    1115 * 
     
    2125 * included in all copies or substantial portions of the Software. 
    2226 * 
    23  * Any person wishing to distribute modifications to the Software is 
    24  * requested to send the modifications to the original developer so that 
    25  * they can be incorporated into the canonical version. 
    26  * 
    2727 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    2828 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     
    3232 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    3333 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
    34  * 
    35  */ 
     34 */ 
     35 
     36/* 
     37 * The text above constitutes the entire PortAudio license; however,  
     38 * the PortAudio community also makes the following non-binding requests: 
     39 * 
     40 * Any person wishing to distribute modifications to the Software is 
     41 * requested to send the modifications to the original developer so that 
     42 * they can be incorporated into the canonical version. It is also  
     43 * requested that these non-binding requests be included along with the  
     44 * license above. 
     45 */ 
     46 
     47/** 
     48 @file 
     49 @ingroup hostapi_src 
     50*/ 
     51 
    3652#include <stdio.h> 
    3753#include <stdlib.h> 
     
    3955#include "ringbuffer.h" 
    4056#include <string.h> 
     57 
     58/* 
     59 * We can undefine this, to turn off memory barriers, but that 
     60 * is only useful if we know we don't need to be MP safe or 
     61 * we are interested in doing some kind of tests. 
     62 */ 
     63#define MPSAFE 
     64 
     65/**************** 
     66 * First, we'll define some memory barrier primitives based on the system. 
     67 * right now only OS X and FreeBSD are supported. In addition to providing 
     68 * memory barriers, these functions should ensure that data cached in registers 
     69 * is written out to cache where it can be snooped by other CPUs. (ie, the volatile 
     70 * keyword should not be required) 
     71 * 
     72 * the primitives that must be defined are: 
     73 * 
     74 * FullMemoryBarrier() 
     75 * ReadMemoryBarrier() 
     76 * WriteMemoryBarrier() 
     77 * 
     78 ****************/ 
     79 
     80#if 1 
     81#   define FullMemoryBarrier() 
     82#   define ReadMemoryBarrier() 
     83#   define WriteMemoryBarrier() 
     84#elif defined(__APPLE__) || defined(__FreeBSD__) 
     85#   include <libkern/OSAtomic.h> 
     86    /* Here are the memory barrier functions. Mac OS X and FreeBSD only provide 
     87       full memory barriers, so the three types of barriers are the same. 
     88       The asm volatile may be redundant with the memory barrier, but 
     89       until I have proof of that, I'm leaving it. */ 
     90#   define FullMemoryBarrier()  do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false) 
     91#   define ReadMemoryBarrier()  do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false) 
     92#   define WriteMemoryBarrier() do{ asm volatile("":::"memory"); OSMemoryBarrier(); }while(false) 
     93#else 
     94#   error Memory Barriers not defined on this system or system unknown 
     95#endif 
    4196 
    4297/*************************************************************************** 
     
    58113long RingBuffer_GetReadAvailable( RingBuffer *rbuf ) 
    59114{ 
     115#ifdef MPSAFE 
     116    ReadMemoryBarrier(); 
     117#endif 
    60118    return ( (rbuf->writeIndex - rbuf->readIndex) & rbuf->bigMask ); 
    61119} 
     
    64122long RingBuffer_GetWriteAvailable( RingBuffer *rbuf ) 
    65123{ 
     124    /* Since we are calling RingBuffer_GetReadAvailable, we don't need an aditional MB */ 
    66125    return ( rbuf->bufferSize - RingBuffer_GetReadAvailable(rbuf)); 
    67126} 
     
    113172long RingBuffer_AdvanceWriteIndex( RingBuffer *rbuf, long numBytes ) 
    114173{ 
     174#ifdef MPSAFE 
     175    /* we need to ensure that previous writes are seen before we update the write index */ 
     176    WriteMemoryBarrier(); 
    115177    return rbuf->writeIndex = (rbuf->writeIndex + numBytes) & rbuf->bigMask; 
     178#else 
     179    return rbuf->writeIndex = (rbuf->writeIndex + numBytes) & rbuf->bigMask; 
     180#endif 
    116181} 
    117182 
     
    153218long RingBuffer_AdvanceReadIndex( RingBuffer *rbuf, long numBytes ) 
    154219{ 
     220#ifdef MPSAFE 
     221    /* we need to ensure that previous writes are always seen before updating the index. */ 
     222    WriteMemoryBarrier(); 
    155223    return rbuf->readIndex = (rbuf->readIndex + numBytes) & rbuf->bigMask; 
     224#else 
     225    return rbuf->readIndex = (rbuf->readIndex + numBytes) & rbuf->bigMask; 
     226#endif 
    156227} 
    157228 
    158229/*************************************************************************** 
    159230** Return bytes written. */ 
    160 long RingBuffer_Write( RingBuffer *rbuf, void *data, long numBytes ) 
     231long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes ) 
    161232{ 
    162233    long size1, size2, numWritten; 
  • pjproject/trunk/pjmedia/src/pjmedia/portaudio/ringbuffer.h

    r339 r770  
    1212 * 
    1313 * Author: Phil Burk, http://www.softsynth.com 
     14 * modified for SMP safety on OS X by Bjorn Roche. 
     15 * also allowed for const where possible. 
     16 * Note that this is safe only for a single-thread reader 
     17 * and a single-thread writer. 
    1418 * 
    1519 * This program is distributed with the PortAudio Portable Audio Library. 
    16  * For more information see: http://www.audiomulch.com/portaudio/ 
     20 * For more information see: http://www.portaudio.com 
    1721 * Copyright (c) 1999-2000 Ross Bencina and Phil Burk 
    1822 * 
     
    2832 * included in all copies or substantial portions of the Software. 
    2933 * 
    30  * Any person wishing to distribute modifications to the Software is 
    31  * requested to send the modifications to the original developer so that 
    32  * they can be incorporated into the canonical version. 
    33  * 
    3434 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
    3535 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
     
    3939 * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
    4040 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
     41 */ 
     42 
     43/* 
     44 * The text above constitutes the entire PortAudio license; however,  
     45 * the PortAudio community also makes the following non-binding requests: 
    4146 * 
     47 * Any person wishing to distribute modifications to the Software is 
     48 * requested to send the modifications to the original developer so that 
     49 * they can be incorporated into the canonical version. It is also  
     50 * requested that these non-binding requests be included along with the  
     51 * license above. 
    4252 */ 
     53 
     54/** 
     55 @file 
     56 @ingroup hostapi_src 
     57*/ 
     58 
    4359#include <stdio.h> 
    4460#include <stdlib.h> 
     
    5470    long   bigMask;    /* Used for wrapping indices with extra bit to distinguish full/empty. */ 
    5571    long   smallMask;  /* Used for fitting indices to buffer. */ 
    56     char *buffer; 
     72    char * buffer; 
    5773} 
    5874RingBuffer; 
     
    7187long RingBuffer_GetReadAvailable( RingBuffer *rbuf ); 
    7288/* Return bytes written. */ 
    73 long RingBuffer_Write( RingBuffer *rbuf, void *data, long numBytes ); 
     89long RingBuffer_Write( RingBuffer *rbuf, const void *data, long numBytes ); 
    7490/* Return bytes read. */ 
    7591long RingBuffer_Read( RingBuffer *rbuf, void *data, long numBytes ); 
Note: See TracChangeset for help on using the changeset viewer.