Subject: | Changes to support DBD-mysql on VMS |
In order to make DBD-mysql work on VMS, I had to change the section where the DBI make variables are defined. On VMS, the "postamble" section appears below the place where the actual variables are used in the makefile, so "make" complains about undefined DBI variables.
Also, a change was necessary to the linker flags for VMS because the ones hardcoded in Makefile.PL are Unix-specific.
I tested this change on RedHat Linux and everything *seems* to work...
(see attachment: Patch for Makefile.PL)
diff -ru DBD-mysql-2.9004.orig/Makefile.PL DBD-mysql-2.9004/Makefile.PL
--- DBD-mysql-2.9004.orig/Makefile.PL Fri Oct 17 13:20:50 2003
+++ DBD-mysql-2.9004/Makefile.PL Wed Mar 23 14:32:57 2005
@@ -74,6 +74,9 @@
my $cflags = "-I\$(DBI_INSTARCH_DIR) $opt->{'cflags'}";
+if ($^O eq 'VMS') {
+ $cflags = "\$(DBI_INSTARCH_DIR),$opt->{'cflags'}";
+}
$cflags .= " -DDBD_MYSQL_WITH_SSL" if $opt->{'ssl'};
$cflags .= " -DDBD_NO_CLIENT_FOUND_ROWS" if $opt->{'nofoundrows'};
my %o = ( 'NAME' => 'DBD::mysql',
@@ -290,7 +293,7 @@
$path;
}
-sub postamble {
+sub macro {
require DBI::DBD;
"\n" . DBI::DBD::dbd_postamble(@_) . <<"POSTAMBLE";