[asterisk-commits] rizzo: trunk r89472 - in /trunk: ./ include/asterisk/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 20 18:22:42 CST 2007


Author: rizzo
Date: Tue Nov 20 18:22:41 2007
New Revision: 89472

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89472
Log:
X11 checks (at least some - for other platforms with
unusual X11 locations you might need to add more directories)


Modified:
    trunk/configure
    trunk/configure.ac
    trunk/include/asterisk/autoconfig.h.in

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk/trunk/configure?view=diff&rev=89472&r1=89471&r2=89472
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Tue Nov 20 18:22:41 2007
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.ac Revision: 89460 .
+# From configure.ac Revision: 89464 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61.
 #
@@ -885,6 +885,10 @@
 VPB_INCLUDE
 VPB_DIR
 PBX_VPB
+X11_LIB
+X11_INCLUDE
+X11_DIR
+PBX_X11
 ZLIB_LIB
 ZLIB_INCLUDE
 ZLIB_DIR
@@ -1549,7 +1553,8 @@
   --with-curl=PATH        use cURL files in PATH
   --with-curses=PATH      use curses files in PATH
   --with-crypto=PATH      use OpenSSL Cryptography support files in PATH
-  --with-gsm=PATH         use GSM files in PATH , or 'internal'
+  --with-gsm=PATH         use External GSM library files in PATH , use
+                          'internal' GSM otherwise
   --with-iksemel=PATH     use Iksemel Jabber Library files in PATH
   --with-imap=PATH        use UW IMAP Toolkit files in PATH
   --with-isdnnet=PATH     use ISDN4Linux Library files in PATH
@@ -1586,6 +1591,7 @@
   --with-usb=PATH         use usb files in PATH
   --with-vorbis=PATH      use Vorbis files in PATH
   --with-vpb=PATH         use Voicetronix API files in PATH
+  --with-x11=PATH         use X11 support files in PATH
   --with-z=PATH           use zlib files in PATH
   --with-zaptel=PATH      use Zaptel files in PATH
   --with-zaptel_transcode=PATH
@@ -7671,7 +7677,8 @@
 
 
 # package option names should be in alphabetical order
-# by the --with option name, to make things easier for the users :-)
+# by the --with option name (the third field),
+# to make things easier for the users.
 
 
     ALSA_DESCRIP="Advanced Linux Sound Architecture"
@@ -7845,7 +7852,7 @@
 
 
 
-    GSM_DESCRIP="GSM"
+    GSM_DESCRIP="External GSM library"
     GSM_OPTION="gsm"
 
 # Check whether --with-gsm was given.
@@ -8847,6 +8854,34 @@
 fi
 
     PBX_VPB=0
+
+
+
+
+
+
+    X11_DESCRIP="X11 support"
+    X11_OPTION="x11"
+
+# Check whether --with-x11 was given.
+if test "${with_x11+set}" = set; then
+  withval=$with_x11;
+	case ${withval} in
+	n|no)
+	USE_X11=no
+	;;
+	y|ye|yes)
+	ac_mandatory_list="${ac_mandatory_list} X11"
+	;;
+	*)
+	X11_DIR="${withval}"
+	ac_mandatory_list="${ac_mandatory_list} X11"
+	;;
+	esac
+
+fi
+
+    PBX_X11=0
 
 
 
@@ -12403,13 +12438,11 @@
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <sys/types.h> /* for off_t */
-     #include <stdio.h>
+#include <stdio.h>
 int
 main ()
 {
-int (*fp) (FILE *, off_t, int) = fseeko;
-     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
   ;
   return 0;
 }
@@ -12449,13 +12482,11 @@
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
-     #include <stdio.h>
+#include <stdio.h>
 int
 main ()
 {
-int (*fp) (FILE *, off_t, int) = fseeko;
-     return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return fseeko (stdin, 0, 0) && (fseeko) (stdin, 0, 0);
   ;
   return 0;
 }
@@ -45597,6 +45628,520 @@
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_FFMPEG_VERSION
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+# possible places for X11
+
+if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
+   pbxlibdir=""
+   # if --with-X11=DIR has been specified, use it.
+   if test "x${X11_DIR}" != "x"; then
+      if test -d ${X11_DIR}/lib; then
+      	 pbxlibdir="-L${X11_DIR}/lib"
+      else
+      	 pbxlibdir="-L${X11_DIR}"
+      fi
+   fi
+   pbxfuncname="XOpenDisplay"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_X11_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lX11" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -lX11... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 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_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_X11_FOUND=yes
+else
+  AST_X11_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_X11_FOUND}" = "yes"; then
+      X11_LIB="${pbxlibdir} -lX11 "
+      # if --with-X11=DIR has been specified, use it.
+      if test "x${X11_DIR}" != "x"; then
+	 X11_INCLUDE="-I${X11_DIR}/include"
+      fi
+      X11_INCLUDE="${X11_INCLUDE} "
+      if test "xX11/Xlib.h" = "x" ; then	# no header, assume found
+         X11_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE} "
+	 if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5
+echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking X11/Xlib.h usability" >&5
+echo $ECHO_N "checking X11/Xlib.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 <X11/Xlib.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_c_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 X11/Xlib.h presence" >&5
+echo $ECHO_N "checking X11/Xlib.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 <X11/Xlib.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_c_preproc_warn_flag$ac_c_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_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: X11/Xlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: X11/Xlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: X11/Xlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: X11/Xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5
+echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_X11_Xlib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; }
+
+fi
+if test $ac_cv_header_X11_Xlib_h = yes; then
+  X11_HEADER_FOUND=1
+else
+  X11_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${X11_HEADER_FOUND}" = "x0" ; then
+         X11_LIB=""
+         X11_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
+	    X11_LIB=""
+	 fi
+         PBX_X11=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_X11 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_X11_VERSION standard_path
+_ACEOF
+
+      fi
+   fi
+fi
+
+
+if test "x${PBX_X11}" != "x1" -a "${USE_X11}" != "no"; then
+   pbxlibdir=""
+   # if --with-X11=DIR has been specified, use it.
+   if test "x${X11_DIR}" != "x"; then
+      if test -d ${X11_DIR}/lib; then
+      	 pbxlibdir="-L${X11_DIR}/lib"
+      else
+      	 pbxlibdir="-L${X11_DIR}"
+      fi
+   fi
+   pbxfuncname="XOpenDisplay"
+   if test "x${pbxfuncname}" = "x" ; then   # empty lib, assume only headers
+      AST_X11_FOUND=yes
+   else
+      as_ac_Lib=`echo "ac_cv_lib_X11_${pbxfuncname}" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for ${pbxfuncname} in -lX11" >&5
+echo $ECHO_N "checking for ${pbxfuncname} in -lX11... $ECHO_C" >&6; }
+if { as_var=$as_ac_Lib; eval "test \"\${$as_var+set}\" = set"; }; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lX11 ${pbxlibdir}  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ${pbxfuncname} ();
+int
+main ()
+{
+return ${pbxfuncname} ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+  (eval "$ac_link") 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_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext &&
+       $as_test_x conftest$ac_exeext; then
+  eval "$as_ac_Lib=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	eval "$as_ac_Lib=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+ac_res=`eval echo '${'$as_ac_Lib'}'`
+	       { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_Lib'}'` = yes; then
+  AST_X11_FOUND=yes
+else
+  AST_X11_FOUND=no
+fi
+
+   fi
+
+   # now check for the header.
+   if test "${AST_X11_FOUND}" = "yes"; then
+      X11_LIB="${pbxlibdir} -lX11 "
+      # if --with-X11=DIR has been specified, use it.
+      if test "x${X11_DIR}" != "x"; then
+	 X11_INCLUDE="-I${X11_DIR}/include"
+      fi
+      X11_INCLUDE="${X11_INCLUDE} -I/usr/X11R6/include"
+      if test "xX11/Xlib.h" = "x" ; then	# no header, assume found
+         X11_HEADER_FOUND="1"
+      else				# check for the header
+         saved_cppflags="${CPPFLAGS}"
+         CPPFLAGS="${CPPFLAGS} ${X11_INCLUDE} -I/usr/X11R6/include"
+	 if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  { echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5
+echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; }
+else
+  # Is the header compilable?
+{ echo "$as_me:$LINENO: checking X11/Xlib.h usability" >&5
+echo $ECHO_N "checking X11/Xlib.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 <X11/Xlib.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_c_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 X11/Xlib.h presence" >&5
+echo $ECHO_N "checking X11/Xlib.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 <X11/Xlib.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_c_preproc_warn_flag$ac_c_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_c_preproc_warn_flag in
+  yes:no: )
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: X11/Xlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&5
+echo "$as_me: WARNING: X11/Xlib.h: proceeding with the compiler's result" >&2;}
+    ac_header_preproc=yes
+    ;;
+  no:yes:* )
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: X11/Xlib.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h:     check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: X11/Xlib.h:     check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: see the Autoconf documentation" >&5
+echo "$as_me: WARNING: X11/Xlib.h: see the Autoconf documentation" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h:     section \"Present But Cannot Be Compiled\"" >&5
+echo "$as_me: WARNING: X11/Xlib.h:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: X11/Xlib.h: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&5
+echo "$as_me: WARNING: X11/Xlib.h: in the future, the compiler will take precedence" >&2;}
+
+    ;;
+esac
+{ echo "$as_me:$LINENO: checking for X11/Xlib.h" >&5
+echo $ECHO_N "checking for X11/Xlib.h... $ECHO_C" >&6; }
+if test "${ac_cv_header_X11_Xlib_h+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_header_X11_Xlib_h=$ac_header_preproc
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xlib_h" >&5
+echo "${ECHO_T}$ac_cv_header_X11_Xlib_h" >&6; }
+
+fi
+if test $ac_cv_header_X11_Xlib_h = yes; then
+  X11_HEADER_FOUND=1
+else
+  X11_HEADER_FOUND=0
+fi
+
+
+         CPPFLAGS="${saved_cppflags}"
+      fi
+      if test "x${X11_HEADER_FOUND}" = "x0" ; then
+         X11_LIB=""
+         X11_INCLUDE=""
+      else
+         if test "x${pbxfuncname}" = "x" ; then		# only checking headers -> no library
+	    X11_LIB=""
+	 fi
+         PBX_X11=1
+         # XXX don't know how to evaluate the description (third argument) in AC_DEFINE_UNQUOTED
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_X11 1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_X11_VERSION X11R6
 _ACEOF
 
       fi
@@ -46998,6 +47543,10 @@
 VPB_INCLUDE!$VPB_INCLUDE$ac_delim
 VPB_DIR!$VPB_DIR$ac_delim
 PBX_VPB!$PBX_VPB$ac_delim
+X11_LIB!$X11_LIB$ac_delim
+X11_INCLUDE!$X11_INCLUDE$ac_delim
+X11_DIR!$X11_DIR$ac_delim
+PBX_X11!$PBX_X11$ac_delim
 ZLIB_LIB!$ZLIB_LIB$ac_delim
 ZLIB_INCLUDE!$ZLIB_INCLUDE$ac_delim
 ZLIB_DIR!$ZLIB_DIR$ac_delim
@@ -47019,10 +47568,6 @@
 SDL_DIR!$SDL_DIR$ac_delim
 PBX_SDL!$PBX_SDL$ac_delim
 SDL_IMAGE_LIB!$SDL_IMAGE_LIB$ac_delim
-SDL_IMAGE_INCLUDE!$SDL_IMAGE_INCLUDE$ac_delim
-SDL_IMAGE_DIR!$SDL_IMAGE_DIR$ac_delim
-PBX_SDL_IMAGE!$PBX_SDL_IMAGE$ac_delim
-FFMPEG_LIB!$FFMPEG_LIB$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -47064,6 +47609,10 @@
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+SDL_IMAGE_INCLUDE!$SDL_IMAGE_INCLUDE$ac_delim
+SDL_IMAGE_DIR!$SDL_IMAGE_DIR$ac_delim
+PBX_SDL_IMAGE!$PBX_SDL_IMAGE$ac_delim
+FFMPEG_LIB!$FFMPEG_LIB$ac_delim
 FFMPEG_INCLUDE!$FFMPEG_INCLUDE$ac_delim
 FFMPEG_DIR!$FFMPEG_DIR$ac_delim
 PBX_FFMPEG!$PBX_FFMPEG$ac_delim
@@ -47106,7 +47655,7 @@
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 40; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

Modified: trunk/configure.ac
URL: http://svn.digium.com/view/asterisk/trunk/configure.ac?view=diff&rev=89472&r1=89471&r2=89472
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Tue Nov 20 18:22:41 2007
@@ -176,7 +176,8 @@
 AC_SUBST(AST_DEVMODE)
 
 # package option names should be in alphabetical order
-# by the --with option name, to make things easier for the users :-)
+# by the --with option name (the third field),
+# to make things easier for the users.
 
 AST_EXT_LIB_SETUP([ALSA], [Advanced Linux Sound Architecture], [asound])
 
@@ -187,7 +188,7 @@
 AST_EXT_LIB_SETUP([CURL], [cURL], [curl])
 AST_EXT_LIB_SETUP([CURSES], [curses], [curses])
 AST_EXT_LIB_SETUP([CRYPTO], [OpenSSL Cryptography support], [crypto])
-AST_EXT_LIB_SETUP([GSM], [GSM], [gsm], [, or 'internal'])
+AST_EXT_LIB_SETUP([GSM], [External GSM library], [gsm], [, use 'internal' GSM otherwise])
 AST_EXT_LIB_SETUP([IKSEMEL], [Iksemel Jabber Library], [iksemel])
 AST_EXT_LIB_SETUP([IMAP_TK], [UW IMAP Toolkit], [imap])
 AST_EXT_LIB_SETUP([ISDNNET], [ISDN4Linux Library], [isdnnet])
@@ -223,6 +224,7 @@
 AST_EXT_LIB_SETUP([USB], [usb], [usb])
 AST_EXT_LIB_SETUP([VORBIS], [Vorbis], [vorbis])
 AST_EXT_LIB_SETUP([VPB], [Voicetronix API], [vpb])
+AST_EXT_LIB_SETUP([X11], [X11 support], [x11])
 AST_EXT_LIB_SETUP([ZLIB], [zlib], [z])
 AST_EXT_LIB_SETUP([ZAPTEL], [Zaptel], [zaptel])
 AST_EXT_LIB_SETUP([ZAPTEL_TRANSCODE], [Zaptel_transcode], [zaptel_transcode])
@@ -1182,6 +1184,10 @@
 AST_EXT_LIB_CHECK([SDL_IMAGE], [SDL_image], [IMG_Load], [SDL_image.h], [${SDL_LIB}], [${SDL_INCLUDE}])
 AST_EXT_LIB_CHECK([FFMPEG], [avcodec], [sws_getContext], [ffmpeg/avcodec.h], [-lpthread -lz -lm])
 
+# possible places for X11
+AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],,, [standard_path])
+AST_EXT_LIB_CHECK([X11], [X11], [XOpenDisplay], [X11/Xlib.h],, [-I/usr/X11R6/include], [X11R6])
+
 PBX_GTK=0
 AC_CHECK_TOOL(GTKCONFIG, gtk-config, No)
 if test ! "x${GTKCONFIG}" = xNo; then

Modified: trunk/include/asterisk/autoconfig.h.in
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/autoconfig.h.in?view=diff&rev=89472&r1=89471&r2=89472
==============================================================================
--- trunk/include/asterisk/autoconfig.h.in (original)
+++ trunk/include/asterisk/autoconfig.h.in Tue Nov 20 18:22:41 2007
@@ -984,6 +984,12 @@
 
 /* Define to 1 if `vfork' works. */
 #undef HAVE_WORKING_VFORK
+
+/* Define this to indicate the ${X11_DESCRIP} library */
+#undef HAVE_X11
+
+/* Define to indicate the ${X11_DESCRIP} library version */
+#undef HAVE_X11_VERSION
 
 /* Define this to indicate the ${ZAPTEL_DESCRIP} library */
 #undef HAVE_ZAPTEL




More information about the asterisk-commits mailing list