Skip to content

Commit

Permalink
Revert "Don't delete SRCDIR/zconf.h when building out of tree"
Browse files Browse the repository at this point in the history
This reverts commit ff7c02c.
  • Loading branch information
Dead2 committed May 7, 2015
1 parent e2a04f3 commit 5119ebb
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 12 deletions.
9 changes: 4 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,9 @@ else
echo "Checking for strerror... No." | tee -a configure.log
fi

# We need to remove zconf.h from source directory if building outside of it
if [ "$SRCDIR" != "$BUILDDIR" ]; then rm -f $SRCDIR/zconf.h; fi

# copy clean zconf.h for subsequent edits
cp -p $SRCDIR/zconf.h.in zconf.h

Expand Down Expand Up @@ -462,10 +465,6 @@ if test $zprefix -eq 1; then
echo "Using z_ prefix on all symbols." | tee -a configure.log
fi

# take out the error path that makes sure an out of tree build doesn't touch the source tree's zconf.h
sed < zconf.h 's/#error.*//' > zconf.temp.h
mv zconf.temp.h zconf.h

# if --solo compilation was requested, save that in zconf.h and remove gz stuff from object lists
if test $solo -eq 1; then
sed '/#define ZCONF_H/a\
Expand Down Expand Up @@ -743,7 +742,7 @@ sed < $SRCDIR/Makefile.in "
mkdir -p $ARCHDIR

ARCHINCLUDES="-I$SRCDIR/$ARCHDIR -I$SRCDIR"
if [ "$SRCDIR" != "$BUILDDIR" ]; then ARCHINCLUDES="-I$BUILDDIR ${ARCHINCLUDES}"; fi
if [ "$SRCDIR" != "$BUILDDIR" ]; then ARCHINCLUDES="${ARCHINCLUDES} -I$BUILDDIR"; fi

sed < $SRCDIR/$ARCHDIR/Makefile.in "
/^CC *=/s#=.*#=$CC#
Expand Down
2 changes: 0 additions & 2 deletions zconf.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

/* @(#) $Id$ */

#error "Error: unprepared zconf.h included. Build system broken."

#ifndef ZCONF_H
#define ZCONF_H

Expand Down
2 changes: 0 additions & 2 deletions zconf.h.cmakein
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

/* @(#) $Id$ */

#error "Error: unprepared zconf.h included. Build system broken."

#ifndef ZCONF_H
#define ZCONF_H
#cmakedefine Z_PREFIX
Expand Down
2 changes: 0 additions & 2 deletions zconf.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

/* @(#) $Id$ */

#error "Error: unprepared zconf.h included. Build system broken."

#ifndef ZCONF_H
#define ZCONF_H

Expand Down
2 changes: 1 addition & 1 deletion zlib.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#ifndef ZLIB_H
#define ZLIB_H

#include <zconf.h>
#include "zconf.h"

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 5119ebb

Please sign in to comment.