View | Details | Raw Unified | Return to bug 58926
Collapse All | Expand All

(-)a/support/apxs.in (-28 / +26 lines)
Lines 168-188 $name = $opt_n if ($opt_n ne ''); Link Here
168
if (@opt_S) {
168
if (@opt_S) {
169
    my ($opt_S);
169
    my ($opt_S);
170
    foreach $opt_S (@opt_S) {
170
    foreach $opt_S (@opt_S) {
171
	if ($opt_S =~ m/^([^=]+)=(.*)$/) {
171
        if ($opt_S =~ m/^([^=]+)=(.*)$/) {
172
	    my ($var) = $1;
172
            my ($var) = $1;
173
	    my ($val) = $2;
173
            my ($val) = $2;
174
	    my $oldval = eval "\$CFG_$var";
174
            my $oldval = eval "\$CFG_$var";
175
175
176
	    unless ($var and $oldval) {
176
            unless ($var and $oldval) {
177
		print STDERR "apxs:Error: no config variable $var\n";
177
                print STDERR "apxs:Error: no config variable $var\n";
178
		&usage;
178
                &usage;
179
	    }
179
            }
180
180
181
	    eval "\$CFG_${var}=\"${val}\"";
181
            eval "\$CFG_${var}=\"${val}\"";
182
	} else {
182
        } else {
183
	    print STDERR "apxs:Error: malformatted -S option\n";
183
            print STDERR "apxs:Error: malformatted -S option\n";
184
	    &usage;
184
            &usage;
185
	}	
185
        }
186
    }
186
    }
187
}
187
}
188
188
Lines 302-328 if ($opt_g) { Link Here
302
302
303
if ($opt_q) {
303
if ($opt_q) {
304
    ##
304
    ##
305
    ##  QUERY INFORMATION 
305
    ##  QUERY INFORMATION
306
    ##
306
    ##
307
    my $result;
307
    my $result;
308
    if ($#args >= 0) { 
308
    if ($#args >= 0) {
309
        $result = get_vars(@args);
309
        $result = get_vars(@args);
310
        print "$result\n";
310
        print "$result\n";
311
    } else {
311
    } else {
312
        # -q without var name prints all variables and their values
312
        # -q without var name prints all variables and their values
313
        
313
314
        # Additional -v pretty-prints output
314
        # Additional -v pretty-prints output
315
        if ($opt_v) {
315
        if ($opt_v) {
316
            # Variable names in alphabetic order
316
            # Variable names in alphabetic order
317
            my @vars = sort {uc($a) cmp uc($b)} keys %config_vars;
317
            my @vars = sort {uc($a) cmp uc($b)} keys %config_vars;
318
            
318
319
            # Make the left column as wide as the longest variable name
319
            # Make the left column as wide as the longest variable name
320
            my $width = 0;
320
            my $width = 0;
321
            foreach (@vars) {
321
            foreach (@vars) {
322
                my $l = length $_; 
322
                my $l = length $_;
323
                $width = $l unless ($l <= $width);
323
                $width = $l unless ($l <= $width);
324
            }
324
            }
325
    
325
326
            foreach (@vars) {
326
            foreach (@vars) {
327
                printf "%-${width}s = %s\n", $_, $config_vars{$_};
327
                printf "%-${width}s = %s\n", $_, $config_vars{$_};
328
            }
328
            }
Lines 434-440 if ($opt_c) { Link Here
434
434
435
    #   create link command
435
    #   create link command
436
    my $o;
436
    my $o;
437
    my $lo;	
437
    my $lo;
438
    foreach $o (@objs) {
438
    foreach $o (@objs) {
439
        $lo .= " $o";
439
        $lo .= " $o";
440
    }
440
    }
Lines 452-458 if ($opt_c) { Link Here
452
452
453
    my $ldflags = "$CFG_LDFLAGS";
453
    my $ldflags = "$CFG_LDFLAGS";
454
    if ($opt_p == 1) {
454
    if ($opt_p == 1) {
455
        
456
        my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
455
        my $apr_libs=`$apr_config --cflags --ldflags --link-libtool --libs`;
457
        chomp($apr_libs);
456
        chomp($apr_libs);
458
        my $apu_libs="";
457
        my $apu_libs="";
Lines 460-466 if ($opt_c) { Link Here
460
            $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
459
            $apu_libs=`$apu_config --ldflags --link-libtool --libs`;
461
            chomp($apu_libs);
460
            chomp($apu_libs);
462
        }
461
        }
463
        
462
464
        $opt .= " ".$apu_libs." ".$apr_libs;
463
        $opt .= " ".$apu_libs." ".$apr_libs;
465
    }
464
    }
466
    else {
465
    else {
Lines 501-509 if ($opt_i or $opt_e) { Link Here
501
        #  use .so unambigiously for installed shared library modules
500
        #  use .so unambigiously for installed shared library modules
502
        $t =~ s|\.[^./\\]+$|\.so|;
501
        $t =~ s|\.[^./\\]+$|\.so|;
503
        if ($opt_i) {
502
        if ($opt_i) {
504
	    push(@cmds, "$installbuilddir/instdso.sh SH_LIBTOOL='" .
503
            push(@cmds, "$installbuilddir/instdso.sh SH_LIBTOOL='" .
505
                 "$libtool' $f $CFG_LIBEXECDIR");
504
                 "$libtool' $f $CFG_LIBEXECDIR");
506
	    push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
505
            push(@cmds, "chmod 755 $CFG_LIBEXECDIR/$t");
507
        }
506
        }
508
507
509
        #   determine module symbolname (if we're activating it)
508
        #   determine module symbolname (if we're activating it)
Lines 645-651 if ($opt_i or $opt_e) { Link Here
645
            } else {
644
            } else {
646
                notice("unable to open configuration file");
645
                notice("unable to open configuration file");
647
            }
646
            }
648
	}
647
        }
649
    }
648
    }
650
}
649
}
651
650
652
- 

Return to bug 58926