1#!/usr/local/bin/perl -w
2#
3# Makefile.PL
4#
5# $Id: Makefile.PL,v 1.1 2003/02/02 16:31:22 awolf Exp $
6# $Revision: 1.1 $
7# $Author: awolf $
8# $Date: 2003/02/02 16:31:22 $
9#
10######################################################################
11
12use strict;
13
14use ExtUtils::MakeMaker;
15
16my $NAME     = 'DNS-Zone';
17my $VERSION  = '0.85';
18
19#--- Prototypes ---#
20sub check_makefile_exists( );
21
22#--------------------------------------------#
23
24die "Exiting due to existing makefile..." if check_makefile_exists();
25
26WriteMakefile(
27	'NAME'      => $NAME,
28	'VERSION'   => $VERSION,
29	'DISTNAME'  => $NAME,
30	($] >= 5.005 ? (
31		AUTHOR    => 'Andy Wolf <zonemaster@users.sourceforge.net>',
32		ABSTRACT  => 'Generic zone with specific file adaptors'
33	) : ()),
34	'MAN3PODS' => { }
35);
36
37exit 0;
38
39#--- Check for existing Makefile ---#
40sub check_makefile_exists( ) {
41	my $answer = 0;
42
43	if (-e 'Makefile') {
44		warn <<END;
45There is already a Makefile.  To avoid weird problems it is
46recommended you run 'make distclean' to clear out old built files
47before generating a new Makefile.
48
49END
50
51		$answer = ExtUtils::MakeMaker::prompt('Do you wish to continue anyway ?', 'no');
52
53	}
54
55	return ($answer =~ /^n[o]*$/i) ? 1 : 0;
56}
57
581;