Configure - move the addition of the zlib / libz lib to configs
authorRichard Levitte <levitte@openssl.org>
Sat, 27 Feb 2016 10:37:33 +0000 (11:37 +0100)
committerRichard Levitte <levitte@openssl.org>
Wed, 2 Mar 2016 18:15:42 +0000 (19:15 +0100)
Configure had the Unix centric addition of -lz when linking with zlib
is enabled, which doesn't work on other platforms.  Therefore, we move
it to the BASE_unix config template and add corresponding ones in the
other BASE_* config templates.  The Windows one is probably incomplete,
but that doesn't matter for the moment, as mk1mf does it's own thing
anyway.

This required making the %withargs table global, so perl snippets in
the configs can use it.

Reviewed-by: Andy Polyakov <appro@openssl.org>
Configurations/00-base-templates.conf
Configurations/10-main.conf
Configurations/90-team.conf
Configurations/99-personal-bodo.conf
Configurations/99-personal-geoff.conf
Configurations/99-personal-steve.conf
Configure

index 3424f12..60cd90e 100644 (file)
     },
 
     BASE_common => {
+       template        => 1,
+       defines         =>
+           [ sub {
+               unless ($disabled{zlib}) {
+                   if (defined($disabled{"zlib-dynamic"})) {
+                       return "ZLIB";
+                   } else {
+                       return "ZLIB_SHARED";
+                   }
+               }
+               return (); }
+           ],
     },
 
     BASE_unix => {
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        ex_libs         =>
+            sub {
+                unless ($disabled{zlib}) {
+                    if (defined($disabled{"zlib-dynamic"})) {
+                        if (defined($withargs{zlib_lib})) {
+                            return "-L".$withargs{zlib_lib}." -lz";
+                        } else {
+                            return "-lz";
+                        }
+                    }
+                }
+                return (); },
+
         build_scheme    => "unixmake",
         build_file      => "Makefile",
     },
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        ex_libs         =>
+            sub {
+                unless ($disabled{zlib}) {
+                    if (defined($disabled{"zlib-dynamic"})) {
+                        return "zlib1.lib";
+                    }
+                }
+                return (); },
+
         build_scheme    => [ "mk1mf" ],
     },
 
         inherit_from    => [ "BASE_common" ],
         template        => 1,
 
+        ex_libs          =>
+            sub {
+                unless ($disabled{zlib}) {
+                    if (defined($disabled{"zlib-dynamic"})) {
+                        if (defined($withargs{zlib_lib})) {
+                            return $withargs{zlib_lib}.'GNV$LIBZSHR.EXE/SHARED'
+                        } else {
+                            return 'GNV$LIBZSHR/SHARE';
+                        }
+                    }
+                }
+                return (); },
+
         build_file       => "descrip.mms",
         build_scheme     => [ "unified", "VMS" ],
     },
index 61a9c6c..3b90403 100644 (file)
@@ -37,7 +37,7 @@
         inherit_from     => [ "BASE_unix" ],
         template         => 1,
         cflags           => "-DFILIO_H",
-        ex_libs          => "-lresolv -lsocket -lnsl -ldl",
+        ex_libs          => add("-lresolv -lsocket -lnsl -ldl"),
         dso_scheme       => "dlfcn",
         shared_target    => "solaris-shared",
         shared_extension => ".so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)",
         debug_cflags     => "-g -O0",
         release_cflags   => "-O2",
         thread_cflag     => "-D_SGI_MP_SOURCE",
-        ex_libs          => "-lpthread",
+        ex_libs          => add("-lpthread"),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT",
         perlasm_scheme   => "n32",
         dso_scheme       => "dlfcn",
         debug_cflags     => "-g -O0",
         release_cflags   => "-O2",
         thread_cflag     => "-D_SGI_MP_SOURCE",
-        ex_libs          => "-lpthread",
+        ex_libs          => add("-lpthread"),
         bn_ops           => "RC4_CHAR SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "64",
         dso_scheme       => "dlfcn",
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
-        ex_libs          => "-Wl,+s -ldld",
+        ex_libs          => add("-Wl,+s -ldld"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dl",
         shared_target    => "hpux-shared",
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         debug_cflags      => "+O0 +d -g",
         release_cflags   => "+O3",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-Wl,+s -ldld -lpthread",
+        ex_libs          => add("-Wl,+s -ldld -lpthread"),
         bn_ops           => "RC4_CHAR",
         dso_scheme       => "dl",
         shared_target    => "hpux-shared",
         debug_cflags      => "+O0 +d -g",
         release_cflags   => "+O3",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl -lpthread",
+        ex_libs          => add("-ldl -lpthread"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         debug_cflags     => "+O0 +d -g",
         release_cflags   => "+O2",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl -lpthread",
+        ex_libs          => add("-ldl -lpthread"),
         bn_ops           => "SIXTY_FOUR_BIT",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         debug_cflags     => "+O0 +d -g",
         release_cflags   => "+O3",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl -lpthread",
+        ex_libs          => add("-ldl -lpthread"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         debug_cflags     => "-O0 -g",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         dso_scheme       => "dlfcn",
         shared_target    => "hpux-shared",
         cflags           => "-D_ENDIAN -DBN_DIV2W -O3 -D_POSIX_SOURCE -D_SOCKET_SOURCE -I/SYSLOG/PUB",
         thread_cflag     => "(unknown)",
         sys_id           => "MPE",
-        ex_libs          => "-L/SYSLOG/PUB -lsyslog -lsocket -lcurses",
+        ex_libs          => add("-L/SYSLOG/PUB -lsyslog -lsocket -lcurses"),
         bn_ops           => "BN_LLONG",
     },
 
         debug_cflags     => "-O0 -g -DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG",
         release_cflags   => "-O3",
         thread_cflag     => "-pthread",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "BN_LLONG RC4_CHAR",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
         cflags           => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
         debug_cflags     => "-O0 -g",
         lflags           => "-pie",
-        ex_libs          => "-ldl",
         shared_cflag     => "",
     },
     "android-x86" => {
         cflags           => "-mandroid -fPIC --sysroot=\$(CROSS_SYSROOT) -Wa,--noexecstack -Wall",
         debug_cflags     => "-O0 -g",
         lflags           => "-pie",
-        ex_libs          => "-ldl",
         shared_cflag     => "",
     },
     "android64-aarch64" => {
         cc               => "gcc",
         cflags           => "-DPERL5 -DL_ENDIAN -fomit-frame-pointer -O3 -Wall",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
     "QNX6" => {
         inherit_from     => [ "BASE_unix" ],
         cc               => "gcc",
-        ex_libs          => "-lsocket",
+        ex_libs          => add("-lsocket"),
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
         shared_cflag     => "-fPIC",
         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -O2 -Wall",
-        ex_libs          => "-lsocket",
+        ex_libs          => add("-lsocket"),
         dso_scheme       => "dlfcn",
         shared_target    => "bsd-gcc-shared",
         shared_cflag     => "-fPIC",
         cc               => "cc",
         cflags           => "-DFILIO_H -DNO_STRINGS_H",
         thread_cflag     => "-Kthread",
-        ex_libs          => "-lsocket -lnsl -lresolv -lx",
+        ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
     },
     "unixware-2.1" => {
         inherit_from     => [ "BASE_unix" ],
         cc               => "cc",
         cflags           => "-O -DFILIO_H",
         thread_cflag     => "-Kthread",
-        ex_libs          => "-lsocket -lnsl -lresolv -lx",
+        ex_libs          => add("-lsocket -lnsl -lresolv -lx"),
     },
     "unixware-7" => {
         inherit_from     => [ "BASE_unix", asm("x86_elf_asm") ],
         cc               => "cc",
         cflags           => "-O -DFILIO_H -Kalloca",
         thread_cflag     => "-Kthread",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -DFILIO_H -O3 -fomit-frame-pointer -Wall",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         cc               => "cc",
         cflags           => "-belf",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add("-lsocket -lnsl"),
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         shared_target    => "svr3-shared",
         cc               => "gcc",
         cflags           => "-O3 -fomit-frame-pointer",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "BN_LLONG",
         perlasm_scheme   => "elf-1",
         dso_scheme       => "dlfcn",
         cc               => "c89",
         cflags           => "-O -XLLML -XLLMK -XL -DB_ENDIAN -DCHARSET_EBCDIC",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add("-lsocket -lnsl"),
         bn_ops           => "THIRTY_TWO_BIT RC4_CHAR",
     },
 
         release_cflags   => "-O3 -fomit-frame-pointer",
         thread_cflag     => "-D_MT",
         sys_id           => "MINGW32",
-        ex_libs          => "-lws2_32 -lgdi32 -lcrypt32",
+        ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
         bn_ops           => "BN_LLONG EXPORT_VAR_AS_FN",
         perlasm_scheme   => "coff",
         dso_scheme       => "win32",
         release_cflags   => "-O3",
         thread_cflag     => "-D_MT",
         sys_id           => "MINGW64",
-        ex_libs          => "-lws2_32 -lgdi32 -lcrypt32",
+        ex_libs          => add("-lws2_32 -lgdi32 -lcrypt32"),
         bn_ops           => "SIXTY_FOUR_BIT EXPORT_VAR_AS_FN",
         perlasm_scheme   => "mingw64",
         dso_scheme       => "win32",
         cc               => "gcc",
         cflags           => "-I/dev/env/WATT_ROOT/inc -DTERMIO -DL_ENDIAN -fomit-frame-pointer -O2 -Wall",
         sys_id           => "MSDOS",
-        ex_libs          => "-L/dev/env/WATT_ROOT/lib -lwatt",
+        ex_libs          => add("-L/dev/env/WATT_ROOT/lib -lwatt"),
         bn_ops           => "BN_LLONG",
         perlasm_scheme   => "a.out",
     },
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
         thread_cflag     => "-pthread",
-        ex_libs          => "-ldl",
+        ex_libs          => add("-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
         cc               => "ccppc",
         cflags           => "-D_REENTRANT -mrtp -mhard-float -mstrict-align -fno-implicit-fp -DPPC32_fp60x -O2 -fstrength-reduce -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
         sys_id           => "VXWORKS",
-        ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common",
+        ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/common"),
     },
     "vxworks-ppcgen" => {
         inherit_from     => [ "BASE_unix" ],
         cc               => "ccppc",
         cflags           => "-D_REENTRANT -mrtp -msoft-float -mstrict-align -O1 -fno-builtin -fno-strict-aliasing -Wall -DCPU=PPC32 -DTOOL_FAMILY=gnu -DTOOL=gnu -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/usr/h/wrn/coreip",
         sys_id           => "VXWORKS",
-        ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon",
+        ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/ppc/PPC32/sfcommon"),
     },
     "vxworks-ppc405" => {
         inherit_from     => [ "BASE_unix" ],
         cflags           => "-mrtp -mips2 -O -G 0 -B\$(WIND_BASE)/host/\$(WIND_HOST_TYPE)/lib/gcc-lib/ -D_VSB_CONFIG_FILE=\"\$(WIND_BASE)/target/lib/h/config/vsbConfig.h\" -DCPU=MIPS32 -msoft-float -mno-branch-likely -DTOOL_FAMILY=gnu -DTOOL=gnu -fno-builtin -fno-defer-pop -DNO_STRINGS_H -I\$(WIND_BASE)/target/usr/h -I\$(WIND_BASE)/target/h/wrn/coreip",
         thread_cflag     => "-D_REENTRANT",
         sys_id           => "VXWORKS",
-        ex_libs          => "-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon",
+        ex_libs          => add("-Wl,--defsym,__wrs_rtp_base=0xe0000000 -L \$(WIND_BASE)/target/usr/lib/mips/MIPSI32/sfcommon"),
         perlasm_scheme   => "o32",
         ranlib           => "ranlibmips",
     },
         cflags           => "\$(CFLAGS)",
         thread_cflag     => "-D_REENTRANT",
         plib_lflags      => "\$(LDFLAGS)",
-        ex_libs          => "\$(LDLIBS)",
+        ex_libs          => add("\$(LDLIBS)"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "$ENV{'LIBSSL_dlfcn'}",
         shared_target    => "linux-shared",
         cflags           => "\$(CFLAGS)",
         thread_cflag     => "-D_REENTRANT",
         plib_lflags      => "\$(LDFLAGS)",
-        ex_libs          => "\$(LDLIBS)",
+        ex_libs          => add("\$(LDLIBS)"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         dso_scheme       => "$ENV{'LIBSSL_dlfcn'}",
         shared_target    => "linux-shared",
     "vms-alpha-P32" => {
        inherit_from     => [ "vms-alpha" ],
        cflags           => add("/POINTER_SIZE=32"),
+       ex_libs          => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
     },
     "vms-alpha-P64" => {
        inherit_from     => [ "vms-alpha" ],
        cflags           => add("/POINTER_SIZE=64"),
+       ex_libs          => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
     },
     "vms-ia64" => {
         inherit_from     => [ "vms-generic" ],
     "vms-ia64-P32" => {
        inherit_from     => [ "vms-ia64" ],
        cflags           => add("/POINTER_SIZE=32"),
+       ex_libs          => sub { join(",", map { s|SHR([\./])|SHR32$1|g; $_ } @_) },
     },
     "vms-ia64-P64" => {
        inherit_from     => [ "vms-ia64" ],
        cflags           => add("/POINTER_SIZE=64"),
+       ex_libs          => sub { join(",", map { s|SHR([\./])|SHR64$1|g; $_ } @_) },
     },
 
 );
index 7667464..5217504 100644 (file)
@@ -6,20 +6,20 @@
         cc               => "purify gcc",
         cflags           => "-g -Wall",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-lsocket -lnsl",
+        ex_libs          => add(" ","-lsocket -lnsl"),
     },
     "debug" => {
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DOPENSSL_NO_ASM -ggdb -g2 -Wformat -Wshadow -Wmissing-prototypes -Wmissing-declarations -Werror",
         thread_cflag     => "(unknown)",
-        ex_libs          => "-lefence",
+        ex_libs          => add(" ","-lefence"),
     },
     "debug-erbridge" => {
         inherit_from     => [ "x86_64_asm" ],
         cc               => "gcc",
         cflags           => "$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -m64 -DL_ENDIAN -DTERMIO -g",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         dso_scheme       => "dlfcn",
@@ -34,7 +34,7 @@
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentium -Wall",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
     },
@@ -43,7 +43,7 @@
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -mcpu=pentiumpro -Wall",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
     },
@@ -52,7 +52,7 @@
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DREF_DEBUG -DCONF_DEBUG -DBN_CTX_DEBUG -DL_ENDIAN -g -Wall",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
@@ -63,7 +63,7 @@
         cc               => "gcc",
         cflags           => "-DL_ENDIAN -O3 -fomit-frame-pointer -Wall",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         cpuid_asm_src    => "x86cpuid.s",
         bn_asm_src       => "bn-586.s co-586.s x86-mont.s",
index 24c0e1e..c59333a 100644 (file)
@@ -7,7 +7,7 @@
         cc               => "gcc",
         cflags           => "$gcc_devteam_warn -Wno-error=overlength-strings -DBN_DEBUG -DBN_DEBUG_RAND -DCONF_DEBUG -m64 -DL_ENDIAN -DTERMIO -g -DMD32_REG_T=int",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         dso_scheme       => "dlfcn",
index 89ba499..0e393f9 100644 (file)
@@ -6,7 +6,7 @@
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
@@ -17,7 +17,7 @@
         cc               => "gcc",
         cflags           => "-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG RC4_CHAR",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
index bf9dbf4..9aadf4b 100644 (file)
@@ -7,7 +7,7 @@
         cc               => "gcc",
         cflags           => "$gcc_devteam_warn -pthread -m64 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -g",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         dso_scheme       => "dlfcn",
@@ -22,7 +22,7 @@
         cflags           => "$gcc_devteam_warn -pthread -m32 -DL_ENDIAN -DCONF_DEBUG -g",
         thread_cflag     => "-D_REENTRANT",
         lflags           => "-rdynamic",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "BN_LLONG",
         dso_scheme       => "dlfcn",
         shared_target    => "linux-shared",
@@ -35,7 +35,7 @@
         cc               => "gcc",
         cflags           => "$gcc_devteam_warn -pthread -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -g",
         thread_cflag     => "-D_REENTRANT",
-        ex_libs          => "-ldl",
+        ex_libs          => add(" ","-ldl"),
         bn_ops           => "SIXTY_FOUR_BIT_LONG",
         perlasm_scheme   => "elf",
         dso_scheme       => "dlfcn",
index 9226b90..57a57bd 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -138,6 +138,7 @@ my $apitable = {
 
 our %table = ();
 our %config = ();
+our %withargs = ();
 
 # Forward declarations ###############################################
 
@@ -437,7 +438,6 @@ $config{openssl_other_defines}=[];
 my $libs="";
 my $target="";
 $config{options}="";
-my %withargs=();
 my $build_prefix = "release_";
 
 my @argvcopy=@ARGV;
@@ -980,26 +980,6 @@ if ($threads)
        push @{$config{openssl_thread_defines}}, @thread_defines;
        }
 
-unless ($disabled{zlib})
-       {
-       push @{$config{defines}}, "ZLIB";
-       if (defined($disabled{"zlib-dynamic"}))
-               {
-               if (defined($withargs{zlib_lib}))
-                       {
-                       $config{ex_libs} .= " -L" . $withargs{zlib_lib} . " -lz";
-                       }
-               else
-                       {
-                       $config{ex_libs} .= " -lz";
-                       }
-               }
-       else
-               {
-               push @{$config{defines}}, "ZLIB_SHARED";
-               }
-       }
-
 # With "deprecated" disable all deprecated features.
 if (defined($disabled{"deprecated"})) {
         $config{api} = $maxapi;