~ubuntu-branches/ubuntu/precise/net-snmp/precise

« back to all changes in this revision

Viewing changes to win32/build.pl

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-11-26 01:27:00 UTC
  • mfrom: (1.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091126012700-pox7w0a5j2x305h9
Tags: 5.4.2.1~dfsg-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - Set Ubuntu maintainer address.
  - net-snmp-config: Use bash. (LP: #104738)
  - Removed multiuser option when calling update-rc.d. (LP: #254261)
  - debian/snmpd.init: LSBify the init script.
  - debian/patches/52_fix_snmpcmd_1_typo.patch: Adjust a typo in snmpcmd.1
    (LP: #250459)
  - debian/patches/99-fix-ubuntu-div0.patch: Fix dvision by zero.
    (LP: #426813).
 * Dropped patches:
   - debian/patches/101-fix-ipalias.patch: Applied upstream.
   - debian/patches/99-fix-net-snmp-syslog.patch: Applied upstream.
   - debian/patches/99-fix-perl-counter-in-subagent.patch: Applied upstream.
   - ebian/patches/103-fix-ubuntu-lmsensors.patch: No longer needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
# Written by Alex Burger - alex_b@users.sourceforge.net
5
5
# March 12th, 2004
6
6
#
 
7
use strict;
7
8
my $openssl = "disabled";
8
9
my $b_ipv6 = "disabled";
 
10
my $b_winextdll = "disabled";
9
11
my $sdk = "disabled";
10
12
my $default_install_base = "c:/usr";
11
13
my $install_base = $default_install_base;
18
20
my $configOpts = "";
19
21
my $cTmp = "";
20
22
my $linktype = "static";
 
23
my $option;
21
24
 
22
25
# Prepend win32\ if running from main directory
23
26
my $current_pwd = `%COMSPEC% /c cd`;
49
52
  print "\n";
50
53
  print "7.  Quiet build (logged):           " . $logging . "\n";
51
54
  print "8.  Debug mode:                     " . $debug . "\n";
 
55
  print "\n";
52
56
  print "9.  IPv6 transports (requires SDK): " . $b_ipv6 . "\n";
53
 
  print "\n";
54
 
  print "10. Link type:                      " . $linktype . "\n";
55
 
  print "\n";
56
 
  print "11. Install development files       " . $install_devel . "\n";
 
57
  print "10. winExtDLL agent (requires SDK): " . $b_winextdll . "\n";
 
58
  print "\n";
 
59
  print "11. Link type:                      " . $linktype . "\n";
 
60
  print "\n";
 
61
  print "12. Install development files       " . $install_devel . "\n";
57
62
  print "\nF.  Finished - start build\n";
58
63
  print "Q.  Quit - abort build\n\n";
59
64
  print "Select option to set / toggle: ";
87
92
      }
88
93
    }
89
94
  }
 
95
  elsif ($option eq "10") {
 
96
    if ($b_winextdll eq "enabled") {
 
97
      $b_winextdll = "disabled";
 
98
    }
 
99
    else {
 
100
      $b_winextdll = "enabled";
 
101
      if ($sdk = "disabled") {
 
102
        print "\n\n* SDK required for IPv6 and has been automatically enabled";
 
103
        $sdk = "enabled";
 
104
      }
 
105
    }
 
106
  }
90
107
  elsif ($option eq "3") {
91
108
    print "Please enter the new install path [$default_install_base]: ";
92
109
    chomp ($install_base = <>);
103
120
      $install = "enabled";
104
121
    }
105
122
  }
106
 
  elsif ($option eq "11") {
 
123
  elsif ($option eq "12") {
107
124
    if ($install_devel eq "enabled") {
108
125
      $install_devel = "disabled";
109
126
    }
143
160
      $debug = "enabled";
144
161
    }
145
162
  }
146
 
  elsif ($option eq "10") {
 
163
  elsif ($option eq "11") {
147
164
    if ($linktype eq "static") {
148
165
      $linktype = "dynamic";
149
166
    }
165
182
$configOpts = "$configOpts $cTmp";
166
183
$cTmp = ($b_ipv6 eq "enabled" ? "--with-ipv6" : "" );
167
184
$configOpts = "$configOpts $cTmp";
 
185
$cTmp = ($b_winextdll eq "enabled" ? "--with-winextdll" : "" );
 
186
$configOpts = "$configOpts $cTmp";
168
187
$cTmp = ($debug eq "enabled" ? "--config=debug" : "--config=release" );
169
188
$configOpts = "$configOpts $cTmp";
170
189
 
185
204
# the configuration files.
186
205
# See the note about environment variables in the Win32 section of 
187
206
# perl/SNMP/README for details on why this is needed. 
188
 
$ENV{SNMPCONFPATH}=t;$ENV{SNMPCONFPATH};
 
207
$ENV{SNMPCONFPATH}="t";$ENV{SNMPCONFPATH};
189
208
 
190
209
print "\nBuilding...\n";
191
210
 
279
298
    system("nmake /nologo perl_clean"); # If already cleaned, Makefile is gone so don't worry about errors!
280
299
    system("nmake /nologo perl") == 0 || die "Build error (see above)";
281
300
 
282
 
    $path_old = $ENV{PATH};
 
301
    my $path_old = $ENV{PATH};
283
302
    $ENV{PATH} = "$current_pwd\\bin\\" . ($debug eq "enabled" ? "debug" : "release" ) . ";$ENV{PATH}";
284
303
    system("nmake /nologo perl_test"); # Don't die if all the tests don't pass..
285
304
    $ENV{PATH} = $path_old;