Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | Let makefile find libz and zlib.h by CFLAGS and LDFLAGS. |
| 2 | |
| 3 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 4 | Upstream-Status: Pending |
| 5 | --- |
| 6 | diff --git a/configure.ac b/configure.ac |
| 7 | index d1acc36..6f865b0 100644 |
| 8 | --- a/configure.ac |
| 9 | +++ b/configure.ac |
| 10 | @@ -62,7 +62,7 @@ AC_CHECK_PROG([RPM], rpm, rpm, [], [$PATH]) |
| 11 | AC_CHECK_PROG([SED], sed, sed, [], [$PATH]) |
| 12 | AC_CHECK_PROG([FIND], find, find, [], [$PATH]) |
| 13 | |
| 14 | -AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS -lz"])) |
| 15 | +AC_CHECK_HEADER(zlib.h, AC_CHECK_LIB(z, inflateInit_, [AC_DEFINE(HAVE_ZLIB_H, 1) LIBS="$LIBS $LDFLAGS -lz"])) |
| 16 | |
| 17 | dnl Find the default programs |
| 18 | if test "with_default" != no ; then |
| 19 | @@ -175,7 +175,7 @@ fi |
| 20 | |
| 21 | dnl ---Output variables... |
| 22 | |
| 23 | -HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS)" |
| 24 | +HOST_CFLAGS="$HOST_CFLAGS -O2 -Wall \$(HOST_CPPFLAGS) $CFLAGS" |
| 25 | |
| 26 | dnl TODO: figure out how to set these appropriately for compilers other than gcc |
| 27 | I386_CFLAGS="$I386_CFLAGS -Os -ffreestanding -Wall -W -Wno-format \$(I386_CPPFLAGS)" |
| 28 | -- |
| 29 | 1.7.10.4 |
| 30 | |