Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add build instructions for Fedora #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ See http://php-decimal.io
- PHP >= 7.2
- [libmpdec >= 2.4](http://www.bytereef.org/mpdecimal/download.html)

### Installing libmpdec header files

For Fedora:
```shell
sudo dnf install mpdecimal-devel
```

## Install

```
Expand All @@ -42,3 +49,22 @@ You can do this temporarily using `php -dextension=decimal.so` or by adding `ext
```
php run-tests.php -P -q
```

## Build from source

Build a debug build of ``php-src`` with a prefix as follows:
```shell
./configure --disable-all --enable-debug --prefix /path/to/custom-php/
```

Within the folder of this extension first run ``phpize`` and then

```shell
./configure --with-php-config=/path/to/custom-php/bin/php-config CFLAGS="-Wfatal-errors -Wall -Wpedantic -Wextra -Wno-unused-parameter -Werror"
```

And finally:
```shell
make -jN
```
Where ``N`` is the number of cores available for compilation