1use strict;
2use warnings;
3
4BEGIN {
5    use Config;
6    if ($Config{'useithreads'}) {
7        print("1..0 # SKIP Perl compiled with 'useithreads'\n");
8        exit(0);
9    }
10}
11
12use ExtUtils::testlib;
13
14sub ok {
15    my ($id, $ok, $name) = @_;
16
17    # You have to do it this way or VMS will get confused.
18    if ($ok) {
19        print("ok $id - $name\n");
20    } else {
21        print("not ok $id - $name\n");
22        printf("# Failed test at line %d\n", (caller)[2]);
23    }
24
25    return ($ok);
26}
27
28BEGIN {
29    $| = 1;
30    print("1..1\n");   ### Number of tests that will be run ###
31};
32
33eval 'use threads; 1';
34
35ok(1, (($@ =~ /not built to support thread/)?1:0), "No threads support");
36
37exit(0);
38
39# EOF
40