Clean away $config{no_shared} since we have $disabled{shared}
authorRichard Levitte <levitte@openssl.org>
Mon, 22 Feb 2016 12:52:46 +0000 (13:52 +0100)
committerRichard Levitte <levitte@openssl.org>
Mon, 22 Feb 2016 15:36:58 +0000 (16:36 +0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Configurations/10-main.conf
Configurations/README
Configurations/common.tmpl
Configurations/descrip.mms.tmpl
Configurations/unix-Makefile.tmpl
Configure
Makefile.in
VMS/openssl_shutdown.com.in
VMS/openssl_startup.com.in

index 312aac5b22e8447d3cf881d4cb899c5884134911..a3dfcfdc66c956df84bcc2f8711b05b43bbe5ccd 100644 (file)
 #### MinGW
     "mingw" => {
         inherit_from     => [ asm("x86_asm"),
 #### MinGW
     "mingw" => {
         inherit_from     => [ asm("x86_asm"),
-                              sub { $config{no_shared} ? () : "x86_uplink" } ],
+                              sub { $disabled{shared} ? () : "x86_uplink" } ],
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
         debug_cflags     => "-g -O0",
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE -m32 -Wall",
         debug_cflags     => "-g -O0",
index 454c8f375ea9352879b0deaf671d4dfb7c69ab78..c031884896065fe25bdccfa2f9b53ee1b5fb534b 100644 (file)
@@ -430,7 +430,7 @@ example, the above would have "something" used, since 1 is true.
 Together with the use of Text::Template, this can be used as
 conditions based on something in the passed variables, for example:
 
 Together with the use of Text::Template, this can be used as
 conditions based on something in the passed variables, for example:
 
-    IF[{- $config{no_shared} -}]
+    IF[{- $disabled{shared} -}]
       LIBS=libcrypto
       SOURCE[libcrypto]=...
     ELSE
       LIBS=libcrypto
       SOURCE[libcrypto]=...
     ELSE
index 196441c2678b60dc7ca6521426def6fe48ab745a..f8f37ae1d9b834ecc60eac860c9f8f3ace2cfe94 100644 (file)
@@ -54,7 +54,7 @@
  # built.
  sub dolib {
      my $lib = shift;
  # built.
  sub dolib {
      my $lib = shift;
-     if (!$config{no_shared}) {
+     unless ($disabled{shared}) {
          my %ordinals =
              $unified_info{ordinals}->{$lib}
              ? (ordinals => $unified_info{ordinals}->{$lib}) : ();
          my %ordinals =
              $unified_info{ordinals}->{$lib}
              ? (ordinals => $unified_info{ordinals}->{$lib}) : ();
index 279400cfc93617898ec15cbbe04d3310c3f01795..c2eed1178bb86cb7a0efdd299b413cb3cc6e3870 100644 (file)
@@ -296,12 +296,12 @@ install_dev : check_INSTALLTOP
         {- join("\n        ",
                 map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" }
                 @{$unified_info{libraries}}) -}
         {- join("\n        ",
                 map { "COPY/PROT=W:R $_.OLB ossl_installroot:[LIB.'arch']" }
                 @{$unified_info{libraries}}) -}
-        @ {- output_off() if $config{no_shared}; "" -} !
+        @ {- output_off() if $disabled{shared}; "" -} !
         {- join("\n        ",
                 map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[LIB.'arch']" }
                 map { $unified_info{sharednames}->{$_} || () }
                 @{$unified_info{libraries}}) -}
         {- join("\n        ",
                 map { "COPY/PROT=W:RE $_.EXE ossl_installroot:[LIB.'arch']" }
                 map { $unified_info{sharednames}->{$_} || () }
                 @{$unified_info{libraries}}) -}
-        @ {- output_on() if $config{no_shared}; "" -} !
+        @ {- output_on() if $disabled{shared}; "" -} !
 
 install_runtime : check_INSTALLTOP
         @ WRITE SYS$OUTPUT "*** Installing runtime files"
 
 install_runtime : check_INSTALLTOP
         @ WRITE SYS$OUTPUT "*** Installing runtime files"
@@ -363,7 +363,7 @@ vmsconfig.pm : configdata.pm
         WRITE CONFIG "our %config = ("
         WRITE CONFIG "  target => '{- $config{target} -}',"
         WRITE CONFIG "  version => '$(MAJOR).$(MINOR)',"
         WRITE CONFIG "our %config = ("
         WRITE CONFIG "  target => '{- $config{target} -}',"
         WRITE CONFIG "  version => '$(MAJOR).$(MINOR)',"
-        WRITE CONFIG "  no_shared => '","{- $config{no_shared} -}","',"
+        WRITE CONFIG "  no_shared => '","{- $disabled{shared} -}","',"
         WRITE CONFIG "  INSTALLTOP => '$(INSTALLTOP)',"
         WRITE CONFIG "  OPENSSLDIR => '$(OPENSSLDIR)',"
         WRITE CONFIG "  pointersize => '","{- $target{pointersize} -}","',"
         WRITE CONFIG "  INSTALLTOP => '$(INSTALLTOP)',"
         WRITE CONFIG "  OPENSSLDIR => '$(OPENSSLDIR)',"
         WRITE CONFIG "  pointersize => '","{- $target{pointersize} -}","',"
@@ -470,10 +470,10 @@ EOF
       my $libn = basename($lib);
       (my $mkdef_key = $libn) =~ s/^${osslprefix_q}lib//i;
       my @deps = map {
       my $libn = basename($lib);
       (my $mkdef_key = $libn) =~ s/^${osslprefix_q}lib//i;
       my @deps = map {
-          $config{no_shared} ? $_.".OLB"
+          $disabled{shared} ? $_.".OLB"
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @deps);
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @deps);
-      my $shlib_target = $config{no_shared} ? "" : $target{shared_target};
+      my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
       my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : "";
       my $engine_opt = abs2rel(rel2abs(catfile($config{sourcedir},
                                                "VMS", "engine.opt")),
       my $ordinalsfile = defined($args{ordinals}) ? $args{ordinals}->[1] : "";
       my $engine_opt = abs2rel(rel2abs(catfile($config{sourcedir},
                                                "VMS", "engine.opt")),
@@ -522,10 +522,10 @@ EOF
       (my $libn_nolib = $libn) =~ s/^lib//;
       my @objs = map { "$_.OBJ" } @{$args{objs}};
       my @deps = map {
       (my $libn_nolib = $libn) =~ s/^lib//;
       my @objs = map { "$_.OBJ" } @{$args{objs}};
       my @deps = map {
-          $config{no_shared} ? $_.".OLB"
+          $disabled{shared} ? $_.".OLB"
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @objs, @deps);
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @objs, @deps);
-      my $shlib_target = $config{no_shared} ? "" : $target{shared_target};
+      my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
       my $engine_opt = abs2rel(rel2abs(catfile($config{sourcedir},
                                                "VMS", "engine.opt")),
                                rel2abs($config{builddir}));
       my $engine_opt = abs2rel(rel2abs(catfile($config{sourcedir},
                                                "VMS", "engine.opt")),
                                rel2abs($config{builddir}));
@@ -572,7 +572,7 @@ EOF
       my $binn = basename($bin);
       my @objs = map { "$_.OBJ" } @{$args{objs}};
       my @deps = map {
       my $binn = basename($bin);
       my @objs = map { "$_.OBJ" } @{$args{objs}};
       my @deps = map {
-          $config{no_shared} ? $_.".OLB"
+          $disabled{shared} ? $_.".OLB"
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @objs, @deps);
       # The "[]" hack is because in .OPT files, each line inherits the
               : $unified_info{sharednames}->{$_}.".EXE"; } @{$args{deps}};
       my $deps = join(", -\n\t\t", @objs, @deps);
       # The "[]" hack is because in .OPT files, each line inherits the
index b591c4da20529d28c46671b500c7e7eb829c8ef7..339c733ba18e0962f2d691f8a2c844faae6ba631 100644 (file)
      # removed.  On some systems, they may therefore return the exact same
      # string.
      sub shlib {
      # removed.  On some systems, they may therefore return the exact same
      # string.
      sub shlib {
-         return () if $config{no_shared};
+         return () if $disabled{shared};
          my $lib = shift;
          return $unified_info{sharednames}->{$lib} . $shlibext;
      }
      sub shlib_simple {
          my $lib = shift;
          return $unified_info{sharednames}->{$lib} . $shlibext;
      }
      sub shlib_simple {
-         return () if $config{no_shared};
+         return () if $disabled{shared};
 
          my $lib = shift;
          if (windowsdll()) {
 
          my $lib = shift;
          if (windowsdll()) {
@@ -320,7 +320,7 @@ install_dev:
                mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
                      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
                mv -f $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn.new \
                      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
-       @ : {- output_off() if $config{no_shared}; "" -}
+       @ : {- output_off() if $disabled{shared}; "" -}
        @set -e; for s in $(SHLIB_INFO); do \
                s1=`echo "$$s" | cut -f1 -d";"`; \
                s2=`echo "$$s" | cut -f2 -d";"`; \
        @set -e; for s in $(SHLIB_INFO); do \
                s1=`echo "$$s" | cut -f1 -d";"`; \
                s2=`echo "$$s" | cut -f2 -d";"`; \
@@ -344,7 +344,7 @@ install_dev:
                      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                : {- output_on() unless windowsdll(); "" -}; \
        done
                      $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                : {- output_on() unless windowsdll(); "" -}; \
        done
-       @ : {- output_on() if $config{no_shared}; "" -}
+       @ : {- output_on() if $disabled{shared}; "" -}
        @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
        @echo "install libcrypto.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
        @cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
        @$(PERL) $(SRCDIR)/util/mkdir-p.pl $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
        @echo "install libcrypto.pc -> $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
        @cp libcrypto.pc $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig
@@ -371,7 +371,7 @@ uninstall_dev:
                echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
                $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
                echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn"; \
                $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn; \
        done
-       @ : {- output_off() if $config{no_shared}; "" -}
+       @ : {- output_off() if $disabled{shared}; "" -}
        @set -e; for s in $(SHLIB_INFO); do \
                s1=`echo "$$s" | cut -f1 -d";"`; \
                s2=`echo "$$s" | cut -f2 -d";"`; \
        @set -e; for s in $(SHLIB_INFO); do \
                s1=`echo "$$s" | cut -f1 -d";"`; \
                s2=`echo "$$s" | cut -f2 -d";"`; \
@@ -389,7 +389,7 @@ uninstall_dev:
                $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                : {- output_on() unless windowsdll(); "" -}; \
        done
                $(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/$$fn2; \
                : {- output_on() unless windowsdll(); "" -}; \
        done
-       @ : {- output_on() if $config{no_shared}; "" -}
+       @ : {- output_on() if $disabled{shared}; "" -}
        @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
        @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
        @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
        @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc"
        @$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libcrypto.pc
        @echo "$(RM) $(DESTDIR)$(INSTALLTOP)/$(LIBDIR)/pkgconfig/libssl.pc"
@@ -832,7 +832,7 @@ configdata.pm: {- $config{build_file_template} -} $(SRCDIR)/Configure $(SRCDIR)/
   # Helper function to figure out dependencies on libraries
   # It takes a list of library names and outputs a list of dependencies
   sub compute_lib_depends {
   # Helper function to figure out dependencies on libraries
   # It takes a list of library names and outputs a list of dependencies
   sub compute_lib_depends {
-      if ($config{no_shared}) {
+      if ($disabled{shared}) {
           return map { $_.$libext } @_;
       }
 
           return map { $_.$libext } @_;
       }
 
@@ -969,7 +969,7 @@ EOF
                                     $d = "." if $d eq $f;
                                     (my $l = $f) =~ s/^lib//;
                                     " -L$d -l$l" } @{$args{deps}});
                                     $d = "." if $d eq $f;
                                     (my $l = $f) =~ s/^lib//;
                                     " -L$d -l$l" } @{$args{deps}});
-      my $shlib_target = $config{no_shared} ? "" : $target{shared_target};
+      my $shlib_target = $disabled{shared} ? "" : $target{shared_target};
       return <<"EOF";
 $bin$exeext: $objs $deps
        \$(RM) $bin$exeext
       return <<"EOF";
 $bin$exeext: $objs $deps
        \$(RM) $bin$exeext
index df492a2fb7730abad3387557f17c0acf65469c3f..2fdf06bd6559834f68e4c7c9ddcb7173e2d4c7d1 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -210,7 +210,6 @@ my $nofipscanistercheck=0;
 $config{baseaddr}="0xFB00000";
 my $no_threads=0;
 my $threads=0;
 $config{baseaddr}="0xFB00000";
 my $no_threads=0;
 my $threads=0;
-$config{no_shared}=0; # but "no-shared" is default
 my $zlib=1;      # but "no-zlib" is default
 my $no_rfc3779=0;
 my $no_asm=0;
 my $zlib=1;      # but "no-zlib" is default
 my $no_rfc3779=0;
 my $no_asm=0;
@@ -784,7 +783,7 @@ foreach (sort (keys %disabled))
        elsif (/^threads$/)
                { $no_threads = 1; }
        elsif (/^shared$/)
        elsif (/^threads$/)
                { $no_threads = 1; }
        elsif (/^shared$/)
-               { $config{no_shared} = 1; }
+               { }
        elsif (/^pic$/)
                { }
        elsif (/^zlib$/)
        elsif (/^pic$/)
                { }
        elsif (/^zlib$/)
@@ -1024,9 +1023,9 @@ if (defined($disabled{"deprecated"})) {
 if ($target{shared_target} eq "")
        {
        $no_shared_warn = 1
 if ($target{shared_target} eq "")
        {
        $no_shared_warn = 1
-           if ((!$config{no_shared} || !$disabled{"dynamic-engine"})
+           if ((!$disabled{shared} || !$disabled{"dynamic-engine"})
                && !$config{fips});
                && !$config{fips});
-       $config{no_shared} = 1;
+       $disabled{shared} = "no-shared-target";
        $disabled{pic} = $disabled{shared} = $disabled{"dynamic-engine"} =
            "no-shared-target";
        }
        $disabled{pic} = $disabled{shared} = $disabled{"dynamic-engine"} =
            "no-shared-target";
        }
@@ -1447,7 +1446,7 @@ EOF
 
         push @{$unified_info{rawlines}}, @rawlines;
 
 
         push @{$unified_info{rawlines}}, @rawlines;
 
-        if (!$config{no_shared}) {
+        unless ($disabled{shared}) {
             # Check sharednames.
             foreach (keys %sharednames) {
                 my $dest = cleanfile($buildd, $_, $blddir);
             # Check sharednames.
             foreach (keys %sharednames) {
                 my $dest = cleanfile($buildd, $_, $blddir);
index 9cca221cdd81e42117a9169872da914cf63ed29d..9513003506e95dc383db1e67d1b2c0e13edca159 100644 (file)
@@ -193,7 +193,7 @@ TOP=    .
 LIBS=   libcrypto.a libssl.a
 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 SHARED_SSL=libssl$(SHLIB_EXT)
 LIBS=   libcrypto.a libssl.a
 SHARED_CRYPTO=libcrypto$(SHLIB_EXT)
 SHARED_SSL=libssl$(SHLIB_EXT)
-SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' if (!$config{no_shared}) -}
+SHARED_LIBS={- '$(SHARED_CRYPTO) $(SHARED_SSL)' unless $disabled{shared} -}
 SHARED_CFLAG={- $target{shared_cflag} -}
 SHARED_LDFLAG={- $target{shared_ldflag}
                  # Unlike other OSes (like Solaris, Linux, Tru64,
 SHARED_CFLAG={- $target{shared_cflag} -}
 SHARED_LDFLAG={- $target{shared_ldflag}
                  # Unlike other OSes (like Solaris, Linux, Tru64,
index 85cc26da3bd341dfc842c2709cafc164248ec66f..236979eab22c57fc2c2972250576751a86239be5 100644 (file)
@@ -39,7 +39,7 @@ $     DEAS OSSL$LIB'v'
 $      DEAS OSSL$SHARE'v'
 $      DEAS OSSL$ENGINES'v'
 $      DEAS OSSL$EXE'v'
 $      DEAS OSSL$SHARE'v'
 $      DEAS OSSL$ENGINES'v'
 $      DEAS OSSL$EXE'v'
-$       {- output_off() if $config{no_shared} -}
+$       {- output_off() if $disabled{shared} -}
 $       {- join("\n\$       ", map { "DEAS $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      IF P2 .NES. "NOALIASES"
 $       {- join("\n\$       ", map { "DEAS $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      IF P2 .NES. "NOALIASES"
@@ -51,7 +51,7 @@ $         DEAS OSSL$SHARE
 $          DEAS OSSL$ENGINES
 $          DEAS OSSL$EXE
 $          DEAS OPENSSL
 $          DEAS OSSL$ENGINES
 $          DEAS OSSL$EXE
 $          DEAS OPENSSL
-$           {- output_off() if $config{no_shared} -}
+$           {- output_off() if $disabled{shared} -}
 $           {- join("\n\$           ", map { "DEAS $_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $           {- output_on() -}
 $      ENDIF
 $           {- join("\n\$           ", map { "DEAS $_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $           {- output_on() -}
 $      ENDIF
index a968b44d6c0f27ed2a29ebb174f5ad4e71ace97f..be3f38581edfb95d12cbbcac1858a7505f0f60c9 100644 (file)
@@ -88,7 +88,7 @@ $     DEF  OSSL$LIB'v'        OSSL$INSTROOT:['arch'.LIB]
 $      DEF  OSSL$SHARE'v'      OSSL$INSTROOT:['arch'.LIB]
 $      DEF  OSSL$ENGINES'v'    OSSL$INSTROOT:['arch'.ENGINES]
 $      DEF  OSSL$EXE'v'        OSSL$INSTROOT:['arch'.EXE]
 $      DEF  OSSL$SHARE'v'      OSSL$INSTROOT:['arch'.LIB]
 $      DEF  OSSL$ENGINES'v'    OSSL$INSTROOT:['arch'.ENGINES]
 $      DEF  OSSL$EXE'v'        OSSL$INSTROOT:['arch'.EXE]
-$       {- output_off() if $config{no_shared} -}
+$       {- output_off() if $disabled{shared} -}
 $       {- join("\n\$       ", map { "DEF  $_'v' OSSL\$SHARE:$_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      IF P2 .NES. "NOALIASES"
 $       {- join("\n\$       ", map { "DEF  $_'v' OSSL\$SHARE:$_" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      IF P2 .NES. "NOALIASES"
@@ -100,7 +100,7 @@ $       DEF OSSL$SHARE      OSSL$SHARE'v'
 $          DEF OSSL$ENGINES    OSSL$ENGINES'v'
 $          DEF OSSL$EXE        OSSL$EXE'v'
 $          DEF OPENSSL         OSSL$INCLUDE:[OPENSSL]
 $          DEF OSSL$ENGINES    OSSL$ENGINES'v'
 $          DEF OSSL$EXE        OSSL$EXE'v'
 $          DEF OPENSSL         OSSL$INCLUDE:[OPENSSL]
-$       {- output_off() if $config{no_shared} -}
+$       {- output_off() if $disabled{shared} -}
 $       {- join("\n\$           ", map { "DEF  $_ $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      ENDIF
 $       {- join("\n\$           ", map { "DEF  $_ $_'v'" } map { $unified_info{sharednames}->{$_} || () } @{$unified_info{libraries}}) -}
 $       {- output_on() -}
 $      ENDIF