$OpenBSD: patch-Makefile_PL,v 1.4 2015/07/17 16:34:01 zhuk Exp $

remove MariaDB mysql_config invalid options

--- Makefile.PL.orig	Sat Nov 15 03:04:16 2014
+++ Makefile.PL	Thu Jan 22 00:26:27 2015
@@ -39,6 +39,12 @@ Getopt::Long::GetOptions(
 	"with-mysql=s"
     ) || die Usage();
 
+my %mysql_config_opts = map { $_ => 1 } (
+    "help",
+    "cflags",
+    "libs"
+    );
+
 my $source = {};
 
   #Check for mysql_config first
@@ -467,6 +473,7 @@ sub Configure {
     }
 
 # First try to get options values from mysql_config
+if (exists $mysql_config_opts{$param}) {
     my $command = $opt->{'mysql_config'} . " --$param";
     eval
     {
@@ -506,6 +513,7 @@ sub Configure {
     else {
         print "Can't find mysql_config. Use --mysql_config option to specify where mysql_config is located\n";
     }
+}
 
 # Ok, mysql_config doesn't work. We need to do our best
 # First check environment variables
