2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-09-01 06:45:10 +00:00

Fix building the builtin zlib from a build dir.

When a zlib dir was specified, prepend its include path instead of
appending so we get the right zlib headers.
This commit is contained in:
Todd C. Miller
2012-03-29 10:32:29 -04:00
parent af0f5cb62e
commit 8393ec0501
2 changed files with 6 additions and 4 deletions

4
configure vendored
View File

@@ -17963,7 +17963,7 @@ fi
*) *)
$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
CPPFLAGS="${CPPFLAGS} -I${enable_zlib}/include" CPPFLAGS="-I${enable_zlib}/include ${CPPFLAGS}"
if test X"$with_rpath" = X"yes"; then if test X"$with_rpath" = X"yes"; then
case "$host" in case "$host" in
@@ -17985,7 +17985,7 @@ esac
if test X"$enable_zlib" = X"builtin"; then if test X"$enable_zlib" = X"builtin"; then
$as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h $as_echo "#define HAVE_ZLIB_H 1" >>confdefs.h
CPPFLAGS="${CPPFLAGS}"' -I$(top_srcdir)/zlib' CPPFLAGS='-I$(top_builddir)/zlib -I$(top_srcdir)/zlib '"${CPPFLAGS}"
ZLIB="${ZLIB}"' $(top_builddir)/zlib/libz.la' ZLIB="${ZLIB}"' $(top_builddir)/zlib/libz.la'
ZLIB_SRC=zlib ZLIB_SRC=zlib
ac_config_headers="$ac_config_headers zlib/zconf.h" ac_config_headers="$ac_config_headers zlib/zconf.h"

View File

@@ -2436,6 +2436,8 @@ fi
dnl dnl
dnl Deferred zlib option processing. dnl Deferred zlib option processing.
dnl By default we use the system zlib if it is present. dnl By default we use the system zlib if it is present.
dnl If a directory was specified for zlib (or we are use sudo's version),
dnl prepend the include dir to make sure we get the right zlib header.
dnl dnl
case "$enable_zlib" in case "$enable_zlib" in
yes) yes)
@@ -2454,14 +2456,14 @@ case "$enable_zlib" in
;; ;;
*) *)
AC_DEFINE(HAVE_ZLIB_H) AC_DEFINE(HAVE_ZLIB_H)
CPPFLAGS="${CPPFLAGS} -I${enable_zlib}/include" CPPFLAGS="-I${enable_zlib}/include ${CPPFLAGS}"
SUDO_APPEND_LIBPATH(ZLIB, [$enable_zlib/lib]) SUDO_APPEND_LIBPATH(ZLIB, [$enable_zlib/lib])
ZLIB="${ZLIB} -lz" ZLIB="${ZLIB} -lz"
;; ;;
esac esac
if test X"$enable_zlib" = X"builtin"; then if test X"$enable_zlib" = X"builtin"; then
AC_DEFINE(HAVE_ZLIB_H) AC_DEFINE(HAVE_ZLIB_H)
CPPFLAGS="${CPPFLAGS}"' -I$(top_srcdir)/zlib' CPPFLAGS='-I$(top_builddir)/zlib -I$(top_srcdir)/zlib '"${CPPFLAGS}"
ZLIB="${ZLIB}"' $(top_builddir)/zlib/libz.la' ZLIB="${ZLIB}"' $(top_builddir)/zlib/libz.la'
ZLIB_SRC=zlib ZLIB_SRC=zlib
AC_CONFIG_HEADER([zlib/zconf.h]) AC_CONFIG_HEADER([zlib/zconf.h])