This message goes to openssl-dev and not to rt as I'd like to discuss
couple of issues before the code is committed.

> And even better news are that it appears to be possible to squeeze out a
> register at the cost of [presumably] slight performance degradation on
> Pentium II and earlier. So how does it sound? I mean that we omit cast
> assembler implementation in shared context and trade some DES
> performance on PII?

My biggest concern is how the patch will affect Windows. To start with
note that 'picmeup is not defined in crypto/perlasm/x86[ms|nasm].pl, but
it's OK as it's never called in that context because of "if($cpp)". In
Windows context &lea($trans,&DWP("DES_SPtrans")); is called. This is the
one that needs explicit testing under Windows so feedback from Windows
developer is *required*. And even more generally how is it with PIC
under Windows anyway? Is it an issue?

'picmeup notes. The generated code is supposed to be preprocessed and
PIC code is generated only if -DPIC option is passed to preprocessor. 

Moving on to crypto/des/Makefile.ssl. I examine current $CGLAGS looking
for "-.PIC" and if there is one, pass -DPIC down to preprocessor (so
that PIC code is generated, see above). Any objections to usage of awk?
Should we check for "-.pic" also?

Finally ./Configure modifications. As proposed I omit CAST assembler
module if shared build was requested. Then I add $shared_cflag to
$cflags *only* if a shared build was actually requested. Till now
$shared_cflags was added unconditionally which is not safe practice.
Remember when OpenSSH failed on Solaris and it turned to be that few
variables were not initialized? This is the very reason! In general it
works to link PIC code statically (like it was done in OpenSSH case),
but it's not *guaranteed* to work. So that if user didn't ask for shared
build, then we basically shouldn't pass -.PIC flag to compiler. Which
also means that even if user asked for shared build, apps/openssl and
tests are not compiled with -.PIC, but I don't touch this at this time.

There might be room for performance optimizations (reordering and
aligning of instructions), but that's just few percents.

A.
*** ./crypto/des/asm/des-586.pl.orig    Mon Mar  4 17:09:15 2002
--- ./crypto/des/asm/des-586.pl Fri Dec 13 10:31:44 2002
***************
*** 40,46 ****
  
        &comment("");
        &comment("Load the 2 words");
!       $ks="ebp";
  
        if ($do_ip)
                {
--- 40,46 ----
  
        &comment("");
        &comment("Load the 2 words");
!       $trans="ebp";
  
        if ($do_ip)
                {
***************
*** 72,78 ****
                &rotl($L,3);
                }
  
!       &mov(   $ks,            &wparam(1)      );
        &cmp("ebx","0");
        &je(&label("start_decrypt"));
  
--- 72,82 ----
                &rotl($L,3);
                }
  
!       # PIC-ification:-)
!       if ($cpp)       { &picmeup($trans,"DES_SPtrans");   }
!       else            { &lea($trans,&DWP("DES_SPtrans")); }
! 
!       &mov(   "ecx",  &wparam(1)      );
        &cmp("ebx","0");
        &je(&label("start_decrypt"));
  
***************
*** 80,90 ****
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT($i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
  
                &comment("");
                &comment("Round ".sprintf("%d",$i+1));
!               
&D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
                }
        &jmp(&label("end"));
  
--- 84,94 ----
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT($i,$L,$R,$i*2,$trans,"eax","ebx","ecx","edx");
  
                &comment("");
                &comment("Round ".sprintf("%d",$i+1));
!               &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$trans,"eax","ebx","ecx","edx");
                }
        &jmp(&label("end"));
  
***************
*** 94,103 ****
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT(15-$i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
                &comment("");
                &comment("Round ".sprintf("%d",$i-1));
!               
&D_ENCRYPT(15-$i+1,$R,$L,($i-1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
                }
  
        &set_label("end");
--- 98,107 ----
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT(15-$i,$L,$R,$i*2,$trans,"eax","ebx","ecx","edx");
                &comment("");
                &comment("Round ".sprintf("%d",$i-1));
!               &D_ENCRYPT(15-$i+1,$R,$L,($i-1)*2,$trans,"eax","ebx","ecx","edx");
                }
  
        &set_label("end");
***************
*** 134,176 ****
  
  sub D_ENCRYPT
        {
!       local($r,$L,$R,$S,$ks,$desSP,$u,$tmp1,$tmp2,$t)=@_;
  
!        &mov(  $u,             &DWP(&n2a($S*4),$ks,"",0));
        &xor(   $tmp1,          $tmp1);
!        &mov(  $t,             &DWP(&n2a(($S+1)*4),$ks,"",0));
        &xor(   $u,             $R);
         &xor(  $t,             $R);
        &and(   $u,             "0xfcfcfcfc"    );
         &and(  $t,             "0xcfcfcfcf"    );
        &movb(  &LB($tmp1),     &LB($u) );
         &movb( &LB($tmp2),     &HB($u) );
        &rotr(  $t,             4               );
!       &mov(   $ks,            &DWP("      $desSP",$tmp1,"",0));
         &movb( &LB($tmp1),     &LB($t) );
!       &xor(   $L,             $ks);
!        &mov(  $ks,            &DWP("0x200+$desSP",$tmp2,"",0));
!       &xor(   $L,             $ks); ######
         &movb( &LB($tmp2),     &HB($t) );
        &shr(   $u,             16);
!        &mov(  $ks,            &DWP("0x100+$desSP",$tmp1,"",0));
!       &xor(   $L,             $ks); ######
         &movb( &LB($tmp1),     &HB($u) );
        &shr(   $t,             16);
!        &mov(  $ks,            &DWP("0x300+$desSP",$tmp2,"",0));
!       &xor(   $L,             $ks);
!        &mov(  $ks,            &wparam(1)      );
        &movb(  &LB($tmp2),     &HB($t) );
         &and(  $u,             "0xff"  );
        &and(   $t,             "0xff"  );
!        &mov(  $tmp1,          &DWP("0x600+$desSP",$tmp1,"",0));
!       &xor(   $L,             $tmp1);
!        &mov(  $tmp1,          &DWP("0x700+$desSP",$tmp2,"",0));
!       &xor(   $L,             $tmp1);
!        &mov(  $tmp1,          &DWP("0x400+$desSP",$u,"",0));
!       &xor(   $L,             $tmp1);
!        &mov(  $tmp1,          &DWP("0x500+$desSP",$t,"",0));
!       &xor(   $L,             $tmp1);
        }
  
  sub n2a
--- 138,173 ----
  
  sub D_ENCRYPT
        {
!       local($r,$L,$R,$S,$trans,$u,$tmp1,$tmp2,$t)=@_;
  
!        &mov(  $u,             &DWP(&n2a($S*4),$tmp2,"",0));
        &xor(   $tmp1,          $tmp1);
!        &mov(  $t,             &DWP(&n2a(($S+1)*4),$tmp2,"",0));
        &xor(   $u,             $R);
+       &xor(   $tmp2,          $tmp2);
         &xor(  $t,             $R);
        &and(   $u,             "0xfcfcfcfc"    );
         &and(  $t,             "0xcfcfcfcf"    );
        &movb(  &LB($tmp1),     &LB($u) );
         &movb( &LB($tmp2),     &HB($u) );
        &rotr(  $t,             4               );
!       &xor(   $L,             &DWP("     ",$trans,$tmp1,0));
         &movb( &LB($tmp1),     &LB($t) );
!        &xor(  $L,             &DWP("0x200",$trans,$tmp2,0));
         &movb( &LB($tmp2),     &HB($t) );
        &shr(   $u,             16);
!        &xor(  $L,             &DWP("0x100",$trans,$tmp1,0));
         &movb( &LB($tmp1),     &HB($u) );
        &shr(   $t,             16);
!        &xor(  $L,             &DWP("0x300",$trans,$tmp2,0));
        &movb(  &LB($tmp2),     &HB($t) );
         &and(  $u,             "0xff"  );
        &and(   $t,             "0xff"  );
!        &xor(  $L,             &DWP("0x600",$trans,$tmp1,0));
!        &xor(  $L,             &DWP("0x700",$trans,$tmp2,0));
!       &mov(   $tmp2,          &wparam(1)      );
!        &xor(  $L,             &DWP("0x400",$trans,$u,0));
!        &xor(  $L,             &DWP("0x500",$trans,$t,0));
        }
  
  sub n2a
*** ./crypto/des/asm/crypt586.pl.orig   Thu Dec 12 20:42:26 2002
--- ./crypto/des/asm/crypt586.pl        Fri Dec 13 10:31:47 2002
***************
*** 26,36 ****
  
        &comment("");
        &comment("Load the 2 words");
!       $ks="ebp";
  
        &xor(   $L,     $L);
        &xor(   $R,     $R);
!       &mov($ks,&wparam(1));
  
        &push(&DWC(25)); # add a variable
  
--- 26,42 ----
  
        &comment("");
        &comment("Load the 2 words");
!       $trans="ebp";
  
        &xor(   $L,     $L);
        &xor(   $R,     $R);
! 
!       # PIC-ification:-)
!       if ($cpp)       { &picmeup("edx","DES_SPtrans");   }
!       else            { &lea("edx",&DWP("DES_SPtrans")); }
!       &push("edx");
!       #
!       &mov($trans,&wparam(1));
  
        &push(&DWC(25)); # add a variable
  
***************
*** 39,49 ****
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT($i,$L,$R,$i*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
  
                &comment("");
                &comment("Round ".sprintf("%d",$i+1));
!               
&D_ENCRYPT($i+1,$R,$L,($i+1)*2,$ks,"DES_SPtrans","eax","ebx","ecx","edx");
                }
         &mov("ebx",    &swtmp(0));
        &mov("eax",     $L);
--- 45,55 ----
                {
                &comment("");
                &comment("Round $i");
!               &D_ENCRYPT($i,$L,$R,$i*2,$trans,"eax","ebx","ecx","edx");
  
                &comment("");
                &comment("Round ".sprintf("%d",$i+1));
!               &D_ENCRYPT($i+1,$R,$L,($i+1)*2,$trans,"eax","ebx","ecx","edx");
                }
         &mov("ebx",    &swtmp(0));
        &mov("eax",     $L);
***************
*** 61,74 ****
        &mov(&DWP(0,"edx","",0),"eax");
        &mov(&DWP(4,"edx","",0),$L);
  
!       &pop("ecx");    # remove variable
  
        &function_end($name);
        }
  
  sub D_ENCRYPT
        {
!       local($r,$L,$R,$S,$ks,$desSP,$u,$tmp1,$tmp2,$t)=@_;
  
        &mov(   $u,             &wparam(2));                    # 2
        &mov(   $t,             $R);
--- 67,80 ----
        &mov(&DWP(0,"edx","",0),"eax");
        &mov(&DWP(4,"edx","",0),$L);
  
!       &add("esp",8);  # remove variables
  
        &function_end($name);
        }
  
  sub D_ENCRYPT
        {
!       local($r,$L,$R,$S,$trans,$u,$tmp1,$tmp2,$t)=@_;
  
        &mov(   $u,             &wparam(2));                    # 2
        &mov(   $t,             $R);
***************
*** 85,93 ****
        &shl(   $tmp2,          16);                            # 1
        &xor(   $u,             $tmp1);                         # 2
        &xor(   $t,             $tmp2);                         # 2
!       &mov(   $tmp1,          &DWP(&n2a($S*4),$ks,"",0));     # 2
        &xor(   $u,             $tmp1);
!       &mov(   $tmp2,          &DWP(&n2a(($S+1)*4),$ks,"",0)); # 2
        &xor(   $u,             $R);
        &xor(   $t,             $R);
        &xor(   $t,             $tmp2);
--- 91,99 ----
        &shl(   $tmp2,          16);                            # 1
        &xor(   $u,             $tmp1);                         # 2
        &xor(   $t,             $tmp2);                         # 2
!       &mov(   $tmp1,          &DWP(&n2a($S*4),$trans,"",0));  # 2
        &xor(   $u,             $tmp1);
!       &mov(   $tmp2,          &DWP(&n2a(($S+1)*4),$trans,"",0));      # 2
        &xor(   $u,             $R);
        &xor(   $t,             $R);
        &xor(   $t,             $tmp2);
***************
*** 99,129 ****
        &movb(  &LB($tmp1),     &LB($u) );
        &movb(  &LB($tmp2),     &HB($u) );
        &rotr(  $t,             4               );
!       &mov(   $ks,            &DWP("      $desSP",$tmp1,"",0));
        &movb(  &LB($tmp1),     &LB($t) );
!       &xor(   $L,             $ks);
!       &mov(   $ks,            &DWP("0x200+$desSP",$tmp2,"",0));
!       &xor(   $L,             $ks);
        &movb(  &LB($tmp2),     &HB($t) );
        &shr(   $u,             16);
!       &mov(   $ks,            &DWP("0x100+$desSP",$tmp1,"",0));
!       &xor(   $L,             $ks); 
        &movb(  &LB($tmp1),     &HB($u) );
        &shr(   $t,             16);
!       &mov(   $ks,            &DWP("0x300+$desSP",$tmp2,"",0));
!       &xor(   $L,             $ks);
!       &mov(   $ks,            &wparam(1));
        &movb(  &LB($tmp2),     &HB($t) );
        &and(   $u,             "0xff"  );
        &and(   $t,             "0xff"  );
!       &mov(   $tmp1,          &DWP("0x600+$desSP",$tmp1,"",0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x700+$desSP",$tmp2,"",0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x400+$desSP",$u,"",0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x500+$desSP",$t,"",0));
        &xor(   $L,             $tmp1);
        }
  
  sub n2a
--- 105,132 ----
        &movb(  &LB($tmp1),     &LB($u) );
        &movb(  &LB($tmp2),     &HB($u) );
        &rotr(  $t,             4               );
!       &mov(   $trans,         &swtmp(1));
!       &xor(   $L,             &DWP("     ",$trans,$tmp1,0));
        &movb(  &LB($tmp1),     &LB($t) );
!       &xor(   $L,             &DWP("0x200",$trans,$tmp2,0));
        &movb(  &LB($tmp2),     &HB($t) );
        &shr(   $u,             16);
!       &xor(   $L,             &DWP("0x100",$trans,$tmp1,0));
        &movb(  &LB($tmp1),     &HB($u) );
        &shr(   $t,             16);
!       &xor(   $L,             &DWP("0x300",$trans,$tmp2,0));
        &movb(  &LB($tmp2),     &HB($t) );
        &and(   $u,             "0xff"  );
        &and(   $t,             "0xff"  );
!       &mov(   $tmp1,          &DWP("0x600",$trans,$tmp1,0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x700",$trans,$tmp2,0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x400",$trans,$u,0));
        &xor(   $L,             $tmp1);
!       &mov(   $tmp1,          &DWP("0x500",$trans,$t,0));
        &xor(   $L,             $tmp1);
+       &mov(   $trans,         &wparam(1));
        }
  
  sub n2a
*** ./crypto/des/Makefile.ssl.orig      Wed Oct  9 16:05:08 2002
--- ./crypto/des/Makefile.ssl   Fri Dec 13 10:18:49 2002
***************
*** 67,85 ****
  
  # elf
  asm/dx86-elf.o: asm/dx86unix.cpp
!       $(CPP) -DELF -x c asm/dx86unix.cpp | as -o asm/dx86-elf.o
  
  asm/yx86-elf.o: asm/yx86unix.cpp
!       $(CPP) -DELF -x c asm/yx86unix.cpp | as -o asm/yx86-elf.o
  
  # solaris
  asm/dx86-sol.o: asm/dx86unix.cpp
!       $(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
        as -o asm/dx86-sol.o asm/dx86-sol.s
        rm -f asm/dx86-sol.s
  
  asm/yx86-sol.o: asm/yx86unix.cpp
!       $(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
        as -o asm/yx86-sol.o asm/yx86-sol.s
        rm -f asm/yx86-sol.s
  
--- 67,89 ----
  
  # elf
  asm/dx86-elf.o: asm/dx86unix.cpp
!       $(CPP) -DELF `echo $(CFLAGS) | awk '/-.PIC/{print"-DPIC"}'`     \
!               -x c asm/dx86unix.cpp | as -o asm/dx86-elf.o
  
  asm/yx86-elf.o: asm/yx86unix.cpp
!       $(CPP) -DELF `echo $(CFLAGS) | awk '/-.PIC/{print"-DPIC"}'`     \
!               -x c asm/yx86unix.cpp | as -o asm/yx86-elf.o
  
  # solaris
  asm/dx86-sol.o: asm/dx86unix.cpp
!       $(CC) -E -DSOL `echo $(CFLAGS) | awk '/-.PIC/{print"-DPIC"}'`   \
!               asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s
        as -o asm/dx86-sol.o asm/dx86-sol.s
        rm -f asm/dx86-sol.s
  
  asm/yx86-sol.o: asm/yx86unix.cpp
!       $(CC) -E -DSOL `echo $(CFLAGS) | awk '/-.PIC/{print"-DPIC"}'`   \
!               asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s
        as -o asm/yx86-sol.o asm/yx86-sol.s
        rm -f asm/yx86-sol.s
  
*** ./crypto/perlasm/x86unix.pl.orig    Mon Jun  4 18:34:31 2001
--- ./crypto/perlasm/x86unix.pl Fri Dec 13 10:31:34 2002
***************
*** 87,98 ****
        $ret.=$addr if ($addr ne "") && ($addr ne 0);
        if ($reg2 ne "")
                {
!               if($idx ne "")
                    { $ret.="($reg1,$reg2,$idx)"; }
                else
                    { $ret.="($reg1,$reg2)"; }
                }
!       else
                { $ret.="($reg1)" }
        return($ret);
        }
--- 87,98 ----
        $ret.=$addr if ($addr ne "") && ($addr ne 0);
        if ($reg2 ne "")
                {
!               if($idx ne "" && $idx != 0)
                    { $ret.="($reg1,$reg2,$idx)"; }
                else
                    { $ret.="($reg1,$reg2)"; }
                }
!       elsif ($reg1 ne "")
                { $ret.="($reg1)" }
        return($ret);
        }
***************
*** 542,544 ****
--- 542,563 ----
        &main'pop("edx");
        &main'popf();
        }
+ 
+ sub main'picmeup
+       {
+       local($dst,$sym)=@_;
+       local($tmp)=<<___;
+ #if (defined(ELF) || defined(SOL)) && defined(PIC)
+       .align  8
+       call    1f
+ 1:    popl    $regs{$dst}
+       addl    \$_GLOBAL_OFFSET_TABLE_+[.-1b],$regs{$dst}
+       movl    $sym\@GOT($regs{$dst}),$regs{$dst}
+ #else
+       movl    \$$sym,$regs{$dst}
+ #endif
+ ___
+       push(@out,$tmp);
+       }
+ 
+ sub main'blindpop { &out1("popl",@_); }
*** ./crypto/perlasm/cbc.pl.orig        Mon Dec 21 11:55:30 1998
--- ./crypto/perlasm/cbc.pl     Fri Dec 13 01:30:35 2002
***************
*** 146,154 ****
        &mov($count,    &wparam(2));    # length
        &and($count,    7);
        &jz(&label("finish"));
        &xor("ecx","ecx");
        &xor("edx","edx");
!       &mov($count,&DWP(&label("cbc_enc_jmp_table"),"",$count,4));
        &jmp_ptr($count);
  
  &set_label("ej7");
--- 146,160 ----
        &mov($count,    &wparam(2));    # length
        &and($count,    7);
        &jz(&label("finish"));
+       &call(&label("PIC_point"));
+ &set_label("PIC_point");
+       &blindpop("edx");
+       &lea("ecx",&DWP(&label("cbc_enc_jmp_table")."-".&label("PIC_point"),"edx"));
+       &mov($count,&DWP(0,"ecx",$count,4))
+       &add($count,"edx");
        &xor("ecx","ecx");
        &xor("edx","edx");
!       #&mov($count,&DWP(&label("cbc_enc_jmp_table"),"",$count,4));
        &jmp_ptr($count);
  
  &set_label("ej7");
***************
*** 318,339 ****
  
        &set_label("cbc_enc_jmp_table",1);
        &data_word("0");
!       &data_word(&label("ej1"));
!       &data_word(&label("ej2"));
!       &data_word(&label("ej3"));
!       &data_word(&label("ej4"));
!       &data_word(&label("ej5"));
!       &data_word(&label("ej6"));
!       &data_word(&label("ej7"));
!       &set_label("cbc_dec_jmp_table",1);
!       &data_word("0");
!       &data_word(&label("dj1"));
!       &data_word(&label("dj2"));
!       &data_word(&label("dj3"));
!       &data_word(&label("dj4"));
!       &data_word(&label("dj5"));
!       &data_word(&label("dj6"));
!       &data_word(&label("dj7"));
  
        &function_end_B($name);
        
--- 324,346 ----
  
        &set_label("cbc_enc_jmp_table",1);
        &data_word("0");
!       &data_word(&label("ej1")."-".&label("PIC_point"));
!       &data_word(&label("ej2")."-".&label("PIC_point"));
!       &data_word(&label("ej3")."-".&label("PIC_point"));
!       &data_word(&label("ej4")."-".&label("PIC_point"));
!       &data_word(&label("ej5")."-".&label("PIC_point"));
!       &data_word(&label("ej6")."-".&label("PIC_point"));
!       &data_word(&label("ej7")."-".&label("PIC_point"));
!       # not used
!       #&set_label("cbc_dec_jmp_table",1);
!       #&data_word("0");
!       #&data_word(&label("dj1")."-".&label("PIC_point"));
!       #&data_word(&label("dj2")."-".&label("PIC_point"));
!       #&data_word(&label("dj3")."-".&label("PIC_point"));
!       #&data_word(&label("dj4")."-".&label("PIC_point"));
!       #&data_word(&label("dj5")."-".&label("PIC_point"));
!       #&data_word(&label("dj6")."-".&label("PIC_point"));
!       #&data_word(&label("dj7")."-".&label("PIC_point"));
  
        &function_end_B($name);
        
*** ./crypto/perlasm/x86ms.pl.orig      Fri Dec 13 02:16:53 2002
--- ./crypto/perlasm/x86ms.pl   Fri Dec 13 02:15:46 2002
***************
*** 363,365 ****
--- 363,367 ----
  
        push(@out,"\t$name\t ".&conv($p1)."\n");
        }
+ 
+ sub main'blindpop { &out1("pop",@_); }
*** ./crypto/perlasm/x86nasm.pl.orig    Thu Jun 27 17:05:02 2002
--- ./crypto/perlasm/x86nasm.pl Fri Dec 13 02:16:43 2002
***************
*** 340,342 ****
--- 340,344 ----
  
        push(@out,"\t$name\t ".&conv($p1)."\n");
        }
+ 
+ sub main'blindpop { &out1("pop",@_); }
*** ./Configure.orig    Fri Dec  6 18:05:38 2002
--- ./Configure Fri Dec 13 02:03:27 2002
***************
*** 1083,1088 ****
--- 1083,1093 ----
        $sha1_obj=$md5_obj=$rmd160_obj="";
        }
  
+ if (!$no_shared)
+       {
+       $cast_obj="";   # CAST assembler is not PIC
+       }
+ 
  if ($threads)
        {
        $cflags=$thread_cflags;
***************
*** 1098,1117 ****
  
  # You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
  my $shared_mark = "";
! if ($shared_target ne "")
        {
        if ($shared_cflag ne "")
                {
                $cflags = "$shared_cflag $cflags";
                }
-       if (!$no_shared)
-               {
-               #$shared_mark = "\$(SHARED_LIBS)";
-               }
-       }
- else
-       {
-       $no_shared = 1;
        }
  
  if ($sys_id ne "")
--- 1103,1118 ----
  
  # You will find shlib_mark1 and shlib_mark2 explained in Makefile.org
  my $shared_mark = "";
! if ($shared_target eq "")
!       {
!       $no_shared = 1;
!       }
! if (!$no_shared)
        {
        if ($shared_cflag ne "")
                {
                $cflags = "$shared_cflag $cflags";
                }
        }
  
  if ($sys_id ne "")

Reply via email to