File: virt-php-confdir.m4

package info (click to toggle)
libvirt-php 0.5.8-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 3,140 kB
  • sloc: ansic: 9,352; sh: 4,578; php: 269; makefile: 219; xml: 93
file content (50 lines) | stat: -rw-r--r-- 1,770 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
dnl The libvirt-php.so config
dnl
dnl Copyright (C) 2016 Red Hat, Inc.
dnl
dnl This library is free software; you can redistribute it and/or
dnl modify it under the terms of the GNU Lesser General Public
dnl License as published by the Free Software Foundation; either
dnl version 2.1 of the License, or (at your option) any later version.
dnl
dnl This library is distributed in the hope that it will be useful,
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
dnl Lesser General Public License for more details.
dnl
dnl You should have received a copy of the GNU Lesser General Public
dnl License along with this library.  If not, see
dnl <http://www.gnu.org/licenses/>.
dnl

AC_DEFUN([LIBVIRT_CHECK_PHP_CONFDIR],[
  AC_ARG_WITH([php-confdir],
    [AS_HELP_STRING([--with-php-confdir],
      [location of php extenstion config files])],
      [], [with_php_confdir=check])

  dnl Check for system location of php configs
  if test "x$with_php_confdir" != "xno" ; then
    if test "x$with_php_confdir" = "xcheck" ; then
      confdir="$($PHPCONFIG --configure-options | sed -n 's/.*--with-config-file-scan-dir=\(\S*\).*/\1/p')"
      if test "x$confdir" == "x" ; then
        dnl There's no usable result from phpconfig. Use some default.
        confdir="/etc/php.d/"
      fi
    elif test "x$with_php_confdir" = "xno" || test "x$with_php_confdir" = "xyes"; then
      AC_MSG_ERROR([php-confdir must be used only with valid path])
    else
      confdir=$with_php_confdir
    fi
  fi

  if test "x$with_distcheck" == "xyes" ; then
     confdir=${prefix}${confdir}
  fi

  AC_SUBST([confdir])
])

AC_DEFUN([LIBVIRT_RESULT_PHP_CONFDIR],[
  AC_MSG_NOTICE([php-confdir: $confdir])
])