Commit 998dbbc76dc214ae28db3dc58f1991e7f39e9051
1 parent
0142ec20
Exists in
master
and in
5 other branches
Melhorando detecção de diretório para os arquivos de configuração do PHP.
Showing
1 changed file
with
18 additions
and
6 deletions
Show diff stats
configure.ac
... | ... | @@ -565,14 +565,26 @@ case "$host" in |
565 | 565 | AC_DEFINE(HAVE_PHP) |
566 | 566 | EXTENSIONS="$EXTENSIONS php" |
567 | 567 | PHPMAJOR=`$PHPCONFIG --version | cut -d. -f1` |
568 | - if test -d /etc/php${PHPMAJOR}/conf.d; then | |
569 | - PHPCONFDIR=/etc/php${PHPMAJOR}/conf.d | |
570 | - elif test -d /etc/php/conf.d; then | |
571 | - PHPCONFDIR=/etc/php/conf.d | |
568 | + | |
569 | + PHPCONFDIR=`$PHPCONFIG | sed "s@ @\n@g" | grep "^--with-config-file-scan-dir=" | cut -d= -f2` | |
570 | + | |
571 | + if test -z "${PHPCONFDIR}"; then | |
572 | + | |
573 | + if test -d /etc/php${PHPMAJOR}/conf.d; then | |
574 | + PHPCONFDIR=/etc/php${PHPMAJOR}/conf.d | |
575 | + elif test -d /etc/php/conf.d; then | |
576 | + PHPCONFDIR=/etc/php/conf.d | |
577 | + else | |
578 | + PHPCONFDIR=/etc/php${PHPMAJOR}/cli | |
579 | + fi | |
580 | + | |
581 | + AC_MSG_NOTICE([Using $PHPCONFDIR for PHP config files.]) | |
582 | + | |
572 | 583 | else |
573 | - PHPCONFDIR=/etc/php${PHPMAJOR}/cli | |
584 | + | |
585 | + AC_MSG_NOTICE([Detected $PHPCONFDIR for PHP config files.]) | |
586 | + | |
574 | 587 | fi |
575 | - AC_MSG_NOTICE([Using $PHPCONFDIR for PHP config files.]) | |
576 | 588 | |
577 | 589 | AC_CONFIG_FILES(src/php/Makefile) |
578 | 590 | AC_CONFIG_FILES(src/php/php3270.h) | ... | ... |