File: make_config_acheck.pl

package info (click to toggle)
libnet-interface-perl 1.016-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,256 kB
  • sloc: ansic: 3,397; sh: 2,736; perl: 888; makefile: 6
file content (27 lines) | stat: -rwxr-xr-x 493 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/usr/bin/perl

#	Copyright 2008 - 2009, Michael Robinton
#
#	This library is free software; you can redistribute it
#	and/or modify it under the same terms as Perl itself.
#

my $usage = q|
creates:
AX_CHECK_INCLUDE([dir/header.h],[DIR_HEADER_H])

usage:	|. $0 .q| in_file

|;

open(F,$ARGV[0]) || die $usage;

foreach(<F>) {
  next unless $_ =~ /(\<\s*([^>\s]+)>)/;
  my $hf = $1;
  my $hs = $2;
  (my $uhs = uc $hs) =~ s|[\./-]|_|g;
  print qq|AX_CHECK_INCLUDE([$hs],[$uhs])
|;
}
close F;