From a85fe2913157fa7be811b1e3c6821b904735eff1 Mon Sep 17 00:00:00 2001
From: sezero <sezero@users.sourceforge.net>
Date: Fri, 13 Jan 2017 17:51:06 +0300
Subject: [PATCH] support nasm coff obj format for djgpp

---
 configure.ac            | 1 +
 src/libFLAC/ia32/nasm.h | 5 +++++
 2 files changed, 6 insertions(+)

diff --git a/configure.ac b/configure.ac
index 235d271..67e53cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,6 +163,7 @@ case "$host" in
 	*-*-cygwin|*mingw*) OBJ_FORMAT=win32 ;;
 	*-*-darwin*) OBJ_FORMAT=macho ;;
 	*emx*) OBJ_FORMAT=aout ;;
+	*djgpp) OBJ_FORMAT=coff ;;
 	*) OBJ_FORMAT=elf ;;
 esac
 AC_SUBST(OBJ_FORMAT)
diff --git a/src/libFLAC/ia32/nasm.h b/src/libFLAC/ia32/nasm.h
index ff479bf..7850cd2 100644
--- a/src/libFLAC/ia32/nasm.h
+++ b/src/libFLAC/ia32/nasm.h
@@ -46,6 +46,11 @@
 	%idefine code_section section .text
 	%idefine data_section section .data
 	%idefine bss_section  section .bss
+%elifdef OBJ_FORMAT_coff
+	%define FLAC__PUBLIC_NEEDS_UNDERSCORE
+	%idefine code_section section .text
+	%idefine data_section section .data
+	%idefine bss_section  section .bss
 %elifdef OBJ_FORMAT_macho
 	%define FLAC__PUBLIC_NEEDS_UNDERSCORE
 	%idefine code_section section .text
-- 
1.8.5.5

