]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix building resource files during out-of-tree build with configure
authorMika Lindqvist <postmaster@raasu.org>
Sat, 21 Jan 2023 23:04:55 +0000 (01:04 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 2 Feb 2023 16:34:12 +0000 (17:34 +0100)
Makefile.in
configure

index 88d40cb662faf0b5e262865c08650bd01408d675..aebd9a7b7093de40be1489fea506ebce190bdac5 100644 (file)
@@ -212,8 +212,8 @@ maketrees.o:
 makecrct.o:
        $(CC) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/tools/makecrct.c
 
-zlibrc.o: win32/zlib$(SUFFIX)1.rc
-       $(RC) $(RCFLAGS) -o $@ win32/zlib$(SUFFIX)1.rc
+zlibrc.o: $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
+       $(RC) $(RCFLAGS) -o $@ $(SRCDIR)/win32/zlib$(SUFFIX)1.rc
 
 .SUFFIXES: .lo
 
index fa751b84ff3530007e041d4b26bfd4974c40c28a..89b49a4384a67564e0956e979e96706737bf7458 100755 (executable)
--- a/configure
+++ b/configure
@@ -436,6 +436,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
           DEFFILE='win32/${LIBNAME2}.def'
         fi
         RC="${CROSS_PREFIX}windres"
+        RCFLAGS="-I ${BUILDDIR}"
         RCOBJS='zlibrc.o'
         STRIP="${CROSS_PREFIX}strip"
         EXE='.exe' ;;
@@ -460,6 +461,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
           DEFFILE='win32/${LIBNAME2}.def'
         fi
         RC="${CROSS_PREFIX}windres"
+        RCFLAGS="-I ${BUILDDIR}"
         RCOBJS='zlibrc.o'
         STRIP="${CROSS_PREFIX}strip"
         EXE='.exe' ;;
@@ -481,6 +483,7 @@ if test "$gcc" -eq 1 && ($cc $CFLAGS -c $test.c) >> configure.log 2>&1; then
           DEFFILE='win32/${LIBNAME2}.def'
         fi
         RC="${CROSS_PREFIX}windres"
+        RCFLAGS="-I ${BUILDDIR}"
         if [ "$CC" == "mingw32-gcc" ]; then
           case $ARCH in
           i386 | i486 | i586 | i686) RCFLAGS="${RCFLAGS} -F pe-i386";;