diff options
author | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2019-11-27 14:11:30 +0300 |
---|---|---|
committer | Michael Veksler <Mihails.Vekslers@zabbix.com> | 2019-11-27 14:11:30 +0300 |
commit | 30b0c52e64fa8d5110cb71fe87f13d4cb0d3f355 (patch) | |
tree | 1066b069ea4574e287735c40d4a90cf75798659c /m4 | |
parent | 72e8ce6fdf8eb1af0a5196a5c8192797848626fa (diff) |
....I..... [DEV-1343] m4 minor improvements
Diffstat (limited to 'm4')
-rw-r--r-- | m4/libopenssl.m4 | 2 | ||||
-rw-r--r-- | m4/pcre.m4 | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/m4/libopenssl.m4 b/m4/libopenssl.m4 index 2fe9c53ce20..8de602680c5 100644 --- a/m4/libopenssl.m4 +++ b/m4/libopenssl.m4 @@ -157,7 +157,7 @@ AC_HELP_STRING([--with-openssl@<:@=DIR@:>@],[use OpenSSL package @<:@default=no@ 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"` else - 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"` + 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 fd841a52725..f1609bdc50c 100644 --- a/m4/pcre.m4 +++ b/m4/pcre.m4 @@ -38,12 +38,13 @@ AC_HELP_STRING([--with-libpcre@<:@=DIR@:>@], [use libpcre from given base instal else withval="/usr" fi + else + _libpcre_dir_lib="$withval/lib" fi _libpcre_dir="$withval" - _libpcre_dir_lib="$withval/lib" test "x$withval" = "xyes" && withval=/usr LIBPCRE_CFLAGS="-I$withval/include" - LIBPCRE_LDFLAGS="-L$_libpcre_dir_lib" + LIBPCRE_LDFLAGS="-L$withval/lib" _libpcre_dir_set="yes" ] ) @@ -89,15 +90,15 @@ AC_HELP_STRING([--with-libpcre@<:@=DIR@:>@], [use libpcre from given base instal test "x$static_linking_support" = "xno" -a -z "$_libpcre_dir_lib" && AC_MSG_ERROR(["Compiler not support statically linked libs from default folders"]) - if test "x$_libpcre_dir" = "xyes" -o -z "$_libpcre_dir"; then + if test -z "$_libpcre_dir_lib"; then PKG_CHECK_EXISTS(libpcre,[ LIBPCRE_LIBS=`$PKG_CONFIG --static --libs libpcre` ],[ AC_MSG_ERROR([Not found libpcre package]) ]) else - AC_RUN_LOG([PKG_CONFIG_LIBDIR="$_libpcre_dir/lib/pkgconfig" $PKG_CONFIG --exists --print-errors libpcre]) || AC_MSG_ERROR(["Not found libpcre package in $_libpcre_dir/lib/pkgconfig"]) - LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir/lib/pkgconfig" $PKG_CONFIG --static --libs libpcre` + AC_RUN_LOG([PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --exists --print-errors libpcre]) || AC_MSG_ERROR(["Not found libpcre package in $_libpcre_dir/lib/pkgconfig"]) + LIBPCRE_LIBS=`PKG_CONFIG_LIBDIR="$_libpcre_dir_lib/pkgconfig" $PKG_CONFIG --static --libs libpcre` fi if test "x$static_linking_support" = "xno"; then |