[asterisk-commits] russell: branch russell/events r74071 - in /team/russell/events: ./ apps/ cha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Jul 9 10:18:17 CDT 2007


Author: russell
Date: Mon Jul  9 10:18:16 2007
New Revision: 74071

URL: http://svn.digium.com/view/asterisk?view=rev&rev=74071
Log:
Merged revisions 73964,73983,73994,74024-74025,74044,74046,74048 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

................
r73964 | file | 2007-07-08 21:29:00 -0500 (Sun, 08 Jul 2007) | 2 lines

Use linkedlist macros for parking.

................
r73983 | file | 2007-07-08 22:14:34 -0500 (Sun, 08 Jul 2007) | 10 lines

Merged revisions 73980 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73980 | file | 2007-07-09 00:13:19 -0300 (Mon, 09 Jul 2007) | 2 lines

Give Agent channel names priority when doing CDR merging. (issue #10011 reported by krtorio)

........

................
r73994 | tilghman | 2007-07-08 23:09:16 -0500 (Sun, 08 Jul 2007) | 10 lines

Merged revisions 73985 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r73985 | tilghman | 2007-07-08 23:03:20 -0500 (Sun, 08 Jul 2007) | 2 lines

Doxygen formatting fixes; fixes errors while 'make progdocs'.  (Closes issue #10104)

........

................
r74024 | oej | 2007-07-09 03:27:37 -0500 (Mon, 09 Jul 2007) | 7 lines

Implementation of a feature that will disable "missed calls" counters on SIP phones.
If the call is answered by another phone, other phones won't display the call as "missed".
You can also add an option to the dial command so that you can have a "followme"
scenario and not count the calls as "missed" when you cancel the call.

Thanks to Ramon and Frank for feedback on this feature.

................
r74025 | oej | 2007-07-09 03:30:04 -0500 (Mon, 09 Jul 2007) | 2 lines

Update with new features

................
r74044 | file | 2007-07-09 09:38:19 -0500 (Mon, 09 Jul 2007) | 10 lines

Merged revisions 74043 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74043 | file | 2007-07-09 11:34:33 -0300 (Mon, 09 Jul 2007) | 2 lines

Use AC_CHECK_HEADER to check for ptlib/openh323 to allow for cross compiling. (issue #9675 reported by zandbelt)

........

................
r74046 | file | 2007-07-09 09:50:04 -0500 (Mon, 09 Jul 2007) | 10 lines

Merged revisions 74045 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74045 | file | 2007-07-09 11:49:05 -0300 (Mon, 09 Jul 2007) | 2 lines

Few minor thread synchronization tweaks. (issue #10124 reported by gzero)

........

................
r74048 | mmichelson | 2007-07-09 09:58:42 -0500 (Mon, 09 Jul 2007) | 12 lines

Merged revisions 74047 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r74047 | mmichelson | 2007-07-09 09:57:41 -0500 (Mon, 09 Jul 2007) | 4 lines

Fixed a logic error in leave_voicemail. Pass the mailbox instead of the context to inbox_count when the context is "default."
(closes issue #10135, reported by yannj, repaired by me)


........

................

Modified:
    team/russell/events/   (props changed)
    team/russell/events/CHANGES
    team/russell/events/acinclude.m4
    team/russell/events/apps/app_dial.c
    team/russell/events/apps/app_voicemail.c
    team/russell/events/channels/chan_local.c
    team/russell/events/channels/chan_sip.c
    team/russell/events/channels/chan_skinny.c
    team/russell/events/configure
    team/russell/events/funcs/func_devstate.c
    team/russell/events/include/asterisk/app.h
    team/russell/events/include/asterisk/channel.h
    team/russell/events/main/ast_expr2f.c
    team/russell/events/main/cdr.c
    team/russell/events/pbx/pbx_dundi.c
    team/russell/events/res/res_features.c

Propchange: team/russell/events/
------------------------------------------------------------------------------
    automerge = *

Propchange: team/russell/events/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/russell/events/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Mon Jul  9 10:18:16 2007
@@ -1,1 +1,1 @@
-/trunk:1-73961
+/trunk:1-74069

Modified: team/russell/events/CHANGES
URL: http://svn.digium.com/view/asterisk/team/russell/events/CHANGES?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/CHANGES (original)
+++ team/russell/events/CHANGES Mon Jul  9 10:18:16 2007
@@ -31,6 +31,8 @@
      fetch string representation of calling number presentation indicator
      and numeric representation of type of calling number value.
   * MailboxExists converted to dialplan function
+  * A new option to Dial() for telling IP phones not to count the call
+    as "missed" when dial times out and cancels.
 
 CLI Changes
 -----------
@@ -62,6 +64,8 @@
      for more information.
   * Added rtpdest option to CHANNEL() dialplan function.
   * Added SIPREFERRINGCONTEXT and SIPREFERREDBYHDR variables which are set when a transfer takes place.
+  * SIP now adds a header to the CANCEL if the call was answered by another phone
+    in the same dial command, or if the new c option in dial() is used.
 
 IAX2 changes
 ------------

Modified: team/russell/events/acinclude.m4
URL: http://svn.digium.com/view/asterisk/team/russell/events/acinclude.m4?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/acinclude.m4 (original)
+++ team/russell/events/acinclude.m4 Mon Jul  9 10:18:16 2007
@@ -179,21 +179,22 @@
 [AST_CHECK_PWLIB], [
 PWLIB_INCDIR=
 PWLIB_LIBDIR=
+AC_LANG_PUSH([C++])
 if test "${PWLIBDIR:-unset}" != "unset" ; then
-  AC_CHECK_FILE(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
+  AC_CHECK_HEADER(${PWLIBDIR}/version.h, HAS_PWLIB=1, )
 fi
 if test "${HAS_PWLIB:-unset}" = "unset" ; then
   if test "${OPENH323DIR:-unset}" != "unset"; then
-    AC_CHECK_FILE(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
+    AC_CHECK_HEADER(${OPENH323DIR}/../pwlib/version.h, HAS_PWLIB=1, )
   fi
   if test "${HAS_PWLIB:-unset}" != "unset" ; then
     PWLIBDIR="${OPENH323DIR}/../pwlib"
   else
-    AC_CHECK_FILE(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
+    AC_CHECK_HEADER(${HOME}/pwlib/include/ptlib.h, HAS_PWLIB=1, )
     if test "${HAS_PWLIB:-unset}" != "unset" ; then
       PWLIBDIR="${HOME}/pwlib"
     else
-      AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
+      AC_CHECK_HEADER(/usr/local/include/ptlib.h, HAS_PWLIB=1, )
       if test "${HAS_PWLIB:-unset}" != "unset" ; then
         AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
         if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
@@ -211,7 +212,7 @@
         PWLIB_LIB=`${PTLIB_CONFIG} --ldflags --libs`
         PWLIB_LIB="-L${PWLIB_LIBDIR} `echo ${PWLIB_LIB}`"
       else
-        AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PWLIB=1, )
+        AC_CHECK_HEADER(/usr/include/ptlib.h, HAS_PWLIB=1, )
         if test "${HAS_PWLIB:-unset}" != "unset" ; then
           AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make)
           PWLIB_INCDIR="/usr/include"
@@ -276,6 +277,7 @@
   AC_SUBST([PWLIB_INCDIR])
   AC_SUBST([PWLIB_LIBDIR])
 fi
+  AC_LANG_POP([C++])
 ])
 
 
@@ -370,20 +372,21 @@
 [AST_CHECK_OPENH323], [
 OPENH323_INCDIR=
 OPENH323_LIBDIR=
+AC_LANG_PUSH([C++])
 if test "${OPENH323DIR:-unset}" != "unset" ; then
-  AC_CHECK_FILE(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
+  AC_CHECK_HEADER(${OPENH323DIR}/version.h, HAS_OPENH323=1, )
 fi
 if test "${HAS_OPENH323:-unset}" = "unset" ; then
-  AC_CHECK_FILE(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
+  AC_CHECK_HEADER(${PWLIBDIR}/../openh323/version.h, OPENH323DIR="${PWLIBDIR}/../openh323"; HAS_OPENH323=1, )
   if test "${HAS_OPENH323:-unset}" != "unset" ; then
     OPENH323DIR="${PWLIBDIR}/../openh323"
-    AC_CHECK_FILE(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
+    AC_CHECK_HEADER(${OPENH323DIR}/include/h323.h, , OPENH323_INCDIR="${PWLIB_INCDIR}/openh323"; OPENH323_LIBDIR="${PWLIB_LIBDIR}")
   else
-    AC_CHECK_FILE(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
+    AC_CHECK_HEADER(${HOME}/openh323/include/h323.h, HAS_OPENH323=1, )
     if test "${HAS_OPENH323:-unset}" != "unset" ; then
       OPENH323DIR="${HOME}/openh323"
     else
-      AC_CHECK_FILE(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
+      AC_CHECK_HEADER(/usr/local/include/openh323/h323.h, HAS_OPENH323=1, )
       if test "${HAS_OPENH323:-unset}" != "unset" ; then
         OPENH323DIR="/usr/local/share/openh323"
         OPENH323_INCDIR="/usr/local/include/openh323"
@@ -393,7 +396,7 @@
           OPENH323_LIBDIR="/usr/local/lib"
         fi
       else
-        AC_CHECK_FILE(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
+        AC_CHECK_HEADER(/usr/include/openh323/h323.h, HAS_OPENH323=1, )
         if test "${HAS_OPENH323:-unset}" != "unset" ; then
           OPENH323DIR="/usr/share/openh323"
           OPENH323_INCDIR="/usr/include/openh323"
@@ -424,6 +427,7 @@
   AC_SUBST([OPENH323_INCDIR])
   AC_SUBST([OPENH323_LIBDIR])
 fi
+  AC_LANG_POP([C++])
 ])
 
 

Modified: team/russell/events/apps/app_dial.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/apps/app_dial.c?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/apps/app_dial.c (original)
+++ team/russell/events/apps/app_dial.c Mon Jul  9 10:18:16 2007
@@ -99,6 +99,8 @@
 "  Options:\n"
 "    A(x) - Play an announcement to the called party, using 'x' as the file.\n"
 "    C    - Reset the CDR for this call.\n"
+"    c    - If DIAL cancels this call, always set the flag to tell the channel\n"
+"           driver that the call is answered elsewhere.\n"
 "    d    - Allow the calling user to dial a 1 digit extension while waiting for\n"
 "           a call to be answered. Exit to that extension if it exists in the\n"
 "           current context, or the context defined in the EXITCONTEXT variable,\n"
@@ -253,6 +255,7 @@
 	OPT_CALLER_PARK =	(1 << 26),
 	OPT_IGNORE_FORWARDING = (1 << 27),
 	OPT_CALLEE_GOSUB =	(1 << 28),
+	OPT_CANCEL_ELSEWHERE =  (1 << 29),
 };
 
 #define DIAL_STILLGOING			(1 << 30)
@@ -276,6 +279,7 @@
 AST_APP_OPTIONS(dial_exec_options, {
 	AST_APP_OPTION_ARG('A', OPT_ANNOUNCE, OPT_ARG_ANNOUNCE),
 	AST_APP_OPTION('C', OPT_RESETCDR),
+	AST_APP_OPTION('c', OPT_CANCEL_ELSEWHERE),
 	AST_APP_OPTION('d', OPT_DTMF_EXIT),
 	AST_APP_OPTION_ARG('D', OPT_SENDDTMF, OPT_ARG_SENDDTMF),
 	AST_APP_OPTION('f', OPT_FORCECLID),
@@ -315,14 +319,17 @@
 };
 
 
-static void hanguptree(struct chanlist *outgoing, struct ast_channel *exception)
+static void hanguptree(struct chanlist *outgoing, struct ast_channel *exception, int answered_elsewhere)
 {
 	/* Hang up a tree of stuff */
 	struct chanlist *oo;
 	while (outgoing) {
 		/* Hangup any existing lines we have open */
-		if (outgoing->chan && (outgoing->chan != exception))
+		if (outgoing->chan && (outgoing->chan != exception)) {
+			if (answered_elsewhere)
+				ast_set_flag(outgoing->chan, AST_FLAG_ANSWERED_ELSEWHERE);
 			ast_hangup(outgoing->chan);
+		}
 		oo = outgoing;
 		outgoing=outgoing->next;
 		ast_free(oo);
@@ -1314,6 +1321,7 @@
 			goto out;
 		if (opts.flags) {
 			ast_copy_flags(tmp, &opts,
+				       OPT_CANCEL_ELSEWHERE |
 				       OPT_CALLEE_TRANSFER | OPT_CALLER_TRANSFER |
 				       OPT_CALLEE_HANGUP | OPT_CALLER_HANGUP |
 				       OPT_CALLEE_MONITOR | OPT_CALLER_MONITOR |
@@ -1513,7 +1521,7 @@
 		/* Ah ha!  Someone answered within the desired timeframe.  Of course after this
 		   we will always return with -1 so that it is hung up properly after the 
 		   conversation.  */
-		hanguptree(outgoing, peer);
+		hanguptree(outgoing, peer, 1);
 		outgoing = NULL;
 		/* If appropriate, log that we have a destination channel */
 		if (chan->cdr)
@@ -1562,7 +1570,7 @@
 			ast_parseable_goto(peer, opt_args[OPT_ARG_GOTO]);
 			peer->priority++;
 			ast_pbx_start(peer);
-			hanguptree(outgoing, NULL);
+			hanguptree(outgoing, NULL, ast_test_flag(&opts, OPT_CANCEL_ELSEWHERE ? 1 : 0));
 			if (continue_exec)
 				*continue_exec = 1;
 			res = 0;
@@ -1800,7 +1808,7 @@
 		ast_indicate(chan, -1);
 	}
 	ast_channel_early_bridge(chan, NULL);
-	hanguptree(outgoing, NULL);
+	hanguptree(outgoing, NULL, 0);	/* In this case, there's no answer anywhere */
 	pbx_builtin_setvar_helper(chan, "DIALSTATUS", pa.status);
 	senddialendevent(chan, pa.status);
 	ast_debug(1, "Exiting with DIALSTATUS=%s.\n", pa.status);

Modified: team/russell/events/apps/app_voicemail.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/apps/app_voicemail.c?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/apps/app_voicemail.c (original)
+++ team/russell/events/apps/app_voicemail.c Mon Jul  9 10:18:16 2007
@@ -35,7 +35,7 @@
  *
  *
  *
- * \note  This file is now almost impossible to work with, due to all #ifdefs.
+ * \note  This file is now almost impossible to work with, due to all \#ifdefs.
  *        Feels like the database code before realtime. Someone - please come up
  *        with a plan to clean this up.
  */
@@ -3054,7 +3054,7 @@
 	if (strcmp(vmu->context, "default"))
 		snprintf(ext_context, sizeof(ext_context), "%s@%s", ext, vmu->context);
 	else
-		ast_copy_string(ext_context, vmu->context, sizeof(ext_context));
+		ast_copy_string(ext_context, vmu->mailbox, sizeof(ext_context));
 	if (ast_test_flag(options, OPT_BUSY_GREETING)) {
 		snprintf(prefile, sizeof(prefile), "%s%s/%s/busy", VM_SPOOL_DIR, vmu->context, ext);
 	} else if (ast_test_flag(options, OPT_UNAVAIL_GREETING)) {

Modified: team/russell/events/channels/chan_local.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/channels/chan_local.c?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/channels/chan_local.c (original)
+++ team/russell/events/channels/chan_local.c Mon Jul  9 10:18:16 2007
@@ -495,6 +495,8 @@
 		return -1;
 
 	ast_mutex_lock(&p->lock);
+	if (p->chan && ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) 
+		ast_set_flag(p->chan, AST_FLAG_ANSWERED_ELSEWHERE);
 	isoutbound = IS_OUTBOUND(ast, p);
 	if (isoutbound) {
 		const char *status = pbx_builtin_getvar_helper(p->chan, "DIALSTATUS");

Modified: team/russell/events/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/channels/chan_sip.c?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/channels/chan_sip.c (original)
+++ team/russell/events/channels/chan_sip.c Mon Jul  9 10:18:16 2007
@@ -752,7 +752,7 @@
 #define SIP_REALTIME		(1 << 11)	/*!< P: Flag for realtime users */
 #define SIP_USECLIENTCODE	(1 << 12)	/*!< DP: Trust X-ClientCode info message */
 #define SIP_OUTGOING		(1 << 13)	/*!< D: Direction of the last transaction in this dialog */
-#define SIP_FREE_BIT		(1 << 14)	/*!< ---- */
+#define SIP_DIALOG_ANSWEREDELSEWHERE	(1 << 14)	/*!< D: This call is cancelled due to answer on another channel */
 #define SIP_DEFER_BYE_ON_TRANSFER	(1 << 15)	/*!< D: Do not hangup at first ast_hangup */
 #define SIP_DTMF		(3 << 16)	/*!< DP: DTMF Support: four settings, uses two bits */
 #define SIP_DTMF_RFC2833	(0 << 16)	/*!< DP: DTMF Support: RTP DTMF - "rfc2833" */
@@ -1244,7 +1244,7 @@
 /*! \brief A per-thread temporary pvt structure */
 AST_THREADSTORAGE_CUSTOM(ts_temp_pvt, temp_pvt_init, temp_pvt_cleanup);
 
-/*! \breif Authentication list for realm authentication 
+/*! \brief Authentication list for realm authentication 
  * \todo Move the sip_auth list to AST_LIST */
 static struct sip_auth *authl = NULL;
 
@@ -3673,6 +3673,12 @@
 	if (!p) {
 		ast_debug(1, "Asked to hangup channel that was not connected\n");
 		return 0;
+	}
+	if (ast_test_flag(ast, AST_FLAG_ANSWERED_ELSEWHERE)) {
+		if (option_debug)
+			ast_log(LOG_DEBUG, "This call was answered elsewhere");
+		append_history(p, "Cancel", "Call answered elsewhere");
+		ast_set_flag(&p->flags[0], SIP_DIALOG_ANSWEREDELSEWHERE);
 	}
 
 	if (ast_test_flag(&p->flags[0], SIP_DEFER_BYE_ON_TRANSFER)) {
@@ -8140,6 +8146,9 @@
 		p->invitestate = INV_CONFIRMED;
 
 	reqprep(&resp, p, sipmethod, seqno, newbranch);
+	if (sipmethod == SIP_CANCEL && ast_test_flag(&p->flags[0], SIP_DIALOG_ANSWEREDELSEWHERE)) 
+		add_header(&resp, "Reason:", "SIP;cause=200;text=\"Call completed elsewhere\"");
+
 	add_header_contentLength(&resp, 0);
 	return send_request(p, &resp, reliable, seqno ? seqno : p->ocseq);
 }

Modified: team/russell/events/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/russell/events/channels/chan_skinny.c?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/channels/chan_skinny.c (original)
+++ team/russell/events/channels/chan_skinny.c Mon Jul  9 10:18:16 2007
@@ -5125,7 +5125,7 @@
 	delete_devices();
 
 	ast_mutex_lock(&monlock);
-	if (monitor_thread && (monitor_thread != AST_PTHREADT_STOP)) {
+	if ((monitor_thread != AST_PTHREADT_NULL) && (monitor_thread != AST_PTHREADT_STOP)) {
 		pthread_cancel(monitor_thread);
 		pthread_kill(monitor_thread, SIGURG);
 		pthread_join(monitor_thread, NULL);

Modified: team/russell/events/configure
URL: http://svn.digium.com/view/asterisk/team/russell/events/configure?view=diff&rev=74071&r1=74070&r2=74071
==============================================================================
--- team/russell/events/configure (original)
+++ team/russell/events/configure Mon Jul  9 10:18:16 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 73821 .
+# From configure.ac Revision: 73911 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -29719,108 +29719,554 @@
 		PWLIBDIR="${PWLIB_DIR}"
 	fi
 
+
 PWLIB_INCDIR=
 PWLIB_LIBDIR=
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
 if test "${PWLIBDIR:-unset}" != "unset" ; then
-  as_ac_File=`echo "ac_cv_file_${PWLIBDIR}/version.h" | $as_tr_sh`
+  as_ac_Header=`echo "ac_cv_header_${PWLIBDIR}/version.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for ${PWLIBDIR}/version.h" >&5
+echo $ECHO_N "checking for ${PWLIBDIR}/version.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking ${PWLIBDIR}/version.h usability" >&5
+echo $ECHO_N "checking ${PWLIBDIR}/version.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <${PWLIBDIR}/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking ${PWLIBDIR}/version.h presence" >&5
+echo $ECHO_N "checking ${PWLIBDIR}/version.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <${PWLIBDIR}/version.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${PWLIBDIR}/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${PWLIBDIR}/version.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
 { echo "$as_me:$LINENO: checking for ${PWLIBDIR}/version.h" >&5
 echo $ECHO_N "checking for ${PWLIBDIR}/version.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "${PWLIBDIR}/version.h"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   HAS_PWLIB=1
 fi
+
 
 fi
 if test "${HAS_PWLIB:-unset}" = "unset" ; then
   if test "${OPENH323DIR:-unset}" != "unset"; then
-    as_ac_File=`echo "ac_cv_file_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
+    as_ac_Header=`echo "ac_cv_header_${OPENH323DIR}/../pwlib/version.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for ${OPENH323DIR}/../pwlib/version.h" >&5
+echo $ECHO_N "checking for ${OPENH323DIR}/../pwlib/version.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking ${OPENH323DIR}/../pwlib/version.h usability" >&5
+echo $ECHO_N "checking ${OPENH323DIR}/../pwlib/version.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <${OPENH323DIR}/../pwlib/version.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking ${OPENH323DIR}/../pwlib/version.h presence" >&5
+echo $ECHO_N "checking ${OPENH323DIR}/../pwlib/version.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <${OPENH323DIR}/../pwlib/version.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${OPENH323DIR}/../pwlib/version.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${OPENH323DIR}/../pwlib/version.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
 { echo "$as_me:$LINENO: checking for ${OPENH323DIR}/../pwlib/version.h" >&5
 echo $ECHO_N "checking for ${OPENH323DIR}/../pwlib/version.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "${OPENH323DIR}/../pwlib/version.h"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   HAS_PWLIB=1
 fi
+
 
   fi
   if test "${HAS_PWLIB:-unset}" != "unset" ; then
     PWLIBDIR="${OPENH323DIR}/../pwlib"
   else
-    as_ac_File=`echo "ac_cv_file_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
+    as_ac_Header=`echo "ac_cv_header_${HOME}/pwlib/include/ptlib.h" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  { echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5
+echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking ${HOME}/pwlib/include/ptlib.h usability" >&5
+echo $ECHO_N "checking ${HOME}/pwlib/include/ptlib.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <${HOME}/pwlib/include/ptlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking ${HOME}/pwlib/include/ptlib.h presence" >&5
+echo $ECHO_N "checking ${HOME}/pwlib/include/ptlib.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <${HOME}/pwlib/include/ptlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } >/dev/null && {
+	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       }; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: ${HOME}/pwlib/include/ptlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: ${HOME}/pwlib/include/ptlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
 { echo "$as_me:$LINENO: checking for ${HOME}/pwlib/include/ptlib.h" >&5
 echo $ECHO_N "checking for ${HOME}/pwlib/include/ptlib.h... $ECHO_C" >&6; }
-if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "${HOME}/pwlib/include/ptlib.h"; then
-  eval "$as_ac_File=yes"
-else
-  eval "$as_ac_File=no"
-fi
-fi
-ac_res=`eval echo '${'$as_ac_File'}'`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval echo '${'$as_ac_Header'}'`
 	       { echo "$as_me:$LINENO: result: $ac_res" >&5
 echo "${ECHO_T}$ac_res" >&6; }
-if test `eval echo '${'$as_ac_File'}'` = yes; then
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
   HAS_PWLIB=1
 fi
+
 
     if test "${HAS_PWLIB:-unset}" != "unset" ; then
       PWLIBDIR="${HOME}/pwlib"
     else
-      { echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5
+      if test "${ac_cv_header__usr_local_include_ptlib_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for /usr/local/include/ptlib.h" >&5
 echo $ECHO_N "checking for /usr/local/include/ptlib.h... $ECHO_C" >&6; }
-if test "${ac_cv_file__usr_local_include_ptlib_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  test "$cross_compiling" = yes &&
-  { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5
-echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
-   { (exit 1); exit 1; }; }
-if test -r "/usr/local/include/ptlib.h"; then
-  ac_cv_file__usr_local_include_ptlib_h=yes
-else
-  ac_cv_file__usr_local_include_ptlib_h=no
-fi
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_file__usr_local_include_ptlib_h" >&5
-echo "${ECHO_T}$ac_cv_file__usr_local_include_ptlib_h" >&6; }
-if test $ac_cv_file__usr_local_include_ptlib_h = yes; then
+if test "${ac_cv_header__usr_local_include_ptlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header__usr_local_include_ptlib_h" >&5
+echo "${ECHO_T}$ac_cv_header__usr_local_include_ptlib_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking /usr/local/include/ptlib.h usability" >&5
+echo $ECHO_N "checking /usr/local/include/ptlib.h usability... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include </usr/local/include/ptlib.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_compile") 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ echo "$as_me:$LINENO: checking /usr/local/include/ptlib.h presence" >&5
+echo $ECHO_N "checking /usr/local/include/ptlib.h presence... $ECHO_C" >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */

[... 1888 lines stripped ...]



More information about the asterisk-commits mailing list