From 819850f97174631b1fd1a45671ff594aea961dee Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Wed, 6 Jun 2018 18:23:27 -0230 Subject: [PATCH] Fixed configure/Makefile to work without patches in OpenBSD. --- Changes.txt | 2 ++ Makefile | 4 ++-- configure | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Changes.txt b/Changes.txt index 7404c54f5..f41499110 100644 --- a/Changes.txt +++ b/Changes.txt @@ -24,6 +24,8 @@ * The Linux builds now use the system-installed PNG and ZLIB libraries by default. + * Fixed configure/build scripts to work natively under OpenBSD. + -Have fun! diff --git a/Makefile b/Makefile index 35a1e3606..6ab2430d9 100644 --- a/Makefile +++ b/Makefile @@ -147,7 +147,7 @@ CXX_UPDATE_DEP_FLAG = -Wp,-MMD,"$(*D)/$(DEPDIR)/$(*F).d2" .c.o: $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(CC) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o $(ECHO) "$(*D)/" > $(*D)/$(DEPDIR)/$(*F).d $(CAT) "$(*D)/$(DEPDIR)/$(*F).d2" >> "$(*D)/$(DEPDIR)/$(*F).d" $(RM) "$(*D)/$(DEPDIR)/$(*F).d2" @@ -162,7 +162,7 @@ else .c.o: $(MKDIR) $(*D)/$(DEPDIR) - $(CXX) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o + $(CC) $(CXX_UPDATE_DEP_FLAG) $(CXXFLAGS) $(CPPFLAGS) -c $(<) -o $*.o endif # Include the dependency tracking files. We add /dev/null at the end diff --git a/configure b/configure index 3d9f84fd3..2c9cbee93 100755 --- a/configure +++ b/configure @@ -578,7 +578,7 @@ if test "$_libpng" = auto ; then #include int main(void) { return printf("%s\n", PNG_HEADER_VERSION_STRING); } EOF - cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS -lpng && _libpng=yes + cc_check $LDFLAGS $CXXFLAGS $LIBPNG_CFLAGS $LIBPNG_LIBS `pkg-config --libs libpng` && _libpng=yes fi if test "$_libpng" = yes ; then _zlib=auto