[svn-commits] trunk r260 - in /trunk: ./ build_tools/

svn-commits at lists.digium.com svn-commits at lists.digium.com
Wed Jul 12 13:51:45 MST 2006


Author: russell
Date: Wed Jul 12 15:51:45 2006
New Revision: 260

URL: http://svn.digium.com/view/asterisk-addons?rev=260&view=rev
Log:
make the autoconf stuff to check for mysql suck much less

Modified:
    trunk/acinclude.m4
    trunk/build_tools/menuselect-deps.in
    trunk/configure
    trunk/configure.ac

Modified: trunk/acinclude.m4
URL: http://svn.digium.com/view/asterisk-addons/trunk/acinclude.m4?rev=260&r1=259&r2=260&view=diff
==============================================================================
--- trunk/acinclude.m4 (original)
+++ trunk/acinclude.m4 Wed Jul 12 15:51:45 2006
@@ -1,73 +1,83 @@
-# AST_EXT_LIB([NAME], [FUNCTION], [package header], [package symbol name], [package friendly name], [additional LIB data])
+# AST_EXT_LIB_SETUP([package symbol name], [package friendly name], [package option name], [additional help text])
 
-AC_DEFUN([AST_EXT_LIB],
+AC_DEFUN([AST_EXT_LIB_SETUP],
 [
-AC_ARG_WITH([$1], AC_HELP_STRING([--with-$1=PATH],[use $5 files in PATH]),[
+$1_DESCRIP="$2"
+$1_OPTION="$3"
+AC_ARG_WITH([$3], AC_HELP_STRING([--with-$3=PATH],[use $2 files in PATH $4]),[
 case ${withval} in
      n|no)
-     USE_$4=no
+     USE_$1=no
      ;;
      y|ye|yes)
-     $4_MANDATORY="yes"
+     $1_MANDATORY="yes"
      ;;
      *)
-     $4_DIR="${withval}"
-     $4_MANDATORY="yes"
+     $1_DIR="${withval}"
+     $1_MANDATORY="yes"
      ;;
 esac
 ])
+PBX_$1=0
+AC_SUBST([$1_LIB])
+AC_SUBST([$1_INCLUDE])
+AC_SUBST([PBX_$1])
+])
 
-PBX_LIB$4=0
+# AST_EXT_LIB_CHECK([package symbol name], [package library name], [function to check], [package header], [additional LIB data])
 
-if test "${USE_$4}" != "no"; then
+AC_DEFUN([AST_EXT_LIB_CHECK],
+[
+if test "${USE_$1}" != "no"; then
    pbxlibdir=""
-   if test "x${$4_DIR}" != "x"; then
-      pbxlibdir="-L${$1_DIR} -L${$1_DIR}/lib"
+   if test "x${$1_DIR}" != "x"; then
+      if test -d ${$1_DIR}/lib; then
+      	 pbxlibdir="-L${$1_DIR}/lib"
+      else
+      	 pbxlibdir="-L${$1_DIR}"
+      fi
    fi
-   AC_CHECK_LIB([$1], [$2], [AST_$4_FOUND=yes], [AST_$4_FOUND=no], ${pbxlibdir} $6)
+   AC_CHECK_LIB([$2], [$3], [AST_$1_FOUND=yes], [AST_$1_FOUND=no], ${pbxlibdir} $5)
 
-   if test "${AST_$4_FOUND}" = "yes"; then
-      $4_LIB="-l$1 $6"
-      $4_HEADER_FOUND="1"
-      if test "x${$4_DIR}" != "x"; then
-         $4_LIB="${pbxlibdir} ${$4_LIB}"
-	 $4_INCLUDE="-I${$4_DIR}/include"
-	 if test "x$3" != "x" ; then
-	    AC_CHECK_HEADER([${$4_DIR}/include/$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+   if test "${AST_$1_FOUND}" = "yes"; then
+      $1_LIB="-l$2 $5"
+      $1_HEADER_FOUND="1"
+      if test "x${$1_DIR}" != "x"; then
+         $1_LIB="${pbxlibdir} ${$1_LIB}"
+	 $1_INCLUDE="-I${$1_DIR}/include"
+	 if test "x$4" != "x" ; then
+	    AC_CHECK_HEADER([${$1_DIR}/include/$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       else
-	 if test "x$3" != "x" ; then
-            AC_CHECK_HEADER([$3], [$4_HEADER_FOUND=1], [$4_HEADER_FOUND=0] )
+	 if test "x$4" != "x" ; then
+            AC_CHECK_HEADER([$4], [$1_HEADER_FOUND=1], [$1_HEADER_FOUND=0] )
 	 fi
       fi
-      if test "x${$4_HEADER_FOUND}" = "x0" ; then
-         if test ! -z "${$4_MANDATORY}" ;
+      if test "x${$1_HEADER_FOUND}" = "x0" ; then
+         if test ! -z "${$1_MANDATORY}" ;
          then
             echo " ***"
-            echo " *** It appears that you do not have the $1 development package installed."
-            echo " *** Please install it to include $5 support, or re-run configure"
-            echo " *** without explicitly specifying --with-$1"
+            echo " *** It appears that you do not have the $2 development package installed."
+            echo " *** Please install it to include ${$1_DESCRIP} support, or re-run configure"
+            echo " *** without explicitly specifying --with-${$1_OPTION}"
             exit 1
          fi
-         $4_LIB=""
-         $4_INCLUDE=""
-         PBX_LIB$4=0
+         $1_LIB=""
+         $1_INCLUDE=""
+         PBX_$1=0
       else
-         PBX_LIB$4=1
-         AC_DEFINE_UNQUOTED([HAVE_$4], 1, [Define to indicate the $5 library])
+         PBX_$1=1
+         AC_DEFINE_UNQUOTED([HAVE_$1], 1, [Define to indicate the ${$1_DESCRIP} library])
       fi
-   elif test ! -z "${$4_MANDATORY}";
+   elif test ! -z "${$1_MANDATORY}";
    then
       echo "***"
-      echo "*** The $5 installation on this system appears to be broken."
+      echo "*** The ${$1_DESCRIP} installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-$1"
+      echo "*** without explicitly specifying --with-${$1_OPTION}"
       exit 1
    fi
 fi
-AC_SUBST([$4_LIB])
-AC_SUBST([$4_INCLUDE])
-AC_SUBST([PBX_LIB$4])
 ])
 
 

Modified: trunk/build_tools/menuselect-deps.in
URL: http://svn.digium.com/view/asterisk-addons/trunk/build_tools/menuselect-deps.in?rev=260&r1=259&r2=260&view=diff
==============================================================================
--- trunk/build_tools/menuselect-deps.in (original)
+++ trunk/build_tools/menuselect-deps.in Wed Jul 12 15:51:45 2006
@@ -1,1 +1,1 @@
-MYSQLCLIENT=@PBX_LIBMYSQLCLIENT@
+MYSQLCLIENT=@PBX_MYSQLCLIENT@

Modified: trunk/configure
URL: http://svn.digium.com/view/asterisk-addons/trunk/configure?rev=260&r1=259&r2=260&view=diff
==============================================================================
--- trunk/configure (original)
+++ trunk/configure Wed Jul 12 15:51:45 2006
@@ -683,17 +683,18 @@
 BASENAME
 DIRNAME
 LN
+CURSES_LIB
+CURSES_INCLUDE
+PBX_CURSES
+NCURSES_LIB
+NCURSES_INCLUDE
+PBX_NCURSES
+MYSQLCLIENT_LIB
+MYSQLCLIENT_INCLUDE
+PBX_MYSQLCLIENT
 CPP
 EGREP
-CURSES_LIB
-CURSES_INCLUDE
-PBX_LIBCURSES
-MYSQLCLIENT_LIB
-MYSQLCLIENT_INCLUDE
-PBX_LIBMYSQLCLIENT
-NCURSES_LIB
-NCURSES_INCLUDE
-PBX_LIBNCURSES
+MYSQL_CONFIG
 LIBOBJS
 LTLIBOBJS'
 ac_subst_files=''
@@ -1282,8 +1283,8 @@
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
   --with-curses=PATH      use curses files in PATH
+  --with-ncurses=PATH     use ncurses files in PATH
   --with-mysqlclient=PATH use mysqlclient files in PATH
-  --with-ncurses=PATH     use ncurses files in PATH
 
 Some influential environment variables:
   CC          C compiler command
@@ -4575,6 +4576,88 @@
 # by the --with option name, to make things easier for the users :-)
 
 
+CURSES_DESCRIP="curses"
+CURSES_OPTION="curses"
+
+# Check whether --with-curses was given.
+if test "${with_curses+set}" = set; then
+  withval=$with_curses;
+case ${withval} in
+     n|no)
+     USE_CURSES=no
+     ;;
+     y|ye|yes)
+     CURSES_MANDATORY="yes"
+     ;;
+     *)
+     CURSES_DIR="${withval}"
+     CURSES_MANDATORY="yes"
+     ;;
+esac
+
+fi
+
+PBX_CURSES=0
+
+
+
+
+
+NCURSES_DESCRIP="ncurses"
+NCURSES_OPTION="ncurses"
+
+# Check whether --with-ncurses was given.
+if test "${with_ncurses+set}" = set; then
+  withval=$with_ncurses;
+case ${withval} in
+     n|no)
+     USE_NCURSES=no
+     ;;
+     y|ye|yes)
+     NCURSES_MANDATORY="yes"
+     ;;
+     *)
+     NCURSES_DIR="${withval}"
+     NCURSES_MANDATORY="yes"
+     ;;
+esac
+
+fi
+
+PBX_NCURSES=0
+
+
+
+
+
+MYSQLCLIENT_DESCRIP="mysqlclient"
+MYSQLCLIENT_OPTION="mysqlclient"
+
+# Check whether --with-mysqlclient was given.
+if test "${with_mysqlclient+set}" = set; then
+  withval=$with_mysqlclient;
+case ${withval} in
+     n|no)
+     USE_MYSQLCLIENT=no
+     ;;
+     y|ye|yes)
+     MYSQLCLIENT_MANDATORY="yes"
+     ;;
+     *)
+     MYSQLCLIENT_DIR="${withval}"
+     MYSQLCLIENT_MANDATORY="yes"
+     ;;
+esac
+
+fi
+
+PBX_MYSQLCLIENT=0
+
+
+
+
+
+
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -5274,32 +5357,14 @@
 
 
 
-
-# Check whether --with-curses was given.
-if test "${with_curses+set}" = set; then
-  withval=$with_curses;
-case ${withval} in
-     n|no)
-     USE_CURSES=no
-     ;;
-     y|ye|yes)
-     CURSES_MANDATORY="yes"
-     ;;
-     *)
-     CURSES_DIR="${withval}"
-     CURSES_MANDATORY="yes"
-     ;;
-esac
-
-fi
-
-
-PBX_LIBCURSES=0
-
 if test "${USE_CURSES}" != "no"; then
    pbxlibdir=""
    if test "x${CURSES_DIR}" != "x"; then
-      pbxlibdir="-L${curses_DIR} -L${curses_DIR}/lib"
+      if test -d ${CURSES_DIR}/lib; then
+      	 pbxlibdir="-L${CURSES_DIR}/lib"
+      else
+      	 pbxlibdir="-L${CURSES_DIR}"
+      fi
    fi
    { echo "$as_me:$LINENO: checking for initscr in -lcurses" >&5
 echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6; }
@@ -5717,15 +5782,15 @@
          then
             echo " ***"
             echo " *** It appears that you do not have the curses development package installed."
-            echo " *** Please install it to include curses support, or re-run configure"
-            echo " *** without explicitly specifying --with-curses"
+            echo " *** Please install it to include ${CURSES_DESCRIP} support, or re-run configure"
+            echo " *** without explicitly specifying --with-${CURSES_OPTION}"
             exit 1
          fi
          CURSES_LIB=""
          CURSES_INCLUDE=""
-         PBX_LIBCURSES=0
+         PBX_CURSES=0
       else
-         PBX_LIBCURSES=1
+         PBX_CURSES=1
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_CURSES 1
@@ -5735,515 +5800,23 @@
    elif test ! -z "${CURSES_MANDATORY}";
    then
       echo "***"
-      echo "*** The curses installation on this system appears to be broken."
+      echo "*** The ${CURSES_DESCRIP} installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-curses"
+      echo "*** without explicitly specifying --with-${CURSES_OPTION}"
       exit 1
    fi
 fi
 
 
-
-
-
-
-# Check whether --with-mysqlclient was given.
-if test "${with_mysqlclient+set}" = set; then
-  withval=$with_mysqlclient;
-case ${withval} in
-     n|no)
-     USE_MYSQLCLIENT=no
-     ;;
-     y|ye|yes)
-     MYSQLCLIENT_MANDATORY="yes"
-     ;;
-     *)
-     MYSQLCLIENT_DIR="${withval}"
-     MYSQLCLIENT_MANDATORY="yes"
-     ;;
-esac
-
-fi
-
-
-PBX_LIBMYSQLCLIENT=0
-
-if test "${USE_MYSQLCLIENT}" != "no"; then
-   pbxlibdir=""
-   if test "x${MYSQLCLIENT_DIR}" != "x"; then
-      pbxlibdir="-L${mysqlclient_DIR} -L${mysqlclient_DIR}/lib"
-   fi
-   { echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5
-echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6; }
-if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmysqlclient ${pbxlibdir} -lz $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 mysql_init ();
-int
-main ()
-{
-return mysql_init ();
-  ;
-  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); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest$ac_exeext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  ac_cv_lib_mysqlclient_mysql_init=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_lib_mysqlclient_mysql_init=no
-fi
-
-rm -f conftest.err conftest.$ac_objext \
-      conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
-echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6; }
-if test $ac_cv_lib_mysqlclient_mysql_init = yes; then
-  AST_MYSQLCLIENT_FOUND=yes
-else
-  AST_MYSQLCLIENT_FOUND=no
-fi
-
-
-   if test "${AST_MYSQLCLIENT_FOUND}" = "yes"; then
-      MYSQLCLIENT_LIB="-lmysqlclient -lz"
-      MYSQLCLIENT_HEADER_FOUND="1"
-      if test "x${MYSQLCLIENT_DIR}" != "x"; then
-         MYSQLCLIENT_LIB="${pbxlibdir} ${MYSQLCLIENT_LIB}"
-	 MYSQLCLIENT_INCLUDE="-I${MYSQLCLIENT_DIR}/include"
-	 if test "xmysql/mysql.h" != "x" ; then
-	    as_ac_Header=`echo "ac_cv_header_${MYSQLCLIENT_DIR}/include/mysql/mysql.h" | $as_tr_sh`
-if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
-  { echo "$as_me:$LINENO: checking for ${MYSQLCLIENT_DIR}/include/mysql/mysql.h" >&5
-echo $ECHO_N "checking for ${MYSQLCLIENT_DIR}/include/mysql/mysql.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 ${MYSQLCLIENT_DIR}/include/mysql/mysql.h usability" >&5
-echo $ECHO_N "checking ${MYSQLCLIENT_DIR}/include/mysql/mysql.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 <${MYSQLCLIENT_DIR}/include/mysql/mysql.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); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; 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 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 ${MYSQLCLIENT_DIR}/include/mysql/mysql.h presence" >&5
-echo $ECHO_N "checking ${MYSQLCLIENT_DIR}/include/mysql/mysql.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 <${MYSQLCLIENT_DIR}/include/mysql/mysql.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; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_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: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: ${MYSQLCLIENT_DIR}/include/mysql/mysql.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for ${MYSQLCLIENT_DIR}/include/mysql/mysql.h" >&5
-echo $ECHO_N "checking for ${MYSQLCLIENT_DIR}/include/mysql/mysql.h... $ECHO_C" >&6; }
-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; }
-
-fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  MYSQLCLIENT_HEADER_FOUND=1
-else
-  MYSQLCLIENT_HEADER_FOUND=0
-fi
-
-
-	 fi
-      else
-	 if test "xmysql/mysql.h" != "x" ; then
-            if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
-  { echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
-echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
-echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6; }
-else
-  # Is the header compilable?
-{ echo "$as_me:$LINENO: checking mysql/mysql.h usability" >&5
-echo $ECHO_N "checking mysql/mysql.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 <mysql/mysql.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); } &&
-	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (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_try") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; 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 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 mysql/mysql.h presence" >&5
-echo $ECHO_N "checking mysql/mysql.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 <mysql/mysql.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; then
-  if test -s conftest.err; then
-    ac_cpp_err=$ac_c_preproc_warn_flag
-    ac_cpp_err=$ac_cpp_err$ac_c_werror_flag
-  else
-    ac_cpp_err=
-  fi
-else
-  ac_cpp_err=yes
-fi
-if test -z "$ac_cpp_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: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: mysql/mysql.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&5
-echo "$as_me: WARNING: mysql/mysql.h: proceeding with the compiler's result" >&2;}
-    ac_header_preproc=yes
-    ;;
-  no:yes:* )
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: present but cannot be compiled" >&5
-echo "$as_me: WARNING: mysql/mysql.h: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: mysql/mysql.h:     check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: see the Autoconf documentation" >&5
-echo "$as_me: WARNING: mysql/mysql.h: see the Autoconf documentation" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&5
-echo "$as_me: WARNING: mysql/mysql.h:     section \"Present But Cannot Be Compiled\"" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: mysql/mysql.h: proceeding with the preprocessor's result" >&2;}
-    { echo "$as_me:$LINENO: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&5
-echo "$as_me: WARNING: mysql/mysql.h: in the future, the compiler will take precedence" >&2;}
-
-    ;;
-esac
-{ echo "$as_me:$LINENO: checking for mysql/mysql.h" >&5
-echo $ECHO_N "checking for mysql/mysql.h... $ECHO_C" >&6; }
-if test "${ac_cv_header_mysql_mysql_h+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  ac_cv_header_mysql_mysql_h=$ac_header_preproc
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_header_mysql_mysql_h" >&5
-echo "${ECHO_T}$ac_cv_header_mysql_mysql_h" >&6; }
-
-fi
-if test $ac_cv_header_mysql_mysql_h = yes; then
-  MYSQLCLIENT_HEADER_FOUND=1
-else
-  MYSQLCLIENT_HEADER_FOUND=0
-fi
-
-
-	 fi
-      fi
-      if test "x${MYSQLCLIENT_HEADER_FOUND}" = "x0" ; then
-         if test ! -z "${MYSQLCLIENT_MANDATORY}" ;
-         then
-            echo " ***"
-            echo " *** It appears that you do not have the mysqlclient development package installed."
-            echo " *** Please install it to include mysqlclient support, or re-run configure"
-            echo " *** without explicitly specifying --with-mysqlclient"
-            exit 1
-         fi
-         MYSQLCLIENT_LIB=""
-         MYSQLCLIENT_INCLUDE=""
-         PBX_LIBMYSQLCLIENT=0
-      else
-         PBX_LIBMYSQLCLIENT=1
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_MYSQLCLIENT 1
-_ACEOF
-
-      fi
-   elif test ! -z "${MYSQLCLIENT_MANDATORY}";
-   then
-      echo "***"
-      echo "*** The mysqlclient installation on this system appears to be broken."
-      echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-mysqlclient"
-      exit 1
-   fi
-fi
-
-
-
-
-
-
-# Check whether --with-ncurses was given.
-if test "${with_ncurses+set}" = set; then
-  withval=$with_ncurses;
-case ${withval} in
-     n|no)
-     USE_NCURSES=no
-     ;;
-     y|ye|yes)
-     NCURSES_MANDATORY="yes"
-     ;;
-     *)
-     NCURSES_DIR="${withval}"
-     NCURSES_MANDATORY="yes"
-     ;;
-esac
-
-fi
-
-
-PBX_LIBNCURSES=0
 
 if test "${USE_NCURSES}" != "no"; then
    pbxlibdir=""
    if test "x${NCURSES_DIR}" != "x"; then
-      pbxlibdir="-L${ncurses_DIR} -L${ncurses_DIR}/lib"
+      if test -d ${NCURSES_DIR}/lib; then
+      	 pbxlibdir="-L${NCURSES_DIR}/lib"
+      else
+      	 pbxlibdir="-L${NCURSES_DIR}"
+      fi
    fi
    { echo "$as_me:$LINENO: checking for initscr in -lncurses" >&5
 echo $ECHO_N "checking for initscr in -lncurses... $ECHO_C" >&6; }
@@ -6661,15 +6234,15 @@
          then
             echo " ***"
             echo " *** It appears that you do not have the ncurses development package installed."
-            echo " *** Please install it to include ncurses support, or re-run configure"
-            echo " *** without explicitly specifying --with-ncurses"
+            echo " *** Please install it to include ${NCURSES_DESCRIP} support, or re-run configure"
+            echo " *** without explicitly specifying --with-${NCURSES_OPTION}"
             exit 1
          fi
          NCURSES_LIB=""
          NCURSES_INCLUDE=""
-         PBX_LIBNCURSES=0
+         PBX_NCURSES=0
       else
-         PBX_LIBNCURSES=1
+         PBX_NCURSES=1
 
 cat >>confdefs.h <<_ACEOF
 #define HAVE_NCURSES 1
@@ -6679,16 +6252,343 @@
    elif test ! -z "${NCURSES_MANDATORY}";
    then
       echo "***"
-      echo "*** The ncurses installation on this system appears to be broken."
+      echo "*** The ${NCURSES_DESCRIP} installation on this system appears to be broken."
       echo "*** Either correct the installation, or run configure"
-      echo "*** without explicity specifying --with-ncurses"
+      echo "*** without explicitly specifying --with-${NCURSES_OPTION}"
       exit 1
    fi
 fi
 
 
-
-
+MYSQL_CONFIG=No
+PBX_MYSQLCLIENT=0
+if test "${USE_MYSQLCLIENT}" != "no"; then
+   if test "x${MYSQLCLIENT_DIR}" != "x"; then
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mysql_config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mysql_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_MYSQL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MYSQL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in ${MYSQLCLIENT_DIR}/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MYSQL_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
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
+if test -n "$MYSQL_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5
+echo "${ECHO_T}$MYSQL_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_MYSQL_CONFIG"; then
+  ac_pt_MYSQL_CONFIG=$MYSQL_CONFIG
+  # Extract the first word of "mysql_config", so it can be a program name with args.
+set dummy mysql_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_ac_pt_MYSQL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_MYSQL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_MYSQL_CONFIG="$ac_pt_MYSQL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in ${MYSQLCLIENT_DIR}/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_MYSQL_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
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_MYSQL_CONFIG=$ac_cv_path_ac_pt_MYSQL_CONFIG
+if test -n "$ac_pt_MYSQL_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_MYSQL_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_MYSQL_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_MYSQL_CONFIG" = x; then
+    MYSQL_CONFIG="No"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    MYSQL_CONFIG=$ac_pt_MYSQL_CONFIG
+  fi
+else
+  MYSQL_CONFIG="$ac_cv_path_MYSQL_CONFIG"
+fi
+
+      if test x"${MYSQL_CONFIG}" = xNo; then
+         echo "***"
+         echo "*** mysql_config was not found in the path you specified:"
+         echo "*** ${MYSQLCLIENT_DIR}/bin"
+         echo "*** Either correct the installation, or run configure"
+         echo "*** including --without-mysqlclient"
+         exit 1
+      fi
+   else
+      if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}mysql_config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}mysql_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_MYSQL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $MYSQL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MYSQL_CONFIG="$MYSQL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_MYSQL_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
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MYSQL_CONFIG=$ac_cv_path_MYSQL_CONFIG
+if test -n "$MYSQL_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $MYSQL_CONFIG" >&5
+echo "${ECHO_T}$MYSQL_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_MYSQL_CONFIG"; then
+  ac_pt_MYSQL_CONFIG=$MYSQL_CONFIG
+  # Extract the first word of "mysql_config", so it can be a program name with args.
+set dummy mysql_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_ac_pt_MYSQL_CONFIG+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  case $ac_pt_MYSQL_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_MYSQL_CONFIG="$ac_pt_MYSQL_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_path_ac_pt_MYSQL_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
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_MYSQL_CONFIG=$ac_cv_path_ac_pt_MYSQL_CONFIG
+if test -n "$ac_pt_MYSQL_CONFIG"; then
+  { echo "$as_me:$LINENO: result: $ac_pt_MYSQL_CONFIG" >&5
+echo "${ECHO_T}$ac_pt_MYSQL_CONFIG" >&6; }
+else
+  { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+fi
+
+  if test "x$ac_pt_MYSQL_CONFIG" = x; then
+    MYSQL_CONFIG="No"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&5
+echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
+whose name does not start with the host triplet.  If you think this
+configuration is useful to you, please write to autoconf at gnu.org." >&2;}
+ac_tool_warned=yes ;;
+esac
+    MYSQL_CONFIG=$ac_pt_MYSQL_CONFIG
+  fi
+else
+  MYSQL_CONFIG="$ac_cv_path_MYSQL_CONFIG"
+fi
+
+   fi
+fi
+if test x"${MYSQL_CONFIG}" != xNo; then
+   MYSQLCLIENT_libs=`mysql_config --libs`
+
+
+{ echo "$as_me:$LINENO: checking for mysql_init in -lmysqlclient" >&5
+echo $ECHO_N "checking for mysql_init in -lmysqlclient... $ECHO_C" >&6; }
+if test "${ac_cv_lib_mysqlclient_mysql_init+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lmysqlclient ${MYSQLCLIENT_libs} $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 mysql_init ();
+int
+main ()
+{
+return mysql_init ();
+  ;
+  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); } &&
+	 { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err'
+  { (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_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+	 { ac_try='test -s conftest$ac_exeext'
+  { (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_try") 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_mysqlclient_mysql_init=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_cv_lib_mysqlclient_mysql_init=no
+fi
+
+rm -f conftest.err conftest.$ac_objext \
+      conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ echo "$as_me:$LINENO: result: $ac_cv_lib_mysqlclient_mysql_init" >&5
+echo "${ECHO_T}$ac_cv_lib_mysqlclient_mysql_init" >&6; }
+if test $ac_cv_lib_mysqlclient_mysql_init = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBMYSQLCLIENT 1
+_ACEOF
+
+  LIBS="-lmysqlclient $LIBS"
+
+fi
+
+
+   if test "${ac_cv_lib_mysqlclient_mysql_init}" = "yes"; then
+      MYSQLCLIENT_LIB="${MYSQLCLIENT_libs}"
+      PBX_MYSQLCLIENT=1
+   elif test ! -z "${MYSQLCLIENT_MANDATORY}";
+   then
+      echo "***"
+      echo "*** The MySQL client installation on this system appears to be broken."
+      echo "*** Either correct the installation, or run configure"
+      echo "*** including --without-mysqlclient"
+      exit 1
+   fi
+elif test ! -z "${MYSQLCLIENT_MANDATORY}";
+then
+   echo "***"
+   echo "*** The MySQL client installation on this system appears to be broken."
+   echo "*** Either correct the installation, or run configure"
+   echo "*** including --without-mysqlclient"
+   exit 1
+fi
 
 ac_config_files="$ac_config_files build_tools/menuselect-deps makeopts"
 
@@ -7390,22 +7290,23 @@
 BASENAME!$BASENAME$ac_delim
 DIRNAME!$DIRNAME$ac_delim
 LN!$LN$ac_delim
+CURSES_LIB!$CURSES_LIB$ac_delim
+CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim
+PBX_CURSES!$PBX_CURSES$ac_delim
+NCURSES_LIB!$NCURSES_LIB$ac_delim
+NCURSES_INCLUDE!$NCURSES_INCLUDE$ac_delim
+PBX_NCURSES!$PBX_NCURSES$ac_delim
+MYSQLCLIENT_LIB!$MYSQLCLIENT_LIB$ac_delim
+MYSQLCLIENT_INCLUDE!$MYSQLCLIENT_INCLUDE$ac_delim
+PBX_MYSQLCLIENT!$PBX_MYSQLCLIENT$ac_delim
 CPP!$CPP$ac_delim
 EGREP!$EGREP$ac_delim
-CURSES_LIB!$CURSES_LIB$ac_delim
-CURSES_INCLUDE!$CURSES_INCLUDE$ac_delim
-PBX_LIBCURSES!$PBX_LIBCURSES$ac_delim
-MYSQLCLIENT_LIB!$MYSQLCLIENT_LIB$ac_delim
-MYSQLCLIENT_INCLUDE!$MYSQLCLIENT_INCLUDE$ac_delim
-PBX_LIBMYSQLCLIENT!$PBX_LIBMYSQLCLIENT$ac_delim
-NCURSES_LIB!$NCURSES_LIB$ac_delim
-NCURSES_INCLUDE!$NCURSES_INCLUDE$ac_delim
-PBX_LIBNCURSES!$PBX_LIBNCURSES$ac_delim
+MYSQL_CONFIG!$MYSQL_CONFIG$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 

[... 71 lines stripped ...]


More information about the svn-commits mailing list