Skip to content

Commit

Permalink
[configure] Propagate -DWITH_GZFILEOP to pkgconfig.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtl1979 authored and Dead2 committed Nov 8, 2023
1 parent 0560a3a commit 6592acc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ RCFLAGS=
RCOBJS=
STRIP=
ARCHS=
PC_CFLAGS=
prefix=${prefix-/usr/local}
exec_prefix=${exec_prefix-'${prefix}'}
bindir=${bindir-'${exec_prefix}/bin'}
Expand Down Expand Up @@ -2140,6 +2141,10 @@ if test -n "$EMU_RUN"; then
echo "Using cross-compile emulator: $EMU_RUN"
fi

if test $gzfileops -eq 1; then
PC_CFLAGS="-DWITH_GZFILEOP"
fi

# Generate Makefile in test dir
mkdir -p test
sed < $SRCDIR/test/Makefile.in "
Expand Down Expand Up @@ -2182,6 +2187,7 @@ sed < $SRCDIR/zlib.pc.in "
" | sed -e "
s/\@VERSION\@/$VER/g;
s/\@SUFFIX\@/$SUFFIX/g;
s/\@PKG_CONFIG_CFLAGS\@/$PC_CFLAGS/g;
" > ${LIBNAME2}.pc

# done
Expand Down
2 changes: 1 addition & 1 deletion zlib.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ Version: @VERSION@

Requires:
Libs: -L${libdir} -L${sharedlibdir} -lz@SUFFIX@
Cflags: -I${includedir}
Cflags: -I${includedir} @PKG_CONFIG_CFLAGS@

0 comments on commit 6592acc

Please sign in to comment.