[03/10] configure: Allow linking to openssl

Message ID 1320154365-10834-3-git-send-email-martin@martin.st
State Committed
Headers show

Commit Message

Martin Storsjö Nov. 1, 2011, 1:32 p.m.
---
 configure |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

Comments

Anton Khirnov Nov. 3, 2011, 12:21 p.m. | #1
On Tue,  1 Nov 2011 15:32:38 +0200, Martin Storsjö <martin@martin.st> wrote:
> ---
>  configure |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/configure b/configure
> index 80adbdc..cabcc2a 100755
> --- a/configure
> +++ b/configure
> @@ -190,6 +190,7 @@ External library support:
>    --enable-libxvid         enable Xvid encoding via xvidcore,
>                             native MPEG-4/Xvid encoder exists [no]
>    --enable-mlib            enable Sun medialib [no]
> +  --enable-openssl         enable openssl [no]
>    --enable-zlib            enable zlib [autodetect]
>  
>  Advanced options (experts only):
> @@ -960,6 +961,7 @@ CONFIG_LIST="
>      mpegaudiodsp
>      network
>      nonfree
> +    openssl
>      pic
>      postproc
>      rdft
> @@ -2571,6 +2573,7 @@ die_license_disabled gpl libxvid
>  die_license_disabled gpl x11grab
>  
>  die_license_disabled nonfree libfaac
> +die_license_disabled nonfree openssl
>  
>  die_license_disabled version3 libopencore_amrnb
>  die_license_disabled version3 libopencore_amrwb
> @@ -2916,6 +2919,7 @@ enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
>  enabled libxavs    && require  libxavs xavs.h xavs_encoder_encode -lxavs
>  enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
>  enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
> +enabled openssl    && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || die "openssl not found"; }

Long line is long. Can you split it a bit?
Otherwise should be fine.
Martin Storsjö Nov. 3, 2011, 12:24 p.m. | #2
On Thu, 3 Nov 2011, Anton Khirnov wrote:

>
> On Tue,  1 Nov 2011 15:32:38 +0200, Martin Storsjö <martin@martin.st> wrote:
>> ---
>>  configure |    5 +++++
>>  1 files changed, 5 insertions(+), 0 deletions(-)
>>
>> diff --git a/configure b/configure
>> index 80adbdc..cabcc2a 100755
>> --- a/configure
>> +++ b/configure
>> @@ -190,6 +190,7 @@ External library support:
>>    --enable-libxvid         enable Xvid encoding via xvidcore,
>>                             native MPEG-4/Xvid encoder exists [no]
>>    --enable-mlib            enable Sun medialib [no]
>> +  --enable-openssl         enable openssl [no]
>>    --enable-zlib            enable zlib [autodetect]
>>
>>  Advanced options (experts only):
>> @@ -960,6 +961,7 @@ CONFIG_LIST="
>>      mpegaudiodsp
>>      network
>>      nonfree
>> +    openssl
>>      pic
>>      postproc
>>      rdft
>> @@ -2571,6 +2573,7 @@ die_license_disabled gpl libxvid
>>  die_license_disabled gpl x11grab
>>
>>  die_license_disabled nonfree libfaac
>> +die_license_disabled nonfree openssl
>>
>>  die_license_disabled version3 libopencore_amrnb
>>  die_license_disabled version3 libopencore_amrwb
>> @@ -2916,6 +2919,7 @@ enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
>>  enabled libxavs    && require  libxavs xavs.h xavs_encoder_encode -lxavs
>>  enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
>>  enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
>> +enabled openssl    && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || die "openssl not found"; }
>
> Long line is long. Can you split it a bit?
> Otherwise should be fine.

Yeah, realized this one just after sending the patchset - split locally to 
slightly over 80 chars (to get it neatly split after the ||), which is IMO 
better looking than splitting arbitrarily).

// Martin

Patch

diff --git a/configure b/configure
index 80adbdc..cabcc2a 100755
--- a/configure
+++ b/configure
@@ -190,6 +190,7 @@  External library support:
   --enable-libxvid         enable Xvid encoding via xvidcore,
                            native MPEG-4/Xvid encoder exists [no]
   --enable-mlib            enable Sun medialib [no]
+  --enable-openssl         enable openssl [no]
   --enable-zlib            enable zlib [autodetect]
 
 Advanced options (experts only):
@@ -960,6 +961,7 @@  CONFIG_LIST="
     mpegaudiodsp
     network
     nonfree
+    openssl
     pic
     postproc
     rdft
@@ -2571,6 +2573,7 @@  die_license_disabled gpl libxvid
 die_license_disabled gpl x11grab
 
 die_license_disabled nonfree libfaac
+die_license_disabled nonfree openssl
 
 die_license_disabled version3 libopencore_amrnb
 die_license_disabled version3 libopencore_amrwb
@@ -2916,6 +2919,7 @@  enabled libx264    && require  libx264 x264.h x264_encoder_encode -lx264 &&
 enabled libxavs    && require  libxavs xavs.h xavs_encoder_encode -lxavs
 enabled libxvid    && require  libxvid xvid.h xvid_global -lxvidcore
 enabled mlib       && require  mediaLib mlib_types.h mlib_VectorSub_S16_U8_Mod -lmlib
+enabled openssl    && { check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto || check_lib openssl/ssl.h SSL_library_init -lssl32 -leay32 || check_lib openssl/ssl.h SSL_library_init -lssl -lcrypto -lws2_32 -lgdi32 || die "openssl not found"; }
 
 # libdc1394 check
 if enabled libdc1394; then
@@ -3195,6 +3199,7 @@  echo "libvpx enabled            ${libvpx-no}"
 echo "libx264 enabled           ${libx264-no}"
 echo "libxavs enabled           ${libxavs-no}"
 echo "libxvid enabled           ${libxvid-no}"
+echo "openssl enabled           ${openssl-no}"
 echo "zlib enabled              ${zlib-no}"
 echo "bzlib enabled             ${bzlib-no}"
 echo