package libopenh323-1.18.0
tag 424049 + patch
package libpt-1.10.0
tag 424050 + patch
thanks control

[3rd mail against the same package with patches attached in a row!]

As I stated before, the major blocker in removing the conflicts between different versions of libpt/libopenh323 is the /usr/lib/pwlib/ (and its respective /usr/lib/debug one) directory, which is present in both libraries and is common between different versions.

Attached you will find two patches -one for each library- in which I attempt to resolve this by placing the pwlib plugins and H.323 codecs in

 /usr/lib/pwlib/${PWLIB_VERSION}/foo/bar
(e.g. /usr/lib/pwlib/1.10.2/codecs/audio)
instead of
 /usr/lib/pwlib/foo/bar

This is a bit suboptimal, because we can have the same SONAME but a different minor or build version which will result in tightened dependencies for no reason. This is not however such a big deal and it's certainly better than the current situation.

As always, I'm including patches for "configure" along with configure.ac to avoid an unnecessary build-dependency on autoconf.

Please not that the patches are only build-tested for the moment. Feedback is welcome! Also please not that the patches do not include the removal of Conflicts/Replaces from debian/control, this has to be done by the maintainer(s).

Please apply. Having multiple versions of the same library installed and happily coexist is standard procedure in Debian and for a good reason.

Best regards,
Faidon

P.S. On a side note, the whole mess with LIBH323COMPAT/LIBPTCOMPAT{1,2,3} should really be resolved. Libraries have SONAMEs that indicate their ABI, that's all that matters. We shouldn't care about the "build number" or the minor revision that didn't break the ABI and we certainly shouldn't create useless symlinks. Look e.g. at libpcap0.8, which has a 0.8 soname but its version is 0.9.5 -- there was a discussion on debian-devel some time ago about this.

diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-alsa.dirs 
pwlib-1.10.2/debian/libpt-plugins-alsa.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-alsa.dirs    2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-alsa.dirs 1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/sound/
diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-avc.dirs 
pwlib-1.10.2/debian/libpt-plugins-avc.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-avc.dirs     2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-avc.dirs  1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/videoinput/
diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-dc.dirs 
pwlib-1.10.2/debian/libpt-plugins-dc.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-dc.dirs      2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-dc.dirs   1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/videoinput/
diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-oss.dirs 
pwlib-1.10.2/debian/libpt-plugins-oss.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-oss.dirs     2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-oss.dirs  1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/sound/
diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-v4l2.dirs 
pwlib-1.10.2/debian/libpt-plugins-v4l2.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-v4l2.dirs    2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-v4l2.dirs 1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/videoinput/
diff -Nur pwlib-1.10.2.orig/debian/libpt-plugins-v4l.dirs 
pwlib-1.10.2/debian/libpt-plugins-v4l.dirs
--- pwlib-1.10.2.orig/debian/libpt-plugins-v4l.dirs     2007-05-15 
17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/libpt-plugins-v4l.dirs  1970-01-01 02:00:00.000000000 
+0200
@@ -1 +0,0 @@
-usr/lib/pwlib/device/videoinput/
diff -Nur pwlib-1.10.2.orig/debian/rules pwlib-1.10.2/debian/rules
--- pwlib-1.10.2.orig/debian/rules      2007-05-15 17:46:23.000000000 +0300
+++ pwlib-1.10.2/debian/rules   2007-05-30 06:49:35.000000000 +0300
@@ -188,28 +188,34 @@
 
 # plugins
        #libpt-plugins-v4l
+       mkdir -p 
debian/libpt-plugins-v4l/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
        cp plugins/pwlib/device/videoinput/v4l_pwplugin.so \
-               debian/libpt-plugins-v4l/usr/lib/pwlib/device/videoinput/
+               
debian/libpt-plugins-v4l/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
                
        #libpt-plugins-v4l2
+       mkdir -p 
debian/libpt-plugins-v4l2/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
        cp plugins/pwlib/device/videoinput/v4l2_pwplugin.so \
-               debian/libpt-plugins-v4l2/usr/lib/pwlib/device/videoinput/
+               
debian/libpt-plugins-v4l2/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
 
        #libpt-plugins-avc
+       mkdir -p 
debian/libpt-plugins-avc/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
        cp plugins/pwlib/device/videoinput/avc_pwplugin.so \
-               debian/libpt-plugins-avc/usr/lib/pwlib/device/videoinput/
+               
debian/libpt-plugins-avc/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
 
        #libpt-plugins-dc
+       mkdir -p 
debian/libpt-plugins-dc/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
        cp plugins/pwlib/device/videoinput/dc_pwplugin.so \
-               debian/libpt-plugins-dc/usr/lib/pwlib/device/videoinput/
+               
debian/libpt-plugins-dc/usr/lib/pwlib/$(SHLIBSVER)/device/videoinput/
 
        #libpt-plugins-oss
+       mkdir -p 
debian/libpt-plugins-oss/usr/lib/pwlib/$(SHLIBSVER)/device/sound/
        cp plugins/pwlib/device/sound/oss_pwplugin.so \
-               debian/libpt-plugins-oss/usr/lib/pwlib/device/sound/
+               
debian/libpt-plugins-oss/usr/lib/pwlib/$(SHLIBSVER)/device/sound/
 
        #libpt-plugins-alsa
+       mkdir -p 
debian/libpt-plugins-alsa/usr/lib/pwlib/$(SHLIBSVER)/device/sound/
        cp plugins/pwlib/device/sound/alsa_pwplugin.so \
-               debian/libpt-plugins-alsa/usr/lib/pwlib/device/sound/
+               
debian/libpt-plugins-alsa/usr/lib/pwlib/$(SHLIBSVER)/device/sound/
 
        cp debian/libpt.docs debian/$(PACKAGE).docs
 
--- pwlib-1.10.2.orig/configure.ac      2006-02-22 13:53:28.000000000 +0200
+++ pwlib-1.10.2/configure.ac   2007-05-30 07:33:37.000000000 +0300
@@ -847,9 +847,9 @@
 AC_SUBST(HAS_PLUGINS)
 
 if test "x$LIB64" != "x" ; then
-  AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], ["${INSTALLPREFIX}/lib64/pwlib"], 
[Default plugin directory])
+  AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], 
["${INSTALLPREFIX}/lib64/pwlib/${PWLIB_VERSION}"], [Default plugin directory])
 else
-  AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], ["${INSTALLPREFIX}/lib/pwlib"], 
[Default plugin directory])
+  AC_DEFINE_UNQUOTED([P_DEFAULT_PLUGIN_DIR], 
["${INSTALLPREFIX}/lib/pwlib/${PWLIB_VERSION}"], [Default plugin directory])
 fi
 
 dnl ########################################################################
--- pwlib-1.10.2.orig/configure 2006-02-22 13:53:28.000000000 +0200
+++ pwlib-1.10.2/configure      2007-05-30 07:31:16.000000000 +0300
@@ -5498,13 +5498,13 @@
 if test "x$LIB64" != "x" ; then
 
 cat >>confdefs.h <<_ACEOF
-#define P_DEFAULT_PLUGIN_DIR "${INSTALLPREFIX}/lib64/pwlib"
+#define P_DEFAULT_PLUGIN_DIR "${INSTALLPREFIX}/lib64/pwlib/${PWLIB_VERSION}"
 _ACEOF
 
 else
 
 cat >>confdefs.h <<_ACEOF
-#define P_DEFAULT_PLUGIN_DIR "${INSTALLPREFIX}/lib/pwlib"
+#define P_DEFAULT_PLUGIN_DIR "${INSTALLPREFIX}/lib/pwlib/${PWLIB_VERSION}"
 _ACEOF
 
 fi
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/G726/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/G726/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/G726/Makefile.in    2004-08-22 
07:20:17.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/audio/G726/Makefile.in 2007-05-30 
08:51:38.000000000 +0300
@@ -37,6 +37,7 @@
 exec_prefix = ${PREFIX}
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -74,11 +75,11 @@
        $(CC) $(LDSO)$(SONAME) -o $@ $^ $(EXTRALIBS)
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN)
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/GSM0610/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/GSM0610/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/GSM0610/Makefile.in 2006-02-20 
10:55:03.000000000 +0200
+++ openh323-1.18.0.dfsg/plugins/audio/GSM0610/Makefile.in      2007-05-30 
08:56:57.000000000 +0300
@@ -65,6 +65,7 @@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -140,11 +141,11 @@
 endif
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN)
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/gsm-amr/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/gsm-amr/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/gsm-amr/Makefile.in 2005-06-07 
06:22:23.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/audio/gsm-amr/Makefile.in      2007-05-30 
08:57:04.000000000 +0300
@@ -9,6 +9,7 @@
 exec_prefix = ${PREFIX}
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -49,11 +50,11 @@
        $(CC) $(LDSO)$(SONAME) -o $@ $^
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 else
 install:
 uninstall:
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/IMA_ADPCM/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/IMA_ADPCM/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/IMA_ADPCM/Makefile.in       
2004-08-22 07:20:19.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/audio/IMA_ADPCM/Makefile.in    2007-05-30 
08:57:14.000000000 +0300
@@ -37,6 +37,7 @@
 exec_prefix = ${PREFIX}
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -67,11 +68,11 @@
        $(CC) $(LDSO)$(SONAME) -o $@ $^ $(EXTRALIBS)
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN)
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/LPC_10/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/LPC_10/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/LPC_10/Makefile.in  2004-08-22 
07:20:19.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/audio/LPC_10/Makefile.in       2007-05-30 
08:57:23.000000000 +0300
@@ -36,6 +36,7 @@
 [EMAIL PROTECTED]@
 exec_prefix = ${PREFIX}
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -103,11 +104,11 @@
        $(CC) $(LDSO)$(SONAME) -o $@ $^ $(EXTRALIBS)
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN)
diff -Nur openh323-1.18.0.dfsg.orig/plugins/audio/Speex/Makefile.in 
openh323-1.18.0.dfsg/plugins/audio/Speex/Makefile.in
--- openh323-1.18.0.dfsg.orig/plugins/audio/Speex/Makefile.in   2004-09-09 
03:25:34.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/audio/Speex/Makefile.in        2007-05-30 
08:57:31.000000000 +0300
@@ -55,6 +55,7 @@
 exec_prefix = ${PREFIX}
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
[EMAIL PROTECTED]@
 
 [EMAIL PROTECTED]@
 [EMAIL PROTECTED]@
@@ -104,11 +105,11 @@
        $(CC) $(LDSO)$(SONAME) -o $@ $^ $(EXTRALIBS)
 
 install:
-       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
-       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/
+       mkdir -p $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
+       cp $(PLUGIN) $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/
 
 uninstall:
-       rm -f $(DESTDIR)$(LIBDIR)/pwlib/codecs/audio/$(PLUGIN)
+       rm -f $(DESTDIR)$(LIBDIR)/pwlib/$(PWLIB_VERSION)/codecs/audio/$(PLUGIN)
 
 clean:
        rm -f $(OBJECTS) $(PLUGIN)
--- openh323-1.18.0.dfsg.orig/plugins/configure.ac      2006-10-22 
15:25:38.000000000 +0300
+++ openh323-1.18.0.dfsg/plugins/configure.ac   2007-05-30 10:56:35.000000000 
+0300
@@ -31,6 +31,28 @@
 AC_SUBST(LDSO, ${LDSO})
 
 dnl ########################################################################
+dnl look for pwlib plugin path
+
+AC_CHECK_FILE(/usr/local/include/ptlib.h, HAS_PTLIB=1)
+if test "${HAS_PTLIB:-unset}" != "unset" ; then
+  AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/local/bin)
+else
+  AC_CHECK_FILE(/usr/include/ptlib.h, HAS_PTLIB=1)
+  if test "${HAS_PTLIB:-unset}" != "unset" ; then
+    AC_PATH_PROG(PTLIB_CONFIG, ptlib-config, , /usr/share/pwlib/make/)
+  fi
+fi
+if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
+  echo "Cannot find ptlib-config - please install and try again"
+  exit
+fi
+PWLIB_VERSION=`$PTLIB_CONFIG --version`
+
+echo "PWLib version is ${PWLIB_VERSION}"
+
+AC_SUBST(PWLIB_VERSION, $PWLIB_VERSION)
+
+dnl ########################################################################
 dnl look for amr-nb_float
 
 H323_GSMAMR_NB_FLOAT=0
--- openh323-1.18.0.dfsg.orig/plugins/configure 2006-10-22 15:25:38.000000000 
+0300
+++ openh323-1.18.0.dfsg/plugins/configure      2007-05-30 10:56:56.000000000 
+0300
@@ -272,7 +272,7 @@
 PACKAGE_BUGREPORT=
 
 ac_unique_file="configure.ac"
-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 CXX CXXFLAGS 
LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP EGREP 
INSTALLPREFIX LIBDIR build build_cpu build_vendor build_os host host_cpu 
host_vendor host_os target target_cpu target_vendor target_os LDSO 
H323_GSMAMR_NB_FLOAT H323_EMBEDDED_GSM H323_SYSTEM_SPEEX LIBOBJS LTLIBOBJS'
+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 CXX CXXFLAGS 
LDFLAGS CPPFLAGS ac_ct_CXX EXEEXT OBJEXT CC CFLAGS ac_ct_CC CPP EGREP 
INSTALLPREFIX LIBDIR build build_cpu build_vendor build_os host host_cpu 
host_vendor host_os target target_cpu target_vendor target_os LDSO PTLIB_CONFIG 
PWLIB_VERSION H323_GSMAMR_NB_FLOAT H323_EMBEDDED_GSM H323_SYSTEM_SPEEX LIBOBJS 
LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -3102,6 +3091,143 @@
 
 
 
+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
+  HAS_PTLIB=1
+fi
+
+if test "${HAS_PTLIB:-unset}" != "unset" ; then
+  # Extract the first word of "ptlib-config", so it can be a program name with 
args.
+set dummy ptlib-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PTLIB_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test 
with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/local/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
+
+if test -n "$PTLIB_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5
+echo "${ECHO_T}$PTLIB_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+else
+  echo "$as_me:$LINENO: checking for /usr/include/ptlib.h" >&5
+echo $ECHO_N "checking for /usr/include/ptlib.h... $ECHO_C" >&6
+if test "${ac_cv_file__usr_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/include/ptlib.h"; then
+  ac_cv_file__usr_include_ptlib_h=yes
+else
+  ac_cv_file__usr_include_ptlib_h=no
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_file__usr_include_ptlib_h" >&5
+echo "${ECHO_T}$ac_cv_file__usr_include_ptlib_h" >&6
+if test $ac_cv_file__usr_include_ptlib_h = yes; then
+  HAS_PTLIB=1
+fi
+
+  if test "${HAS_PTLIB:-unset}" != "unset" ; then
+    # Extract the first word of "ptlib-config", so it can be a program name 
with args.
+set dummy ptlib-config; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_path_PTLIB_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $PTLIB_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PTLIB_CONFIG="$PTLIB_CONFIG" # Let the user override the test 
with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /usr/share/pwlib/make/
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PTLIB_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  ;;
+esac
+fi
+PTLIB_CONFIG=$ac_cv_path_PTLIB_CONFIG
+
+if test -n "$PTLIB_CONFIG"; then
+  echo "$as_me:$LINENO: result: $PTLIB_CONFIG" >&5
+echo "${ECHO_T}$PTLIB_CONFIG" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  fi
+fi
+if test "${PTLIB_CONFIG:-unset}" = "unset" ; then
+  echo "Cannot find ptlib-config - please install and try again"
+  exit
+fi
+PWLIB_VERSION=`$PTLIB_CONFIG --version`
+
+echo "PWLib version is ${PWLIB_VERSION}"
+
+PWLIB_VERSION=$PWLIB_VERSION
+
+
+
 H323_GSMAMR_NB_FLOAT=0
 if test -r "./audio/gsm-amr/src/c-code/interf_dec.h" ; then
   { echo "$as_me:$LINENO: Enabling GSM-AMR plugin" >&5
@@ -3985,6 +4109,8 @@
 s,@target_vendor@,$target_vendor,;t t
 s,@target_os@,$target_os,;t t
 s,@LDSO@,$LDSO,;t t
+s,@PTLIB_CONFIG@,$PTLIB_CONFIG,;t t
+s,@PWLIB_VERSION@,$PWLIB_VERSION,;t t
 s,@H323_GSMAMR_NB_FLOAT@,$H323_GSMAMR_NB_FLOAT,;t t
 s,@H323_EMBEDDED_GSM@,$H323_EMBEDDED_GSM,;t t
 s,@H323_SYSTEM_SPEEX@,$H323_SYSTEM_SPEEX,;t t

Reply via email to