1# 2# CDDL HEADER START 3# 4# The contents of this file are subject to the terms of the 5# Common Development and Distribution License, Version 1.0 only 6# (the "License"). You may not use this file except in compliance 7# with the License. 8# 9# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10# or http://www.opensolaris.org/os/licensing. 11# See the License for the specific language governing permissions 12# and limitations under the License. 13# 14# When distributing Covered Code, include this CDDL HEADER in each 15# file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16# If applicable, add the following below this CDDL HEADER, with the 17# fields enclosed by brackets "[]" replaced with your own identifying 18# information: Portions Copyright [yyyy] [name of copyright owner] 19# 20# CDDL HEADER END 21# 22use ExtUtils::MakeMaker; 23use ExtUtils::Constant 0.11 'WriteConstants'; 24WriteMakefile( 25 NAME => 'File::Glob', 26 VERSION_FROM => 'Glob.pm', 27 MAN3PODS => {}, # Pods will be built by installman. 28 OBJECT => 'bsd_glob$(OBJ_EXT) Glob$(OBJ_EXT)', 29 realclean => {FILES=> 'const-c.inc const-xs.inc'}, 30 31## uncomment for glob debugging (will cause make test to fail) 32# DEFINE => '-DGLOB_DEBUG', 33# OPTIMIZE => '-g', 34); 35use Config; 36sub MY::cflags { 37 package MY; 38 my $inherited = shift->SUPER::cflags(@_); 39 if ($Config::Config{archname} =~ /^aix/ and 40 $Config::Config{use64bitall} eq 'define') { 41 $inherited =~ s/\s-O\d?//m; 42 } 43 $inherited; 44} 45 46WriteConstants( 47 NAME => 'File::Glob', 48 NAMES => [qw(GLOB_ABEND GLOB_ALPHASORT GLOB_ALTDIRFUNC GLOB_BRACE GLOB_ERR 49 GLOB_LIMIT GLOB_MARK GLOB_NOCASE GLOB_NOCHECK GLOB_NOMAGIC 50 GLOB_NOSORT GLOB_NOSPACE GLOB_QUOTE GLOB_TILDE), 51 {name=>"GLOB_ERROR", macro=>["#ifdef GLOB_ERROR\n\tdMY_CXT;\n\n","#endif\n"]}], 52 BREAKOUT_AT => 8, 53); 54