Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zabbix/zabbix.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorMichael Veksler <Mihails.Vekslers@zabbix.com>2019-11-26 20:43:04 +0300
committerMichael Veksler <Mihails.Vekslers@zabbix.com>2019-11-26 20:43:04 +0300
commit72e8ce6fdf8eb1af0a5196a5c8192797848626fa (patch)
treed4b8db594346ed5302f27e8f51dbb8b57d406601 /m4
parentfc306f7f0ea49955a2bf000f3c003279c05a1b6e (diff)
....I..... [DEV-1343] m4 AIX improvements
Diffstat (limited to 'm4')
-rw-r--r--m4/iconv.m48
-rw-r--r--m4/ldap.m422
-rw-r--r--m4/libcurl.m48
-rw-r--r--m4/libopenssl.m414
-rw-r--r--m4/pcre.m412
5 files changed, 24 insertions, 40 deletions
diff --git a/m4/iconv.m4 b/m4/iconv.m4
index 0b06254a1db..a83c06e276c 100644
--- a/m4/iconv.m4
+++ b/m4/iconv.m4
@@ -98,14 +98,10 @@ AC_HELP_STRING([--with-iconv@<:@=DIR@:>@], [use iconv from given base install di
if test "x$enable_static_libs" = "xyes"; then
test "x$static_linking_support" = "xno" -a -z "$_iconv_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
- if test "x$static_linking_support" = "xno" -a "x$ARCH" = "xaix"; then
- ICONV_LIBS="$_iconv_dir_lib/libiconv_a"
- elif test "x$static_linking_support" = "xno"; then
+ if test "x$static_linking_support" = "xno"; then
ICONV_LIBS="$_iconv_dir_lib/libiconv.a"
- elif test "x$ARCH" = "xaix"; then
- ICONV_LIBS="-Wl,-Bstatic -liconv_a -Wl,-Bdynamic"
else
- ICONV_LIBS="-Wl,-Bstatic $ICONV_LIBS -Wl,-Bdynamic"
+ ICONV_LIBS="${static_linking_support}static $ICONV_LIBS ${static_linking_support}dynamic"
fi
fi
LIBS="$LIBS $ICONV_LIBS"
diff --git a/m4/ldap.m4 b/m4/ldap.m4
index 52059f36de6..051429be882 100644
--- a/m4/ldap.m4
+++ b/m4/ldap.m4
@@ -119,9 +119,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
AC_MSG_CHECKING([compatibility of static LDAP libs])
test "x$static_linking_support" = "xno" -a -z "$_ldap_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
- if test "x$static_linking_support" = "xno" -a "x$ARCH" = "xaix"; then
- LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap_a|g"|sed "s|-llber|$_ldap_dir_lib/liblber_a|g"`
- elif test "x$static_linking_support" = "xno"; then
+ if test "x$static_linking_support" = "xno"; then
LDAP_LIBS=`echo "$LDAP_LIBS"|sed "s|-lldap|$_ldap_dir_lib/libldap.a|g"|sed "s|-llber|$_ldap_dir_lib/liblber.a|g"`
fi
@@ -129,7 +127,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl2"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic -lpthread -lsasl2"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl2"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
@@ -141,7 +139,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lpthread -lsasl"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic -lpthread -lsasl"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lpthread -lsasl"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
@@ -154,7 +152,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lgnutls -lsasl2 -lgssapi_krb5 -lpthread"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
@@ -167,7 +165,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
else
- OSSL_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -lsasl2 -Wl,-Bdynamic $OPENSSL_LIBS"
+ OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic $OPENSSL_LIBS"
fi
OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
@@ -183,7 +181,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl2"
else
- OSSL_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic $OPENSSL_LIBS -lsasl2"
+ OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl2"
fi
OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
@@ -199,7 +197,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
OSSL_LDAP_LIBS="$LDAP_LIBS $OPENSSL_LIBS -lsasl"
else
- OSSL_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic $OPENSSL_LIBS -lsasl"
+ OSSL_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic $OPENSSL_LIBS -lsasl"
fi
OSSL_LDAP_CPPFLAGS="$LDAP_CPPFLAGS $OPENSSL_CPPFLAGS"
OSSL_LDAP_CFLAGS="$LDAP_CPPFLAGS $OPENSSL_CFLAGS"
@@ -217,7 +215,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -lsasl2 -Wl,-Bdynamic -lssl -lcrypto"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS -lsasl2 ${static_linking_support}dynamic -lssl -lcrypto"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
@@ -230,7 +228,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl2 -lcrypto"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic -lssl -lsasl2 -lcrypto"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl2 -lcrypto"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
@@ -243,7 +241,7 @@ AC_HELP_STRING([--with-ldap@<:@=DIR@:>@],[Include LDAP support @<:@default=no@:>
if test "x$static_linking_support" = "xno"; then
TRY_LDAP_LIBS="$LDAP_LIBS -lssl -lsasl -lcrypto"
else
- TRY_LDAP_LIBS="-Wl,-Bstatic $LDAP_LIBS -Wl,-Bdynamic -lssl -lsasl -lcrypto"
+ TRY_LDAP_LIBS="${static_linking_support}static $LDAP_LIBS ${static_linking_support}dynamic -lssl -lsasl -lcrypto"
fi
LIBLDAP_TRY_LINK([$TRY_LDAP_LIBS], [$LDAP_LDFLAGS], [$LDAP_CPPFLAGS], ,[
LDAP_LIBS=$TRY_LDAP_LIBS
diff --git a/m4/libcurl.m4 b/m4/libcurl.m4
index a6e383e5e0a..576e5a15041 100644
--- a/m4/libcurl.m4
+++ b/m4/libcurl.m4
@@ -126,7 +126,7 @@ AC_HELP_STRING([--with-libcurl@<:@=DIR@:>@],[use cURL package @<:@default=no@:>@
if test "x$enable_static_libs" = "xyes" -a "x$static_linking_support" = "xno"; then
i="$_curl_dir_lib/libcurl.a"
elif test "x$enable_static_libs" = "xyes"; then
- i="-Wl,-Bstatic $i -Wl,-Bdynamic"
+ i="${static_linking_support}static $i ${static_linking_support}dynamic"
fi
LIBCURL_LIBS="$LIBCURL_LIBS $i"
;;
@@ -179,12 +179,6 @@ AC_HELP_STRING([--with-libcurl@<:@=DIR@:>@],[use cURL package @<:@default=no@:>@
-lldap|-lldap_r|-llber)
test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
;;
- -lssl_a|-lcrypto_a)
- test "x$want_openssl" = "xyes" && i="$OPENSSL_LIBS"
- ;;
- -lldap_a|-lldap_r_a|-llber_a)
- test "x$want_ldap" = "xyes" && i="$LDAP_LIBS"
- ;;
-l*)
test -f "$_curl_dir_lib/lib$_lib_name.a" && i="$_curl_dir_lib/lib$_lib_name.a"
;;
diff --git a/m4/libopenssl.m4 b/m4/libopenssl.m4
index df512fb2ca2..2fe9c53ce20 100644
--- a/m4/libopenssl.m4
+++ b/m4/libopenssl.m4
@@ -99,7 +99,7 @@ AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[use OpenSSL package @<:@default=no@
test "x$static_linking_support" = "xno" -a -z "$_libopenssl_dir_lib" && AC_MSG_ERROR(["OpenSSL: Compiler not support statically linked libs from default folders"])
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
PKG_PROG_PKG_CONFIG()
- test -z $PKG_CONFIG && AC_MSG_ERROR([Not found pkg-config library])
+ test -z "$PKG_CONFIG" -a -z "$_libopenssl_dir_lib" && AC_MSG_ERROR([Not found pkg-config library])
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
fi
@@ -140,7 +140,9 @@ AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[use OpenSSL package @<:@default=no@
am_save_ldflags="$LDFLAGS"
am_save_libs="$LIBS"
- if test "x$enable_static_libs" = "xyes"; then
+ if test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
+ OPENSSL_LIBS="$_libopenssl_dir_lib/libssl.a $_libopenssl_dir_lib/libcrypto.a"
+ elif test "x$enable_static_libs" = "xyes"; then
if test "x$_libopenssl_dir" = "xno" -o -z "$_libopenssl_dir"; then
PKG_CHECK_EXISTS(openssl,[
OPENSSL_LIBS=`$PKG_CONFIG --static --libs openssl`
@@ -152,14 +154,10 @@ AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[use OpenSSL package @<:@default=no@
OPENSSL_LIBS=`PKG_CONFIG_LIBDIR="$_libopenssl_dir/lib/pkgconfig" $PKG_CONFIG --static --libs openssl`
fi
- if test "x$static_linking_support" = "xno" -a "x$ARCH" = "xaix"; then
- OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s|-lssl_a|$_libopenssl_dir_lib/ssl_a|g"|sed "s|-lcrypto_a|$_libopenssl_dir_lib/crypto_a|g"`
- elif test "x$static_linking_support" = "xno"; then
+ if test "x$static_linking_support" = "xno"; then
OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s|-lssl|$_libopenssl_dir_lib/libssl.a|g"|sed "s|-lcrypto|$_libopenssl_dir_lib/libcrypto.a|g"`
- elif test "x$ARCH" = "xaix"; then
- OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed 's/-lssl_a/-Wl,-Bstatic -lssl_a -Wl,-Bdynamic/g'|sed 's/-lcrypto_a/-Wl,-Bstatic -lcrypto_a -Wl,-Bdynamic/g'`
else
- OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed 's/-lssl/-Wl,-Bstatic -lssl -Wl,-Bdynamic/g'|sed 's/-lcrypto/-Wl,-Bstatic -lcrypto -Wl,-Bdynamic/g'`
+ OPENSSL_LIBS=`echo "$OPENSSL_LIBS"|sed "s/-lssl/${static_linking_support}static -lssl ${static_linking_support}dynamic/g'|sed 's/-lcrypto/${static_linking_support}static -lcrypto ${static_linking_support}dynamic/g"`
fi
fi
diff --git a/m4/pcre.m4 b/m4/pcre.m4
index ff3119a729a..fd841a52725 100644
--- a/m4/pcre.m4
+++ b/m4/pcre.m4
@@ -73,7 +73,7 @@ AC_HELP_STRING([--with-libpcre@<:@=DIR@:>@], [use libpcre from given base instal
if test "x$enable_static_libs" = "xyes"; then
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
PKG_PROG_PKG_CONFIG()
- test -z $PKG_CONFIG && AC_MSG_ERROR([Not found pkg-config library])
+ test -z "$PKG_CONFIG" -a -z "$_libpcre_dir_lib" && AC_MSG_ERROR([Not found pkg-config library])
m4_pattern_allow([^PKG_CONFIG_LIBDIR$])
fi
@@ -83,6 +83,8 @@ AC_HELP_STRING([--with-libpcre@<:@=DIR@:>@], [use libpcre from given base instal
if test "x$enable_static" = "xyes"; then
LIBPCRE_LIBS=" $LIBPCRE_LIBS -lpthread"
+ elif test "x$enable_static_libs" = "xyes" -a -z "$PKG_CONFIG"; then
+ LIBPCRE_LIBS="$_libpcre_dir_lib/libpcre.a"
elif test "x$enable_static_libs" = "xyes"; then
test "x$static_linking_support" = "xno" -a -z "$_libpcre_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"])
@@ -98,14 +100,10 @@ AC_HELP_STRING([--with-libpcre@<:@=DIR@:>@], [use libpcre from given base instal
LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir/lib/pkgconfig" $PKG_CONFIG --static --libs libpcre`
fi
- if test "x$static_linking_support" = "xno" -a "x$ARCH" = "xaix"; then
- LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s|-lpcre_a|$_libpcre_dir_lib/libpcre_a|g"`
- elif test "x$static_linking_support" = "xno"; then
+ if test "x$static_linking_support" = "xno"; then
LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s|-lpcre|$_libpcre_dir_lib/libpcre.a|g"`
- elif test "x$ARCH" = "xaix"; then
- LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed 's/-lpcre_a/-Wl,-Bstatic -lpcre_a -Wl,-Bdynamic/g'`
else
- LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed 's/-lpcre/-Wl,-Bstatic -lpcre -Wl,-Bdynamic/g'`
+ LIBPCRE_LIBS=`echo "$LIBPCRE_LIBS"|sed "s/-lpcre/${static_linking_support}static -lpcre ${static_linking_support}dynamic/g"`
fi
fi