mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 19:28:53 +00:00
configure: Add check for MySQL client bool and my_bool type usage.
Instead of trying to use the defined MySQL client version from the header use a configure check to determine whether the bool or my_bool type should be used for defining a boolean. ASTERISK-28604 Change-Id: Id2225b3785115de074c50c123ff1a68005b4a9c7
This commit is contained in:
56
configure
vendored
56
configure
vendored
@@ -23149,6 +23149,7 @@ fi
|
||||
fi
|
||||
|
||||
|
||||
|
||||
if test "x${PBX_MYSQLCLIENT}" != "x1" -a "${USE_MYSQLCLIENT}" != "no"; then
|
||||
PBX_MYSQLCLIENT=0
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
@@ -23268,6 +23269,61 @@ $as_echo "#define HAVE_MYSQLCLIENT 1" >>confdefs.h
|
||||
fi
|
||||
|
||||
|
||||
if test "${PBX_MYSQLCLIENT}" = 1; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL client bool support" >&5
|
||||
$as_echo_n "checking for MySQL client bool support... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <mysql/mysql.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
bool test = 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define HAVE_MYSQLCLIENT_BOOL 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for MySQL client my_bool support" >&5
|
||||
$as_echo_n "checking for MySQL client my_bool support... " >&6; }
|
||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <mysql/mysql.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
my_bool test = 1;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
if ac_fn_c_try_link "$LINENO"; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
|
||||
$as_echo "#define HAVE_MYSQLCLIENT_MY_BOOL 1" >>confdefs.h
|
||||
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext \
|
||||
conftest$ac_exeext conftest.$ac_ext
|
||||
fi
|
||||
|
||||
|
||||
if test "x${PBX_NBS}" != "x1" -a "${USE_NBS}" != "no"; then
|
||||
pbxlibdir=""
|
||||
|
Reference in New Issue
Block a user