Skip to content

Commit

Permalink
.......... [DEV-2241] run autoupdate on m4 files
Browse files Browse the repository at this point in the history
  • Loading branch information
arimdjonokszabbix committed Aug 10, 2022
1 parent 83a76a1 commit d41d1d1
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 165 deletions.
64 changes: 22 additions & 42 deletions m4/ax_lib_mysql.m4
Original file line number Diff line number Diff line change
Expand Up @@ -49,49 +49,39 @@
AC_DEFUN([LIBMYSQL_OPTIONS_TRY],
[
AC_MSG_CHECKING([for MySQL init options function])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
],
[
]], [[
MYSQL *mysql;
mysql_options(mysql, MYSQL_INIT_COMMAND, "set @@session.auto_increment_offset=1");
],
AC_DEFINE_UNQUOTED([MYSQL_OPTIONS], [mysql_options], [Define mysql options])
AC_DEFINE_UNQUOTED([MYSQL_OPTIONS_ARGS_VOID_CAST], [], [Define void cast for mysql options args])
]])],[AC_DEFINE_UNQUOTED(MYSQL_OPTIONS, mysql_options, Define mysql options)
AC_DEFINE_UNQUOTED(MYSQL_OPTIONS_ARGS_VOID_CAST, , Define void cast for mysql options args)
found_mysql_options="yes"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
])

AC_DEFUN([LIBMARIADB_OPTIONS_TRY],
[
AC_MSG_CHECKING([for MariaDB init options function])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
],
[
]], [[
MYSQL *mysql;
mysql_optionsv(mysql, MYSQL_INIT_COMMAND, (void *)"set @@session.auto_increment_offset=1");
],
AC_DEFINE_UNQUOTED([MYSQL_OPTIONS], [mysql_optionsv], [Define mysql options])
AC_DEFINE_UNQUOTED([MYSQL_OPTIONS_ARGS_VOID_CAST], [(void *)], [Define void cast for mysql options args])
]])],[AC_DEFINE_UNQUOTED(MYSQL_OPTIONS, mysql_optionsv, Define mysql options)
AC_DEFINE_UNQUOTED(MYSQL_OPTIONS_ARGS_VOID_CAST, (void *), Define void cast for mysql options args)
found_mariadb_options="yes"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
])

AC_DEFUN([LIBMYSQL_TLS_TRY_LINK],
[
AC_MSG_CHECKING([for TLS support in MySQL library])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
],
[
]], [[
unsigned int mysql_tls_mode;
MYSQL *mysql;
Expand All @@ -108,38 +98,30 @@ AC_DEFUN([LIBMYSQL_TLS_TRY_LINK],
mysql_options(mysql, MYSQL_OPT_SSL_KEY, "");
mysql_options(mysql, MYSQL_OPT_SSL_CERT, "");
mysql_options(mysql, MYSQL_OPT_SSL_CIPHER, "");
],
AC_DEFINE([HAVE_MYSQL_TLS], [1], [Define to 1 if TLS is supported in MySQL library])
]])],[AC_DEFINE(HAVE_MYSQL_TLS, 1, Define to 1 if TLS is supported in MySQL library)
found_mysql_tls="yes"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
])

AC_DEFUN([LIBMYSQL_TLS_CIPHERS_TRY_LINK],
[
AC_MSG_CHECKING([for TLS ciphersuites in MySQL library])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
],
[
]], [[
MYSQL *mysql;
mysql_options(mysql, MYSQL_OPT_TLS_CIPHERSUITES, "");
],
AC_DEFINE([HAVE_MYSQL_TLS_CIPHERSUITES], [1], [Define to 1 if TLS ciphersuites are supported in MySQL library])
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
]])],[AC_DEFINE(HAVE_MYSQL_TLS_CIPHERSUITES, 1, Define to 1 if TLS ciphersuites are supported in MySQL library)
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
])

AC_DEFUN([LIBMARIADB_TLS_TRY_LINK],
[
AC_MSG_CHECKING([for TLS support in MariaDB library])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <mysql.h>
],
[
]], [[
MYSQL *mysql;
mysql_optionsv(mysql, MYSQL_OPT_SSL_ENFORCE, (void *)"");
Expand All @@ -148,11 +130,9 @@ AC_DEFUN([LIBMARIADB_TLS_TRY_LINK],
mysql_optionsv(mysql, MYSQL_OPT_SSL_KEY, (void *)"");
mysql_optionsv(mysql, MYSQL_OPT_SSL_CERT, (void *)"");
mysql_optionsv(mysql, MYSQL_OPT_SSL_CIPHER, (void *)"");
],
AC_DEFINE([HAVE_MARIADB_TLS], [1], [Define to 1 if TLS is supported in MariaDB library])
]])],[AC_DEFINE(HAVE_MARIADB_TLS, 1, Define to 1 if TLS is supported in MariaDB library)
found_mariadb_tls="yes"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
])

AC_DEFUN([AX_LIB_MYSQL],
Expand Down
12 changes: 4 additions & 8 deletions m4/ax_lib_postgresql.m4
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,14 @@ AC_DEFUN([AX_LIB_POSTGRESQL],
LIBS="${LIBS} ${POSTGRESQL_LIBS}"
AC_MSG_CHECKING([for PostgreSQL libraries])
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <libpq-fe.h>
],
[
]], [[
PGconn *conn;
conn = PQsetdbLogin(NULL, NULL, NULL, NULL, NULL, NULL, NULL);
],
AC_DEFINE([HAVE_POSTGRESQL], [1], [Define to 1 if PostgreSQL libraries are available])
]])],[AC_DEFINE(HAVE_POSTGRESQL, 1, Define to 1 if PostgreSQL libraries are available)
found_postgresql="yes"
AC_MSG_RESULT(yes),
AC_MSG_RESULT(no))
AC_MSG_RESULT(yes)],[AC_MSG_RESULT(no)])
CFLAGS="${_save_postgresql_cflags}"
LDFLAGS="${_save_postgresql_ldflags}"
Expand Down
9 changes: 3 additions & 6 deletions m4/iconv.m4
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,14 @@
AC_DEFUN([LIBICONV_TRY_LINK],
[
found_iconv=$1
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <iconv.h>
],
[
]], [[
iconv_t cd = iconv_open("","");
iconv(cd, NULL, NULL, NULL, NULL);
iconv_close(cd);
],
found_iconv="yes")
]])],[found_iconv="yes"],[])
])dnl

AC_DEFUN([LIBICONV_CHECK_CONFIG],
Expand Down
8 changes: 4 additions & 4 deletions m4/ldap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@ CPPFLAGS="$CPPFLAGS $3"
CFLAGS="$CFLAGS $4"
ldap_link="no"
AC_TRY_LINK([
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdio.h>
#include <ldap.h>
#include <lber.h>
#include <ldap_schema.h>
],[
]], [[
printf("%p,%p", ldap_initialize, ldap_str2attributetype);
printf("%p", ber_free);
return 0;
],[
]])],[
ldap_link="yes"
])
],[])
CPPFLAGS="$_save_ldap_cppflags"
CFLAGS="$_save_ldap_cflags"
Expand Down
9 changes: 3 additions & 6 deletions m4/libevent.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,12 @@

AC_DEFUN([LIBEVENT_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <stdlib.h>
#include <event.h>
],
[
]], [[
event_init();
],
found_libevent="yes")
]])],[found_libevent="yes"],[])
])dnl

AC_DEFUN([LIBEVENT_CHECK_CONFIG],
Expand Down
9 changes: 3 additions & 6 deletions m4/libgnutls.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,11 @@

AC_DEFUN([LIBGNUTLS_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <gnutls/gnutls.h>
],
[
]], [[
gnutls_global_init();
],
found_gnutls="yes",)
]])],[found_gnutls="yes"],[])
])dnl

AC_DEFUN([LIBGNUTLS_ACCEPT_VERSION],
Expand Down
18 changes: 6 additions & 12 deletions m4/libmodbus.m4
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,24 @@

AC_DEFUN([LIBMODBUS30_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include "modbus.h"
],
[
]], [[
modbus_t *mdb_ctx;
mdb_ctx = modbus_new_tcp("127.0.0.1", 502);
modbus_set_response_timeout(mdb_ctx, NULL);
],
found_libmodbus="30",)
]])],[found_libmodbus="30"],[])
])dnl

AC_DEFUN([LIBMODBUS31_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include "modbus.h"
],
[
]], [[
modbus_t *mdb_ctx;
mdb_ctx = modbus_new_tcp("127.0.0.1", 502);
modbus_set_response_timeout(mdb_ctx, 1, 0)
],
found_libmodbus="31",)
]])],[found_libmodbus="31"],[])
])dnl

AC_DEFUN([LIBMODBUS_ACCEPT_VERSION],
Expand Down
18 changes: 6 additions & 12 deletions m4/libopenssl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,29 @@

AC_DEFUN([LIBOPENSSL_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/ssl.h>
#include <openssl/bio.h>
],
[
]], [[
/* check that both libssl and libcrypto are available */
SSL *ssl = NULL;
SSL_connect(ssl); /* a function from libssl, present in both OpenSSL 1.0.1 and 1.1.0 */
BIO_new(BIO_s_mem()); /* a function from libcrypto */
],
found_openssl="yes",)
]])],[found_openssl="yes"],[])
])dnl

AC_DEFUN([LIBOPENSSL_TRY_LINK_PSK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <openssl/ssl.h>
],
[
]], [[
/* check if OPENSSL_NO_PSK is defined */
#ifdef OPENSSL_NO_PSK
# error "OPENSSL_NO_PSK is defined. PSK support will not be available."
#endif
],
found_openssl_with_psk="yes",)
]])],[found_openssl_with_psk="yes"],[])
])dnl

AC_DEFUN([LIBOPENSSL_ACCEPT_VERSION],
Expand Down
9 changes: 3 additions & 6 deletions m4/libssh.m4
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@

AC_DEFUN([LIBSSH_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <libssh/libssh.h>
],
[
]], [[
ssh_session my_ssh_session;
my_ssh_session = ssh_new();
],
found_ssh="yes",)
]])],[found_ssh="yes"],[])
])dnl

AC_DEFUN([LIBSSH_ACCEPT_VERSION],
Expand Down
9 changes: 3 additions & 6 deletions m4/libssh2.m4
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@

AC_DEFUN([LIBSSH2_TRY_LINK],
[
AC_TRY_LINK(
[
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
#include <libssh2.h>
],
[
]], [[
LIBSSH2_SESSION *session;
session = libssh2_session_init();
],
found_ssh2="yes",)
]])],[found_ssh2="yes"],[])
])dnl

AC_DEFUN([LIBSSH2_ACCEPT_VERSION],
Expand Down
Loading

0 comments on commit d41d1d1

Please sign in to comment.