1 # Copyright (C) 2003 Free Software Foundation, Inc.
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 2, or (at your option)
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 package Automake::Configure_ac;
22 use Automake::Channels;
23 use Automake::ChannelDefs;
25 use vars qw (@ISA @EXPORT);
28 @EXPORT = qw ($configure_ac &find_configure_ac &require_configure_ac);
32 Automake::Configure_ac - Locate configure.ac or configure.in.
36 use Automake::Configure_ac;
38 # Try to locate configure.in or configure.ac in the current
39 # directory. It may be absent. Complain if both files exist.
40 my $filename = find_configure_ac;
42 # Likewise, but bomb out if the file does not exist.
43 my $filename = require_configure_ac;
45 In both cases, the name of the file found is also put in the
46 C<$configure_ac> global variable.
50 use vars '$configure_ac';
52 sub find_configure_ac ()
54 if (-f 'configure.ac')
56 if (-f 'configure.in')
59 "`configure.ac' and `configure.in' both present.\n"
60 . "proceeding with `configure.ac'.");
62 $configure_ac = 'configure.ac';
64 elsif (-f 'configure.in')
66 $configure_ac = 'configure.in';
71 sub require_configure_ac ()
73 fatal "`configure.ac' or `configure.in' is required"
74 unless find_configure_ac;
80 ### Setup "GNU" style for perl-mode and cperl-mode.
82 ## perl-indent-level: 2
83 ## perl-continued-statement-offset: 2
84 ## perl-continued-brace-offset: 0
85 ## perl-brace-offset: 0
86 ## perl-brace-imaginary-offset: 0
87 ## perl-label-offset: -2
88 ## cperl-indent-level: 2
89 ## cperl-brace-offset: 0
90 ## cperl-continued-brace-offset: 0
91 ## cperl-label-offset: -2
92 ## cperl-extra-newline-before-brace: t
93 ## cperl-merge-trailing-else: nil
94 ## cperl-continued-statement-offset: 2