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

github.com/majn/telegram-purple.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conrad@kostecki.com>2020-09-26 23:42:49 +0300
committerBen Wiederhake <BenWiederhake.GitHub@gmx.de>2020-09-27 12:08:32 +0300
commitca9eb8617c7a00079d6abe2223102c080dd81302 (patch)
tree36f1cf5f4de0957651df36497324d7696ea4cc0c
parent57bcaa2844150267668887216b3f4e6cca4c0467 (diff)
m4_ax_check_zlib.m4: fix compilation with clang
If -L/usr/lib is being included, this will break compiling on 64-bit with clang. Signed-off-by: Conrad Kostecki <conrad@kostecki.com>
-rwxr-xr-xconfigure23
-rw-r--r--m4_ax_check_zlib.m418
2 files changed, 24 insertions, 17 deletions
diff --git a/configure b/configure
index 76f7845..fc647be 100755
--- a/configure
+++ b/configure
@@ -2261,7 +2261,7 @@ ac_config_headers="$ac_config_headers config.h"
# ===========================================================================
-# http://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
+# https://www.gnu.org/software/autoconf-archive/ax_check_zlib.html
# ===========================================================================
#
# SYNOPSIS
@@ -2284,10 +2284,10 @@ ac_config_headers="$ac_config_headers config.h"
# If both header file and library are found, shell commands
# 'action-if-found' is run. If 'action-if-found' is not specified, the
# default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
-# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
-# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
-# for this symbol in a config.h file. Sample usage in a C/C++ source is as
-# follows:
+# '-L${ZLIB_HOME}/lib' to LDFLAGS (BUT ONLY IF ZLIB_HOME IS NOT EXACTLY
+# "/usr"), prepends '-lz' to LIBS, and calls AC_DEFINE(HAVE_LIBZ).
+# You should use autoheader to include a definition for this symbol in a
+# config.h file. Sample usage in a C/C++ source is as follows:
#
# #ifdef HAVE_LIBZ
# #include <zlib.h>
@@ -2309,7 +2309,7 @@ ac_config_headers="$ac_config_headers config.h"
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
+# with this program. If not, see <https://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
@@ -2324,7 +2324,7 @@ ac_config_headers="$ac_config_headers config.h"
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 14
+#serial 16.0.0.1
# This is what autoupdate's m4 run will expand. It fires
# the warning (with _au_warn_XXX), outputs it into the
@@ -4079,10 +4079,11 @@ then
ZLIB_OLD_LDFLAGS=$LDFLAGS
ZLIB_OLD_CPPFLAGS=$CPPFLAGS
if test -n "${ZLIB_HOME}"; then
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ if test "${ZLIB_HOME}" != "/usr"; then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ fi
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
fi
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4152,7 +4153,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
#
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ if test "${ZLIB_HOME}" != "/usr"; then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ fi
LIBS="-lz $LIBS"
$as_echo "#define HAVE_LIBZ 1" >>confdefs.h
diff --git a/m4_ax_check_zlib.m4 b/m4_ax_check_zlib.m4
index 1a16843..9cde57d 100644
--- a/m4_ax_check_zlib.m4
+++ b/m4_ax_check_zlib.m4
@@ -22,10 +22,10 @@
# If both header file and library are found, shell commands
# 'action-if-found' is run. If 'action-if-found' is not specified, the
# default action appends '-I${ZLIB_HOME}/include' to CPFLAGS, appends
-# '-L$ZLIB_HOME}/lib' to LDFLAGS, prepends '-lz' to LIBS, and calls
-# AC_DEFINE(HAVE_LIBZ). You should use autoheader to include a definition
-# for this symbol in a config.h file. Sample usage in a C/C++ source is as
-# follows:
+# '-L${ZLIB_HOME}/lib' to LDFLAGS (BUT ONLY IF ZLIB_HOME IS NOT EXACTLY
+# "/usr"), prepends '-lz' to LIBS, and calls AC_DEFINE(HAVE_LIBZ).
+# You should use autoheader to include a definition for this symbol in a
+# config.h file. Sample usage in a C/C++ source is as follows:
#
# #ifdef HAVE_LIBZ
# #include <zlib.h>
@@ -62,7 +62,7 @@
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
-#serial 16
+#serial 16.0.0.1
AU_ALIAS([CHECK_ZLIB], [AX_CHECK_ZLIB])
AC_DEFUN([AX_CHECK_ZLIB],
@@ -105,7 +105,9 @@ then
ZLIB_OLD_LDFLAGS=$LDFLAGS
ZLIB_OLD_CPPFLAGS=$CPPFLAGS
if test -n "${ZLIB_HOME}"; then
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ if test "${ZLIB_HOME}" != "/usr"; then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ fi
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
fi
AC_LANG_PUSH([C])
@@ -119,7 +121,9 @@ then
#
m4_ifblank([$1],[
CPPFLAGS="$CPPFLAGS -I${ZLIB_HOME}/include"
- LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ if test "${ZLIB_HOME}" != "/usr"; then
+ LDFLAGS="$LDFLAGS -L${ZLIB_HOME}/lib"
+ fi
LIBS="-lz $LIBS"
AC_DEFINE([HAVE_LIBZ], [1],
[Define to 1 if you have `z' library (-lz)])