$OpenBSD: patch-configure,v 1.19 2017/12/21 10:10:01 jsg Exp $
Index: configure
--- configure.orig
+++ configure
@@ -2024,22 +2024,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"
@@ -3929,16 +3913,15 @@ if test "$_vorbis" = auto ; then
 int main(void) { vorbis_packet_blocksize(0,0); return 0; }
 EOF
 	if test "$_ogg" = yes ; then
-		cc_check $OGG_CFLAGS $OGG_LIBS $VORBIS_CFLAGS $VORBIS_LIBS \
-			-lvorbisfile -lvorbis -logg && _vorbis=yes
+		cc_check `pkg-config --cflags --libs ogg vorbis vorbisfile` && _vorbis=yes
 	else
-		cc_check $VORBIS_CFLAGS $VORBIS_LIBS \
-			-lvorbisfile -lvorbis && _vorbis=yes
+		cc_check `pkg-config --cflags --libs vorbis vorbisfile` && _vorbis=yes
+		
 	fi
 fi
 if test "$_vorbis" = yes ; then
-	append_var LIBS "$VORBIS_LIBS -lvorbisfile -lvorbis"
-	append_var INCLUDES "$VORBIS_CFLAGS"
+	append_var LIBS "`pkg-config --libs vorbis vorbisfile`"
+	append_var LIBS "`pkg-config --cflags vorbis vorbisfile`"
 fi
 define_in_config_if_yes "$_vorbis" 'USE_VORBIS'
 echo "$_vorbis"
@@ -4002,16 +3985,14 @@ int main(void) {
 }
 EOF
 	if test "$_ogg" = 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
-	append_var LIBS "$FLAC_LIBS -lFLAC"
-	append_var INCLUDES "$FLAC_CFLAGS"
+	append_var LIBS "`pkg-config --libs flac`"
+	append_var INCLUDES "`pkg-config --cflags flac`"
 fi
 define_in_config_if_yes "$_flac" 'USE_FLAC'
 echo "$_flac"
