$OpenBSD: patch-configure,v 1.17 2016/06/05 10:47:25 jsg Exp $
--- configure.orig	Sun Jun  5 20:09:33 2016
+++ configure	Sun Jun  5 20:11:31 2016
@@ -1903,22 +1903,6 @@ if test "$_use_cxx11" = "yes" ; then
 fi
 echo $_use_cxx11
 
-# By default, we add -pedantic to the CXXFLAGS to catch some potentially
-# non-portable constructs, like use of GNU extensions.
-# However, some platforms use GNU extensions in system header files, so
-# for these we must not use -pedantic.
-case $_host_os in
-android | androidsdl | gamecube | psp | tizen | wii | webos)
-	;;
-*)
-	# ICC does not support pedantic, while GCC and clang do.
-	if test "$have_icc" = no ; then
-		# We *do* want the 'long long' extension.
-		append_var CXXFLAGS "-pedantic -Wno-long-long"
-	fi
-	;;
-esac
-
 # If possible, we want to use -Wglobal-constructors
 # However, not all compilers support that, so check whether the active one does.
 echocheck "whether -Wglobal-constructors work"
@@ -3738,18 +3722,16 @@ if test "$_flac" = auto ; then
 int main(void) { return FLAC__STREAM_SYNC_LEN >> 30; /* guaranteed to be 0 */ }
 EOF
 	if test "$_vorbis" = yes ; then
-		cc_check $FLAC_CFLAGS $FLAC_LIBS $OGG_CFLAGS $OGG_LIBS \
-			-lFLAC -logg && _flac=yes
+		cc_check `pkg-config --cflags --libs flac ogg` && _flac=yes
 	else
-		cc_check $FLAC_CFLAGS $FLAC_LIBS \
-			-lFLAC && _flac=yes
+		cc_check `pkg-config --cflags --libs flac` && _flac=yes
 	fi
 fi
 if test "$_flac" = yes ; then
 	if test "$_vorbis" = yes ; then
-		append_var LIBS "$FLAC_LIBS $OGG_LIBS -lFLAC -logg"
+		append_var LIBS "`pkg-config --libs flac ogg`"
 	else
-		append_var LIBS "$FLAC_LIBS -lFLAC"
+		append_var LIBS "`pkg-config --libs flac`"
 	fi
 	append_var INCLUDES "$FLAC_CFLAGS"
 fi
