@@ -89,7 +89,7 @@ only those relevant to PHP are listed:
8989 Default: ` EPREFIX/lib `
9090* ` --includedir=DIR ` - set the project C header files location;
9191 Default: ` PREFIX/include `
92- * ` --datarootdir=DIR ` - set read-only arch. -independent data root;
92+ * ` --datarootdir=DIR ` - set read-only architecture -independent data root;
9393 Default: ` PREFIX/share `
9494* ` --datadir=DIR ` - set read-only architecture-independent data location;
9595 Default: ` DATAROOTDIR `
@@ -125,6 +125,7 @@ Common practice is to also add program prefix and suffix (for example, to have
125125 PHP_EXTRA_VERSION=" -acme" \
126126 EXTENSION_DIR=/path/to/php/extensions \
127127 --with-layout=GNU \
128+ --with-pear=\$ {datadir}/pear \
128129 --localstatedir=/var \
129130 --sysconfdir=/etc \
130131 --program-suffix=84 \
@@ -136,13 +137,13 @@ See `./configure --help` for more information on how to adjust these locations.
136137Default PHP Autotools directory structure with GNU layout (` --with-layout=GNU ` ):
137138
138139``` sh
139- π < INSTALL_ROOT> # π # Stage directory
140+ π¦ < INSTALL_ROOT> # π¦ # Stage directory
140141ββπ ${prefix} # ββπ /usr/local # Installation prefix
141142 ββπ ${bindir} # ββπ bin # Executable binary directory
142143 ββπ ${sysconfdir} # ββπ etc # System configuration directory
143144 ββπ php-fpm.d # ββπ php-fpm.d # PHP FPM configuration directory
144- ββπ php-fpm .conf.default # ββπ php-fpm .conf.default # PHP FPM configuration
145- ββπ pear .conf # ββπ pear .conf # PEAR configuration file
145+ ββπ pear .conf # ββπ pear .conf # PEAR configuration file
146+ ββπ php-fpm .conf.default # ββπ php-fpm .conf.default # PHP FPM configuration
146147 ββπ ${includedir} # ββπ include # System include directory
147148 ββπ php # ββπ php # PHP headers
148149 ββπ ext # ββπ ext # PHP extensions header files
@@ -151,39 +152,40 @@ Default PHP Autotools directory structure with GNU layout (`--with-layout=GNU`):
151152 ββπ TSRM # ββπ TSRM # PHP TSRM header files
152153 ββπ Zend # ββπ Zend # Zend engine header files
153154 ββπ ${libdir} # ββπ lib
154- ββπ php # ββπ php # PHP shared libraries and other build files, PEAR files
155+ ββπ php # ββπ php # PHP shared libraries, build files, PEAR
155156 ββπ 20230901-zts-debug # ββπ 20230901-zts-debug # PHP shared extensions (*.so files)
156157 ββπ build # ββπ build # Various PHP development and build files
157158 ββπ ${sbindir} # ββπ sbin # Executable binaries for root privileges
158159 ββπ ${datarootdir} # ββπ share # Directory with shareable files
159160 ββπ ${mandir} # ββπ man
160- ββπ man1 # β βπ man1 # PHP man section 1 pages for *nix systems
161+ ββπ man1 # β βπ man1 # PHP man section 1 pages for *nix systems
161162 ββπ man8 # ββπ man8 # PHP man section 8 pages for *nix systems
162- ββπ pear # β βπ pear # PEAR installation directory
163+ ββπ ${PHP_PEAR} # β βπ pear # PEAR installation directory
163164 ββπ php # ββπ php
164165 ββπ fpm # ββπ fpm # Additional FPM static HTML files
165166 ββπ ${localstatedir} # ββπ var # The Linux var directory
166167 ββπ log # ββπ log # Directory for PHP logs
167168 ββπ ${runstatedir} # ββπ var/run # Runtime data directory
168- π /tmp # π /tmp # System temporary directory
169- ββπ pear # ββπ pear # PEAR writes temporary files here
170- ββπ cache # ββπ cache
171- ββπ download # ββπ download
172- ββπ temp # ββπ temp
169+ π¦ / # π¦ / # System top level root directory
170+ ββπ tmp # ββπ tmp # System temporary directory
171+ ββπ pear # ββπ pear # PEAR temporary directory
172+ ββπ cache # ββπ cache
173+ ββπ download # ββπ download
174+ ββπ temp # ββπ temp
173175```
174176
175177This is how the default PHP layout directory structure looks like
176178(` --with-layout=PHP ` ). Notice the difference of the shared extensions directory
177179and the ` share ` directory being named ` php ` :
178180
179181``` sh
180- π < INSTALL_ROOT>
182+ π¦ < INSTALL_ROOT>
181183ββπ /usr/local
182184 ββπ bin
183185 ββπ etc
184186 ββπ php-fpm.d
185- ββπ php-fpm .conf.default
186- ββπ pear .conf
187+ ββπ pear .conf
188+ ββπ php-fpm .conf.default
187189 ββπ include
188190 ββπ php
189191 ββπ ext
@@ -206,9 +208,10 @@ and the `share` directory being named `php`:
206208 ββπ var
207209 ββπ log
208210 ββπ run
209- π /tmp
210- ββπ pear
211- ββπ temp
211+ π¦ /
212+ ββπ tmp
213+ ββπ pear
214+ ββπ temp
212215```
213216
214217## Installing PHP with CMake
@@ -247,7 +250,8 @@ DESTDIR=/stage cmake --install . --prefix /usr
247250> Autotools-based build system.
248251
249252* ` CMAKE_INSTALL_PREFIX ` - absolute path where to install the application;
250- Windows default: ` C:/Program Files ` , elsewhere default: ` /usr/local `
253+ \* nix default: ` /usr/local ` , Windows default:
254+ ` C:/Program Files/${PROJECT_NAME} `
251255
252256To adjust the installation locations, the
253257[ GNUInstallDirs] ( https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html )
@@ -287,7 +291,7 @@ prefix will not be taken into account.
287291
288292PHP CMake-based build system specific installation cache variables:
289293
290- * ` PHP_INCLUDE_PREFIX ` - To set the PHP include directory inside the
294+ * ` PHP_INCLUDE_PREFIX ` - the PHP include directory inside the
291295 ` CMAKE_INSTALL_INCLUDEDIR ` ;
292296 Default: ` php `
293297* ` PHP_PEAR_TEMP_DIR ` - path where PEAR writes temporary files;
@@ -302,13 +306,13 @@ PHP CMake-based build system specific installation cache variables:
302306PHP installation directory structure when using CMake:
303307
304308``` sh
305- π $ENV {DESTDIR} # π
309+ π¦ $ENV {DESTDIR} # π¦
306310ββπ ${CMAKE_INSTALL_PREFIX} # ββπ /usr/local (Windows: C:/Program Files/${PROJECT_NAME})
307311 ββπ ${CMAKE_INSTALL_BINDIR} # ββπ bin
308312 ββπ ${CMAKE_INSTALL_SYSCONFDIR} # ββπ etc
309313 ββπ php-fpm.d # ββπ php-fpm.d
310- ββπ php-fpm .conf.default # ββπ php-fpm .conf.default
311- ββπ pear .conf # ββπ pear .conf
314+ ββπ pear .conf # ββπ pear .conf
315+ ββπ php-fpm .conf.default # ββπ php-fpm .conf.default
312316 ββπ ${CMAKE_INSTALL_INCLUDEDIR} # ββπ include
313317 ββπ ${PHP_INCLUDE_PREFIX} # ββπ php
314318 ββπ ext # ββπ ext
0 commit comments