From 4449d8e38053d55248b5c6485e6c5e442ac5ff1b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Wed, 12 Oct 2011 14:01:01 +0200 Subject: fix a compilation failure for perl Net::HandlerSocket module --- .../perl-Net-HandlerSocket/HandlerSocket.xs | 5 +++++ .../handler_socket/perl-Net-HandlerSocket/Makefile.PL | 18 ------------------ .../perl-Net-HandlerSocket/Makefile.PL.in | 18 ++++++++++++++++++ .../perl-Net-HandlerSocket/Makefile.PL.installed | 2 +- plugin/handler_socket/plug.in | 1 + 5 files changed, 25 insertions(+), 19 deletions(-) delete mode 100644 plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL create mode 100644 plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.in (limited to 'plugin') diff --git a/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs b/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs index 39f11e2780e..8e8d2520337 100644 --- a/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs +++ b/plugin/handler_socket/perl-Net-HandlerSocket/HandlerSocket.xs @@ -12,6 +12,11 @@ #include "ppport.h" +/* + below we'll include (indirectly) my_global.h, which defines + VERSION too. Undefine our VERSION here. +*/ +#undef VERSION #include "hstcpcli.hpp" #define DBG(x) diff --git a/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL b/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL deleted file mode 100644 index 50c329db4b6..00000000000 --- a/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL +++ /dev/null @@ -1,18 +0,0 @@ -# use 5.010000; -use ExtUtils::MakeMaker; -# See lib/ExtUtils/MakeMaker.pm for details of how to influence -# the contents of the Makefile that is written. -WriteMakefile( - NAME => 'Net::HandlerSocket', - VERSION_FROM => 'lib/Net/HandlerSocket.pm', # finds $VERSION - PREREQ_PM => {}, # e.g., Module::Name => 1.1 - ($] >= 5.005 ? ## Add these new keywords supported since 5.005 - (ABSTRACT_FROM => 'lib/Net/HandlerSocket.pm', # retrieve abstract from module - AUTHOR => 'higuchi dot akira at dena dot jp>') : ()), - CC => 'g++ -fPIC', - LD => 'g++ -fPIC', - LIBS => ['-L../libhsclient -L../libhsclient/.libs -lhsclient'], - DEFINE => '', - INC => '-I. -I../libhsclient', - OPTIMIZE => '-g -O3 -Wall -Wno-unused', -); diff --git a/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.in b/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.in new file mode 100644 index 00000000000..1a9b1444fb8 --- /dev/null +++ b/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.in @@ -0,0 +1,18 @@ +# use 5.010000; +use ExtUtils::MakeMaker; +# See lib/ExtUtils/MakeMaker.pm for details of how to influence +# the contents of the Makefile that is written. +WriteMakefile( + NAME => 'Net::HandlerSocket', + VERSION_FROM => 'lib/Net/HandlerSocket.pm', # finds $VERSION + PREREQ_PM => {}, # e.g., Module::Name => 1.1 + ($] >= 5.005 ? ## Add these new keywords supported since 5.005 + (ABSTRACT_FROM => 'lib/Net/HandlerSocket.pm', # retrieve abstract from module + AUTHOR => 'higuchi dot akira at dena dot jp>') : ()), + CC => 'g++ -fPIC', + LD => 'g++ -fPIC', + LIBS => ['-L@builddir@/../libhsclient -L@builddir@/../libhsclient/.libs -lhsclient'], + DEFINE => '', + INC => '-I. -I../libhsclient -I@builddir@/../libhsclient -I@top_builddir@/include', + OPTIMIZE => '-g -O3 -Wall -Wno-unused', +); diff --git a/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.installed b/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.installed index 1b7649498d2..0d01bceb819 100644 --- a/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.installed +++ b/plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL.installed @@ -13,7 +13,7 @@ WriteMakefile( LD => 'g++ -fPIC', LIBS => ['-lhsclient'], # e.g., '-lm' DEFINE => '', # e.g., '-DHAVE_SOMETHING' - INC => '-I. -I/usr/include/handlersocket', + INC => '-I. -I/usr/include/handlersocket -I/usr/include/mysql', OPTIMIZE => '-g -O3 -Wall -Wno-unused', # Un-comment this if you add C files to link with later: # OBJECT => '$(O_FILES)', # link all the C files too diff --git a/plugin/handler_socket/plug.in b/plugin/handler_socket/plug.in index 0a6c36ba39f..fd351dec98d 100644 --- a/plugin/handler_socket/plug.in +++ b/plugin/handler_socket/plug.in @@ -16,4 +16,5 @@ MYSQL_PLUGIN_ACTIONS(handlersocket, AC_SUBST(MYSQL_LIB) AC_SUBST(PLUGIN_DIR) AC_SUBST(HANDLERSOCKET_SUBDIRS) + AC_CONFIG_FILES(plugin/handler_socket/perl-Net-HandlerSocket/Makefile.PL) ]) -- cgit v1.2.1