# ext/intl builds on Mac

- Thread: https://externals.io/message/48450
- Original archive: https://news-web.php.net/php.internals/48450
- Started by Stas Malyshev on 2010-05-24T19:42:55+00:00
- Messages: 2
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #48450 — Stas Malyshev — 2010-05-24T19:42:55+00:00

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

Hi!

The patch below seems to fix ext/intl (and maybe others) compile 
problems on Mac OS X. The problem seems to be because C++ needs 
libstdc++ and for some reason it doesn't get added on Mac.

Could people having build problems on Mac see if this fixes the problem 
for them (buildconf/re-configure required)? Also if some autoconf guru 
could see if that makes sense in general, that'd be nice too :)

The patch:

--- acinclude.m4	(revision 299709)
+++ acinclude.m4	(working copy)
@@ -768,6 +768,11 @@
    if test -z "$php_cxx_done"; then
      AC_PROG_CXX
      AC_PROG_CXXCPP
+    case $host_alias in
+      *darwin*)
+        PHP_ADD_LIBRARY(stdc++)
+      ;;
+    esac
      php_cxx_done=yes
    fi
  ])

-- 
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

---

## #48459 — Philip Olson — 2010-05-25T01:04:29+00:00

URL: https://externals.io/message/48450#48459 · In reply to: #48450

> Hi!
> 
> The patch below seems to fix ext/intl (and maybe others) compile problems on Mac OS X. The problem seems to be because C++ needs libstdc++ and for some reason it doesn't get added on Mac.
> 
> Could people having build problems on Mac see if this fixes the problem for them (buildconf/re-configure required)? Also if some autoconf guru could see if that makes sense in general, that'd be nice too :)
> 
> The patch:
> 
> --- acinclude.m4	(revision 299709)
> +++ acinclude.m4	(working copy)
> @@ -768,6 +768,11 @@
>   if test -z "$php_cxx_done"; then
>     AC_PROG_CXX
>     AC_PROG_CXXCPP
> +    case $host_alias in
> +      *darwin*)
> +        PHP_ADD_LIBRARY(stdc++)
> +      ;;
> +    esac
>     php_cxx_done=yes
>   fi
> ])

Hello Stas,

This patch works for me, and is required for ext/intl to build.

Regards,
Philip
