dns-browse-1.9.orig/0040755000176500001450000000000007470140117013102 5ustar jfsjuntadns-browse-1.9.orig/README0100444000176500001450000000614207467765454014007 0ustar jfsjunta dns_browse and dns_tree ======================= WHAT ARE dns_browse and dns_tree? --------------------------------- dns_tree is a command-line-based front-end to dig. It replaces the several dig invocations necessary to fetch a zone, and it formats the output in a somewhat sensible hierarchical style (a tree). dns_browse is a GUI front-end to dns_tree. It allows point-and-click DNS browsing and makes it easy to expand/compress hierarchies in one or more DNS zones. WHAT'S NEW WITH THIS RELEASE? ----------------------------- 1.8: 13-May-02 - LOC RR added to dns_browse and tree. (But PARSING of LOC to dns tree not yet done.) - Handling of temporary directories now done more securely in dns_tree. Thanks to Debian for the poke. REQUIREMENTS ------------ dns_tree requires dig (available as part of bind from ), and Perl 5.002 or later (available from ). dns_browse requires Tk-4.2 or later (available from ). AVAILABILITY and BUGS --------------------- The latest version of dns_browse and dns_tree is available at . Feedback about these tools is welcome; send comments to John Heidemann, . INSTALLATION ------------ These tools use GNU autoconf. To configure, run ./configure, then type ``make install''. To install in different places, run ``./configure --prefix=/local'' or ``./configure --bindir=/local''. If autoconf doesn't work you can install the scripts by hand to changing their #! lines. RELEASE HISTORY --------------- 1.4: 23 November 1997 The first public release. Prior versions were used internally to spy on the Lybians. (Actually, I'm ly'ing.) 1.5: 2 December 1997 Fixed an autoconf bug where by default the program tried to install in the cwd. (Bug reported by Wilfried Woeber .) 1.6: 15 December 1997 Fixed another installation bug (problem reported by Brian Heess ). Added support for BIND-8's dig (problem reported by Noel Hunt ). 1.7: 6-May-99 Apparently I didn't have bind-8 dig quite working. Now that's what I run by default. ISPELL WORDS ------------ LocalWords: dns COPYRIGHT --------- dns_browse and dns_tree are Copyright (C) 1997 by John Heidemann. These programs are free software; you can redistribute them and/or modify them under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. These programs are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with these programs; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. The GNU General Public License can be found in the file ``COPYING''. -John Heidemann 23 November 1997 dns-browse-1.9.orig/dns_browse0100555000176500001450000005244307467766454015230 0ustar jfsjunta#!/home/johnh/BIN/wish -f # # dns_browse # Copyright (C) 1997 by John Heidemann # $Id: dns_browse,v 1.25 2002/05/13 16:43:24 johnh Exp $ # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # global dns_tree types set dns_tree "dns_tree" set prog "dns_browse" set maximal_types {A CNAME HINFO LOC MX NS PTR TXT} set default_types {A CNAME NS TXT} set user_types {} set required_types {i iz m mx} set www_hosts_only 0 proc usage {} { puts {usage: gui [-t TYPE ...] starting_domain_name options: -t TYPE show only records of these TYPE (repeat for multiple types) (the ``all'' type does everything I know about) -w match only web hosts Requires dns_tree to be in the path. } exit 1 } # toggle_window is from nam-1 proc toggle_window w { if ![winfo exists $w] { build$w $w } global created$w if ![info exists created$w] { set created$w 1 wm transient $w . update idletasks set x [winfo rootx .] set y [winfo rooty .] incr y [winfo height .] incr y -[winfo reqheight $w] incr y -20 # adjust for virtual desktops incr x [winfo vrootx .] incr y [winfo vrooty .] if { $y < 0 } { set y 0 } if { $x < 0 } { set x 0 } else { set right [expr [winfo screenwidth .] - \ [winfo reqwidth $w]] if { $x > $right } { set x $right } } wm geometry $w +$x+$y wm deiconify $w } elseif [winfo ismapped $w] { wm withdraw $w } else { wm deiconify $w } } # # formatted_text is stolen from dontspace # # (with permission :-) # proc formatted_text {w text} { # NEEDSWORK: font selection should be configurable. # # If you use this code elsewhere, please follow two conscious # style choices. First, wide things are hard to read # (50 chars is about the most reasonable---consider newspaper # columns). Second, we allow the user to resize the window. # (The user should always have control, even to do stupid things.) # frame $w.f set wt $w.f.t text $wt \ -relief raised -bd 2 -yscrollcommand "$w.f.s set" \ -setgrid true -wrap word \ -width 60 -padx 4 -pady 4 \ -font -*-Times-Medium-R-*-140-* set defFg [lindex [$wt configure -foreground] 4] set defBg [lindex [$wt configure -background] 4] $wt tag configure italic -font -*-Times-Medium-I-Normal-*-140-* $wt tag configure computer -font -*-Courier-Medium-R-Normal-*-120-* $wt tag configure big -font -*-Times-Bold-R-Normal-*-180-* $wt tag configure reverse -foreground $defBg -background $defFg pack $wt -side left -expand 1 -fill both set ws $w.f.s scrollbar $ws -relief flat -command "$w.f.t yview" pack $ws -side right -expand yes -fill both pack $w.f # # Scan the text for tags. # $wt mark set insert 0.0 set t $text while { [regexp -indices {<([^@>]*)>} $t match inds] == 1 } { set start [lindex $inds 0] set end [lindex $inds 1] set keyword [string range $t $start $end] # puts stderr "tag $keyword found at $inds" # insert the left hand text into the thing set oldend [$wt index end] $wt insert end [string range $t 0 [expr $start-2]] formatted_text_purge_all_tags $wt $oldend insert # check for begin/end tag if { [string range $keyword 0 0] == "/" } { # end region set keyword [string trimleft $keyword "/"] if { [info exists tags($keyword)] == 0 } { error "end tag $keyword without beginning" } $wt tag add $keyword $tags($keyword) insert # puts stdout "tag $keyword added from $tags($keyword) to [$wt index insert]" unset tags($keyword) } else { if { [info exists tags($keyword)] == 1 } { error "nesting of begin tag $keyword" } set tags($keyword) [$wt index insert] # puts stdout "tag $keyword begins at [$wt index insert]" } # continue with the rest set t [string range $t [expr $end+2] end] } set oldend [$wt index end] $wt insert end $t formatted_text_purge_all_tags $wt $oldend insert # # Disable the text so the user can't mess with it. # $wt configure -state disabled } proc formatted_text_purge_all_tags {w start end} { # remote any bogus tags # puts stderr "Active tags at $start are [$w tag names $start]" foreach tag [$w tag names $start] { $w tag remove $tag $start $end } } proc build_formatted_text {w t} { global prog if [winfo exists $w] { return } toplevel $w bind $w "focus $w" wm withdraw $w wm iconname $w "$prog: about" wm title $w "$prog: about" frame $w.frame -borderwidth 2 -relief raised formatted_text $w.frame $t button $w.frame.ok -text " Dismiss " -borderwidth 2 -relief raised \ -command "wm withdraw $w" pack $w.frame.ok -pady 6 -padx 6 -anchor e pack $w.frame -expand 1 -fill both } proc build.help w { build_formatted_text $w { dns_browse help The main pane shows a DNS hierarchy with indentation. +/- in the first column indicates a level which can be expanded or contracted. +? in the second column indicates a level that can be expanded but hasn't been tried yet. Button-1 expands or contracts a level of the hierarchy. Button-2 opens a new window showing only the clicked-on item and its children. Button-3 prints out some debugging information (but you're not supposed to know that :-). Multiple zones can be downloaded in parallel, but an in-progress zone cannot be contracted. Record types: lower-case records are internal: i)informational, e)rror messages, iz) internal ``zones'' (hierarchy levels), m)essages. Plans: clicking on www A/CNAMEs links should invoke a real web browser. Known bugs: dns_tree (invoked to expand sub-levels) can hang due to bogus servers, not all records are supported. Changing types and re-displaying a level deosn't change what's displayed. Zones speaking for things outside of their zone don't work correctly. } } proc build.about w { build_formatted_text $w { dns_browse Copyright (c) 1997 by John Heidemann (johnh@isi.edu). A hack in two movements. The most recent version should be available at http://www.isi.edu/~johnh/SOFTWARE/DNS/index.html. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. } } proc show_info {w t} { global options set wid [widget_to_wid $w] if {![info exists options($wid,info_next_id)]} { set options($wid,info_next_id) 0 } set id [incr options($wid,info_next_id)] set options($wid,info_active_id) $id $options($wid,info) configure -text $t update return $id } proc show_timed_info_expire {w id} { global options set wid [widget_to_wid $w] if {$options($wid,info_active_id) == $id} { show_info "" } } # flash a message, then hide it after a while proc show_timed_info {w time text} { global options set id [show_info $w $text] after [expr 1000*$time] "show_timed_info_expire $w $id" update } proc widget_to_wid w { set second_dot [string first "." [string range $w 1 end]] if {$second_dot != -1} { set w [string range $w 2 [expr $second_dot]] } else { set w [string range $w 2 end] } return $w } proc show_all_types wid { global maximal_types options foreach type $maximal_types { set options($wid,show_$type) 1 } } proc build_menu_with_binding {binding_w m label state key ul cmd} { $m add command -label $label -state $state -accelerator "^$key" -underline $ul -command $cmd bind $binding_w $cmd bind $binding_w $cmd } proc build_menus {w binding_w dir} { global options set wid [widget_to_wid $w] frame $w.menu -relief groove -bd 2 pack $w.menu -side top -fill x set padx 4 set mb $w.menu.file set m $mb.m menubutton $mb -text "File" -menu $m -underline 0 \ -borderwidth 1 menu $m build_menu_with_binding $binding_w $m "Open..." disabled o 0 {} build_menu_with_binding $binding_w $m "Duplicate" disabled d 0 {} build_menu_with_binding $binding_w $m "Close" normal w 0 "after idle {destroy $w}" $m add separator build_menu_with_binding $binding_w $m "Quit" normal q 0 {exit 0} pack $mb -side left -padx $padx set mb $w.menu.types set m $mb.m menubutton $mb -text "Types" -menu $m -underline 0 \ -borderwidth 1 menu $m # also UINFO WKS global maximal_types foreach type $maximal_types { $m add checkbutton -label $type -variable options($wid,show_$type) } $m add separator $m add command -label "All" -command "show_all_types $wid" pack $mb -side left -padx $padx set mb $w.menu.options set m $mb.m menubutton $mb -text "Options" -menu $m -underline 0 \ -borderwidth 1 menu $m $m add checkbutton -label "Hide new iz's" -variable options($wid,hide_new_izs) $m add checkbutton -label "Disable safety checks" -variable options($wid,no_safety) $m add checkbutton -label "Show only web hosts" -variable options($wid,www_hosts_only) pack $mb -side left -padx $padx set info $w.menu.info set options($wid,info) $info label $info -text "" pack $info -side left -padx $padx set ad $w.menu.ad label $ad -text " dns_browse: $dir " -relief groove pack $ad -side left -padx $padx -expand 1 set mb $w.menu.help set m $mb.m menubutton $mb -text "Help" -menu $m -underline 0 \ -borderwidth 1 menu $m $m add command -label "Help" -command {toggle_window .help} $m add command -label "About dns_browse" -command {toggle_window .about} pack $mb -side right -padx $padx } proc text_matching_tag {w index head} { set depth -1 foreach tag [$w tag names $index] { if [string match "$head*" $tag] { set depth [string range $tag [string length $head] end] break } } return $depth } proc saved_text_insert {w index id} { global saved_text set t $saved_text($id) $w mark set imark $index # replay the dump set base "" foreach {key value index} $t { switch -exact $key { tagoff { if [info exists tags($value)] { $w tag add $value $tags($value) imark # puts "tagoff $index $value: $tags($value)" unset tags($value) } } tagon { set tags($value) [$w index imark] # puts "tagon $index $value: $tags($value)" } text { $w insert imark $value {} # puts "text $index $value" } } } # complete any hanging tags set search_id [array startsearch tags] while {[set i [array nextelement tags $search_id]] != ""} { # puts "d-tagoff - $i" $w tag add $i $tags($i) imark } array donesearch tags $search_id } proc saved_text_save {w beg end} { set t "" # first save tags that cross the whole range foreach tag [$w tag names $beg] { lappend t tagon $tag - } # then dump the range so we get internal chagnes return [concat $t [$w dump $beg $end]] } proc swap_line_tag {w linebeg lineend char newtag oldtag} { # puts "swap_line_tag: $linebeg $lineend" # change the sign of the current line # (insert first to preserve tag ranges) set len [string length $char] $w insert "$linebeg + $len char" $char $w delete $linebeg "$linebeg + $len char" $w tag remove $oldtag $linebeg $lineend $w tag add $newtag $linebeg $lineend } proc generate_fqdn {w index} { # start on current line, walk backwards set fqdn "" set beg [$w index "$index lineend"] set old_depth [expr [text_matching_tag $w $beg depth]+1] while {1} { set prev [$w tag prevrange elem $beg] if {$prev == ""} { break } set beg [lindex $prev 0] set end [lindex $prev 1] set new_depth [text_matching_tag $w $beg depth] set elem [$w get $beg $end] # puts "at $prev: $new_depth $elem ($beg-$end)" if {$new_depth >= $old_depth} { # only go up, not down or sideways continue } set fqdn "$fqdn.$elem" set old_depth $new_depth } return [string trimleft $fqdn {\.}] } proc expand_ns {w beg end base_depth} { # first find out the new subdomain set fqdn [generate_fqdn $w "$beg lineend"] $w mark set imark $end catch { fill_text $w imark $fqdn $base_depth } error } proc text_enable w { $w configure -state normal } proc text_disable w { $w configure -state disabled } proc act_add_tags {w index tags} { # puts "act_add_tags: $w $index $tags" text_enable $w foreach tag $tags { $w tag add $tag "$index linestart" "$index lineend + 1 line linestart" } text_disable $w } proc act_remove_tags {w index tags} { text_enable $w foreach tag $tags { $w tag remove highlight "$index linestart" "$index lineend" } text_disable $w } proc on_target {w index} { # puts "on_target $w $index: [$w tag names $index]" # sanity set on_target [lsearch -exact [$w tag names $index] target] $w tag remove target 0.0 end if {$on_target == -1} { return 0 } return 1 } proc if_on_target {cmd w index} { text_enable $w if [on_target $w $index] { $cmd $w $index } text_disable $w } proc act_plus {w index} { text_enable $w # find the bounds of the current line set linebeg [$w index "$index linestart"] set lineend [$w index "$index + 1 line linestart "] set depth [text_matching_tag $w $index depth] if {$depth == -1} { error "act_plus on line without depth" } # expand it set id [text_matching_tag $w $index save] if {$id == -1} { expand_ns $w $linebeg $lineend $depth } else { show_info $w "expanding" global saved_text saved_text_insert $w $lineend $id $w tag remove "save$id" $linebeg $lineend show_info $w "" } swap_line_tag $w $linebeg $lineend {- } minus plus text_disable $w } proc text_<=_depth {w index depth} { set beg end for {} {$depth >= 0} {incr depth -1} { set nextrange [$w tag nextrange "depth$depth" $index] if {$nextrange != ""} { set nextbeg [lindex $nextrange 0] if [$w compare $nextbeg <= $beg] { set beg $nextbeg } } } return $beg } proc act_minus {w index} { text_enable $w # find the bounds of the current line set linebeg [$w index "$index linestart"] set lineend [$w index "$index + 1 line linestart"] set depth [text_matching_tag $w $index depth] if {$depth == -1} { error "act_minus on line without depth" } # find what gets eliminated set delbeg [$w index $lineend] set delend [text_<=_depth $w $lineend $depth] # can't delete active text if {[$w tag nextrange expanding $delbeg $delend] != ""} { bell show_timed_info $w 3 "Cannot compress active trees" text_disable $w return } # delete it and save it global save_next_id saved_text set id [incr save_next_id] set saved_text($id) [saved_text_save $w $delbeg $delend] $w delete $delbeg $delend $w tag add "save$id" $linebeg $lineend swap_line_tag $w $linebeg $lineend {+} plus minus text_disable $w } proc act_new_window {w index} { set fqdn [generate_fqdn $w "$index lineend"] build_browser $fqdn $w } proc build_text w { frame $w.text set wt "$w.text.text" text $wt -relief sunken -bd 2 \ -xscrollcommand "$w.text.xscroll set" \ -yscrollcommand "$w.text.yscroll set" \ -setgrid 1 -height 20 \ -width 60 \ -wrap none \ -font {-*-Courier-Medium-R-*-140-*} scrollbar $w.text.xscroll -command "$w.text.text xview" -orient horizontal scrollbar $w.text.yscroll -command "$w.text.text yview" pack $w.text.xscroll -side bottom -fill x pack $w.text.yscroll -side right -fill y pack $w.text.text -expand yes -fill both pack $w.text -side bottom -expand yes -fill both # set up some tags $wt tag bind clickable {act_add_tags %W [%W index {@%x,%y}] target } $wt tag bind plus {if_on_target act_plus %W [%W index {@%x,%y}] } $wt tag bind minus {if_on_target act_minus %W [%W index {@%x,%y}] } # $wt tag bind clickable {act_add_tags %W [%W index {@%x,%y}] target } $wt tag bind plus {if_on_target act_new_window %W [%W index {@%x,%y}] } $wt tag bind minus {if_on_target act_new_window %W [%W index {@%x,%y}] } # $wt tag bind DEBUG {set i [%W index {@%x,%y}]; puts "%W $i [%W tag names $i]"} $wt tag configure expanding -font {-*-Courier-Bold-R-*-140-*} $wt tag configure target -font {-*-Courier-Bold-R-*-140-*} # $wt tag configure ns -font {-*-Courier-Bold-R-*-140-*} return $wt } proc fill_text_line {w place line base_depth} { if {![regexp "^(\t*)(\[^\t\]+)\t+(\[^\t\]+)(.*)$" $line dummy new_tabs type value rest]} { error "fill_text_line: $line" } set new_depth [string length $new_tabs] set depth [expr $base_depth+$new_depth] set wtags {} switch -exact $type { m {set ch "! "; set tags message } mx {set ch "! "; set tags {message expanding} } z {set ch " "; set tags {}; set wtags elem } NS {set ch "+?"; set tags {clickable plus ns}; set wtags elem } iz {set ch "- "; set tags {clickable minus iz}; set wtags elem } default {set ch " "; set tags {}} } if {$base_depth > 0 && $new_depth == 0 && $type == "z"} { return 0 } # puts "$depth $line" lappend tags depth$depth DEBUG set wtags [concat $tags $wtags] set base_tabs [string range "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" 1 $base_depth] $w insert $place "$ch$base_tabs$new_tabs$type\t" $tags \ $value $wtags \ "$rest\n" $tags return 1 } proc fill_text_background {w index base_depth f iid} { text_enable $w global insertion_count while {1} { gets $f line if {$line == ""} { if [fblocked $f] { # no more input text_disable $w return } if [eof $f] { break } # empty line } incr insertion_count($iid) [fill_text_line $w $index $line $base_depth] } # eof catch { close $f } if {$insertion_count($iid) == 0} { fill_text_line $w $index "\te\tno-ouptut" $base_depth } # take down the message and fix the tags $w delete iend$iid "iend$iid + 1 line linestart" # apply options over ibeg$iid, iend$iid global options set wid [widget_to_wid $w] if {$options($wid,hide_new_izs)} { set index ibeg$iid while {[$w compare $index < iend$iid] != 0} { if {[lsearch -exact [$w tag names $index] iz] != -1} { act_minus $w $index } set index [$w index "$index + 1 line"] } } text_disable $w } proc fill_text {w index dir base_depth} { global dns_tree insertion_next_id insertion_count options maximal_types set iid [incr insertion_next_id] set insertion_count($iid) 0 set wid [widget_to_wid $w] set opts "" if {$options($wid,no_safety)} { set opts "$opts -f" } if {$options($wid,www_hosts_only)} { set opts "$opts -m www" } foreach type $maximal_types { if {$options($wid,show_$type)} { set opts "$opts -t $type" } } set f [open "| $dns_tree $opts $dir" r] fconfigure $f -blocking false # set up insertion marker $w mark set ibeg$iid $index $w mark gravity ibeg$iid left $w mark set iend$iid $index $w mark gravity iend$iid left fill_text_line $w $index "\tmx\texpanding $dir" $base_depth $w mark gravity iend$iid right # asynchronously fill in text fileevent $f readable "fill_text_background $w iend$iid $base_depth $f $iid" } proc build_browser {dir old_w} { # set w [toplevel ".$dir"] global window_next_id set wid [incr window_next_id] set w [toplevel ".w$wid"] global prog wm iconname $w "$prog: $dir" wm title $w "$prog: $dir" # set options global options user_types required_types maximal_types www_hosts_only if {$old_w == ""} { set options($wid,hide_new_izs) 1 set options($wid,www_hosts_only) $www_hosts_only set options($wid,no_safety) 0 global maximal_types foreach type $maximal_types { set options($wid,show_$type) 0 } foreach type $user_types { set options($wid,show_$type) 1 } foreach type $required_types { set options($wid,show_$type) 1 } } else { set old_wid [widget_to_wid $old_w] foreach key [array names options] { if [string match "$old_wid,*" $key] { set part [string range $key [expr [string length $old_wid]+1] end] set options($wid,$part) $options($key) } } } set tw [build_text $w] build_menus $w $tw $dir bind $w "focus $tw" # (set up an insertion mark) $tw mark set imark 0.0 $tw mark gravity imark right fill_text $tw imark $dir 0 } proc main {} { global argv global save_next_id insertion_next_id window_next_id set save_next_id 0 set insertion_next_id 0 set window_next_id 0 wm withdraw . # option processing global user_types maximal_types default_types www_hosts_only if {[llength $argv] < 1} { usage } while {[string index [lindex $argv 0] 0] == "-"} { set optc [lindex $argv 0] set argv [lrange $argv 1 end] if {[llength $argv] > 1} { set optarg [lindex $argv 0] } else { set optarg {} } switch -exact -- $optc { -t { lappend user_types $optarg set argv [lrange $argv 1 end] } -w { set www_hosts_only 1 } default { usage } } } if {$user_types == "all"} { set user_types $maximal_types } if {$user_types == ""} { set user_types $default_types } # argument processing foreach name $argv { build_browser $name {} } } main dns-browse-1.9.orig/dns_tree0100555000176500001450000002702707467765336014664 0ustar jfsjunta#!/home/johnh/BIN/perl5 -w # # dns_tree # Copyright (C) 1997 by John Heidemann # $Id: dns_tree,v 1.22 2002/05/13 16:33:34 johnh Exp $ # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # sub usage { print STDERR <[$_][$SORT] = rec_to_sort(\@{$res_ref->[$_]}); # print $res_ref->[$_][$A] . " => " . $res_ref->[$_][$SORT] . "\n"; }; # do it my(@keys) = sort { $res_ref->[$a][$SORT] cmp $res_ref->[$b][$SORT] } (0..$count); return \@keys; } sub display_rec { my($name, $rec_aref, $stats_href, $depth) = @_; my($sort, $a, $ttl, $type, $b) = @$rec_aref; return if ($a !~ /$name$/i); # skip stuff not in our domain my($suba) = $a; $suba =~ s/$name$//i; # return if ($suba eq ''); # skip records for our level return if ($suba eq '' && !($type eq 'TXT' || $type eq 'MX')); # skip some records for our level $suba =~ s/\.$//; # trim . between sub and old name # only show one NS for each subthing if ($type eq 'NS' || $type eq 'iz') { my($lc_suba) = lc($suba); return if (defined($stats_href->{subns_shown_href}{$lc_suba})); $stats_href->{subns_shown_href}{$lc_suba} = 1; $stats_href->{subns_shown_count}++; }; # only show A/CNAMES records pointing to web servers if (!($type eq 'NS' || $type eq 'iz') && defined($opts{'match'})) { return if ($suba !~ /$opts{'match'}/i); }; # getting subdomain without NSes up to it? fake them? if ($suba =~ /\./) { my($car, $cdr) = ($a =~ /^([^.]+)\.(.+)$/); my(@fake_rec) = (0, $cdr, 1, 'iz'); display_rec($name, \@fake_rec, $stats_href, $depth); }; my($dots) = $suba =~ tr/././; my($tabs) = "\t" x ($dots + $depth); my($subsuba) = ($dots > 0) ? ($suba =~ /^([^.]+)\./): ($suba); my($rest) = ""; $rest = $b if ($type eq 'TXT'); print "$tabs$type\t$subsuba$rest\n"; } sub display_level { my($name, $res_ref, $ns) = @_; my($count) = $#$res_ref; print "z\t$name\n"; foreach (@messages) { print "\ti\t$_\n"; }; print "\ti\t($count records, from $ns)\n"; my($keys_ref) = sort_level($res_ref); my(%stats); $stats{'subnses_shown_count'} = 0; $stats{'subnses_shown_href'} = { }; my($i); foreach $i (@$keys_ref) { display_rec($name, \@{$res_ref->[$i]}, \%stats, 1); }; # print "\ti\t" . $stats{'subnses_shown_count'} . "\tsub-domains\n"; } sub dig { my($ah_ref) = @_; my($cmd, $name, $server, $cache_duration) = ($ah_ref->{cmd}, $ah_ref->{name}, $ah_ref->{server}, $ah_ref->{cache_duration}); my(@msgs); # What should we keep from the dig output? my($typesa_ref) = $ah_ref->{types}; $typesa_ref = \@default_types if (!defined($typesa_ref)); my(%types) = (); foreach (@$typesa_ref) { $types{$_} = 1; }; croak "bad cmd" if (!defined($cmd)); croak "bad name" if (!defined($name)); if (!defined($server)) { $server = ""; } else { $server = '@' . $server; }; $cache_duration = 60 * 60 * 12 if (!defined($cache_duration)); # 12 hours # Normalize case (important for cache files). ($cmd, $name, $server) = (lc($cmd), lc($name), lc($server)); my(@res); my($ok) = 0; # Implement caching (of the raw dig output). # check cache my($from_cache) = 0; my($fn) = "$cache_dir/" . lc("$cmd:$name:$server"); my($done) = 0; # check cache validity if (-f $fn) { my($age) = (-M $fn) * 24 * 60 * 60; if ($age > $cache_duration) { # print STDERR "$fn is out of date\n"; unlink($fn); }; }; if (-f $fn) { open(DIG, "< $fn") || croak "cached dig"; $from_cache = 1; } else { open(DIG, "dig $cmd $name $server |") || croak "dig"; open(CACHE, "> $fn") || croak "dig to cache $fn"; }; # Parse dig output line-by-line. # Currently we implement a simple two-state machine # to handle SOA records. my($in_soa) = 0; my($old_dig) = 1; # default to pre-bind-8.0 dig my(@soa); my($origin) = "."; my($lasta) = undef; while () { print CACHE $_ if (!$from_cache); if ($in_soa) { my($dummy, $n) = split(/\s+/); push(@soa, $n); $in_soa++; if ($in_soa > $SOA_MINIMUM) { $in_soa = 0; push(@res, [@soa]); @soa = (); }; next; }; next if (/^\s*$/); next if (/^\s+/); $done = 1 if (/^;; ADDITIONAL RECORDS/); if (/^;\s*\<\<\>\> DiG\s+([0-9]+)\s*.*\<\<\>\>\s*(.*)$/) { $old_dig = 0 if ($1 >= 8); # record signatures push(@msgs, $2); }; if (/^;; (Received 0 answers.*)$/) { push(@msgs, $1); }; next if ($done); next if (/^;/); if (/^\$ORIGIN\s+(\S+)$/) { $origin = $1; next; }; $ok++; # # parse it. my($a, $ttl, $type, $b, $c, @rest); if ($old_dig) { ($a, $ttl, $type, $b, $c, @rest) = split(/\s+/); } else { my($in); ($a, $ttl, $in, $type, $b, $c, @rest) = split(/\s+/); }; # # handle default names and the origin if ($a eq '') { die "$0: undef lasta.\n" if (!defined($lasta)); $a = $lasta; } else { $lasta = $a; }; $a .= $origin if ($a !~ /\.$/); # next if (!defined($type)); if ($type eq 'SOA') { # special case: multi-line SOAs @soa = (0, $a, $ttl, $type, $b, $c); $in_soa = $SOA_SERIAL; next; }; if ($type eq 'TXT') { # hack $c = '' if (!defined($c)); @rest = ("") if ($#rest == -1); $b = "$b $c " . join(" ", @rest); $c = undef; @rest = (); }; if (defined($types{$type})) { push(@res, [0, $a, $ttl, $type, $b]); }; }; close DIG; close CACHE if (!$from_cache); return (undef, \@msgs) if (!$ok); return (\@res, \@msgs); } sub push_msgs { my($msgs_ref) = @_; if (defined($msgs_ref)) { push(@messages, @$msgs_ref); }; } sub fetch_nses { my($name, $cache_duration) = @_; my($res_ref, $msgs_ref) = dig({cmd => 'ns', name => $name, types => [qw(NS)], cache_duration => $cache_duration}); die "fetch_nses: dig ns failed\n" if (!defined($res_ref)); push_msgs($msgs_ref) if (defined($opts{'verbose'})); my(@nses); foreach (@$res_ref) { push(@nses, $_->[$B]); }; return \@nses; } sub fetch_level_from_ns { my($name, $ns, $types_aref, $cache_duration) = @_; my($res_ref, $msgs_ref) = dig({cmd => 'axfr', name => $name, server => $ns, types => $types_aref}, cache_duration => $cache_duration); push_msgs($msgs_ref); return $res_ref; } sub fetch_level_from_nses { my($name, $nses_ref, $types_aref, $cache_duration) = @_; my($ns); foreach $ns (@$nses_ref) { my($res_ref) = fetch_level_from_ns($name, $ns, $types_aref, $cache_duration); return ($res_ref, $ns) if defined($res_ref); }; return undef; } sub fetch_soa { my($name) = @_; my($soa_ref, $msgs_ref) = dig({cmd => 'soa', name => $name, types => [qw(SOA)]}); die "fetch_soa: dig soa failed\n" if (!defined($soa_ref)); push_msgs($msgs_ref) if (defined($opts{'verbose'})); return $soa_ref->[0]; } sub fetch_level { my($name, $types_aref) = @_; my($soa_ref) = fetch_soa($name); my($cache_duration) = parse_time_spec($soa_ref->[$SOA_MINIMUM]); my($nses_ref) = fetch_nses($name, $cache_duration); return undef if (!defined($nses_ref)); my(@f) = fetch_level_from_nses($name, $nses_ref, $types_aref, $cache_duration); return @f; } sub dangereous_name { my($name) = @_; return undef if (defined($opts{'force'})); $name = lc($name); foreach (@dangereous_names) { return 1 if ($name eq $_); }; return 0; } sub main { &usage if ($#ARGV >= 0 && $ARGV[0] eq '-?'); &GetOptions(\%opts, qw(f m=s t=s@ v)); &usage if ($#ARGV != 0); $opts{'force'} = $opts{'f'}; $opts{'match'} = $opts{'m'}; $opts{'types'} = $opts{'t'}; $opts{'verbose'} = $opts{'v'}; my($types_aref) = $opts{'types'}; if (defined($types_aref) && $#$types_aref == 0 && $types_aref->[0] eq 'all') { # special case "all" $types_aref = $opts{'types'} = \@maximal_types; }; # Be careful about perms on the cache dir (thanks, Debian). if (! -d $cache_dir) { mkdir($cache_dir,0700) or die "$0: cannot mkdir $cache_dir.\n"; }; my($name) = $ARGV[0]; $name = dns_make_absolute($name); if (dangereous_name($name)) { print "z\t$name\n\te\tdangerously-large-zone\n"; return; }; $types_aref = (defined($opts{'types'}) ? $opts{'types'} : [qw(NS A CNAME)]); push (@$types_aref, qw(i e m)); my($res_ref, $ns) = fetch_level($name, $types_aref); if (defined($res_ref)) { display_level($name, $res_ref, $ns); } else { foreach (@messages) { print "\ti\t$_\n"; }; print "\te\terror looking up $name.\n"; exit 1; }; } main; exit 0; dns-browse-1.9.orig/Makefile.in0100444000176500001450000000157606441607122015154 0ustar jfsjunta # # Makefile # $Id: Makefile.in,v 1.5 1997/12/04 20:10:58 johnh Exp $ # TOSHAR=README dns_browse dns_tree \ Makefile.in configure configure.in install-sh release PACKAGE=dns_browse INSTALL = @INSTALL@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ WISH = @WISH@ PERL = @PERL@ install: { echo "#!$(WISH) -f"; cat dns_browse; } >t $(INSTALL) -m 755 t $(bindir)/dns_browse { echo "#!$(PERL) -w"; cat dns_tree; } >t $(INSTALL) -m 755 t $(bindir)/dns_tree .tar_files: Makefile release for i in $(TOSHAR); \ do \ echo ./$(PACKAGE)-`cat release`/$$i; \ done >.tar_files tar: .tar_files ln -s . ./$(PACKAGE)-`cat release` tar cvf - `cat .tar_files` >$(PACKAGE)-`cat release`.tar rm ./$(PACKAGE)-`cat release` tar.gz: .tar_files ln -s . ./$(PACKAGE)-`cat release` tar cvf - `cat .tar_files` |gzip >$(PACKAGE)-`cat release`.tar.gz rm ./$(PACKAGE)-`cat release` dns-browse-1.9.orig/configure0100755000176500001450000010062106441103033014777 0ustar jfsjunta#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. # Defaults: ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: # Initialize some variables set by options. # The variables have the same names as the options, with # dashes changed to underlines. build=NONE cache_file=./config.cache exec_prefix=NONE host=NONE no_create= nonopt=NONE no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= target=NONE verbose= x_includes=NONE x_libraries=NONE bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi case "$ac_option" in -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; *) ac_optarg= ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case "$ac_option" in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir="$ac_optarg" ;; -build | --build | --buil | --bui | --bu) ac_prev=build ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir="$ac_optarg" ;; -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` eval "enable_${ac_feature}=no" ;; -enable-* | --enable-*) ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } fi ac_feature=`echo $ac_feature| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "enable_${ac_feature}='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix="$ac_optarg" ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he) # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat << EOF Usage: configure [options] [host] Options: [defaults in brackets after descriptions] Configuration: --cache-file=FILE cache test results in FILE --help print this message --no-create do not create output files --quiet, --silent do not print \`checking...' messages --version print the version of autoconf that created configure Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] --bindir=DIR user executables in DIR [EPREFIX/bin] --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] --libexecdir=DIR program executables in DIR [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data in DIR [PREFIX/share] --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data in DIR [PREFIX/com] --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] --infodir=DIR info documentation in DIR [PREFIX/info] --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names EOF cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] --target=TARGET configure for TARGET [TARGET=HOST] Features and packages: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR EOF if test -n "$ac_help"; then echo "--enable and --with options recognized:$ac_help" fi exit 0 ;; -host | --host | --hos | --ho) ac_prev=host ;; -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir="$ac_optarg" ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir="$ac_optarg" ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir="$ac_optarg" ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir="$ac_optarg" ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir="$ac_optarg" ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir="$ac_optarg" ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir="$ac_optarg" ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix="$ac_optarg" ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix="$ac_optarg" ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix="$ac_optarg" ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name="$ac_optarg" ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir="$ac_optarg" ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir="$ac_optarg" ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site="$ac_optarg" ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir="$ac_optarg" ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target="$ac_optarg" ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers) echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` case "$ac_option" in *=*) ;; *) ac_optarg=yes ;; esac eval "with_${ac_package}='$ac_optarg'" ;; -without-* | --without-*) ac_package=`echo $ac_option|sed -e 's/-*without-//'` # Reject names that are not valid shell variable names. if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } fi ac_package=`echo $ac_package| sed 's/-/_/g'` eval "with_${ac_package}=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes="$ac_optarg" ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries="$ac_optarg" ;; -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi if test "x$nonopt" != xNONE; then { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } fi nonopt="$ac_option" ;; esac done if test -n "$ac_prev"; then { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } fi trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 # File descriptor usage: # 0 standard input # 1 file creation # 2 errors and warnings # 3 some systems may open it to /dev/tty # 4 used on the Kubota Titan # 6 checking for... messages and results # 5 compiler messages saved in config.log if test "$silent" = yes; then exec 6>/dev/null else exec 6>&1 fi exec 5>./config.log echo "\ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. " 1>&5 # Strip out --no-create and --no-recursion so they do not pile up. # Also quote any args containing shell metacharacters. ac_configure_args= for ac_arg do case "$ac_arg" in -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c) ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) ac_configure_args="$ac_configure_args '$ac_arg'" ;; *) ac_configure_args="$ac_configure_args $ac_arg" ;; esac done # NLS nuisances. # Only set these to C if already set. These must not be set unconditionally # because not all systems understand e.g. LANG=C (notably SCO). # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! # Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo > confdefs.h # A filename unique to this package, relative to the directory that # configure is in, which we can look for to find out if srcdir is correct. ac_unique_file=dns_browse # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_prog=$0 ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } else { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } fi fi srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then echo "loading site script $ac_site_file" . "$ac_site_file" fi done if test -r "$cache_file"; then echo "loading cache $cache_file" . $cache_file else echo "creating cache $cache_file" > $cache_file fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then ac_n= ac_c=' ' ac_t=' ' else ac_n=-n ac_c= ac_t= fi else ac_n= ac_c='\c' ac_t= fi package=dns_browse old_path=$PATH PATH=`echo $PATH|sed -e 's/^\.://' -e 's/:\.://' -e 's/:\.//'` if test "x$prefix" = xNONE; then echo $ac_n "checking for prefix by $ac_c" 1>&6 # Extract the first word of "dns_browse", so it can be a program name with args. set dummy dns_browse; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:533: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_DNS_BROWSE'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$DNS_BROWSE" in /*) ac_cv_path_DNS_BROWSE="$DNS_BROWSE" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_DNS_BROWSE="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" ;; esac fi DNS_BROWSE="$ac_cv_path_DNS_BROWSE" if test -n "$DNS_BROWSE"; then echo "$ac_t""$DNS_BROWSE" 1>&6 else echo "$ac_t""no" 1>&6 fi if test -n "$ac_cv_path_DNS_BROWSE"; then prefix=`echo $ac_cv_path_DNS_BROWSE|sed 's%/[^/][^/]*//*[^/][^/]*$%%'` fi fi PATH=$old_path for ac_prog in wish wish8.1 wish8.0 wish4.2 wish4.1 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:573: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_WISH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$WISH" in /*) ac_cv_path_WISH="$WISH" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_WISH="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" ;; esac fi WISH="$ac_cv_path_WISH" if test -n "$WISH"; then echo "$ac_t""$WISH" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$WISH" && break done test -n "$WISH" || WISH="no" wish_vers=`echo 'global tk_version; puts $tk_version;exit 0'|$WISH` case $wish_vers in 123.*) wish=no;; esac if test "$WISH" = no; then { echo "configure: error: $package requires tk 4.0 or later." 1>&2; exit 1; } fi for ac_prog in perl perl5 do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 echo "configure:618: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else case "$PERL" in /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERL="$ac_dir/$ac_word" break fi done IFS="$ac_save_ifs" ;; esac fi PERL="$ac_cv_path_PERL" if test -n "$PERL"; then echo "$ac_t""$PERL" 1>&6 else echo "$ac_t""no" 1>&6 fi test -n "$PERL" && break done test -n "$PERL" || PERL="no" perl_vers=`$PERL -e 'print $]'` case $perl_vers in 1234.*) perl=no;; esac if test "$PERL" = no; then { echo "configure: error: $package requires perl 5.0 or later." 1>&2; exit 1; } fi ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break fi done if test -z "$ac_aux_dir"; then { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 echo "configure:691: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. for ac_prog in ginstall installbsd scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" break 2 fi fi done ;; esac done IFS="$ac_save_IFS" fi if test "${ac_cv_path_install+set}" = set; then INSTALL="$ac_cv_path_install" else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL="$ac_install_sh" fi fi echo "$ac_t""$INSTALL" 1>&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' trap '' 1 2 15 cat > confcache <<\EOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs. It is not useful on other systems. # If it contains results you don't want to keep, you may remove or edit it. # # By default, configure uses ./config.cache as the cache file, # creating it if it does not exist already. You can give configure # the --cache-file=FILE option to use a different cache file; that is # what configure does when it calls configure scripts in # subdirectories, so they share the cache. # Giving --cache-file=/dev/null disables caching, for debugging configure. # config.status only pays attention to the cache file if you give it the # --recheck option to rerun configure. # EOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | case `(ac_space=' '; set) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). sed -n \ -e "s/'/'\\\\''/g" \ -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' ;; esac >> confcache if cmp -s $cache_file confcache; then : else if test -w $cache_file; then echo "updating cache $cache_file" cat confcache > $cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Any assignment to VPATH causes Sun make to only execute # the first set of double-colon rules, so remove it if not needed. # If there is a colon in the path, we need to keep it. if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' fi trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. cat > conftest.defs <<\EOF s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g s%\[%\\&%g s%\]%\\&%g s%\$%$$%g EOF DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '` rm -f conftest.defs # Without the "./", some shells look in PATH for config.status. : ${CONFIG_STATUS=./config.status} echo creating $CONFIG_STATUS rm -f $CONFIG_STATUS cat > $CONFIG_STATUS </dev/null | sed 1q`: # # $0 $ac_configure_args # # Compiler output produced by configure, useful for debugging # configure, is in ./config.log if it exists. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" for ac_option do case "\$ac_option" in -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; *) echo "\$ac_cs_usage"; exit 1 ;; esac done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g s%@bindir@%$bindir%g s%@sbindir@%$sbindir%g s%@libexecdir@%$libexecdir%g s%@datadir@%$datadir%g s%@sysconfdir@%$sysconfdir%g s%@sharedstatedir@%$sharedstatedir%g s%@localstatedir@%$localstatedir%g s%@libdir@%$libdir%g s%@includedir@%$includedir%g s%@oldincludedir@%$oldincludedir%g s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@package@%$package%g s%@DNS_BROWSE@%$DNS_BROWSE%g s%@WISH@%$WISH%g s%@PERL@%$PERL%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g CEOF EOF cat >> $CONFIG_STATUS <<\EOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. ac_file=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_cmds # Line after last line for current file. ac_more_lines=: ac_sed_cmds="" while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file else sed "${ac_end}q" conftest.subs > conftest.s$ac_file fi if test ! -s conftest.s$ac_file; then ac_more_lines=false rm -f conftest.s$ac_file else if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f conftest.s$ac_file" else ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" fi ac_file=`expr $ac_file + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_cmds` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then # The file is in a subdirectory. test ! -d "$ac_dir" && mkdir "$ac_dir" ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" # A "../" for each directory in $ac_dir_suffix. ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` else ac_dir_suffix= ac_dots= fi case "$ac_given_srcdir" in .) srcdir=. if test -z "$ac_dots"; then top_srcdir=. else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; *) # Relative path. srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" top_srcdir="$ac_dots$ac_given_srcdir" ;; esac case "$ac_given_INSTALL" in [/$]*) INSTALL="$ac_given_INSTALL" ;; *) INSTALL="$ac_dots$ac_given_INSTALL" ;; esac echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." case "$ac_file" in *Makefile*) ac_comsub="1i\\ # $configure_input" ;; *) ac_comsub= ;; esac ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g s%@INSTALL@%$INSTALL%g " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done rm -f conftest.s* EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF chmod +x $CONFIG_STATUS rm -fr confdefs* $ac_clean_files test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 dns-browse-1.9.orig/configure.in0100444000176500001450000000153306441103077015411 0ustar jfsjuntadnl Process this file with autoconf to produce a configure script. AC_INIT(dns_browse) AC_SUBST(package) package=dns_browse dnl remove dot from the path to make AC_PREFIX_PROGRAM work old_path=$PATH PATH=`echo $PATH|sed -e 's/^\.://' -e 's/:\.://' -e 's/:\.//'` AC_PREFIX_PROGRAM(dns_browse) PATH=$old_path dnl dnl Find wish*. AC_PATH_PROGS(WISH, wish wish8.1 wish8.0 wish4.2 wish4.1, no) wish_vers=`echo 'global tk_version; puts $tk_version;exit 0'|$WISH` case $wish_vers in [123].*) wish=no;; esac if test "$WISH" = no; then AC_MSG_ERROR($package requires tk 4.0 or later.) fi dnl dnl Find perl*. AC_PATH_PROGS(PERL, perl perl5, no) perl_vers=`$PERL -e 'print $]'` case $perl_vers in [1234].*) perl=no;; esac if test "$PERL" = no; then AC_MSG_ERROR($package requires perl 5.0 or later.) fi AC_SUBST(bindir) AC_PROG_INSTALL AC_OUTPUT(Makefile) dns-browse-1.9.orig/install-sh0100555000176500001450000001124406432767216015117 0ustar jfsjunta#! /bin/sh # # install - install a program, script, or datafile # This comes from X11R5. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. # # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" tranformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 dns-browse-1.9.orig/release0100444000176500001450000000000407467766511014454 0ustar jfsjunta1.9