# patch review for acinclude.m4

- Thread: https://externals.io/message/5416
- Original archive: https://news-web.php.net/php.internals/5416
- Started by Brian J. France on 2003-11-13T07:19:22+00:00
- Messages: 5
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · RFCs at https://externals.io/rfc.md · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #5416 — Brian J. France — 2003-11-13T07:19:22+00:00

URL: https://externals.io/message/5416#5416

If there are no objections I plan on committing this tomorrow on both HEAD and 
PHP_4_3 branches.  This fixes the openssl FreeBSD problem I posted about 
earlier.

Is there a better way of fixing it?

Brian

Index: acinclude.m4
===================================================================
RCS file: /repository/php-src/acinclude.m4,v
retrieving revision 1.264
diff -u -p -r1.264 acinclude.m4
--- acinclude.m4        3 Oct 2003 04:29:13 -0000       1.264
+++ acinclude.m4        13 Nov 2003 07:08:28 -0000
@@ -1659,6 +1659,10 @@ AC_DEFUN([PHP_SETUP_OPENSSL],[
       -L$OPENSSL_LIBDIR
     ])
   
+    dnl openssl on FreeBSD doesn't have a dependence on crypto
+    dnl    force it
+    LIBS="$LIBS -lcrypto";
+
     PHP_CHECK_LIBRARY(ssl, SSL_CTX_set_ssl_version, [
       PHP_ADD_LIBRARY(ssl,,$1)
       found_openssl=yes

---

## #5419 — Sascha Schumann — 2003-11-13T08:03:31+00:00

URL: https://externals.io/message/5416#5419 · In reply to: #5416

> If there are no objections I plan on committing this tomorrow on both HEAD and
> PHP_4_3 branches.  This fixes the openssl FreeBSD problem I posted about
> earlier.

    What is the problem here?  4.3.4 already checks this way:

    configure:16456: checking for SSL_CTX_set_ssl_version in -lssl
    configure:16475: ccache gcc -o conftest -O0 -Wall
    -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib
    -Wl,-rpath,/usr/local/ssl/lib -L/usr/local/ssl/lib conftest.c
    -lssl  -lcrypto -lresolv -lm -ldl -lnsl  1>&5
    ^^^^^^^^^^^^^^^

    - Sascha

---

## #5430 — Jani Taskinen — 2003-11-13T14:19:23+00:00

URL: https://externals.io/message/5416#5430 · In reply to: #5416

>If there are no objections I plan on committing this tomorrow on both HEAD and 
>PHP_4_3 branches.  This fixes the openssl FreeBSD problem I posted about 
>earlier.
>
>Is there a better way of fixing it?

    Yes, you shouldn't pollute LIBS like that. :)
    I committed a bit better fix for this.
    
    Hint: Don't compile extensions as shared..it really doesn't give
    you anything extra, just more problems like this.
    
    --Jani

---

## #5431 — Brian J. France — 2003-11-13T15:58:05+00:00

URL: https://externals.io/message/5416#5431 · In reply to: #5430

> 
>     Yes, you shouldn't pollute LIBS like that. :)
>     I committed a bit better fix for this.

Thank you!

>     Hint: Don't compile extensions as shared..it really doesn't give
>     you anything extra, just more problems like this.

Yes, I agree that is true in almost 99.9% of all cases, but I am in that 
0.1%.  No point building snmp (or insert any other extension here) into our 
default PHP build for 3,000+ machines when only about 4 machines will be using 
it.

Brian

---

## #5438 — Jani Taskinen — 2003-11-13T18:38:43+00:00

URL: https://externals.io/message/5416#5438 · In reply to: #5431

> > […]
>
>Yes, I agree that is true in almost 99.9% of all cases, but I am in that 
>0.1%.  No point building snmp (or insert any other extension here) into our 
>default PHP build for 3,000+ machines when only about 4 machines will be using 
>it.

    Heh, that's a good enough reason. :)
    
    --Jani
