summaryrefslogtreecommitdiff
path: root/ext/Time-HiRes/hints
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-02-09 20:08:32 +0000
committerNicholas Clark <nick@ccl4.org>2009-02-09 21:35:10 +0000
commit40d04ec4420d25128b37d6ff003091cb60690187 (patch)
tree200fadfdf62dc1664a5259f6139a76032b49d612 /ext/Time-HiRes/hints
parent9bdb6db8a6cfa255f88d433e5f38b0ef93f82bc7 (diff)
downloadperl-40d04ec4420d25128b37d6ff003091cb60690187.tar.gz
Rename ext/Time/HiRes to ext/Time-HiRes
Diffstat (limited to 'ext/Time-HiRes/hints')
-rw-r--r--ext/Time-HiRes/hints/aix.pl18
-rw-r--r--ext/Time-HiRes/hints/dec_osf.pl3
-rw-r--r--ext/Time-HiRes/hints/dynixptx.pl5
-rw-r--r--ext/Time-HiRes/hints/irix.pl6
-rw-r--r--ext/Time-HiRes/hints/linux.pl2
-rw-r--r--ext/Time-HiRes/hints/sco.pl4
-rw-r--r--ext/Time-HiRes/hints/solaris.pl10
-rw-r--r--ext/Time-HiRes/hints/svr4.pl4
8 files changed, 52 insertions, 0 deletions
diff --git a/ext/Time-HiRes/hints/aix.pl b/ext/Time-HiRes/hints/aix.pl
new file mode 100644
index 0000000000..bbb7fa8342
--- /dev/null
+++ b/ext/Time-HiRes/hints/aix.pl
@@ -0,0 +1,18 @@
+# Many AIX installations seem not to have the right PATH
+# for the C compiler. Steal the logic from Perl's hints/aix.sh.
+use Config;
+unless ($Config{gccversion}) {
+ my $cc = $Config{cc};
+ if (! -x $cc && -x "/usr/vac/bin/$cc") {
+ unless (":$ENV{PATH}:" =~ m{:/usr/vac/bin:}) {
+ die <<__EOE__;
+***
+*** You either implicitly or explicitly specified an IBM C compiler,
+*** but you do not seem to have one in /usr/bin, but you seem to have
+*** the VAC installed in /usr/vac, but you do not have the /usr/vac/bin
+*** in your PATH. I suggest adding that and retrying Makefile.PL.
+***
+__EOE__
+ }
+ }
+}
diff --git a/ext/Time-HiRes/hints/dec_osf.pl b/ext/Time-HiRes/hints/dec_osf.pl
new file mode 100644
index 0000000000..b19d149e70
--- /dev/null
+++ b/ext/Time-HiRes/hints/dec_osf.pl
@@ -0,0 +1,3 @@
+# needs to explicitly link against librt to pull in nanosleep
+$self->{LIBS} = ['-lrt'];
+
diff --git a/ext/Time-HiRes/hints/dynixptx.pl b/ext/Time-HiRes/hints/dynixptx.pl
new file mode 100644
index 0000000000..0a1e5db38f
--- /dev/null
+++ b/ext/Time-HiRes/hints/dynixptx.pl
@@ -0,0 +1,5 @@
+# uname -v
+# V4.5.2
+# needs to explicitly link against libc to pull in usleep
+$self->{LIBS} = ['-lc'];
+
diff --git a/ext/Time-HiRes/hints/irix.pl b/ext/Time-HiRes/hints/irix.pl
new file mode 100644
index 0000000000..83d98bcab6
--- /dev/null
+++ b/ext/Time-HiRes/hints/irix.pl
@@ -0,0 +1,6 @@
+use Config;
+if ($Config{osvers} == 5) {
+ $self->{CCFLAGS} = $Config{ccflags};
+ $self->{CCFLAGS} =~ s/-ansiposix //;
+ $self->{CCFLAGS} =~ s/-D_POSIX_SOURCE /-D_POSIX_4SOURCE /;
+}
diff --git a/ext/Time-HiRes/hints/linux.pl b/ext/Time-HiRes/hints/linux.pl
new file mode 100644
index 0000000000..84ce5221b1
--- /dev/null
+++ b/ext/Time-HiRes/hints/linux.pl
@@ -0,0 +1,2 @@
+# needs to explicitly link against librt to pull in clock_nanosleep
+$self->{LIBS} = ['-lrt'];
diff --git a/ext/Time-HiRes/hints/sco.pl b/ext/Time-HiRes/hints/sco.pl
new file mode 100644
index 0000000000..22f2764347
--- /dev/null
+++ b/ext/Time-HiRes/hints/sco.pl
@@ -0,0 +1,4 @@
+# osr5 needs to explicitly link against libc to pull in usleep
+# what's the reason for -lm?
+$self->{LIBS} = ['-lm', '-lc'];
+
diff --git a/ext/Time-HiRes/hints/solaris.pl b/ext/Time-HiRes/hints/solaris.pl
new file mode 100644
index 0000000000..6cc80e7bc5
--- /dev/null
+++ b/ext/Time-HiRes/hints/solaris.pl
@@ -0,0 +1,10 @@
+# 2.6 has nanosleep in -lposix4, after that it's in -lrt
+my $r = `/usr/bin/uname -r`;
+chomp($r);
+if (substr($r, 2) <= 6) {
+ $self->{LIBS} = ['-lposix4'];
+} else {
+ $self->{LIBS} = ['-lrt'];
+}
+
+
diff --git a/ext/Time-HiRes/hints/svr4.pl b/ext/Time-HiRes/hints/svr4.pl
new file mode 100644
index 0000000000..75128724f2
--- /dev/null
+++ b/ext/Time-HiRes/hints/svr4.pl
@@ -0,0 +1,4 @@
+# NCR MP-RAS needs to explicitly link against libc to pull in usleep
+# what's the reason for -lm?
+$self->{LIBS} = ['-lm', '-lc'];
+