Conditionally socksify the LIBS of Socket.
Jarkko Hietaniemi [Sun, 29 Aug 1999 16:38:58 +0000 (16:38 +0000)]
p4raw-id: //depot/cfgperl@4050

ext/Socket/Makefile.PL

index 3819143..339c45a 100644 (file)
@@ -1,7 +1,9 @@
 use ExtUtils::MakeMaker;
+use Config;
 WriteMakefile(
-    NAME       => 'Socket',
+    NAME        => 'Socket',
     VERSION_FROM => 'Socket.pm',
-    MAN3PODS   => {},  # Pods will be built by installman.
-    XSPROTOARG => '-noprototypes',             # XXX remove later?
+   ($Config{libs} =~ /(-lsocks\S*)/ ? (LIBS => [ "$1" ] ) : ()),
+    MAN3PODS    => {},         # Pods will be built by installman.
+    XSPROTOARG   => '-noprototypes',           # XXX remove later?
 );